fourth-spark 0.11.2 → 0.11.4
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.
- package/drizzle/meta/0007_snapshot.json +1 -1
- package/drizzle/meta/_journal.json +2 -2
- package/package.json +1 -1
- package/public/assets/index-U_OUEsk5.js +631 -0
- package/public/assets/index-YYLZk-ga.css +1 -0
- package/public/assets/{web-DTaIVS90.js → web-Bhp1xkru.js} +1 -1
- package/public/index.html +2 -2
- package/public/assets/index-7mg_EgFV.css +0 -1
- package/public/assets/index-Dctd_Gv0.js +0 -621
- /package/drizzle/{0007_chief_spitfire.sql → 0007_soft_praxagora.sql} +0 -0
|
@@ -0,0 +1,631 @@
|
|
|
1
|
+
var hB=Object.defineProperty;var mB=(e,t,n)=>t in e?hB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var un=(e,t,n)=>mB(e,typeof t!="symbol"?t+"":t,n);function pB(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const s=Object.getOwnPropertyDescriptor(r,a);s&&Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(a){if(a.ep)return;a.ep=!0;const s=n(a);fetch(a.href,s)}})();function yf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ex={exports:{}},dd={};/**
|
|
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 gw;function gB(){if(gw)return dd;gw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,s){var o=null;if(s!==void 0&&(o=""+s),a.key!==void 0&&(o=""+a.key),"key"in a){s={};for(var u in a)u!=="key"&&(s[u]=a[u])}else s=a;return a=s.ref,{$$typeof:e,type:r,key:o,ref:a!==void 0?a:null,props:s}}return dd.Fragment=t,dd.jsx=n,dd.jsxs=n,dd}var bw;function bB(){return bw||(bw=1,Ex.exports=gB()),Ex.exports}var c=bB(),_x={exports:{}},st={};/**
|
|
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 xw;function xB(){if(xw)return st;xw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.iterator;function x(P){return P===null||typeof P!="object"?null:(P=b&&P[b]||P["@@iterator"],typeof P=="function"?P:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function T(P,ee,M){this.props=P,this.context=ee,this.refs=S,this.updater=M||E}T.prototype.isReactComponent={},T.prototype.setState=function(P,ee){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,ee,"setState")},T.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function C(){}C.prototype=T.prototype;function A(P,ee,M){this.props=P,this.context=ee,this.refs=S,this.updater=M||E}var k=A.prototype=new C;k.constructor=A,_(k,T.prototype),k.isPureReactComponent=!0;var I=Array.isArray;function O(){}var j={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function z(P,ee,M){var de=M.ref;return{$$typeof:e,type:P,key:ee,ref:de!==void 0?de:null,props:M}}function D(P,ee){return z(P.type,ee,P.props)}function V(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function q(P){var ee={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(M){return ee[M]})}var ae=/\/+/g;function Q(P,ee){return typeof P=="object"&&P!==null&&P.key!=null?q(""+P.key):ee.toString(36)}function W(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(O,O):(P.status="pending",P.then(function(ee){P.status==="pending"&&(P.status="fulfilled",P.value=ee)},function(ee){P.status==="pending"&&(P.status="rejected",P.reason=ee)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function G(P,ee,M,de,_e){var U=typeof P;(U==="undefined"||U==="boolean")&&(P=null);var he=!1;if(P===null)he=!0;else switch(U){case"bigint":case"string":case"number":he=!0;break;case"object":switch(P.$$typeof){case e:case t:he=!0;break;case m:return he=P._init,G(he(P._payload),ee,M,de,_e)}}if(he)return _e=_e(P),he=de===""?"."+Q(P,0):de,I(_e)?(M="",he!=null&&(M=he.replace(ae,"$&/")+"/"),G(_e,ee,M,"",function(De){return De})):_e!=null&&(V(_e)&&(_e=D(_e,M+(_e.key==null||P&&P.key===_e.key?"":(""+_e.key).replace(ae,"$&/")+"/")+he)),ee.push(_e)),1;he=0;var Oe=de===""?".":de+":";if(I(P))for(var pe=0;pe<P.length;pe++)de=P[pe],U=Oe+Q(de,pe),he+=G(de,ee,M,U,_e);else if(pe=x(P),typeof pe=="function")for(P=pe.call(P),pe=0;!(de=P.next()).done;)de=de.value,U=Oe+Q(de,pe++),he+=G(de,ee,M,U,_e);else if(U==="object"){if(typeof P.then=="function")return G(W(P),ee,M,de,_e);throw ee=String(P),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.")}return he}function F(P,ee,M){if(P==null)return P;var de=[],_e=0;return G(P,de,"","",function(U){return ee.call(M,U,_e++)}),de}function $(P){if(P._status===-1){var ee=P._result;ee=ee(),ee.then(function(M){(P._status===0||P._status===-1)&&(P._status=1,P._result=M)},function(M){(P._status===0||P._status===-1)&&(P._status=2,P._result=M)}),P._status===-1&&(P._status=0,P._result=ee)}if(P._status===1)return P._result.default;throw P._result}var K=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ee=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(ee))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},L={map:F,forEach:function(P,ee,M){F(P,function(){ee.apply(this,arguments)},M)},count:function(P){var ee=0;return F(P,function(){ee++}),ee},toArray:function(P){return F(P,function(ee){return ee})||[]},only:function(P){if(!V(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return st.Activity=p,st.Children=L,st.Component=T,st.Fragment=n,st.Profiler=a,st.PureComponent=A,st.StrictMode=r,st.Suspense=d,st.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,st.__COMPILER_RUNTIME={__proto__:null,c:function(P){return j.H.useMemoCache(P)}},st.cache=function(P){return function(){return P.apply(null,arguments)}},st.cacheSignal=function(){return null},st.cloneElement=function(P,ee,M){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var de=_({},P.props),_e=P.key;if(ee!=null)for(U in ee.key!==void 0&&(_e=""+ee.key),ee)!H.call(ee,U)||U==="key"||U==="__self"||U==="__source"||U==="ref"&&ee.ref===void 0||(de[U]=ee[U]);var U=arguments.length-2;if(U===1)de.children=M;else if(1<U){for(var he=Array(U),Oe=0;Oe<U;Oe++)he[Oe]=arguments[Oe+2];de.children=he}return z(P.type,_e,de)},st.createContext=function(P){return P={$$typeof:o,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:s,_context:P},P},st.createElement=function(P,ee,M){var de,_e={},U=null;if(ee!=null)for(de in ee.key!==void 0&&(U=""+ee.key),ee)H.call(ee,de)&&de!=="key"&&de!=="__self"&&de!=="__source"&&(_e[de]=ee[de]);var he=arguments.length-2;if(he===1)_e.children=M;else if(1<he){for(var Oe=Array(he),pe=0;pe<he;pe++)Oe[pe]=arguments[pe+2];_e.children=Oe}if(P&&P.defaultProps)for(de in he=P.defaultProps,he)_e[de]===void 0&&(_e[de]=he[de]);return z(P,U,_e)},st.createRef=function(){return{current:null}},st.forwardRef=function(P){return{$$typeof:u,render:P}},st.isValidElement=V,st.lazy=function(P){return{$$typeof:m,_payload:{_status:-1,_result:P},_init:$}},st.memo=function(P,ee){return{$$typeof:f,type:P,compare:ee===void 0?null:ee}},st.startTransition=function(P){var ee=j.T,M={};j.T=M;try{var de=P(),_e=j.S;_e!==null&&_e(M,de),typeof de=="object"&&de!==null&&typeof de.then=="function"&&de.then(O,K)}catch(U){K(U)}finally{ee!==null&&M.types!==null&&(ee.types=M.types),j.T=ee}},st.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},st.use=function(P){return j.H.use(P)},st.useActionState=function(P,ee,M){return j.H.useActionState(P,ee,M)},st.useCallback=function(P,ee){return j.H.useCallback(P,ee)},st.useContext=function(P){return j.H.useContext(P)},st.useDebugValue=function(){},st.useDeferredValue=function(P,ee){return j.H.useDeferredValue(P,ee)},st.useEffect=function(P,ee){return j.H.useEffect(P,ee)},st.useEffectEvent=function(P){return j.H.useEffectEvent(P)},st.useId=function(){return j.H.useId()},st.useImperativeHandle=function(P,ee,M){return j.H.useImperativeHandle(P,ee,M)},st.useInsertionEffect=function(P,ee){return j.H.useInsertionEffect(P,ee)},st.useLayoutEffect=function(P,ee){return j.H.useLayoutEffect(P,ee)},st.useMemo=function(P,ee){return j.H.useMemo(P,ee)},st.useOptimistic=function(P,ee){return j.H.useOptimistic(P,ee)},st.useReducer=function(P,ee,M){return j.H.useReducer(P,ee,M)},st.useRef=function(P){return j.H.useRef(P)},st.useState=function(P){return j.H.useState(P)},st.useSyncExternalStore=function(P,ee,M){return j.H.useSyncExternalStore(P,ee,M)},st.useTransition=function(){return j.H.useTransition()},st.version="19.2.8",st}var yw;function Qu(){return yw||(yw=1,_x.exports=xB()),_x.exports}var v=Qu();const Rd=yf(v),yB=pB({__proto__:null,default:Rd},[v]);var Nx={exports:{}},fd={},Tx={exports:{}},Sx={};/**
|
|
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 vw;function vB(){return vw||(vw=1,(function(e){function t(G,F){var $=G.length;G.push(F);e:for(;0<$;){var K=$-1>>>1,L=G[K];if(0<a(L,F))G[K]=F,G[$]=L,$=K;else break e}}function n(G){return G.length===0?null:G[0]}function r(G){if(G.length===0)return null;var F=G[0],$=G.pop();if($!==F){G[0]=$;e:for(var K=0,L=G.length,P=L>>>1;K<P;){var ee=2*(K+1)-1,M=G[ee],de=ee+1,_e=G[de];if(0>a(M,$))de<L&&0>a(_e,M)?(G[K]=_e,G[de]=$,K=de):(G[K]=M,G[ee]=$,K=ee);else if(de<L&&0>a(_e,$))G[K]=_e,G[de]=$,K=de;else break e}}return F}function a(G,F){var $=G.sortIndex-F.sortIndex;return $!==0?$:G.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,u=o.now();e.unstable_now=function(){return o.now()-u}}var d=[],f=[],m=1,p=null,b=3,x=!1,E=!1,_=!1,S=!1,T=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function k(G){for(var F=n(f);F!==null;){if(F.callback===null)r(f);else if(F.startTime<=G)r(f),F.sortIndex=F.expirationTime,t(d,F);else break;F=n(f)}}function I(G){if(_=!1,k(G),!E)if(n(d)!==null)E=!0,O||(O=!0,q());else{var F=n(f);F!==null&&W(I,F.startTime-G)}}var O=!1,j=-1,H=5,z=-1;function D(){return S?!0:!(e.unstable_now()-z<H)}function V(){if(S=!1,O){var G=e.unstable_now();z=G;var F=!0;try{e:{E=!1,_&&(_=!1,C(j),j=-1),x=!0;var $=b;try{t:{for(k(G),p=n(d);p!==null&&!(p.expirationTime>G&&D());){var K=p.callback;if(typeof K=="function"){p.callback=null,b=p.priorityLevel;var L=K(p.expirationTime<=G);if(G=e.unstable_now(),typeof L=="function"){p.callback=L,k(G),F=!0;break t}p===n(d)&&r(d),k(G)}else r(d);p=n(d)}if(p!==null)F=!0;else{var P=n(f);P!==null&&W(I,P.startTime-G),F=!1}}break e}finally{p=null,b=$,x=!1}F=void 0}}finally{F?q():O=!1}}}var q;if(typeof A=="function")q=function(){A(V)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,Q=ae.port2;ae.port1.onmessage=V,q=function(){Q.postMessage(null)}}else q=function(){T(V,0)};function W(G,F){j=T(function(){G(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<G?Math.floor(1e3/G):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(G){switch(b){case 1:case 2:case 3:var F=3;break;default:F=b}var $=b;b=F;try{return G()}finally{b=$}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(G,F){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var $=b;b=G;try{return F()}finally{b=$}},e.unstable_scheduleCallback=function(G,F,$){var K=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?K+$:K):$=K,G){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=$+L,G={id:m++,callback:F,priorityLevel:G,startTime:$,expirationTime:L,sortIndex:-1},$>K?(G.sortIndex=$,t(f,G),n(d)===null&&G===n(f)&&(_?(C(j),j=-1):_=!0,W(I,$-K))):(G.sortIndex=L,t(d,G),E||x||(E=!0,O||(O=!0,q()))),G},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(G){var F=b;return function(){var $=b;b=F;try{return G.apply(this,arguments)}finally{b=$}}}})(Sx)),Sx}var Ew;function EB(){return Ew||(Ew=1,Tx.exports=vB()),Tx.exports}var wx={exports:{}},hr={};/**
|
|
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 _w;function _B(){if(_w)return hr;_w=1;var e=Qu();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function s(d,f,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:p==null?null:""+p,children:d,containerInfo:f,implementation:m}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return hr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,hr.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return s(d,f,null,m)},hr.flushSync=function(d){var f=o.T,m=r.p;try{if(o.T=null,r.p=2,d)return d()}finally{o.T=f,r.p=m,r.d.f()}},hr.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},hr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},hr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin),b=typeof f.integrity=="string"?f.integrity:void 0,x=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:b,fetchPriority:x}):m==="script"&&r.d.X(d,{crossOrigin:p,integrity:b,fetchPriority:x,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},hr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=u(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},hr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},hr.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=u(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},hr.requestFormReset=function(d){r.d.r(d)},hr.unstable_batchedUpdates=function(d,f){return d(f)},hr.useFormState=function(d,f,m){return o.H.useFormState(d,f,m)},hr.useFormStatus=function(){return o.H.useHostTransitionStatus()},hr.version="19.2.8",hr}var Nw;function x5(){if(Nw)return wx.exports;Nw=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(t){console.error(t)}}return e(),wx.exports=_B(),wx.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 Tw;function NB(){if(Tw)return fd;Tw=1;var e=EB(),t=Qu(),n=x5();function r(i){var l="https://react.dev/errors/"+i;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)l+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+i+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function s(i){var l=i,h=i;if(i.alternate)for(;l.return;)l=l.return;else{i=l;do l=i,(l.flags&4098)!==0&&(h=l.return),i=l.return;while(i)}return l.tag===3?h:null}function o(i){if(i.tag===13){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function u(i){if(i.tag===31){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function d(i){if(s(i)!==i)throw Error(r(188))}function f(i){var l=i.alternate;if(!l){if(l=s(i),l===null)throw Error(r(188));return l!==i?null:i}for(var h=i,g=l;;){var y=h.return;if(y===null)break;var N=y.alternate;if(N===null){if(g=y.return,g!==null){h=g;continue}break}if(y.child===N.child){for(N=y.child;N;){if(N===h)return d(y),i;if(N===g)return d(y),l;N=N.sibling}throw Error(r(188))}if(h.return!==g.return)h=y,g=N;else{for(var R=!1,B=y.child;B;){if(B===h){R=!0,h=y,g=N;break}if(B===g){R=!0,g=y,h=N;break}B=B.sibling}if(!R){for(B=N.child;B;){if(B===h){R=!0,h=N,g=y;break}if(B===g){R=!0,g=N,h=y;break}B=B.sibling}if(!R)throw Error(r(189))}}if(h.alternate!==g)throw Error(r(190))}if(h.tag!==3)throw Error(r(188));return h.stateNode.current===h?i:l}function m(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i;for(i=i.child;i!==null;){if(l=m(i),l!==null)return l;i=i.sibling}return null}var p=Object.assign,b=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),A=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function q(i){return i===null||typeof i!="object"?null:(i=V&&i[V]||i["@@iterator"],typeof i=="function"?i:null)}var ae=Symbol.for("react.client.reference");function Q(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===ae?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case _:return"Fragment";case T:return"Profiler";case S:return"StrictMode";case I:return"Suspense";case O:return"SuspenseList";case z:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case E:return"Portal";case A:return i.displayName||"Context";case C:return(i._context.displayName||"Context")+".Consumer";case k:var l=i.render;return i=i.displayName,i||(i=l.displayName||l.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case j:return l=i.displayName||null,l!==null?l:Q(i.type)||"Memo";case H:l=i._payload,i=i._init;try{return Q(i(l))}catch{}}return null}var W=Array.isArray,G=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},K=[],L=-1;function P(i){return{current:i}}function ee(i){0>L||(i.current=K[L],K[L]=null,L--)}function M(i,l){L++,K[L]=i.current,i.current=l}var de=P(null),_e=P(null),U=P(null),he=P(null);function Oe(i,l){switch(M(U,l),M(_e,i),M(de,null),l.nodeType){case 9:case 11:i=(i=l.documentElement)&&(i=i.namespaceURI)?US(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=US(l),i=zS(l,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}ee(de),M(de,i)}function pe(){ee(de),ee(_e),ee(U)}function De(i){i.memoizedState!==null&&M(he,i);var l=de.current,h=zS(l,i.type);l!==h&&(M(_e,i),M(de,h))}function je(i){_e.current===i&&(ee(de),ee(_e)),he.current===i&&(ee(he),od._currentValue=$)}var Ee,It;function nt(i){if(Ee===void 0)try{throw Error()}catch(h){var l=h.stack.trim().match(/\n( *(at )?)/);Ee=l&&l[1]||"",It=-1<h.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Ee+i+It}var ze=!1;function We(i,l){if(!i||ze)return"";ze=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(l){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(fe){var ce=fe}Reflect.construct(i,[],ve)}else{try{ve.call()}catch(fe){ce=fe}i.call(ve.prototype)}}else{try{throw Error()}catch(fe){ce=fe}(ve=i())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(fe){if(fe&&ce&&typeof fe.stack=="string")return[fe.stack,ce.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var N=g.DetermineComponentFrameRoot(),R=N[0],B=N[1];if(R&&B){var J=R.split(`
|
|
44
|
+
`),le=B.split(`
|
|
45
|
+
`);for(y=g=0;g<J.length&&!J[g].includes("DetermineComponentFrameRoot");)g++;for(;y<le.length&&!le[y].includes("DetermineComponentFrameRoot");)y++;if(g===J.length||y===le.length)for(g=J.length-1,y=le.length-1;1<=g&&0<=y&&J[g]!==le[y];)y--;for(;1<=g&&0<=y;g--,y--)if(J[g]!==le[y]){if(g!==1||y!==1)do if(g--,y--,0>y||J[g]!==le[y]){var be=`
|
|
46
|
+
`+J[g].replace(" at new "," at ");return i.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",i.displayName)),be}while(1<=g&&0<=y);break}}}finally{ze=!1,Error.prepareStackTrace=h}return(h=i?i.displayName||i.name:"")?nt(h):""}function cn(i,l){switch(i.tag){case 26:case 27:case 5:return nt(i.type);case 16:return nt("Lazy");case 13:return i.child!==l&&l!==null?nt("Suspense Fallback"):nt("Suspense");case 19:return nt("SuspenseList");case 0:case 15:return We(i.type,!1);case 11:return We(i.type.render,!1);case 1:return We(i.type,!0);case 31:return nt("Activity");default:return""}}function Un(i){try{var l="",h=null;do l+=cn(i,h),h=i,i=i.return;while(i);return l}catch(g){return`
|
|
47
|
+
Error generating stack: `+g.message+`
|
|
48
|
+
`+g.stack}}var jr=Object.prototype.hasOwnProperty,Fa=e.unstable_scheduleCallback,Ne=e.unstable_cancelCallback,vt=e.unstable_shouldYield,ta=e.unstable_requestPaint,Vt=e.unstable_now,Ol=e.unstable_getCurrentPriorityLevel,ge=e.unstable_ImmediatePriority,ke=e.unstable_UserBlockingPriority,Qe=e.unstable_NormalPriority,ct=e.unstable_LowPriority,St=e.unstable_IdlePriority,Sr=e.log,Ha=e.unstable_setDisableYieldValue,Qn=null,dn=null;function cr(i){if(typeof Sr=="function"&&Ha(i),dn&&typeof dn.setStrictMode=="function")try{dn.setStrictMode(Qn,i)}catch{}}var Rt=Math.clz32?Math.clz32:Jf,ai=Math.log,wr=Math.LN2;function Jf(i){return i>>>=0,i===0?32:31-(ai(i)/wr|0)|0}var go=256,Il=262144,bo=4194304;function Lr(i){var l=i&42;if(l!==0)return l;switch(i&-i){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:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function te(i,l,h){var g=i.pendingLanes;if(g===0)return 0;var y=0,N=i.suspendedLanes,R=i.pingedLanes;i=i.warmLanes;var B=g&134217727;return B!==0?(g=B&~N,g!==0?y=Lr(g):(R&=B,R!==0?y=Lr(R):h||(h=B&~i,h!==0&&(y=Lr(h))))):(B=g&~N,B!==0?y=Lr(B):R!==0?y=Lr(R):h||(h=g&~i,h!==0&&(y=Lr(h)))),y===0?0:l!==0&&l!==y&&(l&N)===0&&(N=y&-y,h=l&-l,N>=h||N===32&&(h&4194048)!==0)?l:y}function xe(i,l){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&l)===0}function Me(i,l){switch(i){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 rt(){var i=bo;return bo<<=1,(bo&62914560)===0&&(bo=4194304),i}function Xt(i){for(var l=[],h=0;31>h;h++)l.push(i);return l}function Ht(i,l){i.pendingLanes|=l,l!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function He(i,l,h,g,y,N){var R=i.pendingLanes;i.pendingLanes=h,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=h,i.entangledLanes&=h,i.errorRecoveryDisabledLanes&=h,i.shellSuspendCounter=0;var B=i.entanglements,J=i.expirationTimes,le=i.hiddenUpdates;for(h=R&~h;0<h;){var be=31-Rt(h),ve=1<<be;B[be]=0,J[be]=-1;var ce=le[be];if(ce!==null)for(le[be]=null,be=0;be<ce.length;be++){var fe=ce[be];fe!==null&&(fe.lane&=-536870913)}h&=~ve}g!==0&&Pe(i,g,0),N!==0&&y===0&&i.tag!==0&&(i.suspendedLanes|=N&~(R&~l))}function Pe(i,l,h){i.pendingLanes|=l,i.suspendedLanes&=~l;var g=31-Rt(l);i.entangledLanes|=l,i.entanglements[g]=i.entanglements[g]|1073741824|h&261930}function tt(i,l){var h=i.entangledLanes|=l;for(i=i.entanglements;h;){var g=31-Rt(h),y=1<<g;y&l|i[g]&l&&(i[g]|=l),h&=~y}}function bn(i,l){var h=l&-l;return h=(h&42)!==0?1:tn(h),(h&(i.suspendedLanes|l))!==0?0:h}function tn(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function ki(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Rl(){var i=F.p;return i!==0?i:(i=window.event,i===void 0?32:uw(i.type))}function Ml(i,l){var h=F.p;try{return F.p=i,l()}finally{F.p=h}}var ii=Math.random().toString(36).slice(2),xn="__reactFiber$"+ii,dr="__reactProps$"+ii,Es="__reactContainer$"+ii,xc="__reactEvents$"+ii,eh="__reactListeners$"+ii,Dl="__reactHandles$"+ii,th="__reactResources$"+ii,xo="__reactMarker$"+ii;function yc(i){delete i[xn],delete i[dr],delete i[xc],delete i[eh],delete i[Dl]}function Ar(i){var l=i[xn];if(l)return l;for(var h=i.parentNode;h;){if(l=h[Es]||h[xn]){if(h=l.alternate,l.child!==null||h!==null&&h.child!==null)for(i=KS(i);i!==null;){if(h=i[xn])return h;i=KS(i)}return l}i=h,h=i.parentNode}return null}function Oi(i){if(i=i[xn]||i[Es]){var l=i.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return i}return null}function _s(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i.stateNode;throw Error(r(33))}function Ns(i){var l=i[th];return l||(l=i[th]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function Tn(i){i[xo]=!0}var nh=new Set,yo={};function Ii(i,l){we(i,l),we(i+"Capture",l)}function we(i,l){for(yo[i]=l,i=0;i<l.length;i++)nh.add(l[i])}var Ge=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]*$"),dt={},Mt={};function yn(i){return jr.call(Mt,i)?!0:jr.call(dt,i)?!1:Ge.test(i)?Mt[i]=!0:(dt[i]=!0,!1)}function fr(i,l,h){if(yn(l))if(h===null)i.removeAttribute(l);else{switch(typeof h){case"undefined":case"function":case"symbol":i.removeAttribute(l);return;case"boolean":var g=l.toLowerCase().slice(0,5);if(g!=="data-"&&g!=="aria-"){i.removeAttribute(l);return}}i.setAttribute(l,""+h)}}function na(i,l,h){if(h===null)i.removeAttribute(l);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttribute(l,""+h)}}function Pr(i,l,h,g){if(g===null)i.removeAttribute(h);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(h);return}i.setAttributeNS(l,h,""+g)}}function Wt(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function ra(i){var l=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function rh(i,l,h){var g=Object.getOwnPropertyDescriptor(i.constructor.prototype,l);if(!i.hasOwnProperty(l)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var y=g.get,N=g.set;return Object.defineProperty(i,l,{configurable:!0,get:function(){return y.call(this)},set:function(R){h=""+R,N.call(this,R)}}),Object.defineProperty(i,l,{enumerable:g.enumerable}),{getValue:function(){return h},setValue:function(R){h=""+R},stopTracking:function(){i._valueTracker=null,delete i[l]}}}}function jl(i){if(!i._valueTracker){var l=ra(i)?"checked":"value";i._valueTracker=rh(i,l,""+i[l])}}function vc(i){if(!i)return!1;var l=i._valueTracker;if(!l)return!0;var h=l.getValue(),g="";return i&&(g=ra(i)?i.checked?"true":"false":i.value),i=g,i!==h?(l.setValue(i),!0):!1}function Ll(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var vg=/[\n"\\]/g;function Br(i){return i.replace(vg,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Ec(i,l,h,g,y,N,R,B){i.name="",R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?i.type=R:i.removeAttribute("type"),l!=null?R==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+Wt(l)):i.value!==""+Wt(l)&&(i.value=""+Wt(l)):R!=="submit"&&R!=="reset"||i.removeAttribute("value"),l!=null?Pl(i,R,Wt(l)):h!=null?Pl(i,R,Wt(h)):g!=null&&i.removeAttribute("value"),y==null&&N!=null&&(i.defaultChecked=!!N),y!=null&&(i.checked=y&&typeof y!="function"&&typeof y!="symbol"),B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?i.name=""+Wt(B):i.removeAttribute("name")}function vo(i,l,h,g,y,N,R,B){if(N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(i.type=N),l!=null||h!=null){if(!(N!=="submit"&&N!=="reset"||l!=null)){jl(i);return}h=h!=null?""+Wt(h):"",l=l!=null?""+Wt(l):h,B||l===i.value||(i.value=l),i.defaultValue=l}g=g??y,g=typeof g!="function"&&typeof g!="symbol"&&!!g,i.checked=B?i.checked:!!g,i.defaultChecked=!!g,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(i.name=R),jl(i)}function Pl(i,l,h){l==="number"&&Ll(i.ownerDocument)===i||i.defaultValue===""+h||(i.defaultValue=""+h)}function Zn(i,l,h,g){if(i=i.options,l){l={};for(var y=0;y<h.length;y++)l["$"+h[y]]=!0;for(h=0;h<i.length;h++)y=l.hasOwnProperty("$"+i[h].value),i[h].selected!==y&&(i[h].selected=y),y&&g&&(i[h].defaultSelected=!0)}else{for(h=""+Wt(h),l=null,y=0;y<i.length;y++){if(i[y].value===h){i[y].selected=!0,g&&(i[y].defaultSelected=!0);return}l!==null||i[y].disabled||(l=i[y])}l!==null&&(l.selected=!0)}}function ah(i,l,h){if(l!=null&&(l=""+Wt(l),l!==i.value&&(i.value=l),h==null)){i.defaultValue!==l&&(i.defaultValue=l);return}i.defaultValue=h!=null?""+Wt(h):""}function Bl(i,l,h,g){if(l==null){if(g!=null){if(h!=null)throw Error(r(92));if(W(g)){if(1<g.length)throw Error(r(93));g=g[0]}h=g}h==null&&(h=""),l=h}h=Wt(l),i.defaultValue=h,g=i.textContent,g===h&&g!==""&&g!==null&&(i.value=g),jl(i)}function Je(i,l){if(l){var h=i.firstChild;if(h&&h===i.lastChild&&h.nodeType===3){h.nodeValue=l;return}}i.textContent=l}var ih=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 Sn(i,l,h){var g=l.indexOf("--")===0;h==null||typeof h=="boolean"||h===""?g?i.setProperty(l,""):l==="float"?i.cssFloat="":i[l]="":g?i.setProperty(l,h):typeof h!="number"||h===0||ih.has(l)?l==="float"?i.cssFloat=h:i[l]=(""+h).trim():i[l]=h+"px"}function Dt(i,l,h){if(l!=null&&typeof l!="object")throw Error(r(62));if(i=i.style,h!=null){for(var g in h)!h.hasOwnProperty(g)||l!=null&&l.hasOwnProperty(g)||(g.indexOf("--")===0?i.setProperty(g,""):g==="float"?i.cssFloat="":i[g]="");for(var y in l)g=l[y],l.hasOwnProperty(y)&&h[y]!==g&&Sn(i,y,g)}else for(var N in l)l.hasOwnProperty(N)&&Sn(i,N,l[N])}function Ts(i){if(i.indexOf("-")===-1)return!1;switch(i){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 Ri=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"]]),_c=/^[\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 Ss(i){return _c.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Ie(){}var $e=null;function ot(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var gt=null,ln=null;function ya(i){var l=Oi(i);if(l&&(i=l.stateNode)){var h=i[dr]||null;e:switch(i=l.stateNode,l.type){case"input":if(Ec(i,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name),l=h.name,h.type==="radio"&&l!=null){for(h=i;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll('input[name="'+Br(""+l)+'"][type="radio"]'),l=0;l<h.length;l++){var g=h[l];if(g!==i&&g.form===i.form){var y=g[dr]||null;if(!y)throw Error(r(90));Ec(g,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(l=0;l<h.length;l++)g=h[l],g.form===i.form&&vc(g)}break e;case"textarea":ah(i,h.value,h.defaultValue);break e;case"select":l=h.value,l!=null&&Zn(i,!!h.multiple,l,!1)}}}var Nc=!1;function sh(i,l,h){if(Nc)return i(l,h);Nc=!0;try{var g=i(l);return g}finally{if(Nc=!1,(gt!==null||ln!==null)&&(Kh(),gt&&(l=gt,i=ln,ln=gt=null,ya(l),i)))for(l=0;l<i.length;l++)ya(i[l])}}function Tc(i,l){var h=i.stateNode;if(h===null)return null;var g=h[dr]||null;if(g===null)return null;h=g[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(i=i.type,g=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!g;break e;default:i=!1}if(i)return null;if(h&&typeof h!="function")throw Error(r(231,l,typeof h));return h}var Mi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Eg=!1;if(Mi)try{var Sc={};Object.defineProperty(Sc,"passive",{get:function(){Eg=!0}}),window.addEventListener("test",Sc,Sc),window.removeEventListener("test",Sc,Sc)}catch{Eg=!1}var ws=null,_g=null,oh=null;function z_(){if(oh)return oh;var i,l=_g,h=l.length,g,y="value"in ws?ws.value:ws.textContent,N=y.length;for(i=0;i<h&&l[i]===y[i];i++);var R=h-i;for(g=1;g<=R&&l[h-g]===y[N-g];g++);return oh=y.slice(i,1<g?1-g:void 0)}function lh(i){var l=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&l===13&&(i=13)):i=l,i===10&&(i=13),32<=i||i===13?i:0}function uh(){return!0}function F_(){return!1}function Ur(i){function l(h,g,y,N,R){this._reactName=h,this._targetInst=y,this.type=g,this.nativeEvent=N,this.target=R,this.currentTarget=null;for(var B in i)i.hasOwnProperty(B)&&(h=i[B],this[B]=h?h(N):N[B]);return this.isDefaultPrevented=(N.defaultPrevented!=null?N.defaultPrevented:N.returnValue===!1)?uh:F_,this.isPropagationStopped=F_,this}return p(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=uh)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=uh)},persist:function(){},isPersistent:uh}),l}var Eo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ch=Ur(Eo),wc=p({},Eo,{view:0,detail:0}),dP=Ur(wc),Ng,Tg,Ac,dh=p({},wc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wg,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Ac&&(Ac&&i.type==="mousemove"?(Ng=i.screenX-Ac.screenX,Tg=i.screenY-Ac.screenY):Tg=Ng=0,Ac=i),Ng)},movementY:function(i){return"movementY"in i?i.movementY:Tg}}),H_=Ur(dh),fP=p({},dh,{dataTransfer:0}),hP=Ur(fP),mP=p({},wc,{relatedTarget:0}),Sg=Ur(mP),pP=p({},Eo,{animationName:0,elapsedTime:0,pseudoElement:0}),gP=Ur(pP),bP=p({},Eo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),xP=Ur(bP),yP=p({},Eo,{data:0}),$_=Ur(yP),vP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},EP={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"},_P={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function NP(i){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(i):(i=_P[i])?!!l[i]:!1}function wg(){return NP}var TP=p({},wc,{key:function(i){if(i.key){var l=vP[i.key]||i.key;if(l!=="Unidentified")return l}return i.type==="keypress"?(i=lh(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?EP[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wg,charCode:function(i){return i.type==="keypress"?lh(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?lh(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),SP=Ur(TP),wP=p({},dh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Y_=Ur(wP),AP=p({},wc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wg}),CP=Ur(AP),kP=p({},Eo,{propertyName:0,elapsedTime:0,pseudoElement:0}),OP=Ur(kP),IP=p({},dh,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),RP=Ur(IP),MP=p({},Eo,{newState:0,oldState:0}),DP=Ur(MP),jP=[9,13,27,32],Ag=Mi&&"CompositionEvent"in window,Cc=null;Mi&&"documentMode"in document&&(Cc=document.documentMode);var LP=Mi&&"TextEvent"in window&&!Cc,q_=Mi&&(!Ag||Cc&&8<Cc&&11>=Cc),G_=" ",K_=!1;function V_(i,l){switch(i){case"keyup":return jP.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function W_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ul=!1;function PP(i,l){switch(i){case"compositionend":return W_(l);case"keypress":return l.which!==32?null:(K_=!0,G_);case"textInput":return i=l.data,i===G_&&K_?null:i;default:return null}}function BP(i,l){if(Ul)return i==="compositionend"||!Ag&&V_(i,l)?(i=z_(),oh=_g=ws=null,Ul=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return q_&&l.locale!=="ko"?null:l.data;default:return null}}var UP={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 X_(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l==="input"?!!UP[i.type]:l==="textarea"}function Q_(i,l,h,g){gt?ln?ln.push(g):ln=[g]:gt=g,l=em(l,"onChange"),0<l.length&&(h=new ch("onChange","change",null,h,g),i.push({event:h,listeners:l}))}var kc=null,Oc=null;function zP(i){MS(i,0)}function fh(i){var l=_s(i);if(vc(l))return i}function Z_(i,l){if(i==="change")return l}var J_=!1;if(Mi){var Cg;if(Mi){var kg="oninput"in document;if(!kg){var eN=document.createElement("div");eN.setAttribute("oninput","return;"),kg=typeof eN.oninput=="function"}Cg=kg}else Cg=!1;J_=Cg&&(!document.documentMode||9<document.documentMode)}function tN(){kc&&(kc.detachEvent("onpropertychange",nN),Oc=kc=null)}function nN(i){if(i.propertyName==="value"&&fh(Oc)){var l=[];Q_(l,Oc,i,ot(i)),sh(zP,l)}}function FP(i,l,h){i==="focusin"?(tN(),kc=l,Oc=h,kc.attachEvent("onpropertychange",nN)):i==="focusout"&&tN()}function HP(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return fh(Oc)}function $P(i,l){if(i==="click")return fh(l)}function YP(i,l){if(i==="input"||i==="change")return fh(l)}function qP(i,l){return i===l&&(i!==0||1/i===1/l)||i!==i&&l!==l}var aa=typeof Object.is=="function"?Object.is:qP;function Ic(i,l){if(aa(i,l))return!0;if(typeof i!="object"||i===null||typeof l!="object"||l===null)return!1;var h=Object.keys(i),g=Object.keys(l);if(h.length!==g.length)return!1;for(g=0;g<h.length;g++){var y=h[g];if(!jr.call(l,y)||!aa(i[y],l[y]))return!1}return!0}function rN(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function aN(i,l){var h=rN(i);i=0;for(var g;h;){if(h.nodeType===3){if(g=i+h.textContent.length,i<=l&&g>=l)return{node:h,offset:l-i};i=g}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=rN(h)}}function iN(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?iN(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function sN(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var l=Ll(i.document);l instanceof i.HTMLIFrameElement;){try{var h=typeof l.contentWindow.location.href=="string"}catch{h=!1}if(h)i=l.contentWindow;else break;l=Ll(i.document)}return l}function Og(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l&&(l==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||l==="textarea"||i.contentEditable==="true")}var GP=Mi&&"documentMode"in document&&11>=document.documentMode,zl=null,Ig=null,Rc=null,Rg=!1;function oN(i,l,h){var g=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;Rg||zl==null||zl!==Ll(g)||(g=zl,"selectionStart"in g&&Og(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),Rc&&Ic(Rc,g)||(Rc=g,g=em(Ig,"onSelect"),0<g.length&&(l=new ch("onSelect","select",null,l,h),i.push({event:l,listeners:g}),l.target=zl)))}function _o(i,l){var h={};return h[i.toLowerCase()]=l.toLowerCase(),h["Webkit"+i]="webkit"+l,h["Moz"+i]="moz"+l,h}var Fl={animationend:_o("Animation","AnimationEnd"),animationiteration:_o("Animation","AnimationIteration"),animationstart:_o("Animation","AnimationStart"),transitionrun:_o("Transition","TransitionRun"),transitionstart:_o("Transition","TransitionStart"),transitioncancel:_o("Transition","TransitionCancel"),transitionend:_o("Transition","TransitionEnd")},Mg={},lN={};Mi&&(lN=document.createElement("div").style,"AnimationEvent"in window||(delete Fl.animationend.animation,delete Fl.animationiteration.animation,delete Fl.animationstart.animation),"TransitionEvent"in window||delete Fl.transitionend.transition);function No(i){if(Mg[i])return Mg[i];if(!Fl[i])return i;var l=Fl[i],h;for(h in l)if(l.hasOwnProperty(h)&&h in lN)return Mg[i]=l[h];return i}var uN=No("animationend"),cN=No("animationiteration"),dN=No("animationstart"),KP=No("transitionrun"),VP=No("transitionstart"),WP=No("transitioncancel"),fN=No("transitionend"),hN=new Map,Dg="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(" ");Dg.push("scrollEnd");function $a(i,l){hN.set(i,l),Ii(l,[i])}var hh=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},va=[],Hl=0,jg=0;function mh(){for(var i=Hl,l=jg=Hl=0;l<i;){var h=va[l];va[l++]=null;var g=va[l];va[l++]=null;var y=va[l];va[l++]=null;var N=va[l];if(va[l++]=null,g!==null&&y!==null){var R=g.pending;R===null?y.next=y:(y.next=R.next,R.next=y),g.pending=y}N!==0&&mN(h,y,N)}}function ph(i,l,h,g){va[Hl++]=i,va[Hl++]=l,va[Hl++]=h,va[Hl++]=g,jg|=g,i.lanes|=g,i=i.alternate,i!==null&&(i.lanes|=g)}function Lg(i,l,h,g){return ph(i,l,h,g),gh(i)}function To(i,l){return ph(i,null,null,l),gh(i)}function mN(i,l,h){i.lanes|=h;var g=i.alternate;g!==null&&(g.lanes|=h);for(var y=!1,N=i.return;N!==null;)N.childLanes|=h,g=N.alternate,g!==null&&(g.childLanes|=h),N.tag===22&&(i=N.stateNode,i===null||i._visibility&1||(y=!0)),i=N,N=N.return;return i.tag===3?(N=i.stateNode,y&&l!==null&&(y=31-Rt(h),i=N.hiddenUpdates,g=i[y],g===null?i[y]=[l]:g.push(l),l.lane=h|536870912),N):null}function gh(i){if(50<ed)throw ed=0,qb=null,Error(r(185));for(var l=i.return;l!==null;)i=l,l=i.return;return i.tag===3?i.stateNode:null}var $l={};function XP(i,l,h,g){this.tag=i,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ia(i,l,h,g){return new XP(i,l,h,g)}function Pg(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Di(i,l){var h=i.alternate;return h===null?(h=ia(i.tag,l,i.key,i.mode),h.elementType=i.elementType,h.type=i.type,h.stateNode=i.stateNode,h.alternate=i,i.alternate=h):(h.pendingProps=l,h.type=i.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=i.flags&65011712,h.childLanes=i.childLanes,h.lanes=i.lanes,h.child=i.child,h.memoizedProps=i.memoizedProps,h.memoizedState=i.memoizedState,h.updateQueue=i.updateQueue,l=i.dependencies,h.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},h.sibling=i.sibling,h.index=i.index,h.ref=i.ref,h.refCleanup=i.refCleanup,h}function pN(i,l){i.flags&=65011714;var h=i.alternate;return h===null?(i.childLanes=0,i.lanes=l,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=h.childLanes,i.lanes=h.lanes,i.child=h.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=h.memoizedProps,i.memoizedState=h.memoizedState,i.updateQueue=h.updateQueue,i.type=h.type,l=h.dependencies,i.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),i}function bh(i,l,h,g,y,N){var R=0;if(g=i,typeof i=="function")Pg(i)&&(R=1);else if(typeof i=="string")R=tB(i,h,de.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case z:return i=ia(31,h,l,y),i.elementType=z,i.lanes=N,i;case _:return So(h.children,y,N,l);case S:R=8,y|=24;break;case T:return i=ia(12,h,l,y|2),i.elementType=T,i.lanes=N,i;case I:return i=ia(13,h,l,y),i.elementType=I,i.lanes=N,i;case O:return i=ia(19,h,l,y),i.elementType=O,i.lanes=N,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case A:R=10;break e;case C:R=9;break e;case k:R=11;break e;case j:R=14;break e;case H:R=16,g=null;break e}R=29,h=Error(r(130,i===null?"null":typeof i,"")),g=null}return l=ia(R,h,l,y),l.elementType=i,l.type=g,l.lanes=N,l}function So(i,l,h,g){return i=ia(7,i,g,l),i.lanes=h,i}function Bg(i,l,h){return i=ia(6,i,null,l),i.lanes=h,i}function gN(i){var l=ia(18,null,null,0);return l.stateNode=i,l}function Ug(i,l,h){return l=ia(4,i.children!==null?i.children:[],i.key,l),l.lanes=h,l.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},l}var bN=new WeakMap;function Ea(i,l){if(typeof i=="object"&&i!==null){var h=bN.get(i);return h!==void 0?h:(l={value:i,source:l,stack:Un(l)},bN.set(i,l),l)}return{value:i,source:l,stack:Un(l)}}var Yl=[],ql=0,xh=null,Mc=0,_a=[],Na=0,As=null,si=1,oi="";function ji(i,l){Yl[ql++]=Mc,Yl[ql++]=xh,xh=i,Mc=l}function xN(i,l,h){_a[Na++]=si,_a[Na++]=oi,_a[Na++]=As,As=i;var g=si;i=oi;var y=32-Rt(g)-1;g&=~(1<<y),h+=1;var N=32-Rt(l)+y;if(30<N){var R=y-y%5;N=(g&(1<<R)-1).toString(32),g>>=R,y-=R,si=1<<32-Rt(l)+y|h<<y|g,oi=N+i}else si=1<<N|h<<y|g,oi=i}function zg(i){i.return!==null&&(ji(i,1),xN(i,1,0))}function Fg(i){for(;i===xh;)xh=Yl[--ql],Yl[ql]=null,Mc=Yl[--ql],Yl[ql]=null;for(;i===As;)As=_a[--Na],_a[Na]=null,oi=_a[--Na],_a[Na]=null,si=_a[--Na],_a[Na]=null}function yN(i,l){_a[Na++]=si,_a[Na++]=oi,_a[Na++]=As,si=l.id,oi=l.overflow,As=i}var Jn=null,Qt=null,Et=!1,Cs=null,Ta=!1,Hg=Error(r(519));function ks(i){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Dc(Ea(l,i)),Hg}function vN(i){var l=i.stateNode,h=i.type,g=i.memoizedProps;switch(l[xn]=i,l[dr]=g,h){case"dialog":mt("cancel",l),mt("close",l);break;case"iframe":case"object":case"embed":mt("load",l);break;case"video":case"audio":for(h=0;h<nd.length;h++)mt(nd[h],l);break;case"source":mt("error",l);break;case"img":case"image":case"link":mt("error",l),mt("load",l);break;case"details":mt("toggle",l);break;case"input":mt("invalid",l),vo(l,g.value,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name,!0);break;case"select":mt("invalid",l);break;case"textarea":mt("invalid",l),Bl(l,g.value,g.defaultValue,g.children)}h=g.children,typeof h!="string"&&typeof h!="number"&&typeof h!="bigint"||l.textContent===""+h||g.suppressHydrationWarning===!0||PS(l.textContent,h)?(g.popover!=null&&(mt("beforetoggle",l),mt("toggle",l)),g.onScroll!=null&&mt("scroll",l),g.onScrollEnd!=null&&mt("scrollend",l),g.onClick!=null&&(l.onclick=Ie),l=!0):l=!1,l||ks(i,!0)}function EN(i){for(Jn=i.return;Jn;)switch(Jn.tag){case 5:case 31:case 13:Ta=!1;return;case 27:case 3:Ta=!0;return;default:Jn=Jn.return}}function Gl(i){if(i!==Jn)return!1;if(!Et)return EN(i),Et=!0,!1;var l=i.tag,h;if((h=l!==3&&l!==27)&&((h=l===5)&&(h=i.type,h=!(h!=="form"&&h!=="button")||sx(i.type,i.memoizedProps)),h=!h),h&&Qt&&ks(i),EN(i),l===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Qt=GS(i)}else if(l===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Qt=GS(i)}else l===27?(l=Qt,$s(i.type)?(i=dx,dx=null,Qt=i):Qt=l):Qt=Jn?wa(i.stateNode.nextSibling):null;return!0}function wo(){Qt=Jn=null,Et=!1}function $g(){var i=Cs;return i!==null&&($r===null?$r=i:$r.push.apply($r,i),Cs=null),i}function Dc(i){Cs===null?Cs=[i]:Cs.push(i)}var Yg=P(null),Ao=null,Li=null;function Os(i,l,h){M(Yg,l._currentValue),l._currentValue=h}function Pi(i){i._currentValue=Yg.current,ee(Yg)}function qg(i,l,h){for(;i!==null;){var g=i.alternate;if((i.childLanes&l)!==l?(i.childLanes|=l,g!==null&&(g.childLanes|=l)):g!==null&&(g.childLanes&l)!==l&&(g.childLanes|=l),i===h)break;i=i.return}}function Gg(i,l,h,g){var y=i.child;for(y!==null&&(y.return=i);y!==null;){var N=y.dependencies;if(N!==null){var R=y.child;N=N.firstContext;e:for(;N!==null;){var B=N;N=y;for(var J=0;J<l.length;J++)if(B.context===l[J]){N.lanes|=h,B=N.alternate,B!==null&&(B.lanes|=h),qg(N.return,h,i),g||(R=null);break e}N=B.next}}else if(y.tag===18){if(R=y.return,R===null)throw Error(r(341));R.lanes|=h,N=R.alternate,N!==null&&(N.lanes|=h),qg(R,h,i),R=null}else R=y.child;if(R!==null)R.return=y;else for(R=y;R!==null;){if(R===i){R=null;break}if(y=R.sibling,y!==null){y.return=R.return,R=y;break}R=R.return}y=R}}function Kl(i,l,h,g){i=null;for(var y=l,N=!1;y!==null;){if(!N){if((y.flags&524288)!==0)N=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var R=y.alternate;if(R===null)throw Error(r(387));if(R=R.memoizedProps,R!==null){var B=y.type;aa(y.pendingProps.value,R.value)||(i!==null?i.push(B):i=[B])}}else if(y===he.current){if(R=y.alternate,R===null)throw Error(r(387));R.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(i!==null?i.push(od):i=[od])}y=y.return}i!==null&&Gg(l,i,h,g),l.flags|=262144}function yh(i){for(i=i.firstContext;i!==null;){if(!aa(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Co(i){Ao=i,Li=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function er(i){return _N(Ao,i)}function vh(i,l){return Ao===null&&Co(i),_N(i,l)}function _N(i,l){var h=l._currentValue;if(l={context:l,memoizedValue:h,next:null},Li===null){if(i===null)throw Error(r(308));Li=l,i.dependencies={lanes:0,firstContext:l},i.flags|=524288}else Li=Li.next=l;return h}var QP=typeof AbortController<"u"?AbortController:function(){var i=[],l=this.signal={aborted:!1,addEventListener:function(h,g){i.push(g)}};this.abort=function(){l.aborted=!0,i.forEach(function(h){return h()})}},ZP=e.unstable_scheduleCallback,JP=e.unstable_NormalPriority,wn={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Kg(){return{controller:new QP,data:new Map,refCount:0}}function jc(i){i.refCount--,i.refCount===0&&ZP(JP,function(){i.controller.abort()})}var Lc=null,Vg=0,Vl=0,Wl=null;function e8(i,l){if(Lc===null){var h=Lc=[];Vg=0,Vl=Qb(),Wl={status:"pending",value:void 0,then:function(g){h.push(g)}}}return Vg++,l.then(NN,NN),l}function NN(){if(--Vg===0&&Lc!==null){Wl!==null&&(Wl.status="fulfilled");var i=Lc;Lc=null,Vl=0,Wl=null;for(var l=0;l<i.length;l++)(0,i[l])()}}function t8(i,l){var h=[],g={status:"pending",value:null,reason:null,then:function(y){h.push(y)}};return i.then(function(){g.status="fulfilled",g.value=l;for(var y=0;y<h.length;y++)(0,h[y])(l)},function(y){for(g.status="rejected",g.reason=y,y=0;y<h.length;y++)(0,h[y])(void 0)}),g}var TN=G.S;G.S=function(i,l){oS=Vt(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&e8(i,l),TN!==null&&TN(i,l)};var ko=P(null);function Wg(){var i=ko.current;return i!==null?i:$t.pooledCache}function Eh(i,l){l===null?M(ko,ko.current):M(ko,l.pool)}function SN(){var i=Wg();return i===null?null:{parent:wn._currentValue,pool:i}}var Xl=Error(r(460)),Xg=Error(r(474)),_h=Error(r(542)),Nh={then:function(){}};function wN(i){return i=i.status,i==="fulfilled"||i==="rejected"}function AN(i,l,h){switch(h=i[h],h===void 0?i.push(l):h!==l&&(l.then(Ie,Ie),l=h),l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,kN(i),i;default:if(typeof l.status=="string")l.then(Ie,Ie);else{if(i=$t,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=l,i.status="pending",i.then(function(g){if(l.status==="pending"){var y=l;y.status="fulfilled",y.value=g}},function(g){if(l.status==="pending"){var y=l;y.status="rejected",y.reason=g}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,kN(i),i}throw Io=l,Xl}}function Oo(i){try{var l=i._init;return l(i._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(Io=h,Xl):h}}var Io=null;function CN(){if(Io===null)throw Error(r(459));var i=Io;return Io=null,i}function kN(i){if(i===Xl||i===_h)throw Error(r(483))}var Ql=null,Pc=0;function Th(i){var l=Pc;return Pc+=1,Ql===null&&(Ql=[]),AN(Ql,i,l)}function Bc(i,l){l=l.props.ref,i.ref=l!==void 0?l:null}function Sh(i,l){throw l.$$typeof===b?Error(r(525)):(i=Object.prototype.toString.call(l),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":i)))}function ON(i){function l(ie,ne){if(i){var oe=ie.deletions;oe===null?(ie.deletions=[ne],ie.flags|=16):oe.push(ne)}}function h(ie,ne){if(!i)return null;for(;ne!==null;)l(ie,ne),ne=ne.sibling;return null}function g(ie){for(var ne=new Map;ie!==null;)ie.key!==null?ne.set(ie.key,ie):ne.set(ie.index,ie),ie=ie.sibling;return ne}function y(ie,ne){return ie=Di(ie,ne),ie.index=0,ie.sibling=null,ie}function N(ie,ne,oe){return ie.index=oe,i?(oe=ie.alternate,oe!==null?(oe=oe.index,oe<ne?(ie.flags|=67108866,ne):oe):(ie.flags|=67108866,ne)):(ie.flags|=1048576,ne)}function R(ie){return i&&ie.alternate===null&&(ie.flags|=67108866),ie}function B(ie,ne,oe,ye){return ne===null||ne.tag!==6?(ne=Bg(oe,ie.mode,ye),ne.return=ie,ne):(ne=y(ne,oe),ne.return=ie,ne)}function J(ie,ne,oe,ye){var Ve=oe.type;return Ve===_?be(ie,ne,oe.props.children,ye,oe.key):ne!==null&&(ne.elementType===Ve||typeof Ve=="object"&&Ve!==null&&Ve.$$typeof===H&&Oo(Ve)===ne.type)?(ne=y(ne,oe.props),Bc(ne,oe),ne.return=ie,ne):(ne=bh(oe.type,oe.key,oe.props,null,ie.mode,ye),Bc(ne,oe),ne.return=ie,ne)}function le(ie,ne,oe,ye){return ne===null||ne.tag!==4||ne.stateNode.containerInfo!==oe.containerInfo||ne.stateNode.implementation!==oe.implementation?(ne=Ug(oe,ie.mode,ye),ne.return=ie,ne):(ne=y(ne,oe.children||[]),ne.return=ie,ne)}function be(ie,ne,oe,ye,Ve){return ne===null||ne.tag!==7?(ne=So(oe,ie.mode,ye,Ve),ne.return=ie,ne):(ne=y(ne,oe),ne.return=ie,ne)}function ve(ie,ne,oe){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return ne=Bg(""+ne,ie.mode,oe),ne.return=ie,ne;if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case x:return oe=bh(ne.type,ne.key,ne.props,null,ie.mode,oe),Bc(oe,ne),oe.return=ie,oe;case E:return ne=Ug(ne,ie.mode,oe),ne.return=ie,ne;case H:return ne=Oo(ne),ve(ie,ne,oe)}if(W(ne)||q(ne))return ne=So(ne,ie.mode,oe,null),ne.return=ie,ne;if(typeof ne.then=="function")return ve(ie,Th(ne),oe);if(ne.$$typeof===A)return ve(ie,vh(ie,ne),oe);Sh(ie,ne)}return null}function ce(ie,ne,oe,ye){var Ve=ne!==null?ne.key:null;if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Ve!==null?null:B(ie,ne,""+oe,ye);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case x:return oe.key===Ve?J(ie,ne,oe,ye):null;case E:return oe.key===Ve?le(ie,ne,oe,ye):null;case H:return oe=Oo(oe),ce(ie,ne,oe,ye)}if(W(oe)||q(oe))return Ve!==null?null:be(ie,ne,oe,ye,null);if(typeof oe.then=="function")return ce(ie,ne,Th(oe),ye);if(oe.$$typeof===A)return ce(ie,ne,vh(ie,oe),ye);Sh(ie,oe)}return null}function fe(ie,ne,oe,ye,Ve){if(typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint")return ie=ie.get(oe)||null,B(ne,ie,""+ye,Ve);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case x:return ie=ie.get(ye.key===null?oe:ye.key)||null,J(ne,ie,ye,Ve);case E:return ie=ie.get(ye.key===null?oe:ye.key)||null,le(ne,ie,ye,Ve);case H:return ye=Oo(ye),fe(ie,ne,oe,ye,Ve)}if(W(ye)||q(ye))return ie=ie.get(oe)||null,be(ne,ie,ye,Ve,null);if(typeof ye.then=="function")return fe(ie,ne,oe,Th(ye),Ve);if(ye.$$typeof===A)return fe(ie,ne,oe,vh(ne,ye),Ve);Sh(ne,ye)}return null}function Ue(ie,ne,oe,ye){for(var Ve=null,wt=null,Ye=ne,ut=ne=0,xt=null;Ye!==null&&ut<oe.length;ut++){Ye.index>ut?(xt=Ye,Ye=null):xt=Ye.sibling;var At=ce(ie,Ye,oe[ut],ye);if(At===null){Ye===null&&(Ye=xt);break}i&&Ye&&At.alternate===null&&l(ie,Ye),ne=N(At,ne,ut),wt===null?Ve=At:wt.sibling=At,wt=At,Ye=xt}if(ut===oe.length)return h(ie,Ye),Et&&ji(ie,ut),Ve;if(Ye===null){for(;ut<oe.length;ut++)Ye=ve(ie,oe[ut],ye),Ye!==null&&(ne=N(Ye,ne,ut),wt===null?Ve=Ye:wt.sibling=Ye,wt=Ye);return Et&&ji(ie,ut),Ve}for(Ye=g(Ye);ut<oe.length;ut++)xt=fe(Ye,ie,ut,oe[ut],ye),xt!==null&&(i&&xt.alternate!==null&&Ye.delete(xt.key===null?ut:xt.key),ne=N(xt,ne,ut),wt===null?Ve=xt:wt.sibling=xt,wt=xt);return i&&Ye.forEach(function(Vs){return l(ie,Vs)}),Et&&ji(ie,ut),Ve}function Ze(ie,ne,oe,ye){if(oe==null)throw Error(r(151));for(var Ve=null,wt=null,Ye=ne,ut=ne=0,xt=null,At=oe.next();Ye!==null&&!At.done;ut++,At=oe.next()){Ye.index>ut?(xt=Ye,Ye=null):xt=Ye.sibling;var Vs=ce(ie,Ye,At.value,ye);if(Vs===null){Ye===null&&(Ye=xt);break}i&&Ye&&Vs.alternate===null&&l(ie,Ye),ne=N(Vs,ne,ut),wt===null?Ve=Vs:wt.sibling=Vs,wt=Vs,Ye=xt}if(At.done)return h(ie,Ye),Et&&ji(ie,ut),Ve;if(Ye===null){for(;!At.done;ut++,At=oe.next())At=ve(ie,At.value,ye),At!==null&&(ne=N(At,ne,ut),wt===null?Ve=At:wt.sibling=At,wt=At);return Et&&ji(ie,ut),Ve}for(Ye=g(Ye);!At.done;ut++,At=oe.next())At=fe(Ye,ie,ut,At.value,ye),At!==null&&(i&&At.alternate!==null&&Ye.delete(At.key===null?ut:At.key),ne=N(At,ne,ut),wt===null?Ve=At:wt.sibling=At,wt=At);return i&&Ye.forEach(function(fB){return l(ie,fB)}),Et&&ji(ie,ut),Ve}function Ut(ie,ne,oe,ye){if(typeof oe=="object"&&oe!==null&&oe.type===_&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case x:e:{for(var Ve=oe.key;ne!==null;){if(ne.key===Ve){if(Ve=oe.type,Ve===_){if(ne.tag===7){h(ie,ne.sibling),ye=y(ne,oe.props.children),ye.return=ie,ie=ye;break e}}else if(ne.elementType===Ve||typeof Ve=="object"&&Ve!==null&&Ve.$$typeof===H&&Oo(Ve)===ne.type){h(ie,ne.sibling),ye=y(ne,oe.props),Bc(ye,oe),ye.return=ie,ie=ye;break e}h(ie,ne);break}else l(ie,ne);ne=ne.sibling}oe.type===_?(ye=So(oe.props.children,ie.mode,ye,oe.key),ye.return=ie,ie=ye):(ye=bh(oe.type,oe.key,oe.props,null,ie.mode,ye),Bc(ye,oe),ye.return=ie,ie=ye)}return R(ie);case E:e:{for(Ve=oe.key;ne!==null;){if(ne.key===Ve)if(ne.tag===4&&ne.stateNode.containerInfo===oe.containerInfo&&ne.stateNode.implementation===oe.implementation){h(ie,ne.sibling),ye=y(ne,oe.children||[]),ye.return=ie,ie=ye;break e}else{h(ie,ne);break}else l(ie,ne);ne=ne.sibling}ye=Ug(oe,ie.mode,ye),ye.return=ie,ie=ye}return R(ie);case H:return oe=Oo(oe),Ut(ie,ne,oe,ye)}if(W(oe))return Ue(ie,ne,oe,ye);if(q(oe)){if(Ve=q(oe),typeof Ve!="function")throw Error(r(150));return oe=Ve.call(oe),Ze(ie,ne,oe,ye)}if(typeof oe.then=="function")return Ut(ie,ne,Th(oe),ye);if(oe.$$typeof===A)return Ut(ie,ne,vh(ie,oe),ye);Sh(ie,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint"?(oe=""+oe,ne!==null&&ne.tag===6?(h(ie,ne.sibling),ye=y(ne,oe),ye.return=ie,ie=ye):(h(ie,ne),ye=Bg(oe,ie.mode,ye),ye.return=ie,ie=ye),R(ie)):h(ie,ne)}return function(ie,ne,oe,ye){try{Pc=0;var Ve=Ut(ie,ne,oe,ye);return Ql=null,Ve}catch(Ye){if(Ye===Xl||Ye===_h)throw Ye;var wt=ia(29,Ye,null,ie.mode);return wt.lanes=ye,wt.return=ie,wt}finally{}}}var Ro=ON(!0),IN=ON(!1),Is=!1;function Qg(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Zg(i,l){i=i.updateQueue,l.updateQueue===i&&(l.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Rs(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ms(i,l,h){var g=i.updateQueue;if(g===null)return null;if(g=g.shared,(Ot&2)!==0){var y=g.pending;return y===null?l.next=l:(l.next=y.next,y.next=l),g.pending=l,l=gh(i),mN(i,null,h),l}return ph(i,g,l,h),gh(i)}function Uc(i,l,h){if(l=l.updateQueue,l!==null&&(l=l.shared,(h&4194048)!==0)){var g=l.lanes;g&=i.pendingLanes,h|=g,l.lanes=h,tt(i,h)}}function Jg(i,l){var h=i.updateQueue,g=i.alternate;if(g!==null&&(g=g.updateQueue,h===g)){var y=null,N=null;if(h=h.firstBaseUpdate,h!==null){do{var R={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};N===null?y=N=R:N=N.next=R,h=h.next}while(h!==null);N===null?y=N=l:N=N.next=l}else y=N=l;h={baseState:g.baseState,firstBaseUpdate:y,lastBaseUpdate:N,shared:g.shared,callbacks:g.callbacks},i.updateQueue=h;return}i=h.lastBaseUpdate,i===null?h.firstBaseUpdate=l:i.next=l,h.lastBaseUpdate=l}var eb=!1;function zc(){if(eb){var i=Wl;if(i!==null)throw i}}function Fc(i,l,h,g){eb=!1;var y=i.updateQueue;Is=!1;var N=y.firstBaseUpdate,R=y.lastBaseUpdate,B=y.shared.pending;if(B!==null){y.shared.pending=null;var J=B,le=J.next;J.next=null,R===null?N=le:R.next=le,R=J;var be=i.alternate;be!==null&&(be=be.updateQueue,B=be.lastBaseUpdate,B!==R&&(B===null?be.firstBaseUpdate=le:B.next=le,be.lastBaseUpdate=J))}if(N!==null){var ve=y.baseState;R=0,be=le=J=null,B=N;do{var ce=B.lane&-536870913,fe=ce!==B.lane;if(fe?(bt&ce)===ce:(g&ce)===ce){ce!==0&&ce===Vl&&(eb=!0),be!==null&&(be=be.next={lane:0,tag:B.tag,payload:B.payload,callback:null,next:null});e:{var Ue=i,Ze=B;ce=l;var Ut=h;switch(Ze.tag){case 1:if(Ue=Ze.payload,typeof Ue=="function"){ve=Ue.call(Ut,ve,ce);break e}ve=Ue;break e;case 3:Ue.flags=Ue.flags&-65537|128;case 0:if(Ue=Ze.payload,ce=typeof Ue=="function"?Ue.call(Ut,ve,ce):Ue,ce==null)break e;ve=p({},ve,ce);break e;case 2:Is=!0}}ce=B.callback,ce!==null&&(i.flags|=64,fe&&(i.flags|=8192),fe=y.callbacks,fe===null?y.callbacks=[ce]:fe.push(ce))}else fe={lane:ce,tag:B.tag,payload:B.payload,callback:B.callback,next:null},be===null?(le=be=fe,J=ve):be=be.next=fe,R|=ce;if(B=B.next,B===null){if(B=y.shared.pending,B===null)break;fe=B,B=fe.next,fe.next=null,y.lastBaseUpdate=fe,y.shared.pending=null}}while(!0);be===null&&(J=ve),y.baseState=J,y.firstBaseUpdate=le,y.lastBaseUpdate=be,N===null&&(y.shared.lanes=0),Bs|=R,i.lanes=R,i.memoizedState=ve}}function RN(i,l){if(typeof i!="function")throw Error(r(191,i));i.call(l)}function MN(i,l){var h=i.callbacks;if(h!==null)for(i.callbacks=null,i=0;i<h.length;i++)RN(h[i],l)}var Zl=P(null),wh=P(0);function DN(i,l){i=Gi,M(wh,i),M(Zl,l),Gi=i|l.baseLanes}function tb(){M(wh,Gi),M(Zl,Zl.current)}function nb(){Gi=wh.current,ee(Zl),ee(wh)}var sa=P(null),Sa=null;function Ds(i){var l=i.alternate;M(vn,vn.current&1),M(sa,i),Sa===null&&(l===null||Zl.current!==null||l.memoizedState!==null)&&(Sa=i)}function rb(i){M(vn,vn.current),M(sa,i),Sa===null&&(Sa=i)}function jN(i){i.tag===22?(M(vn,vn.current),M(sa,i),Sa===null&&(Sa=i)):js()}function js(){M(vn,vn.current),M(sa,sa.current)}function oa(i){ee(sa),Sa===i&&(Sa=null),ee(vn)}var vn=P(0);function Ah(i){for(var l=i;l!==null;){if(l.tag===13){var h=l.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||ux(h)||cx(h)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Bi=0,lt=null,Pt=null,An=null,Ch=!1,Jl=!1,Mo=!1,kh=0,Hc=0,eu=null,n8=0;function fn(){throw Error(r(321))}function ab(i,l){if(l===null)return!1;for(var h=0;h<l.length&&h<i.length;h++)if(!aa(i[h],l[h]))return!1;return!0}function ib(i,l,h,g,y,N){return Bi=N,lt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,G.H=i===null||i.memoizedState===null?xT:vb,Mo=!1,N=h(g,y),Mo=!1,Jl&&(N=PN(l,h,g,y)),LN(i),N}function LN(i){G.H=qc;var l=Pt!==null&&Pt.next!==null;if(Bi=0,An=Pt=lt=null,Ch=!1,Hc=0,eu=null,l)throw Error(r(300));i===null||Cn||(i=i.dependencies,i!==null&&yh(i)&&(Cn=!0))}function PN(i,l,h,g){lt=i;var y=0;do{if(Jl&&(eu=null),Hc=0,Jl=!1,25<=y)throw Error(r(301));if(y+=1,An=Pt=null,i.updateQueue!=null){var N=i.updateQueue;N.lastEffect=null,N.events=null,N.stores=null,N.memoCache!=null&&(N.memoCache.index=0)}G.H=yT,N=l(h,g)}while(Jl);return N}function r8(){var i=G.H,l=i.useState()[0];return l=typeof l.then=="function"?$c(l):l,i=i.useState()[0],(Pt!==null?Pt.memoizedState:null)!==i&&(lt.flags|=1024),l}function sb(){var i=kh!==0;return kh=0,i}function ob(i,l,h){l.updateQueue=i.updateQueue,l.flags&=-2053,i.lanes&=~h}function lb(i){if(Ch){for(i=i.memoizedState;i!==null;){var l=i.queue;l!==null&&(l.pending=null),i=i.next}Ch=!1}Bi=0,An=Pt=lt=null,Jl=!1,Hc=kh=0,eu=null}function Cr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return An===null?lt.memoizedState=An=i:An=An.next=i,An}function En(){if(Pt===null){var i=lt.alternate;i=i!==null?i.memoizedState:null}else i=Pt.next;var l=An===null?lt.memoizedState:An.next;if(l!==null)An=l,Pt=i;else{if(i===null)throw lt.alternate===null?Error(r(467)):Error(r(310));Pt=i,i={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},An===null?lt.memoizedState=An=i:An=An.next=i}return An}function Oh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function $c(i){var l=Hc;return Hc+=1,eu===null&&(eu=[]),i=AN(eu,i,l),l=lt,(An===null?l.memoizedState:An.next)===null&&(l=l.alternate,G.H=l===null||l.memoizedState===null?xT:vb),i}function Ih(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return $c(i);if(i.$$typeof===A)return er(i)}throw Error(r(438,String(i)))}function ub(i){var l=null,h=lt.updateQueue;if(h!==null&&(l=h.memoCache),l==null){var g=lt.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(l={data:g.data.map(function(y){return y.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),h===null&&(h=Oh(),lt.updateQueue=h),h.memoCache=l,h=l.data[l.index],h===void 0)for(h=l.data[l.index]=Array(i),g=0;g<i;g++)h[g]=D;return l.index++,h}function Ui(i,l){return typeof l=="function"?l(i):l}function Rh(i){var l=En();return cb(l,Pt,i)}function cb(i,l,h){var g=i.queue;if(g===null)throw Error(r(311));g.lastRenderedReducer=h;var y=i.baseQueue,N=g.pending;if(N!==null){if(y!==null){var R=y.next;y.next=N.next,N.next=R}l.baseQueue=y=N,g.pending=null}if(N=i.baseState,y===null)i.memoizedState=N;else{l=y.next;var B=R=null,J=null,le=l,be=!1;do{var ve=le.lane&-536870913;if(ve!==le.lane?(bt&ve)===ve:(Bi&ve)===ve){var ce=le.revertLane;if(ce===0)J!==null&&(J=J.next={lane:0,revertLane:0,gesture:null,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null}),ve===Vl&&(be=!0);else if((Bi&ce)===ce){le=le.next,ce===Vl&&(be=!0);continue}else ve={lane:0,revertLane:le.revertLane,gesture:null,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null},J===null?(B=J=ve,R=N):J=J.next=ve,lt.lanes|=ce,Bs|=ce;ve=le.action,Mo&&h(N,ve),N=le.hasEagerState?le.eagerState:h(N,ve)}else ce={lane:ve,revertLane:le.revertLane,gesture:le.gesture,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null},J===null?(B=J=ce,R=N):J=J.next=ce,lt.lanes|=ve,Bs|=ve;le=le.next}while(le!==null&&le!==l);if(J===null?R=N:J.next=B,!aa(N,i.memoizedState)&&(Cn=!0,be&&(h=Wl,h!==null)))throw h;i.memoizedState=N,i.baseState=R,i.baseQueue=J,g.lastRenderedState=N}return y===null&&(g.lanes=0),[i.memoizedState,g.dispatch]}function db(i){var l=En(),h=l.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=i;var g=h.dispatch,y=h.pending,N=l.memoizedState;if(y!==null){h.pending=null;var R=y=y.next;do N=i(N,R.action),R=R.next;while(R!==y);aa(N,l.memoizedState)||(Cn=!0),l.memoizedState=N,l.baseQueue===null&&(l.baseState=N),h.lastRenderedState=N}return[N,g]}function BN(i,l,h){var g=lt,y=En(),N=Et;if(N){if(h===void 0)throw Error(r(407));h=h()}else h=l();var R=!aa((Pt||y).memoizedState,h);if(R&&(y.memoizedState=h,Cn=!0),y=y.queue,mb(FN.bind(null,g,y,i),[i]),y.getSnapshot!==l||R||An!==null&&An.memoizedState.tag&1){if(g.flags|=2048,tu(9,{destroy:void 0},zN.bind(null,g,y,h,l),null),$t===null)throw Error(r(349));N||(Bi&127)!==0||UN(g,l,h)}return h}function UN(i,l,h){i.flags|=16384,i={getSnapshot:l,value:h},l=lt.updateQueue,l===null?(l=Oh(),lt.updateQueue=l,l.stores=[i]):(h=l.stores,h===null?l.stores=[i]:h.push(i))}function zN(i,l,h,g){l.value=h,l.getSnapshot=g,HN(l)&&$N(i)}function FN(i,l,h){return h(function(){HN(l)&&$N(i)})}function HN(i){var l=i.getSnapshot;i=i.value;try{var h=l();return!aa(i,h)}catch{return!0}}function $N(i){var l=To(i,2);l!==null&&Yr(l,i,2)}function fb(i){var l=Cr();if(typeof i=="function"){var h=i;if(i=h(),Mo){cr(!0);try{h()}finally{cr(!1)}}}return l.memoizedState=l.baseState=i,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ui,lastRenderedState:i},l}function YN(i,l,h,g){return i.baseState=h,cb(i,Pt,typeof g=="function"?g:Ui)}function a8(i,l,h,g,y){if(jh(i))throw Error(r(485));if(i=l.action,i!==null){var N={payload:y,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(R){N.listeners.push(R)}};G.T!==null?h(!0):N.isTransition=!1,g(N),h=l.pending,h===null?(N.next=l.pending=N,qN(l,N)):(N.next=h.next,l.pending=h.next=N)}}function qN(i,l){var h=l.action,g=l.payload,y=i.state;if(l.isTransition){var N=G.T,R={};G.T=R;try{var B=h(y,g),J=G.S;J!==null&&J(R,B),GN(i,l,B)}catch(le){hb(i,l,le)}finally{N!==null&&R.types!==null&&(N.types=R.types),G.T=N}}else try{N=h(y,g),GN(i,l,N)}catch(le){hb(i,l,le)}}function GN(i,l,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(g){KN(i,l,g)},function(g){return hb(i,l,g)}):KN(i,l,h)}function KN(i,l,h){l.status="fulfilled",l.value=h,VN(l),i.state=h,l=i.pending,l!==null&&(h=l.next,h===l?i.pending=null:(h=h.next,l.next=h,qN(i,h)))}function hb(i,l,h){var g=i.pending;if(i.pending=null,g!==null){g=g.next;do l.status="rejected",l.reason=h,VN(l),l=l.next;while(l!==g)}i.action=null}function VN(i){i=i.listeners;for(var l=0;l<i.length;l++)(0,i[l])()}function WN(i,l){return l}function XN(i,l){if(Et){var h=$t.formState;if(h!==null){e:{var g=lt;if(Et){if(Qt){t:{for(var y=Qt,N=Ta;y.nodeType!==8;){if(!N){y=null;break t}if(y=wa(y.nextSibling),y===null){y=null;break t}}N=y.data,y=N==="F!"||N==="F"?y:null}if(y){Qt=wa(y.nextSibling),g=y.data==="F!";break e}}ks(g)}g=!1}g&&(l=h[0])}}return h=Cr(),h.memoizedState=h.baseState=l,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:WN,lastRenderedState:l},h.queue=g,h=pT.bind(null,lt,g),g.dispatch=h,g=fb(!1),N=yb.bind(null,lt,!1,g.queue),g=Cr(),y={state:l,dispatch:null,action:i,pending:null},g.queue=y,h=a8.bind(null,lt,y,N,h),y.dispatch=h,g.memoizedState=i,[l,h,!1]}function QN(i){var l=En();return ZN(l,Pt,i)}function ZN(i,l,h){if(l=cb(i,l,WN)[0],i=Rh(Ui)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var g=$c(l)}catch(R){throw R===Xl?_h:R}else g=l;l=En();var y=l.queue,N=y.dispatch;return h!==l.memoizedState&&(lt.flags|=2048,tu(9,{destroy:void 0},i8.bind(null,y,h),null)),[g,N,i]}function i8(i,l){i.action=l}function JN(i){var l=En(),h=Pt;if(h!==null)return ZN(l,h,i);En(),l=l.memoizedState,h=En();var g=h.queue.dispatch;return h.memoizedState=i,[l,g,!1]}function tu(i,l,h,g){return i={tag:i,create:h,deps:g,inst:l,next:null},l=lt.updateQueue,l===null&&(l=Oh(),lt.updateQueue=l),h=l.lastEffect,h===null?l.lastEffect=i.next=i:(g=h.next,h.next=i,i.next=g,l.lastEffect=i),i}function eT(){return En().memoizedState}function Mh(i,l,h,g){var y=Cr();lt.flags|=i,y.memoizedState=tu(1|l,{destroy:void 0},h,g===void 0?null:g)}function Dh(i,l,h,g){var y=En();g=g===void 0?null:g;var N=y.memoizedState.inst;Pt!==null&&g!==null&&ab(g,Pt.memoizedState.deps)?y.memoizedState=tu(l,N,h,g):(lt.flags|=i,y.memoizedState=tu(1|l,N,h,g))}function tT(i,l){Mh(8390656,8,i,l)}function mb(i,l){Dh(2048,8,i,l)}function s8(i){lt.flags|=4;var l=lt.updateQueue;if(l===null)l=Oh(),lt.updateQueue=l,l.events=[i];else{var h=l.events;h===null?l.events=[i]:h.push(i)}}function nT(i){var l=En().memoizedState;return s8({ref:l,nextImpl:i}),function(){if((Ot&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function rT(i,l){return Dh(4,2,i,l)}function aT(i,l){return Dh(4,4,i,l)}function iT(i,l){if(typeof l=="function"){i=i();var h=l(i);return function(){typeof h=="function"?h():l(null)}}if(l!=null)return i=i(),l.current=i,function(){l.current=null}}function sT(i,l,h){h=h!=null?h.concat([i]):null,Dh(4,4,iT.bind(null,l,i),h)}function pb(){}function oT(i,l){var h=En();l=l===void 0?null:l;var g=h.memoizedState;return l!==null&&ab(l,g[1])?g[0]:(h.memoizedState=[i,l],i)}function lT(i,l){var h=En();l=l===void 0?null:l;var g=h.memoizedState;if(l!==null&&ab(l,g[1]))return g[0];if(g=i(),Mo){cr(!0);try{i()}finally{cr(!1)}}return h.memoizedState=[g,l],g}function gb(i,l,h){return h===void 0||(Bi&1073741824)!==0&&(bt&261930)===0?i.memoizedState=l:(i.memoizedState=h,i=uS(),lt.lanes|=i,Bs|=i,h)}function uT(i,l,h,g){return aa(h,l)?h:Zl.current!==null?(i=gb(i,h,g),aa(i,l)||(Cn=!0),i):(Bi&42)===0||(Bi&1073741824)!==0&&(bt&261930)===0?(Cn=!0,i.memoizedState=h):(i=uS(),lt.lanes|=i,Bs|=i,l)}function cT(i,l,h,g,y){var N=F.p;F.p=N!==0&&8>N?N:8;var R=G.T,B={};G.T=B,yb(i,!1,l,h);try{var J=y(),le=G.S;if(le!==null&&le(B,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var be=t8(J,g);Yc(i,l,be,ca(i))}else Yc(i,l,g,ca(i))}catch(ve){Yc(i,l,{then:function(){},status:"rejected",reason:ve},ca())}finally{F.p=N,R!==null&&B.types!==null&&(R.types=B.types),G.T=R}}function o8(){}function bb(i,l,h,g){if(i.tag!==5)throw Error(r(476));var y=dT(i).queue;cT(i,y,l,$,h===null?o8:function(){return fT(i),h(g)})}function dT(i){var l=i.memoizedState;if(l!==null)return l;l={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ui,lastRenderedState:$},next:null};var h={};return l.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ui,lastRenderedState:h},next:null},i.memoizedState=l,i=i.alternate,i!==null&&(i.memoizedState=l),l}function fT(i){var l=dT(i);l.next===null&&(l=i.alternate.memoizedState),Yc(i,l.next.queue,{},ca())}function xb(){return er(od)}function hT(){return En().memoizedState}function mT(){return En().memoizedState}function l8(i){for(var l=i.return;l!==null;){switch(l.tag){case 24:case 3:var h=ca();i=Rs(h);var g=Ms(l,i,h);g!==null&&(Yr(g,l,h),Uc(g,l,h)),l={cache:Kg()},i.payload=l;return}l=l.return}}function u8(i,l,h){var g=ca();h={lane:g,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},jh(i)?gT(l,h):(h=Lg(i,l,h,g),h!==null&&(Yr(h,i,g),bT(h,l,g)))}function pT(i,l,h){var g=ca();Yc(i,l,h,g)}function Yc(i,l,h,g){var y={lane:g,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null};if(jh(i))gT(l,y);else{var N=i.alternate;if(i.lanes===0&&(N===null||N.lanes===0)&&(N=l.lastRenderedReducer,N!==null))try{var R=l.lastRenderedState,B=N(R,h);if(y.hasEagerState=!0,y.eagerState=B,aa(B,R))return ph(i,l,y,0),$t===null&&mh(),!1}catch{}finally{}if(h=Lg(i,l,y,g),h!==null)return Yr(h,i,g),bT(h,l,g),!0}return!1}function yb(i,l,h,g){if(g={lane:2,revertLane:Qb(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},jh(i)){if(l)throw Error(r(479))}else l=Lg(i,h,g,2),l!==null&&Yr(l,i,2)}function jh(i){var l=i.alternate;return i===lt||l!==null&&l===lt}function gT(i,l){Jl=Ch=!0;var h=i.pending;h===null?l.next=l:(l.next=h.next,h.next=l),i.pending=l}function bT(i,l,h){if((h&4194048)!==0){var g=l.lanes;g&=i.pendingLanes,h|=g,l.lanes=h,tt(i,h)}}var qc={readContext:er,use:Ih,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useLayoutEffect:fn,useInsertionEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useSyncExternalStore:fn,useId:fn,useHostTransitionStatus:fn,useFormState:fn,useActionState:fn,useOptimistic:fn,useMemoCache:fn,useCacheRefresh:fn};qc.useEffectEvent=fn;var xT={readContext:er,use:Ih,useCallback:function(i,l){return Cr().memoizedState=[i,l===void 0?null:l],i},useContext:er,useEffect:tT,useImperativeHandle:function(i,l,h){h=h!=null?h.concat([i]):null,Mh(4194308,4,iT.bind(null,l,i),h)},useLayoutEffect:function(i,l){return Mh(4194308,4,i,l)},useInsertionEffect:function(i,l){Mh(4,2,i,l)},useMemo:function(i,l){var h=Cr();l=l===void 0?null:l;var g=i();if(Mo){cr(!0);try{i()}finally{cr(!1)}}return h.memoizedState=[g,l],g},useReducer:function(i,l,h){var g=Cr();if(h!==void 0){var y=h(l);if(Mo){cr(!0);try{h(l)}finally{cr(!1)}}}else y=l;return g.memoizedState=g.baseState=y,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:y},g.queue=i,i=i.dispatch=u8.bind(null,lt,i),[g.memoizedState,i]},useRef:function(i){var l=Cr();return i={current:i},l.memoizedState=i},useState:function(i){i=fb(i);var l=i.queue,h=pT.bind(null,lt,l);return l.dispatch=h,[i.memoizedState,h]},useDebugValue:pb,useDeferredValue:function(i,l){var h=Cr();return gb(h,i,l)},useTransition:function(){var i=fb(!1);return i=cT.bind(null,lt,i.queue,!0,!1),Cr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,l,h){var g=lt,y=Cr();if(Et){if(h===void 0)throw Error(r(407));h=h()}else{if(h=l(),$t===null)throw Error(r(349));(bt&127)!==0||UN(g,l,h)}y.memoizedState=h;var N={value:h,getSnapshot:l};return y.queue=N,tT(FN.bind(null,g,N,i),[i]),g.flags|=2048,tu(9,{destroy:void 0},zN.bind(null,g,N,h,l),null),h},useId:function(){var i=Cr(),l=$t.identifierPrefix;if(Et){var h=oi,g=si;h=(g&~(1<<32-Rt(g)-1)).toString(32)+h,l="_"+l+"R_"+h,h=kh++,0<h&&(l+="H"+h.toString(32)),l+="_"}else h=n8++,l="_"+l+"r_"+h.toString(32)+"_";return i.memoizedState=l},useHostTransitionStatus:xb,useFormState:XN,useActionState:XN,useOptimistic:function(i){var l=Cr();l.memoizedState=l.baseState=i;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=h,l=yb.bind(null,lt,!0,h),h.dispatch=l,[i,l]},useMemoCache:ub,useCacheRefresh:function(){return Cr().memoizedState=l8.bind(null,lt)},useEffectEvent:function(i){var l=Cr(),h={impl:i};return l.memoizedState=h,function(){if((Ot&2)!==0)throw Error(r(440));return h.impl.apply(void 0,arguments)}}},vb={readContext:er,use:Ih,useCallback:oT,useContext:er,useEffect:mb,useImperativeHandle:sT,useInsertionEffect:rT,useLayoutEffect:aT,useMemo:lT,useReducer:Rh,useRef:eT,useState:function(){return Rh(Ui)},useDebugValue:pb,useDeferredValue:function(i,l){var h=En();return uT(h,Pt.memoizedState,i,l)},useTransition:function(){var i=Rh(Ui)[0],l=En().memoizedState;return[typeof i=="boolean"?i:$c(i),l]},useSyncExternalStore:BN,useId:hT,useHostTransitionStatus:xb,useFormState:QN,useActionState:QN,useOptimistic:function(i,l){var h=En();return YN(h,Pt,i,l)},useMemoCache:ub,useCacheRefresh:mT};vb.useEffectEvent=nT;var yT={readContext:er,use:Ih,useCallback:oT,useContext:er,useEffect:mb,useImperativeHandle:sT,useInsertionEffect:rT,useLayoutEffect:aT,useMemo:lT,useReducer:db,useRef:eT,useState:function(){return db(Ui)},useDebugValue:pb,useDeferredValue:function(i,l){var h=En();return Pt===null?gb(h,i,l):uT(h,Pt.memoizedState,i,l)},useTransition:function(){var i=db(Ui)[0],l=En().memoizedState;return[typeof i=="boolean"?i:$c(i),l]},useSyncExternalStore:BN,useId:hT,useHostTransitionStatus:xb,useFormState:JN,useActionState:JN,useOptimistic:function(i,l){var h=En();return Pt!==null?YN(h,Pt,i,l):(h.baseState=i,[i,h.queue.dispatch])},useMemoCache:ub,useCacheRefresh:mT};yT.useEffectEvent=nT;function Eb(i,l,h,g){l=i.memoizedState,h=h(g,l),h=h==null?l:p({},l,h),i.memoizedState=h,i.lanes===0&&(i.updateQueue.baseState=h)}var _b={enqueueSetState:function(i,l,h){i=i._reactInternals;var g=ca(),y=Rs(g);y.payload=l,h!=null&&(y.callback=h),l=Ms(i,y,g),l!==null&&(Yr(l,i,g),Uc(l,i,g))},enqueueReplaceState:function(i,l,h){i=i._reactInternals;var g=ca(),y=Rs(g);y.tag=1,y.payload=l,h!=null&&(y.callback=h),l=Ms(i,y,g),l!==null&&(Yr(l,i,g),Uc(l,i,g))},enqueueForceUpdate:function(i,l){i=i._reactInternals;var h=ca(),g=Rs(h);g.tag=2,l!=null&&(g.callback=l),l=Ms(i,g,h),l!==null&&(Yr(l,i,h),Uc(l,i,h))}};function vT(i,l,h,g,y,N,R){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(g,N,R):l.prototype&&l.prototype.isPureReactComponent?!Ic(h,g)||!Ic(y,N):!0}function ET(i,l,h,g){i=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(h,g),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(h,g),l.state!==i&&_b.enqueueReplaceState(l,l.state,null)}function Do(i,l){var h=l;if("ref"in l){h={};for(var g in l)g!=="ref"&&(h[g]=l[g])}if(i=i.defaultProps){h===l&&(h=p({},h));for(var y in i)h[y]===void 0&&(h[y]=i[y])}return h}function _T(i){hh(i)}function NT(i){console.error(i)}function TT(i){hh(i)}function Lh(i,l){try{var h=i.onUncaughtError;h(l.value,{componentStack:l.stack})}catch(g){setTimeout(function(){throw g})}}function ST(i,l,h){try{var g=i.onCaughtError;g(h.value,{componentStack:h.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Nb(i,l,h){return h=Rs(h),h.tag=3,h.payload={element:null},h.callback=function(){Lh(i,l)},h}function wT(i){return i=Rs(i),i.tag=3,i}function AT(i,l,h,g){var y=h.type.getDerivedStateFromError;if(typeof y=="function"){var N=g.value;i.payload=function(){return y(N)},i.callback=function(){ST(l,h,g)}}var R=h.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(i.callback=function(){ST(l,h,g),typeof y!="function"&&(Us===null?Us=new Set([this]):Us.add(this));var B=g.stack;this.componentDidCatch(g.value,{componentStack:B!==null?B:""})})}function c8(i,l,h,g,y){if(h.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(l=h.alternate,l!==null&&Kl(l,h,y,!0),h=sa.current,h!==null){switch(h.tag){case 31:case 13:return Sa===null?Vh():h.alternate===null&&hn===0&&(hn=3),h.flags&=-257,h.flags|=65536,h.lanes=y,g===Nh?h.flags|=16384:(l=h.updateQueue,l===null?h.updateQueue=new Set([g]):l.add(g),Vb(i,g,y)),!1;case 22:return h.flags|=65536,g===Nh?h.flags|=16384:(l=h.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([g])},h.updateQueue=l):(h=l.retryQueue,h===null?l.retryQueue=new Set([g]):h.add(g)),Vb(i,g,y)),!1}throw Error(r(435,h.tag))}return Vb(i,g,y),Vh(),!1}if(Et)return l=sa.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=y,g!==Hg&&(i=Error(r(422),{cause:g}),Dc(Ea(i,h)))):(g!==Hg&&(l=Error(r(423),{cause:g}),Dc(Ea(l,h))),i=i.current.alternate,i.flags|=65536,y&=-y,i.lanes|=y,g=Ea(g,h),y=Nb(i.stateNode,g,y),Jg(i,y),hn!==4&&(hn=2)),!1;var N=Error(r(520),{cause:g});if(N=Ea(N,h),Jc===null?Jc=[N]:Jc.push(N),hn!==4&&(hn=2),l===null)return!0;g=Ea(g,h),h=l;do{switch(h.tag){case 3:return h.flags|=65536,i=y&-y,h.lanes|=i,i=Nb(h.stateNode,g,i),Jg(h,i),!1;case 1:if(l=h.type,N=h.stateNode,(h.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||N!==null&&typeof N.componentDidCatch=="function"&&(Us===null||!Us.has(N))))return h.flags|=65536,y&=-y,h.lanes|=y,y=wT(y),AT(y,i,h,g),Jg(h,y),!1}h=h.return}while(h!==null);return!1}var Tb=Error(r(461)),Cn=!1;function tr(i,l,h,g){l.child=i===null?IN(l,null,h,g):Ro(l,i.child,h,g)}function CT(i,l,h,g,y){h=h.render;var N=l.ref;if("ref"in g){var R={};for(var B in g)B!=="ref"&&(R[B]=g[B])}else R=g;return Co(l),g=ib(i,l,h,R,N,y),B=sb(),i!==null&&!Cn?(ob(i,l,y),zi(i,l,y)):(Et&&B&&zg(l),l.flags|=1,tr(i,l,g,y),l.child)}function kT(i,l,h,g,y){if(i===null){var N=h.type;return typeof N=="function"&&!Pg(N)&&N.defaultProps===void 0&&h.compare===null?(l.tag=15,l.type=N,OT(i,l,N,g,y)):(i=bh(h.type,null,g,l,l.mode,y),i.ref=l.ref,i.return=l,l.child=i)}if(N=i.child,!Rb(i,y)){var R=N.memoizedProps;if(h=h.compare,h=h!==null?h:Ic,h(R,g)&&i.ref===l.ref)return zi(i,l,y)}return l.flags|=1,i=Di(N,g),i.ref=l.ref,i.return=l,l.child=i}function OT(i,l,h,g,y){if(i!==null){var N=i.memoizedProps;if(Ic(N,g)&&i.ref===l.ref)if(Cn=!1,l.pendingProps=g=N,Rb(i,y))(i.flags&131072)!==0&&(Cn=!0);else return l.lanes=i.lanes,zi(i,l,y)}return Sb(i,l,h,g,y)}function IT(i,l,h,g){var y=g.children,N=i!==null?i.memoizedState:null;if(i===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),g.mode==="hidden"){if((l.flags&128)!==0){if(N=N!==null?N.baseLanes|h:h,i!==null){for(g=l.child=i.child,y=0;g!==null;)y=y|g.lanes|g.childLanes,g=g.sibling;g=y&~N}else g=0,l.child=null;return RT(i,l,N,h,g)}if((h&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},i!==null&&Eh(l,N!==null?N.cachePool:null),N!==null?DN(l,N):tb(),jN(l);else return g=l.lanes=536870912,RT(i,l,N!==null?N.baseLanes|h:h,h,g)}else N!==null?(Eh(l,N.cachePool),DN(l,N),js(),l.memoizedState=null):(i!==null&&Eh(l,null),tb(),js());return tr(i,l,y,h),l.child}function Gc(i,l){return i!==null&&i.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function RT(i,l,h,g,y){var N=Wg();return N=N===null?null:{parent:wn._currentValue,pool:N},l.memoizedState={baseLanes:h,cachePool:N},i!==null&&Eh(l,null),tb(),jN(l),i!==null&&Kl(i,l,g,!0),l.childLanes=y,null}function Ph(i,l){return l=Uh({mode:l.mode,children:l.children},i.mode),l.ref=i.ref,i.child=l,l.return=i,l}function MT(i,l,h){return Ro(l,i.child,null,h),i=Ph(l,l.pendingProps),i.flags|=2,oa(l),l.memoizedState=null,i}function d8(i,l,h){var g=l.pendingProps,y=(l.flags&128)!==0;if(l.flags&=-129,i===null){if(Et){if(g.mode==="hidden")return i=Ph(l,g),l.lanes=536870912,Gc(null,i);if(rb(l),(i=Qt)?(i=qS(i,Ta),i=i!==null&&i.data==="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:As!==null?{id:si,overflow:oi}:null,retryLane:536870912,hydrationErrors:null},h=gN(i),h.return=l,l.child=h,Jn=l,Qt=null)):i=null,i===null)throw ks(l);return l.lanes=536870912,null}return Ph(l,g)}var N=i.memoizedState;if(N!==null){var R=N.dehydrated;if(rb(l),y)if(l.flags&256)l.flags&=-257,l=MT(i,l,h);else if(l.memoizedState!==null)l.child=i.child,l.flags|=128,l=null;else throw Error(r(558));else if(Cn||Kl(i,l,h,!1),y=(h&i.childLanes)!==0,Cn||y){if(g=$t,g!==null&&(R=bn(g,h),R!==0&&R!==N.retryLane))throw N.retryLane=R,To(i,R),Yr(g,i,R),Tb;Vh(),l=MT(i,l,h)}else i=N.treeContext,Qt=wa(R.nextSibling),Jn=l,Et=!0,Cs=null,Ta=!1,i!==null&&yN(l,i),l=Ph(l,g),l.flags|=4096;return l}return i=Di(i.child,{mode:g.mode,children:g.children}),i.ref=l.ref,l.child=i,i.return=l,i}function Bh(i,l){var h=l.ref;if(h===null)i!==null&&i.ref!==null&&(l.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(r(284));(i===null||i.ref!==h)&&(l.flags|=4194816)}}function Sb(i,l,h,g,y){return Co(l),h=ib(i,l,h,g,void 0,y),g=sb(),i!==null&&!Cn?(ob(i,l,y),zi(i,l,y)):(Et&&g&&zg(l),l.flags|=1,tr(i,l,h,y),l.child)}function DT(i,l,h,g,y,N){return Co(l),l.updateQueue=null,h=PN(l,g,h,y),LN(i),g=sb(),i!==null&&!Cn?(ob(i,l,N),zi(i,l,N)):(Et&&g&&zg(l),l.flags|=1,tr(i,l,h,N),l.child)}function jT(i,l,h,g,y){if(Co(l),l.stateNode===null){var N=$l,R=h.contextType;typeof R=="object"&&R!==null&&(N=er(R)),N=new h(g,N),l.memoizedState=N.state!==null&&N.state!==void 0?N.state:null,N.updater=_b,l.stateNode=N,N._reactInternals=l,N=l.stateNode,N.props=g,N.state=l.memoizedState,N.refs={},Qg(l),R=h.contextType,N.context=typeof R=="object"&&R!==null?er(R):$l,N.state=l.memoizedState,R=h.getDerivedStateFromProps,typeof R=="function"&&(Eb(l,h,R,g),N.state=l.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof N.getSnapshotBeforeUpdate=="function"||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(R=N.state,typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount(),R!==N.state&&_b.enqueueReplaceState(N,N.state,null),Fc(l,g,N,y),zc(),N.state=l.memoizedState),typeof N.componentDidMount=="function"&&(l.flags|=4194308),g=!0}else if(i===null){N=l.stateNode;var B=l.memoizedProps,J=Do(h,B);N.props=J;var le=N.context,be=h.contextType;R=$l,typeof be=="object"&&be!==null&&(R=er(be));var ve=h.getDerivedStateFromProps;be=typeof ve=="function"||typeof N.getSnapshotBeforeUpdate=="function",B=l.pendingProps!==B,be||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(B||le!==R)&&ET(l,N,g,R),Is=!1;var ce=l.memoizedState;N.state=ce,Fc(l,g,N,y),zc(),le=l.memoizedState,B||ce!==le||Is?(typeof ve=="function"&&(Eb(l,h,ve,g),le=l.memoizedState),(J=Is||vT(l,h,J,g,ce,le,R))?(be||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(l.flags|=4194308)):(typeof N.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=g,l.memoizedState=le),N.props=g,N.state=le,N.context=R,g=J):(typeof N.componentDidMount=="function"&&(l.flags|=4194308),g=!1)}else{N=l.stateNode,Zg(i,l),R=l.memoizedProps,be=Do(h,R),N.props=be,ve=l.pendingProps,ce=N.context,le=h.contextType,J=$l,typeof le=="object"&&le!==null&&(J=er(le)),B=h.getDerivedStateFromProps,(le=typeof B=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(R!==ve||ce!==J)&&ET(l,N,g,J),Is=!1,ce=l.memoizedState,N.state=ce,Fc(l,g,N,y),zc();var fe=l.memoizedState;R!==ve||ce!==fe||Is||i!==null&&i.dependencies!==null&&yh(i.dependencies)?(typeof B=="function"&&(Eb(l,h,B,g),fe=l.memoizedState),(be=Is||vT(l,h,be,g,ce,fe,J)||i!==null&&i.dependencies!==null&&yh(i.dependencies))?(le||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(g,fe,J),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(g,fe,J)),typeof N.componentDidUpdate=="function"&&(l.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof N.componentDidUpdate!="function"||R===i.memoizedProps&&ce===i.memoizedState||(l.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&ce===i.memoizedState||(l.flags|=1024),l.memoizedProps=g,l.memoizedState=fe),N.props=g,N.state=fe,N.context=J,g=be):(typeof N.componentDidUpdate!="function"||R===i.memoizedProps&&ce===i.memoizedState||(l.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&ce===i.memoizedState||(l.flags|=1024),g=!1)}return N=g,Bh(i,l),g=(l.flags&128)!==0,N||g?(N=l.stateNode,h=g&&typeof h.getDerivedStateFromError!="function"?null:N.render(),l.flags|=1,i!==null&&g?(l.child=Ro(l,i.child,null,y),l.child=Ro(l,null,h,y)):tr(i,l,h,y),l.memoizedState=N.state,i=l.child):i=zi(i,l,y),i}function LT(i,l,h,g){return wo(),l.flags|=256,tr(i,l,h,g),l.child}var wb={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ab(i){return{baseLanes:i,cachePool:SN()}}function Cb(i,l,h){return i=i!==null?i.childLanes&~h:0,l&&(i|=ua),i}function PT(i,l,h){var g=l.pendingProps,y=!1,N=(l.flags&128)!==0,R;if((R=N)||(R=i!==null&&i.memoizedState===null?!1:(vn.current&2)!==0),R&&(y=!0,l.flags&=-129),R=(l.flags&32)!==0,l.flags&=-33,i===null){if(Et){if(y?Ds(l):js(),(i=Qt)?(i=qS(i,Ta),i=i!==null&&i.data!=="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:As!==null?{id:si,overflow:oi}:null,retryLane:536870912,hydrationErrors:null},h=gN(i),h.return=l,l.child=h,Jn=l,Qt=null)):i=null,i===null)throw ks(l);return cx(i)?l.lanes=32:l.lanes=536870912,null}var B=g.children;return g=g.fallback,y?(js(),y=l.mode,B=Uh({mode:"hidden",children:B},y),g=So(g,y,h,null),B.return=l,g.return=l,B.sibling=g,l.child=B,g=l.child,g.memoizedState=Ab(h),g.childLanes=Cb(i,R,h),l.memoizedState=wb,Gc(null,g)):(Ds(l),kb(l,B))}var J=i.memoizedState;if(J!==null&&(B=J.dehydrated,B!==null)){if(N)l.flags&256?(Ds(l),l.flags&=-257,l=Ob(i,l,h)):l.memoizedState!==null?(js(),l.child=i.child,l.flags|=128,l=null):(js(),B=g.fallback,y=l.mode,g=Uh({mode:"visible",children:g.children},y),B=So(B,y,h,null),B.flags|=2,g.return=l,B.return=l,g.sibling=B,l.child=g,Ro(l,i.child,null,h),g=l.child,g.memoizedState=Ab(h),g.childLanes=Cb(i,R,h),l.memoizedState=wb,l=Gc(null,g));else if(Ds(l),cx(B)){if(R=B.nextSibling&&B.nextSibling.dataset,R)var le=R.dgst;R=le,g=Error(r(419)),g.stack="",g.digest=R,Dc({value:g,source:null,stack:null}),l=Ob(i,l,h)}else if(Cn||Kl(i,l,h,!1),R=(h&i.childLanes)!==0,Cn||R){if(R=$t,R!==null&&(g=bn(R,h),g!==0&&g!==J.retryLane))throw J.retryLane=g,To(i,g),Yr(R,i,g),Tb;ux(B)||Vh(),l=Ob(i,l,h)}else ux(B)?(l.flags|=192,l.child=i.child,l=null):(i=J.treeContext,Qt=wa(B.nextSibling),Jn=l,Et=!0,Cs=null,Ta=!1,i!==null&&yN(l,i),l=kb(l,g.children),l.flags|=4096);return l}return y?(js(),B=g.fallback,y=l.mode,J=i.child,le=J.sibling,g=Di(J,{mode:"hidden",children:g.children}),g.subtreeFlags=J.subtreeFlags&65011712,le!==null?B=Di(le,B):(B=So(B,y,h,null),B.flags|=2),B.return=l,g.return=l,g.sibling=B,l.child=g,Gc(null,g),g=l.child,B=i.child.memoizedState,B===null?B=Ab(h):(y=B.cachePool,y!==null?(J=wn._currentValue,y=y.parent!==J?{parent:J,pool:J}:y):y=SN(),B={baseLanes:B.baseLanes|h,cachePool:y}),g.memoizedState=B,g.childLanes=Cb(i,R,h),l.memoizedState=wb,Gc(i.child,g)):(Ds(l),h=i.child,i=h.sibling,h=Di(h,{mode:"visible",children:g.children}),h.return=l,h.sibling=null,i!==null&&(R=l.deletions,R===null?(l.deletions=[i],l.flags|=16):R.push(i)),l.child=h,l.memoizedState=null,h)}function kb(i,l){return l=Uh({mode:"visible",children:l},i.mode),l.return=i,i.child=l}function Uh(i,l){return i=ia(22,i,null,l),i.lanes=0,i}function Ob(i,l,h){return Ro(l,i.child,null,h),i=kb(l,l.pendingProps.children),i.flags|=2,l.memoizedState=null,i}function BT(i,l,h){i.lanes|=l;var g=i.alternate;g!==null&&(g.lanes|=l),qg(i.return,l,h)}function Ib(i,l,h,g,y,N){var R=i.memoizedState;R===null?i.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:g,tail:h,tailMode:y,treeForkCount:N}:(R.isBackwards=l,R.rendering=null,R.renderingStartTime=0,R.last=g,R.tail=h,R.tailMode=y,R.treeForkCount=N)}function UT(i,l,h){var g=l.pendingProps,y=g.revealOrder,N=g.tail;g=g.children;var R=vn.current,B=(R&2)!==0;if(B?(R=R&1|2,l.flags|=128):R&=1,M(vn,R),tr(i,l,g,h),g=Et?Mc:0,!B&&i!==null&&(i.flags&128)!==0)e:for(i=l.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&BT(i,h,l);else if(i.tag===19)BT(i,h,l);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break e;for(;i.sibling===null;){if(i.return===null||i.return===l)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(y){case"forwards":for(h=l.child,y=null;h!==null;)i=h.alternate,i!==null&&Ah(i)===null&&(y=h),h=h.sibling;h=y,h===null?(y=l.child,l.child=null):(y=h.sibling,h.sibling=null),Ib(l,!1,y,h,N,g);break;case"backwards":case"unstable_legacy-backwards":for(h=null,y=l.child,l.child=null;y!==null;){if(i=y.alternate,i!==null&&Ah(i)===null){l.child=y;break}i=y.sibling,y.sibling=h,h=y,y=i}Ib(l,!0,h,null,N,g);break;case"together":Ib(l,!1,null,null,void 0,g);break;default:l.memoizedState=null}return l.child}function zi(i,l,h){if(i!==null&&(l.dependencies=i.dependencies),Bs|=l.lanes,(h&l.childLanes)===0)if(i!==null){if(Kl(i,l,h,!1),(h&l.childLanes)===0)return null}else return null;if(i!==null&&l.child!==i.child)throw Error(r(153));if(l.child!==null){for(i=l.child,h=Di(i,i.pendingProps),l.child=h,h.return=l;i.sibling!==null;)i=i.sibling,h=h.sibling=Di(i,i.pendingProps),h.return=l;h.sibling=null}return l.child}function Rb(i,l){return(i.lanes&l)!==0?!0:(i=i.dependencies,!!(i!==null&&yh(i)))}function f8(i,l,h){switch(l.tag){case 3:Oe(l,l.stateNode.containerInfo),Os(l,wn,i.memoizedState.cache),wo();break;case 27:case 5:De(l);break;case 4:Oe(l,l.stateNode.containerInfo);break;case 10:Os(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,rb(l),null;break;case 13:var g=l.memoizedState;if(g!==null)return g.dehydrated!==null?(Ds(l),l.flags|=128,null):(h&l.child.childLanes)!==0?PT(i,l,h):(Ds(l),i=zi(i,l,h),i!==null?i.sibling:null);Ds(l);break;case 19:var y=(i.flags&128)!==0;if(g=(h&l.childLanes)!==0,g||(Kl(i,l,h,!1),g=(h&l.childLanes)!==0),y){if(g)return UT(i,l,h);l.flags|=128}if(y=l.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),M(vn,vn.current),g)break;return null;case 22:return l.lanes=0,IT(i,l,h,l.pendingProps);case 24:Os(l,wn,i.memoizedState.cache)}return zi(i,l,h)}function zT(i,l,h){if(i!==null)if(i.memoizedProps!==l.pendingProps)Cn=!0;else{if(!Rb(i,h)&&(l.flags&128)===0)return Cn=!1,f8(i,l,h);Cn=(i.flags&131072)!==0}else Cn=!1,Et&&(l.flags&1048576)!==0&&xN(l,Mc,l.index);switch(l.lanes=0,l.tag){case 16:e:{var g=l.pendingProps;if(i=Oo(l.elementType),l.type=i,typeof i=="function")Pg(i)?(g=Do(i,g),l.tag=1,l=jT(null,l,i,g,h)):(l.tag=0,l=Sb(null,l,i,g,h));else{if(i!=null){var y=i.$$typeof;if(y===k){l.tag=11,l=CT(null,l,i,g,h);break e}else if(y===j){l.tag=14,l=kT(null,l,i,g,h);break e}}throw l=Q(i)||i,Error(r(306,l,""))}}return l;case 0:return Sb(i,l,l.type,l.pendingProps,h);case 1:return g=l.type,y=Do(g,l.pendingProps),jT(i,l,g,y,h);case 3:e:{if(Oe(l,l.stateNode.containerInfo),i===null)throw Error(r(387));g=l.pendingProps;var N=l.memoizedState;y=N.element,Zg(i,l),Fc(l,g,null,h);var R=l.memoizedState;if(g=R.cache,Os(l,wn,g),g!==N.cache&&Gg(l,[wn],h,!0),zc(),g=R.element,N.isDehydrated)if(N={element:g,isDehydrated:!1,cache:R.cache},l.updateQueue.baseState=N,l.memoizedState=N,l.flags&256){l=LT(i,l,g,h);break e}else if(g!==y){y=Ea(Error(r(424)),l),Dc(y),l=LT(i,l,g,h);break e}else{switch(i=l.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(Qt=wa(i.firstChild),Jn=l,Et=!0,Cs=null,Ta=!0,h=IN(l,null,g,h),l.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling}else{if(wo(),g===y){l=zi(i,l,h);break e}tr(i,l,g,h)}l=l.child}return l;case 26:return Bh(i,l),i===null?(h=QS(l.type,null,l.pendingProps,null))?l.memoizedState=h:Et||(h=l.type,i=l.pendingProps,g=tm(U.current).createElement(h),g[xn]=l,g[dr]=i,nr(g,h,i),Tn(g),l.stateNode=g):l.memoizedState=QS(l.type,i.memoizedProps,l.pendingProps,i.memoizedState),null;case 27:return De(l),i===null&&Et&&(g=l.stateNode=VS(l.type,l.pendingProps,U.current),Jn=l,Ta=!0,y=Qt,$s(l.type)?(dx=y,Qt=wa(g.firstChild)):Qt=y),tr(i,l,l.pendingProps.children,h),Bh(i,l),i===null&&(l.flags|=4194304),l.child;case 5:return i===null&&Et&&((y=g=Qt)&&(g=H8(g,l.type,l.pendingProps,Ta),g!==null?(l.stateNode=g,Jn=l,Qt=wa(g.firstChild),Ta=!1,y=!0):y=!1),y||ks(l)),De(l),y=l.type,N=l.pendingProps,R=i!==null?i.memoizedProps:null,g=N.children,sx(y,N)?g=null:R!==null&&sx(y,R)&&(l.flags|=32),l.memoizedState!==null&&(y=ib(i,l,r8,null,null,h),od._currentValue=y),Bh(i,l),tr(i,l,g,h),l.child;case 6:return i===null&&Et&&((i=h=Qt)&&(h=$8(h,l.pendingProps,Ta),h!==null?(l.stateNode=h,Jn=l,Qt=null,i=!0):i=!1),i||ks(l)),null;case 13:return PT(i,l,h);case 4:return Oe(l,l.stateNode.containerInfo),g=l.pendingProps,i===null?l.child=Ro(l,null,g,h):tr(i,l,g,h),l.child;case 11:return CT(i,l,l.type,l.pendingProps,h);case 7:return tr(i,l,l.pendingProps,h),l.child;case 8:return tr(i,l,l.pendingProps.children,h),l.child;case 12:return tr(i,l,l.pendingProps.children,h),l.child;case 10:return g=l.pendingProps,Os(l,l.type,g.value),tr(i,l,g.children,h),l.child;case 9:return y=l.type._context,g=l.pendingProps.children,Co(l),y=er(y),g=g(y),l.flags|=1,tr(i,l,g,h),l.child;case 14:return kT(i,l,l.type,l.pendingProps,h);case 15:return OT(i,l,l.type,l.pendingProps,h);case 19:return UT(i,l,h);case 31:return d8(i,l,h);case 22:return IT(i,l,h,l.pendingProps);case 24:return Co(l),g=er(wn),i===null?(y=Wg(),y===null&&(y=$t,N=Kg(),y.pooledCache=N,N.refCount++,N!==null&&(y.pooledCacheLanes|=h),y=N),l.memoizedState={parent:g,cache:y},Qg(l),Os(l,wn,y)):((i.lanes&h)!==0&&(Zg(i,l),Fc(l,null,null,h),zc()),y=i.memoizedState,N=l.memoizedState,y.parent!==g?(y={parent:g,cache:g},l.memoizedState=y,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=y),Os(l,wn,g)):(g=N.cache,Os(l,wn,g),g!==y.cache&&Gg(l,[wn],h,!0))),tr(i,l,l.pendingProps.children,h),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function Fi(i){i.flags|=4}function Mb(i,l,h,g,y){if((l=(i.mode&32)!==0)&&(l=!1),l){if(i.flags|=16777216,(y&335544128)===y)if(i.stateNode.complete)i.flags|=8192;else if(hS())i.flags|=8192;else throw Io=Nh,Xg}else i.flags&=-16777217}function FT(i,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!nw(l))if(hS())i.flags|=8192;else throw Io=Nh,Xg}function zh(i,l){l!==null&&(i.flags|=4),i.flags&16384&&(l=i.tag!==22?rt():536870912,i.lanes|=l,iu|=l)}function Kc(i,l){if(!Et)switch(i.tailMode){case"hidden":l=i.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?i.tail=null:h.sibling=null;break;case"collapsed":h=i.tail;for(var g=null;h!==null;)h.alternate!==null&&(g=h),h=h.sibling;g===null?l||i.tail===null?i.tail=null:i.tail.sibling=null:g.sibling=null}}function Zt(i){var l=i.alternate!==null&&i.alternate.child===i.child,h=0,g=0;if(l)for(var y=i.child;y!==null;)h|=y.lanes|y.childLanes,g|=y.subtreeFlags&65011712,g|=y.flags&65011712,y.return=i,y=y.sibling;else for(y=i.child;y!==null;)h|=y.lanes|y.childLanes,g|=y.subtreeFlags,g|=y.flags,y.return=i,y=y.sibling;return i.subtreeFlags|=g,i.childLanes=h,l}function h8(i,l,h){var g=l.pendingProps;switch(Fg(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(l),null;case 1:return Zt(l),null;case 3:return h=l.stateNode,g=null,i!==null&&(g=i.memoizedState.cache),l.memoizedState.cache!==g&&(l.flags|=2048),Pi(wn),pe(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Gl(l)?Fi(l):i===null||i.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,$g())),Zt(l),null;case 26:var y=l.type,N=l.memoizedState;return i===null?(Fi(l),N!==null?(Zt(l),FT(l,N)):(Zt(l),Mb(l,y,null,g,h))):N?N!==i.memoizedState?(Fi(l),Zt(l),FT(l,N)):(Zt(l),l.flags&=-16777217):(i=i.memoizedProps,i!==g&&Fi(l),Zt(l),Mb(l,y,i,g,h)),null;case 27:if(je(l),h=U.current,y=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==g&&Fi(l);else{if(!g){if(l.stateNode===null)throw Error(r(166));return Zt(l),null}i=de.current,Gl(l)?vN(l):(i=VS(y,g,h),l.stateNode=i,Fi(l))}return Zt(l),null;case 5:if(je(l),y=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==g&&Fi(l);else{if(!g){if(l.stateNode===null)throw Error(r(166));return Zt(l),null}if(N=de.current,Gl(l))vN(l);else{var R=tm(U.current);switch(N){case 1:N=R.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:N=R.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":N=R.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":N=R.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":N=R.createElement("div"),N.innerHTML="<script><\/script>",N=N.removeChild(N.firstChild);break;case"select":N=typeof g.is=="string"?R.createElement("select",{is:g.is}):R.createElement("select"),g.multiple?N.multiple=!0:g.size&&(N.size=g.size);break;default:N=typeof g.is=="string"?R.createElement(y,{is:g.is}):R.createElement(y)}}N[xn]=l,N[dr]=g;e:for(R=l.child;R!==null;){if(R.tag===5||R.tag===6)N.appendChild(R.stateNode);else if(R.tag!==4&&R.tag!==27&&R.child!==null){R.child.return=R,R=R.child;continue}if(R===l)break e;for(;R.sibling===null;){if(R.return===null||R.return===l)break e;R=R.return}R.sibling.return=R.return,R=R.sibling}l.stateNode=N;e:switch(nr(N,y,g),y){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&Fi(l)}}return Zt(l),Mb(l,l.type,i===null?null:i.memoizedProps,l.pendingProps,h),null;case 6:if(i&&l.stateNode!=null)i.memoizedProps!==g&&Fi(l);else{if(typeof g!="string"&&l.stateNode===null)throw Error(r(166));if(i=U.current,Gl(l)){if(i=l.stateNode,h=l.memoizedProps,g=null,y=Jn,y!==null)switch(y.tag){case 27:case 5:g=y.memoizedProps}i[xn]=l,i=!!(i.nodeValue===h||g!==null&&g.suppressHydrationWarning===!0||PS(i.nodeValue,h)),i||ks(l,!0)}else i=tm(i).createTextNode(g),i[xn]=l,l.stateNode=i}return Zt(l),null;case 31:if(h=l.memoizedState,i===null||i.memoizedState!==null){if(g=Gl(l),h!==null){if(i===null){if(!g)throw Error(r(318));if(i=l.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[xn]=l}else wo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Zt(l),i=!1}else h=$g(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=h),i=!0;if(!i)return l.flags&256?(oa(l),l):(oa(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Zt(l),null;case 13:if(g=l.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(y=Gl(l),g!==null&&g.dehydrated!==null){if(i===null){if(!y)throw Error(r(318));if(y=l.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[xn]=l}else wo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Zt(l),y=!1}else y=$g(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=y),y=!0;if(!y)return l.flags&256?(oa(l),l):(oa(l),null)}return oa(l),(l.flags&128)!==0?(l.lanes=h,l):(h=g!==null,i=i!==null&&i.memoizedState!==null,h&&(g=l.child,y=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(y=g.alternate.memoizedState.cachePool.pool),N=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(N=g.memoizedState.cachePool.pool),N!==y&&(g.flags|=2048)),h!==i&&h&&(l.child.flags|=8192),zh(l,l.updateQueue),Zt(l),null);case 4:return pe(),i===null&&tx(l.stateNode.containerInfo),Zt(l),null;case 10:return Pi(l.type),Zt(l),null;case 19:if(ee(vn),g=l.memoizedState,g===null)return Zt(l),null;if(y=(l.flags&128)!==0,N=g.rendering,N===null)if(y)Kc(g,!1);else{if(hn!==0||i!==null&&(i.flags&128)!==0)for(i=l.child;i!==null;){if(N=Ah(i),N!==null){for(l.flags|=128,Kc(g,!1),i=N.updateQueue,l.updateQueue=i,zh(l,i),l.subtreeFlags=0,i=h,h=l.child;h!==null;)pN(h,i),h=h.sibling;return M(vn,vn.current&1|2),Et&&ji(l,g.treeForkCount),l.child}i=i.sibling}g.tail!==null&&Vt()>qh&&(l.flags|=128,y=!0,Kc(g,!1),l.lanes=4194304)}else{if(!y)if(i=Ah(N),i!==null){if(l.flags|=128,y=!0,i=i.updateQueue,l.updateQueue=i,zh(l,i),Kc(g,!0),g.tail===null&&g.tailMode==="hidden"&&!N.alternate&&!Et)return Zt(l),null}else 2*Vt()-g.renderingStartTime>qh&&h!==536870912&&(l.flags|=128,y=!0,Kc(g,!1),l.lanes=4194304);g.isBackwards?(N.sibling=l.child,l.child=N):(i=g.last,i!==null?i.sibling=N:l.child=N,g.last=N)}return g.tail!==null?(i=g.tail,g.rendering=i,g.tail=i.sibling,g.renderingStartTime=Vt(),i.sibling=null,h=vn.current,M(vn,y?h&1|2:h&1),Et&&ji(l,g.treeForkCount),i):(Zt(l),null);case 22:case 23:return oa(l),nb(),g=l.memoizedState!==null,i!==null?i.memoizedState!==null!==g&&(l.flags|=8192):g&&(l.flags|=8192),g?(h&536870912)!==0&&(l.flags&128)===0&&(Zt(l),l.subtreeFlags&6&&(l.flags|=8192)):Zt(l),h=l.updateQueue,h!==null&&zh(l,h.retryQueue),h=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(h=i.memoizedState.cachePool.pool),g=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),g!==h&&(l.flags|=2048),i!==null&&ee(ko),null;case 24:return h=null,i!==null&&(h=i.memoizedState.cache),l.memoizedState.cache!==h&&(l.flags|=2048),Pi(wn),Zt(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function m8(i,l){switch(Fg(l),l.tag){case 1:return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 3:return Pi(wn),pe(),i=l.flags,(i&65536)!==0&&(i&128)===0?(l.flags=i&-65537|128,l):null;case 26:case 27:case 5:return je(l),null;case 31:if(l.memoizedState!==null){if(oa(l),l.alternate===null)throw Error(r(340));wo()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 13:if(oa(l),i=l.memoizedState,i!==null&&i.dehydrated!==null){if(l.alternate===null)throw Error(r(340));wo()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 19:return ee(vn),null;case 4:return pe(),null;case 10:return Pi(l.type),null;case 22:case 23:return oa(l),nb(),i!==null&&ee(ko),i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 24:return Pi(wn),null;case 25:return null;default:return null}}function HT(i,l){switch(Fg(l),l.tag){case 3:Pi(wn),pe();break;case 26:case 27:case 5:je(l);break;case 4:pe();break;case 31:l.memoizedState!==null&&oa(l);break;case 13:oa(l);break;case 19:ee(vn);break;case 10:Pi(l.type);break;case 22:case 23:oa(l),nb(),i!==null&&ee(ko);break;case 24:Pi(wn)}}function Vc(i,l){try{var h=l.updateQueue,g=h!==null?h.lastEffect:null;if(g!==null){var y=g.next;h=y;do{if((h.tag&i)===i){g=void 0;var N=h.create,R=h.inst;g=N(),R.destroy=g}h=h.next}while(h!==y)}}catch(B){Lt(l,l.return,B)}}function Ls(i,l,h){try{var g=l.updateQueue,y=g!==null?g.lastEffect:null;if(y!==null){var N=y.next;g=N;do{if((g.tag&i)===i){var R=g.inst,B=R.destroy;if(B!==void 0){R.destroy=void 0,y=l;var J=h,le=B;try{le()}catch(be){Lt(y,J,be)}}}g=g.next}while(g!==N)}}catch(be){Lt(l,l.return,be)}}function $T(i){var l=i.updateQueue;if(l!==null){var h=i.stateNode;try{MN(l,h)}catch(g){Lt(i,i.return,g)}}}function YT(i,l,h){h.props=Do(i.type,i.memoizedProps),h.state=i.memoizedState;try{h.componentWillUnmount()}catch(g){Lt(i,l,g)}}function Wc(i,l){try{var h=i.ref;if(h!==null){switch(i.tag){case 26:case 27:case 5:var g=i.stateNode;break;case 30:g=i.stateNode;break;default:g=i.stateNode}typeof h=="function"?i.refCleanup=h(g):h.current=g}}catch(y){Lt(i,l,y)}}function li(i,l){var h=i.ref,g=i.refCleanup;if(h!==null)if(typeof g=="function")try{g()}catch(y){Lt(i,l,y)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(y){Lt(i,l,y)}else h.current=null}function qT(i){var l=i.type,h=i.memoizedProps,g=i.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":h.autoFocus&&g.focus();break e;case"img":h.src?g.src=h.src:h.srcSet&&(g.srcset=h.srcSet)}}catch(y){Lt(i,i.return,y)}}function Db(i,l,h){try{var g=i.stateNode;L8(g,i.type,h,l),g[dr]=l}catch(y){Lt(i,i.return,y)}}function GT(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&$s(i.type)||i.tag===4}function jb(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||GT(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&$s(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Lb(i,l,h){var g=i.tag;if(g===5||g===6)i=i.stateNode,l?(h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h).insertBefore(i,l):(l=h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h,l.appendChild(i),h=h._reactRootContainer,h!=null||l.onclick!==null||(l.onclick=Ie));else if(g!==4&&(g===27&&$s(i.type)&&(h=i.stateNode,l=null),i=i.child,i!==null))for(Lb(i,l,h),i=i.sibling;i!==null;)Lb(i,l,h),i=i.sibling}function Fh(i,l,h){var g=i.tag;if(g===5||g===6)i=i.stateNode,l?h.insertBefore(i,l):h.appendChild(i);else if(g!==4&&(g===27&&$s(i.type)&&(h=i.stateNode),i=i.child,i!==null))for(Fh(i,l,h),i=i.sibling;i!==null;)Fh(i,l,h),i=i.sibling}function KT(i){var l=i.stateNode,h=i.memoizedProps;try{for(var g=i.type,y=l.attributes;y.length;)l.removeAttributeNode(y[0]);nr(l,g,h),l[xn]=i,l[dr]=h}catch(N){Lt(i,i.return,N)}}var Hi=!1,kn=!1,Pb=!1,VT=typeof WeakSet=="function"?WeakSet:Set,zn=null;function p8(i,l){if(i=i.containerInfo,ax=lm,i=sN(i),Og(i)){if("selectionStart"in i)var h={start:i.selectionStart,end:i.selectionEnd};else e:{h=(h=i.ownerDocument)&&h.defaultView||window;var g=h.getSelection&&h.getSelection();if(g&&g.rangeCount!==0){h=g.anchorNode;var y=g.anchorOffset,N=g.focusNode;g=g.focusOffset;try{h.nodeType,N.nodeType}catch{h=null;break e}var R=0,B=-1,J=-1,le=0,be=0,ve=i,ce=null;t:for(;;){for(var fe;ve!==h||y!==0&&ve.nodeType!==3||(B=R+y),ve!==N||g!==0&&ve.nodeType!==3||(J=R+g),ve.nodeType===3&&(R+=ve.nodeValue.length),(fe=ve.firstChild)!==null;)ce=ve,ve=fe;for(;;){if(ve===i)break t;if(ce===h&&++le===y&&(B=R),ce===N&&++be===g&&(J=R),(fe=ve.nextSibling)!==null)break;ve=ce,ce=ve.parentNode}ve=fe}h=B===-1||J===-1?null:{start:B,end:J}}else h=null}h=h||{start:0,end:0}}else h=null;for(ix={focusedElem:i,selectionRange:h},lm=!1,zn=l;zn!==null;)if(l=zn,i=l.child,(l.subtreeFlags&1028)!==0&&i!==null)i.return=l,zn=i;else for(;zn!==null;){switch(l=zn,N=l.alternate,i=l.flags,l.tag){case 0:if((i&4)!==0&&(i=l.updateQueue,i=i!==null?i.events:null,i!==null))for(h=0;h<i.length;h++)y=i[h],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&N!==null){i=void 0,h=l,y=N.memoizedProps,N=N.memoizedState,g=h.stateNode;try{var Ue=Do(h.type,y);i=g.getSnapshotBeforeUpdate(Ue,N),g.__reactInternalSnapshotBeforeUpdate=i}catch(Ze){Lt(h,h.return,Ze)}}break;case 3:if((i&1024)!==0){if(i=l.stateNode.containerInfo,h=i.nodeType,h===9)lx(i);else if(h===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":lx(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=l.sibling,i!==null){i.return=l.return,zn=i;break}zn=l.return}}function WT(i,l,h){var g=h.flags;switch(h.tag){case 0:case 11:case 15:Yi(i,h),g&4&&Vc(5,h);break;case 1:if(Yi(i,h),g&4)if(i=h.stateNode,l===null)try{i.componentDidMount()}catch(R){Lt(h,h.return,R)}else{var y=Do(h.type,l.memoizedProps);l=l.memoizedState;try{i.componentDidUpdate(y,l,i.__reactInternalSnapshotBeforeUpdate)}catch(R){Lt(h,h.return,R)}}g&64&&$T(h),g&512&&Wc(h,h.return);break;case 3:if(Yi(i,h),g&64&&(i=h.updateQueue,i!==null)){if(l=null,h.child!==null)switch(h.child.tag){case 27:case 5:l=h.child.stateNode;break;case 1:l=h.child.stateNode}try{MN(i,l)}catch(R){Lt(h,h.return,R)}}break;case 27:l===null&&g&4&&KT(h);case 26:case 5:Yi(i,h),l===null&&g&4&&qT(h),g&512&&Wc(h,h.return);break;case 12:Yi(i,h);break;case 31:Yi(i,h),g&4&&ZT(i,h);break;case 13:Yi(i,h),g&4&&JT(i,h),g&64&&(i=h.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(h=T8.bind(null,h),Y8(i,h))));break;case 22:if(g=h.memoizedState!==null||Hi,!g){l=l!==null&&l.memoizedState!==null||kn,y=Hi;var N=kn;Hi=g,(kn=l)&&!N?qi(i,h,(h.subtreeFlags&8772)!==0):Yi(i,h),Hi=y,kn=N}break;case 30:break;default:Yi(i,h)}}function XT(i){var l=i.alternate;l!==null&&(i.alternate=null,XT(l)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(l=i.stateNode,l!==null&&yc(l)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var nn=null,zr=!1;function $i(i,l,h){for(h=h.child;h!==null;)QT(i,l,h),h=h.sibling}function QT(i,l,h){if(dn&&typeof dn.onCommitFiberUnmount=="function")try{dn.onCommitFiberUnmount(Qn,h)}catch{}switch(h.tag){case 26:kn||li(h,l),$i(i,l,h),h.memoizedState?h.memoizedState.count--:h.stateNode&&(h=h.stateNode,h.parentNode.removeChild(h));break;case 27:kn||li(h,l);var g=nn,y=zr;$s(h.type)&&(nn=h.stateNode,zr=!1),$i(i,l,h),ad(h.stateNode),nn=g,zr=y;break;case 5:kn||li(h,l);case 6:if(g=nn,y=zr,nn=null,$i(i,l,h),nn=g,zr=y,nn!==null)if(zr)try{(nn.nodeType===9?nn.body:nn.nodeName==="HTML"?nn.ownerDocument.body:nn).removeChild(h.stateNode)}catch(N){Lt(h,l,N)}else try{nn.removeChild(h.stateNode)}catch(N){Lt(h,l,N)}break;case 18:nn!==null&&(zr?(i=nn,$S(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,h.stateNode),hu(i)):$S(nn,h.stateNode));break;case 4:g=nn,y=zr,nn=h.stateNode.containerInfo,zr=!0,$i(i,l,h),nn=g,zr=y;break;case 0:case 11:case 14:case 15:Ls(2,h,l),kn||Ls(4,h,l),$i(i,l,h);break;case 1:kn||(li(h,l),g=h.stateNode,typeof g.componentWillUnmount=="function"&&YT(h,l,g)),$i(i,l,h);break;case 21:$i(i,l,h);break;case 22:kn=(g=kn)||h.memoizedState!==null,$i(i,l,h),kn=g;break;default:$i(i,l,h)}}function ZT(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{hu(i)}catch(h){Lt(l,l.return,h)}}}function JT(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{hu(i)}catch(h){Lt(l,l.return,h)}}function g8(i){switch(i.tag){case 31:case 13:case 19:var l=i.stateNode;return l===null&&(l=i.stateNode=new VT),l;case 22:return i=i.stateNode,l=i._retryCache,l===null&&(l=i._retryCache=new VT),l;default:throw Error(r(435,i.tag))}}function Hh(i,l){var h=g8(i);l.forEach(function(g){if(!h.has(g)){h.add(g);var y=S8.bind(null,i,g);g.then(y,y)}})}function Fr(i,l){var h=l.deletions;if(h!==null)for(var g=0;g<h.length;g++){var y=h[g],N=i,R=l,B=R;e:for(;B!==null;){switch(B.tag){case 27:if($s(B.type)){nn=B.stateNode,zr=!1;break e}break;case 5:nn=B.stateNode,zr=!1;break e;case 3:case 4:nn=B.stateNode.containerInfo,zr=!0;break e}B=B.return}if(nn===null)throw Error(r(160));QT(N,R,y),nn=null,zr=!1,N=y.alternate,N!==null&&(N.return=null),y.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)eS(l,i),l=l.sibling}var Ya=null;function eS(i,l){var h=i.alternate,g=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Fr(l,i),Hr(i),g&4&&(Ls(3,i,i.return),Vc(3,i),Ls(5,i,i.return));break;case 1:Fr(l,i),Hr(i),g&512&&(kn||h===null||li(h,h.return)),g&64&&Hi&&(i=i.updateQueue,i!==null&&(g=i.callbacks,g!==null&&(h=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=h===null?g:h.concat(g))));break;case 26:var y=Ya;if(Fr(l,i),Hr(i),g&512&&(kn||h===null||li(h,h.return)),g&4){var N=h!==null?h.memoizedState:null;if(g=i.memoizedState,h===null)if(g===null)if(i.stateNode===null){e:{g=i.type,h=i.memoizedProps,y=y.ownerDocument||y;t:switch(g){case"title":N=y.getElementsByTagName("title")[0],(!N||N[xo]||N[xn]||N.namespaceURI==="http://www.w3.org/2000/svg"||N.hasAttribute("itemprop"))&&(N=y.createElement(g),y.head.insertBefore(N,y.querySelector("head > title"))),nr(N,g,h),N[xn]=i,Tn(N),g=N;break e;case"link":var R=ew("link","href",y).get(g+(h.href||""));if(R){for(var B=0;B<R.length;B++)if(N=R[B],N.getAttribute("href")===(h.href==null||h.href===""?null:h.href)&&N.getAttribute("rel")===(h.rel==null?null:h.rel)&&N.getAttribute("title")===(h.title==null?null:h.title)&&N.getAttribute("crossorigin")===(h.crossOrigin==null?null:h.crossOrigin)){R.splice(B,1);break t}}N=y.createElement(g),nr(N,g,h),y.head.appendChild(N);break;case"meta":if(R=ew("meta","content",y).get(g+(h.content||""))){for(B=0;B<R.length;B++)if(N=R[B],N.getAttribute("content")===(h.content==null?null:""+h.content)&&N.getAttribute("name")===(h.name==null?null:h.name)&&N.getAttribute("property")===(h.property==null?null:h.property)&&N.getAttribute("http-equiv")===(h.httpEquiv==null?null:h.httpEquiv)&&N.getAttribute("charset")===(h.charSet==null?null:h.charSet)){R.splice(B,1);break t}}N=y.createElement(g),nr(N,g,h),y.head.appendChild(N);break;default:throw Error(r(468,g))}N[xn]=i,Tn(N),g=N}i.stateNode=g}else tw(y,i.type,i.stateNode);else i.stateNode=JS(y,g,i.memoizedProps);else N!==g?(N===null?h.stateNode!==null&&(h=h.stateNode,h.parentNode.removeChild(h)):N.count--,g===null?tw(y,i.type,i.stateNode):JS(y,g,i.memoizedProps)):g===null&&i.stateNode!==null&&Db(i,i.memoizedProps,h.memoizedProps)}break;case 27:Fr(l,i),Hr(i),g&512&&(kn||h===null||li(h,h.return)),h!==null&&g&4&&Db(i,i.memoizedProps,h.memoizedProps);break;case 5:if(Fr(l,i),Hr(i),g&512&&(kn||h===null||li(h,h.return)),i.flags&32){y=i.stateNode;try{Je(y,"")}catch(Ue){Lt(i,i.return,Ue)}}g&4&&i.stateNode!=null&&(y=i.memoizedProps,Db(i,y,h!==null?h.memoizedProps:y)),g&1024&&(Pb=!0);break;case 6:if(Fr(l,i),Hr(i),g&4){if(i.stateNode===null)throw Error(r(162));g=i.memoizedProps,h=i.stateNode;try{h.nodeValue=g}catch(Ue){Lt(i,i.return,Ue)}}break;case 3:if(am=null,y=Ya,Ya=nm(l.containerInfo),Fr(l,i),Ya=y,Hr(i),g&4&&h!==null&&h.memoizedState.isDehydrated)try{hu(l.containerInfo)}catch(Ue){Lt(i,i.return,Ue)}Pb&&(Pb=!1,tS(i));break;case 4:g=Ya,Ya=nm(i.stateNode.containerInfo),Fr(l,i),Hr(i),Ya=g;break;case 12:Fr(l,i),Hr(i);break;case 31:Fr(l,i),Hr(i),g&4&&(g=i.updateQueue,g!==null&&(i.updateQueue=null,Hh(i,g)));break;case 13:Fr(l,i),Hr(i),i.child.flags&8192&&i.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(Yh=Vt()),g&4&&(g=i.updateQueue,g!==null&&(i.updateQueue=null,Hh(i,g)));break;case 22:y=i.memoizedState!==null;var J=h!==null&&h.memoizedState!==null,le=Hi,be=kn;if(Hi=le||y,kn=be||J,Fr(l,i),kn=be,Hi=le,Hr(i),g&8192)e:for(l=i.stateNode,l._visibility=y?l._visibility&-2:l._visibility|1,y&&(h===null||J||Hi||kn||jo(i)),h=null,l=i;;){if(l.tag===5||l.tag===26){if(h===null){J=h=l;try{if(N=J.stateNode,y)R=N.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none";else{B=J.stateNode;var ve=J.memoizedProps.style,ce=ve!=null&&ve.hasOwnProperty("display")?ve.display:null;B.style.display=ce==null||typeof ce=="boolean"?"":(""+ce).trim()}}catch(Ue){Lt(J,J.return,Ue)}}}else if(l.tag===6){if(h===null){J=l;try{J.stateNode.nodeValue=y?"":J.memoizedProps}catch(Ue){Lt(J,J.return,Ue)}}}else if(l.tag===18){if(h===null){J=l;try{var fe=J.stateNode;y?YS(fe,!0):YS(J.stateNode,!1)}catch(Ue){Lt(J,J.return,Ue)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===i)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break e;for(;l.sibling===null;){if(l.return===null||l.return===i)break e;h===l&&(h=null),l=l.return}h===l&&(h=null),l.sibling.return=l.return,l=l.sibling}g&4&&(g=i.updateQueue,g!==null&&(h=g.retryQueue,h!==null&&(g.retryQueue=null,Hh(i,h))));break;case 19:Fr(l,i),Hr(i),g&4&&(g=i.updateQueue,g!==null&&(i.updateQueue=null,Hh(i,g)));break;case 30:break;case 21:break;default:Fr(l,i),Hr(i)}}function Hr(i){var l=i.flags;if(l&2){try{for(var h,g=i.return;g!==null;){if(GT(g)){h=g;break}g=g.return}if(h==null)throw Error(r(160));switch(h.tag){case 27:var y=h.stateNode,N=jb(i);Fh(i,N,y);break;case 5:var R=h.stateNode;h.flags&32&&(Je(R,""),h.flags&=-33);var B=jb(i);Fh(i,B,R);break;case 3:case 4:var J=h.stateNode.containerInfo,le=jb(i);Lb(i,le,J);break;default:throw Error(r(161))}}catch(be){Lt(i,i.return,be)}i.flags&=-3}l&4096&&(i.flags&=-4097)}function tS(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var l=i;tS(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),i=i.sibling}}function Yi(i,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)WT(i,l.alternate,l),l=l.sibling}function jo(i){for(i=i.child;i!==null;){var l=i;switch(l.tag){case 0:case 11:case 14:case 15:Ls(4,l,l.return),jo(l);break;case 1:li(l,l.return);var h=l.stateNode;typeof h.componentWillUnmount=="function"&&YT(l,l.return,h),jo(l);break;case 27:ad(l.stateNode);case 26:case 5:li(l,l.return),jo(l);break;case 22:l.memoizedState===null&&jo(l);break;case 30:jo(l);break;default:jo(l)}i=i.sibling}}function qi(i,l,h){for(h=h&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var g=l.alternate,y=i,N=l,R=N.flags;switch(N.tag){case 0:case 11:case 15:qi(y,N,h),Vc(4,N);break;case 1:if(qi(y,N,h),g=N,y=g.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(le){Lt(g,g.return,le)}if(g=N,y=g.updateQueue,y!==null){var B=g.stateNode;try{var J=y.shared.hiddenCallbacks;if(J!==null)for(y.shared.hiddenCallbacks=null,y=0;y<J.length;y++)RN(J[y],B)}catch(le){Lt(g,g.return,le)}}h&&R&64&&$T(N),Wc(N,N.return);break;case 27:KT(N);case 26:case 5:qi(y,N,h),h&&g===null&&R&4&&qT(N),Wc(N,N.return);break;case 12:qi(y,N,h);break;case 31:qi(y,N,h),h&&R&4&&ZT(y,N);break;case 13:qi(y,N,h),h&&R&4&&JT(y,N);break;case 22:N.memoizedState===null&&qi(y,N,h),Wc(N,N.return);break;case 30:break;default:qi(y,N,h)}l=l.sibling}}function Bb(i,l){var h=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(h=i.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==h&&(i!=null&&i.refCount++,h!=null&&jc(h))}function Ub(i,l){i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&jc(i))}function qa(i,l,h,g){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)nS(i,l,h,g),l=l.sibling}function nS(i,l,h,g){var y=l.flags;switch(l.tag){case 0:case 11:case 15:qa(i,l,h,g),y&2048&&Vc(9,l);break;case 1:qa(i,l,h,g);break;case 3:qa(i,l,h,g),y&2048&&(i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&jc(i)));break;case 12:if(y&2048){qa(i,l,h,g),i=l.stateNode;try{var N=l.memoizedProps,R=N.id,B=N.onPostCommit;typeof B=="function"&&B(R,l.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(J){Lt(l,l.return,J)}}else qa(i,l,h,g);break;case 31:qa(i,l,h,g);break;case 13:qa(i,l,h,g);break;case 23:break;case 22:N=l.stateNode,R=l.alternate,l.memoizedState!==null?N._visibility&2?qa(i,l,h,g):Xc(i,l):N._visibility&2?qa(i,l,h,g):(N._visibility|=2,nu(i,l,h,g,(l.subtreeFlags&10256)!==0||!1)),y&2048&&Bb(R,l);break;case 24:qa(i,l,h,g),y&2048&&Ub(l.alternate,l);break;default:qa(i,l,h,g)}}function nu(i,l,h,g,y){for(y=y&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var N=i,R=l,B=h,J=g,le=R.flags;switch(R.tag){case 0:case 11:case 15:nu(N,R,B,J,y),Vc(8,R);break;case 23:break;case 22:var be=R.stateNode;R.memoizedState!==null?be._visibility&2?nu(N,R,B,J,y):Xc(N,R):(be._visibility|=2,nu(N,R,B,J,y)),y&&le&2048&&Bb(R.alternate,R);break;case 24:nu(N,R,B,J,y),y&&le&2048&&Ub(R.alternate,R);break;default:nu(N,R,B,J,y)}l=l.sibling}}function Xc(i,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var h=i,g=l,y=g.flags;switch(g.tag){case 22:Xc(h,g),y&2048&&Bb(g.alternate,g);break;case 24:Xc(h,g),y&2048&&Ub(g.alternate,g);break;default:Xc(h,g)}l=l.sibling}}var Qc=8192;function ru(i,l,h){if(i.subtreeFlags&Qc)for(i=i.child;i!==null;)rS(i,l,h),i=i.sibling}function rS(i,l,h){switch(i.tag){case 26:ru(i,l,h),i.flags&Qc&&i.memoizedState!==null&&nB(h,Ya,i.memoizedState,i.memoizedProps);break;case 5:ru(i,l,h);break;case 3:case 4:var g=Ya;Ya=nm(i.stateNode.containerInfo),ru(i,l,h),Ya=g;break;case 22:i.memoizedState===null&&(g=i.alternate,g!==null&&g.memoizedState!==null?(g=Qc,Qc=16777216,ru(i,l,h),Qc=g):ru(i,l,h));break;default:ru(i,l,h)}}function aS(i){var l=i.alternate;if(l!==null&&(i=l.child,i!==null)){l.child=null;do l=i.sibling,i.sibling=null,i=l;while(i!==null)}}function Zc(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var h=0;h<l.length;h++){var g=l[h];zn=g,sS(g,i)}aS(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)iS(i),i=i.sibling}function iS(i){switch(i.tag){case 0:case 11:case 15:Zc(i),i.flags&2048&&Ls(9,i,i.return);break;case 3:Zc(i);break;case 12:Zc(i);break;case 22:var l=i.stateNode;i.memoizedState!==null&&l._visibility&2&&(i.return===null||i.return.tag!==13)?(l._visibility&=-3,$h(i)):Zc(i);break;default:Zc(i)}}function $h(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var h=0;h<l.length;h++){var g=l[h];zn=g,sS(g,i)}aS(i)}for(i=i.child;i!==null;){switch(l=i,l.tag){case 0:case 11:case 15:Ls(8,l,l.return),$h(l);break;case 22:h=l.stateNode,h._visibility&2&&(h._visibility&=-3,$h(l));break;default:$h(l)}i=i.sibling}}function sS(i,l){for(;zn!==null;){var h=zn;switch(h.tag){case 0:case 11:case 15:Ls(8,h,l);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var g=h.memoizedState.cachePool.pool;g!=null&&g.refCount++}break;case 24:jc(h.memoizedState.cache)}if(g=h.child,g!==null)g.return=h,zn=g;else e:for(h=i;zn!==null;){g=zn;var y=g.sibling,N=g.return;if(XT(g),g===h){zn=null;break e}if(y!==null){y.return=N,zn=y;break e}zn=N}}}var b8={getCacheForType:function(i){var l=er(wn),h=l.data.get(i);return h===void 0&&(h=i(),l.data.set(i,h)),h},cacheSignal:function(){return er(wn).controller.signal}},x8=typeof WeakMap=="function"?WeakMap:Map,Ot=0,$t=null,ht=null,bt=0,jt=0,la=null,Ps=!1,au=!1,zb=!1,Gi=0,hn=0,Bs=0,Lo=0,Fb=0,ua=0,iu=0,Jc=null,$r=null,Hb=!1,Yh=0,oS=0,qh=1/0,Gh=null,Us=null,Rn=0,zs=null,su=null,Ki=0,$b=0,Yb=null,lS=null,ed=0,qb=null;function ca(){return(Ot&2)!==0&&bt!==0?bt&-bt:G.T!==null?Qb():Rl()}function uS(){if(ua===0)if((bt&536870912)===0||Et){var i=Il;Il<<=1,(Il&3932160)===0&&(Il=262144),ua=i}else ua=536870912;return i=sa.current,i!==null&&(i.flags|=32),ua}function Yr(i,l,h){(i===$t&&(jt===2||jt===9)||i.cancelPendingCommit!==null)&&(ou(i,0),Fs(i,bt,ua,!1)),Ht(i,h),((Ot&2)===0||i!==$t)&&(i===$t&&((Ot&2)===0&&(Lo|=h),hn===4&&Fs(i,bt,ua,!1)),ui(i))}function cS(i,l,h){if((Ot&6)!==0)throw Error(r(327));var g=!h&&(l&127)===0&&(l&i.expiredLanes)===0||xe(i,l),y=g?E8(i,l):Kb(i,l,!0),N=g;do{if(y===0){au&&!g&&Fs(i,l,0,!1);break}else{if(h=i.current.alternate,N&&!y8(h)){y=Kb(i,l,!1),N=!1;continue}if(y===2){if(N=l,i.errorRecoveryDisabledLanes&N)var R=0;else R=i.pendingLanes&-536870913,R=R!==0?R:R&536870912?536870912:0;if(R!==0){l=R;e:{var B=i;y=Jc;var J=B.current.memoizedState.isDehydrated;if(J&&(ou(B,R).flags|=256),R=Kb(B,R,!1),R!==2){if(zb&&!J){B.errorRecoveryDisabledLanes|=N,Lo|=N,y=4;break e}N=$r,$r=y,N!==null&&($r===null?$r=N:$r.push.apply($r,N))}y=R}if(N=!1,y!==2)continue}}if(y===1){ou(i,0),Fs(i,l,0,!0);break}e:{switch(g=i,N=y,N){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:Fs(g,l,ua,!Ps);break e;case 2:$r=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(y=Yh+300-Vt(),10<y)){if(Fs(g,l,ua,!Ps),te(g,0,!0)!==0)break e;Ki=l,g.timeoutHandle=FS(dS.bind(null,g,h,$r,Gh,Hb,l,ua,Lo,iu,Ps,N,"Throttled",-0,0),y);break e}dS(g,h,$r,Gh,Hb,l,ua,Lo,iu,Ps,N,null,-0,0)}}break}while(!0);ui(i)}function dS(i,l,h,g,y,N,R,B,J,le,be,ve,ce,fe){if(i.timeoutHandle=-1,ve=l.subtreeFlags,ve&8192||(ve&16785408)===16785408){ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ie},rS(l,N,ve);var Ue=(N&62914560)===N?Yh-Vt():(N&4194048)===N?oS-Vt():0;if(Ue=rB(ve,Ue),Ue!==null){Ki=N,i.cancelPendingCommit=Ue(yS.bind(null,i,l,N,h,g,y,R,B,J,be,ve,null,ce,fe)),Fs(i,N,R,!le);return}}yS(i,l,N,h,g,y,R,B,J)}function y8(i){for(var l=i;;){var h=l.tag;if((h===0||h===11||h===15)&&l.flags&16384&&(h=l.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var g=0;g<h.length;g++){var y=h[g],N=y.getSnapshot;y=y.value;try{if(!aa(N(),y))return!1}catch{return!1}}if(h=l.child,l.subtreeFlags&16384&&h!==null)h.return=l,l=h;else{if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Fs(i,l,h,g){l&=~Fb,l&=~Lo,i.suspendedLanes|=l,i.pingedLanes&=~l,g&&(i.warmLanes|=l),g=i.expirationTimes;for(var y=l;0<y;){var N=31-Rt(y),R=1<<N;g[N]=-1,y&=~R}h!==0&&Pe(i,h,l)}function Kh(){return(Ot&6)===0?(td(0),!1):!0}function Gb(){if(ht!==null){if(jt===0)var i=ht.return;else i=ht,Li=Ao=null,lb(i),Ql=null,Pc=0,i=ht;for(;i!==null;)HT(i.alternate,i),i=i.return;ht=null}}function ou(i,l){var h=i.timeoutHandle;h!==-1&&(i.timeoutHandle=-1,U8(h)),h=i.cancelPendingCommit,h!==null&&(i.cancelPendingCommit=null,h()),Ki=0,Gb(),$t=i,ht=h=Di(i.current,null),bt=l,jt=0,la=null,Ps=!1,au=xe(i,l),zb=!1,iu=ua=Fb=Lo=Bs=hn=0,$r=Jc=null,Hb=!1,(l&8)!==0&&(l|=l&32);var g=i.entangledLanes;if(g!==0)for(i=i.entanglements,g&=l;0<g;){var y=31-Rt(g),N=1<<y;l|=i[y],g&=~N}return Gi=l,mh(),h}function fS(i,l){lt=null,G.H=qc,l===Xl||l===_h?(l=CN(),jt=3):l===Xg?(l=CN(),jt=4):jt=l===Tb?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,la=l,ht===null&&(hn=1,Lh(i,Ea(l,i.current)))}function hS(){var i=sa.current;return i===null?!0:(bt&4194048)===bt?Sa===null:(bt&62914560)===bt||(bt&536870912)!==0?i===Sa:!1}function mS(){var i=G.H;return G.H=qc,i===null?qc:i}function pS(){var i=G.A;return G.A=b8,i}function Vh(){hn=4,Ps||(bt&4194048)!==bt&&sa.current!==null||(au=!0),(Bs&134217727)===0&&(Lo&134217727)===0||$t===null||Fs($t,bt,ua,!1)}function Kb(i,l,h){var g=Ot;Ot|=2;var y=mS(),N=pS();($t!==i||bt!==l)&&(Gh=null,ou(i,l)),l=!1;var R=hn;e:do try{if(jt!==0&&ht!==null){var B=ht,J=la;switch(jt){case 8:Gb(),R=6;break e;case 3:case 2:case 9:case 6:sa.current===null&&(l=!0);var le=jt;if(jt=0,la=null,lu(i,B,J,le),h&&au){R=0;break e}break;default:le=jt,jt=0,la=null,lu(i,B,J,le)}}v8(),R=hn;break}catch(be){fS(i,be)}while(!0);return l&&i.shellSuspendCounter++,Li=Ao=null,Ot=g,G.H=y,G.A=N,ht===null&&($t=null,bt=0,mh()),R}function v8(){for(;ht!==null;)gS(ht)}function E8(i,l){var h=Ot;Ot|=2;var g=mS(),y=pS();$t!==i||bt!==l?(Gh=null,qh=Vt()+500,ou(i,l)):au=xe(i,l);e:do try{if(jt!==0&&ht!==null){l=ht;var N=la;t:switch(jt){case 1:jt=0,la=null,lu(i,l,N,1);break;case 2:case 9:if(wN(N)){jt=0,la=null,bS(l);break}l=function(){jt!==2&&jt!==9||$t!==i||(jt=7),ui(i)},N.then(l,l);break e;case 3:jt=7;break e;case 4:jt=5;break e;case 7:wN(N)?(jt=0,la=null,bS(l)):(jt=0,la=null,lu(i,l,N,7));break;case 5:var R=null;switch(ht.tag){case 26:R=ht.memoizedState;case 5:case 27:var B=ht;if(R?nw(R):B.stateNode.complete){jt=0,la=null;var J=B.sibling;if(J!==null)ht=J;else{var le=B.return;le!==null?(ht=le,Wh(le)):ht=null}break t}}jt=0,la=null,lu(i,l,N,5);break;case 6:jt=0,la=null,lu(i,l,N,6);break;case 8:Gb(),hn=6;break e;default:throw Error(r(462))}}_8();break}catch(be){fS(i,be)}while(!0);return Li=Ao=null,G.H=g,G.A=y,Ot=h,ht!==null?0:($t=null,bt=0,mh(),hn)}function _8(){for(;ht!==null&&!vt();)gS(ht)}function gS(i){var l=zT(i.alternate,i,Gi);i.memoizedProps=i.pendingProps,l===null?Wh(i):ht=l}function bS(i){var l=i,h=l.alternate;switch(l.tag){case 15:case 0:l=DT(h,l,l.pendingProps,l.type,void 0,bt);break;case 11:l=DT(h,l,l.pendingProps,l.type.render,l.ref,bt);break;case 5:lb(l);default:HT(h,l),l=ht=pN(l,Gi),l=zT(h,l,Gi)}i.memoizedProps=i.pendingProps,l===null?Wh(i):ht=l}function lu(i,l,h,g){Li=Ao=null,lb(l),Ql=null,Pc=0;var y=l.return;try{if(c8(i,y,l,h,bt)){hn=1,Lh(i,Ea(h,i.current)),ht=null;return}}catch(N){if(y!==null)throw ht=y,N;hn=1,Lh(i,Ea(h,i.current)),ht=null;return}l.flags&32768?(Et||g===1?i=!0:au||(bt&536870912)!==0?i=!1:(Ps=i=!0,(g===2||g===9||g===3||g===6)&&(g=sa.current,g!==null&&g.tag===13&&(g.flags|=16384))),xS(l,i)):Wh(l)}function Wh(i){var l=i;do{if((l.flags&32768)!==0){xS(l,Ps);return}i=l.return;var h=h8(l.alternate,l,Gi);if(h!==null){ht=h;return}if(l=l.sibling,l!==null){ht=l;return}ht=l=i}while(l!==null);hn===0&&(hn=5)}function xS(i,l){do{var h=m8(i.alternate,i);if(h!==null){h.flags&=32767,ht=h;return}if(h=i.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!l&&(i=i.sibling,i!==null)){ht=i;return}ht=i=h}while(i!==null);hn=6,ht=null}function yS(i,l,h,g,y,N,R,B,J){i.cancelPendingCommit=null;do Xh();while(Rn!==0);if((Ot&6)!==0)throw Error(r(327));if(l!==null){if(l===i.current)throw Error(r(177));if(N=l.lanes|l.childLanes,N|=jg,He(i,h,N,R,B,J),i===$t&&(ht=$t=null,bt=0),su=l,zs=i,Ki=h,$b=N,Yb=y,lS=g,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,w8(Qe,function(){return TS(),null})):(i.callbackNode=null,i.callbackPriority=0),g=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||g){g=G.T,G.T=null,y=F.p,F.p=2,R=Ot,Ot|=4;try{p8(i,l,h)}finally{Ot=R,F.p=y,G.T=g}}Rn=1,vS(),ES(),_S()}}function vS(){if(Rn===1){Rn=0;var i=zs,l=su,h=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||h){h=G.T,G.T=null;var g=F.p;F.p=2;var y=Ot;Ot|=4;try{eS(l,i);var N=ix,R=sN(i.containerInfo),B=N.focusedElem,J=N.selectionRange;if(R!==B&&B&&B.ownerDocument&&iN(B.ownerDocument.documentElement,B)){if(J!==null&&Og(B)){var le=J.start,be=J.end;if(be===void 0&&(be=le),"selectionStart"in B)B.selectionStart=le,B.selectionEnd=Math.min(be,B.value.length);else{var ve=B.ownerDocument||document,ce=ve&&ve.defaultView||window;if(ce.getSelection){var fe=ce.getSelection(),Ue=B.textContent.length,Ze=Math.min(J.start,Ue),Ut=J.end===void 0?Ze:Math.min(J.end,Ue);!fe.extend&&Ze>Ut&&(R=Ut,Ut=Ze,Ze=R);var ie=aN(B,Ze),ne=aN(B,Ut);if(ie&&ne&&(fe.rangeCount!==1||fe.anchorNode!==ie.node||fe.anchorOffset!==ie.offset||fe.focusNode!==ne.node||fe.focusOffset!==ne.offset)){var oe=ve.createRange();oe.setStart(ie.node,ie.offset),fe.removeAllRanges(),Ze>Ut?(fe.addRange(oe),fe.extend(ne.node,ne.offset)):(oe.setEnd(ne.node,ne.offset),fe.addRange(oe))}}}}for(ve=[],fe=B;fe=fe.parentNode;)fe.nodeType===1&&ve.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof B.focus=="function"&&B.focus(),B=0;B<ve.length;B++){var ye=ve[B];ye.element.scrollLeft=ye.left,ye.element.scrollTop=ye.top}}lm=!!ax,ix=ax=null}finally{Ot=y,F.p=g,G.T=h}}i.current=l,Rn=2}}function ES(){if(Rn===2){Rn=0;var i=zs,l=su,h=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||h){h=G.T,G.T=null;var g=F.p;F.p=2;var y=Ot;Ot|=4;try{WT(i,l.alternate,l)}finally{Ot=y,F.p=g,G.T=h}}Rn=3}}function _S(){if(Rn===4||Rn===3){Rn=0,ta();var i=zs,l=su,h=Ki,g=lS;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Rn=5:(Rn=0,su=zs=null,NS(i,i.pendingLanes));var y=i.pendingLanes;if(y===0&&(Us=null),ki(h),l=l.stateNode,dn&&typeof dn.onCommitFiberRoot=="function")try{dn.onCommitFiberRoot(Qn,l,void 0,(l.current.flags&128)===128)}catch{}if(g!==null){l=G.T,y=F.p,F.p=2,G.T=null;try{for(var N=i.onRecoverableError,R=0;R<g.length;R++){var B=g[R];N(B.value,{componentStack:B.stack})}}finally{G.T=l,F.p=y}}(Ki&3)!==0&&Xh(),ui(i),y=i.pendingLanes,(h&261930)!==0&&(y&42)!==0?i===qb?ed++:(ed=0,qb=i):ed=0,td(0)}}function NS(i,l){(i.pooledCacheLanes&=l)===0&&(l=i.pooledCache,l!=null&&(i.pooledCache=null,jc(l)))}function Xh(){return vS(),ES(),_S(),TS()}function TS(){if(Rn!==5)return!1;var i=zs,l=$b;$b=0;var h=ki(Ki),g=G.T,y=F.p;try{F.p=32>h?32:h,G.T=null,h=Yb,Yb=null;var N=zs,R=Ki;if(Rn=0,su=zs=null,Ki=0,(Ot&6)!==0)throw Error(r(331));var B=Ot;if(Ot|=4,iS(N.current),nS(N,N.current,R,h),Ot=B,td(0,!1),dn&&typeof dn.onPostCommitFiberRoot=="function")try{dn.onPostCommitFiberRoot(Qn,N)}catch{}return!0}finally{F.p=y,G.T=g,NS(i,l)}}function SS(i,l,h){l=Ea(h,l),l=Nb(i.stateNode,l,2),i=Ms(i,l,2),i!==null&&(Ht(i,2),ui(i))}function Lt(i,l,h){if(i.tag===3)SS(i,i,h);else for(;l!==null;){if(l.tag===3){SS(l,i,h);break}else if(l.tag===1){var g=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Us===null||!Us.has(g))){i=Ea(h,i),h=wT(2),g=Ms(l,h,2),g!==null&&(AT(h,g,l,i),Ht(g,2),ui(g));break}}l=l.return}}function Vb(i,l,h){var g=i.pingCache;if(g===null){g=i.pingCache=new x8;var y=new Set;g.set(l,y)}else y=g.get(l),y===void 0&&(y=new Set,g.set(l,y));y.has(h)||(zb=!0,y.add(h),i=N8.bind(null,i,l,h),l.then(i,i))}function N8(i,l,h){var g=i.pingCache;g!==null&&g.delete(l),i.pingedLanes|=i.suspendedLanes&h,i.warmLanes&=~h,$t===i&&(bt&h)===h&&(hn===4||hn===3&&(bt&62914560)===bt&&300>Vt()-Yh?(Ot&2)===0&&ou(i,0):Fb|=h,iu===bt&&(iu=0)),ui(i)}function wS(i,l){l===0&&(l=rt()),i=To(i,l),i!==null&&(Ht(i,l),ui(i))}function T8(i){var l=i.memoizedState,h=0;l!==null&&(h=l.retryLane),wS(i,h)}function S8(i,l){var h=0;switch(i.tag){case 31:case 13:var g=i.stateNode,y=i.memoizedState;y!==null&&(h=y.retryLane);break;case 19:g=i.stateNode;break;case 22:g=i.stateNode._retryCache;break;default:throw Error(r(314))}g!==null&&g.delete(l),wS(i,h)}function w8(i,l){return Fa(i,l)}var Qh=null,uu=null,Wb=!1,Zh=!1,Xb=!1,Hs=0;function ui(i){i!==uu&&i.next===null&&(uu===null?Qh=uu=i:uu=uu.next=i),Zh=!0,Wb||(Wb=!0,C8())}function td(i,l){if(!Xb&&Zh){Xb=!0;do for(var h=!1,g=Qh;g!==null;){if(i!==0){var y=g.pendingLanes;if(y===0)var N=0;else{var R=g.suspendedLanes,B=g.pingedLanes;N=(1<<31-Rt(42|i)+1)-1,N&=y&~(R&~B),N=N&201326741?N&201326741|1:N?N|2:0}N!==0&&(h=!0,OS(g,N))}else N=bt,N=te(g,g===$t?N:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(N&3)===0||xe(g,N)||(h=!0,OS(g,N));g=g.next}while(h);Xb=!1}}function A8(){AS()}function AS(){Zh=Wb=!1;var i=0;Hs!==0&&B8()&&(i=Hs);for(var l=Vt(),h=null,g=Qh;g!==null;){var y=g.next,N=CS(g,l);N===0?(g.next=null,h===null?Qh=y:h.next=y,y===null&&(uu=h)):(h=g,(i!==0||(N&3)!==0)&&(Zh=!0)),g=y}Rn!==0&&Rn!==5||td(i),Hs!==0&&(Hs=0)}function CS(i,l){for(var h=i.suspendedLanes,g=i.pingedLanes,y=i.expirationTimes,N=i.pendingLanes&-62914561;0<N;){var R=31-Rt(N),B=1<<R,J=y[R];J===-1?((B&h)===0||(B&g)!==0)&&(y[R]=Me(B,l)):J<=l&&(i.expiredLanes|=B),N&=~B}if(l=$t,h=bt,h=te(i,i===l?h:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),g=i.callbackNode,h===0||i===l&&(jt===2||jt===9)||i.cancelPendingCommit!==null)return g!==null&&g!==null&&Ne(g),i.callbackNode=null,i.callbackPriority=0;if((h&3)===0||xe(i,h)){if(l=h&-h,l===i.callbackPriority)return l;switch(g!==null&&Ne(g),ki(h)){case 2:case 8:h=ke;break;case 32:h=Qe;break;case 268435456:h=St;break;default:h=Qe}return g=kS.bind(null,i),h=Fa(h,g),i.callbackPriority=l,i.callbackNode=h,l}return g!==null&&g!==null&&Ne(g),i.callbackPriority=2,i.callbackNode=null,2}function kS(i,l){if(Rn!==0&&Rn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var h=i.callbackNode;if(Xh()&&i.callbackNode!==h)return null;var g=bt;return g=te(i,i===$t?g:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),g===0?null:(cS(i,g,l),CS(i,Vt()),i.callbackNode!=null&&i.callbackNode===h?kS.bind(null,i):null)}function OS(i,l){if(Xh())return null;cS(i,l,!0)}function C8(){z8(function(){(Ot&6)!==0?Fa(ge,A8):AS()})}function Qb(){if(Hs===0){var i=Vl;i===0&&(i=go,go<<=1,(go&261888)===0&&(go=256)),Hs=i}return Hs}function IS(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Ss(""+i)}function RS(i,l){var h=l.ownerDocument.createElement("input");return h.name=l.name,h.value=l.value,i.id&&h.setAttribute("form",i.id),l.parentNode.insertBefore(h,l),i=new FormData(i),h.parentNode.removeChild(h),i}function k8(i,l,h,g,y){if(l==="submit"&&h&&h.stateNode===y){var N=IS((y[dr]||null).action),R=g.submitter;R&&(l=(l=R[dr]||null)?IS(l.formAction):R.getAttribute("formAction"),l!==null&&(N=l,R=null));var B=new ch("action","action",null,g,y);i.push({event:B,listeners:[{instance:null,listener:function(){if(g.defaultPrevented){if(Hs!==0){var J=R?RS(y,R):new FormData(y);bb(h,{pending:!0,data:J,method:y.method,action:N},null,J)}}else typeof N=="function"&&(B.preventDefault(),J=R?RS(y,R):new FormData(y),bb(h,{pending:!0,data:J,method:y.method,action:N},N,J))},currentTarget:y}]})}}for(var Zb=0;Zb<Dg.length;Zb++){var Jb=Dg[Zb],O8=Jb.toLowerCase(),I8=Jb[0].toUpperCase()+Jb.slice(1);$a(O8,"on"+I8)}$a(uN,"onAnimationEnd"),$a(cN,"onAnimationIteration"),$a(dN,"onAnimationStart"),$a("dblclick","onDoubleClick"),$a("focusin","onFocus"),$a("focusout","onBlur"),$a(KP,"onTransitionRun"),$a(VP,"onTransitionStart"),$a(WP,"onTransitionCancel"),$a(fN,"onTransitionEnd"),we("onMouseEnter",["mouseout","mouseover"]),we("onMouseLeave",["mouseout","mouseover"]),we("onPointerEnter",["pointerout","pointerover"]),we("onPointerLeave",["pointerout","pointerover"]),Ii("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ii("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ii("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ii("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ii("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ii("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var nd="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(" "),R8=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(nd));function MS(i,l){l=(l&4)!==0;for(var h=0;h<i.length;h++){var g=i[h],y=g.event;g=g.listeners;e:{var N=void 0;if(l)for(var R=g.length-1;0<=R;R--){var B=g[R],J=B.instance,le=B.currentTarget;if(B=B.listener,J!==N&&y.isPropagationStopped())break e;N=B,y.currentTarget=le;try{N(y)}catch(be){hh(be)}y.currentTarget=null,N=J}else for(R=0;R<g.length;R++){if(B=g[R],J=B.instance,le=B.currentTarget,B=B.listener,J!==N&&y.isPropagationStopped())break e;N=B,y.currentTarget=le;try{N(y)}catch(be){hh(be)}y.currentTarget=null,N=J}}}}function mt(i,l){var h=l[xc];h===void 0&&(h=l[xc]=new Set);var g=i+"__bubble";h.has(g)||(DS(l,i,2,!1),h.add(g))}function ex(i,l,h){var g=0;l&&(g|=4),DS(h,i,g,l)}var Jh="_reactListening"+Math.random().toString(36).slice(2);function tx(i){if(!i[Jh]){i[Jh]=!0,nh.forEach(function(h){h!=="selectionchange"&&(R8.has(h)||ex(h,!1,i),ex(h,!0,i))});var l=i.nodeType===9?i:i.ownerDocument;l===null||l[Jh]||(l[Jh]=!0,ex("selectionchange",!1,l))}}function DS(i,l,h,g){switch(uw(l)){case 2:var y=sB;break;case 8:y=oB;break;default:y=gx}h=y.bind(null,l,h,i),y=void 0,!Eg||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(y=!0),g?y!==void 0?i.addEventListener(l,h,{capture:!0,passive:y}):i.addEventListener(l,h,!0):y!==void 0?i.addEventListener(l,h,{passive:y}):i.addEventListener(l,h,!1)}function nx(i,l,h,g,y){var N=g;if((l&1)===0&&(l&2)===0&&g!==null)e:for(;;){if(g===null)return;var R=g.tag;if(R===3||R===4){var B=g.stateNode.containerInfo;if(B===y)break;if(R===4)for(R=g.return;R!==null;){var J=R.tag;if((J===3||J===4)&&R.stateNode.containerInfo===y)return;R=R.return}for(;B!==null;){if(R=Ar(B),R===null)return;if(J=R.tag,J===5||J===6||J===26||J===27){g=N=R;continue e}B=B.parentNode}}g=g.return}sh(function(){var le=N,be=ot(h),ve=[];e:{var ce=hN.get(i);if(ce!==void 0){var fe=ch,Ue=i;switch(i){case"keypress":if(lh(h)===0)break e;case"keydown":case"keyup":fe=SP;break;case"focusin":Ue="focus",fe=Sg;break;case"focusout":Ue="blur",fe=Sg;break;case"beforeblur":case"afterblur":fe=Sg;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=H_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=hP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=CP;break;case uN:case cN:case dN:fe=gP;break;case fN:fe=OP;break;case"scroll":case"scrollend":fe=dP;break;case"wheel":fe=RP;break;case"copy":case"cut":case"paste":fe=xP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=Y_;break;case"toggle":case"beforetoggle":fe=DP}var Ze=(l&4)!==0,Ut=!Ze&&(i==="scroll"||i==="scrollend"),ie=Ze?ce!==null?ce+"Capture":null:ce;Ze=[];for(var ne=le,oe;ne!==null;){var ye=ne;if(oe=ye.stateNode,ye=ye.tag,ye!==5&&ye!==26&&ye!==27||oe===null||ie===null||(ye=Tc(ne,ie),ye!=null&&Ze.push(rd(ne,ye,oe))),Ut)break;ne=ne.return}0<Ze.length&&(ce=new fe(ce,Ue,null,h,be),ve.push({event:ce,listeners:Ze}))}}if((l&7)===0){e:{if(ce=i==="mouseover"||i==="pointerover",fe=i==="mouseout"||i==="pointerout",ce&&h!==$e&&(Ue=h.relatedTarget||h.fromElement)&&(Ar(Ue)||Ue[Es]))break e;if((fe||ce)&&(ce=be.window===be?be:(ce=be.ownerDocument)?ce.defaultView||ce.parentWindow:window,fe?(Ue=h.relatedTarget||h.toElement,fe=le,Ue=Ue?Ar(Ue):null,Ue!==null&&(Ut=s(Ue),Ze=Ue.tag,Ue!==Ut||Ze!==5&&Ze!==27&&Ze!==6)&&(Ue=null)):(fe=null,Ue=le),fe!==Ue)){if(Ze=H_,ye="onMouseLeave",ie="onMouseEnter",ne="mouse",(i==="pointerout"||i==="pointerover")&&(Ze=Y_,ye="onPointerLeave",ie="onPointerEnter",ne="pointer"),Ut=fe==null?ce:_s(fe),oe=Ue==null?ce:_s(Ue),ce=new Ze(ye,ne+"leave",fe,h,be),ce.target=Ut,ce.relatedTarget=oe,ye=null,Ar(be)===le&&(Ze=new Ze(ie,ne+"enter",Ue,h,be),Ze.target=oe,Ze.relatedTarget=Ut,ye=Ze),Ut=ye,fe&&Ue)t:{for(Ze=M8,ie=fe,ne=Ue,oe=0,ye=ie;ye;ye=Ze(ye))oe++;ye=0;for(var Ve=ne;Ve;Ve=Ze(Ve))ye++;for(;0<oe-ye;)ie=Ze(ie),oe--;for(;0<ye-oe;)ne=Ze(ne),ye--;for(;oe--;){if(ie===ne||ne!==null&&ie===ne.alternate){Ze=ie;break t}ie=Ze(ie),ne=Ze(ne)}Ze=null}else Ze=null;fe!==null&&jS(ve,ce,fe,Ze,!1),Ue!==null&&Ut!==null&&jS(ve,Ut,Ue,Ze,!0)}}e:{if(ce=le?_s(le):window,fe=ce.nodeName&&ce.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ce.type==="file")var wt=Z_;else if(X_(ce))if(J_)wt=YP;else{wt=HP;var Ye=FP}else fe=ce.nodeName,!fe||fe.toLowerCase()!=="input"||ce.type!=="checkbox"&&ce.type!=="radio"?le&&Ts(le.elementType)&&(wt=Z_):wt=$P;if(wt&&(wt=wt(i,le))){Q_(ve,wt,h,be);break e}Ye&&Ye(i,ce,le),i==="focusout"&&le&&ce.type==="number"&&le.memoizedProps.value!=null&&Pl(ce,"number",ce.value)}switch(Ye=le?_s(le):window,i){case"focusin":(X_(Ye)||Ye.contentEditable==="true")&&(zl=Ye,Ig=le,Rc=null);break;case"focusout":Rc=Ig=zl=null;break;case"mousedown":Rg=!0;break;case"contextmenu":case"mouseup":case"dragend":Rg=!1,oN(ve,h,be);break;case"selectionchange":if(GP)break;case"keydown":case"keyup":oN(ve,h,be)}var ut;if(Ag)e:{switch(i){case"compositionstart":var xt="onCompositionStart";break e;case"compositionend":xt="onCompositionEnd";break e;case"compositionupdate":xt="onCompositionUpdate";break e}xt=void 0}else Ul?V_(i,h)&&(xt="onCompositionEnd"):i==="keydown"&&h.keyCode===229&&(xt="onCompositionStart");xt&&(q_&&h.locale!=="ko"&&(Ul||xt!=="onCompositionStart"?xt==="onCompositionEnd"&&Ul&&(ut=z_()):(ws=be,_g="value"in ws?ws.value:ws.textContent,Ul=!0)),Ye=em(le,xt),0<Ye.length&&(xt=new $_(xt,i,null,h,be),ve.push({event:xt,listeners:Ye}),ut?xt.data=ut:(ut=W_(h),ut!==null&&(xt.data=ut)))),(ut=LP?PP(i,h):BP(i,h))&&(xt=em(le,"onBeforeInput"),0<xt.length&&(Ye=new $_("onBeforeInput","beforeinput",null,h,be),ve.push({event:Ye,listeners:xt}),Ye.data=ut)),k8(ve,i,le,h,be)}MS(ve,l)})}function rd(i,l,h){return{instance:i,listener:l,currentTarget:h}}function em(i,l){for(var h=l+"Capture",g=[];i!==null;){var y=i,N=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||N===null||(y=Tc(i,h),y!=null&&g.unshift(rd(i,y,N)),y=Tc(i,l),y!=null&&g.push(rd(i,y,N))),i.tag===3)return g;i=i.return}return[]}function M8(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function jS(i,l,h,g,y){for(var N=l._reactName,R=[];h!==null&&h!==g;){var B=h,J=B.alternate,le=B.stateNode;if(B=B.tag,J!==null&&J===g)break;B!==5&&B!==26&&B!==27||le===null||(J=le,y?(le=Tc(h,N),le!=null&&R.unshift(rd(h,le,J))):y||(le=Tc(h,N),le!=null&&R.push(rd(h,le,J)))),h=h.return}R.length!==0&&i.push({event:l,listeners:R})}var D8=/\r\n?/g,j8=/\u0000|\uFFFD/g;function LS(i){return(typeof i=="string"?i:""+i).replace(D8,`
|
|
49
|
+
`).replace(j8,"")}function PS(i,l){return l=LS(l),LS(i)===l}function Bt(i,l,h,g,y,N){switch(h){case"children":typeof g=="string"?l==="body"||l==="textarea"&&g===""||Je(i,g):(typeof g=="number"||typeof g=="bigint")&&l!=="body"&&Je(i,""+g);break;case"className":na(i,"class",g);break;case"tabIndex":na(i,"tabindex",g);break;case"dir":case"role":case"viewBox":case"width":case"height":na(i,h,g);break;case"style":Dt(i,g,N);break;case"data":if(l!=="object"){na(i,"data",g);break}case"src":case"href":if(g===""&&(l!=="a"||h!=="href")){i.removeAttribute(h);break}if(g==null||typeof g=="function"||typeof g=="symbol"||typeof g=="boolean"){i.removeAttribute(h);break}g=Ss(""+g),i.setAttribute(h,g);break;case"action":case"formAction":if(typeof g=="function"){i.setAttribute(h,"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 N=="function"&&(h==="formAction"?(l!=="input"&&Bt(i,l,"name",y.name,y,null),Bt(i,l,"formEncType",y.formEncType,y,null),Bt(i,l,"formMethod",y.formMethod,y,null),Bt(i,l,"formTarget",y.formTarget,y,null)):(Bt(i,l,"encType",y.encType,y,null),Bt(i,l,"method",y.method,y,null),Bt(i,l,"target",y.target,y,null)));if(g==null||typeof g=="symbol"||typeof g=="boolean"){i.removeAttribute(h);break}g=Ss(""+g),i.setAttribute(h,g);break;case"onClick":g!=null&&(i.onclick=Ie);break;case"onScroll":g!=null&&mt("scroll",i);break;case"onScrollEnd":g!=null&&mt("scrollend",i);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(h=g.__html,h!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=h}}break;case"multiple":i.multiple=g&&typeof g!="function"&&typeof g!="symbol";break;case"muted":i.muted=g&&typeof g!="function"&&typeof g!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(g==null||typeof g=="function"||typeof g=="boolean"||typeof g=="symbol"){i.removeAttribute("xlink:href");break}h=Ss(""+g),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",h);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":g!=null&&typeof g!="function"&&typeof g!="symbol"?i.setAttribute(h,""+g):i.removeAttribute(h);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":g&&typeof g!="function"&&typeof g!="symbol"?i.setAttribute(h,""):i.removeAttribute(h);break;case"capture":case"download":g===!0?i.setAttribute(h,""):g!==!1&&g!=null&&typeof g!="function"&&typeof g!="symbol"?i.setAttribute(h,g):i.removeAttribute(h);break;case"cols":case"rows":case"size":case"span":g!=null&&typeof g!="function"&&typeof g!="symbol"&&!isNaN(g)&&1<=g?i.setAttribute(h,g):i.removeAttribute(h);break;case"rowSpan":case"start":g==null||typeof g=="function"||typeof g=="symbol"||isNaN(g)?i.removeAttribute(h):i.setAttribute(h,g);break;case"popover":mt("beforetoggle",i),mt("toggle",i),fr(i,"popover",g);break;case"xlinkActuate":Pr(i,"http://www.w3.org/1999/xlink","xlink:actuate",g);break;case"xlinkArcrole":Pr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",g);break;case"xlinkRole":Pr(i,"http://www.w3.org/1999/xlink","xlink:role",g);break;case"xlinkShow":Pr(i,"http://www.w3.org/1999/xlink","xlink:show",g);break;case"xlinkTitle":Pr(i,"http://www.w3.org/1999/xlink","xlink:title",g);break;case"xlinkType":Pr(i,"http://www.w3.org/1999/xlink","xlink:type",g);break;case"xmlBase":Pr(i,"http://www.w3.org/XML/1998/namespace","xml:base",g);break;case"xmlLang":Pr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",g);break;case"xmlSpace":Pr(i,"http://www.w3.org/XML/1998/namespace","xml:space",g);break;case"is":fr(i,"is",g);break;case"innerText":case"textContent":break;default:(!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(h=Ri.get(h)||h,fr(i,h,g))}}function rx(i,l,h,g,y,N){switch(h){case"style":Dt(i,g,N);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(h=g.__html,h!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=h}}break;case"children":typeof g=="string"?Je(i,g):(typeof g=="number"||typeof g=="bigint")&&Je(i,""+g);break;case"onScroll":g!=null&&mt("scroll",i);break;case"onScrollEnd":g!=null&&mt("scrollend",i);break;case"onClick":g!=null&&(i.onclick=Ie);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!yo.hasOwnProperty(h))e:{if(h[0]==="o"&&h[1]==="n"&&(y=h.endsWith("Capture"),l=h.slice(2,y?h.length-7:void 0),N=i[dr]||null,N=N!=null?N[h]:null,typeof N=="function"&&i.removeEventListener(l,N,y),typeof g=="function")){typeof N!="function"&&N!==null&&(h in i?i[h]=null:i.hasAttribute(h)&&i.removeAttribute(h)),i.addEventListener(l,g,y);break e}h in i?i[h]=g:g===!0?i.setAttribute(h,""):fr(i,h,g)}}}function nr(i,l,h){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":mt("error",i),mt("load",i);var g=!1,y=!1,N;for(N in h)if(h.hasOwnProperty(N)){var R=h[N];if(R!=null)switch(N){case"src":g=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Bt(i,l,N,R,h,null)}}y&&Bt(i,l,"srcSet",h.srcSet,h,null),g&&Bt(i,l,"src",h.src,h,null);return;case"input":mt("invalid",i);var B=N=R=y=null,J=null,le=null;for(g in h)if(h.hasOwnProperty(g)){var be=h[g];if(be!=null)switch(g){case"name":y=be;break;case"type":R=be;break;case"checked":J=be;break;case"defaultChecked":le=be;break;case"value":N=be;break;case"defaultValue":B=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(r(137,l));break;default:Bt(i,l,g,be,h,null)}}vo(i,N,B,J,le,R,y,!1);return;case"select":mt("invalid",i),g=R=N=null;for(y in h)if(h.hasOwnProperty(y)&&(B=h[y],B!=null))switch(y){case"value":N=B;break;case"defaultValue":R=B;break;case"multiple":g=B;default:Bt(i,l,y,B,h,null)}l=N,h=R,i.multiple=!!g,l!=null?Zn(i,!!g,l,!1):h!=null&&Zn(i,!!g,h,!0);return;case"textarea":mt("invalid",i),N=y=g=null;for(R in h)if(h.hasOwnProperty(R)&&(B=h[R],B!=null))switch(R){case"value":g=B;break;case"defaultValue":y=B;break;case"children":N=B;break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(91));break;default:Bt(i,l,R,B,h,null)}Bl(i,g,y,N);return;case"option":for(J in h)if(h.hasOwnProperty(J)&&(g=h[J],g!=null))switch(J){case"selected":i.selected=g&&typeof g!="function"&&typeof g!="symbol";break;default:Bt(i,l,J,g,h,null)}return;case"dialog":mt("beforetoggle",i),mt("toggle",i),mt("cancel",i),mt("close",i);break;case"iframe":case"object":mt("load",i);break;case"video":case"audio":for(g=0;g<nd.length;g++)mt(nd[g],i);break;case"image":mt("error",i),mt("load",i);break;case"details":mt("toggle",i);break;case"embed":case"source":case"link":mt("error",i),mt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(le in h)if(h.hasOwnProperty(le)&&(g=h[le],g!=null))switch(le){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Bt(i,l,le,g,h,null)}return;default:if(Ts(l)){for(be in h)h.hasOwnProperty(be)&&(g=h[be],g!==void 0&&rx(i,l,be,g,h,void 0));return}}for(B in h)h.hasOwnProperty(B)&&(g=h[B],g!=null&&Bt(i,l,B,g,h,null))}function L8(i,l,h,g){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,N=null,R=null,B=null,J=null,le=null,be=null;for(fe in h){var ve=h[fe];if(h.hasOwnProperty(fe)&&ve!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":J=ve;default:g.hasOwnProperty(fe)||Bt(i,l,fe,null,g,ve)}}for(var ce in g){var fe=g[ce];if(ve=h[ce],g.hasOwnProperty(ce)&&(fe!=null||ve!=null))switch(ce){case"type":N=fe;break;case"name":y=fe;break;case"checked":le=fe;break;case"defaultChecked":be=fe;break;case"value":R=fe;break;case"defaultValue":B=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(r(137,l));break;default:fe!==ve&&Bt(i,l,ce,fe,g,ve)}}Ec(i,R,B,J,le,be,N,y);return;case"select":fe=R=B=ce=null;for(N in h)if(J=h[N],h.hasOwnProperty(N)&&J!=null)switch(N){case"value":break;case"multiple":fe=J;default:g.hasOwnProperty(N)||Bt(i,l,N,null,g,J)}for(y in g)if(N=g[y],J=h[y],g.hasOwnProperty(y)&&(N!=null||J!=null))switch(y){case"value":ce=N;break;case"defaultValue":B=N;break;case"multiple":R=N;default:N!==J&&Bt(i,l,y,N,g,J)}l=B,h=R,g=fe,ce!=null?Zn(i,!!h,ce,!1):!!g!=!!h&&(l!=null?Zn(i,!!h,l,!0):Zn(i,!!h,h?[]:"",!1));return;case"textarea":fe=ce=null;for(B in h)if(y=h[B],h.hasOwnProperty(B)&&y!=null&&!g.hasOwnProperty(B))switch(B){case"value":break;case"children":break;default:Bt(i,l,B,null,g,y)}for(R in g)if(y=g[R],N=h[R],g.hasOwnProperty(R)&&(y!=null||N!=null))switch(R){case"value":ce=y;break;case"defaultValue":fe=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==N&&Bt(i,l,R,y,g,N)}ah(i,ce,fe);return;case"option":for(var Ue in h)if(ce=h[Ue],h.hasOwnProperty(Ue)&&ce!=null&&!g.hasOwnProperty(Ue))switch(Ue){case"selected":i.selected=!1;break;default:Bt(i,l,Ue,null,g,ce)}for(J in g)if(ce=g[J],fe=h[J],g.hasOwnProperty(J)&&ce!==fe&&(ce!=null||fe!=null))switch(J){case"selected":i.selected=ce&&typeof ce!="function"&&typeof ce!="symbol";break;default:Bt(i,l,J,ce,g,fe)}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 Ze in h)ce=h[Ze],h.hasOwnProperty(Ze)&&ce!=null&&!g.hasOwnProperty(Ze)&&Bt(i,l,Ze,null,g,ce);for(le in g)if(ce=g[le],fe=h[le],g.hasOwnProperty(le)&&ce!==fe&&(ce!=null||fe!=null))switch(le){case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(r(137,l));break;default:Bt(i,l,le,ce,g,fe)}return;default:if(Ts(l)){for(var Ut in h)ce=h[Ut],h.hasOwnProperty(Ut)&&ce!==void 0&&!g.hasOwnProperty(Ut)&&rx(i,l,Ut,void 0,g,ce);for(be in g)ce=g[be],fe=h[be],!g.hasOwnProperty(be)||ce===fe||ce===void 0&&fe===void 0||rx(i,l,be,ce,g,fe);return}}for(var ie in h)ce=h[ie],h.hasOwnProperty(ie)&&ce!=null&&!g.hasOwnProperty(ie)&&Bt(i,l,ie,null,g,ce);for(ve in g)ce=g[ve],fe=h[ve],!g.hasOwnProperty(ve)||ce===fe||ce==null&&fe==null||Bt(i,l,ve,ce,g,fe)}function BS(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function P8(){if(typeof performance.getEntriesByType=="function"){for(var i=0,l=0,h=performance.getEntriesByType("resource"),g=0;g<h.length;g++){var y=h[g],N=y.transferSize,R=y.initiatorType,B=y.duration;if(N&&B&&BS(R)){for(R=0,B=y.responseEnd,g+=1;g<h.length;g++){var J=h[g],le=J.startTime;if(le>B)break;var be=J.transferSize,ve=J.initiatorType;be&&BS(ve)&&(J=J.responseEnd,R+=be*(J<B?1:(B-le)/(J-le)))}if(--g,l+=8*(N+R)/(y.duration/1e3),i++,10<i)break}}if(0<i)return l/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var ax=null,ix=null;function tm(i){return i.nodeType===9?i:i.ownerDocument}function US(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function zS(i,l){if(i===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&l==="foreignObject"?0:i}function sx(i,l){return i==="textarea"||i==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var ox=null;function B8(){var i=window.event;return i&&i.type==="popstate"?i===ox?!1:(ox=i,!0):(ox=null,!1)}var FS=typeof setTimeout=="function"?setTimeout:void 0,U8=typeof clearTimeout=="function"?clearTimeout:void 0,HS=typeof Promise=="function"?Promise:void 0,z8=typeof queueMicrotask=="function"?queueMicrotask:typeof HS<"u"?function(i){return HS.resolve(null).then(i).catch(F8)}:FS;function F8(i){setTimeout(function(){throw i})}function $s(i){return i==="head"}function $S(i,l){var h=l,g=0;do{var y=h.nextSibling;if(i.removeChild(h),y&&y.nodeType===8)if(h=y.data,h==="/$"||h==="/&"){if(g===0){i.removeChild(y),hu(l);return}g--}else if(h==="$"||h==="$?"||h==="$~"||h==="$!"||h==="&")g++;else if(h==="html")ad(i.ownerDocument.documentElement);else if(h==="head"){h=i.ownerDocument.head,ad(h);for(var N=h.firstChild;N;){var R=N.nextSibling,B=N.nodeName;N[xo]||B==="SCRIPT"||B==="STYLE"||B==="LINK"&&N.rel.toLowerCase()==="stylesheet"||h.removeChild(N),N=R}}else h==="body"&&ad(i.ownerDocument.body);h=y}while(h);hu(l)}function YS(i,l){var h=i;i=0;do{var g=h.nextSibling;if(h.nodeType===1?l?(h._stashedDisplay=h.style.display,h.style.display="none"):(h.style.display=h._stashedDisplay||"",h.getAttribute("style")===""&&h.removeAttribute("style")):h.nodeType===3&&(l?(h._stashedText=h.nodeValue,h.nodeValue=""):h.nodeValue=h._stashedText||""),g&&g.nodeType===8)if(h=g.data,h==="/$"){if(i===0)break;i--}else h!=="$"&&h!=="$?"&&h!=="$~"&&h!=="$!"||i++;h=g}while(h)}function lx(i){var l=i.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var h=l;switch(l=l.nextSibling,h.nodeName){case"HTML":case"HEAD":case"BODY":lx(h),yc(h);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(h.rel.toLowerCase()==="stylesheet")continue}i.removeChild(h)}}function H8(i,l,h,g){for(;i.nodeType===1;){var y=h;if(i.nodeName.toLowerCase()!==l.toLowerCase()){if(!g&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(g){if(!i[xo])switch(l){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(N=i.getAttribute("rel"),N==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(N!==y.rel||i.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||i.getAttribute("title")!==(y.title==null?null:y.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(N=i.getAttribute("src"),(N!==(y.src==null?null:y.src)||i.getAttribute("type")!==(y.type==null?null:y.type)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&N&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(l==="input"&&i.type==="hidden"){var N=y.name==null?null:""+y.name;if(y.type==="hidden"&&i.getAttribute("name")===N)return i}else return i;if(i=wa(i.nextSibling),i===null)break}return null}function $8(i,l,h){if(l==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!h||(i=wa(i.nextSibling),i===null))return null;return i}function qS(i,l){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=wa(i.nextSibling),i===null))return null;return i}function ux(i){return i.data==="$?"||i.data==="$~"}function cx(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function Y8(i,l){var h=i.ownerDocument;if(i.data==="$~")i._reactRetry=l;else if(i.data!=="$?"||h.readyState!=="loading")l();else{var g=function(){l(),h.removeEventListener("DOMContentLoaded",g)};h.addEventListener("DOMContentLoaded",g),i._reactRetry=g}}function wa(i){for(;i!=null;i=i.nextSibling){var l=i.nodeType;if(l===1||l===3)break;if(l===8){if(l=i.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return i}var dx=null;function GS(i){i=i.nextSibling;for(var l=0;i;){if(i.nodeType===8){var h=i.data;if(h==="/$"||h==="/&"){if(l===0)return wa(i.nextSibling);l--}else h!=="$"&&h!=="$!"&&h!=="$?"&&h!=="$~"&&h!=="&"||l++}i=i.nextSibling}return null}function KS(i){i=i.previousSibling;for(var l=0;i;){if(i.nodeType===8){var h=i.data;if(h==="$"||h==="$!"||h==="$?"||h==="$~"||h==="&"){if(l===0)return i;l--}else h!=="/$"&&h!=="/&"||l++}i=i.previousSibling}return null}function VS(i,l,h){switch(l=tm(h),i){case"html":if(i=l.documentElement,!i)throw Error(r(452));return i;case"head":if(i=l.head,!i)throw Error(r(453));return i;case"body":if(i=l.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function ad(i){for(var l=i.attributes;l.length;)i.removeAttributeNode(l[0]);yc(i)}var Aa=new Map,WS=new Set;function nm(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Vi=F.d;F.d={f:q8,r:G8,D:K8,C:V8,L:W8,m:X8,X:Z8,S:Q8,M:J8};function q8(){var i=Vi.f(),l=Kh();return i||l}function G8(i){var l=Oi(i);l!==null&&l.tag===5&&l.type==="form"?fT(l):Vi.r(i)}var cu=typeof document>"u"?null:document;function XS(i,l,h){var g=cu;if(g&&typeof l=="string"&&l){var y=Br(l);y='link[rel="'+i+'"][href="'+y+'"]',typeof h=="string"&&(y+='[crossorigin="'+h+'"]'),WS.has(y)||(WS.add(y),i={rel:i,crossOrigin:h,href:l},g.querySelector(y)===null&&(l=g.createElement("link"),nr(l,"link",i),Tn(l),g.head.appendChild(l)))}}function K8(i){Vi.D(i),XS("dns-prefetch",i,null)}function V8(i,l){Vi.C(i,l),XS("preconnect",i,l)}function W8(i,l,h){Vi.L(i,l,h);var g=cu;if(g&&i&&l){var y='link[rel="preload"][as="'+Br(l)+'"]';l==="image"&&h&&h.imageSrcSet?(y+='[imagesrcset="'+Br(h.imageSrcSet)+'"]',typeof h.imageSizes=="string"&&(y+='[imagesizes="'+Br(h.imageSizes)+'"]')):y+='[href="'+Br(i)+'"]';var N=y;switch(l){case"style":N=du(i);break;case"script":N=fu(i)}Aa.has(N)||(i=p({rel:"preload",href:l==="image"&&h&&h.imageSrcSet?void 0:i,as:l},h),Aa.set(N,i),g.querySelector(y)!==null||l==="style"&&g.querySelector(id(N))||l==="script"&&g.querySelector(sd(N))||(l=g.createElement("link"),nr(l,"link",i),Tn(l),g.head.appendChild(l)))}}function X8(i,l){Vi.m(i,l);var h=cu;if(h&&i){var g=l&&typeof l.as=="string"?l.as:"script",y='link[rel="modulepreload"][as="'+Br(g)+'"][href="'+Br(i)+'"]',N=y;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":N=fu(i)}if(!Aa.has(N)&&(i=p({rel:"modulepreload",href:i},l),Aa.set(N,i),h.querySelector(y)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(h.querySelector(sd(N)))return}g=h.createElement("link"),nr(g,"link",i),Tn(g),h.head.appendChild(g)}}}function Q8(i,l,h){Vi.S(i,l,h);var g=cu;if(g&&i){var y=Ns(g).hoistableStyles,N=du(i);l=l||"default";var R=y.get(N);if(!R){var B={loading:0,preload:null};if(R=g.querySelector(id(N)))B.loading=5;else{i=p({rel:"stylesheet",href:i,"data-precedence":l},h),(h=Aa.get(N))&&fx(i,h);var J=R=g.createElement("link");Tn(J),nr(J,"link",i),J._p=new Promise(function(le,be){J.onload=le,J.onerror=be}),J.addEventListener("load",function(){B.loading|=1}),J.addEventListener("error",function(){B.loading|=2}),B.loading|=4,rm(R,l,g)}R={type:"stylesheet",instance:R,count:1,state:B},y.set(N,R)}}}function Z8(i,l){Vi.X(i,l);var h=cu;if(h&&i){var g=Ns(h).hoistableScripts,y=fu(i),N=g.get(y);N||(N=h.querySelector(sd(y)),N||(i=p({src:i,async:!0},l),(l=Aa.get(y))&&hx(i,l),N=h.createElement("script"),Tn(N),nr(N,"link",i),h.head.appendChild(N)),N={type:"script",instance:N,count:1,state:null},g.set(y,N))}}function J8(i,l){Vi.M(i,l);var h=cu;if(h&&i){var g=Ns(h).hoistableScripts,y=fu(i),N=g.get(y);N||(N=h.querySelector(sd(y)),N||(i=p({src:i,async:!0,type:"module"},l),(l=Aa.get(y))&&hx(i,l),N=h.createElement("script"),Tn(N),nr(N,"link",i),h.head.appendChild(N)),N={type:"script",instance:N,count:1,state:null},g.set(y,N))}}function QS(i,l,h,g){var y=(y=U.current)?nm(y):null;if(!y)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof h.precedence=="string"&&typeof h.href=="string"?(l=du(h.href),h=Ns(y).hoistableStyles,g=h.get(l),g||(g={type:"style",instance:null,count:0,state:null},h.set(l,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(h.rel==="stylesheet"&&typeof h.href=="string"&&typeof h.precedence=="string"){i=du(h.href);var N=Ns(y).hoistableStyles,R=N.get(i);if(R||(y=y.ownerDocument||y,R={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},N.set(i,R),(N=y.querySelector(id(i)))&&!N._p&&(R.instance=N,R.state.loading=5),Aa.has(i)||(h={rel:"preload",as:"style",href:h.href,crossOrigin:h.crossOrigin,integrity:h.integrity,media:h.media,hrefLang:h.hrefLang,referrerPolicy:h.referrerPolicy},Aa.set(i,h),N||eB(y,i,h,R.state))),l&&g===null)throw Error(r(528,""));return R}if(l&&g!==null)throw Error(r(529,""));return null;case"script":return l=h.async,h=h.src,typeof h=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=fu(h),h=Ns(y).hoistableScripts,g=h.get(l),g||(g={type:"script",instance:null,count:0,state:null},h.set(l,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function du(i){return'href="'+Br(i)+'"'}function id(i){return'link[rel="stylesheet"]['+i+"]"}function ZS(i){return p({},i,{"data-precedence":i.precedence,precedence:null})}function eB(i,l,h,g){i.querySelector('link[rel="preload"][as="style"]['+l+"]")?g.loading=1:(l=i.createElement("link"),g.preload=l,l.addEventListener("load",function(){return g.loading|=1}),l.addEventListener("error",function(){return g.loading|=2}),nr(l,"link",h),Tn(l),i.head.appendChild(l))}function fu(i){return'[src="'+Br(i)+'"]'}function sd(i){return"script[async]"+i}function JS(i,l,h){if(l.count++,l.instance===null)switch(l.type){case"style":var g=i.querySelector('style[data-href~="'+Br(h.href)+'"]');if(g)return l.instance=g,Tn(g),g;var y=p({},h,{"data-href":h.href,"data-precedence":h.precedence,href:null,precedence:null});return g=(i.ownerDocument||i).createElement("style"),Tn(g),nr(g,"style",y),rm(g,h.precedence,i),l.instance=g;case"stylesheet":y=du(h.href);var N=i.querySelector(id(y));if(N)return l.state.loading|=4,l.instance=N,Tn(N),N;g=ZS(h),(y=Aa.get(y))&&fx(g,y),N=(i.ownerDocument||i).createElement("link"),Tn(N);var R=N;return R._p=new Promise(function(B,J){R.onload=B,R.onerror=J}),nr(N,"link",g),l.state.loading|=4,rm(N,h.precedence,i),l.instance=N;case"script":return N=fu(h.src),(y=i.querySelector(sd(N)))?(l.instance=y,Tn(y),y):(g=h,(y=Aa.get(N))&&(g=p({},h),hx(g,y)),i=i.ownerDocument||i,y=i.createElement("script"),Tn(y),nr(y,"link",g),i.head.appendChild(y),l.instance=y);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(g=l.instance,l.state.loading|=4,rm(g,h.precedence,i));return l.instance}function rm(i,l,h){for(var g=h.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=g.length?g[g.length-1]:null,N=y,R=0;R<g.length;R++){var B=g[R];if(B.dataset.precedence===l)N=B;else if(N!==y)break}N?N.parentNode.insertBefore(i,N.nextSibling):(l=h.nodeType===9?h.head:h,l.insertBefore(i,l.firstChild))}function fx(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.title==null&&(i.title=l.title)}function hx(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.integrity==null&&(i.integrity=l.integrity)}var am=null;function ew(i,l,h){if(am===null){var g=new Map,y=am=new Map;y.set(h,g)}else y=am,g=y.get(h),g||(g=new Map,y.set(h,g));if(g.has(i))return g;for(g.set(i,null),h=h.getElementsByTagName(i),y=0;y<h.length;y++){var N=h[y];if(!(N[xo]||N[xn]||i==="link"&&N.getAttribute("rel")==="stylesheet")&&N.namespaceURI!=="http://www.w3.org/2000/svg"){var R=N.getAttribute(l)||"";R=i+R;var B=g.get(R);B?B.push(N):g.set(R,[N])}}return g}function tw(i,l,h){i=i.ownerDocument||i,i.head.insertBefore(h,l==="title"?i.querySelector("head > title"):null)}function tB(i,l,h){if(h===1||l.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return i=l.disabled,typeof l.precedence=="string"&&i==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function nw(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function nB(i,l,h,g){if(h.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(h.state.loading&4)===0){if(h.instance===null){var y=du(g.href),N=l.querySelector(id(y));if(N){l=N._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(i.count++,i=im.bind(i),l.then(i,i)),h.state.loading|=4,h.instance=N,Tn(N);return}N=l.ownerDocument||l,g=ZS(g),(y=Aa.get(y))&&fx(g,y),N=N.createElement("link"),Tn(N);var R=N;R._p=new Promise(function(B,J){R.onload=B,R.onerror=J}),nr(N,"link",g),h.instance=N}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(h,l),(l=h.state.preload)&&(h.state.loading&3)===0&&(i.count++,h=im.bind(i),l.addEventListener("load",h),l.addEventListener("error",h))}}var mx=0;function rB(i,l){return i.stylesheets&&i.count===0&&om(i,i.stylesheets),0<i.count||0<i.imgCount?function(h){var g=setTimeout(function(){if(i.stylesheets&&om(i,i.stylesheets),i.unsuspend){var N=i.unsuspend;i.unsuspend=null,N()}},6e4+l);0<i.imgBytes&&mx===0&&(mx=62500*P8());var y=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&om(i,i.stylesheets),i.unsuspend)){var N=i.unsuspend;i.unsuspend=null,N()}},(i.imgBytes>mx?50:800)+l);return i.unsuspend=h,function(){i.unsuspend=null,clearTimeout(g),clearTimeout(y)}}:null}function im(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)om(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var sm=null;function om(i,l){i.stylesheets=null,i.unsuspend!==null&&(i.count++,sm=new Map,l.forEach(aB,i),sm=null,im.call(i))}function aB(i,l){if(!(l.state.loading&4)){var h=sm.get(i);if(h)var g=h.get(null);else{h=new Map,sm.set(i,h);for(var y=i.querySelectorAll("link[data-precedence],style[data-precedence]"),N=0;N<y.length;N++){var R=y[N];(R.nodeName==="LINK"||R.getAttribute("media")!=="not all")&&(h.set(R.dataset.precedence,R),g=R)}g&&h.set(null,g)}y=l.instance,R=y.getAttribute("data-precedence"),N=h.get(R)||g,N===g&&h.set(null,y),h.set(R,y),this.count++,g=im.bind(this),y.addEventListener("load",g),y.addEventListener("error",g),N?N.parentNode.insertBefore(y,N.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(y,i.firstChild)),l.state.loading|=4}}var od={$$typeof:A,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function iB(i,l,h,g,y,N,R,B,J){this.tag=1,this.containerInfo=i,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=Xt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xt(0),this.hiddenUpdates=Xt(null),this.identifierPrefix=g,this.onUncaughtError=y,this.onCaughtError=N,this.onRecoverableError=R,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=J,this.incompleteTransitions=new Map}function rw(i,l,h,g,y,N,R,B,J,le,be,ve){return i=new iB(i,l,h,R,J,le,be,ve,B),l=1,N===!0&&(l|=24),N=ia(3,null,null,l),i.current=N,N.stateNode=i,l=Kg(),l.refCount++,i.pooledCache=l,l.refCount++,N.memoizedState={element:g,isDehydrated:h,cache:l},Qg(N),i}function aw(i){return i?(i=$l,i):$l}function iw(i,l,h,g,y,N){y=aw(y),g.context===null?g.context=y:g.pendingContext=y,g=Rs(l),g.payload={element:h},N=N===void 0?null:N,N!==null&&(g.callback=N),h=Ms(i,g,l),h!==null&&(Yr(h,i,l),Uc(h,i,l))}function sw(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var h=i.retryLane;i.retryLane=h!==0&&h<l?h:l}}function px(i,l){sw(i,l),(i=i.alternate)&&sw(i,l)}function ow(i){if(i.tag===13||i.tag===31){var l=To(i,67108864);l!==null&&Yr(l,i,67108864),px(i,67108864)}}function lw(i){if(i.tag===13||i.tag===31){var l=ca();l=tn(l);var h=To(i,l);h!==null&&Yr(h,i,l),px(i,l)}}var lm=!0;function sB(i,l,h,g){var y=G.T;G.T=null;var N=F.p;try{F.p=2,gx(i,l,h,g)}finally{F.p=N,G.T=y}}function oB(i,l,h,g){var y=G.T;G.T=null;var N=F.p;try{F.p=8,gx(i,l,h,g)}finally{F.p=N,G.T=y}}function gx(i,l,h,g){if(lm){var y=bx(g);if(y===null)nx(i,l,g,um,h),cw(i,g);else if(uB(y,i,l,h,g))g.stopPropagation();else if(cw(i,g),l&4&&-1<lB.indexOf(i)){for(;y!==null;){var N=Oi(y);if(N!==null)switch(N.tag){case 3:if(N=N.stateNode,N.current.memoizedState.isDehydrated){var R=Lr(N.pendingLanes);if(R!==0){var B=N;for(B.pendingLanes|=2,B.entangledLanes|=2;R;){var J=1<<31-Rt(R);B.entanglements[1]|=J,R&=~J}ui(N),(Ot&6)===0&&(qh=Vt()+500,td(0))}}break;case 31:case 13:B=To(N,2),B!==null&&Yr(B,N,2),Kh(),px(N,2)}if(N=bx(g),N===null&&nx(i,l,g,um,h),N===y)break;y=N}y!==null&&g.stopPropagation()}else nx(i,l,g,null,h)}}function bx(i){return i=ot(i),xx(i)}var um=null;function xx(i){if(um=null,i=Ar(i),i!==null){var l=s(i);if(l===null)i=null;else{var h=l.tag;if(h===13){if(i=o(l),i!==null)return i;i=null}else if(h===31){if(i=u(l),i!==null)return i;i=null}else if(h===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;i=null}else l!==i&&(i=null)}}return um=i,null}function uw(i){switch(i){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(Ol()){case ge:return 2;case ke:return 8;case Qe:case ct:return 32;case St:return 268435456;default:return 32}default:return 32}}var yx=!1,Ys=null,qs=null,Gs=null,ld=new Map,ud=new Map,Ks=[],lB="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 cw(i,l){switch(i){case"focusin":case"focusout":Ys=null;break;case"dragenter":case"dragleave":qs=null;break;case"mouseover":case"mouseout":Gs=null;break;case"pointerover":case"pointerout":ld.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":ud.delete(l.pointerId)}}function cd(i,l,h,g,y,N){return i===null||i.nativeEvent!==N?(i={blockedOn:l,domEventName:h,eventSystemFlags:g,nativeEvent:N,targetContainers:[y]},l!==null&&(l=Oi(l),l!==null&&ow(l)),i):(i.eventSystemFlags|=g,l=i.targetContainers,y!==null&&l.indexOf(y)===-1&&l.push(y),i)}function uB(i,l,h,g,y){switch(l){case"focusin":return Ys=cd(Ys,i,l,h,g,y),!0;case"dragenter":return qs=cd(qs,i,l,h,g,y),!0;case"mouseover":return Gs=cd(Gs,i,l,h,g,y),!0;case"pointerover":var N=y.pointerId;return ld.set(N,cd(ld.get(N)||null,i,l,h,g,y)),!0;case"gotpointercapture":return N=y.pointerId,ud.set(N,cd(ud.get(N)||null,i,l,h,g,y)),!0}return!1}function dw(i){var l=Ar(i.target);if(l!==null){var h=s(l);if(h!==null){if(l=h.tag,l===13){if(l=o(h),l!==null){i.blockedOn=l,Ml(i.priority,function(){lw(h)});return}}else if(l===31){if(l=u(h),l!==null){i.blockedOn=l,Ml(i.priority,function(){lw(h)});return}}else if(l===3&&h.stateNode.current.memoizedState.isDehydrated){i.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}i.blockedOn=null}function cm(i){if(i.blockedOn!==null)return!1;for(var l=i.targetContainers;0<l.length;){var h=bx(i.nativeEvent);if(h===null){h=i.nativeEvent;var g=new h.constructor(h.type,h);$e=g,h.target.dispatchEvent(g),$e=null}else return l=Oi(h),l!==null&&ow(l),i.blockedOn=h,!1;l.shift()}return!0}function fw(i,l,h){cm(i)&&h.delete(l)}function cB(){yx=!1,Ys!==null&&cm(Ys)&&(Ys=null),qs!==null&&cm(qs)&&(qs=null),Gs!==null&&cm(Gs)&&(Gs=null),ld.forEach(fw),ud.forEach(fw)}function dm(i,l){i.blockedOn===l&&(i.blockedOn=null,yx||(yx=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,cB)))}var fm=null;function hw(i){fm!==i&&(fm=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){fm===i&&(fm=null);for(var l=0;l<i.length;l+=3){var h=i[l],g=i[l+1],y=i[l+2];if(typeof g!="function"){if(xx(g||h)===null)continue;break}var N=Oi(h);N!==null&&(i.splice(l,3),l-=3,bb(N,{pending:!0,data:y,method:h.method,action:g},g,y))}}))}function hu(i){function l(J){return dm(J,i)}Ys!==null&&dm(Ys,i),qs!==null&&dm(qs,i),Gs!==null&&dm(Gs,i),ld.forEach(l),ud.forEach(l);for(var h=0;h<Ks.length;h++){var g=Ks[h];g.blockedOn===i&&(g.blockedOn=null)}for(;0<Ks.length&&(h=Ks[0],h.blockedOn===null);)dw(h),h.blockedOn===null&&Ks.shift();if(h=(i.ownerDocument||i).$$reactFormReplay,h!=null)for(g=0;g<h.length;g+=3){var y=h[g],N=h[g+1],R=y[dr]||null;if(typeof N=="function")R||hw(h);else if(R){var B=null;if(N&&N.hasAttribute("formAction")){if(y=N,R=N[dr]||null)B=R.formAction;else if(xx(y)!==null)continue}else B=R.action;typeof B=="function"?h[g+1]=B:(h.splice(g,3),g-=3),hw(h)}}}function mw(){function i(N){N.canIntercept&&N.info==="react-transition"&&N.intercept({handler:function(){return new Promise(function(R){return y=R})},focusReset:"manual",scroll:"manual"})}function l(){y!==null&&(y(),y=null),g||setTimeout(h,20)}function h(){if(!g&&!navigation.transition){var N=navigation.currentEntry;N&&N.url!=null&&navigation.navigate(N.url,{state:N.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var g=!1,y=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(h,100),function(){g=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),y!==null&&(y(),y=null)}}}function vx(i){this._internalRoot=i}hm.prototype.render=vx.prototype.render=function(i){var l=this._internalRoot;if(l===null)throw Error(r(409));var h=l.current,g=ca();iw(h,g,i,l,null,null)},hm.prototype.unmount=vx.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var l=i.containerInfo;iw(i.current,2,null,i,null,null),Kh(),l[Es]=null}};function hm(i){this._internalRoot=i}hm.prototype.unstable_scheduleHydration=function(i){if(i){var l=Rl();i={blockedOn:null,target:i,priority:l};for(var h=0;h<Ks.length&&l!==0&&l<Ks[h].priority;h++);Ks.splice(h,0,i),h===0&&dw(i)}};var pw=t.version;if(pw!=="19.2.8")throw Error(r(527,pw,"19.2.8"));F.findDOMNode=function(i){var l=i._reactInternals;if(l===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(l),i=i!==null?m(i):null,i=i===null?null:i.stateNode,i};var dB={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mm.isDisabled&&mm.supportsFiber)try{Qn=mm.inject(dB),dn=mm}catch{}}return fd.createRoot=function(i,l){if(!a(i))throw Error(r(299));var h=!1,g="",y=_T,N=NT,R=TT;return l!=null&&(l.unstable_strictMode===!0&&(h=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onUncaughtError!==void 0&&(y=l.onUncaughtError),l.onCaughtError!==void 0&&(N=l.onCaughtError),l.onRecoverableError!==void 0&&(R=l.onRecoverableError)),l=rw(i,1,!1,null,null,h,g,null,y,N,R,mw),i[Es]=l.current,tx(i),new vx(l)},fd.hydrateRoot=function(i,l,h){if(!a(i))throw Error(r(299));var g=!1,y="",N=_T,R=NT,B=TT,J=null;return h!=null&&(h.unstable_strictMode===!0&&(g=!0),h.identifierPrefix!==void 0&&(y=h.identifierPrefix),h.onUncaughtError!==void 0&&(N=h.onUncaughtError),h.onCaughtError!==void 0&&(R=h.onCaughtError),h.onRecoverableError!==void 0&&(B=h.onRecoverableError),h.formState!==void 0&&(J=h.formState)),l=rw(i,1,!0,l,h??null,g,y,J,N,R,B,mw),l.context=aw(null),h=l.current,g=ca(),g=tn(g),y=Rs(g),y.callback=null,Ms(h,y,g),h=g,l.current.lanes=h,Ht(l,h),ui(l),i[Es]=l.current,tx(i),new hm(l)},fd.version="19.2.8",fd}var Sw;function TB(){if(Sw)return Nx.exports;Sw=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(t){console.error(t)}}return e(),Nx.exports=NB(),Nx.exports}var SB=TB();/**
|
|
50
|
+
* react-router v7.18.1
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var d1=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,y5=/^[\\/]{2}/;function wB(e,t){return t+e.replace(/\\/g,"/")}var ww="popstate";function Aw(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function AB(e={}){function t(r,a){var f;let s=(f=a.state)==null?void 0:f.masked,{pathname:o,search:u,hash:d}=s||r.location;return qy("",{pathname:o,search:u,hash:d},a.state&&a.state.usr||null,a.state&&a.state.key||"default",s?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:Xd(a)}return kB(t,n,null,e)}function sn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ma(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function CB(){return Math.random().toString(36).substring(2,10)}function Cw(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function qy(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Zu(t):t,state:n,key:t&&t.key||r||CB(),mask:a}}function Xd({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Zu(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function kB(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:s=!1}=r,o=a.history,u="POP",d=null,f=m();f==null&&(f=0,o.replaceState({...o.state,idx:f},""));function m(){return(o.state||{idx:null}).idx}function p(){u="POP";let S=m(),T=S==null?null:S-f;f=S,d&&d({action:u,location:_.location,delta:T})}function b(S,T){u="PUSH";let C=Aw(S)?S:qy(_.location,S,T);f=m()+1;let A=Cw(C,f),k=_.createHref(C.mask||C);try{o.pushState(A,"",k)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;a.location.assign(k)}s&&d&&d({action:u,location:_.location,delta:1})}function x(S,T){u="REPLACE";let C=Aw(S)?S:qy(_.location,S,T);f=m();let A=Cw(C,f),k=_.createHref(C.mask||C);o.replaceState(A,"",k),s&&d&&d({action:u,location:_.location,delta:0})}function E(S){return OB(a,S)}let _={get action(){return u},get location(){return e(a,o)},listen(S){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(ww,p),d=S,()=>{a.removeEventListener(ww,p),d=null}},createHref(S){return t(a,S)},createURL:E,encodeLocation(S){let T=E(S);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:b,replace:x,go(S){return o.go(S)}};return _}function OB(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),sn(r,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Xd(t);return a=a.replace(/ $/,"%20"),!n&&y5.test(a)&&(a=r+a),new URL(a,r)}function v5(e,t,n="/"){return IB(e,t,n,!1)}function IB(e,t,n,r,a){let s=typeof t=="string"?Zu(t):t,o=as(s.pathname||"/",n);if(o==null)return null;let u=RB(e),d=null,f=$B(o);for(let m=0;d==null&&m<u.length;++m)d=HB(u[m],f,r);return d}function RB(e){let t=E5(e);return MB(t),t}function E5(e,t=[],n=[],r="",a=!1){let s=(o,u,d=a,f)=>{let m={relativePath:f===void 0?o.path||"":f,caseSensitive:o.caseSensitive===!0,childrenIndex:u,route:o};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&d)return;sn(m.relativePath.startsWith(r),`Absolute route path "${m.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(r.length)}let p=Xa([r,m.relativePath]),b=n.concat(m);o.children&&o.children.length>0&&(sn(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),E5(o.children,t,b,p,d)),!(o.path==null&&!o.index)&&t.push({path:p,score:zB(p,o.index),routesMeta:b.map((x,E)=>{let[_,S]=T5(x.relativePath,x.caseSensitive,E===b.length-1);return{...x,matcher:_,compiledParams:S}})})};return e.forEach((o,u)=>{var d;if(o.path===""||!((d=o.path)!=null&&d.includes("?")))s(o,u);else for(let f of _5(o.path))s(o,u,!0,f)}),t}function _5(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return a?[s,""]:[s];let o=_5(r.join("/")),u=[];return u.push(...o.map(d=>d===""?s:[s,d].join("/"))),a&&u.push(...o),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function MB(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:FB(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var DB=/^:[\w-]+$/,jB=3,LB=2,PB=1,BB=10,UB=-2,kw=e=>e==="*";function zB(e,t){let n=e.split("/"),r=n.length;return n.some(kw)&&(r+=UB),t&&(r+=LB),n.filter(a=>!kw(a)).reduce((a,s)=>a+(DB.test(s)?jB:s===""?PB:BB),r)}function FB(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function HB(e,t,n=!1){let{routesMeta:r}=e,a={},s="/",o=[];for(let u=0;u<r.length;++u){let d=r[u],f=u===r.length-1,m=s==="/"?t:t.slice(s.length)||"/",p={path:d.relativePath,caseSensitive:d.caseSensitive,end:f},b=d.matcher&&d.compiledParams?N5(p,m,d.matcher,d.compiledParams):tp(p,m),x=d.route;if(!b&&f&&n&&!r[r.length-1].route.index&&(b=tp({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!b)return null;Object.assign(a,b.params),o.push({params:a,pathname:Xa([s,b.pathname]),pathnameBase:GB(Xa([s,b.pathnameBase])),route:x}),b.pathnameBase!=="/"&&(s=Xa([s,b.pathnameBase]))}return o}function tp(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=T5(e.path,e.caseSensitive,e.end);return N5(e,t,n,r)}function N5(e,t,n,r){let a=t.match(n);if(!a)return null;let s=a[0],o=s.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:r.reduce((f,{paramName:m,isOptional:p},b)=>{if(m==="*"){let E=u[b]||"";o=s.slice(0,s.length-E.length).replace(/(.)\/+$/,"$1")}const x=u[b];return p&&!x?f[m]=void 0:f[m]=(x||"").replace(/%2F/g,"/"),f},{}),pathname:s,pathnameBase:o,pattern:e}}function T5(e,t=!1,n=!0){Ma(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,u,d,f,m)=>{if(r.push({paramName:u,isOptional:d!=null}),d){let p=m.charAt(f+o.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function $B(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ma(!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 (${t}).`),e}}function as(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function YB(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Zu(e):e,s;return n?(n=S5(n),n.startsWith("/")?s=Ow(n.substring(1),"/"):s=Ow(n,t)):s=t,{pathname:s,search:KB(r),hash:VB(a)}}function Ow(e,t){let n=np(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Ax(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function qB(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function f1(e){let t=qB(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function c0(e,t,n,r=!1){let a;typeof e=="string"?a=Zu(e):(a={...e},sn(!a.pathname||!a.pathname.includes("?"),Ax("?","pathname","search",a)),sn(!a.pathname||!a.pathname.includes("#"),Ax("#","pathname","hash",a)),sn(!a.search||!a.search.includes("#"),Ax("#","search","hash",a)));let s=e===""||a.pathname==="",o=s?"/":a.pathname,u;if(o==null)u=n;else{let p=t.length-1;if(!r&&o.startsWith("..")){let b=o.split("/");for(;b[0]==="..";)b.shift(),p-=1;a.pathname=b.join("/")}u=p>=0?t[p]:"/"}let d=YB(a,u),f=o&&o!=="/"&&o.endsWith("/"),m=(s||o===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||m)&&(d.pathname+="/"),d}var S5=e=>e.replace(/[\\/]{2,}/g,"/"),Xa=e=>S5(e.join("/")),np=e=>e.replace(/\/+$/,""),GB=e=>np(e).replace(/^\/*/,"/"),KB=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,VB=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,WB=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function XB(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function QB(e){let t=e.map(n=>n.route.path).filter(Boolean);return Xa(t)||"/"}var w5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function A5(e,t){let n=e;if(typeof n!="string"||!d1.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(w5)try{let s=new URL(window.location.href),o=y5.test(n)?new URL(wB(n,s.protocol)):new URL(n),u=as(o.pathname,t);o.origin===s.origin&&u!=null?n=u+o.search+o.hash:a=!0}catch{Ma(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var C5=["POST","PUT","PATCH","DELETE"];new Set(C5);var ZB=["GET",...C5];new Set(ZB);var JB=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function e9(e){try{return JB.includes(new URL(e).protocol)}catch{return!1}}var Ju=v.createContext(null);Ju.displayName="DataRouter";var d0=v.createContext(null);d0.displayName="DataRouterState";var k5=v.createContext(!1);function t9(){return v.useContext(k5)}var O5=v.createContext({isTransitioning:!1});O5.displayName="ViewTransition";var n9=v.createContext(new Map);n9.displayName="Fetchers";var r9=v.createContext(null);r9.displayName="Await";var xa=v.createContext(null);xa.displayName="Navigation";var vf=v.createContext(null);vf.displayName="Location";var Pa=v.createContext({outlet:null,matches:[],isDataRoute:!1});Pa.displayName="Route";var h1=v.createContext(null);h1.displayName="RouteError";var I5="REACT_ROUTER_ERROR",a9="REDIRECT",i9="ROUTE_ERROR_RESPONSE";function s9(e){if(e.startsWith(`${I5}:${a9}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function o9(e){if(e.startsWith(`${I5}:${i9}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new WB(t.status,t.statusText,t.data)}catch{}}function l9(e,{relative:t}={}){sn(ec(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=v.useContext(xa),{hash:a,pathname:s,search:o}=Ef(e,{relative:t}),u=s;return n!=="/"&&(u=s==="/"?n:Xa([n,s])),r.createHref({pathname:u,search:o,hash:a})}function ec(){return v.useContext(vf)!=null}function lr(){return sn(ec(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(vf).location}var R5="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function M5(e){v.useContext(xa).static||v.useLayoutEffect(e)}function ur(){let{isDataRoute:e}=v.useContext(Pa);return e?N9():u9()}function u9(){sn(ec(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(Ju),{basename:t,navigator:n}=v.useContext(xa),{matches:r}=v.useContext(Pa),{pathname:a}=lr(),s=JSON.stringify(f1(r)),o=v.useRef(!1);return M5(()=>{o.current=!0}),v.useCallback((d,f={})=>{if(Ma(o.current,R5),!o.current)return;if(typeof d=="number"){n.go(d);return}let m=c0(d,JSON.parse(s),a,f.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Xa([t,m.pathname])),(f.replace?n.replace:n.push)(m,f.state,f)},[t,n,s,a,e])}var c9=v.createContext(null);function d9(e){let t=v.useContext(Pa).outlet;return v.useMemo(()=>t&&v.createElement(c9.Provider,{value:e},t),[t,e])}function D5(){let{matches:e}=v.useContext(Pa),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function Ef(e,{relative:t}={}){let{matches:n}=v.useContext(Pa),{pathname:r}=lr(),a=JSON.stringify(f1(n));return v.useMemo(()=>c0(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function f9(e,t){return j5(e,t)}function j5(e,t,n){var S;sn(ec(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=v.useContext(xa),{matches:a}=v.useContext(Pa),s=a[a.length-1],o=s?s.params:{},u=s?s.pathname:"/",d=s?s.pathnameBase:"/",f=s&&s.route;{let T=f&&f.path||"";P5(u,!f||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${T}">) 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.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${T}"> to <Route path="${T==="/"?"*":`${T}/*`}">.`)}let m=lr(),p;if(t){let T=typeof t=="string"?Zu(t):t;sn(d==="/"||((S=T.pathname)==null?void 0:S.startsWith(d)),`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 "${d}" but pathname "${T.pathname}" was given in the \`location\` prop.`),p=T}else p=m;let b=p.pathname||"/",x=b;if(d!=="/"){let T=d.replace(/^\//,"").split("/");x="/"+b.replace(/^\//,"").split("/").slice(T.length).join("/")}let E=n&&n.state.matches.length?n.state.matches.map(T=>Object.assign(T,{route:n.manifest[T.route.id]||T.route})):v5(e,{pathname:x});Ma(f||E!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),Ma(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.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 _=b9(E&&E.map(T=>Object.assign({},T,{params:Object.assign({},o,T.params),pathname:Xa([d,r.encodeLocation?r.encodeLocation(T.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?d:Xa([d,r.encodeLocation?r.encodeLocation(T.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathnameBase])})),a,n);return t&&_?v.createElement(vf.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...p},navigationType:"POP"}},_):_}function h9(){let e=_9(),t=XB(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:s},"ErrorBoundary")," or"," ",v.createElement("code",{style:s},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:a},n):null,o)}var m9=v.createElement(h9,null),L5=class extends v.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,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=o9(e.digest);n&&(e=n)}let t=e!==void 0?v.createElement(Pa.Provider,{value:this.props.routeContext},v.createElement(h1.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?v.createElement(p9,{error:e},t):t}};L5.contextType=k5;var Cx=new WeakMap;function p9({children:e,error:t}){let{basename:n}=v.useContext(xa);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=s9(t.digest);if(r){let a=Cx.get(t);if(a)throw a;let s=A5(r.location,n),o=s.absoluteURL||s.to;if(e9(o))throw new Error("Invalid redirect location");if(w5&&!Cx.get(t))if(s.isExternal||r.reloadDocument)window.location.href=o;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw Cx.set(t,u),u}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o}`})}}return e}function g9({routeContext:e,match:t,children:n}){let r=v.useContext(Ju);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),v.createElement(Pa.Provider,{value:e},n)}function b9(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,s=r==null?void 0:r.errors;if(s!=null){let m=a.findIndex(p=>p.route.id&&(s==null?void 0:s[p.route.id])!==void 0);sn(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,m+1))}let o=!1,u=-1;if(n&&r){o=r.renderFallback;for(let m=0;m<a.length;m++){let p=a[m];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(u=m),p.route.id){let{loaderData:b,errors:x}=r,E=p.route.loader&&!b.hasOwnProperty(p.route.id)&&(!x||x[p.route.id]===void 0);if(p.route.lazy||E){n.isStatic&&(o=!0),u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}}let d=n==null?void 0:n.onError,f=r&&d?(m,p)=>{var b,x;d(m,{location:r.location,params:((x=(b=r.matches)==null?void 0:b[0])==null?void 0:x.params)??{},pattern:QB(r.matches),errorInfo:p})}:void 0;return a.reduceRight((m,p,b)=>{let x,E=!1,_=null,S=null;r&&(x=s&&p.route.id?s[p.route.id]:void 0,_=p.route.errorElement||m9,o&&(u<0&&b===0?(P5("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,S=null):u===b&&(E=!0,S=p.route.hydrateFallbackElement||null)));let T=t.concat(a.slice(0,b+1)),C=()=>{let A;return x?A=_:E?A=S:p.route.Component?A=v.createElement(p.route.Component,null):p.route.element?A=p.route.element:A=m,v.createElement(g9,{match:p,routeContext:{outlet:m,matches:T,isDataRoute:r!=null},children:A})};return r&&(p.route.ErrorBoundary||p.route.errorElement||b===0)?v.createElement(L5,{location:r.location,revalidation:r.revalidation,component:_,error:x,children:C(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:f}):C()},null)}function m1(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function x9(e){let t=v.useContext(Ju);return sn(t,m1(e)),t}function y9(e){let t=v.useContext(d0);return sn(t,m1(e)),t}function v9(e){let t=v.useContext(Pa);return sn(t,m1(e)),t}function p1(e){let t=v9(e),n=t.matches[t.matches.length-1];return sn(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function E9(){return p1("useRouteId")}function _9(){var r;let e=v.useContext(h1),t=y9("useRouteError"),n=p1("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function N9(){let{router:e}=x9("useNavigate"),t=p1("useNavigate"),n=v.useRef(!1);return M5(()=>{n.current=!0}),v.useCallback(async(a,s={})=>{Ma(n.current,R5),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...s}))},[e,t])}var Iw={};function P5(e,t,n){!t&&!Iw[e]&&(Iw[e]=!0,Ma(!1,n))}v.memo(T9);function T9({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:s}){return j5(e,void 0,{manifest:t,state:r,isStatic:a,onError:s})}function Du({to:e,replace:t,state:n,relative:r}){sn(ec(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=v.useContext(xa);Ma(!a,"<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:s}=v.useContext(Pa),{pathname:o}=lr(),u=ur(),d=c0(e,f1(s),o,r==="path"),f=JSON.stringify(d);return v.useEffect(()=>{u(JSON.parse(f),{replace:t,state:n,relative:r})},[u,f,r,t,n]),null}function S9(e){return d9(e.context)}function kr(e){sn(!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 w9({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:s=!1,useTransitions:o}){sn(!ec(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),d=v.useMemo(()=>({basename:u,navigator:a,static:s,useTransitions:o,future:{}}),[u,a,s,o]);typeof n=="string"&&(n=Zu(n));let{pathname:f="/",search:m="",hash:p="",state:b=null,key:x="default",mask:E}=n,_=v.useMemo(()=>{let S=as(f,u);return S==null?null:{location:{pathname:S,search:m,hash:p,state:b,key:x,mask:E},navigationType:r}},[u,f,m,p,b,x,r,E]);return Ma(_!=null,`<Router basename="${u}"> is not able to match the URL "${f}${m}${p}" because it does not start with the basename, so the <Router> won't render anything.`),_==null?null:v.createElement(xa.Provider,{value:d},v.createElement(vf.Provider,{children:t,value:_}))}function A9({children:e,location:t}){return f9(Gy(e),t)}function Gy(e,t=[]){let n=[];return v.Children.forEach(e,(r,a)=>{if(!v.isValidElement(r))return;let s=[...t,a];if(r.type===v.Fragment){n.push.apply(n,Gy(r.props.children,s));return}sn(r.type===kr,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),sn(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Gy(r.props.children,s)),n.push(o)}),n}var $m="get",Ym="application/x-www-form-urlencoded";function f0(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function C9(e){return f0(e)&&e.tagName.toLowerCase()==="button"}function k9(e){return f0(e)&&e.tagName.toLowerCase()==="form"}function O9(e){return f0(e)&&e.tagName.toLowerCase()==="input"}function I9(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function R9(e,t){return e.button===0&&(!t||t==="_self")&&!I9(e)}function Ky(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function M9(e,t){let n=Ky(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(s=>{n.append(a,s)})}),n}var pm=null;function D9(){if(pm===null)try{new FormData(document.createElement("form"),0),pm=!1}catch{pm=!0}return pm}var j9=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function kx(e){return e!=null&&!j9.has(e)?(Ma(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ym}"`),null):e}function L9(e,t){let n,r,a,s,o;if(k9(e)){let u=e.getAttribute("action");r=u?as(u,t):null,n=e.getAttribute("method")||$m,a=kx(e.getAttribute("enctype"))||Ym,s=new FormData(e)}else if(C9(e)||O9(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||u.getAttribute("action");if(r=d?as(d,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||$m,a=kx(e.getAttribute("formenctype"))||kx(u.getAttribute("enctype"))||Ym,s=new FormData(u,e),!D9()){let{name:f,type:m,value:p}=e;if(m==="image"){let b=f?`${f}.`:"";s.append(`${b}x`,"0"),s.append(`${b}y`,"0")}else f&&s.append(f,p)}}else{if(f0(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=$m,r=null,a=Ym,o=e}return s&&a==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:s,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function g1(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function B5(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&as(a.pathname,t)==="/"?a.pathname=`${np(t)}/_root.${r}`:a.pathname=`${np(a.pathname)}.${r}`,a}async function P9(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function B9(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 U9(e,t,n){let r=await Promise.all(e.map(async a=>{let s=t.routes[a.route.id];if(s){let o=await P9(s,n);return o.links?o.links():[]}return[]}));return $9(r.flat(1).filter(B9).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function Rw(e,t,n,r,a,s){let o=(d,f)=>n[f]?d.route.id!==n[f].route.id:!0,u=(d,f)=>{var m;return n[f].pathname!==d.pathname||((m=n[f].route.path)==null?void 0:m.endsWith("*"))&&n[f].params["*"]!==d.params["*"]};return s==="assets"?t.filter((d,f)=>o(d,f)||u(d,f)):s==="data"?t.filter((d,f)=>{var p;let m=r.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(o(d,f)||u(d,f))return!0;if(d.route.shouldRevalidate){let b=d.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((p=n[0])==null?void 0:p.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function z9(e,t,{includeHydrateFallback:n}={}){return F9(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}).flat(1))}function F9(e){return[...new Set(e)]}function H9(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function $9(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let s=JSON.stringify(H9(a));return n.has(s)||(n.add(s),r.push({key:s,link:a})),r},[])}function b1(){let e=v.useContext(Ju);return g1(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Y9(){let e=v.useContext(d0);return g1(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var x1=v.createContext(void 0);x1.displayName="FrameworkContext";function h0(){let e=v.useContext(x1);return g1(e,"You must render this element inside a <HydratedRouter> element"),e}function q9(e,t){let n=v.useContext(x1),[r,a]=v.useState(!1),[s,o]=v.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:f,onMouseLeave:m,onTouchStart:p}=t,b=v.useRef(null);v.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let _=T=>{T.forEach(C=>{o(C.isIntersecting)})},S=new IntersectionObserver(_,{threshold:.5});return b.current&&S.observe(b.current),()=>{S.disconnect()}}},[e]),v.useEffect(()=>{if(r){let _=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(_)}}},[r]);let x=()=>{a(!0)},E=()=>{a(!1),o(!1)};return n?e!=="intent"?[s,b,{}]:[s,b,{onFocus:hd(u,x),onBlur:hd(d,E),onMouseEnter:hd(f,x),onMouseLeave:hd(m,E),onTouchStart:hd(p,x)}]:[!1,b,{}]}function hd(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function G9({page:e,...t}){let n=t9(),{nonce:r}=h0(),{router:a}=b1(),s=v.useMemo(()=>v5(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?(t.nonce==null&&r&&(t={...t,nonce:r}),n?v.createElement(V9,{page:e,matches:s,...t}):v.createElement(W9,{page:e,matches:s,...t})):null}function K9(e){let{manifest:t,routeModules:n}=h0(),[r,a]=v.useState([]);return v.useEffect(()=>{let s=!1;return U9(e,t,n).then(o=>{s||a(o)}),()=>{s=!0}},[e,t,n]),r}function V9({page:e,matches:t,...n}){let r=lr(),{future:a}=h0(),{basename:s}=b1(),o=v.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let u=B5(e,s,a.v8_trailingSlashAwareDataRequests,"rsc"),d=!1,f=[];for(let m of t)typeof m.route.shouldRevalidate=="function"?d=!0:f.push(m.route.id);return d&&f.length>0&&u.searchParams.set("_routes",f.join(",")),[u.pathname+u.search]},[s,a.v8_trailingSlashAwareDataRequests,e,r,t]);return v.createElement(v.Fragment,null,o.map(u=>v.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...n})))}function W9({page:e,matches:t,...n}){let r=lr(),{future:a,manifest:s,routeModules:o}=h0(),{basename:u}=b1(),{loaderData:d,matches:f}=Y9(),m=v.useMemo(()=>Rw(e,t,f,s,r,"data"),[e,t,f,s,r]),p=v.useMemo(()=>Rw(e,t,f,s,r,"assets"),[e,t,f,s,r]),b=v.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let _=new Set,S=!1;if(t.forEach(C=>{var k;let A=s.routes[C.route.id];!A||!A.hasLoader||(!m.some(I=>I.route.id===C.route.id)&&C.route.id in d&&((k=o[C.route.id])!=null&&k.shouldRevalidate)||A.hasClientLoader?S=!0:_.add(C.route.id))}),_.size===0)return[];let T=B5(e,u,a.v8_trailingSlashAwareDataRequests,"data");return S&&_.size>0&&T.searchParams.set("_routes",t.filter(C=>_.has(C.route.id)).map(C=>C.route.id).join(",")),[T.pathname+T.search]},[u,a.v8_trailingSlashAwareDataRequests,d,r,s,m,t,e,o]),x=v.useMemo(()=>z9(p,s),[p,s]),E=K9(p);return v.createElement(v.Fragment,null,b.map(_=>v.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...n})),x.map(_=>v.createElement("link",{key:_,rel:"modulepreload",href:_,...n})),E.map(({key:_,link:S})=>v.createElement("link",{key:_,nonce:n.nonce,...S,crossOrigin:S.crossOrigin??n.crossOrigin})))}function X9(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Q9=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Q9&&(window.__reactRouterVersion="7.18.1")}catch{}function Z9({basename:e,children:t,useTransitions:n,window:r}){let a=v.useRef();a.current==null&&(a.current=AB({window:r,v5Compat:!0}));let s=a.current,[o,u]=v.useState({action:s.action,location:s.location}),d=v.useCallback(f=>{n===!1?u(f):v.startTransition(()=>u(f))},[n]);return v.useLayoutEffect(()=>s.listen(d),[s,d]),v.createElement(w9,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:s,useTransitions:n})}var U5=v.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:s,replace:o,mask:u,state:d,target:f,to:m,preventScrollReset:p,viewTransition:b,defaultShouldRevalidate:x,...E},_){let{basename:S,navigator:T,useTransitions:C}=v.useContext(xa),A=typeof m=="string"&&d1.test(m),k=A5(m,S);m=k.to;let I=l9(m,{relative:a}),O=lr(),j=null;if(u){let W=c0(u,[],O.mask?O.mask.pathname:"/",!0);S!=="/"&&(W.pathname=W.pathname==="/"?S:Xa([S,W.pathname])),j=T.createHref(W)}let[H,z,D]=q9(r,E),V=tU(m,{replace:o,mask:u,state:d,target:f,preventScrollReset:p,relative:a,viewTransition:b,defaultShouldRevalidate:x,useTransitions:C});function q(W){t&&t(W),W.defaultPrevented||V(W)}let ae=!(k.isExternal||s),Q=v.createElement("a",{...E,...D,href:(ae?j:void 0)||k.absoluteURL||I,onClick:ae?q:t,ref:X9(_,z),target:f,"data-discover":!A&&n==="render"?"true":void 0});return H&&!A?v.createElement(v.Fragment,null,Q,v.createElement(G9,{page:I})):Q});U5.displayName="Link";var rp=v.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:s,to:o,viewTransition:u,children:d,...f},m){let p=Ef(o,{relative:f.relative}),b=lr(),x=v.useContext(d0),{navigator:E,basename:_}=v.useContext(xa),S=x!=null&&sU(p)&&u===!0,T=E.encodeLocation?E.encodeLocation(p).pathname:p.pathname,C=b.pathname,A=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(C=C.toLowerCase(),A=A?A.toLowerCase():null,T=T.toLowerCase()),A&&_&&(A=as(A,_)||A);const k=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let I=C===T||!a&&C.startsWith(T)&&C.charAt(k)==="/",O=A!=null&&(A===T||!a&&A.startsWith(T)&&A.charAt(T.length)==="/"),j={isActive:I,isPending:O,isTransitioning:S},H=I?t:void 0,z;typeof r=="function"?z=r(j):z=[r,I?"active":null,O?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let D=typeof s=="function"?s(j):s;return v.createElement(U5,{...f,"aria-current":H,className:z,ref:m,style:D,to:o,viewTransition:u},typeof d=="function"?d(j):d)});rp.displayName="NavLink";var J9=v.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:s,method:o=$m,action:u,onSubmit:d,relative:f,preventScrollReset:m,viewTransition:p,defaultShouldRevalidate:b,...x},E)=>{let{useTransitions:_}=v.useContext(xa),S=aU(),T=iU(u,{relative:f}),C=o.toLowerCase()==="get"?"get":"post",A=typeof u=="string"&&d1.test(u),k=I=>{if(d&&d(I),I.defaultPrevented)return;I.preventDefault();let O=I.nativeEvent.submitter,j=(O==null?void 0:O.getAttribute("formmethod"))||o,H=()=>S(O||I.currentTarget,{fetcherKey:t,method:j,navigate:n,replace:a,state:s,relative:f,preventScrollReset:m,viewTransition:p,defaultShouldRevalidate:b});_&&n!==!1?v.startTransition(()=>H()):H()};return v.createElement("form",{ref:E,method:C,action:T,onSubmit:r?d:k,...x,"data-discover":!A&&e==="render"?"true":void 0})});J9.displayName="Form";function eU(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function z5(e){let t=v.useContext(Ju);return sn(t,eU(e)),t}function tU(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:s,relative:o,viewTransition:u,defaultShouldRevalidate:d,useTransitions:f}={}){let m=ur(),p=lr(),b=Ef(e,{relative:o});return v.useCallback(x=>{if(R9(x,t)){x.preventDefault();let E=n!==void 0?n:Xd(p)===Xd(b),_=()=>m(e,{replace:E,mask:r,state:a,preventScrollReset:s,relative:o,viewTransition:u,defaultShouldRevalidate:d});f?v.startTransition(()=>_()):_()}},[p,m,b,n,r,a,t,e,s,o,u,d,f])}function y1(e){Ma(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=v.useRef(Ky(e)),n=v.useRef(!1),r=lr(),a=v.useMemo(()=>M9(r.search,n.current?null:t.current),[r.search]),s=ur(),o=v.useCallback((u,d)=>{const f=Ky(typeof u=="function"?u(new URLSearchParams(a)):u);n.current=!0,s("?"+f,d)},[s,a]);return[a,o]}var nU=0,rU=()=>`__${String(++nU)}__`;function aU(){let{router:e}=z5("useSubmit"),{basename:t}=v.useContext(xa),n=E9(),r=e.fetch,a=e.navigate;return v.useCallback(async(s,o={})=>{let{action:u,method:d,encType:f,formData:m,body:p}=L9(s,t);if(o.navigate===!1){let b=o.fetcherKey||rU();await r(b,n,o.action||u,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:m,body:p,formMethod:o.method||d,formEncType:o.encType||f,flushSync:o.flushSync})}else await a(o.action||u,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:m,body:p,formMethod:o.method||d,formEncType:o.encType||f,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,a,t,n])}function iU(e,{relative:t}={}){let{basename:n}=v.useContext(xa),r=v.useContext(Pa);sn(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),s={...Ef(e||".",{relative:t})},o=lr();if(e==null){s.search=o.search;let u=new URLSearchParams(s.search),d=u.getAll("index");if(d.some(m=>m==="")){u.delete("index"),d.filter(p=>p).forEach(p=>u.append("index",p));let m=u.toString();s.search=m?`?${m}`:""}}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:Xa([n,s.pathname])),Xd(s)}function sU(e,{relative:t}={}){let n=v.useContext(O5);sn(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=z5("useViewTransitionState"),a=Ef(e,{relative:t});if(!n.isTransitioning)return!1;let s=as(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=as(n.nextLocation.pathname,r)||n.nextLocation.pathname;return tp(a.pathname,o)!=null||tp(a.pathname,s)!=null}var F5=x5();/**
|
|
61
|
+
* @license lucide-react v0.513.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const oU=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),lU=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Mw=e=>{const t=lU(e);return t.charAt(0).toUpperCase()+t.slice(1)},H5=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),uU=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
66
|
+
* @license lucide-react v0.513.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/var cU={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
71
|
+
* @license lucide-react v0.513.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const dU=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:s,iconNode:o,...u},d)=>v.createElement("svg",{ref:d,...cU,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:H5("lucide",a),...!s&&!uU(u)&&{"aria-hidden":"true"},...u},[...o.map(([f,m])=>v.createElement(f,m)),...Array.isArray(s)?s:[s]]));/**
|
|
76
|
+
* @license lucide-react v0.513.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const Re=(e,t)=>{const n=v.forwardRef(({className:r,...a},s)=>v.createElement(dU,{ref:s,iconNode:t,className:H5(`lucide-${oU(Mw(e))}`,`lucide-${e}`,r),...a}));return n.displayName=Mw(e),n};/**
|
|
81
|
+
* @license lucide-react v0.513.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const fU=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],hU=Re("activity",fU);/**
|
|
86
|
+
* @license lucide-react v0.513.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const mU=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],pU=Re("arrow-down-to-line",mU);/**
|
|
91
|
+
* @license lucide-react v0.513.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const gU=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Qd=Re("arrow-left",gU);/**
|
|
96
|
+
* @license lucide-react v0.513.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const bU=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],xU=Re("arrow-right",bU);/**
|
|
101
|
+
* @license lucide-react v0.513.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const yU=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],$5=Re("arrow-up",yU);/**
|
|
106
|
+
* @license lucide-react v0.513.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const vU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],EU=Re("ban",vU);/**
|
|
111
|
+
* @license lucide-react v0.513.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const _U=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],NU=Re("bot",_U);/**
|
|
116
|
+
* @license lucide-react v0.513.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const TU=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Y5=Re("box",TU);/**
|
|
121
|
+
* @license lucide-react v0.513.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const SU=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],ju=Re("brain",SU);/**
|
|
126
|
+
* @license lucide-react v0.513.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const wU=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],_f=Re("chart-column",wU);/**
|
|
131
|
+
* @license lucide-react v0.513.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const AU=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],yr=Re("check",AU);/**
|
|
136
|
+
* @license lucide-react v0.513.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const CU=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Vr=Re("chevron-down",CU);/**
|
|
141
|
+
* @license lucide-react v0.513.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const kU=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],v1=Re("chevron-left",kU);/**
|
|
146
|
+
* @license lucide-react v0.513.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const OU=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],m0=Re("chevron-right",OU);/**
|
|
151
|
+
* @license lucide-react v0.513.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const IU=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],q5=Re("chevron-up",IU);/**
|
|
156
|
+
* @license lucide-react v0.513.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const RU=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],MU=Re("chevrons-left",RU);/**
|
|
161
|
+
* @license lucide-react v0.513.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const DU=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],jU=Re("chevrons-right",DU);/**
|
|
166
|
+
* @license lucide-react v0.513.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const LU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ox=Re("circle-check",LU);/**
|
|
171
|
+
* @license lucide-react v0.513.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const PU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],vl=Re("circle-dot",PU);/**
|
|
176
|
+
* @license lucide-react v0.513.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const BU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],G5=Re("circle-x",BU);/**
|
|
181
|
+
* @license lucide-react v0.513.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const UU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],zU=Re("circle",UU);/**
|
|
186
|
+
* @license lucide-react v0.513.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const FU=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],HU=Re("clipboard",FU);/**
|
|
191
|
+
* @license lucide-react v0.513.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const $U=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],p0=Re("clock",$U);/**
|
|
196
|
+
* @license lucide-react v0.513.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const YU=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],K5=Re("cloud",YU);/**
|
|
201
|
+
* @license lucide-react v0.513.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const qU=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],GU=Re("code-xml",qU);/**
|
|
206
|
+
* @license lucide-react v0.513.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const KU=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ap=Re("copy",KU);/**
|
|
211
|
+
* @license lucide-react v0.513.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const VU=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],qm=Re("cpu",VU);/**
|
|
216
|
+
* @license lucide-react v0.513.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const WU=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],XU=Re("dollar-sign",WU);/**
|
|
221
|
+
* @license lucide-react v0.513.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const QU=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],ZU=Re("download",QU);/**
|
|
226
|
+
* @license lucide-react v0.513.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const JU=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],e7=Re("ellipsis-vertical",JU);/**
|
|
231
|
+
* @license lucide-react v0.513.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const t7=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],E1=Re("ellipsis",t7);/**
|
|
236
|
+
* @license lucide-react v0.513.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const n7=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],V5=Re("external-link",n7);/**
|
|
241
|
+
* @license lucide-react v0.513.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const r7=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],a7=Re("eye-off",r7);/**
|
|
246
|
+
* @license lucide-react v0.513.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const i7=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],s7=Re("eye",i7);/**
|
|
251
|
+
* @license lucide-react v0.513.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const o7=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],lo=Re("file-text",o7);/**
|
|
256
|
+
* @license lucide-react v0.513.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const l7=[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]],_1=Re("flag",l7);/**
|
|
261
|
+
* @license lucide-react v0.513.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const u7=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],c7=Re("gauge",u7);/**
|
|
266
|
+
* @license lucide-react v0.513.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const d7=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],Nf=Re("git-branch",d7);/**
|
|
271
|
+
* @license lucide-react v0.513.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const f7=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],h7=Re("git-commit-horizontal",f7);/**
|
|
276
|
+
* @license lucide-react v0.513.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const m7=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Dw=Re("git-merge",m7);/**
|
|
281
|
+
* @license lucide-react v0.513.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const p7=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],ol=Re("git-pull-request",p7);/**
|
|
286
|
+
* @license lucide-react v0.513.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const g7=[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]],b7=Re("grip-horizontal",g7);/**
|
|
291
|
+
* @license lucide-react v0.513.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const x7=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],y7=Re("hard-drive",x7);/**
|
|
296
|
+
* @license lucide-react v0.513.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const v7=[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],E7=Re("image-plus",v7);/**
|
|
301
|
+
* @license lucide-react v0.513.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const _7=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],N7=Re("image",_7);/**
|
|
306
|
+
* @license lucide-react v0.513.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const T7=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],N1=Re("link-2",T7);/**
|
|
311
|
+
* @license lucide-react v0.513.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const S7=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Nn=Re("loader-circle",S7);/**
|
|
316
|
+
* @license lucide-react v0.513.0 - ISC
|
|
317
|
+
*
|
|
318
|
+
* This source code is licensed under the ISC license.
|
|
319
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
+
*/const w7=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],A7=Re("maximize-2",w7);/**
|
|
321
|
+
* @license lucide-react v0.513.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/const C7=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],T1=Re("menu",C7);/**
|
|
326
|
+
* @license lucide-react v0.513.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const k7=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],O7=Re("message-circle-question",k7);/**
|
|
331
|
+
* @license lucide-react v0.513.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const I7=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],R7=Re("message-circle",I7);/**
|
|
336
|
+
* @license lucide-react v0.513.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const M7=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],D7=Re("message-square",M7);/**
|
|
341
|
+
* @license lucide-react v0.513.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const j7=[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]],L7=Re("mic",j7);/**
|
|
346
|
+
* @license lucide-react v0.513.0 - ISC
|
|
347
|
+
*
|
|
348
|
+
* This source code is licensed under the ISC license.
|
|
349
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
+
*/const P7=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],B7=Re("minimize-2",P7);/**
|
|
351
|
+
* @license lucide-react v0.513.0 - ISC
|
|
352
|
+
*
|
|
353
|
+
* This source code is licensed under the ISC license.
|
|
354
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
+
*/const U7=[["path",{d:"M5 12h14",key:"1ays0h"}]],z7=Re("minus",U7);/**
|
|
356
|
+
* @license lucide-react v0.513.0 - ISC
|
|
357
|
+
*
|
|
358
|
+
* This source code is licensed under the ISC license.
|
|
359
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
+
*/const F7=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],H7=Re("monitor",F7);/**
|
|
361
|
+
* @license lucide-react v0.513.0 - ISC
|
|
362
|
+
*
|
|
363
|
+
* This source code is licensed under the ISC license.
|
|
364
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
+
*/const $7=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],Y7=Re("moon",$7);/**
|
|
366
|
+
* @license lucide-react v0.513.0 - ISC
|
|
367
|
+
*
|
|
368
|
+
* This source code is licensed under the ISC license.
|
|
369
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
+
*/const q7=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],G7=Re("network",q7);/**
|
|
371
|
+
* @license lucide-react v0.513.0 - ISC
|
|
372
|
+
*
|
|
373
|
+
* This source code is licensed under the ISC license.
|
|
374
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
+
*/const K7=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],W5=Re("panel-right",K7);/**
|
|
376
|
+
* @license lucide-react v0.513.0 - ISC
|
|
377
|
+
*
|
|
378
|
+
* This source code is licensed under the ISC license.
|
|
379
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
+
*/const V7=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],W7=Re("paperclip",V7);/**
|
|
381
|
+
* @license lucide-react v0.513.0 - ISC
|
|
382
|
+
*
|
|
383
|
+
* This source code is licensed under the ISC license.
|
|
384
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
385
|
+
*/const X7=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],S1=Re("pen-line",X7);/**
|
|
386
|
+
* @license lucide-react v0.513.0 - ISC
|
|
387
|
+
*
|
|
388
|
+
* This source code is licensed under the ISC license.
|
|
389
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
390
|
+
*/const Q7=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],jw=Re("pencil",Q7);/**
|
|
391
|
+
* @license lucide-react v0.513.0 - ISC
|
|
392
|
+
*
|
|
393
|
+
* This source code is licensed under the ISC license.
|
|
394
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
395
|
+
*/const Z7=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],w1=Re("play",Z7);/**
|
|
396
|
+
* @license lucide-react v0.513.0 - ISC
|
|
397
|
+
*
|
|
398
|
+
* This source code is licensed under the ISC license.
|
|
399
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
400
|
+
*/const J7=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Da=Re("plus",J7);/**
|
|
401
|
+
* @license lucide-react v0.513.0 - ISC
|
|
402
|
+
*
|
|
403
|
+
* This source code is licensed under the ISC license.
|
|
404
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
405
|
+
*/const ez=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],ll=Re("refresh-cw",ez);/**
|
|
406
|
+
* @license lucide-react v0.513.0 - ISC
|
|
407
|
+
*
|
|
408
|
+
* This source code is licensed under the ISC license.
|
|
409
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
410
|
+
*/const tz=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],nz=Re("rotate-ccw",tz);/**
|
|
411
|
+
* @license lucide-react v0.513.0 - ISC
|
|
412
|
+
*
|
|
413
|
+
* This source code is licensed under the ISC license.
|
|
414
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
415
|
+
*/const rz=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],g0=Re("save",rz);/**
|
|
416
|
+
* @license lucide-react v0.513.0 - ISC
|
|
417
|
+
*
|
|
418
|
+
* This source code is licensed under the ISC license.
|
|
419
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
420
|
+
*/const az=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],tl=Re("search",az);/**
|
|
421
|
+
* @license lucide-react v0.513.0 - ISC
|
|
422
|
+
*
|
|
423
|
+
* This source code is licensed under the ISC license.
|
|
424
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
425
|
+
*/const iz=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Zd=Re("send",iz);/**
|
|
426
|
+
* @license lucide-react v0.513.0 - ISC
|
|
427
|
+
*
|
|
428
|
+
* This source code is licensed under the ISC license.
|
|
429
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
430
|
+
*/const sz=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],b0=Re("settings",sz);/**
|
|
431
|
+
* @license lucide-react v0.513.0 - ISC
|
|
432
|
+
*
|
|
433
|
+
* This source code is licensed under the ISC license.
|
|
434
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
435
|
+
*/const oz=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],Ou=Re("sparkles",oz);/**
|
|
436
|
+
* @license lucide-react v0.513.0 - ISC
|
|
437
|
+
*
|
|
438
|
+
* This source code is licensed under the ISC license.
|
|
439
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
440
|
+
*/const lz=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Vy=Re("square",lz);/**
|
|
441
|
+
* @license lucide-react v0.513.0 - ISC
|
|
442
|
+
*
|
|
443
|
+
* This source code is licensed under the ISC license.
|
|
444
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
445
|
+
*/const uz=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],cz=Re("sun",uz);/**
|
|
446
|
+
* @license lucide-react v0.513.0 - ISC
|
|
447
|
+
*
|
|
448
|
+
* This source code is licensed under the ISC license.
|
|
449
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
450
|
+
*/const dz=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],is=Re("trash-2",dz);/**
|
|
451
|
+
* @license lucide-react v0.513.0 - ISC
|
|
452
|
+
*
|
|
453
|
+
* This source code is licensed under the ISC license.
|
|
454
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
455
|
+
*/const fz=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],or=Re("triangle-alert",fz);/**
|
|
456
|
+
* @license lucide-react v0.513.0 - ISC
|
|
457
|
+
*
|
|
458
|
+
* This source code is licensed under the ISC license.
|
|
459
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
460
|
+
*/const hz=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],X5=Re("upload",hz);/**
|
|
461
|
+
* @license lucide-react v0.513.0 - ISC
|
|
462
|
+
*
|
|
463
|
+
* This source code is licensed under the ISC license.
|
|
464
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
465
|
+
*/const mz=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Q5=Re("user",mz);/**
|
|
466
|
+
* @license lucide-react v0.513.0 - ISC
|
|
467
|
+
*
|
|
468
|
+
* This source code is licensed under the ISC license.
|
|
469
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
470
|
+
*/const pz=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Z5=Re("users",pz);/**
|
|
471
|
+
* @license lucide-react v0.513.0 - ISC
|
|
472
|
+
*
|
|
473
|
+
* This source code is licensed under the ISC license.
|
|
474
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
475
|
+
*/const gz=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],J5=Re("wifi",gz);/**
|
|
476
|
+
* @license lucide-react v0.513.0 - ISC
|
|
477
|
+
*
|
|
478
|
+
* This source code is licensed under the ISC license.
|
|
479
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
480
|
+
*/const bz=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],xz=Re("wrench",bz);/**
|
|
481
|
+
* @license lucide-react v0.513.0 - ISC
|
|
482
|
+
*
|
|
483
|
+
* This source code is licensed under the ISC license.
|
|
484
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
485
|
+
*/const yz=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],yt=Re("x",yz);/**
|
|
486
|
+
* @license lucide-react v0.513.0 - ISC
|
|
487
|
+
*
|
|
488
|
+
* This source code is licensed under the ISC license.
|
|
489
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
490
|
+
*/const vz=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Tf=Re("zap",vz);function eI(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=eI(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function re(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=eI(e))&&(r&&(r+=" "),r+=t);return r}const Lw=e=>{let t;const n=new Set,r=(f,m)=>{const p=typeof f=="function"?f(t):f;if(!Object.is(p,t)){const b=t;t=m??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(x=>x(t,b))}},a=()=>t,u={setState:r,getState:a,getInitialState:()=>d,subscribe:f=>(n.add(f),()=>n.delete(f))},d=t=e(r,a,u);return u},Ez=(e=>e?Lw(e):Lw),_z=e=>e;function Nz(e,t=_z){const n=Rd.useSyncExternalStore(e.subscribe,Rd.useCallback(()=>t(e.getState()),[e,t]),Rd.useCallback(()=>t(e.getInitialState()),[e,t]));return Rd.useDebugValue(n),n}const Pw=e=>{const t=Ez(e),n=r=>Nz(t,r);return Object.assign(n,t),n},ei=(e=>e?Pw(e):Pw),Ix="fs-theme";function tI(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Bw(e){return e==="system"?tI():e}function Uw(e){e==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e)}const Wy=ei((e,t)=>({preference:localStorage.getItem(Ix)??"system",resolved:Bw(localStorage.getItem(Ix)??"system"),cycle(){const n=["system","light","dark"],r=n[(n.indexOf(t().preference)+1)%n.length],a=Bw(r);localStorage.setItem(Ix,r),Uw(r),e({preference:r,resolved:a})},init(){Uw(t().preference);const n=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{const{preference:a}=t();if(a==="system"){const s=tI();e({resolved:s})}};return n.addEventListener("change",r),()=>n.removeEventListener("change",r)}})),ip="fourth-spark-server-url";function nI(){if(typeof window>"u")return!1;const t=window.Capacitor;return typeof(t==null?void 0:t.isNativePlatform)=="function"&&t.isNativePlatform()}function A1(){return localStorage.getItem(ip)??""}function Tz(e){const t=e.replace(/\/+$/,"");t?localStorage.setItem(ip,t):localStorage.removeItem(ip)}function Xy(){return localStorage.getItem(ip)??""}class ts extends Error{constructor(n,r){super(n);un(this,"status");this.name="ApiError",this.status=r}}async function Ce(e,t){let n;try{n=await fetch(A1()+e,{...t,headers:{Accept:"application/json",...t!=null&&t.body?{"Content-Type":"application/json"}:{},...t==null?void 0:t.headers}})}catch(a){throw new ts(a instanceof Error?a.message:"Network request failed",0)}if(!n.ok){const a=await n.text().catch(()=>"");throw new ts(a.trim()||`${n.status} ${n.statusText}`,n.status)}if(n.status===204)return;const r=await n.text();if(r)return JSON.parse(r)}function Zr(e,...t){if(Array.isArray(e))return e;if(e&&typeof e=="object"){const n=e;for(const r of[...t,"data","items"])if(Array.isArray(n[r]))return n[r]}return[]}async function Sz(){return Zr(await Ce("/api/repos"),"repos")}async function wz(e,t,n,r){return Ce("/api/repos",{method:"POST",body:JSON.stringify({name:e,gitUrl:t,localPath:n,runtimeType:r})})}async function Az(e){return Ce("/api/repos/resolve",{method:"POST",body:JSON.stringify({localPath:e})})}async function Cz(e){await Ce(`/api/repos/${encodeURIComponent(e)}`,{method:"DELETE"})}async function kz(e){await Ce(`/api/repos/${encodeURIComponent(e)}/start`,{method:"POST"})}async function Oz(e){await Ce(`/api/repos/${encodeURIComponent(e)}/stop`,{method:"POST"})}async function Iz(e){return Ce(`/api/repos/${encodeURIComponent(e)}/branches`)}async function Rz(e,t){return Ce(`/api/repos/${encodeURIComponent(e)}/checkout`,{method:"POST",body:JSON.stringify({branch:t})})}async function Mz(e){return Ce(`/api/repos/${encodeURIComponent(e)}/pull`,{method:"POST"})}function et(e){return`/api/repos/${encodeURIComponent(e)}`}async function Dz(e){return Zr(await Ce(`${et(e)}/workspaces`),"workspaces")}async function jz(e,t){await Ce(`${et(e)}/workspaces/${encodeURIComponent(t)}`,{method:"DELETE"})}async function Lz(e){return Ce(`${et(e)}/workspaces/cleanup`,{method:"POST"})}async function Pz(e,t){await Ce(`/api/repos/${e}/worktree`,{method:"PATCH",body:JSON.stringify({enabled:t})})}async function Bz(e,t){await Ce(`/api/repos/${e}/runtime`,{method:"PATCH",body:JSON.stringify({runtimeType:t})})}async function Uz(e){return Zr(await Ce(`${et(e)}/sessions`),"sessions")}async function zz(e,t,n,r,a,s,o,u){return Ce(`${et(e)}/sessions`,{method:"POST",body:JSON.stringify({message:t,agent:n,model:r,variant:a,issueId:s,customAgentId:o,files:u})})}async function Fz(e,t){await Ce(`${et(e)}/sessions/${encodeURIComponent(t)}`,{method:"DELETE"})}async function Hz(e,t,n,r,a,s,o){await Ce(`${et(e)}/sessions/${encodeURIComponent(t)}/prompt`,{method:"POST",body:JSON.stringify({content:n,agent:r,model:a,variant:s,files:o})})}async function $z(e,t){await Ce(`${et(e)}/sessions/${encodeURIComponent(t)}/abort`,{method:"POST"})}async function Yz(e,t,n){await Ce(`${et(e)}/sessions/${encodeURIComponent(t)}/questions/reply`,{method:"POST",body:JSON.stringify({answers:n})})}async function qz(e,t){await Ce(`${et(e)}/sessions/${encodeURIComponent(t)}/questions/reject`,{method:"POST"})}async function Gz(e,t,n){return Ce(`${et(e)}/sessions/${encodeURIComponent(t)}/revert`,{method:"POST",body:JSON.stringify({messageID:n})})}function zw(e){const t=e,n=t.info;if(n&&typeof n.id=="string"){const r=Array.isArray(t.parts)?t.parts:void 0;return{...n,...r?{parts:r}:{}}}return t}async function Fw(e,t,n){const r=new URLSearchParams;n!=null&&n.limit&&r.set("limit",String(n.limit)),n!=null&&n.before&&r.set("before",n.before);const a=r.toString(),s=`${et(e)}/sessions/${encodeURIComponent(t)}/messages${a?`?${a}`:""}`,o=await Ce(s);if(Array.isArray(o)){const f=o.map(zw);return{messages:f,total:f.length,hasMore:!1}}const u=o,d=Array.isArray(u.messages)?u.messages:[];return{messages:d.map(zw),total:u.total??d.length,hasMore:u.hasMore??!1}}async function Kz(e,t){return Ce(`${et(e)}/sessions/${encodeURIComponent(t)}/status`)}async function Vz(e,t){return Ce(`${et(e)}/sessions/${encodeURIComponent(t)}/links`)}async function Wz(e,t){return Ce(`${et(e)}/sessions/snapshot/${encodeURIComponent(t)}`)}async function rI(e){return Ce(`${et(e)}/sessions/all-links`)}async function Xz(e,t,n,r){await Ce(`${et(e)}/sessions/${encodeURIComponent(t)}/links`,{method:"POST",body:JSON.stringify({type:n,targetId:r})})}async function Qz(e,t,n,r){await Ce(`${et(e)}/sessions/${encodeURIComponent(t)}/links`,{method:"DELETE",body:JSON.stringify({type:n,targetId:r})})}async function aI(){return Zr(await Ce("/api/custom-agents"))}async function Zz(e){return Ce("/api/custom-agents",{method:"POST",body:JSON.stringify(e)})}async function Jz(e,t){return Ce(`/api/custom-agents/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(t)})}async function iI(e){await Ce(`/api/custom-agents/${encodeURIComponent(e)}`,{method:"DELETE"})}async function Hw(e){return Ce(`/api/custom-agents/${encodeURIComponent(e)}/export`)}async function eF(e){return Ce("/api/custom-agents/import",{method:"POST",body:JSON.stringify(e)})}async function sI(e,t){const n=new URLSearchParams;t!=null&&t.category&&n.set("category",t.category),t!=null&&t.includeSuperseded&&n.set("includeSuperseded","true");const r=n.toString();return Ce(`/api/custom-agents/${encodeURIComponent(e)}/memories${r?`?${r}`:""}`)}async function tF(e,t,n){return Ce(`/api/custom-agents/${encodeURIComponent(e)}/memories/${encodeURIComponent(t)}`,{method:"PUT",body:JSON.stringify(n)})}async function nF(e,t){await Ce(`/api/custom-agents/${encodeURIComponent(e)}/memories/${encodeURIComponent(t)}`,{method:"DELETE"})}async function rF(e,t){return Ce(`/api/custom-agents/${encodeURIComponent(e)}/memories/extract`,{method:"POST",body:JSON.stringify({sessionIds:t})})}async function $w(e){return Ce(`/api/custom-agents/${encodeURIComponent(e)}/memories/stats`)}async function aF(e){return Ce(`/api/custom-agents/${encodeURIComponent(e)}/memories/consolidate`,{method:"POST"})}async function C1(e){return Ce(`/api/custom-agents/${encodeURIComponent(e)}/sessions`)}async function oI(e){return Zr(await Ce(`${et(e)}/custom-agents`))}async function iF(e,t){return Ce(`${et(e)}/custom-agents`,{method:"POST",body:JSON.stringify(t)})}async function Sf(e){return Zr(await Ce(`${et(e)}/models`))}async function lI(){return Zr(await Ce("/api/prompt-fragments"))}async function sF(e){return Ce("/api/prompt-fragments",{method:"POST",body:JSON.stringify(e)})}async function oF(e,t){return Ce(`/api/prompt-fragments/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(t)})}async function lF(e){await Ce(`/api/prompt-fragments/${encodeURIComponent(e)}`,{method:"DELETE"})}async function Yw(e){return Zr(await Ce(`${et(e)}/tags`))}async function qw(e,t){return Zr(await Ce(`${et(e)}/milestones`))}async function Gw(e,t="open"){return Zr(await Ce(`${et(e)}/issues?state=${encodeURIComponent(t)}`),"issues")}async function uF(e,t="all"){return Ce(`${et(e)}/issues/sync`,{method:"POST",body:JSON.stringify({state:t})})}async function cF(e,t,n){return Ce(`${et(e)}/issues`,{method:"POST",body:JSON.stringify({title:t,body:n})})}async function dF(e,t,n){await Ce(`${et(e)}/issues/${t}/children`,{method:"POST",body:JSON.stringify({childNumber:n})})}async function uI(e,t,n){return Ce(`${et(e)}/issues/${t}`,{method:"PATCH",body:JSON.stringify(n)})}async function fF(e,t){return Zr(await Ce(`${et(e)}/issues/${t}/pulls`))}async function Kw(e,t="open"){return Zr(await Ce(`${et(e)}/pulls?state=${encodeURIComponent(t)}`))}async function hF(e,t="all"){return Ce(`${et(e)}/pulls/sync`,{method:"POST",body:JSON.stringify({state:t})})}async function mF(e,t){return Ce(`${et(e)}/pulls/${t}`)}async function pF(e,t){await Ce(`${et(e)}/pulls/${t}/merge`,{method:"POST"})}async function k1(e,t){return Zr(await Ce(`${et(e)}/pulls/${t}/issues`))}async function gF(e,t,n){await Ce(`${et(e)}/pulls/${t}/issues`,{method:"POST",body:JSON.stringify({issueNumber:n})})}async function bF(e,t,n){await Ce(`${et(e)}/pulls/${t}/issues/${n}`,{method:"DELETE"})}async function xF(e,t){return Ce(`${et(e)}/pulls/${t}/comments`)}async function yF(e,t){return Ce(`${et(e)}/issues/${t}/comments`)}async function Vw(e,t,n){return Ce(`${et(e)}/issues/${t}/comments`,{method:"POST",body:JSON.stringify({body:n})})}async function vF(e,t,n){return Ce(`${et(e)}/issues/${t}/polish`,{method:"POST",body:JSON.stringify({draft:n})})}async function Ww(e,t){return Ce(`${et(e)}/issues/${t}/draft`)}async function EF(e,t,n){return Ce(`${et(e)}/issues/polish-create`,{method:"POST",body:JSON.stringify({title:t,body:n})})}async function Xw(e){return Ce(`${et(e)}/issues/draft-create`)}async function _F(e){await Ce(`${et(e)}/issues/draft-create`,{method:"DELETE"})}async function NF(e,t,n){await Ce(`${et(e)}/sessions/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify({title:n})})}async function TF(e,t,n){await Ce(`${et(e)}/sessions/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify({completedAt:n})})}async function SF(){return Ce("/api/agents-md")}async function wF(e){await Ce("/api/agents-md",{method:"PUT",body:JSON.stringify({content:e})})}async function AF(e){return Ce(`/api/repos/${encodeURIComponent(e)}/agents-md`)}async function CF(e,t){await Ce(`/api/repos/${encodeURIComponent(e)}/agents-md`,{method:"PUT",body:JSON.stringify({content:t})})}function kF(e){return`${A1()}${et(e)}/events`}async function OF(e){return Ce(`${et(e)}/sessions/status`)}async function wf(){return Ce("/api/settings")}async function Qy(e,t){await Ce(`/api/settings/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify({value:t})})}async function Zy(){return Ce("/api/cloud/status")}async function IF(){return Ce("/api/cloud/reload",{method:"POST"})}async function RF(e){try{return(await Ce("/api/cloud/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})})).connected}catch{return!1}}async function MF(){return Zr(await Ce("/api/git-hosts"),"gitHosts")}async function DF(e,t,n,r="gitea"){return Ce("/api/git-hosts",{method:"POST",body:JSON.stringify({host:e,name:t,token:n,platform:r})})}async function jF(e){await Ce(`/api/git-hosts/${encodeURIComponent(e)}`,{method:"DELETE"})}async function cI(){return Ce("/api/usage")}async function dI(e){return Ce("/api/usage/switch",{method:"POST",body:JSON.stringify({accountId:e})})}async function LF(e,t="ios"){await Ce("/api/push/register",{method:"POST",body:JSON.stringify({token:e,platform:t})})}async function PF(e,t){return Ce(`${et(e)}/sessions/${encodeURIComponent(t)}/files`)}function BF(e,t,n){return`${A1()}${et(e)}/sessions/${encodeURIComponent(t)}/files/${n}`}async function Rx(e,t,n,r){const a=new URLSearchParams({from:String(e),to:String(t),groupBy:n});return Ce(`/api/analytics/summary?${a}`)}const Ws="fs-active-repo",Fe=ei((e,t)=>({repos:[],activeRepoId:localStorage.getItem(Ws),loading:!1,loadError:null,loadRepos:async()=>{e({loading:!0,loadError:null});try{const n=await Sz(),r=t().activeRepoId,a=r&&n.some(o=>o.id===r);e({repos:n,loading:!1,activeRepoId:a?r:n.length>0?n[0].id:null});const s=t().activeRepoId;s?localStorage.setItem(Ws,s):localStorage.removeItem(Ws)}catch(n){e({loading:!1,loadError:n instanceof Error?n.message:"Failed to load repos"})}},setActiveRepo:n=>{e({activeRepoId:n}),n?localStorage.setItem(Ws,n):localStorage.removeItem(Ws)},addRepo:async(n,r,a,s)=>{try{const o=await wz(n,r,a,s);return e(u=>({repos:[...u.repos,o],activeRepoId:o.id})),localStorage.setItem(Ws,o.id),o}catch(o){return e({loadError:o instanceof Error?o.message:"Failed to add repo"}),null}},removeRepo:async n=>{try{await Cz(n)}catch{}e(r=>{const a=r.repos.filter(o=>o.id!==n),s=r.activeRepoId===n?a.length>0?a[0].id:null:r.activeRepoId;return s?localStorage.setItem(Ws,s):localStorage.removeItem(Ws),{repos:a,activeRepoId:s}})},updateRepoBranch:(n,r)=>{e(a=>({repos:a.repos.map(s=>s.id===n?{...s,branch:r}:s)}))}})),Dr=e=>{var t;return((t=e.repos.find(n=>n.id===e.activeRepoId))==null?void 0:t.name)??null},Qw="fs-nav-collapsed",Zw="fs-session-panel-collapsed",sp=ei(e=>({navCollapsed:localStorage.getItem(Qw)==="true",sessionPanelCollapsed:localStorage.getItem(Zw)==="true",toggleNav(){e(t=>{const n=!t.navCollapsed;return localStorage.setItem(Qw,String(n)),{navCollapsed:n}})},toggleSessionPanel(){e(t=>{const n=!t.sessionPanelCollapsed;return localStorage.setItem(Zw,String(n)),{sessionPanelCollapsed:n}})}})),fI=[{segment:"run",icon:w1,label:"运行面板",global:!1},{segment:"dev/issues",icon:GU,label:"研发",global:!1,matchPrefix:"dev"},{segment:"agents",icon:NU,label:"Agents",global:!1}];function hI(e,t,n){return t?`/${e}`:n?`/${encodeURIComponent(n)}/${e}`:`/${e}`}function mI(e,t,n){if(!e.matchPrefix)return!1;const r=e.global?`/${e.matchPrefix}`:n?`/${encodeURIComponent(n)}/${e.matchPrefix}`:null;return r?t===r||t.startsWith(`${r}/`):!1}function UF(e){const t=e.lastIndexOf("/");return t>=0?e.slice(t+1):e}function zF({repos:e,activeRepoId:t,onRepoChange:n}){const r=ur(),[a,s]=v.useState(!1),o=v.useRef(null),u=e.find(f=>f.id===t),d=v.useCallback(()=>s(!1),[]);return v.useEffect(()=>{if(!a)return;const f=m=>{o.current&&!o.current.contains(m.target)&&d()};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[a,d]),c.jsxs("div",{ref:o,className:"relative",children:[c.jsxs("button",{type:"button",onClick:()=>s(f=>!f),className:"flex max-w-[140px] items-center gap-1 rounded-md border border-line bg-base px-2 py-1 text-xs text-fg-2 transition-colors hover:border-blue-500 sm:max-w-[200px]",children:[c.jsx(Y5,{className:"h-3 w-3 shrink-0 text-fg-4"}),c.jsxs("span",{className:"truncate",children:[c.jsx("span",{className:"sm:hidden",children:u?UF(u.name):""}),c.jsx("span",{className:"hidden sm:inline",children:(u==null?void 0:u.name)??""})]}),c.jsx(Vr,{className:re("h-3 w-3 shrink-0 text-fg-4 transition-transform",a&&"rotate-180")})]}),a&&c.jsxs("div",{className:"absolute left-0 top-full z-50 mt-1 w-64 overflow-hidden rounded-lg border border-line bg-surface shadow-lg",children:[c.jsx("div",{className:"max-h-64 overflow-y-auto py-1",children:e.map(f=>c.jsxs("button",{type:"button",onClick:()=>{n(f.id),d()},className:re("flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs transition-colors",f.id===t?"font-medium text-blue-600":"text-fg-2 hover:bg-elevated"),children:[f.id===t?c.jsx(yr,{className:"h-3 w-3 shrink-0"}):c.jsx("span",{className:"h-3 w-3 shrink-0"}),c.jsx("span",{className:"truncate",children:f.name})]},f.id))}),c.jsx("div",{className:"border-t border-line",children:c.jsxs("button",{type:"button",onClick:()=>{r("/repos"),d()},className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-fg-3 transition-colors hover:bg-elevated hover:text-fg",children:[c.jsx(b0,{className:"h-3 w-3 shrink-0"}),c.jsx("span",{children:"管理仓库"})]})})]})]})}function FF({repoId:e,currentBranch:t}){const n=Fe(T=>T.updateRepoBranch),[r,a]=v.useState(!1),[s,o]=v.useState(null),[u,d]=v.useState(!1),[f,m]=v.useState(null),[p,b]=v.useState(null),x=v.useRef(null),E=v.useCallback(()=>{a(!1),b(null)},[]);v.useEffect(()=>{if(!r)return;const T=C=>{x.current&&!x.current.contains(C.target)&&E()};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[r,E]);const _=async()=>{if(r){E();return}a(!0),d(!0),b(null);try{o(await Iz(e))}catch{b("加载分支失败")}finally{d(!1)}},S=async T=>{if(!(T===t||f)){m(T),b(null);try{const C=await Rz(e,T);n(e,C.branch),E()}catch(C){b(C instanceof Error?C.message:"切换失败")}finally{m(null)}}};return t?c.jsxs("div",{ref:x,className:"relative",children:[c.jsxs("button",{type:"button",onClick:_,className:"flex items-center gap-1 rounded-md bg-elevated px-2 py-1 text-xs text-fg-3 transition-colors hover:bg-blue-500/10 hover:text-blue-600",children:[c.jsx(Nf,{className:"h-3 w-3"}),t,c.jsx(Vr,{className:re("h-3 w-3 transition-transform",r&&"rotate-180")})]}),r&&c.jsxs("div",{className:"absolute right-0 top-full z-50 mt-1 w-56 overflow-hidden rounded-lg border border-line bg-surface shadow-lg",children:[u?c.jsx("div",{className:"flex items-center justify-center py-4",children:c.jsx(Nn,{className:"h-4 w-4 animate-spin text-fg-4"})}):s?c.jsxs("div",{className:"max-h-64 overflow-y-auto py-1",children:[s.local.map(T=>c.jsxs("button",{type:"button",disabled:f!==null,onClick:()=>S(T),className:re("flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs transition-colors",T===t?"font-medium text-blue-600":"text-fg-2 hover:bg-elevated"),children:[T===t?c.jsx(yr,{className:"h-3 w-3 shrink-0"}):f===T?c.jsx(Nn,{className:"h-3 w-3 shrink-0 animate-spin"}):c.jsx("span",{className:"h-3 w-3 shrink-0"}),c.jsx("span",{className:"truncate",children:T})]},T)),s.remote.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mx-3 my-1 border-t border-line"}),c.jsx("div",{className:"px-3 py-1 text-[10px] font-medium uppercase tracking-wider text-fg-4",children:"Remote"}),s.remote.map(T=>c.jsxs("button",{type:"button",disabled:f!==null,onClick:()=>S(T),className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs text-fg-2 transition-colors hover:bg-elevated",children:[f===T?c.jsx(Nn,{className:"h-3 w-3 shrink-0 animate-spin"}):c.jsx("span",{className:"h-3 w-3 shrink-0"}),c.jsx("span",{className:"truncate",children:T})]},`remote-${T}`))]})]}):null,p&&c.jsx("div",{className:"border-t border-line px-3 py-2 text-xs text-red-500",children:p})]})]}):null}function HF(){const[e,t]=v.useState(null);return v.useEffect(()=>{const n=()=>fetch("/api/health").then(s=>s.json()).then(s=>{s.latestVersion&&s.latestVersion!=="0.11.4"&&t(s.latestVersion)}).catch(()=>{});n();const r=setInterval(n,30*6e4),a=()=>n();return window.addEventListener("focus",a),()=>{clearInterval(r),window.removeEventListener("focus",a)}},[]),e}function $F({navigate:e,cycle:t,themeLabel:n,ThemeIcon:r}){const[a,s]=v.useState(!1),o=v.useRef(null);return v.useEffect(()=>{if(!a)return;const u=d=>{o.current&&!o.current.contains(d.target)&&s(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[a]),c.jsxs("div",{ref:o,className:"relative md:hidden",children:[c.jsx("button",{type:"button",onClick:()=>s(u=>!u),"aria-label":"更多",className:"flex h-8 w-8 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:c.jsx(e7,{className:"h-4 w-4"})}),a&&c.jsxs("div",{className:"absolute right-0 top-full z-50 mt-1 w-40 overflow-hidden rounded-lg border border-line bg-surface shadow-lg",children:[c.jsxs("button",{type:"button",onClick:()=>{e("/analytics"),s(!1)},className:"flex w-full items-center gap-2.5 px-3 py-2 text-left text-xs text-fg-2 transition-colors hover:bg-elevated",children:[c.jsx(_f,{className:"h-3.5 w-3.5 text-fg-4"}),"统计"]}),c.jsxs("button",{type:"button",onClick:()=>{e("/settings"),s(!1)},className:"flex w-full items-center gap-2.5 px-3 py-2 text-left text-xs text-fg-2 transition-colors hover:bg-elevated",children:[c.jsx(b0,{className:"h-3.5 w-3.5 text-fg-4"}),"设置"]}),c.jsxs("button",{type:"button",onClick:()=>{t(),s(!1)},className:"flex w-full items-center gap-2.5 px-3 py-2 text-left text-xs text-fg-2 transition-colors hover:bg-elevated",children:[c.jsx(r,{className:"h-3.5 w-3.5 text-fg-4"}),n]}),c.jsxs("a",{href:"https://github.com/kinminghao/fourth-spark",target:"_blank",rel:"noopener noreferrer",onClick:()=>s(!1),className:"flex w-full items-center gap-2.5 px-3 py-2 text-left text-xs text-fg-2 transition-colors hover:bg-elevated",children:[c.jsx("svg",{className:"h-3.5 w-3.5 text-fg-4",viewBox:"0 0 24 24",fill:"currentColor",children:c.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})}),"GitHub"]})]})]})}function YF(){const e=ur(),t=lr(),n=Fe(p=>p.repos),r=Fe(p=>p.activeRepoId),a=Fe(p=>p.setActiveRepo),s=Wy(p=>p.preference),o=Wy(p=>p.cycle),u=s==="light"?cz:s==="dark"?Y7:H7,d=n.find(p=>p.id===r),f=HF(),m=p=>{var _;if(!p)return;a(p);const b=n.find(S=>S.id===p);if(!b)return;const x=t.pathname.match(/\/dev\/(issues|pulls)/);if(x){e(`/${encodeURIComponent(b.name)}/dev/${x[1]}`);return}const E=((_=t.pathname.match(/\/(run|agents|issues|pulls)/))==null?void 0:_[1])??"run";e(`/${encodeURIComponent(b.name)}/${E}`)};return c.jsxs("header",{className:"shrink-0 border-b border-line bg-surface pt-[var(--safe-top)]",children:[c.jsxs("div",{className:"flex h-12 items-center justify-between px-4",children:[c.jsxs("div",{className:"flex items-center gap-2.5",children:[c.jsx(Tf,{className:"h-5 w-5 text-blue-500"}),c.jsx("span",{className:"hidden text-sm font-bold tracking-tight text-fg sm:inline",children:"Fourth Spark"}),c.jsxs("span",{className:"hidden rounded bg-elevated px-1.5 py-0.5 text-[10px] font-medium tabular-nums text-fg-4 sm:inline",children:["v","0.11.4"]}),f&&c.jsxs("span",{className:"hidden text-[10px] text-amber-500 sm:inline",children:["→ v",f," 可用,运行 ",c.jsx("code",{className:"rounded bg-amber-500/10 px-1 font-mono",children:"fourth-spark upgrade"})," 更新"]})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[n.length>0&&c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(zF,{repos:n,activeRepoId:r,onRepoChange:m}),d&&r&&c.jsx(FF,{repoId:r,currentBranch:d.branch})]}),c.jsxs("div",{className:"hidden items-center gap-1 md:flex",children:[c.jsx("button",{type:"button",onClick:()=>e("/analytics"),"aria-label":"统计",className:"flex h-8 w-8 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:c.jsx(_f,{className:"h-4 w-4"})}),c.jsx("button",{type:"button",onClick:()=>e("/settings"),"aria-label":"设置",className:"flex h-8 w-8 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:c.jsx(b0,{className:"h-4 w-4"})}),c.jsx("a",{href:"https://github.com/kinminghao/fourth-spark",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",className:"flex h-8 w-8 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:c.jsx("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor",children:c.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})}),c.jsx("button",{type:"button",onClick:o,"aria-label":`主题: ${s}`,className:"flex h-8 w-8 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:c.jsx(u,{className:"h-4 w-4"})})]}),c.jsx($F,{navigate:e,cycle:o,themeLabel:`主题: ${s}`,ThemeIcon:u})]})]}),f&&c.jsx("div",{className:"border-t border-line px-4 py-1.5 sm:hidden",children:c.jsxs("span",{className:"text-[10px] text-amber-500",children:["→ v",f," 可用,运行 ",c.jsx("code",{className:"rounded bg-amber-500/10 px-1 font-mono",children:"fourth-spark upgrade"})," 更新"]})})]})}function qF(){const e=Fe(Dr),t=sp(a=>a.navCollapsed),n=sp(a=>a.toggleNav),r=lr();return c.jsxs("nav",{className:re("hidden shrink-0 flex-col border-r border-line bg-surface py-2 transition-[width] duration-200 ease-in-out md:flex",t?"w-14":"w-48"),children:[c.jsx("div",{className:"flex flex-1 flex-col",children:fI.map(a=>{const s=mI(a,r.pathname,e);return c.jsxs(rp,{to:hI(a.segment,a.global,e),title:t?a.label:void 0,className:({isActive:o})=>re("mx-2 flex items-center rounded-md py-2 text-sm transition-colors",t?"justify-center px-2":"gap-2.5 px-3",o||s?"bg-blue-500/10 font-medium text-blue-600":"text-fg-3 hover:bg-elevated hover:text-fg"),children:[c.jsx(a.icon,{className:"h-4 w-4 shrink-0"}),c.jsx("span",{className:re("truncate transition-[opacity,max-width] duration-200 ease-in-out",t?"max-w-0 opacity-0":"max-w-[8rem] opacity-100"),children:a.label})]},a.segment)})}),c.jsxs(rp,{to:"/settings",title:t?"设置":void 0,className:({isActive:a})=>re("mx-2 flex items-center rounded-md py-2 text-sm transition-colors",t?"justify-center px-2":"gap-2.5 px-3",a?"bg-blue-500/10 font-medium text-blue-600":"text-fg-4 hover:bg-elevated hover:text-fg-2"),children:[c.jsx(b0,{className:"h-4 w-4 shrink-0"}),c.jsx("span",{className:re("truncate transition-[opacity,max-width] duration-200 ease-in-out",t?"max-w-0 opacity-0":"max-w-[8rem] opacity-100"),children:"设置"})]}),c.jsx("button",{type:"button",onClick:n,title:t?"展开导航":"收起导航",className:"mx-2 flex items-center justify-center rounded-md py-2 text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:t?c.jsx(jU,{className:"h-4 w-4"}):c.jsx(MU,{className:"h-4 w-4"})})]})}function GF(){const e=Fe(Dr),t=lr();return c.jsx("nav",{className:"fixed bottom-0 left-0 right-0 z-30 border-t border-line bg-surface pb-[var(--safe-bottom)] md:hidden",children:c.jsx("div",{className:"flex h-14 items-center justify-around",children:fI.map(n=>{const r=mI(n,t.pathname,e);return c.jsx(rp,{to:hI(n.segment,n.global,e),"aria-label":n.label,className:({isActive:a})=>re("flex h-10 w-10 items-center justify-center rounded-md transition-colors",a||r?"bg-blue-500/10 text-blue-600":"text-fg-3 hover:bg-elevated hover:text-fg"),children:c.jsx(n.icon,{className:"h-5 w-5 shrink-0"})},n.segment)})})})}function KF(){return c.jsxs("div",{className:"flex h-full flex-col overflow-hidden bg-base text-fg",children:[c.jsx(YF,{}),c.jsxs("div",{className:"flex min-h-0 flex-1",children:[c.jsx(qF,{}),c.jsx("main",{className:"flex min-w-0 flex-1 flex-col overflow-hidden pb-[calc(3.5rem_+_var(--safe-bottom))] md:pb-0",children:c.jsx(S9,{})})]}),c.jsx(GF,{})]})}let VF=0;const gn=ei(e=>({toasts:[],addToast:(t,n="info",r,a)=>{const s=(a==null?void 0:a.id)??`toast-${++VF}-${Date.now()}`;e(o=>o.toasts.some(u=>u.id===s)?o:{toasts:[...o.toasts,{id:s,message:t,variant:n,sessionId:r,persistent:a==null?void 0:a.persistent}]}),a!=null&&a.persistent||setTimeout(()=>{e(o=>({toasts:o.toasts.filter(u=>u.id!==s)}))},4e3)},removeToast:t=>{e(n=>({toasts:n.toasts.filter(r=>r.id!==t)}))}}));function WF({onClose:e}){const[t,n]=v.useState(""),[r,a]=v.useState(""),[s,o]=v.useState(""),[u,d]=v.useState("opencode"),[f,m]=v.useState(!1),[p,b]=v.useState(""),x=Fe(C=>C.addRepo),E=r.trim()!==""&&s.trim()!==""&&t.trim()!==""&&!f,_=async C=>{const A=C.trim();if(A){m(!0),b("");try{const k=await Az(A);k.name&&!r.trim()&&a(k.name),k.gitUrl&&!s.trim()&&o(k.gitUrl)}catch(k){const I=k instanceof Error?k.message:"无法解析路径";try{const O=JSON.parse(I);b(O.error??I)}catch{b(I)}}m(!1)}},S=v.useRef(_);S.current=_,v.useEffect(()=>{const C=t.trim();if(!C)return;const A=setTimeout(()=>{S.current(C)},500);return()=>clearTimeout(A)},[t]);const T=async()=>{if(!E)return;b(""),await x(r.trim(),s.trim(),t.trim(),u)&&e()};return c.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:e,children:c.jsxs("div",{className:"w-full max-w-md rounded-xl border border-line bg-surface p-6 shadow-2xl",onClick:C=>C.stopPropagation(),children:[c.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[c.jsx("h2",{className:"text-base font-semibold text-fg",children:"添加仓库"}),c.jsx("button",{type:"button",onClick:e,className:"rounded-md p-1 text-fg-4 hover:bg-elevated hover:text-fg-2",children:c.jsx(yt,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"flex flex-col gap-4",children:[c.jsxs("div",{className:"flex flex-col gap-1.5",children:[c.jsx("label",{htmlFor:"m-path",className:"text-xs font-medium text-fg-3",children:"本地路径"}),c.jsx("input",{id:"m-path",value:t,onChange:C=>n(C.target.value),onBlur:C=>void _(C.target.value),placeholder:"/Users/you/code/repo",autoFocus:!0,className:"w-full rounded-lg border border-line bg-base px-3 py-2 font-mono text-sm text-fg placeholder:text-fg-5 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20"}),c.jsx("span",{className:"text-[11px] text-fg-5",children:f?"正在读取 Git 信息…":"输入路径后自动读取仓库信息"})]}),c.jsxs("div",{className:"flex flex-col gap-1.5",children:[c.jsx("label",{htmlFor:"m-name",className:"text-xs font-medium text-fg-3",children:"名称"}),c.jsx("input",{id:"m-name",value:r,onChange:C=>a(C.target.value),placeholder:"my-project",className:"w-full rounded-lg border border-line bg-base px-3 py-2 text-sm text-fg placeholder:text-fg-5 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20"})]}),c.jsxs("div",{className:"flex flex-col gap-1.5",children:[c.jsx("label",{htmlFor:"m-git",className:"text-xs font-medium text-fg-3",children:"Git 远程地址"}),c.jsx("input",{id:"m-git",value:s,onChange:C=>o(C.target.value),placeholder:"https://github.com/org/repo.git",className:"w-full rounded-lg border border-line bg-base px-3 py-2 font-mono text-xs text-fg placeholder:text-fg-5 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20"})]}),c.jsxs("div",{className:"flex flex-col gap-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-fg-3",children:"运行时"}),c.jsx("div",{className:"flex gap-2",children:[{value:"opencode",label:"OpenCode"},{value:"claude-code",label:"Claude Code"}].map(C=>c.jsx("button",{type:"button",onClick:()=>d(C.value),className:`flex-1 rounded-lg border px-3 py-2 text-sm font-medium transition-colors ${u===C.value?"border-blue-500 bg-blue-500/10 text-blue-600":"border-line bg-base text-fg-4 hover:bg-elevated hover:text-fg-2"}`,children:C.label},C.value))}),c.jsx("span",{className:"text-[11px] text-fg-5",children:u==="claude-code"?"需要本地安装 Claude Code CLI":"需要本地安装 OpenCode CLI"})]}),p&&c.jsx("p",{className:"rounded-md bg-red-500/10 px-3 py-2 text-xs text-red-500",children:p}),c.jsxs("div",{className:"mt-1 flex items-center justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:e,className:"rounded-lg border border-line px-4 py-2 text-sm text-fg-3 transition-colors hover:bg-elevated hover:text-fg",children:"取消"}),c.jsx("button",{type:"button",onClick:T,disabled:!E,className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-500 disabled:cursor-not-allowed disabled:bg-fg-6 disabled:text-fg-4",children:"添加仓库"})]})]})]})})}function XF({repoId:e,repoName:t,onClose:n}){const[r,a]=v.useState(""),[s,o]=v.useState(""),[u,d]=v.useState(!0),[f,m]=v.useState(!1),[p,b]=v.useState(null);v.useEffect(()=>{AF(e).then(_=>{a(_.content),o(_.content),d(!1)}).catch(_=>{b(_ instanceof Error?_.message:String(_)),d(!1)})},[e]);const x=async()=>{m(!0),b(null);try{await CF(e,r),o(r)}catch(_){b(_ instanceof Error?_.message:String(_))}m(!1)},E=r!==s;return c.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:n,children:c.jsxs("div",{className:"flex w-full max-w-2xl flex-col rounded-xl border border-line bg-surface p-6 shadow-2xl",onClick:_=>_.stopPropagation(),children:[c.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("h2",{className:"text-base font-semibold text-fg",children:[t," — AGENTS.md"]}),c.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"仅对此仓库生效,修改后 opencode 热加载即时生效。"})]}),c.jsx("button",{type:"button",onClick:n,className:"shrink-0 rounded-md p-1 text-fg-4 hover:bg-elevated hover:text-fg-2",children:c.jsx(yt,{className:"h-4 w-4"})})]}),p&&c.jsxs("div",{className:"mb-3 flex items-start gap-2 rounded-lg bg-red-500/10 px-3 py-2 text-xs text-red-400",children:[c.jsx(or,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),c.jsx("span",{className:"min-w-0 break-words",children:p})]}),u?c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-16 text-fg-5",children:[c.jsx(Nn,{className:"h-5 w-5 fs-spin"}),c.jsx("p",{className:"text-xs",children:"加载中…"})]}):c.jsx("textarea",{value:r,onChange:_=>a(_.target.value),spellCheck:!1,className:"h-96 w-full resize-y rounded-lg border border-line bg-base px-4 py-3 font-mono text-sm leading-relaxed text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20",placeholder:`# AGENTS.md
|
|
491
|
+
|
|
492
|
+
在此编写该仓库的 Agent 指令…`}),c.jsxs("div",{className:"mt-4 flex items-center justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:n,className:"rounded-lg border border-line px-4 py-2 text-sm text-fg-3 transition-colors hover:bg-elevated hover:text-fg",children:"关闭"}),c.jsxs("button",{type:"button",onClick:()=>void x(),disabled:f||!E,className:"flex items-center gap-1.5 rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[c.jsx(g0,{className:"h-3.5 w-3.5"}),f?"保存中…":"保存"]})]})]})})}const Jy=1024,ev=Jy*1024,Jw=ev*1024;function e2(e){return!e||e<=0?"0 B":e<Jy?`${e} B`:e<ev?`${(e/Jy).toFixed(1)} KB`:e<Jw?`${(e/ev).toFixed(1)} MB`:`${(e/Jw).toFixed(2)} GB`}const Mx="ws/";function QF({repoId:e}){const[t,n]=v.useState(!1),[r,a]=v.useState(null),[s,o]=v.useState(!1),[u,d]=v.useState(null),[f,m]=v.useState(null),[p,b]=v.useState(!1),x=async()=>{o(!0),d(null);try{const C=await Dz(e);a(C)}catch(C){d(C instanceof ts?C.message:"加载失败")}o(!1)};v.useEffect(()=>{t&&r===null&&x()},[t]);const E=async C=>{m(C);try{await jz(e,C),await x()}catch(A){d(A instanceof ts?A.message:"删除失败")}m(null)},_=async()=>{b(!0);try{await Lz(e),await x()}catch(C){d(C instanceof ts?C.message:"清理失败")}b(!1)},S=(r==null?void 0:r.length)??0,T=(r==null?void 0:r.reduce((C,A)=>C+(A.diskUsage||0),0))??0;return c.jsxs("div",{className:"mt-3 border-t border-line pt-3",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("button",{type:"button",onClick:()=>n(C=>!C),className:"flex min-w-0 flex-1 items-center gap-1.5 text-left text-xs font-medium text-fg-3 transition-colors hover:text-fg-2",children:[t?c.jsx(q5,{className:"h-3 w-3 shrink-0"}):c.jsx(Vr,{className:"h-3 w-3 shrink-0"}),c.jsx(Nf,{className:"h-3 w-3 shrink-0 text-fg-5"}),c.jsx("span",{children:"工作空间"}),r!==null&&c.jsxs("span",{className:"text-fg-5",children:["(",S,") · ",e2(T)]})]}),t&&S>0&&c.jsxs("button",{type:"button",onClick:()=>void _(),disabled:p,className:"flex h-6 shrink-0 items-center gap-1 rounded border border-line px-2 text-xs text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2 disabled:opacity-50",children:[p?c.jsx("span",{className:"inline-block h-2.5 w-2.5 animate-spin rounded-full border-2 border-current border-t-transparent"}):null,"清理已合并"]})]}),t&&c.jsxs("div",{className:"mt-2",children:[u&&c.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2 rounded border border-red-500/30 bg-red-500/5 px-2 py-1 text-xs text-red-600",children:[c.jsx("span",{className:"truncate",children:u}),c.jsx("button",{type:"button",onClick:()=>d(null),className:"shrink-0 rounded p-0.5 transition-colors hover:bg-red-500/10",children:c.jsx(yt,{className:"h-3 w-3"})})]}),s&&r===null?c.jsx("div",{className:"flex justify-center py-3",children:c.jsx("span",{className:"inline-block h-3.5 w-3.5 animate-spin rounded-full border-2 border-fg-5 border-t-transparent"})}):S===0?c.jsx("p",{className:"py-2 text-center text-xs text-fg-5",children:"暂无工作空间"}):c.jsx("ul",{className:"space-y-1",children:r==null?void 0:r.map(C=>{const A=C.branch.startsWith(Mx),k=A?C.branch.slice(Mx.length):C.branch,I=C.status==="active"?"bg-emerald-500/10 text-emerald-600":C.status==="idle"?"bg-amber-500/10 text-amber-600":"bg-fg-6/30 text-fg-4",O=C.status==="active"?"活跃":C.status==="idle"?"空闲":C.status==="merged"?"已合并":C.status==="stale"?"陈旧":C.status,j=C.status!=="active";return c.jsxs("li",{className:"flex items-center gap-2 rounded-md border border-line bg-elevated/40 px-2 py-1.5 text-xs",children:[c.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[C.running&&C.port&&c.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-emerald-500",title:`运行中 :${C.port}`}),c.jsxs("span",{className:"min-w-0 truncate font-mono",children:[A&&c.jsx("span",{className:"text-fg-5",children:Mx}),c.jsx("span",{className:"text-fg-2",children:k})]})]}),c.jsx("span",{className:re("shrink-0 rounded-full px-1.5 py-0.5 text-[10px] font-medium",I),children:O}),c.jsxs("span",{className:"flex shrink-0 items-center gap-0.5 text-fg-5",children:[c.jsx(y7,{className:"h-2.5 w-2.5"}),e2(C.diskUsage)]}),c.jsx("button",{type:"button",onClick:()=>void E(C.id),disabled:!j||f===C.id,title:j?"删除工作空间":"活跃工作空间无法删除",className:"flex h-5 w-5 shrink-0 items-center justify-center rounded text-fg-5 transition-colors hover:bg-red-500/10 hover:text-red-500 disabled:cursor-not-allowed disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-fg-5",children:f===C.id?c.jsx("span",{className:"inline-block h-2.5 w-2.5 animate-spin rounded-full border-2 border-current border-t-transparent"}):c.jsx(is,{className:"h-3 w-3"})})]},C.id)})})]})]})}function pI(){const e=Fe(I=>I.repos),t=Fe(I=>I.activeRepoId),n=Fe(I=>I.setActiveRepo),r=Fe(I=>I.removeRepo),a=Fe(I=>I.loadRepos),[s,o]=v.useState(!1),[u,d]=v.useState(null),[f,m]=v.useState(null),[p,b]=v.useState(null),x=gn(I=>I.addToast),[E,_]=v.useState(null),[S,T]=v.useState(null),C=v.useRef(null);v.useEffect(()=>{if(!S)return;const I=O=>{C.current&&!C.current.contains(O.target)&&T(null)};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[S]);const A=async(I,O)=>{m(I);try{O?await Oz(I):await kz(I),await a()}catch{}m(null)},k=async I=>{b(I);try{const O=await Mz(I);await a();const j=O.alreadyUpToDate?"info":"success";x(O.summary,j,void 0,{persistent:!0})}catch(O){let j="拉取失败";if(O instanceof ts)try{j=JSON.parse(O.message).error??O.message}catch{j=O.message}x(j,"error",void 0,{persistent:!0})}b(null)};return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"mb-6 flex items-center justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h1",{className:"text-lg font-semibold text-fg",children:"仓库管理"}),c.jsx("p",{className:"mt-0.5 text-sm text-fg-4",children:"管理代码仓库,每个仓库对应一个独立的 Agent 运行环境"})]}),c.jsxs("button",{type:"button",onClick:()=>o(!0),className:"flex shrink-0 items-center gap-1.5 rounded-lg bg-blue-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-500 md:px-4",children:[c.jsx(Da,{className:"h-4 w-4"}),c.jsx("span",{className:"hidden md:inline",children:"添加仓库"})]})]}),e.length===0?c.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-dashed border-line-hard py-16 text-center",children:[c.jsx("div",{className:"rounded-full bg-elevated p-3",children:c.jsx(Da,{className:"h-6 w-6 text-fg-4"})}),c.jsx("p",{className:"text-sm font-medium text-fg-3",children:"暂无代码仓库"}),c.jsx("p",{className:"text-xs text-fg-5",children:"添加一个本地仓库开始使用"}),c.jsx("button",{type:"button",onClick:()=>o(!0),className:"mt-2 rounded-lg border border-line px-4 py-2 text-sm text-fg-3 transition-colors hover:bg-elevated hover:text-fg",children:"添加仓库"})]}):c.jsx(c.Fragment,{children:c.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:e.map(I=>{const O=I.id===t;return c.jsxs("div",{className:re("rounded-xl border p-4 transition-colors",O?"border-blue-500/40 bg-blue-500/5":"border-line"),children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("button",{type:"button",onClick:()=>n(I.id),className:"flex min-w-0 items-center gap-2 text-left",children:[O?c.jsx(vl,{className:"h-4 w-4 shrink-0 text-blue-500"}):c.jsx(zU,{className:"h-4 w-4 shrink-0 text-fg-5"}),c.jsx("span",{className:re("truncate font-medium",O?"text-fg":"text-fg-2"),children:I.name})]}),c.jsxs("span",{className:re("inline-flex shrink-0 items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium",I.running?"bg-emerald-500/10 text-emerald-600":"bg-fg-6/30 text-fg-4"),children:[c.jsx("span",{className:re("h-1.5 w-1.5 rounded-full",I.running?"bg-emerald-500":"bg-fg-5")}),I.running?"运行中":"已停止"]})]}),c.jsxs("dl",{className:"mt-3 space-y-1 font-mono text-xs text-fg-4",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsx("dt",{className:"shrink-0 text-fg-5",children:"Git"}),c.jsx("dd",{className:"min-w-0 truncate",children:I.gitUrl})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("dt",{className:"shrink-0 text-fg-5",children:"路径"}),c.jsxs("dd",{className:"flex min-w-0 items-center gap-1.5",children:[c.jsx("span",{className:"truncate",children:I.localPath}),c.jsx("button",{type:"button",onClick:()=>void navigator.clipboard.writeText(I.localPath),title:"复制路径",className:"shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:text-fg-3",children:c.jsx(ap,{className:"h-3 w-3"})})]})]}),I.running&&I.port&&c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("dt",{className:"shrink-0 text-fg-5",children:"直连"}),c.jsxs("dd",{className:"flex min-w-0 items-center gap-1.5",children:[c.jsxs("a",{href:`http://127.0.0.1:${I.port}`,target:"_blank",rel:"noopener noreferrer",className:"truncate text-blue-500 hover:underline",children:["127.0.0.1:",I.port]}),c.jsx("button",{type:"button",onClick:()=>void navigator.clipboard.writeText(`http://127.0.0.1:${I.port}`),title:"复制链接",className:"shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:text-fg-3",children:c.jsx(ap,{className:"h-3 w-3"})})]})]})]}),c.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[c.jsx("button",{type:"button",onClick:()=>void k(I.id),disabled:p===I.id,className:"flex h-8 shrink-0 items-center justify-center gap-1.5 rounded-md border border-blue-500/30 px-2.5 text-xs font-medium text-blue-600 transition-colors hover:bg-blue-500/10 disabled:opacity-50",children:p===I.id?c.jsx("span",{className:"inline-block h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}):c.jsxs(c.Fragment,{children:[c.jsx(pU,{className:"h-3 w-3"}),"拉取"]})}),c.jsx("button",{type:"button",onClick:()=>void A(I.id,I.running),disabled:f===I.id,className:re("flex h-8 flex-1 items-center justify-center gap-1.5 rounded-md border text-xs font-medium transition-colors disabled:opacity-50",I.running?"border-amber-500/30 text-amber-600 hover:bg-amber-500/10":"border-emerald-500/30 text-emerald-600 hover:bg-emerald-500/10"),children:f===I.id?c.jsx("span",{className:"inline-block h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}):I.running?c.jsxs(c.Fragment,{children:[c.jsx(Vy,{className:"h-3 w-3 fill-current"}),"停止"]}):c.jsxs(c.Fragment,{children:[c.jsx(w1,{className:"h-3 w-3 fill-current"}),"启动"]})}),c.jsxs("div",{className:"relative",ref:S===I.id?C:void 0,children:[c.jsx("button",{type:"button",onClick:()=>T(S===I.id?null:I.id),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:c.jsx(E1,{className:"h-4 w-4"})}),S===I.id&&c.jsxs("div",{className:"absolute right-0 top-full z-20 mt-1 min-w-[160px] overflow-hidden rounded-lg border border-line bg-elevated shadow-lg",children:[c.jsx("button",{type:"button",className:re("flex w-full items-center gap-2 px-3 py-2 text-left text-xs transition-colors hover:bg-base/60",I.runtimeType==="claude-code"?"text-orange-500":"text-sky-500"),onClick:async()=>{T(null);const j=I.runtimeType==="claude-code"?"opencode":"claude-code";await Bz(I.id,j),a()},children:I.runtimeType==="claude-code"?"Claude → OpenCode":"OpenCode → Claude"}),c.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-fg-3 transition-colors hover:bg-base/60",onClick:async()=>{T(null),await Pz(I.id,!I.worktreeEnabled),a()},children:[c.jsx(Nf,{className:"h-3 w-3"}),c.jsx("span",{children:"Worktree"}),c.jsx("span",{className:re("ml-auto text-[10px]",I.worktreeEnabled?"text-violet-500":"text-fg-5"),children:I.worktreeEnabled?"已开启":"已关闭"})]}),c.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-fg-3 transition-colors hover:bg-base/60",onClick:()=>{T(null),_({id:I.id,name:I.name})},children:[c.jsx(lo,{className:"h-3 w-3"}),"配置"]}),c.jsx("div",{className:"my-0.5 border-t border-line"}),c.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-red-500 transition-colors hover:bg-red-500/10",onClick:()=>{T(null),d(I.id)},children:[c.jsx(is,{className:"h-3 w-3"}),"删除仓库"]})]})]})]}),u===I.id&&c.jsxs("div",{className:"mt-2 flex items-center justify-between rounded-md border border-red-500/20 bg-red-500/5 px-3 py-2",children:[c.jsx("span",{className:"text-xs text-red-500",children:"确认删除此仓库?"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("button",{type:"button",onClick:()=>{r(I.id),d(null)},className:"flex h-6 items-center gap-1 rounded border border-red-500/30 px-2 text-xs text-red-500 transition-colors hover:bg-red-500/10",children:[c.jsx(yr,{className:"h-3 w-3"}),"确认"]}),c.jsx("button",{type:"button",onClick:()=>d(null),className:"flex h-6 items-center gap-1 rounded border border-line px-2 text-xs text-fg-4 transition-colors hover:bg-elevated",children:"取消"})]})]}),I.worktreeEnabled&&c.jsx(QF,{repoId:I.id})]},I.id)})})}),c.jsxs("p",{className:"mt-3 text-xs text-fg-5",children:[e.length," 个仓库"]}),s&&c.jsx(WF,{onClose:()=>o(!1)}),E&&c.jsx(XF,{repoId:E.id,repoName:E.name,onClose:()=>_(null)})]})}function ZF(){return c.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c.jsx("div",{className:"mx-auto max-w-4xl",children:c.jsx(pI,{})})})}function t2(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const o=n.slice(a,r).trim();(o||!s)&&t.push(o),a=r+1,r=n.indexOf(",",a)}return t}function gI(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const JF=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eH=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tH={};function n2(e,t){return(tH.jsx?eH:JF).test(e)}const nH=/[ \t\n\f\r]/g;function rH(e){return typeof e=="object"?e.type==="text"?r2(e.value):!1:r2(e)}function r2(e){return e.replace(nH,"")===""}class Af{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Af.prototype.normal={};Af.prototype.property={};Af.prototype.space=void 0;function bI(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Af(n,r,t)}function Jd(e){return e.toLowerCase()}class Jr{constructor(t,n){this.attribute=n,this.property=t}}Jr.prototype.attribute="";Jr.prototype.booleanish=!1;Jr.prototype.boolean=!1;Jr.prototype.commaOrSpaceSeparated=!1;Jr.prototype.commaSeparated=!1;Jr.prototype.defined=!1;Jr.prototype.mustUseProperty=!1;Jr.prototype.number=!1;Jr.prototype.overloadedBoolean=!1;Jr.prototype.property="";Jr.prototype.spaceSeparated=!1;Jr.prototype.space=void 0;let aH=0;const it=El(),On=El(),tv=El(),Ae=El(),Yt=El(),nl=El(),da=El();function El(){return 2**++aH}const nv=Object.freeze(Object.defineProperty({__proto__:null,boolean:it,booleanish:On,commaOrSpaceSeparated:da,commaSeparated:nl,number:Ae,overloadedBoolean:tv,spaceSeparated:Yt},Symbol.toStringTag,{value:"Module"})),Dx=Object.keys(nv);class O1 extends Jr{constructor(t,n,r,a){let s=-1;if(super(t,n),a2(this,"space",a),typeof r=="number")for(;++s<Dx.length;){const o=Dx[s];a2(this,Dx[s],(r&nv[o])===nv[o])}}}O1.prototype.defined=!0;function a2(e,t,n){n&&(e[t]=n)}function tc(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const s=new O1(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Jd(r)]=r,n[Jd(s.attribute)]=r}return new Af(t,n,e.space)}const xI=tc({properties:{ariaActiveDescendant:null,ariaAtomic:On,ariaAutoComplete:null,ariaBusy:On,ariaChecked:On,ariaColCount:Ae,ariaColIndex:Ae,ariaColSpan:Ae,ariaControls:Yt,ariaCurrent:null,ariaDescribedBy:Yt,ariaDetails:null,ariaDisabled:On,ariaDropEffect:Yt,ariaErrorMessage:null,ariaExpanded:On,ariaFlowTo:Yt,ariaGrabbed:On,ariaHasPopup:null,ariaHidden:On,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Yt,ariaLevel:Ae,ariaLive:null,ariaModal:On,ariaMultiLine:On,ariaMultiSelectable:On,ariaOrientation:null,ariaOwns:Yt,ariaPlaceholder:null,ariaPosInSet:Ae,ariaPressed:On,ariaReadOnly:On,ariaRelevant:null,ariaRequired:On,ariaRoleDescription:Yt,ariaRowCount:Ae,ariaRowIndex:Ae,ariaRowSpan:Ae,ariaSelected:On,ariaSetSize:Ae,ariaSort:null,ariaValueMax:Ae,ariaValueMin:Ae,ariaValueNow:Ae,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function yI(e,t){return t in e?e[t]:t}function vI(e,t){return yI(e,t.toLowerCase())}const iH=tc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:nl,acceptCharset:Yt,accessKey:Yt,action:null,allow:null,allowFullScreen:it,allowPaymentRequest:it,allowUserMedia:it,alpha:it,alt:null,as:null,async:it,autoCapitalize:null,autoComplete:Yt,autoFocus:it,autoPlay:it,blocking:Yt,capture:null,charSet:null,checked:it,cite:null,className:Yt,closedBy:null,colorSpace:null,cols:Ae,colSpan:Ae,command:null,commandFor:null,content:null,contentEditable:On,controls:it,controlsList:Yt,coords:Ae|nl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:it,defer:it,dir:null,dirName:null,disabled:it,download:tv,draggable:On,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:it,formTarget:null,headers:Yt,height:Ae,hidden:tv,high:Ae,href:null,hrefLang:null,htmlFor:Yt,httpEquiv:Yt,id:null,imageSizes:null,imageSrcSet:null,inert:it,inputMode:null,integrity:null,is:null,isMap:it,itemId:null,itemProp:Yt,itemRef:Yt,itemScope:it,itemType:Yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:it,low:Ae,manifest:null,max:null,maxLength:Ae,media:null,method:null,min:null,minLength:Ae,multiple:it,muted:it,name:null,nonce:null,noModule:it,noValidate:it,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:it,optimum:Ae,pattern:null,ping:Yt,placeholder:null,playsInline:it,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:it,referrerPolicy:null,rel:Yt,required:it,reversed:it,rows:Ae,rowSpan:Ae,sandbox:Yt,scope:null,scoped:it,seamless:it,selected:it,shadowRootClonable:it,shadowRootCustomElementRegistry:it,shadowRootDelegatesFocus:it,shadowRootMode:null,shadowRootSerializable:it,shape:null,size:Ae,sizes:null,slot:null,span:Ae,spellCheck:On,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ae,step:null,style:null,tabIndex:Ae,target:null,title:null,translate:null,type:null,typeMustMatch:it,useMap:null,value:On,width:Ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Yt,axis:null,background:null,bgColor:null,border:Ae,borderColor:null,bottomMargin:Ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:it,declare:it,event:null,face:null,frame:null,frameBorder:null,hSpace:Ae,leftMargin:Ae,link:null,longDesc:null,lowSrc:null,marginHeight:Ae,marginWidth:Ae,noResize:it,noHref:it,noShade:it,noWrap:it,object:null,profile:null,prompt:null,rev:null,rightMargin:Ae,rules:null,scheme:null,scrolling:On,standby:null,summary:null,text:null,topMargin:Ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ae,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:it,disablePictureInPicture:it,disableRemotePlayback:it,exportParts:nl,part:Yt,prefix:null,property:null,results:Ae,security:null,unselectable:null},space:"html",transform:vI}),sH=tc({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",maskType:"mask-type",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:da,accentHeight:Ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ae,amplitude:Ae,arabicForm:null,ascent:Ae,attributeName:null,attributeType:null,azimuth:Ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ae,by:null,calcMode:null,capHeight:Ae,className:Yt,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:Ae,diffuseConstant:Ae,direction:null,display:null,dur:null,divisor:Ae,dominantBaseline:null,download:it,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ae,enableBackground:null,end:null,event:null,exponent:Ae,externalResourcesRequired:null,fill:null,fillOpacity:Ae,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:nl,g2:nl,glyphName:nl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ae,horizOriginX:Ae,horizOriginY:Ae,id:null,ideographic:Ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ae,k:Ae,k1:Ae,k2:Ae,k3:Ae,k4:Ae,kernelMatrix:da,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ae,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ae,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:Ae,overlineThickness:Ae,paintOrder:null,panose1:null,path:null,pathLength:Ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ae,pointsAtY:Ae,pointsAtZ:Ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:da,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:da,rev:da,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:da,requiredFeatures:da,requiredFonts:da,requiredFormats:da,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:Ae,specularExponent:Ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ae,strikethroughThickness:Ae,string:null,stroke:null,strokeDashArray:da,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ae,strokeOpacity:Ae,strokeWidth:null,style:null,surfaceScale:Ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:da,tabIndex:Ae,tableValues:null,target:null,targetX:Ae,targetY:Ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:da,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ae,underlineThickness:Ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ae,values:null,vAlphabetic:Ae,vMathematical:Ae,vectorEffect:null,vHanging:Ae,vIdeographic:Ae,version:null,vertAdvY:Ae,vertOriginX:Ae,vertOriginY:Ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:yI}),EI=tc({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),_I=tc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:vI}),NI=tc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),oH={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"},lH=/[A-Z]/g,i2=/-[a-z]/g,uH=/^data[-\w.:]+$/i;function x0(e,t){const n=Jd(t);let r=t,a=Jr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&uH.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(i2,dH);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!i2.test(s)){let o=s.replace(lH,cH);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}a=O1}return new a(r,t)}function cH(e){return"-"+e.toLowerCase()}function dH(e){return e.charAt(1).toUpperCase()}const Cf=bI([xI,iH,EI,_I,NI],"html"),co=bI([xI,sH,EI,_I,NI],"svg");function s2(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function TI(e){return e.join(" ").trim()}var mu={},jx,o2;function fH(){if(o2)return jx;o2=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,u=/^\s+|\s+$/g,d=`
|
|
493
|
+
`,f="/",m="*",p="",b="comment",x="declaration";function E(S,T){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];T=T||{};var C=1,A=1;function k(Q){var W=Q.match(t);W&&(C+=W.length);var G=Q.lastIndexOf(d);A=~G?Q.length-G:A+Q.length}function I(){var Q={line:C,column:A};return function(W){return W.position=new O(Q),z(),W}}function O(Q){this.start=Q,this.end={line:C,column:A},this.source=T.source}O.prototype.content=S;function j(Q){var W=new Error(T.source+":"+C+":"+A+": "+Q);if(W.reason=Q,W.filename=T.source,W.line=C,W.column=A,W.source=S,!T.silent)throw W}function H(Q){var W=Q.exec(S);if(W){var G=W[0];return k(G),S=S.slice(G.length),W}}function z(){H(n)}function D(Q){var W;for(Q=Q||[];W=V();)W!==!1&&Q.push(W);return Q}function V(){var Q=I();if(!(f!=S.charAt(0)||m!=S.charAt(1))){for(var W=2;p!=S.charAt(W)&&(m!=S.charAt(W)||f!=S.charAt(W+1));)++W;if(W+=2,p===S.charAt(W-1))return j("End of comment missing");var G=S.slice(2,W-2);return A+=2,k(G),S=S.slice(W),A+=2,Q({type:b,comment:G})}}function q(){var Q=I(),W=H(r);if(W){if(V(),!H(a))return j("property missing ':'");var G=H(s),F=Q({type:x,property:_(W[0].replace(e,p)),value:G?_(G[0].replace(e,p)):p});return H(o),F}}function ae(){var Q=[];D(Q);for(var W;W=q();)W!==!1&&(Q.push(W),D(Q));return Q}return z(),ae()}function _(S){return S?S.replace(u,p):p}return jx=E,jx}var l2;function hH(){if(l2)return mu;l2=1;var e=mu&&mu.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mu,"__esModule",{value:!0}),mu.default=n;const t=e(fH());function n(r,a){let s=null;if(!r||typeof r!="string")return s;const o=(0,t.default)(r),u=typeof a=="function";return o.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:m}=d;u?a(f,m,d):m&&(s=s||{},s[f]=m)}),s}return mu}var md={},u2;function mH(){if(u2)return md;u2=1,Object.defineProperty(md,"__esModule",{value:!0}),md.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(f){return!f||n.test(f)||e.test(f)},o=function(f,m){return m.toUpperCase()},u=function(f,m){return"".concat(m,"-")},d=function(f,m){return m===void 0&&(m={}),s(f)?f:(f=f.toLowerCase(),m.reactCompat?f=f.replace(a,u):f=f.replace(r,u),f.replace(t,o))};return md.camelCase=d,md}var pd,c2;function pH(){if(c2)return pd;c2=1;var e=pd&&pd.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(hH()),n=mH();function r(a,s){var o={};return!a||typeof a!="string"||(0,t.default)(a,function(u,d){u&&d&&(o[(0,n.camelCase)(u,s)]=d)}),o}return r.default=r,pd=r,pd}var gH=pH();const bH=yf(gH),y0=SI("end"),Ai=SI("start");function SI(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function xH(e){const t=Ai(e),n=y0(e);if(t&&n)return{start:t,end:n}}function Pd(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?d2(e.position):"start"in e||"end"in e?d2(e):"line"in e||"column"in e?rv(e):""}function rv(e){return f2(e&&e.line)+":"+f2(e&&e.column)}function d2(e){return rv(e&&e.start)+"-"+rv(e&&e.end)}function f2(e){return e&&typeof e=="number"?e:1}class Er extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?a=t:!s.cause&&t&&(o=!0,a=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?s.ruleId=r:(s.source=r.slice(0,d),s.ruleId=r.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const u=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=u?u.line:void 0,this.name=Pd(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Er.prototype.file="";Er.prototype.name="";Er.prototype.reason="";Er.prototype.message="";Er.prototype.stack="";Er.prototype.column=void 0;Er.prototype.line=void 0;Er.prototype.ancestors=void 0;Er.prototype.cause=void 0;Er.prototype.fatal=void 0;Er.prototype.place=void 0;Er.prototype.ruleId=void 0;Er.prototype.source=void 0;const I1={}.hasOwnProperty,yH=new Map,vH=/[A-Z]/g,EH=new Set(["table","tbody","thead","tfoot","tr"]),_H=new Set(["td","th"]),wI="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function NH(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=IH(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=OH(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?co:Cf,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=AI(a,e,void 0);return s&&typeof s!="string"?s:a.create(e,a.Fragment,{children:s||void 0},void 0)}function AI(e,t,n){if(t.type==="element")return TH(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return SH(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return AH(e,t,n);if(t.type==="mdxjsEsm")return wH(e,t);if(t.type==="root")return CH(e,t,n);if(t.type==="text")return kH(e,t)}function TH(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=co,e.schema=a),e.ancestors.push(t);const s=kI(e,t.tagName,!1),o=RH(e,t);let u=M1(e,t);return EH.has(t.tagName)&&(u=u.filter(function(d){return typeof d=="string"?!rH(d):!0})),CI(e,o,s,t),R1(o,u),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function SH(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ef(e,t.position)}function wH(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ef(e,t.position)}function AH(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=co,e.schema=a),e.ancestors.push(t);const s=t.name===null?e.Fragment:kI(e,t.name,!0),o=MH(e,t),u=M1(e,t);return CI(e,o,s,t),R1(o,u),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function CH(e,t,n){const r={};return R1(r,M1(e,t)),e.create(t,e.Fragment,r,n)}function kH(e,t){return t.value}function CI(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function R1(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function OH(e,t,n){return r;function r(a,s,o,u){const f=Array.isArray(o.children)?n:t;return u?f(s,o,u):f(s,o)}}function IH(e,t){return n;function n(r,a,s,o){const u=Array.isArray(s.children),d=Ai(r);return t(a,s,o,u,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function RH(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&I1.call(t.properties,a)){const s=DH(e,a,t.properties[a]);if(s){const[o,u]=s;e.tableCellAlignToStyle&&o==="align"&&typeof u=="string"&&_H.has(t.tagName)?r=u:n[o]=u}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function MH(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const u=o.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else ef(e,t.position);else{const a=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,s=e.evaluater.evaluateExpression(u.expression)}else ef(e,t.position);else s=r.value===null?!0:r.value;n[a]=s}return n}function M1(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:yH;for(;++r<t.children.length;){const s=t.children[r];let o;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const f=a.get(d)||0;o=d+"-"+f,a.set(d,f+1)}}const u=AI(e,s,o);u!==void 0&&n.push(u)}return n}function DH(e,t,n){const r=x0(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?gI(n):TI(n)),r.property==="style"){let a=typeof n=="object"?n:jH(e,String(n));return e.stylePropertyNameCase==="css"&&(a=LH(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?oH[r.property]||r.property:r.attribute,n]}}function jH(e,t){try{return bH(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new Er("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=wI+"#cannot-parse-style-attribute",a}}function kI(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let s=-1,o;for(;++s<a.length;){const u=n2(a[s])?{type:"Identifier",name:a[s]}:{type:"Literal",value:a[s]};o=o?{type:"MemberExpression",object:o,property:u,computed:!!(s&&u.type==="Literal"),optional:!1}:u}r=o}else r=n2(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return I1.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);ef(e)}function ef(e,t){const n=new Er("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=wI+"#cannot-handle-mdx-estrees-without-createevaluater",n}function LH(e){const t={};let n;for(n in e)I1.call(e,n)&&(t[PH(n)]=e[n]);return t}function PH(e){let t=e.replace(vH,BH);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function BH(e){return"-"+e.toLowerCase()}const Lx={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"]},UH={};function D1(e,t){const n=UH,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return OI(e,r,a)}function OI(e,t,n){if(zH(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return h2(e.children,t,n)}return Array.isArray(e)?h2(e,t,n):""}function h2(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=OI(e[a],t,n);return r.join("")}function zH(e){return!!(e&&typeof e=="object")}const m2=document.createElement("i");function j1(e){const t="&"+e+";";m2.innerHTML=t;const n=m2.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ma(e,t,n,r){const a=e.length;let s=0,o;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s<r.length;)o=r.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function ka(e,t){return e.length>0?(ma(e,e.length,0,t),e):t}const p2={}.hasOwnProperty;function II(e){const t={};let n=-1;for(;++n<e.length;)FH(t,e[n]);return t}function FH(e,t){let n;for(n in t){const a=(p2.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){p2.call(a,o)||(a[o]=[]);const u=s[o];HH(a[o],Array.isArray(u)?u:u?[u]:[])}}}function HH(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ma(e,0,0,r)}function RI(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Qa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ir=fo(/[A-Za-z]/),xr=fo(/[\dA-Za-z]/),$H=fo(/[#-'*+\--9=?A-Z^-~]/);function op(e){return e!==null&&(e<32||e===127)}const av=fo(/\d/),YH=fo(/[\dA-Fa-f]/),qH=fo(/[!-/:-@[-`{-~]/);function Xe(e){return e!==null&&e<-2}function Gt(e){return e!==null&&(e<0||e===32)}function pt(e){return e===-2||e===-1||e===32}const v0=fo(new RegExp("\\p{P}|\\p{S}","u")),ul=fo(/\s/);function fo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function nc(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&xr(e.charCodeAt(n+1))&&xr(e.charCodeAt(n+2)))a=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const u=e.charCodeAt(n+1);s<56320&&u>56319&&u<57344?(o=String.fromCharCode(s,u),a=1):o="�"}else o=String.fromCharCode(s);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+a+1,o=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Tt(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(d){return pt(d)?(e.enter(n),u(d)):t(d)}function u(d){return pt(d)&&s++<a?(e.consume(d),u):(e.exit(n),t(d))}}const GH={tokenize:KH};function KH(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Tt(e,t,"linePrefix")}function a(u){return e.enter("paragraph"),s(u)}function s(u){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,o(u)}function o(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Xe(u)?(e.consume(u),e.exit("chunkText"),s):(e.consume(u),o)}}const VH={tokenize:WH},g2={tokenize:XH};function WH(e){const t=this,n=[];let r=0,a,s,o;return u;function u(A){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,d,f)(A)}return f(A)}function d(A){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&C();const k=t.events.length;let I=k,O;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){O=t.events[I][1].end;break}T(r);let j=k;for(;j<t.events.length;)t.events[j][1].end={...O},j++;return ma(t.events,I+1,0,t.events.slice(k)),t.events.length=j,f(A)}return u(A)}function f(A){if(r===n.length){if(!a)return b(A);if(a.currentConstruct&&a.currentConstruct.concrete)return E(A);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(g2,m,p)(A)}function m(A){return a&&C(),T(r),b(A)}function p(A){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,E(A)}function b(A){return t.containerState={},e.attempt(g2,x,E)(A)}function x(A){return r++,n.push([t.currentConstruct,t.containerState]),b(A)}function E(A){if(A===null){a&&C(),T(0),e.consume(A);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:s}),_(A)}function _(A){if(A===null){S(e.exit("chunkFlow"),!0),T(0),e.consume(A);return}return Xe(A)?(e.consume(A),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(A),_)}function S(A,k){const I=t.sliceStream(A);if(k&&I.push(null),A.previous=s,s&&(s.next=A),s=A,a.defineSkip(A.start),a.write(I),t.parser.lazy[A.start.line]){let O=a.events.length;for(;O--;)if(a.events[O][1].start.offset<o&&(!a.events[O][1].end||a.events[O][1].end.offset>o))return;const j=t.events.length;let H=j,z,D;for(;H--;)if(t.events[H][0]==="exit"&&t.events[H][1].type==="chunkFlow"){if(z){D=t.events[H][1].end;break}z=!0}for(T(r),O=j;O<t.events.length;)t.events[O][1].end={...D},O++;ma(t.events,H+1,0,t.events.slice(j)),t.events.length=O}}function T(A){let k=n.length;for(;k-- >A;){const I=n[k];t.containerState=I[1],I[0].exit.call(t,e)}n.length=A}function C(){a.write([null]),s=void 0,a=void 0,t.containerState._closeFlow=void 0}}function XH(e,t,n){return Tt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Lu(e){if(e===null||Gt(e)||ul(e))return 1;if(v0(e))return 2}function E0(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const s=e[a].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const iv={name:"attention",resolveAll:QH,tokenize:ZH};function QH(e,t){let n=-1,r,a,s,o,u,d,f,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},b={...e[n][1].start};b2(p,-d),b2(b,d),o={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},u={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},s={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:d>1?"strong":"emphasis",start:{...o.start},end:{...u.end}},e[r][1].end={...o.start},e[n][1].start={...u.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=ka(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=ka(f,[["enter",a,t],["enter",o,t],["exit",o,t],["enter",s,t]]),f=ka(f,E0(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=ka(f,[["exit",s,t],["enter",u,t],["exit",u,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,f=ka(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,ma(e,r-1,n-r+3,f),n=r+f.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function ZH(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Lu(r);let s;return o;function o(d){return s=d,e.enter("attentionSequence"),u(d)}function u(d){if(d===s)return e.consume(d),u;const f=e.exit("attentionSequence"),m=Lu(d),p=!m||m===2&&a||n.includes(d),b=!a||a===2&&m||n.includes(r);return f._open=!!(s===42?p:p&&(a||!b)),f._close=!!(s===42?b:b&&(m||!p)),t(d)}}function b2(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const JH={name:"autolink",tokenize:e$};function e$(e,t,n){let r=0;return a;function a(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(x){return Ir(x)?(e.consume(x),o):x===64?n(x):f(x)}function o(x){return x===43||x===45||x===46||xr(x)?(r=1,u(x)):f(x)}function u(x){return x===58?(e.consume(x),r=0,d):(x===43||x===45||x===46||xr(x))&&r++<32?(e.consume(x),u):(r=0,f(x))}function d(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||op(x)?n(x):(e.consume(x),d)}function f(x){return x===64?(e.consume(x),m):$H(x)?(e.consume(x),f):n(x)}function m(x){return xr(x)?p(x):n(x)}function p(x){return x===46?(e.consume(x),r=0,m):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):b(x)}function b(x){if((x===45||xr(x))&&r++<63){const E=x===45?b:p;return e.consume(x),E}return n(x)}}const kf={partial:!0,tokenize:t$};function t$(e,t,n){return r;function r(s){return pt(s)?Tt(e,a,"linePrefix")(s):a(s)}function a(s){return s===null||Xe(s)?t(s):n(s)}}const MI={continuation:{tokenize:r$},exit:a$,name:"blockQuote",tokenize:n$};function n$(e,t,n){const r=this;return a;function a(o){if(o===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),s}return n(o)}function s(o){return pt(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function r$(e,t,n){const r=this;return a;function a(o){return pt(o)?Tt(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt(MI,t,n)(o)}}function a$(e){e.exit("blockQuote")}const DI={name:"characterEscape",tokenize:i$};function i$(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),a}function a(s){return qH(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const jI={name:"characterReference",tokenize:s$};function s$(e,t,n){const r=this;let a=0,s,o;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),s=31,o=xr,m(p))}function f(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=YH,m):(e.enter("characterReferenceValue"),s=7,o=av,m(p))}function m(p){if(p===59&&a){const b=e.exit("characterReferenceValue");return o===xr&&!j1(r.sliceSerialize(b))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(p)&&a++<s?(e.consume(p),m):n(p)}}const x2={partial:!0,tokenize:l$},y2={concrete:!0,name:"codeFenced",tokenize:o$};function o$(e,t,n){const r=this,a={partial:!0,tokenize:I};let s=0,o=0,u;return d;function d(O){return f(O)}function f(O){const j=r.events[r.events.length-1];return s=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,u=O,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(O)}function m(O){return O===u?(o++,e.consume(O),m):o<3?n(O):(e.exit("codeFencedFenceSequence"),pt(O)?Tt(e,p,"whitespace")(O):p(O))}function p(O){return O===null||Xe(O)?(e.exit("codeFencedFence"),r.interrupt?t(O):e.check(x2,_,k)(O)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(O))}function b(O){return O===null||Xe(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(O)):pt(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Tt(e,x,"whitespace")(O)):O===96&&O===u?n(O):(e.consume(O),b)}function x(O){return O===null||Xe(O)?p(O):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(O))}function E(O){return O===null||Xe(O)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(O)):O===96&&O===u?n(O):(e.consume(O),E)}function _(O){return e.attempt(a,k,S)(O)}function S(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),T}function T(O){return s>0&&pt(O)?Tt(e,C,"linePrefix",s+1)(O):C(O)}function C(O){return O===null||Xe(O)?e.check(x2,_,k)(O):(e.enter("codeFlowValue"),A(O))}function A(O){return O===null||Xe(O)?(e.exit("codeFlowValue"),C(O)):(e.consume(O),A)}function k(O){return e.exit("codeFenced"),t(O)}function I(O,j,H){let z=0;return D;function D(W){return O.enter("lineEnding"),O.consume(W),O.exit("lineEnding"),V}function V(W){return O.enter("codeFencedFence"),pt(W)?Tt(O,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):q(W)}function q(W){return W===u?(O.enter("codeFencedFenceSequence"),ae(W)):H(W)}function ae(W){return W===u?(z++,O.consume(W),ae):z>=o?(O.exit("codeFencedFenceSequence"),pt(W)?Tt(O,Q,"whitespace")(W):Q(W)):H(W)}function Q(W){return W===null||Xe(W)?(O.exit("codeFencedFence"),j(W)):H(W)}}}function l$(e,t,n){const r=this;return a;function a(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Px={name:"codeIndented",tokenize:c$},u$={partial:!0,tokenize:d$};function c$(e,t,n){const r=this;return a;function a(f){return e.enter("codeIndented"),Tt(e,s,"linePrefix",5)(f)}function s(f){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?o(f):n(f)}function o(f){return f===null?d(f):Xe(f)?e.attempt(u$,o,d)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||Xe(f)?(e.exit("codeFlowValue"),o(f)):(e.consume(f),u)}function d(f){return e.exit("codeIndented"),t(f)}}function d$(e,t,n){const r=this;return a;function a(o){return r.parser.lazy[r.now().line]?n(o):Xe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):Tt(e,s,"linePrefix",5)(o)}function s(o){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(o):Xe(o)?a(o):n(o)}}const f$={name:"codeText",previous:m$,resolve:h$,tokenize:p$};function h$(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function m$(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function p$(e,t,n){let r=0,a,s;return o;function o(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),r++,u):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(s=e.enter("codeTextSequence"),a=0,m(p)):Xe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(p))}function f(p){return p===null||p===32||p===96||Xe(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),f)}function m(p){return p===96?(e.consume(p),a++,m):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(s.type="codeTextData",f(p))}}class g${constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&gd(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),gd(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),gd(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);gd(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);gd(this.left,n.reverse())}}}function gd(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function LI(e){const t={};let n=-1,r,a,s,o,u,d,f;const m=new g$(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,b$(m,n)),n=t[n],f=!0);else if(r[1]._container){for(s=n,a=void 0;s--;)if(o=m.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(a&&(m.get(a)[1].type="lineEndingBlank"),o[1].type="lineEnding",a=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;a&&(r[1].end={...m.get(a)[1].start},u=m.slice(a,n),u.unshift(r),m.splice(a,n-a+1,u))}}return ma(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!f}function b$(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const u=o.events,d=[],f={};let m,p,b=-1,x=n,E=0,_=0;const S=[_];for(;x;){for(;e.get(++a)[1]!==x;);s.push(a),x._tokenizer||(m=r.sliceStream(x),x.next||m.push(null),p&&o.defineSkip(x.start),x._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(m),x._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),p=x,x=x.next}for(x=n;++b<u.length;)u[b][0]==="exit"&&u[b-1][0]==="enter"&&u[b][1].type===u[b-1][1].type&&u[b][1].start.line!==u[b][1].end.line&&(_=b+1,S.push(_),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(o.events=[],x?(x._tokenizer=void 0,x.previous=void 0):S.pop(),b=S.length;b--;){const T=u.slice(S[b],S[b+1]),C=s.pop();d.push([C,C+T.length-1]),e.splice(C,2,T)}for(d.reverse(),b=-1;++b<d.length;)f[E+d[b][0]]=E+d[b][1],E+=d[b][1]-d[b][0]-1;return f}const x$={resolve:v$,tokenize:E$},y$={partial:!0,tokenize:_$};function v$(e){return LI(e),e}function E$(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(u)}function a(u){return u===null?s(u):Xe(u)?e.check(y$,o,s)(u):(e.consume(u),a)}function s(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function o(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function _$(e,t,n){const r=this;return a;function a(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Tt(e,s,"linePrefix")}function s(o){if(o===null||Xe(o))return n(o);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function PI(e,t,n,r,a,s,o,u,d){const f=d||Number.POSITIVE_INFINITY;let m=0;return p;function p(T){return T===60?(e.enter(r),e.enter(a),e.enter(s),e.consume(T),e.exit(s),b):T===null||T===32||T===41||op(T)?n(T):(e.enter(r),e.enter(o),e.enter(u),e.enter("chunkString",{contentType:"string"}),_(T))}function b(T){return T===62?(e.enter(s),e.consume(T),e.exit(s),e.exit(a),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),x(T))}function x(T){return T===62?(e.exit("chunkString"),e.exit(u),b(T)):T===null||T===60||Xe(T)?n(T):(e.consume(T),T===92?E:x)}function E(T){return T===60||T===62||T===92?(e.consume(T),x):x(T)}function _(T){return!m&&(T===null||T===41||Gt(T))?(e.exit("chunkString"),e.exit(u),e.exit(o),e.exit(r),t(T)):m<f&&T===40?(e.consume(T),m++,_):T===41?(e.consume(T),m--,_):T===null||T===32||T===40||op(T)?n(T):(e.consume(T),T===92?S:_)}function S(T){return T===40||T===41||T===92?(e.consume(T),_):_(T)}}function BI(e,t,n,r,a,s){const o=this;let u=0,d;return f;function f(x){return e.enter(r),e.enter(a),e.consume(x),e.exit(a),e.enter(s),m}function m(x){return u>999||x===null||x===91||x===93&&!d||x===94&&!u&&"_hiddenFootnoteSupport"in o.parser.constructs?n(x):x===93?(e.exit(s),e.enter(a),e.consume(x),e.exit(a),e.exit(r),t):Xe(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===null||x===91||x===93||Xe(x)||u++>999?(e.exit("chunkString"),m(x)):(e.consume(x),d||(d=!pt(x)),x===92?b:p)}function b(x){return x===91||x===92||x===93?(e.consume(x),u++,p):p(x)}}function UI(e,t,n,r,a,s){let o;return u;function u(b){return b===34||b===39||b===40?(e.enter(r),e.enter(a),e.consume(b),e.exit(a),o=b===40?41:b,d):n(b)}function d(b){return b===o?(e.enter(a),e.consume(b),e.exit(a),e.exit(r),t):(e.enter(s),f(b))}function f(b){return b===o?(e.exit(s),d(o)):b===null?n(b):Xe(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Tt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===o||b===null||Xe(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?p:m)}function p(b){return b===o||b===92?(e.consume(b),m):m(b)}}function Bd(e,t){let n;return r;function r(a){return Xe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):pt(a)?Tt(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const N$={name:"definition",tokenize:S$},T$={partial:!0,tokenize:w$};function S$(e,t,n){const r=this;let a;return s;function s(x){return e.enter("definition"),o(x)}function o(x){return BI.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function u(x){return a=Qa(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),d):n(x)}function d(x){return Gt(x)?Bd(e,f)(x):f(x)}function f(x){return PI(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function m(x){return e.attempt(T$,p,p)(x)}function p(x){return pt(x)?Tt(e,b,"whitespace")(x):b(x)}function b(x){return x===null||Xe(x)?(e.exit("definition"),r.parser.defined.push(a),t(x)):n(x)}}function w$(e,t,n){return r;function r(u){return Gt(u)?Bd(e,a)(u):n(u)}function a(u){return UI(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function s(u){return pt(u)?Tt(e,o,"whitespace")(u):o(u)}function o(u){return u===null||Xe(u)?t(u):n(u)}}const A$={name:"hardBreakEscape",tokenize:C$};function C$(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),a}function a(s){return Xe(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const k$={name:"headingAtx",resolve:O$,tokenize:I$};function O$(e,t){let n=e.length-2,r=3,a,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ma(e,r,n-r+1,[["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t]])),e}function I$(e,t,n){let r=0;return a;function a(m){return e.enter("atxHeading"),s(m)}function s(m){return e.enter("atxHeadingSequence"),o(m)}function o(m){return m===35&&r++<6?(e.consume(m),o):m===null||Gt(m)?(e.exit("atxHeadingSequence"),u(m)):n(m)}function u(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||Xe(m)?(e.exit("atxHeading"),t(m)):pt(m)?Tt(e,u,"whitespace")(m):(e.enter("atxHeadingText"),f(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),u(m))}function f(m){return m===null||m===35||Gt(m)?(e.exit("atxHeadingText"),u(m)):(e.consume(m),f)}}const R$=["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"],v2=["pre","script","style","textarea"],M$={concrete:!0,name:"htmlFlow",resolveTo:L$,tokenize:P$},D$={partial:!0,tokenize:U$},j$={partial:!0,tokenize:B$};function L$(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function P$(e,t,n){const r=this;let a,s,o,u,d;return f;function f(M){return m(M)}function m(M){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(M),p}function p(M){return M===33?(e.consume(M),b):M===47?(e.consume(M),s=!0,_):M===63?(e.consume(M),a=3,r.interrupt?t:L):Ir(M)?(e.consume(M),o=String.fromCharCode(M),S):n(M)}function b(M){return M===45?(e.consume(M),a=2,x):M===91?(e.consume(M),a=5,u=0,E):Ir(M)?(e.consume(M),a=4,r.interrupt?t:L):n(M)}function x(M){return M===45?(e.consume(M),r.interrupt?t:L):n(M)}function E(M){const de="CDATA[";return M===de.charCodeAt(u++)?(e.consume(M),u===de.length?r.interrupt?t:q:E):n(M)}function _(M){return Ir(M)?(e.consume(M),o=String.fromCharCode(M),S):n(M)}function S(M){if(M===null||M===47||M===62||Gt(M)){const de=M===47,_e=o.toLowerCase();return!de&&!s&&v2.includes(_e)?(a=1,r.interrupt?t(M):q(M)):R$.includes(o.toLowerCase())?(a=6,de?(e.consume(M),T):r.interrupt?t(M):q(M)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(M):s?C(M):A(M))}return M===45||xr(M)?(e.consume(M),o+=String.fromCharCode(M),S):n(M)}function T(M){return M===62?(e.consume(M),r.interrupt?t:q):n(M)}function C(M){return pt(M)?(e.consume(M),C):D(M)}function A(M){return M===47?(e.consume(M),D):M===58||M===95||Ir(M)?(e.consume(M),k):pt(M)?(e.consume(M),A):D(M)}function k(M){return M===45||M===46||M===58||M===95||xr(M)?(e.consume(M),k):I(M)}function I(M){return M===61?(e.consume(M),O):pt(M)?(e.consume(M),I):A(M)}function O(M){return M===null||M===60||M===61||M===62||M===96?n(M):M===34||M===39?(e.consume(M),d=M,j):pt(M)?(e.consume(M),O):H(M)}function j(M){return M===d?(e.consume(M),d=null,z):M===null||Xe(M)?n(M):(e.consume(M),j)}function H(M){return M===null||M===34||M===39||M===47||M===60||M===61||M===62||M===96||Gt(M)?I(M):(e.consume(M),H)}function z(M){return M===47||M===62||pt(M)?A(M):n(M)}function D(M){return M===62?(e.consume(M),V):n(M)}function V(M){return M===null||Xe(M)?q(M):pt(M)?(e.consume(M),V):n(M)}function q(M){return M===45&&a===2?(e.consume(M),G):M===60&&a===1?(e.consume(M),F):M===62&&a===4?(e.consume(M),P):M===63&&a===3?(e.consume(M),L):M===93&&a===5?(e.consume(M),K):Xe(M)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(D$,ee,ae)(M)):M===null||Xe(M)?(e.exit("htmlFlowData"),ae(M)):(e.consume(M),q)}function ae(M){return e.check(j$,Q,ee)(M)}function Q(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),W}function W(M){return M===null||Xe(M)?ae(M):(e.enter("htmlFlowData"),q(M))}function G(M){return M===45?(e.consume(M),L):q(M)}function F(M){return M===47?(e.consume(M),o="",$):q(M)}function $(M){if(M===62){const de=o.toLowerCase();return v2.includes(de)?(e.consume(M),P):q(M)}return Ir(M)&&o.length<8?(e.consume(M),o+=String.fromCharCode(M),$):q(M)}function K(M){return M===93?(e.consume(M),L):q(M)}function L(M){return M===62?(e.consume(M),P):M===45&&a===2?(e.consume(M),L):q(M)}function P(M){return M===null||Xe(M)?(e.exit("htmlFlowData"),ee(M)):(e.consume(M),P)}function ee(M){return e.exit("htmlFlow"),t(M)}}function B$(e,t,n){const r=this;return a;function a(o){return Xe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function U$(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(kf,t,n)}}const z$={name:"htmlText",tokenize:F$};function F$(e,t,n){const r=this;let a,s,o;return u;function u(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),d}function d(L){return L===33?(e.consume(L),f):L===47?(e.consume(L),I):L===63?(e.consume(L),A):Ir(L)?(e.consume(L),H):n(L)}function f(L){return L===45?(e.consume(L),m):L===91?(e.consume(L),s=0,E):Ir(L)?(e.consume(L),C):n(L)}function m(L){return L===45?(e.consume(L),x):n(L)}function p(L){return L===null?n(L):L===45?(e.consume(L),b):Xe(L)?(o=p,F(L)):(e.consume(L),p)}function b(L){return L===45?(e.consume(L),x):p(L)}function x(L){return L===62?G(L):L===45?b(L):p(L)}function E(L){const P="CDATA[";return L===P.charCodeAt(s++)?(e.consume(L),s===P.length?_:E):n(L)}function _(L){return L===null?n(L):L===93?(e.consume(L),S):Xe(L)?(o=_,F(L)):(e.consume(L),_)}function S(L){return L===93?(e.consume(L),T):_(L)}function T(L){return L===62?G(L):L===93?(e.consume(L),T):_(L)}function C(L){return L===null||L===62?G(L):Xe(L)?(o=C,F(L)):(e.consume(L),C)}function A(L){return L===null?n(L):L===63?(e.consume(L),k):Xe(L)?(o=A,F(L)):(e.consume(L),A)}function k(L){return L===62?G(L):A(L)}function I(L){return Ir(L)?(e.consume(L),O):n(L)}function O(L){return L===45||xr(L)?(e.consume(L),O):j(L)}function j(L){return Xe(L)?(o=j,F(L)):pt(L)?(e.consume(L),j):G(L)}function H(L){return L===45||xr(L)?(e.consume(L),H):L===47||L===62||Gt(L)?z(L):n(L)}function z(L){return L===47?(e.consume(L),G):L===58||L===95||Ir(L)?(e.consume(L),D):Xe(L)?(o=z,F(L)):pt(L)?(e.consume(L),z):G(L)}function D(L){return L===45||L===46||L===58||L===95||xr(L)?(e.consume(L),D):V(L)}function V(L){return L===61?(e.consume(L),q):Xe(L)?(o=V,F(L)):pt(L)?(e.consume(L),V):z(L)}function q(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),a=L,ae):Xe(L)?(o=q,F(L)):pt(L)?(e.consume(L),q):(e.consume(L),Q)}function ae(L){return L===a?(e.consume(L),a=void 0,W):L===null?n(L):Xe(L)?(o=ae,F(L)):(e.consume(L),ae)}function Q(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||Gt(L)?z(L):(e.consume(L),Q)}function W(L){return L===47||L===62||Gt(L)?z(L):n(L)}function G(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):n(L)}function F(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),$}function $(L){return pt(L)?Tt(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):K(L)}function K(L){return e.enter("htmlTextData"),o(L)}}const L1={name:"labelEnd",resolveAll:q$,resolveTo:G$,tokenize:K$},H$={tokenize:V$},$$={tokenize:W$},Y$={tokenize:X$};function q$(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&ma(e,0,e.length,n),e}function G$(e,t){let n=e.length,r=0,a,s,o,u;for(;n--;)if(a=e[n][1],s){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(s=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(o=n);const d={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},m={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return u=[["enter",d,t],["enter",f,t]],u=ka(u,e.slice(s+1,s+r+3)),u=ka(u,[["enter",m,t]]),u=ka(u,E0(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),u=ka(u,[["exit",m,t],e[o-2],e[o-1],["exit",f,t]]),u=ka(u,e.slice(o+1)),u=ka(u,[["exit",d,t]]),ma(e,s,e.length,u),e}function K$(e,t,n){const r=this;let a=r.events.length,s,o;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){s=r.events[a][1];break}return u;function u(b){return s?s._inactive?p(b):(o=r.parser.defined.includes(Qa(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(H$,m,o?m:p)(b):b===91?e.attempt($$,m,o?f:p)(b):o?m(b):p(b)}function f(b){return e.attempt(Y$,m,p)(b)}function m(b){return t(b)}function p(b){return s._balanced=!0,n(b)}}function V$(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),a}function a(p){return Gt(p)?Bd(e,s)(p):s(p)}function s(p){return p===41?m(p):PI(e,o,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function o(p){return Gt(p)?Bd(e,d)(p):m(p)}function u(p){return n(p)}function d(p){return p===34||p===39||p===40?UI(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function f(p){return Gt(p)?Bd(e,m)(p):m(p)}function m(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function W$(e,t,n){const r=this;return a;function a(u){return BI.call(r,e,s,o,"reference","referenceMarker","referenceString")(u)}function s(u){return r.parser.defined.includes(Qa(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function o(u){return n(u)}}function X$(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),a}function a(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const Q$={name:"labelStartImage",resolveAll:L1.resolveAll,tokenize:Z$};function Z$(e,t,n){const r=this;return a;function a(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),s}function s(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),o):n(u)}function o(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const J$={name:"labelStartLink",resolveAll:L1.resolveAll,tokenize:eY};function eY(e,t,n){const r=this;return a;function a(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Bx={name:"lineEnding",tokenize:tY};function tY(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Tt(e,t,"linePrefix")}}const Gm={name:"thematicBreak",tokenize:nY};function nY(e,t,n){let r=0,a;return s;function s(f){return e.enter("thematicBreak"),o(f)}function o(f){return a=f,u(f)}function u(f){return f===a?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Xe(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===a?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),pt(f)?Tt(e,u,"whitespace")(f):u(f))}}const Gr={continuation:{tokenize:sY},exit:lY,name:"list",tokenize:iY},rY={partial:!0,tokenize:uY},aY={partial:!0,tokenize:oY};function iY(e,t,n){const r=this,a=r.events[r.events.length-1];let s=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,o=0;return u;function u(x){const E=r.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||x===r.containerState.marker:av(x)){if(r.containerState.type||(r.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(Gm,n,f)(x):f(x);if(!r.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(x)}return n(x)}function d(x){return av(x)&&++o<10?(e.consume(x),d):(!r.interrupt||o<2)&&(r.containerState.marker?x===r.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),f(x)):n(x)}function f(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||x,e.check(kf,r.interrupt?n:m,e.attempt(rY,b,p))}function m(x){return r.containerState.initialBlankLine=!0,s++,b(x)}function p(x){return pt(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),b):n(x)}function b(x){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function sY(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(kf,a,s);function a(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Tt(e,t,"listItemIndent",r.containerState.size+1)(u)}function s(u){return r.containerState.furtherBlankLines||!pt(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(aY,t,o)(u))}function o(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Tt(e,e.attempt(Gr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function oY(e,t,n){const r=this;return Tt(e,a,"listItemIndent",r.containerState.size+1);function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(s):n(s)}}function lY(e){e.exit(this.containerState.type)}function uY(e,t,n){const r=this;return Tt(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(s){const o=r.events[r.events.length-1];return!pt(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const E2={name:"setextUnderline",resolveTo:cY,tokenize:dY};function cY(e,t){let n=e.length,r,a,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",s?(e.splice(a,0,["enter",o,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function dY(e,t,n){const r=this;let a;return s;function s(f){let m=r.events.length,p;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){p=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),a=f,o(f)):n(f)}function o(f){return e.enter("setextHeadingLineSequence"),u(f)}function u(f){return f===a?(e.consume(f),u):(e.exit("setextHeadingLineSequence"),pt(f)?Tt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Xe(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const fY={tokenize:hY};function hY(e){const t=this,n=e.attempt(kf,r,e.attempt(this.parser.constructs.flowInitial,a,Tt(e,e.attempt(this.parser.constructs.flow,a,e.attempt(x$,a)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const mY={resolveAll:FI()},pY=zI("string"),gY=zI("text");function zI(e){return{resolveAll:FI(e==="text"?bY:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],s=n.attempt(a,o,u);return o;function o(m){return f(m)?s(m):u(m)}function u(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),d}function d(m){return f(m)?(n.exit("data"),s(m)):(n.consume(m),d)}function f(m){if(m===null)return!0;const p=a[m];let b=-1;if(p)for(;++b<p.length;){const x=p[b];if(!x.previous||x.previous.call(r,r.previous))return!0}return!1}}}function FI(e){return t;function t(n,r){let a=-1,s;for(;++a<=n.length;)s===void 0?n[a]&&n[a][1].type==="data"&&(s=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==s+2&&(n[s][1].end=n[a-1][1].end,n.splice(s+2,a-s-2),a=s+2),s=void 0);return e?e(n,r):n}}function bY(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let s=a.length,o=-1,u=0,d;for(;s--;){const f=a[s];if(typeof f=="string"){for(o=f.length;f.charCodeAt(o-1)===32;)u++,o--;if(o)break;o=-1}else if(f===-2)d=!0,u++;else if(f!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const f={type:n===e.length||d||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const xY={42:Gr,43:Gr,45:Gr,48:Gr,49:Gr,50:Gr,51:Gr,52:Gr,53:Gr,54:Gr,55:Gr,56:Gr,57:Gr,62:MI},yY={91:N$},vY={[-2]:Px,[-1]:Px,32:Px},EY={35:k$,42:Gm,45:[E2,Gm],60:M$,61:E2,95:Gm,96:y2,126:y2},_Y={38:jI,92:DI},NY={[-5]:Bx,[-4]:Bx,[-3]:Bx,33:Q$,38:jI,42:iv,60:[JH,z$],91:J$,92:[A$,DI],93:L1,95:iv,96:f$},TY={null:[iv,mY]},SY={null:[42,95]},wY={null:[]},AY=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:SY,contentInitial:yY,disable:wY,document:xY,flow:EY,flowInitial:vY,insideSpan:TY,string:_Y,text:NY},Symbol.toStringTag,{value:"Module"}));function CY(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},s=[];let o=[],u=[];const d={attempt:j(I),check:j(O),consume:C,enter:A,exit:k,interrupt:j(O,{interrupt:!0})},f={code:null,containerState:{},defineSkip:_,events:[],now:E,parser:e,previous:null,sliceSerialize:b,sliceStream:x,write:p};let m=t.tokenize.call(f,d);return t.resolveAll&&s.push(t),f;function p(V){return o=ka(o,V),S(),o[o.length-1]!==null?[]:(H(t,0),f.events=E0(s,f.events,f),f.events)}function b(V,q){return OY(x(V),q)}function x(V){return kY(o,V)}function E(){const{_bufferIndex:V,_index:q,line:ae,column:Q,offset:W}=r;return{_bufferIndex:V,_index:q,line:ae,column:Q,offset:W}}function _(V){a[V.line]=V.column,D()}function S(){let V;for(;r._index<o.length;){const q=o[r._index];if(typeof q=="string")for(V=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===V&&r._bufferIndex<q.length;)T(q.charCodeAt(r._bufferIndex));else T(q)}}function T(V){m=m(V)}function C(V){Xe(V)?(r.line++,r.column=1,r.offset+=V===-3?2:1,D()):V!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=V}function A(V,q){const ae=q||{};return ae.type=V,ae.start=E(),f.events.push(["enter",ae,f]),u.push(ae),ae}function k(V){const q=u.pop();return q.end=E(),f.events.push(["exit",q,f]),q}function I(V,q){H(V,q.from)}function O(V,q){q.restore()}function j(V,q){return ae;function ae(Q,W,G){let F,$,K,L;return Array.isArray(Q)?ee(Q):"tokenize"in Q?ee([Q]):P(Q);function P(U){return he;function he(Oe){const pe=Oe!==null&&U[Oe],De=Oe!==null&&U.null,je=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(De)?De:De?[De]:[]];return ee(je)(Oe)}}function ee(U){return F=U,$=0,U.length===0?G:M(U[$])}function M(U){return he;function he(Oe){return L=z(),K=U,U.partial||(f.currentConstruct=U),U.name&&f.parser.constructs.disable.null.includes(U.name)?_e():U.tokenize.call(q?Object.assign(Object.create(f),q):f,d,de,_e)(Oe)}}function de(U){return V(K,L),W}function _e(U){return L.restore(),++$<F.length?M(F[$]):G}}}function H(V,q){V.resolveAll&&!s.includes(V)&&s.push(V),V.resolve&&ma(f.events,q,f.events.length-q,V.resolve(f.events.slice(q),f)),V.resolveTo&&(f.events=V.resolveTo(f.events,f))}function z(){const V=E(),q=f.previous,ae=f.currentConstruct,Q=f.events.length,W=Array.from(u);return{from:Q,restore:G};function G(){r=V,f.previous=q,f.currentConstruct=ae,f.events.length=Q,u=W,D()}}function D(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function kY(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,s=t.end._bufferIndex;let o;if(n===a)o=[e[n].slice(r,s)];else{if(o=e.slice(n,a),r>-1){const u=o[0];typeof u=="string"?o[0]=u.slice(r):o.shift()}s>0&&o.push(e[a].slice(0,s))}return o}function OY(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const s=e[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
|
|
494
|
+
`;break}case-3:{o=`\r
|
|
495
|
+
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&a)continue;o=" ";break}default:o=String.fromCharCode(s)}a=s===-2,r.push(o)}return r.join("")}function IY(e){const r={constructs:II([AY,...(e||{}).extensions||[]]),content:a(GH),defined:[],document:a(VH),flow:a(fY),lazy:{},string:a(pY),text:a(gY)};return r;function a(s){return o;function o(u){return CY(r,s,u)}}}function RY(e){for(;!LI(e););return e}const _2=/[\0\t\n\r]/g;function MY(){let e=1,t="",n=!0,r;return a;function a(s,o,u){const d=[];let f,m,p,b,x;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),p=0,t="",n&&(s.charCodeAt(0)===65279&&p++,n=void 0);p<s.length;){if(_2.lastIndex=p,f=_2.exec(s),b=f&&f.index!==void 0?f.index:s.length,x=s.charCodeAt(b),!f){t=s.slice(p);break}if(x===10&&p===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),p<b&&(d.push(s.slice(p,b)),e+=b-p),x){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:r=!0,e=1}p=b+1}return u&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const DY=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function jY(e){return e.replace(DY,LY)}function LY(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),s=a===120||a===88;return RI(n.slice(s?2:1),s?16:10)}return j1(n)||e}const HI={}.hasOwnProperty;function PY(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),BY(n)(RY(IY(n).document().write(MY()(e,t,!0))))}function BY(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(jr),autolinkProtocol:z,autolinkEmail:z,atxHeading:s(ze),blockQuote:s(De),characterEscape:z,characterReference:z,codeFenced:s(je),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(je,o),codeText:s(Ee,o),codeTextData:z,data:z,codeFlowValue:z,definition:s(It),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(nt),hardBreakEscape:s(We),hardBreakTrailing:s(We),htmlFlow:s(cn,o),htmlFlowData:z,htmlText:s(cn,o),htmlTextData:z,image:s(Un),label:o,link:s(jr),listItem:s(Ne),listItemValue:b,listOrdered:s(Fa,p),listUnordered:s(Fa),paragraph:s(vt),reference:M,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(ze),strong:s(ta),thematicBreak:s(Ol)},exit:{atxHeading:d(),atxHeadingSequence:I,autolink:d(),autolinkEmail:pe,autolinkProtocol:Oe,blockQuote:d(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:_e,characterReferenceMarkerNumeric:_e,characterReferenceValue:U,characterReference:he,codeFenced:d(S),codeFencedFence:_,codeFencedFenceInfo:x,codeFencedFenceMeta:E,codeFlowValue:D,codeIndented:d(T),codeText:d(W),codeTextData:D,data:D,definition:d(),definitionDestinationString:k,definitionLabelString:C,definitionTitleString:A,emphasis:d(),hardBreakEscape:d(q),hardBreakTrailing:d(q),htmlFlow:d(ae),htmlFlowData:D,htmlText:d(Q),htmlTextData:D,image:d(F),label:K,labelText:$,lineEnding:V,link:d(G),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:de,resourceDestinationString:L,resourceTitleString:P,resource:ee,setextHeading:d(H),setextHeadingLineSequence:j,setextHeadingText:O,strong:d(),thematicBreak:d()}};$I(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ge){let ke={type:"root",children:[]};const Qe={stack:[ke],tokenStack:[],config:t,enter:u,exit:f,buffer:o,resume:m,data:n},ct=[];let St=-1;for(;++St<ge.length;)if(ge[St][1].type==="listOrdered"||ge[St][1].type==="listUnordered")if(ge[St][0]==="enter")ct.push(St);else{const Sr=ct.pop();St=a(ge,Sr,St)}for(St=-1;++St<ge.length;){const Sr=t[ge[St][0]];HI.call(Sr,ge[St][1].type)&&Sr[ge[St][1].type].call(Object.assign({sliceSerialize:ge[St][2].sliceSerialize},Qe),ge[St][1])}if(Qe.tokenStack.length>0){const Sr=Qe.tokenStack[Qe.tokenStack.length-1];(Sr[1]||N2).call(Qe,void 0,Sr[0])}for(ke.position={start:Xs(ge.length>0?ge[0][1].start:{line:1,column:1,offset:0}),end:Xs(ge.length>0?ge[ge.length-2][1].end:{line:1,column:1,offset:0})},St=-1;++St<t.transforms.length;)ke=t.transforms[St](ke)||ke;return ke}function a(ge,ke,Qe){let ct=ke-1,St=-1,Sr=!1,Ha,Qn,dn,cr;for(;++ct<=Qe;){const Rt=ge[ct];switch(Rt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Rt[0]==="enter"?St++:St--,cr=void 0;break}case"lineEndingBlank":{Rt[0]==="enter"&&(Ha&&!cr&&!St&&!dn&&(dn=ct),cr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:cr=void 0}if(!St&&Rt[0]==="enter"&&Rt[1].type==="listItemPrefix"||St===-1&&Rt[0]==="exit"&&(Rt[1].type==="listUnordered"||Rt[1].type==="listOrdered")){if(Ha){let ai=ct;for(Qn=void 0;ai--;){const wr=ge[ai];if(wr[1].type==="lineEnding"||wr[1].type==="lineEndingBlank"){if(wr[0]==="exit")continue;Qn&&(ge[Qn][1].type="lineEndingBlank",Sr=!0),wr[1].type="lineEnding",Qn=ai}else if(!(wr[1].type==="linePrefix"||wr[1].type==="blockQuotePrefix"||wr[1].type==="blockQuotePrefixWhitespace"||wr[1].type==="blockQuoteMarker"||wr[1].type==="listItemIndent"))break}dn&&(!Qn||dn<Qn)&&(Ha._spread=!0),Ha.end=Object.assign({},Qn?ge[Qn][1].start:Rt[1].end),ge.splice(Qn||ct,0,["exit",Ha,Rt[2]]),ct++,Qe++}if(Rt[1].type==="listItemPrefix"){const ai={type:"listItem",_spread:!1,start:Object.assign({},Rt[1].start),end:void 0};Ha=ai,ge.splice(ct,0,["enter",ai,Rt[2]]),ct++,Qe++,dn=void 0,cr=!0}}}return ge[ke][1]._spread=Sr,Qe}function s(ge,ke){return Qe;function Qe(ct){u.call(this,ge(ct),ct),ke&&ke.call(this,ct)}}function o(){this.stack.push({type:"fragment",children:[]})}function u(ge,ke,Qe){this.stack[this.stack.length-1].children.push(ge),this.stack.push(ge),this.tokenStack.push([ke,Qe||void 0]),ge.position={start:Xs(ke.start),end:void 0}}function d(ge){return ke;function ke(Qe){ge&&ge.call(this,Qe),f.call(this,Qe)}}function f(ge,ke){const Qe=this.stack.pop(),ct=this.tokenStack.pop();if(ct)ct[0].type!==ge.type&&(ke?ke.call(this,ge,ct[0]):(ct[1]||N2).call(this,ge,ct[0]));else throw new Error("Cannot close `"+ge.type+"` ("+Pd({start:ge.start,end:ge.end})+"): it’s not open");Qe.position.end=Xs(ge.end)}function m(){return D1(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function b(ge){if(this.data.expectingFirstListItemValue){const ke=this.stack[this.stack.length-2];ke.start=Number.parseInt(this.sliceSerialize(ge),10),this.data.expectingFirstListItemValue=void 0}}function x(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.lang=ge}function E(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.meta=ge}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ge.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ge.replace(/(\r?\n|\r)$/g,"")}function C(ge){const ke=this.resume(),Qe=this.stack[this.stack.length-1];Qe.label=ke,Qe.identifier=Qa(this.sliceSerialize(ge)).toLowerCase()}function A(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.title=ge}function k(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.url=ge}function I(ge){const ke=this.stack[this.stack.length-1];if(!ke.depth){const Qe=this.sliceSerialize(ge).length;ke.depth=Qe}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function j(ge){const ke=this.stack[this.stack.length-1];ke.depth=this.sliceSerialize(ge).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function z(ge){const Qe=this.stack[this.stack.length-1].children;let ct=Qe[Qe.length-1];(!ct||ct.type!=="text")&&(ct=Vt(),ct.position={start:Xs(ge.start),end:void 0},Qe.push(ct)),this.stack.push(ct)}function D(ge){const ke=this.stack.pop();ke.value+=this.sliceSerialize(ge),ke.position.end=Xs(ge.end)}function V(ge){const ke=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Qe=ke.children[ke.children.length-1];Qe.position.end=Xs(ge.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ke.type)&&(z.call(this,ge),D.call(this,ge))}function q(){this.data.atHardBreak=!0}function ae(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ge}function Q(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ge}function W(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ge}function G(){const ge=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=ke,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function F(){const ge=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=ke,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function $(ge){const ke=this.sliceSerialize(ge),Qe=this.stack[this.stack.length-2];Qe.label=jY(ke),Qe.identifier=Qa(ke).toLowerCase()}function K(){const ge=this.stack[this.stack.length-1],ke=this.resume(),Qe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Qe.type==="link"){const ct=ge.children;Qe.children=ct}else Qe.alt=ke}function L(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.url=ge}function P(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.title=ge}function ee(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function de(ge){const ke=this.resume(),Qe=this.stack[this.stack.length-1];Qe.label=ke,Qe.identifier=Qa(this.sliceSerialize(ge)).toLowerCase(),this.data.referenceType="full"}function _e(ge){this.data.characterReferenceType=ge.type}function U(ge){const ke=this.sliceSerialize(ge),Qe=this.data.characterReferenceType;let ct;Qe?(ct=RI(ke,Qe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ct=j1(ke);const St=this.stack[this.stack.length-1];St.value+=ct}function he(ge){const ke=this.stack.pop();ke.position.end=Xs(ge.end)}function Oe(ge){D.call(this,ge);const ke=this.stack[this.stack.length-1];ke.url=this.sliceSerialize(ge)}function pe(ge){D.call(this,ge);const ke=this.stack[this.stack.length-1];ke.url="mailto:"+this.sliceSerialize(ge)}function De(){return{type:"blockquote",children:[]}}function je(){return{type:"code",lang:null,meta:null,value:""}}function Ee(){return{type:"inlineCode",value:""}}function It(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function nt(){return{type:"emphasis",children:[]}}function ze(){return{type:"heading",depth:0,children:[]}}function We(){return{type:"break"}}function cn(){return{type:"html",value:""}}function Un(){return{type:"image",title:null,url:"",alt:null}}function jr(){return{type:"link",title:null,url:"",children:[]}}function Fa(ge){return{type:"list",ordered:ge.type==="listOrdered",start:null,spread:ge._spread,children:[]}}function Ne(ge){return{type:"listItem",spread:ge._spread,checked:null,children:[]}}function vt(){return{type:"paragraph",children:[]}}function ta(){return{type:"strong",children:[]}}function Vt(){return{type:"text",value:""}}function Ol(){return{type:"thematicBreak"}}}function Xs(e){return{line:e.line,column:e.column,offset:e.offset}}function $I(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?$I(e,r):UY(e,r)}}function UY(e,t){let n;for(n in t)if(HI.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function N2(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Pd({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Pd({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Pd({start:t.start,end:t.end})+") is still open")}function zY(e){const t=this;t.parser=n;function n(r){return PY(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function FY(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function HY(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
496
|
+
`}]}function $Y(e,t){const n=t.value?t.value+`
|
|
497
|
+
`:"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function YY(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qY(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GY(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=nc(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,u+=1,e.footnoteCounts.set(r,u);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function KY(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VY(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function YI(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),s=a[0];s&&s.type==="text"?s.value="["+s.value:a.unshift({type:"text",value:"["});const o=a[a.length-1];return o&&o.type==="text"?o.value+=r:a.push({type:"text",value:r}),a}function WY(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return YI(e,t);const a={src:nc(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const s={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,s),e.applyData(t,s)}function XY(e,t){const n={src:nc(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function QY(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function ZY(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return YI(e,t);const a={href:nc(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const s={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function JY(e,t){const n={href:nc(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function eq(e,t,n){const r=e.all(t),a=n?tq(n):qI(t),s={},o=[];if(typeof t.checked=="boolean"){const m=r[0];let p;m&&m.type==="element"&&m.tagName==="p"?p=m:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const m=r[u];(a||u!==0||m.type!=="element"||m.tagName!=="p")&&o.push({type:"text",value:`
|
|
498
|
+
`}),m.type==="element"&&m.tagName==="p"&&!a?o.push(...m.children):o.push(m)}const d=r[r.length-1];d&&(a||d.type!=="element"||d.tagName!=="p")&&o.push({type:"text",value:`
|
|
499
|
+
`});const f={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,f),e.applyData(t,f)}function tq(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=qI(n[r])}return t}function qI(e){const t=e.spread;return t??e.children.length>1}function nq(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const o=r[a];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function rq(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aq(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function iq(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sq(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),a.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=Ai(t.children[1]),d=y0(t.children[t.children.length-1]);u&&d&&(o.position={start:u,end:d}),a.push(o)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,s),e.applyData(t,s)}function oq(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,u=o?o.length:t.children.length;let d=-1;const f=[];for(;++d<u;){const p=t.children[d],b={},x=o?o[d]:void 0;x&&(b.align=x);let E={type:"element",tagName:s,properties:b,children:[]};p&&(E.children=e.all(p),e.patch(p,E),E=e.applyData(p,E)),f.push(E)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,m),e.applyData(t,m)}function lq(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const T2=9,S2=32;function uq(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const s=[];for(;r;)s.push(w2(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return s.push(w2(t.slice(a),a>0,!1)),s.join("")}function w2(e,t,n){let r=0,a=e.length;if(t){let s=e.codePointAt(r);for(;s===T2||s===S2;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(a-1);for(;s===T2||s===S2;)a--,s=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function cq(e,t){const n={type:"text",value:uq(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function dq(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const fq={blockquote:FY,break:HY,code:$Y,delete:YY,emphasis:qY,footnoteReference:GY,heading:KY,html:VY,imageReference:WY,image:XY,inlineCode:QY,linkReference:ZY,link:JY,listItem:eq,list:nq,paragraph:rq,root:aq,strong:iq,table:sq,tableCell:lq,tableRow:oq,text:cq,thematicBreak:dq,toml:gm,yaml:gm,definition:gm,footnoteDefinition:gm};function gm(){}const GI=-1,_0=0,Ud=1,lp=2,P1=3,B1=4,U1=5,z1=6,KI=7,VI=8,WI=typeof self=="object"?self:globalThis,A2=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new WI[e](t)},hq=(e,t)=>{const n=(a,s)=>(e.set(s,a),a),r=a=>{if(e.has(a))return e.get(a);const[s,o]=t[a];switch(s){case _0:case GI:return n(o,a);case Ud:{const u=n([],a);for(const d of o)u.push(r(d));return u}case lp:{const u=n({},a);for(const[d,f]of o)u[r(d)]=r(f);return u}case P1:return n(new Date(o),a);case B1:{const{source:u,flags:d}=o;return n(new RegExp(u,d),a)}case U1:{const u=n(new Map,a);for(const[d,f]of o)u.set(r(d),r(f));return u}case z1:{const u=n(new Set,a);for(const d of o)u.add(r(d));return u}case KI:{const{name:u,message:d}=o;return n(typeof WI[u]=="function"?A2(u,d):new Error(d),a)}case VI:return n(BigInt(o),a);case"BigInt":return n(Object(BigInt(o)),a);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:u}=new Uint8Array(o);return n(new DataView(u),o)}}return n(A2(s,o),a)};return r},C2=e=>hq(new Map,e)(0),qo="",{toString:mq}={},{keys:pq}=Object,bd=e=>{const t=typeof e;if(t!=="object"||!e)return[_0,t];const n=mq.call(e).slice(8,-1);switch(n){case"Array":return[Ud,qo];case"Object":return[lp,qo];case"Date":return[P1,qo];case"RegExp":return[B1,qo];case"Map":return[U1,qo];case"Set":return[z1,qo];case"DataView":return[Ud,n]}return n.includes("Array")?[Ud,n]:e instanceof Error?[KI,e.name||"Error"]:[lp,n]},bm=([e,t])=>e===_0&&(t==="function"||t==="symbol"),gq=(e,t,n,r)=>{const a=(o,u)=>{const d=r.push(o)-1;return n.set(u,d),d},s=o=>{if(n.has(o))return n.get(o);let[u,d]=bd(o);switch(u){case _0:{let m=o;switch(d){case"bigint":u=VI,m=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);m=null;break;case"undefined":return a([GI],o)}return a([u,m],o)}case Ud:{if(d){let b=o;return d==="DataView"?b=new Uint8Array(o.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(o)),a([d,[...b]],o)}const m=[],p=a([u,m],o);for(const b of o)m.push(s(b));return p}case lp:{if(d)switch(d){case"BigInt":return a([d,o.toString()],o);case"Boolean":case"Number":case"String":return a([d,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const m=[],p=a([u,m],o);for(const b of pq(o))(e||!bm(bd(o[b])))&&m.push([s(b),s(o[b])]);return p}case P1:return a([u,isNaN(o.getTime())?qo:o.toISOString()],o);case B1:{const{source:m,flags:p}=o;return a([u,{source:m,flags:p}],o)}case U1:{const m=[],p=a([u,m],o);for(const[b,x]of o)(e||!(bm(bd(b))||bm(bd(x))))&&m.push([s(b),s(x)]);return p}case z1:{const m=[],p=a([u,m],o);for(const b of o)(e||!bm(bd(b)))&&m.push(s(b));return p}}const{message:f}=o;return a([u,{name:d,message:f}],o)};return s},k2=(e,{json:t,lossy:n}={})=>{const r=[];return gq(!(t||n),!!t,new Map,r)(e),r},Pu=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?C2(k2(e,t)):structuredClone(e):(e,t)=>C2(k2(e,t));function bq(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function xq(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function yq(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||bq,r=e.options.footnoteBackLabel||xq,a=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const m=e.all(f),p=String(f.identifier).toUpperCase(),b=nc(p.toLowerCase());let x=0;const E=[],_=e.footnoteCounts.get(p);for(;_!==void 0&&++x<=_;){E.length>0&&E.push({type:"text",value:" "});let C=typeof n=="string"?n:n(d,x);typeof C=="string"&&(C={type:"text",value:C}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,x),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const S=m[m.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const C=S.children[S.children.length-1];C&&C.type==="text"?C.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...E)}else m.push(...E);const T={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(m,!0)};e.patch(f,T),u.push(T)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Pu(o),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
500
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
501
|
+
`}]}}const Of=(function(e){if(e==null)return Nq;if(typeof e=="function")return N0(e);if(typeof e=="object")return Array.isArray(e)?vq(e):Eq(e);if(typeof e=="string")return _q(e);throw new Error("Expected function, string, or object as test")});function vq(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Of(e[n]);return N0(r);function r(...a){let s=-1;for(;++s<t.length;)if(t[s].apply(this,a))return!0;return!1}}function Eq(e){const t=e;return N0(n);function n(r){const a=r;let s;for(s in e)if(a[s]!==t[s])return!1;return!0}}function _q(e){return N0(t);function t(n){return n&&n.type===e}}function N0(e){return t;function t(n,r,a){return!!(Tq(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function Nq(){return!0}function Tq(e){return e!==null&&typeof e=="object"&&"type"in e}const XI=[],Sq=!0,sv=!1,wq="skip";function QI(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const s=Of(a),o=r?-1:1;u(e,void 0,[])();function u(d,f,m){const p=d&&typeof d=="object"?d:{};if(typeof p.type=="string"){const x=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(x?"<"+x+">":""))+")"})}return b;function b(){let x=XI,E,_,S;if((!t||s(d,f,m[m.length-1]||void 0))&&(x=Aq(n(d,m)),x[0]===sv))return x;if("children"in d&&d.children){const T=d;if(T.children&&x[0]!==wq)for(_=(r?T.children.length:-1)+o,S=m.concat(T);_>-1&&_<T.children.length;){const C=T.children[_];if(E=u(C,_,S)(),E[0]===sv)return E;_=typeof E[1]=="number"?E[1]:_+o}}return x}}}function Aq(e){return Array.isArray(e)?e:typeof e=="number"?[Sq,e]:e==null?XI:[e]}function If(e,t,n,r){let a,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,a=n):(s=t,o=n,a=r),QI(e,s,u,a);function u(d,f){const m=f[f.length-1],p=m?m.children.indexOf(d):void 0;return o(d,p,m)}}const ov={}.hasOwnProperty,Cq={};function kq(e,t){const n=t||Cq,r=new Map,a=new Map,s=new Map,o={...fq,...n.handlers},u={all:f,applyData:Iq,definitionById:r,footnoteById:a,footnoteCounts:s,footnoteOrder:[],handlers:o,one:d,options:n,patch:Oq,wrap:Mq};return If(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const p=m.type==="definition"?r:a,b=String(m.identifier).toUpperCase();p.has(b)||p.set(b,m)}}),u;function d(m,p){const b=m.type,x=u.handlers[b];if(ov.call(u.handlers,b)&&x)return x(u,m,p);if(u.options.passThrough&&u.options.passThrough.includes(b)){if("children"in m){const{children:_,...S}=m,T=Pu(S);return T.children=u.all(m),T}return Pu(m)}return(u.options.unknownHandler||Rq)(u,m,p)}function f(m){const p=[];if("children"in m){const b=m.children;let x=-1;for(;++x<b.length;){const E=u.one(b[x],m);if(E){if(x&&b[x-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=O2(E.value)),!Array.isArray(E)&&E.type==="element")){const _=E.children[0];_&&_.type==="text"&&(_.value=O2(_.value))}Array.isArray(E)?p.push(...E):p.push(E)}}}return p}}function Oq(e,t){e.position&&(t.position=xH(e))}function Iq(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&s&&Object.assign(n.properties,Pu(s)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function Rq(e,t){const n=t.data||{},r="value"in t&&!(ov.call(n,"hProperties")||ov.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Mq(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
502
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
503
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
504
|
+
`}),n}function O2(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function I2(e,t){const n=kq(e,t),r=n.one(e,void 0),a=yq(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&s.children.push({type:"text",value:`
|
|
505
|
+
`},a),s}function Dq(e,t){return e&&"run"in e?async function(n,r){const a=I2(n,{file:r,...t});await e.run(a,r)}:function(n,r){return I2(n,{file:r,...e||t})}}function R2(e){if(e)throw e}var Ux,M2;function jq(){if(M2)return Ux;M2=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},s=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var m=e.call(f,"constructor"),p=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!m&&!p)return!1;var b;for(b in f);return typeof b>"u"||e.call(f,b)},o=function(f,m){n&&m.name==="__proto__"?n(f,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):f[m.name]=m.newValue},u=function(f,m){if(m==="__proto__")if(e.call(f,m)){if(r)return r(f,m).value}else return;return f[m]};return Ux=function d(){var f,m,p,b,x,E,_=arguments[0],S=1,T=arguments.length,C=!1;for(typeof _=="boolean"&&(C=_,_=arguments[1]||{},S=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});S<T;++S)if(f=arguments[S],f!=null)for(m in f)p=u(_,m),b=u(f,m),_!==b&&(C&&b&&(s(b)||(x=a(b)))?(x?(x=!1,E=p&&a(p)?p:[]):E=p&&s(p)?p:{},o(_,{name:m,newValue:d(C,E,b)})):typeof b<"u"&&o(_,{name:m,newValue:b}));return _},Ux}var Lq=jq();const zx=yf(Lq);function lv(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Pq(){const e=[],t={run:n,use:r};return t;function n(...a){let s=-1;const o=a.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);u(null,...a);function u(d,...f){const m=e[++s];let p=-1;if(d){o(d);return}for(;++p<a.length;)(f[p]===null||f[p]===void 0)&&(f[p]=a[p]);a=f,m?Bq(m,u)(...f):o(null,...f)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function Bq(e,t){let n;return r;function r(...o){const u=e.length>o.length;let d;u&&o.push(a);try{d=e.apply(this,o)}catch(f){const m=f;if(u&&n)throw m;return a(m)}u||(d&&d.then&&typeof d.then=="function"?d.then(s,a):d instanceof Error?a(d):s(d))}function a(o,...u){n||(n=!0,t(o,...u))}function s(o){a(null,o)}}const pi={basename:Uq,dirname:zq,extname:Fq,join:Hq,sep:"/"};function Uq(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Rf(e);let n=0,r=-1,a=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(s){n=a+1;break}}else r<0&&(s=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,u=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(s){n=a+1;break}}else o<0&&(s=!0,o=a+1),u>-1&&(e.codePointAt(a)===t.codePointAt(u--)?u<0&&(r=a):(u=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function zq(e){if(Rf(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Fq(e){Rf(e);let t=e.length,n=-1,r=0,a=-1,s=0,o;for(;t--;){const u=e.codePointAt(t);if(u===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),u===46?a<0?a=t:s!==1&&(s=1):a>-1&&(s=-1)}return a<0||n<0||s===0||s===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function Hq(...e){let t=-1,n;for(;++t<e.length;)Rf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":$q(n)}function $q(e){Rf(e);const t=e.codePointAt(0)===47;let n=Yq(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Yq(e,t){let n="",r=0,a=-1,s=0,o=-1,u,d;for(;++o<=e.length;){if(o<e.length)u=e.codePointAt(o);else{if(u===47)break;u=47}if(u===47){if(!(a===o-1||s===1))if(a!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),a=o,s=0;continue}}else if(n.length>0){n="",r=0,a=o,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,o):n=e.slice(a+1,o),r=o-a-1;a=o,s=0}else u===46&&s>-1?s++:s=-1}return n}function Rf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const qq={cwd:Gq};function Gq(){return"/"}function uv(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Kq(e){if(typeof e=="string")e=new URL(e);else if(!uv(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Vq(e)}function Vq(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const Fx=["history","path","basename","stem","extname","dirname"];class ZI{constructor(t){let n;t?uv(t)?n={path:t}:typeof t=="string"||Wq(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":qq.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Fx.length;){const s=Fx[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let a;for(a in n)Fx.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?pi.basename(this.path):void 0}set basename(t){$x(t,"basename"),Hx(t,"basename"),this.path=pi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?pi.dirname(this.path):void 0}set dirname(t){D2(this.basename,"dirname"),this.path=pi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?pi.extname(this.path):void 0}set extname(t){if(Hx(t,"extname"),D2(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=pi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){uv(t)&&(t=Kq(t)),$x(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?pi.basename(this.path,this.extname):void 0}set stem(t){$x(t,"stem"),Hx(t,"stem"),this.path=pi.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new Er(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Hx(e,t){if(e&&e.includes(pi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+pi.sep+"`")}function $x(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function D2(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Wq(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Xq=(function(e){const r=this.constructor.prototype,a=r[e],s=function(){return a.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),Qq={}.hasOwnProperty;class F1 extends Xq{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=Pq()}copy(){const t=new F1;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(zx(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Gx("data",this.frozen),this.namespace[t]=n,this):Qq.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Gx("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=xm(t),r=this.parser||this.Parser;return Yx("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Yx("process",this.parser||this.Parser),qx("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(s,o){const u=xm(t),d=r.parse(u);r.run(d,u,function(m,p,b){if(m||!p||!b)return f(m);const x=p,E=r.stringify(x,b);eG(E)?b.value=E:b.result=E,f(m,b)});function f(m,p){m||!p?o(m):s?s(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),Yx("processSync",this.parser||this.Parser),qx("processSync",this.compiler||this.Compiler),this.process(t,a),L2("processSync","process",n),r;function a(s,o){n=!0,R2(s),r=o}}run(t,n,r){j2(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,u){const d=xm(n);a.run(t,d,f);function f(m,p,b){const x=p||t;m?u(m):o?o(x):r(void 0,x,b)}}}runSync(t,n){let r=!1,a;return this.run(t,n,s),L2("runSync","run",r),a;function s(o,u){R2(o),a=u,r=!0}}stringify(t,n){this.freeze();const r=xm(n),a=this.compiler||this.Compiler;return qx("stringify",a),j2(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(Gx("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[m,...p]=f;d(m,p)}else o(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function o(f){if(!("plugins"in f)&&!("settings"in f))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");u(f.plugins),f.settings&&(a.settings=zx(!0,a.settings,f.settings))}function u(f){let m=-1;if(f!=null)if(Array.isArray(f))for(;++m<f.length;){const p=f[m];s(p)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,m){let p=-1,b=-1;for(;++p<r.length;)if(r[p][0]===f){b=p;break}if(b===-1)r.push([f,...m]);else if(m.length>0){let[x,...E]=m;const _=r[b][1];lv(_)&&lv(x)&&(x=zx(!0,_,x)),r[b]=[f,x,...E]}}}}const Zq=new F1().freeze();function Yx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function qx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Gx(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function j2(e){if(!lv(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function L2(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function xm(e){return Jq(e)?e:new ZI(e)}function Jq(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function eG(e){return typeof e=="string"||tG(e)}function tG(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const nG="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",P2=[],B2={allowDangerousHtml:!0},rG=/^(https?|ircs?|mailto|xmpp)$/i,aG=[{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 cl(e){const t=iG(e),n=sG(e);return oG(t.runSync(t.parse(n),n),e)}function iG(e){const t=e.rehypePlugins||P2,n=e.remarkPlugins||P2,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...B2}:B2;return Zq().use(zY).use(n).use(Dq,r).use(t)}function sG(e){const t=e.children||"",n=new ZI;return typeof t=="string"&&(n.value=t),n}function oG(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,s=t.disallowedElements,o=t.skipHtml,u=t.unwrapDisallowed,d=t.urlTransform||lG;for(const m of aG)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+nG+m.id,void 0);return If(e,f),NH(e,{Fragment:c.Fragment,components:a,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0});function f(m,p,b){if(m.type==="raw"&&b&&typeof p=="number")return o?b.children.splice(p,1):b.children[p]={type:"text",value:m.value},p;if(m.type==="element"){let x;for(x in Lx)if(Object.hasOwn(Lx,x)&&Object.hasOwn(m.properties,x)){const E=m.properties[x],_=Lx[x];(_===null||_.includes(m.tagName))&&(m.properties[x]=d(String(E||""),x,m))}}if(m.type==="element"){let x=n?!n.includes(m.tagName):s?s.includes(m.tagName):!1;if(!x&&r&&typeof p=="number"&&(x=!r(m,p,b)),x&&b&&typeof p=="number")return u&&m.children?b.children.splice(p,1,...m.children):b.children.splice(p,1),p}}}function lG(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||r!==-1&&t>r||rG.test(e.slice(0,t))?e:""}function U2(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function uG(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function cG(e,t,n){const a=Of((n||{}).ignore||[]),s=dG(t);let o=-1;for(;++o<s.length;)QI(e,"text",u);function u(f,m){let p=-1,b;for(;++p<m.length;){const x=m[p],E=b?b.children:void 0;if(a(x,E?E.indexOf(x):void 0,b))return;b=x}if(b)return d(f,m)}function d(f,m){const p=m[m.length-1],b=s[o][0],x=s[o][1];let E=0;const S=p.children.indexOf(f);let T=!1,C=[];b.lastIndex=0;let A=b.exec(f.value);for(;A;){const k=A.index,I={index:A.index,input:A.input,stack:[...m,f]};let O=x(...A,I);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O===!1?b.lastIndex=k+1:(E!==k&&C.push({type:"text",value:f.value.slice(E,k)}),Array.isArray(O)?C.push(...O):O&&C.push(O),E=k+A[0].length,T=!0),!b.global)break;A=b.exec(f.value)}return T?(E<f.value.length&&C.push({type:"text",value:f.value.slice(E)}),p.children.splice(S,1,...C)):C=[f],S+C.length}}function dG(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const a=n[r];t.push([fG(a[0]),hG(a[1])])}return t}function fG(e){return typeof e=="string"?new RegExp(uG(e),"g"):e}function hG(e){return typeof e=="function"?e:function(){return e}}const Kx="phrasing",Vx=["autolink","link","image","label"];function mG(){return{transforms:[EG],enter:{literalAutolink:gG,literalAutolinkEmail:Wx,literalAutolinkHttp:Wx,literalAutolinkWww:Wx},exit:{literalAutolink:vG,literalAutolinkEmail:yG,literalAutolinkHttp:bG,literalAutolinkWww:xG}}}function pG(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Kx,notInConstruct:Vx},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Kx,notInConstruct:Vx},{character:":",before:"[ps]",after:"\\/",inConstruct:Kx,notInConstruct:Vx}]}}function gG(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Wx(e){this.config.enter.autolinkProtocol.call(this,e)}function bG(e){this.config.exit.autolinkProtocol.call(this,e)}function xG(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function yG(e){this.config.exit.autolinkEmail.call(this,e)}function vG(e){this.exit(e)}function EG(e){cG(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,_G],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),NG]],{ignore:["link","linkReference"]})}function _G(e,t,n,r,a){let s="";if(!JI(a)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!TG(n)))return!1;const o=SG(n+r);if(!o[0])return!1;const u={type:"link",title:null,url:s+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[u,{type:"text",value:o[1]}]:u}function NG(e,t,n,r){return!JI(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function TG(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function SG(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const a=U2(e,"(");let s=U2(e,")");for(;r!==-1&&a>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function JI(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ul(n)||v0(n))&&(!t||n!==47)}eR.peek=DG;function wG(){this.buffer()}function AG(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function CG(){this.buffer()}function kG(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function OG(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Qa(this.sliceSerialize(e)).toLowerCase(),n.label=t}function IG(e){this.exit(e)}function RG(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Qa(this.sliceSerialize(e)).toLowerCase(),n.label=t}function MG(e){this.exit(e)}function DG(){return"["}function eR(e,t,n,r){const a=n.createTracker(r);let s=a.move("[^");const o=n.enter("footnoteReference"),u=n.enter("reference");return s+=a.move(n.safe(n.associationId(e),{after:"]",before:s})),u(),o(),s+=a.move("]"),s}function jG(){return{enter:{gfmFootnoteCallString:wG,gfmFootnoteCall:AG,gfmFootnoteDefinitionLabelString:CG,gfmFootnoteDefinition:kG},exit:{gfmFootnoteCallString:OG,gfmFootnoteCall:IG,gfmFootnoteDefinitionLabelString:RG,gfmFootnoteDefinition:MG}}}function LG(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:eR},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,a,s,o){const u=s.createTracker(o);let d=u.move("[^");const f=s.enter("footnoteDefinition"),m=s.enter("label");return d+=u.move(s.safe(s.associationId(r),{before:d,after:"]"})),m(),d+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),d+=u.move((t?`
|
|
506
|
+
`:" ")+s.indentLines(s.containerFlow(r,u.current()),t?tR:PG))),f(),d}}function PG(e,t,n){return t===0?e:tR(e,t,n)}function tR(e,t,n){return(n?"":" ")+e}const BG=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];nR.peek=$G;function UG(){return{canContainEols:["delete"],enter:{strikethrough:FG},exit:{strikethrough:HG}}}function zG(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:BG}],handlers:{delete:nR}}}function FG(e){this.enter({type:"delete",children:[]},e)}function HG(e){this.exit(e)}function nR(e,t,n,r){const a=n.createTracker(r),s=n.enter("strikethrough");let o=a.move("~~");return o+=n.containerPhrasing(e,{...a.current(),before:o,after:"~"}),o+=a.move("~~"),s(),o}function $G(){return"~"}function YG(e){return e.length}function qG(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||YG,s=[],o=[],u=[],d=[];let f=0,m=-1;for(;++m<e.length;){const _=[],S=[];let T=-1;for(e[m].length>f&&(f=e[m].length);++T<e[m].length;){const C=GG(e[m][T]);if(n.alignDelimiters!==!1){const A=a(C);S[T]=A,(d[T]===void 0||A>d[T])&&(d[T]=A)}_.push(C)}o[m]=_,u[m]=S}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<f;)s[p]=z2(r[p]);else{const _=z2(r);for(;++p<f;)s[p]=_}p=-1;const b=[],x=[];for(;++p<f;){const _=s[p];let S="",T="";_===99?(S=":",T=":"):_===108?S=":":_===114&&(T=":");let C=n.alignDelimiters===!1?1:Math.max(1,d[p]-S.length-T.length);const A=S+"-".repeat(C)+T;n.alignDelimiters!==!1&&(C=S.length+C+T.length,C>d[p]&&(d[p]=C),x[p]=C),b[p]=A}o.splice(1,0,b),u.splice(1,0,x),m=-1;const E=[];for(;++m<o.length;){const _=o[m],S=u[m];p=-1;const T=[];for(;++p<f;){const C=_[p]||"";let A="",k="";if(n.alignDelimiters!==!1){const I=d[p]-(S[p]||0),O=s[p];O===114?A=" ".repeat(I):O===99?I%2?(A=" ".repeat(I/2+.5),k=" ".repeat(I/2-.5)):(A=" ".repeat(I/2),k=A):k=" ".repeat(I)}n.delimiterStart!==!1&&!p&&T.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||p)&&T.push(" "),n.alignDelimiters!==!1&&T.push(A),T.push(C),n.alignDelimiters!==!1&&T.push(k),n.padding!==!1&&T.push(" "),(n.delimiterEnd!==!1||p!==f-1)&&T.push("|")}E.push(n.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return E.join(`
|
|
507
|
+
`)}function GG(e){return e==null?"":String(e)}function z2(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const F2={}.hasOwnProperty;function rR(e,t){const n=t||{};function r(a,...s){let o=r.invalid;const u=r.handlers;if(a&&F2.call(a,e)){const d=String(a[e]);o=F2.call(u,d)?u[d]:r.unknown}if(o)return o.call(this,a,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function KG(e,t,n,r){const a=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const o=n.indentLines(n.containerFlow(e,s.current()),VG);return a(),o}function VG(e,t,n){return">"+(n?"":" ")+e}function WG(e,t){return H2(e,t.inConstruct,!0)&&!H2(e,t.notInConstruct,!1)}function H2(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function $2(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
|
|
508
|
+
`&&WG(n.stack,n.unsafe[a]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
509
|
+
`}function XG(e,t){const n=String(e);let r=n.indexOf(t),a=r,s=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===a?++s>o&&(o=s):s=1,a=r+t.length,r=n.indexOf(t,a);return o}function QG(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function ZG(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function JG(e,t,n,r){const a=ZG(n),s=e.value||"",o=a==="`"?"GraveAccent":"Tilde";if(QG(e,n)){const p=n.enter("codeIndented"),b=n.indentLines(s,eK);return p(),b}const u=n.createTracker(r),d=a.repeat(Math.max(XG(s,a)+1,3)),f=n.enter("codeFenced");let m=u.move(d);if(e.lang){const p=n.enter(`codeFencedLang${o}`);m+=u.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...u.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${o}`);m+=u.move(" "),m+=u.move(n.safe(e.meta,{before:m,after:`
|
|
510
|
+
`,encode:["`"],...u.current()})),p()}return m+=u.move(`
|
|
511
|
+
`),s&&(m+=u.move(s+`
|
|
512
|
+
`)),m+=u.move(d),f(),m}function eK(e,t,n){return(n?"":" ")+e}function H1(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function tK(e,t,n,r){const a=H1(n),s=a==='"'?"Quote":"Apostrophe",o=n.enter("definition");let u=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),{before:f,after:"]",...d.current()})),f+=d.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(u=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
|
513
|
+
`,...d.current()}))),u(),e.title&&(u=n.enter(`title${s}`),f+=d.move(" "+a),f+=d.move(n.safe(e.title,{before:f,after:a,...d.current()})),f+=d.move(a),u()),o(),f}function nK(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function tf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function up(e,t,n){const r=Lu(e),a=Lu(t);return r===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}aR.peek=rK;function aR(e,t,n,r){const a=nK(n),s=n.enter("emphasis"),o=n.createTracker(r),u=o.move(a);let d=o.move(n.containerPhrasing(e,{after:a,before:u,...o.current()}));const f=d.charCodeAt(0),m=up(r.before.charCodeAt(r.before.length-1),f,a);m.inside&&(d=tf(f)+d.slice(1));const p=d.charCodeAt(d.length-1),b=up(r.after.charCodeAt(0),p,a);b.inside&&(d=d.slice(0,-1)+tf(p));const x=o.move(a);return s(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},u+d+x}function rK(e,t,n){return n.options.emphasis||"*"}function aK(e,t){let n=!1;return If(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,sv}),!!((!e.depth||e.depth<3)&&D1(e)&&(t.options.setext||n))}function iK(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(aK(e,n)){const m=n.enter("headingSetext"),p=n.enter("phrasing"),b=n.containerPhrasing(e,{...s.current(),before:`
|
|
514
|
+
`,after:`
|
|
515
|
+
`});return p(),m(),b+`
|
|
516
|
+
`+(a===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
517
|
+
`))+1))}const o="#".repeat(a),u=n.enter("headingAtx"),d=n.enter("phrasing");s.move(o+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
518
|
+
`,...s.current()});return/^[\t ]/.test(f)&&(f=tf(f.charCodeAt(0))+f.slice(1)),f=f?o+" "+f:o,n.options.closeAtx&&(f+=" "+o),d(),u(),f}iR.peek=sK;function iR(e){return e.value||""}function sK(){return"<"}sR.peek=oK;function sR(e,t,n,r){const a=H1(n),s=a==='"'?"Quote":"Apostrophe",o=n.enter("image");let u=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,{before:f,after:"]",...d.current()})),f+=d.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(u=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":")",...d.current()}))),u(),e.title&&(u=n.enter(`title${s}`),f+=d.move(" "+a),f+=d.move(n.safe(e.title,{before:f,after:a,...d.current()})),f+=d.move(a),u()),f+=d.move(")"),o(),f}function oK(){return"!"}oR.peek=lK;function oR(e,t,n,r){const a=e.referenceType,s=n.enter("imageReference");let o=n.enter("label");const u=n.createTracker(r);let d=u.move("![");const f=n.safe(e.alt,{before:d,after:"]",...u.current()});d+=u.move(f+"]["),o();const m=n.stack;n.stack=[],o=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return o(),n.stack=m,s(),a==="full"||!f||f!==p?d+=u.move(p+"]"):a==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function lK(){return"!"}lR.peek=uK;function lR(e,t,n){let r=e.value||"",a="`",s=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const o=n.unsafe[s],u=n.compilePattern(o);let d;if(o.atBreak)for(;d=u.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return a+r+a}function uK(){return"`"}function uR(e,t){const n=D1(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}cR.peek=cK;function cR(e,t,n,r){const a=H1(n),s=a==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let u,d;if(uR(e,n)){const m=n.stack;n.stack=[],u=n.enter("autolink");let p=o.move("<");return p+=o.move(n.containerPhrasing(e,{before:p,after:">",...o.current()})),p+=o.move(">"),u(),n.stack=m,p}u=n.enter("link"),d=n.enter("label");let f=o.move("[");return f+=o.move(n.containerPhrasing(e,{before:f,after:"](",...o.current()})),f+=o.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=o.move("<"),f+=o.move(n.safe(e.url,{before:f,after:">",...o.current()})),f+=o.move(">")):(d=n.enter("destinationRaw"),f+=o.move(n.safe(e.url,{before:f,after:e.title?" ":")",...o.current()}))),d(),e.title&&(d=n.enter(`title${s}`),f+=o.move(" "+a),f+=o.move(n.safe(e.title,{before:f,after:a,...o.current()})),f+=o.move(a),d()),f+=o.move(")"),u(),f}function cK(e,t,n){return uR(e,n)?"<":"["}dR.peek=dK;function dR(e,t,n,r){const a=e.referenceType,s=n.enter("linkReference");let o=n.enter("label");const u=n.createTracker(r);let d=u.move("[");const f=n.containerPhrasing(e,{before:d,after:"]",...u.current()});d+=u.move(f+"]["),o();const m=n.stack;n.stack=[],o=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return o(),n.stack=m,s(),a==="full"||!f||f!==p?d+=u.move(p+"]"):a==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function dK(){return"["}function $1(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function fK(e){const t=$1(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function hK(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function fR(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function mK(e,t,n,r){const a=n.enter("list"),s=n.bulletCurrent;let o=e.ordered?hK(n):$1(n);const u=e.ordered?o==="."?")":".":fK(n);let d=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),fR(n)===o&&m){let p=-1;for(;++p<e.children.length;){const b=e.children[p];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(o=u),n.bulletCurrent=o;const f=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=s,a(),f}function pK(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function gK(e,t,n,r){const a=pK(n);let s=n.bulletCurrent||$1(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let o=s.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const u=n.createTracker(r);u.move(s+" ".repeat(o-s.length)),u.shift(o);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,u.current()),m);return d(),f;function m(p,b,x){return b?(x?"":" ".repeat(o))+p:(x?s:s+" ".repeat(o-s.length))+p}}function bK(e,t,n,r){const a=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(e,r);return s(),a(),o}const xK=Of(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function yK(e,t,n,r){return(e.children.some(function(o){return xK(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function vK(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}hR.peek=EK;function hR(e,t,n,r){const a=vK(n),s=n.enter("strong"),o=n.createTracker(r),u=o.move(a+a);let d=o.move(n.containerPhrasing(e,{after:a,before:u,...o.current()}));const f=d.charCodeAt(0),m=up(r.before.charCodeAt(r.before.length-1),f,a);m.inside&&(d=tf(f)+d.slice(1));const p=d.charCodeAt(d.length-1),b=up(r.after.charCodeAt(0),p,a);b.inside&&(d=d.slice(0,-1)+tf(p));const x=o.move(a+a);return s(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},u+d+x}function EK(e,t,n){return n.options.strong||"*"}function _K(e,t,n,r){return n.safe(e.value,r)}function NK(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function TK(e,t,n){const r=(fR(n)+(n.options.ruleSpaces?" ":"")).repeat(NK(n));return n.options.ruleSpaces?r.slice(0,-1):r}const mR={blockquote:KG,break:$2,code:JG,definition:tK,emphasis:aR,hardBreak:$2,heading:iK,html:iR,image:sR,imageReference:oR,inlineCode:lR,link:cR,linkReference:dR,list:mK,listItem:gK,paragraph:bK,root:yK,strong:hR,text:_K,thematicBreak:TK};function SK(){return{enter:{table:wK,tableData:Y2,tableHeader:Y2,tableRow:CK},exit:{codeText:kK,table:AK,tableData:Xx,tableHeader:Xx,tableRow:Xx}}}function wK(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function AK(e){this.exit(e),this.data.inTable=void 0}function CK(e){this.enter({type:"tableRow",children:[]},e)}function Xx(e){this.exit(e)}function Y2(e){this.enter({type:"tableCell",children:[]},e)}function kK(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,OK));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function OK(e,t){return t==="|"?t:e}function IK(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
519
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:o,tableCell:d,tableRow:u}};function o(x,E,_,S){return f(m(x,_,S),x.align)}function u(x,E,_,S){const T=p(x,_,S),C=f([T]);return C.slice(0,C.indexOf(`
|
|
520
|
+
`))}function d(x,E,_,S){const T=_.enter("tableCell"),C=_.enter("phrasing"),A=_.containerPhrasing(x,{...S,before:s,after:s});return C(),T(),A}function f(x,E){return qG(x,{align:E,alignDelimiters:r,padding:n,stringLength:a})}function m(x,E,_){const S=x.children;let T=-1;const C=[],A=E.enter("table");for(;++T<S.length;)C[T]=p(S[T],E,_);return A(),C}function p(x,E,_){const S=x.children;let T=-1;const C=[],A=E.enter("tableRow");for(;++T<S.length;)C[T]=d(S[T],x,E,_);return A(),C}function b(x,E,_){let S=mR.inlineCode(x,E,_);return _.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function RK(){return{exit:{taskListCheckValueChecked:q2,taskListCheckValueUnchecked:q2,paragraph:DK}}}function MK(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:jK}}}function q2(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function DK(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=t.children;let s=-1,o;for(;++s<a.length;){const u=a[s];if(u.type==="paragraph"){o=u;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function jK(e,t,n,r){const a=e.children[0],s=typeof e.checked=="boolean"&&a&&a.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);s&&u.move(o);let d=mR.listItem(e,t,n,{...r,...u.current()});return s&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(m){return m+o}}function LK(){return[mG(),jG(),UG(),SK(),RK()]}function PK(e){return{extensions:[pG(),LG(e),zG(),IK(e),MK()]}}const BK={tokenize:YK,partial:!0},pR={tokenize:qK,partial:!0},gR={tokenize:GK,partial:!0},bR={tokenize:KK,partial:!0},UK={tokenize:VK,partial:!0},xR={name:"wwwAutolink",tokenize:HK,previous:vR},yR={name:"protocolAutolink",tokenize:$K,previous:ER},hs={name:"emailAutolink",tokenize:FK,previous:_R},Ci={};function zK(){return{text:Ci}}let Po=48;for(;Po<123;)Ci[Po]=hs,Po++,Po===58?Po=65:Po===91&&(Po=97);Ci[43]=hs;Ci[45]=hs;Ci[46]=hs;Ci[95]=hs;Ci[72]=[hs,yR];Ci[104]=[hs,yR];Ci[87]=[hs,xR];Ci[119]=[hs,xR];function FK(e,t,n){const r=this;let a,s;return o;function o(p){return!cv(p)||!_R.call(r,r.previous)||Y1(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(p))}function u(p){return cv(p)?(e.consume(p),u):p===64?(e.consume(p),d):n(p)}function d(p){return p===46?e.check(UK,m,f)(p):p===45||p===95||xr(p)?(s=!0,e.consume(p),d):m(p)}function f(p){return e.consume(p),a=!0,d}function m(p){return s&&a&&Ir(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function HK(e,t,n){const r=this;return a;function a(o){return o!==87&&o!==119||!vR.call(r,r.previous)||Y1(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(BK,e.attempt(pR,e.attempt(gR,s),n),n)(o))}function s(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function $K(e,t,n){const r=this;let a="",s=!1;return o;function o(p){return(p===72||p===104)&&ER.call(r,r.previous)&&!Y1(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(p),e.consume(p),u):n(p)}function u(p){if(Ir(p)&&a.length<5)return a+=String.fromCodePoint(p),e.consume(p),u;if(p===58){const b=a.toLowerCase();if(b==="http"||b==="https")return e.consume(p),d}return n(p)}function d(p){return p===47?(e.consume(p),s?f:(s=!0,d)):n(p)}function f(p){return p===null||op(p)||Gt(p)||ul(p)||v0(p)?n(p):e.attempt(pR,e.attempt(gR,m),n)(p)}function m(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function YK(e,t,n){let r=0;return a;function a(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),a):o===46&&r===3?(e.consume(o),s):n(o)}function s(o){return o===null?n(o):t(o)}}function qK(e,t,n){let r,a,s;return o;function o(f){return f===46||f===95?e.check(bR,d,u)(f):f===null||Gt(f)||ul(f)||f!==45&&v0(f)?d(f):(s=!0,e.consume(f),o)}function u(f){return f===95?r=!0:(a=r,r=void 0),e.consume(f),o}function d(f){return a||r||!s?n(f):t(f)}}function GK(e,t){let n=0,r=0;return a;function a(o){return o===40?(n++,e.consume(o),a):o===41&&r<n?s(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(bR,t,s)(o):o===null||Gt(o)||ul(o)?t(o):(e.consume(o),a)}function s(o){return o===41&&r++,e.consume(o),a}}function KK(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),s):u===93?(e.consume(u),a):u===60||u===null||Gt(u)||ul(u)?t(u):n(u)}function a(u){return u===null||u===40||u===91||Gt(u)||ul(u)?t(u):r(u)}function s(u){return Ir(u)?o(u):n(u)}function o(u){return u===59?(e.consume(u),r):Ir(u)?(e.consume(u),o):n(u)}}function VK(e,t,n){return r;function r(s){return e.consume(s),a}function a(s){return xr(s)?n(s):t(s)}}function vR(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Gt(e)}function ER(e){return!Ir(e)}function _R(e){return!(e===47||cv(e))}function cv(e){return e===43||e===45||e===46||e===95||xr(e)}function Y1(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const WK={tokenize:rV,partial:!0};function XK(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:eV,continuation:{tokenize:tV},exit:nV}},text:{91:{name:"gfmFootnoteCall",tokenize:JK},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:QK,resolveTo:ZK}}}}function QK(e,t,n){const r=this;let a=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;a--;){const d=r.events[a][1];if(d.type==="labelImage"){o=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return u;function u(d){if(!o||!o._balanced)return n(d);const f=Qa(r.sliceSerialize({start:o.end,end:r.now()}));return f.codePointAt(0)!==94||!s.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function ZK(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function JK(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,o;return u;function u(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(p){if(s>999||p===93&&!o||p===null||p===91||Gt(p))return n(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return a.includes(Qa(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Gt(p)||(o=!0),s++,e.consume(p),p===92?m:f}function m(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function eV(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,o=0,u;return d;function d(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(E)}function m(E){if(o>999||E===93&&!u||E===null||E===91||Gt(E))return n(E);if(E===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return s=Qa(r.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return Gt(E)||(u=!0),o++,e.consume(E),E===92?p:m}function p(E){return E===91||E===92||E===93?(e.consume(E),o++,m):m(E)}function b(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),a.includes(s)||a.push(s),Tt(e,x,"gfmFootnoteDefinitionWhitespace")):n(E)}function x(E){return t(E)}}function tV(e,t,n){return e.check(kf,t,e.attempt(WK,t,n))}function nV(e){e.exit("gfmFootnoteDefinition")}function rV(e,t,n){const r=this;return Tt(e,a,"gfmFootnoteDefinitionIndent",5);function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(s):n(s)}}function aV(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(o,u){let d=-1;for(;++d<o.length;)if(o[d][0]==="enter"&&o[d][1].type==="strikethroughSequenceTemporary"&&o[d][1]._close){let f=d;for(;f--;)if(o[f][0]==="exit"&&o[f][1].type==="strikethroughSequenceTemporary"&&o[f][1]._open&&o[d][1].end.offset-o[d][1].start.offset===o[f][1].end.offset-o[f][1].start.offset){o[d][1].type="strikethroughSequence",o[f][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},o[f][1].start),end:Object.assign({},o[d][1].end)},p={type:"strikethroughText",start:Object.assign({},o[f][1].end),end:Object.assign({},o[d][1].start)},b=[["enter",m,u],["enter",o[f][1],u],["exit",o[f][1],u],["enter",p,u]],x=u.parser.constructs.insideSpan.null;x&&ma(b,b.length,0,E0(x,o.slice(f+1,d),u)),ma(b,b.length,0,[["exit",p,u],["enter",o[d][1],u],["exit",o[d][1],u],["exit",m,u]]),ma(o,f-1,d-f+3,b),d=f+b.length-2;break}}for(d=-1;++d<o.length;)o[d][1].type==="strikethroughSequenceTemporary"&&(o[d][1].type="data");return o}function s(o,u,d){const f=this.previous,m=this.events;let p=0;return b;function b(E){return f===126&&m[m.length-1][1].type!=="characterEscape"?d(E):(o.enter("strikethroughSequenceTemporary"),x(E))}function x(E){const _=Lu(f);if(E===126)return p>1?d(E):(o.consume(E),p++,x);if(p<2&&!n)return d(E);const S=o.exit("strikethroughSequenceTemporary"),T=Lu(E);return S._open=!T||T===2&&!!_,S._close=!_||_===2&&!!T,u(E)}}}class iV{constructor(){this.map=[]}add(t,n,r){sV(this,t,n,r)}consume(t){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let a=r.pop();for(;a;){for(const s of a)t.push(s);a=r.pop()}this.map.length=0}}function sV(e,t,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...r);return}a+=1}e.map.push([t,n,r])}}function oV(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function lV(){return{flow:{null:{name:"table",tokenize:uV,resolveAll:cV}}}}function uV(e,t,n){const r=this;let a=0,s=0,o;return u;function u(D){let V=r.events.length-1;for(;V>-1;){const Q=r.events[V][1].type;if(Q==="lineEnding"||Q==="linePrefix")V--;else break}const q=V>-1?r.events[V][1].type:null,ae=q==="tableHead"||q==="tableRow"?O:d;return ae===O&&r.parser.lazy[r.now().line]?n(D):ae(D)}function d(D){return e.enter("tableHead"),e.enter("tableRow"),f(D)}function f(D){return D===124||(o=!0,s+=1),m(D)}function m(D){return D===null?n(D):Xe(D)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),x):n(D):pt(D)?Tt(e,m,"whitespace")(D):(s+=1,o&&(o=!1,a+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),o=!0,m):(e.enter("data"),p(D)))}function p(D){return D===null||D===124||Gt(D)?(e.exit("data"),m(D)):(e.consume(D),D===92?b:p)}function b(D){return D===92||D===124?(e.consume(D),p):p(D)}function x(D){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(D):(e.enter("tableDelimiterRow"),o=!1,pt(D)?Tt(e,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):E(D))}function E(D){return D===45||D===58?S(D):D===124?(o=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),_):I(D)}function _(D){return pt(D)?Tt(e,S,"whitespace")(D):S(D)}function S(D){return D===58?(s+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),T):D===45?(s+=1,T(D)):D===null||Xe(D)?k(D):I(D)}function T(D){return D===45?(e.enter("tableDelimiterFiller"),C(D)):I(D)}function C(D){return D===45?(e.consume(D),C):D===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(D))}function A(D){return pt(D)?Tt(e,k,"whitespace")(D):k(D)}function k(D){return D===124?E(D):D===null||Xe(D)?!o||a!==s?I(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):I(D)}function I(D){return n(D)}function O(D){return e.enter("tableRow"),j(D)}function j(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),j):D===null||Xe(D)?(e.exit("tableRow"),t(D)):pt(D)?Tt(e,j,"whitespace")(D):(e.enter("data"),H(D))}function H(D){return D===null||D===124||Gt(D)?(e.exit("data"),j(D)):(e.consume(D),D===92?z:H)}function z(D){return D===92||D===124?(e.consume(D),H):H(D)}}function cV(e,t){let n=-1,r=!0,a=0,s=[0,0,0,0],o=[0,0,0,0],u=!1,d=0,f,m,p;const b=new iV;for(;++n<e.length;){const x=e[n],E=x[1];x[0]==="enter"?E.type==="tableHead"?(u=!1,d!==0&&(G2(b,t,d,f,m),m=void 0,d=0),f={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(n,0,[["enter",f,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,p=void 0,s=[0,0,0,0],o=[0,n+1,0,0],u&&(u=!1,m={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(n,0,[["enter",m,t]])),a=E.type==="tableDelimiterRow"?2:m?3:1):a&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],p=ym(b,t,s,a,void 0,p),s=[0,0,0,0]),o[2]=n)):E.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(o[0]=o[1],p=ym(b,t,s,a,void 0,p)),s=o,o=[s[1],n,0,0])):E.type==="tableHead"?(u=!0,d=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(d=n,s[1]!==0?(o[0]=o[1],p=ym(b,t,s,a,n,p)):o[1]!==0&&(p=ym(b,t,o,a,n,p)),a=0):a&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(o[3]=n)}for(d!==0&&G2(b,t,d,f,m),b.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=oV(t.events,n))}return e}function ym(e,t,n,r,a,s){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(s.end=Object.assign({},Nu(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const d=Nu(t.events,n[1]);if(s={type:o,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const f=Nu(t.events,n[2]),m=Nu(t.events,n[3]),p={type:u,start:Object.assign({},f),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const b=t.events[n[2]],x=t.events[n[3]];if(b[1].end=Object.assign({},x[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const E=n[2]+1,_=n[3]-n[2]-1;e.add(E,_,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return a!==void 0&&(s.end=Object.assign({},Nu(t.events,a)),e.add(a,0,[["exit",s,t]]),s=void 0),s}function G2(e,t,n,r,a){const s=[],o=Nu(t.events,n);a&&(a.end=Object.assign({},o),s.push(["exit",a,t])),r.end=Object.assign({},o),s.push(["exit",r,t]),e.add(n+1,0,s)}function Nu(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const dV={name:"tasklistCheck",tokenize:hV};function fV(){return{text:{91:dV}}}function hV(e,t,n){const r=this;return a;function a(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),s)}function s(d){return Gt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),o):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),o):n(d)}function o(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(d)}function u(d){return Xe(d)?t(d):pt(d)?e.check({tokenize:mV},t,n)(d):n(d)}}function mV(e,t,n){return Tt(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function pV(e){return II([zK(),XK(),aV(e),lV(),fV()])}const gV={};function dl(e){const t=this,n=e||gV,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(pV(n)),s.push(LK()),o.push(PK(n))}const bV=new Set(["tool","tool-use","tool_use","tool-call","tool_call","tool-result","tool_result"]),xV=new Set(["thinking","reasoning","reason"]),yV=new Set(["text","output_text","message"]),vV=new Set(["file","image"]);function cp(e){var n;const t=((n=e.type)==null?void 0:n.toLowerCase())??"";return bV.has(t)||e.toolName!=null||e.tool!=null?"tool":vV.has(t)?"file":xV.has(t)?"thinking":yV.has(t)||e.content!=null||e.text!=null?"text":"other"}function dp(e){return e.content??e.text??""}function NR(e){return e.toolName??e.tool??"tool"}function T0(e){var t;return e.input??((t=e.state)==null?void 0:t.input)}function q1(e){var t;return e.output??((t=e.state)==null?void 0:t.output)}function G1(e){var n,r,a;const t=(r=(n=e.state)==null?void 0:n.status)==null?void 0:r.toLowerCase();return t==="completed"||t==="done"||t==="success"?"completed":t==="error"||t==="failed"||((a=e.state)==null?void 0:a.error)!=null?"error":t==="pending"||t==="queued"?"pending":t==="running"||t==="in_progress"?"running":q1(e)!=null?"completed":"running"}function K2(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function fl(e){const t=e==null?void 0:e.toLowerCase();return t==="in_progress"||t==="in-progress"||t==="active"?"in_progress":t==="completed"||t==="done"||t==="complete"?"completed":t==="cancelled"||t==="canceled"?"cancelled":"pending"}function TR(e){return e.filter(t=>fl(t.status)==="completed").length}function nf(e){const t=NR(e).toLowerCase();return t==="question"||t==="mcp_question"}function EV(e){const t=T0(e);if(!t||typeof t!="object")return null;const n=t;return Array.isArray(n.questions)?n.questions:null}function fp(e){if(!nf(e))return!1;const t=G1(e);return t==="pending"||t==="running"}const _V=/\bses_[a-zA-Z0-9]+/;function NV(e){var a;const t=T0(e);if(t&&typeof t=="object"){const s=t;if(typeof s.task_id=="string"&&s.task_id.startsWith("ses_"))return s.task_id}const n=(a=e.state)==null?void 0:a.metadata;if(n){const s=n.session_id??n.sessionId;if(typeof s=="string"&&s.startsWith("ses_"))return s}const r=q1(e);if(typeof r=="string"){const s=_V.exec(r);if(s)return s[0]}if(r&&typeof r=="object"){const s=r,o=s.session_id??s.sessionId??s.task_id;if(typeof o=="string"&&o.startsWith("ses_"))return o}return null}const TV=ei(()=>({agents:[],loaded:!1}));function SR(e){return`question-${e}`}function Qx(e,t){const n=t.find(a=>a.id===e),r=(n==null?void 0:n.title)||e.slice(-8);gn.getState().addToast(`${r} — 等待回复`,"warning",e,{id:SR(e),persistent:!0})}function SV(e){var t;for(const n of e)if((t=n.parts)!=null&&t.some(r=>nf(r)&&fp(r)))return!0;return!1}const rf=[],af=[],V2=[],Bo={};function W2(e){return e.id??e.callID}function mr(){return Fe.getState().activeRepoId}async function X2(e,t){const n=mr();if(n)try{const[r,a]=await Promise.all([Vz(n,e),rI(n).catch(()=>null)]);t(s=>{const o={sessionLinks:{...s.sessionLinks,[e]:r}};return a&&(o.allSessionLinks=a),o})}catch{}}const Q2=20,Le=ei((e,t)=>({sessions:[],activeSessionId:null,messages:{},messagesMeta:{},todos:{},sessionStatuses:{},errorReasons:{},queuedMessageIds:{},sessionLinks:{},allSessionLinks:{},sessionFilter:"active",loadingSessions:!1,loadError:null,sendError:null,setSessionFilter:n=>e({sessionFilter:n}),toggleSessionComplete:async n=>{const r=mr();if(!r)return;const a=t().sessions.find(o=>o.id===n);if(!a)return;const s=a.completedAt?null:Date.now();e(o=>({sessions:o.sessions.map(u=>u.id===n?{...u,completedAt:s??void 0}:u)}));try{await TF(r,n,s)}catch{await t().loadSessions()}},loadSessions:async()=>{const n=mr();if(!n){e({sessions:[],loadingSessions:!1});return}e({loadingSessions:!0,loadError:null});try{const[r,a]=await Promise.all([Uz(n),rI(n).catch(()=>null)]),s={sessions:r,loadingSessions:!1};a&&(s.allSessionLinks=a),e(s)}catch(r){e({loadingSessions:!1,loadError:r instanceof Error?r.message:"Failed to load sessions"})}},createSession:async(n,r,a,s,o,u,d)=>{const f=mr();if(!f)return null;e({sendError:null});try{const m=await zz(f,n,r,a,s,o,u,d);return e(p=>({sessions:[m,...p.sessions.filter(b=>b.id!==m.id)],activeSessionId:m.id,messages:{...p.messages,[m.id]:[]}})),t().setSessionStatus(m.id,"busy"),o&&gn.getState().addToast("已自动分配为处理人","success"),m}catch(m){return e({sendError:m instanceof Error?m.message:"Failed to create session"}),null}},setActiveSession:async n=>{mr()&&(e({activeSessionId:n,sendError:null}),await t().refreshSessionData(n))},refreshSessionData:async n=>{var m,p;const r=mr();if(!r)return;const s=!t().messages[n]||t().messages[n].length===0?{limit:Q2}:void 0,[o,u]=await Promise.allSettled([Wz(r,n),Fw(r,n,s)]),d=o.status==="fulfilled"?o.value:null,f=(p=(m=d==null?void 0:d.session)==null?void 0:m.revert)==null?void 0:p.messageID;e(b=>{const x={};if(d&&(d.status&&(x.sessionStatuses={...b.sessionStatuses,[n]:d.status.type}),d.todos&&(x.todos={...b.todos,[n]:d.todos}),d.links&&(x.sessionLinks={...b.sessionLinks,[n]:d.links}),d.session&&(x.sessions=b.sessions.map(E=>E.id===n?{...E,...d.session}:E))),u.status==="fulfilled"){let E=u.value.messages;if(f){const S=E.findIndex(T=>T.id===f);S>=0&&(E=E.slice(0,S+1))}const _=b.messages[n]??[];E.length>=_.length&&(x.messages={...b.messages,[n]:E}),x.messagesMeta={...b.messagesMeta,[n]:{total:Math.max(u.value.total,_.length),hasMore:u.value.hasMore,loading:!1}}}return x}),u.status==="fulfilled"&&SV(u.value.messages)&&Qx(n,t().sessions)},loadMoreMessages:async n=>{var u;const r=mr();if(!r)return;const a=t().messagesMeta[n];if(!(a!=null&&a.hasMore)||a.loading)return;const o=(u=(t().messages[n]??[])[0])==null?void 0:u.id;e(d=>({messagesMeta:{...d.messagesMeta,[n]:{...a,loading:!0}}}));try{const d=await Fw(r,n,{limit:Q2,before:o});e(f=>{const m=f.messages[n]??[];return{messages:{...f.messages,[n]:[...d.messages,...m]},messagesMeta:{...f.messagesMeta,[n]:{total:d.total,hasMore:d.hasMore,loading:!1}}}})}catch{e(d=>({messagesMeta:{...d.messagesMeta,[n]:{...a,loading:!1}}}))}},addLink:async(n,r,a)=>{const s=mr();if(!s)return!1;try{return await Xz(s,n,r,a),await X2(n,e),!0}catch{return!1}},removeLink:async(n,r,a)=>{const s=mr();if(!s)return!1;try{return await Qz(s,n,r,a),await X2(n,e),!0}catch{return!1}},deleteSession:async n=>{const r=mr();if(r)try{await Fz(r,n)}catch{}delete Bo[n],e(a=>{const{[n]:s,...o}=a.messages,{[n]:u,...d}=a.messagesMeta,{[n]:f,...m}=a.todos,{[n]:p,...b}=a.sessionStatuses,{[n]:x,...E}=a.errorReasons,{[n]:_,...S}=a.queuedMessageIds,{[n]:T,...C}=a.sessionLinks,{[n]:A,...k}=a.allSessionLinks;return{sessions:a.sessions.filter(I=>I.id!==n),messages:o,messagesMeta:d,todos:m,sessionStatuses:b,errorReasons:E,queuedMessageIds:S,sessionLinks:C,allSessionLinks:k,activeSessionId:a.activeSessionId===n?null:a.activeSessionId}})},sendMessage:async(n,r,a,s)=>{const o=mr(),u=t().activeSessionId;if(!o||!u)return!1;const d=t().sessions.find(m=>m.id===u),f=t().sessionStatuses[u]==="busy";e({sendError:null}),d!=null&&d.completedAt&&e(m=>({sessions:m.sessions.map(p=>p.id===u?{...p,completedAt:void 0}:p)})),f||t().setSessionStatus(u,"busy");try{const m=TV.getState(),p=d!=null&&d.agent&&m.loaded&&m.agents.some(b=>b.name===d.agent||b.id===d.agent)?d.agent:void 0;return await Hz(o,u,n,p,r,a,s),f&&(Bo[u]=(Bo[u]||0)+1),!0}catch(m){return e({sendError:m instanceof Error?m.message:"Failed to send message"}),f||t().setSessionStatus(u,"idle"),!1}},replyQuestion:async n=>{const r=mr(),a=t().activeSessionId;if(!(!r||!a))try{await Yz(r,a,n)}catch(s){e({sendError:s instanceof Error?s.message:"Failed to reply to question"})}},rejectQuestion:async()=>{const n=mr(),r=t().activeSessionId;if(!(!n||!r))try{await qz(n,r)}catch{}},abortSession:async()=>{const n=mr(),r=t().activeSessionId;if(!(!n||!r)){try{await $z(n,r)}catch{}t().setSessionStatus(r,"idle")}},clearSessions:()=>{for(const n of Object.keys(Bo))delete Bo[n];e({sessions:[],activeSessionId:null,messages:{},messagesMeta:{},todos:{},sessionStatuses:{},errorReasons:{},queuedMessageIds:{},sessionLinks:{},allSessionLinks:{},loadError:null,sendError:null})},updateMessage:(n,r)=>{var a;e(s=>{const o=s.messages[n]??[],u=o.findIndex(p=>p.id===r.id);let d,f=s.queuedMessageIds,m=s.messagesMeta;if(u>=0){const p={...o[u],...r};(!r.parts||r.parts.length===0)&&o[u].parts&&(p.parts=o[u].parts),d=[...o],d[u]=p}else{d=[...o,r];const p=m[n];p&&(m={...m,[n]:{...p,total:p.total+1}});const b=Bo[n]||0;if(r.role==="user"&&b>0){const x=[...f[n]??[]];x.push(r.id),f={...f,[n]:x},Bo[n]=b-1}else if(r.role==="assistant"){const x=f[n];x&&x.length>0&&(f={...f,[n]:x.slice(1)})}}return{messages:{...s.messages,[n]:d},messagesMeta:m,queuedMessageIds:f}}),(a=r.parts)!=null&&a.some(s=>nf(s)&&fp(s))&&Qx(n,t().sessions)},updateMessagePart:(n,r,a)=>{e(s=>{const o=s.messages[n]??[],u=o.findIndex(E=>E.id===r),d=u>=0?o[u]:{id:r,role:"assistant"},f=d.parts?[...d.parts]:[],m=W2(a),p=m!=null?f.findIndex(E=>W2(E)===m):-1;p>=0?f[p]={...f[p],...a}:f.push(a);const b={...d,parts:f},x=u>=0?[...o]:[...o,b];return u>=0&&(x[u]=b),{messages:{...s.messages,[n]:x}}}),nf(a)&&fp(a)&&Qx(n,t().sessions)},appendMessagePartDelta:(n,r,a,s)=>{e(o=>{const u=o.messages[n]??[],d=u.findIndex(E=>E.id===r),f=d>=0?u[d]:{id:r,role:"assistant"},m=f.parts?[...f.parts]:[],p=m.findIndex(E=>E.id===a);if(p>=0){const E=m[p],_=dp(E)+s;m[p]=E.content!=null?{...E,content:_}:{...E,text:_}}else m.push({id:a,type:"text",text:s});const b={...f,parts:m},x=d>=0?[...u]:[...u,b];return d>=0&&(x[d]=b),{messages:{...o.messages,[n]:x}}})},updateTodos:(n,r)=>{e(a=>({todos:{...a.todos,[n]:r}}))},updateSessionInfo:n=>{e(r=>r.sessions.some(s=>s.id===n.id)?{sessions:r.sessions.map(s=>s.id===n.id?{...s,...n}:s)}:{sessions:[n,...r.sessions]})},setSessionStatus:(n,r,a)=>{const s=t().sessionStatuses[n];if(s!==r){const o=t().sessions.find(d=>d.id===n),u=(o==null?void 0:o.title)||n.slice(-8);if(r==="idle"&&s!==void 0&&s!=="idle")gn.getState().removeToast(SR(n)),gn.getState().addToast(`${u} — 完成`,"success",n);else if(r==="busy"&&(s===void 0||s==="idle"))gn.getState().addToast(`${u} — 开始运行`,"info",n);else if(r==="retry")gn.getState().addToast(`${u} — 进入重试`,"warning",n);else if(r==="error"){const d=a?`${u} — 错误: ${a}`:`${u} — 发生错误`;gn.getState().addToast(d,"error",n)}}e(o=>{const u=a?{...o.errorReasons,[n]:a}:r!=="error"?(()=>{const{[n]:d,...f}=o.errorReasons;return f})():o.errorReasons;return{sessionStatuses:{...o.sessionStatuses,[n]:r},errorReasons:u}})},bulkSetStatuses:n=>{e({sessionStatuses:{...t().sessionStatuses,...n}})},renameSession:async(n,r)=>{const a=mr();if(a){e(s=>({sessions:s.sessions.map(o=>o.id===n?{...o,title:r}:o)}));try{await NF(a,n,r)}catch{await t().loadSessions()}}},revertToMessage:async(n,r)=>{const a=mr();if(!a)return!1;try{return await Gz(a,n,r),await t().refreshSessionData(n),!0}catch{return!1}}})),at=ei((e,t)=>({issues:[],tags:[],tagFilterMode:new Map,milestones:[],selectedMilestoneId:null,loaded:!1,syncing:!1,selectedIssueId:null,viewingIssueId:null,viewingTreeRootId:null,matchingParentId:null,matchingCandidateId:null,clearIssues:()=>e({issues:[],tags:[],tagFilterMode:new Map,milestones:[],selectedMilestoneId:null,loaded:!1,selectedIssueId:null,viewingIssueId:null,viewingTreeRootId:null,matchingParentId:null,matchingCandidateId:null}),setSelectedIssue:n=>e({selectedIssueId:n}),setViewingIssue:(n,r)=>e({viewingIssueId:n,viewingTreeRootId:r??null}),enterMatchMode:n=>e({matchingParentId:n,matchingCandidateId:null}),exitMatchMode:()=>{e({matchingParentId:null,matchingCandidateId:null})},linkChild:async(n,r)=>{var s;const a=Fe.getState().activeRepoId;if(!a)return!1;try{await dF(a,n,r);const o=(s=t().issues.find(u=>u.number===n))==null?void 0:s.id;return o&&e(u=>({issues:u.issues.map(d=>d.number===r?{...d,parentId:o}:d),matchingCandidateId:null})),!0}catch{return!1}},updateIssueState:async(n,r)=>{const a=Fe.getState().activeRepoId;if(!a)return!1;try{const s=await uI(a,n,{state:r});return e(o=>({issues:o.issues.map(u=>u.number===n?{...u,state:s.state}:u)})),!0}catch{return!1}},loadIssues:async()=>{const n=Fe.getState().activeRepoId;if(!n){e({issues:[],loaded:!0});return}try{const r=await Gw(n,"all");e({issues:r,loaded:!0})}catch{e({loaded:!0})}},syncIssues:async()=>{const n=Fe.getState().activeRepoId;if(n){e({syncing:!0});try{await uF(n,"open");const[r,a,s]=await Promise.all([Gw(n,"all"),Yw(n),qw(n)]);e({issues:r,tags:a,milestones:s,syncing:!1})}catch(r){e({syncing:!1});let a="同步 Issue 失败";if(r instanceof ts)try{const s=JSON.parse(r.message);s.error&&(a=s.error)}catch{r.message&&(a=r.message)}gn.getState().addToast(a,"error")}}},createIssue:async(n,r)=>{const a=Fe.getState().activeRepoId;if(!a)return null;try{const s=await cF(a,n,r);return e(o=>({issues:[s,...o.issues]})),s}catch{return null}},loadTags:async()=>{const n=Fe.getState().activeRepoId;if(!n){e({tags:[]});return}try{const r=await Yw(n);e({tags:r})}catch{}},cycleTagFilter:n=>{e(r=>{const a=new Map(r.tagFilterMode),s=a.get(n);return s?s==="include"?a.set(n,"exclude"):a.delete(n):a.set(n,"include"),{tagFilterMode:a}})},clearTagFilter:()=>e({tagFilterMode:new Map}),loadMilestones:async()=>{const n=Fe.getState().activeRepoId;if(!n){e({milestones:[]});return}try{const r=await qw(n);e({milestones:r})}catch{}},setMilestoneFilter:n=>e({selectedMilestoneId:n})})),Km=ei(e=>({drafts:{},setDraft:(t,n)=>e(r=>{if(!n.trim()){const{[t]:a,...s}=r.drafts;return{drafts:s}}return{drafts:{...r.drafts,[t]:n}}}),clearDraft:t=>e(n=>{const{[t]:r,...a}=n.drafts;return{drafts:a}})})),wV=5*1024*1024,Z2=10,wR=["image/png","image/jpeg","image/gif","image/webp"],AV=5,CV=500;let J2=0;function AR(e){return e.split(`
|
|
521
|
+
`).length>AV||e.length>CV}function kV(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function OV(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>t(String(r.result)),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}function IV({url:e,label:t,onClose:n}){return v.useEffect(()=>{const r=a=>{a.key==="Escape"&&(a.preventDefault(),n())};return window.addEventListener("keydown",r,!0),()=>window.removeEventListener("keydown",r,!0)},[n]),c.jsx("div",{role:"dialog","aria-modal":"true","aria-label":t,onClick:n,className:"fixed inset-0 z-50 flex cursor-zoom-out items-center justify-center bg-black/80 p-8 backdrop-blur-sm",children:c.jsx("img",{src:e,alt:t,className:"max-h-full max-w-full object-contain"})})}function K1({url:e,label:t,className:n}){const[r,a]=v.useState(!1);return c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",onClick:()=>a(!0),"aria-label":`预览 ${t}`,className:"block cursor-zoom-in rounded-md transition-opacity duration-150 hover:opacity-80",children:c.jsx("img",{src:e,alt:t,className:re("rounded-md border border-line",n)})}),r&&c.jsx(IV,{url:e,label:t,onClose:()=>a(!1)})]})}function CR(e=!0){const[t,n]=v.useState([]),[r,a]=v.useState([]),[s,o]=v.useState(null);v.useEffect(()=>{o(null),e||n([])},[e]);const u=async _=>{const S=[],T=[],C=t.length;let A=Z2-C;for(const k of _){if(A<=0){T.push(`最多 ${Z2} 张图片`);break}if(!wR.includes(k.type)){T.push(`${k.name||"文件"}:格式不支持`);continue}if(k.size>wV){T.push(`${k.name}:超过 5MB`);continue}S.push({_id:`att-${++J2}`,mime:k.type,url:await OV(k),filename:k.name}),A--}S.length>0&&n(k=>[...k,...S]),o(T.length>0?T.join(";"):null)},d=_=>{const S=Array.from(_.clipboardData.files);if(S.length!==0){if(_.preventDefault(),!e){o("当前模型不支持图片");return}u(S)}},f=_=>{const S=++J2,T=_.split(`
|
|
522
|
+
`).length,C=new TextEncoder().encode(_).byteLength,A=`[粘贴文本 #${S} · ${T}行]`,k={_id:`fold-${S}`,text:_,lineCount:T,byteSize:C,placeholder:A};return a(I=>[...I,k]),k},m=_=>{let S=_;for(const T of r)S=S.replace(T.placeholder,T.text);return S},p=_=>n(S=>S.filter(T=>T._id!==_)),b=_=>a(S=>S.filter(T=>T._id!==_)),x=v.useCallback(()=>{n([]),a([]),o(null)},[]),E=t.map(({mime:_,url:S,filename:T})=>({mime:_,url:S,filename:T}));return{attachments:t,foldedTexts:r,promptFiles:E,error:s,setError:o,addFiles:u,onPaste:d,addFoldedText:f,expandFoldedTexts:m,remove:p,removeFoldedText:b,clear:x}}function RV({text:e,label:t,onClose:n}){v.useEffect(()=>{const s=o=>{o.key==="Escape"&&(o.preventDefault(),n())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[n]);const r=e.split(`
|
|
523
|
+
`),a=String(r.length).length;return c.jsx("div",{role:"dialog","aria-modal":"true","aria-label":t,onClick:n,className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-4 backdrop-blur-sm md:p-8",children:c.jsxs("div",{onClick:s=>s.stopPropagation(),className:"flex max-h-full w-full max-w-4xl flex-col overflow-hidden rounded-lg border border-line bg-term",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-2",children:[c.jsx("span",{className:"font-mono text-xs text-fg-3",children:t}),c.jsx("button",{type:"button",onClick:n,className:"text-fg-5 hover:text-fg-2",children:c.jsx(yt,{className:"h-4 w-4"})})]}),c.jsx("pre",{className:"overflow-auto p-4 font-mono text-xs leading-relaxed text-fg-2",children:r.map((s,o)=>c.jsxs("div",{children:[c.jsx("span",{className:"mr-3 inline-block select-none text-right text-fg-6",style:{width:`${a}ch`},children:o+1}),s]},o))})]})})}function MV({fold:e,index:t,onRemove:n}){const[r,a]=v.useState(!1),s=`粘贴文本 #${t} · ${e.lineCount}行 · ${kV(e.byteSize)}`;return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"group relative flex items-center gap-1.5 rounded-md border border-line bg-elevated/50 px-2.5 py-1.5",children:[c.jsxs("button",{type:"button",onClick:()=>a(!0),className:"flex items-center gap-1.5 font-mono text-xs text-fg-3 transition-colors hover:text-fg",children:[c.jsx(lo,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),c.jsx("span",{children:s})]}),c.jsx("button",{type:"button",onClick:n,"aria-label":"移除粘贴文本",className:"flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-fg-5 transition-colors hover:text-fg-2",children:c.jsx(yt,{className:"h-2.5 w-2.5",strokeWidth:2.5})})]}),r&&c.jsx(RV,{text:e.text,label:s,onClose:()=>a(!1)})]})}function kR({onFiles:e,disabled:t,allowed:n}){const r=v.useRef(null);return c.jsxs(c.Fragment,{children:[c.jsx("input",{ref:r,type:"file",accept:wR.join(","),multiple:!0,hidden:!0,onChange:a=>{e(Array.from(a.target.files??[])),a.target.value=""}}),c.jsx("button",{type:"button",onClick:()=>{var a;return(a=r.current)==null?void 0:a.click()},disabled:t||!n,"aria-label":"Attach image",title:n?"附加图片":"当前模型不支持图片",className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-fg-5 transition-colors duration-150 hover:text-fg-3 disabled:cursor-not-allowed disabled:text-fg-6/40",children:c.jsx(E7,{className:"h-4 w-4"})})]})}function OR({attachments:e,foldedTexts:t,error:n,onRemove:r,onRemoveFoldedText:a,className:s}){const o=e.length>0||(t??[]).length>0;return!o&&!n?null:c.jsxs("div",{className:s,children:[o&&c.jsxs("div",{className:"mb-2 flex flex-wrap gap-2",children:[e.map(u=>c.jsxs("div",{className:"group relative",children:[c.jsx(K1,{url:u.url,label:u.filename??"attachment",className:"h-16 w-16 object-cover"}),c.jsx("button",{type:"button",onClick:()=>r(u._id),"aria-label":"Remove attachment",className:"absolute -right-1.5 -top-1.5 flex h-4 w-4 items-center justify-center rounded-full border border-line bg-term text-fg-4 opacity-0 transition-opacity duration-150 hover:text-fg-2 group-hover:opacity-100",children:c.jsx(yt,{className:"h-2.5 w-2.5",strokeWidth:2.5})})]},u._id)),(t??[]).map((u,d)=>c.jsx(MV,{fold:u,index:d+1,onRemove:()=>a==null?void 0:a(u._id)},u._id))]}),n&&c.jsx("div",{className:"mb-2 font-mono text-[11px] text-red-400",children:n})]})}function IR({isListening:e,disabled:t,onStart:n,onStop:r}){const a=v.useRef(!1),s=u=>{if(t)return;u.preventDefault(),a.current=!0,n();const d=()=>{document.removeEventListener("touchend",d),document.removeEventListener("touchcancel",d),a.current=!1,r()};document.addEventListener("touchend",d,{once:!0}),document.addEventListener("touchcancel",d,{once:!0})},o=()=>{if(t||a.current)return;n();const u=()=>{document.removeEventListener("mouseup",u),r()};document.addEventListener("mouseup",u,{once:!0})};return c.jsx("button",{type:"button",disabled:t,onTouchStart:s,onMouseDown:o,onContextMenu:u=>u.preventDefault(),"aria-label":"按住说话",title:"按住说话",style:{WebkitTouchCallout:"none"},className:re("flex shrink-0 select-none touch-none items-center justify-center transition-colors duration-150 disabled:cursor-not-allowed disabled:text-fg-6/40","order-first self-stretch w-12 rounded-xl sm:order-none sm:self-auto sm:h-7 sm:w-7 sm:rounded-md",e?"bg-red-500/15 text-red-400 hover:bg-red-500/25":"text-fg-5 hover:text-fg-3"),children:c.jsx(L7,{className:re("h-6 w-6 sm:h-4 sm:w-4",e&&"animate-pulse")})})}const DV=[.85,1.25,.65,1.4,.75,1.15,.95],Zx=4,eA=24;function jV(e){const t=Math.floor(e/60).toString().padStart(2,"0"),n=Math.floor(e%60).toString().padStart(2,"0");return`${t}:${n}`}function LV({volumeLevel:e}){const t=Math.min(Math.max(e,0),1);return c.jsx("div",{className:"flex h-6 items-center gap-1","aria-hidden":"true",children:DV.map((n,r)=>{const a=Zx+t*n*(eA-Zx),s=Math.max(Zx,Math.min(eA,a));return c.jsx("span",{className:"w-1 rounded-full bg-red-400 transition-[height] duration-150 ease-out",style:{height:`${s}px`}},r)})})}function RR({phase:e,transcript:t,interimTranscript:n,editText:r,onEditTextChange:a,onTextareaKeyDown:s,textareaRef:o,wrapperClassName:u}){if(e==="idle")return null;const d=t.length>0||n.length>0;return c.jsx("div",{className:u,children:c.jsxs("div",{className:"max-h-[40vh] overflow-y-auto px-4 py-4",children:[e==="recording"&&c.jsx("div",{className:"text-xl leading-relaxed",children:d?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-fg",children:t}),n&&c.jsx("span",{className:"text-fg-4",children:n})]}):c.jsx("span",{className:"italic text-fg-5",children:"正在聆听…"})}),e==="recognizing"&&c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(Nn,{className:"h-5 w-5 shrink-0 text-emerald-400 fs-spin"}),c.jsx("span",{className:"font-mono text-sm text-emerald-400",children:"识别中…"}),n&&c.jsx("span",{className:"truncate text-base text-fg-4",children:n})]}),e==="done"&&c.jsx("textarea",{ref:o,value:r,onChange:f=>a(f.target.value),onKeyDown:s,rows:2,placeholder:"识别结果(可编辑)",className:"w-full resize-none bg-transparent text-xl leading-relaxed text-fg placeholder:text-fg-5 focus:outline-none"})]})})}function MR({phase:e,volumeLevel:t,elapsed:n,editText:r,error:a,onCancel:s,onConfirm:o,idleHint:u,className:d}){return e==="idle"?c.jsx("div",{className:d,children:a?c.jsx("span",{className:"font-mono text-[10px] text-red-400",children:a}):u?c.jsx("span",{className:"font-mono text-[10px] text-fg-6",children:u}):null}):e==="done"?c.jsxs("div",{className:d,children:[c.jsx("span",{className:"hidden font-mono text-[10px] text-fg-6 sm:inline",children:"⌘/Ctrl+⏎ 发送 · Esc 取消"}),c.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[c.jsx("button",{type:"button",onClick:s,className:"rounded-md border border-line px-3 py-1 text-xs text-fg-3 transition-colors hover:bg-elevated hover:text-fg",children:"取消"}),c.jsxs("button",{type:"button",onClick:o,disabled:r.trim().length===0,"aria-label":"发送",className:"flex items-center gap-1.5 rounded-md bg-emerald-600 px-3 py-1 text-xs font-medium text-white transition-colors hover:bg-emerald-500 disabled:cursor-not-allowed disabled:bg-fg-6/30 disabled:text-fg-5",children:[c.jsx(Zd,{className:"h-3.5 w-3.5",strokeWidth:2.5}),c.jsx("span",{children:"发送"})]})]})]}):c.jsx("div",{className:d,children:e==="recording"?c.jsxs(c.Fragment,{children:[c.jsx(LV,{volumeLevel:t}),c.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-[11px] font-medium text-red-400",children:[c.jsx("span",{className:"h-1.5 w-1.5 shrink-0 animate-pulse rounded-full bg-red-400"}),"录音中"]}),c.jsx("span",{className:"font-mono text-[11px] tabular-nums text-fg-4",children:jV(n)})]}):c.jsxs(c.Fragment,{children:[c.jsx(Nn,{className:"h-4 w-4 shrink-0 text-emerald-400 fs-spin"}),c.jsx("span",{className:"font-mono text-[11px] text-emerald-400",children:"识别中…"})]})})}/*! Capacitor: https://capacitorjs.com/ - MIT License */var Bu;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(Bu||(Bu={}));class Jx extends Error{constructor(t,n,r){super(t),this.message=t,this.code=n,this.data=r}}const PV=e=>{var t,n;return e!=null&&e.androidBridge?"android":!((n=(t=e==null?void 0:e.webkit)===null||t===void 0?void 0:t.messageHandlers)===null||n===void 0)&&n.bridge?"ios":"web"},BV=e=>{const t=e.CapacitorCustomPlatform||null,n=e.Capacitor||{},r=n.Plugins=n.Plugins||{},a=()=>t!==null?t.name:PV(e),s=()=>a()!=="web",o=p=>{const b=f.get(p);return!!(b!=null&&b.platforms.has(a())||u(p))},u=p=>{var b;return(b=n.PluginHeaders)===null||b===void 0?void 0:b.find(x=>x.name===p)},d=p=>e.console.error(p),f=new Map,m=(p,b={})=>{const x=f.get(p);if(x)return console.warn(`Capacitor plugin "${p}" already registered. Cannot register plugins twice.`),x.proxy;const E=a(),_=u(p);let S;const T=async()=>(!S&&E in b?S=typeof b[E]=="function"?S=await b[E]():S=b[E]:t!==null&&!S&&"web"in b&&(S=typeof b.web=="function"?S=await b.web():S=b.web),S),C=(H,z)=>{var D,V;if(_){const q=_==null?void 0:_.methods.find(ae=>z===ae.name);if(q)return q.rtype==="promise"?ae=>n.nativePromise(p,z.toString(),ae):(ae,Q)=>n.nativeCallback(p,z.toString(),ae,Q);if(H)return(D=H[z])===null||D===void 0?void 0:D.bind(H)}else{if(H)return(V=H[z])===null||V===void 0?void 0:V.bind(H);throw new Jx(`"${p}" plugin is not implemented on ${E}`,Bu.Unimplemented)}},A=H=>{let z;const D=(...V)=>{const q=T().then(ae=>{const Q=C(ae,H);if(Q){const W=Q(...V);return z=W==null?void 0:W.remove,W}else throw new Jx(`"${p}.${H}()" is not implemented on ${E}`,Bu.Unimplemented)});return H==="addListener"&&(q.remove=async()=>z()),q};return D.toString=()=>`${H.toString()}() { [capacitor code] }`,Object.defineProperty(D,"name",{value:H,writable:!1,configurable:!1}),D},k=A("addListener"),I=A("removeListener"),O=(H,z)=>{const D=k({eventName:H},z),V=async()=>{const ae=await D;I({eventName:H,callbackId:ae},z)},q=new Promise(ae=>D.then(()=>ae({remove:V})));return q.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await V()},q},j=new Proxy({},{get(H,z){switch(z){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return _?O:k;case"removeListener":return I;default:return A(z)}}});return r[p]=j,f.set(p,{name:p,proxy:j,platforms:new Set([...Object.keys(b),..._?[E]:[]])}),j};return n.convertFileSrc||(n.convertFileSrc=p=>p),n.getPlatform=a,n.handleError=d,n.isNativePlatform=s,n.isPluginAvailable=o,n.registerPlugin=m,n.Exception=Jx,n.DEBUG=!!n.DEBUG,n.isLoggingEnabled=!!n.isLoggingEnabled,n},UV=e=>e.Capacitor=BV(e),hp=UV(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Mf=hp.registerPlugin;class V1{constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}addListener(t,n){let r=!1;this.listeners[t]||(this.listeners[t]=[],r=!0),this.listeners[t].push(n);const s=this.windowListeners[t];s&&!s.registered&&this.addWindowListener(s),r&&this.sendRetainedArgumentsForEvent(t);const o=async()=>this.removeListener(t,n);return Promise.resolve({remove:o})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,n,r){const a=this.listeners[t];if(!a){if(r){let s=this.retainedEventArguments[t];s||(s=[]),s.push(n),this.retainedEventArguments[t]=s}return}a.forEach(s=>s(n))}hasListeners(t){var n;return!!(!((n=this.listeners[t])===null||n===void 0)&&n.length)}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:r=>{this.notifyListeners(n,r)}}}unimplemented(t="not implemented"){return new hp.Exception(t,Bu.Unimplemented)}unavailable(t="not available"){return new hp.Exception(t,Bu.Unavailable)}async removeListener(t,n){const r=this.listeners[t];if(!r)return;const a=r.indexOf(n);this.listeners[t].splice(a,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const n=this.retainedEventArguments[t];n&&(delete this.retainedEventArguments[t],n.forEach(r=>{this.notifyListeners(t,r)}))}}const tA=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),nA=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class zV extends V1{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(r=>{if(r.length<=0)return;let[a,s]=r.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");a=nA(a).trim(),s=nA(s).trim(),n[a]=s}),n}async setCookie(t){try{const n=tA(t.key),r=tA(t.value),a=t.expires?`; expires=${t.expires.replace("expires=","")}`:"",s=(t.path||"/").replace("path=",""),o=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${r||""}${a}; path=${s}; ${o};`}catch(n){return Promise.reject(n)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const n of t)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}Mf("CapacitorCookies",{web:()=>new zV});const FV=async e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{const a=r.result;t(a.indexOf(",")>=0?a.split(",")[1]:a)},r.onerror=a=>n(a),r.readAsDataURL(e)}),HV=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(a=>a.toLocaleLowerCase()).reduce((a,s,o)=>(a[s]=e[t[o]],a),{})},$V=(e,t=!0)=>e?Object.entries(e).reduce((r,a)=>{const[s,o]=a;let u,d;return Array.isArray(o)?(d="",o.forEach(f=>{u=t?encodeURIComponent(f):f,d+=`${s}=${u}&`}),d.slice(0,-1)):(u=t?encodeURIComponent(o):o,d=`${s}=${u}`),`${r}&${d}`},"").substr(1):null,YV=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),a=HV(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(a.includes("application/x-www-form-urlencoded")){const s=new URLSearchParams;for(const[o,u]of Object.entries(e.data||{}))s.set(o,u);n.body=s.toString()}else if(a.includes("multipart/form-data")||e.data instanceof FormData){const s=new FormData;if(e.data instanceof FormData)e.data.forEach((u,d)=>{s.append(d,u)});else for(const u of Object.keys(e.data))s.append(u,e.data[u]);n.body=s;const o=new Headers(n.headers);o.delete("content-type"),n.headers=o}else(a.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class qV extends V1{async request(t){const n=YV(t,t.webFetchExtra),r=$V(t.params,t.shouldEncodeUrlParams),a=r?`${t.url}?${r}`:t.url,s=await fetch(a,n),o=s.headers.get("content-type")||"";let{responseType:u="text"}=s.ok?t:{};o.includes("application/json")&&(u="json");let d,f;switch(u){case"arraybuffer":case"blob":f=await s.blob(),d=await FV(f);break;case"json":d=await s.json();break;case"document":case"text":default:d=await s.text()}const m={};return s.headers.forEach((p,b)=>{m[b]=p}),{data:d,headers:m,status:s.status,url:s.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}Mf("CapacitorHttp",{web:()=>new qV});var rA;(function(e){e.Dark="DARK",e.Light="LIGHT",e.Default="DEFAULT"})(rA||(rA={}));var aA;(function(e){e.StatusBar="StatusBar",e.NavigationBar="NavigationBar"})(aA||(aA={}));class GV extends V1{async setStyle(){this.unavailable("not available for web")}async setAnimation(){this.unavailable("not available for web")}async show(){this.unavailable("not available for web")}async hide(){this.unavailable("not available for web")}}Mf("SystemBars",{web:()=>new GV});const KV="modulepreload",VV=function(e){return"/"+e},iA={},WV=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let o=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));a=o(n.map(f=>{if(f=VV(f),f in iA)return;iA[f]=!0;const m=f.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":KV,m||(b.as="script"),b.crossOrigin="",b.href=f,d&&b.setAttribute("nonce",d),document.head.appendChild(b),m)return new Promise((x,E)=>{b.addEventListener("load",x),b.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${f}`)))})}))}function s(o){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=o,window.dispatchEvent(u),!u.defaultPrevented)throw o}return a.then(o=>{for(const u of o||[])u.status==="rejected"&&s(u.reason);return t().catch(s)})},pu=Mf("SpeechRecognition",{web:()=>WV(()=>import("./web-Bhp1xkru.js"),[]).then(e=>new e.SpeechRecognitionWeb)});function XV(e,t){const n=e.length,r=new ArrayBuffer(44+n*2),a=new DataView(r),s=(o,u)=>{for(let d=0;d<u.length;d++)a.setUint8(o+d,u.charCodeAt(d))};s(0,"RIFF"),a.setUint32(4,36+n*2,!0),s(8,"WAVE"),s(12,"fmt "),a.setUint32(16,16,!0),a.setUint16(20,1,!0),a.setUint16(22,1,!0),a.setUint32(24,t,!0),a.setUint32(28,t*2,!0),a.setUint16(32,2,!0),a.setUint16(34,16,!0),s(36,"data"),a.setUint32(40,n*2,!0);for(let o=0;o<n;o++){const u=Math.max(-1,Math.min(1,e[o]));a.setInt16(44+o*2,u<0?u*32768:u*32767,!0)}return new Blob([r],{type:"audio/wav"})}const dv=hp.isNativePlatform(),ey=!dv&&typeof window<"u"?window.SpeechRecognition??window.webkitSpeechRecognition:void 0,ty=16e3;function QV(e="zh-CN"){const[t,n]=v.useState(!1),[r,a]=v.useState(""),[s,o]=v.useState(""),[u,d]=v.useState(null),[f,m]=v.useState(0),[p,b]=v.useState("idle"),x=v.useRef(null),E=v.useRef(!1),_=v.useRef([]),S=v.useRef(!1),T=v.useRef(null),C=v.useRef(!1),A=v.useRef(""),k=v.useRef(null),I=v.useRef(null),O=v.useRef(null),j=v.useRef([]),H=v.useRef(!1),z=!0,D=v.useCallback(async()=>{var M,de,_e;(M=O.current)==null||M.disconnect(),(de=I.current)==null||de.getTracks().forEach(U=>U.stop()),await((_e=k.current)==null?void 0:_e.close().catch(()=>{}));const F=j.current;if(j.current=[],O.current=null,I.current=null,k.current=null,F.length===0||H.current){n(!1),b("idle");return}o("识别中…"),b("recognizing");const $=F.reduce((U,he)=>U+he.length,0),K=new Float32Array($);let L=0;for(const U of F)K.set(U,L),L+=U.length;const P=XV(K,ty),ee=new FormData;ee.append("audio",P,"recording.wav");try{const U=await fetch("/api/transcribe",{method:"POST",body:ee});if(H.current)return;if(U.ok){const{text:he}=await U.json();he?(a(he),b("done")):b("idle")}else{const he=await U.json().catch(()=>({error:`HTTP ${U.status}`}));d(he.error??`HTTP ${U.status}`),b("idle")}}catch(U){d(`语音识别失败:${U instanceof Error?U.message:String(U)}`),b("idle")}finally{o(""),n(!1)}},[]),V=v.useCallback(async()=>{if(E.current=!0,T.current&&(clearTimeout(T.current),T.current=null),dv){await pu.stop().catch(()=>{});for(const F of _.current)await F.remove().catch(()=>{});_.current=[],n(!1),o("")}else x.current?x.current.stop():k.current?await D():(n(!1),b("idle"))},[D]),q=v.useCallback(async()=>{var L;H.current=!1,a(""),o(""),d(null),b("idle");const{available:F}=await pu.available();if(!F){d("当前设备不支持语音识别");return}if((await pu.requestPermissions()).speechRecognition!=="granted"){d("请允许语音识别权限");return}const K=[];K.push(await pu.addListener("partialResults",P=>{o(P.matches[0]??"")})),K.push(await pu.addListener("listeningState",P=>{const ee=P.status==="started";n(ee),ee&&b("recording"),ee||o("")})),_.current=K;try{const P=await pu.start({language:e,partialResults:!0,maxResults:1});(L=P.matches)!=null&&L.length&&a(ee=>ee+P.matches.join(""))}catch(P){d(`语音识别错误:${P instanceof Error?P.message:String(P)}`);for(const ee of K)await ee.remove().catch(()=>{});_.current=[]}},[e]),ae=v.useCallback(()=>{if(!ey)return!1;H.current=!1,a(""),o(""),A.current="",d(null),b("idle"),E.current=!1;const F=new ey;F.lang=e,F.continuous=!0,F.interimResults=!0,F.maxAlternatives=1,F.onstart=()=>{n(!0),b("recording"),S.current=!1,T.current=setTimeout(()=>{!S.current&&!E.current&&(C.current=!0,E.current=!0,F.stop(),d("语音识别服务不可用(Chrome/Edge 需连接 Google 服务器),下次将使用服务端识别"))},5e3)},F.onresult=$=>{S.current=!0,T.current&&(clearTimeout(T.current),T.current=null);let K="",L="";for(let P=$.resultIndex;P<$.results.length;P++){const ee=$.results[P][0].transcript;$.results[P].isFinal?K+=ee:L+=ee}K&&a(P=>P+K),o(L),A.current=L},F.onerror=$=>{switch($.error!=="no-speech"&&$.error!=="aborted"&&(E.current=!0),$.error){case"not-allowed":d("请允许麦克风权限");break;case"network":d("网络错误,请检查连接");break;case"no-speech":case"aborted":return;default:d(`语音识别错误:${$.error}`)}},F.onend=()=>{if(E.current&&A.current&&a($=>$+A.current),o(""),A.current="",!E.current)try{F.start();return}catch{}n(!1),x.current=null},x.current=F;try{return F.start(),!0}catch{return!1}},[e]),Q=v.useCallback(async()=>{H.current=!1,a(""),o(""),d(null),b("idle");try{const P=await fetch("/api/transcribe/status"),{available:ee}=await P.json();if(!ee){d("语音识别服务未就绪,请稍后重试");return}}catch{d("无法连接语音识别服务");return}let F;try{F=await navigator.mediaDevices.getUserMedia({audio:{sampleRate:ty,channelCount:1}})}catch{d("请允许麦克风权限");return}const $=new AudioContext({sampleRate:ty}),K=$.createMediaStreamSource(F),L=$.createScriptProcessor(4096,1,1);j.current=[],L.onaudioprocess=P=>{j.current.push(new Float32Array(P.inputBuffer.getChannelData(0)))},K.connect(L),L.connect($.destination),k.current=$,I.current=F,O.current=L,n(!0),b("recording")},[]),W=v.useCallback(()=>{dv?q():ey&&!C.current&&ae()||Q()},[q,ae,Q]);v.useEffect(()=>{if(!t){m(0);return}if(x.current)return;let F=!1,$=null,K=null,L=0;return(async()=>{try{if($=await navigator.mediaDevices.getUserMedia({audio:!0}),F){$.getTracks().forEach(U=>U.stop());return}K=new AudioContext;const P=K.createMediaStreamSource($),ee=K.createAnalyser();ee.fftSize=256,P.connect(ee);const M=new Uint8Array(ee.frequencyBinCount);let de=0;const _e=()=>{if(F)return;ee.getByteFrequencyData(M);const U=performance.now();if(U-de>80){let he=0;for(let Oe=0;Oe<M.length;Oe++)he+=M[Oe];m(he/(M.length*255)),de=U}L=requestAnimationFrame(_e)};L=requestAnimationFrame(_e)}catch{}})(),()=>{F=!0,cancelAnimationFrame(L),$==null||$.getTracks().forEach(P=>P.stop()),K==null||K.close().catch(()=>{}),m(0)}},[t]),v.useEffect(()=>{!t&&p==="recording"&&b(r?"done":"idle")},[t,p,r]),v.useEffect(()=>()=>{var F,$,K,L;E.current=!0,(F=x.current)==null||F.stop(),($=O.current)==null||$.disconnect(),(K=I.current)==null||K.getTracks().forEach(P=>P.stop()),(L=k.current)==null||L.close().catch(()=>{});for(const P of _.current)P.remove().catch(()=>{})},[]);const G=v.useCallback(()=>{H.current=!0,a(""),o(""),A.current="",b("idle")},[]);return{isSupported:z,isListening:t,phase:p,transcript:r,interimTranscript:s,error:u,volumeLevel:f,start:W,stop:V,resetTranscript:G}}const ZV=240,JV=1e3;function DR(e){const t=QV(),[n,r]=v.useState(""),[a,s]=v.useState(0),o=v.useRef(null),u=v.useRef(null),d=v.useRef(0);v.useEffect(()=>(t.phase==="recording"?(d.current=Date.now(),s(0),u.current=setInterval(()=>{s(Math.floor((Date.now()-d.current)/1e3))},JV)):u.current&&(clearInterval(u.current),u.current=null),()=>{u.current&&(clearInterval(u.current),u.current=null)}),[t.phase]),v.useEffect(()=>{t.phase==="done"&&(r(t.transcript),requestAnimationFrame(()=>{const b=o.current;b&&(b.focus(),b.setSelectionRange(b.value.length,b.value.length))}))},[t.phase,t.transcript]),v.useLayoutEffect(()=>{if(t.phase!=="done")return;const b=o.current;b&&(b.style.height="auto",b.style.height=`${Math.min(b.scrollHeight,ZV)}px`)},[t.phase,n]);const f=v.useCallback(()=>{t.stop(),t.resetTranscript(),r("")},[t]),m=v.useCallback(async()=>{const b=n.trim();if(!b){f();return}await e(b)!==!1&&(t.resetTranscript(),r(""))},[n,e,f,t]);v.useEffect(()=>{if(t.phase==="idle")return;const b=x=>{if(x.key==="Escape"&&t.phase!=="recognizing"){x.preventDefault(),f();return}if(t.phase==="done"&&x.key==="Enter"&&(x.metaKey||x.ctrlKey)){if(x.isComposing)return;x.preventDefault(),m()}};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[t.phase,f,m]);const p=v.useCallback(b=>{b.nativeEvent.isComposing||b.keyCode===229||b.key==="Enter"&&(b.metaKey||b.ctrlKey)&&(b.preventDefault(),m())},[m]);return{stt:t,editText:n,setEditText:r,elapsed:a,textareaRef:o,cancel:f,confirm:m,handleTextareaKeyDown:p}}const io=ei(e=>({agents:[],loaded:!1,loadAgents:async()=>{const t=Fe.getState().activeRepoId;try{const n=t?await oI(t):await aI();e({agents:n,loaded:!0})}catch{e({loaded:!0})}}}));function eW(e){if(typeof e!="string")return e;const t=e.trim();if(t)try{return JSON.parse(t)}catch{return t}}function qn(e){return e&&typeof e=="object"?e:null}function _l(e){const t=qn(e);return t&&"properties"in t?t.properties:e}function tW(e){const t=qn(e);return typeof(t==null?void 0:t.type)=="string"?t.type:void 0}function nW(e){const t=qn(_l(e));if(!t)return null;const n=qn(t.info);if(n&&typeof n.id=="string"){const a=Array.isArray(t.parts)?t.parts:void 0;return{...n,...a?{parts:a}:{}}}if(typeof t.id=="string"&&typeof t.role=="string")return t;const r=qn(t.message);return r&&typeof r.id=="string"?r:null}function rW(e){const t=qn(_l(e));if(!t)return{};const n=qn(t.part)??t;return typeof n.type!="string"?{}:{messageId:typeof n.messageID=="string"&&n.messageID||typeof n.messageId=="string"&&n.messageId||typeof t.messageID=="string"&&t.messageID||typeof t.messageId=="string"&&t.messageId||void 0,part:n}}function aW(e){const t=qn(_l(e));if(!t||t.field!=="text")return null;const n=typeof t.messageID=="string"?t.messageID:null,r=typeof t.partID=="string"?t.partID:null,a=typeof t.delta=="string"?t.delta:null;return!n||!r||a===null?null:{messageId:n,partId:r,delta:a}}function iW(e){const t=_l(e);if(Array.isArray(t))return t;const n=qn(t);return n&&Array.isArray(n.todos)?n.todos:[]}function ci(e){return typeof e=="number"?e:0}function sW(e){const t=qn(_l(e));if(!t||typeof t.id!="string")return null;const n={id:t.id};typeof t.title=="string"&&(n.title=t.title),typeof t.agent=="string"&&(n.agent=t.agent),typeof t.cost=="number"&&(n.cost=t.cost);const r=typeof t.parentID=="string"?t.parentID:typeof t.parent_id=="string"?t.parent_id:void 0;r&&(n.parentID=r);const a=qn(t.tokens),s=typeof t.tokens_input=="number"||typeof t.tokens_output=="number";if(a||s){const u=a?qn(a.cache):null;n.tokens={input:ci(a==null?void 0:a.input)||ci(t.tokens_input),output:ci(a==null?void 0:a.output)||ci(t.tokens_output),reasoning:ci(a==null?void 0:a.reasoning)||ci(t.tokens_reasoning),cache:{read:ci(u==null?void 0:u.read)||ci(t.tokens_cache_read),write:ci(u==null?void 0:u.write)||ci(t.tokens_cache_write)}}}const o=qn(t.model);return o&&(n.model={providerID:typeof o.providerID=="string"?o.providerID:void 0,modelID:typeof o.modelID=="string"?o.modelID:void 0,variant:typeof o.variant=="string"?o.variant:void 0}),n}function oW(e){const t=qn(_l(e));if(!t)return null;if(typeof t.message=="string")return t.message;const n=qn(t.error);if(n){const r=qn(n.data);if(typeof(r==null?void 0:r.message)=="string")return`${n.name??"Error"}: ${r.message}`;if(typeof n.message=="string")return`${n.name??"Error"}: ${n.message}`;if(typeof n.name=="string")return String(n.name)}return typeof t.reason=="string"?t.reason:null}function lW(e){const t=_l(e);if(typeof t=="string")return t;const n=qn(t);if(typeof(n==null?void 0:n.status)=="string")return n.status;const r=qn(n==null?void 0:n.status);return typeof(r==null?void 0:r.type)=="string"?r.type:typeof(n==null?void 0:n.type)=="string"?n.type:null}function uW(e,t,n,r){switch(e==="message"||e===""?tW(t)??e:e){case"message.updated":{const s=nW(t);s&&r.updateMessage(n,s);break}case"session.updated":{const s=sW(t);s&&r.updateSessionInfo(s);break}case"message.part.updated":{const{messageId:s,part:o}=rW(t);o&&s&&r.updateMessagePart(n,s,o);break}case"message.part.delta":{const s=aW(t);s&&r.appendMessagePartDelta(n,s.messageId,s.partId,s.delta);break}case"todo.updated":{r.updateTodos(n,iW(t));break}case"session.status":{const s=lW(t);s&&r.setSessionStatus(n,s);break}case"session.idle":{r.setSessionStatus(n,"idle");break}case"session.error":{const s=oW(t);r.setSessionStatus(n,"error",s??void 0);break}}}const cW=600*1e3;class dW{constructor(t,n){un(this,"sessionId");un(this,"idleTimer",null);un(this,"active",!1);un(this,"alive",!0);un(this,"callbacks");this.sessionId=t,this.callbacks=n,this.resetIdleTimer()}dispatch(t,n){if(!this.alive)return;this.resetIdleTimer();const r=Le.getState();uW(t,n,this.sessionId,r)}activate(){this.active=!0,this.clearIdleTimer()}deactivate(){this.active=!1,this.resetIdleTimer()}refreshOnIdle(){Le.getState().refreshSessionData(this.sessionId)}stop(){this.alive=!1,this.clearIdleTimer()}resetIdleTimer(){this.clearIdleTimer(),!this.active&&(this.idleTimer=setTimeout(()=>{this.callbacks.onWorkerIdle(this.sessionId)},cW))}clearIdleTimer(){this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null)}}const fW=1e3,hW=3e4;class mW{constructor(t,n){un(this,"source",null);un(this,"reconnectTimer",null);un(this,"attempts",0);un(this,"disposed",!1);un(this,"repoId");un(this,"onEvent");this.repoId=t,this.onEvent=n}start(){this.connect()}stop(){var t;this.disposed=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),(t=this.source)==null||t.close(),this.source=null}connect(){if(this.disposed)return;const t=kF(this.repoId),n=new EventSource(t);this.source=n,n.onopen=()=>{this.attempts=0},n.onmessage=a=>{this.handleRaw("message",a)};const r=["message.updated","message.part.updated","message.part.delta","message.removed","todo.updated","session.status","session.idle","session.error","session.updated"];for(const a of r)n.addEventListener(a,s=>{this.handleRaw(a,s)});n.onerror=()=>{if(!(this.disposed||!this.source)&&this.source.readyState===EventSource.CLOSED){this.source.close(),this.source=null;const a=Math.min(fW*2**this.attempts,hW);this.attempts++,this.reconnectTimer=setTimeout(()=>this.connect(),a)}}}handleRaw(t,n){if(!(n instanceof MessageEvent))return;const r=eW(n.data);if(r===void 0)return;const a=this.extractSessionId(r);if(!a)return;let s=t;if(t==="message"||t===""){const o=r&&typeof r=="object"?r:null;typeof(o==null?void 0:o.type)=="string"&&(s=o.type)}this.onEvent(a,s,r)}extractSessionId(t){if(!t||typeof t!="object")return null;const n=t;if(n.properties&&typeof n.properties=="object"){const r=n.properties;if(typeof r.sessionID=="string")return r.sessionID;if(typeof r.id=="string")return r.id}return typeof n.sessionID=="string"?n.sessionID:typeof n.sessionId=="string"?n.sessionId:null}}const pW=6e4;class gW{constructor(t){un(this,"timer",null);un(this,"paused",!1);un(this,"callbacks");this.callbacks=t}start(){this.tick(),this.timer=setInterval(()=>{this.paused||this.tick()},pW)}stop(){this.timer&&(clearInterval(this.timer),this.timer=null)}pause(){this.paused=!0}resume(){this.paused=!1,this.tick()}tick(){const t=Fe.getState().activeRepoId;t&&(Le.getState().loadSessions(),OF(t).then(n=>{const r={};for(const[a,s]of Object.entries(n))r[a]=s.type??"idle";Le.getState().bulkSetStatuses(r);for(const[a,s]of Object.entries(r))(s==="busy"||s==="retry")&&this.callbacks.ensureWorker(a)}).catch(()=>{}))}}class bW{constructor(){un(this,"workers",new Map);un(this,"dispatcher",null);un(this,"supervisor",null);un(this,"visibilityHandler",null)}start(t){this.stop();const n={onWorkerIdle:r=>this.removeWorker(r)};this.dispatcher=new mW(t,(r,a,s)=>{const o=this.ensureWorker(r,n);if(a==="session.idle"||a==="session.status"){const u=Le.getState().sessionStatuses[r];o.dispatch(a,s);const d=Le.getState().sessionStatuses[r];u&&u!=="idle"&&d==="idle"&&o.refreshOnIdle()}else o.dispatch(a,s)}),this.dispatcher.start(),this.supervisor=new gW({ensureWorker:r=>this.ensureWorker(r,n)}),this.supervisor.start(),this.visibilityHandler=()=>{var r,a;document.hidden?(r=this.supervisor)==null||r.pause():(a=this.supervisor)==null||a.resume()},document.addEventListener("visibilitychange",this.visibilityHandler)}stop(){var t,n;(t=this.dispatcher)==null||t.stop(),this.dispatcher=null,(n=this.supervisor)==null||n.stop(),this.supervisor=null;for(const r of this.workers.values())r.stop();this.workers.clear(),this.visibilityHandler&&(document.removeEventListener("visibilitychange",this.visibilityHandler),this.visibilityHandler=null)}activateSession(t){for(const a of this.workers.values())a.sessionId!==t&&a.deactivate();if(!t)return;const n={onWorkerIdle:a=>this.removeWorker(a)};this.ensureWorker(t,n).activate(),Le.getState().refreshSessionData(t)}deactivateSession(t){var n;(n=this.workers.get(t))==null||n.deactivate()}ensureWorker(t,n){let r=this.workers.get(t);return r||(r=new dW(t,n),this.workers.set(t,r)),r}removeWorker(t){const n=Le.getState().activeSessionId;if(t===n)return;const r=this.workers.get(t);r&&(r.stop(),this.workers.delete(t))}}const mp=new bW,sA=(function(e,t,n){const r=Of(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),Nl=(function(e){if(e==null)return vW;if(typeof e=="string")return yW(e);if(typeof e=="object")return xW(e);if(typeof e=="function")return W1(e);throw new Error("Expected function, string, or array as `test`")});function xW(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Nl(e[n]);return W1(r);function r(...a){let s=-1;for(;++s<t.length;)if(t[s].apply(this,a))return!0;return!1}}function yW(e){return W1(t);function t(n){return n.tagName===e}}function W1(e){return t;function t(n,r,a){return!!(EW(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function vW(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function EW(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const oA=/\n/g,lA=/[\t ]+/g,fv=Nl("br"),uA=Nl(kW),_W=Nl("p"),cA=Nl("tr"),NW=Nl(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",CW,OW]),jR=Nl(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function TW(e,t){const n=t||{},r="children"in e?e.children:[],a=jR(e),s=BR(e,{whitespace:n.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...PR(e,{breakBefore:!0,breakAfter:!0}));let u=-1;for(;++u<r.length;)o.push(...LR(r[u],e,{whitespace:s,breakBefore:u?void 0:a,breakAfter:u<r.length-1?fv(r[u+1]):a}));const d=[];let f;for(u=-1;++u<o.length;){const m=o[u];typeof m=="number"?f!==void 0&&m>f&&(f=m):m&&(f!==void 0&&f>-1&&d.push(`
|
|
524
|
+
`.repeat(f)||" "),f=-1,d.push(m))}return d.join("")}function LR(e,t,n){return e.type==="element"?SW(e,t,n):e.type==="text"?n.whitespace==="normal"?PR(e,n):wW(e):[]}function SW(e,t,n){const r=BR(e,n),a=e.children||[];let s=-1,o=[];if(NW(e))return o;let u,d;for(fv(e)||cA(e)&&sA(t,e,cA)?d=`
|
|
525
|
+
`:_W(e)?(u=2,d=2):jR(e)&&(u=1,d=1);++s<a.length;)o=o.concat(LR(a[s],e,{whitespace:r,breakBefore:s?void 0:u,breakAfter:s<a.length-1?fv(a[s+1]):d}));return uA(e)&&sA(t,e,uA)&&o.push(" "),u&&o.unshift(u),d&&o.push(d),o}function PR(e,t){const n=String(e.value),r=[],a=[];let s=0;for(;s<=n.length;){oA.lastIndex=s;const d=oA.exec(n),f=d&&"index"in d?d.index:n.length;r.push(AW(n.slice(s,f).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?t.breakBefore:!0,f===n.length?t.breakAfter:!0)),s=f+1}let o=-1,u;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(a.push(r[o]),u=void 0):r[o]?(typeof u=="number"&&a.push(u),a.push(r[o]),u=0):(o===0||o===r.length-1)&&a.push(0);return a}function wW(e){return[String(e.value)]}function AW(e,t,n){const r=[];let a=0,s;for(;a<e.length;){lA.lastIndex=a;const o=lA.exec(e);s=o?o.index:e.length,!a&&!s&&o&&!t&&r.push(""),a!==s&&r.push(e.slice(a,s)),a=o?s+o[0].length:s}return a!==s&&!n&&r.push(""),r.join(" ")}function BR(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function CW(e){return!!(e.properties||{}).hidden}function kW(e){return e.tagName==="td"||e.tagName==="th"}function OW(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function IW(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(a)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},m={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},p={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(a)+e.IDENT_RE,relevance:0},x=t.optional(a)+e.IDENT_RE+"\\s*\\(",E=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],_=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],S=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],T=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],k={type:_,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:S},I={className:"function.dispatch",relevance:0,keywords:{_hint:T},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},O=[I,p,u,n,e.C_BLOCK_COMMENT_MODE,m,f],j={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:k,contains:O.concat([{begin:/\(/,end:/\)/,keywords:k,contains:O.concat(["self"]),relevance:0}]),relevance:0},H={className:"function",begin:"("+o+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:k,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:k,relevance:0},{begin:x,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[f,m]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,m,u,{begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,m,u]}]},u,n,e.C_BLOCK_COMMENT_MODE,p]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:k,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(j,H,I,O,[p,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:k,contains:["self",u]},{begin:e.IDENT_RE+"::",keywords:k},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function RW(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=IW(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function MW(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const a={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,a]};a.contains.push(u);const d={match:/\\"/},f={className:"string",begin:/'/,end:/'/},m={match:/\\'/},p={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},b=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],x=e.SHEBANG({binary:`(${b.join("|")})`,relevance:10}),E={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},_=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],S=["true","false"],T={match:/(\/[a-z._-]+)+/},C=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],A=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],k=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],I=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:_,literal:S,built_in:[...C,...A,"set","shopt",...k,...I]},contains:[x,e.SHEBANG(),E,p,s,o,T,u,d,f,m,n]}}function DW(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",o="("+r+"|"+t.optional(a)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",u={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},m={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},p={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(a)+e.IDENT_RE,relevance:0},x=t.optional(a)+e.IDENT_RE+"\\s*\\(",S={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},T=[p,u,n,e.C_BLOCK_COMMENT_MODE,m,f],C={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:S,contains:T.concat([{begin:/\(/,end:/\)/,keywords:S,contains:T.concat(["self"]),relevance:0}]),relevance:0},A={begin:"("+o+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:S,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:S,relevance:0},{begin:x,returnBegin:!0,contains:[e.inherit(b,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,m,u,{begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,m,u]}]},u,n,e.C_BLOCK_COMMENT_MODE,p]};return{name:"C",aliases:["h"],keywords:S,disableAutodetect:!0,illegal:"</",contains:[].concat(C,A,T,[p,{begin:e.IDENT_RE+"::",keywords:S},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:p,strings:f,keywords:S}}}function jW(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(a)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},m={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},p={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(a)+e.IDENT_RE,relevance:0},x=t.optional(a)+e.IDENT_RE+"\\s*\\(",E=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],_=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],S=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],T=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],k={type:_,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:S},I={className:"function.dispatch",relevance:0,keywords:{_hint:T},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},O=[I,p,u,n,e.C_BLOCK_COMMENT_MODE,m,f],j={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:k,contains:O.concat([{begin:/\(/,end:/\)/,keywords:k,contains:O.concat(["self"]),relevance:0}]),relevance:0},H={className:"function",begin:"("+o+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:k,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:k,relevance:0},{begin:x,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[f,m]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,m,u,{begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,m,u]}]},u,n,e.C_BLOCK_COMMENT_MODE,p]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:k,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(j,H,I,O,[p,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:k,contains:["self",u]},{begin:e.IDENT_RE+"::",keywords:k},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function LW(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],a=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],o={keyword:a.concat(s),built_in:t,literal:r},u=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},f={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},m={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},p=e.inherit(m,{illegal:/\n/}),b={className:"subst",begin:/\{/,end:/\}/,keywords:o},x=e.inherit(b,{illegal:/\n/}),E={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,x]},_={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},b]},S=e.inherit(_,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]});b.contains=[_,E,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.C_BLOCK_COMMENT_MODE],x.contains=[S,E,p,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const T={variants:[f,_,E,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},C={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},A=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",k={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:o,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},T,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},u,C,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,C,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+A+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:o,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,C],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,relevance:0,contains:[T,d,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},k]}}const PW=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),BW=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],UW=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],zW=[...BW,...UW],FW=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),HW=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),$W=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),YW=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function qW(e){const t=e.regex,n=PW(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},a="and or not only",s=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",u=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+o,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+HW.join("|")+")"},{begin:":(:)?("+$W.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+YW.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...u,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...u,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:s},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:FW.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...u,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+zW.join("|")+")\\b"}]}}function GW(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function KW(e){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,illegal:/["']/}]}]}}function VW(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function WW(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const a={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},s={className:"literal",begin:/\bon|off|true|false|yes|no\b/},o={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},u={begin:/\[/,end:/\]/,contains:[r,s,a,o,n,"self"],relevance:0},d=/[A-Za-z0-9_-]+/,f=/"(\\"|[^"])*"/,m=/'[^']*'/,p=t.either(d,f,m),b=t.concat(p,"(\\s*\\.\\s*",p,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:b,className:"attr",starts:{end:/$/,contains:[r,u,s,a,o,n]}}]}}var Tu="[0-9](_*[0-9])*",vm=`\\.(${Tu})`,Em="[0-9a-fA-F](_*[0-9a-fA-F])*",dA={className:"number",variants:[{begin:`(\\b(${Tu})((${vm})|\\.)?|(${vm}))[eE][+-]?(${Tu})[fFdD]?\\b`},{begin:`\\b(${Tu})((${vm})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${vm})[fFdD]?\\b`},{begin:`\\b(${Tu})[fFdD]\\b`},{begin:`\\b0[xX]((${Em})\\.?|(${Em})?\\.(${Em}))[pP][+-]?(${Tu})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Em})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function UR(e,t,n){return n===-1?"":e.replace(t,r=>UR(e,t,n-1))}function XW(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+UR("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),d={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},f={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},m={className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:d,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[m,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:d,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,dA,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},dA,f]}}const fA="[A-Za-z$_][0-9A-Za-z$_]*",QW=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],ZW=["true","false","null","undefined","NaN","Infinity"],zR=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],FR=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],HR=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],JW=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],eX=[].concat(HR,zR,FR);function tX(e){const t=e.regex,n=($,{after:K})=>{const L="</"+$[0].slice(1);return $.input.indexOf(L,K)!==-1},r=fA,a={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:($,K)=>{const L=$[0].length+$.index,P=$.input[L];if(P==="<"||P===","){K.ignoreMatch();return}P===">"&&(n($,{after:L})||K.ignoreMatch());let ee;const M=$.input.substring(L);if(ee=M.match(/^\s*=/)){K.ignoreMatch();return}if((ee=M.match(/^\s+extends\s+/))&&ee.index===0){K.ignoreMatch();return}}},u={$pattern:fA,keyword:QW,literal:ZW,built_in:eX,"variable.language":JW},d="[0-9](_?[0-9])*",f=`\\.(${d})`,m="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",p={className:"number",variants:[{begin:`(\\b(${m})((${f})|\\.)?|(${f}))[eE][+-]?(${d})\\b`},{begin:`\\b(${m})\\b((${f})\\b|\\.)?|(${f})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},b={className:"subst",begin:"\\$\\{",end:"\\}",keywords:u,contains:[]},x={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"css"}},_={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},S={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,b]},C={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},A=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,E,_,S,{match:/\$\d+/},p];b.contains=A.concat({begin:/\{/,end:/\}/,keywords:u,contains:["self"].concat(A)});const k=[].concat(C,b.contains),I=k.concat([{begin:/(\s*)\(/,end:/\)/,keywords:u,contains:["self"].concat(k)}]),O={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:I},j={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},H={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...zR,...FR]}},z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},D={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[O],illegal:/%/},V={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function q($){return t.concat("(?!",$.join("|"),")")}const ae={match:t.concat(/\b/,q([...HR,"super","import"].map($=>`${$}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Q={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},W={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},O]},G="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",F={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(G)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[O]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:u,exports:{PARAMS_CONTAINS:I,CLASS_REFERENCE:H},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),z,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,E,_,S,C,{match:/\$\d+/},p,H,{scope:"attr",match:r+t.lookahead(":"),relevance:0},F,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[C,e.REGEXP_MODE,{className:"function",begin:G,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:I}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:a.begin,end:a.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},D,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[O,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},Q,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[O]},ae,V,j,W,{match:/\$[(.]/}]}}function nX(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],a={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,a,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Su="[0-9](_*[0-9])*",_m=`\\.(${Su})`,Nm="[0-9a-fA-F](_*[0-9a-fA-F])*",rX={className:"number",variants:[{begin:`(\\b(${Su})((${_m})|\\.)?|(${_m}))[eE][+-]?(${Su})[fFdD]?\\b`},{begin:`\\b(${Su})((${_m})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${_m})[fFdD]?\\b`},{begin:`\\b(${Su})[fFdD]\\b`},{begin:`\\b0[xX]((${Nm})\\.?|(${Nm})?\\.(${Nm}))[pP][+-]?(${Su})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Nm})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function aX(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},a={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,a]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,a]}]};a.contains.push(o);const u={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},d={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},f=rX,m=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),p={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},b=p;return b.variants[1].contains=[p],p.variants[1].contains=[b],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,m,n,r,u,d,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[p,e.C_LINE_COMMENT_MODE,m],relevance:0},e.C_LINE_COMMENT_MODE,m,u,d,o,e.C_NUMBER_MODE]},m]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},u,d]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
526
|
+
`},f]}}const iX=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),sX=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],oX=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],lX=[...sX,...oX],uX=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),$R=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),YR=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),cX=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),dX=$R.concat(YR).sort().reverse();function fX(e){const t=iX(e),n=dX,r="and or not only",a="[\\w-]+",s="("+a+"|@\\{"+a+"\\})",o=[],u=[],d=function(A){return{className:"string",begin:"~?"+A+".*?"+A}},f=function(A,k,I){return{className:A,begin:k,relevance:I}},m={$pattern:/[a-z-]+/,keyword:r,attribute:uX.join(" ")},p={begin:"\\(",end:"\\)",contains:u,keywords:m,relevance:0};u.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d("'"),d('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,p,f("variable","@@?"+a,10),f("variable","@\\{"+a+"\\}"),f("built_in","~?`[^`]*?`"),{className:"attribute",begin:a+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const b=u.concat({begin:/\{/,end:/\}/,contains:o}),x={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(u)},E={begin:s+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+cX.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:u}}]},_={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:m,returnEnd:!0,contains:u,relevance:0}},S={className:"variable",variants:[{begin:"@"+a+"\\s*:",relevance:15},{begin:"@"+a}],starts:{end:"[;}]",returnEnd:!0,contains:b}},T={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:s,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,x,f("keyword","all\\b"),f("variable","@\\{"+a+"\\}"),{begin:"\\b("+lX.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,f("selector-tag",s,0),f("selector-id","#"+s),f("selector-class","\\."+s,0),f("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+$R.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+YR.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:b},{begin:"!important"},t.FUNCTION_DISPATCH]},C={begin:a+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[T]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,_,S,C,E,T,x,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:o}}function hX(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},a=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:a.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:a}].concat(a)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function mX(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},a={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,a,s,o]}}function pX(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},a={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},u=/[A-Za-z][A-Za-z0-9+.-]*/,d={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,u,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},f={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},m={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},p=e.inherit(f,{contains:[]}),b=e.inherit(m,{contains:[]});f.contains.push(b),m.contains.push(p);let x=[n,d];return[f,m,p,b].forEach(T=>{T.contains=T.contains.concat(x)}),x=x.concat(f,m),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:x},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:x}]}]},n,s,f,m,{className:"quote",begin:"^>\\s+",contains:x,end:"$"},a,r,d,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function gX(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,u={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},d={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:u,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+d.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:d,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function bX(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,a={$pattern:/[\w.]+/,keyword:n.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:a},o={begin:/->\{/,end:/\}/},u={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},d={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[u]},f={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},m=[e.BACKSLASH_ESCAPE,s,d],p=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],b=(_,S,T="\\1")=>{const C=T==="\\1"?T:t.concat(T,S);return t.concat(t.concat("(?:",_,")"),S,/(?:\\.|[^\\\/])*?/,C,/(?:\\.|[^\\\/])*?/,T,r)},x=(_,S,T)=>t.concat(t.concat("(?:",_,")"),S,/(?:\\.|[^\\\/])*?/,T,r),E=[d,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:m,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},f,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:b("s|tr|y",t.either(...p,{capture:!0}))},{begin:b("s|tr|y","\\(","\\)")},{begin:b("s|tr|y","\\[","\\]")},{begin:b("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:x("(?:m|qr)?",/\//,/\//)},{begin:x("m|qr",t.either(...p,{capture:!0}),/\1/)},{begin:x("m|qr",/\(/,/\)/)},{begin:x("m|qr",/\[/,/\]/)},{begin:x("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,u]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,u,f]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=E,o.contains=E,{name:"Perl",aliases:["pl","pm"],keywords:a,contains:E}}function xX(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),a=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),s=t.concat(/[A-Z]+/,n),o={scope:"variable",match:"\\$+"+r},u={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},d={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},f=e.inherit(e.APOS_STRING_MODE,{illegal:null}),m=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(d)}),p={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(d),"on:begin":(Q,W)=>{W.data._beginMatch=Q[1]||Q[2]},"on:end":(Q,W)=>{W.data._beginMatch!==Q[1]&&W.ignoreMatch()}},b=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),x=`[
|
|
527
|
+
]`,E={scope:"string",variants:[m,f,p,b]},_={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},S=["false","null","true"],T=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],C=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],k={keyword:T,literal:(Q=>{const W=[];return Q.forEach(G=>{W.push(G),G.toLowerCase()===G?W.push(G.toUpperCase()):W.push(G.toLowerCase())}),W})(S),built_in:C},I=Q=>Q.map(W=>W.replace(/\|\d+$/,"")),O={variants:[{match:[/new/,t.concat(x,"+"),t.concat("(?!",I(C).join("\\b|"),"\\b)"),a],scope:{1:"keyword",4:"title.class"}}]},j=t.concat(r,"\\b(?!\\()"),H={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),j],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[a,t.concat(/::/,t.lookahead(/(?!class\b)/)),j],scope:{1:"title.class",3:"variable.constant"}},{match:[a,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[a,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},z={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},D={relevance:0,begin:/\(/,end:/\)/,keywords:k,contains:[z,o,H,e.C_BLOCK_COMMENT_MODE,E,_,O]},V={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",I(T).join("\\b|"),"|",I(C).join("\\b|"),"\\b)"),r,t.concat(x,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[D]};D.contains.push(V);const q=[z,H,e.C_BLOCK_COMMENT_MODE,E,_,O],ae={begin:t.concat(/#\[\s*\\?/,t.either(a,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:S,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:S,keyword:["new","array"]},contains:["self",...q]},...q,{scope:"meta",variants:[{match:a},{match:s}]}]};return{case_insensitive:!1,keywords:k,contains:[ae,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},u,{scope:"variable.language",match:/\$this\b/},o,V,H,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},O,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:k,contains:["self",ae,o,H,e.C_BLOCK_COMMENT_MODE,E,_]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},E,_]}}function yX(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function vX(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function EX(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],u={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},d={className:"meta",begin:/^(>>>|\.\.\.) /},f={className:"subst",begin:/\{/,end:/\}/,keywords:u,illegal:/#/},m={begin:/\{\{/,relevance:0},p={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d,m,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d,m,f]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,m,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,m,f]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},b="[0-9](_?[0-9])*",x=`(\\b(${b}))?\\.(${b})|\\b(${b})\\.`,E=`\\b|${r.join("|")}`,_={className:"number",relevance:0,variants:[{begin:`(\\b(${b})|(${x}))[eE][+-]?(${b})[jJ]?(?=${E})`},{begin:`(${x})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${E})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${E})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${E})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${E})`},{begin:`\\b(${b})[jJ](?=${E})`}]},S={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},T={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",d,_,p,e.HASH_COMMENT_MODE]}]};return f.contains=[p,_,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[d,_,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},p,S,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[T]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[_,T,p]}]}}function _X(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function NX(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),a=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[a,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[s,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:a},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function TX(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),a=t.concat(r,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},u={className:"doctag",begin:"@[A-Za-z]+"},d={begin:"#<",end:">"},f=[e.COMMENT("#","$",{contains:[u]}),e.COMMENT("^=begin","^=end",{contains:[u],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],m={className:"subst",begin:/#\{/,end:/\}/,keywords:o},p={className:"string",contains:[e.BACKSLASH_ESCAPE,m],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,m]})]}]},b="[1-9](_?[0-9])*|0",x="[0-9](_?[0-9])*",E={className:"number",relevance:0,variants:[{begin:`\\b(${b})(\\.(${x}))?([eE][+-]?(${x})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},_={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},O=[p,{variants:[{match:[/class\s+/,a,/\s+<\s+/,a]},{match:[/\b(class|module)\s+/,a]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,a],scope:{2:"title.class"},keywords:o},{relevance:0,match:[a,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[_]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[p,{begin:n}],relevance:0},E,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,m],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(d,f),relevance:0}].concat(d,f);m.contains=O,_.contains=O;const D=[{begin:/^\s*=>/,starts:{end:"$",contains:O}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:O}}];return f.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(D).concat(f).concat(O)}}function SX(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),a=t.concat(n,e.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,a,t.lookahead(/\s*\(/))},o="([ui](8|16|32|64|128|size)|f(32|64))?",u=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],d=["true","false","Some","None","Ok","Err"],f=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],m=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:m,keyword:u,literal:d,built_in:f},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+o},{begin:"\\b0o([0-7_]+)"+o},{begin:"\\b0x([A-Fa-f0-9_]+)"+o},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+o}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:f,type:m}},{className:"punctuation",begin:"->"},s]}}const wX=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),AX=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],CX=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],kX=[...AX,...CX],OX=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),IX=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),RX=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),MX=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function DX(e){const t=wX(e),n=RX,r=IX,a="@[a-z-]+",s="and or not only",u={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+kX.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},u,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+MX.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,u,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:a,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:OX.join(" ")},contains:[{begin:a,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},u,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function jX(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function LX(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},a={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],u=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],d=["add","asc","collation","desc","final","first","last","view"],f=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],m=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],p=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],b=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],x=m,E=[...f,...d].filter(I=>!m.includes(I)),_={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},S={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},T={match:t.concat(/\b/,t.either(...x),/\s*\(/),relevance:0,keywords:{built_in:x}};function C(I){return t.concat(/\b/,t.either(...I.map(O=>O.replace(/\s+/,"\\s+"))),/\b/)}const A={scope:"keyword",match:C(b),relevance:0};function k(I,{exceptions:O,when:j}={}){const H=j;return O=O||[],I.map(z=>z.match(/\|\d+$/)||O.includes(z)?z:H(z)?`${z}|0`:z)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:k(E,{when:I=>I.length<3}),literal:s,type:u,built_in:p},contains:[{scope:"type",match:C(o)},A,T,_,r,a,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,S]}}function qR(e){return e?typeof e=="string"?e:e.source:null}function xd(e){return Ft("(?=",e,")")}function Ft(...e){return e.map(n=>qR(n)).join("")}function PX(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Or(...e){return"("+(PX(e).capture?"":"?:")+e.map(r=>qR(r)).join("|")+")"}const X1=e=>Ft(/\b/,e,/\w$/.test(e)?/\b/:/\B/),BX=["Protocol","Type"].map(X1),hA=["init","self"].map(X1),UX=["Any","Self"],ny=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],mA=["false","nil","true"],zX=["assignment","associativity","higherThan","left","lowerThan","none","right"],FX=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],pA=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],GR=Or(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),KR=Or(GR,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),ry=Ft(GR,KR,"*"),VR=Or(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),pp=Or(VR,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),mi=Ft(VR,pp,"*"),Tm=Ft(/[A-Z]/,pp,"*"),HX=["attached","autoclosure",Ft(/convention\(/,Or("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Ft(/objc\(/,mi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],$X=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function YX(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],a={match:[/\./,Or(...BX,...hA)],className:{2:"keyword"}},s={match:Ft(/\./,Or(...ny)),relevance:0},o=ny.filter(We=>typeof We=="string").concat(["_|0"]),u=ny.filter(We=>typeof We!="string").concat(UX).map(X1),d={variants:[{className:"keyword",match:Or(...u,...hA)}]},f={$pattern:Or(/\b\w+/,/#\w+/),keyword:o.concat(FX),literal:mA},m=[a,s,d],p={match:Ft(/\./,Or(...pA)),relevance:0},b={className:"built_in",match:Ft(/\b/,Or(...pA),/(?=\()/)},x=[p,b],E={match:/->/,relevance:0},_={className:"operator",relevance:0,variants:[{match:ry},{match:`\\.(\\.|${KR})+`}]},S=[E,_],T="([0-9]_*)+",C="([0-9a-fA-F]_*)+",A={className:"number",relevance:0,variants:[{match:`\\b(${T})(\\.(${T}))?([eE][+-]?(${T}))?\\b`},{match:`\\b0x(${C})(\\.(${C}))?([pP][+-]?(${T}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},k=(We="")=>({className:"subst",variants:[{match:Ft(/\\/,We,/[0\\tnr"']/)},{match:Ft(/\\/,We,/u\{[0-9a-fA-F]{1,8}\}/)}]}),I=(We="")=>({className:"subst",match:Ft(/\\/,We,/[\t ]*(?:[\r\n]|\r\n)/)}),O=(We="")=>({className:"subst",label:"interpol",begin:Ft(/\\/,We,/\(/),end:/\)/}),j=(We="")=>({begin:Ft(We,/"""/),end:Ft(/"""/,We),contains:[k(We),I(We),O(We)]}),H=(We="")=>({begin:Ft(We,/"/),end:Ft(/"/,We),contains:[k(We),O(We)]}),z={className:"string",variants:[j(),j("#"),j("##"),j("###"),H(),H("#"),H("##"),H("###")]},D=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],V={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:D},q=We=>{const cn=Ft(We,/\//),Un=Ft(/\//,We);return{begin:cn,end:Un,contains:[...D,{scope:"comment",begin:`#(?!.*${Un})`,end:/$/}]}},ae={scope:"regexp",variants:[q("###"),q("##"),q("#"),V]},Q={match:Ft(/`/,mi,/`/)},W={className:"variable",match:/\$\d+/},G={className:"variable",match:`\\$${pp}+`},F=[Q,W,G],$={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:$X,contains:[...S,A,z]}]}},K={scope:"keyword",match:Ft(/@/,Or(...HX),xd(Or(/\(/,/\s+/)))},L={scope:"meta",match:Ft(/@/,mi)},P=[$,K,L],ee={match:xd(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Ft(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,pp,"+")},{className:"type",match:Tm,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Ft(/\s+&\s+/,xd(Tm)),relevance:0}]},M={begin:/</,end:/>/,keywords:f,contains:[...r,...m,...P,E,ee]};ee.contains.push(M);const de={match:Ft(mi,/\s*:/),keywords:"_|0",relevance:0},_e={begin:/\(/,end:/\)/,relevance:0,keywords:f,contains:["self",de,...r,ae,...m,...x,...S,A,z,...F,...P,ee]},U={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,ee]},he={begin:Or(xd(Ft(mi,/\s*:/)),xd(Ft(mi,/\s+/,mi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:mi}]},Oe={begin:/\(/,end:/\)/,keywords:f,contains:[he,...r,...m,...S,A,z,...P,ee,_e],endsParent:!0,illegal:/["']/},pe={match:[/(func|macro)/,/\s+/,Or(Q.match,mi,ry)],className:{1:"keyword",3:"title.function"},contains:[U,Oe,t],illegal:[/\[/,/%/]},De={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[U,Oe,t],illegal:/\[|%/},je={match:[/operator/,/\s+/,ry],className:{1:"keyword",3:"title"}},Ee={begin:[/precedencegroup/,/\s+/,Tm],className:{1:"keyword",3:"title"},contains:[ee],keywords:[...zX,...mA],end:/}/},It={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},nt={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},ze={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,mi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:f,contains:[U,...m,{begin:/:/,end:/\{/,keywords:f,contains:[{scope:"title.class.inherited",match:Tm},...m],relevance:0}]};for(const We of z.variants){const cn=We.contains.find(jr=>jr.label==="interpol");cn.keywords=f;const Un=[...m,...x,...S,A,z,...F];cn.contains=[...Un,{begin:/\(/,end:/\)/,contains:["self",...Un]}]}return{name:"Swift",keywords:f,contains:[...r,pe,De,It,nt,ze,je,Ee,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},ae,...m,...x,...S,A,z,...F,...P,ee,_e]}}const gp="[A-Za-z$_][0-9A-Za-z$_]*",WR=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],XR=["true","false","null","undefined","NaN","Infinity"],QR=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ZR=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],JR=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],eM=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],tM=[].concat(JR,QR,ZR);function qX(e){const t=e.regex,n=($,{after:K})=>{const L="</"+$[0].slice(1);return $.input.indexOf(L,K)!==-1},r=gp,a={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:($,K)=>{const L=$[0].length+$.index,P=$.input[L];if(P==="<"||P===","){K.ignoreMatch();return}P===">"&&(n($,{after:L})||K.ignoreMatch());let ee;const M=$.input.substring(L);if(ee=M.match(/^\s*=/)){K.ignoreMatch();return}if((ee=M.match(/^\s+extends\s+/))&&ee.index===0){K.ignoreMatch();return}}},u={$pattern:gp,keyword:WR,literal:XR,built_in:tM,"variable.language":eM},d="[0-9](_?[0-9])*",f=`\\.(${d})`,m="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",p={className:"number",variants:[{begin:`(\\b(${m})((${f})|\\.)?|(${f}))[eE][+-]?(${d})\\b`},{begin:`\\b(${m})\\b((${f})\\b|\\.)?|(${f})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},b={className:"subst",begin:"\\$\\{",end:"\\}",keywords:u,contains:[]},x={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"css"}},_={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},S={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,b]},C={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},A=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,E,_,S,{match:/\$\d+/},p];b.contains=A.concat({begin:/\{/,end:/\}/,keywords:u,contains:["self"].concat(A)});const k=[].concat(C,b.contains),I=k.concat([{begin:/(\s*)\(/,end:/\)/,keywords:u,contains:["self"].concat(k)}]),O={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:I},j={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},H={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...QR,...ZR]}},z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},D={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[O],illegal:/%/},V={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function q($){return t.concat("(?!",$.join("|"),")")}const ae={match:t.concat(/\b/,q([...JR,"super","import"].map($=>`${$}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Q={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},W={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},O]},G="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",F={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(G)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[O]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:u,exports:{PARAMS_CONTAINS:I,CLASS_REFERENCE:H},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),z,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,E,_,S,C,{match:/\$\d+/},p,H,{scope:"attr",match:r+t.lookahead(":"),relevance:0},F,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[C,e.REGEXP_MODE,{className:"function",begin:G,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:I}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:a.begin,end:a.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},D,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[O,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},Q,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[O]},ae,V,j,W,{match:/\$[(.]/}]}}function GX(e){const t=e.regex,n=qX(e),r=gp,a=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:a},contains:[n.exports.CLASS_REFERENCE]},u={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},d=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],f={$pattern:gp,keyword:WR.concat(d),literal:XR,built_in:tM.concat(a),"variable.language":eM},m={className:"meta",begin:"@"+r},p=(_,S,T)=>{const C=_.contains.findIndex(A=>A.label===S);if(C===-1)throw new Error("can not find mode to replace");_.contains.splice(C,1,T)};Object.assign(n.keywords,f),n.exports.PARAMS_CONTAINS.push(m);const b=n.contains.find(_=>_.scope==="attr"),x=Object.assign({},b,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,b,x]),n.contains=n.contains.concat([m,s,o,x]),p(n,"shebang",e.SHEBANG()),p(n,"use_strict",u);const E=n.contains.find(_=>_.label==="func.def");return E.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function KX(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},a=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,u=/\d{1,2}(:\d{1,2}){1,2}/,d={className:"literal",variants:[{begin:t.concat(/# */,t.either(s,a),/ *#/)},{begin:t.concat(/# */,u,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(s,a),/ +/,t.either(o,u),/ *#/)}]},f={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},m={className:"label",begin:/^\w+:/},p=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),b=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,d,f,m,p,b,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[b]}]}}function VX(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],a={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},u={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},d={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},f={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,o,a,e.QUOTE_STRING_MODE,d,f,u]}}function WX(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,a={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(s,{begin:/\(/,end:/\)/}),u=e.inherit(e.APOS_STRING_MODE,{className:"string"}),d=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),f={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[a]},{begin:/'/,end:/'/,contains:[a]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,d,u,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,o,d,u]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},a,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[d]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[f],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[f],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:f}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function XX(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},a={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,a]},u=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),b={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},x={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},E={begin:/\{/,end:/\}/,contains:[x],illegal:"\\n",relevance:0},_={begin:"\\[",end:"\\]",contains:[x],illegal:"\\n",relevance:0},S=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},b,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},E,_,s,o],T=[...S];return T.pop(),T.push(u),x.contains=T,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:S}}const QX={arduino:RW,bash:MW,c:DW,cpp:jW,csharp:LW,css:qW,diff:GW,go:KW,graphql:VW,ini:WW,java:XW,javascript:tX,json:nX,kotlin:aX,less:fX,lua:hX,makefile:mX,markdown:pX,objectivec:gX,perl:bX,php:xX,"php-template":yX,plaintext:vX,python:EX,"python-repl":_X,r:NX,ruby:TX,rust:SX,scss:DX,shell:jX,sql:LX,swift:YX,typescript:GX,vbnet:KX,wasm:VX,xml:WX,yaml:XX};var ay,gA;function ZX(){if(gA)return ay;gA=1;function e(te){return te instanceof Map?te.clear=te.delete=te.set=function(){throw new Error("map is read-only")}:te instanceof Set&&(te.add=te.clear=te.delete=function(){throw new Error("set is read-only")}),Object.freeze(te),Object.getOwnPropertyNames(te).forEach(xe=>{const Me=te[xe],rt=typeof Me;(rt==="object"||rt==="function")&&!Object.isFrozen(Me)&&e(Me)}),te}class t{constructor(xe){xe.data===void 0&&(xe.data={}),this.data=xe.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(te){return te.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(te,...xe){const Me=Object.create(null);for(const rt in te)Me[rt]=te[rt];return xe.forEach(function(rt){for(const Xt in rt)Me[Xt]=rt[Xt]}),Me}const a="</span>",s=te=>!!te.scope,o=(te,{prefix:xe})=>{if(te.startsWith("language:"))return te.replace("language:","language-");if(te.includes(".")){const Me=te.split(".");return[`${xe}${Me.shift()}`,...Me.map((rt,Xt)=>`${rt}${"_".repeat(Xt+1)}`)].join(" ")}return`${xe}${te}`};class u{constructor(xe,Me){this.buffer="",this.classPrefix=Me.classPrefix,xe.walk(this)}addText(xe){this.buffer+=n(xe)}openNode(xe){if(!s(xe))return;const Me=o(xe.scope,{prefix:this.classPrefix});this.span(Me)}closeNode(xe){s(xe)&&(this.buffer+=a)}value(){return this.buffer}span(xe){this.buffer+=`<span class="${xe}">`}}const d=(te={})=>{const xe={children:[]};return Object.assign(xe,te),xe};class f{constructor(){this.rootNode=d(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(xe){this.top.children.push(xe)}openNode(xe){const Me=d({scope:xe});this.add(Me),this.stack.push(Me)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(xe){return this.constructor._walk(xe,this.rootNode)}static _walk(xe,Me){return typeof Me=="string"?xe.addText(Me):Me.children&&(xe.openNode(Me),Me.children.forEach(rt=>this._walk(xe,rt)),xe.closeNode(Me)),xe}static _collapse(xe){typeof xe!="string"&&xe.children&&(xe.children.every(Me=>typeof Me=="string")?xe.children=[xe.children.join("")]:xe.children.forEach(Me=>{f._collapse(Me)}))}}class m extends f{constructor(xe){super(),this.options=xe}addText(xe){xe!==""&&this.add(xe)}startScope(xe){this.openNode(xe)}endScope(){this.closeNode()}__addSublanguage(xe,Me){const rt=xe.root;Me&&(rt.scope=`language:${Me}`),this.add(rt)}toHTML(){return new u(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function p(te){return te?typeof te=="string"?te:te.source:null}function b(te){return _("(?=",te,")")}function x(te){return _("(?:",te,")*")}function E(te){return _("(?:",te,")?")}function _(...te){return te.map(Me=>p(Me)).join("")}function S(te){const xe=te[te.length-1];return typeof xe=="object"&&xe.constructor===Object?(te.splice(te.length-1,1),xe):{}}function T(...te){return"("+(S(te).capture?"":"?:")+te.map(rt=>p(rt)).join("|")+")"}function C(te){return new RegExp(te.toString()+"|").exec("").length-1}function A(te,xe){const Me=te&&te.exec(xe);return Me&&Me.index===0}const k=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function I(te,{joinWith:xe}){let Me=0;return te.map(rt=>{Me+=1;const Xt=Me;let Ht=p(rt),He="";for(;Ht.length>0;){const Pe=k.exec(Ht);if(!Pe){He+=Ht;break}He+=Ht.substring(0,Pe.index),Ht=Ht.substring(Pe.index+Pe[0].length),Pe[0][0]==="\\"&&Pe[1]?He+="\\"+String(Number(Pe[1])+Xt):(He+=Pe[0],Pe[0]==="("&&Me++)}return He}).map(rt=>`(${rt})`).join(xe)}const O=/\b\B/,j="[a-zA-Z]\\w*",H="[a-zA-Z_]\\w*",z="\\b\\d+(\\.\\d+)?",D="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",V="\\b(0b[01]+)",q="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ae=(te={})=>{const xe=/^#![ ]*\//;return te.binary&&(te.begin=_(xe,/.*\b/,te.binary,/\b.*/)),r({scope:"meta",begin:xe,end:/$/,relevance:0,"on:begin":(Me,rt)=>{Me.index!==0&&rt.ignoreMatch()}},te)},Q={begin:"\\\\[\\s\\S]",relevance:0},W={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Q]},G={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Q]},F={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},$=function(te,xe,Me={}){const rt=r({scope:"comment",begin:te,end:xe,contains:[]},Me);rt.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Xt=T("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return rt.contains.push({begin:_(/[ ]+/,"(",Xt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),rt},K=$("//","$"),L=$("/\\*","\\*/"),P=$("#","$"),ee={scope:"number",begin:z,relevance:0},M={scope:"number",begin:D,relevance:0},de={scope:"number",begin:V,relevance:0},_e={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Q,{begin:/\[/,end:/\]/,relevance:0,contains:[Q]}]},U={scope:"title",begin:j,relevance:0},he={scope:"title",begin:H,relevance:0},Oe={begin:"\\.\\s*"+H,relevance:0};var De=Object.freeze({__proto__:null,APOS_STRING_MODE:W,BACKSLASH_ESCAPE:Q,BINARY_NUMBER_MODE:de,BINARY_NUMBER_RE:V,COMMENT:$,C_BLOCK_COMMENT_MODE:L,C_LINE_COMMENT_MODE:K,C_NUMBER_MODE:M,C_NUMBER_RE:D,END_SAME_AS_BEGIN:function(te){return Object.assign(te,{"on:begin":(xe,Me)=>{Me.data._beginMatch=xe[1]},"on:end":(xe,Me)=>{Me.data._beginMatch!==xe[1]&&Me.ignoreMatch()}})},HASH_COMMENT_MODE:P,IDENT_RE:j,MATCH_NOTHING_RE:O,METHOD_GUARD:Oe,NUMBER_MODE:ee,NUMBER_RE:z,PHRASAL_WORDS_MODE:F,QUOTE_STRING_MODE:G,REGEXP_MODE:_e,RE_STARTERS_RE:q,SHEBANG:ae,TITLE_MODE:U,UNDERSCORE_IDENT_RE:H,UNDERSCORE_TITLE_MODE:he});function je(te,xe){te.input[te.index-1]==="."&&xe.ignoreMatch()}function Ee(te,xe){te.className!==void 0&&(te.scope=te.className,delete te.className)}function It(te,xe){xe&&te.beginKeywords&&(te.begin="\\b("+te.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",te.__beforeBegin=je,te.keywords=te.keywords||te.beginKeywords,delete te.beginKeywords,te.relevance===void 0&&(te.relevance=0))}function nt(te,xe){Array.isArray(te.illegal)&&(te.illegal=T(...te.illegal))}function ze(te,xe){if(te.match){if(te.begin||te.end)throw new Error("begin & end are not supported with match");te.begin=te.match,delete te.match}}function We(te,xe){te.relevance===void 0&&(te.relevance=1)}const cn=(te,xe)=>{if(!te.beforeMatch)return;if(te.starts)throw new Error("beforeMatch cannot be used with starts");const Me=Object.assign({},te);Object.keys(te).forEach(rt=>{delete te[rt]}),te.keywords=Me.keywords,te.begin=_(Me.beforeMatch,b(Me.begin)),te.starts={relevance:0,contains:[Object.assign(Me,{endsParent:!0})]},te.relevance=0,delete Me.beforeMatch},Un=["of","and","for","in","not","or","if","then","parent","list","value"],jr="keyword";function Fa(te,xe,Me=jr){const rt=Object.create(null);return typeof te=="string"?Xt(Me,te.split(" ")):Array.isArray(te)?Xt(Me,te):Object.keys(te).forEach(function(Ht){Object.assign(rt,Fa(te[Ht],xe,Ht))}),rt;function Xt(Ht,He){xe&&(He=He.map(Pe=>Pe.toLowerCase())),He.forEach(function(Pe){const tt=Pe.split("|");rt[tt[0]]=[Ht,Ne(tt[0],tt[1])]})}}function Ne(te,xe){return xe?Number(xe):vt(te)?0:1}function vt(te){return Un.includes(te.toLowerCase())}const ta={},Vt=te=>{console.error(te)},Ol=(te,...xe)=>{console.log(`WARN: ${te}`,...xe)},ge=(te,xe)=>{ta[`${te}/${xe}`]||(console.log(`Deprecated as of ${te}. ${xe}`),ta[`${te}/${xe}`]=!0)},ke=new Error;function Qe(te,xe,{key:Me}){let rt=0;const Xt=te[Me],Ht={},He={};for(let Pe=1;Pe<=xe.length;Pe++)He[Pe+rt]=Xt[Pe],Ht[Pe+rt]=!0,rt+=C(xe[Pe-1]);te[Me]=He,te[Me]._emit=Ht,te[Me]._multi=!0}function ct(te){if(Array.isArray(te.begin)){if(te.skip||te.excludeBegin||te.returnBegin)throw Vt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ke;if(typeof te.beginScope!="object"||te.beginScope===null)throw Vt("beginScope must be object"),ke;Qe(te,te.begin,{key:"beginScope"}),te.begin=I(te.begin,{joinWith:""})}}function St(te){if(Array.isArray(te.end)){if(te.skip||te.excludeEnd||te.returnEnd)throw Vt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ke;if(typeof te.endScope!="object"||te.endScope===null)throw Vt("endScope must be object"),ke;Qe(te,te.end,{key:"endScope"}),te.end=I(te.end,{joinWith:""})}}function Sr(te){te.scope&&typeof te.scope=="object"&&te.scope!==null&&(te.beginScope=te.scope,delete te.scope)}function Ha(te){Sr(te),typeof te.beginScope=="string"&&(te.beginScope={_wrap:te.beginScope}),typeof te.endScope=="string"&&(te.endScope={_wrap:te.endScope}),ct(te),St(te)}function Qn(te){function xe(He,Pe){return new RegExp(p(He),"m"+(te.case_insensitive?"i":"")+(te.unicodeRegex?"u":"")+(Pe?"g":""))}class Me{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Pe,tt){tt.position=this.position++,this.matchIndexes[this.matchAt]=tt,this.regexes.push([tt,Pe]),this.matchAt+=C(Pe)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Pe=this.regexes.map(tt=>tt[1]);this.matcherRe=xe(I(Pe,{joinWith:"|"}),!0),this.lastIndex=0}exec(Pe){this.matcherRe.lastIndex=this.lastIndex;const tt=this.matcherRe.exec(Pe);if(!tt)return null;const bn=tt.findIndex((ki,Rl)=>Rl>0&&ki!==void 0),tn=this.matchIndexes[bn];return tt.splice(0,bn),Object.assign(tt,tn)}}class rt{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Pe){if(this.multiRegexes[Pe])return this.multiRegexes[Pe];const tt=new Me;return this.rules.slice(Pe).forEach(([bn,tn])=>tt.addRule(bn,tn)),tt.compile(),this.multiRegexes[Pe]=tt,tt}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Pe,tt){this.rules.push([Pe,tt]),tt.type==="begin"&&this.count++}exec(Pe){const tt=this.getMatcher(this.regexIndex);tt.lastIndex=this.lastIndex;let bn=tt.exec(Pe);if(this.resumingScanAtSamePosition()&&!(bn&&bn.index===this.lastIndex)){const tn=this.getMatcher(0);tn.lastIndex=this.lastIndex+1,bn=tn.exec(Pe)}return bn&&(this.regexIndex+=bn.position+1,this.regexIndex===this.count&&this.considerAll()),bn}}function Xt(He){const Pe=new rt;return He.contains.forEach(tt=>Pe.addRule(tt.begin,{rule:tt,type:"begin"})),He.terminatorEnd&&Pe.addRule(He.terminatorEnd,{type:"end"}),He.illegal&&Pe.addRule(He.illegal,{type:"illegal"}),Pe}function Ht(He,Pe){const tt=He;if(He.isCompiled)return tt;[Ee,ze,Ha,cn].forEach(tn=>tn(He,Pe)),te.compilerExtensions.forEach(tn=>tn(He,Pe)),He.__beforeBegin=null,[It,nt,We].forEach(tn=>tn(He,Pe)),He.isCompiled=!0;let bn=null;return typeof He.keywords=="object"&&He.keywords.$pattern&&(He.keywords=Object.assign({},He.keywords),bn=He.keywords.$pattern,delete He.keywords.$pattern),bn=bn||/\w+/,He.keywords&&(He.keywords=Fa(He.keywords,te.case_insensitive)),tt.keywordPatternRe=xe(bn,!0),Pe&&(He.begin||(He.begin=/\B|\b/),tt.beginRe=xe(tt.begin),!He.end&&!He.endsWithParent&&(He.end=/\B|\b/),He.end&&(tt.endRe=xe(tt.end)),tt.terminatorEnd=p(tt.end)||"",He.endsWithParent&&Pe.terminatorEnd&&(tt.terminatorEnd+=(He.end?"|":"")+Pe.terminatorEnd)),He.illegal&&(tt.illegalRe=xe(He.illegal)),He.contains||(He.contains=[]),He.contains=[].concat(...He.contains.map(function(tn){return cr(tn==="self"?He:tn)})),He.contains.forEach(function(tn){Ht(tn,tt)}),He.starts&&Ht(He.starts,Pe),tt.matcher=Xt(tt),tt}if(te.compilerExtensions||(te.compilerExtensions=[]),te.contains&&te.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return te.classNameAliases=r(te.classNameAliases||{}),Ht(te)}function dn(te){return te?te.endsWithParent||dn(te.starts):!1}function cr(te){return te.variants&&!te.cachedVariants&&(te.cachedVariants=te.variants.map(function(xe){return r(te,{variants:null},xe)})),te.cachedVariants?te.cachedVariants:dn(te)?r(te,{starts:te.starts?r(te.starts):null}):Object.isFrozen(te)?r(te):te}var Rt="11.11.1";class ai extends Error{constructor(xe,Me){super(xe),this.name="HTMLInjectionError",this.html=Me}}const wr=n,Jf=r,go=Symbol("nomatch"),Il=7,bo=function(te){const xe=Object.create(null),Me=Object.create(null),rt=[];let Xt=!0;const Ht="Could not find the language '{}', did you forget to load/include a language module?",He={disableAutodetect:!0,name:"Plain text",contains:[]};let Pe={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:m};function tt(we){return Pe.noHighlightRe.test(we)}function bn(we){let Ge=we.className+" ";Ge+=we.parentNode?we.parentNode.className:"";const dt=Pe.languageDetectRe.exec(Ge);if(dt){const Mt=Ar(dt[1]);return Mt||(Ol(Ht.replace("{}",dt[1])),Ol("Falling back to no-highlight mode for this block.",we)),Mt?dt[1]:"no-highlight"}return Ge.split(/\s+/).find(Mt=>tt(Mt)||Ar(Mt))}function tn(we,Ge,dt){let Mt="",yn="";typeof Ge=="object"?(Mt=we,dt=Ge.ignoreIllegals,yn=Ge.language):(ge("10.7.0","highlight(lang, code, ...args) has been deprecated."),ge("10.7.0",`Please use highlight(code, options) instead.
|
|
528
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),yn=we,Mt=Ge),dt===void 0&&(dt=!0);const fr={code:Mt,language:yn};yo("before:highlight",fr);const na=fr.result?fr.result:ki(fr.language,fr.code,dt);return na.code=fr.code,yo("after:highlight",na),na}function ki(we,Ge,dt,Mt){const yn=Object.create(null);function fr(Ie,$e){return Ie.keywords[$e]}function na(){if(!Je.keywords){Sn.addText(Dt);return}let Ie=0;Je.keywordPatternRe.lastIndex=0;let $e=Je.keywordPatternRe.exec(Dt),ot="";for(;$e;){ot+=Dt.substring(Ie,$e.index);const gt=Zn.case_insensitive?$e[0].toLowerCase():$e[0],ln=fr(Je,gt);if(ln){const[ya,Nc]=ln;if(Sn.addText(ot),ot="",yn[gt]=(yn[gt]||0)+1,yn[gt]<=Il&&(Ts+=Nc),ya.startsWith("_"))ot+=$e[0];else{const sh=Zn.classNameAliases[ya]||ya;ra($e[0],sh)}}else ot+=$e[0];Ie=Je.keywordPatternRe.lastIndex,$e=Je.keywordPatternRe.exec(Dt)}ot+=Dt.substring(Ie),Sn.addText(ot)}function Pr(){if(Dt==="")return;let Ie=null;if(typeof Je.subLanguage=="string"){if(!xe[Je.subLanguage]){Sn.addText(Dt);return}Ie=ki(Je.subLanguage,Dt,!0,ih[Je.subLanguage]),ih[Je.subLanguage]=Ie._top}else Ie=Ml(Dt,Je.subLanguage.length?Je.subLanguage:null);Je.relevance>0&&(Ts+=Ie.relevance),Sn.__addSublanguage(Ie._emitter,Ie.language)}function Wt(){Je.subLanguage!=null?Pr():na(),Dt=""}function ra(Ie,$e){Ie!==""&&(Sn.startScope($e),Sn.addText(Ie),Sn.endScope())}function rh(Ie,$e){let ot=1;const gt=$e.length-1;for(;ot<=gt;){if(!Ie._emit[ot]){ot++;continue}const ln=Zn.classNameAliases[Ie[ot]]||Ie[ot],ya=$e[ot];ln?ra(ya,ln):(Dt=ya,na(),Dt=""),ot++}}function jl(Ie,$e){return Ie.scope&&typeof Ie.scope=="string"&&Sn.openNode(Zn.classNameAliases[Ie.scope]||Ie.scope),Ie.beginScope&&(Ie.beginScope._wrap?(ra(Dt,Zn.classNameAliases[Ie.beginScope._wrap]||Ie.beginScope._wrap),Dt=""):Ie.beginScope._multi&&(rh(Ie.beginScope,$e),Dt="")),Je=Object.create(Ie,{parent:{value:Je}}),Je}function vc(Ie,$e,ot){let gt=A(Ie.endRe,ot);if(gt){if(Ie["on:end"]){const ln=new t(Ie);Ie["on:end"]($e,ln),ln.isMatchIgnored&&(gt=!1)}if(gt){for(;Ie.endsParent&&Ie.parent;)Ie=Ie.parent;return Ie}}if(Ie.endsWithParent)return vc(Ie.parent,$e,ot)}function Ll(Ie){return Je.matcher.regexIndex===0?(Dt+=Ie[0],1):(Ss=!0,0)}function vg(Ie){const $e=Ie[0],ot=Ie.rule,gt=new t(ot),ln=[ot.__beforeBegin,ot["on:begin"]];for(const ya of ln)if(ya&&(ya(Ie,gt),gt.isMatchIgnored))return Ll($e);return ot.skip?Dt+=$e:(ot.excludeBegin&&(Dt+=$e),Wt(),!ot.returnBegin&&!ot.excludeBegin&&(Dt=$e)),jl(ot,Ie),ot.returnBegin?0:$e.length}function Br(Ie){const $e=Ie[0],ot=Ge.substring(Ie.index),gt=vc(Je,Ie,ot);if(!gt)return go;const ln=Je;Je.endScope&&Je.endScope._wrap?(Wt(),ra($e,Je.endScope._wrap)):Je.endScope&&Je.endScope._multi?(Wt(),rh(Je.endScope,Ie)):ln.skip?Dt+=$e:(ln.returnEnd||ln.excludeEnd||(Dt+=$e),Wt(),ln.excludeEnd&&(Dt=$e));do Je.scope&&Sn.closeNode(),!Je.skip&&!Je.subLanguage&&(Ts+=Je.relevance),Je=Je.parent;while(Je!==gt.parent);return gt.starts&&jl(gt.starts,Ie),ln.returnEnd?0:$e.length}function Ec(){const Ie=[];for(let $e=Je;$e!==Zn;$e=$e.parent)$e.scope&&Ie.unshift($e.scope);Ie.forEach($e=>Sn.openNode($e))}let vo={};function Pl(Ie,$e){const ot=$e&&$e[0];if(Dt+=Ie,ot==null)return Wt(),0;if(vo.type==="begin"&&$e.type==="end"&&vo.index===$e.index&&ot===""){if(Dt+=Ge.slice($e.index,$e.index+1),!Xt){const gt=new Error(`0 width match regex (${we})`);throw gt.languageName=we,gt.badRule=vo.rule,gt}return 1}if(vo=$e,$e.type==="begin")return vg($e);if($e.type==="illegal"&&!dt){const gt=new Error('Illegal lexeme "'+ot+'" for mode "'+(Je.scope||"<unnamed>")+'"');throw gt.mode=Je,gt}else if($e.type==="end"){const gt=Br($e);if(gt!==go)return gt}if($e.type==="illegal"&&ot==="")return Dt+=`
|
|
529
|
+
`,1;if(_c>1e5&&_c>$e.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Dt+=ot,ot.length}const Zn=Ar(we);if(!Zn)throw Vt(Ht.replace("{}",we)),new Error('Unknown language: "'+we+'"');const ah=Qn(Zn);let Bl="",Je=Mt||ah;const ih={},Sn=new Pe.__emitter(Pe);Ec();let Dt="",Ts=0,Ri=0,_c=0,Ss=!1;try{if(Zn.__emitTokens)Zn.__emitTokens(Ge,Sn);else{for(Je.matcher.considerAll();;){_c++,Ss?Ss=!1:Je.matcher.considerAll(),Je.matcher.lastIndex=Ri;const Ie=Je.matcher.exec(Ge);if(!Ie)break;const $e=Ge.substring(Ri,Ie.index),ot=Pl($e,Ie);Ri=Ie.index+ot}Pl(Ge.substring(Ri))}return Sn.finalize(),Bl=Sn.toHTML(),{language:we,value:Bl,relevance:Ts,illegal:!1,_emitter:Sn,_top:Je}}catch(Ie){if(Ie.message&&Ie.message.includes("Illegal"))return{language:we,value:wr(Ge),illegal:!0,relevance:0,_illegalBy:{message:Ie.message,index:Ri,context:Ge.slice(Ri-100,Ri+100),mode:Ie.mode,resultSoFar:Bl},_emitter:Sn};if(Xt)return{language:we,value:wr(Ge),illegal:!1,relevance:0,errorRaised:Ie,_emitter:Sn,_top:Je};throw Ie}}function Rl(we){const Ge={value:wr(we),illegal:!1,relevance:0,_top:He,_emitter:new Pe.__emitter(Pe)};return Ge._emitter.addText(we),Ge}function Ml(we,Ge){Ge=Ge||Pe.languages||Object.keys(xe);const dt=Rl(we),Mt=Ge.filter(Ar).filter(_s).map(Wt=>ki(Wt,we,!1));Mt.unshift(dt);const yn=Mt.sort((Wt,ra)=>{if(Wt.relevance!==ra.relevance)return ra.relevance-Wt.relevance;if(Wt.language&&ra.language){if(Ar(Wt.language).supersetOf===ra.language)return 1;if(Ar(ra.language).supersetOf===Wt.language)return-1}return 0}),[fr,na]=yn,Pr=fr;return Pr.secondBest=na,Pr}function ii(we,Ge,dt){const Mt=Ge&&Me[Ge]||dt;we.classList.add("hljs"),we.classList.add(`language-${Mt}`)}function xn(we){let Ge=null;const dt=bn(we);if(tt(dt))return;if(yo("before:highlightElement",{el:we,language:dt}),we.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",we);return}if(we.children.length>0&&(Pe.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(we)),Pe.throwUnescapedHTML))throw new ai("One of your code blocks includes unescaped HTML.",we.innerHTML);Ge=we;const Mt=Ge.textContent,yn=dt?tn(Mt,{language:dt,ignoreIllegals:!0}):Ml(Mt);we.innerHTML=yn.value,we.dataset.highlighted="yes",ii(we,dt,yn.language),we.result={language:yn.language,re:yn.relevance,relevance:yn.relevance},yn.secondBest&&(we.secondBest={language:yn.secondBest.language,relevance:yn.secondBest.relevance}),yo("after:highlightElement",{el:we,result:yn,text:Mt})}function dr(we){Pe=Jf(Pe,we)}const Es=()=>{Dl(),ge("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function xc(){Dl(),ge("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let eh=!1;function Dl(){function we(){Dl()}if(document.readyState==="loading"){eh||window.addEventListener("DOMContentLoaded",we,!1),eh=!0;return}document.querySelectorAll(Pe.cssSelector).forEach(xn)}function th(we,Ge){let dt=null;try{dt=Ge(te)}catch(Mt){if(Vt("Language definition for '{}' could not be registered.".replace("{}",we)),Xt)Vt(Mt);else throw Mt;dt=He}dt.name||(dt.name=we),xe[we]=dt,dt.rawDefinition=Ge.bind(null,te),dt.aliases&&Oi(dt.aliases,{languageName:we})}function xo(we){delete xe[we];for(const Ge of Object.keys(Me))Me[Ge]===we&&delete Me[Ge]}function yc(){return Object.keys(xe)}function Ar(we){return we=(we||"").toLowerCase(),xe[we]||xe[Me[we]]}function Oi(we,{languageName:Ge}){typeof we=="string"&&(we=[we]),we.forEach(dt=>{Me[dt.toLowerCase()]=Ge})}function _s(we){const Ge=Ar(we);return Ge&&!Ge.disableAutodetect}function Ns(we){we["before:highlightBlock"]&&!we["before:highlightElement"]&&(we["before:highlightElement"]=Ge=>{we["before:highlightBlock"](Object.assign({block:Ge.el},Ge))}),we["after:highlightBlock"]&&!we["after:highlightElement"]&&(we["after:highlightElement"]=Ge=>{we["after:highlightBlock"](Object.assign({block:Ge.el},Ge))})}function Tn(we){Ns(we),rt.push(we)}function nh(we){const Ge=rt.indexOf(we);Ge!==-1&&rt.splice(Ge,1)}function yo(we,Ge){const dt=we;rt.forEach(function(Mt){Mt[dt]&&Mt[dt](Ge)})}function Ii(we){return ge("10.7.0","highlightBlock will be removed entirely in v12.0"),ge("10.7.0","Please use highlightElement now."),xn(we)}Object.assign(te,{highlight:tn,highlightAuto:Ml,highlightAll:Dl,highlightElement:xn,highlightBlock:Ii,configure:dr,initHighlighting:Es,initHighlightingOnLoad:xc,registerLanguage:th,unregisterLanguage:xo,listLanguages:yc,getLanguage:Ar,registerAliases:Oi,autoDetection:_s,inherit:Jf,addPlugin:Tn,removePlugin:nh}),te.debugMode=function(){Xt=!1},te.safeMode=function(){Xt=!0},te.versionString=Rt,te.regex={concat:_,lookahead:b,either:T,optional:E,anyNumberOfTimes:x};for(const we in De)typeof De[we]=="object"&&e(De[we]);return Object.assign(te,De),te},Lr=bo({});return Lr.newInstance=()=>bo({}),ay=Lr,Lr.HighlightJS=Lr,Lr.default=Lr,ay}var JX=ZX();const eQ=yf(JX),bA={},tQ="hljs-";function nQ(e){const t=eQ.newInstance();return e&&s(e),{highlight:n,highlightAuto:r,listLanguages:a,register:s,registerAlias:o,registered:u};function n(d,f,m){const p=m||bA,b=typeof p.prefix=="string"?p.prefix:tQ;if(!t.getLanguage(d))throw new Error("Unknown language: `"+d+"` is not registered");t.configure({__emitter:rQ,classPrefix:b});const x=t.highlight(f,{ignoreIllegals:!0,language:d});if(x.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:x.errorRaised});const E=x._emitter.root,_=E.data;return _.language=x.language,_.relevance=x.relevance,E}function r(d,f){const p=(f||bA).subset||a();let b=-1,x=0,E;for(;++b<p.length;){const _=p[b];if(!t.getLanguage(_))continue;const S=n(_,d,f);S.data&&S.data.relevance!==void 0&&S.data.relevance>x&&(x=S.data.relevance,E=S)}return E||{type:"root",children:[],data:{language:void 0,relevance:x}}}function a(){return t.listLanguages()}function s(d,f){if(typeof d=="string")t.registerLanguage(d,f);else{let m;for(m in d)Object.hasOwn(d,m)&&t.registerLanguage(m,d[m])}}function o(d,f){if(typeof d=="string")t.registerAliases(typeof f=="string"?f:[...f],{languageName:d});else{let m;for(m in d)if(Object.hasOwn(d,m)){const p=d[m];t.registerAliases(typeof p=="string"?p:[...p],{languageName:m})}}}function u(d){return!!t.getLanguage(d)}}class rQ{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],a=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:a}):r.children.push(...a)}openNode(t){const n=this,r=t.split(".").map(function(o,u){return u?o+"_".repeat(u):n.options.classPrefix+o}),a=this.stack[this.stack.length-1],s={type:"element",tagName:"span",properties:{className:r},children:[]};a.children.push(s),this.stack.push(s)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const aQ={};function iQ(e){const t=e||aQ,n=t.aliases,r=t.detect||!1,a=t.languages||QX,s=t.plainText,o=t.prefix,u=t.subset;let d="hljs";const f=nQ(a);if(n&&f.registerAlias(n),o){const m=o.indexOf("-");d=m===-1?o:o.slice(0,m)}return function(m,p){If(m,"element",function(b,x,E){if(b.tagName!=="code"||!E||E.type!=="element"||E.tagName!=="pre")return;const _=sQ(b);if(_===!1||!_&&!r||_&&s&&s.includes(_))return;Array.isArray(b.properties.className)||(b.properties.className=[]),b.properties.className.includes(d)||b.properties.className.unshift(d);const S=TW(b,{whitespace:"pre"});let T;try{T=_?f.highlight(_,S,{prefix:o}):f.highlightAuto(S,{prefix:o,subset:u})}catch(C){const A=C;if(_&&/Unknown language/.test(A.message)){p.message("Cannot highlight as `"+_+"`, it’s not registered",{ancestors:[E,b],cause:A,place:b.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw A}!_&&T.data&&T.data.language&&b.properties.className.push("language-"+T.data.language),T.children.length>0&&(b.children=T.children)})}}function sQ(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){const a=String(t[n]);if(a==="no-highlight"||a==="nohighlight")return!1;!r&&a.slice(0,5)==="lang-"&&(r=a.slice(5)),!r&&a.slice(0,9)==="language-"&&(r=a.slice(9))}return r}function oQ(e){const[t,n]=v.useState("fit"),r=t==="wide";return c.jsxs("div",{className:`md-table-wrap ${r?"md-table-wide":"md-table-fit"}`,children:[c.jsxs("button",{type:"button",className:"md-table-toggle",title:r?"适应屏幕":"超宽展开",onClick:()=>n(r?"fit":"wide"),children:[r?c.jsx(B7,{className:"h-3 w-3"}):c.jsx(A7,{className:"h-3 w-3"}),c.jsx("span",{children:r?"适应屏幕":"超宽展开"})]}),c.jsx("div",{className:"md-table-scroll",children:c.jsx("table",{...e})})]})}function lQ({q:e,pending:t,selected:n,customText:r,onSelect:a,onCustomTextChange:s,onClearSelections:o,onSubmitCustom:u,isSingle:d}){const[f,m]=v.useState(!1),p=f||r.length>0;return c.jsxs("div",{className:"space-y-2",children:[e.header&&c.jsx("div",{className:"text-xs font-semibold text-fg-3",children:e.header}),c.jsx("p",{className:"text-sm text-fg-2",children:e.question}),e.options.length>0&&c.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.options.map(b=>{const x=!p&&((n==null?void 0:n.includes(b.label))??!1);return c.jsxs("button",{type:"button",disabled:!t,onClick:()=>{m(!1),s(""),a(b.label)},className:re("rounded-md border px-3 py-1.5 text-left text-xs transition-colors",x?"border-emerald-500/60 bg-emerald-500/20 text-emerald-300 ring-1 ring-emerald-500/30":t?"border-blue-500/40 bg-blue-500/10 text-blue-300 hover:bg-blue-500/20":"border-line bg-surface/50 text-fg-5 cursor-default"),children:[x&&c.jsx(yr,{className:"mr-1 inline h-3 w-3"}),c.jsx("span",{className:"font-medium",children:b.label}),b.description&&c.jsx("span",{className:"ml-1.5 text-fg-5",children:b.description})]},b.label)}),t&&c.jsxs("button",{type:"button",onClick:()=>{p?(m(!1),s("")):(m(!0),o())},className:re("rounded-md border px-3 py-1.5 text-left text-xs transition-colors",p?"border-emerald-500/60 bg-emerald-500/20 text-emerald-300 ring-1 ring-emerald-500/30":"border-dashed border-blue-500/40 text-blue-300 hover:bg-blue-500/10"),children:[p&&c.jsx(yr,{className:"mr-1 inline h-3 w-3"}),c.jsx("span",{className:"font-medium",children:"其他…"})]})]}),p&&t&&c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("input",{type:"text",value:r,onChange:b=>{s(b.target.value),b.target.value&&o()},onKeyDown:b=>{b.key==="Enter"&&r.trim()&&d&&u&&u()},placeholder:"输入自定义回复…",autoFocus:!0,className:"flex-1 rounded-md border border-blue-500/40 bg-blue-500/5 px-3 py-1.5 text-xs text-fg-1 placeholder:text-fg-5 outline-none focus:border-blue-500/60 focus:ring-1 focus:ring-blue-500/30"}),d&&c.jsx("button",{type:"button",disabled:!r.trim(),onClick:u,className:re("flex items-center gap-1 rounded-md px-3 py-1.5 text-xs font-medium transition-colors",r.trim()?"bg-emerald-600 text-white hover:bg-emerald-500":"bg-surface/50 text-fg-5 cursor-not-allowed"),children:c.jsx(Zd,{className:"h-3 w-3"})})]})]})}function uQ({part:e}){const t=EV(e),n=G1(e),r=n==="pending"||n==="running",a=Le(H=>H.activeSessionId),s=Le(H=>H.replyQuestion),o=Le(H=>H.rejectQuestion),[u,d]=v.useState(null),[f,m]=v.useState({}),[p,b]=v.useState({});if(!t||t.length===0)return null;const x=t.length===1,E=()=>{a&&gn.getState().removeToast(`question-${a}`)},_=(H,z)=>{if(!u){if(b(D=>{const{[H]:V,...q}=D;return q}),x){d("answered"),E(),s([[z]]);return}m(D=>{const V=t[H],q=D[H]??[];if(V.multiple){const ae=q.includes(z);return{...D,[H]:ae?q.filter(Q=>Q!==z):[...q,z]}}return{...D,[H]:[z]}})}},S=(H,z)=>{b(D=>{if(z)return{...D,[H]:z};const{[H]:V,...q}=D;return q})},T=H=>{m(z=>{const{[H]:D,...V}=z;return V})},C=H=>{var D;const z=(D=p[H])==null?void 0:D.trim();u||!z||(d("answered"),E(),s([[z]]))},A=t.filter((H,z)=>{var D,V;return(((D=f[z])==null?void 0:D.length)??0)>0||(((V=p[z])==null?void 0:V.trim().length)??0)>0}).length,k=!x&&A===t.length,I=()=>{if(u||!k)return;d("answered"),E();const H=t.map((z,D)=>{var q;const V=(q=p[D])==null?void 0:q.trim();return V?[V]:f[D]??[]});s(H)},O=()=>{u||(d("dismissed"),E(),o())},j=r&&!u;return c.jsxs("div",{className:re("my-1 overflow-hidden rounded-md border bg-term/70",j?"border-blue-500/40":"border-line"),children:[c.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 font-mono text-xs",children:[c.jsx(O7,{className:re("h-3.5 w-3.5 shrink-0",j?"text-blue-400":"text-fg-4")}),c.jsx("span",{className:re("font-medium",j?"text-blue-300":"text-fg-3"),children:u==="answered"?"已回复":u==="dismissed"?"已取消":j?"等待回复":"Question"}),!x&&j&&c.jsxs("span",{className:"text-fg-5",children:["(",A,"/",t.length,")"]}),j&&c.jsxs("button",{type:"button",onClick:O,className:"ml-auto flex items-center gap-1 rounded px-1.5 py-0.5 text-fg-5 transition-colors hover:bg-red-500/10 hover:text-red-400",children:[c.jsx(yt,{className:"h-3 w-3"}),c.jsx("span",{children:"取消"})]})]}),c.jsxs("div",{className:"border-t border-line px-4 py-3 space-y-3",children:[t.map((H,z)=>c.jsx(lQ,{q:H,pending:j,selected:f[z],customText:p[z]??"",onSelect:D=>_(z,D),onCustomTextChange:D=>S(z,D),onClearSelections:()=>T(z),onSubmitCustom:x?()=>C(z):void 0,isSingle:x},z)),!x&&j&&c.jsx("div",{className:"flex justify-end pt-1",children:c.jsxs("button",{type:"button",disabled:!k,onClick:I,className:re("flex items-center gap-1.5 rounded-md px-4 py-1.5 text-xs font-medium transition-colors",k?"bg-emerald-600 text-white hover:bg-emerald-500":"bg-surface/50 text-fg-5 cursor-not-allowed"),children:[c.jsx(Zd,{className:"h-3 w-3"}),c.jsx("span",{children:"提交回答"})]})})]})]})}const iy=2e3,cQ=/^.*\/\.fourth-spark\/worktrees\/[^/]+\//;function dQ(e,t){const n=cQ.exec(e);if(n)return`{worktree}/${e.slice(n[0].length)}`;if(t){const r=t.endsWith("/")?t:`${t}/`;if(e.startsWith(r))return e.slice(r.length)}return e}const fQ={read:"Read",write:"Write",edit:"Edit",patch:"Patch",grep:"Grep",glob:"Glob",bash:"Bash",shell:"Bash",list:"List",ls:"List",webfetch:"Fetch",fetch:"Fetch",task:"Task",agent:"Task",todowrite:"Todo",write_todos:"Todo",question:"Question",mcp_question:"Question"},hQ={running:{glyph:"◌",label:"running",color:"text-amber-400",accent:"border-amber-500/40",spin:!0},completed:{glyph:"✓",label:"done",color:"text-emerald-400",accent:"border-emerald-500/40",spin:!1},error:{glyph:"✗",label:"error",color:"text-red-400",accent:"border-red-500/40",spin:!1},pending:{glyph:"○",label:"queued",color:"text-fg-4",accent:"border-fg-6",spin:!1}};function S0(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function gi(e,t){if(!e)return null;for(const n of t){const r=e[n];if(typeof r=="string"&&r.trim())return r.trim()}return null}function mQ(e,t){const n=e.toLowerCase(),r=fQ[n]??e.charAt(0).toUpperCase()+e.slice(1),a=S0(t);switch(n){case"read":case"write":case"edit":case"patch":return{label:r,arg:gi(a,["filePath","path","file"])};case"grep":{const s=gi(a,["pattern","query"]);return{label:r,arg:s?`"${s}"`:null}}case"glob":return{label:r,arg:gi(a,["pattern","query"])};case"bash":case"shell":{const s=gi(a,["command","cmd","script"]);return{label:r,arg:s?s.split(`
|
|
530
|
+
`)[0]:null}}case"webfetch":case"fetch":return{label:r,arg:gi(a,["url"])};case"task":case"agent":return{label:r,arg:gi(a,["description","prompt","title"])};default:return{label:r,arg:gi(a,["filePath","path","pattern","query","command","url","description"])}}}function pQ({oldStr:e,newStr:t}){const n=e.split(`
|
|
531
|
+
`),r=t.split(`
|
|
532
|
+
`);return c.jsxs("div",{className:"grid grid-cols-1 gap-px overflow-x-auto rounded text-xs md:grid-cols-2",children:[c.jsx("pre",{className:"min-w-0 whitespace-pre-wrap break-words p-1.5 fs-diff-del",children:n.map((a,s)=>c.jsxs("div",{children:[c.jsx("span",{className:"select-none text-red-400/70",children:"− "}),c.jsx("span",{className:"text-red-400",children:a})]},s))}),c.jsx("pre",{className:"min-w-0 whitespace-pre-wrap break-words p-1.5 fs-diff-add",children:r.map((a,s)=>c.jsxs("div",{children:[c.jsx("span",{className:"select-none text-emerald-400/70",children:"+ "}),c.jsx("span",{className:"text-emerald-400",children:a})]},s))})]})}const xA={completed:{glyph:"✓",color:"text-emerald-400"},in_progress:{glyph:"◌",color:"text-amber-400"},cancelled:{glyph:"✗",color:"text-fg-5"},pending:{glyph:"○",color:"text-fg-4"}};function nM({todos:e}){return c.jsx("ul",{className:"space-y-0.5 text-xs",children:e.map((t,n)=>{var u;const r=((u=t.status)==null?void 0:u.toLowerCase())??"pending",a=r==="in-progress"||r==="active"?"in_progress":r==="done"||r==="complete"?"completed":r==="canceled"?"cancelled":r,s=xA[a]??xA.pending,o=a==="completed"||a==="cancelled";return c.jsxs("li",{className:"flex items-start gap-1.5",children:[c.jsx("span",{className:re("shrink-0 leading-5",s.color,a==="in_progress"&&"fs-spin"),children:s.glyph}),c.jsx("span",{className:re("leading-5",o?"text-fg-5 line-through":"text-fg-2"),children:t.content}),t.priority&&c.jsx("span",{className:"ml-auto shrink-0 text-fg-5",children:t.priority})]},n)})})}const gQ={"visual-engineering":"bg-purple-500/15 text-purple-400",quick:"bg-emerald-500/15 text-emerald-400",deep:"bg-blue-500/15 text-blue-400",ultrabrain:"bg-amber-500/15 text-amber-400",artistry:"bg-pink-500/15 text-pink-400",writing:"bg-cyan-500/15 text-cyan-400","unspecified-low":"bg-elevated text-fg-4","unspecified-high":"bg-elevated text-fg-3"},bQ={explore:"bg-teal-500/15 text-teal-400",librarian:"bg-indigo-500/15 text-indigo-400",oracle:"bg-amber-500/15 text-amber-400",metis:"bg-rose-500/15 text-rose-400",momus:"bg-orange-500/15 text-orange-400"};function xQ({record:e}){const[t,n]=v.useState(!1),r=typeof e.category=="string"?e.category:null,a=typeof e.subagent_type=="string"?e.subagent_type:null,s=gi(e,["description","title"]),o=typeof e.prompt=="string"?e.prompt:null,u=Array.isArray(e.load_skills)?e.load_skills.filter(b=>typeof b=="string"):[],d=typeof e.run_in_background=="boolean"?e.run_in_background:!1,f=typeof e.task_id=="string"?e.task_id:null,m=r??a,p=(r&&gQ[r])??(a&&bQ[a])??"bg-elevated text-fg-3";return c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[m&&c.jsx("span",{className:re("rounded px-1.5 py-0.5 text-[10px] font-medium",p),children:m}),u.map(b=>c.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 text-[10px] text-fg-4",children:b},b)),d&&c.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 text-[10px] text-fg-5",children:"bg"}),f&&c.jsxs("span",{className:"rounded bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",title:f,children:["↩ ",f.slice(0,16),"…"]})]}),s&&c.jsx("p",{className:"text-xs text-fg-2",children:s}),o&&c.jsxs("div",{children:[c.jsxs("button",{type:"button",onClick:()=>n(b=>!b),className:"flex items-center gap-1 text-[10px] text-fg-4 transition-colors hover:text-fg-2",children:[c.jsx(m0,{className:re("h-3 w-3 transition-transform",t&&"rotate-90")}),"Prompt",c.jsxs("span",{className:"text-fg-5",children:["(",o.length," chars)"]})]}),t&&c.jsx("pre",{className:"mt-1 max-h-60 overflow-y-auto whitespace-pre-wrap break-words rounded bg-elevated/50 p-2 text-[11px] leading-relaxed text-fg-3",children:o})]})]})}function yQ(e){const t=NV(e),n=Le(d=>d.activeSessionId),r=Le(d=>d.sessions);if(t)return t;if(!n)return null;const a=T0(e),s=S0(a),o=gi(s,["description","title"]),u=r.filter(d=>d.parentID===n);if(u.length===0)return null;if(u.length===1)return u[0].id;if(o){const d=u.find(f=>f.title===o);if(d)return d.id}return null}function vQ({part:e}){const t=yQ(e),n=Le(r=>r.setActiveSession);return t?c.jsxs("button",{type:"button",onClick:r=>{r.stopPropagation(),n(t)},className:"mt-2 flex items-center gap-1.5 rounded-md border border-line px-2.5 py-1 font-mono text-xs text-blue-400 transition-colors hover:border-blue-500/50 hover:bg-blue-500/10",children:[c.jsxs("span",{className:"truncate text-fg-5",children:[t.slice(0,20),"…"]}),c.jsx(xU,{className:"h-3 w-3 shrink-0"}),c.jsx("span",{className:"shrink-0",children:"查看子会话"})]}):null}function EQ(e,t){const n=S0(t);if(!n)return null;const r=e.toLowerCase();if(r==="edit"||r==="patch"){const a=typeof n.oldString=="string"?n.oldString:"",s=typeof n.newString=="string"?n.newString:"";if(a||s)return c.jsx(pQ,{oldStr:a,newStr:s})}if(r==="todowrite"||r==="write_todos"){const a=Array.isArray(n.todos)?n.todos:null;if(a&&a.length>0)return c.jsx(nM,{todos:a})}if(r==="bash"||r==="shell"){const a=gi(n,["command","cmd","script"]);if(a)return c.jsxs("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-fg-2",children:[c.jsx("span",{className:"select-none text-emerald-400/70",children:"❯ "}),a]})}if(r==="task"||r==="agent")return c.jsx(xQ,{record:n});if(r==="read")return null;if(r==="write"){const a=typeof n.content=="string"?n.content:null;if(a){const s=a.length>500?`${a.slice(0,500)}…`:a;return c.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-fg-2",children:s})}}return null}function _Q(e,t){const n=e.toLowerCase();if(n==="todowrite"||n==="write_todos"){const r=Array.isArray(t)?t:null;if(r&&r.length>0)return c.jsx(nM,{todos:r})}return null}function NQ({part:e}){const t=G1(e),n=t==="running"||t==="pending",[r,a]=v.useState(n),[s,o]=v.useState(!1),u=v.useRef(n);v.useEffect(()=>{u.current!==n&&(a(n),u.current=n)},[n]);const d=Fe(V=>{const q=V.repos.find(ae=>ae.id===V.activeRepoId);return(q==null?void 0:q.localPath)??null}),f=NR(e),m=f.toLowerCase(),p=m==="task"||m==="agent",b=T0(e),{label:x,arg:E}=mQ(f,b),_=E&&dQ(E,d),S=EQ(f,b),T=S?null:K2(b),C=q1(e),A=_Q(f,C),k=A?"":K2(C),I=hQ[t],O=m==="edit"||m==="patch";let j=0,H=0;if(O){const V=S0(b);if(V){const q=typeof V.oldString=="string"?V.oldString:"",ae=typeof V.newString=="string"?V.newString:"";q&&(H=q.split(`
|
|
533
|
+
`).length),ae&&(j=ae.split(`
|
|
534
|
+
`).length)}}const z=k.length>iy,D=s||!z?k:`${k.slice(0,iy)}…`;return c.jsxs("div",{className:"my-1 overflow-hidden rounded-md border border-line bg-term/70",children:[c.jsxs("button",{type:"button",onClick:()=>a(V=>!V),className:"flex w-full items-center gap-2 px-3 py-1.5 text-left font-mono text-xs transition-colors duration-150 hover:bg-surface/70",children:[c.jsx("span",{className:re("shrink-0 leading-none",I.color),children:r?"▾":"▸"}),c.jsx("span",{className:"shrink-0 font-medium text-fg",children:x}),_&&c.jsx("span",{className:"truncate text-fg-3",children:_}),O&&(j>0||H>0)&&c.jsxs("span",{className:"flex shrink-0 items-center gap-1.5 text-[11px] leading-none",children:[j>0&&c.jsxs("span",{className:"text-emerald-400",children:["+",j]}),H>0&&c.jsxs("span",{className:"text-red-400",children:["-",H]})]}),c.jsxs("span",{className:re("ml-auto flex shrink-0 items-center gap-1.5 leading-none",I.color),children:[c.jsx("span",{className:re(I.spin&&"fs-spin"),children:I.glyph}),c.jsx("span",{children:I.label})]})]}),r&&c.jsx("div",{className:"border-t border-line px-3 py-2",children:c.jsxs("div",{className:re("ml-1 border-l-2 pl-3 font-mono text-xs",I.accent),children:[S&&c.jsx("section",{className:"mb-2",children:S}),T&&c.jsxs("section",{className:"mb-2",children:[c.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wider text-fg-5",children:"input"}),c.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-fg-2",children:T})]}),p&&c.jsx(vQ,{part:e}),A&&c.jsx("section",{children:A}),k&&c.jsxs("section",{children:[c.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wider text-fg-5",children:"output"}),c.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words text-fg-2",children:D}),z&&c.jsx("button",{type:"button",onClick:()=>o(V=>!V),className:"mt-1 text-blue-400 transition-colors hover:text-blue-300",children:s?"show less":`show ${k.length-iy} more chars`})]}),!S&&!T&&!A&&!k&&c.jsx("div",{className:"text-fg-5",children:"no parameters"})]})})]})}function TQ({text:e}){const[t,n]=v.useState(!1);return c.jsxs("div",{className:"my-1",children:[c.jsxs("button",{type:"button",onClick:()=>n(r=>!r),className:"flex items-center gap-1.5 font-mono text-xs text-fg-5 transition-colors hover:text-fg-3",children:[t?c.jsx(Vr,{className:"h-3 w-3 shrink-0"}):c.jsx(m0,{className:"h-3 w-3 shrink-0"}),c.jsx(ju,{className:"h-3 w-3 shrink-0"}),c.jsx("span",{children:"thinking"})]}),t&&c.jsx("div",{className:"ml-1.5 mt-1 whitespace-pre-wrap border-l border-line pl-3 text-xs italic leading-relaxed text-fg-4",children:e})]})}function SQ(){const[e,t]=v.useState(0);return v.useEffect(()=>{const n=Date.now(),r=setInterval(()=>{t(Math.floor((Date.now()-n)/1e3))},1e3);return()=>clearInterval(r)},[]),c.jsxs("div",{className:"my-1 flex items-center gap-1.5 font-mono text-xs text-fg-5",children:[c.jsx(ju,{className:"h-3 w-3 shrink-0 animate-pulse"}),c.jsx("span",{children:"thinking"}),e>0&&c.jsxs("span",{className:"text-fg-6",children:[e,"s"]})]})}function rM({part:e,className:t}){var n;return e.url?(n=e.mime)!=null&&n.startsWith("image/")?c.jsx(K1,{url:e.url,label:e.filename??"attachment",className:re("object-contain",t??"max-h-80")}):c.jsxs("div",{className:"flex items-center gap-1.5 font-mono text-xs text-fg-5",children:[c.jsx(W7,{className:"h-3 w-3 shrink-0"}),c.jsx("span",{children:e.filename??e.mime??"attachment"})]}):null}function wQ({part:e,isStreaming:t}){switch(cp(e)){case"text":{const r=dp(e);return r.trim()?c.jsx("div",{className:"markdown-body leading-relaxed",children:c.jsx(cl,{remarkPlugins:[dl],rehypePlugins:[iQ],components:{table:oQ},children:r})}):null}case"thinking":{const r=dp(e);return r.trim()?c.jsx(TQ,{text:r}):t?c.jsx(SQ,{}):null}case"tool":return nf(e)?c.jsx(uQ,{part:e}):c.jsx(NQ,{part:e});case"file":return c.jsx(rM,{part:e});default:return null}}function AQ({message:e,isStreaming:t,queued:n}){var m,p,b,x,E,_;const r=e.role==="user",a=e.parts??[],s=a.filter(S=>cp(S)!=="other");if(r){const S=a.map(dp).join("").trim(),T=a.filter(k=>cp(k)==="file"),C=(m=e.time)==null?void 0:m.created,A=C?new Date(C*1e3).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):null;return c.jsxs("div",{className:"fs-fade-in rounded-r-md border-l-2 border-emerald-500/40 bg-emerald-500/[0.04] px-3 py-2 font-mono",children:[c.jsxs("div",{className:"mb-1 flex items-center gap-2 text-[11px]",children:[c.jsx("span",{className:"font-medium text-emerald-400",children:"You"}),A&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-fg-6",children:"·"}),c.jsx("span",{className:"text-fg-5",children:A})]}),n&&c.jsxs("span",{className:"inline-flex items-center gap-1 rounded border border-amber-500/30 px-1.5 py-0.5 text-xs text-amber-400",children:[c.jsx("span",{className:"leading-none",children:"○"}),c.jsx("span",{children:"queued"})]})]}),c.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[c.jsx("span",{className:"shrink-0 select-none text-emerald-400",children:"❯"}),c.jsx("span",{className:"min-w-0 flex-1 whitespace-pre-wrap break-words text-fg",children:S||"…"})]}),T.length>0&&c.jsx("div",{className:"mt-2 flex flex-wrap gap-2 pl-5",children:T.map((k,I)=>c.jsx(rM,{part:k,className:"max-h-40"},k.id??I))})]})}const o=((p=e.info)==null?void 0:p.agent)??e.agent,u=((b=e.info)==null?void 0:b.modelID)??e.modelID,d=(x=e.info)==null?void 0:x.error,f=(E=e.info)==null?void 0:E.finish;return c.jsxs("div",{className:"fs-fade-in font-mono",children:[(o||u)&&c.jsxs("div",{className:"mb-1 flex items-center gap-2 text-xs",children:[o&&c.jsx("span",{className:"text-fg-3",children:o}),o&&u&&c.jsx("span",{className:"text-fg-6",children:"·"}),u&&c.jsx("span",{className:"text-fg-5",children:u})]}),d&&c.jsxs("div",{className:"my-1 flex items-start gap-2 rounded-md border border-red-500/20 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:[c.jsx(or,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("span",{className:"font-semibold",children:d.name??"Error"}),((_=d.data)==null?void 0:_.message)&&c.jsx("p",{className:"mt-0.5 text-red-400/80",children:d.data.message}),f&&f!=="end"&&c.jsxs("p",{className:"mt-0.5 text-red-400/60",children:["finish: ",f]})]})]}),c.jsx("div",{className:"space-y-2 text-sm text-fg",children:s.length>0?s.map((S,T)=>c.jsx(wQ,{part:S,isStreaming:t},S.id??S.callID??T)):!d&&(t?c.jsx("span",{className:"text-fg-5",children:"…"}):c.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-amber-400/80",children:[c.jsx(or,{className:"h-3 w-3 shrink-0"}),c.jsx("span",{children:"空响应 — Agent 未产出任何内容"})]}))})]})}const CQ={completed:{glyph:"■",color:"text-emerald-400"},in_progress:{glyph:"■",color:"text-amber-400"},cancelled:{glyph:"■",color:"text-fg-6"},pending:{glyph:"□",color:"text-fg-5"}};function kQ(e){const t=e.find(r=>fl(r.status)==="in_progress");if(t)return t.content;const n=e.find(r=>fl(r.status)==="pending");return n?n.content:"all steps complete"}function OQ({todos:e,onClick:t}){if(e.length===0)return null;const n=e.length,r=TR(e);return c.jsx("div",{className:"rounded-md border border-line bg-term/60 px-3 py-2",children:c.jsxs("button",{type:"button",onClick:t,className:"flex w-full items-center gap-2 text-left font-mono text-xs",children:[c.jsxs("span",{className:"shrink-0 tabular-nums text-fg-4",children:["[",r,"/",n,"]"]}),c.jsx("span",{className:"shrink-0 tracking-tight",children:e.map(a=>{const s=CQ[fl(a.status)];return c.jsx("span",{className:s.color,children:s.glyph},a.id)})}),c.jsx("span",{className:"min-w-0 flex-1 truncate text-fg-2",children:kQ(e)}),c.jsx("span",{className:"shrink-0 text-[10px] text-fg-5",children:"详情 →"})]})})}const IQ=200;function RQ(){return Le(e=>{const t=e.activeSessionId;if(!t)return!1;const n=e.messages[t]??rf;for(let r=n.length-1;r>=0;r--){const a=n[r].parts;if(a){for(const s of a)if(cp(s)==="tool"&&fp(s))return!0}}return!1})}function MQ(){var ee;const[e,t]=v.useState(""),[n,r]=v.useState(""),[a,s]=v.useState(""),[o,u]=v.useState([]),d=v.useRef(null),f=Le(M=>M.activeSessionId),m=Fe(M=>M.activeRepoId),p=Le(M=>{const de=M.activeSessionId;return de?M.sessionStatuses[de]:void 0}),b=Le(M=>M.sendMessage),x=Km(M=>M.setDraft),E=Km(M=>M.clearDraft),_=RQ(),S=v.useCallback(async M=>{if(!await b(M,n||void 0,a||void 0))return!1},[b,n,a]),T=DR(S);v.useEffect(()=>{if(!m){u([]);return}let M=!1;return(async()=>{try{const[de,_e]=await Promise.all([wf(),Sf(m)]);if(M)return;const U=de.pinned_models,he=U?JSON.parse(U):[];u(he.length>0?_e.filter(Oe=>he.includes(Oe.id)):[])}catch{M||u([])}})(),()=>{M=!0}},[m]);const C=p==="busy"&&!_,A=!f;v.useLayoutEffect(()=>{const M=d.current;M&&(M.style.height="auto",M.style.height=`${Math.min(M.scrollHeight,IQ)}px`)},[e]);const k=((ee=o.find(M=>M.id===n))==null?void 0:ee.supportsImage)!==!1,{attachments:I,foldedTexts:O,promptFiles:j,error:H,addFiles:z,onPaste:D,addFoldedText:V,expandFoldedTexts:q,remove:ae,removeFoldedText:Q,clear:W}=CR(k);v.useEffect(()=>{t(f?Km.getState().drafts[f]??"":""),W(),T.stt.stop()},[f,W,T.stt.stop]);const G=M=>{if(Array.from(M.clipboardData.files).length>0){D(M);return}const _e=M.clipboardData.getData("text/plain");if(!_e||!AR(_e))return;M.preventDefault();const U=V(_e),he=M.currentTarget,Oe=he.selectionStart??e.length,pe=he.selectionEnd??e.length,De=e.slice(0,Oe)+U.placeholder+e.slice(pe);t(De),f&&x(f,De),requestAnimationFrame(()=>{const je=Oe+U.placeholder.length;he.setSelectionRange(je,je)})},F=M=>{const de=O.find(_e=>_e._id===M);if(de){const _e=e.replace(de.placeholder,"");t(_e),f&&x(f,_e)}Q(M)},$=async()=>{const M=q(e.trim());if(A||!M&&I.length===0)return;await b(M,n||void 0,a||void 0,j.length>0?j:void 0)&&(t(""),W(),f&&E(f))},K=M=>{M.nativeEvent.isComposing||M.keyCode===229||M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),$())},L=f?_?"输入回复,或点击上方选项…":C?"输入消息将排队等待处理…":"enter a command…":"select or start a run",P=f?C?"text-amber-400 fs-blink":_?"text-blue-400":"text-emerald-400":"text-fg-6";return c.jsxs("div",{className:"relative border-t border-line bg-term px-4 py-4",children:[c.jsx(RR,{phase:T.stt.phase,transcript:T.stt.transcript,interimTranscript:T.stt.interimTranscript,editText:T.editText,onEditTextChange:T.setEditText,onTextareaKeyDown:T.handleTextareaKeyDown,textareaRef:T.textareaRef,wrapperClassName:"absolute bottom-full left-0 right-0 z-20 border-t border-line bg-surface/95 backdrop-blur-sm"}),c.jsx(OR,{attachments:I,foldedTexts:O,error:H,onRemove:ae,onRemoveFoldedText:F,className:"mx-auto max-w-4xl"}),c.jsxs("div",{className:re("mx-auto flex max-w-4xl items-start gap-2 rounded-lg border px-3 py-2 transition-colors duration-150",A?"border-line":"border-fg-5 focus-within:border-fg-4"),children:[c.jsx("span",{className:re("select-none pt-px font-mono text-sm leading-6",P),children:"❯"}),c.jsx("textarea",{ref:d,rows:2,value:e,disabled:A,onChange:M=>{const de=M.target.value;t(de),f&&x(f,de)},onKeyDown:K,onPaste:G,placeholder:L,className:"flex-1 resize-none bg-transparent font-mono text-sm leading-6 text-fg placeholder:text-fg-6 focus:outline-none disabled:cursor-not-allowed"}),c.jsx(kR,{onFiles:M=>void z(M),disabled:A,allowed:k}),c.jsx(IR,{isListening:T.stt.isListening,disabled:A,onStart:T.stt.start,onStop:()=>void T.stt.stop()}),c.jsx("button",{type:"button",onClick:$,disabled:A||e.trim().length===0&&I.length===0&&O.length===0,"aria-label":"Send message",className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-emerald-600 text-white transition-colors duration-150 hover:bg-emerald-500 disabled:cursor-not-allowed disabled:bg-fg-6/30 disabled:text-fg-5",children:c.jsx($5,{className:"h-4 w-4",strokeWidth:2.5})})]}),T.stt.phase==="idle"?c.jsxs("div",{className:"mx-auto mt-1.5 flex max-w-4xl items-center gap-3 pl-5",children:[T.stt.error&&c.jsx("span",{className:"font-mono text-[10px] text-red-400",children:T.stt.error}),c.jsx("span",{className:"font-mono text-[10px] text-fg-6",children:"⏎ to run · shift+⏎ for newline"}),c.jsxs("div",{className:"ml-auto flex min-w-0 shrink items-center gap-1.5",children:[c.jsxs("select",{value:a,onChange:M=>s(M.target.value),className:"w-16 min-w-0 rounded border border-line bg-surface px-1.5 py-0.5 font-mono text-[11px] text-fg-4 focus:border-fg-5 focus:outline-none",children:[c.jsx("option",{value:"",children:"默认"}),c.jsx("option",{value:"max",children:"max"}),c.jsx("option",{value:"high",children:"high"})]}),o.length>0&&c.jsxs("select",{value:n,onChange:M=>r(M.target.value),className:"w-24 min-w-0 rounded border border-line bg-surface px-1.5 py-0.5 font-mono text-[11px] text-fg-4 focus:border-fg-5 focus:outline-none",children:[c.jsx("option",{value:"",children:"默认模型"}),o.map(M=>c.jsx("option",{value:M.id,children:M.name||M.id},M.id))]})]})]}):c.jsx(MR,{phase:T.stt.phase,volumeLevel:T.stt.volumeLevel,elapsed:T.elapsed,editText:T.editText,error:T.stt.error,onCancel:T.cancel,onConfirm:()=>void T.confirm(),className:"mx-auto mt-1.5 flex max-w-4xl items-center gap-3 pl-5"})]})}function zd(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function pa(e){return e>=1?`$${e.toFixed(2)}`:e>=.01?`$${e.toFixed(3)}`:e>0?`$${e.toFixed(4)}`:"$0"}const yA={idle:{glyph:"●",label:"ready",color:"text-emerald-400",spin:!1},busy:{glyph:"◌",label:"running",color:"text-amber-400",spin:!0},retry:{glyph:"◌",label:"retrying",color:"text-amber-400",spin:!0},error:{glyph:"✗",label:"error",color:"text-red-400",spin:!1}},vA=[{bg:"bg-blue-500/15",text:"text-blue-500"},{bg:"bg-purple-500/15",text:"text-purple-500"},{bg:"bg-emerald-500/15",text:"text-emerald-500"},{bg:"bg-amber-500/15",text:"text-amber-500"},{bg:"bg-rose-500/15",text:"text-rose-500"},{bg:"bg-cyan-500/15",text:"text-cyan-500"},{bg:"bg-indigo-500/15",text:"text-indigo-500"},{bg:"bg-orange-500/15",text:"text-orange-500"}];function DQ(e){const t=e.trim(),n=t.charCodeAt(0)||0;return{...vA[n%vA.length],initial:(t.charAt(0)||"?").toUpperCase()}}function EA({status:e,reason:t}){const n=yA[e??"idle"]??yA.idle;return c.jsxs("span",{className:re("flex items-center gap-1.5 rounded border border-line px-2 py-0.5 font-mono text-xs",n.color),title:e==="error"&&t?t:void 0,children:[c.jsx("span",{className:re("leading-none",n.spin&&"fs-spin"),children:n.glyph}),c.jsx("span",{children:n.label})]})}const jQ={"claude-opus-4":1e6,"claude-sonnet-4":1e6,"claude-sonnet-5":1e6,"claude-opus-5":1e6,"claude-3-7-sonnet":2e5,"claude-3-5-sonnet":2e5,"claude-3-5-haiku":2e5,"claude-3-opus":2e5,"claude-3-sonnet":2e5,"claude-3-haiku":2e5},_A=1e6;function LQ(e){if(!e)return _A;for(const[t,n]of Object.entries(jQ))if(e.startsWith(t))return n;return _A}function PQ(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role==="assistant"&&n.tokens){const r=n.tokens;if(r.cache&&(r.cache.read>0||r.cache.write>0)||r.input>0||r.output>0)return r}}return null}function NA({session:e,messages:t}){var d,f,m;const n=PQ(t),r=(e==null?void 0:e.cost)??0;if(!n&&!r)return null;const a=n?n.input+(((d=n.cache)==null?void 0:d.read)??0)+(((f=n.cache)==null?void 0:f.write)??0):0,s=LQ((m=e==null?void 0:e.model)==null?void 0:m.modelID),o=a>0?Math.min(Math.round(a/s*100),999):0,u=o>=80?"text-red-400":o>=50?"text-amber-400":"text-fg-5";return c.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px] text-fg-5",children:[a>0&&c.jsxs(c.Fragment,{children:[c.jsx("span",{title:"当前上下文 = cache_read + cache_write + input (最近一次请求)",children:zd(a)}),c.jsx("span",{className:"text-fg-6",children:"·"}),c.jsxs("span",{className:u,title:`上下文占比 (${zd(s)} 窗口)`,children:[o,"%"]}),c.jsx("span",{className:"text-fg-6",children:"·"})]}),c.jsx("span",{title:"会话累计费用",children:pa(r)})]})}const BQ=144,UQ=64;function zQ({onToggleSidebar:e}){var _e;const[t,n]=v.useState(""),[r,a]=v.useState(""),[s,o]=v.useState(""),[u,d]=v.useState(""),f=v.useRef(null),[m,p]=v.useState([]),b=Le(U=>U.createSession),x=Le(U=>U.sendError),E=Fe(U=>U.activeRepoId),S=io(U=>U.agents).filter(U=>U.isSystem<2),T=at(U=>U.selectedIssueId),C=at(U=>{if(!u)return null;const he=U.issues.find(Oe=>Oe.id===u);return he?`#${he.number} ${he.title}`:null}),[A,k]=y1();v.useEffect(()=>{S.length>0&&!r&&a(S[0].id)},[S,r]),v.useEffect(()=>{if(!E){p([]);return}let U=!1;return Sf(E).then(he=>{U||p(he)}).catch(()=>{U||p([])}),()=>{U=!0}},[E]);const I=m.length===0||m.some(U=>U.supportsImage!==!1),{attachments:O,foldedTexts:j,promptFiles:H,error:z,addFiles:D,onPaste:V,addFoldedText:q,expandFoldedTexts:ae,remove:Q,removeFoldedText:W,clear:G}=CR(I);v.useEffect(()=>{T&&(d(T),at.getState().setSelectedIssue(null))},[T]),v.useEffect(()=>{const U=A.get("draft");U&&(n(U),k({},{replace:!0}))},[A,k]),v.useLayoutEffect(()=>{const U=f.current;U&&(U.style.height="auto",U.style.height=`${Math.min(U.scrollHeight,BQ)}px`)},[t]);const F=(_e=S.find(U=>U.id===r))==null?void 0:_e.description,$=!!u,K=U=>{if(Array.from(U.clipboardData.files).length>0){V(U);return}const Oe=U.clipboardData.getData("text/plain");if(!Oe||!AR(Oe))return;U.preventDefault();const pe=q(Oe),De=U.currentTarget,je=De.selectionStart??t.length,Ee=De.selectionEnd??t.length,It=t.slice(0,je)+pe.placeholder+t.slice(Ee);n(It),requestAnimationFrame(()=>{const nt=je+pe.placeholder.length;De.setSelectionRange(nt,nt)})},L=U=>{const he=j.find(Oe=>Oe._id===U);he&&n(t.replace(he.placeholder,"")),W(U)},P=()=>{const U=ae(t.trim());!E||!U&&!$&&O.length===0||(n(""),G(),b(U,void 0,void 0,s||void 0,u||void 0,r||void 0,H.length>0?H:void 0))},ee=U=>{if(!(U.nativeEvent.isComposing||U.keyCode===229)){if(U.key==="Tab"&&S.length>1){U.preventDefault();const he=S.findIndex(pe=>pe.id===r),Oe=U.shiftKey?(he-1+S.length)%S.length:(he+1)%S.length;a(S[Oe].id);return}U.key==="Enter"&&!U.shiftKey&&(U.preventDefault(),P())}},M=v.useCallback(U=>{b(U,void 0,void 0,s||void 0,u||void 0,r||void 0)},[b,u,r,s]),de=DR(M);return c.jsxs("div",{className:"relative flex flex-1 flex-col items-center justify-center bg-term",children:[c.jsx("button",{type:"button",onClick:e,"aria-label":"Open sidebar",className:"absolute left-3 top-3 rounded-lg p-2 text-fg-3 hover:bg-elevated md:hidden",children:c.jsx(T1,{className:"h-5 w-5"})}),c.jsxs("div",{className:"w-full max-w-2xl px-6",children:[c.jsx("div",{className:"mb-8 text-center",children:c.jsxs("div",{className:"font-mono text-2xl text-fg-6",children:[c.jsx("span",{className:"text-emerald-500/60",children:"❯"}),c.jsx("span",{className:"fs-blink text-fg-4",children:" ▋"})]})}),c.jsx(OR,{attachments:O,foldedTexts:j,error:z,onRemove:Q,onRemoveFoldedText:L}),c.jsxs("div",{className:re("relative rounded-xl border bg-base/80 shadow-sm transition-colors","border-line focus-within:border-fg-5"),children:[c.jsx(RR,{phase:de.stt.phase,transcript:de.stt.transcript,interimTranscript:de.stt.interimTranscript,editText:de.editText,onEditTextChange:de.setEditText,onTextareaKeyDown:de.handleTextareaKeyDown,textareaRef:de.textareaRef,wrapperClassName:"absolute bottom-full left-0 right-0 z-20 mb-2 overflow-hidden rounded-xl border border-line bg-surface/95 backdrop-blur-sm"}),S.length>0&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center gap-1.5 overflow-x-auto px-4 pt-3 pb-1 scrollbar-none",children:[S.map(U=>{const he=DQ(U.name);return c.jsxs("button",{type:"button",onClick:()=>a(U.id),className:re("flex shrink-0 items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium transition-colors",r===U.id?"bg-blue-500/15 text-blue-400 ring-1 ring-inset ring-blue-500/30":"text-fg-4 hover:bg-elevated hover:text-fg-3"),children:[c.jsx("span",{className:re("inline-flex h-4 w-4 items-center justify-center rounded-full text-[10px] font-bold",he.bg,he.text),children:he.initial}),U.name]},U.id)}),S.length>1&&c.jsx("span",{className:"hidden shrink-0 ml-auto font-mono text-[10px] text-fg-6 md:inline",children:"Tab 切换"})]}),F&&c.jsx("p",{className:"px-4 pb-1 text-[11px] leading-relaxed text-fg-5",children:F})]}),c.jsxs("div",{className:"flex items-start gap-2 px-4 py-3",children:[c.jsx("span",{className:re("select-none pt-px font-mono text-sm leading-6","text-emerald-400"),children:"❯"}),c.jsx("textarea",{ref:f,rows:1,value:t,autoFocus:!0,disabled:!E,onChange:U=>n(U.target.value),onKeyDown:ee,onPaste:K,placeholder:E?u?"输入补充指令,或直接发送":"让 Agent 做什么?":"请先选择一个仓库",className:"flex-1 resize-none bg-transparent font-mono text-sm leading-6 text-fg placeholder:text-fg-6 focus:outline-none disabled:cursor-not-allowed"}),c.jsx(kR,{onFiles:U=>void D(U),disabled:!E,allowed:!0}),c.jsx(IR,{isListening:de.stt.isListening,disabled:!E,onStart:de.stt.start,onStop:()=>void de.stt.stop()}),c.jsx("button",{type:"button",onClick:P,disabled:!E||!t.trim()&&!$&&O.length===0&&j.length===0,"aria-label":"Start run",className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-emerald-600 text-white transition-colors duration-150 hover:bg-emerald-500 disabled:cursor-not-allowed disabled:bg-fg-6/30 disabled:text-fg-5",children:c.jsx($5,{className:"h-4 w-4",strokeWidth:2.5})})]}),c.jsxs("div",{className:"flex items-center gap-2 border-t border-line/60 px-4 py-1.5",children:[C&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"shrink-0 font-mono text-[11px] text-fg-5",children:"关联"}),c.jsx("span",{className:"min-w-0 truncate rounded bg-blue-500/10 px-1.5 py-0.5 font-mono text-[11px] text-blue-400",children:C}),c.jsx("button",{type:"button",onClick:()=>d(""),className:"shrink-0 text-fg-5 hover:text-fg-3","aria-label":"取消关联",children:c.jsx(yt,{className:"h-3 w-3"})})]}),c.jsxs("div",{className:"ml-auto flex items-center gap-1.5",children:[c.jsx("span",{className:"font-mono text-[11px] text-fg-5",children:"variant"}),c.jsxs("select",{value:s,onChange:U=>o(U.target.value),className:"rounded border border-line bg-surface px-2 py-0.5 font-mono text-[11px] text-fg-4 focus:border-fg-5 focus:outline-none",children:[c.jsx("option",{value:"",children:"默认"}),c.jsx("option",{value:"max",children:"max"}),c.jsx("option",{value:"high",children:"high"})]})]})]})]}),c.jsx(MR,{phase:de.stt.phase,volumeLevel:de.stt.volumeLevel,elapsed:de.elapsed,editText:de.editText,error:de.stt.error,onCancel:de.cancel,onConfirm:()=>void de.confirm(),idleHint:"⌘⏎ / ctrl+⏎ 开始运行",className:"mt-2 flex items-center justify-center gap-2"}),x&&c.jsx("div",{className:"mt-3 rounded-lg border border-red-500/20 bg-red-500/10 px-4 py-2 font-mono text-xs text-red-400",children:x})]})]})}function TA({body:e}){return e?c.jsx("div",{className:"markdown-body leading-relaxed",children:c.jsx(cl,{remarkPlugins:[dl],children:e})}):c.jsx("p",{className:"py-10 text-center font-mono text-xs text-fg-5",children:"该 Issue 没有描述内容"})}function SA({issue:e}){var t;return c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("span",{className:re("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",e.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",e.number," ",e.state]}),(t=e.labels)==null?void 0:t.map(n=>c.jsx("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${n.color}20`,color:`#${n.color}`},children:n.name},n.id))]}),c.jsx("h2",{className:"mt-0.5 truncate text-sm font-medium text-fg",children:e.title})]})}function FQ({onToggleSidebar:e}){const t=at(m=>m.matchingParentId),n=at(m=>m.matchingCandidateId),r=at(m=>m.issues.find(p=>p.id===t)),a=at(m=>m.issues.find(p=>p.id===n)),s=at(m=>m.exitMatchMode),o=at(m=>m.linkChild),[u,d]=v.useState(!1);if(!r)return null;const f=async()=>{a&&(d(!0),await o(r.number,a.number),d(!1))};return c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden bg-term",children:[c.jsxs("header",{className:"flex items-center gap-3 border-b border-line bg-base px-4 py-2.5",children:[c.jsx("button",{type:"button",onClick:e,"aria-label":"Open sidebar",className:"-ml-1 rounded-lg p-1.5 text-fg-3 hover:bg-elevated md:hidden",children:c.jsx(T1,{className:"h-5 w-5"})}),c.jsx("span",{className:"text-xs font-medium text-fg-4",children:"匹配子任务"}),c.jsxs("span",{className:"font-mono text-xs text-fg-3",children:["父: #",r.number]}),c.jsx("div",{className:"flex-1"}),c.jsxs("button",{type:"button",onClick:s,className:"flex h-8 items-center gap-1.5 rounded-md border border-line px-2.5 text-xs text-fg-3 transition-colors hover:border-fg-5 hover:text-fg",children:[c.jsx(yt,{className:"h-3.5 w-3.5"}),"退出匹配"]})]}),c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col md:flex-row",children:[c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden border-b border-line md:border-b-0 md:border-r",children:[c.jsx("div",{className:"border-b border-line/60 px-4 py-2.5",children:c.jsx(SA,{issue:r})}),c.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6",children:c.jsx(TA,{body:r.body})})]}),c.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:a?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"border-b border-line/60 px-4 py-2.5",children:c.jsx(SA,{issue:a})}),c.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6",children:c.jsx(TA,{body:a.body})})]}):c.jsx("div",{className:"flex flex-1 items-center justify-center",children:c.jsx("p",{className:"font-mono text-xs text-fg-5",children:"← 从左侧列表选择候选 Issue"})})})]}),a&&c.jsx("div",{className:"flex items-center justify-center gap-3 border-t border-line bg-base px-4 py-3",children:c.jsxs("button",{type:"button",onClick:()=>void f(),disabled:u,className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-4 py-2 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-50",children:[c.jsx(yr,{className:"h-3.5 w-3.5"}),u?"关联中…":`确认: 将 #${a.number} 设为 #${r.number} 的子任务`]})})]})}function HQ({onToggleSidebar:e,onToggleRightPanel:t,rightPanelOpen:n}){var G,F;const r=ur(),a=Fe(Dr),s=Le($=>$.activeSessionId),o=Le($=>$.sessions.find(K=>K.id===$.activeSessionId)??null),u=Le($=>{const K=$.activeSessionId;return K?$.messages[K]??rf:rf}),d=Le($=>{const K=$.activeSessionId;return K?$.todos[K]??af:af}),f=Le($=>{const K=$.activeSessionId;return K?$.sessionStatuses[K]:void 0}),m=Le($=>{const K=$.activeSessionId;return K?$.queuedMessageIds[K]??V2:V2}),p=Le($=>{const K=$.activeSessionId;return K?$.errorReasons[K]:void 0}),b=Le($=>{const K=$.activeSessionId;return K?$.messagesMeta[K]:void 0}),x=Le($=>$.loadMoreMessages),E=Le($=>$.sendError),_=Le($=>$.abortSession),S=Le($=>$.revertToMessage),T=Fe($=>$.repos.find(K=>K.id===$.activeRepoId)),C=(T==null?void 0:T.runtimeType)!=="claude-code",[A,k]=v.useState(null),[I,O]=v.useState(!1),j=at($=>o!=null&&o.issueId?$.issues.find(K=>K.id===o.issueId):void 0);v.useEffect(()=>{if(s)return mp.activateSession(s),()=>mp.deactivateSession(s)},[s]);const H=v.useRef(null),z=v.useRef(!0),[D,V]=v.useState(!1);v.useEffect(()=>{const $=H.current;$&&z.current&&($.scrollTop=$.scrollHeight)},[u,d]),v.useEffect(()=>{z.current=!0,V(!1)},[s]),v.useEffect(()=>{if(f!=="busy"&&f!=="retry")return;const $=K=>{if(K.key!=="Escape"||K.defaultPrevented)return;const L=K.target;L instanceof HTMLInputElement||L instanceof HTMLTextAreaElement||L!=null&&L.isContentEditable||_()};return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[f,_]);const q=at($=>$.matchingParentId);if(!s)return q?c.jsx(FQ,{onToggleSidebar:e}):c.jsx(zQ,{onToggleSidebar:e});const ae=f==="busy",Q=f==="retry",W=ae||Q;return c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden bg-term",children:[c.jsxs("header",{className:"border-b border-line bg-base md:hidden",children:[c.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",onClick:()=>O($=>!$),children:[c.jsxs("div",{className:"flex items-center gap-1",onClick:$=>$.stopPropagation(),children:[c.jsx("button",{type:"button",onClick:e,"aria-label":"Open sidebar",className:"-ml-1 rounded-lg p-1.5 text-fg-3 hover:bg-elevated",children:c.jsx(T1,{className:"h-5 w-5"})}),c.jsx("button",{type:"button",onClick:()=>Le.setState({activeSessionId:null}),"aria-label":"新建运行",title:"新建运行",className:"rounded-lg p-1.5 text-fg-3 hover:bg-elevated",children:c.jsx(Da,{className:"h-5 w-5"})})]}),c.jsxs("div",{className:"min-w-0 flex-1",children:[(o==null?void 0:o.parentID)&&c.jsxs("button",{type:"button",onClick:$=>{$.stopPropagation(),Le.getState().setActiveSession(o.parentID)},className:"mb-0.5 flex items-center gap-1 text-[11px] text-fg-4 transition-colors hover:text-blue-400",children:[c.jsx(Qd,{className:"h-3 w-3"}),"返回父会话"]}),c.jsx("h2",{className:"text-sm font-medium leading-snug text-fg",children:((G=o==null?void 0:o.title)==null?void 0:G.trim())||"untitled run"})]}),W&&c.jsx("span",{className:re("h-2 w-2 shrink-0 rounded-full","bg-amber-400 animate-pulse")}),!W&&f==="error"&&c.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-red-400"}),c.jsx(Vr,{className:re("h-4 w-4 shrink-0 text-fg-5 transition-transform duration-200",I&&"rotate-180")})]}),c.jsx("div",{className:re("grid transition-[grid-template-rows] duration-200 ease-in-out",I?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:c.jsx("div",{className:"overflow-hidden",children:c.jsxs("div",{className:"flex flex-col gap-2.5 border-t border-line/60 px-4 py-3",children:[(o==null?void 0:o.agent)&&c.jsxs("div",{className:"flex items-center gap-2 font-mono text-xs text-fg-4",children:[c.jsx("span",{className:"w-14 shrink-0 text-fg-5",children:"Agent"}),c.jsx("span",{className:"truncate",children:o.agent})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"w-14 shrink-0 font-mono text-xs text-fg-5",children:"Status"}),c.jsx(EA,{status:f,reason:p})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"w-14 shrink-0 font-mono text-xs text-fg-5",children:"Context"}),c.jsx(NA,{session:o,messages:u})]}),j&&c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"w-14 shrink-0 font-mono text-xs text-fg-5",children:"Issue"}),c.jsxs("button",{type:"button",onClick:()=>r(`/${encodeURIComponent(a)}/dev/issues?id=${j.id}`),className:"flex items-center gap-1.5 truncate font-mono text-xs text-fg-3 transition-colors hover:text-blue-400",children:[c.jsxs("span",{className:re("shrink-0 rounded px-1 py-0.5 text-[10px] font-semibold",j.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",j.number]}),c.jsx("span",{className:"truncate",children:j.title})]})]}),W&&c.jsxs("button",{type:"button",onClick:()=>void _(),className:"mt-0.5 flex w-full items-center justify-center gap-1.5 rounded-md border border-line px-2.5 py-1.5 font-mono text-xs text-fg-2 transition-colors hover:border-red-500/50 hover:text-red-400",children:[c.jsx(Vy,{className:"h-3 w-3 fill-current"}),Q?"stop retry":"stop"]})]})})})]}),c.jsxs("header",{className:"hidden items-center gap-3 border-b border-line bg-base px-4 py-2.5 md:flex",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[(o==null?void 0:o.parentID)&&c.jsxs("button",{type:"button",onClick:()=>void Le.getState().setActiveSession(o.parentID),className:"mb-0.5 flex items-center gap-1 text-[11px] text-fg-4 transition-colors hover:text-blue-400",children:[c.jsx(Qd,{className:"h-3 w-3"}),"返回父会话"]}),c.jsx("h2",{className:"truncate text-sm font-medium text-fg",children:((F=o==null?void 0:o.title)==null?void 0:F.trim())||"untitled run"}),(o==null?void 0:o.agent)&&c.jsx("p",{className:"truncate font-mono text-xs text-fg-4",children:o.agent}),c.jsx(NA,{session:o,messages:u})]}),j&&c.jsxs("button",{type:"button",onClick:()=>r(`/${encodeURIComponent(a)}/dev/issues?id=${j.id}`),className:"flex items-center gap-1 rounded-md border border-line px-2 py-1 font-mono text-xs text-fg-3 transition-colors hover:border-fg-5 hover:text-fg",children:[c.jsxs("span",{className:re("rounded px-1 py-0.5 text-[10px] font-semibold",j.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",j.number]}),c.jsx("span",{className:"hidden max-w-[120px] truncate sm:inline",children:j.title})]}),c.jsx(EA,{status:f,reason:p}),t&&c.jsx("button",{type:"button",onClick:t,"aria-label":n?"关闭侧边栏":"打开侧边栏",className:re("flex items-center justify-center rounded-md border border-line p-1.5 transition-colors",n?"bg-blue-500/10 text-blue-500 hover:bg-blue-500/20":"text-fg-4 hover:bg-elevated hover:text-fg-2"),children:c.jsx(W5,{className:"h-4 w-4"})}),W&&c.jsxs("button",{type:"button",onClick:()=>void _(),className:"flex items-center gap-1.5 rounded-md border border-line px-2.5 py-1 font-mono text-xs text-fg-2 transition-colors hover:border-red-500/50 hover:text-red-400",children:[c.jsx(Vy,{className:"h-3 w-3 fill-current"}),Q?"stop retry":"stop"]})]}),c.jsxs("div",{className:"relative min-h-0 flex-1",children:[c.jsx("div",{ref:H,onScroll:()=>{const $=H.current;if(!$)return;const K=$.scrollHeight-$.clientHeight-$.scrollTop<=UQ;if(z.current=K,V(!K),$.scrollTop<200&&s&&(b!=null&&b.hasMore)&&!b.loading){const L=$.scrollHeight;x(s).then(()=>{requestAnimationFrame(()=>{H.current&&(H.current.scrollTop=H.current.scrollHeight-L)})})}},className:"h-full overflow-y-auto",children:c.jsxs("div",{className:"mx-auto flex max-w-4xl flex-col gap-3 px-4 py-4",children:[(b==null?void 0:b.loading)&&c.jsx("div",{className:"flex justify-center py-2",children:c.jsx("span",{className:"inline-block h-4 w-4 animate-spin rounded-full border-2 border-fg-5 border-t-transparent"})}),b&&!b.loading&&b.hasMore&&c.jsx("button",{type:"button",onClick:()=>s&&x(s),className:"mx-auto rounded-md border border-line px-3 py-1 font-mono text-xs text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-2",children:"加载更早的消息"}),u.length===0?c.jsxs("p",{className:"py-10 text-center font-mono text-xs text-fg-6",children:[c.jsx("span",{className:"text-emerald-500/60",children:"❯"})," waiting for input",c.jsx("span",{className:"fs-blink",children:" ▋"})]}):u.map(($,K)=>c.jsxs(v.Fragment,{children:[K>0&&$.role==="user"&&c.jsx("div",{className:"group/revert relative border-t border-line py-2",children:C&&!W&&c.jsxs("button",{type:"button",disabled:A!==null,onClick:async()=>{const L=u.length-K;window.confirm(`回退到此处?将移除后续 ${L} 条对话记录(不影响已产生的代码改动)。`)&&(k($.id),await S(s,$.id),k(null))},className:"absolute left-1/2 top-1/2 z-10 flex -translate-x-1/2 -translate-y-1/2 items-center gap-1 rounded-full border border-line bg-base px-2.5 py-1 font-mono text-[11px] text-fg-4 opacity-60 shadow-sm transition-all duration-150 hover:border-amber-500/50 hover:text-amber-400 md:opacity-30 md:group-hover/revert:opacity-100 disabled:opacity-50",children:[A===$.id?c.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-current border-t-transparent"}):c.jsx(nz,{className:"h-3 w-3"}),"回退到此处"]})}),c.jsx("div",{"data-message-id":$.id,children:c.jsx(AQ,{message:$,isStreaming:ae&&K===u.length-1,queued:m.includes($.id)})})]},$.id)),d.length>0&&c.jsx(OQ,{todos:[...d],onClick:t})]})}),c.jsx("button",{type:"button",onClick:()=>{const $=H.current;$&&($.scrollTo({top:$.scrollHeight,behavior:"smooth"}),z.current=!0)},"aria-label":"滚动到底部",className:re("absolute bottom-4 right-4 z-10 flex h-9 w-9 items-center justify-center rounded-full border border-line bg-surface/90 text-fg-4 shadow-lg backdrop-blur transition-all duration-200","hover:bg-elevated hover:text-fg-2",D?"translate-y-0 opacity-100":"pointer-events-none translate-y-2 opacity-0"),children:c.jsx(Vr,{className:"h-4 w-4"})})]}),f==="error"&&p&&c.jsxs("div",{className:"flex items-center gap-2 border-t border-red-500/20 bg-red-500/10 px-4 py-2 font-mono text-xs text-red-400",children:[c.jsx(or,{className:"h-3.5 w-3.5 shrink-0"}),c.jsx("span",{className:"truncate",children:p})]}),E&&c.jsxs("div",{className:"flex items-center gap-2 border-t border-red-500/20 bg-red-500/10 px-4 py-2 font-mono text-xs text-red-400",children:[c.jsx(or,{className:"h-3.5 w-3.5 shrink-0"}),c.jsx("span",{className:"truncate",children:E})]}),c.jsx(MQ,{})]})}const Hn=ei((e,t)=>({pulls:[],loaded:!1,syncing:!1,selectedPrId:null,viewingPrId:null,matchingPrId:null,matchingCandidateIssueId:null,clearPulls:()=>e({pulls:[],loaded:!1,selectedPrId:null,viewingPrId:null,matchingPrId:null,matchingCandidateIssueId:null}),setViewingPr:n=>e({viewingPrId:n}),enterMatchMode:n=>e({matchingPrId:n,matchingCandidateIssueId:null}),exitMatchMode:()=>{const n=t().matchingPrId;e({matchingPrId:null,matchingCandidateIssueId:null,selectedPrId:n})},linkIssue:async(n,r)=>{const a=Fe.getState().activeRepoId;if(!a)return!1;try{return await gF(a,n,r),!0}catch{return!1}},unlinkIssue:async(n,r)=>{const a=Fe.getState().activeRepoId;if(!a)return!1;try{return await bF(a,n,r),!0}catch{return!1}},loadPulls:async()=>{const n=Fe.getState().activeRepoId;if(!n){e({pulls:[],loaded:!0});return}try{const r=await Kw(n,"all");e({pulls:r,loaded:!0})}catch{e({loaded:!0})}},syncPulls:async()=>{const n=Fe.getState().activeRepoId;if(n){e({syncing:!0});try{await hF(n,"open");const r=await Kw(n,"all");e({pulls:r,syncing:!1})}catch(r){e({syncing:!1});let a="同步 PR 失败";if(r instanceof ts)try{const s=JSON.parse(r.message);s.error&&(a=s.error)}catch{r.message&&(a=r.message)}gn.getState().addToast(a,"error")}}}})),$Q={completed:{glyph:"✓",color:"text-emerald-400",spin:!1},in_progress:{glyph:"◌",color:"text-amber-400",spin:!0},cancelled:{glyph:"✗",color:"text-fg-5",spin:!1},pending:{glyph:"○",color:"text-fg-4",spin:!1}};function YQ(e){var a;const t=(a=e.time)==null?void 0:a.created;if(!t)return"";const n=t<1e12?t*1e3:t;return new Date(n).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function qQ(e){if(!e.parts)return"";for(const t of e.parts){const n=t.content??t.text;if(n)return n}return""}function GQ({todos:e}){if(e.length===0)return c.jsx("div",{className:"flex flex-1 items-center justify-center",children:c.jsx("p",{className:"font-mono text-xs text-fg-5",children:"暂无待办项"})});const t=e.filter(n=>{const r=fl(n.status);return r==="completed"||r==="cancelled"}).length;return c.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-3",children:[c.jsxs("div",{className:"mb-2 font-mono text-[10px] tabular-nums text-fg-5",children:["进度 ",t,"/",e.length]}),c.jsx("ul",{className:"space-y-1.5",children:e.map(n=>{const r=fl(n.status),a=$Q[r],s=r==="completed"||r==="cancelled";return c.jsxs("li",{className:"flex items-start gap-2 font-mono text-xs",children:[c.jsx("span",{className:re("shrink-0 leading-5",a.color,a.spin&&"fs-spin"),children:a.glyph}),c.jsx("span",{className:re("leading-5",s?"text-fg-5 line-through":"text-fg-2"),children:n.content})]},n.id)})})]})}function KQ({messages:e,onScrollToMessage:t}){const n=e.filter(r=>r.role==="user");return n.length===0?c.jsx("div",{className:"flex flex-1 items-center justify-center",children:c.jsx("p",{className:"font-mono text-xs text-fg-5",children:"暂无输入记录"})}):c.jsx("div",{className:"flex-1 overflow-y-auto px-3 py-2",children:c.jsx("ul",{className:"space-y-1",children:n.map((r,a)=>{const s=qQ(r),o=YQ(r);return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:()=>t==null?void 0:t(r.id),className:"group w-full rounded-md px-2 py-1.5 text-left transition-colors hover:bg-elevated/60",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"shrink-0 font-mono text-[10px] text-emerald-400/60",children:"❯"}),c.jsxs("span",{className:"shrink-0 font-mono text-[10px] tabular-nums text-fg-5",children:["#",a+1]}),o&&c.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] text-fg-6",children:o})]}),s&&c.jsx("p",{className:"mt-0.5 line-clamp-2 pl-5 text-xs leading-relaxed text-fg-3 group-hover:text-fg-2",children:s})]})},r.id)})})})}function VQ({linked:e,number:t,title:n,state:r,mergedAt:a,isPr:s,onToggle:o}){const u=s?r==="open"?"bg-emerald-500/15 text-emerald-400":a?"bg-purple-500/15 text-purple-400":"bg-red-500/15 text-red-400":r==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400";return c.jsx("li",{children:c.jsx("button",{type:"button",onClick:o,className:re("flex w-full items-start gap-2 rounded-md px-2 py-2 text-left transition-colors",e?"border-l-2 border-emerald-500 bg-emerald-500/5":"border-l-2 border-transparent hover:bg-elevated/50"),children:c.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[c.jsxs("span",{className:re("shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-semibold",u),children:["#",t]}),c.jsx("span",{className:"min-w-0 truncate text-xs text-fg-2",children:n}),e&&c.jsx(N1,{className:"ml-auto h-3 w-3 shrink-0 text-emerald-400"})]})})})}function WQ({links:e,sessionId:t}){var O,j,H,z;const n=ur(),r=Fe(Dr),[a,s]=v.useState(null),[o,u]=v.useState(""),d=v.useRef(null),f=at(D=>D.issues),m=Hn(D=>D.pulls),p=Le(D=>D.addLink),b=Le(D=>D.removeLink),x=new Set(((O=e==null?void 0:e.issues)==null?void 0:O.map(D=>D.id))??[]),E=new Set(((j=e==null?void 0:e.pullRequests)==null?void 0:j.map(D=>D.id))??[]);v.useEffect(()=>{var D;a&&((D=d.current)==null||D.focus())},[a]);const _=()=>{s(null),u("")},S=async(D,V,q)=>{t&&(q?await b(t,D,V):await p(t,D,V))},T=o.trim().toLowerCase(),C=T?f.filter(D=>`#${D.number} ${D.title}`.toLowerCase().includes(T)):f,A=T?m.filter(D=>`#${D.number} ${D.title} ${D.headBranch}`.toLowerCase().includes(T)):m,k=((H=e==null?void 0:e.issues)==null?void 0:H.length)??0,I=((z=e==null?void 0:e.pullRequests)==null?void 0:z.length)??0;if(a){const D=a==="issue",V=D?C:A,q=D?x:E;return c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-2",children:[c.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-400",children:D?"关联 Issue":"关联 PR"}),c.jsxs("button",{type:"button",onClick:_,className:"flex h-6 items-center gap-1 rounded-md px-2 text-xs text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:[c.jsx(yt,{className:"h-3.5 w-3.5"}),"完成"]})]}),c.jsx("div",{className:"border-b border-line px-3 py-2",children:c.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[c.jsx(tl,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),c.jsx("input",{ref:d,type:"text",value:o,onChange:ae=>u(ae.target.value),placeholder:D?"搜索 issue...":"搜索 PR...",className:"min-w-0 flex-1 bg-transparent font-mono text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),o&&c.jsx("button",{type:"button",onClick:()=>u(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:c.jsx(yt,{className:"h-3 w-3"})})]})}),c.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:V.length===0?c.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:(D?f:m).length===0?D?"暂无 Issue,请先同步":"暂无 PR,请先同步":"无匹配结果"}):c.jsx("ul",{className:"space-y-0.5",children:V.map(ae=>c.jsx(VQ,{linked:q.has(ae.id),number:ae.number,title:ae.title,state:ae.state,mergedAt:D?void 0:ae.mergedAt,isPr:!D,onToggle:()=>S(a,ae.id,q.has(ae.id))},ae.id))})})]})}return c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[c.jsxs("div",{className:"flex items-center gap-1.5 border-b border-line px-3 py-2",children:[c.jsx("span",{className:"flex-1 font-mono text-[10px] text-fg-5",children:k+I>0?`${k+I} 项关联`:"暂无关联"}),c.jsxs("button",{type:"button",onClick:()=>s("issue"),className:"flex h-6 items-center gap-1 rounded-md border border-line px-1.5 text-fg-4 transition-colors hover:border-emerald-500/50 hover:text-emerald-400",children:[c.jsx(Da,{className:"h-3 w-3"}),c.jsx("span",{className:"text-[10px] font-medium",children:"Issue"})]}),c.jsxs("button",{type:"button",onClick:()=>s("pr"),className:"flex h-6 items-center gap-1 rounded-md border border-line px-1.5 text-fg-4 transition-colors hover:border-blue-500/50 hover:text-blue-400",children:[c.jsx(Da,{className:"h-3 w-3"}),c.jsx("span",{className:"text-[10px] font-medium",children:"PR"})]})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-3",children:[k>0&&c.jsxs("div",{className:"mb-3",children:[c.jsxs("div",{className:"mb-1.5 font-mono text-[10px] font-medium uppercase tracking-wider text-fg-5",children:["Issues (",k,")"]}),c.jsx("ul",{className:"space-y-1",children:e.issues.map(D=>c.jsxs("li",{className:"group flex items-start gap-1",children:[c.jsxs("button",{type:"button",onClick:()=>n(`/${encodeURIComponent(r)}/dev/issues?id=${encodeURIComponent(D.id)}`),className:"flex min-w-0 flex-1 items-start gap-2 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-elevated/60",children:[c.jsxs("span",{className:re("mt-0.5 shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-semibold",D.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",D.number]}),c.jsx("span",{className:"line-clamp-2 text-xs leading-5 text-fg-3 group-hover:text-fg-2",children:D.title})]}),c.jsx("button",{type:"button",onClick:()=>void S("issue",D.id,!0),className:"mt-1.5 hidden shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:bg-red-500/15 hover:text-red-400 group-hover:block",children:c.jsx(yt,{className:"h-3 w-3"})})]},D.id))})]}),I>0&&c.jsxs("div",{children:[c.jsxs("div",{className:"mb-1.5 font-mono text-[10px] font-medium uppercase tracking-wider text-fg-5",children:["Pull Requests (",I,")"]}),c.jsx("ul",{className:"space-y-1",children:e.pullRequests.map(D=>c.jsxs("li",{className:"group flex items-start gap-1",children:[c.jsxs("button",{type:"button",onClick:()=>n(`/${encodeURIComponent(r)}/dev/pulls?id=${encodeURIComponent(D.id)}`),className:"flex min-w-0 flex-1 items-start gap-2 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-elevated/60",children:[c.jsxs("span",{className:re("mt-0.5 shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-semibold",D.state==="open"?"bg-emerald-500/15 text-emerald-400":D.mergedAt?"bg-purple-500/15 text-purple-400":"bg-red-500/15 text-red-400"),children:["#",D.number]}),c.jsx("span",{className:"line-clamp-2 text-xs leading-5 text-fg-3 group-hover:text-fg-2",children:D.title})]}),c.jsx("button",{type:"button",onClick:()=>void S("pr",D.id,!0),className:"mt-1.5 hidden shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:bg-red-500/15 hover:text-red-400 group-hover:block",children:c.jsx(yt,{className:"h-3 w-3"})})]},D.id))})]}),k===0&&I===0&&c.jsx("div",{className:"flex flex-1 items-center justify-center py-10",children:c.jsx("p",{className:"font-mono text-xs text-fg-5",children:"点击上方按钮添加关联"})})]})]})}const XQ={"visual-engineering":"bg-purple-500/15 text-purple-400",quick:"bg-emerald-500/15 text-emerald-400",deep:"bg-blue-500/15 text-blue-400",ultrabrain:"bg-amber-500/15 text-amber-400",artistry:"bg-pink-500/15 text-pink-400",writing:"bg-cyan-500/15 text-cyan-400",explore:"bg-teal-500/15 text-teal-400",librarian:"bg-indigo-500/15 text-indigo-400",oracle:"bg-amber-500/15 text-amber-400",metis:"bg-rose-500/15 text-rose-400",momus:"bg-orange-500/15 text-orange-400"};function QQ(e){switch(e){case"idle":return"bg-emerald-500";case"busy":case"retry":return"bg-amber-500 animate-pulse";case"error":return"bg-red-500";default:return"bg-fg-5"}}function sy(e){var n;const t=(n=e.time)==null?void 0:n.created;if(t)return t<1e12?t*1e3:t;if(e.createdAt){const r=Date.parse(e.createdAt);if(!Number.isNaN(r))return r}return null}function ZQ(e){const t=Date.now()-e,n=Math.floor(t/1e3);if(n<60)return"just now";const r=Math.floor(n/60);if(r<60)return`${r}m ago`;const a=Math.floor(r/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function JQ(){const e=Le(d=>d.sessions),t=Le(d=>d.activeSessionId),n=Le(d=>d.sessionStatuses),r=Le(d=>d.setActiveSession),a=e.find(d=>d.id===t),s=(a==null?void 0:a.parentID)??t,o=!!(a!=null&&a.parentID),u=e.filter(d=>d.parentID===s).sort((d,f)=>(sy(f)??0)-(sy(d)??0));return u.length===0?c.jsx("div",{className:"flex flex-1 items-center justify-center",children:c.jsx("p",{className:"font-mono text-xs text-fg-5",children:"暂无子任务"})}):c.jsxs("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:[o&&c.jsxs("div",{className:"mb-1.5 px-2 font-mono text-[10px] text-fg-5",children:["同级子任务 (",u.length,")"]}),c.jsx("ul",{className:"space-y-0.5",children:u.map(d=>{const f=d.id===t,m=n[d.id],p=sy(d),b=(d.agent&&XQ[d.agent])??"bg-elevated text-fg-4",x=d.title||`${d.id.slice(0,9)}...`;return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:()=>{f||r(d.id)},className:re("group flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left transition-colors",f?"border-l-2 border-blue-500 bg-blue-500/5":"border-l-2 border-transparent hover:bg-elevated/60"),children:[c.jsx("span",{className:re("mt-1 h-2 w-2 shrink-0 rounded-full",QQ(m))}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[d.agent&&c.jsx("span",{className:re("shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-medium",b),children:d.agent}),p!=null&&c.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] tabular-nums text-fg-6",children:ZQ(p)})]}),c.jsx("p",{className:re("mt-0.5 line-clamp-2 text-xs leading-5",f?"text-fg-2":"text-fg-3 group-hover:text-fg-2"),children:x})]})]})},d.id)})})]})}const eZ=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg"]),tZ=new Set([".html",".htm",".md",".txt",".log"]),oy=80,nZ=160,wA=.4;function rZ(e){const t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t>=0?e.slice(t+1):e}function aZ({file:e,repoId:t,sessionId:n,onPreviewFile:r}){const a=rZ(e.path),s=BF(t,n,e.path),o=e.ext.toLowerCase();return eZ.has(o)?c.jsxs("li",{className:"flex items-center gap-2 rounded-md px-2 py-1 hover:bg-elevated/60",title:e.path,children:[c.jsx(N7,{className:"h-3 w-3 shrink-0 text-fg-5","aria-hidden":!0}),c.jsx(K1,{url:s,label:a,className:"h-8 w-8 shrink-0 object-cover"}),c.jsx("span",{className:"min-w-0 truncate text-xs text-fg-3",children:a})]}):tZ.has(o)?c.jsx("li",{children:c.jsxs("button",{type:"button",title:e.path,onClick:()=>r==null?void 0:r({url:s,name:a,ext:o}),className:"flex w-full items-center gap-2 rounded-md px-2 py-1 text-left transition-colors hover:bg-elevated/60",children:[c.jsx(lo,{className:"h-3.5 w-3.5 shrink-0 text-fg-4"}),c.jsx("span",{className:"min-w-0 truncate text-xs text-fg-3",children:a})]})}):c.jsxs("li",{className:"flex items-center gap-2 rounded-md px-2 py-1",title:e.path,children:[c.jsx(lo,{className:"h-3.5 w-3.5 shrink-0 text-fg-4"}),c.jsx("span",{className:"min-w-0 truncate text-xs text-fg-3",children:a})]})}function iZ({repoId:e,sessionId:t,containerRef:n,onPreviewFile:r}){const[a,s]=v.useState(!1),[o,u]=v.useState(nZ),[d,f]=v.useState([]),[m,p]=v.useState(0),b=v.useRef(null),x=v.useRef(null);v.useEffect(()=>{let A=!1;const k=()=>{PF(e,t).then(O=>{A||f(O)}).catch(()=>{A||f([])})};k();const I=setInterval(k,1e4);return()=>{A=!0,clearInterval(I)}},[e,t]),v.useEffect(()=>{const A=n.current;if(!A)return;const k=()=>p(A.clientHeight);k();const I=new ResizeObserver(k);return I.observe(A),()=>I.disconnect()},[n]);const E=m>0?m*wA:o,_=Math.max(oy,E),S=Math.min(o,_),T=v.useCallback(A=>{A.preventDefault();const k=n.current,I=Math.max(oy,k?k.clientHeight*wA:_);x.current={startY:A.clientY,startHeight:S,maxHeight:I};const O=H=>{const z=x.current;if(!z)return;const D=z.startY-H.clientY,V=Math.max(oy,Math.min(z.startHeight+D,z.maxHeight));b.current&&(b.current.style.height=`${V}px`)},j=()=>{const H=b.current;if(H){const z=parseInt(H.style.height,10);Number.isNaN(z)||u(z)}x.current=null,window.removeEventListener("mousemove",O),window.removeEventListener("mouseup",j)};window.addEventListener("mousemove",O),window.addEventListener("mouseup",j)},[n,S,_]),C=d.length;return a?c.jsxs("div",{ref:b,className:"flex shrink-0 flex-col border-t border-line bg-surface",style:{height:`${S}px`},children:[c.jsx("div",{onMouseDown:T,role:"separator","aria-orientation":"horizontal",className:"flex h-1 shrink-0 cursor-row-resize items-center justify-center bg-line transition-colors hover:bg-blue-500/60",children:c.jsx(b7,{className:"h-2 w-8 text-fg-6","aria-hidden":!0})}),c.jsxs("button",{type:"button",onClick:()=>s(!1),className:"flex shrink-0 items-center gap-1.5 border-b border-line px-3 py-2 text-left transition-colors hover:bg-elevated/60",children:[c.jsx(lo,{className:"h-3.5 w-3.5 shrink-0 text-fg-4"}),c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"变更文件"}),c.jsx("span",{className:"font-mono text-[10px] text-fg-5",children:C}),c.jsx(Vr,{className:"ml-auto h-3.5 w-3.5 text-fg-5"})]}),c.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-1 py-1",children:C===0?c.jsx("p",{className:"px-2 py-4 text-center font-mono text-xs text-fg-5",children:"暂无变更文件"}):c.jsx("ul",{className:"space-y-0.5",children:d.map(A=>c.jsx(aZ,{file:A,repoId:e,sessionId:t,onPreviewFile:r},A.path))})})]}):c.jsxs("button",{type:"button",onClick:()=>s(!0),className:"flex w-full shrink-0 items-center gap-1.5 border-t border-line px-3 py-2 text-left transition-colors hover:bg-elevated/60",children:[c.jsx(lo,{className:"h-3.5 w-3.5 shrink-0 text-fg-4"}),c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"变更文件"}),c.jsx("span",{className:"font-mono text-[10px] text-fg-5",children:C}),c.jsx(q5,{className:"ml-auto h-3.5 w-3.5 text-fg-5"})]})}function AA({todos:e,messages:t,sessionLinks:n,sessionId:r,onScrollToMessage:a,onPreviewFile:s}){var T,C;const[o,u]=v.useState("todo"),d=v.useRef(null),f=Fe(A=>A.activeRepoId),m=Le(A=>A.sessions),p=Le(A=>A.activeSessionId),b=t.filter(A=>A.role==="user").length,x=(((T=n==null?void 0:n.issues)==null?void 0:T.length)??0)+(((C=n==null?void 0:n.pullRequests)==null?void 0:C.length)??0),E=m.find(A=>A.id===p),_=(E==null?void 0:E.parentID)??p,S=m.filter(A=>A.parentID===_).length;return c.jsxs("div",{ref:d,className:"flex h-full w-72 shrink-0 flex-col border-l border-line bg-surface",children:[c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:[c.jsxs("div",{className:"flex items-center border-b border-line",children:[c.jsxs("button",{type:"button",onClick:()=>u("todo"),className:re("flex flex-1 items-center justify-center gap-1 border-b-2 px-2 py-2.5 text-xs font-medium transition-colors",o==="todo"?"border-blue-500 text-blue-500":"border-transparent text-fg-4 hover:text-fg-2"),children:["待办",e.length>0&&c.jsx("span",{className:"font-mono text-[10px] text-fg-5",children:e.length})]}),c.jsxs("button",{type:"button",onClick:()=>u("prompts"),className:re("flex flex-1 items-center justify-center gap-1 border-b-2 px-2 py-2.5 text-xs font-medium transition-colors",o==="prompts"?"border-blue-500 text-blue-500":"border-transparent text-fg-4 hover:text-fg-2"),children:["输入",b>0&&c.jsx("span",{className:"font-mono text-[10px] text-fg-5",children:b})]}),c.jsxs("button",{type:"button",onClick:()=>u("links"),className:re("flex flex-1 items-center justify-center gap-1 border-b-2 px-2 py-2.5 text-xs font-medium transition-colors",o==="links"?"border-blue-500 text-blue-500":"border-transparent text-fg-4 hover:text-fg-2"),children:["关联",x>0&&c.jsx("span",{className:"font-mono text-[10px] text-fg-5",children:x})]}),c.jsxs("button",{type:"button",onClick:()=>u("subtasks"),className:re("flex flex-1 items-center justify-center gap-1 border-b-2 px-2 py-2.5 text-xs font-medium transition-colors",o==="subtasks"?"border-blue-500 text-blue-500":"border-transparent text-fg-4 hover:text-fg-2"),children:["子任务",S>0&&c.jsx("span",{className:"font-mono text-[10px] text-fg-5",children:S})]})]}),o==="todo"?c.jsx(GQ,{todos:e}):o==="prompts"?c.jsx(KQ,{messages:t,onScrollToMessage:a}):o==="links"?c.jsx(WQ,{links:n,sessionId:r}):c.jsx(JQ,{})]}),r&&f&&c.jsx(iZ,{repoId:f,sessionId:r,containerRef:d,onPreviewFile:s})]})}const CA=8;function sZ(e,t){let n=e instanceof Element?e:null;for(;n&&n!==t;){if(n.scrollWidth>n.clientWidth){const r=getComputedStyle(n).overflowX;if(r==="auto"||r==="scroll")return!0}n=n.parentElement}return!1}function aM({onSwipeLeft:e,onSwipeRight:t,threshold:n=40,disabled:r=!1}={}){const a=v.useRef({x0:0,y0:0,dir:null,on:!1}),s=v.useRef(0),o=v.useCallback(f=>{if(r||sZ(f.target,f.currentTarget))return;const m=f.touches[0];a.current={x0:m.clientX,y0:m.clientY,dir:null,on:!0},s.current=0},[r]),u=v.useCallback(f=>{const m=a.current;if(!m.on)return;const p=f.touches[0].clientX-m.x0,b=f.touches[0].clientY-m.y0;if(!m.dir){(Math.abs(p)>CA||Math.abs(b)>CA)&&(m.dir=Math.abs(p)>Math.abs(b)?"h":"v");return}if(m.dir==="v"){m.on=!1;return}s.current=p},[]),d=v.useCallback(()=>{const f=a.current;if(!f.on||f.dir!=="h"){f.on=!1;return}f.on=!1;const m=s.current;m>n?t==null||t():m<-n&&(e==null||e())},[n,e,t]);return{onTouchStart:o,onTouchMove:u,onTouchEnd:d}}function hv({side:e,open:t,onClose:n,children:r,width:a="w-80"}){const s=e==="left";return c.jsxs("div",{className:"md:hidden",children:[t&&c.jsx("div",{className:"fixed inset-0 z-40 bg-black/50",onClick:n,"aria-hidden":"true"}),c.jsx("div",{className:re("fixed top-0 bottom-0 z-50 flex flex-col bg-surface pt-[var(--safe-top)] pb-[var(--safe-bottom)] shadow-xl transition-transform duration-200 ease-out",a,s?"left-0 border-r border-line":"right-0 border-l border-line",t?"translate-x-0":s?"-translate-x-full":"translate-x-full"),children:r})]})}function mv(e){var t,n;if(typeof((t=e.time)==null?void 0:t.updated)=="number")return e.time.updated;if(typeof((n=e.time)==null?void 0:n.created)=="number")return e.time.created;if(e.createdAt){const r=Date.parse(e.createdAt);return Number.isNaN(r)?0:r}return 0}function oZ(e){const t=mv(e);if(!t)return"";const n=t<1e12?t*1e3:t,r=new Date(n);return r.toDateString()===new Date().toDateString()?r.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):r.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function kA(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>OA(e)):OA(e)}function OA(e){const t=document.createElement("textarea");t.value=e,t.style.cssText="position:fixed;opacity:0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}function lZ(e){switch(e){case"idle":return"bg-emerald-500";case"busy":case"retry":return"bg-amber-500 animate-pulse";case"error":return"bg-red-500";default:return"bg-fg-5"}}const IA="fs:swipe-hint-shown";function uZ({session:e,isActive:t,isConfirming:n,peekHint:r,onSelect:a,onDelete:s,onConfirm:o,onCancelConfirm:u,onRename:d,onToggleComplete:f,status:m,issue:p,linkedItems:b,todos:x}){var de,_e;const E=Km(U=>U.drafts[e.id]),_=!!e.completedAt,S=oZ(e),[T,C]=v.useState(!1),[A,k]=v.useState(""),I=v.useRef(null),O=()=>{var U;k(((U=e.title)==null?void 0:U.trim())||""),C(!0),requestAnimationFrame(()=>{var he;return(he=I.current)==null?void 0:he.focus()})},j=()=>{var he;C(!1);const U=A.trim();U&&U!==(((he=e.title)==null?void 0:he.trim())||"")&&d(U)},[H,z]=v.useState(null),D=v.useRef(null),V=v.useRef(!1),q=()=>{D.current&&(clearTimeout(D.current),D.current=null)},ae=144,Q=v.useRef(null),W=v.useRef(null),G=v.useRef(0),F=v.useRef({x0:0,y0:0,base:0,dir:null,on:!1}),$=U=>{G.current=U;const he=Q.current,Oe=W.current;he&&(he.style.transform=U!==0?`translateX(${U}px)`:"",he.style.pointerEvents=U===-ae?"none":""),Oe&&(Oe.style.width=`${Math.abs(U)}px`)},K=U=>{const he=U.touches[0];F.current={x0:he.clientX,y0:he.clientY,base:G.current,dir:null,on:!0},Q.current&&(Q.current.style.transition="none"),W.current&&(W.current.style.transition="none"),V.current=!1,q(),D.current=setTimeout(()=>{V.current=!0,F.current.on=!1,z({x:he.clientX,y:he.clientY})},500)},L=U=>{const he=F.current;if(!he.on){q();return}const Oe=U.touches[0].clientX-he.x0,pe=U.touches[0].clientY-he.y0;if(!he.dir){(Math.abs(Oe)>5||Math.abs(pe)>5)&&(he.dir=Math.abs(Oe)>Math.abs(pe)?"h":"v",q());return}he.dir!=="v"&&$(Math.max(-ae,Math.min(0,he.base+Oe)))},P=U=>{const he=Q.current,Oe=W.current;he&&(he.style.transition="transform 200ms ease-out"),Oe&&(Oe.style.transition="width 200ms ease-out"),$(U)},ee=()=>{if(q(),V.current){V.current=!1;return}F.current.on=!1,P(G.current<-ae/2?-ae:0)},M=()=>P(0);return v.useEffect(()=>{if(!r)return;const U=-60,he=setTimeout(()=>{const Oe=Q.current,pe=W.current;Oe&&(Oe.style.transition="transform 400ms cubic-bezier(.25,.8,.25,1)"),pe&&(pe.style.transition="width 400ms cubic-bezier(.25,.8,.25,1)"),$(U);const De=setTimeout(()=>{Oe&&(Oe.style.transition="transform 500ms cubic-bezier(.25,.8,.25,1)"),pe&&(pe.style.transition="width 500ms cubic-bezier(.25,.8,.25,1)"),$(0)},800);return()=>clearTimeout(De)},600);return()=>clearTimeout(he)},[r]),c.jsxs("li",{className:"relative overflow-hidden rounded-md",children:[c.jsx("div",{ref:W,className:"absolute right-0 top-0 bottom-0 z-10 overflow-hidden md:hidden",style:{width:0},children:c.jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:ae},children:n?c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",onClick:()=>{s(),M()},className:"flex w-12 items-center justify-center bg-red-500 text-white active:bg-red-600",children:c.jsx(yr,{className:"h-4 w-4"})}),c.jsx("button",{type:"button",onClick:()=>{u(),M()},className:"flex w-12 items-center justify-center bg-neutral-500 text-white active:bg-neutral-600",children:c.jsx(yt,{className:"h-4 w-4"})})]}):c.jsxs(c.Fragment,{children:[c.jsxs("button",{type:"button",onClick:()=>{f(),M()},className:re("flex w-12 flex-col items-center justify-center gap-0.5 text-white",_?"bg-neutral-500 active:bg-neutral-600":"bg-emerald-500 active:bg-emerald-600"),children:[c.jsx(Ox,{className:"h-3.5 w-3.5"}),c.jsx("span",{className:"text-[9px] leading-none",children:_?"撤销":"完成"})]}),c.jsxs("button",{type:"button",onClick:()=>{O(),M()},className:"flex w-12 flex-col items-center justify-center gap-0.5 bg-amber-500 text-white active:bg-amber-600",children:[c.jsx(jw,{className:"h-3.5 w-3.5"}),c.jsx("span",{className:"text-[9px] leading-none",children:"重命名"})]}),c.jsxs("button",{type:"button",onClick:()=>o(),className:"flex w-12 flex-col items-center justify-center gap-0.5 bg-red-500 text-white active:bg-red-600",children:[c.jsx(is,{className:"h-3.5 w-3.5"}),c.jsx("span",{className:"text-[9px] leading-none",children:"删除"})]})]})})}),c.jsxs("div",{ref:Q,className:re("group relative rounded-md border-l-2 will-change-transform",t?"border-blue-500 bg-elevated":"border-transparent bg-surface hover:bg-elevated/50"),onTouchStart:K,onTouchMove:L,onTouchEnd:ee,onContextMenu:U=>U.preventDefault(),children:[c.jsxs("button",{type:"button",onClick:()=>{T||(a(),M())},className:re("block w-full px-2.5 py-2 text-left",_&&!t&&"opacity-50"),style:{pointerEvents:"auto"},children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:re("h-1.5 w-1.5 shrink-0 rounded-full",lZ(m))}),c.jsx("span",{className:"min-w-0 truncate font-mono text-xs text-fg-3",children:((de=e.agent)==null?void 0:de.trim())||"默认"}),_&&c.jsx(Ox,{className:"h-3 w-3 shrink-0 text-emerald-400"}),S&&c.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] tabular-nums text-fg-5",children:S})]}),T?c.jsx("input",{ref:I,type:"text",value:A,onChange:U=>k(U.target.value),onBlur:j,onKeyDown:U=>{U.key==="Enter"&&j(),U.key==="Escape"&&C(!1)},onClick:U=>U.stopPropagation(),className:"mt-0.5 w-full rounded border border-blue-500 bg-base pl-3.5 text-sm text-fg-2 outline-none"}):c.jsxs("div",{className:"mt-0.5 pl-3.5",onDoubleClick:U=>{U.stopPropagation(),O()},children:[(p||b)&&c.jsxs("div",{className:"mb-0.5 flex flex-wrap gap-1",children:[p&&c.jsxs("span",{className:re("shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-medium leading-none",p.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",p.number]}),b==null?void 0:b.map(U=>c.jsx("span",{className:re("shrink-0 rounded px-1 py-0.5 font-mono text-[10px] font-medium leading-none",U.type==="pr"?U.state==="open"?"bg-blue-500/15 text-blue-400":U.mergedAt?"bg-purple-500/15 text-purple-400":"bg-red-500/15 text-red-400":U.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:U.type==="pr"?`PR#${U.number}`:`#${U.number}`},`${U.type}-${U.number}`))]}),c.jsx("span",{className:"block truncate text-sm text-fg-2",children:((_e=e.title)==null?void 0:_e.trim())||"未命名运行"}),E&&c.jsxs("span",{className:"mt-0.5 block truncate text-xs text-amber-400/80",children:["✏️ ",E]}),x.length>0&&(()=>{const U=x.length,he=TR(x);return c.jsxs("span",{className:"mt-0.5 flex items-center gap-1.5 font-mono text-[10px]",children:[c.jsx("span",{className:"shrink-0 tracking-tight",children:x.map(Oe=>{const pe=fl(Oe.status);return c.jsx("span",{className:pe==="completed"?"text-emerald-400":pe==="in_progress"?"text-amber-400":pe==="cancelled"?"text-fg-6":"text-fg-5",children:pe==="pending"?"□":"■"},Oe.id)})}),c.jsxs("span",{className:"tabular-nums text-fg-4",children:[he,"/",U]})]})})()]})]}),n?c.jsxs("span",{className:"absolute right-1.5 top-1.5 hidden items-center gap-1 rounded bg-surface/90 px-0.5 md:flex",children:[c.jsx("button",{type:"button",onClick:s,className:"rounded p-1 text-red-400 hover:bg-red-500/10",children:c.jsx(yr,{className:"h-3.5 w-3.5"})}),c.jsx("button",{type:"button",onClick:u,className:"rounded p-1 text-fg-3 hover:bg-elevated",children:c.jsx(yt,{className:"h-3.5 w-3.5"})})]}):c.jsxs("span",{className:"absolute right-1.5 top-1.5 hidden items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 md:flex",children:[c.jsx("button",{type:"button",onClick:f,title:_?"取消完成":"标记完成",className:re("rounded p-1",_?"text-emerald-400 hover:text-emerald-300":"text-fg-5 hover:text-emerald-400"),children:c.jsx(Ox,{className:"h-3.5 w-3.5"})}),c.jsx("button",{type:"button",onClick:O,title:"重命名",className:"rounded p-1 text-fg-5 hover:text-fg-2",children:c.jsx(jw,{className:"h-3.5 w-3.5"})}),c.jsx("button",{type:"button",onClick:()=>{var U;kA(JSON.stringify({id:e.id,name:((U=e.title)==null?void 0:U.trim())||""},null,2))},title:"复制 Session JSON",className:"rounded p-1 text-fg-5 hover:text-fg-2",children:c.jsx(ap,{className:"h-3.5 w-3.5"})}),c.jsx("button",{type:"button",onClick:o,className:"rounded p-1 text-fg-5 hover:text-red-400",children:c.jsx(is,{className:"h-3.5 w-3.5"})})]})]}),H&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-50",onClick:()=>z(null),onTouchEnd:()=>z(null)}),c.jsx("div",{className:"fixed z-50 min-w-[160px] rounded-lg border border-line bg-surface py-1 shadow-xl",style:{left:Math.min(H.x,window.innerWidth-176),top:H.y,animation:"ctx-fade-in 150ms ease-out"},children:c.jsxs("button",{type:"button",className:"flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm text-fg-2 active:bg-elevated",onClick:()=>{var U;kA(JSON.stringify({id:e.id,name:((U=e.title)==null?void 0:U.trim())||""},null,2)),z(null)},children:[c.jsx(ap,{className:"h-3.5 w-3.5 text-fg-5"}),"复制 Session JSON"]})})]})]})}function RA({onClose:e}){const[t,n]=v.useState(null),[r]=v.useState(()=>typeof window>"u"||localStorage.getItem(IA)?!1:(localStorage.setItem(IA,"1"),!0)),a=Le(k=>k.sessions),s=Le(k=>k.activeSessionId),o=Le(k=>k.sessionStatuses),u=Le(k=>k.sessionFilter),d=Le(k=>k.setSessionFilter),f=Le(k=>k.setActiveSession),m=Le(k=>k.deleteSession),p=Le(k=>k.renameSession),b=Le(k=>k.toggleSessionComplete),x=Fe(k=>k.activeRepoId),E=at(k=>k.issues),_=Le(k=>k.allSessionLinks),S=Le(k=>k.todos),T=[...a].filter(k=>k.parentID?!1:u==="active"?!k.completedAt:!0).sort((k,I)=>mv(I)-mv(k)),C=new Map(E.map(k=>[k.id,k])),A=k=>c.jsx("ul",{className:"space-y-0.5",children:k.map((I,O)=>{const j=I.issueId?C.get(I.issueId):void 0,H=_[I.id],z=[];if(H){for(const D of H.issues)z.push({number:D.number,state:D.state,type:"issue"});for(const D of H.pullRequests)z.push({number:D.number,state:D.state,type:"pr",mergedAt:D.mergedAt})}return c.jsx(uZ,{session:I,isActive:I.id===s,isConfirming:t===I.id,peekHint:r&&O===0,status:o[I.id],issue:j?{number:j.number,title:j.title,state:j.state}:void 0,linkedItems:z.length>0?z:void 0,onSelect:()=>{f(I.id),e==null||e()},onDelete:()=>{m(I.id),n(null)},onConfirm:()=>n(I.id),onCancelConfirm:()=>n(null),onRename:D=>void p(I.id,D),onToggleComplete:()=>void b(I.id),todos:S[I.id]??af},I.id)})});return c.jsx("div",{className:"flex h-full w-80 shrink-0 flex-col border-r border-line bg-surface",children:c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-3",children:[c.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"运行记录"}),x&&c.jsx("button",{type:"button",onClick:()=>{Le.setState({activeSessionId:null}),e==null||e()},title:"新建运行",className:"flex h-7 w-7 items-center justify-center rounded-md bg-blue-600 text-white transition-colors hover:bg-blue-500",children:c.jsx(Da,{className:"h-4 w-4"})})]}),x&&c.jsx("div",{className:"flex gap-1 border-b border-line px-3 py-1.5",children:[["active","进行中"],["all","全部"]].map(([k,I])=>c.jsx("button",{type:"button",onClick:()=>d(k),className:re("rounded-md px-2 py-0.5 font-mono text-[11px] transition-colors",u===k?"bg-elevated text-fg-2":"text-fg-5 hover:text-fg-3"),children:I},k))}),c.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:x?T.length===0?c.jsx("p",{className:"px-2 py-6 text-center font-mono text-xs text-fg-5",children:"暂无运行记录"}):c.jsx("div",{children:A(T)}):c.jsx("p",{className:"px-2 py-6 text-center font-mono text-xs text-fg-5",children:"请先选择一个仓库"})})]})})}function cZ(){const[e,t]=v.useState(()=>typeof window<"u"&&window.matchMedia("(min-width: 1280px)").matches);return v.useEffect(()=>{const n=window.matchMedia("(min-width: 1280px)"),r=a=>t(a.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}function MA(e){const t=document.querySelector(`[data-message-id="${e}"]`);t&&(t.scrollIntoView({behavior:"smooth",block:"center"}),t.classList.add("fs-highlight"),setTimeout(()=>t.classList.remove("fs-highlight"),2e3))}const DA=new Set([".html",".htm"]),dZ=".md";function fZ({file:e}){const[t,n]=v.useState(null),[r,a]=v.useState(!1);return v.useEffect(()=>{DA.has(e.ext)||(a(!0),n(null),fetch(e.url).then(s=>s.text()).then(s=>n(s)).catch(()=>n("加载失败")).finally(()=>a(!1)))},[e.url,e.ext]),DA.has(e.ext)?c.jsx("iframe",{src:e.url,sandbox:"",title:e.name,className:"h-full w-full border-0 bg-white"}):r?c.jsx("p",{className:"p-8 text-center font-mono text-sm text-fg-5",children:"加载中…"}):e.ext===dZ?c.jsx("div",{className:"h-full overflow-y-auto",children:c.jsx("div",{className:"prose prose-invert max-w-none p-6",children:c.jsx(cl,{remarkPlugins:[dl],children:t??""})})}):c.jsx("pre",{className:"h-full overflow-auto whitespace-pre-wrap p-6 font-mono text-xs leading-relaxed text-fg-2",children:t})}function hZ(e){const[t,n]=v.useState([]),[r,a]=v.useState(null);return v.useEffect(()=>{n([]),a(null)},[e]),{tabs:t,activeIdx:r,open:d=>{n(f=>{const m=f.findIndex(p=>p.url===d.url);return m>=0?(a(m),f):(a(f.length),[...f,d])})},close:d=>{n(f=>{const m=f.filter((p,b)=>b!==d);return a(p=>p===d?null:p!==null&&p>d?p-1:p),m})},activate:d=>a(d)}}function mZ(){const[e,t]=v.useState(!1),[n,r]=v.useState(!1),[a,s]=v.useState(!1),o=cZ(),u=Le(T=>T.activeSessionId),d=hZ(u),f=sp(T=>T.sessionPanelCollapsed),m=sp(T=>T.toggleSessionPanel),p=Le(T=>{const C=T.activeSessionId;return C?T.todos[C]??af:af}),b=Le(T=>{const C=T.activeSessionId;return C?T.messages[C]??rf:rf}),x=Le(T=>{const C=T.activeSessionId;return C?T.sessionLinks[C]:void 0});v.useEffect(()=>{o&&u?s(!0):o||s(!1)},[o,u]);const E=a&&!!u,_=()=>{window.matchMedia("(max-width: 767px)").matches?r(T=>!T):s(T=>!T)},S=aM({onSwipeRight:()=>t(!0),onSwipeLeft:()=>r(!0),disabled:e||n});return c.jsxs("div",{className:"flex min-h-0 flex-1",...S,children:[c.jsxs("div",{className:"relative hidden shrink-0 md:flex",children:[c.jsx("div",{className:re("overflow-hidden transition-[width] duration-200 ease-in-out",f?"w-0":"w-80"),children:c.jsx("div",{className:"h-full w-80",children:c.jsx(RA,{})})}),c.jsx("button",{type:"button",onClick:m,title:f?"展开运行记录":"收起运行记录",className:re("absolute left-full top-1/2 z-20 flex h-14 w-4 -translate-y-1/2 items-center justify-center rounded-r-md border-y border-r border-line text-fg-5 transition-all duration-200 hover:bg-elevated hover:text-fg-3",f?"bg-surface opacity-80 hover:w-5 hover:opacity-100":"bg-surface/80 opacity-40 hover:opacity-100"),children:f?c.jsx(m0,{className:"h-3 w-3"}):c.jsx(v1,{className:"h-3 w-3"})})]}),c.jsx(hv,{side:"left",open:e,onClose:()=>t(!1),children:c.jsx(RA,{onClose:()=>t(!1)})}),c.jsx(hv,{side:"right",open:n,onClose:()=>r(!1),children:c.jsx(AA,{todos:p,messages:b,sessionLinks:x,sessionId:u,onScrollToMessage:T=>{r(!1),setTimeout(()=>MA(T),300)}})}),c.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[d.tabs.length>0&&c.jsxs("div",{className:"flex shrink-0 items-end gap-0 border-b border-line bg-surface",children:[c.jsx("button",{type:"button",onClick:()=>d.activate(null),className:re("flex items-center gap-1.5 border-r border-line px-3 py-1.5 text-xs font-medium transition-colors",d.activeIdx===null?"border-b-2 border-b-blue-500 bg-base text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:"对话"}),d.tabs.map((T,C)=>c.jsxs("div",{className:re("group flex items-center gap-1 border-r border-line px-2 py-1.5 text-xs transition-colors",d.activeIdx===C?"border-b-2 border-b-blue-500 bg-base text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:[c.jsx("button",{type:"button",onClick:()=>d.activate(C),className:"min-w-0 max-w-[120px] truncate font-mono",title:T.name,children:T.name}),c.jsx("button",{type:"button",onClick:A=>{A.stopPropagation(),d.close(C)},className:"shrink-0 rounded p-0.5 text-fg-5 opacity-0 transition-opacity hover:bg-elevated hover:text-fg-2 group-hover:opacity-100",children:c.jsx(yt,{className:"h-3 w-3"})})]},T.url))]}),c.jsx("div",{className:re("min-h-0 flex-1 flex flex-col",d.activeIdx!==null&&"hidden"),children:c.jsx(HQ,{onToggleSidebar:()=>t(T=>!T),onToggleRightPanel:_,rightPanelOpen:E})}),d.activeIdx!==null&&d.tabs[d.activeIdx]&&c.jsx("div",{className:"min-h-0 flex-1 bg-base",children:c.jsx(fZ,{file:d.tabs[d.activeIdx]})})]}),E&&c.jsx("div",{className:"hidden shrink-0 md:flex",children:c.jsx(AA,{todos:p,messages:b,sessionLinks:x,sessionId:u,onScrollToMessage:MA,onPreviewFile:d.open})})]})}function pZ({issues:e,tags:t,milestones:n,tagFilterMode:r,stateFilter:a,typeFilter:s,searchQuery:o,selectedMilestoneId:u,selectedAuthor:d,selectedAssignee:f}){const{childIssueIds:m,childrenMap:p}=v.useMemo(()=>{const A=new Set(e.filter(I=>I.parentId).map(I=>I.parentId)),k=new Map;for(const I of e)if(I.parentId){const O=k.get(I.parentId);O?O.push(I):k.set(I.parentId,[I])}return{childIssueIds:A,childrenMap:k}},[e]),b=v.useMemo(()=>A=>A.parentId?"task":m.has(A.id)?"epic":"stray",[m]),x=v.useMemo(()=>new Map(n.map(A=>[A.id,A])),[n]),{afterState:E,finalFiltered:_}=v.useMemo(()=>{const A=a==="all"?e:e.filter(V=>V.state===a),k=s==="all"?A:A.filter(V=>b(V)===s),I=r.size===0?k:k.filter(V=>{var ae;const q=new Set((V.labels??[]).map(Q=>Q.name));for(const[Q,W]of r){const G=(ae=t.find(F=>F.id===Q))==null?void 0:ae.name;if(G&&(W==="include"&&!q.has(G)||W==="exclude"&&q.has(G)))return!1}return!0}),O=o.trim().toLowerCase(),j=O?I.filter(V=>`#${V.number} ${V.title}`.toLowerCase().includes(O)):I,H=u?j.filter(V=>V.milestoneId===u):j,z=d?H.filter(V=>V.authorLogin===d):H,D=f?z.filter(V=>(V.assignees??[]).some(q=>q.login===f)):z;return{afterState:A,finalFiltered:D}},[e,a,s,r,t,o,u,d,f,b]),S=v.useMemo(()=>({open:e.filter(A=>A.state==="open").length,closed:e.filter(A=>A.state==="closed").length,epic:E.filter(A=>b(A)==="epic").length,task:E.filter(A=>b(A)==="task").length,stray:E.filter(A=>b(A)==="stray").length,afterState:E.length}),[e,E,b]),T=v.useMemo(()=>{const A=new Map;for(const k of e)k.authorLogin&&!A.has(k.authorLogin)&&A.set(k.authorLogin,{login:k.authorLogin,avatar:k.authorAvatar});return[...A.values()]},[e]),C=v.useMemo(()=>{const A=new Map;for(const k of e)for(const I of k.assignees??[])A.has(I.login)||A.set(I.login,{login:I.login,avatar:I.avatar_url});return[...A.values()]},[e]);return{childrenMap:p,issueType:b,milestoneMap:x,afterState:E,finalFiltered:_,counts:S,uniqueAuthors:T,uniqueAssignees:C}}const jA=/[#.]/g;function gZ(e,t){const n=e||"",r={};let a=0,s,o;for(;a<n.length;){jA.lastIndex=a;const u=jA.exec(n),d=n.slice(a,u?u.index:n.length);d&&(s?s==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:o=d,a+=d.length),u&&(s=u[0],a++)}return{type:"element",tagName:o||t||"div",properties:r,children:[]}}function iM(e,t,n){const r=n?vZ(n):void 0;function a(s,o,...u){let d;if(s==null){d={type:"root",children:[]};const f=o;u.unshift(f)}else{d=gZ(s,t);const f=d.tagName.toLowerCase(),m=r?r.get(f):void 0;if(d.tagName=m||f,bZ(o))u.unshift(o);else for(const[p,b]of Object.entries(o))xZ(e,d.properties,p,b)}for(const f of u)pv(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return a}function bZ(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const a=t[r];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const s=a;for(const o of s)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function xZ(e,t,n,r){const a=x0(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?a.spaceSeparated?s=s2(r):a.commaSeparated?s=t2(r):a.commaOrSpaceSeparated?s=s2(t2(r).join(" ")):s=LA(a,a.property,r):Array.isArray(r)?s=[...r]:s=a.property==="style"?yZ(r):String(r);if(Array.isArray(s)){const o=[];for(const u of s)o.push(LA(a,a.property,u));s=o}a.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[a.property]=s}}function pv(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)pv(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?pv(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function LA(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Jd(n)===Jd(t)))return!0}return n}function yZ(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function vZ(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const EZ=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],_Z=iM(Cf,"div"),NZ=iM(co,"g",EZ);function TZ(e){const t=String(e),n=[];return{toOffset:a,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let o=0;for(;;){let u=n[o];if(u===void 0){const d=PA(t,n[o-1]);u=d===-1?t.length+1:d+1,n[o]=u}if(u>s)return{line:o+1,column:s-(o>0?n[o-1]:0)+1,offset:s};o++}}}function a(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const u=n[n.length-1],d=PA(t,u),f=d===-1?t.length+1:d+1;if(u===f)break;n.push(f)}const o=(s.line>1?n[s.line-2]:0)+s.column-1;if(o<n[s.line-1])return o}}}function PA(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
535
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Wo={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},sM={}.hasOwnProperty,SZ=Object.prototype;function wZ(e,t){const n=t||{};return Q1({file:n.file||void 0,location:!1,schema:n.space==="svg"?co:Cf,verbose:n.verbose||!1},e)}function Q1(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Vm(e,r,n),n}case"#document":case"#document-fragment":{const r=t,a="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:oM(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const s=String(e.file),o=TZ(s),u=o.toPoint(0),d=o.toPoint(s.length);n.position={start:u,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Vm(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Vm(e,r,n),n}default:return n=AZ(e,t),n}}function oM(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=Q1(e,t[n]);r.push(a)}return r}function AZ(e,t){const n=e.schema;e.schema=t.namespaceURI===Wo.svg?co:Cf;let r=-1;const a={};for(;++r<t.attrs.length;){const u=t.attrs[r],d=(u.prefix?u.prefix+":":"")+u.name;sM.call(SZ,d)||(a[d]=u.value)}const o=(e.schema.space==="svg"?NZ:_Z)(t.tagName,a,oM(e,t.childNodes));if(Vm(e,t,o),o.tagName==="template"){const u=t,d=u.sourceCodeLocation,f=d&&d.startTag&&Cu(d.startTag),m=d&&d.endTag&&Cu(d.endTag),p=Q1(e,u.content);f&&m&&e.file&&(p.position={start:f.end,end:m.start}),o.content=p}return e.schema=n,o}function Vm(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=CZ(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function CZ(e,t,n){const r=Cu(n);if(t.type==="element"){const a=t.children[t.children.length-1];if(r&&!n.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const s={};let o;if(n.attrs)for(o in n.attrs)sM.call(n.attrs,o)&&(s[x0(e.schema,o).property]=Cu(n.attrs[o]));n.startTag;const u=Cu(n.startTag),d=n.endTag?Cu(n.endTag):void 0,f={opening:u};d&&(f.closing=d),f.properties=s,t.data={position:f}}}return r}function Cu(e){const t=BA({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=BA({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function BA(e){return e.line&&e.column?e:void 0}const kZ={},OZ={}.hasOwnProperty,lM=rR("type",{handlers:{root:RZ,element:PZ,text:jZ,comment:LZ,doctype:DZ}});function IZ(e,t){const r=(t||kZ).space;return lM(e,r==="svg"?co:Cf)}function RZ(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Z1(e.children,n,t),rc(e,n),n}function MZ(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Z1(e.children,n,t),rc(e,n),n}function DZ(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return rc(e,t),t}function jZ(e){const t={nodeName:"#text",value:e.value,parentNode:null};return rc(e,t),t}function LZ(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return rc(e,t),t}function PZ(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=co);const a=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&OZ.call(e.properties,s)){const d=BZ(r,s,e.properties[s]);d&&a.push(d)}}const o=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:Wo[o],childNodes:[],parentNode:null};return u.childNodes=Z1(e.children,u,r),rc(e,u),e.tagName==="template"&&e.content&&(u.content=MZ(e.content,r)),u}function BZ(e,t,n){const r=x0(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?gI(n):TI(n));const a={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=a.name.indexOf(":");s<0?a.prefix="":(a.name=a.name.slice(s+1),a.prefix=r.attribute.slice(0,s)),a.namespace=Wo[r.space]}return a}function Z1(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const s=lM(e[r],n);s.parentNode=t,a.push(s)}return a}function rc(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const UZ=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],zZ=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),rn="�";var Y;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(Y||(Y={}));const qr={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function uM(e){return e>=55296&&e<=57343}function FZ(e){return e>=56320&&e<=57343}function HZ(e,t){return(e-55296)*1024+9216+t}function cM(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function dM(e){return e>=64976&&e<=65007||zZ.has(e)}var me;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(me||(me={}));const $Z=65536;class YZ{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=$Z,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:a,offset:s}=this,o=a+n,u=s+n;return{code:t,startLine:r,endLine:r,startCol:o,endCol:o,startOffset:u,endOffset:u}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(FZ(n))return this.pos++,this._addGap(),HZ(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Y.EOF;return this._err(me.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Y.EOF;const r=this.html.charCodeAt(n);return r===Y.CARRIAGE_RETURN?Y.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Y.EOF;let t=this.html.charCodeAt(this.pos);return t===Y.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,Y.LINE_FEED):t===Y.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,uM(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===Y.LINE_FEED||t===Y.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){cM(t)?this._err(me.controlCharacterInInputStream):dM(t)&&this._err(me.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ft;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(ft||(ft={}));function fM(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const qZ=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),GZ=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function KZ(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=GZ.get(e))!==null&&t!==void 0?t:e}var Yn;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Yn||(Yn={}));const VZ=32;var ro;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ro||(ro={}));function gv(e){return e>=Yn.ZERO&&e<=Yn.NINE}function WZ(e){return e>=Yn.UPPER_A&&e<=Yn.UPPER_F||e>=Yn.LOWER_A&&e<=Yn.LOWER_F}function XZ(e){return e>=Yn.UPPER_A&&e<=Yn.UPPER_Z||e>=Yn.LOWER_A&&e<=Yn.LOWER_Z||gv(e)}function QZ(e){return e===Yn.EQUALS||XZ(e)}var Fn;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Fn||(Fn={}));var Qi;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Qi||(Qi={}));class ZZ{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Fn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Qi.Strict}startEntity(t){this.decodeMode=t,this.state=Fn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Fn.EntityStart:return t.charCodeAt(n)===Yn.NUM?(this.state=Fn.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Fn.NamedEntity,this.stateNamedEntity(t,n));case Fn.NumericStart:return this.stateNumericStart(t,n);case Fn.NumericDecimal:return this.stateNumericDecimal(t,n);case Fn.NumericHex:return this.stateNumericHex(t,n);case Fn.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|VZ)===Yn.LOWER_X?(this.state=Fn.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Fn.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,a){if(n!==r){const s=r-n;this.result=this.result*Math.pow(a,s)+Number.parseInt(t.substr(n,s),a),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(gv(a)||WZ(a))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(gv(a))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Yn.SEMI)this.consumed+=1;else if(this.decodeMode===Qi.Strict)return 0;return this.emitCodePoint(KZ(this.result),this.consumed),this.errors&&(t!==Yn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let a=r[this.treeIndex],s=(a&ro.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const o=t.charCodeAt(n);if(this.treeIndex=JZ(r,a,this.treeIndex+Math.max(1,s),o),this.treeIndex<0)return this.result===0||this.decodeMode===Qi.Attribute&&(s===0||QZ(o))?0:this.emitNotTerminatedNamedEntity();if(a=r[this.treeIndex],s=(a&ro.VALUE_LENGTH)>>14,s!==0){if(o===Yn.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Qi.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,a=(r[n]&ro.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~ro.VALUE_LENGTH:a[t+1],r),n===3&&this.emitCodePoint(a[t+2],r),r}end(){var t;switch(this.state){case Fn.NamedEntity:return this.result!==0&&(this.decodeMode!==Qi.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Fn.NumericDecimal:return this.emitNumericEntity(0,2);case Fn.NumericHex:return this.emitNumericEntity(0,3);case Fn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Fn.EntityStart:return 0}}}function JZ(e,t,n,r){const a=(t&ro.BRANCH_LENGTH)>>7,s=t&ro.JUMP_TABLE;if(a===0)return s!==0&&r===s?n:-1;if(s){const d=r-s;return d<0||d>=a?-1:e[n+d]-1}let o=n,u=o+a-1;for(;o<=u;){const d=o+u>>>1,f=e[d];if(f<r)o=d+1;else if(f>r)u=d-1;else return e[d+a]}return-1}var Te;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(Te||(Te={}));var rl;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(rl||(rl={}));var Oa;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Oa||(Oa={}));var se;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(se||(se={}));var w;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(w||(w={}));const eJ=new Map([[se.A,w.A],[se.ADDRESS,w.ADDRESS],[se.ANNOTATION_XML,w.ANNOTATION_XML],[se.APPLET,w.APPLET],[se.AREA,w.AREA],[se.ARTICLE,w.ARTICLE],[se.ASIDE,w.ASIDE],[se.B,w.B],[se.BASE,w.BASE],[se.BASEFONT,w.BASEFONT],[se.BGSOUND,w.BGSOUND],[se.BIG,w.BIG],[se.BLOCKQUOTE,w.BLOCKQUOTE],[se.BODY,w.BODY],[se.BR,w.BR],[se.BUTTON,w.BUTTON],[se.CAPTION,w.CAPTION],[se.CENTER,w.CENTER],[se.CODE,w.CODE],[se.COL,w.COL],[se.COLGROUP,w.COLGROUP],[se.DD,w.DD],[se.DESC,w.DESC],[se.DETAILS,w.DETAILS],[se.DIALOG,w.DIALOG],[se.DIR,w.DIR],[se.DIV,w.DIV],[se.DL,w.DL],[se.DT,w.DT],[se.EM,w.EM],[se.EMBED,w.EMBED],[se.FIELDSET,w.FIELDSET],[se.FIGCAPTION,w.FIGCAPTION],[se.FIGURE,w.FIGURE],[se.FONT,w.FONT],[se.FOOTER,w.FOOTER],[se.FOREIGN_OBJECT,w.FOREIGN_OBJECT],[se.FORM,w.FORM],[se.FRAME,w.FRAME],[se.FRAMESET,w.FRAMESET],[se.H1,w.H1],[se.H2,w.H2],[se.H3,w.H3],[se.H4,w.H4],[se.H5,w.H5],[se.H6,w.H6],[se.HEAD,w.HEAD],[se.HEADER,w.HEADER],[se.HGROUP,w.HGROUP],[se.HR,w.HR],[se.HTML,w.HTML],[se.I,w.I],[se.IMG,w.IMG],[se.IMAGE,w.IMAGE],[se.INPUT,w.INPUT],[se.IFRAME,w.IFRAME],[se.KEYGEN,w.KEYGEN],[se.LABEL,w.LABEL],[se.LI,w.LI],[se.LINK,w.LINK],[se.LISTING,w.LISTING],[se.MAIN,w.MAIN],[se.MALIGNMARK,w.MALIGNMARK],[se.MARQUEE,w.MARQUEE],[se.MATH,w.MATH],[se.MENU,w.MENU],[se.META,w.META],[se.MGLYPH,w.MGLYPH],[se.MI,w.MI],[se.MO,w.MO],[se.MN,w.MN],[se.MS,w.MS],[se.MTEXT,w.MTEXT],[se.NAV,w.NAV],[se.NOBR,w.NOBR],[se.NOFRAMES,w.NOFRAMES],[se.NOEMBED,w.NOEMBED],[se.NOSCRIPT,w.NOSCRIPT],[se.OBJECT,w.OBJECT],[se.OL,w.OL],[se.OPTGROUP,w.OPTGROUP],[se.OPTION,w.OPTION],[se.P,w.P],[se.PARAM,w.PARAM],[se.PLAINTEXT,w.PLAINTEXT],[se.PRE,w.PRE],[se.RB,w.RB],[se.RP,w.RP],[se.RT,w.RT],[se.RTC,w.RTC],[se.RUBY,w.RUBY],[se.S,w.S],[se.SCRIPT,w.SCRIPT],[se.SEARCH,w.SEARCH],[se.SECTION,w.SECTION],[se.SELECT,w.SELECT],[se.SOURCE,w.SOURCE],[se.SMALL,w.SMALL],[se.SPAN,w.SPAN],[se.STRIKE,w.STRIKE],[se.STRONG,w.STRONG],[se.STYLE,w.STYLE],[se.SUB,w.SUB],[se.SUMMARY,w.SUMMARY],[se.SUP,w.SUP],[se.TABLE,w.TABLE],[se.TBODY,w.TBODY],[se.TEMPLATE,w.TEMPLATE],[se.TEXTAREA,w.TEXTAREA],[se.TFOOT,w.TFOOT],[se.TD,w.TD],[se.TH,w.TH],[se.THEAD,w.THEAD],[se.TITLE,w.TITLE],[se.TR,w.TR],[se.TRACK,w.TRACK],[se.TT,w.TT],[se.U,w.U],[se.UL,w.UL],[se.SVG,w.SVG],[se.VAR,w.VAR],[se.WBR,w.WBR],[se.XMP,w.XMP]]);function ac(e){var t;return(t=eJ.get(e))!==null&&t!==void 0?t:w.UNKNOWN}const Se=w,tJ={[Te.HTML]:new Set([Se.ADDRESS,Se.APPLET,Se.AREA,Se.ARTICLE,Se.ASIDE,Se.BASE,Se.BASEFONT,Se.BGSOUND,Se.BLOCKQUOTE,Se.BODY,Se.BR,Se.BUTTON,Se.CAPTION,Se.CENTER,Se.COL,Se.COLGROUP,Se.DD,Se.DETAILS,Se.DIR,Se.DIV,Se.DL,Se.DT,Se.EMBED,Se.FIELDSET,Se.FIGCAPTION,Se.FIGURE,Se.FOOTER,Se.FORM,Se.FRAME,Se.FRAMESET,Se.H1,Se.H2,Se.H3,Se.H4,Se.H5,Se.H6,Se.HEAD,Se.HEADER,Se.HGROUP,Se.HR,Se.HTML,Se.IFRAME,Se.IMG,Se.INPUT,Se.LI,Se.LINK,Se.LISTING,Se.MAIN,Se.MARQUEE,Se.MENU,Se.META,Se.NAV,Se.NOEMBED,Se.NOFRAMES,Se.NOSCRIPT,Se.OBJECT,Se.OL,Se.P,Se.PARAM,Se.PLAINTEXT,Se.PRE,Se.SCRIPT,Se.SECTION,Se.SELECT,Se.SOURCE,Se.STYLE,Se.SUMMARY,Se.TABLE,Se.TBODY,Se.TD,Se.TEMPLATE,Se.TEXTAREA,Se.TFOOT,Se.TH,Se.THEAD,Se.TITLE,Se.TR,Se.TRACK,Se.UL,Se.WBR,Se.XMP]),[Te.MATHML]:new Set([Se.MI,Se.MO,Se.MN,Se.MS,Se.MTEXT,Se.ANNOTATION_XML]),[Te.SVG]:new Set([Se.TITLE,Se.FOREIGN_OBJECT,Se.DESC]),[Te.XLINK]:new Set,[Te.XML]:new Set,[Te.XMLNS]:new Set},bv=new Set([Se.H1,Se.H2,Se.H3,Se.H4,Se.H5,Se.H6]);se.STYLE,se.SCRIPT,se.XMP,se.IFRAME,se.NOEMBED,se.NOFRAMES,se.PLAINTEXT;var X;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(X||(X={}));const _n={DATA:X.DATA,RCDATA:X.RCDATA,RAWTEXT:X.RAWTEXT,SCRIPT_DATA:X.SCRIPT_DATA,PLAINTEXT:X.PLAINTEXT,CDATA_SECTION:X.CDATA_SECTION};function nJ(e){return e>=Y.DIGIT_0&&e<=Y.DIGIT_9}function Md(e){return e>=Y.LATIN_CAPITAL_A&&e<=Y.LATIN_CAPITAL_Z}function rJ(e){return e>=Y.LATIN_SMALL_A&&e<=Y.LATIN_SMALL_Z}function Zs(e){return rJ(e)||Md(e)}function UA(e){return Zs(e)||nJ(e)}function Sm(e){return e+32}function hM(e){return e===Y.SPACE||e===Y.LINE_FEED||e===Y.TABULATION||e===Y.FORM_FEED}function zA(e){return hM(e)||e===Y.SOLIDUS||e===Y.GREATER_THAN_SIGN}function aJ(e){return e===Y.NULL?me.nullCharacterReference:e>1114111?me.characterReferenceOutsideUnicodeRange:uM(e)?me.surrogateCharacterReference:dM(e)?me.noncharacterCharacterReference:cM(e)||e===Y.CARRIAGE_RETURN?me.controlCharacterReference:null}class iJ{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=X.DATA,this.returnState=X.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new YZ(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new ZZ(qZ,(r,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(me.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(me.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const a=aJ(r);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var r,a;(a=(r=this.handler).onParseError)===null||a===void 0||a.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ft.START_TAG,tagName:"",tagID:w.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ft.END_TAG,tagName:"",tagID:w.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ft.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ft.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(fM(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const a=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(me.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=ac(t.tagName),t.type===ft.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(me.endTagWithAttributes),t.selfClosing&&this._err(me.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case ft.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ft.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ft.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:ft.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=hM(t)?ft.WHITESPACE_CHARACTER:t===Y.NULL?ft.NULL_CHARACTER:ft.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ft.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=X.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Qi.Attribute:Qi.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===X.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===X.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===X.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case X.DATA:{this._stateData(t);break}case X.RCDATA:{this._stateRcdata(t);break}case X.RAWTEXT:{this._stateRawtext(t);break}case X.SCRIPT_DATA:{this._stateScriptData(t);break}case X.PLAINTEXT:{this._statePlaintext(t);break}case X.TAG_OPEN:{this._stateTagOpen(t);break}case X.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case X.TAG_NAME:{this._stateTagName(t);break}case X.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case X.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case X.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case X.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case X.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case X.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case X.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case X.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case X.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case X.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case X.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case X.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case X.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case X.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case X.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case X.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case X.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case X.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case X.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case X.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case X.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case X.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case X.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case X.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case X.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case X.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case X.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case X.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case X.BOGUS_COMMENT:{this._stateBogusComment(t);break}case X.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case X.COMMENT_START:{this._stateCommentStart(t);break}case X.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case X.COMMENT:{this._stateComment(t);break}case X.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case X.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case X.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case X.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case X.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case X.COMMENT_END:{this._stateCommentEnd(t);break}case X.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case X.DOCTYPE:{this._stateDoctype(t);break}case X.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case X.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case X.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case X.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case X.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case X.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case X.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case X.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case X.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case X.CDATA_SECTION:{this._stateCdataSection(t);break}case X.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case X.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case X.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case X.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case Y.LESS_THAN_SIGN:{this.state=X.TAG_OPEN;break}case Y.AMPERSAND:{this._startCharacterReference();break}case Y.NULL:{this._err(me.unexpectedNullCharacter),this._emitCodePoint(t);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case Y.AMPERSAND:{this._startCharacterReference();break}case Y.LESS_THAN_SIGN:{this.state=X.RCDATA_LESS_THAN_SIGN;break}case Y.NULL:{this._err(me.unexpectedNullCharacter),this._emitChars(rn);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case Y.LESS_THAN_SIGN:{this.state=X.RAWTEXT_LESS_THAN_SIGN;break}case Y.NULL:{this._err(me.unexpectedNullCharacter),this._emitChars(rn);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case Y.LESS_THAN_SIGN:{this.state=X.SCRIPT_DATA_LESS_THAN_SIGN;break}case Y.NULL:{this._err(me.unexpectedNullCharacter),this._emitChars(rn);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case Y.NULL:{this._err(me.unexpectedNullCharacter),this._emitChars(rn);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Zs(t))this._createStartTagToken(),this.state=X.TAG_NAME,this._stateTagName(t);else switch(t){case Y.EXCLAMATION_MARK:{this.state=X.MARKUP_DECLARATION_OPEN;break}case Y.SOLIDUS:{this.state=X.END_TAG_OPEN;break}case Y.QUESTION_MARK:{this._err(me.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=X.BOGUS_COMMENT,this._stateBogusComment(t);break}case Y.EOF:{this._err(me.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(me.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=X.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Zs(t))this._createEndTagToken(),this.state=X.TAG_NAME,this._stateTagName(t);else switch(t){case Y.GREATER_THAN_SIGN:{this._err(me.missingEndTagName),this.state=X.DATA;break}case Y.EOF:{this._err(me.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(me.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=X.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=X.BEFORE_ATTRIBUTE_NAME;break}case Y.SOLIDUS:{this.state=X.SELF_CLOSING_START_TAG;break}case Y.GREATER_THAN_SIGN:{this.state=X.DATA,this.emitCurrentTagToken();break}case Y.NULL:{this._err(me.unexpectedNullCharacter),n.tagName+=rn;break}case Y.EOF:{this._err(me.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Md(t)?Sm(t):t)}}_stateRcdataLessThanSign(t){t===Y.SOLIDUS?this.state=X.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=X.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Zs(t)?(this.state=X.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=X.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=X.BEFORE_ATTRIBUTE_NAME,!1;case Y.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=X.SELF_CLOSING_START_TAG,!1;case Y.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=X.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=X.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===Y.SOLIDUS?this.state=X.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=X.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Zs(t)?(this.state=X.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=X.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=X.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case Y.SOLIDUS:{this.state=X.SCRIPT_DATA_END_TAG_OPEN;break}case Y.EXCLAMATION_MARK:{this.state=X.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=X.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Zs(t)?(this.state=X.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=X.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=X.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===Y.HYPHEN_MINUS?(this.state=X.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=X.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===Y.HYPHEN_MINUS?(this.state=X.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=X.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case Y.HYPHEN_MINUS:{this.state=X.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Y.NULL:{this._err(me.unexpectedNullCharacter),this._emitChars(rn);break}case Y.EOF:{this._err(me.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case Y.HYPHEN_MINUS:{this.state=X.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Y.NULL:{this._err(me.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_ESCAPED,this._emitChars(rn);break}case Y.EOF:{this._err(me.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=X.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case Y.HYPHEN_MINUS:{this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Y.GREATER_THAN_SIGN:{this.state=X.SCRIPT_DATA,this._emitChars(">");break}case Y.NULL:{this._err(me.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_ESCAPED,this._emitChars(rn);break}case Y.EOF:{this._err(me.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=X.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===Y.SOLIDUS?this.state=X.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Zs(t)?(this._emitChars("<"),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Zs(t)?(this.state=X.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(qr.SCRIPT,!1)&&zA(this.preprocessor.peek(qr.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<qr.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case Y.HYPHEN_MINUS:{this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Y.NULL:{this._err(me.unexpectedNullCharacter),this._emitChars(rn);break}case Y.EOF:{this._err(me.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case Y.HYPHEN_MINUS:{this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Y.NULL:{this._err(me.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(rn);break}case Y.EOF:{this._err(me.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case Y.HYPHEN_MINUS:{this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Y.GREATER_THAN_SIGN:{this.state=X.SCRIPT_DATA,this._emitChars(">");break}case Y.NULL:{this._err(me.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(rn);break}case Y.EOF:{this._err(me.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===Y.SOLIDUS?(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(qr.SCRIPT,!1)&&zA(this.preprocessor.peek(qr.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<qr.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=X.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.SOLIDUS:case Y.GREATER_THAN_SIGN:case Y.EOF:{this.state=X.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case Y.EQUALS_SIGN:{this._err(me.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=X.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=X.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:case Y.SOLIDUS:case Y.GREATER_THAN_SIGN:case Y.EOF:{this._leaveAttrName(),this.state=X.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case Y.EQUALS_SIGN:{this._leaveAttrName(),this.state=X.BEFORE_ATTRIBUTE_VALUE;break}case Y.QUOTATION_MARK:case Y.APOSTROPHE:case Y.LESS_THAN_SIGN:{this._err(me.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case Y.NULL:{this._err(me.unexpectedNullCharacter),this.currentAttr.name+=rn;break}default:this.currentAttr.name+=String.fromCodePoint(Md(t)?Sm(t):t)}}_stateAfterAttributeName(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.SOLIDUS:{this.state=X.SELF_CLOSING_START_TAG;break}case Y.EQUALS_SIGN:{this.state=X.BEFORE_ATTRIBUTE_VALUE;break}case Y.GREATER_THAN_SIGN:{this.state=X.DATA,this.emitCurrentTagToken();break}case Y.EOF:{this._err(me.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=X.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.QUOTATION_MARK:{this.state=X.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{this.state=X.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(me.missingAttributeValue),this.state=X.DATA,this.emitCurrentTagToken();break}default:this.state=X.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case Y.QUOTATION_MARK:{this.state=X.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case Y.AMPERSAND:{this._startCharacterReference();break}case Y.NULL:{this._err(me.unexpectedNullCharacter),this.currentAttr.value+=rn;break}case Y.EOF:{this._err(me.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case Y.APOSTROPHE:{this.state=X.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case Y.AMPERSAND:{this._startCharacterReference();break}case Y.NULL:{this._err(me.unexpectedNullCharacter),this.currentAttr.value+=rn;break}case Y.EOF:{this._err(me.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this._leaveAttrValue(),this.state=X.BEFORE_ATTRIBUTE_NAME;break}case Y.AMPERSAND:{this._startCharacterReference();break}case Y.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=X.DATA,this.emitCurrentTagToken();break}case Y.NULL:{this._err(me.unexpectedNullCharacter),this.currentAttr.value+=rn;break}case Y.QUOTATION_MARK:case Y.APOSTROPHE:case Y.LESS_THAN_SIGN:case Y.EQUALS_SIGN:case Y.GRAVE_ACCENT:{this._err(me.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case Y.EOF:{this._err(me.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this._leaveAttrValue(),this.state=X.BEFORE_ATTRIBUTE_NAME;break}case Y.SOLIDUS:{this._leaveAttrValue(),this.state=X.SELF_CLOSING_START_TAG;break}case Y.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=X.DATA,this.emitCurrentTagToken();break}case Y.EOF:{this._err(me.eofInTag),this._emitEOFToken();break}default:this._err(me.missingWhitespaceBetweenAttributes),this.state=X.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case Y.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=X.DATA,this.emitCurrentTagToken();break}case Y.EOF:{this._err(me.eofInTag),this._emitEOFToken();break}default:this._err(me.unexpectedSolidusInTag),this.state=X.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case Y.GREATER_THAN_SIGN:{this.state=X.DATA,this.emitCurrentComment(n);break}case Y.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case Y.NULL:{this._err(me.unexpectedNullCharacter),n.data+=rn;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(qr.DASH_DASH,!0)?(this._createCommentToken(qr.DASH_DASH.length+1),this.state=X.COMMENT_START):this._consumeSequenceIfMatch(qr.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(qr.DOCTYPE.length+1),this.state=X.DOCTYPE):this._consumeSequenceIfMatch(qr.CDATA_START,!0)?this.inForeignNode?this.state=X.CDATA_SECTION:(this._err(me.cdataInHtmlContent),this._createCommentToken(qr.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=X.BOGUS_COMMENT):this._ensureHibernation()||(this._err(me.incorrectlyOpenedComment),this._createCommentToken(2),this.state=X.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case Y.HYPHEN_MINUS:{this.state=X.COMMENT_START_DASH;break}case Y.GREATER_THAN_SIGN:{this._err(me.abruptClosingOfEmptyComment),this.state=X.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=X.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case Y.HYPHEN_MINUS:{this.state=X.COMMENT_END;break}case Y.GREATER_THAN_SIGN:{this._err(me.abruptClosingOfEmptyComment),this.state=X.DATA,this.emitCurrentComment(n);break}case Y.EOF:{this._err(me.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=X.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case Y.HYPHEN_MINUS:{this.state=X.COMMENT_END_DASH;break}case Y.LESS_THAN_SIGN:{n.data+="<",this.state=X.COMMENT_LESS_THAN_SIGN;break}case Y.NULL:{this._err(me.unexpectedNullCharacter),n.data+=rn;break}case Y.EOF:{this._err(me.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case Y.EXCLAMATION_MARK:{n.data+="!",this.state=X.COMMENT_LESS_THAN_SIGN_BANG;break}case Y.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=X.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===Y.HYPHEN_MINUS?this.state=X.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=X.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===Y.HYPHEN_MINUS?this.state=X.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=X.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==Y.GREATER_THAN_SIGN&&t!==Y.EOF&&this._err(me.nestedComment),this.state=X.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case Y.HYPHEN_MINUS:{this.state=X.COMMENT_END;break}case Y.EOF:{this._err(me.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=X.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case Y.GREATER_THAN_SIGN:{this.state=X.DATA,this.emitCurrentComment(n);break}case Y.EXCLAMATION_MARK:{this.state=X.COMMENT_END_BANG;break}case Y.HYPHEN_MINUS:{n.data+="-";break}case Y.EOF:{this._err(me.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=X.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case Y.HYPHEN_MINUS:{n.data+="--!",this.state=X.COMMENT_END_DASH;break}case Y.GREATER_THAN_SIGN:{this._err(me.incorrectlyClosedComment),this.state=X.DATA,this.emitCurrentComment(n);break}case Y.EOF:{this._err(me.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=X.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=X.BEFORE_DOCTYPE_NAME;break}case Y.GREATER_THAN_SIGN:{this.state=X.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case Y.EOF:{this._err(me.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(me.missingWhitespaceBeforeDoctypeName),this.state=X.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Md(t))this._createDoctypeToken(String.fromCharCode(Sm(t))),this.state=X.DOCTYPE_NAME;else switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.NULL:{this._err(me.unexpectedNullCharacter),this._createDoctypeToken(rn),this.state=X.DOCTYPE_NAME;break}case Y.GREATER_THAN_SIGN:{this._err(me.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=X.DATA;break}case Y.EOF:{this._err(me.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=X.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=X.AFTER_DOCTYPE_NAME;break}case Y.GREATER_THAN_SIGN:{this.state=X.DATA,this.emitCurrentDoctype(n);break}case Y.NULL:{this._err(me.unexpectedNullCharacter),n.name+=rn;break}case Y.EOF:{this._err(me.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Md(t)?Sm(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.GREATER_THAN_SIGN:{this.state=X.DATA,this.emitCurrentDoctype(n);break}case Y.EOF:{this._err(me.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(qr.PUBLIC,!1)?this.state=X.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(qr.SYSTEM,!1)?this.state=X.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(me.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=X.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case Y.QUOTATION_MARK:{this._err(me.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{this._err(me.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(me.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(n);break}case Y.EOF:{this._err(me.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(me.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.QUOTATION_MARK:{n.publicId="",this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{n.publicId="",this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(me.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(n);break}case Y.EOF:{this._err(me.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(me.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case Y.QUOTATION_MARK:{this.state=X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case Y.NULL:{this._err(me.unexpectedNullCharacter),n.publicId+=rn;break}case Y.GREATER_THAN_SIGN:{this._err(me.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=X.DATA;break}case Y.EOF:{this._err(me.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case Y.APOSTROPHE:{this.state=X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case Y.NULL:{this._err(me.unexpectedNullCharacter),n.publicId+=rn;break}case Y.GREATER_THAN_SIGN:{this._err(me.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=X.DATA;break}case Y.EOF:{this._err(me.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=X.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case Y.GREATER_THAN_SIGN:{this.state=X.DATA,this.emitCurrentDoctype(n);break}case Y.QUOTATION_MARK:{this._err(me.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{this._err(me.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Y.EOF:{this._err(me.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(me.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=X.DATA;break}case Y.QUOTATION_MARK:{n.systemId="",this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{n.systemId="",this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Y.EOF:{this._err(me.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(me.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=X.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case Y.QUOTATION_MARK:{this._err(me.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{this._err(me.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(me.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(n);break}case Y.EOF:{this._err(me.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(me.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.QUOTATION_MARK:{n.systemId="",this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{n.systemId="",this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(me.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(n);break}case Y.EOF:{this._err(me.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(me.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case Y.QUOTATION_MARK:{this.state=X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case Y.NULL:{this._err(me.unexpectedNullCharacter),n.systemId+=rn;break}case Y.GREATER_THAN_SIGN:{this._err(me.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=X.DATA;break}case Y.EOF:{this._err(me.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case Y.APOSTROPHE:{this.state=X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case Y.NULL:{this._err(me.unexpectedNullCharacter),n.systemId+=rn;break}case Y.GREATER_THAN_SIGN:{this._err(me.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=X.DATA;break}case Y.EOF:{this._err(me.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=X.DATA;break}case Y.EOF:{this._err(me.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(me.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case Y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=X.DATA;break}case Y.NULL:{this._err(me.unexpectedNullCharacter);break}case Y.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case Y.RIGHT_SQUARE_BRACKET:{this.state=X.CDATA_SECTION_BRACKET;break}case Y.EOF:{this._err(me.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===Y.RIGHT_SQUARE_BRACKET?this.state=X.CDATA_SECTION_END:(this._emitChars("]"),this.state=X.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case Y.GREATER_THAN_SIGN:{this.state=X.DATA;break}case Y.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=X.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(Y.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&UA(this.preprocessor.peek(1))?X.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){UA(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===Y.SEMICOLON&&this._err(me.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const mM=new Set([w.DD,w.DT,w.LI,w.OPTGROUP,w.OPTION,w.P,w.RB,w.RP,w.RT,w.RTC]),FA=new Set([...mM,w.CAPTION,w.COLGROUP,w.TBODY,w.TD,w.TFOOT,w.TH,w.THEAD,w.TR]),bp=new Set([w.APPLET,w.CAPTION,w.HTML,w.MARQUEE,w.OBJECT,w.TABLE,w.TD,w.TEMPLATE,w.TH]),sJ=new Set([...bp,w.OL,w.UL]),oJ=new Set([...bp,w.BUTTON]),HA=new Set([w.ANNOTATION_XML,w.MI,w.MN,w.MO,w.MS,w.MTEXT]),$A=new Set([w.DESC,w.FOREIGN_OBJECT,w.TITLE]),lJ=new Set([w.TR,w.TEMPLATE,w.HTML]),uJ=new Set([w.TBODY,w.TFOOT,w.THEAD,w.TEMPLATE,w.HTML]),cJ=new Set([w.TABLE,w.TEMPLATE,w.HTML]),dJ=new Set([w.TD,w.TH]);class fJ{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=w.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===w.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Te.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,r),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==Te.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(bv,Te.HTML)}popUntilTableCellPopped(){this.popUntilPopped(dJ,Te.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(cJ,Te.HTML)}clearBackToTableBodyContext(){this.clearBackTo(uJ,Te.HTML)}clearBackToTableRowContext(){this.clearBackTo(lJ,Te.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===w.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===w.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const a=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case Te.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case Te.SVG:{if($A.has(a))return!1;break}case Te.MATHML:{if(HA.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,bp)}hasInListItemScope(t){return this.hasInDynamicScope(t,sJ)}hasInButtonScope(t){return this.hasInDynamicScope(t,oJ)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case Te.HTML:{if(bv.has(n))return!0;if(bp.has(n))return!1;break}case Te.SVG:{if($A.has(n))return!1;break}case Te.MATHML:{if(HA.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===Te.HTML)switch(this.tagIDs[n]){case t:return!0;case w.TABLE:case w.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===Te.HTML)switch(this.tagIDs[t]){case w.TBODY:case w.THEAD:case w.TFOOT:return!0;case w.TABLE:case w.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===Te.HTML)switch(this.tagIDs[n]){case t:return!0;case w.OPTION:case w.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&mM.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&FA.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&FA.has(this.currentTagId);)this.pop()}}const ly=3;var bi;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(bi||(bi={}));const YA={type:bi.Marker};class hJ{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],a=n.length,s=this.treeAdapter.getTagName(t),o=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const d=this.entries[u];if(d.type===bi.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===s&&this.treeAdapter.getNamespaceURI(f)===o){const m=this.treeAdapter.getAttrList(f);m.length===a&&r.push({idx:u,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<ly)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<ly)return;const a=new Map(n.map(o=>[o.name,o.value]));let s=0;for(let o=0;o<r.length;o++){const u=r[o];u.attrs.every(d=>a.get(d.name)===d.value)&&(s+=1,s>=ly&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(YA)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:bi.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:bi.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(YA);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===bi.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===bi.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===bi.Element&&n.element===t)}}const Js={createDocument(){return{nodeName:"#document",mode:Oa.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const a=e.childNodes.find(s=>s.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Js.appendChild(e,s)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Js.isTextNode(n)){n.value+=t;return}}Js.appendChild(e,Js.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Js.isTextNode(r)?r.value+=t:Js.insertBefore(e,Js.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},pM="html",mJ="about:legacy-compat",pJ="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",gM=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],gJ=[...gM,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],bJ=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),bM=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],xJ=[...bM,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function qA(e,t){return t.some(n=>e.startsWith(n))}function yJ(e){return e.name===pM&&e.publicId===null&&(e.systemId===null||e.systemId===mJ)}function vJ(e){if(e.name!==pM)return Oa.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===pJ)return Oa.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),bJ.has(n))return Oa.QUIRKS;let r=t===null?gJ:gM;if(qA(n,r))return Oa.QUIRKS;if(r=t===null?bM:xJ,qA(n,r))return Oa.LIMITED_QUIRKS}return Oa.NO_QUIRKS}const GA={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},EJ="definitionurl",_J="definitionURL",NJ=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),TJ=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:Te.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:Te.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:Te.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:Te.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:Te.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:Te.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:Te.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:Te.XML}],["xml:space",{prefix:"xml",name:"space",namespace:Te.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:Te.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:Te.XMLNS}]]),SJ=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),wJ=new Set([w.B,w.BIG,w.BLOCKQUOTE,w.BODY,w.BR,w.CENTER,w.CODE,w.DD,w.DIV,w.DL,w.DT,w.EM,w.EMBED,w.H1,w.H2,w.H3,w.H4,w.H5,w.H6,w.HEAD,w.HR,w.I,w.IMG,w.LI,w.LISTING,w.MENU,w.META,w.NOBR,w.OL,w.P,w.PRE,w.RUBY,w.S,w.SMALL,w.SPAN,w.STRONG,w.STRIKE,w.SUB,w.SUP,w.TABLE,w.TT,w.U,w.UL,w.VAR]);function AJ(e){const t=e.tagID;return t===w.FONT&&e.attrs.some(({name:r})=>r===rl.COLOR||r===rl.SIZE||r===rl.FACE)||wJ.has(t)}function xM(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===EJ){e.attrs[t].name=_J;break}}function yM(e){for(let t=0;t<e.attrs.length;t++){const n=NJ.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function J1(e){for(let t=0;t<e.attrs.length;t++){const n=TJ.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function CJ(e){const t=SJ.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ac(e.tagName))}function kJ(e,t){return t===Te.MATHML&&(e===w.MI||e===w.MO||e===w.MN||e===w.MS||e===w.MTEXT)}function OJ(e,t,n){if(t===Te.MATHML&&e===w.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===rl.ENCODING){const a=n[r].value.toLowerCase();return a===GA.TEXT_HTML||a===GA.APPLICATION_XML}}return t===Te.SVG&&(e===w.FOREIGN_OBJECT||e===w.DESC||e===w.TITLE)}function IJ(e,t,n,r){return(!r||r===Te.HTML)&&OJ(e,t,n)||(!r||r===Te.MATHML)&&kJ(e,t)}const RJ="hidden",MJ=8,DJ=3;var Z;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(Z||(Z={}));const jJ={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},vM=new Set([w.TABLE,w.TBODY,w.TFOOT,w.THEAD,w.TR]),KA={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Js,onParseError:null};class VA{constructor(t,n,r=null,a=null){this.fragmentContext=r,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=Z.INITIAL,this.originalInsertionMode=Z.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...KA,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new iJ(this.options,this),this.activeFormattingElements=new hJ(this.treeAdapter),this.fragmentContextID=r?ac(this.treeAdapter.getTagName(r)):w.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new fJ(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...KA,...n};t??(t=r.treeAdapter.createElement(se.TEMPLATE,Te.HTML,[]));const a=r.treeAdapter.createElement("documentmock",Te.HTML,[]),s=new this(r,a,t);return s.fragmentContextID===w.TEMPLATE&&s.tmplInsertionModeStack.unshift(Z.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var a;if(!this.onParseError)return;const s=(a=t.location)!==null&&a!==void 0?a:jJ,o={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(o)}onItemPush(t,n,r){var a,s;(s=(a=this.treeAdapter).onItemPush)===null||s===void 0||s.call(a,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(r=this.treeAdapter).onItemPop)===null||a===void 0||a.call(r,t,this.openElements.current),n){let s,o;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,o=this.fragmentContextID):{current:s,currentTagId:o}=this.openElements,this._setContextModes(s,o)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===Te.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,Te.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=Z.TEXT}switchToPlaintextParsing(){this.insertionMode=Z.TEXT,this.originalInsertionMode=Z.IN_BODY,this.tokenizer.state=_n.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===se.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==Te.HTML))switch(this.fragmentContextID){case w.TITLE:case w.TEXTAREA:{this.tokenizer.state=_n.RCDATA;break}case w.STYLE:case w.XMP:case w.IFRAME:case w.NOEMBED:case w.NOFRAMES:case w.NOSCRIPT:{this.tokenizer.state=_n.RAWTEXT;break}case w.SCRIPT:{this.tokenizer.state=_n.SCRIPT_DATA;break}case w.PLAINTEXT:{this.tokenizer.state=_n.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,a),t.location){const o=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));o&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,Te.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,Te.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(se.HTML,Te.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,w.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const a=this.treeAdapter.getChildNodes(n),s=r?a.lastIndexOf(r):a.length,o=a[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:d,endCol:f,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:d,endCol:f,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,a=this.treeAdapter.getTagName(t),s=n.type===ft.END_TAG&&a===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,s)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===w.SVG&&this.treeAdapter.getTagName(n)===se.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===Te.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===w.MGLYPH||t.tagID===w.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,Te.HTML)}_processToken(t){switch(t.type){case ft.CHARACTER:{this.onCharacter(t);break}case ft.NULL_CHARACTER:{this.onNullCharacter(t);break}case ft.COMMENT:{this.onComment(t);break}case ft.DOCTYPE:{this.onDoctype(t);break}case ft.START_TAG:{this._processStartTag(t);break}case ft.END_TAG:{this.onEndTag(t);break}case ft.EOF:{this.onEof(t);break}case ft.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const a=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return IJ(t,a,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===bi.Marker||this.openElements.contains(a.element)),r=n===-1?t-1:n-1;for(let a=r;a>=0;a--){const s=this.activeFormattingElements.entries[a];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Z.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(w.P),this.openElements.popUntilTagNamePopped(w.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case w.TR:{this.insertionMode=Z.IN_ROW;return}case w.TBODY:case w.THEAD:case w.TFOOT:{this.insertionMode=Z.IN_TABLE_BODY;return}case w.CAPTION:{this.insertionMode=Z.IN_CAPTION;return}case w.COLGROUP:{this.insertionMode=Z.IN_COLUMN_GROUP;return}case w.TABLE:{this.insertionMode=Z.IN_TABLE;return}case w.BODY:{this.insertionMode=Z.IN_BODY;return}case w.FRAMESET:{this.insertionMode=Z.IN_FRAMESET;return}case w.SELECT:{this._resetInsertionModeForSelect(t);return}case w.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case w.HTML:{this.insertionMode=this.headElement?Z.AFTER_HEAD:Z.BEFORE_HEAD;return}case w.TD:case w.TH:{if(t>0){this.insertionMode=Z.IN_CELL;return}break}case w.HEAD:{if(t>0){this.insertionMode=Z.IN_HEAD;return}break}}this.insertionMode=Z.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===w.TEMPLATE)break;if(r===w.TABLE){this.insertionMode=Z.IN_SELECT_IN_TABLE;return}}this.insertionMode=Z.IN_SELECT}_isElementCausesFosterParenting(t){return vM.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case w.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===Te.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case w.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return tJ[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){dte(this,t);return}switch(this.insertionMode){case Z.INITIAL:{yd(this,t);break}case Z.BEFORE_HTML:{Fd(this,t);break}case Z.BEFORE_HEAD:{Hd(this,t);break}case Z.IN_HEAD:{$d(this,t);break}case Z.IN_HEAD_NO_SCRIPT:{Yd(this,t);break}case Z.AFTER_HEAD:{qd(this,t);break}case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:{_M(this,t);break}case Z.TEXT:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:{uy(this,t);break}case Z.IN_TABLE_TEXT:{CM(this,t);break}case Z.IN_COLUMN_GROUP:{xp(this,t);break}case Z.AFTER_BODY:{yp(this,t);break}case Z.AFTER_AFTER_BODY:{Wm(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){cte(this,t);return}switch(this.insertionMode){case Z.INITIAL:{yd(this,t);break}case Z.BEFORE_HTML:{Fd(this,t);break}case Z.BEFORE_HEAD:{Hd(this,t);break}case Z.IN_HEAD:{$d(this,t);break}case Z.IN_HEAD_NO_SCRIPT:{Yd(this,t);break}case Z.AFTER_HEAD:{qd(this,t);break}case Z.TEXT:{this._insertCharacters(t);break}case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:{uy(this,t);break}case Z.IN_COLUMN_GROUP:{xp(this,t);break}case Z.AFTER_BODY:{yp(this,t);break}case Z.AFTER_AFTER_BODY:{Wm(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){xv(this,t);return}switch(this.insertionMode){case Z.INITIAL:case Z.BEFORE_HTML:case Z.BEFORE_HEAD:case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:case Z.IN_BODY:case Z.IN_TABLE:case Z.IN_CAPTION:case Z.IN_COLUMN_GROUP:case Z.IN_TABLE_BODY:case Z.IN_ROW:case Z.IN_CELL:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:case Z.IN_TEMPLATE:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:{xv(this,t);break}case Z.IN_TABLE_TEXT:{vd(this,t);break}case Z.AFTER_BODY:{HJ(this,t);break}case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:{$J(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case Z.INITIAL:{YJ(this,t);break}case Z.BEFORE_HEAD:case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:{this._err(t,me.misplacedDoctype);break}case Z.IN_TABLE_TEXT:{vd(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,me.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?fte(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case Z.INITIAL:{yd(this,t);break}case Z.BEFORE_HTML:{qJ(this,t);break}case Z.BEFORE_HEAD:{KJ(this,t);break}case Z.IN_HEAD:{ti(this,t);break}case Z.IN_HEAD_NO_SCRIPT:{XJ(this,t);break}case Z.AFTER_HEAD:{ZJ(this,t);break}case Z.IN_BODY:{_r(this,t);break}case Z.IN_TABLE:{Uu(this,t);break}case Z.IN_TABLE_TEXT:{vd(this,t);break}case Z.IN_CAPTION:{Vee(this,t);break}case Z.IN_COLUMN_GROUP:{nE(this,t);break}case Z.IN_TABLE_BODY:{C0(this,t);break}case Z.IN_ROW:{k0(this,t);break}case Z.IN_CELL:{Qee(this,t);break}case Z.IN_SELECT:{IM(this,t);break}case Z.IN_SELECT_IN_TABLE:{Jee(this,t);break}case Z.IN_TEMPLATE:{tte(this,t);break}case Z.AFTER_BODY:{rte(this,t);break}case Z.IN_FRAMESET:{ate(this,t);break}case Z.AFTER_FRAMESET:{ste(this,t);break}case Z.AFTER_AFTER_BODY:{lte(this,t);break}case Z.AFTER_AFTER_FRAMESET:{ute(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?hte(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case Z.INITIAL:{yd(this,t);break}case Z.BEFORE_HTML:{GJ(this,t);break}case Z.BEFORE_HEAD:{VJ(this,t);break}case Z.IN_HEAD:{WJ(this,t);break}case Z.IN_HEAD_NO_SCRIPT:{QJ(this,t);break}case Z.AFTER_HEAD:{JJ(this,t);break}case Z.IN_BODY:{A0(this,t);break}case Z.TEXT:{Bee(this,t);break}case Z.IN_TABLE:{sf(this,t);break}case Z.IN_TABLE_TEXT:{vd(this,t);break}case Z.IN_CAPTION:{Wee(this,t);break}case Z.IN_COLUMN_GROUP:{Xee(this,t);break}case Z.IN_TABLE_BODY:{yv(this,t);break}case Z.IN_ROW:{OM(this,t);break}case Z.IN_CELL:{Zee(this,t);break}case Z.IN_SELECT:{RM(this,t);break}case Z.IN_SELECT_IN_TABLE:{ete(this,t);break}case Z.IN_TEMPLATE:{nte(this,t);break}case Z.AFTER_BODY:{DM(this,t);break}case Z.IN_FRAMESET:{ite(this,t);break}case Z.AFTER_FRAMESET:{ote(this,t);break}case Z.AFTER_AFTER_BODY:{Wm(this,t);break}}}onEof(t){switch(this.insertionMode){case Z.INITIAL:{yd(this,t);break}case Z.BEFORE_HTML:{Fd(this,t);break}case Z.BEFORE_HEAD:{Hd(this,t);break}case Z.IN_HEAD:{$d(this,t);break}case Z.IN_HEAD_NO_SCRIPT:{Yd(this,t);break}case Z.AFTER_HEAD:{qd(this,t);break}case Z.IN_BODY:case Z.IN_TABLE:case Z.IN_CAPTION:case Z.IN_COLUMN_GROUP:case Z.IN_TABLE_BODY:case Z.IN_ROW:case Z.IN_CELL:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:{wM(this,t);break}case Z.TEXT:{Uee(this,t);break}case Z.IN_TABLE_TEXT:{vd(this,t);break}case Z.IN_TEMPLATE:{MM(this,t);break}case Z.AFTER_BODY:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:{tE(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===Y.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:case Z.TEXT:case Z.IN_COLUMN_GROUP:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:{this._insertCharacters(t);break}case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:case Z.AFTER_BODY:case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:{EM(this,t);break}case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:{uy(this,t);break}case Z.IN_TABLE_TEXT:{AM(this,t);break}}}}function LJ(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):SM(e,t),n}function PJ(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function BJ(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let s=0,o=a;o!==n;s++,o=a){a=e.openElements.getCommonAncestor(o);const u=e.activeFormattingElements.getElementEntry(o),d=u&&s>=DJ;!u||d?(d&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(o)):(o=UJ(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function UJ(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function zJ(e,t,n){const r=e.treeAdapter.getTagName(t),a=ac(r);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);a===w.TEMPLATE&&s===Te.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function FJ(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,s=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,a.tagID)}function eE(e,t){for(let n=0;n<MJ;n++){const r=LJ(e,t);if(!r)break;const a=PJ(e,r);if(!a)break;e.activeFormattingElements.bookmark=r;const s=BJ(e,a,r.element),o=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),o&&zJ(e,o,s),FJ(e,a,r)}}function xv(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function HJ(e,t){e._appendCommentNode(t,e.openElements.items[0])}function $J(e,t){e._appendCommentNode(t,e.document)}function tE(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(r);if(a&&!a.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],o=e.treeAdapter.getNodeSourceCodeLocation(s);o&&!o.endTag&&e._setEndLocation(s,t)}}}}function YJ(e,t){e._setDocumentType(t);const n=t.forceQuirks?Oa.QUIRKS:vJ(t);yJ(t)||e._err(t,me.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Z.BEFORE_HTML}function yd(e,t){e._err(t,me.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Oa.QUIRKS),e.insertionMode=Z.BEFORE_HTML,e._processToken(t)}function qJ(e,t){t.tagID===w.HTML?(e._insertElement(t,Te.HTML),e.insertionMode=Z.BEFORE_HEAD):Fd(e,t)}function GJ(e,t){const n=t.tagID;(n===w.HTML||n===w.HEAD||n===w.BODY||n===w.BR)&&Fd(e,t)}function Fd(e,t){e._insertFakeRootElement(),e.insertionMode=Z.BEFORE_HEAD,e._processToken(t)}function KJ(e,t){switch(t.tagID){case w.HTML:{_r(e,t);break}case w.HEAD:{e._insertElement(t,Te.HTML),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD;break}default:Hd(e,t)}}function VJ(e,t){const n=t.tagID;n===w.HEAD||n===w.BODY||n===w.HTML||n===w.BR?Hd(e,t):e._err(t,me.endTagWithoutMatchingOpenElement)}function Hd(e,t){e._insertFakeElement(se.HEAD,w.HEAD),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD,e._processToken(t)}function ti(e,t){switch(t.tagID){case w.HTML:{_r(e,t);break}case w.BASE:case w.BASEFONT:case w.BGSOUND:case w.LINK:case w.META:{e._appendElement(t,Te.HTML),t.ackSelfClosing=!0;break}case w.TITLE:{e._switchToTextParsing(t,_n.RCDATA);break}case w.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,_n.RAWTEXT):(e._insertElement(t,Te.HTML),e.insertionMode=Z.IN_HEAD_NO_SCRIPT);break}case w.NOFRAMES:case w.STYLE:{e._switchToTextParsing(t,_n.RAWTEXT);break}case w.SCRIPT:{e._switchToTextParsing(t,_n.SCRIPT_DATA);break}case w.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Z.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Z.IN_TEMPLATE);break}case w.HEAD:{e._err(t,me.misplacedStartTagForHeadElement);break}default:$d(e,t)}}function WJ(e,t){switch(t.tagID){case w.HEAD:{e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD;break}case w.BODY:case w.BR:case w.HTML:{$d(e,t);break}case w.TEMPLATE:{Tl(e,t);break}default:e._err(t,me.endTagWithoutMatchingOpenElement)}}function Tl(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==w.TEMPLATE&&e._err(t,me.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(w.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,me.endTagWithoutMatchingOpenElement)}function $d(e,t){e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD,e._processToken(t)}function XJ(e,t){switch(t.tagID){case w.HTML:{_r(e,t);break}case w.BASEFONT:case w.BGSOUND:case w.HEAD:case w.LINK:case w.META:case w.NOFRAMES:case w.STYLE:{ti(e,t);break}case w.NOSCRIPT:{e._err(t,me.nestedNoscriptInHead);break}default:Yd(e,t)}}function QJ(e,t){switch(t.tagID){case w.NOSCRIPT:{e.openElements.pop(),e.insertionMode=Z.IN_HEAD;break}case w.BR:{Yd(e,t);break}default:e._err(t,me.endTagWithoutMatchingOpenElement)}}function Yd(e,t){const n=t.type===ft.EOF?me.openElementsLeftAfterEof:me.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Z.IN_HEAD,e._processToken(t)}function ZJ(e,t){switch(t.tagID){case w.HTML:{_r(e,t);break}case w.BODY:{e._insertElement(t,Te.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_BODY;break}case w.FRAMESET:{e._insertElement(t,Te.HTML),e.insertionMode=Z.IN_FRAMESET;break}case w.BASE:case w.BASEFONT:case w.BGSOUND:case w.LINK:case w.META:case w.NOFRAMES:case w.SCRIPT:case w.STYLE:case w.TEMPLATE:case w.TITLE:{e._err(t,me.abandonedHeadElementChild),e.openElements.push(e.headElement,w.HEAD),ti(e,t),e.openElements.remove(e.headElement);break}case w.HEAD:{e._err(t,me.misplacedStartTagForHeadElement);break}default:qd(e,t)}}function JJ(e,t){switch(t.tagID){case w.BODY:case w.HTML:case w.BR:{qd(e,t);break}case w.TEMPLATE:{Tl(e,t);break}default:e._err(t,me.endTagWithoutMatchingOpenElement)}}function qd(e,t){e._insertFakeElement(se.BODY,w.BODY),e.insertionMode=Z.IN_BODY,w0(e,t)}function w0(e,t){switch(t.type){case ft.CHARACTER:{_M(e,t);break}case ft.WHITESPACE_CHARACTER:{EM(e,t);break}case ft.COMMENT:{xv(e,t);break}case ft.START_TAG:{_r(e,t);break}case ft.END_TAG:{A0(e,t);break}case ft.EOF:{wM(e,t);break}}}function EM(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function _M(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function eee(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function tee(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function nee(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Te.HTML),e.insertionMode=Z.IN_FRAMESET)}function ree(e,t){e.openElements.hasInButtonScope(w.P)&&e._closePElement(),e._insertElement(t,Te.HTML)}function aee(e,t){e.openElements.hasInButtonScope(w.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&bv.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Te.HTML)}function iee(e,t){e.openElements.hasInButtonScope(w.P)&&e._closePElement(),e._insertElement(t,Te.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function see(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(w.P)&&e._closePElement(),e._insertElement(t,Te.HTML),n||(e.formElement=e.openElements.current))}function oee(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const a=e.openElements.tagIDs[r];if(n===w.LI&&a===w.LI||(n===w.DD||n===w.DT)&&(a===w.DD||a===w.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==w.ADDRESS&&a!==w.DIV&&a!==w.P&&e._isSpecialElement(e.openElements.items[r],a))break}e.openElements.hasInButtonScope(w.P)&&e._closePElement(),e._insertElement(t,Te.HTML)}function lee(e,t){e.openElements.hasInButtonScope(w.P)&&e._closePElement(),e._insertElement(t,Te.HTML),e.tokenizer.state=_n.PLAINTEXT}function uee(e,t){e.openElements.hasInScope(w.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(w.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Te.HTML),e.framesetOk=!1}function cee(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(se.A);n&&(eE(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,Te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function dee(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function fee(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(w.NOBR)&&(eE(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function hee(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Te.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function mee(e,t){e.treeAdapter.getDocumentMode(e.document)!==Oa.QUIRKS&&e.openElements.hasInButtonScope(w.P)&&e._closePElement(),e._insertElement(t,Te.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_TABLE}function NM(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Te.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function TM(e){const t=fM(e,rl.TYPE);return t!=null&&t.toLowerCase()===RJ}function pee(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Te.HTML),TM(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function gee(e,t){e._appendElement(t,Te.HTML),t.ackSelfClosing=!0}function bee(e,t){e.openElements.hasInButtonScope(w.P)&&e._closePElement(),e._appendElement(t,Te.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function xee(e,t){t.tagName=se.IMG,t.tagID=w.IMG,NM(e,t)}function yee(e,t){e._insertElement(t,Te.HTML),e.skipNextNewLine=!0,e.tokenizer.state=_n.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Z.TEXT}function vee(e,t){e.openElements.hasInButtonScope(w.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,_n.RAWTEXT)}function Eee(e,t){e.framesetOk=!1,e._switchToTextParsing(t,_n.RAWTEXT)}function WA(e,t){e._switchToTextParsing(t,_n.RAWTEXT)}function _ee(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Te.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Z.IN_TABLE||e.insertionMode===Z.IN_CAPTION||e.insertionMode===Z.IN_TABLE_BODY||e.insertionMode===Z.IN_ROW||e.insertionMode===Z.IN_CELL?Z.IN_SELECT_IN_TABLE:Z.IN_SELECT}function Nee(e,t){e.openElements.currentTagId===w.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Te.HTML)}function Tee(e,t){e.openElements.hasInScope(w.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Te.HTML)}function See(e,t){e.openElements.hasInScope(w.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(w.RTC),e._insertElement(t,Te.HTML)}function wee(e,t){e._reconstructActiveFormattingElements(),xM(t),J1(t),t.selfClosing?e._appendElement(t,Te.MATHML):e._insertElement(t,Te.MATHML),t.ackSelfClosing=!0}function Aee(e,t){e._reconstructActiveFormattingElements(),yM(t),J1(t),t.selfClosing?e._appendElement(t,Te.SVG):e._insertElement(t,Te.SVG),t.ackSelfClosing=!0}function XA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Te.HTML)}function _r(e,t){switch(t.tagID){case w.I:case w.S:case w.B:case w.U:case w.EM:case w.TT:case w.BIG:case w.CODE:case w.FONT:case w.SMALL:case w.STRIKE:case w.STRONG:{dee(e,t);break}case w.A:{cee(e,t);break}case w.H1:case w.H2:case w.H3:case w.H4:case w.H5:case w.H6:{aee(e,t);break}case w.P:case w.DL:case w.OL:case w.UL:case w.DIV:case w.DIR:case w.NAV:case w.MAIN:case w.MENU:case w.ASIDE:case w.CENTER:case w.FIGURE:case w.FOOTER:case w.HEADER:case w.HGROUP:case w.DIALOG:case w.DETAILS:case w.ADDRESS:case w.ARTICLE:case w.SEARCH:case w.SECTION:case w.SUMMARY:case w.FIELDSET:case w.BLOCKQUOTE:case w.FIGCAPTION:{ree(e,t);break}case w.LI:case w.DD:case w.DT:{oee(e,t);break}case w.BR:case w.IMG:case w.WBR:case w.AREA:case w.EMBED:case w.KEYGEN:{NM(e,t);break}case w.HR:{bee(e,t);break}case w.RB:case w.RTC:{Tee(e,t);break}case w.RT:case w.RP:{See(e,t);break}case w.PRE:case w.LISTING:{iee(e,t);break}case w.XMP:{vee(e,t);break}case w.SVG:{Aee(e,t);break}case w.HTML:{eee(e,t);break}case w.BASE:case w.LINK:case w.META:case w.STYLE:case w.TITLE:case w.SCRIPT:case w.BGSOUND:case w.BASEFONT:case w.TEMPLATE:{ti(e,t);break}case w.BODY:{tee(e,t);break}case w.FORM:{see(e,t);break}case w.NOBR:{fee(e,t);break}case w.MATH:{wee(e,t);break}case w.TABLE:{mee(e,t);break}case w.INPUT:{pee(e,t);break}case w.PARAM:case w.TRACK:case w.SOURCE:{gee(e,t);break}case w.IMAGE:{xee(e,t);break}case w.BUTTON:{uee(e,t);break}case w.APPLET:case w.OBJECT:case w.MARQUEE:{hee(e,t);break}case w.IFRAME:{Eee(e,t);break}case w.SELECT:{_ee(e,t);break}case w.OPTION:case w.OPTGROUP:{Nee(e,t);break}case w.NOEMBED:case w.NOFRAMES:{WA(e,t);break}case w.FRAMESET:{nee(e,t);break}case w.TEXTAREA:{yee(e,t);break}case w.NOSCRIPT:{e.options.scriptingEnabled?WA(e,t):XA(e,t);break}case w.PLAINTEXT:{lee(e,t);break}case w.COL:case w.TH:case w.TD:case w.TR:case w.HEAD:case w.FRAME:case w.TBODY:case w.TFOOT:case w.THEAD:case w.CAPTION:case w.COLGROUP:break;default:XA(e,t)}}function Cee(e,t){if(e.openElements.hasInScope(w.BODY)&&(e.insertionMode=Z.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function kee(e,t){e.openElements.hasInScope(w.BODY)&&(e.insertionMode=Z.AFTER_BODY,DM(e,t))}function Oee(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Iee(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(w.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(w.FORM):n&&e.openElements.remove(n))}function Ree(e){e.openElements.hasInButtonScope(w.P)||e._insertFakeElement(se.P,w.P),e._closePElement()}function Mee(e){e.openElements.hasInListItemScope(w.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(w.LI),e.openElements.popUntilTagNamePopped(w.LI))}function Dee(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function jee(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Lee(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Pee(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(se.BR,w.BR),e.openElements.pop(),e.framesetOk=!1}function SM(e,t){const n=t.tagName,r=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const s=e.openElements.items[a],o=e.openElements.tagIDs[a];if(r===o&&(r!==w.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(s,o))break}}function A0(e,t){switch(t.tagID){case w.A:case w.B:case w.I:case w.S:case w.U:case w.EM:case w.TT:case w.BIG:case w.CODE:case w.FONT:case w.NOBR:case w.SMALL:case w.STRIKE:case w.STRONG:{eE(e,t);break}case w.P:{Ree(e);break}case w.DL:case w.UL:case w.OL:case w.DIR:case w.DIV:case w.NAV:case w.PRE:case w.MAIN:case w.MENU:case w.ASIDE:case w.BUTTON:case w.CENTER:case w.FIGURE:case w.FOOTER:case w.HEADER:case w.HGROUP:case w.DIALOG:case w.ADDRESS:case w.ARTICLE:case w.DETAILS:case w.SEARCH:case w.SECTION:case w.SUMMARY:case w.LISTING:case w.FIELDSET:case w.BLOCKQUOTE:case w.FIGCAPTION:{Oee(e,t);break}case w.LI:{Mee(e);break}case w.DD:case w.DT:{Dee(e,t);break}case w.H1:case w.H2:case w.H3:case w.H4:case w.H5:case w.H6:{jee(e);break}case w.BR:{Pee(e);break}case w.BODY:{Cee(e,t);break}case w.HTML:{kee(e,t);break}case w.FORM:{Iee(e);break}case w.APPLET:case w.OBJECT:case w.MARQUEE:{Lee(e,t);break}case w.TEMPLATE:{Tl(e,t);break}default:SM(e,t)}}function wM(e,t){e.tmplInsertionModeStack.length>0?MM(e,t):tE(e,t)}function Bee(e,t){var n;t.tagID===w.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Uee(e,t){e._err(t,me.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function uy(e,t){if(e.openElements.currentTagId!==void 0&&vM.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Z.IN_TABLE_TEXT,t.type){case ft.CHARACTER:{CM(e,t);break}case ft.WHITESPACE_CHARACTER:{AM(e,t);break}}else Df(e,t)}function zee(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Te.HTML),e.insertionMode=Z.IN_CAPTION}function Fee(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Te.HTML),e.insertionMode=Z.IN_COLUMN_GROUP}function Hee(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(se.COLGROUP,w.COLGROUP),e.insertionMode=Z.IN_COLUMN_GROUP,nE(e,t)}function $ee(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Te.HTML),e.insertionMode=Z.IN_TABLE_BODY}function Yee(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(se.TBODY,w.TBODY),e.insertionMode=Z.IN_TABLE_BODY,C0(e,t)}function qee(e,t){e.openElements.hasInTableScope(w.TABLE)&&(e.openElements.popUntilTagNamePopped(w.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Gee(e,t){TM(t)?e._appendElement(t,Te.HTML):Df(e,t),t.ackSelfClosing=!0}function Kee(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,Te.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Uu(e,t){switch(t.tagID){case w.TD:case w.TH:case w.TR:{Yee(e,t);break}case w.STYLE:case w.SCRIPT:case w.TEMPLATE:{ti(e,t);break}case w.COL:{Hee(e,t);break}case w.FORM:{Kee(e,t);break}case w.TABLE:{qee(e,t);break}case w.TBODY:case w.TFOOT:case w.THEAD:{$ee(e,t);break}case w.INPUT:{Gee(e,t);break}case w.CAPTION:{zee(e,t);break}case w.COLGROUP:{Fee(e,t);break}default:Df(e,t)}}function sf(e,t){switch(t.tagID){case w.TABLE:{e.openElements.hasInTableScope(w.TABLE)&&(e.openElements.popUntilTagNamePopped(w.TABLE),e._resetInsertionMode());break}case w.TEMPLATE:{Tl(e,t);break}case w.BODY:case w.CAPTION:case w.COL:case w.COLGROUP:case w.HTML:case w.TBODY:case w.TD:case w.TFOOT:case w.TH:case w.THEAD:case w.TR:break;default:Df(e,t)}}function Df(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,w0(e,t),e.fosterParentingEnabled=n}function AM(e,t){e.pendingCharacterTokens.push(t)}function CM(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function vd(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Df(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const kM=new Set([w.CAPTION,w.COL,w.COLGROUP,w.TBODY,w.TD,w.TFOOT,w.TH,w.THEAD,w.TR]);function Vee(e,t){const n=t.tagID;kM.has(n)?e.openElements.hasInTableScope(w.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(w.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,Uu(e,t)):_r(e,t)}function Wee(e,t){const n=t.tagID;switch(n){case w.CAPTION:case w.TABLE:{e.openElements.hasInTableScope(w.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(w.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,n===w.TABLE&&sf(e,t));break}case w.BODY:case w.COL:case w.COLGROUP:case w.HTML:case w.TBODY:case w.TD:case w.TFOOT:case w.TH:case w.THEAD:case w.TR:break;default:A0(e,t)}}function nE(e,t){switch(t.tagID){case w.HTML:{_r(e,t);break}case w.COL:{e._appendElement(t,Te.HTML),t.ackSelfClosing=!0;break}case w.TEMPLATE:{ti(e,t);break}default:xp(e,t)}}function Xee(e,t){switch(t.tagID){case w.COLGROUP:{e.openElements.currentTagId===w.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE);break}case w.TEMPLATE:{Tl(e,t);break}case w.COL:break;default:xp(e,t)}}function xp(e,t){e.openElements.currentTagId===w.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE,e._processToken(t))}function C0(e,t){switch(t.tagID){case w.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,Te.HTML),e.insertionMode=Z.IN_ROW;break}case w.TH:case w.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(se.TR,w.TR),e.insertionMode=Z.IN_ROW,k0(e,t);break}case w.CAPTION:case w.COL:case w.COLGROUP:case w.TBODY:case w.TFOOT:case w.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE,Uu(e,t));break}default:Uu(e,t)}}function yv(e,t){const n=t.tagID;switch(t.tagID){case w.TBODY:case w.TFOOT:case w.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE);break}case w.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE,sf(e,t));break}case w.BODY:case w.CAPTION:case w.COL:case w.COLGROUP:case w.HTML:case w.TD:case w.TH:case w.TR:break;default:sf(e,t)}}function k0(e,t){switch(t.tagID){case w.TH:case w.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,Te.HTML),e.insertionMode=Z.IN_CELL,e.activeFormattingElements.insertMarker();break}case w.CAPTION:case w.COL:case w.COLGROUP:case w.TBODY:case w.TFOOT:case w.THEAD:case w.TR:{e.openElements.hasInTableScope(w.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,C0(e,t));break}default:Uu(e,t)}}function OM(e,t){switch(t.tagID){case w.TR:{e.openElements.hasInTableScope(w.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY);break}case w.TABLE:{e.openElements.hasInTableScope(w.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,yv(e,t));break}case w.TBODY:case w.TFOOT:case w.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(w.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,yv(e,t));break}case w.BODY:case w.CAPTION:case w.COL:case w.COLGROUP:case w.HTML:case w.TD:case w.TH:break;default:sf(e,t)}}function Qee(e,t){const n=t.tagID;kM.has(n)?(e.openElements.hasInTableScope(w.TD)||e.openElements.hasInTableScope(w.TH))&&(e._closeTableCell(),k0(e,t)):_r(e,t)}function Zee(e,t){const n=t.tagID;switch(n){case w.TD:case w.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_ROW);break}case w.TABLE:case w.TBODY:case w.TFOOT:case w.THEAD:case w.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),OM(e,t));break}case w.BODY:case w.CAPTION:case w.COL:case w.COLGROUP:case w.HTML:break;default:A0(e,t)}}function IM(e,t){switch(t.tagID){case w.HTML:{_r(e,t);break}case w.OPTION:{e.openElements.currentTagId===w.OPTION&&e.openElements.pop(),e._insertElement(t,Te.HTML);break}case w.OPTGROUP:{e.openElements.currentTagId===w.OPTION&&e.openElements.pop(),e.openElements.currentTagId===w.OPTGROUP&&e.openElements.pop(),e._insertElement(t,Te.HTML);break}case w.HR:{e.openElements.currentTagId===w.OPTION&&e.openElements.pop(),e.openElements.currentTagId===w.OPTGROUP&&e.openElements.pop(),e._appendElement(t,Te.HTML),t.ackSelfClosing=!0;break}case w.INPUT:case w.KEYGEN:case w.TEXTAREA:case w.SELECT:{e.openElements.hasInSelectScope(w.SELECT)&&(e.openElements.popUntilTagNamePopped(w.SELECT),e._resetInsertionMode(),t.tagID!==w.SELECT&&e._processStartTag(t));break}case w.SCRIPT:case w.TEMPLATE:{ti(e,t);break}}}function RM(e,t){switch(t.tagID){case w.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===w.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===w.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===w.OPTGROUP&&e.openElements.pop();break}case w.OPTION:{e.openElements.currentTagId===w.OPTION&&e.openElements.pop();break}case w.SELECT:{e.openElements.hasInSelectScope(w.SELECT)&&(e.openElements.popUntilTagNamePopped(w.SELECT),e._resetInsertionMode());break}case w.TEMPLATE:{Tl(e,t);break}}}function Jee(e,t){const n=t.tagID;n===w.CAPTION||n===w.TABLE||n===w.TBODY||n===w.TFOOT||n===w.THEAD||n===w.TR||n===w.TD||n===w.TH?(e.openElements.popUntilTagNamePopped(w.SELECT),e._resetInsertionMode(),e._processStartTag(t)):IM(e,t)}function ete(e,t){const n=t.tagID;n===w.CAPTION||n===w.TABLE||n===w.TBODY||n===w.TFOOT||n===w.THEAD||n===w.TR||n===w.TD||n===w.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(w.SELECT),e._resetInsertionMode(),e.onEndTag(t)):RM(e,t)}function tte(e,t){switch(t.tagID){case w.BASE:case w.BASEFONT:case w.BGSOUND:case w.LINK:case w.META:case w.NOFRAMES:case w.SCRIPT:case w.STYLE:case w.TEMPLATE:case w.TITLE:{ti(e,t);break}case w.CAPTION:case w.COLGROUP:case w.TBODY:case w.TFOOT:case w.THEAD:{e.tmplInsertionModeStack[0]=Z.IN_TABLE,e.insertionMode=Z.IN_TABLE,Uu(e,t);break}case w.COL:{e.tmplInsertionModeStack[0]=Z.IN_COLUMN_GROUP,e.insertionMode=Z.IN_COLUMN_GROUP,nE(e,t);break}case w.TR:{e.tmplInsertionModeStack[0]=Z.IN_TABLE_BODY,e.insertionMode=Z.IN_TABLE_BODY,C0(e,t);break}case w.TD:case w.TH:{e.tmplInsertionModeStack[0]=Z.IN_ROW,e.insertionMode=Z.IN_ROW,k0(e,t);break}default:e.tmplInsertionModeStack[0]=Z.IN_BODY,e.insertionMode=Z.IN_BODY,_r(e,t)}}function nte(e,t){t.tagID===w.TEMPLATE&&Tl(e,t)}function MM(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(w.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):tE(e,t)}function rte(e,t){t.tagID===w.HTML?_r(e,t):yp(e,t)}function DM(e,t){var n;if(t.tagID===w.HTML){if(e.fragmentContext||(e.insertionMode=Z.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===w.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else yp(e,t)}function yp(e,t){e.insertionMode=Z.IN_BODY,w0(e,t)}function ate(e,t){switch(t.tagID){case w.HTML:{_r(e,t);break}case w.FRAMESET:{e._insertElement(t,Te.HTML);break}case w.FRAME:{e._appendElement(t,Te.HTML),t.ackSelfClosing=!0;break}case w.NOFRAMES:{ti(e,t);break}}}function ite(e,t){t.tagID===w.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==w.FRAMESET&&(e.insertionMode=Z.AFTER_FRAMESET))}function ste(e,t){switch(t.tagID){case w.HTML:{_r(e,t);break}case w.NOFRAMES:{ti(e,t);break}}}function ote(e,t){t.tagID===w.HTML&&(e.insertionMode=Z.AFTER_AFTER_FRAMESET)}function lte(e,t){t.tagID===w.HTML?_r(e,t):Wm(e,t)}function Wm(e,t){e.insertionMode=Z.IN_BODY,w0(e,t)}function ute(e,t){switch(t.tagID){case w.HTML:{_r(e,t);break}case w.NOFRAMES:{ti(e,t);break}}}function cte(e,t){t.chars=rn,e._insertCharacters(t)}function dte(e,t){e._insertCharacters(t),e.framesetOk=!1}function jM(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Te.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function fte(e,t){if(AJ(t))jM(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===Te.MATHML?xM(t):r===Te.SVG&&(CJ(t),yM(t)),J1(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function hte(e,t){if(t.tagID===w.P||t.tagID===w.BR){jM(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===Te.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}se.AREA,se.BASE,se.BASEFONT,se.BGSOUND,se.BR,se.COL,se.EMBED,se.FRAME,se.HR,se.IMG,se.INPUT,se.KEYGEN,se.LINK,se.META,se.PARAM,se.SOURCE,se.TRACK,se.WBR;const mte=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,pte=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),QA={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function LM(e,t){const n=Ste(e),r=rR("type",{handlers:{root:gte,element:bte,text:xte,comment:BM,doctype:yte,raw:Ete},unknown:_te}),a={parser:n?new VA(QA):VA.getFragmentParser(void 0,QA),handle(u){r(u,a)},stitches:!1,options:t||{}};r(e,a),ic(a,Ai());const s=n?a.parser.document:a.parser.getFragment(),o=wZ(s,{file:a.options.file});return a.stitches&&If(o,"comment",function(u,d,f){const m=u;if(m.value.stitch&&f&&d!==void 0){const p=f.children;return p[d]=m.value.stitch,d}}),o.type==="root"&&o.children.length===1&&o.children[0].type===e.type?o.children[0]:o}function PM(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function gte(e,t){PM(e.children,t)}function bte(e,t){Nte(e,t),PM(e.children,t),Tte(e,t)}function xte(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ft.CHARACTER,chars:e.value,location:jf(e)};ic(t,Ai(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function yte(e,t){const n={type:ft.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:jf(e)};ic(t,Ai(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function vte(e,t){t.stitches=!0;const n=wte(e);if("children"in e&&"children"in n){const r=LM({type:"root",children:e.children},t.options);n.children=r.children}BM({type:"comment",value:{stitch:n}},t)}function BM(e,t){const n=e.value,r={type:ft.COMMENT,data:n,location:jf(e)};ic(t,Ai(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Ete(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,UM(t,Ai(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(mte,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function _te(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))vte(n,t);else{let r="";throw pte.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function ic(e,t){UM(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=_n.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function UM(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Nte(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===_n.PLAINTEXT)return;ic(t,Ai(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:Wo.html;a===Wo.html&&n==="svg"&&(a=Wo.svg);const s=IZ({...e,children:[]},{space:a===Wo.svg?"svg":"html"}),o={type:ft.START_TAG,tagName:n,tagID:ac(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:jf(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Tte(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&UZ.includes(n)||t.parser.tokenizer.state===_n.PLAINTEXT)return;ic(t,y0(e));const r={type:ft.END_TAG,tagName:n,tagID:ac(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:jf(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===_n.RCDATA||t.parser.tokenizer.state===_n.RAWTEXT||t.parser.tokenizer.state===_n.SCRIPT_DATA)&&(t.parser.tokenizer.state=_n.DATA)}function Ste(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function jf(e){const t=Ai(e)||{line:void 0,column:void 0,offset:void 0},n=y0(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function wte(e){return"children"in e?Pu({...e,children:[]}):Pu(e)}function vp(e){return function(t,n){return LM(t,{...e,file:n})}}const Ate=2e3;function zM({repoId:e,startPolish:t,fetchResult:n,loadExisting:r,cleanup:a}){const s=ur(),o=Fe(Dr),[u,d]=v.useState("idle"),[f,m]=v.useState(null),[p,b]=v.useState(null),[x,E]=v.useState(!1),_=v.useRef(null),S=v.useCallback(()=>{_.current&&(clearInterval(_.current),_.current=null)},[]);v.useEffect(()=>()=>S(),[S]),v.useEffect(()=>{if(!e||!r)return;let k=!1;return r().then(I=>{!k&&I&&(m(I),d("preview"))}).catch(()=>{}),()=>{k=!0}},[e]);const T=v.useCallback(async()=>{if(!(!e||u==="polishing")){d("polishing");try{const{sessionId:k}=await t();b(k),_.current=setInterval(async()=>{try{if((await Kz(e,k)).type==="idle"){S();const O=await n();m(O),d("preview")}}catch{S(),d("idle"),gn.getState().addToast("润色状态检查失败","error")}},Ate)}catch(k){d("idle"),gn.getState().addToast(k instanceof Error?k.message:"润色启动失败","error")}}},[e,u,t,n,S]),C=v.useCallback(()=>{S(),a==null||a().catch(()=>{}),m(null),b(null),d("idle")},[S,a]),A=v.useCallback(()=>{!p||!o||(Le.setState({activeSessionId:p}),s(`/${encodeURIComponent(o)}/run`))},[p,o,s]);return{phase:u,result:f,sessionId:p,busy:x,setBusy:E,polish:T,discard:C,escalate:A,setResult:m,setPhase:d}}function Cte({repoId:e,issueNumber:t,onPublished:n}){const[r,a]=v.useState(""),[s,o]=v.useState(!1),u=v.useRef(null),d=v.useCallback(()=>vF(e,t,r.trim()),[e,t,r]),f=v.useCallback(()=>Ww(e,t).then(I=>I.body),[e,t]),m=v.useCallback(()=>Ww(e,t).then(I=>I.body||null),[e,t]),{phase:p,result:b,busy:x,setBusy:E,polish:_,discard:S,escalate:T,setResult:C}=zM({repoId:e,startPolish:d,fetchResult:f,loadExisting:m});v.useEffect(()=>{if(!s)return;const I=O=>{u.current&&!u.current.contains(O.target)&&o(!1)};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[s]);const A=async()=>{if(!(!r.trim()||x)){E(!0);try{const I=await Vw(e,t,r.trim());n(I),a(""),gn.getState().addToast("评论已发布","success")}catch(I){gn.getState().addToast(I instanceof Error?I.message:"发布失败","error")}finally{E(!1)}}},k=async()=>{if(!(!(b!=null&&b.trim())||x)){E(!0);try{const I=await Vw(e,t,b.trim());n(I),a(""),S(),gn.getState().addToast("评论已发布","success")}catch(I){gn.getState().addToast(I instanceof Error?I.message:"发布失败","error")}finally{E(!1)}}};return p==="preview"?c.jsxs("div",{className:"mt-8 border-t border-line pt-6",children:[c.jsxs("h3",{className:"mb-3 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-fg-4",children:[c.jsx(Ou,{className:"h-3.5 w-3.5 text-amber-400"}),"AI 润色结果"]}),c.jsx("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-4 py-3",children:c.jsx("textarea",{value:b??"",onChange:I=>C(I.target.value),rows:6,className:"w-full resize-none bg-transparent text-sm text-fg placeholder:text-fg-6 focus:outline-none"})}),c.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[c.jsxs("button",{type:"button",disabled:x,onClick:()=>void k(),className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[c.jsx(Zd,{className:"h-3.5 w-3.5"}),"发布评论"]}),c.jsx("button",{type:"button",onClick:S,className:"ml-auto rounded-md px-2.5 py-1.5 text-xs text-fg-5 transition-colors hover:text-fg-3",children:"放弃"}),c.jsxs("div",{className:"relative",ref:u,children:[c.jsx("button",{type:"button",onClick:()=>o(!s),className:"flex h-7 w-7 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:c.jsx(E1,{className:"h-3.5 w-3.5"})}),s&&c.jsxs("div",{className:"absolute right-0 bottom-full z-20 mb-1 min-w-[140px] overflow-hidden rounded-lg border border-line bg-elevated shadow-lg",children:[c.jsxs("button",{type:"button",onClick:()=>{o(!1),_()},className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-fg-3 transition-colors hover:bg-base/60",children:[c.jsx(Ou,{className:"h-3 w-3"}),"重新润色"]}),c.jsx("button",{type:"button",onClick:()=>{o(!1),T()},className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-fg-3 transition-colors hover:bg-base/60",children:"转入深度对话"})]})]})]})]}):c.jsxs("div",{className:"mt-8 border-t border-line pt-6",children:[c.jsx("h3",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-fg-4",children:"添加评论"}),c.jsx("textarea",{value:r,onChange:I=>a(I.target.value),placeholder:"写下你的评论...",rows:4,disabled:p==="polishing",className:"w-full resize-none rounded-lg border border-line bg-base px-3 py-2.5 text-sm text-fg placeholder:text-fg-6 focus:border-fg-5 focus:outline-none disabled:opacity-50"}),c.jsxs("div",{className:"mt-2.5 flex items-center gap-2",children:[c.jsxs("button",{type:"button",disabled:!r.trim()||x||p==="polishing",onClick:()=>void A(),className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[c.jsx(Zd,{className:"h-3.5 w-3.5"}),x?"发送中...":"直接发送"]}),c.jsxs("button",{type:"button",disabled:!r.trim()||p==="polishing",onClick:()=>void _(),className:"flex items-center gap-1.5 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-1.5 text-xs font-medium text-amber-400 transition-colors hover:bg-amber-500/20 disabled:opacity-40",children:[c.jsx(Ou,{className:"h-3.5 w-3.5"}),p==="polishing"?"润色中...":"AI 润色"]})]})]})}function rE(e){const t=e<1e12?e*1e3:e,n=Date.now()-t;return n<6e4?"刚刚":n<36e5?`${Math.floor(n/6e4)}分钟前`:n<864e5?`${Math.floor(n/36e5)}小时前`:n<2592e6?`${Math.floor(n/864e5)}天前`:new Date(t).toLocaleDateString("zh-CN",{month:"short",day:"numeric"})}function FM(e){const t=new Date(e);return t.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})+" "+t.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"})}function HM(e){return e==="merged"?"bg-purple-500/15 text-purple-400":e==="closed"?"bg-red-500/15 text-red-400":"bg-emerald-500/15 text-emerald-400"}function kte(e){return e==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"}function $M({issue:e,milestone:t,onBack:n,onClose:r,onToggleSidebar:a}){var S;const s=ur(),o=Fe(T=>T.activeRepoId),u=Fe(Dr),[d,f]=v.useState([]),[m,p]=v.useState(!1),[b,x]=v.useState(!1),E=at(T=>T.updateIssueState);v.useEffect(()=>{o&&(p(!0),yF(o,e.number).then(f).catch(()=>f([])).finally(()=>p(!1)))},[o,e.number]);const _=()=>{at.getState().setSelectedIssue(e.id),Le.setState({activeSessionId:null}),s(`/${encodeURIComponent(u)}/run`)};return c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[c.jsxs("header",{className:"flex flex-col gap-2 border-b border-line px-4 py-3 md:flex-row md:items-center md:gap-3 md:px-6",children:[c.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[c.jsx("button",{type:"button",onClick:n,"aria-label":"返回列表",className:"-ml-1 shrink-0 rounded-md p-1.5 text-fg-3 transition-colors hover:bg-elevated hover:text-fg md:hidden",children:c.jsx(v1,{className:"h-5 w-5"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[c.jsxs("span",{className:re("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",e.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",e.number," ",e.state]}),(S=e.labels)==null?void 0:S.map(T=>c.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${T.color}20`,color:`#${T.color}`},children:T.name},T.id)),t&&c.jsxs("span",{className:"flex shrink-0 items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium bg-indigo-500/15 text-indigo-400",children:[c.jsx(_1,{className:"h-2.5 w-2.5"}),t.title]})]}),c.jsx("h2",{className:"mt-1 text-base font-semibold text-fg",children:e.title}),(e.authorLogin||e.assignees&&e.assignees.length>0)&&c.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-2 text-xs text-fg-4",children:[e.authorLogin&&c.jsxs("span",{className:"flex items-center gap-1.5",children:[e.authorAvatar&&c.jsx("img",{src:e.authorAvatar,alt:"",className:"h-4 w-4 rounded-full"}),e.authorLogin]}),e.assignees&&e.assignees.length>0&&c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"text-fg-5",children:"→"}),c.jsx("span",{className:"flex items-center -space-x-1",children:e.assignees.map(T=>c.jsx("img",{src:T.avatar_url,alt:T.login,title:T.login,className:"h-4 w-4 rounded-full ring-1 ring-surface"},T.login))}),c.jsx("span",{className:"text-fg-4",children:e.assignees.map(T=>T.login).join(", ")})]})]})]})]}),c.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:[e.htmlUrl&&c.jsxs("a",{href:e.htmlUrl,target:"_blank",rel:"noopener noreferrer",className:"flex h-8 items-center gap-1.5 rounded-md border border-line px-2.5 font-mono text-xs text-fg-3 transition-colors hover:border-fg-5 hover:text-fg",children:[c.jsx(V5,{className:"h-3.5 w-3.5"}),c.jsx("span",{className:"hidden sm:inline",children:"源站"})]}),c.jsxs("button",{type:"button",onClick:()=>{at.getState().enterMatchMode(e.id),Le.setState({activeSessionId:null}),s(`/${encodeURIComponent(u)}/run`)},className:"flex h-8 items-center gap-1.5 rounded-md border border-line px-2.5 text-xs text-fg-3 transition-colors hover:border-blue-500/50 hover:text-blue-400",children:[c.jsx(Nf,{className:"h-3.5 w-3.5"}),c.jsx("span",{className:"hidden sm:inline",children:"匹配子任务"})]}),c.jsx("button",{type:"button",disabled:b,onClick:async()=>{x(!0),await E(e.number,e.state==="open"?"closed":"open"),x(!1)},className:re("flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-xs font-medium transition-colors disabled:opacity-40",e.state==="open"?"border-red-500/30 text-red-400 hover:border-red-500/60 hover:bg-red-500/10":"border-emerald-500/30 text-emerald-400 hover:border-emerald-500/60 hover:bg-emerald-500/10"),children:e.state==="open"?c.jsxs(c.Fragment,{children:[c.jsx(G5,{className:"h-3.5 w-3.5"}),c.jsx("span",{className:"hidden sm:inline",children:"关闭"})]}):c.jsxs(c.Fragment,{children:[c.jsx(vl,{className:"h-3.5 w-3.5"}),c.jsx("span",{className:"hidden sm:inline",children:"重新打开"})]})}),c.jsxs("button",{type:"button",onClick:_,className:"flex h-8 items-center gap-1.5 rounded-md bg-blue-600 px-3 text-xs font-medium text-white transition-colors hover:bg-blue-500",children:[c.jsx(w1,{className:"h-3.5 w-3.5 fill-current"}),c.jsx("span",{className:"hidden sm:inline",children:"新建任务"})]}),a&&c.jsx("button",{type:"button",onClick:a,title:"面板",className:"flex h-8 w-8 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-2",children:c.jsx(W5,{className:"h-4 w-4"})}),r&&c.jsx("button",{type:"button",onClick:r,title:"关闭详情",className:"hidden h-8 w-8 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-2 md:flex",children:c.jsx(yt,{className:"h-4 w-4"})})]})]}),c.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:c.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6",children:[e.body?c.jsx("div",{className:"markdown-body leading-relaxed",children:c.jsx(cl,{remarkPlugins:[dl],rehypePlugins:[vp],children:e.body})}):c.jsx("p",{className:"py-10 text-center font-mono text-xs text-fg-5",children:"该 Issue 没有描述内容"}),m?c.jsx("p",{className:"mt-8 text-center font-mono text-xs text-fg-6",children:"加载评论…"}):d.length>0&&c.jsxs("div",{className:"mt-8 border-t border-line pt-6",children:[c.jsxs("h3",{className:"mb-4 text-xs font-semibold uppercase tracking-wider text-fg-4",children:["评论 (",d.length,")"]}),c.jsx("div",{className:"space-y-4",children:d.map(T=>c.jsxs("div",{className:"rounded-lg border border-line bg-elevated/40 px-4 py-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("img",{src:T.user.avatar_url,alt:T.user.login,className:"h-5 w-5 rounded-full"}),c.jsx("span",{className:"text-xs font-semibold text-fg-2",children:T.user.login}),c.jsx("span",{className:"text-[10px] text-fg-6",children:FM(T.created_at)})]}),c.jsx("div",{className:"markdown-body mt-2 text-sm leading-relaxed text-fg-3",children:c.jsx(cl,{remarkPlugins:[dl],rehypePlugins:[vp],children:T.body})})]},T.id))})]}),o&&c.jsx(Cte,{repoId:o,issueNumber:e.number,onPublished:T=>f(C=>[...C,T])},e.id)]})})]})}function YM({pr:e,onBack:t,onClose:n,onEnterMatch:r,onNavigateToIssue:a}){var O;const s=Fe(j=>j.activeRepoId),o=Fe(Dr),[u,d]=v.useState(!1),[f,m]=v.useState([]),[p,b]=v.useState(!1),[x,E]=v.useState([]),[_,S]=v.useState(!1),T=ur(),C=Hn(j=>j.unlinkIssue);v.useEffect(()=>{s&&(b(!0),xF(s,e.number).then(m).catch(()=>m([])).finally(()=>b(!1)))},[s,e.number]),v.useEffect(()=>{s&&k1(s,e.number).then(E).catch(()=>E([]))},[s,e.number]);const A=async j=>{if(!(u||!s)){d(!0);try{if(await pF(s,e.number),j&&x.length>0){const H=x.filter(z=>z.state==="open");await Promise.all(H.map(z=>uI(s,z.number,{state:"closed"}))),E(z=>z.map(D=>D.state==="open"?{...D,state:"closed"}:D)),at.getState().loadIssues(),gn.getState().addToast(`PR #${e.number} 合入成功,已关闭 ${H.length} 个 Issue`,"success")}else gn.getState().addToast(`PR #${e.number} 合入成功`,"success");Hn.getState().loadPulls()}catch(H){let z="合入失败";if(H instanceof ts)try{z=JSON.parse(H.message).error??z}catch{z=H.message}gn.getState().addToast(z,"error")}finally{d(!1)}}},k=async j=>{await C(e.number,j)&&E(z=>z.filter(D=>D.number!==j))},I=()=>{const j=`请解决 PR #${e.number} 的合并冲突: ${e.title}`;Le.setState({activeSessionId:null}),T(`/${encodeURIComponent(o)}/run?draft=${encodeURIComponent(j)}`)};return c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[c.jsxs("header",{className:"flex flex-col gap-2 border-b border-line px-4 py-3 md:flex-row md:items-center md:gap-3 md:px-6",children:[c.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[c.jsx("button",{type:"button",onClick:t,"aria-label":"返回列表",className:"-ml-1 shrink-0 rounded-md p-1.5 text-fg-3 transition-colors hover:bg-elevated hover:text-fg md:hidden",children:c.jsx(v1,{className:"h-5 w-5"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[c.jsxs("span",{className:re("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",HM(e.state)),children:["#",e.number," ",e.state]}),e.draft===1&&c.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-bold bg-fg-6/15 text-fg-4",children:"DRAFT"}),e.mergeable==="false"&&e.state==="open"&&c.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-semibold bg-red-500/15 text-red-400",children:"Conflict"}),(O=e.labels)==null?void 0:O.map(j=>c.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${j.color}20`,color:`#${j.color}`},children:j.name},j.id))]}),c.jsx("h2",{className:"mt-1 text-base font-semibold text-fg",children:e.title}),c.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-2 text-xs text-fg-4",children:[c.jsxs("span",{className:"flex min-w-0 items-center gap-1 font-mono text-[11px] text-fg-5",children:[c.jsx(ol,{className:"h-3.5 w-3.5 shrink-0"}),c.jsxs("span",{className:"truncate",children:[e.headBranch," → ",e.baseBranch]})]}),e.authorLogin&&c.jsxs("span",{className:"flex items-center gap-1.5",children:[e.authorAvatar&&c.jsx("img",{src:e.authorAvatar,alt:"",className:"h-4 w-4 rounded-full"}),e.authorLogin]}),e.mergedAt&&c.jsxs("span",{className:"text-purple-400",children:["合并于 ",rE(e.mergedAt)]})]})]})]}),c.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:[e.htmlUrl&&c.jsxs("a",{href:e.htmlUrl,target:"_blank",rel:"noopener noreferrer",className:"flex h-8 items-center gap-1.5 rounded-md border border-line px-2.5 font-mono text-xs text-fg-3 transition-colors hover:border-fg-5 hover:text-fg",children:[c.jsx(V5,{className:"h-3.5 w-3.5"}),c.jsx("span",{className:"hidden sm:inline",children:"源站"})]}),c.jsxs("button",{type:"button",onClick:r,className:"flex h-8 items-center gap-1.5 rounded-md border border-line px-2.5 text-xs text-fg-3 transition-colors hover:border-blue-500/50 hover:text-blue-400",children:[c.jsx(N1,{className:"h-3.5 w-3.5"}),c.jsx("span",{className:"hidden sm:inline",children:"关联 Issue"})]}),e.state==="open"&&c.jsxs(c.Fragment,{children:[e.mergeable==="false"&&c.jsxs("button",{type:"button",onClick:I,className:"flex h-8 items-center gap-1.5 rounded-md border border-amber-500/30 px-2.5 text-xs font-medium text-amber-400 transition-colors hover:border-amber-500/60 hover:bg-amber-500/10",children:[c.jsx(xz,{className:"h-3.5 w-3.5"}),c.jsx("span",{className:"hidden sm:inline",children:"解冲突"})]}),c.jsxs("button",{type:"button",disabled:u||e.mergeable==="false",onClick:()=>void A(!1),className:"flex h-8 items-center gap-1.5 rounded-md border border-emerald-500/30 px-2.5 text-xs font-medium text-emerald-400 transition-colors hover:border-emerald-500/60 hover:bg-emerald-500/10 disabled:opacity-40",children:[c.jsx(Dw,{className:"h-3.5 w-3.5"}),c.jsx("span",{className:"hidden sm:inline",children:"合入"})]}),x.some(j=>j.state==="open")&&c.jsxs("button",{type:"button",disabled:u||e.mergeable==="false",onClick:()=>void A(!0),className:"flex h-8 items-center gap-1.5 rounded-md bg-blue-600 px-3 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[c.jsx(Dw,{className:"h-3.5 w-3.5"}),c.jsx("span",{className:"hidden sm:inline",children:"合入并关闭 Issues"})]})]}),n&&c.jsx("button",{type:"button",onClick:n,title:"关闭详情",className:"hidden h-8 w-8 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-2 md:flex",children:c.jsx(yt,{className:"h-4 w-4"})})]})]}),c.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:c.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6",children:[x.length>0&&c.jsxs("div",{className:"mb-6 rounded-lg border border-line bg-elevated/30 px-4 py-3",children:[c.jsxs("h3",{className:"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-fg-4",children:[c.jsx(vl,{className:"h-3.5 w-3.5"}),"关联 Issues (",x.length,")"]}),c.jsx("div",{className:"space-y-1.5",children:x.map(j=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("button",{type:"button",onClick:()=>a==null?void 0:a(j.id),className:"flex min-w-0 flex-1 items-center gap-2 rounded-md px-1 py-0.5 transition-colors hover:bg-elevated/60",children:[c.jsxs("span",{className:re("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-medium",j.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",j.number]}),c.jsx("span",{className:"min-w-0 flex-1 truncate text-left text-sm text-fg-2",children:j.title})]}),c.jsx("button",{type:"button",onClick:()=>void k(j.number),title:"取消关联",className:"shrink-0 rounded p-0.5 text-fg-5 transition-colors hover:bg-red-500/10 hover:text-red-400",children:c.jsx(G5,{className:"h-3.5 w-3.5"})})]},j.id))})]}),(e.commitCount!=null||e.additions!=null)&&c.jsxs("div",{className:"mb-6 rounded-lg border border-line bg-elevated/30 px-4 py-3",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-fg-3",children:[e.commitCount!=null&&c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(h7,{className:"h-3.5 w-3.5 text-fg-5"}),c.jsx("span",{className:"font-medium",children:e.commitCount})," 次提交"]}),e.changedFilesCount!=null&&c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(lo,{className:"h-3.5 w-3.5 text-fg-5"}),c.jsx("span",{className:"font-medium",children:e.changedFilesCount})," 个文件"]}),e.additions!=null&&c.jsxs("span",{className:"flex items-center gap-1 text-emerald-400",children:[c.jsx(Da,{className:"h-3 w-3"}),c.jsx("span",{className:"font-mono font-medium",children:e.additions})]}),e.deletions!=null&&c.jsxs("span",{className:"flex items-center gap-1 text-red-400",children:[c.jsx(z7,{className:"h-3 w-3"}),c.jsx("span",{className:"font-mono font-medium",children:e.deletions})]})]}),e.diffStats&&e.diffStats.length>0&&c.jsxs("div",{className:"mt-3 border-t border-line pt-3",children:[c.jsxs("button",{type:"button",onClick:()=>S(j=>!j),className:"flex w-full items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-fg-4 transition-colors hover:text-fg-2",children:[_?c.jsx(Vr,{className:"h-3.5 w-3.5"}):c.jsx(m0,{className:"h-3.5 w-3.5"}),"变更文件 (",e.diffStats.length,")"]}),_&&c.jsx("div",{className:"mt-2 space-y-0.5",children:e.diffStats.map(j=>c.jsxs("div",{className:"flex items-center gap-2 rounded px-2 py-1 text-xs hover:bg-elevated/50",children:[c.jsx("span",{className:re("w-14 shrink-0 rounded px-1 py-0.5 text-center font-mono text-[10px] font-medium",j.status==="added"?"bg-emerald-500/15 text-emerald-400":j.status==="removed"?"bg-red-500/15 text-red-400":"bg-blue-500/15 text-blue-400"),children:j.status==="added"?"新增":j.status==="removed"?"删除":j.status==="renamed"?"重命名":"修改"}),c.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-fg-3",title:j.filename,children:j.filename}),c.jsxs("span",{className:"shrink-0 font-mono text-[11px] text-emerald-400",children:["+",j.additions]}),c.jsxs("span",{className:"shrink-0 font-mono text-[11px] text-red-400",children:["-",j.deletions]})]},j.filename))})]})]}),e.body?c.jsx("div",{className:"markdown-body leading-relaxed",children:c.jsx(cl,{remarkPlugins:[dl],rehypePlugins:[vp],children:e.body})}):c.jsx("p",{className:"py-10 text-center font-mono text-xs text-fg-5",children:"该 PR 没有描述内容"}),p?c.jsx("p",{className:"mt-8 text-center font-mono text-xs text-fg-6",children:"加载评论…"}):f.length>0&&c.jsxs("div",{className:"mt-8 border-t border-line pt-6",children:[c.jsxs("h3",{className:"mb-4 text-xs font-semibold uppercase tracking-wider text-fg-4",children:["评论 (",f.length,")"]}),c.jsx("div",{className:"space-y-4",children:f.map(j=>c.jsxs("div",{className:"rounded-lg border border-line bg-elevated/40 px-4 py-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("img",{src:j.user.avatar_url,alt:j.user.login,className:"h-5 w-5 rounded-full"}),c.jsx("span",{className:"text-xs font-semibold text-fg-2",children:j.user.login}),c.jsx("span",{className:"text-[10px] text-fg-6",children:FM(j.created_at)})]}),c.jsx("div",{className:"markdown-body mt-2 text-sm leading-relaxed text-fg-3",children:c.jsx(cl,{remarkPlugins:[dl],rehypePlugins:[vp],children:j.body})})]},j.id))})]})]})})]})}function Ote({prs:e,onSelect:t}){return e.length===0?c.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-fg-5",children:[c.jsx(ol,{className:"h-8 w-8"}),c.jsx("p",{className:"font-mono text-xs",children:"该 Issue 没有关联的 PR"})]}):c.jsx("ul",{className:"space-y-2",children:e.map(n=>{var r;return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:()=>t(n.number),className:"group flex w-full flex-col gap-1.5 rounded-lg border border-line bg-elevated/30 px-4 py-3 text-left transition-colors hover:border-blue-500/40 hover:bg-elevated/60",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("span",{className:re("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",HM(n.state)),children:["#",n.number," ",n.state]}),n.mergeable===!1&&c.jsxs("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-semibold bg-red-500/15 text-red-400",children:[c.jsx(or,{className:"inline h-3 w-3 -mt-px"})," Conflict"]}),c.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-fg-2 group-hover:text-fg",children:n.title})]}),c.jsx("div",{className:"flex flex-wrap items-center gap-2 text-[11px] text-fg-5",children:((r=n.user)==null?void 0:r.login)&&c.jsxs("span",{className:"flex items-center gap-1",children:[n.user.avatar_url&&c.jsx("img",{src:n.user.avatar_url,alt:"",className:"h-3.5 w-3.5 rounded-full"}),n.user.login]})})]})},n.number)})})}function Ite({issue:e,milestone:t,tab:n,prNumber:r,onTabChange:a,onSelectPr:s,onBackToPrList:o,onBack:u,onClose:d,onToggleSidebar:f}){const m=Fe(A=>A.activeRepoId),p=Hn(A=>A.enterMatchMode),[b,x]=v.useState([]),[E,_]=v.useState(null),[S,T]=v.useState(!1);v.useEffect(()=>{if(!m){x([]);return}fF(m,e.number).then(x).catch(()=>x([]))},[m,e.number]),v.useEffect(()=>{if(!m||r==null){_(null);return}let A=!1;return T(!0),mF(m,r).then(k=>{A||_(k)}).catch(()=>{A||_(null)}).finally(()=>{A||T(!1)}),()=>{A=!0}},[m,r]);const C=b.some(A=>A.mergeable===!1);return c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[b.length>0&&c.jsxs("div",{className:"flex shrink-0 items-center border-b border-line bg-surface",children:[c.jsxs("button",{type:"button",onClick:()=>a("issue"),className:re("flex items-center gap-1.5 border-b-2 px-4 py-2.5 text-xs font-medium transition-colors",n==="issue"?"border-blue-500 text-fg":"border-transparent text-fg-4 hover:text-fg-2"),children:[c.jsx(vl,{className:"h-3.5 w-3.5"}),"Issue"]}),c.jsxs("button",{type:"button",onClick:()=>a("pr"),className:re("flex items-center gap-1.5 border-b-2 px-4 py-2.5 text-xs font-medium transition-colors",n==="pr"?"border-blue-500 text-fg":"border-transparent text-fg-4 hover:text-fg-2"),children:[c.jsx(ol,{className:"h-3.5 w-3.5"}),"PR",c.jsx("span",{className:re("rounded-full px-1.5 py-0.5 font-mono text-[10px]",n==="pr"?"bg-blue-500/10 text-blue-500":"bg-elevated text-fg-5"),children:b.length}),C&&c.jsxs("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-semibold bg-red-500/15 text-red-400",children:[c.jsx(or,{className:"inline h-3 w-3 -mt-px"})," Conflict"]})]})]}),n==="issue"||b.length===0?c.jsx($M,{issue:e,milestone:t,onBack:u,onClose:d,onToggleSidebar:f}):r!=null?E?c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:[c.jsx("div",{className:"flex shrink-0 items-center border-b border-line bg-elevated/30 px-4 py-2",children:c.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 rounded-md px-2 py-1 text-xs text-fg-3 transition-colors hover:bg-elevated hover:text-fg",children:[c.jsx(Qd,{className:"h-3.5 w-3.5"}),"返回列表"]})}),c.jsx(YM,{pr:E,onBack:o,onEnterMatch:()=>p(E.id)})]}):c.jsx("div",{className:"flex flex-1 items-center justify-center",children:c.jsx("p",{className:"font-mono text-xs text-fg-5",children:S?"加载 PR…":"PR 未找到"})}):c.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:c.jsx("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6",children:c.jsx(Ote,{prs:b,onSelect:s})})})]})}function ZA({onDone:e}){const[t,n]=v.useState(""),[r,a]=v.useState(""),[s,o]=v.useState(!1),u=v.useRef(null),d=at(z=>z.createIssue),f=Fe(z=>z.activeRepoId),m=v.useCallback(()=>EF(f,t.trim(),r.trim()||void 0),[f,t,r]),p=v.useCallback(()=>Xw(f),[f]),b=v.useCallback(()=>Xw(f).then(z=>z.title?z:null),[f]),x=v.useCallback(()=>_F(f),[f]),{phase:E,result:_,busy:S,setBusy:T,polish:C,discard:A,escalate:k,setResult:I}=zM({repoId:f,startPolish:m,fetchResult:p,loadExisting:b,cleanup:x});v.useEffect(()=>{if(!s)return;const z=D=>{u.current&&!u.current.contains(D.target)&&o(!1)};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[s]);const O=async()=>{!t.trim()||S||(T(!0),await d(t.trim(),r.trim()||void 0),T(!1),e())},j=async()=>{!(_!=null&&_.title.trim())||S||(T(!0),await d(_.title.trim(),_.body.trim()||void 0),T(!1),A(),e())},H=z=>{(z.metaKey||z.ctrlKey)&&z.key==="Enter"&&(z.preventDefault(),O())};return E==="preview"&&_?c.jsxs("div",{className:"border-b border-line px-3 py-3",children:[c.jsxs("h4",{className:"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-fg-4",children:[c.jsx(Ou,{className:"h-3.5 w-3.5 text-amber-400"}),"AI 润色结果"]}),c.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2.5",children:[c.jsx("input",{type:"text",value:_.title,onChange:z=>I({..._,title:z.target.value}),className:"w-full bg-transparent text-xs font-medium text-fg placeholder:text-fg-6 focus:outline-none",placeholder:"润色后标题"}),c.jsx("textarea",{value:_.body,onChange:z=>I({..._,body:z.target.value}),rows:5,className:"mt-2 w-full resize-none bg-transparent text-xs text-fg placeholder:text-fg-6 focus:outline-none",placeholder:"润色后描述"})]}),c.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[c.jsxs("button",{type:"button",disabled:!_.title.trim()||S,onClick:()=>void j(),className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[c.jsx(Da,{className:"h-3.5 w-3.5"}),"创建 Issue"]}),c.jsx("button",{type:"button",onClick:A,className:"ml-auto rounded-md px-2.5 py-1 text-xs text-fg-5 transition-colors hover:text-fg-3",children:"放弃"}),c.jsxs("div",{className:"relative",ref:u,children:[c.jsx("button",{type:"button",onClick:()=>o(!s),className:"flex h-6 w-6 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:c.jsx(E1,{className:"h-3.5 w-3.5"})}),s&&c.jsxs("div",{className:"absolute right-0 bottom-full z-20 mb-1 min-w-[140px] overflow-hidden rounded-lg border border-line bg-elevated shadow-lg",children:[c.jsxs("button",{type:"button",onClick:()=>{o(!1),C()},className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-fg-3 transition-colors hover:bg-base/60",children:[c.jsx(Ou,{className:"h-3 w-3"}),"重新润色"]}),c.jsx("button",{type:"button",onClick:()=>{o(!1),k()},className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-fg-3 transition-colors hover:bg-base/60",children:"转入深度对话"})]})]})]})]}):c.jsxs("div",{className:"border-b border-line px-3 py-3",children:[c.jsx("input",{type:"text",value:t,onChange:z=>n(z.target.value),onKeyDown:H,placeholder:"Issue 标题",autoFocus:!0,disabled:E==="polishing",className:"w-full rounded-md border border-line bg-base px-2.5 py-1.5 text-xs text-fg placeholder:text-fg-6 focus:border-fg-5 focus:outline-none disabled:opacity-50"}),c.jsx("textarea",{value:r,onChange:z=>a(z.target.value),onKeyDown:H,placeholder:"描述(可选) ⌘⏎ 创建",rows:3,disabled:E==="polishing",className:"mt-2 w-full resize-none rounded-md border border-line bg-base px-2.5 py-1.5 text-xs text-fg placeholder:text-fg-6 focus:border-fg-5 focus:outline-none disabled:opacity-50"}),c.jsxs("div",{className:"mt-2 flex items-center justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:e,className:"rounded-md px-2.5 py-1 text-xs text-fg-4 transition-colors hover:text-fg-2",children:"取消"}),c.jsxs("button",{type:"button",disabled:!t.trim()||E==="polishing",onClick:()=>void C(),className:"flex items-center gap-1.5 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-1 text-xs font-medium text-amber-400 transition-colors hover:bg-amber-500/20 disabled:opacity-40",children:[c.jsx(Ou,{className:"h-3.5 w-3.5"}),E==="polishing"?"润色中...":"AI 润色"]}),c.jsx("button",{type:"button",onClick:()=>void O(),disabled:!t.trim()||S||E==="polishing",className:"rounded-md bg-blue-600 px-3 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:"直接创建"})]})]})}function JA({issue:e,sessionCount:t,isActive:n,isEpic:r,milestone:a,onSelect:s}){return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:s,className:re("group flex w-full items-center gap-2.5 rounded-md px-2.5 py-2 text-left transition-colors",n?"border-l-2 border-blue-500 bg-elevated/80":"border-l-2 border-transparent hover:bg-elevated/50"),children:[c.jsx("span",{className:re("flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-mono text-sm font-bold",e.state==="open"?"bg-gradient-to-br from-emerald-500/20 to-emerald-500/5 text-emerald-400 ring-1 ring-emerald-500/25":"bg-gradient-to-br from-purple-500/20 to-purple-500/5 text-purple-400 ring-1 ring-purple-500/25"),children:e.number}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[r&&c.jsx("span",{className:"shrink-0 rounded px-1 py-0.5 text-[9px] font-bold tracking-wide bg-amber-400/12 text-amber-400",children:"EPIC"}),c.jsx("span",{className:"min-w-0 text-xs font-medium text-fg-2 group-hover:text-fg",children:e.title})]}),e.labels&&e.labels.length>0&&c.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:e.labels.map(o=>c.jsx("span",{className:"rounded px-1 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${o.color}20`,color:`#${o.color}`},children:o.name},o.id))}),a&&c.jsxs("span",{className:"mt-1 flex items-center gap-1 text-[10px] text-indigo-400/70",children:[c.jsx(_1,{className:"h-2.5 w-2.5"}),a.title]})]}),t>0&&c.jsx("span",{className:"shrink-0 rounded-full bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",children:t})]})})}function Rte({issue:e,sessionCount:t,isEpic:n,milestone:r,onSelect:a}){return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center gap-3 border-b border-line px-4 py-3 text-left transition-colors hover:bg-elevated/50",children:[c.jsx("span",{className:re("flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-mono text-sm font-bold",e.state==="open"?"bg-gradient-to-br from-emerald-500/20 to-emerald-500/5 text-emerald-400 ring-1 ring-emerald-500/25":"bg-gradient-to-br from-purple-500/20 to-purple-500/5 text-purple-400 ring-1 ring-purple-500/25"),children:e.number}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[n&&c.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[9px] font-bold tracking-wide bg-amber-400/12 text-amber-400",children:"EPIC"}),c.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-fg-2 group-hover:text-fg",children:e.title}),r&&c.jsxs("span",{className:"hidden shrink-0 items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium bg-indigo-500/15 text-indigo-400 sm:flex",children:[c.jsx(_1,{className:"h-2.5 w-2.5"}),r.title]}),t>0&&c.jsxs("span",{className:"shrink-0 rounded-full bg-elevated px-2 py-0.5 font-mono text-[10px] text-fg-5",children:[t," 次运行"]}),e.assignees&&e.assignees.length>0&&c.jsxs("div",{className:"hidden shrink-0 items-center -space-x-1.5 sm:flex",children:[e.assignees.slice(0,3).map(s=>c.jsx("img",{src:s.avatar_url,alt:s.login,title:s.login,className:"h-5 w-5 rounded-full ring-2 ring-surface"},s.login)),e.assignees.length>3&&c.jsxs("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-elevated text-[9px] font-medium text-fg-4 ring-2 ring-surface",children:["+",e.assignees.length-3]})]})]}),c.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[e.authorLogin&&c.jsxs("span",{className:"shrink-0 text-[11px] text-fg-5",title:e.authorLogin,children:[e.authorAvatar&&c.jsx("img",{src:e.authorAvatar,alt:"",className:"mr-1 inline-block h-3.5 w-3.5 rounded-full align-text-bottom"}),e.authorLogin]}),e.authorLogin&&c.jsx("span",{className:"text-fg-6",children:"·"}),c.jsx("span",{className:"shrink-0 text-[11px] text-fg-6",children:rE(e.createdAt)}),(e.commentCount??0)>0&&c.jsxs("span",{className:"flex shrink-0 items-center gap-0.5 text-[11px] text-fg-6",children:[c.jsx("span",{className:"text-fg-6",children:"·"}),c.jsx(R7,{className:"h-3 w-3"}),e.commentCount]}),(e.labels&&e.labels.length>0||(e.commentCount??0)>0||e.authorLogin)&&e.labels&&e.labels.length>0&&c.jsx("span",{className:"text-fg-6",children:"·"}),e.labels&&e.labels.length>0?e.labels.map(s=>c.jsx("span",{className:"rounded px-1.5 py-0.5 text-[11px] font-medium",style:{backgroundColor:`#${s.color}20`,color:`#${s.color}`},children:s.name},s.id)):e.authorLogin?null:c.jsx("span",{className:"text-[11px] text-fg-6",children:" "})]})]})]})})}function Mte(e){var s;const t=typeof((s=e.time)==null?void 0:s.created)=="number"?e.time.created:e.createdAt?Date.parse(e.createdAt):0;if(!t||Number.isNaN(t))return"";const n=t<1e12?t*1e3:t,r=new Date(n);return r.toDateString()===new Date().toDateString()?r.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):r.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function eC({session:e,onSelect:t}){var r,a;const n=Mte(e);return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:t,className:"block w-full rounded-md border-l-2 border-transparent px-2.5 py-2 text-left transition-colors hover:bg-elevated/50",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"min-w-0 truncate font-mono text-xs text-fg-3",children:((r=e.agent)==null?void 0:r.trim())||"默认"}),n&&c.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] tabular-nums text-fg-5",children:n})]}),c.jsx("div",{className:"mt-0.5 truncate text-sm text-fg-2",children:((a=e.title)==null?void 0:a.trim())||"未命名运行"})]})})}function qM({sessions:e,onSelect:t}){const n=at(o=>o.issues),r=new Map(n.map(o=>[o.id,o])),a=new Map,s=[];for(const o of e)if(o.issueId&&r.has(o.issueId)){const u=a.get(o.issueId)??[];u.push(o),a.set(o.issueId,u)}else s.push(o);return c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col border-t border-line",children:[c.jsxs("div",{className:"flex items-center gap-1.5 border-b border-line px-3 py-3",children:[c.jsx(hU,{className:"h-3.5 w-3.5 text-fg-5"}),c.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-fg-4",children:"运行记录"}),c.jsx("span",{className:"ml-auto rounded-full bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-5",children:e.length})]}),c.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:e.length===0?c.jsx("p",{className:"px-2 py-4 text-center font-mono text-[10px] text-fg-6",children:"暂无运行记录"}):c.jsxs("div",{className:"space-y-3",children:[[...a.entries()].map(([o,u])=>{const d=r.get(o);return c.jsxs("div",{children:[c.jsxs("div",{className:"mb-1 flex items-center gap-1.5 px-1",children:[c.jsxs("span",{className:re("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-medium",d.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",d.number]}),c.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-fg-3",children:d.title})]}),c.jsx("ul",{className:"space-y-0.5",children:u.map(f=>c.jsx(eC,{session:f,onSelect:()=>t(f.id)},f.id))})]},o)}),s.length>0&&c.jsxs("div",{children:[a.size>0&&c.jsx("div",{className:"mb-1 px-1",children:c.jsx("span",{className:"text-xs font-medium text-fg-5",children:"未关联 Issue"})}),c.jsx("ul",{className:"space-y-0.5",children:s.map(o=>c.jsx(eC,{session:o,onSelect:()=>t(o.id)},o.id))})]})]})})]})}function Dte({sessions:e,onSessionSelect:t}){return c.jsx("div",{className:"flex w-full flex-col",children:c.jsx(qM,{sessions:e,onSelect:t})})}function GM({issue:e,childrenMap:t,currentId:n,onSelect:r,depth:a}){const s=t.get(e.id)??[],o=e.id===n;return c.jsxs("div",{children:[c.jsxs("button",{type:"button",onClick:()=>r(e.id),className:re("group flex w-full items-center gap-1.5 rounded-md px-2 py-1.5 text-left text-xs transition-colors",o?"bg-blue-500/10 text-blue-400":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),style:{paddingLeft:`${a*18+8}px`},children:[c.jsx("span",{className:re("h-1.5 w-1.5 shrink-0 rounded-full",e.state==="open"?"bg-emerald-400":"bg-purple-400")}),c.jsxs("span",{className:"shrink-0 font-mono text-[10px] text-fg-6",children:["#",e.number]}),c.jsx("span",{className:"min-w-0 truncate",children:e.title})]}),s.length>0&&c.jsxs("div",{className:"relative",children:[c.jsx("div",{className:"absolute top-0 bottom-3 w-px bg-line",style:{left:`${a*18+16}px`}}),s.map(u=>c.jsx(GM,{issue:u,childrenMap:t,currentId:n,onSelect:r,depth:a+1},u.id))]})]})}function jte(e,t){let n=0,r=0;const a=[...t.get(e)??[]];for(let s=0;s<a.length;s++){const o=a[s];n++,o.state==="closed"&&r++;const u=t.get(o.id);u&&a.push(...u)}return{total:n,closed:r}}function Lte({rootIssue:e,childrenMap:t,currentId:n,onSelect:r,sessions:a,onSessionSelect:s}){const{total:o,closed:u}=jte(e.id,t),d=o===0?0:Math.round(u/o*100);return c.jsxs("div",{className:"flex w-full flex-col",children:[c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[c.jsxs("div",{className:"flex items-center gap-1.5 border-b border-line px-3 py-3",children:[c.jsx(G7,{className:"h-3.5 w-3.5 text-fg-5"}),c.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-fg-4",children:"子任务树"})]}),o>0&&c.jsxs("div",{className:"border-b border-line px-3 py-2",children:[c.jsx("div",{className:"h-1 overflow-hidden rounded-full bg-elevated",children:c.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-emerald-400 to-blue-500 transition-all",style:{width:`${d}%`}})}),c.jsxs("p",{className:"mt-1 font-mono text-[10px] text-fg-6",children:[u," / ",o," completed"]})]}),c.jsx("div",{className:"flex-1 overflow-y-auto py-2",children:c.jsx(GM,{issue:e,childrenMap:t,currentId:n,onSelect:r,depth:0})})]}),c.jsx(qM,{sessions:a,onSelect:s})]})}const KM=[{key:"open",label:"开放"},{key:"closed",label:"已关闭"},{key:"all",label:"全部"}];function Pte({stateFilter:e,setStateFilter:t,typeFilter:n,setTypeFilter:r,searchQuery:a,setSearchQuery:s,expandedFilter:o,setExpandedFilter:u,selectedAuthor:d,setSelectedAuthor:f,selectedAssignee:m,setSelectedAssignee:p,creating:b,setCreating:x,openCount:E,closedCount:_,totalCount:S,epicCount:T,taskCount:C,strayCount:A,afterStateCount:k,uniqueAuthors:I,uniqueAssignees:O}){const j=at(F=>F.syncing),H=at(F=>F.syncIssues),z=at(F=>F.tags),D=at(F=>F.tagFilterMode),V=at(F=>F.cycleTagFilter),q=at(F=>F.clearTagFilter),ae=at(F=>F.milestones),Q=at(F=>F.selectedMilestoneId),W=at(F=>F.setMilestoneFilter),G=Fe(F=>F.activeRepoId);return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-2 border-b border-line px-4 py-2.5",children:[c.jsx("span",{className:"shrink-0 text-sm font-semibold text-fg md:order-1",children:"Issues"}),G&&c.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1 md:order-last md:ml-0",children:[c.jsx("button",{type:"button",onClick:()=>void H(),disabled:j,title:"同步 Issues",className:"flex h-8 w-8 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2 disabled:opacity-40",children:c.jsx(ll,{className:re("h-3.5 w-3.5",j&&"animate-spin")})}),c.jsx("button",{type:"button",onClick:()=>x(!b),title:"新建 Issue",className:re("flex h-8 w-8 items-center justify-center rounded-md transition-colors",b?"bg-blue-600 text-white":"text-fg-4 hover:bg-elevated hover:text-fg-2"),children:c.jsx(Da,{className:"h-3.5 w-3.5"})})]}),c.jsx("div",{className:"w-full md:order-2 md:w-auto",children:c.jsx("div",{className:"flex shrink-0 items-center rounded-lg bg-elevated/60 p-0.5",children:KM.map(({key:F,label:$})=>{const K=F==="open"?E:F==="closed"?_:S;return c.jsxs("button",{type:"button",onClick:()=>t(F),className:re("flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",e===F?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-2"),children:[$,c.jsx("span",{className:re("rounded-full px-1.5 py-0.5 font-mono text-[10px]",e===F?"bg-blue-500/10 text-blue-500":"text-fg-5"),children:K})]},F)})})}),c.jsx("div",{className:"w-full md:order-5 md:w-auto md:min-w-0 md:flex-1 md:px-1",children:c.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2.5 py-1.5",children:[c.jsx(tl,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),c.jsx("input",{type:"text",value:a,onChange:F=>s(F.target.value),placeholder:"搜索 issue...",className:"min-w-0 flex-1 bg-transparent text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),a&&c.jsx("button",{type:"button",onClick:()=>s(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:c.jsx(yt,{className:"h-3 w-3"})})]})}),c.jsx("div",{className:"hidden md:order-3 md:mx-1 md:block md:h-4 md:w-px md:shrink-0 md:bg-line"}),c.jsxs("div",{className:"flex w-full gap-2 overflow-x-auto scrollbar-none md:order-4 md:w-auto md:overflow-visible",children:[c.jsxs("button",{type:"button",onClick:()=>u(o==="type"?null:"type"),className:re("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",o==="type"?"bg-elevated text-fg":n!=="all"?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["类型",n!=="all"&&c.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:n==="epic"?"Epic":n==="task"?"任务":"游离"}),c.jsx(Vr,{className:re("h-3 w-3 transition-transform",o==="type"&&"rotate-180")})]}),c.jsxs("button",{type:"button",onClick:()=>u(o==="tag"?null:"tag"),className:re("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",o==="tag"?"bg-elevated text-fg":D.size>0?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["标签",D.size>0&&c.jsx("span",{className:"rounded-full bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:D.size}),c.jsx(Vr,{className:re("h-3 w-3 transition-transform",o==="tag"&&"rotate-180")})]}),c.jsxs("button",{type:"button",onClick:()=>u(o==="milestone"?null:"milestone"),className:re("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",o==="milestone"?"bg-elevated text-fg":Q?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["Milestone",Q&&(()=>{const F=ae.find($=>$.id===Q);return F?c.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:F.title}):null})(),c.jsx(Vr,{className:re("h-3 w-3 transition-transform",o==="milestone"&&"rotate-180")})]}),c.jsxs("button",{type:"button",onClick:()=>u(o==="author"?null:"author"),className:re("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",o==="author"?"bg-elevated text-fg":d?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["Author",d&&c.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:d}),c.jsx(Vr,{className:re("h-3 w-3 transition-transform",o==="author"&&"rotate-180")})]}),c.jsxs("button",{type:"button",onClick:()=>u(o==="assignee"?null:"assignee"),className:re("flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors",o==="assignee"?"bg-elevated text-fg":m?"text-fg-2":"text-fg-4 hover:bg-elevated/60 hover:text-fg-2"),children:["Assignee",m&&c.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-400",children:m}),c.jsx(Vr,{className:re("h-3 w-3 transition-transform",o==="assignee"&&"rotate-180")})]})]})]}),o==="type"&&c.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:["epic","stray","task","all"].map(F=>{const $=F==="epic"?"Epic":F==="stray"?"游离":F==="task"?"任务":"全部",K=F==="epic"?T:F==="stray"?A:F==="task"?C:k,L=n===F;return c.jsxs("button",{type:"button",onClick:()=>r(L&&F!=="all"?"all":F),className:re("flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-semibold transition-colors",L?F==="epic"?"bg-amber-400/15 text-amber-400":F==="stray"?"bg-sky-400/15 text-sky-400":F==="task"?"bg-violet-400/15 text-violet-400":"bg-fg-6/20 text-fg-3":"bg-elevated/60 text-fg-5 hover:bg-elevated hover:text-fg-3"),children:[$,c.jsx("span",{className:re("rounded-full px-1.5 py-0.5 font-mono text-[10px] font-medium",L?"opacity-70":"text-fg-6"),children:K})]},F)})}),o==="tag"&&c.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:z.length===0?c.jsx("span",{className:"text-xs text-fg-5",children:"暂无标签"}):c.jsxs(c.Fragment,{children:[z.map(F=>{const $=D.get(F.id);return c.jsxs("button",{type:"button",onClick:()=>V(F.id),className:re("shrink-0 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",$==="include"?"ring-1 ring-current shadow-sm":$==="exclude"?"opacity-90 line-through decoration-2":"opacity-50 hover:opacity-80"),style:$==="exclude"?{backgroundColor:`#${F.color}10`,color:`#${F.color}`,boxShadow:`inset 0 0 0 1px color-mix(in srgb, #${F.color} 30%, transparent)`}:{backgroundColor:`#${F.color}18`,color:`#${F.color}`,boxShadow:$==="include"?`inset 0 0 0 1px color-mix(in srgb, #${F.color} 50%, transparent)`:void 0},children:[$==="exclude"&&c.jsx("span",{className:"mr-1 text-[10px]",children:"✕"}),F.name]},F.id)}),D.size>0&&c.jsx("button",{type:"button",onClick:q,className:"shrink-0 rounded-md px-2 py-1 text-[10px] text-fg-5 transition-colors hover:bg-elevated hover:text-fg-3",children:"清除"})]})}),o==="milestone"&&c.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:ae.length===0?c.jsx("span",{className:"text-xs text-fg-5",children:"暂无里程碑"}):c.jsxs(c.Fragment,{children:[ae.map(F=>{const $=Q===F.id;return c.jsxs("button",{type:"button",onClick:()=>W($?null:F.id),className:re("shrink-0 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",$?"bg-indigo-500/15 text-indigo-400 ring-1 ring-indigo-400/50 shadow-sm":"bg-elevated/60 text-fg-5 hover:bg-elevated hover:text-fg-3"),children:[F.title,F.state==="closed"&&c.jsx("span",{className:"ml-1 text-[10px] opacity-60",children:"✓"})]},F.id)}),Q&&c.jsx("button",{type:"button",onClick:()=>W(null),className:"shrink-0 rounded-md px-2 py-1 text-[10px] text-fg-5 transition-colors hover:bg-elevated hover:text-fg-3",children:"清除"})]})}),o==="author"&&c.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:I.length===0?c.jsx("span",{className:"text-xs text-fg-5",children:"同步后可见作者"}):c.jsxs(c.Fragment,{children:[I.map(F=>c.jsxs("button",{type:"button",onClick:()=>f(d===F.login?null:F.login),className:re("flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",d===F.login?"bg-blue-500/15 text-blue-400 ring-1 ring-blue-500/30 shadow-sm":"bg-elevated/60 text-fg-5 hover:bg-elevated hover:text-fg-3"),children:[F.avatar&&c.jsx("img",{src:F.avatar,alt:"",className:"h-4 w-4 rounded-full"}),F.login]},F.login)),d&&c.jsx("button",{type:"button",onClick:()=>f(null),className:"shrink-0 rounded-md px-2 py-1 text-[10px] text-fg-5 transition-colors hover:bg-elevated hover:text-fg-3",children:"清除"})]})}),o==="assignee"&&c.jsx("div",{className:"flex items-center gap-2 overflow-x-auto border-b border-line px-4 py-2",style:{scrollbarWidth:"none"},children:O.length===0?c.jsx("span",{className:"text-xs text-fg-5",children:"同步后可见指派人"}):c.jsxs(c.Fragment,{children:[O.map(F=>c.jsxs("button",{type:"button",onClick:()=>p(m===F.login?null:F.login),className:re("flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",m===F.login?"bg-blue-500/15 text-blue-400 ring-1 ring-blue-500/30 shadow-sm":"bg-elevated/60 text-fg-5 hover:bg-elevated hover:text-fg-3"),children:[F.avatar&&c.jsx("img",{src:F.avatar,alt:"",className:"h-4 w-4 rounded-full"}),F.login]},F.login)),m&&c.jsx("button",{type:"button",onClick:()=>p(null),className:"shrink-0 rounded-md px-2 py-1 text-[10px] text-fg-5 transition-colors hover:bg-elevated hover:text-fg-3",children:"清除"})]})})]})}function Bte(){const[e,t]=v.useState("open"),[n,r]=v.useState("stray"),[a,s]=v.useState(!1),[o,u]=v.useState(""),d=at(Ne=>Ne.viewingTreeRootId),f=at(Ne=>Ne.setViewingIssue),[m,p]=v.useState(!1),[b,x]=v.useState(!1),[E,_]=v.useState(null),[S,T]=v.useState(null),[C,A]=v.useState(null),[k,I]=y1(),O=at(Ne=>Ne.issues),j=at(Ne=>Ne.syncing),H=at(Ne=>Ne.syncIssues),z=at(Ne=>Ne.tags),D=at(Ne=>Ne.tagFilterMode),V=at(Ne=>Ne.loadTags),q=at(Ne=>Ne.milestones),ae=at(Ne=>Ne.selectedMilestoneId),Q=at(Ne=>Ne.loadMilestones),W=Fe(Ne=>Ne.activeRepoId),G=Fe(Dr),F=Le(Ne=>Ne.sessions),$=ur(),K=k.get("id"),L=k.get("tab")==="pr"?"pr":"issue",P=k.get("prId"),ee=P?Number.parseInt(P,10):null;v.useEffect(()=>{const Ne=k.get("issueId");if(!Ne)return;const vt=new URLSearchParams(k);vt.delete("issueId"),vt.set("id",Ne),I(vt,{replace:!0})},[k,I]),v.useEffect(()=>{if(k.get("id"))return;const Ne=at.getState().viewingIssueId;Ne&&I({id:Ne},{replace:!0})},[]);const M=v.useCallback(Ne=>{I({id:Ne},{replace:!1})},[I]),de=v.useCallback(()=>{I({},{replace:!1}),f(null)},[I,f]),_e=v.useCallback(Ne=>{if(!K)return;const vt={id:K};Ne==="pr"&&(vt.tab="pr"),I(vt,{replace:!1})},[K,I]),U=v.useCallback(Ne=>{K&&I({id:K,tab:"pr",prId:String(Ne)},{replace:!1})},[K,I]),he=v.useCallback(()=>{K&&I({id:K,tab:"pr"},{replace:!1})},[K,I]);v.useEffect(()=>{W&&(V(),Q())},[W,V,Q]);const{childrenMap:Oe,issueType:pe,milestoneMap:De,finalFiltered:je,counts:Ee,uniqueAuthors:It,uniqueAssignees:nt}=pZ({issues:O,tags:z,milestones:q,tagFilterMode:D,stateFilter:e,typeFilter:n,searchQuery:o,selectedMilestoneId:ae,selectedAuthor:S,selectedAssignee:C}),ze=v.useMemo(()=>{const Ne=new Map;for(const vt of F)vt.issueId&&!vt.parentID&&Ne.set(vt.issueId,(Ne.get(vt.issueId)??0)+1);return Ne},[F]),We=O.find(Ne=>Ne.id===K)??null,cn=v.useMemo(()=>{if(!K)return[];const Ne=new Set([K]);if(d){Ne.add(d);const vt=[...Oe.get(d)??[]];for(let ta=0;ta<vt.length;ta++){Ne.add(vt[ta].id);const Vt=Oe.get(vt[ta].id);Vt&&vt.push(...Vt)}}return F.filter(vt=>vt.issueId&&Ne.has(vt.issueId)&&!vt.parentID)},[K,d,Oe,F]),Un=v.useCallback(Ne=>{Le.setState({activeSessionId:Ne}),$(`/${encodeURIComponent(G)}/run`)},[$,G]),jr=v.useCallback((Ne,vt)=>{M(Ne),f(Ne,vt==="epic"?Ne:null)},[M,f]),Fa=aM({onSwipeRight:()=>x(!0),onSwipeLeft:()=>p(!0),disabled:!K||b||m});return c.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 overflow-hidden",...Fa,children:[c.jsxs("div",{className:re("shrink-0 flex-col bg-surface",K?"hidden md:flex md:w-80 border-r border-line":"flex w-full"),children:[K?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-3",children:[c.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"Issues"}),W&&c.jsx("div",{className:"flex items-center gap-1",children:c.jsx("button",{type:"button",onClick:()=>void H(),disabled:j,title:"同步",className:"flex h-7 w-7 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2 disabled:opacity-40",children:c.jsx(ll,{className:re("h-3.5 w-3.5",j&&"animate-spin")})})})]}),a&&c.jsx(ZA,{onDone:()=>s(!1)}),c.jsx("div",{className:"flex border-b border-line",children:KM.map(({key:Ne,label:vt})=>{const ta=Ne==="open"?Ee.open:Ne==="closed"?Ee.closed:O.length;return c.jsxs("button",{type:"button",onClick:()=>t(Ne),className:re("flex flex-1 items-center justify-center gap-1.5 py-2 text-xs font-medium transition-colors",e===Ne?"border-b-2 border-blue-500 text-blue-500":"text-fg-4 hover:text-fg-2"),children:[vt,c.jsx("span",{className:re("rounded-full px-1.5 py-0.5 font-mono text-[10px]",e===Ne?"bg-blue-500/10 text-blue-500":"bg-elevated text-fg-5"),children:ta})]},Ne)})}),c.jsx("div",{className:"border-b border-line px-3 py-2",children:c.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[c.jsx(tl,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),c.jsx("input",{type:"text",value:o,onChange:Ne=>u(Ne.target.value),placeholder:"搜索 issue...",className:"min-w-0 flex-1 bg-transparent font-mono text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),o&&c.jsx("button",{type:"button",onClick:()=>u(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:c.jsx(yt,{className:"h-3 w-3"})})]})})]}):c.jsxs(c.Fragment,{children:[c.jsx(Pte,{stateFilter:e,setStateFilter:t,typeFilter:n,setTypeFilter:r,searchQuery:o,setSearchQuery:u,expandedFilter:E,setExpandedFilter:_,selectedAuthor:S,setSelectedAuthor:T,selectedAssignee:C,setSelectedAssignee:A,creating:a,setCreating:s,openCount:Ee.open,closedCount:Ee.closed,totalCount:O.length,epicCount:Ee.epic,taskCount:Ee.task,strayCount:Ee.stray,afterStateCount:Ee.afterState,uniqueAuthors:It,uniqueAssignees:nt}),a&&c.jsx(ZA,{onDone:()=>s(!1)})]}),c.jsx("div",{className:re("flex-1 overflow-y-auto",K?"px-2 py-2":"px-3 py-3"),children:W?je.length===0?c.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:O.length===0?"点击 ↻ 同步 Issues":"无匹配 Issue"}):c.jsx("ul",{className:re(K?"space-y-0.5":"space-y-1"),children:je.map(Ne=>K?c.jsx(JA,{issue:Ne,sessionCount:ze.get(Ne.id)??0,isActive:K===Ne.id,isEpic:pe(Ne)==="epic",milestone:Ne.milestoneId?De.get(Ne.milestoneId):void 0,onSelect:()=>jr(Ne.id,pe(Ne))},Ne.id):c.jsx(Rte,{issue:Ne,sessionCount:ze.get(Ne.id)??0,isEpic:pe(Ne)==="epic",milestone:Ne.milestoneId?De.get(Ne.milestoneId):void 0,onSelect:()=>jr(Ne.id,pe(Ne))},Ne.id))}):c.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:"请先选择一个仓库"})})]}),K&&c.jsx(hv,{side:"left",open:b,onClose:()=>x(!1),children:c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsx("div",{className:"border-b border-line px-3 py-3",children:c.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"Issues"})}),c.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:je.length===0?c.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:"无匹配 Issue"}):c.jsx("ul",{className:"space-y-0.5",children:je.map(Ne=>c.jsx(JA,{issue:Ne,sessionCount:ze.get(Ne.id)??0,isActive:K===Ne.id,isEpic:pe(Ne)==="epic",milestone:Ne.milestoneId?De.get(Ne.milestoneId):void 0,onSelect:()=>{jr(Ne.id,pe(Ne)),x(!1)}},Ne.id))})})]})}),K&&c.jsx("div",{className:"relative flex min-w-0 flex-1 flex-col bg-term",children:We?c.jsxs(c.Fragment,{children:[c.jsx(Ite,{issue:We,milestone:We.milestoneId?De.get(We.milestoneId):void 0,tab:L,prNumber:ee,onTabChange:_e,onSelectPr:U,onBackToPrList:he,onBack:()=>{de(),p(!1)},onClose:()=>{de(),p(!1)},onToggleSidebar:()=>p(Ne=>!Ne)}),m&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"absolute inset-0 z-10 bg-black/30",onClick:()=>p(!1)}),c.jsxs("div",{className:"absolute right-0 top-0 bottom-0 z-20 flex w-[280px] flex-col border-l border-line bg-surface shadow-xl",children:[c.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-line px-3 py-2.5",children:[c.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-fg-4",children:d?"子任务树 & 运行记录":"运行记录"}),c.jsx("button",{type:"button",onClick:()=>p(!1),className:"flex h-6 w-6 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:c.jsx(yt,{className:"h-4 w-4"})})]}),c.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:d?(()=>{const Ne=O.find(vt=>vt.id===d);return Ne?c.jsx(Lte,{rootIssue:Ne,childrenMap:Oe,currentId:K,onSelect:vt=>{M(vt),f(vt,d),p(!1)},sessions:cn,onSessionSelect:Un}):null})():c.jsx(Dte,{sessions:cn,onSessionSelect:Un})})]})]})]}):c.jsx("div",{className:"flex flex-1 items-center justify-center",children:c.jsx("p",{className:"font-mono text-xs text-fg-5",children:"Issue 未找到"})})})]})}function Ute({issues:e,onSelect:t}){const n=Le(a=>a.sessions),r=new Map;for(const a of n)a.issueId&&!a.parentID&&r.set(a.issueId,(r.get(a.issueId)??0)+1);return e.length===0?c.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-fg-5",children:[c.jsx(vl,{className:"h-8 w-8"}),c.jsx("p",{className:"font-mono text-xs",children:"该 PR 没有关联的 Issue"})]}):c.jsx("ul",{className:"space-y-2",children:e.map(a=>{const s=r.get(a.id)??0;return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:()=>t(a.id),className:"group flex w-full flex-col gap-1.5 rounded-lg border border-line bg-elevated/30 px-4 py-3 text-left transition-colors hover:border-blue-500/40 hover:bg-elevated/60",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("span",{className:re("shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-semibold",kte(a.state)),children:["#",a.number," ",a.state]}),c.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-fg-2 group-hover:text-fg",children:a.title}),s>0&&c.jsxs("span",{className:"shrink-0 rounded-full bg-elevated px-2 py-0.5 font-mono text-[10px] text-fg-5",children:[s," 次运行"]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[11px] text-fg-5",children:[a.authorLogin&&c.jsxs("span",{className:"flex items-center gap-1",children:[a.authorAvatar&&c.jsx("img",{src:a.authorAvatar,alt:"",className:"h-3.5 w-3.5 rounded-full"}),a.authorLogin]}),a.labels&&a.labels.length>0&&a.labels.map(o=>c.jsx("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${o.color}20`,color:`#${o.color}`},children:o.name},o.id))]})]})},a.id)})})}function zte({pr:e,isActive:t,onSelect:n}){return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:n,className:re("group flex w-full items-center gap-2.5 rounded-md px-2.5 py-2 text-left transition-colors",t?"border-l-2 border-blue-500 bg-elevated/80":"border-l-2 border-transparent hover:bg-elevated/50"),children:[c.jsx("span",{className:re("flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-mono text-sm font-bold ring-1",e.state==="merged"?"bg-gradient-to-br from-purple-500/20 to-purple-500/5 text-purple-400 ring-purple-500/25":e.state==="closed"?"bg-gradient-to-br from-red-500/20 to-red-500/5 text-red-400 ring-red-500/25":"bg-gradient-to-br from-emerald-500/20 to-emerald-500/5 text-emerald-400 ring-emerald-500/25"),children:e.number}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[e.draft===1&&c.jsx("span",{className:"shrink-0 rounded px-1 py-0.5 text-[9px] font-bold bg-fg-6/15 text-fg-4",children:"DRAFT"}),c.jsx("span",{className:"min-w-0 text-xs font-medium text-fg-2 group-hover:text-fg",children:e.title})]}),c.jsxs("div",{className:"mt-0.5 truncate font-mono text-[10px] text-fg-6",children:[e.headBranch," → ",e.baseBranch]}),e.labels&&e.labels.length>0&&c.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:e.labels.map(r=>c.jsx("span",{className:"rounded px-1 py-0.5 text-[10px] font-medium",style:{backgroundColor:`#${r.color}20`,color:`#${r.color}`},children:r.name},r.id))})]})]})})}function Fte({pr:e,onSelect:t}){return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:t,className:"group flex w-full items-center gap-3 border-b border-line px-4 py-3 text-left transition-colors hover:bg-elevated/50",children:[c.jsx("span",{className:re("flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-mono text-sm font-bold ring-1",e.state==="merged"?"bg-gradient-to-br from-purple-500/20 to-purple-500/5 text-purple-400 ring-purple-500/25":e.state==="closed"?"bg-gradient-to-br from-red-500/20 to-red-500/5 text-red-400 ring-red-500/25":"bg-gradient-to-br from-emerald-500/20 to-emerald-500/5 text-emerald-400 ring-emerald-500/25"),children:e.number}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[e.draft===1&&c.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[9px] font-bold tracking-wide bg-fg-6/15 text-fg-4",children:"DRAFT"}),c.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-fg-2 group-hover:text-fg",children:e.title}),e.mergeable==="false"&&e.state==="open"&&c.jsxs("span",{className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] font-semibold bg-red-500/15 text-red-400",children:[c.jsx(or,{className:"inline h-3 w-3 -mt-px"})," Conflict"]}),e.assignees&&e.assignees.length>0&&c.jsx("div",{className:"hidden shrink-0 items-center -space-x-1.5 sm:flex",children:e.assignees.slice(0,3).map(n=>c.jsx("img",{src:n.avatar_url,alt:n.login,title:n.login,className:"h-5 w-5 rounded-full ring-2 ring-surface"},n.login))})]}),c.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[c.jsxs("span",{className:"shrink-0 font-mono text-[11px] text-fg-5",children:[e.headBranch," → ",e.baseBranch]}),c.jsx("span",{className:"text-fg-6",children:"·"}),e.authorLogin&&c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"shrink-0 text-[11px] text-fg-5",title:e.authorLogin,children:[e.authorAvatar&&c.jsx("img",{src:e.authorAvatar,alt:"",className:"mr-1 inline-block h-3.5 w-3.5 rounded-full align-text-bottom"}),e.authorLogin]}),c.jsx("span",{className:"text-fg-6",children:"·"})]}),c.jsx("span",{className:"shrink-0 text-[11px] text-fg-6",children:rE(e.createdAt)}),e.labels&&e.labels.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-fg-6",children:"·"}),e.labels.map(n=>c.jsx("span",{className:"rounded px-1.5 py-0.5 text-[11px] font-medium",style:{backgroundColor:`#${n.color}20`,color:`#${n.color}`},children:n.name},n.id))]})]})]})]})})}const tC=[{key:"open",label:"开放"},{key:"merged",label:"已合并"},{key:"closed",label:"已关闭"},{key:"all",label:"全部"}];function Hte({issue:e,linked:t,onToggle:n}){return c.jsx("li",{children:c.jsx("button",{type:"button",onClick:n,className:re("group flex w-full items-start gap-2 rounded-md px-3 py-2.5 text-left transition-colors",t?"border-l-2 border-emerald-500 bg-emerald-500/5":"border-l-2 border-transparent hover:bg-elevated/50"),children:c.jsx("div",{className:"min-w-0 flex-1",children:c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsxs("span",{className:re("shrink-0 rounded px-1.5 py-0.5 font-mono text-xs font-medium",e.state==="open"?"bg-emerald-500/15 text-emerald-400":"bg-purple-500/15 text-purple-400"),children:["#",e.number]}),c.jsx("span",{className:"min-w-0 truncate text-sm font-medium text-fg-2",children:e.title}),t&&c.jsx(N1,{className:"ml-auto h-3.5 w-3.5 shrink-0 text-emerald-400"})]})})})})}function $te({pr:e,tab:t,issueId:n,onTabChange:r,onSelectIssue:a,onBackToIssueList:s,onBack:o,onClose:u,onEnterMatch:d,onNavigateToIssue:f}){const m=Fe(_=>_.activeRepoId),p=at(_=>_.issues),[b,x]=v.useState([]);v.useEffect(()=>{if(!m){x([]);return}k1(m,e.number).then(x).catch(()=>x([]))},[m,e.number]);const E=n?p.find(_=>_.id===n)??b.find(_=>_.id===n)??null:null;return c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[b.length>0&&c.jsxs("div",{className:"flex shrink-0 items-center border-b border-line bg-surface",children:[c.jsxs("button",{type:"button",onClick:()=>r("pr"),className:re("flex items-center gap-1.5 border-b-2 px-4 py-2.5 text-xs font-medium transition-colors",t==="pr"?"border-blue-500 text-fg":"border-transparent text-fg-4 hover:text-fg-2"),children:[c.jsx(ol,{className:"h-3.5 w-3.5"}),"PR"]}),c.jsxs("button",{type:"button",onClick:()=>r("issue"),className:re("flex items-center gap-1.5 border-b-2 px-4 py-2.5 text-xs font-medium transition-colors",t==="issue"?"border-blue-500 text-fg":"border-transparent text-fg-4 hover:text-fg-2"),children:[c.jsx(vl,{className:"h-3.5 w-3.5"}),"Issue",c.jsx("span",{className:re("rounded-full px-1.5 py-0.5 font-mono text-[10px]",t==="issue"?"bg-blue-500/10 text-blue-500":"bg-elevated text-fg-5"),children:b.length})]})]}),t==="pr"||b.length===0?c.jsx(YM,{pr:e,onBack:o,onClose:u,onEnterMatch:d,onNavigateToIssue:f}):E?c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:[c.jsx("div",{className:"flex shrink-0 items-center border-b border-line bg-elevated/30 px-4 py-2",children:c.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-1 rounded-md px-2 py-1 text-xs text-fg-3 transition-colors hover:bg-elevated hover:text-fg",children:[c.jsx(Qd,{className:"h-3.5 w-3.5"}),"返回列表"]})}),c.jsx($M,{issue:E,onBack:s})]}):c.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:c.jsx("div",{className:"mx-auto max-w-3xl px-4 py-6 md:px-6",children:c.jsx(Ute,{issues:b,onSelect:a})})})]})}function Yte(){const[e,t]=v.useState("open"),[n,r]=v.useState(""),a=Hn(U=>U.setViewingPr),[s,o]=v.useState(""),[u,d]=y1(),f=ur(),m=Fe(Dr),p=Hn(U=>U.pulls),b=Hn(U=>U.syncing),x=Hn(U=>U.syncPulls),E=Hn(U=>U.matchingPrId),_=Hn(U=>U.enterMatchMode),S=Hn(U=>U.exitMatchMode),T=Hn(U=>U.linkIssue),C=Fe(U=>U.activeRepoId),A=at(U=>U.issues),k=u.get("id"),I=u.get("tab")==="issue"?"issue":"pr",O=u.get("issueId");v.useEffect(()=>{const U=u.get("prId");if(!U)return;const he=new URLSearchParams(u);he.delete("prId"),he.set("id",U),d(he,{replace:!0})},[u,d]),v.useEffect(()=>{if(u.get("id"))return;const U=Hn.getState().viewingPrId;U&&d({id:U},{replace:!0})},[]);const j=v.useCallback(U=>{d({id:U},{replace:!1}),a(U)},[d,a]),H=v.useCallback(()=>{d({},{replace:!1}),a(null)},[d,a]),z=v.useCallback(U=>{if(!k)return;const he={id:k};U==="issue"&&(he.tab="issue"),d(he,{replace:!1})},[k,d]),D=v.useCallback(U=>{k&&d({id:k,tab:"issue",issueId:U},{replace:!1})},[k,d]),V=v.useCallback(()=>{k&&d({id:k,tab:"issue"},{replace:!1})},[k,d]),q=E?p.find(U=>U.id===E)??null:null,[ae,Q]=v.useState(new Set);v.useEffect(()=>{if(!C||!q){Q(new Set);return}k1(C,q.number).then(U=>Q(new Set(U.map(he=>he.id)))).catch(()=>Q(new Set))},[C,q]);const W=async U=>{if(!q)return;ae.has(U.id)?await Hn.getState().unlinkIssue(q.number,U.number)&&Q(pe=>{const De=new Set(pe);return De.delete(U.id),De}):await T(q.number,U.number)&&Q(pe=>new Set(pe).add(U.id))},G=p.filter(U=>U.state==="open").length,F=p.filter(U=>U.state==="merged").length,$=p.filter(U=>U.state==="closed").length,K=e==="all"?p:p.filter(U=>U.state===e),L=n.trim().toLowerCase(),P=L?K.filter(U=>`#${U.number} ${U.title} ${U.headBranch} ${U.baseBranch}`.toLowerCase().includes(L)):K,ee=s.trim().toLowerCase(),M=ee?A.filter(U=>`#${U.number} ${U.title}`.toLowerCase().includes(ee)):A,de=p.find(U=>U.id===k)??null,_e=q??de;return c.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 overflow-hidden",children:[c.jsxs("div",{className:re("shrink-0 flex-col bg-surface",_e?"hidden md:flex md:w-80 border-r border-line":"flex w-full"),children:[E?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-3",children:[c.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-400",children:"选择 Issue 关联"}),c.jsxs("button",{type:"button",onClick:S,className:"flex h-7 items-center gap-1 rounded-md px-2 text-xs text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2",children:[c.jsx(yt,{className:"h-3.5 w-3.5"}),"完成"]})]}),c.jsx("div",{className:"border-b border-line px-3 py-2",children:c.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[c.jsx(tl,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),c.jsx("input",{type:"text",value:s,onChange:U=>o(U.target.value),placeholder:"搜索 issue...",className:"min-w-0 flex-1 bg-transparent font-mono text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),s&&c.jsx("button",{type:"button",onClick:()=>o(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:c.jsx(yt,{className:"h-3 w-3"})})]})}),c.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-2",children:M.length===0?c.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:A.length===0?"暂无 Issue,请先同步":"无匹配 Issue"}):c.jsx("ul",{className:"space-y-0.5",children:M.map(U=>c.jsx(Hte,{issue:U,linked:ae.has(U.id),onToggle:()=>void W(U)},U.id))})})]}):_e?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-line px-3 py-3",children:[c.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-fg-3",children:"Pull Requests"}),C&&c.jsx("button",{type:"button",onClick:()=>void x(),disabled:b,title:"同步",className:"flex h-7 w-7 items-center justify-center rounded-md text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2 disabled:opacity-40",children:c.jsx(ll,{className:re("h-3.5 w-3.5",b&&"animate-spin")})})]}),c.jsx("div",{className:"flex border-b border-line",children:tC.map(({key:U,label:he})=>{const Oe=U==="open"?G:U==="merged"?F:U==="closed"?$:p.length;return c.jsxs("button",{type:"button",onClick:()=>t(U),className:re("flex flex-1 items-center justify-center gap-1.5 py-2 text-xs font-medium transition-colors",e===U?"border-b-2 border-blue-500 text-blue-500":"text-fg-4 hover:text-fg-2"),children:[he,c.jsx("span",{className:re("rounded-full px-1.5 py-0.5 font-mono text-[10px]",e===U?"bg-blue-500/10 text-blue-500":"bg-elevated text-fg-5"),children:Oe})]},U)})}),c.jsx("div",{className:"border-b border-line px-3 py-2",children:c.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2 py-1",children:[c.jsx(tl,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),c.jsx("input",{type:"text",value:n,onChange:U=>r(U.target.value),placeholder:"搜索 PR...",className:"min-w-0 flex-1 bg-transparent font-mono text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),n&&c.jsx("button",{type:"button",onClick:()=>r(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:c.jsx(yt,{className:"h-3 w-3"})})]})})]}):c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-2 border-b border-line px-4 py-2.5",children:[c.jsx("span",{className:"shrink-0 text-sm font-semibold text-fg md:order-1",children:"Pull Requests"}),c.jsx("button",{type:"button",onClick:()=>void x(),disabled:b||!C,title:"同步 PR",className:"ml-auto flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-line text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-2 disabled:opacity-40 md:order-last md:ml-0",children:c.jsx(ll,{className:re("h-4 w-4",b&&"animate-spin")})}),c.jsx("div",{className:"w-full md:order-2 md:w-auto",children:c.jsx("div",{className:"flex shrink-0 items-center rounded-lg bg-elevated/60 p-0.5",children:tC.map(({key:U,label:he})=>{const Oe=U==="open"?G:U==="merged"?F:U==="closed"?$:p.length;return c.jsxs("button",{type:"button",onClick:()=>t(U),className:re("flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",e===U?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-2"),children:[he,c.jsx("span",{className:re("rounded-full px-1.5 py-0.5 font-mono text-[10px]",e===U?"bg-blue-500/10 text-blue-500":"text-fg-5"),children:Oe})]},U)})})}),c.jsx("div",{className:"w-full md:order-3 md:w-auto md:min-w-0 md:flex-1 md:px-1",children:c.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-base px-2.5 py-1.5",children:[c.jsx(tl,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),c.jsx("input",{type:"text",value:n,onChange:U=>r(U.target.value),placeholder:"搜索 PR...",className:"min-w-0 flex-1 bg-transparent text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),n&&c.jsx("button",{type:"button",onClick:()=>r(""),className:"shrink-0 text-fg-5 hover:text-fg-3",children:c.jsx(yt,{className:"h-3 w-3"})})]})})]})}),!E&&c.jsx("div",{className:re("flex-1 overflow-y-auto",_e?"px-2 py-2":"px-3 py-3"),children:C?P.length===0?c.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-fg-5",children:[c.jsx(ol,{className:"h-8 w-8"}),c.jsx("p",{className:"font-mono text-xs",children:p.length===0?"点击 ↻ 同步 PR":"没有匹配的 PR"})]}):c.jsx("ul",{className:re(_e?"space-y-0.5":"space-y-1"),children:P.map(U=>_e?c.jsx(zte,{pr:U,isActive:U.id===(k??E),onSelect:()=>j(U.id)},U.id):c.jsx(Fte,{pr:U,onSelect:()=>j(U.id)},U.id))}):c.jsx("p",{className:"px-2 py-8 text-center font-mono text-xs text-fg-5",children:"请先选择一个仓库"})})]}),_e?c.jsx($te,{pr:_e,tab:I,issueId:O,onTabChange:z,onSelectIssue:D,onBackToIssueList:V,onBack:()=>{H(),E&&S()},onClose:()=>{H(),E&&S()},onEnterMatch:()=>_(_e.id),onNavigateToIssue:U=>{m&&f(`/${encodeURIComponent(m)}/dev/issues?id=${encodeURIComponent(U)}`)}},`${_e.id}-${E??"view"}`):c.jsx("div",{className:"hidden flex-1 items-center justify-center md:flex",children:c.jsxs("div",{className:"text-center text-fg-5",children:[c.jsx(ol,{className:"mx-auto h-12 w-12 opacity-20"}),c.jsx("p",{className:"mt-3 font-mono text-xs",children:"选择一个 PR 查看详情"})]})})]})}function nC(e,t){return e?`/${encodeURIComponent(e)}/dev/${t}`:`/dev/${t}`}function rC(){const e=ur(),t=lr(),n=Fe(Dr),r=at(d=>d.issues),a=Hn(d=>d.pulls),s=t.pathname.endsWith("/pulls")?"pulls":"issues",o=r.filter(d=>d.state==="open").length,u=a.filter(d=>d.state==="open").length;return c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[c.jsx("div",{className:"flex shrink-0 items-center gap-1 border-b border-line bg-surface px-3 py-2",children:c.jsxs("div",{className:"flex items-center rounded-lg bg-elevated/60 p-0.5",children:[c.jsxs("button",{type:"button",onClick:()=>e(nC(n,"issues")),className:re("flex items-center gap-1.5 rounded-md px-3 py-1 text-xs font-medium transition-colors",s==="issues"?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-2"),children:[c.jsx(vl,{className:"h-3.5 w-3.5"}),"Issues",c.jsx("span",{className:re("rounded-full px-1.5 py-0.5 font-mono text-[10px]",s==="issues"?"bg-blue-500/10 text-blue-500":"text-fg-5"),children:o})]}),c.jsxs("button",{type:"button",onClick:()=>e(nC(n,"pulls")),className:re("flex items-center gap-1.5 rounded-md px-3 py-1 text-xs font-medium transition-colors",s==="pulls"?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-2"),children:[c.jsx(ol,{className:"h-3.5 w-3.5"}),"PRs",c.jsx("span",{className:re("rounded-full px-1.5 py-0.5 font-mono text-[10px]",s==="pulls"?"bg-blue-500/10 text-blue-500":"text-fg-5"),children:u})]})]})}),c.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 overflow-hidden",children:s==="issues"?c.jsx(Bte,{}):c.jsx(Yte,{})})]})}const qte=["Sisyphus - ultraworker","Prometheus - Plan Builder","Atlas - Plan Executor"],Gte="pinned_models",Uo="__system_prompt__",aC=[{bg:"bg-blue-500/15",text:"text-blue-500"},{bg:"bg-purple-500/15",text:"text-purple-500"},{bg:"bg-emerald-500/15",text:"text-emerald-500"},{bg:"bg-amber-500/15",text:"text-amber-500"},{bg:"bg-rose-500/15",text:"text-rose-500"},{bg:"bg-cyan-500/15",text:"text-cyan-500"},{bg:"bg-indigo-500/15",text:"text-indigo-500"},{bg:"bg-orange-500/15",text:"text-orange-500"}];function Kte(e){const t=e.trim(),n=t.charCodeAt(0)||0;return{...aC[n%aC.length],initial:(t.charAt(0)||"?").toUpperCase()}}function Vte({agent:e,memoryCount:t,sessionCount:n,onClick:r,onDelete:a}){const[s,o]=v.useState(!1),u=e.isSystem===1,d=Kte(e.name);return c.jsxs("div",{className:"flex cursor-pointer flex-col rounded-xl border border-line bg-surface transition-colors hover:border-fg-6/60",onClick:r,children:[c.jsxs("div",{className:"flex items-start gap-3 p-4 pb-3",children:[c.jsx("div",{className:re("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-sm font-semibold",d.bg,d.text),children:d.initial}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"truncate text-sm font-semibold text-fg",children:e.name}),u&&c.jsx("span",{className:"shrink-0 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-medium text-amber-400",children:"系统"}),e.repoId&&c.jsx("span",{className:"shrink-0 rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] font-medium text-blue-400",children:"repo"})]}),c.jsxs("p",{className:"mt-0.5 text-[11px] text-fg-4",children:[c.jsx("span",{className:"font-mono",children:e.baseAgent}),e.model&&c.jsxs("span",{className:"ml-1.5 text-fg-5",children:["· ",e.model]})]}),e.description&&c.jsx("p",{className:"mt-1 text-xs text-fg-5 line-clamp-2",children:e.description})]})]}),c.jsxs("div",{className:"flex items-center gap-4 border-t border-line/60 px-4 py-2.5",children:[c.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] text-fg-5",children:[c.jsx(ju,{className:"h-3 w-3"}),c.jsxs("span",{children:["记忆 ",t]})]}),c.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] text-fg-5",children:[c.jsx(p0,{className:"h-3 w-3"}),c.jsxs("span",{children:["会话 ",n]})]}),c.jsx("div",{className:"flex-1"}),!u&&!s&&c.jsx("button",{type:"button",onClick:f=>{f.stopPropagation(),o(!0)},title:"删除",className:"rounded p-1 text-fg-5 opacity-0 transition-opacity hover:text-red-400 group-hover:opacity-100 [.group:hover_&]:opacity-100",children:c.jsx(is,{className:"h-3.5 w-3.5"})}),s&&c.jsxs("div",{className:"flex items-center gap-0.5",onClick:f=>f.stopPropagation(),children:[c.jsx("button",{type:"button",onClick:a,className:"rounded p-1 text-red-400 hover:bg-red-500/10",children:c.jsx(yr,{className:"h-3.5 w-3.5"})}),c.jsx("button",{type:"button",onClick:()=>o(!1),className:"rounded p-1 text-fg-4 hover:bg-elevated",children:c.jsx(yt,{className:"h-3.5 w-3.5"})})]})]})]})}function Wte({initial:e,availableFragments:t,onSave:n,onCancel:r}){const a=Fe(W=>W.activeRepoId),[s,o]=v.useState((e==null?void 0:e.name)??""),[u,d]=v.useState((e==null?void 0:e.description)??""),[f,m]=v.useState((e==null?void 0:e.baseAgent)??"Sisyphus - ultraworker"),[p,b]=v.useState((e==null?void 0:e.model)??""),[x,E]=v.useState((e==null?void 0:e.variant)??""),[_,S]=v.useState((e==null?void 0:e.systemPrompt)??""),[T,C]=v.useState(!1),[A,k]=v.useState(!1),[I,O]=v.useState([]);v.useEffect(()=>{if(!a){O([]);return}let W=!1;return(async()=>{try{const[G,F]=await Promise.all([wf(),Sf(a)]);if(W)return;const $=G[Gte],K=$?JSON.parse($):[];O(K.length>0?F.filter(L=>K.includes(L.id)):[])}catch{W||O([])}})(),()=>{W=!0}},[a]);const[j,H]=v.useState(()=>{const W=(e==null?void 0:e.fragments.map(K=>K.id))??[],G=(e==null?void 0:e.systemPromptPosition)??-1,F=G>=0&&G<=W.length?G:W.length,$=[...W];return $.splice(F,0,Uo),$}),z=W=>{H(G=>{if(G.includes(W))return G.filter(K=>K!==W);const F=G.indexOf(Uo),$=[...G];return $.splice(F>=0?F:$.length,0,W),$})},D=(W,G)=>{const F=W+G;F<0||F>=j.length||H($=>{const K=[...$];return[K[W],K[F]]=[K[F],K[W]],K})},V=j.filter(W=>W!==Uo),q=(()=>{const W=j.indexOf(Uo);return W<0?-1:j.slice(0,W).filter(G=>G!==Uo).length})(),ae=j.map(W=>{var G;return W===Uo?_:(G=t.find(F=>F.id===W))==null?void 0:G.content}).filter(Boolean).join(`
|
|
536
|
+
|
|
537
|
+
---
|
|
538
|
+
|
|
539
|
+
`),Q=async()=>{if(!(!s.trim()||!f)){k(!0);try{await n({name:s.trim(),description:u.trim()||void 0,baseAgent:f,model:p.trim()||void 0,variant:x.trim()||void 0,systemPrompt:_,systemPromptPosition:q,fragmentIds:V})}finally{k(!1)}}};return c.jsxs("div",{className:"space-y-3 rounded-xl border border-line bg-surface p-5",children:[c.jsxs("div",{className:"flex gap-3",children:[c.jsxs("label",{className:"flex-1",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"名称"}),c.jsx("input",{type:"text",value:s,onChange:W=>o(W.target.value),placeholder:"代码审查员",className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),c.jsxs("label",{className:"w-36",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Base Agent"}),c.jsx("select",{value:f,onChange:W=>m(W.target.value),className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 text-sm text-fg focus:border-blue-500 focus:outline-none",children:qte.map(W=>c.jsx("option",{value:W,children:W},W))})]})]}),c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"描述(可选)"}),c.jsx("input",{type:"text",value:u,onChange:W=>d(W.target.value),placeholder:"一句话描述这个 Agent 的用途",className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),c.jsxs("div",{className:"flex gap-3",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"模型(可选)"}),c.jsxs("select",{value:p,onChange:W=>b(W.target.value),className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 font-mono text-sm text-fg focus:border-blue-500 focus:outline-none",children:[c.jsx("option",{value:"",children:"默认模型"}),I.map(W=>c.jsx("option",{value:W.id,children:W.name||W.id},W.id))]}),I.length===0&&c.jsx("p",{className:"mt-1 text-[11px] text-fg-5",children:"在设置的「模型」中勾选常用模型后可选择。"})]}),c.jsxs("div",{className:"w-28",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Variant"}),c.jsxs("select",{value:x,onChange:W=>E(W.target.value),className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 font-mono text-sm text-fg focus:border-blue-500 focus:outline-none",children:[c.jsx("option",{value:"",children:"默认"}),c.jsx("option",{value:"max",children:"max"}),c.jsx("option",{value:"high",children:"high"})]})]})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"提示词组合"}),c.jsx("p",{className:"mt-0.5 text-[11px] text-fg-5",children:"排序片段与补充指令的拼接顺序。"}),c.jsxs("div",{className:"mt-1.5 space-y-1",children:[j.map((W,G)=>{if(W===Uo)return c.jsxs("div",{className:"flex items-center gap-2 rounded border border-amber-500/30 bg-amber-500/5 px-2 py-1",children:[c.jsxs("div",{className:"flex flex-col",children:[c.jsx("button",{type:"button",onClick:()=>D(G,-1),disabled:G===0,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▲"}),c.jsx("button",{type:"button",onClick:()=>D(G,1),disabled:G===j.length-1,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▼"})]}),c.jsx("span",{className:"flex-1 truncate text-xs font-medium text-amber-400",children:"✎ 补充指令"})]},W);const F=t.find($=>$.id===W);return F?c.jsxs("div",{className:"flex items-center gap-2 rounded border border-blue-500/30 bg-blue-500/5 px-2 py-1",children:[c.jsxs("div",{className:"flex flex-col",children:[c.jsx("button",{type:"button",onClick:()=>D(G,-1),disabled:G===0,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▲"}),c.jsx("button",{type:"button",onClick:()=>D(G,1),disabled:G===j.length-1,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▼"})]}),c.jsx("span",{className:"flex-1 truncate text-xs text-fg",children:F.name}),c.jsx("button",{type:"button",onClick:()=>z(W),className:"text-fg-5 hover:text-red-400",children:c.jsx(yt,{className:"h-3 w-3"})})]},W):null}),t.filter(W=>!V.includes(W.id)).length>0&&c.jsxs("select",{value:"",onChange:W=>{W.target.value&&z(W.target.value)},className:"w-full rounded border border-dashed border-line bg-base px-2 py-1 text-xs text-fg-4 focus:border-blue-500 focus:outline-none",children:[c.jsx("option",{value:"",children:"+ 添加片段…"}),t.filter(W=>!V.includes(W.id)).map(W=>c.jsx("option",{value:W.id,children:W.name},W.id))]})]})]}),c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"补充指令内容"}),c.jsx("textarea",{value:_,onChange:W=>S(W.target.value),rows:3,placeholder:"agent 级别的补充指令…",className:"mt-1 w-full resize-y rounded-md border border-line bg-base px-3 py-2 font-mono text-sm leading-relaxed text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),(V.length>0||_)&&c.jsxs("div",{children:[c.jsxs("button",{type:"button",onClick:()=>C(!T),className:"flex items-center gap-1 text-xs font-medium text-fg-4 hover:text-fg-3",children:[c.jsx("span",{children:T?"▾":"▸"})," 预览最终提示词"]}),T&&c.jsx("pre",{className:"mt-1 max-h-48 overflow-auto rounded border border-line bg-elevated px-3 py-2 font-mono text-xs leading-relaxed text-fg-4",children:ae||"(空)"})]}),c.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[c.jsx("button",{type:"button",onClick:r,className:"rounded-md px-3 py-1.5 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),c.jsx("button",{type:"button",onClick:()=>void Q(),disabled:A||!s.trim(),className:"rounded-md bg-blue-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:A?"保存中…":e?"更新":"创建"})]})]})}function Xte({fragment:e,onEdit:t,onDelete:n}){const[r,a]=v.useState(!1);return c.jsxs("div",{className:"group flex items-center gap-3 rounded-lg border border-line bg-base px-3 py-2",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("span",{className:"text-xs font-medium text-fg",children:e.name}),e.content&&c.jsx("p",{className:"mt-0.5 truncate font-mono text-[11px] text-fg-5",children:e.content})]}),c.jsx("div",{className:"flex items-center gap-1",children:r?c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",onClick:n,className:"rounded p-1 text-red-400 hover:bg-red-500/10",children:c.jsx(yr,{className:"h-3.5 w-3.5"})}),c.jsx("button",{type:"button",onClick:()=>a(!1),className:"rounded p-1 text-fg-4 hover:bg-elevated",children:c.jsx(yt,{className:"h-3.5 w-3.5"})})]}):c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",onClick:t,className:"rounded p-1 text-fg-5 opacity-0 transition-opacity hover:text-fg-3 group-hover:opacity-100",children:c.jsx(S1,{className:"h-3.5 w-3.5"})}),c.jsx("button",{type:"button",onClick:()=>a(!0),className:"rounded p-1 text-fg-5 opacity-0 transition-opacity hover:text-red-400 group-hover:opacity-100",children:c.jsx(is,{className:"h-3.5 w-3.5"})})]})})]})}function iC({initial:e,onSave:t,onCancel:n}){const[r,a]=v.useState((e==null?void 0:e.name)??""),[s,o]=v.useState((e==null?void 0:e.content)??""),[u,d]=v.useState(!1),f=async()=>{if(r.trim()){d(!0);try{await t({name:r.trim(),content:s})}finally{d(!1)}}};return c.jsxs("div",{className:"space-y-2 rounded-lg border border-line bg-base p-3",children:[c.jsx("input",{type:"text",value:r,onChange:m=>a(m.target.value),placeholder:"片段名称",className:"w-full rounded-md border border-line bg-surface px-3 py-1.5 text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"}),c.jsx("textarea",{value:s,onChange:m=>o(m.target.value),rows:3,placeholder:"提示词内容…",className:"w-full resize-y rounded-md border border-line bg-surface px-3 py-2 font-mono text-sm leading-relaxed text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:n,className:"rounded-md px-3 py-1 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),c.jsx("button",{type:"button",onClick:()=>void f(),disabled:u||!r.trim(),className:"rounded-md bg-blue-600 px-3 py-1 text-xs font-medium text-white hover:bg-blue-500 disabled:opacity-40",children:u?"保存中…":e?"更新":"创建"})]})]})}function Qte({onImported:e,onCancel:t}){const[n,r]=v.useState(""),[a,s]=v.useState(!1),[o,u]=v.useState(null),d=v.useRef(null),f=async p=>{u(null);let b;try{b=JSON.parse(p)}catch{u("JSON 格式无效");return}if(b.type!=="fourth-spark-custom-agent"||!b.agent){u("不是有效的 Custom Agent 导出文件");return}s(!0);try{await eF(b),e()}catch(x){u(x instanceof Error?x.message:String(x))}finally{s(!1)}},m=p=>{var E;const b=(E=p.target.files)==null?void 0:E[0];if(!b)return;const x=new FileReader;x.onload=()=>{const _=x.result;r(_),f(_)},x.readAsText(b)};return c.jsxs("div",{className:"space-y-3 rounded-xl border border-line bg-surface p-5",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"导入 Custom Agent"}),c.jsx("button",{type:"button",onClick:t,className:"rounded p-1 text-fg-5 hover:text-fg-3",children:c.jsx(yt,{className:"h-3.5 w-3.5"})})]}),c.jsx("input",{ref:d,type:"file",accept:".json",onChange:m,className:"hidden"}),c.jsxs("button",{type:"button",onClick:()=>{var p;return(p=d.current)==null?void 0:p.click()},className:"flex w-full items-center justify-center gap-1.5 rounded-md border border-dashed border-line py-2.5 text-xs text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-3",children:[c.jsx(X5,{className:"h-3.5 w-3.5"})," 上传 JSON 文件"]}),c.jsx("textarea",{value:n,onChange:p=>r(p.target.value),rows:4,placeholder:"或粘贴 JSON 内容…",className:"w-full resize-y rounded-md border border-line bg-base px-3 py-2 font-mono text-xs leading-relaxed text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"}),o&&c.jsxs("div",{className:"flex items-start gap-2 rounded-lg bg-red-500/10 px-3 py-2 text-xs text-red-400",children:[c.jsx(or,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),c.jsx("span",{children:o})]}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx("button",{type:"button",onClick:t,className:"rounded-md px-3 py-1.5 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),c.jsx("button",{type:"button",onClick:()=>void f(n),disabled:a||!n.trim(),className:"rounded-md bg-blue-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:a?"导入中…":"导入"})]})]})}function Zte(){const e=ur(),t=Fe(Dr),n=Fe(Q=>Q.activeRepoId),[r,a]=v.useState([]),[s,o]=v.useState([]),[u,d]=v.useState(!0),[f,m]=v.useState(!1),[p,b]=v.useState(!1),[x,E]=v.useState(null),[_,S]=v.useState(!1),[T,C]=v.useState(!1),[A,k]=v.useState({}),[I,O]=v.useState({}),j=v.useCallback(()=>{const Q=n?oI(n):aI();Promise.all([Q,lI()]).then(([W,G])=>{a(W),o(G),d(!1)}).catch(()=>d(!1))},[n]);v.useEffect(()=>{d(!0),j()},[j]),v.useEffect(()=>{if(r.length===0)return;const Q=r.filter(W=>W.isSystem<2);for(const W of Q)sI(W.id).then(G=>{k(F=>({...F,[W.id]:G.filter($=>!$.supersededBy).length}))}).catch(()=>{}),C1(W.id).then(G=>{O(F=>({...F,[W.id]:G.length}))}).catch(()=>{})},[r]);const H=r.filter(Q=>Q.isSystem<2),z=async Q=>{n?await iF(n,Q):await Zz(Q),m(!1),j(),io.getState().loadAgents()},D=async Q=>{await iI(Q),a(W=>W.filter(G=>G.id!==Q)),io.getState().loadAgents()},V=async Q=>{await sF(Q),b(!1),j()},q=async Q=>{x&&(await oF(x.id,Q),E(null),j())},ae=async Q=>{await lF(Q),o(W=>W.filter(G=>G.id!==Q))};return n?c.jsx("div",{className:"flex-1 overflow-y-auto",children:c.jsxs("div",{className:"mx-auto max-w-4xl space-y-6 p-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-lg font-bold text-fg",children:"Agents"}),c.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"组合 base agent + 模型 + 提示词片段,创建 Session 时选择。"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("button",{type:"button",onClick:()=>{S(!0),m(!1)},className:"flex items-center gap-1.5 rounded-md border border-line px-3 py-1.5 text-xs font-medium text-fg-3 transition-colors hover:bg-elevated",children:[c.jsx(X5,{className:"h-3.5 w-3.5"})," 导入"]}),c.jsxs("button",{type:"button",onClick:()=>{m(!0),S(!1)},className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500",children:[c.jsx(Da,{className:"h-3.5 w-3.5"})," 创建"]})]})]}),f&&c.jsx(Wte,{availableFragments:s,onSave:z,onCancel:()=>m(!1)}),_&&c.jsx(Qte,{onImported:()=>{S(!1),j(),io.getState().loadAgents()},onCancel:()=>S(!1)}),u?c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-16 text-fg-5",children:[c.jsx(Nn,{className:"h-5 w-5 fs-spin"}),c.jsx("p",{className:"text-xs",children:"加载中…"})]}):H.length===0&&!f?c.jsxs("div",{className:"flex flex-col items-center gap-3 py-16 text-fg-5",children:[c.jsx(ju,{className:"h-8 w-8 text-fg-6"}),c.jsx("p",{className:"text-sm",children:"还没有 Agent"}),c.jsx("p",{className:"text-xs text-fg-5",children:"点击上方「创建」开始。"})]}):c.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:H.map(Q=>c.jsx("div",{className:"group",children:c.jsx(Vte,{agent:Q,memoryCount:A[Q.id]??0,sessionCount:I[Q.id]??0,onClick:()=>e(`/${encodeURIComponent(t??"")}/agents/${Q.id}`),onDelete:()=>void D(Q.id)})},Q.id))}),c.jsxs("section",{className:"rounded-xl border border-line bg-surface",children:[c.jsxs("button",{type:"button",onClick:()=>C(!T),className:"flex w-full items-center justify-between px-5 py-4 text-left",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"提示词片段"}),c.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"可复用的提示词模块,可在多个 Agent 间共享。"})]}),c.jsx(Vr,{className:re("h-4 w-4 shrink-0 text-fg-4 transition-transform",T&&"rotate-180")})]}),T&&c.jsx("div",{className:"border-t border-line px-5 pb-5 pt-3",children:c.jsxs("div",{className:"space-y-1.5",children:[s.map(Q=>(x==null?void 0:x.id)===Q.id?c.jsx(iC,{initial:Q,onSave:q,onCancel:()=>E(null)},Q.id):c.jsx(Xte,{fragment:Q,onEdit:()=>E(Q),onDelete:()=>void ae(Q.id)},Q.id)),p?c.jsx(iC,{onSave:V,onCancel:()=>b(!1)}):c.jsxs("button",{type:"button",onClick:()=>b(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-line py-2 text-xs text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-3",children:[c.jsx(Da,{className:"h-3.5 w-3.5"})," 添加片段"]})]})})]})]})}):c.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:c.jsx("p",{className:"text-sm text-fg-4",children:"请先在顶部选择一个仓库。"})})}const Jte=["Sisyphus - ultraworker","Prometheus - Plan Builder","Atlas - Plan Executor"],ene="pinned_models",zo="__system_prompt__",sC=[{bg:"bg-blue-500/15",text:"text-blue-500"},{bg:"bg-purple-500/15",text:"text-purple-500"},{bg:"bg-emerald-500/15",text:"text-emerald-500"},{bg:"bg-amber-500/15",text:"text-amber-500"},{bg:"bg-rose-500/15",text:"text-rose-500"},{bg:"bg-cyan-500/15",text:"text-cyan-500"},{bg:"bg-indigo-500/15",text:"text-indigo-500"},{bg:"bg-orange-500/15",text:"text-orange-500"}];function tne(e){const t=e.trim(),n=t.charCodeAt(0)||0;return{...sC[n%sC.length],initial:(t.charAt(0)||"?").toUpperCase()}}const oC=[{bg:"bg-blue-500/10",text:"text-blue-400"},{bg:"bg-amber-500/10",text:"text-amber-400"},{bg:"bg-green-500/10",text:"text-green-400"},{bg:"bg-purple-500/10",text:"text-purple-400"},{bg:"bg-cyan-500/10",text:"text-cyan-400"},{bg:"bg-rose-500/10",text:"text-rose-400"},{bg:"bg-indigo-500/10",text:"text-indigo-400"},{bg:"bg-orange-500/10",text:"text-orange-400"}],nne={bg:"bg-elevated",text:"text-fg-4"};function VM(e){if(e==="general")return nne;let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return oC[Math.abs(t)%oC.length]}function zu(e){const t=Date.now()-e,n=Math.floor(t/6e4);if(n<1)return"刚刚";if(n<60)return`${n} 分钟前`;const r=Math.floor(n/60);if(r<24)return`${r} 小时前`;const a=Math.floor(r/24);return a<30?`${a} 天前`:`${Math.floor(a/30)} 个月前`}const WM={create:{label:"首次提取",color:"text-green-400"},update:{label:"重写",color:"text-blue-400"},merge:{label:"合并",color:"text-purple-400"},decay:{label:"衰减",color:"text-amber-400"},reinforce:{label:"强化",color:"text-emerald-400"},manual:{label:"手动编辑",color:"text-fg-3"}};function rne({memory:e,onClose:t}){const n=[...e.history??[]].reverse();return c.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:t,children:c.jsxs("div",{className:"mx-4 max-h-[80vh] w-full max-w-lg overflow-y-auto rounded-xl border border-line bg-surface p-5 shadow-xl",onClick:r=>r.stopPropagation(),children:[c.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[c.jsxs("h3",{className:"text-sm font-semibold text-fg",children:["版本历史 (",n.length+1," 个版本)"]}),c.jsx("button",{type:"button",onClick:t,className:"rounded p-1 text-fg-4 hover:text-fg-3",children:c.jsx(yt,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"rounded-lg border border-blue-500/20 bg-blue-500/5 p-3",children:[c.jsxs("div",{className:"mb-1 flex items-center gap-2 text-[10px]",children:[c.jsx("span",{className:"font-medium text-blue-400",children:"当前版本"}),c.jsx("span",{className:"text-fg-5",children:zu(e.updatedAt)}),c.jsxs("span",{className:"text-fg-6",children:["⚡ ",e.importance.toFixed(2)]})]}),c.jsx("p",{className:"text-xs leading-relaxed text-fg",children:e.content})]}),n.map((r,a)=>{const s=WM[r.action]??{label:r.action,color:"text-fg-4"};return c.jsxs("div",{className:"rounded-lg border border-line bg-base p-3",children:[c.jsxs("div",{className:"mb-1 flex items-center gap-2 text-[10px]",children:[c.jsx("span",{className:re("font-medium",s.color),children:s.label}),c.jsx("span",{className:"text-fg-5",children:zu(r.ts)}),c.jsxs("span",{className:"text-fg-6",children:["⚡ ",r.importance.toFixed(2)]}),r.source&&c.jsxs("span",{className:"text-fg-6",children:["· ",r.source]})]}),c.jsx("p",{className:"text-xs leading-relaxed text-fg-4",children:r.content})]},a)}),n.length===0&&c.jsx("div",{className:"py-4 text-center text-xs text-fg-5",children:"暂无历史版本"})]})]})})}function lC({memory:e,categories:t,onUpdate:n,onDelete:r}){var I;const[a,s]=v.useState(!1),[o,u]=v.useState(e.content),[d,f]=v.useState(e.category),[m,p]=v.useState(!1),[b,x]=v.useState(!1),[E,_]=v.useState(!1),S=VM(e.category),T=(I=e.history)==null?void 0:I[e.history.length-1],C=T&&Math.abs(T.importance-e.importance)>.001,A=async()=>{p(!0);try{await n(e.id,{content:o,category:d}),s(!1)}finally{p(!1)}},k=async()=>{x(!1),await r(e.id)};return a?c.jsxs("div",{className:"rounded-lg border border-blue-500/30 bg-blue-500/5 p-3 space-y-2",children:[c.jsx("textarea",{value:o,onChange:O=>u(O.target.value),rows:3,className:"w-full resize-y rounded-md border border-line bg-surface px-3 py-2 font-mono text-xs leading-relaxed text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("select",{value:d,onChange:O=>f(O.target.value),className:"rounded-md border border-line bg-surface px-2 py-1 text-xs text-fg focus:border-blue-500 focus:outline-none",children:t.map(O=>c.jsx("option",{value:O,children:O},O))}),c.jsx("div",{className:"flex-1"}),c.jsx("button",{type:"button",onClick:()=>{s(!1),u(e.content),f(e.category)},className:"rounded-md px-3 py-1 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),c.jsx("button",{type:"button",onClick:()=>void A(),disabled:m||!o.trim(),className:"rounded-md bg-blue-600 px-3 py-1 text-xs font-medium text-white hover:bg-blue-500 disabled:opacity-40",children:m?"保存中…":"保存"})]})]}):c.jsxs("div",{className:"group/mem rounded-lg border border-line bg-base px-3 py-2.5",children:[c.jsxs("div",{className:"flex items-start gap-2",children:[c.jsx("span",{className:re("mt-0.5 shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium",S.bg,S.text),children:e.category}),c.jsx("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-fg",children:e.content})]}),c.jsxs("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-fg-5",children:[c.jsxs("span",{className:"flex items-center gap-0.5",children:[c.jsx(Tf,{className:"h-3 w-3"}),C&&T?`${T.importance.toFixed(2)}→${e.importance.toFixed(2)}`:e.importance.toFixed(2)]}),c.jsx("span",{children:"·"}),c.jsx("span",{children:zu(e.updatedAt)}),e.supersededBy&&c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"·"}),c.jsx("span",{className:"text-amber-400",children:e.supersededBy==="user-deleted"?"已删除":e.supersededBy==="consolidated-out"?"已整理":"已合并"})]}),e.history&&e.history.length>0&&(()=>{const O=e.history[e.history.length-1],j=WM[O.action];return c.jsxs("button",{type:"button",onClick:()=>_(!0),className:re("rounded px-1.5 py-0.5 text-[10px] font-medium transition-opacity hover:opacity-80",O.action==="update"?"bg-blue-500/10 text-blue-400":O.action==="merge"?"bg-purple-500/10 text-purple-400":O.action==="decay"?"bg-amber-500/10 text-amber-400":O.action==="reinforce"?"bg-emerald-500/10 text-emerald-400":O.action==="manual"?"bg-fg/10 text-fg-3":"bg-green-500/10 text-green-400"),children:[(j==null?void 0:j.label)??O.action," · ",e.history.length,"版"]})})(),c.jsx("div",{className:"flex-1"}),!e.supersededBy&&c.jsx("div",{className:"flex items-center gap-0.5 opacity-0 transition-opacity group-hover/mem:opacity-100",children:b?c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",onClick:()=>void k(),className:"rounded p-1 text-red-400 hover:bg-red-500/10",children:c.jsx(yr,{className:"h-3.5 w-3.5"})}),c.jsx("button",{type:"button",onClick:()=>x(!1),className:"rounded p-1 text-fg-4 hover:bg-elevated",children:c.jsx(yt,{className:"h-3.5 w-3.5"})})]}):c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",onClick:()=>s(!0),className:"rounded p-1 text-fg-5 hover:text-fg-3",children:c.jsx(S1,{className:"h-3.5 w-3.5"})}),c.jsx("button",{type:"button",onClick:()=>x(!0),className:"rounded p-1 text-fg-5 hover:text-red-400",children:c.jsx(is,{className:"h-3.5 w-3.5"})})]})})]}),E&&c.jsx(rne,{memory:e,onClose:()=>_(!1)})]})}const ane=14400*1e3;function ine(e){if(!e)return"下次:待定";const t=e+ane,n=Date.now();if(t<=n)return"下次:即将运行";const r=t-n,a=Math.floor(r/6e4);if(a<60)return`下次:约 ${a} 分钟后`;const s=Math.floor(a/60);return s<24?`下次:约 ${s} 小时后`:`下次:约 ${Math.floor(s/24)} 天后`}function sne({stats:e,running:t,onTrigger:n}){if(!e)return null;const r=e.lastActions;return c.jsxs("div",{className:"rounded-lg bg-elevated px-3 py-2 text-[11px] tabular-nums text-fg-5",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[c.jsx("span",{children:e.lastConsolidatedAt?`上次整理:${zu(e.lastConsolidatedAt)}`:"尚未整理"}),c.jsx("span",{className:"text-fg-6",children:"·"}),c.jsx("span",{children:ine(e.lastConsolidatedAt)}),c.jsx("div",{className:"flex-1"}),c.jsx("button",{type:"button",onClick:n,disabled:t,className:"rounded px-2 py-0.5 text-[10px] font-medium text-fg-4 transition-colors hover:bg-surface hover:text-fg-3 disabled:opacity-40",children:t?"整理中…":"立即整理"})]}),c.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1",children:[r&&c.jsxs(c.Fragment,{children:[c.jsxs("span",{children:[r.update," 更新 ",r.merge," 合并 ",r.delete," 清理 ",r.decayed," 降权"]}),c.jsx("span",{className:"text-fg-6",children:"·"})]}),c.jsxs("span",{children:["活跃 ",e.totalActive," 条"]}),c.jsx("span",{className:"text-fg-6",children:"·"}),c.jsxs("span",{children:["衰减中 ",e.stale]})]})]})}function one({agentId:e}){const[t,n]=v.useState([]),[r,a]=v.useState(!0),[s,o]=v.useState(null),[u,d]=v.useState(!1),[f,m]=v.useState([]),[p,b]=v.useState(!0),[x,E]=v.useState(!1),[_,S]=v.useState(new Set),[T,C]=v.useState(!1),[A,k]=v.useState(null),[I,O]=v.useState(null),[j,H]=v.useState(!1),z=v.useCallback(async()=>{a(!0);try{const P=await sI(e,{includeSuperseded:u});n(P)}catch{n([])}a(!1)},[e,u]),D=v.useCallback(()=>{$w(e).then(O).catch(()=>O(null))},[e]);v.useEffect(()=>{z()},[z]),v.useEffect(()=>{D()},[D]);const V=async()=>{H(!0);try{await aF(e)}catch{H(!1);return}const P=setInterval(()=>{$w(e).then(ee=>{O(ee),ee.lastConsolidatedAt&&(!(I!=null&&I.lastConsolidatedAt)||ee.lastConsolidatedAt>I.lastConsolidatedAt)&&(clearInterval(P),H(!1),z())}).catch(()=>{})},5e3);setTimeout(()=>{clearInterval(P),H(!1)},3e5)};v.useEffect(()=>{if(!x)return;let P=!1;return b(!0),C1(e).then(ee=>{P||m(ee)}).catch(()=>{P||m([])}).finally(()=>{P||b(!1)}),()=>{P=!0}},[e,x]);const q=t.filter(P=>!P.supersededBy),ae=s?q.filter(P=>P.category===s):q,Q=t.filter(P=>P.supersededBy),W=v.useMemo(()=>new Set(t.map(P=>P.sessionId).filter(Boolean)),[t]),G=async(P,ee)=>{await tF(e,P,ee),await z()},F=async P=>{await nF(e,P),await z()},$=P=>{S(ee=>{const M=new Set(ee);return M.has(P)?M.delete(P):M.add(P),M})},K=async()=>{if(_.size!==0){C(!0),k(null);try{const M=(await rF(e,[..._])).results;if(M){const de=M.filter(U=>U.status==="ok"),_e=M.filter(U=>U.status!=="ok");de.length>0&&k(`提取成功 ${de.reduce((U,he)=>U+(he.actions??0),0)} 条记忆`),_e.length>0&&k(U=>(U?U+";":"")+_e.map(he=>he.error??he.status).join(";")),de.length>0&&await z()}S(new Set)}catch(P){k(`请求失败: ${P instanceof Error?P.message:String(P)}`)}C(!1)}},L=v.useMemo(()=>[...new Set(q.map(ee=>ee.category))].sort(),[q]);return c.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5 space-y-4",children:[c.jsx("div",{className:"flex items-center justify-between",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(ju,{className:"h-4 w-4 text-purple-400"}),c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"记忆"}),!r&&c.jsx("span",{className:"rounded-full bg-elevated px-1.5 py-0.5 text-[10px] tabular-nums text-fg-4",children:ae.length})]})}),c.jsx(sne,{stats:I,running:j,onTrigger:()=>void V()}),c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[c.jsx("button",{type:"button",onClick:()=>o(null),className:re("rounded-full px-2.5 py-0.5 text-[11px] font-medium transition-colors",s===null?"bg-fg/10 text-fg":"text-fg-4 hover:text-fg-3"),children:"全部"}),L.map(P=>{const ee=VM(P);return c.jsx("button",{type:"button",onClick:()=>o(s===P?null:P),className:re("rounded-full px-2.5 py-0.5 text-[11px] font-medium transition-colors",s===P?re(ee.bg,ee.text):"text-fg-4 hover:text-fg-3"),children:P},P)})]}),r?c.jsx("div",{className:"flex items-center justify-center py-8",children:c.jsx(Nn,{className:"h-4 w-4 fs-spin text-fg-5"})}):ae.length===0&&Q.length===0?c.jsx("div",{className:"py-8 text-center text-xs text-fg-5",children:"暂无记忆。使用此 Agent 完成 Session 后将自动提取。"}):c.jsxs("div",{className:"space-y-1.5",children:[ae.map(P=>c.jsx(lC,{memory:P,categories:L,onUpdate:G,onDelete:F},P.id)),Q.length>0&&c.jsxs("div",{className:"pt-1",children:[c.jsxs("button",{type:"button",onClick:()=>d(!u),className:"flex items-center gap-1 text-[11px] text-fg-5 hover:text-fg-3",children:[c.jsx("span",{children:u?"▾":"▸"}),"已合并/已删除 (",Q.length,")"]}),u&&c.jsx("div",{className:"mt-1.5 space-y-1.5 opacity-60",children:Q.map(P=>c.jsx(lC,{memory:P,categories:L,onUpdate:G,onDelete:F},P.id))})]})]}),c.jsxs("div",{className:"border-t border-line pt-3",children:[c.jsxs("button",{type:"button",onClick:()=>E(!x),className:"flex items-center gap-1.5 text-xs font-medium text-fg-4 hover:text-fg-3",children:[c.jsx(p0,{className:"h-3.5 w-3.5"}),c.jsxs("span",{children:[x?"▾":"▸"," 从 Session 提取记忆"]})]}),x&&c.jsx("div",{className:"mt-2 space-y-1.5",children:p?c.jsx("div",{className:"flex items-center justify-center py-4",children:c.jsx(Nn,{className:"h-4 w-4 fs-spin text-fg-5"})}):f.length===0?c.jsx("p",{className:"py-4 text-center text-xs text-fg-5",children:"暂无 Session 记录。"}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"max-h-64 space-y-1 overflow-y-auto",children:f.map(P=>{const ee=W.has(P.id);return c.jsxs("label",{className:re("flex cursor-pointer items-center gap-2.5 rounded-md border px-3 py-2 transition-colors",_.has(P.id)?"border-purple-500/30 bg-purple-500/5":"border-line bg-base hover:bg-elevated/60"),children:[c.jsx("input",{type:"checkbox",checked:_.has(P.id),onChange:()=>$(P.id),className:"h-3.5 w-3.5 shrink-0 cursor-pointer rounded border-line accent-purple-500"}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("span",{className:"block truncate text-xs text-fg",children:P.title||P.id.slice(-8)}),c.jsx("span",{className:"text-[11px] text-fg-5",children:zu(P.timeCreated)})]}),c.jsx("span",{className:re("shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium",ee?"bg-green-500/10 text-green-400":"bg-elevated text-fg-5"),children:ee?"已提取":"未提取"})]},P.id)})}),_.size>0&&c.jsxs("button",{type:"button",onClick:()=>void K(),disabled:T,className:"flex w-full items-center justify-center gap-1.5 rounded-lg bg-purple-600 py-2 text-xs font-medium text-white transition-colors hover:bg-purple-500 disabled:opacity-40",children:[T?c.jsx(Nn,{className:"h-3.5 w-3.5 fs-spin"}):c.jsx(ju,{className:"h-3.5 w-3.5"}),T?"提取中…":`提取选中 Session 的记忆 (${_.size})`]}),A&&c.jsx("p",{className:re("mt-1.5 rounded-md px-3 py-1.5 text-xs",A.includes("成功")?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"),children:A})]})})]})]})}function lne({agentId:e}){const[t,n]=v.useState([]),[r,a]=v.useState(!0);return v.useEffect(()=>{let s=!1;return C1(e).then(o=>{s||n(o)}).catch(()=>{s||n([])}).finally(()=>{s||a(!1)}),()=>{s=!0}},[e]),c.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(p0,{className:"h-4 w-4 text-fg-4"}),c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Session 历史"}),!r&&c.jsx("span",{className:"rounded-full bg-elevated px-1.5 py-0.5 text-[10px] tabular-nums text-fg-4",children:t.length})]}),c.jsx("div",{className:"mt-3",children:r?c.jsx("div",{className:"flex items-center justify-center py-8",children:c.jsx(Nn,{className:"h-4 w-4 fs-spin text-fg-5"})}):t.length===0?c.jsx("p",{className:"py-8 text-center text-xs text-fg-5",children:"暂无 Session 记录。"}):c.jsx("div",{className:"space-y-1",children:t.map(s=>c.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-line bg-base px-4 py-2.5",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("span",{className:"block truncate text-xs font-medium text-fg",children:s.title||s.id.slice(-8)}),c.jsxs("div",{className:"mt-0.5 flex items-center gap-2 text-[11px] text-fg-5",children:[c.jsx("span",{children:zu(s.timeCreated)}),s.cost>0&&c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"·"}),c.jsxs("span",{children:["$",s.cost.toFixed(4)]})]}),(s.tokensInput>0||s.tokensOutput>0)&&c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"·"}),c.jsxs("span",{children:[Math.round((s.tokensInput+s.tokensOutput)/1e3),"K tokens"]})]})]})]}),s.completedAt?c.jsx("span",{className:"shrink-0 rounded-full bg-green-500/10 px-2 py-0.5 text-[10px] font-medium text-green-400",children:"完成"}):c.jsx("span",{className:"shrink-0 rounded-full bg-elevated px-2 py-0.5 text-[10px] font-medium text-fg-5",children:"进行中"})]},s.id))})})]})}function une({agent:e,fragments:t,onSave:n}){const r=Fe(K=>K.activeRepoId),[a,s]=v.useState(!1),[o,u]=v.useState(e.name),[d,f]=v.useState(e.description??""),[m,p]=v.useState(e.baseAgent),[b,x]=v.useState(e.model??""),[E,_]=v.useState(e.variant??""),[S,T]=v.useState(e.memoryModel??""),[C,A]=v.useState(e.systemPrompt),[k,I]=v.useState(!1),[O,j]=v.useState(!1),[H,z]=v.useState([]);v.useEffect(()=>{if(!r){z([]);return}let K=!1;return(async()=>{try{const[L,P]=await Promise.all([wf(),Sf(r)]);if(K)return;const ee=L[ene],M=ee?JSON.parse(ee):[];z(M.length>0?P.filter(de=>M.includes(de.id)):[])}catch{K||z([])}})(),()=>{K=!0}},[r]);const[D,V]=v.useState(()=>{const K=e.fragments.map(M=>M.id),L=e.systemPromptPosition??-1,P=L>=0&&L<=K.length?L:K.length,ee=[...K];return ee.splice(P,0,zo),ee}),q=K=>{V(L=>{if(L.includes(K))return L.filter(M=>M!==K);const P=L.indexOf(zo),ee=[...L];return ee.splice(P>=0?P:ee.length,0,K),ee})},ae=(K,L)=>{const P=K+L;P<0||P>=D.length||V(ee=>{const M=[...ee];return[M[K],M[P]]=[M[P],M[K]],M})},Q=D.filter(K=>K!==zo),W=(()=>{const K=D.indexOf(zo);return K<0?-1:D.slice(0,K).filter(L=>L!==zo).length})(),G=D.map(K=>{var L;return K===zo?C:(L=t.find(P=>P.id===K))==null?void 0:L.content}).filter(Boolean).join(`
|
|
540
|
+
|
|
541
|
+
---
|
|
542
|
+
|
|
543
|
+
`),F=async()=>{if(!(!o.trim()||!m)){j(!0);try{await n({name:o.trim(),description:d.trim()||void 0,baseAgent:m,model:b.trim()||void 0,variant:E.trim()||void 0,memoryModel:S.trim()||null,systemPrompt:C,systemPromptPosition:W,fragmentIds:Q}),s(!1)}finally{j(!1)}}},$=e.isSystem>=1;return a?c.jsxs("section",{className:"rounded-xl border border-blue-500/30 bg-surface p-5 space-y-3",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"编辑配置"}),!$&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex gap-3",children:[c.jsxs("label",{className:"flex-1",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"名称"}),c.jsx("input",{type:"text",value:o,onChange:K=>u(K.target.value),className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 text-sm text-fg focus:border-blue-500 focus:outline-none"})]}),c.jsxs("label",{className:"w-36",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Base Agent"}),c.jsx("select",{value:m,onChange:K=>p(K.target.value),className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 text-sm text-fg focus:border-blue-500 focus:outline-none",children:Jte.map(K=>c.jsx("option",{value:K,children:K},K))})]})]}),c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"描述(可选)"}),c.jsx("input",{type:"text",value:d,onChange:K=>f(K.target.value),placeholder:"一句话描述这个 Agent 的用途",className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]})]}),c.jsxs("div",{className:"flex gap-3",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"模型(可选)"}),c.jsxs("select",{value:b,onChange:K=>x(K.target.value),className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 font-mono text-sm text-fg focus:border-blue-500 focus:outline-none",children:[c.jsx("option",{value:"",children:"默认模型"}),H.map(K=>c.jsx("option",{value:K.id,children:K.name||K.id},K.id))]})]}),c.jsxs("div",{className:"w-28",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Variant"}),c.jsxs("select",{value:E,onChange:K=>_(K.target.value),className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 font-mono text-sm text-fg focus:border-blue-500 focus:outline-none",children:[c.jsx("option",{value:"",children:"默认"}),c.jsx("option",{value:"max",children:"max"}),c.jsx("option",{value:"high",children:"high"})]})]})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"记忆提取/整理模型"}),c.jsxs("select",{value:S,onChange:K=>T(K.target.value),className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-1.5 font-mono text-sm text-fg focus:border-blue-500 focus:outline-none",children:[c.jsx("option",{value:"",children:"跟随主模型"}),H.map(K=>c.jsx("option",{value:K.id,children:K.name||K.id},K.id))]})]}),!$&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"提示词组合"}),c.jsxs("div",{className:"mt-1.5 space-y-1",children:[D.map((K,L)=>{if(K===zo)return c.jsxs("div",{className:"flex items-center gap-2 rounded border border-amber-500/30 bg-amber-500/5 px-2 py-1",children:[c.jsxs("div",{className:"flex flex-col",children:[c.jsx("button",{type:"button",onClick:()=>ae(L,-1),disabled:L===0,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▲"}),c.jsx("button",{type:"button",onClick:()=>ae(L,1),disabled:L===D.length-1,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▼"})]}),c.jsx("span",{className:"flex-1 truncate text-xs font-medium text-amber-400",children:"✎ 补充指令"})]},K);const P=t.find(ee=>ee.id===K);return P?c.jsxs("div",{className:"flex items-center gap-2 rounded border border-blue-500/30 bg-blue-500/5 px-2 py-1",children:[c.jsxs("div",{className:"flex flex-col",children:[c.jsx("button",{type:"button",onClick:()=>ae(L,-1),disabled:L===0,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▲"}),c.jsx("button",{type:"button",onClick:()=>ae(L,1),disabled:L===D.length-1,className:"text-[10px] leading-none text-fg-5 hover:text-fg-2 disabled:opacity-30",children:"▼"})]}),c.jsx("span",{className:"flex-1 truncate text-xs text-fg",children:P.name}),c.jsx("button",{type:"button",onClick:()=>q(K),className:"text-fg-5 hover:text-red-400",children:c.jsx(yt,{className:"h-3 w-3"})})]},K):null}),t.filter(K=>!Q.includes(K.id)).length>0&&c.jsxs("select",{value:"",onChange:K=>{K.target.value&&q(K.target.value)},className:"w-full rounded border border-dashed border-line bg-base px-2 py-1 text-xs text-fg-4 focus:border-blue-500 focus:outline-none",children:[c.jsx("option",{value:"",children:"+ 添加片段…"}),t.filter(K=>!Q.includes(K.id)).map(K=>c.jsx("option",{value:K.id,children:K.name},K.id))]})]})]}),c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"补充指令内容"}),c.jsx("textarea",{value:C,onChange:K=>A(K.target.value),rows:4,className:"mt-1 w-full resize-y rounded-md border border-line bg-base px-3 py-2 font-mono text-sm leading-relaxed text-fg focus:border-blue-500 focus:outline-none"})]}),(Q.length>0||C)&&c.jsxs("div",{children:[c.jsxs("button",{type:"button",onClick:()=>I(!k),className:"flex items-center gap-1 text-xs font-medium text-fg-4 hover:text-fg-3",children:[c.jsx("span",{children:k?"▾":"▸"})," 预览最终提示词"]}),k&&c.jsx("pre",{className:"mt-1 max-h-48 overflow-auto rounded border border-line bg-elevated px-3 py-2 font-mono text-xs leading-relaxed text-fg-4",children:G||"(空)"})]})]}),c.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[c.jsx("button",{type:"button",onClick:()=>s(!1),className:"rounded-md px-3 py-1.5 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),c.jsx("button",{type:"button",onClick:()=>void F(),disabled:O||!o.trim(),className:"rounded-md bg-blue-600 px-4 py-1.5 text-xs font-medium text-white hover:bg-blue-500 disabled:opacity-40",children:O?"保存中…":"保存"})]})]}):c.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"配置"}),c.jsxs("button",{type:"button",onClick:()=>s(!0),className:"flex items-center gap-1 rounded-md border border-line px-2.5 py-1 text-xs text-fg-4 transition-colors hover:bg-elevated hover:text-fg-3",children:[c.jsx(S1,{className:"h-3 w-3"})," 编辑"]})]}),c.jsxs("div",{className:"mt-3 space-y-2.5",children:[c.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[c.jsx("span",{className:"w-20 shrink-0 text-fg-5",children:"Base Agent"}),c.jsx("span",{className:"font-mono text-fg",children:e.baseAgent})]}),c.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[c.jsx("span",{className:"w-20 shrink-0 text-fg-5",children:"模型"}),c.jsx("span",{className:"font-mono text-fg",children:e.model||"默认"})]}),c.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[c.jsx("span",{className:"w-20 shrink-0 text-fg-5",children:"Variant"}),c.jsx("span",{className:"font-mono text-fg",children:e.variant||"默认"})]}),c.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[c.jsx("span",{className:"w-20 shrink-0 text-fg-5",children:"记忆模型"}),c.jsx("span",{className:"font-mono text-fg",children:e.memoryModel||"跟随主模型"})]}),e.fragments.length>0&&c.jsxs("div",{className:"flex items-start gap-2 text-xs",children:[c.jsx("span",{className:"w-20 shrink-0 pt-0.5 text-fg-5",children:"片段"}),c.jsx("div",{className:"flex flex-wrap gap-1",children:e.fragments.map(K=>c.jsx("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] font-medium text-blue-400",children:K.name},K.id))})]}),e.systemPrompt&&c.jsxs("div",{className:"flex items-start gap-2 text-xs",children:[c.jsx("span",{className:"w-20 shrink-0 pt-0.5 text-fg-5",children:"补充指令"}),c.jsx("p",{className:"min-w-0 truncate font-mono text-fg-4",children:e.systemPrompt})]})]})]})}function cne(){const{agentId:e}=D5(),t=ur(),n=Fe(Dr),r=io(T=>T.agents),a=r.find(T=>T.id===e),[s,o]=v.useState([]),[u,d]=v.useState(!1),[f,m]=v.useState(!1);v.useEffect(()=>{lI().then(o).catch(()=>o([]))},[]),v.useEffect(()=>{r.length>0&&!a&&t(n?`/${encodeURIComponent(n)}/agents`:"/repos",{replace:!0})},[r,a,t,n]);const p=async T=>{e&&(await Jz(e,T),io.getState().loadAgents())},b=async()=>{e&&(await iI(e),io.getState().loadAgents(),t(n?`/${encodeURIComponent(n)}/agents`:"/repos",{replace:!0}))},x=async()=>{if(!e||!a)return;const T=await Hw(e),C=new Blob([JSON.stringify(T,null,2)],{type:"application/json"}),A=URL.createObjectURL(C),k=document.createElement("a");k.href=A,k.download=`${a.name.replace(/[^a-zA-Z0-9\u4e00-\u9fff_-]/g,"_")}.json`,k.click(),URL.revokeObjectURL(A)},E=async()=>{if(!e)return;const T=await Hw(e);await navigator.clipboard.writeText(JSON.stringify(T,null,2)),d(!0),setTimeout(()=>d(!1),2e3)};if(!a||!e)return c.jsx("div",{className:"flex flex-1 items-center justify-center",children:c.jsx(Nn,{className:"h-5 w-5 fs-spin text-fg-5"})});const _=a.isSystem>=1,S=tne(a.name);return c.jsx("div",{className:"flex-1 overflow-y-auto",children:c.jsxs("div",{className:"mx-auto max-w-3xl space-y-6 p-6",children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("button",{type:"button",onClick:()=>t(n?`/${encodeURIComponent(n)}/agents`:"/repos"),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-line text-fg-4 transition-colors hover:bg-elevated hover:text-fg-3",children:c.jsx(Qd,{className:"h-4 w-4"})}),c.jsx("div",{className:re("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-sm font-semibold",S.bg,S.text),children:S.initial}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("h1",{className:"truncate text-lg font-bold text-fg",children:a.name}),_&&c.jsx("span",{className:"shrink-0 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-medium text-amber-400",children:"系统"}),a.repoId&&c.jsx("span",{className:"shrink-0 rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] font-medium text-blue-400",children:"repo"})]}),c.jsxs("p",{className:"mt-0.5 text-xs text-fg-4",children:[c.jsx("span",{className:"font-mono",children:a.baseAgent}),a.model&&c.jsxs("span",{className:"ml-1.5 text-fg-5",children:["· ",a.model]})]}),a.description&&c.jsx("p",{className:"mt-1 text-xs text-fg-4",children:a.description})]}),c.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[c.jsx("button",{type:"button",onClick:()=>void x(),title:"导出 JSON",className:"rounded-md border border-line p-1.5 text-fg-4 transition-colors hover:bg-elevated hover:text-fg-3",children:c.jsx(ZU,{className:"h-4 w-4"})}),c.jsx("button",{type:"button",onClick:()=>void E(),title:"复制 JSON",className:"rounded-md border border-line p-1.5 text-fg-4 transition-colors hover:bg-elevated hover:text-fg-3",children:u?c.jsx(yr,{className:"h-4 w-4 text-green-500"}):c.jsx(HU,{className:"h-4 w-4"})}),!_&&(f?c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("button",{type:"button",onClick:()=>void b(),className:"rounded-md border border-red-500/30 p-1.5 text-red-400 hover:bg-red-500/10",children:c.jsx(yr,{className:"h-4 w-4"})}),c.jsx("button",{type:"button",onClick:()=>m(!1),className:"rounded-md border border-line p-1.5 text-fg-4 hover:bg-elevated",children:c.jsx(yt,{className:"h-4 w-4"})})]}):c.jsx("button",{type:"button",onClick:()=>m(!0),title:"删除",className:"rounded-md border border-line p-1.5 text-fg-4 transition-colors hover:border-red-500/30 hover:text-red-400",children:c.jsx(is,{className:"h-4 w-4"})}))]})]}),c.jsx(une,{agent:a,fragments:s,onSave:p}),c.jsx(one,{agentId:e}),c.jsx(lne,{agentId:e})]})})}let Wi=null;function dne(e){const t=Date.now()-e,n=Math.floor(t/6e4);return n<1?"刚刚":n<60?`${n} 分钟前`:`${Math.floor(n/60)} 小时前`}const uC=[{id:"repos",label:"仓库",icon:Y5},{id:"usage",label:"Claude 账号",icon:Tf},{id:"git",label:"Git 源站",icon:Nf},{id:"models",label:"模型",icon:qm},{id:"agents",label:"AGENTS.md",icon:lo}],fne={id:"server",label:"服务器",icon:J5};function vv(e){if(!e)return null;const t=new Date(e).getTime()-Date.now();if(t<=0)return"已重置";const n=Math.floor(t/36e5),r=Math.floor(t%36e5/6e4);return n>0?`${n}h ${r}m 后重置`:`${r}m 后重置`}function hne(e){return e>=90?"bg-red-500":e>=70?"bg-amber-500":"bg-blue-500"}function cy({label:e,window:t}){if(!t)return null;const n=Math.round(t.utilization),r=vv(t.resets_at),a=n>=90,s=n>=70;return c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-fg-3",children:e}),c.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[r&&c.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-elevated px-1.5 py-0.5 text-[10px] font-medium text-fg-4 tabular-nums",children:[c.jsx(p0,{className:"h-2.5 w-2.5"}),r]}),c.jsxs("span",{className:re("text-sm font-bold leading-none tabular-nums",a?"text-red-400":s?"text-amber-400":"text-fg"),children:[n,"%"]})]})]}),c.jsx("div",{className:"h-2.5 overflow-hidden rounded-full bg-elevated ring-1 ring-inset ring-line/60",children:c.jsx("div",{className:re("h-full rounded-full transition-all duration-500 ease-out",hne(n),a?"shadow-sm shadow-red-500/50":s?"shadow-sm shadow-amber-500/40":null),style:{width:`${Math.min(n,100)}%`}})})]})}function mne({account:e,onSwitch:t,switching:n}){var a;const r=e.active;return c.jsxs("div",{className:re("relative overflow-hidden rounded-xl border bg-base p-4 shadow-sm transition-colors",r?"border-blue-500/30 ring-1 ring-inset ring-blue-500/20":"border-line"),children:[r&&c.jsx("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-1 bg-blue-500"}),c.jsxs("div",{className:"flex items-center gap-2.5",children:[c.jsx("div",{className:re("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg",r?"bg-blue-500/15 text-blue-500":"bg-elevated text-fg-4"),children:c.jsx(Q5,{className:"h-3.5 w-3.5"})}),c.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold text-fg",children:e.label}),r&&c.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1.5 rounded-full bg-blue-500/15 px-2 py-0.5 text-[10px] font-semibold text-blue-500",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-blue-500 shadow-sm shadow-blue-500/60"}),"当前"]}),!r&&t&&c.jsxs("button",{type:"button",onClick:()=>t(e.id),disabled:n,className:"inline-flex shrink-0 items-center gap-1 rounded-full border border-line px-2 py-0.5 text-[10px] font-medium text-fg-4 transition-colors hover:border-blue-500/50 hover:text-blue-500 disabled:opacity-40",children:[n&&c.jsx(Nn,{className:"h-2.5 w-2.5 fs-spin"}),"切换"]}),e.excluded&&c.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full bg-elevated px-2 py-0.5 text-[10px] font-medium text-fg-5",children:[c.jsx(EU,{className:"h-2.5 w-2.5"}),"不自动切"]}),e.needsReauth&&c.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full bg-red-500/15 px-2 py-0.5 text-[10px] font-medium text-red-400",children:[c.jsx(or,{className:"h-2.5 w-2.5"}),"需重新登录"]})]}),e.holders&&e.holders.length>0&&c.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-fg-5",children:[c.jsx(Z5,{className:"h-3 w-3 shrink-0"}),c.jsx("span",{className:"truncate",children:e.holders.join(", ")})]}),e.error&&!e.usage?c.jsxs("div",{className:"mt-3 flex items-start gap-2 rounded-lg bg-red-500/10 px-3 py-2 text-xs text-red-400",children:[c.jsx(or,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),c.jsx("span",{className:"min-w-0 break-words",children:e.error})]}):e.usage?c.jsxs("div",{className:"mt-4 space-y-3",children:[c.jsx(cy,{label:"5 小时窗口",window:e.usage.five_hour}),c.jsx(cy,{label:"7 天窗口",window:e.usage.seven_day}),(a=e.usage.scoped)==null?void 0:a.map(s=>c.jsx(cy,{label:s.label,window:s},s.label))]}):null]})}function pne(){const[e,t]=v.useState((Wi==null?void 0:Wi.data)??null),[n,r]=v.useState(!Wi),[a,s]=v.useState(null),[o,u]=v.useState(null),[d,f]=v.useState((Wi==null?void 0:Wi.fetchedAt)??null),[,m]=v.useState(0),p=v.useCallback(_=>{const S=Date.now();Wi={data:_,fetchedAt:S},t(_),f(S)},[]),b=v.useCallback(()=>{r(!0),s(null),cI().then(_=>{p(_),r(!1)}).catch(_=>{s(_ instanceof Error?_.message:String(_)),r(!1)})},[p]);v.useEffect(()=>{Wi||b()},[b]),v.useEffect(()=>{const _=setInterval(()=>m(S=>S+1),3e4);return()=>clearInterval(_)},[]);const x=v.useRef(!1),E=v.useCallback(_=>{x.current||(x.current=!0,u(_),dI(_).then(S=>{p(S),u(null)}).catch(S=>{s(S instanceof Error?S.message:String(S)),u(null)}).finally(()=>{x.current=!1}))},[p]);return c.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[c.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-blue-500/10 text-blue-500",children:c.jsx(c7,{className:"h-4 w-4"})}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Claude 订阅额度"}),c.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"各账号的 Pro/Max 订阅窗口用量。"})]})]}),c.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[d&&c.jsx("span",{className:"text-[10px] tabular-nums text-fg-5",children:dne(d)}),c.jsx("button",{type:"button",onClick:b,disabled:n,className:"rounded-md p-1.5 text-fg-4 transition-colors hover:bg-elevated hover:text-fg-2 disabled:opacity-40",children:c.jsx(ll,{className:re("h-4 w-4",n&&"fs-spin")})})]})]}),c.jsx("div",{className:"mt-4 space-y-2.5",children:n&&!e?c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[c.jsx(Nn,{className:"h-5 w-5 fs-spin"}),c.jsx("p",{className:"text-xs",children:"加载中…"})]}):a&&!e?c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-red-400",children:[c.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-red-500/10",children:c.jsx(or,{className:"h-5 w-5"})}),c.jsx("p",{className:"max-w-xs text-center text-xs leading-relaxed",children:a})]}):e&&e.accounts.length===0?c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[c.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-elevated text-fg-4",children:c.jsx(Z5,{className:"h-5 w-5"})}),c.jsx("p",{className:"max-w-xs text-center text-xs leading-relaxed",children:"未找到账号。请在 OpenCode TUI 中通过 claude-accounts-usage 插件登录。"})]}):e?e.accounts.map(_=>c.jsx(mne,{account:_,onSwitch:E,switching:o===_.id},_.id)):null})]})}function gne({host:e,onDelete:t}){const[n,r]=v.useState(!1);return c.jsxs("div",{className:"group flex items-center gap-3 rounded-lg border border-line bg-base px-4 py-3",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm font-medium text-fg",children:e.name}),c.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-4",children:e.platform})]}),c.jsxs("div",{className:"mt-0.5 flex items-center gap-2 font-mono text-xs text-fg-4",children:[c.jsx("span",{children:e.host}),c.jsx("span",{className:"text-fg-6",children:"·"}),c.jsx("span",{className:"text-fg-5",children:e.token})]})]}),n?c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("button",{type:"button",onClick:t,className:"rounded p-1.5 text-red-400 hover:bg-red-500/10",children:c.jsx(yr,{className:"h-4 w-4"})}),c.jsx("button",{type:"button",onClick:()=>r(!1),className:"rounded p-1.5 text-fg-4 hover:bg-elevated",children:c.jsx(yt,{className:"h-4 w-4"})})]}):c.jsx("button",{type:"button",onClick:()=>r(!0),className:"rounded p-1.5 text-fg-5 opacity-0 transition-opacity hover:text-red-400 group-hover:opacity-100",children:c.jsx(is,{className:"h-4 w-4"})})]})}function bne({onAdded:e}){const[t,n]=v.useState(!1),[r,a]=v.useState(""),[s,o]=v.useState(""),[u,d]=v.useState(""),[f,m]=v.useState("gitea"),[p,b]=v.useState(!1),[x,E]=v.useState(!1),_=()=>{a(""),o(""),d(""),m("gitea"),n(!1)},S=async()=>{if(!(!r.trim()||!s.trim()||!u.trim())){b(!0);try{await DF(r.trim(),s.trim(),u.trim(),f),_(),e()}finally{b(!1)}}};return t?c.jsxs("div",{className:"space-y-3 rounded-lg border border-line bg-base p-4",children:[c.jsxs("div",{className:"flex gap-3",children:[c.jsxs("label",{className:"flex-1",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"名称"}),c.jsx("input",{type:"text",value:s,onChange:T=>o(T.target.value),placeholder:"公司 Gitea",className:"mt-1 w-full rounded-md border border-line bg-surface px-3 py-1.5 text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),c.jsxs("label",{className:"w-28",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"平台"}),c.jsxs("select",{value:f,onChange:T=>m(T.target.value),className:"mt-1 w-full rounded-md border border-line bg-surface px-3 py-1.5 text-sm text-fg focus:border-blue-500 focus:outline-none",children:[c.jsx("option",{value:"gitea",children:"Gitea"}),c.jsx("option",{value:"github",children:"GitHub"}),c.jsx("option",{value:"gitlab",children:"GitLab"})]})]})]}),c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Host"}),c.jsx("input",{type:"text",value:r,onChange:T=>a(T.target.value),placeholder:"git.btsai.work",className:"mt-1 w-full rounded-md border border-line bg-surface px-3 py-1.5 font-mono text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Token"}),c.jsxs("div",{className:"relative mt-1",children:[c.jsx("input",{type:x?"text":"password",value:u,onChange:T=>d(T.target.value),placeholder:"Personal Access Token",className:"w-full rounded-md border border-line bg-surface px-3 py-1.5 pr-9 font-mono text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"}),c.jsx("button",{type:"button",onClick:()=>E(!x),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-fg-5 hover:text-fg-3",children:x?c.jsx(a7,{className:"h-3.5 w-3.5"}):c.jsx(s7,{className:"h-3.5 w-3.5"})})]})]}),c.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[c.jsx("button",{type:"button",onClick:_,className:"rounded-md px-3 py-1.5 text-xs text-fg-4 hover:bg-elevated",children:"取消"}),c.jsx("button",{type:"button",onClick:()=>void S(),disabled:p||!r.trim()||!s.trim()||!u.trim(),className:"rounded-md bg-blue-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:p?"保存中…":"保存"})]})]}):c.jsxs("button",{type:"button",onClick:()=>n(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-line py-2.5 text-xs text-fg-4 transition-colors hover:border-fg-5 hover:text-fg-3",children:[c.jsx(Da,{className:"h-3.5 w-3.5"})," 添加 Git 源站"]})}function xne(){const[e,t]=v.useState(""),[n,r]=v.useState(""),[a,s]=v.useState(!0),[o,u]=v.useState(!1),[d,f]=v.useState(null);v.useEffect(()=>{SF().then(b=>{t(b.content),r(b.content),s(!1)}).catch(b=>{f(b instanceof Error?b.message:String(b)),s(!1)})},[]);const m=async()=>{u(!0),f(null);try{await wF(e),r(e)}catch(b){f(b instanceof Error?b.message:String(b))}u(!1)},p=e!==n;return c.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"全局 AGENTS.md"}),c.jsx("p",{className:"mt-1 text-xs text-fg-4",children:"此内容会注入到所有仓库的 Agent 系统指令中。修改后 opencode 热加载,即时生效。"})]}),c.jsxs("button",{type:"button",onClick:()=>void m(),disabled:o||!p,className:"flex shrink-0 items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[c.jsx(g0,{className:"h-3.5 w-3.5"}),o?"保存中…":"保存"]})]}),d&&c.jsxs("div",{className:"mt-3 flex items-start gap-2 rounded-lg bg-red-500/10 px-3 py-2 text-xs text-red-400",children:[c.jsx(or,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),c.jsx("span",{className:"min-w-0 break-words",children:d})]}),c.jsx("div",{className:"mt-4",children:a?c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[c.jsx(Nn,{className:"h-5 w-5 fs-spin"}),c.jsx("p",{className:"text-xs",children:"加载中…"})]}):c.jsx("textarea",{value:e,onChange:b=>t(b.target.value),spellCheck:!1,className:"h-96 w-full resize-y rounded-lg border border-line bg-base px-4 py-3 font-mono text-sm leading-relaxed text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20",placeholder:`# AGENTS.md
|
|
544
|
+
|
|
545
|
+
在此编写全局 Agent 指令…`})}),c.jsx("p",{className:"mt-3 text-[11px] text-fg-5",children:"文件路径:~/.config/opencode/AGENTS.md"})]})}function yne(){const[e,t]=v.useState([]),[n,r]=v.useState(!0),a=()=>{MF().then(o=>{t(o),r(!1)}).catch(()=>r(!1))};v.useEffect(a,[]);const s=async o=>{await jF(o),t(u=>u.filter(d=>d.id!==o))};return c.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Git 源站管理"}),c.jsx("p",{className:"mt-1 text-xs text-fg-4",children:"为不同的 Git 托管平台配置访问凭证,用于同步 Issues。系统会根据仓库的 git URL 自动匹配对应的源站。"}),c.jsx("div",{className:"mt-4 space-y-2",children:n?c.jsx("p",{className:"py-4 text-center font-mono text-xs text-fg-5",children:"加载中…"}):c.jsxs(c.Fragment,{children:[e.map(o=>c.jsx(gne,{host:o,onDelete:()=>void s(o.id)},o.id)),c.jsx(bne,{onAdded:a})]})}),c.jsx("p",{className:"mt-4 text-[11px] text-fg-5",children:"Token 存储在数据库中。也可通过环境变量 GITEA_TOKEN 设置全局 fallback。"})]})}const cC="pinned_models";function vne(e){const t=new Map;for(const n of e){const r=n.providerName||n.providerID,a=t.get(r);a?a.push(n):t.set(r,[n])}return Array.from(t,([n,r])=>({provider:n,models:r})).sort((n,r)=>{const a=n.models.some(o=>o.configured),s=r.models.some(o=>o.configured);return a!==s?a?-1:1:n.provider.localeCompare(r.provider)})}function Ene(e){return e?e>=1e6?`${(e/1e6).toFixed(e%1e6===0?0:1)}M`:e>=1e3?`${Math.round(e/1e3)}K`:String(e):""}function _ne(e){if(!e)return"";const t=[];return e.input!=null&&t.push(`$${e.input}/Mi`),e.output!=null&&t.push(`$${e.output}/Mo`),t.join(" ")}function Nne(){const e=Fe(A=>A.activeRepoId),[t,n]=v.useState([]),[r,a]=v.useState(new Set),[s,o]=v.useState(!0),[u,d]=v.useState(null),[f,m]=v.useState(null),[p,b]=v.useState("");v.useEffect(()=>{let A=!1;async function k(){o(!0),d(null);try{const[I,O]=await Promise.all([wf(),e?Sf(e):Promise.resolve([])]);if(A)return;const j=I[cC],H=j?JSON.parse(j):[];a(new Set(H)),n(O),m(null),b("")}catch(I){A||d(I instanceof Error?I.message:String(I))}A||o(!1)}return k(),()=>{A=!0}},[e]);const x=async A=>{const k=new Set(r);k.has(A)?k.delete(A):k.add(A),a(k);try{await Qy(cC,JSON.stringify([...k]))}catch{a(r)}},E=v.useMemo(()=>vne(t),[t]),_=t.filter(A=>r.has(A.id)).length,S=f?E.find(A=>A.provider===f):E[0],T=p.trim().toLowerCase(),C=S?T?S.models.filter(A=>(A.name||A.id).toLowerCase().includes(T)||A.id.toLowerCase().includes(T)):S.models:[];return c.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[c.jsx("div",{className:"flex items-center justify-between gap-3",children:c.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[c.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-blue-500/10 text-blue-500",children:c.jsx(qm,{className:"h-4 w-4"})}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"常用模型"}),c.jsxs("p",{className:"mt-0.5 text-xs text-fg-4",children:["勾选常用模型,在新建对话时快速选择。",_>0&&c.jsxs("span",{className:"ml-1 text-blue-400",children:["已选 ",_," 个"]})]})]})]})}),c.jsx("div",{className:"mt-4",children:e?s?c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[c.jsx(Nn,{className:"h-5 w-5 fs-spin"}),c.jsx("p",{className:"text-xs",children:"加载模型列表…"})]}):u?c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-red-400",children:[c.jsx(or,{className:"h-5 w-5"}),c.jsx("p",{className:"max-w-xs text-center text-xs leading-relaxed",children:u})]}):t.length===0?c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[c.jsx(qm,{className:"h-5 w-5"}),c.jsx("p",{className:"text-xs",children:"当前仓库没有可用模型。"})]}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"flex gap-1 overflow-x-auto rounded-lg border border-line bg-base p-1",children:E.map(A=>{var O;const k=A.provider===(f??((O=E[0])==null?void 0:O.provider)),I=A.models.filter(j=>r.has(j.id)).length;return c.jsxs("button",{type:"button",onClick:()=>{m(A.provider),b("")},className:re("flex shrink-0 items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors",k?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-3"),children:[A.provider,I>0&&c.jsx("span",{className:"rounded-full bg-blue-500/15 px-1.5 py-0.5 text-[10px] font-semibold tabular-nums text-blue-500",children:I})]},A.provider)})}),c.jsxs("div",{className:"mt-3 flex items-center gap-2 rounded-md border border-line bg-base px-3 py-1.5",children:[c.jsx(tl,{className:"h-3.5 w-3.5 shrink-0 text-fg-5"}),c.jsx("input",{type:"text",value:p,onChange:A=>b(A.target.value),placeholder:"搜索模型…",className:"min-w-0 flex-1 bg-transparent text-xs text-fg placeholder:text-fg-6 focus:outline-none"}),p&&c.jsx("button",{type:"button",onClick:()=>b(""),className:"text-fg-5 hover:text-fg-3",children:c.jsx(yt,{className:"h-3 w-3"})})]}),c.jsx("div",{className:"mt-3 rounded-lg border border-line bg-base",children:C.length===0?c.jsx("div",{className:"px-3 py-6 text-center text-xs text-fg-5",children:"无匹配模型"}):c.jsx("div",{className:"divide-y divide-line/40",children:C.map(A=>{const k=r.has(A.id),I=Ene(A.contextLimit),O=_ne(A.cost);return c.jsxs("label",{className:re("flex cursor-pointer items-center gap-3 px-3 py-2 transition-colors hover:bg-elevated/60",k&&"bg-blue-500/5"),children:[c.jsx("input",{type:"checkbox",checked:k,onChange:()=>void x(A.id),className:"h-3.5 w-3.5 shrink-0 cursor-pointer rounded border-line accent-blue-500"}),c.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-fg",children:A.name||A.id}),c.jsxs("span",{className:"flex shrink-0 items-center gap-2",children:[I&&c.jsx("span",{className:"rounded bg-surface px-1.5 py-0.5 text-[10px] text-fg-5",children:I}),O&&c.jsx("span",{className:"text-[10px] text-fg-6",children:O})]})]},A.id)})})})]}):c.jsxs("div",{className:"flex flex-col items-center gap-2.5 py-10 text-fg-5",children:[c.jsx(qm,{className:"h-5 w-5"}),c.jsx("p",{className:"text-xs",children:"请先在左侧选择一个仓库以加载可用模型。"})]})})]})}function Tne(){const[e,t]=v.useState(Xy),[n,r]=v.useState(!1),[a,s]=v.useState(null),[o,u]=v.useState(Xy),d=e!==o,f=async()=>{const p=e.replace(/\/+$/,"");if(p){r(!0),s(null);try{const b=await fetch(`${p}/api/health`,{signal:AbortSignal.timeout(5e3)});s(b.ok?"ok":"fail")}catch{s("fail")}r(!1)}},m=()=>{const p=e.replace(/\/+$/,"");Tz(p),u(p),t(p)};return c.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[c.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-blue-500/10 text-blue-500",children:c.jsx(J5,{className:"h-4 w-4"})}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"服务器连接"}),c.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"配置远程 Fourth Spark Server 地址。"})]})]}),c.jsxs("div",{className:"mt-4 space-y-3",children:[c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"服务器地址"}),c.jsx("input",{type:"url",value:e,onChange:p=>{t(p.target.value),s(null)},placeholder:"http://192.168.1.100:3000",className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-2 font-mono text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("button",{type:"button",onClick:()=>void f(),disabled:n||!e.trim(),className:"flex items-center gap-1.5 rounded-md border border-line px-3 py-1.5 text-xs font-medium text-fg-3 transition-colors hover:bg-elevated disabled:opacity-40",children:[n?c.jsx(Nn,{className:"h-3.5 w-3.5 fs-spin"}):c.jsx(ll,{className:"h-3.5 w-3.5"}),"测试连接"]}),c.jsxs("button",{type:"button",onClick:m,disabled:!d,className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[c.jsx(g0,{className:"h-3.5 w-3.5"}),"保存"]}),a==="ok"&&c.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-green-500",children:[c.jsx(yr,{className:"h-3.5 w-3.5"})," 连接成功"]}),a==="fail"&&c.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-red-400",children:[c.jsx(or,{className:"h-3.5 w-3.5"})," 连接失败"]})]})]}),c.jsx("p",{className:"mt-4 text-[11px] text-fg-5",children:"保存后需重新打开 App 生效。确保手机与开发机在同一局域网。"})]})}function Sne(){const[e,t]=v.useState("local"),[n,r]=v.useState(!1),[a,s]=v.useState(!1);v.useEffect(()=>{Zy().then(u=>{const d=u.mode==="worker";r(d),t(d?"cloud":"local")}).catch(()=>{}).finally(()=>s(!0))},[]);const o=v.useCallback(u=>{const d=u.mode==="worker";r(d),d&&t("cloud")},[]);return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex gap-1 rounded-lg border border-line bg-base p-1",children:[c.jsxs("button",{type:"button",onClick:()=>{n||t("local")},disabled:n,className:re("flex flex-1 items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors",e==="local"?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-3",n&&e!=="local"&&"cursor-not-allowed opacity-40"),title:n?"需先断开账号池连接":void 0,children:[c.jsx(Tf,{className:"h-3.5 w-3.5"}),"本地模式"]}),c.jsxs("button",{type:"button",onClick:()=>t("cloud"),className:re("flex flex-1 items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors",e==="cloud"?"bg-surface text-fg shadow-sm":"text-fg-4 hover:text-fg-3"),children:[c.jsx(K5,{className:"h-3.5 w-3.5"}),"账号池"]})]}),a&&e==="local"&&c.jsx(pne,{}),a&&e==="cloud"&&c.jsx(Ane,{onStatusChange:o})]})}function wne({onClose:e,onSwitched:t}){const[n,r]=v.useState([]),[a,s]=v.useState(!0),[o,u]=v.useState(null),[d,f]=v.useState(null);v.useEffect(()=>{cI().then(x=>r(x.accounts)).catch(()=>{}).finally(()=>s(!1))},[]);const m=async x=>{u(x),f(null);try{await dI(x),t(),e()}catch(E){const _=E instanceof Error?E.message:String(E);f(_||"切换失败"),u(null)}},p=x=>{var E;return(E=x.usage)==null?void 0:E.five_hour},b=x=>{var E;return(E=x.usage)==null?void 0:E.seven_day};return c.jsx("div",{className:"fixed inset-0 z-50 flex items-end justify-center bg-black/50 backdrop-blur-sm sm:items-center",onClick:e,children:c.jsxs("div",{className:"flex max-h-[85vh] w-full flex-col rounded-t-2xl border border-line bg-surface p-4 shadow-2xl sm:mx-4 sm:max-w-lg sm:rounded-xl sm:p-5",onClick:x=>x.stopPropagation(),children:[c.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"切换账号"}),c.jsx("button",{type:"button",onClick:e,className:"rounded-md p-1 text-fg-4 transition-colors hover:bg-elevated hover:text-fg-3",children:c.jsx(yt,{className:"h-4 w-4"})})]}),a?c.jsx("div",{className:"flex items-center justify-center py-10",children:c.jsx(Nn,{className:"h-5 w-5 fs-spin text-fg-4"})}):n.length===0?c.jsx("p",{className:"py-10 text-center text-xs text-fg-4",children:"暂无可用账号"}):c.jsx("div",{className:"mt-3 min-h-0 flex-1 space-y-1.5 overflow-y-auto pb-[var(--safe-bottom)]",children:n.map(x=>c.jsxs("button",{type:"button",disabled:o!==null,onClick:()=>{x.active||m(x.id)},className:re("flex w-full items-center gap-2 rounded-lg border px-3 py-2.5 text-left transition-colors sm:gap-3",x.active?"border-blue-500/40 bg-blue-500/5":"border-line hover:bg-elevated",o===x.id&&"opacity-60"),children:[c.jsx("div",{className:"min-w-0 flex-1",children:c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"truncate text-xs font-medium text-fg",children:x.label}),x.active&&c.jsx("span",{className:"rounded bg-blue-500/15 px-1.5 py-0.5 text-[9px] font-semibold text-blue-500",children:"当前"}),o===x.id&&c.jsx(Nn,{className:"h-3 w-3 fs-spin text-blue-500"})]})}),c.jsxs("div",{className:"flex shrink-0 gap-2 text-right sm:gap-4",children:[c.jsxs("div",{className:"w-14 sm:w-20",children:[c.jsx("div",{className:"text-[10px] text-fg-5",children:"5h"}),p(x)?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:re("text-xs font-medium",p(x).utilization>80?"text-red-400":"text-fg-3"),children:[Math.round(p(x).utilization),"%"]}),c.jsx("div",{className:"hidden text-[9px] text-fg-5 sm:block",children:p(x).resets_at?vv(p(x).resets_at):""})]}):c.jsx("div",{className:"text-[10px] text-fg-5",children:"—"})]}),c.jsxs("div",{className:"w-14 sm:w-20",children:[c.jsx("div",{className:"text-[10px] text-fg-5",children:"7d"}),b(x)?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:re("text-xs font-medium",b(x).utilization>80?"text-red-400":"text-fg-3"),children:[Math.round(b(x).utilization),"%"]}),c.jsx("div",{className:"hidden text-[9px] text-fg-5 sm:block",children:b(x).resets_at?vv(b(x).resets_at):""})]}):c.jsx("div",{className:"text-[10px] text-fg-5",children:"—"})]})]})]},x.id))}),d&&c.jsxs("div",{className:"mt-3 flex shrink-0 items-center gap-1.5 rounded-md border border-red-400/30 bg-red-400/5 px-3 py-2",children:[c.jsx(or,{className:"h-3.5 w-3.5 shrink-0 text-red-400"}),c.jsx("span",{className:"text-xs text-red-400",children:d})]})]})})}function Ane({onStatusChange:e}){const[t,n]=v.useState(""),[r,a]=v.useState(""),[s,o]=v.useState(""),[u,d]=v.useState(""),[f,m]=v.useState(!1),[p,b]=v.useState(null),[x,E]=v.useState(!1),[_,S]=v.useState(null),[T,C]=v.useState(!1);v.useEffect(()=>{let z=!1;return(async()=>{const[D,V]=await Promise.all([wf().catch(()=>({})),Zy().catch(()=>null)]);if(z)return;const q=D.cloud_master_url??"",ae=D.cloud_worker_id||(V==null?void 0:V.defaultWorkerId)||"";n(q),o(q),a(ae),d(D.cloud_worker_id??""),S(V)})(),()=>{z=!0}},[]);const k=((_==null?void 0:_.mode)??(s?"worker":"local"))==="worker",I=!k&&!!t.trim()&&!!r.trim(),O=t!==s||r!==u||I,j=async()=>{const z=t.replace(/\/+$/,"");if(!z)return;m(!0),b(null);const D=await RF(z);b(D?"ok":"fail"),m(!1)},H=async()=>{const z=t.replace(/\/+$/,""),D=r.trim();E(!0);try{await Qy("cloud_master_url",z),await Qy("cloud_worker_id",D),o(z),d(D),n(z),a(D);const V=await IF().catch(()=>null);V&&(S(V),e==null||e(V))}finally{E(!1)}};return c.jsxs("section",{className:"rounded-xl border border-line bg-surface p-5",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[c.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-blue-500/10 text-blue-500",children:c.jsx(K5,{className:"h-4 w-4"})}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg",children:"账号池配置"}),c.jsx("p",{className:"mt-0.5 text-xs text-fg-4",children:"连接 claude-accounts-pool Master,共享多账号池。"})]})]}),c.jsxs("div",{className:"mt-4 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-line bg-base px-3 py-2",children:[c.jsx("span",{className:re("h-2 w-2 shrink-0 rounded-full",k?"bg-blue-500 shadow-sm shadow-blue-500/60":"bg-green-500 shadow-sm shadow-green-500/60")}),c.jsx("span",{className:"text-xs font-medium text-fg-3",children:k?"Worker 模式":"本地模式"}),k&&(_==null?void 0:_.workerId)&&c.jsx("span",{className:"rounded bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-fg-4",children:_.workerId}),k&&(_==null?void 0:_.connected)!=null&&c.jsx("span",{className:re("ml-auto text-[10px] font-medium",_.connected?"text-green-500":"text-red-400"),children:_.connected?"已连接":"未连接"})]}),k&&(_==null?void 0:_.heldAccount)&&c.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-line bg-base px-3 py-2",children:[c.jsx(Q5,{className:"h-3.5 w-3.5 shrink-0 text-blue-500"}),c.jsx("span",{className:"text-xs text-fg-4",children:"当前账号"}),c.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-fg",children:_.heldAccount.label}),c.jsx("button",{type:"button",onClick:()=>C(!0),className:"ml-auto rounded-md border border-line px-2 py-0.5 text-[10px] font-medium text-fg-4 transition-colors hover:bg-elevated hover:text-fg-3",children:"切换账号"})]})]}),c.jsxs("div",{className:"mt-4 space-y-3",children:[c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Master URL"}),c.jsx("input",{type:"url",value:t,onChange:z=>{n(z.target.value),b(null)},placeholder:"http://100.64.0.36:8787",className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-2 font-mono text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"})]}),c.jsxs("label",{className:"block",children:[c.jsx("span",{className:"text-xs font-medium text-fg-3",children:"Worker ID"}),c.jsx("input",{type:"text",value:r,onChange:z=>a(z.target.value),placeholder:"fourth-spark-1",className:"mt-1 w-full rounded-md border border-line bg-base px-3 py-2 font-mono text-sm text-fg placeholder:text-fg-6 focus:border-blue-500 focus:outline-none"}),c.jsx("span",{className:"mt-1 block text-[11px] text-fg-5",children:"此 Worker 在账号池中的唯一标识,建议用小写字母、数字和连字符。"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("button",{type:"button",onClick:()=>void j(),disabled:f||!t.trim(),className:"flex items-center gap-1.5 rounded-md border border-line px-3 py-1.5 text-xs font-medium text-fg-3 transition-colors hover:bg-elevated disabled:opacity-40",children:[f?c.jsx(Nn,{className:"h-3.5 w-3.5 fs-spin"}):c.jsx(ll,{className:"h-3.5 w-3.5"}),"测试连接"]}),c.jsxs("button",{type:"button",onClick:()=>void H(),disabled:!O||x,className:"flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-blue-500 disabled:opacity-40",children:[c.jsx(g0,{className:"h-3.5 w-3.5"}),x?"保存中…":"保存"]}),p==="ok"&&c.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-green-500",children:[c.jsx(yr,{className:"h-3.5 w-3.5"})," 连接成功"]}),p==="fail"&&c.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-red-400",children:[c.jsx(or,{className:"h-3.5 w-3.5"})," 连接失败"]})]})]}),c.jsx("p",{className:"mt-4 text-[11px] text-fg-5",children:"清空 Master URL 可切回本地模式。"}),T&&c.jsx(wne,{onClose:()=>C(!1),onSwitched:async()=>{const z=await Zy().catch(()=>null);z&&(S(z),e==null||e(z))}})]})}function Cne(){const[e,t]=v.useState("usage"),n=v.useMemo(()=>nI()||Xy()?[...uC,fne]:uC,[]);return c.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c.jsxs("div",{className:re("mx-auto",e==="repos"?"max-w-4xl":"max-w-2xl"),children:[c.jsx("h1",{className:"text-lg font-semibold text-fg",children:"设置"}),c.jsx("p",{className:"mt-0.5 text-sm text-fg-4",children:"全局配置"}),c.jsx("div",{className:"mt-6 flex gap-1 overflow-x-auto rounded-lg border border-line bg-surface p-1 scrollbar-none",children:n.map(r=>c.jsxs("button",{type:"button",onClick:()=>t(r.id),className:re("flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 py-1.5 text-xs font-medium transition-colors",e===r.id?"bg-base text-fg shadow-sm":"text-fg-4 hover:text-fg-3"),children:[c.jsx(r.icon,{className:"h-3.5 w-3.5"}),r.label]},r.id))}),c.jsxs("div",{className:"mt-4",children:[e==="repos"&&c.jsx(pI,{}),e==="usage"&&c.jsx(Sne,{}),e==="git"&&c.jsx(yne,{}),e==="models"&&c.jsx(Nne,{}),e==="agents"&&c.jsx(xne,{}),e==="server"&&c.jsx(Tne,{})]})]})})}const kne=1440*60*1e3,One=7,Ine=3e4;function Rne(){const e=Date.now();return{from:e-One*kne,to:e}}const Ka=ei((e,t)=>({timeRange:Rne(),repoData:null,dayData:null,agentData:null,loading:!1,loadAll:async()=>{const{from:n,to:r}=t().timeRange;e({loading:!0});try{const[a,s,o]=await Promise.all([Rx(n,r,"repo"),Rx(n,r,"day"),Rx(n,r,"agent")]);e({repoData:a,dayData:s,agentData:o,loading:!1})}catch{e({loading:!1})}},setTimeRange:async(n,r)=>{e({timeRange:{from:n,to:r}}),await t().loadAll()},startPolling:()=>{const n=setInterval(()=>void t().loadAll(),Ine);return()=>clearInterval(n)}})),Ev=1440*60*1e3,dC=[{label:"今天",compute:()=>{const e=new Date;return{from:new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),to:Date.now()}}},{label:"7天",compute:()=>{const e=Date.now();return{from:e-7*Ev,to:e}}},{label:"30天",compute:()=>{const e=Date.now();return{from:e-30*Ev,to:e}}}],fC=6e4;function hC(e,t){const{from:n,to:r}=e.compute();return Math.abs(n-t.from)<fC&&Math.abs(r-t.to)<fC}function mC(e){const t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`}function pC(e,t){const[n,r,a]=e.split("-").map(Number),s=new Date(n,r-1,a);return t?s.getTime()+Ev-1:s.getTime()}function Mne(){const e=Ka(m=>m.timeRange),t=Ka(m=>m.setTimeRange),[n,r]=v.useState(!1),[a,s]=v.useState(()=>mC(e.from)),[o,u]=v.useState(()=>mC(e.to)),d=dC.some(m=>hC(m,e)),f=()=>{if(!a||!o)return;const m=pC(a,!1),p=pC(o,!0);m>=p||t(m,p)};return c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[dC.map(m=>{const p=hC(m,e);return c.jsx("button",{type:"button",onClick:()=>{r(!1);const{from:b,to:x}=m.compute();t(b,x)},className:re("rounded-lg border px-3 py-1.5 text-xs font-medium transition-colors",p?"border-blue-500 bg-blue-500/10 text-blue-600":"border-line text-fg-3 hover:bg-elevated"),children:m.label},m.label)}),c.jsx("button",{type:"button",onClick:()=>r(m=>!m),className:re("rounded-lg border px-3 py-1.5 text-xs font-medium transition-colors",n&&!d?"border-blue-500 bg-blue-500/10 text-blue-600":"border-line text-fg-3 hover:bg-elevated"),children:"自定义"}),n&&c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("input",{type:"date",value:a,onChange:m=>s(m.target.value),className:"rounded-md border border-line bg-base px-2 py-1 text-xs text-fg focus:border-blue-500 focus:outline-none"}),c.jsx("span",{className:"text-xs text-fg-4",children:"—"}),c.jsx("input",{type:"date",value:o,onChange:m=>u(m.target.value),className:"rounded-md border border-line bg-base px-2 py-1 text-xs text-fg focus:border-blue-500 focus:outline-none"}),c.jsx("button",{type:"button",onClick:f,className:"rounded-md bg-blue-600 px-2.5 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-500",children:"确定"})]})]})}const gC={cost:0,tokensInput:0,tokensOutput:0,tokensReasoning:0,tokensCacheRead:0,tokensCacheWrite:0,sessionCount:0};function Dne(e){const t={...gC},n={...gC};if(!e)return{user:t,system:n};for(const r of e){const a=r.isSystem?n:t;a.cost+=r.cost,a.tokensInput+=r.tokensInput,a.tokensOutput+=r.tokensOutput,a.tokensReasoning+=r.tokensReasoning,a.tokensCacheRead+=r.tokensCacheRead,a.tokensCacheWrite+=r.tokensCacheWrite,a.sessionCount+=r.sessionCount}return{user:t,system:n}}function dy({icon:e,label:t,main:n,userValue:r,systemValue:a}){return c.jsxs("div",{className:"rounded-xl border border-line bg-surface p-4",children:[c.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium text-fg-3",children:[c.jsx(e,{className:"h-3.5 w-3.5 text-fg-4"}),c.jsx("span",{children:t})]}),c.jsx("div",{className:"mt-2 font-mono text-2xl font-bold text-fg",children:n}),c.jsxs("div",{className:"mt-2 flex items-center gap-3 text-[11px]",children:[c.jsxs("span",{className:"flex items-center gap-1 text-fg-3",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-blue-500"}),"用户 ",c.jsx("span",{className:"font-mono text-fg-2",children:r})]}),c.jsxs("span",{className:"flex items-center gap-1 text-fg-3",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500"}),"系统 ",c.jsx("span",{className:"font-mono text-fg-2",children:a})]})]})]})}function jne(){const e=Ka(u=>u.repoData),{user:t,system:n}=Dne(e==null?void 0:e.groups),r=e==null?void 0:e.total,a=r?r.tokensInput+r.tokensOutput:0,s=t.tokensInput+t.tokensOutput,o=n.tokensInput+n.tokensOutput;return c.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3",children:[c.jsx(dy,{icon:XU,label:"总花费",main:pa((r==null?void 0:r.cost)??0),userValue:pa(t.cost),systemValue:pa(n.cost)}),c.jsx(dy,{icon:Tf,label:"Token 用量",main:zd(a),userValue:zd(s),systemValue:zd(o)}),c.jsx(dy,{icon:D7,label:"会话数",main:String((r==null?void 0:r.sessionCount)??0),userValue:String(t.sessionCount),systemValue:String(n.sessionCount)})]})}var Lne=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function aE(e){if(typeof e!="string")return!1;var t=Lne;return t.includes(e)}var Pne=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Bne=new Set(Pne);function XM(e){return typeof e!="string"?!1:Bne.has(e)}function QM(e){return typeof e=="string"&&e.startsWith("data-")}function ss(e){if(typeof e!="object"||e===null)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(XM(n)||QM(n))&&(t[n]=e[n]);return t}function iE(e){if(e==null)return null;if(v.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return ss(t)}return typeof e=="object"&&!Array.isArray(e)?ss(e):null}function os(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(XM(n)||QM(n)||aE(n))&&(t[n]=e[n]);return t}var Une=["children","width","height","viewBox","className","style","title","desc"];function _v(){return _v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_v.apply(null,arguments)}function zne(e,t){if(e==null)return{};var n,r,a=Fne(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Fne(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ZM=v.forwardRef((e,t)=>{var n=e.children,r=e.width,a=e.height,s=e.viewBox,o=e.className,u=e.style,d=e.title,f=e.desc,m=zne(e,Une),p=s||{width:r,height:a,x:0,y:0},b=re("recharts-surface",o);return v.createElement("svg",_v({},os(m),{className:b,width:r,height:a,style:u,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height),ref:t}),v.createElement("title",null,d),v.createElement("desc",null,f),n)}),Hne=["children","className"];function Nv(){return Nv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nv.apply(null,arguments)}function $ne(e,t){if(e==null)return{};var n,r,a=Yne(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Yne(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var _i=v.forwardRef((e,t)=>{var n=e.children,r=e.className,a=$ne(e,Hne),s=re("recharts-layer",r);return v.createElement("g",Nv({className:s},os(a),{ref:t}),n)});function Tv(e){return e==="__proto__"}const qne=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function JM(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e===""||e.startsWith(".")||e.endsWith(".")?!1:qne.test(e);default:return!1}}function O0(e){var t;return typeof e=="string"||typeof e=="symbol"?e:Object.is((t=e==null?void 0:e.valueOf)==null?void 0:t.call(e),-0)?"-0":String(e)}function sE(e){return typeof e=="symbol"||e instanceof Symbol}function Gne(e){return e==null?"":e4(e)}function e4(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(e4).join(",");if(sE(e))return e.toString();const t=e+"";return t==="0"&&Object.is(Number(e),-0)?"-0":t}function oE(e){if(Array.isArray(e))return e.map(O0);if(typeof e=="symbol")return[e];e=Gne(e);const t=[],n=e.length;if(n===0)return t;let r=0,a="",s="",o=!1,u=!1;const d=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push("");r<n;){const f=e[r];if(s)f==="\\"&&r+1<n?(r++,a+=e[r]):f===s?s="":a+=f;else if(o)if(f==='"'||f==="'")s=f,u=!0;else if(f==="]"){if(o=!1,!u&&a.includes(".")&&!d.test(a)){const m=a.split(".");for(let p=0;p<m.length;p++)m[p]!==""&&t.push(m[p])}else t.push(a);a=""}else a+=f;else if(f==="[")o=!0,u=!1,a&&(t.push(a),a="");else if(f==="."){a&&(t.push(a),a="");const m=e[r+1];(m===void 0||m===".")&&t.push("")}else a+=f;r++}return a&&t.push(a),t}function ls(e,t,n){if(e==null)return n;switch(typeof t){case"string":{if(Tv(t))return n;const r=e[t];return r===void 0?JM(t)&&!Object.hasOwn(e,t)?ls(e,oE(t),n):n:r}case"number":case"symbol":{typeof t=="number"&&(t=O0(t));const r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Kne(e,t,n);if(Object.is(t==null?void 0:t.valueOf(),-0)?t="-0":t=String(t),Tv(t))return n;const r=e[t];return r===void 0?n:r}}}function Kne(e,t,n){if(t.length===0)return n;let r=e;for(let a=0;a<t.length;a++){if(r==null||Tv(t[a]))return n;r=r[t[a]]}return r===void 0?n:r}var Vne=4;function ao(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Vne,n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function ar(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((a,s,o)=>{var u=n[o-1];return typeof u=="string"?a+u+s:u!==void 0?a+ao(u)+s:a+s},"")}var Wr=e=>e===0?0:e>0?1:-1,Ni=e=>typeof e=="number"&&e!=+e,hl=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,qe=e=>(typeof e=="number"||e instanceof Number)&&!Ni(e),Ti=e=>qe(e)||typeof e=="string",Wne=0,of=e=>{var t=++Wne;return"".concat(e||"").concat(t)},Za=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!qe(t)&&typeof t!="string")return r;var s;if(hl(t)){if(n==null)return r;var o=t.indexOf("%");s=n*parseFloat(t.slice(0,o))/100}else s=+t;return Ni(s)&&(s=r),a&&n!=null&&s>n&&(s=n),s},t4=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function pr(e,t,n){return qe(e)&&qe(t)?ao(e+n*(t-e)):t}function Xne(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):ls(r,t))===n)}var Ln=e=>e===null||typeof e>"u",lE=e=>Ln(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Xr(e){return e!=null}function sc(){}function uE(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function bC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function di(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bC(Object(n),!0).forEach(function(r){Qne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qne(e,t,n){return(t=Zne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zne(e){var t=Jne(e,"string");return typeof t=="symbol"?t:t+""}function Jne(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ere=e=>{var t=e.viewBox,n=e.position,r=e.offset,a=r===void 0?0:r,s=e.parentViewBox,o=uE(t),u=o.x,d=o.y,f=o.height,m=o.upperWidth,p=o.lowerWidth,b=u,x=u+(m-p)/2,E=(b+x)/2,_=(m+p)/2,S=b+m/2,T=f>=0?1:-1,C=T*a,A=T>0?"end":"start",k=T>0?"start":"end",I=m>=0?1:-1,O=I*a,j=I>0?"end":"start",H=I>0?"start":"end",z=s;if(n==="top"){var D={x:b+m/2,y:d-C,horizontalAnchor:"middle",verticalAnchor:A};return z&&(D.height=Math.max(d-z.y,0),D.width=m),D}if(n==="bottom"){var V={x:x+p/2,y:d+f+C,horizontalAnchor:"middle",verticalAnchor:k};return z&&(V.height=Math.max(z.y+z.height-(d+f),0),V.width=p),V}if(n==="left"){var q={x:E-O,y:d+f/2,horizontalAnchor:j,verticalAnchor:"middle"};return z&&(q.width=Math.max(q.x-z.x,0),q.height=f),q}if(n==="right"){var ae={x:E+_+O,y:d+f/2,horizontalAnchor:H,verticalAnchor:"middle"};return z&&(ae.width=Math.max(z.x+z.width-ae.x,0),ae.height=f),ae}var Q=z?{width:_,height:f}:{};return n==="insideLeft"?di({x:E+O,y:d+f/2,horizontalAnchor:H,verticalAnchor:"middle"},Q):n==="insideRight"?di({x:E+_-O,y:d+f/2,horizontalAnchor:j,verticalAnchor:"middle"},Q):n==="insideTop"?di({x:b+m/2,y:d+C,horizontalAnchor:"middle",verticalAnchor:k},Q):n==="insideBottom"?di({x:x+p/2,y:d+f-C,horizontalAnchor:"middle",verticalAnchor:A},Q):n==="insideTopLeft"?di({x:b+O,y:d+C,horizontalAnchor:H,verticalAnchor:k},Q):n==="insideTopRight"?di({x:b+m-O,y:d+C,horizontalAnchor:j,verticalAnchor:k},Q):n==="insideBottomLeft"?di({x:x+O,y:d+f-C,horizontalAnchor:H,verticalAnchor:A},Q):n==="insideBottomRight"?di({x:x+p-O,y:d+f-C,horizontalAnchor:j,verticalAnchor:A},Q):n&&typeof n=="object"&&(qe(n.x)||hl(n.x))&&(qe(n.y)||hl(n.y))?di({x:u+Za(n.x,_),y:d+Za(n.y,f),horizontalAnchor:"end",verticalAnchor:"end"},Q):di({x:S,y:d+f/2,horizontalAnchor:"middle",verticalAnchor:"middle"},Q)},tre=["top","left","right","bottom"];function nre(e){return e==null?!1:typeof e=="object"?!0:tre.includes(e)}var rre=v.createContext(null);function mn(e){return function(){return e}}const Sv=Math.PI,wv=2*Sv,Go=1e-6,are=wv-Go;function n4(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function ire(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return n4;const n=10**t;return function(r){this._+=r[0];for(let a=1,s=r.length;a<s;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class sre{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?n4:ire(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,a){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+a}`}bezierCurveTo(t,n,r,a,s,o){this._append`C${+t},${+n},${+r},${+a},${this._x1=+s},${this._y1=+o}`}arcTo(t,n,r,a,s){if(t=+t,n=+n,r=+r,a=+a,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,u=this._y1,d=r-t,f=a-n,m=o-t,p=u-n,b=m*m+p*p;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(b>Go)if(!(Math.abs(p*d-f*m)>Go)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let x=r-o,E=a-u,_=d*d+f*f,S=x*x+E*E,T=Math.sqrt(_),C=Math.sqrt(b),A=s*Math.tan((Sv-Math.acos((_+b-S)/(2*T*C)))/2),k=A/C,I=A/T;Math.abs(k-1)>Go&&this._append`L${t+k*m},${n+k*p}`,this._append`A${s},${s},0,0,${+(p*x>m*E)},${this._x1=t+I*d},${this._y1=n+I*f}`}}arc(t,n,r,a,s,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(a),d=r*Math.sin(a),f=t+u,m=n+d,p=1^o,b=o?a-s:s-a;this._x1===null?this._append`M${f},${m}`:(Math.abs(this._x1-f)>Go||Math.abs(this._y1-m)>Go)&&this._append`L${f},${m}`,r&&(b<0&&(b=b%wv+wv),b>are?this._append`A${r},${r},0,1,${p},${t-u},${n-d}A${r},${r},0,1,${p},${this._x1=f},${this._y1=m}`:b>Go&&this._append`A${r},${r},0,${+(b>=Sv)},${p},${this._x1=t+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function r4(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new sre(t)}function cE(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function a4(e){this._context=e}a4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function I0(e){return new a4(e)}function i4(e){return e[0]}function s4(e){return e[1]}function o4(e,t){var n=mn(!0),r=null,a=I0,s=null,o=r4(u);e=typeof e=="function"?e:e===void 0?i4:mn(e),t=typeof t=="function"?t:t===void 0?s4:mn(t);function u(d){var f,m=(d=cE(d)).length,p,b=!1,x;for(r==null&&(s=a(x=o())),f=0;f<=m;++f)!(f<m&&n(p=d[f],f,d))===b&&((b=!b)?s.lineStart():s.lineEnd()),b&&s.point(+e(p,f,d),+t(p,f,d));if(x)return s=null,x+""||null}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:mn(+d),u):e},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:mn(+d),u):t},u.defined=function(d){return arguments.length?(n=typeof d=="function"?d:mn(!!d),u):n},u.curve=function(d){return arguments.length?(a=d,r!=null&&(s=a(r)),u):a},u.context=function(d){return arguments.length?(d==null?r=s=null:s=a(r=d),u):r},u}function wm(e,t,n){var r=null,a=mn(!0),s=null,o=I0,u=null,d=r4(f);e=typeof e=="function"?e:e===void 0?i4:mn(+e),t=typeof t=="function"?t:mn(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?s4:mn(+n);function f(p){var b,x,E,_=(p=cE(p)).length,S,T=!1,C,A=new Array(_),k=new Array(_);for(s==null&&(u=o(C=d())),b=0;b<=_;++b){if(!(b<_&&a(S=p[b],b,p))===T)if(T=!T)x=b,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),E=b-1;E>=x;--E)u.point(A[E],k[E]);u.lineEnd(),u.areaEnd()}T&&(A[b]=+e(S,b,p),k[b]=+t(S,b,p),u.point(r?+r(S,b,p):A[b],n?+n(S,b,p):k[b]))}if(C)return u=null,C+""||null}function m(){return o4().defined(a).curve(o).context(s)}return f.x=function(p){return arguments.length?(e=typeof p=="function"?p:mn(+p),r=null,f):e},f.x0=function(p){return arguments.length?(e=typeof p=="function"?p:mn(+p),f):e},f.x1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:mn(+p),f):r},f.y=function(p){return arguments.length?(t=typeof p=="function"?p:mn(+p),n=null,f):t},f.y0=function(p){return arguments.length?(t=typeof p=="function"?p:mn(+p),f):t},f.y1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:mn(+p),f):n},f.lineX0=f.lineY0=function(){return m().x(e).y(t)},f.lineY1=function(){return m().x(e).y(n)},f.lineX1=function(){return m().x(r).y(t)},f.defined=function(p){return arguments.length?(a=typeof p=="function"?p:mn(!!p),f):a},f.curve=function(p){return arguments.length?(o=p,s!=null&&(u=o(s)),f):o},f.context=function(p){return arguments.length?(p==null?s=u=null:u=o(s=p),f):s},f}class l4{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function ore(e){return new l4(e,!0)}function lre(e){return new l4(e,!1)}function Ep(){}function _p(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function u4(e){this._context=e}u4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:_p(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:_p(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ure(e){return new u4(e)}function c4(e){this._context=e}c4.prototype={areaStart:Ep,areaEnd:Ep,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:_p(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cre(e){return new c4(e)}function d4(e){this._context=e}d4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:_p(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dre(e){return new d4(e)}function f4(e){this._context=e}f4.prototype={areaStart:Ep,areaEnd:Ep,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function fre(e){return new f4(e)}function xC(e){return e<0?-1:1}function yC(e,t,n){var r=e._x1-e._x0,a=t-e._x1,s=(e._y1-e._y0)/(r||a<0&&-0),o=(n-e._y1)/(a||r<0&&-0),u=(s*a+o*r)/(r+a);return(xC(s)+xC(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(u))||0}function vC(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function fy(e,t,n){var r=e._x0,a=e._y0,s=e._x1,o=e._y1,u=(s-r)/3;e._context.bezierCurveTo(r+u,a+u*t,s-u,o-u*n,s,o)}function Np(e){this._context=e}Np.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:fy(this,this._t0,vC(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,fy(this,vC(this,n=yC(this,e,t)),n);break;default:fy(this,this._t0,n=yC(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function h4(e){this._context=new m4(e)}(h4.prototype=Object.create(Np.prototype)).point=function(e,t){Np.prototype.point.call(this,t,e)};function m4(e){this._context=e}m4.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,s){this._context.bezierCurveTo(t,e,r,n,s,a)}};function hre(e){return new Np(e)}function mre(e){return new h4(e)}function p4(e){this._context=e}p4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=EC(e),a=EC(t),s=0,o=1;o<n;++s,++o)this._context.bezierCurveTo(r[0][s],a[0][s],r[1][s],a[1][s],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function EC(e){var t,n=e.length-1,r,a=new Array(n),s=new Array(n),o=new Array(n);for(a[0]=0,s[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,s[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,s[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/s[t-1],s[t]-=r,o[t]-=r*o[t-1];for(a[n-1]=o[n-1]/s[n-1],t=n-2;t>=0;--t)a[t]=(o[t]-a[t+1])/s[t];for(s[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)s[t]=2*e[t+1]-a[t+1];return[a,s]}function pre(e){return new p4(e)}function R0(e,t){this._context=e,this._t=t}R0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function gre(e){return new R0(e,.5)}function bre(e){return new R0(e,0)}function xre(e){return new R0(e,1)}function ml(e,t){if((o=e.length)>1)for(var n=1,r,a,s=e[t[0]],o,u=s.length;n<o;++n)for(a=s,s=e[t[n]],r=0;r<u;++r)s[r][1]+=s[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function Av(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function yre(e,t){return e[t]}function vre(e){const t=[];return t.key=e,t}function Ere(){var e=mn([]),t=Av,n=ml,r=yre;function a(s){var o=Array.from(e.apply(this,arguments),vre),u,d=o.length,f=-1,m;for(const p of s)for(u=0,++f;u<d;++u)(o[u][f]=[0,+r(p,o[u].key,f,s)]).data=p;for(u=0,m=cE(t(o));u<d;++u)o[m[u]].index=u;return n(o,m),o}return a.keys=function(s){return arguments.length?(e=typeof s=="function"?s:mn(Array.from(s)),a):e},a.value=function(s){return arguments.length?(r=typeof s=="function"?s:mn(+s),a):r},a.order=function(s){return arguments.length?(t=s==null?Av:typeof s=="function"?s:mn(Array.from(s)),a):t},a.offset=function(s){return arguments.length?(n=s??ml,a):n},a}function _re(e,t){if((r=e.length)>0){for(var n,r,a=0,s=e[0].length,o;a<s;++a){for(o=n=0;n<r;++n)o+=e[n][a][1]||0;if(o)for(n=0;n<r;++n)e[n][a][1]/=o}ml(e,t)}}function Nre(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,s=r.length;n<s;++n){for(var o=0,u=0;o<a;++o)u+=e[o][n][1]||0;r[n][1]+=r[n][0]=-u/2}ml(e,t)}}function Tre(e,t){if(!(!((o=e.length)>0)||!((s=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,s,o;r<s;++r){for(var u=0,d=0,f=0;u<o;++u){for(var m=e[t[u]],p=m[r][1]||0,b=m[r-1][1]||0,x=(p-b)/2,E=0;E<u;++E){var _=e[t[E]],S=_[r][1]||0,T=_[r-1][1]||0;x+=S-T}d+=p,f+=x*p}a[r-1][1]+=a[r-1][0]=n,d&&(n-=f/d)}a[r-1][1]+=a[r-1][0]=n,ml(e,t)}}var g4=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Sre=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(v.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(a=>{aE(a)&&typeof n[a]=="function"&&(r[a]=(s=>n[a](n,s)))}),r},wre=(e,t,n)=>r=>(e(t,n,r),null),dE=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(a=>{var s=e[a];aE(a)&&typeof s=="function"&&(r||(r={}),r[a]=wre(s,t,n))}),r};function _C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Are(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_C(Object(n),!0).forEach(function(r){Cre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_C(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cre(e,t,n){return(t=kre(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kre(e){var t=Ore(e,"string");return typeof t=="symbol"?t:t+""}function Ore(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ba(e,t){var n=Are({},e),r=t,a=Object.keys(t),s=a.reduce((o,u)=>(o[u]===void 0&&r[u]!==void 0&&(o[u]=r[u]),o),n);return s}function Ire(e,t){const n=new Map;for(let r=0;r<e.length;r++){const a=e[r],s=t(a,r,e);n.has(s)||n.set(s,a)}return Array.from(n.values())}function Rre(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function b4(e){return e}function Mre(e){return Number.isSafeInteger(e)&&e>=0}function fE(e){return e!=null&&typeof e!="function"&&Mre(e.length)}function Dre(e){return function(t){return ls(t,e)}}function x4(e){return e==null||typeof e!="object"&&typeof e!="function"}function jre(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Cv(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Fu(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const y4="[object RegExp]",hE="[object String]",mE="[object Number]",pE="[object Boolean]",v4="[object Arguments]",E4="[object Symbol]",_4="[object Date]",N4="[object Map]",T4="[object Set]",S4="[object Array]",Lre="[object Function]",w4="[object ArrayBuffer]",Xm="[object Object]",Pre="[object Error]",A4="[object DataView]",C4="[object Uint8Array]",k4="[object Uint8ClampedArray]",O4="[object Uint16Array]",I4="[object Uint32Array]",Bre="[object BigUint64Array]",R4="[object Int8Array]",M4="[object Int16Array]",D4="[object Int32Array]",Ure="[object BigInt64Array]",j4="[object Float32Array]",L4="[object Float64Array]",NC=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function kv(e){return typeof NC.Buffer<"u"&&NC.Buffer.isBuffer(e)}function zre(e,t){return Xo(e,void 0,e,new Map,t)}function Xo(e,t,n,r=new Map,a=void 0){const s=a==null?void 0:a(e,t,n,r);if(s!==void 0)return s;if(x4(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){const o=new Array(e.length);r.set(e,o);for(let u=0;u<e.length;u++)o[u]=Xo(e[u],u,n,r,a);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;r.set(e,o);for(const[u,d]of e)o.set(u,Xo(d,u,n,r,a));return o}if(e instanceof Set){const o=new Set;r.set(e,o);for(const u of e)o.add(Xo(u,void 0,n,r,a));return o}if(kv(e))return e.subarray();if(jre(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,o);for(let u=0;u<e.length;u++)o[u]=Xo(e[u],u,n,r,a);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,o),Ga(o,e,n,r,a),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return r.set(e,o),Ga(o,e,n,r,a),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return r.set(e,o),Ga(o,e,n,r,a),o}if(e instanceof Error){const o=structuredClone(e);return r.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,Ga(o,e,n,r,a),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return r.set(e,o),Ga(o,e,n,r,a),o}if(e instanceof Number){const o=new Number(e.valueOf());return r.set(e,o),Ga(o,e,n,r,a),o}if(e instanceof String){const o=new String(e.valueOf());return r.set(e,o),Ga(o,e,n,r,a),o}if(typeof e=="object"&&Fre(e)){const o=Object.create(Object.getPrototypeOf(e));return r.set(e,o),Ga(o,e,n,r,a),o}return e}function Ga(e,t,n=e,r,a){const s=[...Object.keys(t),...Cv(t)];for(let o=0;o<s.length;o++){const u=s[o],d=Object.getOwnPropertyDescriptor(e,u);(d==null||d.writable)&&(e[u]=Xo(t[u],u,n,r,a))}}function Fre(e){switch(Fu(e)){case v4:case S4:case w4:case A4:case pE:case _4:case j4:case L4:case R4:case M4:case D4:case N4:case mE:case Xm:case y4:case T4:case hE:case E4:case C4:case k4:case O4:case I4:return!0;default:return!1}}function Hre(e){return Xo(e,void 0,e,new Map,void 0)}function Gd(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function P4(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function B4(e,t,n){return typeof n!="function"?B4(e,t,()=>{}):Ov(e,t,function r(a,s,o,u,d,f){const m=n(a,s,o,u,d,f);return m!==void 0?!!m:Ov(a,s,r,f,!1)},new Map,!0)}function Ov(e,t,n,r,a=!1){if(t===e)return!0;switch(typeof t){case"object":return $re(e,t,n,r,a);case"function":return Object.keys(t).length>0?Ov(e,{...t},n,r,a):Gd(e,t);default:return P4(e)&&a?typeof t=="string"?t==="":!0:Gd(e,t)}}function $re(e,t,n,r,a=!1){if(t==null)return!0;if(Array.isArray(t))return U4(e,t,n,r);if(t instanceof Map)return Yre(e,t,n,r);if(t instanceof Set)return qre(e,t,n,r);const s=Object.keys(t);if(e==null)return a&&s.length===0;if(a)x4(e)&&(e=Object(e));else{const o=Fu(e);if(o!=="[object Object]"&&o!=="[object Arguments]")return!1}if(s.length===0)return!0;if(r!=null&&r.has(t))return r.get(t)===e;r==null||r.set(t,e);try{for(let o=0;o<s.length;o++){const u=s[o];if(!(u in e)||t[u]===void 0&&e[u]!==void 0||t[u]===null&&e[u]!==null||!n(e[u],t[u],u,e,t,r))return!1}return!0}finally{r==null||r.delete(t)}}function Yre(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(const[a,s]of t.entries())if(n(e.get(a),s,a,e,t,r)===!1)return!1;return!0}function U4(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;const a=new Set;for(let s=0;s<t.length;s++){const o=t[s];let u=!1;for(let d=0;d<e.length;d++){if(a.has(d))continue;const f=e[d];let m=!1;if(n(f,o,s,e,t,r)&&(m=!0),m){a.add(d),u=!0;break}}if(!u)return!1}return!0}function qre(e,t,n,r){return t.size===0?!0:e instanceof Set?U4([...e],[...t],n,r):!1}function z4(e,t){return B4(e,t,()=>{})}function Gre(e){return e=Hre(e),t=>z4(t,e)}function Kre(e,t){return zre(e,(n,r,a,s)=>{if(typeof e=="object"){if(Fu(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return s.set(e,o),Ga(o,e,a,s),o}switch(Object.prototype.toString.call(e)){case mE:case hE:case pE:{const o=new e.constructor(e==null?void 0:e.valueOf());return Ga(o,e),o}case v4:{const o={};return Ga(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function Vre(e){return Kre(e)}const Wre=/^(?:0|[1-9]\d*)$/;function F4(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return Wre.test(e)}}function Xre(e){return e!==null&&typeof e=="object"&&Fu(e)==="[object Arguments]"}function Qre(e,t){let n;if(Array.isArray(t)?n=t:typeof t=="string"&&JM(t)&&!(t in Object(e))?n=oE(t):n=[t],n.length===0)return!1;let r=e;for(let a=0;a<n.length;a++){const s=O0(n[a]);if((r==null||!Object.hasOwn(r,s))&&!((Array.isArray(r)||Xre(r))&&F4(s)&&Number(s)<r.length))return!1;r=r[s]}return!0}function Zre(e,t){switch(typeof e){case"object":Object.is(e==null?void 0:e.valueOf(),-0)&&(e="-0");break;case"number":e=O0(e);break}return t=Vre(t),function(n){const r=ls(n,e);return r===void 0?Qre(n,e):t===void 0?r===void 0:z4(r,t)}}function Jre(e){if(e==null)return b4;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?Zre(e[0],e[1]):Gre(e);default:return Dre(e)}}function eae(e){return e===0?0:e}function TC(e,t=b4){return fE(e)?Ire(Array.from(e),Rre(Jre(t),1)).map(eae):[]}function tae(e,t,n){return t===!0?TC(e,n):typeof t=="function"?TC(e,t):e}var hy={exports:{}},my={},py={exports:{}},gy={};/**
|
|
546
|
+
* @license React
|
|
547
|
+
* use-sync-external-store-shim.production.js
|
|
548
|
+
*
|
|
549
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
550
|
+
*
|
|
551
|
+
* This source code is licensed under the MIT license found in the
|
|
552
|
+
* LICENSE file in the root directory of this source tree.
|
|
553
|
+
*/var SC;function nae(){if(SC)return gy;SC=1;var e=Qu();function t(p,b){return p===b&&(p!==0||1/p===1/b)||p!==p&&b!==b}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function u(p,b){var x=b(),E=r({inst:{value:x,getSnapshot:b}}),_=E[0].inst,S=E[1];return s(function(){_.value=x,_.getSnapshot=b,d(_)&&S({inst:_})},[p,x,b]),a(function(){return d(_)&&S({inst:_}),p(function(){d(_)&&S({inst:_})})},[p]),o(x),x}function d(p){var b=p.getSnapshot;p=p.value;try{var x=b();return!n(p,x)}catch{return!0}}function f(p,b){return b()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return gy.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,gy}var wC;function rae(){return wC||(wC=1,py.exports=nae()),py.exports}/**
|
|
554
|
+
* @license React
|
|
555
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
556
|
+
*
|
|
557
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
558
|
+
*
|
|
559
|
+
* This source code is licensed under the MIT license found in the
|
|
560
|
+
* LICENSE file in the root directory of this source tree.
|
|
561
|
+
*/var AC;function aae(){if(AC)return my;AC=1;var e=Qu(),t=rae();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,s=e.useRef,o=e.useEffect,u=e.useMemo,d=e.useDebugValue;return my.useSyncExternalStoreWithSelector=function(f,m,p,b,x){var E=s(null);if(E.current===null){var _={hasValue:!1,value:null};E.current=_}else _=E.current;E=u(function(){function T(O){if(!C){if(C=!0,A=O,O=b(O),x!==void 0&&_.hasValue){var j=_.value;if(x(j,O))return k=j}return k=O}if(j=k,r(A,O))return j;var H=b(O);return x!==void 0&&x(j,H)?(A=O,j):(A=O,k=H)}var C=!1,A,k,I=p===void 0?null:p;return[function(){return T(m())},I===null?void 0:function(){return T(I())}]},[m,p,b,x]);var S=a(f,E[0],E[1]);return o(function(){_.hasValue=!0,_.value=S},[S]),d(S),S},my}var CC;function iae(){return CC||(CC=1,hy.exports=aae()),hy.exports}var sae=iae(),gE=v.createContext(null),oae=e=>e,on=()=>{var e=v.useContext(gE);return e?e.store.dispatch:oae},Qm=()=>{},lae=()=>Qm,uae=(e,t)=>e===t;function Ke(e){var t=v.useContext(gE),n=v.useMemo(()=>t?r=>{if(r!=null)return e(r)}:Qm,[t,e]);return sae.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:lae,t?t.store.getState:Qm,t?t.store.getState:Qm,n,uae)}function cae(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function dae(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var kC=e=>Array.isArray(e)?e:[e];function fae(e){const t=Array.isArray(e[0])?e[0]:e;return dae(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function hae(e,t){const n=[],{length:r}=e;for(let a=0;a<r;a++)n.push(e[a].apply(null,t));return n}var mae=class{constructor(e){this.value=e}deref(){return this.value}},pae=()=>typeof WeakRef>"u"?mae:WeakRef,H4=pae(),gae=0,OC=1;function Am(){return{s:gae,v:void 0,o:null,p:null}}function bae(e){return e instanceof H4?e.deref():e}function $4(e,t={}){let n=Am();const{resultEqualityCheck:r}=t;let a,s=0;function o(){let u=n;const{length:d}=arguments;for(let p=0,b=d;p<b;p++){const x=arguments[p];if(typeof x=="function"||typeof x=="object"&&x!==null){let E=u.o;E===null&&(u.o=E=new WeakMap);const _=E.get(x);_===void 0?(u=Am(),E.set(x,u)):u=_}else{let E=u.p;E===null&&(u.p=E=new Map);const _=E.get(x);_===void 0?(u=Am(),E.set(x,u)):u=_}}const f=u;let m;if(u.s===OC)m=u.v;else if(m=e.apply(null,arguments),s++,r){const p=bae(a);p!=null&&r(p,m)&&(m=p,s!==0&&s--),a=typeof m=="object"&&m!==null||typeof m=="function"?new H4(m):m}return f.s=OC,f.v=m,m}return o.clearCache=()=>{n=Am(),o.resetResultsCount()},o.resultsCount=()=>s,o.resetResultsCount=()=>{s=0},o}function xae(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...a)=>{let s=0,o=0,u,d={},f=a.pop();typeof f=="object"&&(d=f,f=a.pop()),cae(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const m={...n,...d},{memoize:p,memoizeOptions:b=[],argsMemoize:x=$4,argsMemoizeOptions:E=[]}=m,_=kC(b),S=kC(E),T=fae(a),C=p(function(){return s++,f.apply(null,arguments)},..._),A=x(function(){o++;const I=hae(T,arguments);return u=C.apply(null,I),u},...S);return Object.assign(A,{resultFunc:f,memoizedResultFunc:C,dependencies:T,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>u,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:p,argsMemoize:x})};return Object.assign(r,{withTypes:()=>r}),r}var ue=xae($4);function yae(e,t=1){const n=[],r=Math.floor(t),a=(s,o)=>{for(let u=0;u<s.length;u++){const d=s[u];Array.isArray(d)&&o<r?a(d,o+1):n.push(d)}};return a(e,0),n}function Iv(e,t,n){return P4(n)&&(typeof t=="number"&&fE(n)&&F4(t)&&t<n.length||typeof t=="string"&&t in n)?Gd(n[t],e):!1}function IC(e){return typeof e=="symbol"?1:e===null?2:e===void 0?3:e!==e?4:0}const vae=(e,t,n)=>{if(e!==t){const r=IC(e),a=IC(t);if(r===a&&r===0){if(e<t)return n==="desc"?1:-1;if(e>t)return n==="desc"?-1:1}return n==="desc"?a-r:r-a}return 0},Eae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_ae=/^\w*$/;function Nae(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||sE(e)?!0:typeof e=="string"&&(_ae.test(e)||!Eae.test(e))||t!=null}function Tae(e,t,n,r){if(e==null)return[];n=n,Array.isArray(e)||(e=fE(e)?Array.from(e):Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(u=>String(u));const a=(u,d)=>{let f=u,m=0;for(;m<d.length&&f!=null;++m)f=f[d[m]];return m>0&&m===d.length?f:void 0},s=(u,d)=>{if(u==null)return d;if(d!=null)return typeof u=="object"&&"key"in u?Object.hasOwn(d,u.key)?d[u.key]:a(d,u.path):typeof u=="function"?u(d):Array.isArray(u)?a(d,u):d[u]},o=t.map(u=>(Array.isArray(u)&&u.length===1&&(u=u[0]),u==null||typeof u=="function"||Array.isArray(u)||Nae(u)?u:{key:u,path:oE(u)}));return e.map(u=>({original:u,criteria:o.map(d=>s(d,u))})).slice().sort((u,d)=>{for(let f=0;f<o.length;f++){const m=vae(u.criteria[f],d.criteria[f],n[f]);if(m!==0)return m}return 0}).map(u=>u.original)}function M0(e,...t){const n=t.length;return n>1&&Iv(e,t[0],t[1])?t=[]:n>2&&Iv(t[0],t[1],t[2])&&(t=[t[0]]),Tae(e,yae(t),["asc"])}var Y4=e=>e.legend.settings,Sae=e=>e.legend.size,wae=e=>e.legend.payload;ue([wae,Y4],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?M0(r,n):r});function Aae(e,t){return Iae(e)||Oae(e,t)||kae(e,t)||Cae()}function Cae(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
562
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kae(e,t){if(e){if(typeof e=="string")return RC(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?RC(e,t):void 0}}function RC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Oae(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function Iae(e){if(Array.isArray(e))return e}var Cm=1;function MC(e,t){return Math.abs(e.height-t.height)>Cm||Math.abs(e.left-t.left)>Cm||Math.abs(e.top-t.top)>Cm||Math.abs(e.width-t.width)>Cm}function DC(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function Rae(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=v.useState({height:0,left:0,top:0,width:0}),n=Aae(t,2),r=n[0],a=n[1],s=v.useRef(null),o=v.useRef(r);o.current=r;var u=v.useCallback(d=>{if(s.current!=null&&(s.current.disconnect(),s.current=null),d!=null){var f=DC(d);if(MC(f,o.current)&&a(f),typeof ResizeObserver<"u"){var m=new ResizeObserver(()=>{var p=DC(d);MC(p,o.current)&&a(p)});m.observe(d),s.current=m}}},[...e]);return v.useEffect(()=>()=>{var d;(d=s.current)===null||d===void 0||d.disconnect()},[]),[r,u]}function rr(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Mae=typeof Symbol=="function"&&Symbol.observable||"@@observable",jC=Mae,by=()=>Math.random().toString(36).substring(7).split("").join("."),Dae={INIT:`@@redux/INIT${by()}`,REPLACE:`@@redux/REPLACE${by()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${by()}`},Tp=Dae;function bE(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function q4(e,t,n){if(typeof e!="function")throw new Error(rr(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(rr(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(rr(1));return n(q4)(e,t)}let r=e,a=t,s=new Map,o=s,u=0,d=!1;function f(){o===s&&(o=new Map,s.forEach((S,T)=>{o.set(T,S)}))}function m(){if(d)throw new Error(rr(3));return a}function p(S){if(typeof S!="function")throw new Error(rr(4));if(d)throw new Error(rr(5));let T=!0;f();const C=u++;return o.set(C,S),function(){if(T){if(d)throw new Error(rr(6));T=!1,f(),o.delete(C),s=null}}}function b(S){if(!bE(S))throw new Error(rr(7));if(typeof S.type>"u")throw new Error(rr(8));if(typeof S.type!="string")throw new Error(rr(17));if(d)throw new Error(rr(9));try{d=!0,a=r(a,S)}finally{d=!1}return(s=o).forEach(C=>{C()}),S}function x(S){if(typeof S!="function")throw new Error(rr(10));r=S,b({type:Tp.REPLACE})}function E(){const S=p;return{subscribe(T){if(typeof T!="object"||T===null)throw new Error(rr(11));function C(){const k=T;k.next&&k.next(m())}return C(),{unsubscribe:S(C)}},[jC](){return this}}}return b({type:Tp.INIT}),{dispatch:b,subscribe:p,getState:m,replaceReducer:x,[jC]:E}}function jae(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Tp.INIT})>"u")throw new Error(rr(12));if(typeof n(void 0,{type:Tp.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(rr(13))})}function G4(e){const t=Object.keys(e),n={};for(let s=0;s<t.length;s++){const o=t[s];typeof e[o]=="function"&&(n[o]=e[o])}const r=Object.keys(n);let a;try{jae(n)}catch(s){a=s}return function(o={},u){if(a)throw a;let d=!1;const f={};for(let m=0;m<r.length;m++){const p=r[m],b=n[p],x=o[p],E=b(x,u);if(typeof E>"u")throw u&&u.type,new Error(rr(14));f[p]=E,d=d||E!==x}return d=d||r.length!==Object.keys(o).length,d?f:o}}function Sp(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Lae(...e){return t=>(n,r)=>{const a=t(n,r);let s=()=>{throw new Error(rr(15))};const o={getState:a.getState,dispatch:(d,...f)=>s(d,...f)},u=e.map(d=>d(o));return s=Sp(...u)(a.dispatch),{...a,dispatch:s}}}function K4(e){return bE(e)&&"type"in e&&typeof e.type=="string"}var V4=Symbol.for("immer-nothing"),LC=Symbol.for("immer-draftable"),vr=Symbol.for("immer-state");function Va(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ha=Object,Hu=ha.getPrototypeOf,wp="constructor",D0="prototype",Rv="configurable",Ap="enumerable",Zm="writable",lf="value",us=e=>!!e&&!!e[vr];function ja(e){var t;return e?W4(e)||L0(e)||!!e[LC]||!!((t=e[wp])!=null&&t[LC])||P0(e)||B0(e):!1}var Pae=ha[D0][wp].toString(),PC=new WeakMap;function W4(e){if(!e||!xE(e))return!1;const t=Hu(e);if(t===null||t===ha[D0])return!0;const n=ha.hasOwnProperty.call(t,wp)&&t[wp];if(n===Object)return!0;if(!wu(n))return!1;let r=PC.get(n);return r===void 0&&(r=Function.toString.call(n),PC.set(n,r)),r===Pae}function j0(e,t,n=!0){Lf(e)===0?(n?Reflect.ownKeys(e):ha.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((r,a)=>t(a,r,e))}function Lf(e){const t=e[vr];return t?t.type_:L0(e)?1:P0(e)?2:B0(e)?3:0}var xy=(e,t,n=Lf(e))=>n===2?e.has(t):ha[D0].hasOwnProperty.call(e,t),Mv=(e,t,n=Lf(e))=>n===2?e.get(t):e[t],Cp=(e,t,n,r=Lf(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Bae(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var L0=Array.isArray,P0=e=>e instanceof Map,B0=e=>e instanceof Set,xE=e=>typeof e=="object",wu=e=>typeof e=="function",yy=e=>typeof e=="boolean";function Uae(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Xi=e=>e.copy_||e.base_,yE=e=>e.modified_?e.copy_:e.base_;function Dv(e,t){if(P0(e))return new Map(e);if(B0(e))return new Set(e);if(L0(e))return Array[D0].slice.call(e);const n=W4(e);if(t===!0||t==="class_only"&&!n){const r=ha.getOwnPropertyDescriptors(e);delete r[vr];let a=Reflect.ownKeys(r);for(let s=0;s<a.length;s++){const o=a[s],u=r[o];u[Zm]===!1&&(u[Zm]=!0,u[Rv]=!0),(u.get||u.set)&&(r[o]={[Rv]:!0,[Zm]:!0,[Ap]:u[Ap],[lf]:e[o]})}return ha.create(Hu(e),r)}else{const r=Hu(e);if(r!==null&&n)return{...e};const a=ha.create(r);return ha.assign(a,e)}}function vE(e,t=!1){return U0(e)||us(e)||!ja(e)||(Lf(e)>1&&ha.defineProperties(e,{set:km,add:km,clear:km,delete:km}),ha.freeze(e),t&&j0(e,(n,r)=>{vE(r,!0)},!1)),e}function zae(){Va(2)}var km={[lf]:zae};function U0(e){return e===null||!xE(e)?!0:ha.isFrozen(e)}var kp="MapSet",jv="Patches",BC="ArrayMethods",X4={};function pl(e){const t=X4[e];return t||Va(0,e),t}var UC=e=>!!X4[e],uf,Q4=()=>uf,Fae=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:UC(kp)?pl(kp):void 0,arrayMethodsPlugin_:UC(BC)?pl(BC):void 0});function zC(e,t){t&&(e.patchPlugin_=pl(jv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Lv(e){Pv(e),e.drafts_.forEach(Hae),e.drafts_=null}function Pv(e){e===uf&&(uf=e.parent_)}var FC=e=>uf=Fae(uf,e);function Hae(e){const t=e[vr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function HC(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[vr].modified_&&(Lv(t),Va(4)),ja(e)&&(e=$C(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(n[vr].base_,e,t)}else e=$C(t,n);return $ae(t,e,!0),Lv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==V4?e:void 0}function $C(e,t){if(U0(t))return t;const n=t[vr];if(!n)return Op(t,e.handledSet_,e);if(!z0(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);eD(n,e)}return n.copy_}function $ae(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&vE(t,n)}function Z4(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var z0=(e,t)=>e.scope_===t,Yae=[];function J4(e,t,n,r){const a=Xi(e),s=e.type_;if(r!==void 0&&Mv(a,r,s)===t){Cp(a,r,n,s);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;j0(a,(d,f)=>{if(us(f)){const m=u.get(f)||[];m.push(d),u.set(f,m)}})}const o=e.draftLocations_.get(t)??Yae;for(const u of o)Cp(a,u,n,s)}function qae(e,t,n){e.callbacks_.push(function(a){var u;const s=t;if(!s||!z0(s,a))return;(u=a.mapSetPlugin_)==null||u.fixSetContents(s);const o=yE(s);J4(e,s.draft_??s,o,n),eD(s,a)})}function eD(e,t){var r;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((r=e.assigned_)==null?void 0:r.size)??0)>0)){const{patchPlugin_:a}=t;if(a){const s=a.getPath(e);s&&a.generatePatches_(e,s,t)}Z4(e)}}function Gae(e,t,n){const{scope_:r}=e;if(us(n)){const a=n[vr];z0(a,r)&&a.callbacks_.push(function(){Jm(e);const o=yE(a);J4(e,n,o,t)})}else ja(n)&&e.callbacks_.push(function(){const s=Xi(e);e.type_===3?s.has(n)&&Op(n,r.handledSet_,r):Mv(s,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Op(Mv(e.copy_,t,e.type_),r.handledSet_,r)})}function Op(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||us(e)||t.has(e)||!ja(e)||U0(e)||(t.add(e),j0(e,(r,a)=>{if(us(a)){const s=a[vr];if(z0(s,n)){const o=yE(s);Cp(e,r,o,e.type_),Z4(s)}}else ja(a)&&Op(a,t,n)})),e}function Kae(e,t){const n=L0(e),r={type_:n?1:0,scope_:t?t.scope_:Q4(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=r,s=Ip;n&&(a=[r],s=cf);const{revoke:o,proxy:u}=Proxy.revocable(a,s);return r.draft_=u,r.revoke_=o,[u,r]}var Ip={get(e,t){if(t===vr)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n!=null&&n.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const a=Xi(e);if(!xy(a,t,e.type_))return Wae(e,a,t);const s=a[t];if(e.finalized_||!ja(s)||r&&e.operationMethod&&(n!=null&&n.isMutatingArrayMethod(e.operationMethod))&&Uae(t))return s;if(s===vy(e.base_,t)||Vae(e,t,s)){Jm(e);const o=e.type_===1?+t:t,u=Uv(e.scope_,s,e,o);return e.copy_[o]=u}return s},has(e,t){return t in Xi(e)},ownKeys(e){return Reflect.ownKeys(Xi(e))},set(e,t,n){const r=tD(Xi(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const a=vy(Xi(e),t),s=a==null?void 0:a[vr];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Bae(n,a)&&(n!==void 0||xy(e.base_,t,e.type_)))return!0;Jm(e),Bv(e)}return e.copy_[t]===n&&(n!==void 0||xy(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),Gae(e,t,n)),!0},deleteProperty(e,t){return Jm(e),vy(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Bv(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Xi(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Zm]:!0,[Rv]:e.type_!==1||t!=="length",[Ap]:r[Ap],[lf]:n[t]}},defineProperty(){Va(11)},getPrototypeOf(e){return Hu(e.base_)},setPrototypeOf(){Va(12)}},cf={};for(let e in Ip){let t=Ip[e];cf[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}cf.deleteProperty=function(e,t){return cf.set.call(this,e,t,void 0)};cf.set=function(e,t,n){return Ip.set.call(this,e[0],t,n,e[0])};function vy(e,t){const n=e[vr];return(n?Xi(n):e)[t]}function Vae(e,t,n){var r;return e.type_!==1||!e.allIndicesReassigned_||(r=e.assigned_)!=null&&r.get(t)||!ja(n)||n[vr]?!1:e.baseRefs_.has(n)}function Wae(e,t,n){var a;const r=tD(t,n);return r?lf in r?r[lf]:(a=r.get)==null?void 0:a.call(e.draft_):void 0}function tD(e,t){if(!(t in e))return;let n=Hu(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Hu(n)}}function Bv(e){e.modified_||(e.modified_=!0,e.parent_&&Bv(e.parent_))}function Jm(e){e.copy_||(e.assigned_=new Map,e.copy_=Dv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Xae=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,r)=>{if(wu(t)&&!wu(n)){const s=n;n=t;const o=this;return function(d=s,...f){return o.produce(d,m=>n.call(this,m,...f))}}wu(n)||Va(6),r!==void 0&&!wu(r)&&Va(7);let a;if(ja(t)){const s=FC(this),o=Uv(s,t,void 0);let u=!0;try{a=n(o),u=!1}finally{u?Lv(s):Pv(s)}return zC(s,r),HC(a,s)}else if(!t||!xE(t)){if(a=n(t),a===void 0&&(a=t),a===V4&&(a=void 0),this.autoFreeze_&&vE(a,!0),r){const s=[],o=[];pl(jv).generateReplacementPatches_(t,a,{patches_:s,inversePatches_:o}),r(s,o)}return a}else Va(1,t)},this.produceWithPatches=(t,n)=>{if(wu(t))return(o,...u)=>this.produceWithPatches(o,d=>t(d,...u));let r,a;return[this.produce(t,n,(o,u)=>{r=o,a=u}),r,a]},yy(e==null?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),yy(e==null?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),yy(e==null?void 0:e.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ja(e)||Va(8),us(e)&&(e=Ia(e));const t=FC(this),n=Uv(t,e,void 0);return n[vr].isManual_=!0,Pv(t),n}finishDraft(e,t){const n=e&&e[vr];(!n||!n.isManual_)&&Va(9);const{scope_:r}=n;return zC(r,t),HC(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const a=t[n];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}n>-1&&(t=t.slice(n+1));const r=pl(jv).applyPatches_;return us(e)?r(e,t):this.produce(e,a=>r(a,t))}};function Uv(e,t,n,r){const[a,s]=P0(t)?pl(kp).proxyMap_(t,n):B0(t)?pl(kp).proxySet_(t,n):Kae(t,n);return((n==null?void 0:n.scope_)??Q4()).drafts_.push(a),s.callbacks_=(n==null?void 0:n.callbacks_)??[],s.key_=r,n&&r!==void 0?qae(n,s,r):s.callbacks_.push(function(d){var m;(m=d.mapSetPlugin_)==null||m.fixSetContents(s);const{patchPlugin_:f}=d;s.modified_&&f&&f.generatePatches_(s,[],d)}),a}function Ia(e){return us(e)||Va(10,e),nD(e)}function nD(e){if(!ja(e)||U0(e))return e;const t=e[vr];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Dv(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Dv(e,!0);return j0(n,(a,s)=>{Cp(n,a,nD(s))},r),t&&(t.finalized_=!1),n}var Ey=globalThis.Iterator;Ey==null||Ey.from;var Qae=new Xae,rD=Qae.produce,Ct=e=>e;function aD(e){return({dispatch:n,getState:r})=>a=>s=>typeof s=="function"?s(n,r,e):a(s)}var Zae=aD(),Jae=aD,eie=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Sp:Sp.apply(null,arguments)};function ba(e,t){function n(...r){if(t){let a=t(...r);if(!a)throw new Error(ga(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>K4(r)&&r.type===e,n}var iD=class Dd extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Dd.prototype)}static get[Symbol.species](){return Dd}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Dd(...t[0].concat(this)):new Dd(...t.concat(this))}};function YC(e){return ja(e)?rD(e,()=>{}):e}function Om(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function tie(e){return typeof e=="boolean"}var nie=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:a=!0,actionCreatorCheck:s=!0}=t??{};let o=new iD;return n&&(tie(n)?o.push(Zae):o.push(Jae(n.extraArgument))),o},sD="RTK_autoBatch",Jt=()=>e=>({payload:e,meta:{[sD]:!0}}),qC=e=>t=>{setTimeout(t,e)},rie=(e,t)=>n=>{let r=!1;const a=()=>{r||(r=!0,cancelAnimationFrame(s),clearTimeout(o),n())},s=e(a),o=setTimeout(a,t)},oD=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let a=!0,s=!1,o=!1;const u=new Set,d=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?rie(window.requestAnimationFrame,100):qC(10):e.type==="callback"?e.queueNotification:qC(e.timeout),f=()=>{o=!1,s&&(s=!1,u.forEach(m=>m()))};return Object.assign({},r,{subscribe(m){const p=()=>a&&m(),b=r.subscribe(p);return u.add(m),()=>{b(),u.delete(m)}},dispatch(m){var p;try{return a=!((p=m==null?void 0:m.meta)!=null&&p[sD]),s=!a,s&&(o||(o=!0,d(f))),r.dispatch(m)}finally{a=!0}}})},aie=e=>function(n){const{autoBatch:r=!0}=n??{};let a=new iD(e);return r&&a.push(oD(typeof r=="object"?r:void 0)),a};function iie(e){const t=nie(),{reducer:n=void 0,middleware:r,devTools:a=!0,preloadedState:s=void 0,enhancers:o=void 0}=e||{};let u;if(typeof n=="function")u=n;else if(bE(n))u=G4(n);else throw new Error(ga(1));let d;typeof r=="function"?d=r(t):d=t();let f=Sp;a&&(f=eie({trace:!1,...typeof a=="object"&&a}));const m=Lae(...d),p=aie(m);let b=typeof o=="function"?o(p):p();const x=f(...b);return q4(u,s,x)}function lD(e){const t={},n=[];let r;const a={addCase(s,o){const u=typeof s=="string"?s:s.type;if(!u)throw new Error(ga(28));if(u in t)throw new Error(ga(29));return t[u]=o,a},addAsyncThunk(s,o){return o.pending&&(t[s.pending.type]=o.pending),o.rejected&&(t[s.rejected.type]=o.rejected),o.fulfilled&&(t[s.fulfilled.type]=o.fulfilled),o.settled&&n.push({matcher:s.settled,reducer:o.settled}),a},addMatcher(s,o){return n.push({matcher:s,reducer:o}),a},addDefaultCase(s){return r=s,a}};return e(a),[t,n,r]}function sie(e){return typeof e=="function"}function oie(e,t){let[n,r,a]=lD(t),s;if(sie(e))s=()=>YC(e());else{const u=YC(e);s=()=>u}function o(u=s(),d){let f=[n[d.type],...r.filter(({matcher:m})=>m(d)).map(({reducer:m})=>m)];return f.filter(m=>!!m).length===0&&(f=[a]),f.reduce((m,p)=>{if(p)if(us(m)){const x=p(m,d);return x===void 0?m:x}else{if(ja(m))return rD(m,b=>p(b,d));{const b=p(m,d);if(b===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return b}}return m},u)}return o.getInitialState=s,o}var lie="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",uie=(e=21)=>{let t="",n=e;for(;n--;)t+=lie[Math.random()*64|0];return t},cie=Symbol.for("rtk-slice-createasyncthunk");function die(e,t){return`${e}/${t}`}function fie({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[cie];return function(a){const{name:s,reducerPath:o=s}=a;if(!s)throw new Error(ga(11));const u=(typeof a.reducers=="function"?a.reducers(mie()):a.reducers)||{},d=Object.keys(u),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(k,I){const O=typeof k=="string"?k:k.type;if(!O)throw new Error(ga(12));if(O in f.sliceCaseReducersByType)throw new Error(ga(13));return f.sliceCaseReducersByType[O]=I,m},addMatcher(k,I){return f.sliceMatchers.push({matcher:k,reducer:I}),m},exposeAction(k,I){return f.actionCreators[k]=I,m},exposeCaseReducer(k,I){return f.sliceCaseReducersByName[k]=I,m}};d.forEach(k=>{const I=u[k],O={reducerName:k,type:die(s,k),createNotation:typeof a.reducers=="function"};gie(I)?xie(O,I,m,t):pie(O,I,m)});function p(){const[k={},I=[],O=void 0]=typeof a.extraReducers=="function"?lD(a.extraReducers):[a.extraReducers],j={...k,...f.sliceCaseReducersByType};return oie(a.initialState,H=>{for(let z in j)H.addCase(z,j[z]);for(let z of f.sliceMatchers)H.addMatcher(z.matcher,z.reducer);for(let z of I)H.addMatcher(z.matcher,z.reducer);O&&H.addDefaultCase(O)})}const b=k=>k,x=new Map,E=new WeakMap;let _;function S(k,I){return _||(_=p()),_(k,I)}function T(){return _||(_=p()),_.getInitialState()}function C(k,I=!1){function O(H){let z=H[k];return typeof z>"u"&&I&&(z=Om(E,O,T)),z}function j(H=b){const z=Om(x,I,()=>new WeakMap);return Om(z,H,()=>{const D={};for(const[V,q]of Object.entries(a.selectors??{}))D[V]=hie(q,H,()=>Om(E,H,T),I);return D})}return{reducerPath:k,getSelectors:j,get selectors(){return j(O)},selectSlice:O}}const A={name:s,reducer:S,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:T,...C(o),injectInto(k,{reducerPath:I,...O}={}){const j=I??o;return k.inject({reducerPath:j,reducer:S},O),{...A,...C(j,!0)}}};return A}}function hie(e,t,n,r){function a(s,...o){let u=t(s);return typeof u>"u"&&r&&(u=n()),e(u,...o)}return a.unwrapped=e,a}var Nr=fie();function mie(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function pie({type:e,reducerName:t,createNotation:n},r,a){let s,o;if("reducer"in r){if(n&&!bie(r))throw new Error(ga(17));s=r.reducer,o=r.prepare}else s=r;a.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,o?ba(e,o):ba(e))}function gie(e){return e._reducerDefinitionType==="asyncThunk"}function bie(e){return e._reducerDefinitionType==="reducerWithPrepare"}function xie({type:e,reducerName:t},n,r,a){if(!a)throw new Error(ga(18));const{payloadCreator:s,fulfilled:o,pending:u,rejected:d,settled:f,options:m}=n,p=a(e,s,m);r.exposeAction(t,p),o&&r.addCase(p.fulfilled,o),u&&r.addCase(p.pending,u),d&&r.addCase(p.rejected,d),f&&r.addMatcher(p.settled,f),r.exposeCaseReducer(t,{fulfilled:o||Im,pending:u||Im,rejected:d||Im,settled:f||Im})}function Im(){}var yie="task",uD="listener",cD="completed",EE="cancelled",vie=`task-${EE}`,Eie=`task-${cD}`,zv=`${uD}-${EE}`,_ie=`${uD}-${cD}`,F0=class{constructor(e){un(this,"code");un(this,"name","TaskAbortError");un(this,"message");this.code=e,this.message=`${yie} ${EE} (reason: ${e})`}},_E=(e,t)=>{if(typeof e!="function")throw new TypeError(ga(32))},Rp=()=>{},dD=(e,t=Rp)=>(e.catch(t),e),fD=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),al=e=>{if(e.aborted)throw new F0(e.reason)};function hD(e,t){let n=Rp;return new Promise((r,a)=>{const s=()=>a(new F0(e.reason));if(e.aborted){s();return}n=fD(e,s),t.finally(()=>n()).then(r,a)}).finally(()=>{n=Rp})}var Nie=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof F0?"cancelled":"rejected",error:n}}finally{t==null||t()}},Mp=e=>t=>dD(hD(e,t).then(n=>(al(e),n))),mD=e=>{const t=Mp(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:Iu}=Object,GC={},H0="listenerMiddleware",Tie=(e,t)=>{const n=r=>fD(e,()=>r.abort(e.reason));return(r,a)=>{_E(r);const s=new AbortController;n(s);const o=Nie(async()=>{al(e),al(s.signal);const u=await r({pause:Mp(s.signal),delay:mD(s.signal),signal:s.signal});return al(s.signal),u},()=>s.abort(Eie));return a!=null&&a.autoJoin&&t.push(o.catch(Rp)),{result:Mp(e)(o),cancel(){s.abort(vie)}}}},Sie=(e,t)=>{const n=async(r,a)=>{al(t);let s=()=>{};const u=[new Promise((d,f)=>{let m=e({predicate:r,effect:(p,b)=>{b.unsubscribe(),d([p,b.getState(),b.getOriginalState()])}});s=()=>{m(),f()}})];a!=null&&u.push(new Promise(d=>setTimeout(d,a,null)));try{const d=await hD(t,Promise.race(u));return al(t),d}finally{s()}};return((r,a)=>dD(n(r,a)))},pD=e=>{let{type:t,actionCreator:n,matcher:r,predicate:a,effect:s}=e;if(t)a=ba(t).match;else if(n)t=n.type,a=n.match;else if(r)a=r;else if(!a)throw new Error(ga(21));return _E(s),{predicate:a,type:t,effect:s}},gD=Iu(e=>{const{type:t,predicate:n,effect:r}=pD(e);return{id:uie(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(ga(22))}}},{withTypes:()=>gD}),KC=(e,t)=>{const{type:n,effect:r,predicate:a}=pD(t);return Array.from(e.values()).find(s=>(typeof n=="string"?s.type===n:s.predicate===a)&&s.effect===r)},Fv=e=>{e.pending.forEach(t=>{t.abort(zv)})},wie=(e,t)=>()=>{for(const n of t.keys())Fv(n);e.clear()},VC=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},bD=Iu(ba(`${H0}/add`),{withTypes:()=>bD}),Aie=ba(`${H0}/removeAll`),xD=Iu(ba(`${H0}/remove`),{withTypes:()=>xD}),Cie=(...e)=>{console.error(`${H0}/error`,...e)},Pf=(e={})=>{const t=new Map,n=new Map,r=x=>{const E=n.get(x)??0;n.set(x,E+1)},a=x=>{const E=n.get(x)??1;E===1?n.delete(x):n.set(x,E-1)},{extra:s,onError:o=Cie}=e;_E(o);const u=x=>(x.unsubscribe=()=>t.delete(x.id),t.set(x.id,x),E=>{x.unsubscribe(),E!=null&&E.cancelActive&&Fv(x)}),d=(x=>{const E=KC(t,x)??gD(x);return u(E)});Iu(d,{withTypes:()=>d});const f=x=>{const E=KC(t,x);return E&&(E.unsubscribe(),x.cancelActive&&Fv(E)),!!E};Iu(f,{withTypes:()=>f});const m=async(x,E,_,S)=>{const T=new AbortController,C=Sie(d,T.signal),A=[];try{x.pending.add(T),r(x),await Promise.resolve(x.effect(E,Iu({},_,{getOriginalState:S,condition:(k,I)=>C(k,I).then(Boolean),take:C,delay:mD(T.signal),pause:Mp(T.signal),extra:s,signal:T.signal,fork:Tie(T.signal,A),unsubscribe:x.unsubscribe,subscribe:()=>{t.set(x.id,x)},cancelActiveListeners:()=>{x.pending.forEach((k,I,O)=>{k!==T&&(k.abort(zv),O.delete(k))})},cancel:()=>{T.abort(zv),x.pending.delete(T)},throwIfCancelled:()=>{al(T.signal)}})))}catch(k){k instanceof F0||VC(o,k,{raisedBy:"effect"})}finally{await Promise.all(A),T.abort(_ie),a(x),x.pending.delete(T)}},p=wie(t,n);return{middleware:x=>E=>_=>{if(!K4(_))return E(_);if(bD.match(_))return d(_.payload);if(Aie.match(_)){p();return}if(xD.match(_))return f(_.payload);let S=x.getState();const T=()=>{if(S===GC)throw new Error(ga(23));return S};let C;try{if(C=E(_),t.size>0){const A=x.getState(),k=Array.from(t.values());for(const I of k){let O=!1;try{O=I.predicate(_,A,S)}catch(j){O=!1,VC(o,j,{raisedBy:"predicate"})}O&&m(I,_,x,T)}}}finally{S=GC}return C},startListening:d,stopListening:f,clearListeners:p}};function ga(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var kie={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},yD=Nr({name:"chartLayout",initialState:kie,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,a,s;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(a=t.payload.bottom)!==null&&a!==void 0?a:0,e.margin.left=(s=t.payload.left)!==null&&s!==void 0?s:0},setScale(e,t){e.scale=t.payload}}}),$0=yD.actions,Oie=$0.setMargin,Iie=$0.setLayout,Rie=$0.setChartSize,Mie=$0.setScale,Die=yD.reducer;function vD(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function Nt(e){return Number.isFinite(e)}function Si(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function WC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Kr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WC(Object(n),!0).forEach(function(r){jie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jie(e,t,n){return(t=Lie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lie(e){var t=Pie(e,"string");return typeof t=="symbol"?t:t+""}function Pie(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gn(e,t,n){return Ln(e)||Ln(t)?n:Ti(t)?ls(e,t,n):typeof t=="function"?t(e):n}var Bie=(e,t,n)=>{if(t&&n){var r=n.width,a=n.height,s=t.align,o=t.verticalAlign,u=t.layout,d=t.position,f=t.offset,m=f===void 0?0:f;if(d!=null){if(nre(d)){if(d==="top"&&qe(e.top))return Kr(Kr({},e),{},{top:e.top+(a||0)+m});if(d==="bottom"&&qe(e.bottom))return Kr(Kr({},e),{},{bottom:e.bottom+(a||0)+m});if(d==="left"&&qe(e.left))return Kr(Kr({},e),{},{left:e.left+(r||0)+m});if(d==="right"&&qe(e.right))return Kr(Kr({},e),{},{right:e.right+(r||0)+m})}return e}if((u==="vertical"||u==="horizontal"&&o==="middle")&&s!=="center"&&qe(e[s]))return Kr(Kr({},e),{},{[s]:e[s]+(r||0)});if((u==="horizontal"||u==="vertical"&&s==="center")&&o!=="middle"&&qe(e[o]))return Kr(Kr({},e),{},{[o]:e[o]+(a||0)})}return e},ho=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",ED=(e,t,n,r)=>{if(r)return e.map(u=>u.coordinate);var a,s,o=e.map(u=>(u.coordinate===t&&(a=!0),u.coordinate===n&&(s=!0),u.coordinate));return a||o.push(t),s||o.push(n),o},_D=(e,t,n)=>{if(!e)return null;var r=e.duplicateDomain,a=e.type,s=e.range,o=e.scale,u=e.realScaleType,d=e.isCategorical,f=e.categoricalDomain,m=e.tickCount,p=e.ticks,b=e.niceTicks,x=e.axisType;if(!o)return null;var E=u==="scaleBand"&&o.bandwidth?o.bandwidth()/2:2,_=a==="category"&&o.bandwidth?o.bandwidth()/E:0;if(_=x==="angleAxis"&&s&&s.length>=2?Wr(s[0]-s[1])*2*_:_,p||b){var S=(p||b||[]).map((T,C)=>{var A=r?r.indexOf(T):T,k=o.map(A);return Nt(k)?{coordinate:k+_,value:T,offset:_,index:C}:null}).filter(Xr);return S}return d&&f?f.map((T,C)=>{var A=o.map(T);return Nt(A)?{coordinate:A+_,value:T,index:C,offset:_}:null}).filter(Xr):o.ticks&&m!=null?o.ticks(m).map((T,C)=>{var A=o.map(T);return Nt(A)?{coordinate:A+_,value:T,index:C,offset:_}:null}).filter(Xr):o.domain().map((T,C)=>{var A=o.map(T);return Nt(A)?{coordinate:A+_,value:r?r[T]:T,index:C,offset:_}:null}).filter(Xr)},Uie=(e,t)=>{if(!t||t.length!==2||!qe(t[0])||!qe(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),a=[e[0],e[1]];return(!qe(e[0])||e[0]<n)&&(a[0]=n),(!qe(e[1])||e[1]>r)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]<n&&(a[1]=n),a},zie=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var a=0;a<r;++a)for(var s=0,o=0,u=0;u<n;++u){var d=e[u],f=d==null?void 0:d[a];if(f!=null){var m=f[1],p=f[0],b=Ni(m)?p:m;b>=0?(f[0]=s,s+=b,f[1]=s):(f[0]=o,o+=b,f[1]=o)}}}},Fie=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var a=0;a<r;++a)for(var s=0,o=0;o<n;++o){var u=e[o],d=u==null?void 0:u[a];if(d!=null){var f=Ni(d[1])?d[0]:d[1];f>=0?(d[0]=s,s+=f,d[1]=s):(d[0]=0,d[1]=0)}}}},Hie={sign:zie,expand:_re,none:ml,silhouette:Nre,wiggle:Tre,positive:Fie},$ie=(e,t,n)=>{var r,a=(r=Hie[n])!==null&&r!==void 0?r:ml,s=Ere().keys(t).value((u,d)=>Number(Gn(u,d,0))).order(Av).offset(a),o=s(e);return o.forEach((u,d)=>{u.forEach((f,m)=>{var p=Gn(e[m],t[d],0);Array.isArray(p)&&p.length===2&&qe(p[0])&&qe(p[1])&&(f[0]=p[0],f[1]=p[1])})}),o};function Yie(e){return e==null?void 0:String(e)}var XC=e=>{var t=e.axis,n=e.ticks,r=e.offset,a=e.bandSize,s=e.entry,o=e.index;if(t.type==="category")return n[o]?n[o].coordinate+r:null;var u=Gn(s,t.dataKey,t.scale.domain()[o]);if(Ln(u))return null;var d=t.scale.map(u);return qe(d)?d-a/2+r:null},qie=e=>{var t=e.numericAxis,n=t.scale.domain();if(t.type==="number"){var r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return r<=0&&a>=0?0:a<0?a:r}return n[0]},Gie=e=>{var t=e.flat(2).filter(qe);return[Math.min(...t),Math.max(...t)]},Kie=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Vie=(e,t,n)=>{if(!(e==null||Object.keys(e).length===0))return Kie(Object.keys(e).reduce((r,a)=>{var s=e[a];if(!s)return r;var o=s.stackedData,u=o.reduce((d,f)=>{var m=vD(f,t,n),p=Gie(m);return!Nt(p[0])||!Nt(p[1])?d:[Math.min(d[0],p[0]),Math.max(d[1],p[1])]},[1/0,-1/0]);return[Math.min(u[0],r[0]),Math.max(u[1],r[1])]},[1/0,-1/0]))},QC=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ZC=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Dp=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var a=M0(t,_=>_.coordinate),s=[],o=0,u=1,d=a.length;u<d;u++){var f,m,p=(((f=a[u])===null||f===void 0?void 0:f.coordinate)||0)-(((m=a[u-1])===null||m===void 0?void 0:m.coordinate)||0);s.push(p),o=Math.max(p,o)}var b=o*1e-4,x=1/0;for(var E of s)E>b&&(x=Math.min(E,x));return x===1/0?0:x}return n?void 0:0};function JC(e){var t=e.tooltipEntrySettings,n=e.dataKey,r=e.payload,a=e.value,s=e.name;return Kr(Kr({},t),{},{dataKey:n,payload:r,value:a,name:s})}function ND(e,t){if(e!=null)return String(e);if(typeof t=="string")return t}var Wie=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},Xie=(e,t)=>t==="centric"?e.angle:e.radius,ms=e=>e.layout.width,ps=e=>e.layout.height,Qie=e=>e.layout.scale,TD=e=>e.layout.margin,Y0=ue(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),q0=ue(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Zie="data-recharts-item-index",Jie="data-recharts-item-id",Bf=60,NE=30;function ek(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Rm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ek(Object(n),!0).forEach(function(r){ese(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ek(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ese(e,t,n){return(t=tse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tse(e){var t=nse(e,"string");return typeof t=="symbol"?t:t+""}function nse(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rse=e=>e.brush.height;function ase(e){var t=q0(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var a=typeof r.width=="number"?r.width:Bf;return n+a}return n},0)}function ise(e){var t=q0(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var a=typeof r.width=="number"?r.width:Bf;return n+a}return n},0)}function sse(e){var t=Y0(e);return t.reduce((n,r)=>{if(r.orientation==="top"&&!r.mirror&&!r.hide){var a=typeof r.height=="number"?r.height:NE;return n+a}return n},0)}function ose(e){var t=Y0(e);return t.reduce((n,r)=>{if(r.orientation==="bottom"&&!r.mirror&&!r.hide){var a=typeof r.height=="number"?r.height:NE;return n+a}return n},0)}var Kn=ue([ms,ps,TD,rse,ase,ise,sse,ose,Y4,Sae],(e,t,n,r,a,s,o,u,d,f)=>{var m={left:(n.left||0)+a,right:(n.right||0)+s},p={top:(n.top||0)+o,bottom:(n.bottom||0)+u},b=Rm(Rm({},p),m),x=b.bottom;b.bottom+=r,b=Bie(b,d,f);var E=e-b.left-b.right,_=t-b.top-b.bottom;return Rm(Rm({brushBottom:x},b),{},{width:Math.max(E,0),height:Math.max(_,0)})}),lse=ue(Kn,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),TE=ue(ms,ps,(e,t)=>({x:0,y:0,width:e,height:t})),use=v.createContext(null),ea=()=>v.useContext(use)!=null,G0=e=>e.brush,K0=ue([G0,Kn,TD],(e,t,n)=>({height:e.height,x:qe(e.x)?e.x:t.left,y:qe(e.y)?e.y:t.top+t.height+t.brushBottom-((n==null?void 0:n.bottom)||0),width:qe(e.width)?e.width:t.width}));function cse(e,t,{signal:n,edges:r}={}){let a,s=null;const o=r!=null&&r.includes("leading"),u=r==null||r.includes("trailing"),d=()=>{s!==null&&(e.apply(a,s),a=void 0,s=null)},f=()=>{u&&d(),x()};let m=null;const p=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,f()},t)},b=()=>{m!==null&&(clearTimeout(m),m=null)},x=()=>{b(),a=void 0,s=null},E=()=>{d()},_=function(...S){if(n!=null&&n.aborted)return;a=this,s=S;const T=m==null;p(),o&&T&&d()};return _.schedule=p,_.cancel=x,_.flush=E,n==null||n.addEventListener("abort",x,{once:!0}),_}function dse(e,t=0,n={}){typeof n!="object"&&(n={});const{leading:r=!1,trailing:a=!0,maxWait:s}=n,o=Array(2);r&&(o[0]="leading"),a&&(o[1]="trailing");let u,d=null;const f=cse(function(...b){u=e.apply(this,b),d=null},t,{edges:o}),m=function(...b){return s!=null&&(d===null&&(d=Date.now()),Date.now()-d>=s)?((r||a)&&(u=e.apply(this,b)),d=Date.now(),f.cancel(),f.schedule(),u):(f.apply(this,b),u)},p=()=>(f.flush(),u);return m.cancel=f.cancel,m.flush=p,m}function fse(e,t=0,n={}){const{leading:r=!0,trailing:a=!0}=n;return dse(e,t,{leading:r,maxWait:t,trailing:a})}var jp=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),s=2;s<r;s++)a[s-2]=arguments[s];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(n.replace(/%s/g,()=>a[o++]))}},xi={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},SD=(e,t,n)=>{var r=n.width,a=r===void 0?xi.width:r,s=n.height,o=s===void 0?xi.height:s,u=n.aspect,d=n.maxHeight,f=hl(a)?e:Number(a),m=hl(o)?t:Number(o);return u&&u>0&&(f?m=f/u:m&&(f=m*u),d&&m!=null&&m>d&&(m=d)),{calculatedWidth:f,calculatedHeight:m}},hse={width:0,height:0,overflow:"visible"},mse={width:0,overflowX:"visible"},pse={height:0,overflowY:"visible"},gse={},bse=e=>{var t=e.width,n=e.height,r=hl(t),a=hl(n);return r&&a?hse:r?mse:a?pse:gse};function xse(e){var t=e.width,n=e.height,r=e.aspect,a=t,s=n;return a===void 0&&s===void 0?(a=xi.width,s=xi.height):a===void 0?a=r&&r>0?void 0:xi.width:s===void 0&&(s=r&&r>0?void 0:xi.height),{width:a,height:s}}var yse=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function Lp(){return Lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lp.apply(null,arguments)}function tk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function nk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tk(Object(n),!0).forEach(function(r){vse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vse(e,t,n){return(t=Ese(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ese(e){var t=_se(e,"string");return typeof t=="symbol"?t:t+""}function _se(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nse(e,t){return Ase(e)||wse(e,t)||Sse(e,t)||Tse()}function Tse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
563
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sse(e,t){if(e){if(typeof e=="string")return rk(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rk(e,t):void 0}}function rk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function wse(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function Ase(e){if(Array.isArray(e))return e}function Cse(e,t){if(e==null)return{};var n,r,a=kse(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function kse(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var wD=v.createContext(xi.initialDimension);function Ose(e){return Si(e.width)&&Si(e.height)}function AD(e){var t=e.children,n=e.width,r=e.height,a=v.useMemo(()=>({width:n,height:r}),[n,r]);return Ose(a)?v.createElement(wD.Provider,{value:a},t):null}var SE=()=>v.useContext(wD),Ise=v.forwardRef((e,t)=>{var n=e.aspect,r=e.initialDimension,a=r===void 0?xi.initialDimension:r,s=e.width,o=e.height,u=e.minWidth,d=u===void 0?xi.minWidth:u,f=e.minHeight,m=e.maxHeight,p=e.children,b=e.debounce,x=b===void 0?xi.debounce:b,E=e.id,_=e.className,S=e.onResize,T=e.style,C=T===void 0?{}:T,A=Cse(e,yse),k=v.useRef(null),I=v.useRef();I.current=S,v.useImperativeHandle(t,()=>k.current);var O=v.useState({containerWidth:a.width,containerHeight:a.height}),j=Nse(O,2),H=j[0],z=j[1],D=v.useCallback((G,F)=>{z($=>{var K=Math.round(G),L=Math.round(F);return $.containerWidth===K&&$.containerHeight===L?$:{containerWidth:K,containerHeight:L}})},[]);v.useEffect(()=>{if(k.current==null||typeof ResizeObserver>"u")return sc;var G=P=>{var ee,M=P[0];if(M!=null){var de=M.contentRect,_e=de.width,U=de.height;D(_e,U),(ee=I.current)===null||ee===void 0||ee.call(I,_e,U)}};x>0&&(G=fse(G,x,{trailing:!0,leading:!1}));var F=new ResizeObserver(G),$=k.current.getBoundingClientRect(),K=$.width,L=$.height;return D(K,L),F.observe(k.current),()=>{F.disconnect()}},[D,x]);var V=H.containerWidth,q=H.containerHeight;jp(!n||n>0,"The aspect(%s) must be greater than zero.",n);var ae=SD(V,q,{width:s,height:o,aspect:n,maxHeight:m}),Q=ae.calculatedWidth,W=ae.calculatedHeight;return jp(V<0||q<0||Q!=null&&Q>0||W!=null&&W>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
564
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
565
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
566
|
+
height and width.`,Q,W,s,o,d,f,n),v.createElement("div",Lp({id:E?"".concat(E):void 0,className:re("recharts-responsive-container",_),style:nk(nk({},C),{},{width:s,height:o,minWidth:d,minHeight:f,maxHeight:m}),ref:k},A),v.createElement("div",{style:bse({width:s,height:o})},v.createElement(AD,{width:Q,height:W},p)))}),wE=v.forwardRef((e,t)=>{var n=SE();if(Si(n.width)&&Si(n.height))return e.children;var r=xse({width:e.width,height:e.height,aspect:e.aspect}),a=r.width,s=r.height,o=SD(void 0,void 0,{width:a,height:s,aspect:e.aspect,maxHeight:e.maxHeight}),u=o.calculatedWidth,d=o.calculatedHeight;return qe(u)&&qe(d)?v.createElement(AD,{width:u,height:d},e.children):v.createElement(Ise,Lp({},e,{width:a,height:s,ref:t}))}),V0=()=>{var e,t=ea(),n=Ke(lse),r=Ke(K0),a=(e=Ke(G0))===null||e===void 0?void 0:e.padding;return!t||!r||!a?n:{width:r.width-a.left-a.right,height:r.height-a.top-a.bottom,x:a.left,y:a.top}},Rse={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},CD=()=>{var e;return(e=Ke(Kn))!==null&&e!==void 0?e:Rse},kD=()=>Ke(ms),OD=()=>Ke(ps),Kt=e=>e.layout.layoutType,oc=()=>Ke(Kt),ID=()=>{var e=oc();if(e==="horizontal"||e==="vertical")return e},RD=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},Mse=()=>{var e=oc();return e!==void 0},Uf=e=>{var t=on(),n=ea(),r=e.width,a=e.height,s=SE(),o=r,u=a;return s&&(o=s.width>0?s.width:r,u=s.height>0?s.height:a),v.useEffect(()=>{!n&&Si(o)&&Si(u)&&t(Rie({width:o,height:u}))},[t,n,o,u]),null},Dse={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value",position:void 0,offset:0},size:{width:0,height:0},payload:[]},MD=Nr({name:"legend",initialState:Dse,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter,e.settings.position=t.payload.position,e.settings.offset=t.payload.offset},addLegendPayload:{reducer(e,t){e.payload.push(Ct(t.payload))},prepare:Jt()},replaceLegendPayload:{reducer(e,t){var n=t.payload,r=n.prev,a=n.next,s=Ia(e).payload.indexOf(Ct(r));s>-1&&(e.payload[s]=Ct(a))},prepare:Jt()},removeLegendPayload:{reducer(e,t){var n=Ia(e).payload.indexOf(Ct(t.payload));n>-1&&e.payload.splice(n,1)},prepare:Jt()}}}),zf=MD.actions;zf.setLegendSize;zf.setLegendSettings;var jse=zf.addLegendPayload,Lse=zf.replaceLegendPayload,Pse=zf.removeLegendPayload,Bse=MD.reducer,_y={exports:{}},Ny={};/**
|
|
567
|
+
* @license React
|
|
568
|
+
* use-sync-external-store-with-selector.production.js
|
|
569
|
+
*
|
|
570
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
571
|
+
*
|
|
572
|
+
* This source code is licensed under the MIT license found in the
|
|
573
|
+
* LICENSE file in the root directory of this source tree.
|
|
574
|
+
*/var ak;function Use(){if(ak)return Ny;ak=1;var e=Qu();function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,a=e.useRef,s=e.useEffect,o=e.useMemo,u=e.useDebugValue;return Ny.useSyncExternalStoreWithSelector=function(d,f,m,p,b){var x=a(null);if(x.current===null){var E={hasValue:!1,value:null};x.current=E}else E=x.current;x=o(function(){function S(I){if(!T){if(T=!0,C=I,I=p(I),b!==void 0&&E.hasValue){var O=E.value;if(b(O,I))return A=O}return A=I}if(O=A,n(C,I))return O;var j=p(I);return b!==void 0&&b(O,j)?(C=I,O):(C=I,A=j)}var T=!1,C,A,k=m===void 0?null:m;return[function(){return S(f())},k===null?void 0:function(){return S(k())}]},[f,m,p,b]);var _=r(d,x[0],x[1]);return s(function(){E.hasValue=!0,E.value=_},[_]),u(_),_},Ny}var ik;function zse(){return ik||(ik=1,_y.exports=Use()),_y.exports}zse();function Fse(e){e()}function Hse(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Fse(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const a=t={callback:n,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){!r||e===null||(r=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}var sk={notify(){},get:()=>[]};function $se(e,t){let n,r=sk,a=0,s=!1;function o(_){m();const S=r.subscribe(_);let T=!1;return()=>{T||(T=!0,S(),p())}}function u(){r.notify()}function d(){E.onStateChange&&E.onStateChange()}function f(){return s}function m(){a++,n||(n=e.subscribe(d),r=Hse())}function p(){a--,n&&a===0&&(n(),n=void 0,r.clear(),r=sk)}function b(){s||(s=!0,m())}function x(){s&&(s=!1,p())}const E={addNestedSub:o,notifyNestedSubs:u,handleChangeWrapper:d,isSubscribed:f,trySubscribe:b,tryUnsubscribe:x,getListeners:()=>r};return E}var Yse=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",qse=Yse(),Gse=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Kse=Gse(),Vse=()=>qse||Kse?v.useLayoutEffect:v.useEffect,Wse=Vse();function ok(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Xse(e,t){if(ok(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(t,n[a])||!ok(e[n[a]],t[n[a]]))return!1;return!0}var Ty=Symbol.for("react-redux-context"),Sy=typeof globalThis<"u"?globalThis:{};function Qse(){if(!v.createContext)return{};const e=Sy[Ty]??(Sy[Ty]=new Map);let t=e.get(v.createContext);return t||(t=v.createContext(null),e.set(v.createContext,t)),t}var Zse=Qse();function Jse(e){const{children:t,context:n,serverState:r,store:a}=e,s=v.useMemo(()=>{const d=$se(a);return{store:a,subscription:d,getServerState:r?()=>r:void 0}},[a,r]),o=v.useMemo(()=>a.getState(),[a]);Wse(()=>{const{subscription:d}=s;return d.onStateChange=d.notifyNestedSubs,d.trySubscribe(),o!==a.getState()&&d.notifyNestedSubs(),()=>{d.tryUnsubscribe(),d.onStateChange=void 0}},[s,o]);const u=n||Zse;return v.createElement(u.Provider,{value:s},t)}var eoe=Jse,toe=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function noe(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function W0(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(toe.has(r)){if(e[r]==null&&t[r]==null)continue;if(!Xse(e[r],t[r]))return!1}else if(!noe(e[r],t[r]))return!1;return!0}function Hv(){return Hv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hv.apply(null,arguments)}function lk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ed(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lk(Object(n),!0).forEach(function(r){roe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function roe(e,t,n){return(t=aoe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aoe(e){var t=ioe(e,"string");return typeof t=="symbol"?t:t+""}function ioe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function soe(e,t){return coe(e)||uoe(e,t)||loe(e,t)||ooe()}function ooe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
575
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function loe(e,t){if(e){if(typeof e=="string")return uk(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uk(e,t):void 0}}function uk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uoe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function coe(e){if(Array.isArray(e))return e}function doe(e){return Array.isArray(e)&&Ti(e[0])&&Ti(e[1])?e.join(" ~ "):e}var gu={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function foe(e,t){return t==null?e:M0(e,t)}var hoe=e=>{var t=e.separator,n=t===void 0?gu.separator:t,r=e.contentStyle,a=e.itemStyle,s=e.labelStyle,o=s===void 0?gu.labelStyle:s,u=e.payload,d=e.formatter,f=e.itemSorter,m=e.wrapperClassName,p=e.labelClassName,b=e.label,x=e.labelFormatter,E=e.accessibilityLayer,_=E===void 0?gu.accessibilityLayer:E,S=()=>{if(u&&u.length){var H={padding:0,margin:0},z=foe(u,f),D=z.map((V,q)=>{if(!V||V.type==="none")return null;var ae=V.formatter||d||doe,Q=V.value,W=V.name,G=Q,F=W;if(ae){var $=ae(Q,W,V,q,u);if(Array.isArray($)){var K=soe($,2);G=K[0],F=K[1]}else if($!=null)G=$;else return null}var L=Ed(Ed({},gu.itemStyle),{},{color:V.color||gu.itemStyle.color},a);return v.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(q),style:L},Ti(F)?v.createElement("span",{className:"recharts-tooltip-item-name"},F):null,Ti(F)?v.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,v.createElement("span",{className:"recharts-tooltip-item-value"},G),v.createElement("span",{className:"recharts-tooltip-item-unit"},V.unit||""))});return v.createElement("ul",{className:"recharts-tooltip-item-list",style:H},D)}return null},T=Ed(Ed({},gu.contentStyle),r),C=Ed({margin:0},o),A=!Ln(b),k=A?b:"",I=re("recharts-default-tooltip",m),O=re("recharts-tooltip-label",p);A&&x&&u!==void 0&&u!==null&&(k=x(b,u));var j=_?{role:"status","aria-live":"assertive"}:{};return v.createElement("div",Hv({className:I,style:T},j),v.createElement("p",{className:O,style:C},v.isValidElement(k)?k:"".concat(k)),S())},_d="recharts-tooltip-wrapper",moe={visibility:"hidden"};function poe(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return re(_d,{["".concat(_d,"-right")]:qe(n)&&t&&qe(t.x)&&n>=t.x,["".concat(_d,"-left")]:qe(n)&&t&&qe(t.x)&&n<t.x,["".concat(_d,"-bottom")]:qe(r)&&t&&qe(t.y)&&r>=t.y,["".concat(_d,"-top")]:qe(r)&&t&&qe(t.y)&&r<t.y})}function ck(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,a=e.offset,s=e.position,o=e.reverseDirection,u=e.tooltipDimension,d=e.viewBox,f=e.viewBoxDimension;if(s&&qe(s[r]))return s[r];var m=n[r]-u-(a>0?a:0),p=n[r]+a;if(t[r])return o[r]?m:p;var b=d[r];if(b==null)return 0;if(o[r]){var x=m,E=b;return x<E?Math.max(p,b):Math.max(m,b)}if(f==null)return 0;var _=p+u,S=b+f;return _>S?Math.max(m,b):Math.max(p,b)}function goe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function boe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTop,a=e.offsetLeft,s=e.position,o=e.reverseDirection,u=e.tooltipBox,d=e.useTranslate3d,f=e.viewBox,m,p,b;return u&&u.height>0&&u.width>0&&n?(p=ck({allowEscapeViewBox:t,coordinate:n,key:"x",offset:a,position:s,reverseDirection:o,tooltipDimension:u.width,viewBox:f,viewBoxDimension:f.width}),b=ck({allowEscapeViewBox:t,coordinate:n,key:"y",offset:r,position:s,reverseDirection:o,tooltipDimension:u.height,viewBox:f,viewBoxDimension:f.height}),m=goe({translateX:p,translateY:b,useTranslate3d:d})):m=moe,{cssProperties:m,cssClasses:poe({translateX:p,translateY:b,coordinate:n})}}var xoe=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Ff={isSsr:xoe()};function yoe(e,t){return Noe(e)||_oe(e,t)||Eoe(e,t)||voe()}function voe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
576
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eoe(e,t){if(e){if(typeof e=="string")return dk(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dk(e,t):void 0}}function dk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _oe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function Noe(e){if(Array.isArray(e))return e}function DD(){var e=v.useState(()=>Ff.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=yoe(e,2),n=t[0],r=t[1];return v.useEffect(()=>{if(window.matchMedia){var a=window.matchMedia("(prefers-reduced-motion: reduce)"),s=()=>{r(a.matches)};return a.addEventListener("change",s),()=>{a.removeEventListener("change",s)}}},[]),n}function fk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function bu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fk(Object(n),!0).forEach(function(r){Toe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Toe(e,t,n){return(t=Soe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Soe(e){var t=woe(e,"string");return typeof t=="symbol"?t:t+""}function woe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Aoe(e,t){return Ioe(e)||Ooe(e,t)||koe(e,t)||Coe()}function Coe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
577
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function koe(e,t){if(e){if(typeof e=="string")return hk(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hk(e,t):void 0}}function hk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ooe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function Ioe(e){if(Array.isArray(e))return e}function Roe(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active){var t=typeof e.animationEasing=="string"?e.animationEasing:"ease";return"transform ".concat(e.animationDuration,"ms ").concat(t)}}function Moe(e){var t,n,r,a,s,o,u=DD(),d=v.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),f=Aoe(d,2),m=f[0],p=f[1];v.useEffect(()=>{var T=C=>{if(C.key==="Escape"){var A,k,I,O;p({dismissed:!0,dismissedAtCoordinate:{x:(A=(k=e.coordinate)===null||k===void 0?void 0:k.x)!==null&&A!==void 0?A:0,y:(I=(O=e.coordinate)===null||O===void 0?void 0:O.y)!==null&&I!==void 0?I:0}})}};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(n=e.coordinate)===null||n===void 0?void 0:n.y]),m.dismissed&&(((r=(a=e.coordinate)===null||a===void 0?void 0:a.x)!==null&&r!==void 0?r:0)!==m.dismissedAtCoordinate.x||((s=(o=e.coordinate)===null||o===void 0?void 0:o.y)!==null&&s!==void 0?s:0)!==m.dismissedAtCoordinate.y)&&p(bu(bu({},m),{},{dismissed:!1}));var b=boe({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:e.lastBoundingBox,useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),x=b.cssClasses,E=b.cssProperties,_=e.hasPortalFromProps?{}:bu(bu({transition:Roe({prefersReducedMotion:u,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},E),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),S=bu(bu({},_),{},{visibility:!m.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return v.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:x,style:S,ref:e.innerRef},e.children)}var Doe=v.memo(Moe),jD=()=>{var e;return(e=Ke(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function $v(){return $v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$v.apply(null,arguments)}function mk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function pk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mk(Object(n),!0).forEach(function(r){joe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function joe(e,t,n){return(t=Loe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Loe(e){var t=Poe(e,"string");return typeof t=="symbol"?t:t+""}function Poe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gk={curveBasisClosed:cre,curveBasisOpen:dre,curveBasis:ure,curveBumpX:ore,curveBumpY:lre,curveLinearClosed:fre,curveLinear:I0,curveMonotoneX:hre,curveMonotoneY:mre,curveNatural:pre,curveStep:gre,curveStepAfter:xre,curveStepBefore:bre},Pp=e=>Nt(e.x)&&Nt(e.y),bk=e=>e.base!=null&&Pp(e.base)&&Pp(e),Nd=e=>e.x,Td=e=>e.y,Boe=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(lE(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=gk["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return gk[n]||I0},xk={connectNulls:!1,type:"linear"},Uoe=e=>{var t=e.type,n=t===void 0?xk.type:t,r=e.points,a=r===void 0?[]:r,s=e.baseLine,o=e.layout,u=e.connectNulls,d=u===void 0?xk.connectNulls:u,f=Boe(n,o),m=d?a.filter(Pp):a;if(Array.isArray(s)){var p,b=a.map((T,C)=>pk(pk({},T),{},{base:s[C]}));o==="vertical"?p=wm().y(Td).x1(Nd).x0(T=>T.base.x):p=wm().x(Nd).y1(Td).y0(T=>T.base.y);var x=p.defined(bk).curve(f),E=d?b.filter(bk):b;return x(E)}var _;o==="vertical"&&qe(s)?_=wm().y(Td).x1(Nd).x0(s):qe(s)?_=wm().x(Nd).y1(Td).y0(s):_=o4().x(Nd).y(Td);var S=_.defined(Pp).curve(f);return S(m)},zoe=e=>{var t=e.className,n=e.points,r=e.path,a=e.pathRef,s=oc();if((!n||!n.length)&&!r)return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||s,connectNulls:e.connectNulls},u=n&&n.length?Uoe(o):r;return v.createElement("path",$v({},ss(e),Sre(e),{className:re("recharts-curve",t),d:u===null?void 0:u,ref:a}))},Foe=["x","y","top","left","width","height","className"];function Yv(){return Yv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yv.apply(null,arguments)}function yk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Hoe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yk(Object(n),!0).forEach(function(r){$oe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $oe(e,t,n){return(t=Yoe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yoe(e){var t=qoe(e,"string");return typeof t=="symbol"?t:t+""}function qoe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Goe(e,t){if(e==null)return{};var n,r,a=Koe(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Koe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Voe=(e,t,n,r,a,s)=>"M".concat(e,",").concat(a,"v").concat(r,"M").concat(s,",").concat(t,"h").concat(n),Woe=e=>{var t=e.x,n=t===void 0?0:t,r=e.y,a=r===void 0?0:r,s=e.top,o=s===void 0?0:s,u=e.left,d=u===void 0?0:u,f=e.width,m=f===void 0?0:f,p=e.height,b=p===void 0?0:p,x=e.className,E=Goe(e,Foe),_=Hoe({x:n,y:a,top:o,left:d,width:m,height:b},E);return!qe(n)||!qe(a)||!qe(m)||!qe(b)||!qe(o)||!qe(d)?null:v.createElement("path",Yv({},os(_),{className:re("recharts-cross",x),d:Voe(n,a,m,b,o,d)}))};function Xoe(e,t,n,r){var a=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-a,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}var Bp=1e-4,LD=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],PD=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),vk=(e,t)=>n=>{var r=LD(e,t);return PD(r,n)},Qoe=(e,t)=>n=>{var r=LD(e,t),a=[...r.map((s,o)=>s*o).slice(1),0];return PD(a,n)},Zoe=e=>{var t,n=e.split("(");if(n.length!==2||n[0]!=="cubic-bezier")return null;var r=(t=n[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(r==null||r.length!==4)return null;var a=r.map(s=>parseFloat(s));return[a[0],a[1],a[2],a[3]]},Joe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n.length===1)switch(n[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var a=Zoe(n[0]);if(a)return a}}return n.length===4?n:[0,0,1,1]},ele=(e,t,n,r)=>{var a=vk(e,n),s=vk(t,r),o=Qoe(e,n),u=f=>f>1?1:f<0?0:f,d=f=>{for(var m=f>1?1:f,p=m,b=0;b<8;++b){var x=a(p)-m,E=o(p);if(Math.abs(x-m)<Bp||E<Bp)return s(p);p=u(p-x/E)}return s(p)};return d.isStepper=!1,d},Ek=function(){return ele(...Joe(...arguments))},tle=function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,a=t.damping,s=a===void 0?8:a,o=t.dt,u=o===void 0?16.67:o,d=1,f=[0],m=0,p=0,b=1e4,x=0;x<b;){var E=-(m-d)*r,_=p*s;if(p+=(E-_)*u/1e3,m+=p*u/1e3,f.push(m),Math.abs(m-d)<Bp&&Math.abs(p)<Bp)break;x++}f[f.length-1]=d;var S=f.length-1;return T=>{var C,A,k;if(T<=0)return 0;if(T>=1)return d;var I=T*S,O=Math.floor(I),j=I-O;return((C=f[O])!==null&&C!==void 0?C:0)+(((A=f[O+1])!==null&&A!==void 0?A:0)-((k=f[O])!==null&&k!==void 0?k:0))*j}},nle=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Ek(e);case"spring":return tle();default:if(e.split("(")[0]==="cubic-bezier")return Ek(e)}return typeof e=="function"?e:null},rle=(e,t,n)=>{var r,a=s=>{var o=t.tick(s);if(t.getState()==="active"){if(n(t.getInterpolated()),t.getProgress()===1){t.complete(),r=void 0;return}r=e.setTimeout(a,o);return}r=e.setTimeout(a,o)};return r=e.setTimeout(a,0),()=>{var s;return(s=r)===null||s===void 0?void 0:s()}},BD=v.createContext(rle);BD.Provider;function ale(e){var t=v.useContext(BD);return v.useMemo(()=>e??t,[e,t])}function ile(e,t,n){return(t=sle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sle(e){var t=ole(e,"string");return typeof t=="symbol"?t:t+""}function ole(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _k="init",Nk="pending",Tk="active",lle="completed";function wy(e){return Math.max(0,e)}class ule{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var n;ile(this,"state",_k),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=wy(t.animationDuration),this.animationBegin=wy(t.animationBegin),this.progress=0,this.from=t.from,this.to=t.to,this.easing=t.easing,(n=t.onAnimationStart)===null||n===void 0||n.call(t)}getState(){return this.state}getEasing(){return this.easing}getAnimationDuration(){return this.animationDuration}tick(t){if(this.getState()===_k)return this.state=Nk,this.beginStartedTime=t,this.animationBegin;if(this.getState()===Nk){if(this.beginStartedTime==null)throw new Error;var n=t-this.beginStartedTime;return n>=this.animationBegin?(this.state=Tk,this.animationStartedTime=t,this.nextAnimationUpdate(0)):wy(this.animationBegin-n)}if(this.getState()===Tk){if(this.animationStartedTime==null)throw new Error;var r=t-this.animationStartedTime;return this.setProgress(r/this.animationDuration),this.nextAnimationUpdate(r)}return 0}setProgress(t){this.progress=Math.min(1,Math.max(0,t))}getProgress(){return this.progress}complete(){if(this.progress=1,this.state==="active"){var t;(t=this.onAnimationEnd)===null||t===void 0||t.call(this)}this.state=lle}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class cle extends ule{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(pr(this.getFrom(),this.getTo(),this.getProgress()))}}class dle{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),a=null,s=o=>{o-r>=n?t(o):a=requestAnimationFrame(s)};return a=requestAnimationFrame(s),()=>{a!=null&&cancelAnimationFrame(a)}}}function fle(e,t){return gle(e)||ple(e,t)||mle(e,t)||hle()}function hle(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
578
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mle(e,t){if(e){if(typeof e=="string")return Sk(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sk(e,t):void 0}}function Sk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ple(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function gle(e){if(Array.isArray(e))return e}var ble={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},wk=0,Ay=1;function UD(e){var t=Ba(e,ble),n=t.animationId,r=t.isActive,a=t.canBegin,s=t.duration,o=t.easing,u=t.begin,d=t.onAnimationEnd,f=t.onAnimationStart,m=t.children,p=DD(),b=r==="auto"?!Ff.isSsr&&!p:r,x=ale(t.animationController),E=v.useState(b?wk:Ay),_=fle(E,2),S=_[0],T=_[1];return v.useEffect(()=>{b||T(Ay)},[b]),v.useEffect(()=>{var C=nle(o);if(!b||!a||C==null)return sc;var A=new dle,k=new cle({animationId:n,easing:C,animationDuration:s,animationBegin:u,onAnimationStart:f,onAnimationEnd:d,from:wk,to:Ay});return x(A,k,T)},[x,n,b,a,s,o,u,f,d]),m(Number(S))}function zD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=v.useRef(of(t)),r=v.useRef(e);return r.current!==e&&(n.current=of(t),r.current=e),n.current}var xle=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),yle=(e,t,n)=>e.map(r=>"".concat(xle(r)," ").concat(t,"ms ").concat(n)).join(","),vle=["radius"],Ele=["radius"],Ak,Ck,kk,Ok,Ik,Rk,Mk,Dk,jk,Lk;function Pk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Bk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Pk(Object(n),!0).forEach(function(r){_le(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _le(e,t,n){return(t=Nle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nle(e){var t=Tle(e,"string");return typeof t=="symbol"?t:t+""}function Tle(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Up(){return Up=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Up.apply(null,arguments)}function Uk(e,t){if(e==null)return{};var n,r,a=Sle(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Sle(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function wle(e,t){return Ole(e)||kle(e,t)||Cle(e,t)||Ale()}function Ale(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
579
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cle(e,t){if(e){if(typeof e=="string")return zk(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zk(e,t):void 0}}function zk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function kle(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function Ole(e){if(Array.isArray(e))return e}function fi(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Fk=(e,t,n,r,a)=>{var s=ao(n),o=ao(r),u=Math.min(Math.abs(s)/2,Math.abs(o)/2),d=o>=0?1:-1,f=s>=0?1:-1,m=o>=0&&s>=0||o<0&&s<0?1:0,p;if(u>0&&Array.isArray(a)){for(var b=[0,0,0,0],x=0,E=4;x<E;x++){var _,S=(_=a[x])!==null&&_!==void 0?_:0;b[x]=S>u?u:S}p=ar(Ak||(Ak=fi(["M",",",""])),e,t+d*b[0]),b[0]>0&&(p+=ar(Ck||(Ck=fi(["A ",",",",0,0,",",",",",""])),b[0],b[0],m,e+f*b[0],t)),p+=ar(kk||(kk=fi(["L ",",",""])),e+n-f*b[1],t),b[1]>0&&(p+=ar(Ok||(Ok=fi(["A ",",",",0,0,",`,
|
|
580
|
+
`,",",""])),b[1],b[1],m,e+n,t+d*b[1])),p+=ar(Ik||(Ik=fi(["L ",",",""])),e+n,t+r-d*b[2]),b[2]>0&&(p+=ar(Rk||(Rk=fi(["A ",",",",0,0,",`,
|
|
581
|
+
`,",",""])),b[2],b[2],m,e+n-f*b[2],t+r)),p+=ar(Mk||(Mk=fi(["L ",",",""])),e+f*b[3],t+r),b[3]>0&&(p+=ar(Dk||(Dk=fi(["A ",",",",0,0,",`,
|
|
582
|
+
`,",",""])),b[3],b[3],m,e,t+r-d*b[3])),p+="Z"}else if(u>0&&a===+a&&a>0){var T=Math.min(u,a);p=ar(jk||(jk=fi(["M ",",",`
|
|
583
|
+
A `,",",",0,0,",",",",",`
|
|
584
|
+
L `,",",`
|
|
585
|
+
A `,",",",0,0,",",",",",`
|
|
586
|
+
L `,",",`
|
|
587
|
+
A `,",",",0,0,",",",",",`
|
|
588
|
+
L `,",",`
|
|
589
|
+
A `,",",",0,0,",",",","," Z"])),e,t+d*T,T,T,m,e+f*T,t,e+n-f*T,t,T,T,m,e+n,t+d*T,e+n,t+r-d*T,T,T,m,e+n-f*T,t+r,e+f*T,t+r,T,T,m,e,t+r-d*T)}else p=ar(Lk||(Lk=fi(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return p},Hk={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},FD=e=>{var t=Ba(e,Hk),n=v.useRef(null),r=v.useState(-1),a=wle(r,2),s=a[0],o=a[1];v.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var $=n.current.getTotalLength();$&&o($)}catch{}},[]);var u=t.x,d=t.y,f=t.width,m=t.height,p=t.radius,b=t.className,x=t.animationEasing,E=t.animationDuration,_=t.animationBegin,S=t.isAnimationActive,T=t.isUpdateAnimationActive,C=v.useRef(f),A=v.useRef(m),k=v.useRef(u),I=v.useRef(d),O=v.useMemo(()=>({x:u,y:d,width:f,height:m,radius:p}),[u,d,f,m,p]),j=zD(O,"rectangle-");if(u!==+u||d!==+d||f!==+f||m!==+m||f===0||m===0)return null;var H=re("recharts-rectangle",b);if(!T){var z=os(t);z.radius;var D=Uk(z,vle);return v.createElement("path",Up({},D,{x:ao(u),y:ao(d),width:ao(f),height:ao(m),radius:typeof p=="number"?p:void 0,className:H,d:Fk(u,d,f,m,p)}))}var V=C.current,q=A.current,ae=k.current,Q=I.current,W="0px ".concat(s===-1?1:s,"px"),G="".concat(s,"px ").concat(s,"px"),F=yle(["strokeDasharray"],E,typeof x=="string"?x:Hk.animationEasing);return v.createElement(UD,{animationId:j,key:j,canBegin:s>0,duration:E,easing:x,isActive:T,begin:_},$=>{var K=pr(V,f,$),L=pr(q,m,$),P=pr(ae,u,$),ee=pr(Q,d,$);n.current&&(C.current=K,A.current=L,k.current=P,I.current=ee);var M;S?$>0?M={transition:F,strokeDasharray:G}:M={strokeDasharray:W}:M={strokeDasharray:G};var de=os(t);de.radius;var _e=Uk(de,Ele);return v.createElement("path",Up({},_e,{radius:typeof p=="number"?p:void 0,className:H,d:Fk(P,ee,K,L,p),ref:n,style:Bk(Bk({},M),t.style)}))})};function $k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Yk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$k(Object(n),!0).forEach(function(r){Ile(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$k(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ile(e,t,n){return(t=Rle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rle(e){var t=Mle(e,"string");return typeof t=="symbol"?t:t+""}function Mle(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zp=Math.PI/180,Dle=e=>e*180/Math.PI,sr=(e,t,n,r)=>({x:e+Math.cos(-zp*r)*n,y:t+Math.sin(-zp*r)*n}),jle=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},Lle=(e,t)=>{var n=e.x,r=e.y,a=t.x,s=t.y;return Math.sqrt((n-a)**2+(r-s)**2)},Ple=(e,t)=>{var n=e.x,r=e.y,a=t.cx,s=t.cy,o=Lle({x:n,y:r},{x:a,y:s});if(o<=0)return{radius:o,angle:0};var u=(n-a)/o,d=Math.acos(u);return r>s&&(d=2*Math.PI-d),{radius:o,angle:Dle(d),angleInRadian:d}},Ble=e=>{var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),a=Math.floor(n/360),s=Math.min(r,a);return{startAngle:t-s*360,endAngle:n-s*360}},Ule=(e,t)=>{var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),s=Math.floor(r/360),o=Math.min(a,s);return e+o*360},zle=(e,t)=>{var n=e.relativeX,r=e.relativeY,a=Ple({x:n,y:r},t),s=a.radius,o=a.angle,u=t.innerRadius,d=t.outerRadius;if(s<u||s>d||s===0)return null;var f=Ble(t),m=f.startAngle,p=f.endAngle,b=o,x;if(m<=p){for(;b>p;)b-=360;for(;b<m;)b+=360;x=b>=m&&b<=p}else{for(;b>m;)b-=360;for(;b<p;)b+=360;x=b>=p&&b<=m}return x?Yk(Yk({},t),{},{radius:s,angle:Ule(b,t)}):null};function HD(e){var t=e.cx,n=e.cy,r=e.radius,a=e.startAngle,s=e.endAngle,o=sr(t,n,r,a),u=sr(t,n,r,s);return{points:[o,u],cx:t,cy:n,radius:r,startAngle:a,endAngle:s}}var qk,Gk,Kk,Vk,Wk,Xk,Qk;function qv(){return qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qv.apply(null,arguments)}function Qo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Fle=(e,t)=>{var n=Wr(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},Mm=e=>{var t=e.cx,n=e.cy,r=e.radius,a=e.angle,s=e.sign,o=e.isExternal,u=e.cornerRadius,d=e.cornerIsExternal,f=u*(o?1:-1)+r,m=Math.asin(u/f)/zp,p=d?a:a+s*m,b=sr(t,n,f,p),x=sr(t,n,r,p),E=d?a-s*m:a,_=sr(t,n,f*Math.cos(m*zp),E);return{center:b,circleTangency:x,lineTangency:_,theta:m}},$D=e=>{var t=e.cx,n=e.cy,r=e.innerRadius,a=e.outerRadius,s=e.startAngle,o=e.endAngle,u=Fle(s,o),d=s+u,f=sr(t,n,a,s),m=sr(t,n,a,d),p=ar(qk||(qk=Qo(["M ",",",`
|
|
590
|
+
A `,",",`,0,
|
|
591
|
+
`,",",`,
|
|
592
|
+
`,",",`
|
|
593
|
+
`])),f.x,f.y,a,a,+(Math.abs(u)>180),+(s>d),m.x,m.y);if(r>0){var b=sr(t,n,r,s),x=sr(t,n,r,d);p+=ar(Gk||(Gk=Qo(["L ",",",`
|
|
594
|
+
A `,",",`,0,
|
|
595
|
+
`,",",`,
|
|
596
|
+
`,","," Z"])),x.x,x.y,r,r,+(Math.abs(u)>180),+(s<=d),b.x,b.y)}else p+=ar(Kk||(Kk=Qo(["L ",","," Z"])),t,n);return p},Hle=e=>{var t=e.cx,n=e.cy,r=e.innerRadius,a=e.outerRadius,s=e.cornerRadius,o=e.forceCornerRadius,u=e.cornerIsExternal,d=e.startAngle,f=e.endAngle,m=Wr(f-d),p=Mm({cx:t,cy:n,radius:a,angle:d,sign:m,cornerRadius:s,cornerIsExternal:u}),b=p.circleTangency,x=p.lineTangency,E=p.theta,_=Mm({cx:t,cy:n,radius:a,angle:f,sign:-m,cornerRadius:s,cornerIsExternal:u}),S=_.circleTangency,T=_.lineTangency,C=_.theta,A=u?Math.abs(d-f):Math.abs(d-f)-E-C;if(A<0)return o?ar(Vk||(Vk=Qo(["M ",",",`
|
|
597
|
+
a`,",",",0,0,1,",`,0
|
|
598
|
+
a`,",",",0,0,1,",`,0
|
|
599
|
+
`])),x.x,x.y,s,s,s*2,s,s,-s*2):$D({cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:d,endAngle:f});var k=ar(Wk||(Wk=Qo(["M ",",",`
|
|
600
|
+
A`,",",",0,0,",",",",",`
|
|
601
|
+
A`,",",",0,",",",",",",",`
|
|
602
|
+
A`,",",",0,0,",",",",",`
|
|
603
|
+
`])),x.x,x.y,s,s,+(m<0),b.x,b.y,a,a,+(A>180),+(m<0),S.x,S.y,s,s,+(m<0),T.x,T.y);if(r>0){var I=Mm({cx:t,cy:n,radius:r,angle:d,sign:m,isExternal:!0,cornerRadius:s,cornerIsExternal:u}),O=I.circleTangency,j=I.lineTangency,H=I.theta,z=Mm({cx:t,cy:n,radius:r,angle:f,sign:-m,isExternal:!0,cornerRadius:s,cornerIsExternal:u}),D=z.circleTangency,V=z.lineTangency,q=z.theta,ae=u?Math.abs(d-f):Math.abs(d-f)-H-q;if(ae<0&&s===0)return"".concat(k,"L").concat(t,",").concat(n,"Z");k+=ar(Xk||(Xk=Qo(["L",",",`
|
|
604
|
+
A`,",",",0,0,",",",",",`
|
|
605
|
+
A`,",",",0,",",",",",",",`
|
|
606
|
+
A`,",",",0,0,",",",",","Z"])),V.x,V.y,s,s,+(m<0),D.x,D.y,r,r,+(ae>180),+(m>0),O.x,O.y,s,s,+(m<0),j.x,j.y)}else k+=ar(Qk||(Qk=Qo(["L",",","Z"])),t,n);return k},$le={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Yle=e=>{var t=Ba(e,$le),n=t.cx,r=t.cy,a=t.innerRadius,s=t.outerRadius,o=t.cornerRadius,u=t.forceCornerRadius,d=t.cornerIsExternal,f=t.startAngle,m=t.endAngle,p=t.className;if(s<a||f===m)return null;var b=re("recharts-sector",p),x=s-a,E=Za(o,x,0,!0),_;return E>0&&Math.abs(f-m)<360?_=Hle({cx:n,cy:r,innerRadius:a,outerRadius:s,cornerRadius:Math.min(E,x/2),forceCornerRadius:u,cornerIsExternal:d,startAngle:f,endAngle:m}):_=$D({cx:n,cy:r,innerRadius:a,outerRadius:s,startAngle:f,endAngle:m}),v.createElement("path",qv({},os(t),{className:b,d:_}))};function qle(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(g4(t)){if(e==="centric"){var r=t.cx,a=t.cy,s=t.innerRadius,o=t.outerRadius,u=t.angle,d=sr(r,a,s,u),f=sr(r,a,o,u);return[{x:d.x,y:d.y},{x:f.x,y:f.y}]}return HD(t)}}function Gle(e){return sE(e)?NaN:Number(e)}function Cy(e){return e?(e=Gle(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function YD(e,t,n){n&&typeof n!="number"&&Iv(e,t,n)&&(t=n=void 0),e=Cy(e),t===void 0?(t=e,e=0):t=Cy(t),n=n===void 0?e<t?1:-1:Cy(n);const r=Math.max(Math.ceil((t-e)/(n||1)),0),a=new Array(r);for(let s=0;s<r;s++)a[s]=e,e+=n;return a}var ni=e=>e.chartData,AE=ue([ni],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),X0=(e,t,n,r)=>r?AE(e):ni(e),Kle=(e,t,n)=>n?AE(e):ni(e),Vle=ue([X0],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return t!=null?t.slice(n,r+1):[]});ue([AE],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return t!=null?t.slice(n,r+1):[]});var Wle=ue([ni],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return t!=null?t.slice(n,r+1):[]});function CE(e,t){return Jle(e)||Zle(e,t)||Qle(e,t)||Xle()}function Xle(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
607
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qle(e,t){if(e){if(typeof e=="string")return Zk(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zk(e,t):void 0}}function Zk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Zle(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function Jle(e){if(Array.isArray(e))return e}function vi(e){if(Array.isArray(e)&&e.length===2){var t=CE(e,2),n=t[0],r=t[1];if(Nt(n)&&Nt(r))return!0}return!1}function Jk(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function qD(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var n=CE(e,2),r=n[0],a=n[1],s,o;if(Nt(r))s=r;else if(typeof r=="function")return;if(Nt(a))o=a;else if(typeof a=="function")return;var u=[s,o];if(vi(u))return u}}function eue(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(vi(r))return Jk(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var a=CE(e,2),s=a[0],o=a[1],u,d;if(s==="auto")t!=null&&(u=Math.min(...t));else if(qe(s))u=s;else if(typeof s=="function")try{t!=null&&(u=s(t==null?void 0:t[0]))}catch{}else if(typeof s=="string"&&QC.test(s)){var f=QC.exec(s);if(f==null||f[1]==null||t==null)u=void 0;else{var m=+f[1];u=t[0]-m}}else u=t==null?void 0:t[0];if(o==="auto")t!=null&&(d=Math.max(...t));else if(qe(o))d=o;else if(typeof o=="function")try{t!=null&&(d=o(t==null?void 0:t[1]))}catch{}else if(typeof o=="string"&&ZC.test(o)){var p=ZC.exec(o);if(p==null||p[1]==null||t==null)d=void 0;else{var b=+p[1];d=t[1]+b}}else d=t==null?void 0:t[1];var x=[u,d];if(vi(x))return t==null?x:Jk(x,t,n)}}}var lc=1e9,tue={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},OE,an=!0,La="[DecimalError] ",il=La+"Invalid argument: ",kE=La+"Exponent out of range: ",uc=Math.floor,Ko=Math.pow,nue=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fa,$n=1e7,en=7,GD=9007199254740991,Fp=uc(GD/en),Be={};Be.absoluteValue=Be.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Be.comparedTo=Be.cmp=function(e){var t,n,r,a,s=this;if(e=new s.constructor(e),s.s!==e.s)return s.s||-e.s;if(s.e!==e.e)return s.e>e.e^s.s<0?1:-1;for(r=s.d.length,a=e.d.length,t=0,n=r<a?r:a;t<n;++t)if(s.d[t]!==e.d[t])return s.d[t]>e.d[t]^s.s<0?1:-1;return r===a?0:r>a^s.s<0?1:-1};Be.decimalPlaces=Be.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*en;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Be.dividedBy=Be.div=function(e){return ns(this,new this.constructor(e))};Be.dividedToIntegerBy=Be.idiv=function(e){var t=this,n=t.constructor;return qt(ns(t,new n(e),0,1),n.precision)};Be.equals=Be.eq=function(e){return!this.cmp(e)};Be.exponent=function(){return In(this)};Be.greaterThan=Be.gt=function(e){return this.cmp(e)>0};Be.greaterThanOrEqualTo=Be.gte=function(e){return this.cmp(e)>=0};Be.isInteger=Be.isint=function(){return this.e>this.d.length-2};Be.isNegative=Be.isneg=function(){return this.s<0};Be.isPositive=Be.ispos=function(){return this.s>0};Be.isZero=function(){return this.s===0};Be.lessThan=Be.lt=function(e){return this.cmp(e)<0};Be.lessThanOrEqualTo=Be.lte=function(e){return this.cmp(e)<1};Be.logarithm=Be.log=function(e){var t,n=this,r=n.constructor,a=r.precision,s=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(fa))throw Error(La+"NaN");if(n.s<1)throw Error(La+(n.s?"NaN":"-Infinity"));return n.eq(fa)?new r(0):(an=!1,t=ns(df(n,s),df(e,s),s),an=!0,qt(t,a))};Be.minus=Be.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?WD(t,e):KD(t,(e.s=-e.s,e))};Be.modulo=Be.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(La+"NaN");return n.s?(an=!1,t=ns(n,e,0,1).times(e),an=!0,n.minus(t)):qt(new r(n),a)};Be.naturalExponential=Be.exp=function(){return VD(this)};Be.naturalLogarithm=Be.ln=function(){return df(this)};Be.negated=Be.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Be.plus=Be.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?KD(t,e):WD(t,(e.s=-e.s,e))};Be.precision=Be.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(il+e);if(t=In(a)+1,r=a.d.length-1,n=r*en+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Be.squareRoot=Be.sqrt=function(){var e,t,n,r,a,s,o,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(La+"NaN")}for(e=In(u),an=!1,a=Math.sqrt(+u),a==0||a==1/0?(t=yi(u.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=uc((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new d(t)):r=new d(a.toString()),n=d.precision,a=o=n+3;;)if(s=r,r=s.plus(ns(u,s,o+2)).times(.5),yi(s.d).slice(0,o)===(t=yi(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if(qt(s,n+1,0),s.times(s).eq(u)){r=s;break}}else if(t!="9999")break;o+=4}return an=!0,qt(r,n)};Be.times=Be.mul=function(e){var t,n,r,a,s,o,u,d,f,m=this,p=m.constructor,b=m.d,x=(e=new p(e)).d;if(!m.s||!e.s)return new p(0);for(e.s*=m.s,n=m.e+e.e,d=b.length,f=x.length,d<f&&(s=b,b=x,x=s,o=d,d=f,f=o),s=[],o=d+f,r=o;r--;)s.push(0);for(r=f;--r>=0;){for(t=0,a=d+r;a>r;)u=s[a]+x[r]*b[a-r-1]+t,s[a--]=u%$n|0,t=u/$n|0;s[a]=(s[a]+t)%$n|0}for(;!s[--o];)s.pop();return t?++n:s.shift(),e.d=s,e.e=n,an?qt(e,p.precision):e};Be.toDecimalPlaces=Be.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(wi(e,0,lc),t===void 0?t=r.rounding:wi(t,0,8),qt(n,e+In(n)+1,t))};Be.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=gl(r,!0):(wi(e,0,lc),t===void 0?t=a.rounding:wi(t,0,8),r=qt(new a(r),e+1,t),n=gl(r,!0,e+1)),n};Be.toFixed=function(e,t){var n,r,a=this,s=a.constructor;return e===void 0?gl(a):(wi(e,0,lc),t===void 0?t=s.rounding:wi(t,0,8),r=qt(new s(a),e+In(a)+1,t),n=gl(r.abs(),!1,e+In(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};Be.toInteger=Be.toint=function(){var e=this,t=e.constructor;return qt(new t(e),In(e)+1,t.rounding)};Be.toNumber=function(){return+this};Be.toPower=Be.pow=function(e){var t,n,r,a,s,o,u=this,d=u.constructor,f=12,m=+(e=new d(e));if(!e.s)return new d(fa);if(u=new d(u),!u.s){if(e.s<1)throw Error(La+"Infinity");return u}if(u.eq(fa))return u;if(r=d.precision,e.eq(fa))return qt(u,r);if(t=e.e,n=e.d.length-1,o=t>=n,s=u.s,o){if((n=m<0?-m:m)<=GD){for(a=new d(fa),t=Math.ceil(r/en+4),an=!1;n%2&&(a=a.times(u),tO(a.d,t)),n=uc(n/2),n!==0;)u=u.times(u),tO(u.d,t);return an=!0,e.s<0?new d(fa).div(a):qt(a,r)}}else if(s<0)throw Error(La+"NaN");return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,an=!1,a=e.times(df(u,r+f)),an=!0,a=VD(a),a.s=s,a};Be.toPrecision=function(e,t){var n,r,a=this,s=a.constructor;return e===void 0?(n=In(a),r=gl(a,n<=s.toExpNeg||n>=s.toExpPos)):(wi(e,1,lc),t===void 0?t=s.rounding:wi(t,0,8),a=qt(new s(a),e,t),n=In(a),r=gl(a,e<=n||n<=s.toExpNeg,e)),r};Be.toSignificantDigits=Be.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(wi(e,1,lc),t===void 0?t=r.rounding:wi(t,0,8)),qt(new r(n),e,t)};Be.toString=Be.valueOf=Be.val=Be.toJSON=Be[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=In(e),n=e.constructor;return gl(e,t<=n.toExpNeg||t>=n.toExpPos)};function KD(e,t){var n,r,a,s,o,u,d,f,m=e.constructor,p=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),an?qt(t,p):t;if(d=e.d,f=t.d,o=e.e,a=t.e,d=d.slice(),s=o-a,s){for(s<0?(r=d,s=-s,u=f.length):(r=f,a=o,u=d.length),o=Math.ceil(p/en),u=o>u?o+1:u+1,s>u&&(s=u,r.length=1),r.reverse();s--;)r.push(0);r.reverse()}for(u=d.length,s=f.length,u-s<0&&(s=u,r=f,f=d,d=r),n=0;s;)n=(d[--s]=d[s]+f[s]+n)/$n|0,d[s]%=$n;for(n&&(d.unshift(n),++a),u=d.length;d[--u]==0;)d.pop();return t.d=d,t.e=a,an?qt(t,p):t}function wi(e,t,n){if(e!==~~e||e<t||e>n)throw Error(il+e)}function yi(e){var t,n,r,a=e.length-1,s="",o=e[0];if(a>0){for(s+=o,t=1;t<a;t++)r=e[t]+"",n=en-r.length,n&&(s+=eo(n)),s+=r;o=e[t],r=o+"",n=en-r.length,n&&(s+=eo(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return s+o}var ns=(function(){function e(r,a){var s,o=0,u=r.length;for(r=r.slice();u--;)s=r[u]*a+o,r[u]=s%$n|0,o=s/$n|0;return o&&r.unshift(o),r}function t(r,a,s,o){var u,d;if(s!=o)d=s>o?1:-1;else for(u=d=0;u<s;u++)if(r[u]!=a[u]){d=r[u]>a[u]?1:-1;break}return d}function n(r,a,s){for(var o=0;s--;)r[s]-=o,o=r[s]<a[s]?1:0,r[s]=o*$n+r[s]-a[s];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,s,o){var u,d,f,m,p,b,x,E,_,S,T,C,A,k,I,O,j,H,z=r.constructor,D=r.s==a.s?1:-1,V=r.d,q=a.d;if(!r.s)return new z(r);if(!a.s)throw Error(La+"Division by zero");for(d=r.e-a.e,j=q.length,I=V.length,x=new z(D),E=x.d=[],f=0;q[f]==(V[f]||0);)++f;if(q[f]>(V[f]||0)&&--d,s==null?C=s=z.precision:o?C=s+(In(r)-In(a))+1:C=s,C<0)return new z(0);if(C=C/en+2|0,f=0,j==1)for(m=0,q=q[0],C++;(f<I||m)&&C--;f++)A=m*$n+(V[f]||0),E[f]=A/q|0,m=A%q|0;else{for(m=$n/(q[0]+1)|0,m>1&&(q=e(q,m),V=e(V,m),j=q.length,I=V.length),k=j,_=V.slice(0,j),S=_.length;S<j;)_[S++]=0;H=q.slice(),H.unshift(0),O=q[0],q[1]>=$n/2&&++O;do m=0,u=t(q,_,j,S),u<0?(T=_[0],j!=S&&(T=T*$n+(_[1]||0)),m=T/O|0,m>1?(m>=$n&&(m=$n-1),p=e(q,m),b=p.length,S=_.length,u=t(p,_,b,S),u==1&&(m--,n(p,j<b?H:q,b))):(m==0&&(u=m=1),p=q.slice()),b=p.length,b<S&&p.unshift(0),n(_,p,S),u==-1&&(S=_.length,u=t(q,_,j,S),u<1&&(m++,n(_,j<S?H:q,S))),S=_.length):u===0&&(m++,_=[0]),E[f++]=m,u&&_[0]?_[S++]=V[k]||0:(_=[V[k]],S=1);while((k++<I||_[0]!==void 0)&&C--)}return E[0]||E.shift(),x.e=d,qt(x,o?s+In(x)+1:s)}})();function VD(e,t){var n,r,a,s,o,u,d=0,f=0,m=e.constructor,p=m.precision;if(In(e)>16)throw Error(kE+In(e));if(!e.s)return new m(fa);for(an=!1,u=p,o=new m(.03125);e.abs().gte(.1);)e=e.times(o),f+=5;for(r=Math.log(Ko(2,f))/Math.LN10*2+5|0,u+=r,n=a=s=new m(fa),m.precision=u;;){if(a=qt(a.times(e),u),n=n.times(++d),o=s.plus(ns(a,n,u)),yi(o.d).slice(0,u)===yi(s.d).slice(0,u)){for(;f--;)s=qt(s.times(s),u);return m.precision=p,t==null?(an=!0,qt(s,p)):s}s=o}}function In(e){for(var t=e.e*en,n=e.d[0];n>=10;n/=10)t++;return t}function ky(e,t,n){if(t>e.LN10.sd())throw an=!0,n&&(e.precision=n),Error(La+"LN10 precision limit exceeded");return qt(new e(e.LN10),t)}function eo(e){for(var t="";e--;)t+="0";return t}function df(e,t){var n,r,a,s,o,u,d,f,m,p=1,b=10,x=e,E=x.d,_=x.constructor,S=_.precision;if(x.s<1)throw Error(La+(x.s?"NaN":"-Infinity"));if(x.eq(fa))return new _(0);if(t==null?(an=!1,f=S):f=t,x.eq(10))return t==null&&(an=!0),ky(_,f);if(f+=b,_.precision=f,n=yi(E),r=n.charAt(0),s=In(x),Math.abs(s)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)x=x.times(e),n=yi(x.d),r=n.charAt(0),p++;s=In(x),r>1?(x=new _("0."+n),s++):x=new _(r+"."+n.slice(1))}else return d=ky(_,f+2,S).times(s+""),x=df(new _(r+"."+n.slice(1)),f-b).plus(d),_.precision=S,t==null?(an=!0,qt(x,S)):x;for(u=o=x=ns(x.minus(fa),x.plus(fa),f),m=qt(x.times(x),f),a=3;;){if(o=qt(o.times(m),f),d=u.plus(ns(o,new _(a),f)),yi(d.d).slice(0,f)===yi(u.d).slice(0,f))return u=u.times(2),s!==0&&(u=u.plus(ky(_,f+2,S).times(s+""))),u=ns(u,new _(p),f),_.precision=S,t==null?(an=!0,qt(u,S)):u;u=d,a+=2}}function eO(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=uc(n/en),e.d=[],r=(n+1)%en,n<0&&(r+=en),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=en;r<a;)e.d.push(+t.slice(r,r+=en));t=t.slice(r),r=en-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),an&&(e.e>Fp||e.e<-Fp))throw Error(kE+n)}else e.s=0,e.e=0,e.d=[0];return e}function qt(e,t,n){var r,a,s,o,u,d,f,m,p=e.d;for(o=1,s=p[0];s>=10;s/=10)o++;if(r=t-o,r<0)r+=en,a=t,f=p[m=0];else{if(m=Math.ceil((r+1)/en),s=p.length,m>=s)return e;for(f=s=p[m],o=1;s>=10;s/=10)o++;r%=en,a=r-en+o}if(n!==void 0&&(s=Ko(10,o-a-1),u=f/s%10|0,d=t<0||p[m+1]!==void 0||f%s,d=n<4?(u||d)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||d||n==6&&(r>0?a>0?f/Ko(10,o-a):0:p[m-1])%10&1||n==(e.s<0?8:7))),t<1||!p[0])return d?(s=In(e),p.length=1,t=t-s-1,p[0]=Ko(10,(en-t%en)%en),e.e=uc(-t/en)||0):(p.length=1,p[0]=e.e=e.s=0),e;if(r==0?(p.length=m,s=1,m--):(p.length=m+1,s=Ko(10,en-r),p[m]=a>0?(f/Ko(10,o-a)%Ko(10,a)|0)*s:0),d)for(;;)if(m==0){(p[0]+=s)==$n&&(p[0]=1,++e.e);break}else{if(p[m]+=s,p[m]!=$n)break;p[m--]=0,s=1}for(r=p.length;p[--r]===0;)p.pop();if(an&&(e.e>Fp||e.e<-Fp))throw Error(kE+In(e));return e}function WD(e,t){var n,r,a,s,o,u,d,f,m,p,b=e.constructor,x=b.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new b(e),an?qt(t,x):t;if(d=e.d,p=t.d,r=t.e,f=e.e,d=d.slice(),o=f-r,o){for(m=o<0,m?(n=d,o=-o,u=p.length):(n=p,r=f,u=d.length),a=Math.max(Math.ceil(x/en),u)+2,o>a&&(o=a,n.length=1),n.reverse(),a=o;a--;)n.push(0);n.reverse()}else{for(a=d.length,u=p.length,m=a<u,m&&(u=a),a=0;a<u;a++)if(d[a]!=p[a]){m=d[a]<p[a];break}o=0}for(m&&(n=d,d=p,p=n,t.s=-t.s),u=d.length,a=p.length-u;a>0;--a)d[u++]=0;for(a=p.length;a>o;){if(d[--a]<p[a]){for(s=a;s&&d[--s]===0;)d[s]=$n-1;--d[s],d[a]+=$n}d[a]-=p[a]}for(;d[--u]===0;)d.pop();for(;d[0]===0;d.shift())--r;return d[0]?(t.d=d,t.e=r,an?qt(t,x):t):new b(0)}function gl(e,t,n){var r,a=In(e),s=yi(e.d),o=s.length;return t?(n&&(r=n-o)>0?s=s.charAt(0)+"."+s.slice(1)+eo(r):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(a<0?"e":"e+")+a):a<0?(s="0."+eo(-a-1)+s,n&&(r=n-o)>0&&(s+=eo(r))):a>=o?(s+=eo(a+1-o),n&&(r=n-a-1)>0&&(s=s+"."+eo(r))):((r=a+1)<o&&(s=s.slice(0,r)+"."+s.slice(r)),n&&(r=n-o)>0&&(a+1===o&&(s+="."),s+=eo(r))),e.s<0?"-"+s:s}function tO(e,t){if(e.length>t)return e.length=t,!0}function XD(e){var t,n,r;function a(s){var o=this;if(!(o instanceof a))return new a(s);if(o.constructor=a,s instanceof a){o.s=s.s,o.e=s.e,o.d=(s=s.d)?s.slice():s;return}if(typeof s=="number"){if(s*0!==0)throw Error(il+s);if(s>0)o.s=1;else if(s<0)s=-s,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(s===~~s&&s<1e7){o.e=0,o.d=[s];return}return eO(o,s.toString())}else if(typeof s!="string")throw Error(il+s);if(s.charCodeAt(0)===45?(s=s.slice(1),o.s=-1):o.s=1,nue.test(s))eO(o,s);else throw Error(il+s)}if(a.prototype=Be,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=XD,a.config=a.set=rue,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return a.config(e),a}function rue(e){if(!e||typeof e!="object")throw Error(La+"Object expected");var t,n,r,a=["precision",1,lc,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((r=e[n=a[t]])!==void 0)if(uc(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(il+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(il+n+": "+r);return this}var OE=XD(tue);fa=new OE(1);const _t=OE;function QD(e){var t;return e===0?t=1:t=Math.floor(new _t(e).abs().log(10).toNumber())+1,t}function ZD(e,t,n){for(var r=new _t(e),a=0,s=[];r.lt(t)&&a<1e5;)s.push(r.toNumber()),r=r.add(n),a++;return s}function ff(e,t){return oue(e)||sue(e,t)||iue(e,t)||aue()}function aue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
608
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iue(e,t){if(e){if(typeof e=="string")return nO(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nO(e,t):void 0}}function nO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function sue(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function oue(e){if(Array.isArray(e))return e}var JD=e=>{var t=ff(e,2),n=t[0],r=t[1],a=n,s=r;return n>r&&(a=r,s=n),[a,s]},IE=(e,t,n)=>{if(e.lte(0))return new _t(0);var r=QD(e.toNumber()),a=new _t(10).pow(r),s=e.div(a),o=r!==1?.05:.1,u=new _t(Math.ceil(s.div(o).toNumber())).add(n).mul(o),d=u.mul(a);return t?new _t(d.toNumber()):new _t(Math.ceil(d.toNumber()))},ej=(e,t,n)=>{var r;if(e.lte(0))return new _t(0);var a=[1,2,2.5,5],s=e.toNumber(),o=Math.floor(new _t(s).abs().log(10).toNumber()),u=new _t(10).pow(o),d=e.div(u).toNumber(),f=a.findIndex(x=>x>=d-1e-10);if(f===-1&&(u=u.mul(10),f=0),f+=n,f>=a.length){var m=Math.floor(f/a.length);f%=a.length,u=u.mul(new _t(10).pow(m))}var p=(r=a[f])!==null&&r!==void 0?r:1,b=new _t(p).mul(u);return t?b:new _t(Math.ceil(b.toNumber()))},lue=(e,t,n)=>{var r=new _t(1),a=new _t(e);if(!a.isint()&&n){var s=Math.abs(e);s<1?(r=new _t(10).pow(QD(e)-1),a=new _t(Math.floor(a.div(r).toNumber())).mul(r)):s>1&&(a=new _t(Math.floor(e)))}else e===0?a=new _t(Math.floor((t-1)/2)):n||(a=new _t(Math.floor(e)));for(var o=Math.floor((t-1)/2),u=[],d=0;d<t;d++)u.push(a.add(new _t(d-o).mul(r)).toNumber());return u},tj=function(t,n,r,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:IE;if(!Number.isFinite((n-t)/(r-1)))return{step:new _t(0),tickMin:new _t(0),tickMax:new _t(0)};var u=o(new _t(n).sub(t).div(r-1),a,s),d;t<=0&&n>=0?d=new _t(0):(d=new _t(t).add(n).div(2),d=d.sub(new _t(d).mod(u)));var f=Math.ceil(d.sub(t).div(u).toNumber()),m=Math.ceil(new _t(n).sub(d).div(u).toNumber()),p=f+m+1;return p>r?tj(t,n,r,a,s+1,o):(p<r&&(m=n>0?m+(r-p):m,f=n>0?f:f+(r-p)),{step:u,tickMin:d.sub(new _t(f).mul(u)),tickMax:d.add(new _t(m).mul(u))})},rO=function(t){var n=ff(t,2),r=n[0],a=n[1],s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",d=Math.max(s,2),f=JD([r,a]),m=ff(f,2),p=m[0],b=m[1];if(p===-1/0||b===1/0){var x=b===1/0?[p,...Array(s-1).fill(1/0)]:[...Array(s-1).fill(-1/0),b];return r>a?x.reverse():x}if(p===b)return lue(p,s,o);var E=u==="snap125"?ej:IE,_=tj(p,b,d,o,0,E),S=_.step,T=_.tickMin,C=_.tickMax,A=ZD(T,C.add(new _t(.1).mul(S)),S);return r>a?A.reverse():A},aO=function(t,n){var r=ff(t,2),a=r[0],s=r[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",d=JD([a,s]),f=ff(d,2),m=f[0],p=f[1];if(m===-1/0||p===1/0)return[a,s];if(m===p)return[m];var b=u==="snap125"?ej:IE,x=Math.max(n,2),E=b(new _t(p).sub(m).div(x-1),o,0),_=[...ZD(new _t(m),new _t(p),E),p];if(o===!1){_=_.map(T=>Math.round(T));var S=_.length-1;S>0&&_[S]===_[S-1]&&(_=_.slice(0,S))}return a>s?_.reverse():_},nj=e=>e.rootProps.maxBarSize,uue=e=>e.rootProps.barGap,rj=e=>e.rootProps.barCategoryGap,cue=e=>e.rootProps.barSize,Q0=e=>e.rootProps.stackOffset,aj=e=>e.rootProps.reverseStackOrder,RE=e=>e.options.chartName,ME=e=>e.rootProps.syncId,ij=e=>e.rootProps.syncMethod,DE=e=>e.options.eventEmitter,Rr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Fo={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},hi={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Z0=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function J0(e,t,n){if(n!=="auto")return n;if(e!=null)return ho(e,t)?"category":"number"}function iO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Hp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iO(Object(n),!0).forEach(function(r){due(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function due(e,t,n){return(t=fue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fue(e){var t=hue(e,"string");return typeof t=="symbol"?t:t+""}function hue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sO={allowDataOverflow:Fo.allowDataOverflow,allowDecimals:Fo.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Fo.angleAxisId,includeHidden:!1,name:void 0,reversed:Fo.reversed,scale:Fo.scale,tick:Fo.tick,tickCount:void 0,ticks:void 0,type:Fo.type,unit:void 0,niceTicks:"auto"},oO={allowDataOverflow:hi.allowDataOverflow,allowDecimals:hi.allowDecimals,allowDuplicatedCategory:hi.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:hi.radiusAxisId,includeHidden:hi.includeHidden,name:void 0,reversed:hi.reversed,scale:hi.scale,tick:hi.tick,tickCount:hi.tickCount,ticks:void 0,type:hi.type,unit:void 0,niceTicks:"auto"},mue=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},jE=ue([mue,RD],(e,t)=>{var n;if(e!=null)return e;var r=(n=J0(t,"angleAxis",sO.type))!==null&&n!==void 0?n:"category";return Hp(Hp({},sO),{},{type:r})}),pue=(e,t)=>e.polarAxis.radiusAxis[t],LE=ue([pue,RD],(e,t)=>{var n;if(e!=null)return e;var r=(n=J0(t,"radiusAxis",oO.type))!==null&&n!==void 0?n:"category";return Hp(Hp({},oO),{},{type:r})}),eg=e=>e.polarOptions,PE=ue([ms,ps,Kn],jle),sj=ue([eg,PE],(e,t)=>{if(e!=null)return Za(e.innerRadius,t,0)}),oj=ue([eg,PE],(e,t)=>{if(e!=null)return Za(e.outerRadius,t,t*.8)}),gue=e=>{if(e==null)return[0,0];var t=e.startAngle,n=e.endAngle;return[t,n]},lj=ue([eg],gue);ue([jE,lj],Z0);var uj=ue([PE,sj,oj],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});ue([LE,uj],Z0);var cj=ue([Kt,eg,sj,oj,ms,ps],(e,t,n,r,a,s)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var o=t.cx,u=t.cy,d=t.startAngle,f=t.endAngle;return{cx:Za(o,a,a/2),cy:Za(u,s,s/2),innerRadius:n,outerRadius:r,startAngle:d,endAngle:f,clockWise:!1}}}),Vn=(e,t)=>t,tg=(e,t,n)=>n;function BE(e){return e==null?void 0:e.id}function dj(e,t,n){var r=t.chartData,a=r===void 0?[]:r,s=n.allowDuplicatedCategory,o=n.dataKey,u=new Map;return e.forEach(d=>{var f,m=(f=d.data)!==null&&f!==void 0?f:a;if(!(m==null||m.length===0)){var p=BE(d);m.forEach((b,x)=>{var E=o==null||s?x:String(Gn(b,o,null)),_=Gn(b,d.dataKey,0),S;u.has(E)?S=u.get(E):S={},Object.assign(S,{[p]:_}),u.set(E,S)})}}),Array.from(u.values())}function ng(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Hf=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function rg(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function bue(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var Wn=e=>{var t=Kt(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},cc=e=>e.tooltip.settings.axisId;function UE(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),a=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:(function(s){function o(){return s.apply(this,arguments)}return o.toString=function(){return s.toString()},o})(()=>a),rangeMin:()=>a[0],rangeMax:()=>a[1],isInRange(s){var o=a[0],u=a[1];return o<=u?s>=o&&s<=u:s>=u&&s<=o},bandwidth:n?()=>n.call(e):void 0,ticks:t?s=>t.call(e,s):void 0,map:(s,o)=>{var u=e(s);if(u!=null){if(e.bandwidth&&o!==null&&o!==void 0&&o.position){var d=e.bandwidth();switch(o.position){case"middle":u+=d/2;break;case"end":u+=d;break}}return u}}}}}var xue=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!vi(t)){for(var n,r,a=0;a<t.length;a++){var s=t[a];Nt(s)&&((n===void 0||s<n)&&(n=s),(r===void 0||s>r)&&(r=s))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t}default:return t}};function so(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function yue(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function zE(e){let t,n,r;e.length!==2?(t=so,n=(u,d)=>so(e(u),d),r=(u,d)=>e(u)-d):(t=e===so||e===yue?e:vue,n=e,r=e);function a(u,d,f=0,m=u.length){if(f<m){if(t(d,d)!==0)return m;do{const p=f+m>>>1;n(u[p],d)<0?f=p+1:m=p}while(f<m)}return f}function s(u,d,f=0,m=u.length){if(f<m){if(t(d,d)!==0)return m;do{const p=f+m>>>1;n(u[p],d)<=0?f=p+1:m=p}while(f<m)}return f}function o(u,d,f=0,m=u.length){const p=a(u,d,f,m-1);return p>f&&r(u[p-1],d)>-r(u[p],d)?p-1:p}return{left:a,center:o,right:s}}function vue(){return 0}function fj(e){return e===null?NaN:+e}function*Eue(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const _ue=zE(so),$f=_ue.right;zE(fj).center;class lO extends Map{constructor(t,n=Sue){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(uO(this,t))}has(t){return super.has(uO(this,t))}set(t,n){return super.set(Nue(this,t),n)}delete(t){return super.delete(Tue(this,t))}}function uO({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Nue({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Tue({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Sue(e){return e!==null&&typeof e=="object"?e.valueOf():e}function wue(e=so){if(e===so)return hj;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function hj(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Aue=Math.sqrt(50),Cue=Math.sqrt(10),kue=Math.sqrt(2);function $p(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),s=r/Math.pow(10,a),o=s>=Aue?10:s>=Cue?5:s>=kue?2:1;let u,d,f;return a<0?(f=Math.pow(10,-a)/o,u=Math.round(e*f),d=Math.round(t*f),u/f<e&&++u,d/f>t&&--d,f=-f):(f=Math.pow(10,a)*o,u=Math.round(e/f),d=Math.round(t/f),u*f<e&&++u,d*f>t&&--d),d<u&&.5<=n&&n<2?$p(e,t,n*2):[u,d,f]}function Gv(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[a,s,o]=r?$p(t,e,n):$p(e,t,n);if(!(s>=a))return[];const u=s-a+1,d=new Array(u);if(r)if(o<0)for(let f=0;f<u;++f)d[f]=(s-f)/-o;else for(let f=0;f<u;++f)d[f]=(s-f)*o;else if(o<0)for(let f=0;f<u;++f)d[f]=(a+f)/-o;else for(let f=0;f<u;++f)d[f]=(a+f)*o;return d}function Kv(e,t,n){return t=+t,e=+e,n=+n,$p(e,t,n)[2]}function Vv(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?Kv(t,e,n):Kv(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}function cO(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function dO(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function mj(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?hj:wue(a);r>n;){if(r-n>600){const d=r-n+1,f=t-n+1,m=Math.log(d),p=.5*Math.exp(2*m/3),b=.5*Math.sqrt(m*p*(d-p)/d)*(f-d/2<0?-1:1),x=Math.max(n,Math.floor(t-f*p/d+b)),E=Math.min(r,Math.floor(t+(d-f)*p/d+b));mj(e,t,x,E,a)}const s=e[t];let o=n,u=r;for(Sd(e,n,t),a(e[r],s)>0&&Sd(e,n,r);o<u;){for(Sd(e,o,u),++o,--u;a(e[o],s)<0;)++o;for(;a(e[u],s)>0;)--u}a(e[n],s)===0?Sd(e,n,u):(++u,Sd(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function Sd(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Oue(e,t,n){if(e=Float64Array.from(Eue(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return dO(e);if(t>=1)return cO(e);var r,a=(r-1)*t,s=Math.floor(a),o=cO(mj(e,s).subarray(0,s+1)),u=dO(e.subarray(s+1));return o+(u-o)*(a-s)}}function Iue(e,t,n=fj){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,s=Math.floor(a),o=+n(e[s],s,e),u=+n(e[s+1],s+1,e);return o+(u-o)*(a-s)}}function Rue(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(a);++r<a;)s[r]=e+r*n;return s}function Ua(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function gs(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Wv=Symbol("implicit");function FE(){var e=new lO,t=[],n=[],r=Wv;function a(s){let o=e.get(s);if(o===void 0){if(r!==Wv)return r;e.set(s,o=t.push(s)-1)}return n[o%n.length]}return a.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new lO;for(const o of s)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(s){return arguments.length?(n=Array.from(s),a):n.slice()},a.unknown=function(s){return arguments.length?(r=s,a):r},a.copy=function(){return FE(t,n).unknown(r)},Ua.apply(a,arguments),a}function HE(){var e=FE().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,s,o,u=!1,d=0,f=0,m=.5;delete e.unknown;function p(){var b=t().length,x=a<r,E=x?a:r,_=x?r:a;s=(_-E)/Math.max(1,b-d+f*2),u&&(s=Math.floor(s)),E+=(_-E-s*(b-d))*m,o=s*(1-d),u&&(E=Math.round(E),o=Math.round(o));var S=Rue(b).map(function(T){return E+s*T});return n(x?S.reverse():S)}return e.domain=function(b){return arguments.length?(t(b),p()):t()},e.range=function(b){return arguments.length?([r,a]=b,r=+r,a=+a,p()):[r,a]},e.rangeRound=function(b){return[r,a]=b,r=+r,a=+a,u=!0,p()},e.bandwidth=function(){return o},e.step=function(){return s},e.round=function(b){return arguments.length?(u=!!b,p()):u},e.padding=function(b){return arguments.length?(d=Math.min(1,f=+b),p()):d},e.paddingInner=function(b){return arguments.length?(d=Math.min(1,b),p()):d},e.paddingOuter=function(b){return arguments.length?(f=+b,p()):f},e.align=function(b){return arguments.length?(m=Math.max(0,Math.min(1,b)),p()):m},e.copy=function(){return HE(t(),[r,a]).round(u).paddingInner(d).paddingOuter(f).align(m)},Ua.apply(p(),arguments)}function pj(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return pj(t())},e}function Mue(){return pj(HE.apply(null,arguments).paddingInner(1))}function $E(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function gj(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Yf(){}var hf=.7,Yp=1/hf,Ru="\\s*([+-]?\\d+)\\s*",mf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ei="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Due=/^#([0-9a-f]{3,8})$/,jue=new RegExp(`^rgb\\(${Ru},${Ru},${Ru}\\)$`),Lue=new RegExp(`^rgb\\(${Ei},${Ei},${Ei}\\)$`),Pue=new RegExp(`^rgba\\(${Ru},${Ru},${Ru},${mf}\\)$`),Bue=new RegExp(`^rgba\\(${Ei},${Ei},${Ei},${mf}\\)$`),Uue=new RegExp(`^hsl\\(${mf},${Ei},${Ei}\\)$`),zue=new RegExp(`^hsla\\(${mf},${Ei},${Ei},${mf}\\)$`),fO={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};$E(Yf,pf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:hO,formatHex:hO,formatHex8:Fue,formatHsl:Hue,formatRgb:mO,toString:mO});function hO(){return this.rgb().formatHex()}function Fue(){return this.rgb().formatHex8()}function Hue(){return bj(this).formatHsl()}function mO(){return this.rgb().formatRgb()}function pf(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Due.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?pO(t):n===3?new Qr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Dm(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Dm(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=jue.exec(e))?new Qr(t[1],t[2],t[3],1):(t=Lue.exec(e))?new Qr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Pue.exec(e))?Dm(t[1],t[2],t[3],t[4]):(t=Bue.exec(e))?Dm(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Uue.exec(e))?xO(t[1],t[2]/100,t[3]/100,1):(t=zue.exec(e))?xO(t[1],t[2]/100,t[3]/100,t[4]):fO.hasOwnProperty(e)?pO(fO[e]):e==="transparent"?new Qr(NaN,NaN,NaN,0):null}function pO(e){return new Qr(e>>16&255,e>>8&255,e&255,1)}function Dm(e,t,n,r){return r<=0&&(e=t=n=NaN),new Qr(e,t,n,r)}function $ue(e){return e instanceof Yf||(e=pf(e)),e?(e=e.rgb(),new Qr(e.r,e.g,e.b,e.opacity)):new Qr}function Xv(e,t,n,r){return arguments.length===1?$ue(e):new Qr(e,t,n,r??1)}function Qr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}$E(Qr,Xv,gj(Yf,{brighter(e){return e=e==null?Yp:Math.pow(Yp,e),new Qr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?hf:Math.pow(hf,e),new Qr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Qr(sl(this.r),sl(this.g),sl(this.b),qp(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:gO,formatHex:gO,formatHex8:Yue,formatRgb:bO,toString:bO}));function gO(){return`#${Zo(this.r)}${Zo(this.g)}${Zo(this.b)}`}function Yue(){return`#${Zo(this.r)}${Zo(this.g)}${Zo(this.b)}${Zo((isNaN(this.opacity)?1:this.opacity)*255)}`}function bO(){const e=qp(this.opacity);return`${e===1?"rgb(":"rgba("}${sl(this.r)}, ${sl(this.g)}, ${sl(this.b)}${e===1?")":`, ${e})`}`}function qp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function sl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zo(e){return e=sl(e),(e<16?"0":"")+e.toString(16)}function xO(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Wa(e,t,n,r)}function bj(e){if(e instanceof Wa)return new Wa(e.h,e.s,e.l,e.opacity);if(e instanceof Yf||(e=pf(e)),!e)return new Wa;if(e instanceof Wa)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),s=Math.max(t,n,r),o=NaN,u=s-a,d=(s+a)/2;return u?(t===s?o=(n-r)/u+(n<r)*6:n===s?o=(r-t)/u+2:o=(t-n)/u+4,u/=d<.5?s+a:2-s-a,o*=60):u=d>0&&d<1?0:o,new Wa(o,u,d,e.opacity)}function que(e,t,n,r){return arguments.length===1?bj(e):new Wa(e,t,n,r??1)}function Wa(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}$E(Wa,que,gj(Yf,{brighter(e){return e=e==null?Yp:Math.pow(Yp,e),new Wa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hf:Math.pow(hf,e),new Wa(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new Qr(Oy(e>=240?e-240:e+120,a,r),Oy(e,a,r),Oy(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Wa(yO(this.h),jm(this.s),jm(this.l),qp(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=qp(this.opacity);return`${e===1?"hsl(":"hsla("}${yO(this.h)}, ${jm(this.s)*100}%, ${jm(this.l)*100}%${e===1?")":`, ${e})`}`}}));function yO(e){return e=(e||0)%360,e<0?e+360:e}function jm(e){return Math.max(0,Math.min(1,e||0))}function Oy(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const YE=e=>()=>e;function Gue(e,t){return function(n){return e+n*t}}function Kue(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Vue(e){return(e=+e)==1?xj:function(t,n){return n-t?Kue(t,n,e):YE(isNaN(t)?n:t)}}function xj(e,t){var n=t-e;return n?Gue(e,n):YE(isNaN(e)?t:e)}const vO=(function e(t){var n=Vue(t);function r(a,s){var o=n((a=Xv(a)).r,(s=Xv(s)).r),u=n(a.g,s.g),d=n(a.b,s.b),f=xj(a.opacity,s.opacity);return function(m){return a.r=o(m),a.g=u(m),a.b=d(m),a.opacity=f(m),a+""}}return r.gamma=e,r})(1);function Wue(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(s){for(a=0;a<n;++a)r[a]=e[a]*(1-s)+t[a]*s;return r}}function Xue(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Que(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),s=new Array(n),o;for(o=0;o<r;++o)a[o]=dc(e[o],t[o]);for(;o<n;++o)s[o]=t[o];return function(u){for(o=0;o<r;++o)s[o]=a[o](u);return s}}function Zue(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Gp(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Jue(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=dc(e[a],t[a]):r[a]=t[a];return function(s){for(a in n)r[a]=n[a](s);return r}}var Qv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Iy=new RegExp(Qv.source,"g");function ece(e){return function(){return e}}function tce(e){return function(t){return e(t)+""}}function nce(e,t){var n=Qv.lastIndex=Iy.lastIndex=0,r,a,s,o=-1,u=[],d=[];for(e=e+"",t=t+"";(r=Qv.exec(e))&&(a=Iy.exec(t));)(s=a.index)>n&&(s=t.slice(n,s),u[o]?u[o]+=s:u[++o]=s),(r=r[0])===(a=a[0])?u[o]?u[o]+=a:u[++o]=a:(u[++o]=null,d.push({i:o,x:Gp(r,a)})),n=Iy.lastIndex;return n<t.length&&(s=t.slice(n),u[o]?u[o]+=s:u[++o]=s),u.length<2?d[0]?tce(d[0].x):ece(t):(t=d.length,function(f){for(var m=0,p;m<t;++m)u[(p=d[m]).i]=p.x(f);return u.join("")})}function dc(e,t){var n=typeof t,r;return t==null||n==="boolean"?YE(t):(n==="number"?Gp:n==="string"?(r=pf(t))?(t=r,vO):nce:t instanceof pf?vO:t instanceof Date?Zue:Xue(t)?Wue:Array.isArray(t)?Que:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Jue:Gp)(e,t)}function qE(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function rce(e,t){t===void 0&&(t=e,e=dc);for(var n=0,r=t.length-1,a=t[0],s=new Array(r<0?0:r);n<r;)s[n]=e(a,a=t[++n]);return function(o){var u=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return s[u](o-u)}}function ace(e){return function(){return e}}function Kp(e){return+e}var EO=[0,1];function Mr(e){return e}function Zv(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:ace(isNaN(t)?NaN:.5)}function ice(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function sce(e,t,n){var r=e[0],a=e[1],s=t[0],o=t[1];return a<r?(r=Zv(a,r),s=n(o,s)):(r=Zv(r,a),s=n(s,o)),function(u){return s(r(u))}}function oce(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),s=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)a[o]=Zv(e[o],e[o+1]),s[o]=n(t[o],t[o+1]);return function(u){var d=$f(e,u,1,r)-1;return s[d](a[d](u))}}function qf(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ag(){var e=EO,t=EO,n=dc,r,a,s,o=Mr,u,d,f;function m(){var b=Math.min(e.length,t.length);return o!==Mr&&(o=ice(e[0],e[b-1])),u=b>2?oce:sce,d=f=null,p}function p(b){return b==null||isNaN(b=+b)?s:(d||(d=u(e.map(r),t,n)))(r(o(b)))}return p.invert=function(b){return o(a((f||(f=u(t,e.map(r),Gp)))(b)))},p.domain=function(b){return arguments.length?(e=Array.from(b,Kp),m()):e.slice()},p.range=function(b){return arguments.length?(t=Array.from(b),m()):t.slice()},p.rangeRound=function(b){return t=Array.from(b),n=qE,m()},p.clamp=function(b){return arguments.length?(o=b?!0:Mr,m()):o!==Mr},p.interpolate=function(b){return arguments.length?(n=b,m()):n},p.unknown=function(b){return arguments.length?(s=b,p):s},function(b,x){return r=b,a=x,m()}}function GE(){return ag()(Mr,Mr)}function lce(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Vp(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function $u(e){return e=Vp(Math.abs(e)),e?e[1]:NaN}function uce(e,t){return function(n,r){for(var a=n.length,s=[],o=0,u=e[0],d=0;a>0&&u>0&&(d+u+1>r&&(u=Math.max(1,r-d)),s.push(n.substring(a-=u,a+u)),!((d+=u+1)>r));)u=e[o=(o+1)%e.length];return s.reverse().join(t)}}function cce(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var dce=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function gf(e){if(!(t=dce.exec(e)))throw new Error("invalid format: "+e);var t;return new KE({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}gf.prototype=KE.prototype;function KE(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}KE.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function fce(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var Wp;function hce(e,t){var n=Vp(e,t);if(!n)return Wp=void 0,e.toPrecision(t);var r=n[0],a=n[1],s=a-(Wp=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=r.length;return s===o?r:s>o?r+new Array(s-o+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+Vp(e,Math.max(0,t+s-1))[0]}function _O(e,t){var n=Vp(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const NO={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:lce,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>_O(e*100,t),r:_O,s:hce,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function TO(e){return e}var SO=Array.prototype.map,wO=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mce(e){var t=e.grouping===void 0||e.thousands===void 0?TO:uce(SO.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?TO:cce(SO.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",d=e.nan===void 0?"NaN":e.nan+"";function f(p,b){p=gf(p);var x=p.fill,E=p.align,_=p.sign,S=p.symbol,T=p.zero,C=p.width,A=p.comma,k=p.precision,I=p.trim,O=p.type;O==="n"?(A=!0,O="g"):NO[O]||(k===void 0&&(k=12),I=!0,O="g"),(T||x==="0"&&E==="=")&&(T=!0,x="0",E="=");var j=(b&&b.prefix!==void 0?b.prefix:"")+(S==="$"?n:S==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),H=(S==="$"?r:/[%p]/.test(O)?o:"")+(b&&b.suffix!==void 0?b.suffix:""),z=NO[O],D=/[defgprs%]/.test(O);k=k===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function V(q){var ae=j,Q=H,W,G,F;if(O==="c")Q=z(q)+Q,q="";else{q=+q;var $=q<0||1/q<0;if(q=isNaN(q)?d:z(Math.abs(q),k),I&&(q=fce(q)),$&&+q==0&&_!=="+"&&($=!1),ae=($?_==="("?_:u:_==="-"||_==="("?"":_)+ae,Q=(O==="s"&&!isNaN(q)&&Wp!==void 0?wO[8+Wp/3]:"")+Q+($&&_==="("?")":""),D){for(W=-1,G=q.length;++W<G;)if(F=q.charCodeAt(W),48>F||F>57){Q=(F===46?a+q.slice(W+1):q.slice(W))+Q,q=q.slice(0,W);break}}}A&&!T&&(q=t(q,1/0));var K=ae.length+q.length+Q.length,L=K<C?new Array(C-K+1).join(x):"";switch(A&&T&&(q=t(L+q,L.length?C-Q.length:1/0),L=""),E){case"<":q=ae+q+Q+L;break;case"=":q=ae+L+q+Q;break;case"^":q=L.slice(0,K=L.length>>1)+ae+q+Q+L.slice(K);break;default:q=L+ae+q+Q;break}return s(q)}return V.toString=function(){return p+""},V}function m(p,b){var x=Math.max(-8,Math.min(8,Math.floor($u(b)/3)))*3,E=Math.pow(10,-x),_=f((p=gf(p),p.type="f",p),{suffix:wO[8+x/3]});return function(S){return _(E*S)}}return{format:f,formatPrefix:m}}var Lm,VE,yj;pce({thousands:",",grouping:[3],currency:["$",""]});function pce(e){return Lm=mce(e),VE=Lm.format,yj=Lm.formatPrefix,Lm}function gce(e){return Math.max(0,-$u(Math.abs(e)))}function bce(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($u(t)/3)))*3-$u(Math.abs(e)))}function xce(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$u(t)-$u(e))+1}function vj(e,t,n,r){var a=Vv(e,t,n),s;switch(r=gf(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=bce(a,o))&&(r.precision=s),yj(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=xce(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=gce(a))&&(r.precision=s-(r.type==="%")*2);break}}return VE(r)}function mo(e){var t=e.domain;return e.ticks=function(n){var r=t();return Gv(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return vj(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,s=r.length-1,o=r[a],u=r[s],d,f,m=10;for(u<o&&(f=o,o=u,u=f,f=a,a=s,s=f);m-- >0;){if(f=Kv(o,u,n),f===d)return r[a]=o,r[s]=u,t(r);if(f>0)o=Math.floor(o/f)*f,u=Math.ceil(u/f)*f;else if(f<0)o=Math.ceil(o*f)/f,u=Math.floor(u*f)/f;else break;d=f}return e},e}function Ej(){var e=GE();return e.copy=function(){return qf(e,Ej())},Ua.apply(e,arguments),mo(e)}function _j(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Kp),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return _j(e).unknown(t)},e=arguments.length?Array.from(e,Kp):[0,1],mo(n)}function Nj(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],s=e[r],o;return s<a&&(o=n,n=r,r=o,o=a,a=s,s=o),e[n]=t.floor(a),e[r]=t.ceil(s),e}function AO(e){return Math.log(e)}function CO(e){return Math.exp(e)}function yce(e){return-Math.log(-e)}function vce(e){return-Math.exp(-e)}function Ece(e){return isFinite(e)?+("1e"+e):e<0?0:e}function _ce(e){return e===10?Ece:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Nce(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function kO(e){return(t,n)=>-e(-t,n)}function WE(e){const t=e(AO,CO),n=t.domain;let r=10,a,s;function o(){return a=Nce(r),s=_ce(r),n()[0]<0?(a=kO(a),s=kO(s),e(yce,vce)):e(AO,CO),t}return t.base=function(u){return arguments.length?(r=+u,o()):r},t.domain=function(u){return arguments.length?(n(u),o()):n()},t.ticks=u=>{const d=n();let f=d[0],m=d[d.length-1];const p=m<f;p&&([f,m]=[m,f]);let b=a(f),x=a(m),E,_;const S=u==null?10:+u;let T=[];if(!(r%1)&&x-b<S){if(b=Math.floor(b),x=Math.ceil(x),f>0){for(;b<=x;++b)for(E=1;E<r;++E)if(_=b<0?E/s(-b):E*s(b),!(_<f)){if(_>m)break;T.push(_)}}else for(;b<=x;++b)for(E=r-1;E>=1;--E)if(_=b>0?E/s(-b):E*s(b),!(_<f)){if(_>m)break;T.push(_)}T.length*2<S&&(T=Gv(f,m,S))}else T=Gv(b,x,Math.min(x-b,S)).map(s);return p?T.reverse():T},t.tickFormat=(u,d)=>{if(u==null&&(u=10),d==null&&(d=r===10?"s":","),typeof d!="function"&&(!(r%1)&&(d=gf(d)).precision==null&&(d.trim=!0),d=VE(d)),u===1/0)return d;const f=Math.max(1,r*u/t.ticks().length);return m=>{let p=m/s(Math.round(a(m)));return p*r<r-.5&&(p*=r),p<=f?d(m):""}},t.nice=()=>n(Nj(n(),{floor:u=>s(Math.floor(a(u))),ceil:u=>s(Math.ceil(a(u)))})),t}function Tj(){const e=WE(ag()).domain([1,10]);return e.copy=()=>qf(e,Tj()).base(e.base()),Ua.apply(e,arguments),e}function OO(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function IO(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function XE(e){var t=1,n=e(OO(t),IO(t));return n.constant=function(r){return arguments.length?e(OO(t=+r),IO(t)):t},mo(n)}function Sj(){var e=XE(ag());return e.copy=function(){return qf(e,Sj()).constant(e.constant())},Ua.apply(e,arguments)}function RO(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Tce(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Sce(e){return e<0?-e*e:e*e}function QE(e){var t=e(Mr,Mr),n=1;function r(){return n===1?e(Mr,Mr):n===.5?e(Tce,Sce):e(RO(n),RO(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},mo(t)}function ZE(){var e=QE(ag());return e.copy=function(){return qf(e,ZE()).exponent(e.exponent())},Ua.apply(e,arguments),e}function wce(){return ZE.apply(null,arguments).exponent(.5)}function MO(e){return Math.sign(e)*e*e}function Ace(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function wj(){var e=GE(),t=[0,1],n=!1,r;function a(s){var o=Ace(e(s));return isNaN(o)?r:n?Math.round(o):o}return a.invert=function(s){return e.invert(MO(s))},a.domain=function(s){return arguments.length?(e.domain(s),a):e.domain()},a.range=function(s){return arguments.length?(e.range((t=Array.from(s,Kp)).map(MO)),a):t.slice()},a.rangeRound=function(s){return a.range(s).round(!0)},a.round=function(s){return arguments.length?(n=!!s,a):n},a.clamp=function(s){return arguments.length?(e.clamp(s),a):e.clamp()},a.unknown=function(s){return arguments.length?(r=s,a):r},a.copy=function(){return wj(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Ua.apply(a,arguments),mo(a)}function Aj(){var e=[],t=[],n=[],r;function a(){var o=0,u=Math.max(1,t.length);for(n=new Array(u-1);++o<u;)n[o-1]=Iue(e,o/u);return s}function s(o){return o==null||isNaN(o=+o)?r:t[$f(n,o)]}return s.invertExtent=function(o){var u=t.indexOf(o);return u<0?[NaN,NaN]:[u>0?n[u-1]:e[0],u<n.length?n[u]:e[e.length-1]]},s.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let u of o)u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(so),a()},s.range=function(o){return arguments.length?(t=Array.from(o),a()):t.slice()},s.unknown=function(o){return arguments.length?(r=o,s):r},s.quantiles=function(){return n.slice()},s.copy=function(){return Aj().domain(e).range(t).unknown(r)},Ua.apply(s,arguments)}function Cj(){var e=0,t=1,n=1,r=[.5],a=[0,1],s;function o(d){return d!=null&&d<=d?a[$f(r,d,0,n)]:s}function u(){var d=-1;for(r=new Array(n);++d<n;)r[d]=((d+1)*t-(d-n)*e)/(n+1);return o}return o.domain=function(d){return arguments.length?([e,t]=d,e=+e,t=+t,u()):[e,t]},o.range=function(d){return arguments.length?(n=(a=Array.from(d)).length-1,u()):a.slice()},o.invertExtent=function(d){var f=a.indexOf(d);return f<0?[NaN,NaN]:f<1?[e,r[0]]:f>=n?[r[n-1],t]:[r[f-1],r[f]]},o.unknown=function(d){return arguments.length&&(s=d),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Cj().domain([e,t]).range(a).unknown(s)},Ua.apply(mo(o),arguments)}function kj(){var e=[.5],t=[0,1],n,r=1;function a(s){return s!=null&&s<=s?t[$f(e,s,0,r)]:n}return a.domain=function(s){return arguments.length?(e=Array.from(s),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(s){return arguments.length?(t=Array.from(s),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(s){var o=t.indexOf(s);return[e[o-1],e[o]]},a.unknown=function(s){return arguments.length?(n=s,a):n},a.copy=function(){return kj().domain(e).range(t).unknown(n)},Ua.apply(a,arguments)}const Ry=new Date,My=new Date;function Pn(e,t,n,r){function a(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return a.floor=s=>(e(s=new Date(+s)),s),a.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),a.round=s=>{const o=a(s),u=a.ceil(s);return s-o<u-s?o:u},a.offset=(s,o)=>(t(s=new Date(+s),o==null?1:Math.floor(o)),s),a.range=(s,o,u)=>{const d=[];if(s=a.ceil(s),u=u==null?1:Math.floor(u),!(s<o)||!(u>0))return d;let f;do d.push(f=new Date(+s)),t(s,u),e(s);while(f<s&&s<o);return d},a.filter=s=>Pn(o=>{if(o>=o)for(;e(o),!s(o);)o.setTime(o-1)},(o,u)=>{if(o>=o)if(u<0)for(;++u<=0;)for(;t(o,-1),!s(o););else for(;--u>=0;)for(;t(o,1),!s(o););}),n&&(a.count=(s,o)=>(Ry.setTime(+s),My.setTime(+o),e(Ry),e(My),Math.floor(n(Ry,My))),a.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?a.filter(r?o=>r(o)%s===0:o=>a.count(0,o)%s===0):a)),a}const Xp=Pn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Xp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Xp);Xp.range;const Ji=1e3,Ra=Ji*60,es=Ra*60,cs=es*24,JE=cs*7,DO=cs*30,Dy=cs*365,Jo=Pn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ji)},(e,t)=>(t-e)/Ji,e=>e.getUTCSeconds());Jo.range;const e_=Pn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ji)},(e,t)=>{e.setTime(+e+t*Ra)},(e,t)=>(t-e)/Ra,e=>e.getMinutes());e_.range;const t_=Pn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ra)},(e,t)=>(t-e)/Ra,e=>e.getUTCMinutes());t_.range;const n_=Pn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ji-e.getMinutes()*Ra)},(e,t)=>{e.setTime(+e+t*es)},(e,t)=>(t-e)/es,e=>e.getHours());n_.range;const r_=Pn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*es)},(e,t)=>(t-e)/es,e=>e.getUTCHours());r_.range;const Gf=Pn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ra)/cs,e=>e.getDate()-1);Gf.range;const ig=Pn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/cs,e=>e.getUTCDate()-1);ig.range;const Oj=Pn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/cs,e=>Math.floor(e/cs));Oj.range;function Sl(e){return Pn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ra)/JE)}const sg=Sl(0),Qp=Sl(1),Cce=Sl(2),kce=Sl(3),Yu=Sl(4),Oce=Sl(5),Ice=Sl(6);sg.range;Qp.range;Cce.range;kce.range;Yu.range;Oce.range;Ice.range;function wl(e){return Pn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/JE)}const og=wl(0),Zp=wl(1),Rce=wl(2),Mce=wl(3),qu=wl(4),Dce=wl(5),jce=wl(6);og.range;Zp.range;Rce.range;Mce.range;qu.range;Dce.range;jce.range;const a_=Pn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());a_.range;const i_=Pn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());i_.range;const ds=Pn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ds.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});ds.range;const fs=Pn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());fs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});fs.range;function Ij(e,t,n,r,a,s){const o=[[Jo,1,Ji],[Jo,5,5*Ji],[Jo,15,15*Ji],[Jo,30,30*Ji],[s,1,Ra],[s,5,5*Ra],[s,15,15*Ra],[s,30,30*Ra],[a,1,es],[a,3,3*es],[a,6,6*es],[a,12,12*es],[r,1,cs],[r,2,2*cs],[n,1,JE],[t,1,DO],[t,3,3*DO],[e,1,Dy]];function u(f,m,p){const b=m<f;b&&([f,m]=[m,f]);const x=p&&typeof p.range=="function"?p:d(f,m,p),E=x?x.range(f,+m+1):[];return b?E.reverse():E}function d(f,m,p){const b=Math.abs(m-f)/p,x=zE(([,,S])=>S).right(o,b);if(x===o.length)return e.every(Vv(f/Dy,m/Dy,p));if(x===0)return Xp.every(Math.max(Vv(f,m,p),1));const[E,_]=o[b/o[x-1][2]<o[x][2]/b?x-1:x];return E.every(_)}return[u,d]}const[Lce,Pce]=Ij(fs,i_,og,Oj,r_,t_),[Bce,Uce]=Ij(ds,a_,sg,Gf,n_,e_);function jy(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Ly(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function wd(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function zce(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,s=e.days,o=e.shortDays,u=e.months,d=e.shortMonths,f=Ad(a),m=Cd(a),p=Ad(s),b=Cd(s),x=Ad(o),E=Cd(o),_=Ad(u),S=Cd(u),T=Ad(d),C=Cd(d),A={a:F,A:$,b:K,B:L,c:null,d:zO,e:zO,f:ude,g:yde,G:Ede,H:sde,I:ode,j:lde,L:Rj,m:cde,M:dde,p:P,q:ee,Q:$O,s:YO,S:fde,u:hde,U:mde,V:pde,w:gde,W:bde,x:null,X:null,y:xde,Y:vde,Z:_de,"%":HO},k={a:M,A:de,b:_e,B:U,c:null,d:FO,e:FO,f:wde,g:Lde,G:Bde,H:Nde,I:Tde,j:Sde,L:Dj,m:Ade,M:Cde,p:he,q:Oe,Q:$O,s:YO,S:kde,u:Ode,U:Ide,V:Rde,w:Mde,W:Dde,x:null,X:null,y:jde,Y:Pde,Z:Ude,"%":HO},I={a:D,A:V,b:q,B:ae,c:Q,d:BO,e:BO,f:nde,g:PO,G:LO,H:UO,I:UO,j:Zce,L:tde,m:Qce,M:Jce,p:z,q:Xce,Q:ade,s:ide,S:ede,u:qce,U:Gce,V:Kce,w:Yce,W:Vce,x:W,X:G,y:PO,Y:LO,Z:Wce,"%":rde};A.x=O(n,A),A.X=O(r,A),A.c=O(t,A),k.x=O(n,k),k.X=O(r,k),k.c=O(t,k);function O(pe,De){return function(je){var Ee=[],It=-1,nt=0,ze=pe.length,We,cn,Un;for(je instanceof Date||(je=new Date(+je));++It<ze;)pe.charCodeAt(It)===37&&(Ee.push(pe.slice(nt,It)),(cn=jO[We=pe.charAt(++It)])!=null?We=pe.charAt(++It):cn=We==="e"?" ":"0",(Un=De[We])&&(We=Un(je,cn)),Ee.push(We),nt=It+1);return Ee.push(pe.slice(nt,It)),Ee.join("")}}function j(pe,De){return function(je){var Ee=wd(1900,void 0,1),It=H(Ee,pe,je+="",0),nt,ze;if(It!=je.length)return null;if("Q"in Ee)return new Date(Ee.Q);if("s"in Ee)return new Date(Ee.s*1e3+("L"in Ee?Ee.L:0));if(De&&!("Z"in Ee)&&(Ee.Z=0),"p"in Ee&&(Ee.H=Ee.H%12+Ee.p*12),Ee.m===void 0&&(Ee.m="q"in Ee?Ee.q:0),"V"in Ee){if(Ee.V<1||Ee.V>53)return null;"w"in Ee||(Ee.w=1),"Z"in Ee?(nt=Ly(wd(Ee.y,0,1)),ze=nt.getUTCDay(),nt=ze>4||ze===0?Zp.ceil(nt):Zp(nt),nt=ig.offset(nt,(Ee.V-1)*7),Ee.y=nt.getUTCFullYear(),Ee.m=nt.getUTCMonth(),Ee.d=nt.getUTCDate()+(Ee.w+6)%7):(nt=jy(wd(Ee.y,0,1)),ze=nt.getDay(),nt=ze>4||ze===0?Qp.ceil(nt):Qp(nt),nt=Gf.offset(nt,(Ee.V-1)*7),Ee.y=nt.getFullYear(),Ee.m=nt.getMonth(),Ee.d=nt.getDate()+(Ee.w+6)%7)}else("W"in Ee||"U"in Ee)&&("w"in Ee||(Ee.w="u"in Ee?Ee.u%7:"W"in Ee?1:0),ze="Z"in Ee?Ly(wd(Ee.y,0,1)).getUTCDay():jy(wd(Ee.y,0,1)).getDay(),Ee.m=0,Ee.d="W"in Ee?(Ee.w+6)%7+Ee.W*7-(ze+5)%7:Ee.w+Ee.U*7-(ze+6)%7);return"Z"in Ee?(Ee.H+=Ee.Z/100|0,Ee.M+=Ee.Z%100,Ly(Ee)):jy(Ee)}}function H(pe,De,je,Ee){for(var It=0,nt=De.length,ze=je.length,We,cn;It<nt;){if(Ee>=ze)return-1;if(We=De.charCodeAt(It++),We===37){if(We=De.charAt(It++),cn=I[We in jO?De.charAt(It++):We],!cn||(Ee=cn(pe,je,Ee))<0)return-1}else if(We!=je.charCodeAt(Ee++))return-1}return Ee}function z(pe,De,je){var Ee=f.exec(De.slice(je));return Ee?(pe.p=m.get(Ee[0].toLowerCase()),je+Ee[0].length):-1}function D(pe,De,je){var Ee=x.exec(De.slice(je));return Ee?(pe.w=E.get(Ee[0].toLowerCase()),je+Ee[0].length):-1}function V(pe,De,je){var Ee=p.exec(De.slice(je));return Ee?(pe.w=b.get(Ee[0].toLowerCase()),je+Ee[0].length):-1}function q(pe,De,je){var Ee=T.exec(De.slice(je));return Ee?(pe.m=C.get(Ee[0].toLowerCase()),je+Ee[0].length):-1}function ae(pe,De,je){var Ee=_.exec(De.slice(je));return Ee?(pe.m=S.get(Ee[0].toLowerCase()),je+Ee[0].length):-1}function Q(pe,De,je){return H(pe,t,De,je)}function W(pe,De,je){return H(pe,n,De,je)}function G(pe,De,je){return H(pe,r,De,je)}function F(pe){return o[pe.getDay()]}function $(pe){return s[pe.getDay()]}function K(pe){return d[pe.getMonth()]}function L(pe){return u[pe.getMonth()]}function P(pe){return a[+(pe.getHours()>=12)]}function ee(pe){return 1+~~(pe.getMonth()/3)}function M(pe){return o[pe.getUTCDay()]}function de(pe){return s[pe.getUTCDay()]}function _e(pe){return d[pe.getUTCMonth()]}function U(pe){return u[pe.getUTCMonth()]}function he(pe){return a[+(pe.getUTCHours()>=12)]}function Oe(pe){return 1+~~(pe.getUTCMonth()/3)}return{format:function(pe){var De=O(pe+="",A);return De.toString=function(){return pe},De},parse:function(pe){var De=j(pe+="",!1);return De.toString=function(){return pe},De},utcFormat:function(pe){var De=O(pe+="",k);return De.toString=function(){return pe},De},utcParse:function(pe){var De=j(pe+="",!0);return De.toString=function(){return pe},De}}}var jO={"-":"",_:" ",0:"0"},Xn=/^\s*\d+/,Fce=/^%/,Hce=/[\\^$*+?|[\]().{}]/g;function kt(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",s=a.length;return r+(s<n?new Array(n-s+1).join(t)+a:a)}function $ce(e){return e.replace(Hce,"\\$&")}function Ad(e){return new RegExp("^(?:"+e.map($ce).join("|")+")","i")}function Cd(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Yce(e,t,n){var r=Xn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function qce(e,t,n){var r=Xn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Gce(e,t,n){var r=Xn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Kce(e,t,n){var r=Xn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Vce(e,t,n){var r=Xn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function LO(e,t,n){var r=Xn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function PO(e,t,n){var r=Xn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Wce(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Xce(e,t,n){var r=Xn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Qce(e,t,n){var r=Xn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function BO(e,t,n){var r=Xn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Zce(e,t,n){var r=Xn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function UO(e,t,n){var r=Xn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Jce(e,t,n){var r=Xn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ede(e,t,n){var r=Xn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function tde(e,t,n){var r=Xn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function nde(e,t,n){var r=Xn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function rde(e,t,n){var r=Fce.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ade(e,t,n){var r=Xn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ide(e,t,n){var r=Xn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function zO(e,t){return kt(e.getDate(),t,2)}function sde(e,t){return kt(e.getHours(),t,2)}function ode(e,t){return kt(e.getHours()%12||12,t,2)}function lde(e,t){return kt(1+Gf.count(ds(e),e),t,3)}function Rj(e,t){return kt(e.getMilliseconds(),t,3)}function ude(e,t){return Rj(e,t)+"000"}function cde(e,t){return kt(e.getMonth()+1,t,2)}function dde(e,t){return kt(e.getMinutes(),t,2)}function fde(e,t){return kt(e.getSeconds(),t,2)}function hde(e){var t=e.getDay();return t===0?7:t}function mde(e,t){return kt(sg.count(ds(e)-1,e),t,2)}function Mj(e){var t=e.getDay();return t>=4||t===0?Yu(e):Yu.ceil(e)}function pde(e,t){return e=Mj(e),kt(Yu.count(ds(e),e)+(ds(e).getDay()===4),t,2)}function gde(e){return e.getDay()}function bde(e,t){return kt(Qp.count(ds(e)-1,e),t,2)}function xde(e,t){return kt(e.getFullYear()%100,t,2)}function yde(e,t){return e=Mj(e),kt(e.getFullYear()%100,t,2)}function vde(e,t){return kt(e.getFullYear()%1e4,t,4)}function Ede(e,t){var n=e.getDay();return e=n>=4||n===0?Yu(e):Yu.ceil(e),kt(e.getFullYear()%1e4,t,4)}function _de(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+kt(t/60|0,"0",2)+kt(t%60,"0",2)}function FO(e,t){return kt(e.getUTCDate(),t,2)}function Nde(e,t){return kt(e.getUTCHours(),t,2)}function Tde(e,t){return kt(e.getUTCHours()%12||12,t,2)}function Sde(e,t){return kt(1+ig.count(fs(e),e),t,3)}function Dj(e,t){return kt(e.getUTCMilliseconds(),t,3)}function wde(e,t){return Dj(e,t)+"000"}function Ade(e,t){return kt(e.getUTCMonth()+1,t,2)}function Cde(e,t){return kt(e.getUTCMinutes(),t,2)}function kde(e,t){return kt(e.getUTCSeconds(),t,2)}function Ode(e){var t=e.getUTCDay();return t===0?7:t}function Ide(e,t){return kt(og.count(fs(e)-1,e),t,2)}function jj(e){var t=e.getUTCDay();return t>=4||t===0?qu(e):qu.ceil(e)}function Rde(e,t){return e=jj(e),kt(qu.count(fs(e),e)+(fs(e).getUTCDay()===4),t,2)}function Mde(e){return e.getUTCDay()}function Dde(e,t){return kt(Zp.count(fs(e)-1,e),t,2)}function jde(e,t){return kt(e.getUTCFullYear()%100,t,2)}function Lde(e,t){return e=jj(e),kt(e.getUTCFullYear()%100,t,2)}function Pde(e,t){return kt(e.getUTCFullYear()%1e4,t,4)}function Bde(e,t){var n=e.getUTCDay();return e=n>=4||n===0?qu(e):qu.ceil(e),kt(e.getUTCFullYear()%1e4,t,4)}function Ude(){return"+0000"}function HO(){return"%"}function $O(e){return+e}function YO(e){return Math.floor(+e/1e3)}var xu,Lj,Pj;zde({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function zde(e){return xu=zce(e),Lj=xu.format,xu.parse,Pj=xu.utcFormat,xu.utcParse,xu}function Fde(e){return new Date(e)}function Hde(e){return e instanceof Date?+e:+new Date(+e)}function s_(e,t,n,r,a,s,o,u,d,f){var m=GE(),p=m.invert,b=m.domain,x=f(".%L"),E=f(":%S"),_=f("%I:%M"),S=f("%I %p"),T=f("%a %d"),C=f("%b %d"),A=f("%B"),k=f("%Y");function I(O){return(d(O)<O?x:u(O)<O?E:o(O)<O?_:s(O)<O?S:r(O)<O?a(O)<O?T:C:n(O)<O?A:k)(O)}return m.invert=function(O){return new Date(p(O))},m.domain=function(O){return arguments.length?b(Array.from(O,Hde)):b().map(Fde)},m.ticks=function(O){var j=b();return e(j[0],j[j.length-1],O??10)},m.tickFormat=function(O,j){return j==null?I:f(j)},m.nice=function(O){var j=b();return(!O||typeof O.range!="function")&&(O=t(j[0],j[j.length-1],O??10)),O?b(Nj(j,O)):m},m.copy=function(){return qf(m,s_(e,t,n,r,a,s,o,u,d,f))},m}function $de(){return Ua.apply(s_(Bce,Uce,ds,a_,sg,Gf,n_,e_,Jo,Lj).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Yde(){return Ua.apply(s_(Lce,Pce,fs,i_,og,ig,r_,t_,Jo,Pj).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function lg(){var e=0,t=1,n,r,a,s,o=Mr,u=!1,d;function f(p){return p==null||isNaN(p=+p)?d:o(a===0?.5:(p=(s(p)-n)*a,u?Math.max(0,Math.min(1,p)):p))}f.domain=function(p){return arguments.length?([e,t]=p,n=s(e=+e),r=s(t=+t),a=n===r?0:1/(r-n),f):[e,t]},f.clamp=function(p){return arguments.length?(u=!!p,f):u},f.interpolator=function(p){return arguments.length?(o=p,f):o};function m(p){return function(b){var x,E;return arguments.length?([x,E]=b,o=p(x,E),f):[o(0),o(1)]}}return f.range=m(dc),f.rangeRound=m(qE),f.unknown=function(p){return arguments.length?(d=p,f):d},function(p){return s=p,n=p(e),r=p(t),a=n===r?0:1/(r-n),f}}function po(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Bj(){var e=mo(lg()(Mr));return e.copy=function(){return po(e,Bj())},gs.apply(e,arguments)}function Uj(){var e=WE(lg()).domain([1,10]);return e.copy=function(){return po(e,Uj()).base(e.base())},gs.apply(e,arguments)}function zj(){var e=XE(lg());return e.copy=function(){return po(e,zj()).constant(e.constant())},gs.apply(e,arguments)}function o_(){var e=QE(lg());return e.copy=function(){return po(e,o_()).exponent(e.exponent())},gs.apply(e,arguments)}function qde(){return o_.apply(null,arguments).exponent(.5)}function Fj(){var e=[],t=Mr;function n(r){if(r!=null&&!isNaN(r=+r))return t(($f(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(so),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,s)=>Oue(e,s/r))},n.copy=function(){return Fj(t).domain(e)},gs.apply(n,arguments)}function ug(){var e=0,t=.5,n=1,r=1,a,s,o,u,d,f=Mr,m,p=!1,b;function x(_){return isNaN(_=+_)?b:(_=.5+((_=+m(_))-s)*(r*_<r*s?u:d),f(p?Math.max(0,Math.min(1,_)):_))}x.domain=function(_){return arguments.length?([e,t,n]=_,a=m(e=+e),s=m(t=+t),o=m(n=+n),u=a===s?0:.5/(s-a),d=s===o?0:.5/(o-s),r=s<a?-1:1,x):[e,t,n]},x.clamp=function(_){return arguments.length?(p=!!_,x):p},x.interpolator=function(_){return arguments.length?(f=_,x):f};function E(_){return function(S){var T,C,A;return arguments.length?([T,C,A]=S,f=rce(_,[T,C,A]),x):[f(0),f(.5),f(1)]}}return x.range=E(dc),x.rangeRound=E(qE),x.unknown=function(_){return arguments.length?(b=_,x):b},function(_){return m=_,a=_(e),s=_(t),o=_(n),u=a===s?0:.5/(s-a),d=s===o?0:.5/(o-s),r=s<a?-1:1,x}}function Hj(){var e=mo(ug()(Mr));return e.copy=function(){return po(e,Hj())},gs.apply(e,arguments)}function $j(){var e=WE(ug()).domain([.1,1,10]);return e.copy=function(){return po(e,$j()).base(e.base())},gs.apply(e,arguments)}function Yj(){var e=XE(ug());return e.copy=function(){return po(e,Yj()).constant(e.constant())},gs.apply(e,arguments)}function l_(){var e=QE(ug());return e.copy=function(){return po(e,l_()).exponent(e.exponent())},gs.apply(e,arguments)}function Gde(){return l_.apply(null,arguments).exponent(.5)}const qj=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:HE,scaleDiverging:Hj,scaleDivergingLog:$j,scaleDivergingPow:l_,scaleDivergingSqrt:Gde,scaleDivergingSymlog:Yj,scaleIdentity:_j,scaleImplicit:Wv,scaleLinear:Ej,scaleLog:Tj,scaleOrdinal:FE,scalePoint:Mue,scalePow:ZE,scaleQuantile:Aj,scaleQuantize:Cj,scaleRadial:wj,scaleSequential:Bj,scaleSequentialLog:Uj,scaleSequentialPow:o_,scaleSequentialQuantile:Fj,scaleSequentialSqrt:qde,scaleSequentialSymlog:zj,scaleSqrt:wce,scaleSymlog:Sj,scaleThreshold:kj,scaleTime:$de,scaleUtc:Yde,tickFormat:vj},Symbol.toStringTag,{value:"Module"}));function Kde(e){var t=qj;if(e in t&&typeof t[e]=="function")return t[e]();var n="scale".concat(lE(e));if(n in t&&typeof t[n]=="function")return t[n]()}function qO(e,t,n){if(typeof e=="function")return e.copy().domain(t).range(n);if(e!=null){var r=Kde(e);if(r!=null)return r.domain(t).range(n),r}}function u_(e,t,n,r){if(!(n==null||r==null))return typeof e.scale=="function"?qO(e.scale,n,r):qO(t,n,r)}function Vde(e){return"scale".concat(lE(e))}function Wde(e){return Vde(e)in qj}var Gj=(e,t,n)=>{if(e!=null){var r=e.scale,a=e.type;if(r==="auto")return a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":a==="category"?"band":"linear";if(typeof r=="string")return Wde(r)?r:"point"}};function Xde(e,t){for(var n=0,r=e.length,a=e[0]<e[e.length-1];n<r;){var s=Math.floor((n+r)/2);(a?e[s]<t:e[s]>t)?n=s+1:r=s}return n}function Kj(e,t){if(e){var n=t??e.domain(),r=n.map(s=>{var o;return(o=e(s))!==null&&o!==void 0?o:0}),a=e.range();if(!(n.length===0||a.length<2))return s=>{var o,u,d=Xde(r,s);if(d<=0)return n[0];if(d>=n.length)return n[n.length-1];var f=(o=r[d-1])!==null&&o!==void 0?o:0,m=(u=r[d])!==null&&u!==void 0?u:0;return Math.abs(s-f)<=Math.abs(s-m)?n[d-1]:n[d]}}}function Qde(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):Kj(e,void 0)}function GO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Jp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GO(Object(n),!0).forEach(function(r){Zde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zde(e,t,n){return(t=Jde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jde(e){var t=efe(e,"string");return typeof t=="symbol"?t:t+""}function efe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vj(e,t){return afe(e)||rfe(e,t)||nfe(e,t)||tfe()}function tfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
609
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nfe(e,t){if(e){if(typeof e=="string")return KO(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?KO(e,t):void 0}}function KO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rfe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function afe(e){if(Array.isArray(e))return e}var Jv=[0,"auto"],Mn={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},Wj=(e,t)=>e.cartesianAxis.xAxis[t],bs=(e,t)=>{var n=Wj(e,t);return n??Mn},Dn={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Jv,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:Bf},Xj=(e,t)=>e.cartesianAxis.yAxis[t],xs=(e,t)=>{var n=Xj(e,t);return n??Dn},ife={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},c_=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??ife},Tr=(e,t,n)=>{switch(t){case"xAxis":return bs(e,n);case"yAxis":return xs(e,n);case"zAxis":return c_(e,n);case"angleAxis":return jE(e,n);case"radiusAxis":return LE(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},sfe=(e,t,n)=>{switch(t){case"xAxis":return bs(e,n);case"yAxis":return xs(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Kf=(e,t,n)=>{switch(t){case"xAxis":return bs(e,n);case"yAxis":return xs(e,n);case"angleAxis":return jE(e,n);case"radiusAxis":return LE(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Qj=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function Zj(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var d_=e=>e.graphicalItems.cartesianItems,ofe=ue([Vn,tg],Zj),Jj=(e,t,n)=>e.filter(n).filter(r=>(t==null?void 0:t.includeHidden)===!0?!0:!r.hide),fc=ue([d_,Tr,ofe],Jj,{memoizeOptions:{resultEqualityCheck:rg}}),e6=ue([fc],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(ng)),t6=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),lfe=ue([fc],t6),n6=e=>e.map(t=>t.data).filter(Boolean).flat(1),ufe=ue([fc],e=>e.some(t=>!t.data)),r6=ue([fc],n6,{memoizeOptions:{resultEqualityCheck:rg}}),a6=(e,t)=>{var n=t.chartData,r=n===void 0?[]:n,a=t.dataStartIndex,s=t.dataEndIndex;return e.length>0?e:r.slice(a,s+1)},f_=ue([r6,X0],a6),cfe=(e,t,n)=>(t==null?void 0:t.dataKey)!=null?e.map(r=>({value:Gn(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(a=>({value:Gn(a,r)}))):e.map(r=>({value:r})),i6=(e,t,n,r,a,s)=>{var o=r.chartData,u=o===void 0?[]:o,d=r.dataStartIndex,f=r.dataEndIndex,m=cfe(e,t,n);if(a&&(t==null?void 0:t.dataKey)!=null&&s.length>0){var p=u.slice(d,f+1),b=p.map(x=>({value:Gn(x,t.dataKey)})).filter(x=>x.value!=null);return[...b,...m]}return m},Vf=ue([f_,Tr,fc,X0,ufe,r6],i6);function Mu(e){if(Ti(e)||e instanceof Date){var t=Number(e);if(Nt(t))return t}}function VO(e){if(Array.isArray(e)){var t=[Mu(e[0]),Mu(e[1])];return vi(t)?t:void 0}var n=Mu(e);if(n!=null)return[n,n]}function Ja(e){return e.map(Mu).filter(Xr)}function dfe(e,t){var n=Mu(e),r=Mu(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var ffe=ue([Vf],e=>e==null?void 0:e.map(t=>t.value).sort(dfe));function s6(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function hfe(e,t,n){if(!n)return[];if(!n.length)return[];var r;if(typeof t=="number"&&!Ni(t))r=t;else if(Array.isArray(t)){var a=Ja(t);a.length>0&&(r=Math.max(...a))}return r==null?[]:Ja(n.flatMap(s=>{var o=Gn(e,s.dataKey),u,d;if(Array.isArray(o)){var f=Vj(o,2);u=f[0],d=f[1]}else u=d=o;if(!(!Nt(u)||!Nt(d)))return[r-u,r+d]}))}var Bn=e=>{var t=Wn(e),n=cc(e);return Kf(e,t,n)},Gu=ue([Bn],e=>e==null?void 0:e.dataKey),mfe=ue([e6,X0,Bn],dj),o6=(e,t,n,r)=>{var a={},s=t.reduce((o,u)=>{if(u.stackId==null)return o;var d=o[u.stackId];return d==null&&(d=[]),d.push(u),o[u.stackId]=d,o},a);return Object.fromEntries(Object.entries(s).map(o=>{var u=Vj(o,2),d=u[0],f=u[1],m=r?[...f].reverse():f,p=m.map(BE);return[d,{stackedData:$ie(e,p,n),graphicalItems:m}]}))},e1=ue([mfe,e6,Q0,aj],o6),l6=(e,t,n,r)=>{var a=t.dataStartIndex,s=t.dataEndIndex;if(r==null&&n!=="zAxis")return Vie(e,a,s)},pfe=ue([Tr],e=>e.allowDataOverflow),h_=e=>{var t;if(e==null||!("domain"in e))return Jv;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var n=Ja(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:Jv},u6=ue([Tr],h_),c6=ue([u6,pfe],qD),gfe=ue([e1,ni,Vn,c6],l6,{memoizeOptions:{resultEqualityCheck:Hf}}),m_=e=>e.errorBars,bfe=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>s6(n,r)),e0=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n.filter(Boolean);if(a.length!==0){var s=a.flat(),o=Math.min(...s),u=Math.max(...s);return[o,u]}},d6=function(t,n,r,a,s){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],u,d;if(r.length>0&&r.forEach(f=>{var m,p=f.data!=null?[...f.data]:o,b=(m=a[f.id])===null||m===void 0?void 0:m.filter(x=>s6(s,x));p.forEach(x=>{var E,_=Gn(x,(E=n.dataKey)!==null&&E!==void 0?E:f.dataKey),S=hfe(x,_,b);if(S.length>=2){var T=Math.min(...S),C=Math.max(...S);(u==null||T<u)&&(u=T),(d==null||C>d)&&(d=C)}var A=VO(_);A!=null&&(u=u==null?A[0]:Math.min(u,A[0]),d=d==null?A[1]:Math.max(d,A[1]))})}),(n==null?void 0:n.dataKey)!=null&&r.length===0&&t.forEach(f=>{var m=VO(Gn(f,n.dataKey));m!=null&&(u=u==null?m[0]:Math.min(u,m[0]),d=d==null?m[1]:Math.max(d,m[1]))}),Nt(u)&&Nt(d))return[u,d]},xfe=ue([f_,Tr,lfe,m_,Vn,Vle],d6,{memoizeOptions:{resultEqualityCheck:Hf}});function yfe(e){var t=e.value;if(Ti(t)||t instanceof Date)return t}var vfe=(e,t,n)=>{var r=e.map(yfe).filter(a=>a!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&t4(r))?YD(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},f6=e=>e.referenceElements.dots,hc=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),Efe=ue([f6,Vn,tg],hc),h6=e=>e.referenceElements.areas,_fe=ue([h6,Vn,tg],hc),m6=e=>e.referenceElements.lines,Nfe=ue([m6,Vn,tg],hc),p6=(e,t)=>{if(e!=null){var n=Ja(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Tfe=ue(Efe,Vn,p6),g6=(e,t)=>{if(e!=null){var n=Ja(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Sfe=ue([_fe,Vn],g6);function wfe(e){var t;if(e.x!=null)return Ja([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:Ja(n)}function Afe(e){var t;if(e.y!=null)return Ja([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:Ja(n)}var b6=(e,t)=>{if(e!=null){var n=e.flatMap(r=>t==="xAxis"?wfe(r):Afe(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Cfe=ue([Nfe,Vn],b6),kfe=ue(Tfe,Cfe,Sfe,(e,t,n)=>e0(e,n,t)),x6=(e,t,n,r,a,s,o,u,d)=>{if(n!=null)return n;var f=o==="vertical"&&u==="xAxis"||o==="horizontal"&&u==="yAxis",m=f?e0(r,s,a):e0(s,a),p=eue(t,m,e.allowDataOverflow);return p??(e.allowDataOverflow&&m==null&&d!=null?d:p)},Ofe=e=>{if(!(e==null||e.type!=="number"||!("ticks"in e)||e.ticks==null)){var t=Ja(e.ticks);if(t.length!==0)return[Math.min(...t),Math.max(...t)]}},Ife=ue([Tr],Ofe,{memoizeOptions:{resultEqualityCheck:Hf}}),Rfe=ue([Tr,u6,c6,gfe,xfe,kfe,Kt,Vn,Ife],x6,{memoizeOptions:{resultEqualityCheck:Hf}}),Mfe=[0,1],y6=(e,t,n,r,a,s,o)=>{if(!((e==null||n==null||n.length===0)&&o===void 0)){var u=e.dataKey,d=e.type,f=ho(t,s);if(f&&u==null){var m;return YD(0,(m=n==null?void 0:n.length)!==null&&m!==void 0?m:0)}return d==="category"?vfe(r,e,f):a==="expand"&&!f?Mfe:o}},p_=ue([Tr,Kt,f_,Vf,Q0,Vn,Rfe],y6),mc=ue([Tr,Qj,RE],Gj),v6=(e,t,n)=>{var r=t.niceTicks;if(r!=="none"){var a=h_(t),s=Array.isArray(a)&&(a[0]==="auto"||a[1]==="auto");if((r==="snap125"||r==="adaptive")&&t!=null&&t.tickCount&&vi(e)){if(s)return rO(e,t.tickCount,t.allowDecimals,r);if(t.type==="number")return aO(e,t.tickCount,t.allowDecimals,r)}if(r==="auto"&&n==="linear"&&t!=null&&t.tickCount){if(s&&vi(e))return rO(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&vi(e))return aO(e,t.tickCount,t.allowDecimals,"adaptive")}}},g_=ue([p_,Kf,mc],v6),E6=(e,t,n,r)=>{if(r!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&vi(t)&&Array.isArray(n)&&n.length>0){var a,s,o=t[0],u=(a=n[0])!==null&&a!==void 0?a:0,d=t[1],f=(s=n[n.length-1])!==null&&s!==void 0?s:0;return[Math.min(o,u),Math.max(d,f)]}return t},Dfe=ue([Tr,p_,g_,Vn],E6),jfe=ue(Vf,Tr,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(Ja(e.map(p=>p.value))).sort((p,b)=>p-b),a=r[0],s=r[r.length-1];if(a==null||s==null)return 1/0;var o=s-a;if(o===0)return 1/0;for(var u=0;u<r.length-1;u++){var d=r[u],f=r[u+1];if(!(d==null||f==null)){var m=f-d;n=Math.min(n,m)}}return n/o}}),_6=ue(jfe,Kt,rj,Kn,(e,t,n,r,a)=>a,(e,t,n,r,a)=>{if(!Nt(e))return 0;var s=t==="vertical"?r.height:r.width;if(a==="gap")return e*s/2;if(a==="no-gap"){var o=Za(n,e*s),u=e*s/2;return u-o-(u-o)/s*o}return 0}),Lfe=(e,t,n)=>{var r=bs(e,t);return r==null||typeof r.padding!="string"?0:_6(e,"xAxis",t,n,r.padding)},Pfe=(e,t,n)=>{var r=xs(e,t);return r==null||typeof r.padding!="string"?0:_6(e,"yAxis",t,n,r.padding)},Bfe=ue(bs,Lfe,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var a=e.padding;return typeof a=="string"?{left:t,right:t}:{left:((n=a.left)!==null&&n!==void 0?n:0)+t,right:((r=a.right)!==null&&r!==void 0?r:0)+t}}),Ufe=ue(xs,Pfe,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var a=e.padding;return typeof a=="string"?{top:t,bottom:t}:{top:((n=a.top)!==null&&n!==void 0?n:0)+t,bottom:((r=a.bottom)!==null&&r!==void 0?r:0)+t}}),N6=ue([Kn,Bfe,K0,G0,(e,t,n)=>n],(e,t,n,r,a)=>{var s=r.padding;return a?[s.left,n.width-s.right]:[e.left+t.left,e.left+e.width-t.right]}),T6=ue([Kn,Kt,Ufe,K0,G0,(e,t,n)=>n],(e,t,n,r,a,s)=>{var o=a.padding;return s?[r.height-o.bottom,o.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Wf=(e,t,n,r)=>{var a;switch(t){case"xAxis":return N6(e,n,r);case"yAxis":return T6(e,n,r);case"zAxis":return(a=c_(e,n))===null||a===void 0?void 0:a.range;case"angleAxis":return lj(e);case"radiusAxis":return uj(e,n);default:return}},S6=ue([Tr,Wf],Z0),zfe=ue([mc,Dfe],xue),b_=ue([Tr,mc,zfe,S6],u_),w6=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var a=n.type,s=n.scale,o=ho(e,r);if(o&&(a==="number"||s!=="auto"))return t.map(u=>u.value)}},x_=ue([Kt,Vf,Kf,Vn],w6),cg=ue([b_],UE);ue([b_],Qde);ue([b_,ffe],Kj);ue([fc,m_,Vn],bfe);function A6(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var dg=(e,t)=>t,fg=(e,t,n)=>n,Ffe=ue(Y0,dg,fg,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(A6)),Hfe=ue(q0,dg,fg,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(A6)),C6=(e,t)=>{var n=typeof t.height=="number"?t.height:NE;return{width:e.width,height:n}},$fe=(e,t)=>{var n=typeof t.width=="number"?t.width:Bf;return{width:n,height:e.height}},k6=ue(Kn,bs,C6),Yfe=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},qfe=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},Gfe=ue(ps,Kn,Ffe,dg,fg,(e,t,n,r,a)=>{var s={},o;return n.forEach(u=>{var d=C6(t,u);o==null&&(o=Yfe(t,r,e));var f=r==="top"&&!a||r==="bottom"&&a;s[u.id]=o-Number(f)*d.height,o+=(f?-1:1)*d.height}),s}),Kfe=ue(ms,Kn,Hfe,dg,fg,(e,t,n,r,a)=>{var s={},o;return n.forEach(u=>{var d=$fe(t,u);o==null&&(o=qfe(t,r,e));var f=r==="left"&&!a||r==="right"&&a;s[u.id]=o-Number(f)*d.width,o+=(f?-1:1)*d.width}),s}),Vfe=(e,t)=>{var n=bs(e,t);if(n!=null)return Gfe(e,n.orientation,n.mirror)},Wfe=ue([Kn,bs,Vfe,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var a=n==null?void 0:n[r];return a==null?{x:e.left,y:0}:{x:e.left,y:a}}}),Xfe=(e,t)=>{var n=xs(e,t);if(n!=null)return Kfe(e,n.orientation,n.mirror)},Qfe=ue([Kn,xs,Xfe,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var a=n==null?void 0:n[r];return a==null?{x:0,y:e.top}:{x:a,y:e.top}}}),O6=ue(Kn,xs,(e,t)=>{var n=typeof t.width=="number"?t.width:Bf;return{width:n,height:e.height}}),WO=(e,t,n)=>{switch(t){case"xAxis":return k6(e,n).width;case"yAxis":return O6(e,n).height;default:return}},I6=(e,t,n,r)=>{if(n!=null){var a=n.allowDuplicatedCategory,s=n.type,o=n.dataKey,u=ho(e,r),d=t.map(m=>m.value),f=d.filter(m=>m!=null);if(o&&u&&s==="category"&&a&&t4(f))return d}},y_=ue([Kt,Vf,Tr,Vn],I6),XO=ue([Kt,sfe,mc,cg,y_,x_,Wf,g_,Vn],(e,t,n,r,a,s,o,u,d)=>{if(t!=null){var f=ho(e,d);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:d,categoricalDomain:s,duplicateDomain:a,isCategorical:f,niceTicks:u,range:o,realScaleType:n,scale:r}}}),Zfe=(e,t,n,r,a,s,o,u,d)=>{if(!(t==null||r==null)){var f=ho(e,d),m=t.type,p=t.ticks,b=t.tickCount,x=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,E=m==="category"&&r.bandwidth?r.bandwidth()/x:0;E=d==="angleAxis"&&s!=null&&s.length>=2?Wr(s[0]-s[1])*2*E:E;var _=p||a;return _?_.map((S,T)=>{var C=o?o.indexOf(S):S,A=r.map(C);return Nt(A)?{index:T,coordinate:A+E,value:S,offset:E}:null}).filter(Xr):f&&u?u.map((S,T)=>{var C=r.map(S);return Nt(C)?{coordinate:C+E,value:S,index:T,offset:E}:null}).filter(Xr):r.ticks?r.ticks(b).map((S,T)=>{var C=r.map(S);return Nt(C)?{coordinate:C+E,value:S,index:T,offset:E}:null}).filter(Xr):r.domain().map((S,T)=>{var C=r.map(S);return Nt(C)?{coordinate:C+E,value:o?o[S]:S,index:T,offset:E}:null}).filter(Xr)}},R6=ue([Kt,Kf,mc,cg,g_,Wf,y_,x_,Vn],Zfe),Jfe=(e,t,n,r,a,s,o)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var u=ho(e,o),d=t.tickCount,f=0;return f=o==="angleAxis"&&(r==null?void 0:r.length)>=2?Wr(r[0]-r[1])*2*f:f,u&&s?s.map((m,p)=>{var b=n.map(m);return Nt(b)?{coordinate:b+f,value:m,index:p,offset:f}:null}).filter(Xr):n.ticks?n.ticks(d).map((m,p)=>{var b=n.map(m);return Nt(b)?{coordinate:b+f,value:m,index:p,offset:f}:null}).filter(Xr):n.domain().map((m,p)=>{var b=n.map(m);return Nt(b)?{coordinate:b+f,value:a?a[m]:m,index:p,offset:f}:null}).filter(Xr)}},Ku=ue([Kt,Kf,cg,Wf,y_,x_,Vn],Jfe),Vu=ue(Tr,cg,(e,t)=>{if(!(e==null||t==null))return Jp(Jp({},e),{},{scale:t})}),ehe=ue([Tr,mc,p_,S6],u_),the=ue([ehe],UE);ue((e,t,n)=>c_(e,n),the,(e,t)=>{if(!(e==null||t==null))return Jp(Jp({},e),{},{scale:t})});var nhe=ue([Kt,Y0,q0],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),rhe=(e,t,n)=>{var r;return(r=e.renderedTicks[t])===null||r===void 0?void 0:r[n]};ue([rhe],e=>{if(!(!e||e.length===0))return t=>{var n,r=1/0,a=e[0];for(var s of e){var o=Math.abs(s.coordinate-t);o<r&&(r=o,a=s)}return(n=a)===null||n===void 0?void 0:n.value}});var M6=e=>e.options.defaultTooltipEventType,D6=e=>e.options.validateTooltipEventTypes;function j6(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function Xf(e,t){var n=M6(e),r=D6(e);return j6(t,n,r)}function ahe(e){return Ke(t=>Xf(t,e))}var L6=(e,t)=>{var n,r=Number(t);if(!(Ni(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},ihe=e=>e.tooltip.settings,no={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},she={itemInteraction:{click:no,hover:no},axisInteraction:{click:no,hover:no},keyboardInteraction:no,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},P6=Nr({name:"tooltip",initialState:she,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(Ct(t.payload))},prepare:Jt()},replaceTooltipEntrySettings:{reducer(e,t){var n=t.payload,r=n.prev,a=n.next,s=Ia(e).tooltipItemPayloads.indexOf(Ct(r));s>-1&&(e.tooltipItemPayloads[s]=Ct(a))},prepare:Jt()},removeTooltipEntrySettings:{reducer(e,t){var n=Ia(e).tooltipItemPayloads.indexOf(Ct(t.payload));n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:Jt()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),za=P6.actions,ohe=za.addTooltipEntrySettings,lhe=za.replaceTooltipEntrySettings,uhe=za.removeTooltipEntrySettings,che=za.setTooltipSettingsState,B6=za.setActiveMouseOverItemIndex,dhe=za.mouseLeaveItem,U6=za.mouseLeaveChart,fhe=za.setActiveClickItemIndex,z6=za.setMouseOverAxisIndex,hhe=za.setMouseClickAxisIndex,jd=za.setSyncInteraction,t0=za.setKeyboardInteraction,mhe=P6.reducer;function QO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Pm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QO(Object(n),!0).forEach(function(r){phe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function phe(e,t,n){return(t=ghe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ghe(e){var t=bhe(e,"string");return typeof t=="symbol"?t:t+""}function bhe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xhe(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function yhe(e){return e.index!=null}var F6=(e,t,n,r)=>{if(t==null)return no;var a=xhe(e,t,n);if(a==null)return no;if(a.active)return a;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var s=e.settings.active===!0;if(yhe(a)){if(s)return Pm(Pm({},a),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return Pm(Pm({},no),{},{coordinate:a.coordinate})};function vhe(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function Ehe(e,t){var n=vhe(e),r=t[0],a=t[1];if(n===void 0)return!1;var s=Math.min(r,a),o=Math.max(r,a);return n>=s&&n<=o}function _he(e,t,n){if(n==null||t==null)return!0;var r=Gn(e,t);return r==null||!vi(n)?!0:Ehe(r,n)}var Kd=(e,t,n,r)=>{var a=e==null?void 0:e.index;if(a==null)return null;var s=Number(a);if(!Nt(s))return a;var o=0,u=1/0;t.length>0&&(u=t.length-1);var d=Math.max(o,Math.min(s,u)),f=t[d];return f==null||_he(f,n,r)?String(d):null},H6=(e,t,n,r,a,s,o)=>{if(s!=null){var u=o[0],d=u==null?void 0:u.getPosition(s);if(d!=null)return d;var f=a==null?void 0:a[Number(s)];if(f)switch(n){case"horizontal":return{x:f.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:f.coordinate}}}},$6=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var a;if(n==="hover"?a=e.itemInteraction.hover.graphicalItemId:a=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&a==null)return e.tooltipItemPayloads;if(a==null&&(r!=null||e.keyboardInteraction.active)){var s=e.tooltipItemPayloads[0];return s!=null?[s]:[]}return e.tooltipItemPayloads.filter(o=>{var u;return((u=o.settings)===null||u===void 0?void 0:u.graphicalItemId)===a})},Y6=e=>e.options.tooltipPayloadSearcher,pc=e=>e.tooltip;function ZO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function JO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ZO(Object(n),!0).forEach(function(r){Nhe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nhe(e,t,n){return(t=The(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function The(e){var t=She(e,"string");return typeof t=="symbol"?t:t+""}function She(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function whe(e){if(typeof e=="string"||typeof e=="number")return e}function Ahe(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function Che(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function e3(e){if(typeof e=="string")return e}function khe(e){if(!(e==null||typeof e!="object")){var t="name"in e?whe(e.name):void 0,n="unit"in e?Ahe(e.unit):void 0,r="dataKey"in e?Che(e.dataKey):void 0,a="payload"in e?e.payload:void 0,s="color"in e?e3(e.color):void 0,o="fill"in e?e3(e.fill):void 0;return{name:t,unit:n,dataKey:r,payload:a,color:s,fill:o}}}function Ohe(e,t){return e??t}var q6=(e,t,n,r,a,s,o)=>{if(!(t==null||s==null)){var u=n.chartData,d=n.computedData,f=n.dataStartIndex,m=n.dataEndIndex,p=[];return e.reduce((b,x)=>{var E,_=x.dataDefinedOnItem,S=x.settings,T=Ohe(_,u),C=Array.isArray(T)?vD(T,f,m):T,A=(E=S==null?void 0:S.dataKey)!==null&&E!==void 0?E:r,k=S==null?void 0:S.nameKey,I;if(r&&Array.isArray(C)&&!Array.isArray(C[0])&&o==="axis"?(I=Xne(C,r,a),I==null&&(I=s(C,t,d,k))):I=s(C,t,d,k),Array.isArray(I))I.forEach(j=>{var H,z,D=khe(j),V=D==null?void 0:D.name,q=D==null?void 0:D.dataKey,ae=D==null?void 0:D.payload,Q=JO(JO({},S),{},{name:V,unit:D==null?void 0:D.unit,color:(H=D==null?void 0:D.color)!==null&&H!==void 0?H:S==null?void 0:S.color,fill:(z=D==null?void 0:D.fill)!==null&&z!==void 0?z:S==null?void 0:S.fill});b.push(JC({tooltipEntrySettings:Q,dataKey:q,payload:ae,value:Gn(ae,q),name:V==null?void 0:String(V)}))});else{var O;b.push(JC({tooltipEntrySettings:S,dataKey:A,payload:I,value:Gn(I,A),name:(O=Gn(I,k))!==null&&O!==void 0?O:S==null?void 0:S.name}))}return b},p)}},v_=ue([Bn,Qj,RE],Gj),Ihe=ue([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),Rhe=ue([Wn,cc],Zj),Al=ue([Ihe,Bn,Rhe],Jj,{memoizeOptions:{resultEqualityCheck:rg}}),Mhe=ue([Al],e=>e.filter(ng)),G6=ue([Al],n6,{memoizeOptions:{resultEqualityCheck:rg}}),Dhe=ue([Al],e=>e.some(t=>!t.data)),bl=ue([G6,ni],a6),jhe=ue([Mhe,ni,Bn],dj),E_=ue([bl,Bn,Al,ni,Dhe,G6],i6),K6=ue([Bn],h_),Lhe=ue([Bn],e=>e.allowDataOverflow),V6=ue([K6,Lhe],qD),Phe=ue([Al],e=>e.filter(ng)),Bhe=ue([jhe,Phe,Q0,aj],o6),Uhe=ue([Bhe,ni,Wn,V6],l6),zhe=ue([Al],t6),Fhe=ue([bl,Bn,zhe,m_,Wn,Wle],d6,{memoizeOptions:{resultEqualityCheck:Hf}}),Hhe=ue([f6,Wn,cc],hc),$he=ue([Hhe,Wn],p6),Yhe=ue([h6,Wn,cc],hc),qhe=ue([Yhe,Wn],g6),Ghe=ue([m6,Wn,cc],hc),Khe=ue([Ghe,Wn],b6),Vhe=ue([$he,Khe,qhe],e0),Whe=ue([Bn,K6,V6,Uhe,Fhe,Vhe,Kt,Wn],x6),Wu=ue([Bn,Kt,bl,E_,Q0,Wn,Whe],y6),Xhe=ue([Wu,Bn,v_],v6),Qhe=ue([Bn,Wu,Xhe,Wn],E6),W6=e=>{var t=Wn(e),n=cc(e),r=!1;return Wf(e,t,n,r)},X6=ue([Bn,W6],Z0),Zhe=ue([Bn,v_,Qhe,X6],u_),Q6=ue([Zhe],UE),Jhe=ue([Kt,E_,Bn,Wn],I6),eme=ue([Kt,E_,Bn,Wn],w6),tme=(e,t,n,r,a,s,o,u)=>{if(t){var d=t.type,f=ho(e,u);if(r){var m=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,p=d==="category"&&r.bandwidth?r.bandwidth()/m:0;return p=u==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?Wr(a[0]-a[1])*2*p:p,f&&o?o.map((b,x)=>{var E=r.map(b);return Nt(E)?{coordinate:E+p,value:b,index:x,offset:p}:null}).filter(Xr):r.domain().map((b,x)=>{var E=r.map(b);return Nt(E)?{coordinate:E+p,value:s?s[b]:b,index:x,offset:p}:null}).filter(Xr)}}},ys=ue([Kt,Bn,v_,Q6,W6,Jhe,eme,Wn],tme),__=ue([M6,D6,ihe],(e,t,n)=>j6(n.shared,e,t)),Z6=e=>e.tooltip.settings.trigger,N_=e=>e.tooltip.settings.defaultIndex,Qf=ue([pc,__,Z6,N_],F6),Xu=ue([Qf,bl,Gu,Wu],Kd),J6=ue([ys,Xu],L6),eL=ue([Qf],e=>{if(e)return e.dataKey}),nme=ue([Qf],e=>{if(e)return e.graphicalItemId}),tL=ue([pc,__,Z6,N_],$6),rme=ue([ms,ps,Kt,Kn,ys,N_,tL],H6),ame=ue([Qf,rme],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),ime=ue([Qf],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),sme=ue([tL,Xu,ni,Gu,J6,Y6,__],q6);ue([sme],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function t3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function n3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t3(Object(n),!0).forEach(function(r){ome(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ome(e,t,n){return(t=lme(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lme(e){var t=ume(e,"string");return typeof t=="symbol"?t:t+""}function ume(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cme=()=>Ke(Bn),dme=()=>{var e=cme(),t=Ke(ys),n=Ke(Q6);return Dp(!e||!n?void 0:n3(n3({},e),{},{scale:n}),t)};function r3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function yu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?r3(Object(n),!0).forEach(function(r){fme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fme(e,t,n){return(t=hme(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hme(e){var t=mme(e,"string");return typeof t=="symbol"?t:t+""}function mme(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pme=(e,t,n,r)=>{var a=t.find(s=>s&&s.index===n);if(a){if(e==="horizontal")return{x:a.coordinate,y:r.relativeY};if(e==="vertical")return{x:r.relativeX,y:a.coordinate}}return{x:0,y:0}},gme=(e,t,n,r)=>{var a=t.find(f=>f&&f.index===n);if(a){if(e==="centric"){var s=a.coordinate,o=r.radius;return yu(yu(yu({},r),sr(r.cx,r.cy,o,s)),{},{angle:s,radius:o})}var u=a.coordinate,d=r.angle;return yu(yu(yu({},r),sr(r.cx,r.cy,u,d)),{},{angle:d,radius:u})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function bme(e,t){var n=e.relativeX,r=e.relativeY;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var nL=(e,t,n,r,a)=>{var s,o=(s=t==null?void 0:t.length)!==null&&s!==void 0?s:0;if(o<=1||e==null)return 0;if(r==="angleAxis"&&a!=null&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var u=a[1]-a[0],d=(W,G,F)=>[e,e+u,e-u].some($=>(F?$>=W:$>W)&&$<=G),f=0;f<o;f++){var m,p,b,x,E,_=f>0?(m=n[f-1])===null||m===void 0?void 0:m.coordinate:(p=n[o-1])===null||p===void 0?void 0:p.coordinate,S=(b=n[f])===null||b===void 0?void 0:b.coordinate,T=f>=o-1?(x=n[0])===null||x===void 0?void 0:x.coordinate:(E=n[f+1])===null||E===void 0?void 0:E.coordinate,C=void 0;if(!(_==null||S==null||T==null))if(Wr(S-_)!==Wr(T-S)){var A=[];if(Wr(T-S)===Wr(a[1]-a[0])){C=T;var k=S+a[1]-a[0];A[0]=Math.min(k,(k+_)/2),A[1]=Math.max(k,(k+_)/2)}else{C=_;var I=T+a[1]-a[0];A[0]=Math.min(S,(I+S)/2),A[1]=Math.max(S,(I+S)/2)}var O=[Math.min(S,(C+S)/2),Math.max(S,(C+S)/2)];if(d(O[0],O[1],!1)||d(A[0],A[1],!0)){var j;return(j=n[f])===null||j===void 0?void 0:j.index}}else{var H=Math.min(_,T),z=Math.max(_,T);if(d((H+S)/2,(z+S)/2,!1)){var D;return(D=n[f])===null||D===void 0?void 0:D.index}}}else if(t)for(var V=0;V<o;V++){var q=t[V];if(q!=null){var ae=t[V+1],Q=t[V-1];if(V===0&&ae!=null&&e<=(q.coordinate+ae.coordinate)/2||V===o-1&&Q!=null&&e>(q.coordinate+Q.coordinate)/2||V>0&&V<o-1&&Q!=null&&ae!=null&&e>(q.coordinate+Q.coordinate)/2&&e<=(q.coordinate+ae.coordinate)/2)return q.index}}return-1},xme=()=>Ke(RE),T_=(e,t)=>t,rL=(e,t,n)=>n,S_=(e,t,n,r)=>r,yme=ue(ys,e=>M0(e,t=>t.coordinate)),w_=ue([pc,T_,rL,S_],F6),A_=ue([w_,bl,Gu,Wu],Kd),vme=(e,t,n)=>{if(t!=null){var r=pc(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},aL=ue([pc,T_,rL,S_],$6),n0=ue([ms,ps,Kt,Kn,ys,S_,aL],H6),Eme=ue([w_,n0],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),iL=ue([ys,A_],L6),_me=ue([aL,A_,ni,Gu,iL,Y6,T_],q6),Nme=ue([w_,A_],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),Tme=(e,t,n,r,a,s,o)=>{if(!(!e||!n||!r||!a)&&bme(e,o)){var u=Wie(e,t),d=nL(u,s,a,n,r),f=pme(t,a,d,e);return{activeIndex:String(d),activeCoordinate:f}}},Sme=(e,t,n,r,a,s,o)=>{if(!(!e||!r||!a||!s||!n)){var u=zle(e,n);if(u){var d=Xie(u,t),f=nL(d,o,s,r,a),m=gme(t,s,f,u);return{activeIndex:String(f),activeCoordinate:m}}}},wme=(e,t,n,r,a,s,o,u)=>{if(!(!e||!t||!r||!a||!s))return t==="horizontal"||t==="vertical"?Tme(e,t,r,a,s,o,u):Sme(e,t,n,r,a,s,o)},Ame=ue(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}}),Cme=ue(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(Rr)),n=Array.from(new Set(t));return n.sort((r,a)=>r-a)},{memoizeOptions:{resultEqualityCheck:bue}});function a3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function i3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a3(Object(n),!0).forEach(function(r){kme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kme(e,t,n){return(t=Ome(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ome(e){var t=Ime(e,"string");return typeof t=="symbol"?t:t+""}function Ime(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rme={},Mme={zIndexMap:Object.values(Rr).reduce((e,t)=>i3(i3({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),Rme)},Dme=new Set(Object.values(Rr));function jme(e){return Dme.has(e)}var sL=Nr({name:"zIndex",initialState:Mme,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:Jt()},unregisterZIndexPortal:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!jme(n)&&delete e.zIndexMap[n])},prepare:Jt()},registerZIndexPortalElement:{reducer:(e,t)=>{var n=t.payload,r=n.zIndex,a=n.element,s=n.isPanorama;e.zIndexMap[r]?s?e.zIndexMap[r].panoramaElement=Ct(a):e.zIndexMap[r].element=Ct(a):e.zIndexMap[r]={consumers:0,element:s?void 0:Ct(a),panoramaElement:s?Ct(a):void 0}},prepare:Jt()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:Jt()}}}),hg=sL.actions,Lme=hg.registerZIndexPortal,Py=hg.unregisterZIndexPortal,Pme=hg.registerZIndexPortalElement,Bme=hg.unregisterZIndexPortalElement,Ume=sL.reducer;function vs(e){var t=e.zIndex,n=e.children,r=Mse(),a=r&&t!==void 0&&t!==0,s=ea(),o=v.useRef(void 0),u=v.useRef(new Set),d=on(),f=Ke(p=>Ame(p,t,s));if(v.useLayoutEffect(()=>{if(!a){var p=u.current;p.forEach(x=>{d(Py({zIndex:x}))}),p.clear(),o.current=void 0;return}if(u.current.has(t)||(d(Lme({zIndex:t})),u.current.add(t)),f){o.current=f;var b=u.current;b.forEach(x=>{x!==t&&(d(Py({zIndex:x})),b.delete(x))})}},[d,t,a,f]),v.useLayoutEffect(()=>{var p=u.current;return()=>{p.forEach(b=>{d(Py({zIndex:b}))}),p.clear()}},[d]),!a)return n;var m=f??o.current;return m?F5.createPortal(n,m):null}function t1(){return t1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t1.apply(null,arguments)}function s3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Bm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s3(Object(n),!0).forEach(function(r){zme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zme(e,t,n){return(t=Fme(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fme(e){var t=Hme(e,"string");return typeof t=="symbol"?t:t+""}function Hme(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $me(e){var t=e.cursor,n=e.cursorComp,r=e.cursorProps;return v.isValidElement(t)?v.cloneElement(t,r):v.createElement(n,r)}function Yme(e){var t,n=e.coordinate,r=e.payload,a=e.index,s=e.offset,o=e.tooltipAxisBandSize,u=e.layout,d=e.cursor,f=e.tooltipEventType,m=e.chartName,p=n,b=r,x=a;if(!d||!p||m!=="ScatterChart"&&f!=="axis")return null;var E,_,S;if(m==="ScatterChart")E=p,_=Woe,S=Rr.cursorLine;else if(m==="BarChart")E=Xoe(u,p,s,o),_=FD,S=Rr.cursorRectangle;else if(u==="radial"&&g4(p)){var T=HD(p),C=T.cx,A=T.cy,k=T.radius,I=T.startAngle,O=T.endAngle;E={cx:C,cy:A,startAngle:I,endAngle:O,innerRadius:k,outerRadius:k},_=Yle,S=Rr.cursorLine}else E={points:qle(u,p,s)},_=zoe,S=Rr.cursorLine;var j=typeof d=="object"&&"className"in d?d.className:void 0,H=Bm(Bm(Bm(Bm({stroke:"#ccc",pointerEvents:"none"},s),E),iE(d)),{},{payload:b,payloadIndex:x,className:re("recharts-tooltip-cursor",j)});return v.createElement(vs,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:S},v.createElement($me,{cursor:d,cursorComp:_,cursorProps:H}))}function qme(e){var t=dme(),n=CD(),r=oc(),a=xme();return t==null||n==null||r==null||a==null?null:v.createElement(Yme,t1({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:a}))}var oL=v.createContext(null),Gme=()=>v.useContext(oL),By={exports:{}},o3;function Kme(){return o3||(o3=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function a(d,f,m){this.fn=d,this.context=f,this.once=m||!1}function s(d,f,m,p,b){if(typeof m!="function")throw new TypeError("The listener must be a function");var x=new a(m,p||d,b),E=n?n+f:f;return d._events[E]?d._events[E].fn?d._events[E]=[d._events[E],x]:d._events[E].push(x):(d._events[E]=x,d._eventsCount++),d}function o(d,f){--d._eventsCount===0?d._events=new r:delete d._events[f]}function u(){this._events=new r,this._eventsCount=0}u.prototype.eventNames=function(){var f=[],m,p;if(this._eventsCount===0)return f;for(p in m=this._events)t.call(m,p)&&f.push(n?p.slice(1):p);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(m)):f},u.prototype.listeners=function(f){var m=n?n+f:f,p=this._events[m];if(!p)return[];if(p.fn)return[p.fn];for(var b=0,x=p.length,E=new Array(x);b<x;b++)E[b]=p[b].fn;return E},u.prototype.listenerCount=function(f){var m=n?n+f:f,p=this._events[m];return p?p.fn?1:p.length:0},u.prototype.emit=function(f,m,p,b,x,E){var _=n?n+f:f;if(!this._events[_])return!1;var S=this._events[_],T=arguments.length,C,A;if(S.fn){switch(S.once&&this.removeListener(f,S.fn,void 0,!0),T){case 1:return S.fn.call(S.context),!0;case 2:return S.fn.call(S.context,m),!0;case 3:return S.fn.call(S.context,m,p),!0;case 4:return S.fn.call(S.context,m,p,b),!0;case 5:return S.fn.call(S.context,m,p,b,x),!0;case 6:return S.fn.call(S.context,m,p,b,x,E),!0}for(A=1,C=new Array(T-1);A<T;A++)C[A-1]=arguments[A];S.fn.apply(S.context,C)}else{var k=S.length,I;for(A=0;A<k;A++)switch(S[A].once&&this.removeListener(f,S[A].fn,void 0,!0),T){case 1:S[A].fn.call(S[A].context);break;case 2:S[A].fn.call(S[A].context,m);break;case 3:S[A].fn.call(S[A].context,m,p);break;case 4:S[A].fn.call(S[A].context,m,p,b);break;default:if(!C)for(I=1,C=new Array(T-1);I<T;I++)C[I-1]=arguments[I];S[A].fn.apply(S[A].context,C)}}return!0},u.prototype.on=function(f,m,p){return s(this,f,m,p,!1)},u.prototype.once=function(f,m,p){return s(this,f,m,p,!0)},u.prototype.removeListener=function(f,m,p,b){var x=n?n+f:f;if(!this._events[x])return this;if(!m)return o(this,x),this;var E=this._events[x];if(E.fn)E.fn===m&&(!b||E.once)&&(!p||E.context===p)&&o(this,x);else{for(var _=0,S=[],T=E.length;_<T;_++)(E[_].fn!==m||b&&!E[_].once||p&&E[_].context!==p)&&S.push(E[_]);S.length?this._events[x]=S.length===1?S[0]:S:o(this,x)}return this},u.prototype.removeAllListeners=function(f){var m;return f?(m=n?n+f:f,this._events[m]&&o(this,m)):(this._events=new r,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=n,u.EventEmitter=u,e.exports=u})(By)),By.exports}var Vme=Kme();const Wme=yf(Vme);var bf=new Wme,n1="recharts.syncEvent.tooltip",l3="recharts.syncEvent.brush",Xme=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!Ni(n))return e[n]}},Qme={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},lL=Nr({name:"options",initialState:Qme,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Zme=lL.reducer,Jme=lL.actions.createEventEmitter;function epe(e){return e.tooltip.syncInteraction}var tpe={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},uL=Nr({name:"chartData",initialState:tpe,reducers:{setChartData(e,t){if(e.chartData=Ct(t.payload),t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var n=t.payload,r=n.startIndex,a=n.endIndex;r!=null&&(e.dataStartIndex=r),a!=null&&(e.dataEndIndex=a)}}}),C_=uL.actions,u3=C_.setChartData,npe=C_.setDataStartEndIndexes;C_.setComputedData;var rpe=uL.reducer,ape=["x","y"];function c3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function vu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c3(Object(n),!0).forEach(function(r){ipe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ipe(e,t,n){return(t=spe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function spe(e){var t=ope(e,"string");return typeof t=="symbol"?t:t+""}function ope(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lpe(e,t){if(e==null)return{};var n,r,a=upe(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function upe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function cpe(){var e=Ke(ME),t=Ke(DE),n=on(),r=Ke(ij),a=Ke(ys),s=oc(),o=V0(),u=Ke(d=>d.rootProps.className);v.useEffect(()=>{if(e==null)return sc;var d=(f,m,p)=>{if(t!==p&&e===f){if(m.payload.active===!1){n(jd({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(r==="index"){var b;if(o&&m!==null&&m!==void 0&&(b=m.payload)!==null&&b!==void 0&&b.coordinate&&m.payload.sourceViewBox){var x=m.payload.coordinate,E=x.x,_=x.y,S=lpe(x,ape),T=m.payload.sourceViewBox,C=T.x,A=T.y,k=T.width,I=T.height,O=vu(vu({},S),{},{x:o.x+(k?(E-C)/k:0)*o.width,y:o.y+(I?(_-A)/I:0)*o.height});n(vu(vu({},m),{},{payload:vu(vu({},m.payload),{},{coordinate:O})}))}else n(m);return}if(a!=null){var j;if(typeof r=="function"){var H={activeTooltipIndex:m.payload.index==null?void 0:Number(m.payload.index),isTooltipActive:m.payload.active,activeIndex:m.payload.index==null?void 0:Number(m.payload.index),activeLabel:m.payload.label,activeDataKey:m.payload.dataKey,activeCoordinate:m.payload.coordinate},z=r(a,H);j=a[z]}else r==="value"&&(j=a.find(F=>String(F.value)===m.payload.label));var D=m.payload.coordinate;if(D==null||o==null){n(jd({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(j==null){n(jd({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:void 0}));return}var V=D.x,q=D.y,ae=Math.min(V,o.x+o.width),Q=Math.min(q,o.y+o.height),W={x:s==="horizontal"?j.coordinate:ae,y:s==="horizontal"?Q:j.coordinate},G=jd({active:m.payload.active,coordinate:W,dataKey:m.payload.dataKey,index:String(j.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:m.payload.graphicalItemId});n(G)}}};return bf.on(n1,d),()=>{bf.off(n1,d)}},[u,n,t,e,r,a,s,o])}function dpe(){var e=Ke(ME),t=Ke(DE),n=on();v.useEffect(()=>{if(e==null)return sc;var r=(a,s,o)=>{t!==o&&e===a&&n(npe(s))};return bf.on(l3,r),()=>{bf.off(l3,r)}},[n,t,e])}function fpe(){var e=on();v.useEffect(()=>{e(Jme())},[e]),cpe(),dpe()}function hpe(e,t,n,r,a,s){var o=Ke(E=>vme(E,e,t)),u=Ke(nme),d=Ke(DE),f=Ke(ME),m=Ke(ij),p=Ke(epe),b=(p==null?void 0:p.sourceViewBox)!=null,x=V0();v.useEffect(()=>{if(!b&&f!=null&&d!=null){var E=jd({active:s,coordinate:n,dataKey:o,index:a,label:typeof r=="number"?String(r):r,sourceViewBox:x,graphicalItemId:u});bf.emit(n1,f,E,d)}},[b,n,o,u,a,r,d,f,m,s,x])}function d3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function f3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d3(Object(n),!0).forEach(function(r){mpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mpe(e,t,n){return(t=ppe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ppe(e){var t=gpe(e,"string");return typeof t=="symbol"?t:t+""}function gpe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bpe(e,t){return Epe(e)||vpe(e,t)||ype(e,t)||xpe()}function xpe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
610
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ype(e,t){if(e){if(typeof e=="string")return h3(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h3(e,t):void 0}}function h3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function vpe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function Epe(e){if(Array.isArray(e))return e}function _pe(e){return e.dataKey}function Npe(e,t){return v.isValidElement(e)?v.cloneElement(e,t):typeof e=="function"?v.createElement(e,t):v.createElement(hoe,t)}var m3=[],Tpe={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function k_(e){var t,n,r=Ba(e,Tpe),a=r.active,s=r.allowEscapeViewBox,o=r.animationDuration,u=r.animationEasing,d=r.content,f=r.filterNull,m=r.isAnimationActive,p=r.offset,b=r.payloadUniqBy,x=r.position,E=r.reverseDirection,_=r.useTranslate3d,S=r.wrapperStyle,T=r.cursor,C=r.shared,A=r.trigger,k=r.defaultIndex,I=r.portal,O=r.axisId,j=on(),H=typeof k=="number"?String(k):k;v.useEffect(()=>{j(che({shared:C,trigger:A,axisId:O,active:a,defaultIndex:H}))},[j,C,A,O,a,H]);var z=V0(),D=jD(),V=ahe(C),q=(t=Ke(je=>Nme(je,V,A,H)))!==null&&t!==void 0?t:{},ae=q.activeIndex,Q=q.isActive,W=Ke(je=>_me(je,V,A,H)),G=Ke(je=>iL(je,V,A,H)),F=Ke(je=>Eme(je,V,A,H)),$=W,K=Gme(),L=(n=a??Q)!==null&&n!==void 0?n:!1,P=Rae([$,L]),ee=bpe(P,2),M=ee[0],de=ee[1],_e=V==="axis"?G:void 0;hpe(V,A,F,_e,ae,L);var U=I??K;if(U==null||z==null||V==null)return null;var he=$??m3;L||(he=m3),f&&he.length&&(he=tae(he.filter(je=>je.value!=null&&(je.hide!==!0||r.includeHidden)),b,_pe));var Oe=he.length>0,pe=f3(f3({},r),{},{payload:he,label:_e,active:L,activeIndex:ae,coordinate:F,accessibilityLayer:D}),De=v.createElement(Doe,{allowEscapeViewBox:s,animationDuration:o,animationEasing:u,isAnimationActive:m,active:L,coordinate:F,hasPayload:Oe,offset:p,position:x,reverseDirection:E,useTranslate3d:_,viewBox:z,wrapperStyle:S,lastBoundingBox:M,innerRef:de,hasPortalFromProps:!!I},Npe(d,pe));return v.createElement(v.Fragment,null,F5.createPortal(De,U),L&&v.createElement(qme,{cursor:T,tooltipEventType:V,coordinate:F,payload:he,index:ae}))}var cL=e=>null;cL.displayName="Cell";function Spe(e,t,n){return(t=wpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wpe(e){var t=Ape(e,"string");return typeof t=="symbol"?t:t+""}function Ape(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Cpe{constructor(t){Spe(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;r!=null&&this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function p3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function kpe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p3(Object(n),!0).forEach(function(r){Ope(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ope(e,t,n){return(t=Ipe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ipe(e){var t=Rpe(e,"string");return typeof t=="symbol"?t:t+""}function Rpe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Mpe={cacheSize:2e3,enableCache:!0},dL=kpe({},Mpe),g3=new Cpe(dL.cacheSize),Dpe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},b3="recharts_measurement_span";function jpe(e,t){var n=t.fontSize||"",r=t.fontFamily||"",a=t.fontWeight||"",s=t.fontStyle||"",o=t.letterSpacing||"",u=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(a,"|").concat(s,"|").concat(o,"|").concat(u)}var x3=(e,t)=>{try{var n=document.getElementById(b3);n||(n=document.createElement("span"),n.setAttribute("id",b3),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,Dpe,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},Vd=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ff.isSsr)return{width:0,height:0};if(!dL.enableCache)return x3(t,n);var r=jpe(t,n),a=g3.get(r);if(a)return a;var s=x3(t,n);return g3.set(r,s),s},fL;function r0(e,t){return Upe(e)||Bpe(e,t)||Ppe(e,t)||Lpe()}function Lpe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
611
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ppe(e,t){if(e){if(typeof e=="string")return y3(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y3(e,t):void 0}}function y3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Bpe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;d=!1}else for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function Upe(e){if(Array.isArray(e))return e}function zpe(e,t,n){return(t=Fpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fpe(e){var t=Hpe(e,"string");return typeof t=="symbol"?t:t+""}function Hpe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var v3=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,E3=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,$pe=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,Ype=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,qpe={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Gpe=["cm","mm","pt","pc","in","Q","px"];function Kpe(e){return Gpe.includes(e)}var ku="NaN";function Vpe(e,t){return e*qpe[t]}class ir{static parse(t){var n,r=(n=Ype.exec(t))!==null&&n!==void 0?n:[],a=r0(r,3),s=a[1],o=a[2];return s==null?ir.NaN:new ir(parseFloat(s),o??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,Ni(t)&&(this.unit=""),n!==""&&!$pe.test(n)&&(this.num=NaN,this.unit=""),Kpe(n)&&(this.num=Vpe(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new ir(NaN,""):new ir(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new ir(NaN,""):new ir(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ir(NaN,""):new ir(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ir(NaN,""):new ir(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Ni(this.num)}}fL=ir;zpe(ir,"NaN",new fL(NaN,""));function hL(e){if(e==null||e.includes(ku))return ku;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=v3.exec(t))!==null&&n!==void 0?n:[],a=r0(r,4),s=a[1],o=a[2],u=a[3],d=ir.parse(s??""),f=ir.parse(u??""),m=o==="*"?d.multiply(f):d.divide(f);if(m.isNaN())return ku;t=t.replace(v3,m.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var p,b=(p=E3.exec(t))!==null&&p!==void 0?p:[],x=r0(b,4),E=x[1],_=x[2],S=x[3],T=ir.parse(E??""),C=ir.parse(S??""),A=_==="+"?T.add(C):T.subtract(C);if(A.isNaN())return ku;t=t.replace(E3,A.toString())}return t}var _3=/\(([^()]*)\)/;function Wpe(e){for(var t=e,n;(n=_3.exec(t))!=null;){var r=n,a=r0(r,2),s=a[1];t=t.replace(_3,hL(s))}return t}function Xpe(e){var t=e.replace(/\s+/g,"");return t=Wpe(t),t=hL(t),t}function Qpe(e){try{return Xpe(e)}catch{return ku}}function Uy(e){var t=Qpe(e.slice(5,-1));return t===ku?"":t}var Zpe=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],Jpe=["dx","dy","angle","className","breakAll"];function r1(){return r1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r1.apply(null,arguments)}function N3(e,t){if(e==null)return{};var n,r,a=e0e(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function e0e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function T3(e,t){return a0e(e)||r0e(e,t)||n0e(e,t)||t0e()}function t0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
612
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n0e(e,t){if(e){if(typeof e=="string")return S3(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S3(e,t):void 0}}function S3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function r0e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;d=!1}else for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function a0e(e){if(Array.isArray(e))return e}var mL=/[ \f\n\r\t\v\u2028\u2029]+/,pL=e=>{var t=e.children,n=e.breakAll,r=e.style;try{var a=[];Ln(t)||(n?a=t.toString().split(""):a=t.toString().split(mL));var s=a.map(u=>({word:u,width:Vd(u,r).width})),o=n?0:Vd(" ",r).width;return{wordsWithComputedWidth:s,spaceWidth:o}}catch{return null}};function gL(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function i0e(e){return Ln(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var bL=(e,t,n,r)=>e.reduce((a,s)=>{var o=s.word,u=s.width,d=a[a.length-1];if(d&&u!=null&&(t==null||r||d.width+u+n<Number(t)))d.words.push(o),d.width+=u+n;else{var f={words:[o],width:u};a.push(f)}return a},[]),xL=e=>e.reduce((t,n)=>t.width>n.width?t:n),s0e="…",w3=(e,t,n,r,a,s,o,u)=>{var d=e.slice(0,t),f=pL({breakAll:n,style:r,children:d+s0e});if(!f)return[!1,[]];var m=bL(f.wordsWithComputedWidth,s,o,u),p=m.length>a||xL(m).width>Number(s);return[p,m]},o0e=(e,t,n,r,a)=>{var s=e.maxLines,o=e.children,u=e.style,d=e.breakAll,f=qe(s),m=String(o),p=bL(t,r,n,a);if(!f||a)return p;var b=p.length>s||xL(p).width>Number(r);if(!b)return p;for(var x=0,E=m.length-1,_=0,S;x<=E&&_<=m.length-1;){var T=Math.floor((x+E)/2),C=T-1,A=w3(m,C,d,u,s,r,n,a),k=T3(A,2),I=k[0],O=k[1],j=w3(m,T,d,u,s,r,n,a),H=T3(j,1),z=H[0];if(!I&&!z&&(x=T+1),I&&z&&(E=T-1),!I&&z){S=O;break}_++}return S||p},A3=e=>{var t=Ln(e)?[]:e.toString().split(mL);return[{words:t,width:void 0}]},l0e=e=>{var t=e.width,n=e.scaleToFit,r=e.children,a=e.style,s=e.breakAll,o=e.maxLines;if((t||n)&&!Ff.isSsr){var u,d,f=pL({breakAll:s,children:r,style:a});if(f){var m=f.wordsWithComputedWidth,p=f.spaceWidth;u=m,d=p}else return A3(r);return o0e({breakAll:s,children:r,maxLines:o,style:a},u,d,t,!!n)}return A3(r)},yL="#808080",u0e={angle:0,breakAll:!1,capHeight:"0.71em",fill:yL,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},O_=v.forwardRef((e,t)=>{var n=Ba(e,u0e),r=n.x,a=n.y,s=n.lineHeight,o=n.capHeight,u=n.fill,d=n.scaleToFit,f=n.textAnchor,m=n.verticalAnchor,p=N3(n,Zpe),b=v.useMemo(()=>l0e({breakAll:p.breakAll,children:p.children,maxLines:p.maxLines,scaleToFit:d,style:p.style,width:p.width}),[p.breakAll,p.children,p.maxLines,d,p.style,p.width]),x=p.dx,E=p.dy,_=p.angle,S=p.className,T=p.breakAll,C=N3(p,Jpe);if(!Ti(r)||!Ti(a)||b.length===0)return null;var A=Number(r)+(qe(x)?x:0),k=Number(a)+(qe(E)?E:0);if(!Nt(A)||!Nt(k))return null;var I;switch(m){case"start":I=Uy("calc(".concat(o,")"));break;case"middle":I=Uy("calc(".concat((b.length-1)/2," * -").concat(s," + (").concat(o," / 2))"));break;default:I=Uy("calc(".concat(b.length-1," * -").concat(s,")"));break}var O=[],j=b[0];if(d&&j!=null){var H=j.width,z=p.width;O.push("scale(".concat(qe(z)&&qe(H)?z/H:1,")"))}return _&&O.push("rotate(".concat(_,", ").concat(A,", ").concat(k,")")),O.length&&(C.transform=O.join(" ")),v.createElement("text",r1({},os(C),{ref:t,x:A,y:k,className:re("recharts-text",S),textAnchor:f,fill:u.includes("url")?yL:u}),b.map((D,V)=>{var q=D.words.join(T?"":" ");return v.createElement("tspan",{x:A,dy:V===0?I:s,key:"".concat(q,"-").concat(V)},q)}))});O_.displayName="Text";var c0e=["labelRef"],d0e=["content"];function C3(e,t){if(e==null)return{};var n,r,a=f0e(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function f0e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function k3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Vo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k3(Object(n),!0).forEach(function(r){h0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function h0e(e,t,n){return(t=m0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m0e(e){var t=p0e(e,"string");return typeof t=="symbol"?t:t+""}function p0e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zi(){return Zi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zi.apply(null,arguments)}var vL=v.createContext(null),g0e=e=>{var t=e.x,n=e.y,r=e.upperWidth,a=e.lowerWidth,s=e.width,o=e.height,u=e.children,d=v.useMemo(()=>({x:t,y:n,upperWidth:r,lowerWidth:a,width:s,height:o}),[t,n,r,a,s,o]);return v.createElement(vL.Provider,{value:d},u)},EL=()=>{var e=v.useContext(vL),t=V0();return e||(t?uE(t):void 0)},b0e=v.createContext(null),x0e=()=>{var e=v.useContext(b0e),t=Ke(cj);return e||t},y0e=e=>{var t=e.value,n=e.formatter,r=Ln(e.children)?t:e.children;return typeof n=="function"?n(r):r},mg=e=>e!=null&&typeof e=="function",v0e=(e,t)=>{var n=Wr(t-e),r=Math.min(Math.abs(t-e),360);return n*r},E0e=(e,t,n,r,a)=>{var s=e.offset,o=e.className,u=a.cx,d=a.cy,f=a.innerRadius,m=a.outerRadius,p=a.startAngle,b=a.endAngle,x=a.clockWise,E=(f+m)/2,_=v0e(p,b),S=_>=0?1:-1,T,C;switch(t){case"insideStart":T=p+S*s,C=x;break;case"insideEnd":T=b-S*s,C=!x;break;case"end":T=b+S*s,C=x;break;default:throw new Error("Unsupported position ".concat(t))}C=_<=0?C:!C;var A=sr(u,d,E,T),k=sr(u,d,E,T+(C?1:-1)*359),I="M".concat(A.x,",").concat(A.y,`
|
|
613
|
+
A`).concat(E,",").concat(E,",0,1,").concat(C?0:1,`,
|
|
614
|
+
`).concat(k.x,",").concat(k.y),O=Ln(e.id)?of("recharts-radial-line-"):e.id;return v.createElement("text",Zi({},r,{dominantBaseline:"central",className:re("recharts-radial-bar-label",o)}),v.createElement("defs",null,v.createElement("path",{id:O,d:I})),v.createElement("textPath",{xlinkHref:"#".concat(O)},n))},_0e=(e,t,n)=>{var r=e.cx,a=e.cy,s=e.innerRadius,o=e.outerRadius,u=e.startAngle,d=e.endAngle,f=(u+d)/2;if(n==="outside"){var m=sr(r,a,o+t,f),p=m.x,b=m.y;return{x:p,y:b,textAnchor:p>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:a,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:a,textAnchor:"middle",verticalAnchor:"end"};var x=(s+o)/2,E=sr(r,a,x,f),_=E.x,S=E.y;return{x:_,y:S,textAnchor:"middle",verticalAnchor:"middle"}},Au=e=>e!=null&&"cx"in e&&qe(e.cx),N0e={angle:0,offset:5,zIndex:Rr.label,position:"middle",textBreakAll:!1};function T0e(e){if(!Au(e))return e;var t=e.cx,n=e.cy,r=e.outerRadius,a=r*2;return{x:t-r,y:n-r,width:a,upperWidth:a,lowerWidth:a,height:a}}function to(e){var t,n,r=Ba(e,N0e),a=r.viewBox,s=r.parentViewBox,o=r.position,u=r.value,d=r.children,f=r.content,m=r.className,p=m===void 0?"":m,b=r.textBreakAll,x=r.labelRef,E=x0e(),_=EL(),S=o==="center"?_:E??_,T,C,A;a==null?T=S:Au(a)?T=a:T=uE(a);var k=T0e(T);if(!T||Ln(u)&&Ln(d)&&!v.isValidElement(f)&&typeof f!="function")return null;var I=Au(T)&&(o==="insideStart"||o==="insideEnd"||o==="end");if(Au(T))I||(A=_0e(T,r.offset,r.position));else if(k){var O=ere({viewBox:k,position:o,offset:r.offset,parentViewBox:Au(s)?void 0:s});A=Vo(Vo({x:O.x,y:O.y,textAnchor:O.horizontalAnchor,verticalAnchor:O.verticalAnchor},O.width!==void 0?{width:O.width}:{}),O.height!==void 0?{height:O.height}:{})}var j=Vo(Vo(Vo(Vo({},((t=A)===null||t===void 0?void 0:t.x)!==void 0?{x:A.x}:{}),((n=A)===null||n===void 0?void 0:n.y)!==void 0?{y:A.y}:{}),r),{},{viewBox:T});if(v.isValidElement(f)){j.labelRef;var H=C3(j,c0e);return v.cloneElement(f,H)}if(typeof f=="function"){j.content;var z=C3(j,d0e);if(C=v.createElement(f,z),v.isValidElement(C))return C}else C=y0e(r);var D=os(r);return I&&Au(T)?E0e(r,o,C,D,T):A==null?null:v.createElement(vs,{zIndex:r.zIndex},v.createElement(O_,Zi({ref:x,className:re("recharts-label",p)},D,A,{textAnchor:gL(D.textAnchor)?D.textAnchor:A.textAnchor,breakAll:b}),C))}to.displayName="Label";var S0e=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?v.createElement(to,Zi({key:"label-implicit"},r)):Ti(e)?v.createElement(to,Zi({key:"label-implicit",value:e},r)):v.isValidElement(e)?e.type===to?v.cloneElement(e,Vo({key:"label-implicit"},r)):v.createElement(to,Zi({key:"label-implicit",content:e},r)):mg(e)?v.createElement(to,Zi({key:"label-implicit",content:e},r)):e&&typeof e=="object"?v.createElement(to,Zi({},e,{key:"label-implicit"},r)):null};function w0e(e){var t=e.label,n=e.labelRef,r=EL();return S0e(t,r,n)||null}var A0e=["valueAccessor"],C0e=["dataKey","clockWise","id","textBreakAll","zIndex"];function a0(){return a0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a0.apply(null,arguments)}function O3(e,t){if(e==null)return{};var n,r,a=k0e(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function k0e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var O0e=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(i0e(t))return t},_L=v.createContext(void 0),I0e=_L.Provider,NL=v.createContext(void 0);NL.Provider;function R0e(){return v.useContext(_L)}function M0e(){return v.useContext(NL)}function ep(e){var t=e.valueAccessor,n=t===void 0?O0e:t,r=O3(e,A0e),a=r.dataKey;r.clockWise;var s=r.id,o=r.textBreakAll,u=r.zIndex,d=O3(r,C0e),f=R0e(),m=M0e(),p=f||m;return!p||!p.length?null:v.createElement(vs,{zIndex:u??Rr.label},v.createElement(_i,{className:"recharts-label-list"},p.map((b,x)=>{var E,_=Ln(a)?n(b,x):Gn(b.payload,a),S=Ln(s)?{}:{id:"".concat(s,"-").concat(x)};return v.createElement(to,a0({key:"label-".concat(x)},os(b),d,S,{fill:(E=r.fill)!==null&&E!==void 0?E:b.fill,parentViewBox:b.parentViewBox,value:_,textBreakAll:o,viewBox:b.viewBox,index:x,zIndex:0}))})))}ep.displayName="LabelList";function D0e(e){var t=e.label;return t?t===!0?v.createElement(ep,{key:"labelList-implicit"}):v.isValidElement(t)||mg(t)?v.createElement(ep,{key:"labelList-implicit",content:t}):typeof t=="object"?v.createElement(ep,a0({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}var j0e={radiusAxis:{},angleAxis:{}},TL=Nr({name:"polarAxis",initialState:j0e,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=Ct(t.payload)},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=Ct(t.payload)},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),pg=TL.actions;pg.addRadiusAxis;pg.removeRadiusAxis;pg.addAngleAxis;pg.removeAngleAxis;var L0e=TL.reducer;function P0e(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var zy={exports:{}},zt={};/**
|
|
615
|
+
* @license React
|
|
616
|
+
* react-is.production.js
|
|
617
|
+
*
|
|
618
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
619
|
+
*
|
|
620
|
+
* This source code is licensed under the MIT license found in the
|
|
621
|
+
* LICENSE file in the root directory of this source tree.
|
|
622
|
+
*/var I3;function B0e(){if(I3)return zt;I3=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),b=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function E(_){if(typeof _=="object"&&_!==null){var S=_.$$typeof;switch(S){case e:switch(_=_.type,_){case n:case a:case r:case d:case f:case b:return _;default:switch(_=_&&_.$$typeof,_){case o:case u:case p:case m:return _;case s:return _;default:return S}}case t:return S}}}return zt.ContextConsumer=s,zt.ContextProvider=o,zt.Element=e,zt.ForwardRef=u,zt.Fragment=n,zt.Lazy=p,zt.Memo=m,zt.Portal=t,zt.Profiler=a,zt.StrictMode=r,zt.Suspense=d,zt.SuspenseList=f,zt.isContextConsumer=function(_){return E(_)===s},zt.isContextProvider=function(_){return E(_)===o},zt.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===e},zt.isForwardRef=function(_){return E(_)===u},zt.isFragment=function(_){return E(_)===n},zt.isLazy=function(_){return E(_)===p},zt.isMemo=function(_){return E(_)===m},zt.isPortal=function(_){return E(_)===t},zt.isProfiler=function(_){return E(_)===a},zt.isStrictMode=function(_){return E(_)===r},zt.isSuspense=function(_){return E(_)===d},zt.isSuspenseList=function(_){return E(_)===f},zt.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===a||_===r||_===d||_===f||typeof _=="object"&&_!==null&&(_.$$typeof===p||_.$$typeof===m||_.$$typeof===o||_.$$typeof===s||_.$$typeof===u||_.$$typeof===x||_.getModuleId!==void 0)},zt.typeOf=E,zt}var R3;function U0e(){return R3||(R3=1,zy.exports=B0e()),zy.exports}var z0e=U0e(),M3=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",D3=null,Fy=null,SL=e=>{if(e===D3&&Array.isArray(Fy))return Fy;var t=[];return v.Children.forEach(e,n=>{Ln(n)||(z0e.isFragment(n)?t=t.concat(SL(n.props.children)):t.push(n))}),Fy=t,D3=e,t};function F0e(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(a=>M3(a)):r=[M3(t)],SL(e).forEach(a=>{var s=ls(a,"type.displayName")||ls(a,"type.name");s&&r.indexOf(s)!==-1&&n.push(a)}),n}function j3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function L3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j3(Object(n),!0).forEach(function(r){H0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function H0e(e,t,n){return(t=$0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $0e(e){var t=Y0e(e,"string");return typeof t=="symbol"?t:t+""}function Y0e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wL(e,t){return L3(L3({},t),e)}function q0e(e){return v.isValidElement(e)?e.props:e}function G0e(e,t){return v.cloneElement(e,wL(q0e(e),t))}function K0e(e){if("index"in e){var t=e.index;return typeof t=="number"||typeof t=="string"?t:void 0}}function V0e(e){return"isActive"in e&&e.isActive===!0}function W0e(e){var t=e.option,n=e.DefaultShape,r=e.shapeProps,a=e.activeClassName,s=a===void 0?"recharts-active-shape":a,o=e.inActiveClassName,u=o===void 0?"recharts-shape":o,d=K0e(r),f;return v.isValidElement(t)?f=G0e(t,r):t===n?f=v.createElement(n,r):typeof t=="function"?f=t(r,d):typeof t=="object"?f=v.createElement(n,wL(t,r)):f=v.createElement(n,r),V0e(r)?v.createElement(_i,{className:s},f):v.createElement(_i,{className:u},f)}var AL=(e,t,n)=>{var r=on();return(a,s)=>o=>{e==null||e(a,s,o),r(B6({activeIndex:String(s),activeDataKey:t,activeCoordinate:a.tooltipPosition,activeGraphicalItemId:n}))}},CL=e=>{var t=on();return(n,r)=>a=>{e==null||e(n,r,a),t(dhe())}},kL=(e,t,n)=>{var r=on();return(a,s)=>o=>{e==null||e(a,s,o),r(fhe({activeIndex:String(s),activeDataKey:t,activeCoordinate:a.tooltipPosition,activeGraphicalItemId:n}))}};function X0e(e){var t=e.tooltipEntrySettings,n=on(),r=ea(),a=v.useRef(null);return v.useLayoutEffect(()=>{r||(a.current===null?n(ohe(t)):a.current!==t&&n(lhe({prev:a.current,next:t})),a.current=t)},[t,n,r]),v.useLayoutEffect(()=>()=>{a.current&&(n(uhe(a.current)),a.current=null)},[n]),null}function Q0e(e){var t=e.legendPayload,n=on(),r=ea(),a=v.useRef(null);return v.useLayoutEffect(()=>{r||(a.current===null?n(jse(t)):a.current!==t&&n(Lse({prev:a.current,next:t})),a.current=t)},[n,r,t]),v.useLayoutEffect(()=>()=>{a.current&&(n(Pse(a.current)),a.current=null)},[n]),null}function Z0e(e,t){return nge(e)||tge(e,t)||ege(e,t)||J0e()}function J0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
623
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ege(e,t){if(e){if(typeof e=="string")return P3(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P3(e,t):void 0}}function P3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function nge(e){if(Array.isArray(e))return e}var OL="index",IL="append";function I_(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=[];for(var a of n)r.push({status:"removed",prev:a});for(var s=0;s<t.length;s++){var o=e[s],u=t[s];o!=null?r.push({status:"matched",prev:o,next:u}):r.push({status:"added",next:u})}return r}function rge(e,t){var n=e.length/t.length,r=t.map((a,s)=>e[Math.floor(s*n)]);return I_(r,t)}function age(e,t){var n=t.map((r,a)=>e[a]);return I_(n,t)}function ige(e,t){for(var n=new Map,r=0;r<e.length;r++){var a=e[r];if(a!=null){var s=t(a,r);s!=null&&!n.has(s)&&n.set(s,a)}}return n}function sge(e,t,n){var r=ige(e,n),a=new Set,s=t.map((p,b)=>{var x=n(p,b);if(x!=null){var E=r.get(x);if(E!==void 0)return a.add(x),E}}),o=[];for(var u of r){var d=Z0e(u,2),f=d[0],m=d[1];a.has(f)||o.push(m)}return I_(s,t,o)}function oge(e,t,n){return t==null?null:e==null?t.map(r=>({status:"added",next:r})):n===OL?rge(e,t):n===IL?age(e,t):sge(e,t,n)}function lge(e,t){var n=v.useRef(e),r=v.useRef(t.current),a=v.useRef(!0);n.current!==e&&(n.current=e,r.current=t.current,a.current=!1);var s=v.useCallback(function(o,u){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(u===0){a.current=!0;return}u===1&&(r.current=o),u>0&&a.current&&d&&(t.current=o)},[t]);return{startValue:r.current,syncStepValue:s}}function uge(e,t){return hge(e)||fge(e,t)||dge(e,t)||cge()}function cge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
624
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dge(e,t){if(e){if(typeof e=="string")return B3(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B3(e,t):void 0}}function B3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function fge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function hge(e){if(Array.isArray(e))return e}function mge(e,t){var n=v.useState(!1),r=uge(n,2),a=r[0],s=r[1],o=v.useCallback(()=>{typeof e=="function"&&e(),s(!0)},[e]),u=v.useCallback(()=>{typeof t=="function"&&t(),s(!1)},[t]);return{isAnimating:a,handleAnimationStart:o,handleAnimationEnd:u}}function pge(e){var t,n=e.animationInput,r=e.animationIdPrefix,a=e.items,s=e.previousItemsRef,o=e.isAnimationActive,u=e.animationBegin,d=e.animationDuration,f=e.animationEasing,m=e.onAnimationStart,p=e.onAnimationEnd,b=e.animationInterpolateFn,x=e.animationMatchBy,E=e.shouldUpdatePreviousRef,_=e.children,S=e.layout,T=zD(n,r),C=lge(T,s),A=(t=C.startValue)!==null&&t!==void 0?t:null,k=oge(A,a,x??OL);return v.createElement(UD,{animationId:T,begin:u,duration:d,isActive:o,easing:f,onAnimationEnd:p,onAnimationStart:m,key:T},I=>{var O=A==null,j=a==null?a:b(k,I,S),H=E?E(I):I>0;return C.syncStepValue(j,I,H),j==null?null:_(j,I,O)})}var Hy;function gge(e,t){return vge(e)||yge(e,t)||xge(e,t)||bge()}function bge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
625
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xge(e,t){if(e){if(typeof e=="string")return U3(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U3(e,t):void 0}}function U3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function vge(e){if(Array.isArray(e))return e}var Ege=()=>{var e=v.useState(()=>of("uid-")),t=gge(e,1),n=t[0];return n},_ge=(Hy=yB.useId)!==null&&Hy!==void 0?Hy:Ege;function Nge(e,t){var n=_ge();return t||(e?"".concat(e,"-").concat(n):n)}var Tge=v.createContext(void 0),Sge=e=>{var t=e.id,n=e.type,r=e.children,a=Nge("recharts-".concat(n),t);return v.createElement(Tge.Provider,{value:a},r(a))},wge={cartesianItems:[],polarItems:[]},RL=Nr({name:"graphicalItems",initialState:wge,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(Ct(t.payload))},prepare:Jt()},replaceCartesianGraphicalItem:{reducer(e,t){var n=t.payload,r=n.prev,a=n.next,s=Ia(e).cartesianItems.indexOf(Ct(r));s>-1&&(e.cartesianItems[s]=Ct(a))},prepare:Jt()},removeCartesianGraphicalItem:{reducer(e,t){var n=Ia(e).cartesianItems.indexOf(Ct(t.payload));n>-1&&e.cartesianItems.splice(n,1)},prepare:Jt()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(Ct(t.payload))},prepare:Jt()},removePolarGraphicalItem:{reducer(e,t){var n=Ia(e).polarItems.indexOf(Ct(t.payload));n>-1&&e.polarItems.splice(n,1)},prepare:Jt()},replacePolarGraphicalItem:{reducer(e,t){var n=t.payload,r=n.prev,a=n.next,s=Ia(e).polarItems.indexOf(Ct(r));s>-1&&(e.polarItems[s]=Ct(a))},prepare:Jt()}}}),gc=RL.actions,Age=gc.addCartesianGraphicalItem,Cge=gc.replaceCartesianGraphicalItem,kge=gc.removeCartesianGraphicalItem;gc.addPolarGraphicalItem;gc.removePolarGraphicalItem;gc.replacePolarGraphicalItem;var Oge=RL.reducer,Ige=e=>{var t=on(),n=v.useRef(null);return v.useLayoutEffect(()=>{n.current===null?t(Age(e)):n.current!==e&&t(Cge({prev:n.current,next:e})),n.current=e},[t,e]),v.useLayoutEffect(()=>()=>{n.current&&(t(kge(n.current)),n.current=null)},[t]),null},Rge=v.memo(Ige);function z3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Um(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z3(Object(n),!0).forEach(function(r){Mge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mge(e,t,n){return(t=Dge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dge(e){var t=jge(e,"string");return typeof t=="symbol"?t:t+""}function jge(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ML=0,Lge={xAxis:{},yAxis:{},zAxis:{}},DL=Nr({name:"cartesianAxis",initialState:Lge,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=Ct(t.payload)},prepare:Jt()},replaceXAxis:{reducer(e,t){var n=t.payload,r=n.prev,a=n.next;e.xAxis[r.id]!==void 0&&(r.id!==a.id&&delete e.xAxis[r.id],e.xAxis[a.id]=Ct(a))},prepare:Jt()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Jt()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=Ct(t.payload)},prepare:Jt()},replaceYAxis:{reducer(e,t){var n=t.payload,r=n.prev,a=n.next;e.yAxis[r.id]!==void 0&&(r.id!==a.id&&delete e.yAxis[r.id],e.yAxis[a.id]=Ct(a))},prepare:Jt()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Jt()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=Ct(t.payload)},prepare:Jt()},replaceZAxis:{reducer(e,t){var n=t.payload,r=n.prev,a=n.next;e.zAxis[r.id]!==void 0&&(r.id!==a.id&&delete e.zAxis[r.id],e.zAxis[a.id]=Ct(a))},prepare:Jt()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Jt()},updateYAxisWidth(e,t){var n=t.payload,r=n.id,a=n.width,s=e.yAxis[r];if(s){var o,u=s.widthHistory||[];if(u.length===3&&u[0]===u[2]&&a===u[1]&&a!==s.width&&Math.abs(a-((o=u[0])!==null&&o!==void 0?o:0))<=1)return;var d=[...u,a].slice(-3);e.yAxis[r]=Um(Um({},s),{},{width:a,widthHistory:d})}},updateXAxisHeight(e,t){var n=t.payload,r=n.id,a=n.height,s=e.xAxis[r];if(s){var o,u=s.heightHistory||[];if(u.length===3&&u[0]===u[2]&&a===u[1]&&a!==s.height&&Math.abs(a-((o=u[0])!==null&&o!==void 0?o:0))<=1)return;var d=[...u,a].slice(-3);e.xAxis[r]=Um(Um({},s),{},{height:a,heightHistory:d})}}}}),ri=DL.actions,Pge=ri.addXAxis,Bge=ri.replaceXAxis,Uge=ri.removeXAxis,zge=ri.addYAxis,Fge=ri.replaceYAxis,Hge=ri.removeYAxis;ri.addZAxis;ri.replaceZAxis;ri.removeZAxis;var $ge=ri.updateYAxisWidth,Yge=ri.updateXAxisHeight,qge=DL.reducer,Gge=ue([Kn],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),Kge=ue([Gge,ms,ps],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),jL=()=>Ke(Kge);function Vge(e,t){return Zge(e)||Qge(e,t)||Xge(e,t)||Wge()}function Wge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
626
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xge(e,t){if(e){if(typeof e=="string")return F3(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F3(e,t):void 0}}function F3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Qge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function Zge(e){if(Array.isArray(e))return e}var H3=(e,t,n)=>{var r=n??e;if(!Ln(r))return Za(r,t,0)},Jge=(e,t,n)=>{var r={},a=e.filter(ng),s=e.filter(f=>f.stackId==null),o=a.reduce((f,m)=>{var p=f[m.stackId];return p==null&&(p=[]),p.push(m),f[m.stackId]=p,f},r),u=Object.entries(o).map(f=>{var m,p=Vge(f,2),b=p[0],x=p[1],E=x.map(S=>S.dataKey),_=H3(t,n,(m=x[0])===null||m===void 0?void 0:m.barSize);return{stackId:b,dataKeys:E,barSize:_}}),d=s.map(f=>{var m=[f.dataKey].filter(b=>b!=null),p=H3(t,n,f.barSize);return{stackId:void 0,dataKeys:m,barSize:p}});return[...u,...d]};function $3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function zm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$3(Object(n),!0).forEach(function(r){ebe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ebe(e,t,n){return(t=tbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tbe(e){var t=nbe(e,"string");return typeof t=="symbol"?t:t+""}function nbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rbe(e,t,n,r,a){var s,o=r.length;if(!(o<1)){var u=Za(e,n,0,!0),d,f=[];if(Nt((s=r[0])===null||s===void 0?void 0:s.barSize)){var m=!1,p=n/o,b=r.reduce((C,A)=>C+(A.barSize||0),0);b+=(o-1)*u,b>=n&&(b-=(o-1)*u,u=0),b>=n&&p>0&&(m=!0,p*=.9,b=o*p);var x=Math.round((n-b)/2),E={offset:x-u,size:0};d=r.reduce((C,A)=>{var k,I={stackId:A.stackId,dataKeys:A.dataKeys,position:{offset:E.offset+E.size+u,size:m?p:(k=A.barSize)!==null&&k!==void 0?k:0}},O=[...C,I];return E=I.position,O},f)}else{var _=Za(t,n,0,!0);n-2*_-(o-1)*u<=0&&(u=0);var S=(n-2*_-(o-1)*u)/o;S>1&&(S=Math.round(S));var T=Nt(a)?Math.min(S,a):S;d=r.reduce((C,A,k)=>[...C,{stackId:A.stackId,dataKeys:A.dataKeys,position:{offset:_+o*(S-T)/2+(T+u)*k,size:T}}],f)}return d}}var abe=(e,t,n,r,a,s,o)=>{var u=Ln(o)?t:o,d=rbe(n,r,a!==s?a:s,e,u);return a!==s&&d!=null&&(d=d.map(f=>zm(zm({},f),{},{position:zm(zm({},f.position),{},{offset:f.position.offset-a/2})}))),d},ibe=(e,t)=>{var n=BE(t);if(!(!e||n==null||t==null)){var r=t.stackId;if(r!=null){var a=e[r];if(a){var s=a.stackedData;if(s)return s.find(o=>o.key===n)}}}},sbe=(e,t)=>{if(!(e==null||t==null)){var n=e.find(r=>r.stackId===t.stackId&&t.dataKey!=null&&r.dataKeys.includes(t.dataKey));if(n!=null)return n.position}};function obe(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Nt(e.zIndex)?e.zIndex:t}var lbe=e=>{var t=e.chartData,n=on(),r=ea();return v.useEffect(()=>r?()=>{}:(n(u3(t)),()=>{n(u3(void 0))}),[t,n,r]),null},Y3={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},LL=Nr({name:"brush",initialState:Y3,reducers:{setBrushSettings(e,t){return t.payload==null?Y3:t.payload}}});LL.actions.setBrushSettings;var ube=LL.reducer;function cbe(e){return(e%180+180)%180}var dbe=function(t){var n=t.width,r=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=cbe(a),o=s*Math.PI/180,u=Math.atan(r/n),d=o>u&&o<Math.PI-u?r/Math.sin(o):n/Math.cos(o);return Math.abs(d)},fbe={dots:[],areas:[],lines:[]},PL=Nr({name:"referenceElements",initialState:fbe,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=Ia(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=Ia(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(Ct(t.payload))},removeLine:(e,t)=>{var n=Ia(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),bc=PL.actions;bc.addDot;bc.removeDot;bc.addArea;bc.removeArea;bc.addLine;bc.removeLine;var hbe=PL.reducer;function mbe(e,t){return xbe(e)||bbe(e,t)||gbe(e,t)||pbe()}function pbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
627
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gbe(e,t){if(e){if(typeof e=="string")return q3(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q3(e,t):void 0}}function q3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bbe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function xbe(e){if(Array.isArray(e))return e}var ybe=v.createContext(void 0),vbe=e=>{var t=e.children,n=v.useState("".concat(of("recharts"),"-clip")),r=mbe(n,1),a=r[0],s=jL();if(s==null)return null;var o=s.x,u=s.y,d=s.width,f=s.height;return v.createElement(ybe.Provider,{value:a},v.createElement("defs",null,v.createElement("clipPath",{id:a},v.createElement("rect",{x:o,y:u,height:f,width:d}))),t)};function Ebe(){}function G3(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":!1}function _be(e,t,n){return Ld(e,t,void 0,void 0,void 0,void 0,n)}function Ld(e,t,n,r,a,s,o){const u=o(e,t,n,r,a,s);if(u!==void 0)return u;if(typeof e==typeof t)switch(typeof e){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return e===t;case"number":return e===t||Object.is(e,t);case"function":return e===t;case"object":return Wd(e,t,s,o)}return Wd(e,t,s,o)}function Wd(e,t,n,r){if(Object.is(e,t))return!0;let a=Fu(e),s=Fu(t);if(a==="[object Arguments]"&&(a=Xm),s==="[object Arguments]"&&(s=Xm),a!==s)return!1;switch(a){case hE:return e.toString()===t.toString();case mE:return Gd(e.valueOf(),t.valueOf());case pE:case _4:case E4:return Object.is(e.valueOf(),t.valueOf());case y4:return e.source===t.source&&e.flags===t.flags;case Lre:return e===t}n=n??new Map;const o=n.get(e),u=n.get(t);if(o!=null&&u!=null)return o===t;n.set(e,t),n.set(t,e);try{switch(a){case N4:if(e.size!==t.size)return!1;for(const[d,f]of e.entries())if(!t.has(d)||!Ld(f,t.get(d),d,e,t,n,r))return!1;return!0;case T4:{if(e.size!==t.size)return!1;const d=Array.from(e.values()),f=Array.from(t.values());for(let m=0;m<d.length;m++){const p=d[m],b=f.findIndex(x=>Ld(p,x,void 0,e,t,n,r));if(b===-1)return!1;f.splice(b,1)}return!0}case S4:case C4:case k4:case O4:case I4:case Bre:case R4:case M4:case D4:case Ure:case j4:case L4:if(kv(e)!==kv(t)||e.length!==t.length)return!1;for(let d=0;d<e.length;d++)if(!Ld(e[d],t[d],d,e,t,n,r))return!1;return!0;case w4:return e.byteLength!==t.byteLength?!1:Wd(new Uint8Array(e),new Uint8Array(t),n,r);case A4:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:Wd(new Uint8Array(e),new Uint8Array(t),n,r);case Pre:return e.name===t.name&&e.message===t.message;case Xm:{if(!(Wd(e.constructor,t.constructor,n,r)||G3(e)&&G3(t)))return!1;const d=[...Object.keys(e),...Cv(e)],f=[...Object.keys(t),...Cv(t)];if(d.length!==f.length)return!1;for(let m=0;m<d.length;m++){const p=d[m],b=e[p];if(!Object.hasOwn(t,p))return!1;const x=t[p];if(!Ld(b,x,p,e,t,n,r))return!1}return!0}default:return!1}}finally{n.delete(e),n.delete(t)}}function Nbe(e,t){return _be(e,t,Ebe)}function BL(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;r<e.length;r+=t){var a=e[r];a!==void 0&&n.push(a)}return n}function Tbe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return dbe(r,n)}function Sbe(e,t,n){var r=n==="width",a=e.x,s=e.y,o=e.width,u=e.height;return t===1?{start:r?a:s,end:r?a+o:s+u}:{start:r?a+o:s+u,end:r?a:s}}function xf(e,t,n,r,a){if(e*t<e*r||e*t>e*a)return!1;var s=n();return e*(t-e*s/2-r)>=0&&e*(t+e*s/2-a)<=0}function wbe(e,t){return BL(e,t+1)}function Abe(e,t,n,r,a){for(var s=(r||[]).slice(),o=t.start,u=t.end,d=0,f=1,m=o,p=function(){var E=r==null?void 0:r[d];if(E===void 0)return{v:BL(r,f)};var _=d,S,T=()=>(S===void 0&&(S=n(E,_)),S),C=E.coordinate,A=d===0||xf(e,C,T,m,u);A||(d=0,m=o,f+=1),A&&(m=C+e*(T()/2+a),d+=f)},b;f<=s.length;)if(b=p(),b)return b.v;return[]}function Cbe(e,t,n,r,a){var s=(r||[]).slice(),o=s.length;if(o===0)return[];for(var u=t.start,d=t.end,f=1;f<=o;f++){for(var m=(o-1)%f,p=u,b=!0,x=function(){var k=r[_];if(k==null)return 0;var I=_,O,j=()=>(O===void 0&&(O=n(k,I)),O),H=k.coordinate,z=_===m||xf(e,H,j,p,d);if(!z)return b=!1,1;z&&(p=H+e*(j()/2+a))},E,_=m;_<o&&(E=x(),!(E!==0&&E===1));_+=f);if(b){for(var S=[],T=m;T<o;T+=f){var C=r[T];C!=null&&S.push(C)}return S}}return[]}function K3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function gr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K3(Object(n),!0).forEach(function(r){kbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kbe(e,t,n){return(t=Obe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Obe(e){var t=Ibe(e,"string");return typeof t=="symbol"?t:t+""}function Ibe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rbe(e,t,n,r,a){for(var s=(r||[]).slice(),o=s.length,u=t.start,d=t.end,f=function(b){var x=s[b];if(x==null)return 1;var E=x,_,S=()=>(_===void 0&&(_=n(x,b)),_);if(b===o-1){var T=e*(E.coordinate+e*S()/2-d);s[b]=E=gr(gr({},E),{},{tickCoord:T>0?E.coordinate-T*e:E.coordinate})}else s[b]=E=gr(gr({},E),{},{tickCoord:E.coordinate});if(E.tickCoord!=null){var C=xf(e,E.tickCoord,S,u,d);C&&(d=E.tickCoord-e*(S()/2+a),s[b]=gr(gr({},E),{},{isShow:!0}))}},m=o-1;m>=0;m--)f(m);return s}function Mbe(e,t,n,r,a,s){var o=(r||[]).slice(),u=o.length,d=t.start,f=t.end;if(s){var m=r[u-1];if(m!=null){var p=n(m,u-1),b=e*(m.coordinate+e*p/2-f);if(o[u-1]=m=gr(gr({},m),{},{tickCoord:b>0?m.coordinate-b*e:m.coordinate}),m.tickCoord!=null){var x=xf(e,m.tickCoord,()=>p,d,f);x&&(f=m.tickCoord-e*(p/2+a),o[u-1]=gr(gr({},m),{},{isShow:!0}))}}}for(var E=s?u-1:u,_=function(C){var A=o[C];if(A==null)return 1;var k=A,I,O=()=>(I===void 0&&(I=n(A,C)),I);if(C===0){var j=e*(k.coordinate-e*O()/2-d);o[C]=k=gr(gr({},k),{},{tickCoord:j<0?k.coordinate-j*e:k.coordinate})}else o[C]=k=gr(gr({},k),{},{tickCoord:k.coordinate});if(k.tickCoord!=null){var H=xf(e,k.tickCoord,O,d,f);H&&(d=k.tickCoord+e*(O()/2+a),o[C]=gr(gr({},k),{},{isShow:!0}))}},S=0;S<E;S++)_(S);return o}function R_(e,t,n){var r=e.tick,a=e.ticks,s=e.viewBox,o=e.minTickGap,u=e.orientation,d=e.interval,f=e.tickFormatter,m=e.unit,p=e.angle;if(!a||!a.length||!r)return[];if(qe(d)||Ff.isSsr){var b;return(b=wbe(a,qe(d)?d:0))!==null&&b!==void 0?b:[]}var x=[],E=u==="top"||u==="bottom"?"width":"height",_=m&&E==="width"?Vd(m,{fontSize:t,letterSpacing:n}):{width:0,height:0},S=(I,O)=>{var j=typeof f=="function"?f(I.value,O):I.value;return E==="width"?Tbe(Vd(j,{fontSize:t,letterSpacing:n}),_,p):Vd(j,{fontSize:t,letterSpacing:n})[E]},T=a[0],C=a[1],A=a.length>=2&&T!=null&&C!=null?Wr(C.coordinate-T.coordinate):1,k=Sbe(s,A,E);return d==="equidistantPreserveStart"?Abe(A,k,S,a,o):d==="equidistantPreserveEnd"?Cbe(A,k,S,a,o):(d==="preserveStart"||d==="preserveStartEnd"?x=Mbe(A,k,S,a,o,d==="preserveStartEnd"):x=Rbe(A,k,S,a,o),x.filter(I=>I.isShow))}var Dbe=e=>{var t=e.ticks,n=e.label,r=e.labelGapWithTick,a=r,s=e.tickSize,o=s===void 0?0:s,u=e.tickMargin,d=u===void 0?0:u,f=0;if(t){Array.from(t).forEach(x=>{if(x){var E=x.getBoundingClientRect();E.width>f&&(f=E.width)}});var m=n?n.getBoundingClientRect().width:0,p=o+d,b=f+p+m+(n?a:0);return Math.round(b)}return 0},jbe=e=>{var t=e.ticks,n=e.label,r=e.labelGapWithTick,a=r,s=e.tickSize,o=s===void 0?0:s,u=e.tickMargin,d=u===void 0?0:u,f=0;if(t){Array.from(t).forEach(x=>{if(x){var E=x.getBoundingClientRect();E.height>f&&(f=E.height)}});var m=n?n.getBoundingClientRect().height:0,p=o+d,b=f+p+m+(n?a:0);return Math.round(b)}return 0},Lbe={xAxis:{},yAxis:{}},UL=Nr({name:"renderedTicks",initialState:Lbe,reducers:{setRenderedTicks:(e,t)=>{var n=t.payload,r=n.axisType,a=n.axisId,s=n.ticks;e[r][a]=Ct(s)},removeRenderedTicks:(e,t)=>{var n=t.payload,r=n.axisType,a=n.axisId;delete e[r][a]}}}),zL=UL.actions,Pbe=zL.setRenderedTicks,Bbe=zL.removeRenderedTicks,Ube=UL.reducer,zbe=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function V3(e,t){return Ybe(e)||$be(e,t)||Hbe(e,t)||Fbe()}function Fbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
628
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hbe(e,t){if(e){if(typeof e=="string")return W3(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W3(e,t):void 0}}function W3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $be(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function Ybe(e){if(Array.isArray(e))return e}function qbe(e,t){if(e==null)return{};var n,r,a=Gbe(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Gbe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function xl(){return xl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xl.apply(null,arguments)}function X3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X3(Object(n),!0).forEach(function(r){Kbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kbe(e,t,n){return(t=Vbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vbe(e){var t=Wbe(e,"string");return typeof t=="symbol"?t:t+""}function Wbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rs={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:Rr.axis};function Xbe(e){var t=e.x,n=e.y,r=e.width,a=e.height,s=e.orientation,o=e.mirror,u=e.axisLine,d=e.otherSvgProps;if(!u)return null;var f=pn(pn(pn({},d),ss(u)),{},{fill:"none"});if(s==="top"||s==="bottom"){var m=+(s==="top"&&!o||s==="bottom"&&o);f=pn(pn({},f),{},{x1:t,y1:n+m*a,x2:t+r,y2:n+m*a})}else{var p=+(s==="left"&&!o||s==="right"&&o);f=pn(pn({},f),{},{x1:t+p*r,y1:n,x2:t+p*r,y2:n+a})}return v.createElement("line",xl({},f,{className:re("recharts-cartesian-axis-line",ls(u,"className"))}))}function Qbe(e,t,n,r,a,s,o,u,d){var f,m,p,b,x,E,_=u?-1:1,S=e.tickSize||o,T=qe(e.tickCoord)?e.tickCoord:e.coordinate;switch(s){case"top":f=m=e.coordinate,b=n+ +!u*a,p=b-_*S,E=p-_*d,x=T;break;case"left":p=b=e.coordinate,m=t+ +!u*r,f=m-_*S,x=f-_*d,E=T;break;case"right":p=b=e.coordinate,m=t+ +u*r,f=m+_*S,x=f+_*d,E=T;break;default:f=m=e.coordinate,b=n+ +u*a,p=b+_*S,E=p+_*d,x=T;break}return{line:{x1:f,y1:p,x2:m,y2:b},tick:{x,y:E}}}function Zbe(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function Jbe(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function exe(e){var t=e.option,n=e.tickProps,r=e.value,a,s=re(n.className,"recharts-cartesian-axis-tick-value");if(v.isValidElement(t))a=v.cloneElement(t,pn(pn({},n),{},{className:s}));else if(typeof t=="function")a=t(pn(pn({},n),{},{className:s}));else{var o="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(o=re(o,P0e(t))),a=v.createElement(O_,xl({},n,{className:o}),r)}return a}function txe(e){var t=e.ticks,n=e.axisType,r=e.axisId,a=on(),s=v.useRef(null);return v.useEffect(()=>{if(!(r==null||n==null)){var o=t.map(d=>({value:d.value,coordinate:d.coordinate,offset:d.offset,index:d.index})),u=s.current;u!=null&&u.axisId===r&&u.axisType===n&&Nbe(u.ticks,o)||(s.current={ticks:o,axisId:r,axisType:n},a(Pbe({ticks:o,axisId:r,axisType:n})))}},[a,t,r,n]),v.useEffect(()=>r==null||n==null?sc:()=>{a(Bbe({axisId:r,axisType:n}))},[a,r,n]),null}var nxe=v.forwardRef((e,t)=>{var n=e.ticks,r=n===void 0?[]:n,a=e.tick,s=e.tickLine,o=e.stroke,u=e.tickFormatter,d=e.unit,f=e.padding,m=e.tickTextProps,p=e.orientation,b=e.mirror,x=e.x,E=e.y,_=e.width,S=e.height,T=e.tickSize,C=e.tickMargin,A=e.fontSize,k=e.letterSpacing,I=e.getTicksConfig,O=e.events,j=e.axisType,H=e.axisId,z=R_(pn(pn({},I),{},{ticks:r}),A,k),D=ss(I),V=iE(a),q=gL(D.textAnchor)?D.textAnchor:Zbe(p,b),ae=Jbe(p,b),Q={};typeof s=="object"&&(Q=s);var W=pn(pn({},D),{},{fill:"none"},Q),G=z.map(K=>pn({entry:K},Qbe(K,x,E,_,S,p,T,b,C))),F=G.map(K=>{var L=K.entry,P=K.line;return v.createElement(_i,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(L.value,"-").concat(L.coordinate,"-").concat(L.tickCoord)},s&&v.createElement("line",xl({},W,P,{className:re("recharts-cartesian-axis-tick-line",ls(s,"className"))})))}),$=G.map((K,L)=>{var P,ee,M=K.entry,de=K.tick,_e=pn(pn(pn(pn({verticalAnchor:ae},D),{},{textAnchor:q,stroke:"none",fill:o},de),{},{index:L,payload:M,visibleTicksCount:z.length,tickFormatter:u,padding:f},m),{},{angle:(P=(ee=m==null?void 0:m.angle)!==null&&ee!==void 0?ee:D.angle)!==null&&P!==void 0?P:0}),U=pn(pn({},_e),V);return v.createElement(_i,xl({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(M.value,"-").concat(M.coordinate,"-").concat(M.tickCoord)},dE(O,M,L)),a&&v.createElement(exe,{option:a,tickProps:U,value:"".concat(typeof u=="function"?u(M.value,L):M.value).concat(d||"")}))});return v.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(j,"-ticks")},v.createElement(txe,{ticks:z,axisId:H,axisType:j}),$.length>0&&v.createElement(vs,{zIndex:Rr.label},v.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(j,"-tick-labels"),ref:t},$)),F.length>0&&v.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(j,"-tick-lines")},F))}),rxe=v.forwardRef((e,t)=>{var n=e.axisLine,r=e.width,a=e.height,s=e.className,o=e.hide,u=e.ticks,d=e.axisType,f=e.axisId,m=qbe(e,zbe),p=v.useState(""),b=V3(p,2),x=b[0],E=b[1],_=v.useState(""),S=V3(_,2),T=S[0],C=S[1],A=v.useRef(null);v.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var I;return Dbe({ticks:A.current,label:(I=e.labelRef)===null||I===void 0?void 0:I.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})},getCalculatedHeight:()=>{var I;return jbe({ticks:A.current,label:(I=e.labelRef)===null||I===void 0?void 0:I.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var k=v.useCallback(I=>{if(I){var O=I.getElementsByClassName("recharts-cartesian-axis-tick-value");A.current=O;var j=O[0];if(j){var H=window.getComputedStyle(j),z=H.fontSize,D=H.letterSpacing;(z!==x||D!==T)&&(E(z),C(D))}}},[x,T]);return o||r!=null&&r<=0||a!=null&&a<=0?null:v.createElement(vs,{zIndex:e.zIndex},v.createElement(_i,{className:re("recharts-cartesian-axis",s)},v.createElement(Xbe,{x:e.x,y:e.y,width:r,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:ss(e)}),v.createElement(nxe,{ref:k,axisType:d,events:m,fontSize:x,getTicksConfig:e,height:e.height,letterSpacing:T,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:u,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:f}),v.createElement(g0e,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},v.createElement(w0e,{label:e.label,labelRef:e.labelRef}),e.children)))}),M_=v.forwardRef((e,t)=>{var n=Ba(e,rs);return v.createElement(rxe,xl({},n,{ref:t}))});M_.displayName="CartesianAxis";var axe={grid:{stroke:"#ccc",fill:"none"}},FL=v.createContext(axe);FL.Provider;var ixe=()=>v.useContext(FL),sxe=["x1","y1","x2","y2","key"],oxe=["offset"],lxe=["xAxisId","yAxisId"],uxe=["xAxisId","yAxisId"];function Q3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function br(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q3(Object(n),!0).forEach(function(r){cxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cxe(e,t,n){return(t=dxe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dxe(e){var t=fxe(e,"string");return typeof t=="symbol"?t:t+""}function fxe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function el(){return el=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},el.apply(null,arguments)}function i0(e,t){if(e==null)return{};var n,r,a=hxe(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function hxe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var mxe=e=>{var t=e.fill;if(!t||t==="none")return null;var n=e.fillOpacity,r=e.x,a=e.y,s=e.width,o=e.height,u=e.ry;return v.createElement("rect",{x:r,y:a,ry:u,width:s,height:o,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function HL(e){var t=e.option,n=e.lineItemProps,r;if(v.isValidElement(t))r=v.cloneElement(t,n);else if(typeof t=="function")r=t(n);else{var a,s=n.x1,o=n.y1,u=n.x2,d=n.y2,f=n.key,m=i0(n,sxe),p=(a=ss(m))!==null&&a!==void 0?a:{};p.offset;var b=i0(p,oxe),x=Array.isArray(b.strokeDasharray)?b.strokeDasharray.join(","):b.strokeDasharray;r=v.createElement("line",el({},b,{strokeDasharray:x,x1:s,y1:o,x2:u,y2:d,fill:"none",key:f}))}return r}function pxe(e){var t=e.x,n=e.width,r=e.horizontal,a=r===void 0?!0:r,s=e.horizontalPoints;if(!a||!s||!s.length)return null;e.xAxisId,e.yAxisId;var o=i0(e,lxe),u=s.map((d,f)=>{var m=br(br({},o),{},{x1:t,y1:d,x2:t+n,y2:d,key:"line-".concat(f),index:f});return v.createElement(HL,{key:"line-".concat(f),option:a,lineItemProps:m})});return v.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function gxe(e){var t=e.y,n=e.height,r=e.vertical,a=r===void 0?!0:r,s=e.verticalPoints;if(!a||!s||!s.length)return null;e.xAxisId,e.yAxisId;var o=i0(e,uxe),u=s.map((d,f)=>{var m=br(br({},o),{},{x1:d,y1:t,x2:d,y2:t+n,key:"line-".concat(f),index:f});return v.createElement(HL,{option:a,lineItemProps:m,key:"line-".concat(f)})});return v.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function bxe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,a=e.y,s=e.width,o=e.height,u=e.horizontalPoints,d=e.horizontal,f=d===void 0?!0:d;if(!f||!t||!t.length||u==null)return null;var m=u.map(b=>Math.round(b+a-a)).sort((b,x)=>b-x);a!==m[0]&&m.unshift(0);var p=m.map((b,x)=>{var E=m[x+1],_=E==null,S=_?a+o-b:E-b;if(S<=0)return null;var T=x%t.length;return v.createElement("rect",{key:"react-".concat(x),y:b,x:r,height:S,width:s,stroke:"none",fill:t[T],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return v.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function xxe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,a=e.fillOpacity,s=e.x,o=e.y,u=e.width,d=e.height,f=e.verticalPoints;if(!n||!r||!r.length)return null;var m=f.map(b=>Math.round(b+s-s)).sort((b,x)=>b-x);s!==m[0]&&m.unshift(0);var p=m.map((b,x)=>{var E=m[x+1],_=E==null,S=_?s+u-b:E-b;if(S<=0)return null;var T=x%r.length;return v.createElement("rect",{key:"react-".concat(x),x:b,y:o,width:S,height:d,stroke:"none",fill:r[T],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return v.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var yxe=(e,t)=>{var n=e.xAxis,r=e.width,a=e.height,s=e.offset;return ED(R_(br(br(br({},rs),n),{},{ticks:_D(n),viewBox:{x:0,y:0,width:r,height:a}})),s.left,s.left+s.width,t)},vxe=(e,t)=>{var n=e.yAxis,r=e.width,a=e.height,s=e.offset;return ED(R_(br(br(br({},rs),n),{},{ticks:_D(n),viewBox:{x:0,y:0,width:r,height:a}})),s.top,s.top+s.height,t)},Exe={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Rr.grid};function gg(e){var t,n,r,a,s,o,u=kD(),d=OD(),f=CD(),m=br(br({},Ba(e,Exe)),{},{x:qe(e.x)?e.x:f.left,y:qe(e.y)?e.y:f.top,width:qe(e.width)?e.width:f.width,height:qe(e.height)?e.height:f.height}),p=m.xAxisId,b=m.yAxisId,x=m.x,E=m.y,_=m.width,S=m.height,T=m.syncWithTicks,C=m.horizontalValues,A=m.verticalValues,k=ea(),I=Ke(F=>XO(F,"xAxis",p,k)),O=Ke(F=>XO(F,"yAxis",b,k)),j=ixe(),H={stroke:(t=m.stroke)!==null&&t!==void 0?t:j.grid.stroke,strokeWidth:(n=m.strokeWidth)!==null&&n!==void 0?n:j.grid.strokeWidth,strokeOpacity:(r=m.strokeOpacity)!==null&&r!==void 0?r:j.grid.strokeOpacity,strokeDasharray:(a=m.strokeDasharray)!==null&&a!==void 0?a:j.grid.strokeDasharray};if(!Si(_)||!Si(S)||!qe(x)||!qe(E))return null;var z=m.verticalCoordinatesGenerator||yxe,D=m.horizontalCoordinatesGenerator||vxe,V=m.horizontalPoints,q=m.verticalPoints;if((!V||!V.length)&&typeof D=="function"){var ae=C&&C.length,Q=D({yAxis:O?br(br({},O),{},{ticks:ae?C:O.ticks}):void 0,width:u??_,height:d??S,offset:f},ae?!0:T);jp(Array.isArray(Q),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof Q,"]")),Array.isArray(Q)&&(V=Q)}if((!q||!q.length)&&typeof z=="function"){var W=A&&A.length,G=z({xAxis:I?br(br({},I),{},{ticks:W?A:I.ticks}):void 0,width:u??_,height:d??S,offset:f},W?!0:T);jp(Array.isArray(G),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof G,"]")),Array.isArray(G)&&(q=G)}return v.createElement(vs,{zIndex:m.zIndex},v.createElement("g",{className:"recharts-cartesian-grid"},v.createElement(mxe,{fill:(s=m.fill)!==null&&s!==void 0?s:j.grid.fill,fillOpacity:(o=m.fillOpacity)!==null&&o!==void 0?o:j.grid.fillOpacity,x:m.x,y:m.y,width:m.width,height:m.height,ry:m.ry}),v.createElement(bxe,el({},m,{horizontalPoints:V})),v.createElement(xxe,el({},m,{verticalPoints:q})),v.createElement(pxe,el({},m,H,{offset:f,horizontalPoints:V,xAxis:I,yAxis:O})),v.createElement(gxe,el({},m,H,{offset:f,verticalPoints:q,xAxis:I,yAxis:O}))))}gg.displayName="CartesianGrid";var _xe={},$L=Nr({name:"errorBars",initialState:_xe,reducers:{addErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,a=n.errorBar;e[r]||(e[r]=[]),e[r].push(a)},replaceErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,a=n.prev,s=n.next;e[r]&&(e[r]=e[r].map(o=>o.dataKey===a.dataKey&&o.direction===a.direction?s:o))},removeErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,a=n.errorBar;e[r]&&(e[r]=e[r].filter(s=>s.dataKey!==a.dataKey||s.direction!==a.direction))}}}),D_=$L.actions;D_.addErrorBar;D_.replaceErrorBar;D_.removeErrorBar;var Nxe=$L.reducer,Txe=["children"];function Sxe(e,t){if(e==null)return{};var n,r,a=wxe(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function wxe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Axe={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Cxe=v.createContext(Axe);function kxe(e){var t=e.children,n=Sxe(e,Txe);return v.createElement(Cxe.Provider,{value:n},t)}function YL(e,t){var n,r,a=Ke(f=>bs(f,e)),s=Ke(f=>xs(f,t)),o=(n=a==null?void 0:a.allowDataOverflow)!==null&&n!==void 0?n:Mn.allowDataOverflow,u=(r=s==null?void 0:s.allowDataOverflow)!==null&&r!==void 0?r:Dn.allowDataOverflow,d=o||u;return{needClip:d,needClipX:o,needClipY:u}}function Oxe(e){var t=e.xAxisId,n=e.yAxisId,r=e.clipPathId,a=jL(),s=YL(t,n),o=s.needClipX,u=s.needClipY,d=s.needClip,f=Ke(A=>N6(A,t,!1)),m=Ke(A=>T6(A,n,!1));if(!d||!a)return null;var p=a.x,b=a.y,x=a.width,E=a.height,_=o&&f?Math.min(f[0],f[1]):p-x/2,S=u&&m?Math.min(m[0],m[1]):b-E/2,T=o&&f?Math.abs(f[1]-f[0]):x*2,C=u&&m?Math.abs(m[1]-m[0]):E*2;return v.createElement("clipPath",{id:"clipPath-".concat(r)},v.createElement("rect",{x:_,y:S,width:T,height:C}))}function Cl(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||r===void 0?void 0:r.xAxisId)!==null&&n!==void 0?n:ML}function kl(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||r===void 0?void 0:r.yAxisId)!==null&&n!==void 0?n:ML}var Ixe="Invariant failed";function Rxe(e,t){throw new Error(Ixe)}var Mxe=["option"];function Dxe(e,t){if(e==null)return{};var n,r,a=jxe(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function jxe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var j_=FD;function L_(e){var t=e.option,n=Dxe(e,Mxe);return v.createElement(W0e,{option:t,DefaultShape:j_,shapeProps:n,activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"})}var Lxe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,a)=>{if(qe(t))return t;var s=qe(r)||Ln(r);return s?t(r,a):(s||Rxe(),n)}},Pxe=(e,t,n)=>n,Bxe=(e,t)=>t,Zf=ue([d_,Bxe],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),Uxe=ue([Zf],e=>e==null?void 0:e.maxBarSize),zxe=(e,t,n,r)=>r,Fxe=ue([Kt,d_,Cl,kl,Pxe],(e,t,n,r,a)=>t.filter(s=>e==="horizontal"?s.xAxisId===n:s.yAxisId===r).filter(s=>s.isPanorama===a).filter(s=>s.hide===!1).filter(s=>s.type==="bar")),Hxe=(e,t,n)=>{var r=Kt(e),a=Cl(e,t),s=kl(e,t);if(!(a==null||s==null))return r==="horizontal"?e1(e,"yAxis",s,n):e1(e,"xAxis",a,n)},$xe=(e,t)=>{var n=Kt(e),r=Cl(e,t),a=kl(e,t);if(!(r==null||a==null))return n==="horizontal"?WO(e,"xAxis",r):WO(e,"yAxis",a)},Yxe=ue([Fxe,cue,$xe],Jge),qxe=(e,t,n)=>{var r,a,s=Zf(e,t);if(s==null)return 0;var o=Cl(e,t),u=kl(e,t);if(o==null||u==null)return 0;var d=Kt(e),f=nj(e),m=s.maxBarSize,p=Ln(m)?f:m,b,x;return d==="horizontal"?(b=Vu(e,"xAxis",o,n),x=Ku(e,"xAxis",o,n)):(b=Vu(e,"yAxis",u,n),x=Ku(e,"yAxis",u,n)),(r=(a=Dp(b,x,!0))!==null&&a!==void 0?a:p)!==null&&r!==void 0?r:0},qL=(e,t,n)=>{var r=Kt(e),a=Cl(e,t),s=kl(e,t);if(!(a==null||s==null)){var o,u;return r==="horizontal"?(o=Vu(e,"xAxis",a,n),u=Ku(e,"xAxis",a,n)):(o=Vu(e,"yAxis",s,n),u=Ku(e,"yAxis",s,n)),Dp(o,u)}},Gxe=ue([Yxe,nj,uue,rj,qxe,qL,Uxe],abe),Kxe=(e,t,n)=>{var r=Cl(e,t);if(r!=null)return Vu(e,"xAxis",r,n)},Vxe=(e,t,n)=>{var r=kl(e,t);if(r!=null)return Vu(e,"yAxis",r,n)},Wxe=(e,t,n)=>{var r=Cl(e,t);if(r!=null)return Ku(e,"xAxis",r,n)},Xxe=(e,t,n)=>{var r=kl(e,t);if(r!=null)return Ku(e,"yAxis",r,n)},Qxe=ue([Gxe,Zf],sbe),Zxe=ue([Hxe,Zf],ibe),Jxe=ue([Kn,TE,Kxe,Vxe,Wxe,Xxe,Qxe,Kt,Kle,qL,Zxe,Zf,zxe],(e,t,n,r,a,s,o,u,d,f,m,p,b)=>{var x=d.chartData,E=d.dataStartIndex,_=d.dataEndIndex;if(!(p==null||o==null||t==null||u!=="horizontal"&&u!=="vertical"||n==null||r==null||a==null||s==null||f==null)){var S=p.data,T;if(S!=null&&S.length>0?T=S:T=x==null?void 0:x.slice(E,_+1),T!=null)return Rye({layout:u,barSettings:p,pos:o,parentViewBox:t,bandSize:f,xAxis:n,yAxis:r,xAxisTicks:a,yAxisTicks:s,stackedData:m,displayedData:T,offset:e,cells:b,dataStartIndex:E})}}),eye=["index"];function a1(){return a1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a1.apply(null,arguments)}function tye(e,t){if(e==null)return{};var n,r,a=nye(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function nye(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var GL=v.createContext(void 0),rye=e=>{var t=v.useContext(GL);if(t!=null)return t.stackId;if(e!=null)return Yie(e)},aye=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),iye=e=>{var t=v.useContext(GL);if(t!=null){var n=t.stackId;return"url(#".concat(aye(n,e),")")}},KL=e=>{var t=e.index,n=tye(e,eye),r=iye(t);return v.createElement(_i,a1({className:"recharts-bar-stack-layer",clipPath:r},n))},sye=["onMouseEnter","onMouseLeave","onClick"],oye=["value","background","tooltipPosition"],lye=["id"],uye=["onMouseEnter","onClick","onMouseLeave"];function Z3(e,t){return hye(e)||fye(e,t)||dye(e,t)||cye()}function cye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
629
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dye(e,t){if(e){if(typeof e=="string")return J3(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J3(e,t):void 0}}function J3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function fye(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function hye(e){if(Array.isArray(e))return e}function uo(){return uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uo.apply(null,arguments)}function e5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function jn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?e5(Object(n),!0).forEach(function(r){mye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mye(e,t,n){return(t=pye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pye(e){var t=gye(e,"string");return typeof t=="symbol"?t:t+""}function gye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function s0(e,t){if(e==null)return{};var n,r,a=bye(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function bye(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var xye=e=>{var t=e.dataKey,n=e.name,r=e.fill,a=e.legendType,s=e.hide;return[{inactive:s,dataKey:t,type:a,color:r,value:ND(n,t),payload:e}]},yye=v.memo(e=>{var t=e.dataKey,n=e.stroke,r=e.strokeWidth,a=e.fill,s=e.name,o=e.hide,u=e.unit,d=e.formatter,f=e.tooltipType,m=e.id,p={dataDefinedOnItem:void 0,getPosition:sc,settings:{stroke:n,strokeWidth:r,fill:a,dataKey:t,nameKey:void 0,name:ND(s,t),hide:o,type:f,color:a,unit:u,formatter:d,graphicalItemId:m}};return v.createElement(X0e,{tooltipEntrySettings:p})});function vye(e){var t=Ke(Xu),n=e.data,r=e.dataKey,a=e.background,s=e.allOtherBarProps,o=s.onMouseEnter,u=s.onMouseLeave,d=s.onClick,f=s0(s,sye),m=AL(o,r,s.id),p=CL(u),b=kL(d,r,s.id);if(!a||n==null)return null;var x=iE(a);return v.createElement(vs,{zIndex:obe(a,Rr.barBackground)},n.map((E,_)=>{E.value;var S=E.background;E.tooltipPosition;var T=s0(E,oye);if(!S)return null;var C=m(E,E.originalDataIndex),A=p(E,E.originalDataIndex),k=b(E,E.originalDataIndex),I=jn(jn(jn(jn(jn({option:a,isActive:String(E.originalDataIndex)===t},T),{},{fill:"#eee"},S),x),dE(f,E,_)),{},{onMouseEnter:C,onMouseLeave:A,onClick:k,dataKey:r,index:_,className:"recharts-bar-background-rectangle"});return v.createElement(L_,uo({key:"background-bar-".concat(_)},I))}))}function Eye(e){var t=e.showLabels,n=e.children,r=e.rects,a=r==null?void 0:r.map(s=>{var o={x:s.x,y:s.y,width:s.width,lowerWidth:s.width,upperWidth:s.width,height:s.height};return jn(jn({},o),{},{value:s.value,payload:s.payload,parentViewBox:s.parentViewBox,viewBox:o,fill:s.fill})});return v.createElement(I0e,{value:t?a:void 0},n)}function _ye(e){var t=e.shape,n=e.activeBar,r=e.baseProps,a=e.entry,s=e.index,o=e.dataKey,u=Ke(Xu),d=Ke(eL),f=n&&String(a.originalDataIndex)===u&&(d==null||o===d),m=u!=null&&(String(a.originalDataIndex)!==u||d!=null&&o!==d),p=v.useState(!1),b=Z3(p,2),x=b[0],E=b[1],_=v.useState(!1),S=Z3(_,2),T=S[0],C=S[1];v.useEffect(()=>{var H;return f?(E(!0),H=requestAnimationFrame(()=>{C(!0)})):(C(!1),m&&E(!1)),()=>{cancelAnimationFrame(H)}},[f,m]);var A=v.useCallback(()=>{f||E(!1)},[f]),k=f&&T,I=f||x,O;f?n===!0?O=t:O=n:O=t;var j=v.createElement(L_,uo({},r,{name:String(r.name)},a,{isActive:k,option:O,index:s,dataKey:o,animationElapsedTime:e.animationElapsedTime,isAnimating:e.isAnimating,isEntrance:e.isEntrance,onTransitionEnd:A}));return I?v.createElement(vs,{zIndex:Rr.activeBar},v.createElement(KL,{index:a.originalDataIndex},j)):j}function Nye(e){var t=e.shape,n=e.baseProps,r=e.entry,a=e.index,s=e.dataKey;return v.createElement(L_,uo({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:a,dataKey:s,animationElapsedTime:e.animationElapsedTime,isAnimating:e.isAnimating,isEntrance:e.isEntrance}))}function Tye(e){var t,n=e.data,r=e.props,a=e.animationElapsedTime,s=e.isAnimating,o=e.isEntrance,u=(t=ss(r))!==null&&t!==void 0?t:{},d=u.id,f=s0(u,lye),m=r.shape,p=r.dataKey,b=r.activeBar,x=r.onMouseEnter,E=r.onClick,_=r.onMouseLeave,S=s0(r,uye),T=AL(x,p,d),C=CL(_),A=kL(E,p,d);return n?v.createElement(v.Fragment,null,n.map((k,I)=>v.createElement(KL,uo({index:k.originalDataIndex,key:"rectangle-".concat(k==null?void 0:k.x,"-").concat(k==null?void 0:k.y,"-").concat(k==null?void 0:k.value,"-").concat(I),className:"recharts-bar-rectangle"},dE(S,k,I),{onMouseEnter:T(k,k.originalDataIndex),onMouseLeave:C(k,k.originalDataIndex),onClick:A(k,k.originalDataIndex)}),b?v.createElement(_ye,{shape:m,activeBar:b,baseProps:f,entry:k,index:I,dataKey:p,animationElapsedTime:a,isAnimating:s,isEntrance:o}):v.createElement(Nye,{shape:m,baseProps:f,entry:k,index:I,dataKey:p,animationElapsedTime:a,isAnimating:s,isEntrance:o})))):null}var Sye=(e,t,n)=>e==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>{if(r.status==="removed")return n==="horizontal"?[jn(jn({},r.prev),{},{height:pr(r.prev.height,0,t),y:pr(r.prev.y,r.prev.y+r.prev.height,t)})]:[jn(jn({},r.prev),{},{width:pr(r.prev.width,0,t)})];if(r.status==="matched")return[jn(jn({},r.next),{},{x:pr(r.prev.x,r.next.x,t),y:pr(r.prev.y,r.next.y,t),width:pr(r.prev.width,r.next.width,t),height:pr(r.prev.height,r.next.height,t)})];var a=r.next;return n==="horizontal"?[jn(jn({},a),{},{height:pr(0,a.height,t),y:pr(a.stackedBarStart,a.y,t)})]:[jn(jn({},a),{},{width:pr(0,a.width,t),x:pr(a.stackedBarStart,a.x,t)})]});function wye(e){var t=e.props,n=e.previousRectanglesRef,r=t.data,a=t.isAnimationActive,s=t.animationBegin,o=t.animationDuration,u=t.animationEasing,d=t.animationInterpolateFn,f=t.layout,m=mge(t.onAnimationStart,t.onAnimationEnd),p=m.isAnimating,b=m.handleAnimationStart,x=m.handleAnimationEnd;return v.createElement(Eye,{showLabels:!p,rects:r},v.createElement(pge,{animationInput:r,animationIdPrefix:"recharts-bar-",items:r,previousItemsRef:n,isAnimationActive:a,animationBegin:s,animationDuration:o,animationEasing:u,onAnimationStart:b,onAnimationEnd:x,animationInterpolateFn:d,animationMatchBy:t.animationMatchBy,layout:f},(E,_,S)=>v.createElement(_i,null,v.createElement(Tye,{props:t,data:E,animationElapsedTime:_,isAnimating:p||_<1,isEntrance:S}))),v.createElement(D0e,{label:t.label}),t.children)}function Aye(e){var t=v.useRef(null);return v.createElement(wye,{previousRectanglesRef:t,props:e})}var VL=0,Cye=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:Gn(e,t)}};class kye extends v.PureComponent{render(){var t=this.props,n=t.hide,r=t.data,a=t.dataKey,s=t.className,o=t.xAxisId,u=t.yAxisId,d=t.needClip,f=t.background,m=t.id;if(n||r==null)return null;var p=re("recharts-bar",s),b=m;return v.createElement(_i,{className:p,id:m},d&&v.createElement("defs",null,v.createElement(Oxe,{clipPathId:b,xAxisId:o,yAxisId:u})),v.createElement(_i,{className:"recharts-bar-rectangles",clipPath:d?"url(#clipPath-".concat(b,")"):void 0},v.createElement(vye,{data:r,dataKey:a,background:f,allOtherBarProps:this.props}),v.createElement(Aye,this.props)))}}var Oye={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",animationInterpolateFn:Sye,animationMatchBy:IL,background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:VL,shape:j_,xAxisId:0,yAxisId:0,zIndex:Rr.bar};function Iye(e){var t=e.xAxisId,n=e.yAxisId,r=e.hide,a=e.legendType,s=e.minPointSize,o=e.activeBar,u=e.animationBegin,d=e.animationDuration,f=e.animationEasing,m=e.isAnimationActive,p=YL(t,n),b=p.needClip,x=oc(),E=ea(),_=F0e(e.children,cL),S=Ke(A=>Jxe(A,e.id,E,_));if(x!=="vertical"&&x!=="horizontal")return null;var T,C=S==null?void 0:S[0];return C==null||C.height==null||C.width==null?T=0:T=x==="vertical"?C.height/2:C.width/2,v.createElement(kxe,{xAxisId:t,yAxisId:n,data:S,dataPointFormatter:Cye,errorBarOffset:T},v.createElement(kye,uo({},e,{layout:x,needClip:b,data:S,xAxisId:t,yAxisId:n,hide:r,legendType:a,minPointSize:s,activeBar:o,animationBegin:u,animationDuration:d,animationEasing:f,isAnimationActive:m})))}function Rye(e){var t=e.layout,n=e.barSettings,r=n.dataKey,a=n.minPointSize,s=n.hasCustomShape,o=e.pos,u=e.bandSize,d=e.xAxis,f=e.yAxis,m=e.xAxisTicks,p=e.yAxisTicks,b=e.stackedData,x=e.displayedData,E=e.offset,_=e.cells,S=e.parentViewBox,T=e.dataStartIndex,C=t==="horizontal"?f:d,A=b?C.scale.domain():null,k=qie({numericAxis:C}),I=C.scale.map(k);return x.map((O,j)=>{var H,z,D,V,q,ae;if(b){var Q=b[j+T];if(Q==null)return null;H=Uie(Q,A)}else H=Gn(O,r),Array.isArray(H)||(H=[k,H]);var W=Lxe(a,VL)(H[1],j);if(t==="horizontal"){var G,F=f.scale.map(H[0]),$=f.scale.map(H[1]);if(F==null||$==null)return null;z=XC({axis:d,ticks:m,bandSize:u,offset:o.offset,entry:O,index:j}),D=(G=$??F)!==null&&G!==void 0?G:void 0,V=o.size;var K=F-$;if(q=Ni(K)?0:K,ae={x:z,y:E.top,width:V,height:E.height},Math.abs(W)>0&&Math.abs(q)<Math.abs(W)){var L=Wr(q||W)*(Math.abs(W)-Math.abs(q));D-=L,q+=L}}else{var P=d.scale.map(H[0]),ee=d.scale.map(H[1]);if(P==null||ee==null)return null;if(z=P,D=XC({axis:f,ticks:p,bandSize:u,offset:o.offset,entry:O,index:j}),V=ee-P,q=o.size,ae={x:E.left,y:D,width:E.width,height:q},Math.abs(W)>0&&Math.abs(V)<Math.abs(W)){var M=Wr(V||W)*(Math.abs(W)-Math.abs(V));V+=M}}if(z==null||D==null||V==null||q==null||!s&&(V===0||q===0))return null;var de=jn(jn({},O),{},{stackedBarStart:I,x:z,y:D,width:V,height:q,value:b?H:H[1],payload:O,background:ae,tooltipPosition:{x:z+V/2,y:D+q/2},parentViewBox:S,originalDataIndex:j},_&&_[j]&&_[j].props);return de}).filter(Boolean)}function Mye(e){var t=Ba(e,Oye),n=rye(t.stackId),r=ea();return v.createElement(Sge,{id:t.id,type:"bar"},a=>v.createElement(v.Fragment,null,v.createElement(Q0e,{legendPayload:xye(t)}),v.createElement(yye,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:a}),v.createElement(Rge,{type:"bar",id:a,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:n,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r,hasCustomShape:t.shape!=null&&t.shape!==j_}),v.createElement(vs,{zIndex:t.zIndex},v.createElement(Iye,uo({},t,{id:a})))))}var yl=v.memo(Mye,W0);yl.displayName="Bar";var Dye=["domain","range"],jye=["domain","range"];function t5(e,t){if(e==null)return{};var n,r,a=Lye(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Lye(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function n5(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function WL(e,t){if(e===t)return!0;var n=e.domain,r=e.range,a=t5(e,Dye),s=t.domain,o=t.range,u=t5(t,jye);return!n5(n,s)||!n5(r,o)?!1:W0(a,u)}var Pye=["type"],Bye=["dangerouslySetInnerHTML","ticks","scale"],Uye=["id","scale"];function i1(){return i1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i1.apply(null,arguments)}function r5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function a5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?r5(Object(n),!0).forEach(function(r){zye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zye(e,t,n){return(t=Fye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fye(e){var t=Hye(e,"string");return typeof t=="symbol"?t:t+""}function Hye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function s1(e,t){if(e==null)return{};var n,r,a=$ye(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function $ye(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Yye(e){var t=on(),n=v.useRef(null),r=ID(),a=e.type,s=s1(e,Pye),o=J0(r,"xAxis",a),u=v.useMemo(()=>{if(o!=null)return a5(a5({},s),{},{type:o})},[s,o]);return v.useLayoutEffect(()=>{u!=null&&(n.current===null?t(Pge(u)):n.current!==u&&t(Bge({prev:n.current,next:u})),n.current=u)},[u,t]),v.useLayoutEffect(()=>()=>{n.current&&(t(Uge(n.current)),n.current=null)},[t]),null}var qye=e=>{var t=e.xAxisId,n=e.className,r=e.height,a=e.label,s=v.useRef(null),o=v.useRef(null),u=Ke(TE),d=ea(),f=on(),m="xAxis",p=Ke(T=>R6(T,m,t,d)),b=Ke(T=>k6(T,t)),x=Ke(T=>Wfe(T,t)),E=Ke(T=>Wj(T,t));if(v.useLayoutEffect(()=>{if(!(r!=="auto"||!b||mg(a)||v.isValidElement(a)||E==null)){var T=s.current;if(T){var C=T.getCalculatedHeight();Math.round(b.height)!==Math.round(C)&&f(Yge({id:t,height:C}))}}},[p,b,f,a,t,r,E]),b==null||x==null||E==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var _=s1(e,Bye);E.id,E.scale;var S=s1(E,Uye);return v.createElement(M_,i1({},_,S,{ref:s,labelRef:o,x:x.x,y:x.y,width:b.width,height:b.height,className:re("recharts-".concat(m," ").concat(m),n),viewBox:u,ticks:p,axisType:m,axisId:t}))},Gye={allowDataOverflow:Mn.allowDataOverflow,allowDecimals:Mn.allowDecimals,allowDuplicatedCategory:Mn.allowDuplicatedCategory,angle:Mn.angle,axisLine:rs.axisLine,height:Mn.height,hide:!1,includeHidden:Mn.includeHidden,interval:Mn.interval,label:!1,minTickGap:Mn.minTickGap,mirror:Mn.mirror,orientation:Mn.orientation,padding:Mn.padding,reversed:Mn.reversed,scale:Mn.scale,tick:Mn.tick,tickCount:Mn.tickCount,tickLine:rs.tickLine,tickSize:rs.tickSize,type:Mn.type,niceTicks:Mn.niceTicks,xAxisId:0},Kye=e=>{var t=Ba(e,Gye);return v.createElement(v.Fragment,null,v.createElement(Yye,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),v.createElement(qye,t))},bg=v.memo(Kye,WL);bg.displayName="XAxis";var Vye=["type"],Wye=["dangerouslySetInnerHTML","ticks","scale"],Xye=["id","scale"];function o1(){return o1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o1.apply(null,arguments)}function i5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function s5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i5(Object(n),!0).forEach(function(r){Qye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qye(e,t,n){return(t=Zye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zye(e){var t=Jye(e,"string");return typeof t=="symbol"?t:t+""}function Jye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function l1(e,t){if(e==null)return{};var n,r,a=eve(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function eve(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function tve(e){var t=on(),n=v.useRef(null),r=ID(),a=e.type,s=l1(e,Vye),o=J0(r,"yAxis",a),u=v.useMemo(()=>{if(o!=null)return s5(s5({},s),{},{type:o})},[o,s]);return v.useLayoutEffect(()=>{u!=null&&(n.current===null?t(zge(u)):n.current!==u&&t(Fge({prev:n.current,next:u})),n.current=u)},[u,t]),v.useLayoutEffect(()=>()=>{n.current&&(t(Hge(n.current)),n.current=null)},[t]),null}function nve(e){var t=e.yAxisId,n=e.className,r=e.width,a=e.label,s=v.useRef(null),o=v.useRef(null),u=Ke(TE),d=ea(),f=on(),m="yAxis",p=Ke(T=>O6(T,t)),b=Ke(T=>Qfe(T,t)),x=Ke(T=>R6(T,m,t,d)),E=Ke(T=>Xj(T,t));if(v.useLayoutEffect(()=>{if(!(r!=="auto"||!p||mg(a)||v.isValidElement(a)||E==null)){var T=s.current;if(T){var C=T.getCalculatedWidth();Math.round(p.width)!==Math.round(C)&&f($ge({id:t,width:C}))}}},[x,p,f,a,t,r,E]),p==null||b==null||E==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var _=l1(e,Wye);E.id,E.scale;var S=l1(E,Xye);return v.createElement(M_,o1({},_,S,{ref:s,labelRef:o,x:b.x,y:b.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:p.width,height:p.height,className:re("recharts-".concat(m," ").concat(m),n),viewBox:u,ticks:x,axisType:m,axisId:t}))}var rve={allowDataOverflow:Dn.allowDataOverflow,allowDecimals:Dn.allowDecimals,allowDuplicatedCategory:Dn.allowDuplicatedCategory,angle:Dn.angle,axisLine:rs.axisLine,hide:!1,includeHidden:Dn.includeHidden,interval:Dn.interval,label:!1,minTickGap:Dn.minTickGap,mirror:Dn.mirror,orientation:Dn.orientation,padding:Dn.padding,reversed:Dn.reversed,scale:Dn.scale,tick:Dn.tick,tickCount:Dn.tickCount,tickLine:rs.tickLine,tickSize:rs.tickSize,type:Dn.type,niceTicks:Dn.niceTicks,width:Dn.width,yAxisId:0},ave=e=>{var t=Ba(e,rve);return v.createElement(v.Fragment,null,v.createElement(tve,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),v.createElement(nve,t))},xg=v.memo(ave,WL);xg.displayName="YAxis";var ive=(e,t)=>t,P_=ue([ive,Kt,cj,Wn,X6,ys,yme,Kn],wme);function sve(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function B_(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(sve(e)){var a=e.currentTarget.getBBox();n=a.width>0?t.width/a.width:1,r=a.height>0?t.height/a.height:1}else{var s=e.currentTarget;n=s.offsetWidth>0?t.width/s.offsetWidth:1,r=s.offsetHeight>0?t.height/s.offsetHeight:1}var o=(u,d)=>({relativeX:Math.round((u-t.left)/n),relativeY:Math.round((d-t.top)/r)});return"touches"in e?Array.from(e.touches).map(u=>o(u.clientX,u.clientY)):o(e.clientX,e.clientY)}var XL=ba("mouseClick"),QL=Pf();QL.startListening({actionCreator:XL,effect:(e,t)=>{var n=e.payload,r=P_(t.getState(),B_(n));(r==null?void 0:r.activeIndex)!=null&&t.dispatch(hhe({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var u1=ba("mouseMove"),ZL=Pf(),Eu=null,Ho=null,$y=null;ZL.startListening({actionCreator:u1,effect:(e,t)=>{var n=e.payload,r=t.getState(),a=r.eventSettings,s=a.throttleDelay,o=a.throttledEvents,u=o==="all"||(o==null?void 0:o.includes("mousemove"));Eu!==null&&(cancelAnimationFrame(Eu),Eu=null),Ho!==null&&(typeof s!="number"||!u)&&(clearTimeout(Ho),Ho=null),$y=B_(n);var d=()=>{var f=t.getState(),m=Xf(f,f.tooltip.settings.shared);if(!$y){Eu=null,Ho=null;return}if(m==="axis"){var p=P_(f,$y);(p==null?void 0:p.activeIndex)!=null?t.dispatch(z6({activeIndex:p.activeIndex,activeDataKey:void 0,activeCoordinate:p.activeCoordinate})):t.dispatch(U6())}Eu=null,Ho=null};if(!u){d();return}s==="raf"?Eu=requestAnimationFrame(d):typeof s=="number"&&Ho===null&&(Ho=setTimeout(d,s))}});function ove(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var o5={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},JL=Nr({name:"rootProps",initialState:o5,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:o5.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),lve=JL.reducer,uve=JL.actions.updateOptions,cve=null,dve={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},eP=Nr({name:"polarOptions",initialState:cve,reducers:dve});eP.actions.updatePolarOptions;var fve=eP.reducer,tP=ba("keyDown"),nP=ba("focus"),rP=ba("blur"),yg=Pf(),_u=null,$o=null,Fm=null;yg.startListening({actionCreator:tP,effect:(e,t)=>{Fm=e.payload,_u!==null&&(cancelAnimationFrame(_u),_u=null);var n=t.getState(),r=n.eventSettings,a=r.throttleDelay,s=r.throttledEvents,o=s==="all"||s.includes("keydown");$o!==null&&(typeof a!="number"||!o)&&(clearTimeout($o),$o=null);var u=()=>{try{var d=t.getState(),f=d.rootProps.accessibilityLayer!==!1;if(!f)return;var m=d.tooltip.keyboardInteraction,p=Fm;if(p!=="ArrowRight"&&p!=="ArrowLeft"&&p!=="Enter")return;var b=Kd(m,bl(d),Gu(d),Wu(d)),x=b==null?-1:Number(b),E=!Number.isFinite(x)||x<0,_=ys(d),S=bl(d),T=Xf(d,d.tooltip.settings.shared);if(p==="Enter"){if(E)return;var C=n0(d,T,"hover",String(m.index));t.dispatch(t0({active:!m.active,activeIndex:m.index,activeCoordinate:C}));return}var A=nhe(d),k=A==="left-to-right"?1:-1,I=p==="ArrowRight"?1:-1,O;if(E){var j=Gu(d),H=Wu(d),z=I*k,D=W=>({active:!1,index:String(W),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(O=-1,z>0){for(var V=0;V<S.length;V++)if(Kd(D(V),S,j,H)!=null){O=V;break}}else for(var q=S.length-1;q>=0;q--)if(Kd(D(q),S,j,H)!=null){O=q;break}if(O<0)return}else{O=x+I*k;var ae=(_==null?void 0:_.length)||S.length;if(ae===0||O>=ae||O<0)return}var Q=n0(d,T,"hover",String(O));t.dispatch(t0({active:!0,activeIndex:O.toString(),activeCoordinate:Q}))}finally{_u=null,$o=null}};if(!o){u();return}a==="raf"?_u=requestAnimationFrame(u):typeof a=="number"&&$o===null&&(u(),Fm=null,$o=setTimeout(()=>{Fm?u():($o=null,_u=null)},a))}});yg.startListening({actionCreator:nP,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var a=n.tooltip.keyboardInteraction;if(!a.active&&a.index==null){var s="0",o=Xf(n,n.tooltip.settings.shared),u=n0(n,o,"hover",String(s));t.dispatch(t0({active:!0,activeIndex:s,activeCoordinate:u}))}}}});yg.startListening({actionCreator:rP,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var a=n.tooltip.keyboardInteraction;a.active&&t.dispatch(t0({active:!1,activeIndex:a.index,activeCoordinate:a.coordinate}))}}});function aP(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(n,r)=>{if(r==="currentTarget")return t;var a=Reflect.get(n,r);return typeof a=="function"?a.bind(n):a}})}var Ca=ba("externalEvent"),iP=Pf(),Hm=new Map,kd=new Map,Yy=new Map;iP.startListening({actionCreator:Ca,effect:(e,t)=>{var n=e.payload,r=n.handler,a=n.reactEvent;if(r!=null){var s=a.type,o=aP(a);Yy.set(s,{handler:r,reactEvent:o});var u=Hm.get(s);u!==void 0&&(cancelAnimationFrame(u),Hm.delete(s));var d=t.getState(),f=d.eventSettings,m=f.throttleDelay,p=f.throttledEvents,b=p,x=b==="all"||(b==null?void 0:b.includes(s)),E=kd.get(s);E!==void 0&&(typeof m!="number"||!x)&&(clearTimeout(E),kd.delete(s));var _=()=>{var C=Yy.get(s);try{if(!C)return;var A=C.handler,k=C.reactEvent,I=t.getState(),O={activeCoordinate:ame(I),activeDataKey:eL(I),activeIndex:Xu(I),activeLabel:J6(I),activeTooltipIndex:Xu(I),isTooltipActive:ime(I)};A&&A(O,k)}finally{Hm.delete(s),kd.delete(s),Yy.delete(s)}};if(!x){_();return}if(m==="raf"){var S=requestAnimationFrame(_);Hm.set(s,S)}else if(typeof m=="number"){if(!kd.has(s)){_();var T=setTimeout(_,m);kd.set(s,T)}}else _()}}});var hve=ue([pc],e=>e.tooltipItemPayloads),mve=ue([hve,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(t!=null){var r=e.find(s=>s.settings.graphicalItemId===n);if(r!=null){var a=r.getPosition;if(a!=null)return a(t)}}}),sP=ba("touchMove"),oP=Pf(),Yo=null,Qs=null,l5=null,Od=null;oP.startListening({actionCreator:sP,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){Od=aP(n);var r=t.getState(),a=r.eventSettings,s=a.throttleDelay,o=a.throttledEvents,u=o==="all"||o.includes("touchmove");Yo!==null&&(cancelAnimationFrame(Yo),Yo=null),Qs!==null&&(typeof s!="number"||!u)&&(clearTimeout(Qs),Qs=null),l5=Array.from(n.touches).map(f=>B_({clientX:f.clientX,clientY:f.clientY,currentTarget:n.currentTarget}));var d=()=>{if(Od!=null){var f=t.getState(),m=Xf(f,f.tooltip.settings.shared);if(m==="axis"){var p,b=(p=l5)===null||p===void 0?void 0:p[0];if(b==null){Yo=null,Qs=null;return}var x=P_(f,b);(x==null?void 0:x.activeIndex)!=null&&t.dispatch(z6({activeIndex:x.activeIndex,activeDataKey:void 0,activeCoordinate:x.activeCoordinate}))}else if(m==="item"){var E,_=Od.touches[0];if(document.elementFromPoint==null||_==null)return;var S=document.elementFromPoint(_.clientX,_.clientY);if(!S||!S.getAttribute)return;var T=S.getAttribute(Zie),C=(E=S.getAttribute(Jie))!==null&&E!==void 0?E:void 0,A=Al(f).find(O=>O.id===C);if(T==null||A==null||C==null)return;var k=A.dataKey,I=mve(f,T,C);t.dispatch(B6({activeDataKey:k,activeIndex:T,activeCoordinate:I,activeGraphicalItemId:C}))}Yo=null,Qs=null}};if(!u){d();return}s==="raf"?Yo=requestAnimationFrame(d):typeof s=="number"&&Qs===null&&(d(),Od=null,Qs=setTimeout(()=>{Od?d():(Qs=null,Yo=null)},s))}}});var lP={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},uP=Nr({name:"eventSettings",initialState:lP,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=Ct(t.payload.throttledEvents))}}}),pve=uP.actions.setEventSettings,gve=uP.reducer,bve=G4({brush:ube,cartesianAxis:qge,chartData:rpe,errorBars:Nxe,eventSettings:gve,graphicalItems:Oge,layout:Die,legend:Bse,options:Zme,polarAxis:L0e,polarOptions:fve,referenceElements:hbe,renderedTicks:Ube,rootProps:lve,tooltip:mhe,zIndex:Ume}),xve=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return iie({reducer:bve,preloadedState:t,middleware:r=>{var a;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((a="es6")!==null&&a!==void 0?a:"")}).concat([QL.middleware,ZL.middleware,yg.middleware,iP.middleware,oP.middleware])},enhancers:r=>{var a=r;return typeof r=="function"&&(a=r()),a.concat(oD({type:"raf"}))},devTools:{serialize:{replacer:ove},name:"recharts-".concat(n)}})};function yve(e){var t=e.preloadedState,n=e.children,r=e.reduxStoreName,a=ea(),s=v.useRef(null);if(a)return n;s.current==null&&(s.current=xve(t,r));var o=gE;return v.createElement(eoe,{context:o,store:s.current},n)}function vve(e){var t=e.layout,n=e.margin,r=on(),a=ea();return v.useEffect(()=>{a||(r(Iie(t)),r(Oie(n)))},[r,a,t,n]),null}var Eve=v.memo(vve,W0);function _ve(e){var t=on();return v.useEffect(()=>{t(uve(e))},[t,e]),null}var Nve=e=>{var t=on();return v.useEffect(()=>{t(pve(e))},[t,e]),null},Tve=v.memo(Nve,W0);function u5(e){var t=e.zIndex,n=e.isPanorama,r=v.useRef(null),a=on();return v.useLayoutEffect(()=>(r.current&&a(Pme({zIndex:t,element:r.current,isPanorama:n})),()=>{a(Bme({zIndex:t,isPanorama:n}))}),[a,t,n]),v.createElement("g",{tabIndex:-1,ref:r,className:"recharts-zIndex-layer_".concat(t)})}function c5(e){var t=e.children,n=e.isPanorama,r=Ke(Cme);if(!r||r.length===0)return t;var a=r.filter(o=>o<0),s=r.filter(o=>o>0);return v.createElement(v.Fragment,null,a.map(o=>v.createElement(u5,{key:o,zIndex:o,isPanorama:n})),t,s.map(o=>v.createElement(u5,{key:o,zIndex:o,isPanorama:n})))}var Sve=["children"];function wve(e,t){if(e==null)return{};var n,r,a=Ave(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Ave(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function o0(){return o0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o0.apply(null,arguments)}var Cve={width:"100%",height:"100%",display:"block"},kve=v.forwardRef((e,t)=>{var n=kD(),r=OD(),a=jD();if(!Si(n)||!Si(r))return null;var s=e.children,o=e.otherAttributes,u=e.title,d=e.desc,f,m;return o!=null&&(typeof o.tabIndex=="number"?f=o.tabIndex:f=a?0:void 0,typeof o.role=="string"?m=o.role:m=a?"application":void 0),v.createElement(ZM,o0({},o,{title:u,desc:d,role:m,tabIndex:f,width:n,height:r,style:Cve,ref:t}),s)}),Ove=e=>{var t=e.children,n=Ke(K0);if(!n)return null;var r=n.width,a=n.height,s=n.y,o=n.x;return v.createElement(ZM,{width:r,height:a,x:o,y:s},t)},d5=v.forwardRef((e,t)=>{var n=e.children,r=wve(e,Sve),a=ea();return a?v.createElement(Ove,null,v.createElement(c5,{isPanorama:!0},n)):v.createElement(kve,o0({ref:t},r),v.createElement(c5,{isPanorama:!1},n))});function Ive(e,t){return jve(e)||Dve(e,t)||Mve(e,t)||Rve()}function Rve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
630
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mve(e,t){if(e){if(typeof e=="string")return f5(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f5(e,t):void 0}}function f5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Dve(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function jve(e){if(Array.isArray(e))return e}function Lve(){var e=on(),t=v.useState(null),n=Ive(t,2),r=n[0],a=n[1],s=Ke(Qie);return v.useEffect(()=>{if(r!=null){var o=r.getBoundingClientRect(),u=o.width/r.offsetWidth;Nt(u)&&u!==s&&e(Mie(u))}},[r,e,s]),a}function h5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Pve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h5(Object(n),!0).forEach(function(r){Bve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bve(e,t,n){return(t=Uve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uve(e){var t=zve(e,"string");return typeof t=="symbol"?t:t+""}function zve(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oo(){return oo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oo.apply(null,arguments)}function l0(e,t){return Yve(e)||$ve(e,t)||Hve(e,t)||Fve()}function Fve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
631
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hve(e,t){if(e){if(typeof e=="string")return m5(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m5(e,t):void 0}}function m5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $ve(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,o,u=[],d=!0,f=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(d=(r=s.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw a}}return u}}function Yve(e){if(Array.isArray(e))return e}var qve=()=>(fpe(),null);function u0(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var Gve=v.forwardRef((e,t)=>{var n,r,a=v.useRef(null),s=v.useState({containerWidth:u0((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:u0((r=e.style)===null||r===void 0?void 0:r.height)}),o=l0(s,2),u=o[0],d=o[1],f=v.useCallback((p,b)=>{d(x=>{var E=Math.round(p),_=Math.round(b);return x.containerWidth===E&&x.containerHeight===_?x:{containerWidth:E,containerHeight:_}})},[]),m=v.useCallback(p=>{if(typeof t=="function"&&t(p),a.current!=null&&(a.current.disconnect(),a.current=null),p!=null&&typeof ResizeObserver<"u"){var b=p.getBoundingClientRect(),x=b.width,E=b.height;f(x,E);var _=T=>{var C=T[0];if(C!=null){var A=C.contentRect,k=A.width,I=A.height;f(k,I)}},S=new ResizeObserver(_);S.observe(p),a.current=S}},[t,f]);return v.useEffect(()=>()=>{var p=a.current;p!=null&&p.disconnect()},[f]),v.createElement(v.Fragment,null,v.createElement(Uf,{width:u.containerWidth,height:u.containerHeight}),v.createElement("div",oo({ref:m},e)))}),Kve=v.forwardRef((e,t)=>{var n=e.width,r=e.height,a=v.useState({containerWidth:u0(n),containerHeight:u0(r)}),s=l0(a,2),o=s[0],u=s[1],d=v.useCallback((m,p)=>{u(b=>{var x=Math.round(m),E=Math.round(p);return b.containerWidth===x&&b.containerHeight===E?b:{containerWidth:x,containerHeight:E}})},[]),f=v.useCallback(m=>{if(typeof t=="function"&&t(m),m!=null){var p=m.getBoundingClientRect(),b=p.width,x=p.height;d(b,x)}},[t,d]);return v.createElement(v.Fragment,null,v.createElement(Uf,{width:o.containerWidth,height:o.containerHeight}),v.createElement("div",oo({ref:f},e)))}),Vve=v.forwardRef((e,t)=>{var n=e.width,r=e.height;return v.createElement(v.Fragment,null,v.createElement(Uf,{width:n,height:r}),v.createElement("div",oo({ref:t},e)))}),Wve=v.forwardRef((e,t)=>{var n=e.width,r=e.height;return typeof n=="string"||typeof r=="string"?v.createElement(Kve,oo({},e,{ref:t})):typeof n=="number"&&typeof r=="number"?v.createElement(Vve,oo({},e,{width:n,height:r,ref:t})):v.createElement(v.Fragment,null,v.createElement(Uf,{width:n,height:r}),v.createElement("div",oo({ref:t},e)))});function Xve(e){return e?Gve:Wve}var Qve=v.forwardRef((e,t)=>{var n=e.children,r=e.className,a=e.height,s=e.onClick,o=e.onContextMenu,u=e.onDoubleClick,d=e.onMouseDown,f=e.onMouseEnter,m=e.onMouseLeave,p=e.onMouseMove,b=e.onMouseUp,x=e.onTouchEnd,E=e.onTouchMove,_=e.onTouchStart,S=e.style,T=e.width,C=e.responsive,A=e.dispatchTouchEvents,k=A===void 0?!0:A,I=v.useRef(null),O=on(),j=v.useState(null),H=l0(j,2),z=H[0],D=H[1],V=v.useState(null),q=l0(V,2),ae=q[0],Q=q[1],W=Lve(),G=SE(),F=(G==null?void 0:G.width)>0?G.width:T,$=(G==null?void 0:G.height)>0?G.height:a,K=v.useCallback(ze=>{W(ze),typeof t=="function"&&t(ze),D(ze),Q(ze),ze!=null&&(I.current=ze)},[W,t,D,Q]),L=v.useCallback(ze=>{O(XL(ze)),O(Ca({handler:s,reactEvent:ze}))},[O,s]),P=v.useCallback(ze=>{O(u1(ze)),O(Ca({handler:f,reactEvent:ze}))},[O,f]),ee=v.useCallback(ze=>{O(U6()),O(Ca({handler:m,reactEvent:ze}))},[O,m]),M=v.useCallback(ze=>{O(u1(ze)),O(Ca({handler:p,reactEvent:ze}))},[O,p]),de=v.useCallback(()=>{O(nP())},[O]),_e=v.useCallback(()=>{O(rP())},[O]),U=v.useCallback(ze=>{O(tP(ze.key))},[O]),he=v.useCallback(ze=>{O(Ca({handler:o,reactEvent:ze}))},[O,o]),Oe=v.useCallback(ze=>{O(Ca({handler:u,reactEvent:ze}))},[O,u]),pe=v.useCallback(ze=>{O(Ca({handler:d,reactEvent:ze}))},[O,d]),De=v.useCallback(ze=>{O(Ca({handler:b,reactEvent:ze}))},[O,b]),je=v.useCallback(ze=>{O(Ca({handler:_,reactEvent:ze}))},[O,_]),Ee=v.useCallback(ze=>{k&&O(sP(ze)),O(Ca({handler:E,reactEvent:ze}))},[O,k,E]),It=v.useCallback(ze=>{O(Ca({handler:x,reactEvent:ze}))},[O,x]),nt=Xve(C);return v.createElement(oL.Provider,{value:z},v.createElement(rre.Provider,{value:ae},v.createElement(nt,{width:F??(S==null?void 0:S.width),height:$??(S==null?void 0:S.height),className:re("recharts-wrapper",r),style:Pve({position:"relative",cursor:"default",width:F,height:$},S),onClick:L,onContextMenu:he,onDoubleClick:Oe,onFocus:de,onBlur:_e,onKeyDown:U,onMouseDown:pe,onMouseEnter:P,onMouseLeave:ee,onMouseMove:M,onMouseUp:De,onTouchEnd:It,onTouchMove:Ee,onTouchStart:je,ref:K},v.createElement(qve,null),n)))}),Zve=["width","height","responsive","children","className","style","compact","title","desc"];function Jve(e,t){if(e==null)return{};var n,r,a=e1e(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function e1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var t1e=v.forwardRef((e,t)=>{var n=e.width,r=e.height,a=e.responsive,s=e.children,o=e.className,u=e.style,d=e.compact,f=e.title,m=e.desc,p=Jve(e,Zve),b=ss(p);return d?v.createElement(v.Fragment,null,v.createElement(Uf,{width:n,height:r}),v.createElement(d5,{otherAttributes:b,title:f,desc:m},s)):v.createElement(Qve,{className:o,style:u,width:n,height:r,responsive:a??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},v.createElement(d5,{otherAttributes:b,title:f,desc:m,ref:t},v.createElement(vbe,null,s)))});function c1(){return c1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c1.apply(null,arguments)}function p5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function n1e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p5(Object(n),!0).forEach(function(r){r1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function r1e(e,t,n){return(t=a1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a1e(e){var t=i1e(e,"string");return typeof t=="symbol"?t:t+""}function i1e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var s1e={top:5,right:5,bottom:5,left:5},o1e=n1e({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:s1e,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},lP),l1e=v.forwardRef(function(t,n){var r,a=Ba(t.categoricalChartProps,o1e),s=t.chartName,o=t.defaultTooltipEventType,u=t.validateTooltipEventTypes,d=t.tooltipPayloadSearcher,f=t.categoricalChartProps,m={chartName:s,defaultTooltipEventType:o,validateTooltipEventTypes:u,tooltipPayloadSearcher:d,eventEmitter:void 0};return v.createElement(yve,{preloadedState:{options:m},reduxStoreName:(r=f.id)!==null&&r!==void 0?r:s},v.createElement(lbe,{chartData:f.data}),v.createElement(Eve,{layout:a.layout,margin:a.margin}),v.createElement(Tve,{throttleDelay:a.throttleDelay,throttledEvents:a.throttledEvents}),v.createElement(_ve,{baseValue:a.baseValue,accessibilityLayer:a.accessibilityLayer,barCategoryGap:a.barCategoryGap,maxBarSize:a.maxBarSize,stackOffset:a.stackOffset,barGap:a.barGap,barSize:a.barSize,syncId:a.syncId,syncMethod:a.syncMethod,className:a.className,reverseStackOrder:a.reverseStackOrder}),v.createElement(t1e,c1({},a,{ref:n})))}),u1e=["axis","item"],U_=v.forwardRef((e,t)=>v.createElement(l1e,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:u1e,tooltipPayloadSearcher:Xme,categoricalChartProps:e,ref:t}));function c1e(e){if(!e||e.length===0)return[];const t=new Map;for(const n of e){const r=n.date??n.label;if(!r)continue;let a=t.get(r);a||(a={date:r,userCost:0,systemCost:0},t.set(r,a)),n.isSystem?a.systemCost+=n.cost:a.userCost+=n.cost}return Array.from(t.values()).sort((n,r)=>n.date.localeCompare(r.date))}function d1e({active:e,label:t,payload:n}){if(!e||!n||n.length===0)return null;const r=n.find(u=>u.dataKey==="userCost"),a=n.find(u=>u.dataKey==="systemCost"),s=(r==null?void 0:r.value)??0,o=(a==null?void 0:a.value)??0;return c.jsxs("div",{className:"rounded-lg border border-line bg-surface px-3 py-2 shadow-lg",children:[c.jsx("div",{className:"text-[11px] font-medium text-fg-3",children:t}),c.jsxs("div",{className:"mt-1 flex items-center gap-1 text-[11px] text-fg-2",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-blue-500"}),"用户 ",c.jsx("span",{className:"font-mono",children:pa(s)})]}),c.jsxs("div",{className:"flex items-center gap-1 text-[11px] text-fg-2",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500"}),"系统 ",c.jsx("span",{className:"font-mono",children:pa(o)})]})]})}function f1e(){const e=Ka(n=>n.dayData),t=v.useMemo(()=>c1e(e==null?void 0:e.groups),[e]);return c.jsxs("div",{className:"rounded-xl border border-line bg-surface p-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg-2",children:"花费趋势"}),c.jsxs("div",{className:"flex items-center gap-3 text-[11px] text-fg-3",children:[c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-blue-500"}),"用户"]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500"}),"系统"]})]})]}),c.jsx("div",{className:"mt-3 h-[200px] md:h-[240px]",children:c.jsx(wE,{width:"100%",height:"100%",children:c.jsxs(U_,{data:t,margin:{top:8,right:8,left:0,bottom:0},children:[c.jsx(gg,{stroke:"var(--t-line)",strokeDasharray:"3 3",vertical:!1}),c.jsx(bg,{dataKey:"date",tick:{fontSize:11},stroke:"var(--t-fg-4)"}),c.jsx(xg,{tick:{fontSize:11},stroke:"var(--t-fg-4)",tickFormatter:n=>pa(n)}),c.jsx(k_,{content:c.jsx(d1e,{}),cursor:{fill:"var(--t-elevated)",opacity:.5}}),c.jsx(yl,{dataKey:"userCost",stackId:"cost",fill:"#3b82f6",radius:[0,0,0,0]}),c.jsx(yl,{dataKey:"systemCost",stackId:"cost",fill:"#f59e0b",radius:[4,4,0,0]})]})})})]})}function h1e(e){if(!e||e.length===0)return[];const t=new Map;for(const n of e){const r=n.repoId??n.label;let a=t.get(r);a||(a={label:n.label,userCost:0,systemCost:0},t.set(r,a)),n.isSystem?a.systemCost+=n.cost:a.userCost+=n.cost}return Array.from(t.values()).filter(n=>n.userCost+n.systemCost>0).sort((n,r)=>r.userCost+r.systemCost-(n.userCost+n.systemCost))}function m1e({active:e,label:t,payload:n}){var s,o;if(!e||!n||n.length===0)return null;const r=((s=n.find(u=>u.dataKey==="userCost"))==null?void 0:s.value)??0,a=((o=n.find(u=>u.dataKey==="systemCost"))==null?void 0:o.value)??0;return c.jsxs("div",{className:"rounded-lg border border-line bg-surface px-3 py-2 shadow-lg",children:[c.jsx("div",{className:"text-[11px] font-medium text-fg-3",children:t}),c.jsxs("div",{className:"mt-1 flex items-center gap-1 text-[11px] text-fg-2",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-blue-500"}),"用户 ",c.jsx("span",{className:"font-mono",children:pa(r)})]}),c.jsxs("div",{className:"flex items-center gap-1 text-[11px] text-fg-2",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500"}),"系统 ",c.jsx("span",{className:"font-mono",children:pa(a)})]})]})}function p1e(){const e=Ka(n=>n.repoData),t=v.useMemo(()=>h1e(e==null?void 0:e.groups),[e]);return c.jsxs("div",{className:"rounded-xl border border-line bg-surface p-4",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg-2",children:"按仓库"}),t.length===0?c.jsxs("div",{className:"flex flex-col items-center gap-2 py-16 text-fg-5",children:[c.jsx(_f,{className:"h-8 w-8 text-fg-6"}),c.jsx("span",{className:"text-sm",children:"该时间范围内暂无消耗数据"})]}):c.jsx("div",{className:"mt-3 h-[200px] md:h-[240px]",children:c.jsx(wE,{width:"100%",height:"100%",children:c.jsxs(U_,{data:t,margin:{top:8,right:8,left:0,bottom:0},children:[c.jsx(gg,{stroke:"var(--t-line)",strokeDasharray:"3 3",vertical:!1}),c.jsx(bg,{dataKey:"label",tick:{fontSize:11},stroke:"var(--t-fg-4)",interval:0,angle:-20,textAnchor:"end",height:40}),c.jsx(xg,{tick:{fontSize:11},stroke:"var(--t-fg-4)",tickFormatter:n=>pa(n)}),c.jsx(k_,{content:c.jsx(m1e,{}),cursor:{fill:"var(--t-elevated)",opacity:.5}}),c.jsx(yl,{dataKey:"userCost",stackId:"cost",fill:"#3b82f6",radius:[0,0,0,0]}),c.jsx(yl,{dataKey:"systemCost",stackId:"cost",fill:"#f59e0b",radius:[4,4,0,0]})]})})})]})}function g1e(e){return`${e.agent??"unknown"}-${e.modelId??"unknown"}-${e.customAgentId??"none"}`}function b1e(e){if(!e||e.length===0)return[];const t=new Map;for(const n of e){const r=g1e(n);let a=t.get(r);a||(a={label:n.isSystem?`${n.label} (系统)`:n.label,userCost:0,systemCost:0},t.set(r,a)),n.isSystem?a.systemCost+=n.cost:a.userCost+=n.cost}return Array.from(t.values()).filter(n=>n.userCost+n.systemCost>0).sort((n,r)=>r.userCost+r.systemCost-(n.userCost+n.systemCost))}function x1e({active:e,label:t,payload:n}){var s,o;if(!e||!n||n.length===0)return null;const r=((s=n.find(u=>u.dataKey==="userCost"))==null?void 0:s.value)??0,a=((o=n.find(u=>u.dataKey==="systemCost"))==null?void 0:o.value)??0;return c.jsxs("div",{className:"rounded-lg border border-line bg-surface px-3 py-2 shadow-lg",children:[c.jsx("div",{className:"text-[11px] font-medium text-fg-3",children:t}),c.jsxs("div",{className:"mt-1 flex items-center gap-1 text-[11px] text-fg-2",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-blue-500"}),"用户 ",c.jsx("span",{className:"font-mono",children:pa(r)})]}),c.jsxs("div",{className:"flex items-center gap-1 text-[11px] text-fg-2",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500"}),"系统 ",c.jsx("span",{className:"font-mono",children:pa(a)})]})]})}function y1e(){const e=Ka(n=>n.agentData),t=v.useMemo(()=>b1e(e==null?void 0:e.groups),[e]);return c.jsxs("div",{className:"rounded-xl border border-line bg-surface p-4",children:[c.jsx("h2",{className:"text-sm font-semibold text-fg-2",children:"按 Agent"}),t.length===0?c.jsxs("div",{className:"flex flex-col items-center gap-2 py-16 text-fg-5",children:[c.jsx(_f,{className:"h-8 w-8 text-fg-6"}),c.jsx("span",{className:"text-sm",children:"该时间范围内暂无消耗数据"})]}):c.jsx("div",{className:"mt-3 h-[200px] md:h-[240px]",children:c.jsx(wE,{width:"100%",height:"100%",children:c.jsxs(U_,{data:t,margin:{top:8,right:8,left:0,bottom:0},children:[c.jsx(gg,{stroke:"var(--t-line)",strokeDasharray:"3 3",vertical:!1}),c.jsx(bg,{dataKey:"label",tick:{fontSize:10},stroke:"var(--t-fg-4)",interval:0,angle:-20,textAnchor:"end",height:50}),c.jsx(xg,{tick:{fontSize:11},stroke:"var(--t-fg-4)",tickFormatter:n=>pa(n)}),c.jsx(k_,{content:c.jsx(x1e,{}),cursor:{fill:"var(--t-elevated)",opacity:.5}}),c.jsx(yl,{dataKey:"userCost",stackId:"cost",fill:"#3b82f6",radius:[0,0,0,0]}),c.jsx(yl,{dataKey:"systemCost",stackId:"cost",fill:"#f59e0b",radius:[4,4,0,0]})]})})})]})}function v1e(){const e=Ka(o=>o.loading),t=Ka(o=>o.repoData),n=Ka(o=>o.dayData),r=Ka(o=>o.agentData);v.useEffect(()=>{const o=Ka.getState();return o.loadAll(),o.startPolling()},[]);const a=t!==null&&n!==null&&r!==null,s=a&&((t==null?void 0:t.groups.length)??0)===0&&((n==null?void 0:n.groups.length)??0)===0&&((r==null?void 0:r.groups.length)??0)===0;return c.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto p-4 md:p-6",children:c.jsxs("div",{className:"mx-auto max-w-5xl space-y-4",children:[c.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[c.jsx("h1",{className:"text-xl font-bold text-fg",children:"统计"}),c.jsx(Mne,{})]}),e&&!a?c.jsx("div",{className:"flex items-center justify-center py-16",children:c.jsx(Nn,{className:"h-5 w-5 animate-spin text-fg-5"})}):s?c.jsxs("div",{className:"flex flex-col items-center gap-2 py-16 text-fg-5",children:[c.jsx(_f,{className:"h-8 w-8 text-fg-6"}),c.jsx("span",{className:"text-sm",children:"该时间范围内暂无消耗数据"})]}):c.jsxs(c.Fragment,{children:[c.jsx(jne,{}),c.jsx(f1e,{}),c.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[c.jsx(p1e,{}),c.jsx(y1e,{})]})]})]})})}const E1e=300,_1e=4e3,N1e={info:{icon:"ℹ",badge:"bg-fg/10 text-fg-2",bar:"bg-fg-4"},success:{icon:"✓",badge:"bg-emerald-500/10 text-emerald-500",bar:"bg-emerald-500"},warning:{icon:"⚠",badge:"bg-amber-500/10 text-amber-500",bar:"bg-amber-500"},error:{icon:"✕",badge:"bg-red-500/10 text-red-500",bar:"bg-red-500"}};function T1e(){const e=gn(f=>f.toasts),t=gn(f=>f.removeToast),n=Le(f=>f.setActiveSession),r=Fe(Dr),a=ur(),s=f=>{t(f.id),f.sessionId&&(n(f.sessionId),a(`/${encodeURIComponent(r)}/run`))},[o,u]=v.useState([]),d=v.useRef(new Map);return v.useEffect(()=>{const f=new Set(e.map(m=>m.id));u(m=>{let p=m.map(b=>f.has(b.id)||b.exiting?b:{...b,exiting:!0});for(const b of e)p.some(x=>x.id===b.id)||(p=[...p,{...b}]);return p})},[e]),v.useEffect(()=>{const f=d.current;for(const m of o)m.exiting&&!f.has(m.id)&&f.set(m.id,setTimeout(()=>{f.delete(m.id),u(p=>p.filter(b=>b.id!==m.id))},E1e))},[o]),v.useEffect(()=>{const f=d.current;return()=>f.forEach(clearTimeout)},[]),o.length===0?null:c.jsx("div",{className:"pointer-events-none fixed top-4 right-4 z-50 flex w-[calc(100%-2rem)] max-w-sm flex-col","aria-live":"polite","aria-atomic":"false",children:o.map(f=>{const m=N1e[f.variant];return c.jsx("div",{className:"grid w-full transition-[grid-template-rows] duration-300 ease-out",style:{gridTemplateRows:f.exiting?"0fr":"1fr"},children:c.jsx("div",{className:"min-h-0 overflow-hidden",children:c.jsxs("div",{role:"status",onClick:()=>s(f),style:{animation:`${f.exiting?"toast-out":"toast-in"} 0.3s ease-out forwards`},className:"pointer-events-auto relative mb-2 flex cursor-pointer items-start gap-3 overflow-hidden rounded-xl border border-line bg-surface/80 px-3.5 py-3 shadow-lg shadow-black/5 backdrop-blur-md transition-colors hover:border-line-hard hover:bg-surface/90",children:[c.jsx("span",{"aria-hidden":!0,className:`mt-px flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-xs font-semibold ${m.badge}`,children:m.icon}),c.jsx("p",{className:"min-w-0 flex-1 text-sm leading-snug break-words text-fg",children:f.message}),f.persistent&&!f.exiting&&c.jsx("button",{type:"button","aria-label":"关闭",onClick:p=>{p.stopPropagation(),t(f.id)},className:"mt-px flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-fg-4 transition-colors hover:bg-fg/10 hover:text-fg",children:"✕"}),!f.exiting&&!f.persistent&&c.jsx("span",{"aria-hidden":!0,className:`absolute bottom-0 left-0 h-0.5 w-full origin-left ${m.bar}`,style:{animation:`toast-progress ${_1e}ms linear forwards`}})]})})},f.id)})})}const Id=Mf("PushNotifications",{});let g5=!1;async function S1e(e){!nI()||g5||(g5=!0,(await Id.requestPermissions()).receive!=="granted")||(Id.addListener("registration",async n=>{try{await LF(n.value,"ios")}catch{}}),Id.addListener("registrationError",()=>{}),Id.addListener("pushNotificationActionPerformed",n=>{const r=n.notification.data,a=r==null?void 0:r.sessionId;if(a){const s=Dr(Fe.getState());s&&e(`/${encodeURIComponent(s)}/run?session=${a}`)}}),await Id.register())}function w1e(e){const t=e.match(/^\/([^/]+)\/(run|agents|issues|pulls|dev)/);return t?decodeURIComponent(t[1]):null}function A1e(){const e=Fe(r=>r.repos),n=Fe(Dr)??(e.length>0?e[0].name:null);return n?c.jsx(Du,{to:`/${encodeURIComponent(n)}/run`,replace:!0}):c.jsx(Du,{to:"/repos",replace:!0})}function b5({segment:e}){const{repoId:t}=D5(),{search:n}=lr();return t?c.jsx(Du,{to:`/${encodeURIComponent(t)}/dev/${e}${n}`,replace:!0}):c.jsx(Du,{to:"/repos",replace:!0})}function C1e(){const e=ur(),t=lr(),n=Fe(u=>u.activeRepoId),r=Fe(u=>u.repos),a=Fe(u=>u.setActiveRepo),s=Le(u=>u.loadSessions),o=Le(u=>u.clearSessions);return v.useEffect(()=>(Fe.getState().loadRepos(),S1e(e),Wy.getState().init()),[e]),v.useEffect(()=>{if(r.length===0)return;const u=w1e(t.pathname);if(!u)return;const d=r.find(f=>f.name===u);d&&d.id!==Fe.getState().activeRepoId&&a(d.id)},[t.pathname,r,a]),v.useEffect(()=>(n?(o(),at.getState().clearIssues(),Hn.getState().clearPulls(),s(),io.getState().loadAgents(),at.getState().loadIssues(),Hn.getState().loadPulls(),mp.start(n)):(o(),at.getState().clearIssues(),Hn.getState().clearPulls()),()=>mp.stop()),[n,s,o]),c.jsxs(c.Fragment,{children:[c.jsx(A9,{children:c.jsxs(kr,{element:c.jsx(KF,{}),children:[c.jsx(kr,{path:"/repos",element:c.jsx(ZF,{})}),c.jsx(kr,{path:"/settings",element:c.jsx(Cne,{})}),c.jsx(kr,{path:"/analytics",element:c.jsx(v1e,{})}),c.jsx(kr,{path:"/:repoId/run",element:c.jsx(mZ,{})}),c.jsx(kr,{path:"/:repoId/agents",element:c.jsx(Zte,{})}),c.jsx(kr,{path:"/:repoId/agents/:agentId",element:c.jsx(cne,{})}),c.jsx(kr,{path:"/:repoId/dev",element:c.jsx(Du,{to:"issues",replace:!0})}),c.jsx(kr,{path:"/:repoId/dev/issues",element:c.jsx(rC,{})}),c.jsx(kr,{path:"/:repoId/dev/pulls",element:c.jsx(rC,{})}),c.jsx(kr,{path:"/:repoId/issues",element:c.jsx(b5,{segment:"issues"})}),c.jsx(kr,{path:"/:repoId/pulls",element:c.jsx(b5,{segment:"pulls"})}),c.jsx(kr,{path:"/:repoId",element:c.jsx(Du,{to:"run",replace:!0})}),c.jsx(kr,{path:"*",element:c.jsx(A1e,{})})]})}),c.jsx(T1e,{})]})}function k1e(){return c.jsx(Z9,{children:c.jsx(C1e,{})})}const cP=document.getElementById("root");if(!cP)throw new Error("Root element #root not found in index.html");SB.createRoot(cP).render(c.jsx(v.StrictMode,{children:c.jsx(k1e,{})}));export{V1 as W};
|