cc-viewer 1.4.3 → 1.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,609 +0,0 @@
1
- var Y3=Object.defineProperty;var J3=(e,t,n)=>t in e?Y3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var kt=(e,t,n)=>J3(e,typeof t!="symbol"?t+"":t,n);function u2(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function Iu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kp={exports:{}},Nc={},Gp={exports:{}},rn={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var VS;function Q3(){if(VS)return rn;VS=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator;function g(D){return D===null||typeof D!="object"?null:(D=p&&D[p]||D["@@iterator"],typeof D=="function"?D:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,_={};function S(D,q,Y){this.props=D,this.context=q,this.refs=_,this.updater=Y||v}S.prototype.isReactComponent={},S.prototype.setState=function(D,q){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,q,"setState")},S.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function C(){}C.prototype=S.prototype;function E(D,q,Y){this.props=D,this.context=q,this.refs=_,this.updater=Y||v}var k=E.prototype=new C;k.constructor=E,b(k,S.prototype),k.isPureReactComponent=!0;var $=Array.isArray,P=Object.prototype.hasOwnProperty,T={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function N(D,q,Y){var ee,Z={},re=null,he=null;if(q!=null)for(ee in q.ref!==void 0&&(he=q.ref),q.key!==void 0&&(re=""+q.key),q)P.call(q,ee)&&!O.hasOwnProperty(ee)&&(Z[ee]=q[ee]);var fe=arguments.length-2;if(fe===1)Z.children=Y;else if(1<fe){for(var ue=Array(fe),Se=0;Se<fe;Se++)ue[Se]=arguments[Se+2];Z.children=ue}if(D&&D.defaultProps)for(ee in fe=D.defaultProps,fe)Z[ee]===void 0&&(Z[ee]=fe[ee]);return{$$typeof:e,type:D,key:re,ref:he,props:Z,_owner:T.current}}function I(D,q){return{$$typeof:e,type:D.type,key:q,ref:D.ref,props:D.props,_owner:D._owner}}function z(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function A(D){var q={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(Y){return q[Y]})}var M=/\/+/g;function j(D,q){return typeof D=="object"&&D!==null&&D.key!=null?A(""+D.key):q.toString(36)}function B(D,q,Y,ee,Z){var re=typeof D;(re==="undefined"||re==="boolean")&&(D=null);var he=!1;if(D===null)he=!0;else switch(re){case"string":case"number":he=!0;break;case"object":switch(D.$$typeof){case e:case t:he=!0}}if(he)return he=D,Z=Z(he),D=ee===""?"."+j(he,0):ee,$(Z)?(Y="",D!=null&&(Y=D.replace(M,"$&/")+"/"),B(Z,q,Y,"",function(Se){return Se})):Z!=null&&(z(Z)&&(Z=I(Z,Y+(!Z.key||he&&he.key===Z.key?"":(""+Z.key).replace(M,"$&/")+"/")+D)),q.push(Z)),1;if(he=0,ee=ee===""?".":ee+":",$(D))for(var fe=0;fe<D.length;fe++){re=D[fe];var ue=ee+j(re,fe);he+=B(re,q,Y,ue,Z)}else if(ue=g(D),typeof ue=="function")for(D=ue.call(D),fe=0;!(re=D.next()).done;)re=re.value,ue=ee+j(re,fe++),he+=B(re,q,Y,ue,Z);else if(re==="object")throw q=String(D),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.");return he}function F(D,q,Y){if(D==null)return D;var ee=[],Z=0;return B(D,ee,"","",function(re){return q.call(Y,re,Z++)}),ee}function W(D){if(D._status===-1){var q=D._result;q=q(),q.then(function(Y){(D._status===0||D._status===-1)&&(D._status=1,D._result=Y)},function(Y){(D._status===0||D._status===-1)&&(D._status=2,D._result=Y)}),D._status===-1&&(D._status=0,D._result=q)}if(D._status===1)return D._result.default;throw D._result}var V={current:null},L={transition:null},G={ReactCurrentDispatcher:V,ReactCurrentBatchConfig:L,ReactCurrentOwner:T};function U(){throw Error("act(...) is not supported in production builds of React.")}return rn.Children={map:F,forEach:function(D,q,Y){F(D,function(){q.apply(this,arguments)},Y)},count:function(D){var q=0;return F(D,function(){q++}),q},toArray:function(D){return F(D,function(q){return q})||[]},only:function(D){if(!z(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},rn.Component=S,rn.Fragment=n,rn.Profiler=i,rn.PureComponent=E,rn.StrictMode=r,rn.Suspense=u,rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,rn.act=U,rn.cloneElement=function(D,q,Y){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var ee=b({},D.props),Z=D.key,re=D.ref,he=D._owner;if(q!=null){if(q.ref!==void 0&&(re=q.ref,he=T.current),q.key!==void 0&&(Z=""+q.key),D.type&&D.type.defaultProps)var fe=D.type.defaultProps;for(ue in q)P.call(q,ue)&&!O.hasOwnProperty(ue)&&(ee[ue]=q[ue]===void 0&&fe!==void 0?fe[ue]:q[ue])}var ue=arguments.length-2;if(ue===1)ee.children=Y;else if(1<ue){fe=Array(ue);for(var Se=0;Se<ue;Se++)fe[Se]=arguments[Se+2];ee.children=fe}return{$$typeof:e,type:D.type,key:Z,ref:re,props:ee,_owner:he}},rn.createContext=function(D){return D={$$typeof:a,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:o,_context:D},D.Consumer=D},rn.createElement=N,rn.createFactory=function(D){var q=N.bind(null,D);return q.type=D,q},rn.createRef=function(){return{current:null}},rn.forwardRef=function(D){return{$$typeof:c,render:D}},rn.isValidElement=z,rn.lazy=function(D){return{$$typeof:f,_payload:{_status:-1,_result:D},_init:W}},rn.memo=function(D,q){return{$$typeof:d,type:D,compare:q===void 0?null:q}},rn.startTransition=function(D){var q=L.transition;L.transition={};try{D()}finally{L.transition=q}},rn.unstable_act=U,rn.useCallback=function(D,q){return V.current.useCallback(D,q)},rn.useContext=function(D){return V.current.useContext(D)},rn.useDebugValue=function(){},rn.useDeferredValue=function(D){return V.current.useDeferredValue(D)},rn.useEffect=function(D,q){return V.current.useEffect(D,q)},rn.useId=function(){return V.current.useId()},rn.useImperativeHandle=function(D,q,Y){return V.current.useImperativeHandle(D,q,Y)},rn.useInsertionEffect=function(D,q){return V.current.useInsertionEffect(D,q)},rn.useLayoutEffect=function(D,q){return V.current.useLayoutEffect(D,q)},rn.useMemo=function(D,q){return V.current.useMemo(D,q)},rn.useReducer=function(D,q,Y){return V.current.useReducer(D,q,Y)},rn.useRef=function(D){return V.current.useRef(D)},rn.useState=function(D){return V.current.useState(D)},rn.useSyncExternalStore=function(D,q,Y){return V.current.useSyncExternalStore(D,q,Y)},rn.useTransition=function(){return V.current.useTransition()},rn.version="18.3.1",rn}var qS;function ry(){return qS||(qS=1,Gp.exports=Q3()),Gp.exports}/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var US;function Z3(){if(US)return Nc;US=1;var e=ry(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(c,u,d){var f,p={},g=null,v=null;d!==void 0&&(g=""+d),u.key!==void 0&&(g=""+u.key),u.ref!==void 0&&(v=u.ref);for(f in u)r.call(u,f)&&!o.hasOwnProperty(f)&&(p[f]=u[f]);if(c&&c.defaultProps)for(f in u=c.defaultProps,u)p[f]===void 0&&(p[f]=u[f]);return{$$typeof:t,type:c,key:g,ref:v,props:p,_owner:i.current}}return Nc.Fragment=n,Nc.jsx=a,Nc.jsxs=a,Nc}var KS;function eT(){return KS||(KS=1,Kp.exports=Z3()),Kp.exports}var w=eT(),h=ry();const Q=Iu(h),Rf=u2({__proto__:null,default:Q},[h]);var Qd={},Xp={exports:{}},wi={},Yp={exports:{}},Jp={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var GS;function tT(){return GS||(GS=1,(function(e){function t(L,G){var U=L.length;L.push(G);e:for(;0<U;){var D=U-1>>>1,q=L[D];if(0<i(q,G))L[D]=G,L[U]=q,U=D;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var G=L[0],U=L.pop();if(U!==G){L[0]=U;e:for(var D=0,q=L.length,Y=q>>>1;D<Y;){var ee=2*(D+1)-1,Z=L[ee],re=ee+1,he=L[re];if(0>i(Z,U))re<q&&0>i(he,Z)?(L[D]=he,L[re]=U,D=re):(L[D]=Z,L[ee]=U,D=ee);else if(re<q&&0>i(he,U))L[D]=he,L[re]=U,D=re;else break e}}return G}function i(L,G){var U=L.sortIndex-G.sortIndex;return U!==0?U:L.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var u=[],d=[],f=1,p=null,g=3,v=!1,b=!1,_=!1,S=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(L){for(var G=n(d);G!==null;){if(G.callback===null)r(d);else if(G.startTime<=L)r(d),G.sortIndex=G.expirationTime,t(u,G);else break;G=n(d)}}function $(L){if(_=!1,k(L),!b)if(n(u)!==null)b=!0,W(P);else{var G=n(d);G!==null&&V($,G.startTime-L)}}function P(L,G){b=!1,_&&(_=!1,C(N),N=-1),v=!0;var U=g;try{for(k(G),p=n(u);p!==null&&(!(p.expirationTime>G)||L&&!A());){var D=p.callback;if(typeof D=="function"){p.callback=null,g=p.priorityLevel;var q=D(p.expirationTime<=G);G=e.unstable_now(),typeof q=="function"?p.callback=q:p===n(u)&&r(u),k(G)}else r(u);p=n(u)}if(p!==null)var Y=!0;else{var ee=n(d);ee!==null&&V($,ee.startTime-G),Y=!1}return Y}finally{p=null,g=U,v=!1}}var T=!1,O=null,N=-1,I=5,z=-1;function A(){return!(e.unstable_now()-z<I)}function M(){if(O!==null){var L=e.unstable_now();z=L;var G=!0;try{G=O(!0,L)}finally{G?j():(T=!1,O=null)}}else T=!1}var j;if(typeof E=="function")j=function(){E(M)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,F=B.port2;B.port1.onmessage=M,j=function(){F.postMessage(null)}}else j=function(){S(M,0)};function W(L){O=L,T||(T=!0,j())}function V(L,G){N=S(function(){L(e.unstable_now())},G)}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(L){L.callback=null},e.unstable_continueExecution=function(){b||v||(b=!0,W(P))},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(L){switch(g){case 1:case 2:case 3:var G=3;break;default:G=g}var U=g;g=G;try{return L()}finally{g=U}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(L,G){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var U=g;g=L;try{return G()}finally{g=U}},e.unstable_scheduleCallback=function(L,G,U){var D=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?D+U:D):U=D,L){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=U+q,L={id:f++,callback:G,priorityLevel:L,startTime:U,expirationTime:q,sortIndex:-1},U>D?(L.sortIndex=U,t(d,L),n(u)===null&&L===n(d)&&(_?(C(N),N=-1):_=!0,V($,U-D))):(L.sortIndex=q,t(u,L),b||v||(b=!0,W(P))),L},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(L){var G=g;return function(){var U=g;g=G;try{return L.apply(this,arguments)}finally{g=U}}}})(Jp)),Jp}var XS;function nT(){return XS||(XS=1,Yp.exports=tT()),Yp.exports}/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var YS;function rT(){if(YS)return wi;YS=1;var e=ry(),t=nT();function n(s){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+s,m=1;m<arguments.length;m++)l+="&args[]="+encodeURIComponent(arguments[m]);return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function o(s,l){a(s,l),a(s+"Capture",l)}function a(s,l){for(i[s]=l,s=0;s<l.length;s++)r.add(l[s])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,d=/^[: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]*$/,f={},p={};function g(s){return u.call(p,s)?!0:u.call(f,s)?!1:d.test(s)?p[s]=!0:(f[s]=!0,!1)}function v(s,l,m,y){if(m!==null&&m.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return y?!1:m!==null?!m.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function b(s,l,m,y){if(l===null||typeof l>"u"||v(s,l,m,y))return!0;if(y)return!1;if(m!==null)switch(m.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function _(s,l,m,y,x,R,H){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=y,this.attributeNamespace=x,this.mustUseProperty=m,this.propertyName=s,this.type=l,this.sanitizeURL=R,this.removeEmptyString=H}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){S[s]=new _(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var l=s[0];S[l]=new _(l,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){S[s]=new _(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){S[s]=new _(s,2,!1,s,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(s){S[s]=new _(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){S[s]=new _(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){S[s]=new _(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){S[s]=new _(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){S[s]=new _(s,5,!1,s.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function E(s){return s[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(s){var l=s.replace(C,E);S[l]=new _(l,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var l=s.replace(C,E);S[l]=new _(l,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var l=s.replace(C,E);S[l]=new _(l,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){S[s]=new _(s,1,!1,s.toLowerCase(),null,!1,!1)}),S.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){S[s]=new _(s,1,!1,s.toLowerCase(),null,!0,!0)});function k(s,l,m,y){var x=S.hasOwnProperty(l)?S[l]:null;(x!==null?x.type!==0:y||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(b(l,m,x,y)&&(m=null),y||x===null?g(l)&&(m===null?s.removeAttribute(l):s.setAttribute(l,""+m)):x.mustUseProperty?s[x.propertyName]=m===null?x.type===3?!1:"":m:(l=x.attributeName,y=x.attributeNamespace,m===null?s.removeAttribute(l):(x=x.type,m=x===3||x===4&&m===!0?"":""+m,y?s.setAttributeNS(y,l,m):s.setAttribute(l,m))))}var $=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,P=Symbol.for("react.element"),T=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),A=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),L=Symbol.iterator;function G(s){return s===null||typeof s!="object"?null:(s=L&&s[L]||s["@@iterator"],typeof s=="function"?s:null)}var U=Object.assign,D;function q(s){if(D===void 0)try{throw Error()}catch(m){var l=m.stack.trim().match(/\n( *(at )?)/);D=l&&l[1]||""}return`
34
- `+D+s}var Y=!1;function ee(s,l){if(!s||Y)return"";Y=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(_e){var y=_e}Reflect.construct(s,[],l)}else{try{l.call()}catch(_e){y=_e}s.call(l.prototype)}else{try{throw Error()}catch(_e){y=_e}s()}}catch(_e){if(_e&&y&&typeof _e.stack=="string"){for(var x=_e.stack.split(`
35
- `),R=y.stack.split(`
36
- `),H=x.length-1,J=R.length-1;1<=H&&0<=J&&x[H]!==R[J];)J--;for(;1<=H&&0<=J;H--,J--)if(x[H]!==R[J]){if(H!==1||J!==1)do if(H--,J--,0>J||x[H]!==R[J]){var ie=`
37
- `+x[H].replace(" at new "," at ");return s.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",s.displayName)),ie}while(1<=H&&0<=J);break}}}finally{Y=!1,Error.prepareStackTrace=m}return(s=s?s.displayName||s.name:"")?q(s):""}function Z(s){switch(s.tag){case 5:return q(s.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return s=ee(s.type,!1),s;case 11:return s=ee(s.type.render,!1),s;case 1:return s=ee(s.type,!0),s;default:return""}}function re(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case O:return"Fragment";case T:return"Portal";case I:return"Profiler";case N:return"StrictMode";case j:return"Suspense";case B:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case A:return(s.displayName||"Context")+".Consumer";case z:return(s._context.displayName||"Context")+".Provider";case M:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case F:return l=s.displayName||null,l!==null?l:re(s.type)||"Memo";case W:l=s._payload,s=s._init;try{return re(s(l))}catch{}}return null}function he(s){var l=s.type;switch(s.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=l.render,s=s.displayName||s.name||"",l.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return re(l);case 8:return l===N?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function fe(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function ue(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Se(s){var l=ue(s)?"checked":"value",m=Object.getOwnPropertyDescriptor(s.constructor.prototype,l),y=""+s[l];if(!s.hasOwnProperty(l)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var x=m.get,R=m.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return x.call(this)},set:function(H){y=""+H,R.call(this,H)}}),Object.defineProperty(s,l,{enumerable:m.enumerable}),{getValue:function(){return y},setValue:function(H){y=""+H},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function ae(s){s._valueTracker||(s._valueTracker=Se(s))}function le(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var m=l.getValue(),y="";return s&&(y=ue(s)?s.checked?"true":"false":s.value),s=y,s!==m?(l.setValue(s),!0):!1}function ce(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function ye(s,l){var m=l.checked;return U({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:m??s._wrapperState.initialChecked})}function me(s,l){var m=l.defaultValue==null?"":l.defaultValue,y=l.checked!=null?l.checked:l.defaultChecked;m=fe(l.value!=null?l.value:m),s._wrapperState={initialChecked:y,initialValue:m,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function de(s,l){l=l.checked,l!=null&&k(s,"checked",l,!1)}function be(s,l){de(s,l);var m=fe(l.value),y=l.type;if(m!=null)y==="number"?(m===0&&s.value===""||s.value!=m)&&(s.value=""+m):s.value!==""+m&&(s.value=""+m);else if(y==="submit"||y==="reset"){s.removeAttribute("value");return}l.hasOwnProperty("value")?Te(s,l.type,m):l.hasOwnProperty("defaultValue")&&Te(s,l.type,fe(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(s.defaultChecked=!!l.defaultChecked)}function xe(s,l,m){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var y=l.type;if(!(y!=="submit"&&y!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+s._wrapperState.initialValue,m||l===s.value||(s.value=l),s.defaultValue=l}m=s.name,m!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,m!==""&&(s.name=m)}function Te(s,l,m){(l!=="number"||ce(s.ownerDocument)!==s)&&(m==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+m&&(s.defaultValue=""+m))}var ze=Array.isArray;function Ee(s,l,m,y){if(s=s.options,l){l={};for(var x=0;x<m.length;x++)l["$"+m[x]]=!0;for(m=0;m<s.length;m++)x=l.hasOwnProperty("$"+s[m].value),s[m].selected!==x&&(s[m].selected=x),x&&y&&(s[m].defaultSelected=!0)}else{for(m=""+fe(m),l=null,x=0;x<s.length;x++){if(s[x].value===m){s[x].selected=!0,y&&(s[x].defaultSelected=!0);return}l!==null||s[x].disabled||(l=s[x])}l!==null&&(l.selected=!0)}}function ke(s,l){if(l.dangerouslySetInnerHTML!=null)throw Error(n(91));return U({},l,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function je(s,l){var m=l.value;if(m==null){if(m=l.children,l=l.defaultValue,m!=null){if(l!=null)throw Error(n(92));if(ze(m)){if(1<m.length)throw Error(n(93));m=m[0]}l=m}l==null&&(l=""),m=l}s._wrapperState={initialValue:fe(m)}}function Oe(s,l){var m=fe(l.value),y=fe(l.defaultValue);m!=null&&(m=""+m,m!==s.value&&(s.value=m),l.defaultValue==null&&s.defaultValue!==m&&(s.defaultValue=m)),y!=null&&(s.defaultValue=""+y)}function Qe(s){var l=s.textContent;l===s._wrapperState.initialValue&&l!==""&&l!==null&&(s.value=l)}function at(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function $t(s,l){return s==null||s==="http://www.w3.org/1999/xhtml"?at(l):s==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var pt,Je=(function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,m,y,x){MSApp.execUnsafeLocalFunction(function(){return s(l,m,y,x)})}:s})(function(s,l){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=l;else{for(pt=pt||document.createElement("div"),pt.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=pt.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;l.firstChild;)s.appendChild(l.firstChild)}});function ft(s,l){if(l){var m=s.firstChild;if(m&&m===s.lastChild&&m.nodeType===3){m.nodeValue=l;return}}s.textContent=l}var Xe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yt=["Webkit","ms","Moz","O"];Object.keys(Xe).forEach(function(s){yt.forEach(function(l){l=l+s.charAt(0).toUpperCase()+s.substring(1),Xe[l]=Xe[s]})});function tt(s,l,m){return l==null||typeof l=="boolean"||l===""?"":m||typeof l!="number"||l===0||Xe.hasOwnProperty(s)&&Xe[s]?(""+l).trim():l+"px"}function Le(s,l){s=s.style;for(var m in l)if(l.hasOwnProperty(m)){var y=m.indexOf("--")===0,x=tt(m,l[m],y);m==="float"&&(m="cssFloat"),y?s.setProperty(m,x):s[m]=x}}var rt=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Me(s,l){if(l){if(rt[s]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(n(137,s));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(n(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(n(61))}if(l.style!=null&&typeof l.style!="object")throw Error(n(62))}}function Ue(s,l){if(s.indexOf("-")===-1)return typeof l.is=="string";switch(s){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 It=null;function St(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var nn=null,Jt=null,bn=null;function On(s){if(s=yc(s)){if(typeof nn!="function")throw Error(n(280));var l=s.stateNode;l&&(l=fd(l),nn(s.stateNode,s.type,l))}}function on(s){Jt?bn?bn.push(s):bn=[s]:Jt=s}function Ht(){if(Jt){var s=Jt,l=bn;if(bn=Jt=null,On(s),l)for(s=0;s<l.length;s++)On(l[s])}}function Rt(s,l){return s(l)}function sn(){}var Xt=!1;function ot(s,l,m){if(Xt)return s(l,m);Xt=!0;try{return Rt(s,l,m)}finally{Xt=!1,(Jt!==null||bn!==null)&&(sn(),Ht())}}function Et(s,l){var m=s.stateNode;if(m===null)return null;var y=fd(m);if(y===null)return null;m=y[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":(y=!y.disabled)||(s=s.type,y=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!y;break e;default:s=!1}if(s)return null;if(m&&typeof m!="function")throw Error(n(231,l,typeof m));return m}var mt=!1;if(c)try{var Ie={};Object.defineProperty(Ie,"passive",{get:function(){mt=!0}}),window.addEventListener("test",Ie,Ie),window.removeEventListener("test",Ie,Ie)}catch{mt=!1}function $e(s,l,m,y,x,R,H,J,ie){var _e=Array.prototype.slice.call(arguments,3);try{l.apply(m,_e)}catch(Be){this.onError(Be)}}var we=!1,Ae=null,et=!1,nt=null,Ft={onError:function(s){we=!0,Ae=s}};function Kt(s,l,m,y,x,R,H,J,ie){we=!1,Ae=null,$e.apply(Ft,arguments)}function Bt(s,l,m,y,x,R,H,J,ie){if(Kt.apply(this,arguments),we){if(we){var _e=Ae;we=!1,Ae=null}else throw Error(n(198));et||(et=!0,nt=_e)}}function At(s){var l=s,m=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(m=l.return),s=l.return;while(s)}return l.tag===3?m:null}function Tn(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function En(s){if(At(s)!==s)throw Error(n(188))}function In(s){var l=s.alternate;if(!l){if(l=At(s),l===null)throw Error(n(188));return l!==s?null:s}for(var m=s,y=l;;){var x=m.return;if(x===null)break;var R=x.alternate;if(R===null){if(y=x.return,y!==null){m=y;continue}break}if(x.child===R.child){for(R=x.child;R;){if(R===m)return En(x),s;if(R===y)return En(x),l;R=R.sibling}throw Error(n(188))}if(m.return!==y.return)m=x,y=R;else{for(var H=!1,J=x.child;J;){if(J===m){H=!0,m=x,y=R;break}if(J===y){H=!0,y=x,m=R;break}J=J.sibling}if(!H){for(J=R.child;J;){if(J===m){H=!0,m=R,y=x;break}if(J===y){H=!0,y=R,m=x;break}J=J.sibling}if(!H)throw Error(n(189))}}if(m.alternate!==y)throw Error(n(190))}if(m.tag!==3)throw Error(n(188));return m.stateNode.current===m?s:l}function Dn(s){return s=In(s),s!==null?ln(s):null}function ln(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var l=ln(s);if(l!==null)return l;s=s.sibling}return null}var fn=t.unstable_scheduleCallback,He=t.unstable_cancelCallback,Ye=t.unstable_shouldYield,Pt=t.unstable_requestPaint,gt=t.unstable_now,lt=t.unstable_getCurrentPriorityLevel,Ze=t.unstable_ImmediatePriority,Tt=t.unstable_UserBlockingPriority,Gt=t.unstable_NormalPriority,Ke=t.unstable_LowPriority,vt=t.unstable_IdlePriority,Nt=null,pn=null;function ir(s){if(pn&&typeof pn.onCommitFiberRoot=="function")try{pn.onCommitFiberRoot(Nt,s,void 0,(s.current.flags&128)===128)}catch{}}var Bn=Math.clz32?Math.clz32:Gr,Kr=Math.log,yr=Math.LN2;function Gr(s){return s>>>=0,s===0?32:31-(Kr(s)/yr|0)|0}var br=64,Ar=4194304;function Xr(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function un(s,l){var m=s.pendingLanes;if(m===0)return 0;var y=0,x=s.suspendedLanes,R=s.pingedLanes,H=m&268435455;if(H!==0){var J=H&~x;J!==0?y=Xr(J):(R&=H,R!==0&&(y=Xr(R)))}else H=m&~x,H!==0?y=Xr(H):R!==0&&(y=Xr(R));if(y===0)return 0;if(l!==0&&l!==y&&(l&x)===0&&(x=y&-y,R=l&-l,x>=R||x===16&&(R&4194240)!==0))return l;if((y&4)!==0&&(y|=m&16),l=s.entangledLanes,l!==0)for(s=s.entanglements,l&=y;0<l;)m=31-Bn(l),x=1<<m,y|=s[m],l&=~x;return y}function ut(s,l){switch(s){case 1:case 2:case 4:return l+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function st(s,l){for(var m=s.suspendedLanes,y=s.pingedLanes,x=s.expirationTimes,R=s.pendingLanes;0<R;){var H=31-Bn(R),J=1<<H,ie=x[H];ie===-1?((J&m)===0||(J&y)!==0)&&(x[H]=ut(J,l)):ie<=l&&(s.expiredLanes|=J),R&=~J}}function an(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function dn(){var s=br;return br<<=1,(br&4194240)===0&&(br=64),s}function _n(s){for(var l=[],m=0;31>m;m++)l.push(s);return l}function xn(s,l,m){s.pendingLanes|=l,l!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,l=31-Bn(l),s[l]=m}function Dr(s,l){var m=s.pendingLanes&~l;s.pendingLanes=l,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=l,s.mutableReadLanes&=l,s.entangledLanes&=l,l=s.entanglements;var y=s.eventTimes;for(s=s.expirationTimes;0<m;){var x=31-Bn(m),R=1<<x;l[x]=0,y[x]=-1,s[x]=-1,m&=~R}}function or(s,l){var m=s.entangledLanes|=l;for(s=s.entanglements;m;){var y=31-Bn(m),x=1<<y;x&l|s[y]&l&&(s[y]|=l),m&=~x}}var qt=0;function _r(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var $r,vi,Rr,bs,Fa,Wa=!1,Qo=[],Kn=null,Yr=null,si=null,yi=new Map,Ui=new Map,Pi=[],Va="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function qa(s,l){switch(s){case"focusin":case"focusout":Kn=null;break;case"dragenter":case"dragleave":Yr=null;break;case"mouseover":case"mouseout":si=null;break;case"pointerover":case"pointerout":yi.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ui.delete(l.pointerId)}}function dt(s,l,m,y,x,R){return s===null||s.nativeEvent!==R?(s={blockedOn:l,domEventName:m,eventSystemFlags:y,nativeEvent:R,targetContainers:[x]},l!==null&&(l=yc(l),l!==null&&vi(l)),s):(s.eventSystemFlags|=y,l=s.targetContainers,x!==null&&l.indexOf(x)===-1&&l.push(x),s)}function Dt(s,l,m,y,x){switch(l){case"focusin":return Kn=dt(Kn,s,l,m,y,x),!0;case"dragenter":return Yr=dt(Yr,s,l,m,y,x),!0;case"mouseover":return si=dt(si,s,l,m,y,x),!0;case"pointerover":var R=x.pointerId;return yi.set(R,dt(yi.get(R)||null,s,l,m,y,x)),!0;case"gotpointercapture":return R=x.pointerId,Ui.set(R,dt(Ui.get(R)||null,s,l,m,y,x)),!0}return!1}function zn(s){var l=na(s.target);if(l!==null){var m=At(l);if(m!==null){if(l=m.tag,l===13){if(l=Tn(m),l!==null){s.blockedOn=l,Fa(s.priority,function(){Rr(m)});return}}else if(l===3&&m.stateNode.current.memoizedState.isDehydrated){s.blockedOn=m.tag===3?m.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Ln(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var m=_m(s.domEventName,s.eventSystemFlags,l[0],s.nativeEvent);if(m===null){m=s.nativeEvent;var y=new m.constructor(m.type,m);It=y,m.target.dispatchEvent(y),It=null}else return l=yc(m),l!==null&&vi(l),s.blockedOn=m,!1;l.shift()}return!0}function jn(s,l,m){Ln(s)&&m.delete(l)}function Ua(){Wa=!1,Kn!==null&&Ln(Kn)&&(Kn=null),Yr!==null&&Ln(Yr)&&(Yr=null),si!==null&&Ln(si)&&(si=null),yi.forEach(jn),Ui.forEach(jn)}function Zo(s,l){s.blockedOn===l&&(s.blockedOn=null,Wa||(Wa=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ua)))}function _s(s){function l(x){return Zo(x,s)}if(0<Qo.length){Zo(Qo[0],s);for(var m=1;m<Qo.length;m++){var y=Qo[m];y.blockedOn===s&&(y.blockedOn=null)}}for(Kn!==null&&Zo(Kn,s),Yr!==null&&Zo(Yr,s),si!==null&&Zo(si,s),yi.forEach(l),Ui.forEach(l),m=0;m<Pi.length;m++)y=Pi[m],y.blockedOn===s&&(y.blockedOn=null);for(;0<Pi.length&&(m=Pi[0],m.blockedOn===null);)zn(m),m.blockedOn===null&&Pi.shift()}var fo=$.ReactCurrentBatchConfig,ed=!0;function SR(s,l,m,y){var x=qt,R=fo.transition;fo.transition=null;try{qt=1,bm(s,l,m,y)}finally{qt=x,fo.transition=R}}function CR(s,l,m,y){var x=qt,R=fo.transition;fo.transition=null;try{qt=4,bm(s,l,m,y)}finally{qt=x,fo.transition=R}}function bm(s,l,m,y){if(ed){var x=_m(s,l,m,y);if(x===null)Bm(s,l,y,td,m),qa(s,y);else if(Dt(x,s,l,m,y))y.stopPropagation();else if(qa(s,y),l&4&&-1<Va.indexOf(s)){for(;x!==null;){var R=yc(x);if(R!==null&&$r(R),R=_m(s,l,m,y),R===null&&Bm(s,l,y,td,m),R===x)break;x=R}x!==null&&y.stopPropagation()}else Bm(s,l,y,null,m)}}var td=null;function _m(s,l,m,y){if(td=null,s=St(y),s=na(s),s!==null)if(l=At(s),l===null)s=null;else if(m=l.tag,m===13){if(s=Tn(l),s!==null)return s;s=null}else if(m===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null);return td=s,null}function Pb(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(lt()){case Ze:return 1;case Tt:return 4;case Gt:case Ke:return 16;case vt:return 536870912;default:return 16}default:return 16}}var Ss=null,Sm=null,nd=null;function Ob(){if(nd)return nd;var s,l=Sm,m=l.length,y,x="value"in Ss?Ss.value:Ss.textContent,R=x.length;for(s=0;s<m&&l[s]===x[s];s++);var H=m-s;for(y=1;y<=H&&l[m-y]===x[R-y];y++);return nd=x.slice(s,1<y?1-y:void 0)}function rd(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function id(){return!0}function Ib(){return!1}function Oi(s){function l(m,y,x,R,H){this._reactName=m,this._targetInst=x,this.type=y,this.nativeEvent=R,this.target=H,this.currentTarget=null;for(var J in s)s.hasOwnProperty(J)&&(m=s[J],this[J]=m?m(R):R[J]);return this.isDefaultPrevented=(R.defaultPrevented!=null?R.defaultPrevented:R.returnValue===!1)?id:Ib,this.isPropagationStopped=Ib,this}return U(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var m=this.nativeEvent;m&&(m.preventDefault?m.preventDefault():typeof m.returnValue!="unknown"&&(m.returnValue=!1),this.isDefaultPrevented=id)},stopPropagation:function(){var m=this.nativeEvent;m&&(m.stopPropagation?m.stopPropagation():typeof m.cancelBubble!="unknown"&&(m.cancelBubble=!0),this.isPropagationStopped=id)},persist:function(){},isPersistent:id}),l}var Ka={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cm=Oi(Ka),ac=U({},Ka,{view:0,detail:0}),xR=Oi(ac),xm,wm,lc,od=U({},ac,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:km,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==lc&&(lc&&s.type==="mousemove"?(xm=s.screenX-lc.screenX,wm=s.screenY-lc.screenY):wm=xm=0,lc=s),xm)},movementY:function(s){return"movementY"in s?s.movementY:wm}}),Nb=Oi(od),wR=U({},od,{dataTransfer:0}),ER=Oi(wR),kR=U({},ac,{relatedTarget:0}),Em=Oi(kR),$R=U({},Ka,{animationName:0,elapsedTime:0,pseudoElement:0}),RR=Oi($R),TR=U({},Ka,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),PR=Oi(TR),OR=U({},Ka,{data:0}),Mb=Oi(OR),IR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},NR={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"},MR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zR(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=MR[s])?!!l[s]:!1}function km(){return zR}var jR=U({},ac,{key:function(s){if(s.key){var l=IR[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=rd(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?NR[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:km,charCode:function(s){return s.type==="keypress"?rd(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?rd(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),BR=Oi(jR),LR=U({},od,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zb=Oi(LR),AR=U({},ac,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:km}),DR=Oi(AR),HR=U({},Ka,{propertyName:0,elapsedTime:0,pseudoElement:0}),FR=Oi(HR),WR=U({},od,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),VR=Oi(WR),qR=[9,13,27,32],$m=c&&"CompositionEvent"in window,cc=null;c&&"documentMode"in document&&(cc=document.documentMode);var UR=c&&"TextEvent"in window&&!cc,jb=c&&(!$m||cc&&8<cc&&11>=cc),Bb=" ",Lb=!1;function Ab(s,l){switch(s){case"keyup":return qR.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Db(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Ga=!1;function KR(s,l){switch(s){case"compositionend":return Db(l);case"keypress":return l.which!==32?null:(Lb=!0,Bb);case"textInput":return s=l.data,s===Bb&&Lb?null:s;default:return null}}function GR(s,l){if(Ga)return s==="compositionend"||!$m&&Ab(s,l)?(s=Ob(),nd=Sm=Ss=null,Ga=!1,s):null;switch(s){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 jb&&l.locale!=="ko"?null:l.data;default:return null}}var XR={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 Hb(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!XR[s.type]:l==="textarea"}function Fb(s,l,m,y){on(y),l=ud(l,"onChange"),0<l.length&&(m=new Cm("onChange","change",null,m,y),s.push({event:m,listeners:l}))}var uc=null,dc=null;function YR(s){s_(s,0)}function sd(s){var l=Za(s);if(le(l))return s}function JR(s,l){if(s==="change")return l}var Wb=!1;if(c){var Rm;if(c){var Tm="oninput"in document;if(!Tm){var Vb=document.createElement("div");Vb.setAttribute("oninput","return;"),Tm=typeof Vb.oninput=="function"}Rm=Tm}else Rm=!1;Wb=Rm&&(!document.documentMode||9<document.documentMode)}function qb(){uc&&(uc.detachEvent("onpropertychange",Ub),dc=uc=null)}function Ub(s){if(s.propertyName==="value"&&sd(dc)){var l=[];Fb(l,dc,s,St(s)),ot(YR,l)}}function QR(s,l,m){s==="focusin"?(qb(),uc=l,dc=m,uc.attachEvent("onpropertychange",Ub)):s==="focusout"&&qb()}function ZR(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return sd(dc)}function e3(s,l){if(s==="click")return sd(l)}function t3(s,l){if(s==="input"||s==="change")return sd(l)}function n3(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var mo=typeof Object.is=="function"?Object.is:n3;function hc(s,l){if(mo(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var m=Object.keys(s),y=Object.keys(l);if(m.length!==y.length)return!1;for(y=0;y<m.length;y++){var x=m[y];if(!u.call(l,x)||!mo(s[x],l[x]))return!1}return!0}function Kb(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Gb(s,l){var m=Kb(s);s=0;for(var y;m;){if(m.nodeType===3){if(y=s+m.textContent.length,s<=l&&y>=l)return{node:m,offset:l-s};s=y}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=Kb(m)}}function Xb(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?Xb(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function Yb(){for(var s=window,l=ce();l instanceof s.HTMLIFrameElement;){try{var m=typeof l.contentWindow.location.href=="string"}catch{m=!1}if(m)s=l.contentWindow;else break;l=ce(s.document)}return l}function Pm(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}function r3(s){var l=Yb(),m=s.focusedElem,y=s.selectionRange;if(l!==m&&m&&m.ownerDocument&&Xb(m.ownerDocument.documentElement,m)){if(y!==null&&Pm(m)){if(l=y.start,s=y.end,s===void 0&&(s=l),"selectionStart"in m)m.selectionStart=l,m.selectionEnd=Math.min(s,m.value.length);else if(s=(l=m.ownerDocument||document)&&l.defaultView||window,s.getSelection){s=s.getSelection();var x=m.textContent.length,R=Math.min(y.start,x);y=y.end===void 0?R:Math.min(y.end,x),!s.extend&&R>y&&(x=y,y=R,R=x),x=Gb(m,R);var H=Gb(m,y);x&&H&&(s.rangeCount!==1||s.anchorNode!==x.node||s.anchorOffset!==x.offset||s.focusNode!==H.node||s.focusOffset!==H.offset)&&(l=l.createRange(),l.setStart(x.node,x.offset),s.removeAllRanges(),R>y?(s.addRange(l),s.extend(H.node,H.offset)):(l.setEnd(H.node,H.offset),s.addRange(l)))}}for(l=[],s=m;s=s.parentNode;)s.nodeType===1&&l.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<l.length;m++)s=l[m],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var i3=c&&"documentMode"in document&&11>=document.documentMode,Xa=null,Om=null,fc=null,Im=!1;function Jb(s,l,m){var y=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;Im||Xa==null||Xa!==ce(y)||(y=Xa,"selectionStart"in y&&Pm(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),fc&&hc(fc,y)||(fc=y,y=ud(Om,"onSelect"),0<y.length&&(l=new Cm("onSelect","select",null,l,m),s.push({event:l,listeners:y}),l.target=Xa)))}function ad(s,l){var m={};return m[s.toLowerCase()]=l.toLowerCase(),m["Webkit"+s]="webkit"+l,m["Moz"+s]="moz"+l,m}var Ya={animationend:ad("Animation","AnimationEnd"),animationiteration:ad("Animation","AnimationIteration"),animationstart:ad("Animation","AnimationStart"),transitionend:ad("Transition","TransitionEnd")},Nm={},Qb={};c&&(Qb=document.createElement("div").style,"AnimationEvent"in window||(delete Ya.animationend.animation,delete Ya.animationiteration.animation,delete Ya.animationstart.animation),"TransitionEvent"in window||delete Ya.transitionend.transition);function ld(s){if(Nm[s])return Nm[s];if(!Ya[s])return s;var l=Ya[s],m;for(m in l)if(l.hasOwnProperty(m)&&m in Qb)return Nm[s]=l[m];return s}var Zb=ld("animationend"),e_=ld("animationiteration"),t_=ld("animationstart"),n_=ld("transitionend"),r_=new Map,i_="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Cs(s,l){r_.set(s,l),o(l,[s])}for(var Mm=0;Mm<i_.length;Mm++){var zm=i_[Mm],o3=zm.toLowerCase(),s3=zm[0].toUpperCase()+zm.slice(1);Cs(o3,"on"+s3)}Cs(Zb,"onAnimationEnd"),Cs(e_,"onAnimationIteration"),Cs(t_,"onAnimationStart"),Cs("dblclick","onDoubleClick"),Cs("focusin","onFocus"),Cs("focusout","onBlur"),Cs(n_,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mc="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(" "),a3=new Set("cancel close invalid load scroll toggle".split(" ").concat(mc));function o_(s,l,m){var y=s.type||"unknown-event";s.currentTarget=m,Bt(y,l,void 0,s),s.currentTarget=null}function s_(s,l){l=(l&4)!==0;for(var m=0;m<s.length;m++){var y=s[m],x=y.event;y=y.listeners;e:{var R=void 0;if(l)for(var H=y.length-1;0<=H;H--){var J=y[H],ie=J.instance,_e=J.currentTarget;if(J=J.listener,ie!==R&&x.isPropagationStopped())break e;o_(x,J,_e),R=ie}else for(H=0;H<y.length;H++){if(J=y[H],ie=J.instance,_e=J.currentTarget,J=J.listener,ie!==R&&x.isPropagationStopped())break e;o_(x,J,_e),R=ie}}}if(et)throw s=nt,et=!1,nt=null,s}function Hn(s,l){var m=l[Wm];m===void 0&&(m=l[Wm]=new Set);var y=s+"__bubble";m.has(y)||(a_(l,s,2,!1),m.add(y))}function jm(s,l,m){var y=0;l&&(y|=4),a_(m,s,y,l)}var cd="_reactListening"+Math.random().toString(36).slice(2);function pc(s){if(!s[cd]){s[cd]=!0,r.forEach(function(m){m!=="selectionchange"&&(a3.has(m)||jm(m,!1,s),jm(m,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[cd]||(l[cd]=!0,jm("selectionchange",!1,l))}}function a_(s,l,m,y){switch(Pb(l)){case 1:var x=SR;break;case 4:x=CR;break;default:x=bm}m=x.bind(null,l,m,s),x=void 0,!mt||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(x=!0),y?x!==void 0?s.addEventListener(l,m,{capture:!0,passive:x}):s.addEventListener(l,m,!0):x!==void 0?s.addEventListener(l,m,{passive:x}):s.addEventListener(l,m,!1)}function Bm(s,l,m,y,x){var R=y;if((l&1)===0&&(l&2)===0&&y!==null)e:for(;;){if(y===null)return;var H=y.tag;if(H===3||H===4){var J=y.stateNode.containerInfo;if(J===x||J.nodeType===8&&J.parentNode===x)break;if(H===4)for(H=y.return;H!==null;){var ie=H.tag;if((ie===3||ie===4)&&(ie=H.stateNode.containerInfo,ie===x||ie.nodeType===8&&ie.parentNode===x))return;H=H.return}for(;J!==null;){if(H=na(J),H===null)return;if(ie=H.tag,ie===5||ie===6){y=R=H;continue e}J=J.parentNode}}y=y.return}ot(function(){var _e=R,Be=St(m),Fe=[];e:{var Ne=r_.get(s);if(Ne!==void 0){var ht=Cm,Ct=s;switch(s){case"keypress":if(rd(m)===0)break e;case"keydown":case"keyup":ht=BR;break;case"focusin":Ct="focus",ht=Em;break;case"focusout":Ct="blur",ht=Em;break;case"beforeblur":case"afterblur":ht=Em;break;case"click":if(m.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ht=Nb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ht=ER;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ht=DR;break;case Zb:case e_:case t_:ht=RR;break;case n_:ht=FR;break;case"scroll":ht=xR;break;case"wheel":ht=VR;break;case"copy":case"cut":case"paste":ht=PR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ht=zb}var xt=(l&4)!==0,sr=!xt&&s==="scroll",pe=xt?Ne!==null?Ne+"Capture":null:Ne;xt=[];for(var oe=_e,ve;oe!==null;){ve=oe;var Ve=ve.stateNode;if(ve.tag===5&&Ve!==null&&(ve=Ve,pe!==null&&(Ve=Et(oe,pe),Ve!=null&&xt.push(gc(oe,Ve,ve)))),sr)break;oe=oe.return}0<xt.length&&(Ne=new ht(Ne,Ct,null,m,Be),Fe.push({event:Ne,listeners:xt}))}}if((l&7)===0){e:{if(Ne=s==="mouseover"||s==="pointerover",ht=s==="mouseout"||s==="pointerout",Ne&&m!==It&&(Ct=m.relatedTarget||m.fromElement)&&(na(Ct)||Ct[es]))break e;if((ht||Ne)&&(Ne=Be.window===Be?Be:(Ne=Be.ownerDocument)?Ne.defaultView||Ne.parentWindow:window,ht?(Ct=m.relatedTarget||m.toElement,ht=_e,Ct=Ct?na(Ct):null,Ct!==null&&(sr=At(Ct),Ct!==sr||Ct.tag!==5&&Ct.tag!==6)&&(Ct=null)):(ht=null,Ct=_e),ht!==Ct)){if(xt=Nb,Ve="onMouseLeave",pe="onMouseEnter",oe="mouse",(s==="pointerout"||s==="pointerover")&&(xt=zb,Ve="onPointerLeave",pe="onPointerEnter",oe="pointer"),sr=ht==null?Ne:Za(ht),ve=Ct==null?Ne:Za(Ct),Ne=new xt(Ve,oe+"leave",ht,m,Be),Ne.target=sr,Ne.relatedTarget=ve,Ve=null,na(Be)===_e&&(xt=new xt(pe,oe+"enter",Ct,m,Be),xt.target=ve,xt.relatedTarget=sr,Ve=xt),sr=Ve,ht&&Ct)t:{for(xt=ht,pe=Ct,oe=0,ve=xt;ve;ve=Ja(ve))oe++;for(ve=0,Ve=pe;Ve;Ve=Ja(Ve))ve++;for(;0<oe-ve;)xt=Ja(xt),oe--;for(;0<ve-oe;)pe=Ja(pe),ve--;for(;oe--;){if(xt===pe||pe!==null&&xt===pe.alternate)break t;xt=Ja(xt),pe=Ja(pe)}xt=null}else xt=null;ht!==null&&l_(Fe,Ne,ht,xt,!1),Ct!==null&&sr!==null&&l_(Fe,sr,Ct,xt,!0)}}e:{if(Ne=_e?Za(_e):window,ht=Ne.nodeName&&Ne.nodeName.toLowerCase(),ht==="select"||ht==="input"&&Ne.type==="file")var wt=JR;else if(Hb(Ne))if(Wb)wt=t3;else{wt=ZR;var Mt=QR}else(ht=Ne.nodeName)&&ht.toLowerCase()==="input"&&(Ne.type==="checkbox"||Ne.type==="radio")&&(wt=e3);if(wt&&(wt=wt(s,_e))){Fb(Fe,wt,m,Be);break e}Mt&&Mt(s,Ne,_e),s==="focusout"&&(Mt=Ne._wrapperState)&&Mt.controlled&&Ne.type==="number"&&Te(Ne,"number",Ne.value)}switch(Mt=_e?Za(_e):window,s){case"focusin":(Hb(Mt)||Mt.contentEditable==="true")&&(Xa=Mt,Om=_e,fc=null);break;case"focusout":fc=Om=Xa=null;break;case"mousedown":Im=!0;break;case"contextmenu":case"mouseup":case"dragend":Im=!1,Jb(Fe,m,Be);break;case"selectionchange":if(i3)break;case"keydown":case"keyup":Jb(Fe,m,Be)}var zt;if($m)e:{switch(s){case"compositionstart":var Wt="onCompositionStart";break e;case"compositionend":Wt="onCompositionEnd";break e;case"compositionupdate":Wt="onCompositionUpdate";break e}Wt=void 0}else Ga?Ab(s,m)&&(Wt="onCompositionEnd"):s==="keydown"&&m.keyCode===229&&(Wt="onCompositionStart");Wt&&(jb&&m.locale!=="ko"&&(Ga||Wt!=="onCompositionStart"?Wt==="onCompositionEnd"&&Ga&&(zt=Ob()):(Ss=Be,Sm="value"in Ss?Ss.value:Ss.textContent,Ga=!0)),Mt=ud(_e,Wt),0<Mt.length&&(Wt=new Mb(Wt,s,null,m,Be),Fe.push({event:Wt,listeners:Mt}),zt?Wt.data=zt:(zt=Db(m),zt!==null&&(Wt.data=zt)))),(zt=UR?KR(s,m):GR(s,m))&&(_e=ud(_e,"onBeforeInput"),0<_e.length&&(Be=new Mb("onBeforeInput","beforeinput",null,m,Be),Fe.push({event:Be,listeners:_e}),Be.data=zt))}s_(Fe,l)})}function gc(s,l,m){return{instance:s,listener:l,currentTarget:m}}function ud(s,l){for(var m=l+"Capture",y=[];s!==null;){var x=s,R=x.stateNode;x.tag===5&&R!==null&&(x=R,R=Et(s,m),R!=null&&y.unshift(gc(s,R,x)),R=Et(s,l),R!=null&&y.push(gc(s,R,x))),s=s.return}return y}function Ja(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function l_(s,l,m,y,x){for(var R=l._reactName,H=[];m!==null&&m!==y;){var J=m,ie=J.alternate,_e=J.stateNode;if(ie!==null&&ie===y)break;J.tag===5&&_e!==null&&(J=_e,x?(ie=Et(m,R),ie!=null&&H.unshift(gc(m,ie,J))):x||(ie=Et(m,R),ie!=null&&H.push(gc(m,ie,J)))),m=m.return}H.length!==0&&s.push({event:l,listeners:H})}var l3=/\r\n?/g,c3=/\u0000|\uFFFD/g;function c_(s){return(typeof s=="string"?s:""+s).replace(l3,`
38
- `).replace(c3,"")}function dd(s,l,m){if(l=c_(l),c_(s)!==l&&m)throw Error(n(425))}function hd(){}var Lm=null,Am=null;function Dm(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Hm=typeof setTimeout=="function"?setTimeout:void 0,u3=typeof clearTimeout=="function"?clearTimeout:void 0,u_=typeof Promise=="function"?Promise:void 0,d3=typeof queueMicrotask=="function"?queueMicrotask:typeof u_<"u"?function(s){return u_.resolve(null).then(s).catch(h3)}:Hm;function h3(s){setTimeout(function(){throw s})}function Fm(s,l){var m=l,y=0;do{var x=m.nextSibling;if(s.removeChild(m),x&&x.nodeType===8)if(m=x.data,m==="/$"){if(y===0){s.removeChild(x),_s(l);return}y--}else m!=="$"&&m!=="$?"&&m!=="$!"||y++;m=x}while(m);_s(l)}function xs(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return s}function d_(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var m=s.data;if(m==="$"||m==="$!"||m==="$?"){if(l===0)return s;l--}else m==="/$"&&l++}s=s.previousSibling}return null}var Qa=Math.random().toString(36).slice(2),Io="__reactFiber$"+Qa,vc="__reactProps$"+Qa,es="__reactContainer$"+Qa,Wm="__reactEvents$"+Qa,f3="__reactListeners$"+Qa,m3="__reactHandles$"+Qa;function na(s){var l=s[Io];if(l)return l;for(var m=s.parentNode;m;){if(l=m[es]||m[Io]){if(m=l.alternate,l.child!==null||m!==null&&m.child!==null)for(s=d_(s);s!==null;){if(m=s[Io])return m;s=d_(s)}return l}s=m,m=s.parentNode}return null}function yc(s){return s=s[Io]||s[es],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function Za(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function fd(s){return s[vc]||null}var Vm=[],el=-1;function ws(s){return{current:s}}function Fn(s){0>el||(s.current=Vm[el],Vm[el]=null,el--)}function An(s,l){el++,Vm[el]=s.current,s.current=l}var Es={},Jr=ws(Es),bi=ws(!1),ra=Es;function tl(s,l){var m=s.type.contextTypes;if(!m)return Es;var y=s.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===l)return y.__reactInternalMemoizedMaskedChildContext;var x={},R;for(R in m)x[R]=l[R];return y&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=l,s.__reactInternalMemoizedMaskedChildContext=x),x}function _i(s){return s=s.childContextTypes,s!=null}function md(){Fn(bi),Fn(Jr)}function h_(s,l,m){if(Jr.current!==Es)throw Error(n(168));An(Jr,l),An(bi,m)}function f_(s,l,m){var y=s.stateNode;if(l=l.childContextTypes,typeof y.getChildContext!="function")return m;y=y.getChildContext();for(var x in y)if(!(x in l))throw Error(n(108,he(s)||"Unknown",x));return U({},m,y)}function pd(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Es,ra=Jr.current,An(Jr,s),An(bi,bi.current),!0}function m_(s,l,m){var y=s.stateNode;if(!y)throw Error(n(169));m?(s=f_(s,l,ra),y.__reactInternalMemoizedMergedChildContext=s,Fn(bi),Fn(Jr),An(Jr,s)):Fn(bi),An(bi,m)}var ts=null,gd=!1,qm=!1;function p_(s){ts===null?ts=[s]:ts.push(s)}function p3(s){gd=!0,p_(s)}function ks(){if(!qm&&ts!==null){qm=!0;var s=0,l=qt;try{var m=ts;for(qt=1;s<m.length;s++){var y=m[s];do y=y(!0);while(y!==null)}ts=null,gd=!1}catch(x){throw ts!==null&&(ts=ts.slice(s+1)),fn(Ze,ks),x}finally{qt=l,qm=!1}}return null}var nl=[],rl=0,vd=null,yd=0,Ki=[],Gi=0,ia=null,ns=1,rs="";function oa(s,l){nl[rl++]=yd,nl[rl++]=vd,vd=s,yd=l}function g_(s,l,m){Ki[Gi++]=ns,Ki[Gi++]=rs,Ki[Gi++]=ia,ia=s;var y=ns;s=rs;var x=32-Bn(y)-1;y&=~(1<<x),m+=1;var R=32-Bn(l)+x;if(30<R){var H=x-x%5;R=(y&(1<<H)-1).toString(32),y>>=H,x-=H,ns=1<<32-Bn(l)+x|m<<x|y,rs=R+s}else ns=1<<R|m<<x|y,rs=s}function Um(s){s.return!==null&&(oa(s,1),g_(s,1,0))}function Km(s){for(;s===vd;)vd=nl[--rl],nl[rl]=null,yd=nl[--rl],nl[rl]=null;for(;s===ia;)ia=Ki[--Gi],Ki[Gi]=null,rs=Ki[--Gi],Ki[Gi]=null,ns=Ki[--Gi],Ki[Gi]=null}var Ii=null,Ni=null,qn=!1,po=null;function v_(s,l){var m=Qi(5,null,null,0);m.elementType="DELETED",m.stateNode=l,m.return=s,l=s.deletions,l===null?(s.deletions=[m],s.flags|=16):l.push(m)}function y_(s,l){switch(s.tag){case 5:var m=s.type;return l=l.nodeType!==1||m.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(s.stateNode=l,Ii=s,Ni=xs(l.firstChild),!0):!1;case 6:return l=s.pendingProps===""||l.nodeType!==3?null:l,l!==null?(s.stateNode=l,Ii=s,Ni=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(m=ia!==null?{id:ns,overflow:rs}:null,s.memoizedState={dehydrated:l,treeContext:m,retryLane:1073741824},m=Qi(18,null,null,0),m.stateNode=l,m.return=s,s.child=m,Ii=s,Ni=null,!0):!1;default:return!1}}function Gm(s){return(s.mode&1)!==0&&(s.flags&128)===0}function Xm(s){if(qn){var l=Ni;if(l){var m=l;if(!y_(s,l)){if(Gm(s))throw Error(n(418));l=xs(m.nextSibling);var y=Ii;l&&y_(s,l)?v_(y,m):(s.flags=s.flags&-4097|2,qn=!1,Ii=s)}}else{if(Gm(s))throw Error(n(418));s.flags=s.flags&-4097|2,qn=!1,Ii=s}}}function b_(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Ii=s}function bd(s){if(s!==Ii)return!1;if(!qn)return b_(s),qn=!0,!1;var l;if((l=s.tag!==3)&&!(l=s.tag!==5)&&(l=s.type,l=l!=="head"&&l!=="body"&&!Dm(s.type,s.memoizedProps)),l&&(l=Ni)){if(Gm(s))throw __(),Error(n(418));for(;l;)v_(s,l),l=xs(l.nextSibling)}if(b_(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));e:{for(s=s.nextSibling,l=0;s;){if(s.nodeType===8){var m=s.data;if(m==="/$"){if(l===0){Ni=xs(s.nextSibling);break e}l--}else m!=="$"&&m!=="$!"&&m!=="$?"||l++}s=s.nextSibling}Ni=null}}else Ni=Ii?xs(s.stateNode.nextSibling):null;return!0}function __(){for(var s=Ni;s;)s=xs(s.nextSibling)}function il(){Ni=Ii=null,qn=!1}function Ym(s){po===null?po=[s]:po.push(s)}var g3=$.ReactCurrentBatchConfig;function bc(s,l,m){if(s=m.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(m._owner){if(m=m._owner,m){if(m.tag!==1)throw Error(n(309));var y=m.stateNode}if(!y)throw Error(n(147,s));var x=y,R=""+s;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===R?l.ref:(l=function(H){var J=x.refs;H===null?delete J[R]:J[R]=H},l._stringRef=R,l)}if(typeof s!="string")throw Error(n(284));if(!m._owner)throw Error(n(290,s))}return s}function _d(s,l){throw s=Object.prototype.toString.call(l),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s))}function S_(s){var l=s._init;return l(s._payload)}function C_(s){function l(pe,oe){if(s){var ve=pe.deletions;ve===null?(pe.deletions=[oe],pe.flags|=16):ve.push(oe)}}function m(pe,oe){if(!s)return null;for(;oe!==null;)l(pe,oe),oe=oe.sibling;return null}function y(pe,oe){for(pe=new Map;oe!==null;)oe.key!==null?pe.set(oe.key,oe):pe.set(oe.index,oe),oe=oe.sibling;return pe}function x(pe,oe){return pe=Ms(pe,oe),pe.index=0,pe.sibling=null,pe}function R(pe,oe,ve){return pe.index=ve,s?(ve=pe.alternate,ve!==null?(ve=ve.index,ve<oe?(pe.flags|=2,oe):ve):(pe.flags|=2,oe)):(pe.flags|=1048576,oe)}function H(pe){return s&&pe.alternate===null&&(pe.flags|=2),pe}function J(pe,oe,ve,Ve){return oe===null||oe.tag!==6?(oe=Hp(ve,pe.mode,Ve),oe.return=pe,oe):(oe=x(oe,ve),oe.return=pe,oe)}function ie(pe,oe,ve,Ve){var wt=ve.type;return wt===O?Be(pe,oe,ve.props.children,Ve,ve.key):oe!==null&&(oe.elementType===wt||typeof wt=="object"&&wt!==null&&wt.$$typeof===W&&S_(wt)===oe.type)?(Ve=x(oe,ve.props),Ve.ref=bc(pe,oe,ve),Ve.return=pe,Ve):(Ve=Vd(ve.type,ve.key,ve.props,null,pe.mode,Ve),Ve.ref=bc(pe,oe,ve),Ve.return=pe,Ve)}function _e(pe,oe,ve,Ve){return oe===null||oe.tag!==4||oe.stateNode.containerInfo!==ve.containerInfo||oe.stateNode.implementation!==ve.implementation?(oe=Fp(ve,pe.mode,Ve),oe.return=pe,oe):(oe=x(oe,ve.children||[]),oe.return=pe,oe)}function Be(pe,oe,ve,Ve,wt){return oe===null||oe.tag!==7?(oe=fa(ve,pe.mode,Ve,wt),oe.return=pe,oe):(oe=x(oe,ve),oe.return=pe,oe)}function Fe(pe,oe,ve){if(typeof oe=="string"&&oe!==""||typeof oe=="number")return oe=Hp(""+oe,pe.mode,ve),oe.return=pe,oe;if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case P:return ve=Vd(oe.type,oe.key,oe.props,null,pe.mode,ve),ve.ref=bc(pe,null,oe),ve.return=pe,ve;case T:return oe=Fp(oe,pe.mode,ve),oe.return=pe,oe;case W:var Ve=oe._init;return Fe(pe,Ve(oe._payload),ve)}if(ze(oe)||G(oe))return oe=fa(oe,pe.mode,ve,null),oe.return=pe,oe;_d(pe,oe)}return null}function Ne(pe,oe,ve,Ve){var wt=oe!==null?oe.key:null;if(typeof ve=="string"&&ve!==""||typeof ve=="number")return wt!==null?null:J(pe,oe,""+ve,Ve);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case P:return ve.key===wt?ie(pe,oe,ve,Ve):null;case T:return ve.key===wt?_e(pe,oe,ve,Ve):null;case W:return wt=ve._init,Ne(pe,oe,wt(ve._payload),Ve)}if(ze(ve)||G(ve))return wt!==null?null:Be(pe,oe,ve,Ve,null);_d(pe,ve)}return null}function ht(pe,oe,ve,Ve,wt){if(typeof Ve=="string"&&Ve!==""||typeof Ve=="number")return pe=pe.get(ve)||null,J(oe,pe,""+Ve,wt);if(typeof Ve=="object"&&Ve!==null){switch(Ve.$$typeof){case P:return pe=pe.get(Ve.key===null?ve:Ve.key)||null,ie(oe,pe,Ve,wt);case T:return pe=pe.get(Ve.key===null?ve:Ve.key)||null,_e(oe,pe,Ve,wt);case W:var Mt=Ve._init;return ht(pe,oe,ve,Mt(Ve._payload),wt)}if(ze(Ve)||G(Ve))return pe=pe.get(ve)||null,Be(oe,pe,Ve,wt,null);_d(oe,Ve)}return null}function Ct(pe,oe,ve,Ve){for(var wt=null,Mt=null,zt=oe,Wt=oe=0,Or=null;zt!==null&&Wt<ve.length;Wt++){zt.index>Wt?(Or=zt,zt=null):Or=zt.sibling;var Sn=Ne(pe,zt,ve[Wt],Ve);if(Sn===null){zt===null&&(zt=Or);break}s&&zt&&Sn.alternate===null&&l(pe,zt),oe=R(Sn,oe,Wt),Mt===null?wt=Sn:Mt.sibling=Sn,Mt=Sn,zt=Or}if(Wt===ve.length)return m(pe,zt),qn&&oa(pe,Wt),wt;if(zt===null){for(;Wt<ve.length;Wt++)zt=Fe(pe,ve[Wt],Ve),zt!==null&&(oe=R(zt,oe,Wt),Mt===null?wt=zt:Mt.sibling=zt,Mt=zt);return qn&&oa(pe,Wt),wt}for(zt=y(pe,zt);Wt<ve.length;Wt++)Or=ht(zt,pe,Wt,ve[Wt],Ve),Or!==null&&(s&&Or.alternate!==null&&zt.delete(Or.key===null?Wt:Or.key),oe=R(Or,oe,Wt),Mt===null?wt=Or:Mt.sibling=Or,Mt=Or);return s&&zt.forEach(function(zs){return l(pe,zs)}),qn&&oa(pe,Wt),wt}function xt(pe,oe,ve,Ve){var wt=G(ve);if(typeof wt!="function")throw Error(n(150));if(ve=wt.call(ve),ve==null)throw Error(n(151));for(var Mt=wt=null,zt=oe,Wt=oe=0,Or=null,Sn=ve.next();zt!==null&&!Sn.done;Wt++,Sn=ve.next()){zt.index>Wt?(Or=zt,zt=null):Or=zt.sibling;var zs=Ne(pe,zt,Sn.value,Ve);if(zs===null){zt===null&&(zt=Or);break}s&&zt&&zs.alternate===null&&l(pe,zt),oe=R(zs,oe,Wt),Mt===null?wt=zs:Mt.sibling=zs,Mt=zs,zt=Or}if(Sn.done)return m(pe,zt),qn&&oa(pe,Wt),wt;if(zt===null){for(;!Sn.done;Wt++,Sn=ve.next())Sn=Fe(pe,Sn.value,Ve),Sn!==null&&(oe=R(Sn,oe,Wt),Mt===null?wt=Sn:Mt.sibling=Sn,Mt=Sn);return qn&&oa(pe,Wt),wt}for(zt=y(pe,zt);!Sn.done;Wt++,Sn=ve.next())Sn=ht(zt,pe,Wt,Sn.value,Ve),Sn!==null&&(s&&Sn.alternate!==null&&zt.delete(Sn.key===null?Wt:Sn.key),oe=R(Sn,oe,Wt),Mt===null?wt=Sn:Mt.sibling=Sn,Mt=Sn);return s&&zt.forEach(function(X3){return l(pe,X3)}),qn&&oa(pe,Wt),wt}function sr(pe,oe,ve,Ve){if(typeof ve=="object"&&ve!==null&&ve.type===O&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case P:e:{for(var wt=ve.key,Mt=oe;Mt!==null;){if(Mt.key===wt){if(wt=ve.type,wt===O){if(Mt.tag===7){m(pe,Mt.sibling),oe=x(Mt,ve.props.children),oe.return=pe,pe=oe;break e}}else if(Mt.elementType===wt||typeof wt=="object"&&wt!==null&&wt.$$typeof===W&&S_(wt)===Mt.type){m(pe,Mt.sibling),oe=x(Mt,ve.props),oe.ref=bc(pe,Mt,ve),oe.return=pe,pe=oe;break e}m(pe,Mt);break}else l(pe,Mt);Mt=Mt.sibling}ve.type===O?(oe=fa(ve.props.children,pe.mode,Ve,ve.key),oe.return=pe,pe=oe):(Ve=Vd(ve.type,ve.key,ve.props,null,pe.mode,Ve),Ve.ref=bc(pe,oe,ve),Ve.return=pe,pe=Ve)}return H(pe);case T:e:{for(Mt=ve.key;oe!==null;){if(oe.key===Mt)if(oe.tag===4&&oe.stateNode.containerInfo===ve.containerInfo&&oe.stateNode.implementation===ve.implementation){m(pe,oe.sibling),oe=x(oe,ve.children||[]),oe.return=pe,pe=oe;break e}else{m(pe,oe);break}else l(pe,oe);oe=oe.sibling}oe=Fp(ve,pe.mode,Ve),oe.return=pe,pe=oe}return H(pe);case W:return Mt=ve._init,sr(pe,oe,Mt(ve._payload),Ve)}if(ze(ve))return Ct(pe,oe,ve,Ve);if(G(ve))return xt(pe,oe,ve,Ve);_d(pe,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,oe!==null&&oe.tag===6?(m(pe,oe.sibling),oe=x(oe,ve),oe.return=pe,pe=oe):(m(pe,oe),oe=Hp(ve,pe.mode,Ve),oe.return=pe,pe=oe),H(pe)):m(pe,oe)}return sr}var ol=C_(!0),x_=C_(!1),Sd=ws(null),Cd=null,sl=null,Jm=null;function Qm(){Jm=sl=Cd=null}function Zm(s){var l=Sd.current;Fn(Sd),s._currentValue=l}function ep(s,l,m){for(;s!==null;){var y=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,y!==null&&(y.childLanes|=l)):y!==null&&(y.childLanes&l)!==l&&(y.childLanes|=l),s===m)break;s=s.return}}function al(s,l){Cd=s,Jm=sl=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&l)!==0&&(Si=!0),s.firstContext=null)}function Xi(s){var l=s._currentValue;if(Jm!==s)if(s={context:s,memoizedValue:l,next:null},sl===null){if(Cd===null)throw Error(n(308));sl=s,Cd.dependencies={lanes:0,firstContext:s}}else sl=sl.next=s;return l}var sa=null;function tp(s){sa===null?sa=[s]:sa.push(s)}function w_(s,l,m,y){var x=l.interleaved;return x===null?(m.next=m,tp(l)):(m.next=x.next,x.next=m),l.interleaved=m,is(s,y)}function is(s,l){s.lanes|=l;var m=s.alternate;for(m!==null&&(m.lanes|=l),m=s,s=s.return;s!==null;)s.childLanes|=l,m=s.alternate,m!==null&&(m.childLanes|=l),m=s,s=s.return;return m.tag===3?m.stateNode:null}var $s=!1;function np(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function E_(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function os(s,l){return{eventTime:s,lane:l,tag:0,payload:null,callback:null,next:null}}function Rs(s,l,m){var y=s.updateQueue;if(y===null)return null;if(y=y.shared,(gn&2)!==0){var x=y.pending;return x===null?l.next=l:(l.next=x.next,x.next=l),y.pending=l,is(s,m)}return x=y.interleaved,x===null?(l.next=l,tp(y)):(l.next=x.next,x.next=l),y.interleaved=l,is(s,m)}function xd(s,l,m){if(l=l.updateQueue,l!==null&&(l=l.shared,(m&4194240)!==0)){var y=l.lanes;y&=s.pendingLanes,m|=y,l.lanes=m,or(s,m)}}function k_(s,l){var m=s.updateQueue,y=s.alternate;if(y!==null&&(y=y.updateQueue,m===y)){var x=null,R=null;if(m=m.firstBaseUpdate,m!==null){do{var H={eventTime:m.eventTime,lane:m.lane,tag:m.tag,payload:m.payload,callback:m.callback,next:null};R===null?x=R=H:R=R.next=H,m=m.next}while(m!==null);R===null?x=R=l:R=R.next=l}else x=R=l;m={baseState:y.baseState,firstBaseUpdate:x,lastBaseUpdate:R,shared:y.shared,effects:y.effects},s.updateQueue=m;return}s=m.lastBaseUpdate,s===null?m.firstBaseUpdate=l:s.next=l,m.lastBaseUpdate=l}function wd(s,l,m,y){var x=s.updateQueue;$s=!1;var R=x.firstBaseUpdate,H=x.lastBaseUpdate,J=x.shared.pending;if(J!==null){x.shared.pending=null;var ie=J,_e=ie.next;ie.next=null,H===null?R=_e:H.next=_e,H=ie;var Be=s.alternate;Be!==null&&(Be=Be.updateQueue,J=Be.lastBaseUpdate,J!==H&&(J===null?Be.firstBaseUpdate=_e:J.next=_e,Be.lastBaseUpdate=ie))}if(R!==null){var Fe=x.baseState;H=0,Be=_e=ie=null,J=R;do{var Ne=J.lane,ht=J.eventTime;if((y&Ne)===Ne){Be!==null&&(Be=Be.next={eventTime:ht,lane:0,tag:J.tag,payload:J.payload,callback:J.callback,next:null});e:{var Ct=s,xt=J;switch(Ne=l,ht=m,xt.tag){case 1:if(Ct=xt.payload,typeof Ct=="function"){Fe=Ct.call(ht,Fe,Ne);break e}Fe=Ct;break e;case 3:Ct.flags=Ct.flags&-65537|128;case 0:if(Ct=xt.payload,Ne=typeof Ct=="function"?Ct.call(ht,Fe,Ne):Ct,Ne==null)break e;Fe=U({},Fe,Ne);break e;case 2:$s=!0}}J.callback!==null&&J.lane!==0&&(s.flags|=64,Ne=x.effects,Ne===null?x.effects=[J]:Ne.push(J))}else ht={eventTime:ht,lane:Ne,tag:J.tag,payload:J.payload,callback:J.callback,next:null},Be===null?(_e=Be=ht,ie=Fe):Be=Be.next=ht,H|=Ne;if(J=J.next,J===null){if(J=x.shared.pending,J===null)break;Ne=J,J=Ne.next,Ne.next=null,x.lastBaseUpdate=Ne,x.shared.pending=null}}while(!0);if(Be===null&&(ie=Fe),x.baseState=ie,x.firstBaseUpdate=_e,x.lastBaseUpdate=Be,l=x.shared.interleaved,l!==null){x=l;do H|=x.lane,x=x.next;while(x!==l)}else R===null&&(x.shared.lanes=0);ca|=H,s.lanes=H,s.memoizedState=Fe}}function $_(s,l,m){if(s=l.effects,l.effects=null,s!==null)for(l=0;l<s.length;l++){var y=s[l],x=y.callback;if(x!==null){if(y.callback=null,y=m,typeof x!="function")throw Error(n(191,x));x.call(y)}}}var _c={},No=ws(_c),Sc=ws(_c),Cc=ws(_c);function aa(s){if(s===_c)throw Error(n(174));return s}function rp(s,l){switch(An(Cc,l),An(Sc,s),An(No,_c),s=l.nodeType,s){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:$t(null,"");break;default:s=s===8?l.parentNode:l,l=s.namespaceURI||null,s=s.tagName,l=$t(l,s)}Fn(No),An(No,l)}function ll(){Fn(No),Fn(Sc),Fn(Cc)}function R_(s){aa(Cc.current);var l=aa(No.current),m=$t(l,s.type);l!==m&&(An(Sc,s),An(No,m))}function ip(s){Sc.current===s&&(Fn(No),Fn(Sc))}var Gn=ws(0);function Ed(s){for(var l=s;l!==null;){if(l.tag===13){var m=l.memoizedState;if(m!==null&&(m=m.dehydrated,m===null||m.data==="$?"||m.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var op=[];function sp(){for(var s=0;s<op.length;s++)op[s]._workInProgressVersionPrimary=null;op.length=0}var kd=$.ReactCurrentDispatcher,ap=$.ReactCurrentBatchConfig,la=0,Xn=null,Sr=null,Tr=null,$d=!1,xc=!1,wc=0,v3=0;function Qr(){throw Error(n(321))}function lp(s,l){if(l===null)return!1;for(var m=0;m<l.length&&m<s.length;m++)if(!mo(s[m],l[m]))return!1;return!0}function cp(s,l,m,y,x,R){if(la=R,Xn=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,kd.current=s===null||s.memoizedState===null?S3:C3,s=m(y,x),xc){R=0;do{if(xc=!1,wc=0,25<=R)throw Error(n(301));R+=1,Tr=Sr=null,l.updateQueue=null,kd.current=x3,s=m(y,x)}while(xc)}if(kd.current=Pd,l=Sr!==null&&Sr.next!==null,la=0,Tr=Sr=Xn=null,$d=!1,l)throw Error(n(300));return s}function up(){var s=wc!==0;return wc=0,s}function Mo(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tr===null?Xn.memoizedState=Tr=s:Tr=Tr.next=s,Tr}function Yi(){if(Sr===null){var s=Xn.alternate;s=s!==null?s.memoizedState:null}else s=Sr.next;var l=Tr===null?Xn.memoizedState:Tr.next;if(l!==null)Tr=l,Sr=s;else{if(s===null)throw Error(n(310));Sr=s,s={memoizedState:Sr.memoizedState,baseState:Sr.baseState,baseQueue:Sr.baseQueue,queue:Sr.queue,next:null},Tr===null?Xn.memoizedState=Tr=s:Tr=Tr.next=s}return Tr}function Ec(s,l){return typeof l=="function"?l(s):l}function dp(s){var l=Yi(),m=l.queue;if(m===null)throw Error(n(311));m.lastRenderedReducer=s;var y=Sr,x=y.baseQueue,R=m.pending;if(R!==null){if(x!==null){var H=x.next;x.next=R.next,R.next=H}y.baseQueue=x=R,m.pending=null}if(x!==null){R=x.next,y=y.baseState;var J=H=null,ie=null,_e=R;do{var Be=_e.lane;if((la&Be)===Be)ie!==null&&(ie=ie.next={lane:0,action:_e.action,hasEagerState:_e.hasEagerState,eagerState:_e.eagerState,next:null}),y=_e.hasEagerState?_e.eagerState:s(y,_e.action);else{var Fe={lane:Be,action:_e.action,hasEagerState:_e.hasEagerState,eagerState:_e.eagerState,next:null};ie===null?(J=ie=Fe,H=y):ie=ie.next=Fe,Xn.lanes|=Be,ca|=Be}_e=_e.next}while(_e!==null&&_e!==R);ie===null?H=y:ie.next=J,mo(y,l.memoizedState)||(Si=!0),l.memoizedState=y,l.baseState=H,l.baseQueue=ie,m.lastRenderedState=y}if(s=m.interleaved,s!==null){x=s;do R=x.lane,Xn.lanes|=R,ca|=R,x=x.next;while(x!==s)}else x===null&&(m.lanes=0);return[l.memoizedState,m.dispatch]}function hp(s){var l=Yi(),m=l.queue;if(m===null)throw Error(n(311));m.lastRenderedReducer=s;var y=m.dispatch,x=m.pending,R=l.memoizedState;if(x!==null){m.pending=null;var H=x=x.next;do R=s(R,H.action),H=H.next;while(H!==x);mo(R,l.memoizedState)||(Si=!0),l.memoizedState=R,l.baseQueue===null&&(l.baseState=R),m.lastRenderedState=R}return[R,y]}function T_(){}function P_(s,l){var m=Xn,y=Yi(),x=l(),R=!mo(y.memoizedState,x);if(R&&(y.memoizedState=x,Si=!0),y=y.queue,fp(N_.bind(null,m,y,s),[s]),y.getSnapshot!==l||R||Tr!==null&&Tr.memoizedState.tag&1){if(m.flags|=2048,kc(9,I_.bind(null,m,y,x,l),void 0,null),Pr===null)throw Error(n(349));(la&30)!==0||O_(m,l,x)}return x}function O_(s,l,m){s.flags|=16384,s={getSnapshot:l,value:m},l=Xn.updateQueue,l===null?(l={lastEffect:null,stores:null},Xn.updateQueue=l,l.stores=[s]):(m=l.stores,m===null?l.stores=[s]:m.push(s))}function I_(s,l,m,y){l.value=m,l.getSnapshot=y,M_(l)&&z_(s)}function N_(s,l,m){return m(function(){M_(l)&&z_(s)})}function M_(s){var l=s.getSnapshot;s=s.value;try{var m=l();return!mo(s,m)}catch{return!0}}function z_(s){var l=is(s,1);l!==null&&bo(l,s,1,-1)}function j_(s){var l=Mo();return typeof s=="function"&&(s=s()),l.memoizedState=l.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ec,lastRenderedState:s},l.queue=s,s=s.dispatch=_3.bind(null,Xn,s),[l.memoizedState,s]}function kc(s,l,m,y){return s={tag:s,create:l,destroy:m,deps:y,next:null},l=Xn.updateQueue,l===null?(l={lastEffect:null,stores:null},Xn.updateQueue=l,l.lastEffect=s.next=s):(m=l.lastEffect,m===null?l.lastEffect=s.next=s:(y=m.next,m.next=s,s.next=y,l.lastEffect=s)),s}function B_(){return Yi().memoizedState}function Rd(s,l,m,y){var x=Mo();Xn.flags|=s,x.memoizedState=kc(1|l,m,void 0,y===void 0?null:y)}function Td(s,l,m,y){var x=Yi();y=y===void 0?null:y;var R=void 0;if(Sr!==null){var H=Sr.memoizedState;if(R=H.destroy,y!==null&&lp(y,H.deps)){x.memoizedState=kc(l,m,R,y);return}}Xn.flags|=s,x.memoizedState=kc(1|l,m,R,y)}function L_(s,l){return Rd(8390656,8,s,l)}function fp(s,l){return Td(2048,8,s,l)}function A_(s,l){return Td(4,2,s,l)}function D_(s,l){return Td(4,4,s,l)}function H_(s,l){if(typeof l=="function")return s=s(),l(s),function(){l(null)};if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function F_(s,l,m){return m=m!=null?m.concat([s]):null,Td(4,4,H_.bind(null,l,s),m)}function mp(){}function W_(s,l){var m=Yi();l=l===void 0?null:l;var y=m.memoizedState;return y!==null&&l!==null&&lp(l,y[1])?y[0]:(m.memoizedState=[s,l],s)}function V_(s,l){var m=Yi();l=l===void 0?null:l;var y=m.memoizedState;return y!==null&&l!==null&&lp(l,y[1])?y[0]:(s=s(),m.memoizedState=[s,l],s)}function q_(s,l,m){return(la&21)===0?(s.baseState&&(s.baseState=!1,Si=!0),s.memoizedState=m):(mo(m,l)||(m=dn(),Xn.lanes|=m,ca|=m,s.baseState=!0),l)}function y3(s,l){var m=qt;qt=m!==0&&4>m?m:4,s(!0);var y=ap.transition;ap.transition={};try{s(!1),l()}finally{qt=m,ap.transition=y}}function U_(){return Yi().memoizedState}function b3(s,l,m){var y=Is(s);if(m={lane:y,action:m,hasEagerState:!1,eagerState:null,next:null},K_(s))G_(l,m);else if(m=w_(s,l,m,y),m!==null){var x=li();bo(m,s,y,x),X_(m,l,y)}}function _3(s,l,m){var y=Is(s),x={lane:y,action:m,hasEagerState:!1,eagerState:null,next:null};if(K_(s))G_(l,x);else{var R=s.alternate;if(s.lanes===0&&(R===null||R.lanes===0)&&(R=l.lastRenderedReducer,R!==null))try{var H=l.lastRenderedState,J=R(H,m);if(x.hasEagerState=!0,x.eagerState=J,mo(J,H)){var ie=l.interleaved;ie===null?(x.next=x,tp(l)):(x.next=ie.next,ie.next=x),l.interleaved=x;return}}catch{}finally{}m=w_(s,l,x,y),m!==null&&(x=li(),bo(m,s,y,x),X_(m,l,y))}}function K_(s){var l=s.alternate;return s===Xn||l!==null&&l===Xn}function G_(s,l){xc=$d=!0;var m=s.pending;m===null?l.next=l:(l.next=m.next,m.next=l),s.pending=l}function X_(s,l,m){if((m&4194240)!==0){var y=l.lanes;y&=s.pendingLanes,m|=y,l.lanes=m,or(s,m)}}var Pd={readContext:Xi,useCallback:Qr,useContext:Qr,useEffect:Qr,useImperativeHandle:Qr,useInsertionEffect:Qr,useLayoutEffect:Qr,useMemo:Qr,useReducer:Qr,useRef:Qr,useState:Qr,useDebugValue:Qr,useDeferredValue:Qr,useTransition:Qr,useMutableSource:Qr,useSyncExternalStore:Qr,useId:Qr,unstable_isNewReconciler:!1},S3={readContext:Xi,useCallback:function(s,l){return Mo().memoizedState=[s,l===void 0?null:l],s},useContext:Xi,useEffect:L_,useImperativeHandle:function(s,l,m){return m=m!=null?m.concat([s]):null,Rd(4194308,4,H_.bind(null,l,s),m)},useLayoutEffect:function(s,l){return Rd(4194308,4,s,l)},useInsertionEffect:function(s,l){return Rd(4,2,s,l)},useMemo:function(s,l){var m=Mo();return l=l===void 0?null:l,s=s(),m.memoizedState=[s,l],s},useReducer:function(s,l,m){var y=Mo();return l=m!==void 0?m(l):l,y.memoizedState=y.baseState=l,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:l},y.queue=s,s=s.dispatch=b3.bind(null,Xn,s),[y.memoizedState,s]},useRef:function(s){var l=Mo();return s={current:s},l.memoizedState=s},useState:j_,useDebugValue:mp,useDeferredValue:function(s){return Mo().memoizedState=s},useTransition:function(){var s=j_(!1),l=s[0];return s=y3.bind(null,s[1]),Mo().memoizedState=s,[l,s]},useMutableSource:function(){},useSyncExternalStore:function(s,l,m){var y=Xn,x=Mo();if(qn){if(m===void 0)throw Error(n(407));m=m()}else{if(m=l(),Pr===null)throw Error(n(349));(la&30)!==0||O_(y,l,m)}x.memoizedState=m;var R={value:m,getSnapshot:l};return x.queue=R,L_(N_.bind(null,y,R,s),[s]),y.flags|=2048,kc(9,I_.bind(null,y,R,m,l),void 0,null),m},useId:function(){var s=Mo(),l=Pr.identifierPrefix;if(qn){var m=rs,y=ns;m=(y&~(1<<32-Bn(y)-1)).toString(32)+m,l=":"+l+"R"+m,m=wc++,0<m&&(l+="H"+m.toString(32)),l+=":"}else m=v3++,l=":"+l+"r"+m.toString(32)+":";return s.memoizedState=l},unstable_isNewReconciler:!1},C3={readContext:Xi,useCallback:W_,useContext:Xi,useEffect:fp,useImperativeHandle:F_,useInsertionEffect:A_,useLayoutEffect:D_,useMemo:V_,useReducer:dp,useRef:B_,useState:function(){return dp(Ec)},useDebugValue:mp,useDeferredValue:function(s){var l=Yi();return q_(l,Sr.memoizedState,s)},useTransition:function(){var s=dp(Ec)[0],l=Yi().memoizedState;return[s,l]},useMutableSource:T_,useSyncExternalStore:P_,useId:U_,unstable_isNewReconciler:!1},x3={readContext:Xi,useCallback:W_,useContext:Xi,useEffect:fp,useImperativeHandle:F_,useInsertionEffect:A_,useLayoutEffect:D_,useMemo:V_,useReducer:hp,useRef:B_,useState:function(){return hp(Ec)},useDebugValue:mp,useDeferredValue:function(s){var l=Yi();return Sr===null?l.memoizedState=s:q_(l,Sr.memoizedState,s)},useTransition:function(){var s=hp(Ec)[0],l=Yi().memoizedState;return[s,l]},useMutableSource:T_,useSyncExternalStore:P_,useId:U_,unstable_isNewReconciler:!1};function go(s,l){if(s&&s.defaultProps){l=U({},l),s=s.defaultProps;for(var m in s)l[m]===void 0&&(l[m]=s[m]);return l}return l}function pp(s,l,m,y){l=s.memoizedState,m=m(y,l),m=m==null?l:U({},l,m),s.memoizedState=m,s.lanes===0&&(s.updateQueue.baseState=m)}var Od={isMounted:function(s){return(s=s._reactInternals)?At(s)===s:!1},enqueueSetState:function(s,l,m){s=s._reactInternals;var y=li(),x=Is(s),R=os(y,x);R.payload=l,m!=null&&(R.callback=m),l=Rs(s,R,x),l!==null&&(bo(l,s,x,y),xd(l,s,x))},enqueueReplaceState:function(s,l,m){s=s._reactInternals;var y=li(),x=Is(s),R=os(y,x);R.tag=1,R.payload=l,m!=null&&(R.callback=m),l=Rs(s,R,x),l!==null&&(bo(l,s,x,y),xd(l,s,x))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var m=li(),y=Is(s),x=os(m,y);x.tag=2,l!=null&&(x.callback=l),l=Rs(s,x,y),l!==null&&(bo(l,s,y,m),xd(l,s,y))}};function Y_(s,l,m,y,x,R,H){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(y,R,H):l.prototype&&l.prototype.isPureReactComponent?!hc(m,y)||!hc(x,R):!0}function J_(s,l,m){var y=!1,x=Es,R=l.contextType;return typeof R=="object"&&R!==null?R=Xi(R):(x=_i(l)?ra:Jr.current,y=l.contextTypes,R=(y=y!=null)?tl(s,x):Es),l=new l(m,R),s.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=Od,s.stateNode=l,l._reactInternals=s,y&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=x,s.__reactInternalMemoizedMaskedChildContext=R),l}function Q_(s,l,m,y){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(m,y),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(m,y),l.state!==s&&Od.enqueueReplaceState(l,l.state,null)}function gp(s,l,m,y){var x=s.stateNode;x.props=m,x.state=s.memoizedState,x.refs={},np(s);var R=l.contextType;typeof R=="object"&&R!==null?x.context=Xi(R):(R=_i(l)?ra:Jr.current,x.context=tl(s,R)),x.state=s.memoizedState,R=l.getDerivedStateFromProps,typeof R=="function"&&(pp(s,l,R,m),x.state=s.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(l=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),l!==x.state&&Od.enqueueReplaceState(x,x.state,null),wd(s,m,x,y),x.state=s.memoizedState),typeof x.componentDidMount=="function"&&(s.flags|=4194308)}function cl(s,l){try{var m="",y=l;do m+=Z(y),y=y.return;while(y);var x=m}catch(R){x=`
39
- Error generating stack: `+R.message+`
40
- `+R.stack}return{value:s,source:l,stack:x,digest:null}}function vp(s,l,m){return{value:s,source:null,stack:m??null,digest:l??null}}function yp(s,l){try{console.error(l.value)}catch(m){setTimeout(function(){throw m})}}var w3=typeof WeakMap=="function"?WeakMap:Map;function Z_(s,l,m){m=os(-1,m),m.tag=3,m.payload={element:null};var y=l.value;return m.callback=function(){Ld||(Ld=!0,Np=y),yp(s,l)},m}function eS(s,l,m){m=os(-1,m),m.tag=3;var y=s.type.getDerivedStateFromError;if(typeof y=="function"){var x=l.value;m.payload=function(){return y(x)},m.callback=function(){yp(s,l)}}var R=s.stateNode;return R!==null&&typeof R.componentDidCatch=="function"&&(m.callback=function(){yp(s,l),typeof y!="function"&&(Ps===null?Ps=new Set([this]):Ps.add(this));var H=l.stack;this.componentDidCatch(l.value,{componentStack:H!==null?H:""})}),m}function tS(s,l,m){var y=s.pingCache;if(y===null){y=s.pingCache=new w3;var x=new Set;y.set(l,x)}else x=y.get(l),x===void 0&&(x=new Set,y.set(l,x));x.has(m)||(x.add(m),s=L3.bind(null,s,l,m),l.then(s,s))}function nS(s){do{var l;if((l=s.tag===13)&&(l=s.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return s;s=s.return}while(s!==null);return null}function rS(s,l,m,y,x){return(s.mode&1)===0?(s===l?s.flags|=65536:(s.flags|=128,m.flags|=131072,m.flags&=-52805,m.tag===1&&(m.alternate===null?m.tag=17:(l=os(-1,1),l.tag=2,Rs(m,l,1))),m.lanes|=1),s):(s.flags|=65536,s.lanes=x,s)}var E3=$.ReactCurrentOwner,Si=!1;function ai(s,l,m,y){l.child=s===null?x_(l,null,m,y):ol(l,s.child,m,y)}function iS(s,l,m,y,x){m=m.render;var R=l.ref;return al(l,x),y=cp(s,l,m,y,R,x),m=up(),s!==null&&!Si?(l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~x,ss(s,l,x)):(qn&&m&&Um(l),l.flags|=1,ai(s,l,y,x),l.child)}function oS(s,l,m,y,x){if(s===null){var R=m.type;return typeof R=="function"&&!Dp(R)&&R.defaultProps===void 0&&m.compare===null&&m.defaultProps===void 0?(l.tag=15,l.type=R,sS(s,l,R,y,x)):(s=Vd(m.type,null,y,l,l.mode,x),s.ref=l.ref,s.return=l,l.child=s)}if(R=s.child,(s.lanes&x)===0){var H=R.memoizedProps;if(m=m.compare,m=m!==null?m:hc,m(H,y)&&s.ref===l.ref)return ss(s,l,x)}return l.flags|=1,s=Ms(R,y),s.ref=l.ref,s.return=l,l.child=s}function sS(s,l,m,y,x){if(s!==null){var R=s.memoizedProps;if(hc(R,y)&&s.ref===l.ref)if(Si=!1,l.pendingProps=y=R,(s.lanes&x)!==0)(s.flags&131072)!==0&&(Si=!0);else return l.lanes=s.lanes,ss(s,l,x)}return bp(s,l,m,y,x)}function aS(s,l,m){var y=l.pendingProps,x=y.children,R=s!==null?s.memoizedState:null;if(y.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},An(dl,Mi),Mi|=m;else{if((m&1073741824)===0)return s=R!==null?R.baseLanes|m:m,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:s,cachePool:null,transitions:null},l.updateQueue=null,An(dl,Mi),Mi|=s,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},y=R!==null?R.baseLanes:m,An(dl,Mi),Mi|=y}else R!==null?(y=R.baseLanes|m,l.memoizedState=null):y=m,An(dl,Mi),Mi|=y;return ai(s,l,x,m),l.child}function lS(s,l){var m=l.ref;(s===null&&m!==null||s!==null&&s.ref!==m)&&(l.flags|=512,l.flags|=2097152)}function bp(s,l,m,y,x){var R=_i(m)?ra:Jr.current;return R=tl(l,R),al(l,x),m=cp(s,l,m,y,R,x),y=up(),s!==null&&!Si?(l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~x,ss(s,l,x)):(qn&&y&&Um(l),l.flags|=1,ai(s,l,m,x),l.child)}function cS(s,l,m,y,x){if(_i(m)){var R=!0;pd(l)}else R=!1;if(al(l,x),l.stateNode===null)Nd(s,l),J_(l,m,y),gp(l,m,y,x),y=!0;else if(s===null){var H=l.stateNode,J=l.memoizedProps;H.props=J;var ie=H.context,_e=m.contextType;typeof _e=="object"&&_e!==null?_e=Xi(_e):(_e=_i(m)?ra:Jr.current,_e=tl(l,_e));var Be=m.getDerivedStateFromProps,Fe=typeof Be=="function"||typeof H.getSnapshotBeforeUpdate=="function";Fe||typeof H.UNSAFE_componentWillReceiveProps!="function"&&typeof H.componentWillReceiveProps!="function"||(J!==y||ie!==_e)&&Q_(l,H,y,_e),$s=!1;var Ne=l.memoizedState;H.state=Ne,wd(l,y,H,x),ie=l.memoizedState,J!==y||Ne!==ie||bi.current||$s?(typeof Be=="function"&&(pp(l,m,Be,y),ie=l.memoizedState),(J=$s||Y_(l,m,J,y,Ne,ie,_e))?(Fe||typeof H.UNSAFE_componentWillMount!="function"&&typeof H.componentWillMount!="function"||(typeof H.componentWillMount=="function"&&H.componentWillMount(),typeof H.UNSAFE_componentWillMount=="function"&&H.UNSAFE_componentWillMount()),typeof H.componentDidMount=="function"&&(l.flags|=4194308)):(typeof H.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=y,l.memoizedState=ie),H.props=y,H.state=ie,H.context=_e,y=J):(typeof H.componentDidMount=="function"&&(l.flags|=4194308),y=!1)}else{H=l.stateNode,E_(s,l),J=l.memoizedProps,_e=l.type===l.elementType?J:go(l.type,J),H.props=_e,Fe=l.pendingProps,Ne=H.context,ie=m.contextType,typeof ie=="object"&&ie!==null?ie=Xi(ie):(ie=_i(m)?ra:Jr.current,ie=tl(l,ie));var ht=m.getDerivedStateFromProps;(Be=typeof ht=="function"||typeof H.getSnapshotBeforeUpdate=="function")||typeof H.UNSAFE_componentWillReceiveProps!="function"&&typeof H.componentWillReceiveProps!="function"||(J!==Fe||Ne!==ie)&&Q_(l,H,y,ie),$s=!1,Ne=l.memoizedState,H.state=Ne,wd(l,y,H,x);var Ct=l.memoizedState;J!==Fe||Ne!==Ct||bi.current||$s?(typeof ht=="function"&&(pp(l,m,ht,y),Ct=l.memoizedState),(_e=$s||Y_(l,m,_e,y,Ne,Ct,ie)||!1)?(Be||typeof H.UNSAFE_componentWillUpdate!="function"&&typeof H.componentWillUpdate!="function"||(typeof H.componentWillUpdate=="function"&&H.componentWillUpdate(y,Ct,ie),typeof H.UNSAFE_componentWillUpdate=="function"&&H.UNSAFE_componentWillUpdate(y,Ct,ie)),typeof H.componentDidUpdate=="function"&&(l.flags|=4),typeof H.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof H.componentDidUpdate!="function"||J===s.memoizedProps&&Ne===s.memoizedState||(l.flags|=4),typeof H.getSnapshotBeforeUpdate!="function"||J===s.memoizedProps&&Ne===s.memoizedState||(l.flags|=1024),l.memoizedProps=y,l.memoizedState=Ct),H.props=y,H.state=Ct,H.context=ie,y=_e):(typeof H.componentDidUpdate!="function"||J===s.memoizedProps&&Ne===s.memoizedState||(l.flags|=4),typeof H.getSnapshotBeforeUpdate!="function"||J===s.memoizedProps&&Ne===s.memoizedState||(l.flags|=1024),y=!1)}return _p(s,l,m,y,R,x)}function _p(s,l,m,y,x,R){lS(s,l);var H=(l.flags&128)!==0;if(!y&&!H)return x&&m_(l,m,!1),ss(s,l,R);y=l.stateNode,E3.current=l;var J=H&&typeof m.getDerivedStateFromError!="function"?null:y.render();return l.flags|=1,s!==null&&H?(l.child=ol(l,s.child,null,R),l.child=ol(l,null,J,R)):ai(s,l,J,R),l.memoizedState=y.state,x&&m_(l,m,!0),l.child}function uS(s){var l=s.stateNode;l.pendingContext?h_(s,l.pendingContext,l.pendingContext!==l.context):l.context&&h_(s,l.context,!1),rp(s,l.containerInfo)}function dS(s,l,m,y,x){return il(),Ym(x),l.flags|=256,ai(s,l,m,y),l.child}var Sp={dehydrated:null,treeContext:null,retryLane:0};function Cp(s){return{baseLanes:s,cachePool:null,transitions:null}}function hS(s,l,m){var y=l.pendingProps,x=Gn.current,R=!1,H=(l.flags&128)!==0,J;if((J=H)||(J=s!==null&&s.memoizedState===null?!1:(x&2)!==0),J?(R=!0,l.flags&=-129):(s===null||s.memoizedState!==null)&&(x|=1),An(Gn,x&1),s===null)return Xm(l),s=l.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((l.mode&1)===0?l.lanes=1:s.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(H=y.children,s=y.fallback,R?(y=l.mode,R=l.child,H={mode:"hidden",children:H},(y&1)===0&&R!==null?(R.childLanes=0,R.pendingProps=H):R=qd(H,y,0,null),s=fa(s,y,m,null),R.return=l,s.return=l,R.sibling=s,l.child=R,l.child.memoizedState=Cp(m),l.memoizedState=Sp,s):xp(l,H));if(x=s.memoizedState,x!==null&&(J=x.dehydrated,J!==null))return k3(s,l,H,y,J,x,m);if(R){R=y.fallback,H=l.mode,x=s.child,J=x.sibling;var ie={mode:"hidden",children:y.children};return(H&1)===0&&l.child!==x?(y=l.child,y.childLanes=0,y.pendingProps=ie,l.deletions=null):(y=Ms(x,ie),y.subtreeFlags=x.subtreeFlags&14680064),J!==null?R=Ms(J,R):(R=fa(R,H,m,null),R.flags|=2),R.return=l,y.return=l,y.sibling=R,l.child=y,y=R,R=l.child,H=s.child.memoizedState,H=H===null?Cp(m):{baseLanes:H.baseLanes|m,cachePool:null,transitions:H.transitions},R.memoizedState=H,R.childLanes=s.childLanes&~m,l.memoizedState=Sp,y}return R=s.child,s=R.sibling,y=Ms(R,{mode:"visible",children:y.children}),(l.mode&1)===0&&(y.lanes=m),y.return=l,y.sibling=null,s!==null&&(m=l.deletions,m===null?(l.deletions=[s],l.flags|=16):m.push(s)),l.child=y,l.memoizedState=null,y}function xp(s,l){return l=qd({mode:"visible",children:l},s.mode,0,null),l.return=s,s.child=l}function Id(s,l,m,y){return y!==null&&Ym(y),ol(l,s.child,null,m),s=xp(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function k3(s,l,m,y,x,R,H){if(m)return l.flags&256?(l.flags&=-257,y=vp(Error(n(422))),Id(s,l,H,y)):l.memoizedState!==null?(l.child=s.child,l.flags|=128,null):(R=y.fallback,x=l.mode,y=qd({mode:"visible",children:y.children},x,0,null),R=fa(R,x,H,null),R.flags|=2,y.return=l,R.return=l,y.sibling=R,l.child=y,(l.mode&1)!==0&&ol(l,s.child,null,H),l.child.memoizedState=Cp(H),l.memoizedState=Sp,R);if((l.mode&1)===0)return Id(s,l,H,null);if(x.data==="$!"){if(y=x.nextSibling&&x.nextSibling.dataset,y)var J=y.dgst;return y=J,R=Error(n(419)),y=vp(R,y,void 0),Id(s,l,H,y)}if(J=(H&s.childLanes)!==0,Si||J){if(y=Pr,y!==null){switch(H&-H){case 4:x=2;break;case 16:x=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:x=32;break;case 536870912:x=268435456;break;default:x=0}x=(x&(y.suspendedLanes|H))!==0?0:x,x!==0&&x!==R.retryLane&&(R.retryLane=x,is(s,x),bo(y,s,x,-1))}return Ap(),y=vp(Error(n(421))),Id(s,l,H,y)}return x.data==="$?"?(l.flags|=128,l.child=s.child,l=A3.bind(null,s),x._reactRetry=l,null):(s=R.treeContext,Ni=xs(x.nextSibling),Ii=l,qn=!0,po=null,s!==null&&(Ki[Gi++]=ns,Ki[Gi++]=rs,Ki[Gi++]=ia,ns=s.id,rs=s.overflow,ia=l),l=xp(l,y.children),l.flags|=4096,l)}function fS(s,l,m){s.lanes|=l;var y=s.alternate;y!==null&&(y.lanes|=l),ep(s.return,l,m)}function wp(s,l,m,y,x){var R=s.memoizedState;R===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:y,tail:m,tailMode:x}:(R.isBackwards=l,R.rendering=null,R.renderingStartTime=0,R.last=y,R.tail=m,R.tailMode=x)}function mS(s,l,m){var y=l.pendingProps,x=y.revealOrder,R=y.tail;if(ai(s,l,y.children,m),y=Gn.current,(y&2)!==0)y=y&1|2,l.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&fS(s,m,l);else if(s.tag===19)fS(s,m,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}y&=1}if(An(Gn,y),(l.mode&1)===0)l.memoizedState=null;else switch(x){case"forwards":for(m=l.child,x=null;m!==null;)s=m.alternate,s!==null&&Ed(s)===null&&(x=m),m=m.sibling;m=x,m===null?(x=l.child,l.child=null):(x=m.sibling,m.sibling=null),wp(l,!1,x,m,R);break;case"backwards":for(m=null,x=l.child,l.child=null;x!==null;){if(s=x.alternate,s!==null&&Ed(s)===null){l.child=x;break}s=x.sibling,x.sibling=m,m=x,x=s}wp(l,!0,m,null,R);break;case"together":wp(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function Nd(s,l){(l.mode&1)===0&&s!==null&&(s.alternate=null,l.alternate=null,l.flags|=2)}function ss(s,l,m){if(s!==null&&(l.dependencies=s.dependencies),ca|=l.lanes,(m&l.childLanes)===0)return null;if(s!==null&&l.child!==s.child)throw Error(n(153));if(l.child!==null){for(s=l.child,m=Ms(s,s.pendingProps),l.child=m,m.return=l;s.sibling!==null;)s=s.sibling,m=m.sibling=Ms(s,s.pendingProps),m.return=l;m.sibling=null}return l.child}function $3(s,l,m){switch(l.tag){case 3:uS(l),il();break;case 5:R_(l);break;case 1:_i(l.type)&&pd(l);break;case 4:rp(l,l.stateNode.containerInfo);break;case 10:var y=l.type._context,x=l.memoizedProps.value;An(Sd,y._currentValue),y._currentValue=x;break;case 13:if(y=l.memoizedState,y!==null)return y.dehydrated!==null?(An(Gn,Gn.current&1),l.flags|=128,null):(m&l.child.childLanes)!==0?hS(s,l,m):(An(Gn,Gn.current&1),s=ss(s,l,m),s!==null?s.sibling:null);An(Gn,Gn.current&1);break;case 19:if(y=(m&l.childLanes)!==0,(s.flags&128)!==0){if(y)return mS(s,l,m);l.flags|=128}if(x=l.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),An(Gn,Gn.current),y)break;return null;case 22:case 23:return l.lanes=0,aS(s,l,m)}return ss(s,l,m)}var pS,Ep,gS,vS;pS=function(s,l){for(var m=l.child;m!==null;){if(m.tag===5||m.tag===6)s.appendChild(m.stateNode);else if(m.tag!==4&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===l)break;for(;m.sibling===null;){if(m.return===null||m.return===l)return;m=m.return}m.sibling.return=m.return,m=m.sibling}},Ep=function(){},gS=function(s,l,m,y){var x=s.memoizedProps;if(x!==y){s=l.stateNode,aa(No.current);var R=null;switch(m){case"input":x=ye(s,x),y=ye(s,y),R=[];break;case"select":x=U({},x,{value:void 0}),y=U({},y,{value:void 0}),R=[];break;case"textarea":x=ke(s,x),y=ke(s,y),R=[];break;default:typeof x.onClick!="function"&&typeof y.onClick=="function"&&(s.onclick=hd)}Me(m,y);var H;m=null;for(_e in x)if(!y.hasOwnProperty(_e)&&x.hasOwnProperty(_e)&&x[_e]!=null)if(_e==="style"){var J=x[_e];for(H in J)J.hasOwnProperty(H)&&(m||(m={}),m[H]="")}else _e!=="dangerouslySetInnerHTML"&&_e!=="children"&&_e!=="suppressContentEditableWarning"&&_e!=="suppressHydrationWarning"&&_e!=="autoFocus"&&(i.hasOwnProperty(_e)?R||(R=[]):(R=R||[]).push(_e,null));for(_e in y){var ie=y[_e];if(J=x!=null?x[_e]:void 0,y.hasOwnProperty(_e)&&ie!==J&&(ie!=null||J!=null))if(_e==="style")if(J){for(H in J)!J.hasOwnProperty(H)||ie&&ie.hasOwnProperty(H)||(m||(m={}),m[H]="");for(H in ie)ie.hasOwnProperty(H)&&J[H]!==ie[H]&&(m||(m={}),m[H]=ie[H])}else m||(R||(R=[]),R.push(_e,m)),m=ie;else _e==="dangerouslySetInnerHTML"?(ie=ie?ie.__html:void 0,J=J?J.__html:void 0,ie!=null&&J!==ie&&(R=R||[]).push(_e,ie)):_e==="children"?typeof ie!="string"&&typeof ie!="number"||(R=R||[]).push(_e,""+ie):_e!=="suppressContentEditableWarning"&&_e!=="suppressHydrationWarning"&&(i.hasOwnProperty(_e)?(ie!=null&&_e==="onScroll"&&Hn("scroll",s),R||J===ie||(R=[])):(R=R||[]).push(_e,ie))}m&&(R=R||[]).push("style",m);var _e=R;(l.updateQueue=_e)&&(l.flags|=4)}},vS=function(s,l,m,y){m!==y&&(l.flags|=4)};function $c(s,l){if(!qn)switch(s.tailMode){case"hidden":l=s.tail;for(var m=null;l!==null;)l.alternate!==null&&(m=l),l=l.sibling;m===null?s.tail=null:m.sibling=null;break;case"collapsed":m=s.tail;for(var y=null;m!==null;)m.alternate!==null&&(y=m),m=m.sibling;y===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:y.sibling=null}}function Zr(s){var l=s.alternate!==null&&s.alternate.child===s.child,m=0,y=0;if(l)for(var x=s.child;x!==null;)m|=x.lanes|x.childLanes,y|=x.subtreeFlags&14680064,y|=x.flags&14680064,x.return=s,x=x.sibling;else for(x=s.child;x!==null;)m|=x.lanes|x.childLanes,y|=x.subtreeFlags,y|=x.flags,x.return=s,x=x.sibling;return s.subtreeFlags|=y,s.childLanes=m,l}function R3(s,l,m){var y=l.pendingProps;switch(Km(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zr(l),null;case 1:return _i(l.type)&&md(),Zr(l),null;case 3:return y=l.stateNode,ll(),Fn(bi),Fn(Jr),sp(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(s===null||s.child===null)&&(bd(l)?l.flags|=4:s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,po!==null&&(jp(po),po=null))),Ep(s,l),Zr(l),null;case 5:ip(l);var x=aa(Cc.current);if(m=l.type,s!==null&&l.stateNode!=null)gS(s,l,m,y,x),s.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!y){if(l.stateNode===null)throw Error(n(166));return Zr(l),null}if(s=aa(No.current),bd(l)){y=l.stateNode,m=l.type;var R=l.memoizedProps;switch(y[Io]=l,y[vc]=R,s=(l.mode&1)!==0,m){case"dialog":Hn("cancel",y),Hn("close",y);break;case"iframe":case"object":case"embed":Hn("load",y);break;case"video":case"audio":for(x=0;x<mc.length;x++)Hn(mc[x],y);break;case"source":Hn("error",y);break;case"img":case"image":case"link":Hn("error",y),Hn("load",y);break;case"details":Hn("toggle",y);break;case"input":me(y,R),Hn("invalid",y);break;case"select":y._wrapperState={wasMultiple:!!R.multiple},Hn("invalid",y);break;case"textarea":je(y,R),Hn("invalid",y)}Me(m,R),x=null;for(var H in R)if(R.hasOwnProperty(H)){var J=R[H];H==="children"?typeof J=="string"?y.textContent!==J&&(R.suppressHydrationWarning!==!0&&dd(y.textContent,J,s),x=["children",J]):typeof J=="number"&&y.textContent!==""+J&&(R.suppressHydrationWarning!==!0&&dd(y.textContent,J,s),x=["children",""+J]):i.hasOwnProperty(H)&&J!=null&&H==="onScroll"&&Hn("scroll",y)}switch(m){case"input":ae(y),xe(y,R,!0);break;case"textarea":ae(y),Qe(y);break;case"select":case"option":break;default:typeof R.onClick=="function"&&(y.onclick=hd)}y=x,l.updateQueue=y,y!==null&&(l.flags|=4)}else{H=x.nodeType===9?x:x.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=at(m)),s==="http://www.w3.org/1999/xhtml"?m==="script"?(s=H.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof y.is=="string"?s=H.createElement(m,{is:y.is}):(s=H.createElement(m),m==="select"&&(H=s,y.multiple?H.multiple=!0:y.size&&(H.size=y.size))):s=H.createElementNS(s,m),s[Io]=l,s[vc]=y,pS(s,l,!1,!1),l.stateNode=s;e:{switch(H=Ue(m,y),m){case"dialog":Hn("cancel",s),Hn("close",s),x=y;break;case"iframe":case"object":case"embed":Hn("load",s),x=y;break;case"video":case"audio":for(x=0;x<mc.length;x++)Hn(mc[x],s);x=y;break;case"source":Hn("error",s),x=y;break;case"img":case"image":case"link":Hn("error",s),Hn("load",s),x=y;break;case"details":Hn("toggle",s),x=y;break;case"input":me(s,y),x=ye(s,y),Hn("invalid",s);break;case"option":x=y;break;case"select":s._wrapperState={wasMultiple:!!y.multiple},x=U({},y,{value:void 0}),Hn("invalid",s);break;case"textarea":je(s,y),x=ke(s,y),Hn("invalid",s);break;default:x=y}Me(m,x),J=x;for(R in J)if(J.hasOwnProperty(R)){var ie=J[R];R==="style"?Le(s,ie):R==="dangerouslySetInnerHTML"?(ie=ie?ie.__html:void 0,ie!=null&&Je(s,ie)):R==="children"?typeof ie=="string"?(m!=="textarea"||ie!=="")&&ft(s,ie):typeof ie=="number"&&ft(s,""+ie):R!=="suppressContentEditableWarning"&&R!=="suppressHydrationWarning"&&R!=="autoFocus"&&(i.hasOwnProperty(R)?ie!=null&&R==="onScroll"&&Hn("scroll",s):ie!=null&&k(s,R,ie,H))}switch(m){case"input":ae(s),xe(s,y,!1);break;case"textarea":ae(s),Qe(s);break;case"option":y.value!=null&&s.setAttribute("value",""+fe(y.value));break;case"select":s.multiple=!!y.multiple,R=y.value,R!=null?Ee(s,!!y.multiple,R,!1):y.defaultValue!=null&&Ee(s,!!y.multiple,y.defaultValue,!0);break;default:typeof x.onClick=="function"&&(s.onclick=hd)}switch(m){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}}y&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return Zr(l),null;case 6:if(s&&l.stateNode!=null)vS(s,l,s.memoizedProps,y);else{if(typeof y!="string"&&l.stateNode===null)throw Error(n(166));if(m=aa(Cc.current),aa(No.current),bd(l)){if(y=l.stateNode,m=l.memoizedProps,y[Io]=l,(R=y.nodeValue!==m)&&(s=Ii,s!==null))switch(s.tag){case 3:dd(y.nodeValue,m,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&dd(y.nodeValue,m,(s.mode&1)!==0)}R&&(l.flags|=4)}else y=(m.nodeType===9?m:m.ownerDocument).createTextNode(y),y[Io]=l,l.stateNode=y}return Zr(l),null;case 13:if(Fn(Gn),y=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(qn&&Ni!==null&&(l.mode&1)!==0&&(l.flags&128)===0)__(),il(),l.flags|=98560,R=!1;else if(R=bd(l),y!==null&&y.dehydrated!==null){if(s===null){if(!R)throw Error(n(318));if(R=l.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(n(317));R[Io]=l}else il(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Zr(l),R=!1}else po!==null&&(jp(po),po=null),R=!0;if(!R)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=m,l):(y=y!==null,y!==(s!==null&&s.memoizedState!==null)&&y&&(l.child.flags|=8192,(l.mode&1)!==0&&(s===null||(Gn.current&1)!==0?Cr===0&&(Cr=3):Ap())),l.updateQueue!==null&&(l.flags|=4),Zr(l),null);case 4:return ll(),Ep(s,l),s===null&&pc(l.stateNode.containerInfo),Zr(l),null;case 10:return Zm(l.type._context),Zr(l),null;case 17:return _i(l.type)&&md(),Zr(l),null;case 19:if(Fn(Gn),R=l.memoizedState,R===null)return Zr(l),null;if(y=(l.flags&128)!==0,H=R.rendering,H===null)if(y)$c(R,!1);else{if(Cr!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(H=Ed(s),H!==null){for(l.flags|=128,$c(R,!1),y=H.updateQueue,y!==null&&(l.updateQueue=y,l.flags|=4),l.subtreeFlags=0,y=m,m=l.child;m!==null;)R=m,s=y,R.flags&=14680066,H=R.alternate,H===null?(R.childLanes=0,R.lanes=s,R.child=null,R.subtreeFlags=0,R.memoizedProps=null,R.memoizedState=null,R.updateQueue=null,R.dependencies=null,R.stateNode=null):(R.childLanes=H.childLanes,R.lanes=H.lanes,R.child=H.child,R.subtreeFlags=0,R.deletions=null,R.memoizedProps=H.memoizedProps,R.memoizedState=H.memoizedState,R.updateQueue=H.updateQueue,R.type=H.type,s=H.dependencies,R.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),m=m.sibling;return An(Gn,Gn.current&1|2),l.child}s=s.sibling}R.tail!==null&&gt()>hl&&(l.flags|=128,y=!0,$c(R,!1),l.lanes=4194304)}else{if(!y)if(s=Ed(H),s!==null){if(l.flags|=128,y=!0,m=s.updateQueue,m!==null&&(l.updateQueue=m,l.flags|=4),$c(R,!0),R.tail===null&&R.tailMode==="hidden"&&!H.alternate&&!qn)return Zr(l),null}else 2*gt()-R.renderingStartTime>hl&&m!==1073741824&&(l.flags|=128,y=!0,$c(R,!1),l.lanes=4194304);R.isBackwards?(H.sibling=l.child,l.child=H):(m=R.last,m!==null?m.sibling=H:l.child=H,R.last=H)}return R.tail!==null?(l=R.tail,R.rendering=l,R.tail=l.sibling,R.renderingStartTime=gt(),l.sibling=null,m=Gn.current,An(Gn,y?m&1|2:m&1),l):(Zr(l),null);case 22:case 23:return Lp(),y=l.memoizedState!==null,s!==null&&s.memoizedState!==null!==y&&(l.flags|=8192),y&&(l.mode&1)!==0?(Mi&1073741824)!==0&&(Zr(l),l.subtreeFlags&6&&(l.flags|=8192)):Zr(l),null;case 24:return null;case 25:return null}throw Error(n(156,l.tag))}function T3(s,l){switch(Km(l),l.tag){case 1:return _i(l.type)&&md(),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return ll(),Fn(bi),Fn(Jr),sp(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 5:return ip(l),null;case 13:if(Fn(Gn),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(n(340));il()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return Fn(Gn),null;case 4:return ll(),null;case 10:return Zm(l.type._context),null;case 22:case 23:return Lp(),null;case 24:return null;default:return null}}var Md=!1,ei=!1,P3=typeof WeakSet=="function"?WeakSet:Set,bt=null;function ul(s,l){var m=s.ref;if(m!==null)if(typeof m=="function")try{m(null)}catch(y){tr(s,l,y)}else m.current=null}function kp(s,l,m){try{m()}catch(y){tr(s,l,y)}}var yS=!1;function O3(s,l){if(Lm=ed,s=Yb(),Pm(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var y=m.getSelection&&m.getSelection();if(y&&y.rangeCount!==0){m=y.anchorNode;var x=y.anchorOffset,R=y.focusNode;y=y.focusOffset;try{m.nodeType,R.nodeType}catch{m=null;break e}var H=0,J=-1,ie=-1,_e=0,Be=0,Fe=s,Ne=null;t:for(;;){for(var ht;Fe!==m||x!==0&&Fe.nodeType!==3||(J=H+x),Fe!==R||y!==0&&Fe.nodeType!==3||(ie=H+y),Fe.nodeType===3&&(H+=Fe.nodeValue.length),(ht=Fe.firstChild)!==null;)Ne=Fe,Fe=ht;for(;;){if(Fe===s)break t;if(Ne===m&&++_e===x&&(J=H),Ne===R&&++Be===y&&(ie=H),(ht=Fe.nextSibling)!==null)break;Fe=Ne,Ne=Fe.parentNode}Fe=ht}m=J===-1||ie===-1?null:{start:J,end:ie}}else m=null}m=m||{start:0,end:0}}else m=null;for(Am={focusedElem:s,selectionRange:m},ed=!1,bt=l;bt!==null;)if(l=bt,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,bt=s;else for(;bt!==null;){l=bt;try{var Ct=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(Ct!==null){var xt=Ct.memoizedProps,sr=Ct.memoizedState,pe=l.stateNode,oe=pe.getSnapshotBeforeUpdate(l.elementType===l.type?xt:go(l.type,xt),sr);pe.__reactInternalSnapshotBeforeUpdate=oe}break;case 3:var ve=l.stateNode.containerInfo;ve.nodeType===1?ve.textContent="":ve.nodeType===9&&ve.documentElement&&ve.removeChild(ve.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Ve){tr(l,l.return,Ve)}if(s=l.sibling,s!==null){s.return=l.return,bt=s;break}bt=l.return}return Ct=yS,yS=!1,Ct}function Rc(s,l,m){var y=l.updateQueue;if(y=y!==null?y.lastEffect:null,y!==null){var x=y=y.next;do{if((x.tag&s)===s){var R=x.destroy;x.destroy=void 0,R!==void 0&&kp(l,m,R)}x=x.next}while(x!==y)}}function zd(s,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var m=l=l.next;do{if((m.tag&s)===s){var y=m.create;m.destroy=y()}m=m.next}while(m!==l)}}function $p(s){var l=s.ref;if(l!==null){var m=s.stateNode;switch(s.tag){case 5:s=m;break;default:s=m}typeof l=="function"?l(s):l.current=s}}function bS(s){var l=s.alternate;l!==null&&(s.alternate=null,bS(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&(delete l[Io],delete l[vc],delete l[Wm],delete l[f3],delete l[m3])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function _S(s){return s.tag===5||s.tag===3||s.tag===4}function SS(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||_S(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Rp(s,l,m){var y=s.tag;if(y===5||y===6)s=s.stateNode,l?m.nodeType===8?m.parentNode.insertBefore(s,l):m.insertBefore(s,l):(m.nodeType===8?(l=m.parentNode,l.insertBefore(s,m)):(l=m,l.appendChild(s)),m=m._reactRootContainer,m!=null||l.onclick!==null||(l.onclick=hd));else if(y!==4&&(s=s.child,s!==null))for(Rp(s,l,m),s=s.sibling;s!==null;)Rp(s,l,m),s=s.sibling}function Tp(s,l,m){var y=s.tag;if(y===5||y===6)s=s.stateNode,l?m.insertBefore(s,l):m.appendChild(s);else if(y!==4&&(s=s.child,s!==null))for(Tp(s,l,m),s=s.sibling;s!==null;)Tp(s,l,m),s=s.sibling}var Hr=null,vo=!1;function Ts(s,l,m){for(m=m.child;m!==null;)CS(s,l,m),m=m.sibling}function CS(s,l,m){if(pn&&typeof pn.onCommitFiberUnmount=="function")try{pn.onCommitFiberUnmount(Nt,m)}catch{}switch(m.tag){case 5:ei||ul(m,l);case 6:var y=Hr,x=vo;Hr=null,Ts(s,l,m),Hr=y,vo=x,Hr!==null&&(vo?(s=Hr,m=m.stateNode,s.nodeType===8?s.parentNode.removeChild(m):s.removeChild(m)):Hr.removeChild(m.stateNode));break;case 18:Hr!==null&&(vo?(s=Hr,m=m.stateNode,s.nodeType===8?Fm(s.parentNode,m):s.nodeType===1&&Fm(s,m),_s(s)):Fm(Hr,m.stateNode));break;case 4:y=Hr,x=vo,Hr=m.stateNode.containerInfo,vo=!0,Ts(s,l,m),Hr=y,vo=x;break;case 0:case 11:case 14:case 15:if(!ei&&(y=m.updateQueue,y!==null&&(y=y.lastEffect,y!==null))){x=y=y.next;do{var R=x,H=R.destroy;R=R.tag,H!==void 0&&((R&2)!==0||(R&4)!==0)&&kp(m,l,H),x=x.next}while(x!==y)}Ts(s,l,m);break;case 1:if(!ei&&(ul(m,l),y=m.stateNode,typeof y.componentWillUnmount=="function"))try{y.props=m.memoizedProps,y.state=m.memoizedState,y.componentWillUnmount()}catch(J){tr(m,l,J)}Ts(s,l,m);break;case 21:Ts(s,l,m);break;case 22:m.mode&1?(ei=(y=ei)||m.memoizedState!==null,Ts(s,l,m),ei=y):Ts(s,l,m);break;default:Ts(s,l,m)}}function xS(s){var l=s.updateQueue;if(l!==null){s.updateQueue=null;var m=s.stateNode;m===null&&(m=s.stateNode=new P3),l.forEach(function(y){var x=D3.bind(null,s,y);m.has(y)||(m.add(y),y.then(x,x))})}}function yo(s,l){var m=l.deletions;if(m!==null)for(var y=0;y<m.length;y++){var x=m[y];try{var R=s,H=l,J=H;e:for(;J!==null;){switch(J.tag){case 5:Hr=J.stateNode,vo=!1;break e;case 3:Hr=J.stateNode.containerInfo,vo=!0;break e;case 4:Hr=J.stateNode.containerInfo,vo=!0;break e}J=J.return}if(Hr===null)throw Error(n(160));CS(R,H,x),Hr=null,vo=!1;var ie=x.alternate;ie!==null&&(ie.return=null),x.return=null}catch(_e){tr(x,l,_e)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)wS(l,s),l=l.sibling}function wS(s,l){var m=s.alternate,y=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(yo(l,s),zo(s),y&4){try{Rc(3,s,s.return),zd(3,s)}catch(xt){tr(s,s.return,xt)}try{Rc(5,s,s.return)}catch(xt){tr(s,s.return,xt)}}break;case 1:yo(l,s),zo(s),y&512&&m!==null&&ul(m,m.return);break;case 5:if(yo(l,s),zo(s),y&512&&m!==null&&ul(m,m.return),s.flags&32){var x=s.stateNode;try{ft(x,"")}catch(xt){tr(s,s.return,xt)}}if(y&4&&(x=s.stateNode,x!=null)){var R=s.memoizedProps,H=m!==null?m.memoizedProps:R,J=s.type,ie=s.updateQueue;if(s.updateQueue=null,ie!==null)try{J==="input"&&R.type==="radio"&&R.name!=null&&de(x,R),Ue(J,H);var _e=Ue(J,R);for(H=0;H<ie.length;H+=2){var Be=ie[H],Fe=ie[H+1];Be==="style"?Le(x,Fe):Be==="dangerouslySetInnerHTML"?Je(x,Fe):Be==="children"?ft(x,Fe):k(x,Be,Fe,_e)}switch(J){case"input":be(x,R);break;case"textarea":Oe(x,R);break;case"select":var Ne=x._wrapperState.wasMultiple;x._wrapperState.wasMultiple=!!R.multiple;var ht=R.value;ht!=null?Ee(x,!!R.multiple,ht,!1):Ne!==!!R.multiple&&(R.defaultValue!=null?Ee(x,!!R.multiple,R.defaultValue,!0):Ee(x,!!R.multiple,R.multiple?[]:"",!1))}x[vc]=R}catch(xt){tr(s,s.return,xt)}}break;case 6:if(yo(l,s),zo(s),y&4){if(s.stateNode===null)throw Error(n(162));x=s.stateNode,R=s.memoizedProps;try{x.nodeValue=R}catch(xt){tr(s,s.return,xt)}}break;case 3:if(yo(l,s),zo(s),y&4&&m!==null&&m.memoizedState.isDehydrated)try{_s(l.containerInfo)}catch(xt){tr(s,s.return,xt)}break;case 4:yo(l,s),zo(s);break;case 13:yo(l,s),zo(s),x=s.child,x.flags&8192&&(R=x.memoizedState!==null,x.stateNode.isHidden=R,!R||x.alternate!==null&&x.alternate.memoizedState!==null||(Ip=gt())),y&4&&xS(s);break;case 22:if(Be=m!==null&&m.memoizedState!==null,s.mode&1?(ei=(_e=ei)||Be,yo(l,s),ei=_e):yo(l,s),zo(s),y&8192){if(_e=s.memoizedState!==null,(s.stateNode.isHidden=_e)&&!Be&&(s.mode&1)!==0)for(bt=s,Be=s.child;Be!==null;){for(Fe=bt=Be;bt!==null;){switch(Ne=bt,ht=Ne.child,Ne.tag){case 0:case 11:case 14:case 15:Rc(4,Ne,Ne.return);break;case 1:ul(Ne,Ne.return);var Ct=Ne.stateNode;if(typeof Ct.componentWillUnmount=="function"){y=Ne,m=Ne.return;try{l=y,Ct.props=l.memoizedProps,Ct.state=l.memoizedState,Ct.componentWillUnmount()}catch(xt){tr(y,m,xt)}}break;case 5:ul(Ne,Ne.return);break;case 22:if(Ne.memoizedState!==null){$S(Fe);continue}}ht!==null?(ht.return=Ne,bt=ht):$S(Fe)}Be=Be.sibling}e:for(Be=null,Fe=s;;){if(Fe.tag===5){if(Be===null){Be=Fe;try{x=Fe.stateNode,_e?(R=x.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none"):(J=Fe.stateNode,ie=Fe.memoizedProps.style,H=ie!=null&&ie.hasOwnProperty("display")?ie.display:null,J.style.display=tt("display",H))}catch(xt){tr(s,s.return,xt)}}}else if(Fe.tag===6){if(Be===null)try{Fe.stateNode.nodeValue=_e?"":Fe.memoizedProps}catch(xt){tr(s,s.return,xt)}}else if((Fe.tag!==22&&Fe.tag!==23||Fe.memoizedState===null||Fe===s)&&Fe.child!==null){Fe.child.return=Fe,Fe=Fe.child;continue}if(Fe===s)break e;for(;Fe.sibling===null;){if(Fe.return===null||Fe.return===s)break e;Be===Fe&&(Be=null),Fe=Fe.return}Be===Fe&&(Be=null),Fe.sibling.return=Fe.return,Fe=Fe.sibling}}break;case 19:yo(l,s),zo(s),y&4&&xS(s);break;case 21:break;default:yo(l,s),zo(s)}}function zo(s){var l=s.flags;if(l&2){try{e:{for(var m=s.return;m!==null;){if(_S(m)){var y=m;break e}m=m.return}throw Error(n(160))}switch(y.tag){case 5:var x=y.stateNode;y.flags&32&&(ft(x,""),y.flags&=-33);var R=SS(s);Tp(s,R,x);break;case 3:case 4:var H=y.stateNode.containerInfo,J=SS(s);Rp(s,J,H);break;default:throw Error(n(161))}}catch(ie){tr(s,s.return,ie)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function I3(s,l,m){bt=s,ES(s)}function ES(s,l,m){for(var y=(s.mode&1)!==0;bt!==null;){var x=bt,R=x.child;if(x.tag===22&&y){var H=x.memoizedState!==null||Md;if(!H){var J=x.alternate,ie=J!==null&&J.memoizedState!==null||ei;J=Md;var _e=ei;if(Md=H,(ei=ie)&&!_e)for(bt=x;bt!==null;)H=bt,ie=H.child,H.tag===22&&H.memoizedState!==null?RS(x):ie!==null?(ie.return=H,bt=ie):RS(x);for(;R!==null;)bt=R,ES(R),R=R.sibling;bt=x,Md=J,ei=_e}kS(s)}else(x.subtreeFlags&8772)!==0&&R!==null?(R.return=x,bt=R):kS(s)}}function kS(s){for(;bt!==null;){var l=bt;if((l.flags&8772)!==0){var m=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:ei||zd(5,l);break;case 1:var y=l.stateNode;if(l.flags&4&&!ei)if(m===null)y.componentDidMount();else{var x=l.elementType===l.type?m.memoizedProps:go(l.type,m.memoizedProps);y.componentDidUpdate(x,m.memoizedState,y.__reactInternalSnapshotBeforeUpdate)}var R=l.updateQueue;R!==null&&$_(l,R,y);break;case 3:var H=l.updateQueue;if(H!==null){if(m=null,l.child!==null)switch(l.child.tag){case 5:m=l.child.stateNode;break;case 1:m=l.child.stateNode}$_(l,H,m)}break;case 5:var J=l.stateNode;if(m===null&&l.flags&4){m=J;var ie=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":ie.autoFocus&&m.focus();break;case"img":ie.src&&(m.src=ie.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var _e=l.alternate;if(_e!==null){var Be=_e.memoizedState;if(Be!==null){var Fe=Be.dehydrated;Fe!==null&&_s(Fe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}ei||l.flags&512&&$p(l)}catch(Ne){tr(l,l.return,Ne)}}if(l===s){bt=null;break}if(m=l.sibling,m!==null){m.return=l.return,bt=m;break}bt=l.return}}function $S(s){for(;bt!==null;){var l=bt;if(l===s){bt=null;break}var m=l.sibling;if(m!==null){m.return=l.return,bt=m;break}bt=l.return}}function RS(s){for(;bt!==null;){var l=bt;try{switch(l.tag){case 0:case 11:case 15:var m=l.return;try{zd(4,l)}catch(ie){tr(l,m,ie)}break;case 1:var y=l.stateNode;if(typeof y.componentDidMount=="function"){var x=l.return;try{y.componentDidMount()}catch(ie){tr(l,x,ie)}}var R=l.return;try{$p(l)}catch(ie){tr(l,R,ie)}break;case 5:var H=l.return;try{$p(l)}catch(ie){tr(l,H,ie)}}}catch(ie){tr(l,l.return,ie)}if(l===s){bt=null;break}var J=l.sibling;if(J!==null){J.return=l.return,bt=J;break}bt=l.return}}var N3=Math.ceil,jd=$.ReactCurrentDispatcher,Pp=$.ReactCurrentOwner,Ji=$.ReactCurrentBatchConfig,gn=0,Pr=null,hr=null,Fr=0,Mi=0,dl=ws(0),Cr=0,Tc=null,ca=0,Bd=0,Op=0,Pc=null,Ci=null,Ip=0,hl=1/0,as=null,Ld=!1,Np=null,Ps=null,Ad=!1,Os=null,Dd=0,Oc=0,Mp=null,Hd=-1,Fd=0;function li(){return(gn&6)!==0?gt():Hd!==-1?Hd:Hd=gt()}function Is(s){return(s.mode&1)===0?1:(gn&2)!==0&&Fr!==0?Fr&-Fr:g3.transition!==null?(Fd===0&&(Fd=dn()),Fd):(s=qt,s!==0||(s=window.event,s=s===void 0?16:Pb(s.type)),s)}function bo(s,l,m,y){if(50<Oc)throw Oc=0,Mp=null,Error(n(185));xn(s,m,y),((gn&2)===0||s!==Pr)&&(s===Pr&&((gn&2)===0&&(Bd|=m),Cr===4&&Ns(s,Fr)),xi(s,y),m===1&&gn===0&&(l.mode&1)===0&&(hl=gt()+500,gd&&ks()))}function xi(s,l){var m=s.callbackNode;st(s,l);var y=un(s,s===Pr?Fr:0);if(y===0)m!==null&&He(m),s.callbackNode=null,s.callbackPriority=0;else if(l=y&-y,s.callbackPriority!==l){if(m!=null&&He(m),l===1)s.tag===0?p3(PS.bind(null,s)):p_(PS.bind(null,s)),d3(function(){(gn&6)===0&&ks()}),m=null;else{switch(_r(y)){case 1:m=Ze;break;case 4:m=Tt;break;case 16:m=Gt;break;case 536870912:m=vt;break;default:m=Gt}m=LS(m,TS.bind(null,s))}s.callbackPriority=l,s.callbackNode=m}}function TS(s,l){if(Hd=-1,Fd=0,(gn&6)!==0)throw Error(n(327));var m=s.callbackNode;if(fl()&&s.callbackNode!==m)return null;var y=un(s,s===Pr?Fr:0);if(y===0)return null;if((y&30)!==0||(y&s.expiredLanes)!==0||l)l=Wd(s,y);else{l=y;var x=gn;gn|=2;var R=IS();(Pr!==s||Fr!==l)&&(as=null,hl=gt()+500,da(s,l));do try{j3();break}catch(J){OS(s,J)}while(!0);Qm(),jd.current=R,gn=x,hr!==null?l=0:(Pr=null,Fr=0,l=Cr)}if(l!==0){if(l===2&&(x=an(s),x!==0&&(y=x,l=zp(s,x))),l===1)throw m=Tc,da(s,0),Ns(s,y),xi(s,gt()),m;if(l===6)Ns(s,y);else{if(x=s.current.alternate,(y&30)===0&&!M3(x)&&(l=Wd(s,y),l===2&&(R=an(s),R!==0&&(y=R,l=zp(s,R))),l===1))throw m=Tc,da(s,0),Ns(s,y),xi(s,gt()),m;switch(s.finishedWork=x,s.finishedLanes=y,l){case 0:case 1:throw Error(n(345));case 2:ha(s,Ci,as);break;case 3:if(Ns(s,y),(y&130023424)===y&&(l=Ip+500-gt(),10<l)){if(un(s,0)!==0)break;if(x=s.suspendedLanes,(x&y)!==y){li(),s.pingedLanes|=s.suspendedLanes&x;break}s.timeoutHandle=Hm(ha.bind(null,s,Ci,as),l);break}ha(s,Ci,as);break;case 4:if(Ns(s,y),(y&4194240)===y)break;for(l=s.eventTimes,x=-1;0<y;){var H=31-Bn(y);R=1<<H,H=l[H],H>x&&(x=H),y&=~R}if(y=x,y=gt()-y,y=(120>y?120:480>y?480:1080>y?1080:1920>y?1920:3e3>y?3e3:4320>y?4320:1960*N3(y/1960))-y,10<y){s.timeoutHandle=Hm(ha.bind(null,s,Ci,as),y);break}ha(s,Ci,as);break;case 5:ha(s,Ci,as);break;default:throw Error(n(329))}}}return xi(s,gt()),s.callbackNode===m?TS.bind(null,s):null}function zp(s,l){var m=Pc;return s.current.memoizedState.isDehydrated&&(da(s,l).flags|=256),s=Wd(s,l),s!==2&&(l=Ci,Ci=m,l!==null&&jp(l)),s}function jp(s){Ci===null?Ci=s:Ci.push.apply(Ci,s)}function M3(s){for(var l=s;;){if(l.flags&16384){var m=l.updateQueue;if(m!==null&&(m=m.stores,m!==null))for(var y=0;y<m.length;y++){var x=m[y],R=x.getSnapshot;x=x.value;try{if(!mo(R(),x))return!1}catch{return!1}}}if(m=l.child,l.subtreeFlags&16384&&m!==null)m.return=l,l=m;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Ns(s,l){for(l&=~Op,l&=~Bd,s.suspendedLanes|=l,s.pingedLanes&=~l,s=s.expirationTimes;0<l;){var m=31-Bn(l),y=1<<m;s[m]=-1,l&=~y}}function PS(s){if((gn&6)!==0)throw Error(n(327));fl();var l=un(s,0);if((l&1)===0)return xi(s,gt()),null;var m=Wd(s,l);if(s.tag!==0&&m===2){var y=an(s);y!==0&&(l=y,m=zp(s,y))}if(m===1)throw m=Tc,da(s,0),Ns(s,l),xi(s,gt()),m;if(m===6)throw Error(n(345));return s.finishedWork=s.current.alternate,s.finishedLanes=l,ha(s,Ci,as),xi(s,gt()),null}function Bp(s,l){var m=gn;gn|=1;try{return s(l)}finally{gn=m,gn===0&&(hl=gt()+500,gd&&ks())}}function ua(s){Os!==null&&Os.tag===0&&(gn&6)===0&&fl();var l=gn;gn|=1;var m=Ji.transition,y=qt;try{if(Ji.transition=null,qt=1,s)return s()}finally{qt=y,Ji.transition=m,gn=l,(gn&6)===0&&ks()}}function Lp(){Mi=dl.current,Fn(dl)}function da(s,l){s.finishedWork=null,s.finishedLanes=0;var m=s.timeoutHandle;if(m!==-1&&(s.timeoutHandle=-1,u3(m)),hr!==null)for(m=hr.return;m!==null;){var y=m;switch(Km(y),y.tag){case 1:y=y.type.childContextTypes,y!=null&&md();break;case 3:ll(),Fn(bi),Fn(Jr),sp();break;case 5:ip(y);break;case 4:ll();break;case 13:Fn(Gn);break;case 19:Fn(Gn);break;case 10:Zm(y.type._context);break;case 22:case 23:Lp()}m=m.return}if(Pr=s,hr=s=Ms(s.current,null),Fr=Mi=l,Cr=0,Tc=null,Op=Bd=ca=0,Ci=Pc=null,sa!==null){for(l=0;l<sa.length;l++)if(m=sa[l],y=m.interleaved,y!==null){m.interleaved=null;var x=y.next,R=m.pending;if(R!==null){var H=R.next;R.next=x,y.next=H}m.pending=y}sa=null}return s}function OS(s,l){do{var m=hr;try{if(Qm(),kd.current=Pd,$d){for(var y=Xn.memoizedState;y!==null;){var x=y.queue;x!==null&&(x.pending=null),y=y.next}$d=!1}if(la=0,Tr=Sr=Xn=null,xc=!1,wc=0,Pp.current=null,m===null||m.return===null){Cr=1,Tc=l,hr=null;break}e:{var R=s,H=m.return,J=m,ie=l;if(l=Fr,J.flags|=32768,ie!==null&&typeof ie=="object"&&typeof ie.then=="function"){var _e=ie,Be=J,Fe=Be.tag;if((Be.mode&1)===0&&(Fe===0||Fe===11||Fe===15)){var Ne=Be.alternate;Ne?(Be.updateQueue=Ne.updateQueue,Be.memoizedState=Ne.memoizedState,Be.lanes=Ne.lanes):(Be.updateQueue=null,Be.memoizedState=null)}var ht=nS(H);if(ht!==null){ht.flags&=-257,rS(ht,H,J,R,l),ht.mode&1&&tS(R,_e,l),l=ht,ie=_e;var Ct=l.updateQueue;if(Ct===null){var xt=new Set;xt.add(ie),l.updateQueue=xt}else Ct.add(ie);break e}else{if((l&1)===0){tS(R,_e,l),Ap();break e}ie=Error(n(426))}}else if(qn&&J.mode&1){var sr=nS(H);if(sr!==null){(sr.flags&65536)===0&&(sr.flags|=256),rS(sr,H,J,R,l),Ym(cl(ie,J));break e}}R=ie=cl(ie,J),Cr!==4&&(Cr=2),Pc===null?Pc=[R]:Pc.push(R),R=H;do{switch(R.tag){case 3:R.flags|=65536,l&=-l,R.lanes|=l;var pe=Z_(R,ie,l);k_(R,pe);break e;case 1:J=ie;var oe=R.type,ve=R.stateNode;if((R.flags&128)===0&&(typeof oe.getDerivedStateFromError=="function"||ve!==null&&typeof ve.componentDidCatch=="function"&&(Ps===null||!Ps.has(ve)))){R.flags|=65536,l&=-l,R.lanes|=l;var Ve=eS(R,J,l);k_(R,Ve);break e}}R=R.return}while(R!==null)}MS(m)}catch(wt){l=wt,hr===m&&m!==null&&(hr=m=m.return);continue}break}while(!0)}function IS(){var s=jd.current;return jd.current=Pd,s===null?Pd:s}function Ap(){(Cr===0||Cr===3||Cr===2)&&(Cr=4),Pr===null||(ca&268435455)===0&&(Bd&268435455)===0||Ns(Pr,Fr)}function Wd(s,l){var m=gn;gn|=2;var y=IS();(Pr!==s||Fr!==l)&&(as=null,da(s,l));do try{z3();break}catch(x){OS(s,x)}while(!0);if(Qm(),gn=m,jd.current=y,hr!==null)throw Error(n(261));return Pr=null,Fr=0,Cr}function z3(){for(;hr!==null;)NS(hr)}function j3(){for(;hr!==null&&!Ye();)NS(hr)}function NS(s){var l=BS(s.alternate,s,Mi);s.memoizedProps=s.pendingProps,l===null?MS(s):hr=l,Pp.current=null}function MS(s){var l=s;do{var m=l.alternate;if(s=l.return,(l.flags&32768)===0){if(m=R3(m,l,Mi),m!==null){hr=m;return}}else{if(m=T3(m,l),m!==null){m.flags&=32767,hr=m;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{Cr=6,hr=null;return}}if(l=l.sibling,l!==null){hr=l;return}hr=l=s}while(l!==null);Cr===0&&(Cr=5)}function ha(s,l,m){var y=qt,x=Ji.transition;try{Ji.transition=null,qt=1,B3(s,l,m,y)}finally{Ji.transition=x,qt=y}return null}function B3(s,l,m,y){do fl();while(Os!==null);if((gn&6)!==0)throw Error(n(327));m=s.finishedWork;var x=s.finishedLanes;if(m===null)return null;if(s.finishedWork=null,s.finishedLanes=0,m===s.current)throw Error(n(177));s.callbackNode=null,s.callbackPriority=0;var R=m.lanes|m.childLanes;if(Dr(s,R),s===Pr&&(hr=Pr=null,Fr=0),(m.subtreeFlags&2064)===0&&(m.flags&2064)===0||Ad||(Ad=!0,LS(Gt,function(){return fl(),null})),R=(m.flags&15990)!==0,(m.subtreeFlags&15990)!==0||R){R=Ji.transition,Ji.transition=null;var H=qt;qt=1;var J=gn;gn|=4,Pp.current=null,O3(s,m),wS(m,s),r3(Am),ed=!!Lm,Am=Lm=null,s.current=m,I3(m),Pt(),gn=J,qt=H,Ji.transition=R}else s.current=m;if(Ad&&(Ad=!1,Os=s,Dd=x),R=s.pendingLanes,R===0&&(Ps=null),ir(m.stateNode),xi(s,gt()),l!==null)for(y=s.onRecoverableError,m=0;m<l.length;m++)x=l[m],y(x.value,{componentStack:x.stack,digest:x.digest});if(Ld)throw Ld=!1,s=Np,Np=null,s;return(Dd&1)!==0&&s.tag!==0&&fl(),R=s.pendingLanes,(R&1)!==0?s===Mp?Oc++:(Oc=0,Mp=s):Oc=0,ks(),null}function fl(){if(Os!==null){var s=_r(Dd),l=Ji.transition,m=qt;try{if(Ji.transition=null,qt=16>s?16:s,Os===null)var y=!1;else{if(s=Os,Os=null,Dd=0,(gn&6)!==0)throw Error(n(331));var x=gn;for(gn|=4,bt=s.current;bt!==null;){var R=bt,H=R.child;if((bt.flags&16)!==0){var J=R.deletions;if(J!==null){for(var ie=0;ie<J.length;ie++){var _e=J[ie];for(bt=_e;bt!==null;){var Be=bt;switch(Be.tag){case 0:case 11:case 15:Rc(8,Be,R)}var Fe=Be.child;if(Fe!==null)Fe.return=Be,bt=Fe;else for(;bt!==null;){Be=bt;var Ne=Be.sibling,ht=Be.return;if(bS(Be),Be===_e){bt=null;break}if(Ne!==null){Ne.return=ht,bt=Ne;break}bt=ht}}}var Ct=R.alternate;if(Ct!==null){var xt=Ct.child;if(xt!==null){Ct.child=null;do{var sr=xt.sibling;xt.sibling=null,xt=sr}while(xt!==null)}}bt=R}}if((R.subtreeFlags&2064)!==0&&H!==null)H.return=R,bt=H;else e:for(;bt!==null;){if(R=bt,(R.flags&2048)!==0)switch(R.tag){case 0:case 11:case 15:Rc(9,R,R.return)}var pe=R.sibling;if(pe!==null){pe.return=R.return,bt=pe;break e}bt=R.return}}var oe=s.current;for(bt=oe;bt!==null;){H=bt;var ve=H.child;if((H.subtreeFlags&2064)!==0&&ve!==null)ve.return=H,bt=ve;else e:for(H=oe;bt!==null;){if(J=bt,(J.flags&2048)!==0)try{switch(J.tag){case 0:case 11:case 15:zd(9,J)}}catch(wt){tr(J,J.return,wt)}if(J===H){bt=null;break e}var Ve=J.sibling;if(Ve!==null){Ve.return=J.return,bt=Ve;break e}bt=J.return}}if(gn=x,ks(),pn&&typeof pn.onPostCommitFiberRoot=="function")try{pn.onPostCommitFiberRoot(Nt,s)}catch{}y=!0}return y}finally{qt=m,Ji.transition=l}}return!1}function zS(s,l,m){l=cl(m,l),l=Z_(s,l,1),s=Rs(s,l,1),l=li(),s!==null&&(xn(s,1,l),xi(s,l))}function tr(s,l,m){if(s.tag===3)zS(s,s,m);else for(;l!==null;){if(l.tag===3){zS(l,s,m);break}else if(l.tag===1){var y=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Ps===null||!Ps.has(y))){s=cl(m,s),s=eS(l,s,1),l=Rs(l,s,1),s=li(),l!==null&&(xn(l,1,s),xi(l,s));break}}l=l.return}}function L3(s,l,m){var y=s.pingCache;y!==null&&y.delete(l),l=li(),s.pingedLanes|=s.suspendedLanes&m,Pr===s&&(Fr&m)===m&&(Cr===4||Cr===3&&(Fr&130023424)===Fr&&500>gt()-Ip?da(s,0):Op|=m),xi(s,l)}function jS(s,l){l===0&&((s.mode&1)===0?l=1:(l=Ar,Ar<<=1,(Ar&130023424)===0&&(Ar=4194304)));var m=li();s=is(s,l),s!==null&&(xn(s,l,m),xi(s,m))}function A3(s){var l=s.memoizedState,m=0;l!==null&&(m=l.retryLane),jS(s,m)}function D3(s,l){var m=0;switch(s.tag){case 13:var y=s.stateNode,x=s.memoizedState;x!==null&&(m=x.retryLane);break;case 19:y=s.stateNode;break;default:throw Error(n(314))}y!==null&&y.delete(l),jS(s,m)}var BS;BS=function(s,l,m){if(s!==null)if(s.memoizedProps!==l.pendingProps||bi.current)Si=!0;else{if((s.lanes&m)===0&&(l.flags&128)===0)return Si=!1,$3(s,l,m);Si=(s.flags&131072)!==0}else Si=!1,qn&&(l.flags&1048576)!==0&&g_(l,yd,l.index);switch(l.lanes=0,l.tag){case 2:var y=l.type;Nd(s,l),s=l.pendingProps;var x=tl(l,Jr.current);al(l,m),x=cp(null,l,y,s,x,m);var R=up();return l.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,_i(y)?(R=!0,pd(l)):R=!1,l.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,np(l),x.updater=Od,l.stateNode=x,x._reactInternals=l,gp(l,y,s,m),l=_p(null,l,y,!0,R,m)):(l.tag=0,qn&&R&&Um(l),ai(null,l,x,m),l=l.child),l;case 16:y=l.elementType;e:{switch(Nd(s,l),s=l.pendingProps,x=y._init,y=x(y._payload),l.type=y,x=l.tag=F3(y),s=go(y,s),x){case 0:l=bp(null,l,y,s,m);break e;case 1:l=cS(null,l,y,s,m);break e;case 11:l=iS(null,l,y,s,m);break e;case 14:l=oS(null,l,y,go(y.type,s),m);break e}throw Error(n(306,y,""))}return l;case 0:return y=l.type,x=l.pendingProps,x=l.elementType===y?x:go(y,x),bp(s,l,y,x,m);case 1:return y=l.type,x=l.pendingProps,x=l.elementType===y?x:go(y,x),cS(s,l,y,x,m);case 3:e:{if(uS(l),s===null)throw Error(n(387));y=l.pendingProps,R=l.memoizedState,x=R.element,E_(s,l),wd(l,y,null,m);var H=l.memoizedState;if(y=H.element,R.isDehydrated)if(R={element:y,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},l.updateQueue.baseState=R,l.memoizedState=R,l.flags&256){x=cl(Error(n(423)),l),l=dS(s,l,y,m,x);break e}else if(y!==x){x=cl(Error(n(424)),l),l=dS(s,l,y,m,x);break e}else for(Ni=xs(l.stateNode.containerInfo.firstChild),Ii=l,qn=!0,po=null,m=x_(l,null,y,m),l.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling;else{if(il(),y===x){l=ss(s,l,m);break e}ai(s,l,y,m)}l=l.child}return l;case 5:return R_(l),s===null&&Xm(l),y=l.type,x=l.pendingProps,R=s!==null?s.memoizedProps:null,H=x.children,Dm(y,x)?H=null:R!==null&&Dm(y,R)&&(l.flags|=32),lS(s,l),ai(s,l,H,m),l.child;case 6:return s===null&&Xm(l),null;case 13:return hS(s,l,m);case 4:return rp(l,l.stateNode.containerInfo),y=l.pendingProps,s===null?l.child=ol(l,null,y,m):ai(s,l,y,m),l.child;case 11:return y=l.type,x=l.pendingProps,x=l.elementType===y?x:go(y,x),iS(s,l,y,x,m);case 7:return ai(s,l,l.pendingProps,m),l.child;case 8:return ai(s,l,l.pendingProps.children,m),l.child;case 12:return ai(s,l,l.pendingProps.children,m),l.child;case 10:e:{if(y=l.type._context,x=l.pendingProps,R=l.memoizedProps,H=x.value,An(Sd,y._currentValue),y._currentValue=H,R!==null)if(mo(R.value,H)){if(R.children===x.children&&!bi.current){l=ss(s,l,m);break e}}else for(R=l.child,R!==null&&(R.return=l);R!==null;){var J=R.dependencies;if(J!==null){H=R.child;for(var ie=J.firstContext;ie!==null;){if(ie.context===y){if(R.tag===1){ie=os(-1,m&-m),ie.tag=2;var _e=R.updateQueue;if(_e!==null){_e=_e.shared;var Be=_e.pending;Be===null?ie.next=ie:(ie.next=Be.next,Be.next=ie),_e.pending=ie}}R.lanes|=m,ie=R.alternate,ie!==null&&(ie.lanes|=m),ep(R.return,m,l),J.lanes|=m;break}ie=ie.next}}else if(R.tag===10)H=R.type===l.type?null:R.child;else if(R.tag===18){if(H=R.return,H===null)throw Error(n(341));H.lanes|=m,J=H.alternate,J!==null&&(J.lanes|=m),ep(H,m,l),H=R.sibling}else H=R.child;if(H!==null)H.return=R;else for(H=R;H!==null;){if(H===l){H=null;break}if(R=H.sibling,R!==null){R.return=H.return,H=R;break}H=H.return}R=H}ai(s,l,x.children,m),l=l.child}return l;case 9:return x=l.type,y=l.pendingProps.children,al(l,m),x=Xi(x),y=y(x),l.flags|=1,ai(s,l,y,m),l.child;case 14:return y=l.type,x=go(y,l.pendingProps),x=go(y.type,x),oS(s,l,y,x,m);case 15:return sS(s,l,l.type,l.pendingProps,m);case 17:return y=l.type,x=l.pendingProps,x=l.elementType===y?x:go(y,x),Nd(s,l),l.tag=1,_i(y)?(s=!0,pd(l)):s=!1,al(l,m),J_(l,y,x),gp(l,y,x,m),_p(null,l,y,!0,s,m);case 19:return mS(s,l,m);case 22:return aS(s,l,m)}throw Error(n(156,l.tag))};function LS(s,l){return fn(s,l)}function H3(s,l,m,y){this.tag=s,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qi(s,l,m,y){return new H3(s,l,m,y)}function Dp(s){return s=s.prototype,!(!s||!s.isReactComponent)}function F3(s){if(typeof s=="function")return Dp(s)?1:0;if(s!=null){if(s=s.$$typeof,s===M)return 11;if(s===F)return 14}return 2}function Ms(s,l){var m=s.alternate;return m===null?(m=Qi(s.tag,l,s.key,s.mode),m.elementType=s.elementType,m.type=s.type,m.stateNode=s.stateNode,m.alternate=s,s.alternate=m):(m.pendingProps=l,m.type=s.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=s.flags&14680064,m.childLanes=s.childLanes,m.lanes=s.lanes,m.child=s.child,m.memoizedProps=s.memoizedProps,m.memoizedState=s.memoizedState,m.updateQueue=s.updateQueue,l=s.dependencies,m.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},m.sibling=s.sibling,m.index=s.index,m.ref=s.ref,m}function Vd(s,l,m,y,x,R){var H=2;if(y=s,typeof s=="function")Dp(s)&&(H=1);else if(typeof s=="string")H=5;else e:switch(s){case O:return fa(m.children,x,R,l);case N:H=8,x|=8;break;case I:return s=Qi(12,m,l,x|2),s.elementType=I,s.lanes=R,s;case j:return s=Qi(13,m,l,x),s.elementType=j,s.lanes=R,s;case B:return s=Qi(19,m,l,x),s.elementType=B,s.lanes=R,s;case V:return qd(m,x,R,l);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case z:H=10;break e;case A:H=9;break e;case M:H=11;break e;case F:H=14;break e;case W:H=16,y=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return l=Qi(H,m,l,x),l.elementType=s,l.type=y,l.lanes=R,l}function fa(s,l,m,y){return s=Qi(7,s,y,l),s.lanes=m,s}function qd(s,l,m,y){return s=Qi(22,s,y,l),s.elementType=V,s.lanes=m,s.stateNode={isHidden:!1},s}function Hp(s,l,m){return s=Qi(6,s,null,l),s.lanes=m,s}function Fp(s,l,m){return l=Qi(4,s.children!==null?s.children:[],s.key,l),l.lanes=m,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}function W3(s,l,m,y,x){this.tag=l,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_n(0),this.expirationTimes=_n(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_n(0),this.identifierPrefix=y,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function Wp(s,l,m,y,x,R,H,J,ie){return s=new W3(s,l,m,J,ie),l===1?(l=1,R===!0&&(l|=8)):l=0,R=Qi(3,null,null,l),s.current=R,R.stateNode=s,R.memoizedState={element:y,isDehydrated:m,cache:null,transitions:null,pendingSuspenseBoundaries:null},np(R),s}function V3(s,l,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:y==null?null:""+y,children:s,containerInfo:l,implementation:m}}function AS(s){if(!s)return Es;s=s._reactInternals;e:{if(At(s)!==s||s.tag!==1)throw Error(n(170));var l=s;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(_i(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(n(171))}if(s.tag===1){var m=s.type;if(_i(m))return f_(s,m,l)}return l}function DS(s,l,m,y,x,R,H,J,ie){return s=Wp(m,y,!0,s,x,R,H,J,ie),s.context=AS(null),m=s.current,y=li(),x=Is(m),R=os(y,x),R.callback=l??null,Rs(m,R,x),s.current.lanes=x,xn(s,x,y),xi(s,y),s}function Ud(s,l,m,y){var x=l.current,R=li(),H=Is(x);return m=AS(m),l.context===null?l.context=m:l.pendingContext=m,l=os(R,H),l.payload={element:s},y=y===void 0?null:y,y!==null&&(l.callback=y),s=Rs(x,l,H),s!==null&&(bo(s,x,H,R),xd(s,x,H)),H}function Kd(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function HS(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var m=s.retryLane;s.retryLane=m!==0&&m<l?m:l}}function Vp(s,l){HS(s,l),(s=s.alternate)&&HS(s,l)}function q3(){return null}var FS=typeof reportError=="function"?reportError:function(s){console.error(s)};function qp(s){this._internalRoot=s}Gd.prototype.render=qp.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(n(409));Ud(s,l,null,null)},Gd.prototype.unmount=qp.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;ua(function(){Ud(null,s,null,null)}),l[es]=null}};function Gd(s){this._internalRoot=s}Gd.prototype.unstable_scheduleHydration=function(s){if(s){var l=bs();s={blockedOn:null,target:s,priority:l};for(var m=0;m<Pi.length&&l!==0&&l<Pi[m].priority;m++);Pi.splice(m,0,s),m===0&&zn(s)}};function Up(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function Xd(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function WS(){}function U3(s,l,m,y,x){if(x){if(typeof y=="function"){var R=y;y=function(){var _e=Kd(H);R.call(_e)}}var H=DS(l,y,s,0,null,!1,!1,"",WS);return s._reactRootContainer=H,s[es]=H.current,pc(s.nodeType===8?s.parentNode:s),ua(),H}for(;x=s.lastChild;)s.removeChild(x);if(typeof y=="function"){var J=y;y=function(){var _e=Kd(ie);J.call(_e)}}var ie=Wp(s,0,!1,null,null,!1,!1,"",WS);return s._reactRootContainer=ie,s[es]=ie.current,pc(s.nodeType===8?s.parentNode:s),ua(function(){Ud(l,ie,m,y)}),ie}function Yd(s,l,m,y,x){var R=m._reactRootContainer;if(R){var H=R;if(typeof x=="function"){var J=x;x=function(){var ie=Kd(H);J.call(ie)}}Ud(l,H,s,x)}else H=U3(m,l,s,x,y);return Kd(H)}$r=function(s){switch(s.tag){case 3:var l=s.stateNode;if(l.current.memoizedState.isDehydrated){var m=Xr(l.pendingLanes);m!==0&&(or(l,m|1),xi(l,gt()),(gn&6)===0&&(hl=gt()+500,ks()))}break;case 13:ua(function(){var y=is(s,1);if(y!==null){var x=li();bo(y,s,1,x)}}),Vp(s,1)}},vi=function(s){if(s.tag===13){var l=is(s,134217728);if(l!==null){var m=li();bo(l,s,134217728,m)}Vp(s,134217728)}},Rr=function(s){if(s.tag===13){var l=Is(s),m=is(s,l);if(m!==null){var y=li();bo(m,s,l,y)}Vp(s,l)}},bs=function(){return qt},Fa=function(s,l){var m=qt;try{return qt=s,l()}finally{qt=m}},nn=function(s,l,m){switch(l){case"input":if(be(s,m),l=m.name,m.type==="radio"&&l!=null){for(m=s;m.parentNode;)m=m.parentNode;for(m=m.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<m.length;l++){var y=m[l];if(y!==s&&y.form===s.form){var x=fd(y);if(!x)throw Error(n(90));le(y),be(y,x)}}}break;case"textarea":Oe(s,m);break;case"select":l=m.value,l!=null&&Ee(s,!!m.multiple,l,!1)}},Rt=Bp,sn=ua;var K3={usingClientEntryPoint:!1,Events:[yc,Za,fd,on,Ht,Bp]},Ic={findFiberByHostInstance:na,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},G3={bundleType:Ic.bundleType,version:Ic.version,rendererPackageName:Ic.rendererPackageName,rendererConfig:Ic.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Dn(s),s===null?null:s.stateNode},findFiberByHostInstance:Ic.findFiberByHostInstance||q3,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jd.isDisabled&&Jd.supportsFiber)try{Nt=Jd.inject(G3),pn=Jd}catch{}}return wi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K3,wi.createPortal=function(s,l){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Up(l))throw Error(n(200));return V3(s,l,null,m)},wi.createRoot=function(s,l){if(!Up(s))throw Error(n(299));var m=!1,y="",x=FS;return l!=null&&(l.unstable_strictMode===!0&&(m=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),l=Wp(s,1,!1,null,null,m,!1,y,x),s[es]=l.current,pc(s.nodeType===8?s.parentNode:s),new qp(l)},wi.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=Dn(l),s=s===null?null:s.stateNode,s},wi.flushSync=function(s){return ua(s)},wi.hydrate=function(s,l,m){if(!Xd(l))throw Error(n(200));return Yd(null,s,l,!0,m)},wi.hydrateRoot=function(s,l,m){if(!Up(s))throw Error(n(405));var y=m!=null&&m.hydratedSources||null,x=!1,R="",H=FS;if(m!=null&&(m.unstable_strictMode===!0&&(x=!0),m.identifierPrefix!==void 0&&(R=m.identifierPrefix),m.onRecoverableError!==void 0&&(H=m.onRecoverableError)),l=DS(l,null,s,1,m??null,x,!1,R,H),s[es]=l.current,pc(s),y)for(s=0;s<y.length;s++)m=y[s],x=m._getVersion,x=x(m._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[m,x]:l.mutableSourceEagerHydrationData.push(m,x);return new Gd(l)},wi.render=function(s,l,m){if(!Xd(l))throw Error(n(200));return Yd(null,s,l,!1,m)},wi.unmountComponentAtNode=function(s){if(!Xd(s))throw Error(n(40));return s._reactRootContainer?(ua(function(){Yd(null,null,s,!1,function(){s._reactRootContainer=null,s[es]=null})}),!0):!1},wi.unstable_batchedUpdates=Bp,wi.unstable_renderSubtreeIntoContainer=function(s,l,m,y){if(!Xd(m))throw Error(n(200));if(s==null||s._reactInternals===void 0)throw Error(n(38));return Yd(s,l,m,!1,y)},wi.version="18.3.1-next-f1338f8080-20240426",wi}var JS;function d2(){if(JS)return Xp.exports;JS=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(),Xp.exports=rT(),Xp.exports}var QS;function iT(){if(QS)return Qd;QS=1;var e=d2();return Qd.createRoot=e.createRoot,Qd.hydrateRoot=e.hydrateRoot,Qd}var oT=iT();const sT=Iu(oT);var Qp={exports:{}};/*!
41
- Copyright (c) 2018 Jed Watson.
42
- Licensed under the MIT License (MIT), see
43
- http://jedwatson.github.io/classnames
44
- */var ZS;function aT(){return ZS||(ZS=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",a=0;a<arguments.length;a++){var c=arguments[a];c&&(o=i(o,r(c)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var c in o)t.call(o,c)&&o[c]&&(a=i(a,c));return a}function i(o,a){return a?o?o+" "+a:o+a:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Qp)),Qp.exports}var lT=aT();const ne=Iu(lT);function Re(){return Re=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},Re.apply(null,arguments)}function _t(e){"@babel/helpers - typeof";return _t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_t(e)}var cT=Symbol.for("react.element"),uT=Symbol.for("react.transitional.element"),dT=Symbol.for("react.fragment");function h2(e){return e&&_t(e)==="object"&&(e.$$typeof===cT||e.$$typeof===uT)&&e.type===dT}function hi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return Q.Children.forEach(e,function(r){r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(hi(r)):h2(r)&&r.props?n=n.concat(hi(r.props.children,t)):n.push(r))}),n}var ov={},hT=function(t){};function fT(e,t){}function mT(e,t){}function pT(){ov={}}function f2(e,t,n){!t&&!ov[n]&&(e(!1,n),ov[n]=!0)}function Br(e,t){f2(fT,e,t)}function gT(e,t){f2(mT,e,t)}Br.preMessage=hT;Br.resetWarned=pT;Br.noteOnce=gT;function vT(e,t){if(_t(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_t(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function m2(e){var t=vT(e,"string");return _t(t)=="symbol"?t:t+""}function K(e,t,n){return(t=m2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?e1(Object(n),!0).forEach(function(r){K(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Xs=d2();const sv=Iu(Xs),yT=u2({__proto__:null,default:sv},[Xs]);function du(e){return e instanceof HTMLElement||e instanceof SVGElement}function bT(e){return e&&_t(e)==="object"&&du(e.nativeElement)?e.nativeElement:du(e)?e:null}function xh(e){var t=bT(e);if(t)return t;if(e instanceof Q.Component){var n;return(n=sv.findDOMNode)===null||n===void 0?void 0:n.call(sv,e)}return null}var Zp={exports:{}},kn={};/**
45
- * @license React
46
- * react-is.production.min.js
47
- *
48
- * Copyright (c) Facebook, Inc. and its affiliates.
49
- *
50
- * This source code is licensed under the MIT license found in the
51
- * LICENSE file in the root directory of this source tree.
52
- */var t1;function _T(){if(t1)return kn;t1=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function _(S){if(typeof S=="object"&&S!==null){var C=S.$$typeof;switch(C){case e:switch(S=S.type,S){case n:case i:case r:case d:case f:return S;default:switch(S=S&&S.$$typeof,S){case c:case a:case u:case g:case p:case o:return S;default:return C}}case t:return C}}}return kn.ContextConsumer=a,kn.ContextProvider=o,kn.Element=e,kn.ForwardRef=u,kn.Fragment=n,kn.Lazy=g,kn.Memo=p,kn.Portal=t,kn.Profiler=i,kn.StrictMode=r,kn.Suspense=d,kn.SuspenseList=f,kn.isAsyncMode=function(){return!1},kn.isConcurrentMode=function(){return!1},kn.isContextConsumer=function(S){return _(S)===a},kn.isContextProvider=function(S){return _(S)===o},kn.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===e},kn.isForwardRef=function(S){return _(S)===u},kn.isFragment=function(S){return _(S)===n},kn.isLazy=function(S){return _(S)===g},kn.isMemo=function(S){return _(S)===p},kn.isPortal=function(S){return _(S)===t},kn.isProfiler=function(S){return _(S)===i},kn.isStrictMode=function(S){return _(S)===r},kn.isSuspense=function(S){return _(S)===d},kn.isSuspenseList=function(S){return _(S)===f},kn.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===n||S===i||S===r||S===d||S===f||S===v||typeof S=="object"&&S!==null&&(S.$$typeof===g||S.$$typeof===p||S.$$typeof===o||S.$$typeof===a||S.$$typeof===u||S.$$typeof===b||S.getModuleId!==void 0)},kn.typeOf=_,kn}var n1;function ST(){return n1||(n1=1,Zp.exports=_T()),Zp.exports}var eg=ST();function Nu(e,t,n){var r=h.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}var CT=Number(h.version.split(".")[0]),iy=function(t,n){typeof t=="function"?t(n):_t(t)==="object"&&t&&"current"in t&&(t.current=n)},ho=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);return i.length<=1?i[0]:function(o){n.forEach(function(a){iy(a,o)})}},Xo=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Nu(function(){return ho.apply(void 0,n)},n,function(i,o){return i.length!==o.length||i.every(function(a,c){return a!==o[c]})})},ta=function(t){var n,r;if(!t)return!1;if(oy(t)&&CT>=19)return!0;var i=eg.isMemo(t)?t.type.type:t.type;return!(typeof i=="function"&&!((n=i.prototype)!==null&&n!==void 0&&n.render)&&i.$$typeof!==eg.ForwardRef||typeof t=="function"&&!((r=t.prototype)!==null&&r!==void 0&&r.render)&&t.$$typeof!==eg.ForwardRef)};function oy(e){return h.isValidElement(e)&&!h2(e)}var xT=function(t){return oy(t)&&ta(t)},ja=function(t){if(t&&oy(t)){var n=t;return n.props.propertyIsEnumerable("ref")?n.props.ref:n.ref}return null},av=h.createContext(null);function wT(e){var t=e.children,n=e.onBatchResize,r=h.useRef(0),i=h.useRef([]),o=h.useContext(av),a=h.useCallback(function(c,u,d){r.current+=1;var f=r.current;i.current.push({size:c,element:u,data:d}),Promise.resolve().then(function(){f===r.current&&(n==null||n(i.current),i.current=[])}),o==null||o(c,u,d)},[n,o]);return h.createElement(av.Provider,{value:a},t)}var p2=(function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(i,o){return i[0]===n?(r=o,!0):!1}),r}return(function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},t.prototype.set=function(n,r){var i=e(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,i=e(r,n);~i&&r.splice(i,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i<o.length;i++){var a=o[i];n.call(r,a[1],a[0])}},t})()})(),lv=typeof window<"u"&&typeof document<"u"&&window.document===document,qh=(function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()})(),ET=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(qh):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),kT=2;function $T(e,t){var n=!1,r=!1,i=0;function o(){n&&(n=!1,e()),r&&c()}function a(){ET(o)}function c(){var u=Date.now();if(n){if(u-i<kT)return;r=!0}else n=!0,r=!1,setTimeout(a,t);i=u}return c}var RT=20,TT=["top","right","bottom","left","width","height","size","weight"],PT=typeof MutationObserver<"u",OT=(function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=$T(this.refresh.bind(this),RT)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!lv||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),PT?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!lv||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,i=TT.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e})(),g2=(function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e}),Fl=(function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||qh}),v2=Tf(0,0,0,0);function Uh(e){return parseFloat(e)||0}function r1(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,i){var o=e["border-"+i+"-width"];return r+Uh(o)},0)}function IT(e){for(var t=["top","right","bottom","left"],n={},r=0,i=t;r<i.length;r++){var o=i[r],a=e["padding-"+o];n[o]=Uh(a)}return n}function NT(e){var t=e.getBBox();return Tf(0,0,t.width,t.height)}function MT(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return v2;var r=Fl(e).getComputedStyle(e),i=IT(r),o=i.left+i.right,a=i.top+i.bottom,c=Uh(r.width),u=Uh(r.height);if(r.boxSizing==="border-box"&&(Math.round(c+o)!==t&&(c-=r1(r,"left","right")+o),Math.round(u+a)!==n&&(u-=r1(r,"top","bottom")+a)),!jT(e)){var d=Math.round(c+o)-t,f=Math.round(u+a)-n;Math.abs(d)!==1&&(c-=d),Math.abs(f)!==1&&(u-=f)}return Tf(i.left,i.top,c,u)}var zT=(function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Fl(e).SVGGraphicsElement}:function(e){return e instanceof Fl(e).SVGElement&&typeof e.getBBox=="function"}})();function jT(e){return e===Fl(e).document.documentElement}function BT(e){return lv?zT(e)?NT(e):MT(e):v2}function LT(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,a=Object.create(o.prototype);return g2(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}function Tf(e,t,n,r){return{x:e,y:t,width:n,height:r}}var AT=(function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Tf(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=BT(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e})(),DT=(function(){function e(t,n){var r=LT(n);g2(this,{target:t,contentRect:r})}return e})(),HT=(function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new p2,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Fl(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new AT(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Fl(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new DT(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e})(),y2=typeof WeakMap<"u"?new WeakMap:new p2,b2=(function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=OT.getInstance(),r=new HT(t,n,this);y2.set(this,r)}return e})();["observe","unobserve","disconnect"].forEach(function(e){b2.prototype[e]=function(){var t;return(t=y2.get(this))[e].apply(t,arguments)}});var FT=(function(){return typeof qh.ResizeObserver<"u"?qh.ResizeObserver:b2})(),Ws=new Map;function WT(e){e.forEach(function(t){var n,r=t.target;(n=Ws.get(r))===null||n===void 0||n.forEach(function(i){return i(r)})})}var _2=new FT(WT);function VT(e,t){Ws.has(e)||(Ws.set(e,new Set),_2.observe(e)),Ws.get(e).add(t)}function qT(e,t){Ws.has(e)&&(Ws.get(e).delete(t),Ws.get(e).size||(_2.unobserve(e),Ws.delete(e)))}function gr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m2(r.key),r)}}function vr(e,t,n){return t&&i1(e.prototype,t),n&&i1(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function hu(e,t){return hu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},hu(e,t)}function ms(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hu(e,t)}function fu(e){return fu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fu(e)}function sy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sy=function(){return!!e})()}function Zt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UT(e,t){if(t&&(_t(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zt(e)}function ps(e){var t=sy();return function(){var n,r=fu(e);if(t){var i=fu(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return UT(this,n)}}var KT=(function(e){ms(n,e);var t=ps(n);function n(){return gr(this,n),t.apply(this,arguments)}return vr(n,[{key:"render",value:function(){return this.props.children}}]),n})(h.Component);function GT(e,t){var n=e.children,r=e.disabled,i=h.useRef(null),o=h.useRef(null),a=h.useContext(av),c=typeof n=="function",u=c?n(i):n,d=h.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),f=!c&&h.isValidElement(u)&&ta(u),p=f?ja(u):null,g=Xo(p,i),v=function(){var C;return xh(i.current)||(i.current&&_t(i.current)==="object"?xh((C=i.current)===null||C===void 0?void 0:C.nativeElement):null)||xh(o.current)};h.useImperativeHandle(t,function(){return v()});var b=h.useRef(e);b.current=e;var _=h.useCallback(function(S){var C=b.current,E=C.onResize,k=C.data,$=S.getBoundingClientRect(),P=$.width,T=$.height,O=S.offsetWidth,N=S.offsetHeight,I=Math.floor(P),z=Math.floor(T);if(d.current.width!==I||d.current.height!==z||d.current.offsetWidth!==O||d.current.offsetHeight!==N){var A={width:I,height:z,offsetWidth:O,offsetHeight:N};d.current=A;var M=O===Math.round(P)?P:O,j=N===Math.round(T)?T:N,B=X(X({},A),{},{offsetWidth:M,offsetHeight:j});a==null||a(B,S,k),E&&Promise.resolve().then(function(){E(B,S)})}},[]);return h.useEffect(function(){var S=v();return S&&!r&&VT(S,_),function(){return qT(S,_)}},[i.current,r]),h.createElement(KT,{ref:o},f?h.cloneElement(u,{ref:g}):u)}var XT=h.forwardRef(GT),YT="rc-observer-key";function JT(e,t){var n=e.children,r=typeof n=="function"?[n]:hi(n);return r.map(function(i,o){var a=(i==null?void 0:i.key)||"".concat(YT,"-").concat(o);return h.createElement(XT,Re({},e,{key:a,ref:o===0?t:void 0}),i)})}var ao=h.forwardRef(JT);ao.Collection=wT;function cv(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 QT(e){if(Array.isArray(e))return cv(e)}function S2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ay(e,t){if(e){if(typeof e=="string")return cv(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)?cv(e,t):void 0}}function ZT(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
53
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function We(e){return QT(e)||S2(e)||ay(e)||ZT()}var C2=function(t){return+setTimeout(t,16)},x2=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(C2=function(t){return window.requestAnimationFrame(t)},x2=function(t){return window.cancelAnimationFrame(t)});var o1=0,ly=new Map;function w2(e){ly.delete(e)}var Rn=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;o1+=1;var r=o1;function i(o){if(o===0)w2(r),t();else{var a=C2(function(){i(o-1)});ly.set(r,a)}}return i(n),r};Rn.cancel=function(e){var t=ly.get(e);return w2(e),x2(t)};function E2(e){if(Array.isArray(e))return e}function e5(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,c=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);u=!0);}catch(f){d=!0,i=f}finally{try{if(!u&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw i}}return c}}function k2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
54
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function se(e,t){return E2(e)||e5(e,t)||ay(e,t)||k2()}function mu(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function ii(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function uv(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var s1="data-rc-order",a1="data-rc-priority",t5="rc-util-key",dv=new Map;function $2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):t5}function Pf(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function n5(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function cy(e){return Array.from((dv.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function R2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!ii())return null;var n=t.csp,r=t.prepend,i=t.priority,o=i===void 0?0:i,a=n5(r),c=a==="prependQueue",u=document.createElement("style");u.setAttribute(s1,a),c&&o&&u.setAttribute(a1,"".concat(o)),n!=null&&n.nonce&&(u.nonce=n==null?void 0:n.nonce),u.innerHTML=e;var d=Pf(t),f=d.firstChild;if(r){if(c){var p=(t.styles||cy(d)).filter(function(g){if(!["prepend","prependQueue"].includes(g.getAttribute(s1)))return!1;var v=Number(g.getAttribute(a1)||0);return o>=v});if(p.length)return d.insertBefore(u,p[p.length-1].nextSibling),u}d.insertBefore(u,f)}else d.appendChild(u);return u}function T2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Pf(t);return(t.styles||cy(n)).find(function(r){return r.getAttribute($2(t))===e})}function pu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=T2(e,t);if(n){var r=Pf(t);r.removeChild(n)}}function r5(e,t){var n=dv.get(e);if(!n||!uv(document,n)){var r=R2("",t),i=r.parentNode;dv.set(e,i),e.removeChild(r)}}function fs(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Pf(n),i=cy(r),o=X(X({},n),{},{styles:i});r5(r,o);var a=T2(t,o);if(a){var c,u;if((c=o.csp)!==null&&c!==void 0&&c.nonce&&a.nonce!==((u=o.csp)===null||u===void 0?void 0:u.nonce)){var d;a.nonce=(d=o.csp)===null||d===void 0?void 0:d.nonce}return a.innerHTML!==e&&(a.innerHTML=e),a}var f=R2(e,o);return f.setAttribute($2(o),t),f}function i5(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 Lt(e,t){if(e==null)return{};var n,r,i=i5(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function gu(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function i(o,a){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,u=r.has(o);if(Br(!u,"Warning: There may be circular references"),u)return!1;if(o===a)return!0;if(n&&c>1)return!1;r.add(o);var d=c+1;if(Array.isArray(o)){if(!Array.isArray(a)||o.length!==a.length)return!1;for(var f=0;f<o.length;f++)if(!i(o[f],a[f],d))return!1;return!0}if(o&&a&&_t(o)==="object"&&_t(a)==="object"){var p=Object.keys(o);return p.length!==Object.keys(a).length?!1:p.every(function(g){return i(o[g],a[g],d)})}return!1}return i(e,t)}var o5="%";function hv(e){return e.join(o5)}var s5=(function(){function e(t){gr(this,e),K(this,"instanceId",void 0),K(this,"cache",new Map),K(this,"extracted",new Set),this.instanceId=t}return vr(e,[{key:"get",value:function(n){return this.opGet(hv(n))}},{key:"opGet",value:function(n){return this.cache.get(n)||null}},{key:"update",value:function(n,r){return this.opUpdate(hv(n),r)}},{key:"opUpdate",value:function(n,r){var i=this.cache.get(n),o=r(i);o===null?this.cache.delete(n):this.cache.set(n,o)}}]),e})(),Wl="data-token-hash",$o="data-css-hash",Vs="__cssinjs_instance__";function a5(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat($o,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(i){i[Vs]=i[Vs]||e,i[Vs]===e&&document.head.insertBefore(i,n)});var r={};Array.from(document.querySelectorAll("style[".concat($o,"]"))).forEach(function(i){var o=i.getAttribute($o);if(r[o]){if(i[Vs]===e){var a;(a=i.parentNode)===null||a===void 0||a.removeChild(i)}}else r[o]=!0})}return new s5(e)}var Mu=h.createContext({hashPriority:"low",cache:a5(),defaultCache:!0});function l5(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var uy=(function(){function e(){gr(this,e),K(this,"cache",void 0),K(this,"keys",void 0),K(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return vr(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(n){var r,i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a={map:this.cache};return n.forEach(function(c){if(!a)a=void 0;else{var u;a=(u=a)===null||u===void 0||(u=u.map)===null||u===void 0?void 0:u.get(c)}}),(r=a)!==null&&r!==void 0&&r.value&&o&&(a.value[1]=this.cacheCallTimes++),(i=a)===null||i===void 0?void 0:i.value}},{key:"get",value:function(n){var r;return(r=this.internalGet(n,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,r){var i=this;if(!this.has(n)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var o=this.keys.reduce(function(d,f){var p=se(d,2),g=p[1];return i.internalGet(f)[1]<g?[f,i.internalGet(f)[1]]:d},[this.keys[0],this.cacheCallTimes]),a=se(o,1),c=a[0];this.delete(c)}this.keys.push(n)}var u=this.cache;n.forEach(function(d,f){if(f===n.length-1)u.set(d,{value:[r,i.cacheCallTimes++]});else{var p=u.get(d);p?p.map||(p.map=new Map):u.set(d,{map:new Map}),u=u.get(d).map}})}},{key:"deleteByPath",value:function(n,r){var i=n.get(r[0]);if(r.length===1){var o;return i.map?n.set(r[0],{map:i.map}):n.delete(r[0]),(o=i.value)===null||o===void 0?void 0:o[0]}var a=this.deleteByPath(i.map,r.slice(1));return(!i.map||i.map.size===0)&&!i.value&&n.delete(r[0]),a}},{key:"delete",value:function(n){if(this.has(n))return this.keys=this.keys.filter(function(r){return!l5(r,n)}),this.deleteByPath(this.cache,n)}}]),e})();K(uy,"MAX_CACHE_SIZE",20);K(uy,"MAX_CACHE_OFFSET",5);var l1=0,P2=(function(){function e(t){gr(this,e),K(this,"derivatives",void 0),K(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=l1,t.length===0&&(t.length>0,void 0),l1+=1}return vr(e,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,i){return i(n,r)},void 0)}}]),e})(),tg=new uy;function fv(e){var t=Array.isArray(e)?e:[e];return tg.has(t)||tg.set(t,new P2(t)),tg.get(t)}var c5=new WeakMap,ng={};function u5(e,t){for(var n=c5,r=0;r<t.length;r+=1){var i=t[r];n.has(i)||n.set(i,new WeakMap),n=n.get(i)}return n.has(ng)||n.set(ng,e()),n.get(ng)}var c1=new WeakMap;function su(e){var t=c1.get(e)||"";return t||(Object.keys(e).forEach(function(n){var r=e[n];t+=n,r instanceof P2?t+=r.id:r&&_t(r)==="object"?t+=su(r):t+=r}),t=mu(t),c1.set(e,t)),t}function u1(e,t){return mu("".concat(t,"_").concat(su(e)))}var mv=ii();function te(e){return typeof e=="number"?"".concat(e,"px"):e}function Kh(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(i)return e;var o=X(X({},r),{},K(K({},Wl,t),$o,n)),a=Object.keys(o).map(function(c){var u=o[c];return u?"".concat(c,'="').concat(u,'"'):null}).filter(function(c){return c}).join(" ");return"<style ".concat(a,">").concat(e,"</style>")}var wh=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(n?"".concat(n,"-"):"").concat(t).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},d5=function(t,n,r){return Object.keys(t).length?".".concat(n).concat(r!=null&&r.scope?".".concat(r.scope):"","{").concat(Object.entries(t).map(function(i){var o=se(i,2),a=o[0],c=o[1];return"".concat(a,":").concat(c,";")}).join(""),"}"):""},O2=function(t,n,r){var i={},o={};return Object.entries(t).forEach(function(a){var c,u,d=se(a,2),f=d[0],p=d[1];if(r!=null&&(c=r.preserve)!==null&&c!==void 0&&c[f])o[f]=p;else if((typeof p=="string"||typeof p=="number")&&!(r!=null&&(u=r.ignore)!==null&&u!==void 0&&u[f])){var g,v=wh(f,r==null?void 0:r.prefix);i[v]=typeof p=="number"&&!(r!=null&&(g=r.unitless)!==null&&g!==void 0&&g[f])?"".concat(p,"px"):String(p),o[f]="var(".concat(v,")")}}),[o,d5(i,n,{scope:r==null?void 0:r.scope})]},d1=ii()?h.useLayoutEffect:h.useEffect,hn=function(t,n){var r=h.useRef(!0);d1(function(){return t(r.current)},n),d1(function(){return r.current=!1,function(){r.current=!0}},[])},pv=function(t,n){hn(function(r){if(!r)return t()},n)},h5=X({},Rf),h1=h5.useInsertionEffect,f5=function(t,n,r){h.useMemo(t,r),hn(function(){return n(!0)},r)},m5=h1?function(e,t,n){return h1(function(){return e(),t()},n)}:f5,p5=X({},Rf),g5=p5.useInsertionEffect,v5=function(t){var n=[],r=!1;function i(o){r||n.push(o)}return h.useEffect(function(){return r=!1,function(){r=!0,n.length&&n.forEach(function(o){return o()})}},t),i},y5=function(){return function(t){t()}},b5=typeof g5<"u"?v5:y5;function dy(e,t,n,r,i){var o=h.useContext(Mu),a=o.cache,c=[e].concat(We(t)),u=hv(c),d=b5([u]),f=function(b){a.opUpdate(u,function(_){var S=_||[void 0,void 0],C=se(S,2),E=C[0],k=E===void 0?0:E,$=C[1],P=$,T=P||n(),O=[k,T];return b?b(O):O})};h.useMemo(function(){f()},[u]);var p=a.opGet(u),g=p[1];return m5(function(){i==null||i(g)},function(v){return f(function(b){var _=se(b,2),S=_[0],C=_[1];return v&&S===0&&(i==null||i(g)),[S+1,C]}),function(){a.opUpdate(u,function(b){var _=b||[],S=se(_,2),C=S[0],E=C===void 0?0:C,k=S[1],$=E-1;return $===0?(d(function(){(v||!a.opGet(u))&&(r==null||r(k,!1))}),null):[E-1,k]})}},[u]),g}var _5={},S5="css",ba=new Map;function C5(e){ba.set(e,(ba.get(e)||0)+1)}function x5(e,t){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(Wl,'="').concat(e,'"]'));n.forEach(function(r){if(r[Vs]===t){var i;(i=r.parentNode)===null||i===void 0||i.removeChild(r)}})}}var w5=0;function E5(e,t){ba.set(e,(ba.get(e)||0)-1);var n=new Set;ba.forEach(function(r,i){r<=0&&n.add(i)}),ba.size-n.size>w5&&n.forEach(function(r){x5(r,t),ba.delete(r)})}var k5=function(t,n,r,i){var o=r.getDerivativeToken(t),a=X(X({},o),n);return i&&(a=i(a)),a},I2="token";function $5(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=h.useContext(Mu),i=r.cache.instanceId,o=r.container,a=n.salt,c=a===void 0?"":a,u=n.override,d=u===void 0?_5:u,f=n.formatToken,p=n.getComputedToken,g=n.cssVar,v=u5(function(){return Object.assign.apply(Object,[{}].concat(We(t)))},t),b=su(v),_=su(d),S=g?su(g):"",C=dy(I2,[c,e.id,b,_,S],function(){var E,k=p?p(v,d,e):k5(v,d,e,f),$=X({},k),P="";if(g){var T=O2(k,g.key,{prefix:g.prefix,ignore:g.ignore,unitless:g.unitless,preserve:g.preserve}),O=se(T,2);k=O[0],P=O[1]}var N=u1(k,c);k._tokenKey=N,$._tokenKey=u1($,c);var I=(E=g==null?void 0:g.key)!==null&&E!==void 0?E:N;k._themeKey=I,C5(I);var z="".concat(S5,"-").concat(mu(N));return k._hashId=z,[k,z,$,P,(g==null?void 0:g.key)||""]},function(E){E5(E[0]._themeKey,i)},function(E){var k=se(E,4),$=k[0],P=k[3];if(g&&P){var T=fs(P,mu("css-variables-".concat($._themeKey)),{mark:$o,prepend:"queue",attachTo:o,priority:-999});T[Vs]=i,T.setAttribute(Wl,$._themeKey)}});return C}var R5=function(t,n,r){var i=se(t,5),o=i[2],a=i[3],c=i[4],u=r||{},d=u.plain;if(!a)return null;var f=o._tokenKey,p=-999,g={"data-rc-order":"prependQueue","data-rc-priority":"".concat(p)},v=Kh(a,c,f,g,d);return[p,f,v]},T5={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},N2="comm",M2="rule",z2="decl",P5="@import",O5="@namespace",I5="@keyframes",N5="@layer",j2=Math.abs,hy=String.fromCharCode;function B2(e){return e.trim()}function Eh(e,t,n){return e.replace(t,n)}function M5(e,t,n){return e.indexOf(t,n)}function Bl(e,t){return e.charCodeAt(t)|0}function Vl(e,t,n){return e.slice(t,n)}function Do(e){return e.length}function z5(e){return e.length}function Zd(e,t){return t.push(e),e}var Of=1,ql=1,L2=0,co=0,mr=0,Ql="";function fy(e,t,n,r,i,o,a,c){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Of,column:ql,length:a,return:"",siblings:c}}function j5(){return mr}function B5(){return mr=co>0?Bl(Ql,--co):0,ql--,mr===10&&(ql=1,Of--),mr}function Ro(){return mr=co<L2?Bl(Ql,co++):0,ql++,mr===10&&(ql=1,Of++),mr}function qs(){return Bl(Ql,co)}function kh(){return co}function If(e,t){return Vl(Ql,e,t)}function vu(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function L5(e){return Of=ql=1,L2=Do(Ql=e),co=0,[]}function A5(e){return Ql="",e}function rg(e){return B2(If(co-1,gv(e===91?e+2:e===40?e+1:e)))}function D5(e){for(;(mr=qs())&&mr<33;)Ro();return vu(e)>2||vu(mr)>3?"":" "}function H5(e,t){for(;--t&&Ro()&&!(mr<48||mr>102||mr>57&&mr<65||mr>70&&mr<97););return If(e,kh()+(t<6&&qs()==32&&Ro()==32))}function gv(e){for(;Ro();)switch(mr){case e:return co;case 34:case 39:e!==34&&e!==39&&gv(mr);break;case 40:e===41&&gv(e);break;case 92:Ro();break}return co}function F5(e,t){for(;Ro()&&e+mr!==57;)if(e+mr===84&&qs()===47)break;return"/*"+If(t,co-1)+"*"+hy(e===47?e:Ro())}function W5(e){for(;!vu(qs());)Ro();return If(e,co)}function V5(e){return A5($h("",null,null,null,[""],e=L5(e),0,[0],e))}function $h(e,t,n,r,i,o,a,c,u){for(var d=0,f=0,p=a,g=0,v=0,b=0,_=1,S=1,C=1,E=0,k="",$=i,P=o,T=r,O=k;S;)switch(b=E,E=Ro()){case 40:if(b!=108&&Bl(O,p-1)==58){M5(O+=Eh(rg(E),"&","&\f"),"&\f",j2(d?c[d-1]:0))!=-1&&(C=-1);break}case 34:case 39:case 91:O+=rg(E);break;case 9:case 10:case 13:case 32:O+=D5(b);break;case 92:O+=H5(kh()-1,7);continue;case 47:switch(qs()){case 42:case 47:Zd(q5(F5(Ro(),kh()),t,n,u),u),(vu(b||1)==5||vu(qs()||1)==5)&&Do(O)&&Vl(O,-1,void 0)!==" "&&(O+=" ");break;default:O+="/"}break;case 123*_:c[d++]=Do(O)*C;case 125*_:case 59:case 0:switch(E){case 0:case 125:S=0;case 59+f:C==-1&&(O=Eh(O,/\f/g,"")),v>0&&(Do(O)-p||_===0&&b===47)&&Zd(v>32?m1(O+";",r,n,p-1,u):m1(Eh(O," ","")+";",r,n,p-2,u),u);break;case 59:O+=";";default:if(Zd(T=f1(O,t,n,d,f,i,c,k,$=[],P=[],p,o),o),E===123)if(f===0)$h(O,t,T,T,$,o,p,c,P);else{switch(g){case 99:if(Bl(O,3)===110)break;case 108:if(Bl(O,2)===97)break;default:f=0;case 100:case 109:case 115:}f?$h(e,T,T,r&&Zd(f1(e,T,T,0,0,i,c,k,i,$=[],p,P),P),i,P,p,c,r?$:P):$h(O,T,T,T,[""],P,0,c,P)}}d=f=v=0,_=C=1,k=O="",p=a;break;case 58:p=1+Do(O),v=b;default:if(_<1){if(E==123)--_;else if(E==125&&_++==0&&B5()==125)continue}switch(O+=hy(E),E*_){case 38:C=f>0?1:(O+="\f",-1);break;case 44:c[d++]=(Do(O)-1)*C,C=1;break;case 64:qs()===45&&(O+=rg(Ro())),g=qs(),f=p=Do(k=O+=W5(kh())),E++;break;case 45:b===45&&Do(O)==2&&(_=0)}}return o}function f1(e,t,n,r,i,o,a,c,u,d,f,p){for(var g=i-1,v=i===0?o:[""],b=z5(v),_=0,S=0,C=0;_<r;++_)for(var E=0,k=Vl(e,g+1,g=j2(S=a[_])),$=e;E<b;++E)($=B2(S>0?v[E]+" "+k:Eh(k,/&\f/g,v[E])))&&(u[C++]=$);return fy(e,t,n,i===0?M2:c,u,d,f,p)}function q5(e,t,n,r){return fy(e,t,n,N2,hy(j5()),Vl(e,2,-2),0,r)}function m1(e,t,n,r,i){return fy(e,t,n,z2,Vl(e,0,r),Vl(e,r+1,-1),r,i)}function vv(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function U5(e,t,n,r){switch(e.type){case N5:if(e.children.length)break;case P5:case O5:case z2:return e.return=e.return||e.value;case N2:return"";case I5:return e.return=e.value+"{"+vv(e.children,r)+"}";case M2:if(!Do(e.value=e.props.join(",")))return""}return Do(n=vv(e.children,r))?e.return=e.value+"{"+n+"}":""}var p1="data-ant-cssinjs-cache-path",A2="_FILE_STYLE__",Ea,D2=!0;function K5(){if(!Ea&&(Ea={},ii())){var e=document.createElement("div");e.className=p1,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(function(i){var o=i.split(":"),a=se(o,2),c=a[0],u=a[1];Ea[c]=u});var n=document.querySelector("style[".concat(p1,"]"));if(n){var r;D2=!1,(r=n.parentNode)===null||r===void 0||r.removeChild(n)}document.body.removeChild(e)}}function G5(e){return K5(),!!Ea[e]}function X5(e){var t=Ea[e],n=null;if(t&&ii())if(D2)n=A2;else{var r=document.querySelector("style[".concat($o,'="').concat(Ea[e],'"]'));r?n=r.innerHTML:delete Ea[e]}return[n,t]}var Y5="_skip_check_",H2="_multi_value_";function Rh(e){var t=vv(V5(e),U5);return t.replace(/\{%%%\:[^;];}/g,";")}function J5(e){return _t(e)==="object"&&e&&(Y5 in e||H2 in e)}function g1(e,t,n){if(!t)return e;var r=".".concat(t),i=n==="low"?":where(".concat(r,")"):r,o=e.split(",").map(function(a){var c,u=a.trim().split(/\s+/),d=u[0]||"",f=((c=d.match(/^\w+/))===null||c===void 0?void 0:c[0])||"";return d="".concat(f).concat(i).concat(d.slice(f.length)),[d].concat(We(u.slice(1))).join(" ")});return o.join(",")}var Q5=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},i=r.root,o=r.injectHash,a=r.parentSelectors,c=n.hashId,u=n.layer;n.path;var d=n.hashPriority,f=n.transformers,p=f===void 0?[]:f;n.linters;var g="",v={};function b(C){var E=C.getName(c);if(!v[E]){var k=e(C.style,n,{root:!1,parentSelectors:a}),$=se(k,1),P=$[0];v[E]="@keyframes ".concat(C.getName(c)).concat(P)}}function _(C){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return C.forEach(function(k){Array.isArray(k)?_(k,E):k&&E.push(k)}),E}var S=_(Array.isArray(t)?t:[t]);return S.forEach(function(C){var E=typeof C=="string"&&!i?{}:C;if(typeof E=="string")g+="".concat(E,`
55
- `);else if(E._keyframe)b(E);else{var k=p.reduce(function($,P){var T;return(P==null||(T=P.visit)===null||T===void 0?void 0:T.call(P,$))||$},E);Object.keys(k).forEach(function($){var P=k[$];if(_t(P)==="object"&&P&&($!=="animationName"||!P._keyframe)&&!J5(P)){var T=!1,O=$.trim(),N=!1;(i||o)&&c?O.startsWith("@")?T=!0:O==="&"?O=g1("",c,d):O=g1($,c,d):i&&!c&&(O==="&"||O==="")&&(O="",N=!0);var I=e(P,n,{root:N,injectHash:T,parentSelectors:[].concat(We(a),[O])}),z=se(I,2),A=z[0],M=z[1];v=X(X({},v),M),g+="".concat(O).concat(A)}else{let F=function(W,V){var L=W.replace(/[A-Z]/g,function(U){return"-".concat(U.toLowerCase())}),G=V;!T5[W]&&typeof G=="number"&&G!==0&&(G="".concat(G,"px")),W==="animationName"&&V!==null&&V!==void 0&&V._keyframe&&(b(V),G=V.getName(c)),g+="".concat(L,":").concat(G,";")};var j,B=(j=P==null?void 0:P.value)!==null&&j!==void 0?j:P;_t(P)==="object"&&P!==null&&P!==void 0&&P[H2]&&Array.isArray(B)?B.forEach(function(W){F($,W)}):F($,B)}})}}),i?u&&(g&&(g="@layer ".concat(u.name," {").concat(g,"}")),u.dependencies&&(v["@layer ".concat(u.name)]=u.dependencies.map(function(C){return"@layer ".concat(C,", ").concat(u.name,";")}).join(`
56
- `))):g="{".concat(g,"}"),[g,v]};function F2(e,t){return mu("".concat(e.join("%")).concat(t))}function Z5(){return null}var W2="style";function yv(e,t){var n=e.token,r=e.path,i=e.hashId,o=e.layer,a=e.nonce,c=e.clientOnly,u=e.order,d=u===void 0?0:u,f=h.useContext(Mu),p=f.autoClear;f.mock;var g=f.defaultCache,v=f.hashPriority,b=f.container,_=f.ssrInline,S=f.transformers,C=f.linters,E=f.cache,k=f.layer,$=n._tokenKey,P=[$];k&&P.push("layer"),P.push.apply(P,We(r));var T=mv,O=dy(W2,P,function(){var M=P.join("|");if(G5(M)){var j=X5(M),B=se(j,2),F=B[0],W=B[1];if(F)return[F,$,W,{},c,d]}var V=t(),L=Q5(V,{hashId:i,hashPriority:v,layer:k?o:void 0,path:r.join("-"),transformers:S,linters:C}),G=se(L,2),U=G[0],D=G[1],q=Rh(U),Y=F2(P,q);return[q,$,Y,D,c,d]},function(M,j){var B=se(M,3),F=B[2];(j||p)&&mv&&pu(F,{mark:$o,attachTo:b})},function(M){var j=se(M,4),B=j[0];j[1];var F=j[2],W=j[3];if(T&&B!==A2){var V={mark:$o,prepend:k?!1:"queue",attachTo:b,priority:d},L=typeof a=="function"?a():a;L&&(V.csp={nonce:L});var G=[],U=[];Object.keys(W).forEach(function(q){q.startsWith("@layer")?G.push(q):U.push(q)}),G.forEach(function(q){fs(Rh(W[q]),"_layer-".concat(q),X(X({},V),{},{prepend:!0}))});var D=fs(B,F,V);D[Vs]=E.instanceId,D.setAttribute(Wl,$),U.forEach(function(q){fs(Rh(W[q]),"_effect-".concat(q),V)})}}),N=se(O,3),I=N[0],z=N[1],A=N[2];return function(M){var j;return!_||T||!g?j=h.createElement(Z5,null):j=h.createElement("style",Re({},K(K({},Wl,z),$o,A),{dangerouslySetInnerHTML:{__html:I}})),h.createElement(h.Fragment,null,j,M)}}var eP=function(t,n,r){var i=se(t,6),o=i[0],a=i[1],c=i[2],u=i[3],d=i[4],f=i[5],p=r||{},g=p.plain;if(d)return null;var v=o,b={"data-rc-order":"prependQueue","data-rc-priority":"".concat(f)};return v=Kh(o,a,c,b,g),u&&Object.keys(u).forEach(function(_){if(!n[_]){n[_]=!0;var S=Rh(u[_]),C=Kh(S,a,"_effect-".concat(_),b,g);_.startsWith("@layer")?v=C+v:v+=C}}),[f,c,v]},V2="cssVar",tP=function(t,n){var r=t.key,i=t.prefix,o=t.unitless,a=t.ignore,c=t.token,u=t.scope,d=u===void 0?"":u,f=h.useContext(Mu),p=f.cache.instanceId,g=f.container,v=c._tokenKey,b=[].concat(We(t.path),[r,d,v]),_=dy(V2,b,function(){var S=n(),C=O2(S,r,{prefix:i,unitless:o,ignore:a,scope:d}),E=se(C,2),k=E[0],$=E[1],P=F2(b,$);return[k,$,P,r]},function(S){var C=se(S,3),E=C[2];mv&&pu(E,{mark:$o,attachTo:g})},function(S){var C=se(S,3),E=C[1],k=C[2];if(E){var $=fs(E,k,{mark:$o,prepend:"queue",attachTo:g,priority:-999});$[Vs]=p,$.setAttribute(Wl,r)}});return _},nP=function(t,n,r){var i=se(t,4),o=i[1],a=i[2],c=i[3],u=r||{},d=u.plain;if(!o)return null;var f=-999,p={"data-rc-order":"prependQueue","data-rc-priority":"".concat(f)},g=Kh(o,c,a,p,d);return[f,a,g]};K(K(K({},W2,eP),I2,R5),V2,nP);var Yt=(function(){function e(t,n){gr(this,e),K(this,"name",void 0),K(this,"style",void 0),K(this,"_keyframe",!0),this.name=t,this.style=n}return vr(e,[{key:"getName",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return n?"".concat(n,"-").concat(this.name):this.name}}]),e})();function ml(e){return e.notSplit=!0,e}ml(["borderTop","borderBottom"]),ml(["borderTop"]),ml(["borderBottom"]),ml(["borderLeft","borderRight"]),ml(["borderLeft"]),ml(["borderRight"]);var my=h.createContext({});function q2(e){return E2(e)||S2(e)||ay(e)||k2()}function Ho(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function U2(e,t,n,r){if(!t.length)return n;var i=q2(t),o=i[0],a=i.slice(1),c;return!e&&typeof o=="number"?c=[]:Array.isArray(e)?c=We(e):c=X({},e),r&&n===void 0&&a.length===1?delete c[o][a[0]]:c[o]=U2(c[o],a,n,r),c}function Co(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!Ho(e,t.slice(0,-1))?e:U2(e,t,n,r)}function rP(e){return _t(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function v1(e){return Array.isArray(e)?[]:{}}var iP=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Ol(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=v1(t[0]);return t.forEach(function(i){function o(a,c){var u=new Set(c),d=Ho(i,a),f=Array.isArray(d);if(f||rP(d)){if(!u.has(d)){u.add(d);var p=Ho(r,a);f?r=Co(r,a,[]):(!p||_t(p)!=="object")&&(r=Co(r,a,v1(d))),iP(d).forEach(function(g){o([].concat(We(a),[g]),u)})}}else r=Co(r,a,d)}o([])}),r}function oP(){}const sP=h.createContext({}),Nf=()=>{const e=()=>{};return e.deprecated=oP,e},aP=h.createContext(void 0);var K2={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},lP={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},cP=X(X({},lP),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const G2={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},y1={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},cP),timePickerLocale:Object.assign({},G2)},zi="${label} is not a valid ${type}",Ys={locale:"en",Pagination:K2,DatePicker:y1,TimePicker:G2,Calendar:y1,global:{placeholder:"Please select",close:"Close"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:zi,method:zi,array:zi,object:zi,number:zi,date:zi,boolean:zi,integer:zi,float:zi,regexp:zi,email:zi,url:zi,hex:zi},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};let Th=Object.assign({},Ys.Modal),Ph=[];const b1=()=>Ph.reduce((e,t)=>Object.assign(Object.assign({},e),t),Ys.Modal);function uP(e){if(e){const t=Object.assign({},e);return Ph.push(t),Th=b1(),()=>{Ph=Ph.filter(n=>n!==t),Th=b1()}}Th=Object.assign({},Ys.Modal)}function X2(){return Th}const py=h.createContext(void 0),gs=(e,t)=>{const n=h.useContext(py),r=h.useMemo(()=>{var o;const a=t||Ys[e],c=(o=n==null?void 0:n[e])!==null&&o!==void 0?o:{};return Object.assign(Object.assign({},typeof a=="function"?a():a),c||{})},[e,t,n]),i=h.useMemo(()=>{const o=n==null?void 0:n.locale;return n!=null&&n.exist&&!o?Ys.locale:o},[n]);return[r,i]},dP="internalMark",hP=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;h.useEffect(()=>uP(t==null?void 0:t.Modal),[t]);const i=h.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return h.createElement(py.Provider,{value:i},n)},gy={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},yu=Object.assign(Object.assign({},gy),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
57
- 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
58
- 'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),Ir=Math.round;function ig(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)r[i]=t(r[i]||0,n[i]||"",i);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const _1=(e,t,n)=>n===0?e:e/100;function Mc(e,t){const n=t||255;return e>n?n:e<0?0:e}class vn{constructor(t){K(this,"isValid",!0),K(this,"r",0),K(this,"g",0),K(this,"b",0),K(this,"a",1),K(this,"_h",void 0),K(this,"_s",void 0),K(this,"_l",void 0),K(this,"_v",void 0),K(this,"_max",void 0),K(this,"_min",void 0),K(this,"_brightness",void 0);function n(i){return i[0]in t&&i[1]in t&&i[2]in t}if(t)if(typeof t=="string"){let o=function(a){return i.startsWith(a)};var r=o;const i=t.trim();/^#?[A-F\d]{3,8}$/i.test(i)?this.fromHexString(i):o("rgb")?this.fromRgbString(i):o("hsl")?this.fromHslString(i):(o("hsv")||o("hsb"))&&this.fromHsvString(i)}else if(t instanceof vn)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=Mc(t.r),this.g=Mc(t.g),this.b=Mc(t.b),this.a=typeof t.a=="number"?Mc(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(o){const a=o/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),i=t(this.b);return .2126*n+.7152*r+.0722*i}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Ir(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()-t/100;return i<0&&(i=0),this._c({h:n,s:r,l:i,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()+t/100;return i>1&&(i=1),this._c({h:n,s:r,l:i,a:this.a})}mix(t,n=50){const r=this._c(t),i=n/100,o=c=>(r[c]-this[c])*i+this[c],a={r:Ir(o("r")),g:Ir(o("g")),b:Ir(o("b")),a:Ir(o("a")*100)/100};return this._c(a)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),i=o=>Ir((this[o]*this.a+n[o]*n.a*(1-this.a))/r);return this._c({r:i("r"),g:i("g"),b:i("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const i=(this.b||0).toString(16);if(t+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=Ir(this.a*255).toString(16);t+=o.length===2?o:"0"+o}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=Ir(this.getSaturation()*100),r=Ir(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const i=this.clone();return i[t]=Mc(n,r),i}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(i,o){return parseInt(n[i]+n[o||i],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a:i}){if(this._h=t%360,this._s=n,this._l=r,this.a=typeof i=="number"?i:1,n<=0){const g=Ir(r*255);this.r=g,this.g=g,this.b=g}let o=0,a=0,c=0;const u=t/60,d=(1-Math.abs(2*r-1))*n,f=d*(1-Math.abs(u%2-1));u>=0&&u<1?(o=d,a=f):u>=1&&u<2?(o=f,a=d):u>=2&&u<3?(a=d,c=f):u>=3&&u<4?(a=f,c=d):u>=4&&u<5?(o=f,c=d):u>=5&&u<6&&(o=d,c=f);const p=r-d/2;this.r=Ir((o+p)*255),this.g=Ir((a+p)*255),this.b=Ir((c+p)*255)}fromHsv({h:t,s:n,v:r,a:i}){this._h=t%360,this._s=n,this._v=r,this.a=typeof i=="number"?i:1;const o=Ir(r*255);if(this.r=o,this.g=o,this.b=o,n<=0)return;const a=t/60,c=Math.floor(a),u=a-c,d=Ir(r*(1-n)*255),f=Ir(r*(1-n*u)*255),p=Ir(r*(1-n*(1-u))*255);switch(c){case 0:this.g=p,this.b=d;break;case 1:this.r=f,this.b=d;break;case 2:this.r=d,this.b=p;break;case 3:this.r=d,this.g=f;break;case 4:this.r=p,this.g=d;break;case 5:default:this.g=d,this.b=f;break}}fromHsvString(t){const n=ig(t,_1);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=ig(t,_1);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=ig(t,(r,i)=>i.includes("%")?Ir(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var eh=2,S1=.16,fP=.05,mP=.05,pP=.15,Y2=5,J2=4,gP=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function C1(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-eh*t:Math.round(e.h)+eh*t:r=n?Math.round(e.h)+eh*t:Math.round(e.h)-eh*t,r<0?r+=360:r>=360&&(r-=360),r}function x1(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-S1*t:t===J2?r=e.s+S1:r=e.s+fP*t,r>1&&(r=1),n&&t===Y2&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function w1(e,t,n){var r;return n?r=e.v+mP*t:r=e.v-pP*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Ra(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new vn(e),i=r.toHsv(),o=Y2;o>0;o-=1){var a=new vn({h:C1(i,o,!0),s:x1(i,o,!0),v:w1(i,o,!0)});n.push(a)}n.push(r);for(var c=1;c<=J2;c+=1){var u=new vn({h:C1(i,c),s:x1(i,c),v:w1(i,c)});n.push(u)}return t.theme==="dark"?gP.map(function(d){var f=d.index,p=d.amount;return new vn(t.backgroundColor||"#141414").mix(n[f],p).toHexString()}):n.map(function(d){return d.toHexString()})}var og={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},bv=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];bv.primary=bv[5];var _v=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];_v.primary=_v[5];var Sv=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Sv.primary=Sv[5];var Gh=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Gh.primary=Gh[5];var Cv=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Cv.primary=Cv[5];var xv=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];xv.primary=xv[5];var wv=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];wv.primary=wv[5];var Ev=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Ev.primary=Ev[5];var Xh=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Xh.primary=Xh[5];var kv=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];kv.primary=kv[5];var $v=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];$v.primary=$v[5];var Rv=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];Rv.primary=Rv[5];var Tv=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Tv.primary=Tv[5];var sg={red:bv,volcano:_v,orange:Sv,gold:Gh,yellow:Cv,lime:xv,green:wv,cyan:Ev,blue:Xh,geekblue:kv,purple:$v,magenta:Rv,grey:Tv};function Q2(e,{generateColorPalettes:t,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:i,colorError:o,colorInfo:a,colorPrimary:c,colorBgBase:u,colorTextBase:d}=e,f=t(c),p=t(r),g=t(i),v=t(o),b=t(a),_=n(u,d),S=e.colorLink||e.colorInfo,C=t(S),E=new vn(v[1]).mix(new vn(v[3]),50).toHexString();return Object.assign(Object.assign({},_),{colorPrimaryBg:f[1],colorPrimaryBgHover:f[2],colorPrimaryBorder:f[3],colorPrimaryBorderHover:f[4],colorPrimaryHover:f[5],colorPrimary:f[6],colorPrimaryActive:f[7],colorPrimaryTextHover:f[8],colorPrimaryText:f[9],colorPrimaryTextActive:f[10],colorSuccessBg:p[1],colorSuccessBgHover:p[2],colorSuccessBorder:p[3],colorSuccessBorderHover:p[4],colorSuccessHover:p[4],colorSuccess:p[6],colorSuccessActive:p[7],colorSuccessTextHover:p[8],colorSuccessText:p[9],colorSuccessTextActive:p[10],colorErrorBg:v[1],colorErrorBgHover:v[2],colorErrorBgFilledHover:E,colorErrorBgActive:v[3],colorErrorBorder:v[3],colorErrorBorderHover:v[4],colorErrorHover:v[5],colorError:v[6],colorErrorActive:v[7],colorErrorTextHover:v[8],colorErrorText:v[9],colorErrorTextActive:v[10],colorWarningBg:g[1],colorWarningBgHover:g[2],colorWarningBorder:g[3],colorWarningBorderHover:g[4],colorWarningHover:g[4],colorWarning:g[6],colorWarningActive:g[7],colorWarningTextHover:g[8],colorWarningText:g[9],colorWarningTextActive:g[10],colorInfoBg:b[1],colorInfoBgHover:b[2],colorInfoBorder:b[3],colorInfoBorderHover:b[4],colorInfoHover:b[4],colorInfo:b[6],colorInfoActive:b[7],colorInfoTextHover:b[8],colorInfoText:b[9],colorInfoTextActive:b[10],colorLinkHover:C[4],colorLink:C[6],colorLinkActive:C[7],colorBgMask:new vn("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const vP=e=>{let t=e,n=e,r=e,i=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?i=4:e>=8&&(i=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:i}};function yP(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:i}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:i+1},vP(r))}const bP=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function Oh(e){return(e+8)/e}function _P(e){const t=Array.from({length:10}).map((n,r)=>{const i=r-1,o=e*Math.pow(Math.E,i/5),a=r>1?Math.floor(o):Math.ceil(o);return Math.floor(a/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:Oh(n)}))}const SP=e=>{const t=_P(e),n=t.map(f=>f.size),r=t.map(f=>f.lineHeight),i=n[1],o=n[0],a=n[2],c=r[1],u=r[0],d=r[2];return{fontSizeSM:o,fontSize:i,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:c,lineHeightLG:d,lineHeightSM:u,fontHeight:Math.round(c*i),fontHeightLG:Math.round(d*a),fontHeightSM:Math.round(u*o),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function CP(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const Zi=(e,t)=>new vn(e).setA(t).toRgbString(),zc=(e,t)=>new vn(e).darken(t).toHexString(),xP=e=>{const t=Ra(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},wP=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:Zi(r,.88),colorTextSecondary:Zi(r,.65),colorTextTertiary:Zi(r,.45),colorTextQuaternary:Zi(r,.25),colorFill:Zi(r,.15),colorFillSecondary:Zi(r,.06),colorFillTertiary:Zi(r,.04),colorFillQuaternary:Zi(r,.02),colorBgSolid:Zi(r,1),colorBgSolidHover:Zi(r,.75),colorBgSolidActive:Zi(r,.95),colorBgLayout:zc(n,4),colorBgContainer:zc(n,0),colorBgElevated:zc(n,0),colorBgSpotlight:Zi(r,.85),colorBgBlur:"transparent",colorBorder:zc(n,15),colorBorderSecondary:zc(n,6)}};function Z2(e){og.pink=og.magenta,sg.pink=sg.magenta;const t=Object.keys(gy).map(n=>{const r=e[n]===og[n]?sg[n]:Ra(e[n]);return Array.from({length:10},()=>1).reduce((i,o,a)=>(i[`${n}-${a+1}`]=r[a],i[`${n}${a+1}`]=r[a],i),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),Q2(e,{generateColorPalettes:xP,generateNeutralColorPalettes:wP})),SP(e.fontSize)),CP(e)),bP(e)),yP(e))}const eE=fv(Z2),Yh={token:yu,override:{override:yu},hashed:!0},tE=Q.createContext(Yh),bu="ant",Mf="anticon",EP=["outlined","borderless","filled","underlined"],kP=(e,t)=>t||(e?`${bu}-${e}`:bu),Ot=h.createContext({getPrefixCls:kP,iconPrefixCls:Mf}),{Consumer:CZ}=Ot,E1={};function Ur(e){const t=h.useContext(Ot),{getPrefixCls:n,direction:r,getPopupContainer:i}=t,o=t[e];return Object.assign(Object.assign({classNames:E1,styles:E1},o),{getPrefixCls:n,direction:r,getPopupContainer:i})}const $P=`-ant-${Date.now()}-${Math.random()}`;function RP(e,t){const n={},r=(a,c)=>{let u=a.clone();return u=(c==null?void 0:c(u))||u,u.toRgbString()},i=(a,c)=>{const u=new vn(a),d=Ra(u.toRgbString());n[`${c}-color`]=r(u),n[`${c}-color-disabled`]=d[1],n[`${c}-color-hover`]=d[4],n[`${c}-color-active`]=d[6],n[`${c}-color-outline`]=u.clone().setA(.2).toRgbString(),n[`${c}-color-deprecated-bg`]=d[0],n[`${c}-color-deprecated-border`]=d[2]};if(t.primaryColor){i(t.primaryColor,"primary");const a=new vn(t.primaryColor),c=Ra(a.toRgbString());c.forEach((d,f)=>{n[`primary-${f+1}`]=d}),n["primary-color-deprecated-l-35"]=r(a,d=>d.lighten(35)),n["primary-color-deprecated-l-20"]=r(a,d=>d.lighten(20)),n["primary-color-deprecated-t-20"]=r(a,d=>d.tint(20)),n["primary-color-deprecated-t-50"]=r(a,d=>d.tint(50)),n["primary-color-deprecated-f-12"]=r(a,d=>d.setA(d.a*.12));const u=new vn(c[0]);n["primary-color-active-deprecated-f-30"]=r(u,d=>d.setA(d.a*.3)),n["primary-color-active-deprecated-d-02"]=r(u,d=>d.darken(2))}return t.successColor&&i(t.successColor,"success"),t.warningColor&&i(t.warningColor,"warning"),t.errorColor&&i(t.errorColor,"error"),t.infoColor&&i(t.infoColor,"info"),`
59
- :root {
60
- ${Object.keys(n).map(a=>`--${e}-${a}: ${n[a]};`).join(`
61
- `)}
62
- }
63
- `.trim()}function TP(e,t){const n=RP(e,t);ii()&&fs(n,`${$P}-dynamic-theme`)}const Js=h.createContext(!1),nE=({children:e,disabled:t})=>{const n=h.useContext(Js);return h.createElement(Js.Provider,{value:t??n},e)},Ul=h.createContext(void 0),PP=({children:e,size:t})=>{const n=h.useContext(Ul);return h.createElement(Ul.Provider,{value:t||n},e)};function OP(){const e=h.useContext(Js),t=h.useContext(Ul);return{componentDisabled:e,componentSize:t}}var rE=vr(function e(){gr(this,e)}),iE="CALC_UNIT",IP=new RegExp(iE,"g");function ag(e){return typeof e=="number"?"".concat(e).concat(iE):e}var NP=(function(e){ms(n,e);var t=ps(n);function n(r,i){var o;gr(this,n),o=t.call(this),K(Zt(o),"result",""),K(Zt(o),"unitlessCssVar",void 0),K(Zt(o),"lowPriority",void 0);var a=_t(r);return o.unitlessCssVar=i,r instanceof n?o.result="(".concat(r.result,")"):a==="number"?o.result=ag(r):a==="string"&&(o.result=r),o}return vr(n,[{key:"add",value:function(i){return i instanceof n?this.result="".concat(this.result," + ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," + ").concat(ag(i))),this.lowPriority=!0,this}},{key:"sub",value:function(i){return i instanceof n?this.result="".concat(this.result," - ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," - ").concat(ag(i))),this.lowPriority=!0,this}},{key:"mul",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof n?this.result="".concat(this.result," * ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," * ").concat(i)),this.lowPriority=!1,this}},{key:"div",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof n?this.result="".concat(this.result," / ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," / ").concat(i)),this.lowPriority=!1,this}},{key:"getResult",value:function(i){return this.lowPriority||i?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(i){var o=this,a=i||{},c=a.unit,u=!0;return typeof c=="boolean"?u=c:Array.from(this.unitlessCssVar).some(function(d){return o.result.includes(d)})&&(u=!1),this.result=this.result.replace(IP,u?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n})(rE),MP=(function(e){ms(n,e);var t=ps(n);function n(r){var i;return gr(this,n),i=t.call(this),K(Zt(i),"result",0),r instanceof n?i.result=r.result:typeof r=="number"&&(i.result=r),i}return vr(n,[{key:"add",value:function(i){return i instanceof n?this.result+=i.result:typeof i=="number"&&(this.result+=i),this}},{key:"sub",value:function(i){return i instanceof n?this.result-=i.result:typeof i=="number"&&(this.result-=i),this}},{key:"mul",value:function(i){return i instanceof n?this.result*=i.result:typeof i=="number"&&(this.result*=i),this}},{key:"div",value:function(i){return i instanceof n?this.result/=i.result:typeof i=="number"&&(this.result/=i),this}},{key:"equal",value:function(){return this.result}}]),n})(rE),zP=function(t,n){var r=t==="css"?NP:MP;return function(i){return new r(i,n)}},k1=function(t,n){return"".concat([n,t.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function Zn(e){var t=h.useRef();t.current=e;var n=h.useCallback(function(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(o))},[]);return n}function Kl(e){var t=h.useRef(!1),n=h.useState(e),r=se(n,2),i=r[0],o=r[1];h.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function a(c,u){u&&t.current||o(c)}return[i,a]}function lg(e){return e!==void 0}function er(e,t){var n=t||{},r=n.defaultValue,i=n.value,o=n.onChange,a=n.postState,c=Kl(function(){return lg(i)?i:lg(r)?typeof r=="function"?r():r:typeof e=="function"?e():e}),u=se(c,2),d=u[0],f=u[1],p=i!==void 0?i:d,g=a?a(p):p,v=Zn(o),b=Kl([p]),_=se(b,2),S=_[0],C=_[1];pv(function(){var k=S[0];d!==k&&v(d,k)},[S]),pv(function(){lg(i)||f(i)},[i]);var E=Zn(function(k,$){f(k,$),C([p],$)});return[g,E]}function $1(e,t,n,r){var i=X({},t[e]);if(r!=null&&r.deprecatedTokens){var o=r.deprecatedTokens;o.forEach(function(c){var u=se(c,2),d=u[0],f=u[1];if(i!=null&&i[d]||i!=null&&i[f]){var p;(p=i[f])!==null&&p!==void 0||(i[f]=i==null?void 0:i[d])}})}var a=X(X({},n),i);return Object.keys(a).forEach(function(c){a[c]===t[c]&&delete a[c]}),a}var oE=typeof CSSINJS_STATISTIC<"u",Pv=!0;function tn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!oE)return Object.assign.apply(Object,[{}].concat(t));Pv=!1;var r={};return t.forEach(function(i){if(_t(i)==="object"){var o=Object.keys(i);o.forEach(function(a){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){return i[a]}})})}}),Pv=!0,r}var R1={};function jP(){}var BP=function(t){var n,r=t,i=jP;return oE&&typeof Proxy<"u"&&(n=new Set,r=new Proxy(t,{get:function(a,c){if(Pv){var u;(u=n)===null||u===void 0||u.add(c)}return a[c]}}),i=function(a,c){var u;R1[a]={global:Array.from(n),component:X(X({},(u=R1[a])===null||u===void 0?void 0:u.component),c)}}),{token:r,keys:n,flush:i}};function T1(e,t,n){if(typeof n=="function"){var r;return n(tn(t,(r=t[e])!==null&&r!==void 0?r:{}))}return n??{}}function LP(e){return e==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return"max(".concat(r.map(function(o){return te(o)}).join(","),")")},min:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return"min(".concat(r.map(function(o){return te(o)}).join(","),")")}}}var AP=1e3*60*10,DP=(function(){function e(){gr(this,e),K(this,"map",new Map),K(this,"objectIDMap",new WeakMap),K(this,"nextID",0),K(this,"lastAccessBeat",new Map),K(this,"accessBeat",0)}return vr(e,[{key:"set",value:function(n,r){this.clear();var i=this.getCompositeKey(n);this.map.set(i,r),this.lastAccessBeat.set(i,Date.now())}},{key:"get",value:function(n){var r=this.getCompositeKey(n),i=this.map.get(r);return this.lastAccessBeat.set(r,Date.now()),this.accessBeat+=1,i}},{key:"getCompositeKey",value:function(n){var r=this,i=n.map(function(o){return o&&_t(o)==="object"?"obj_".concat(r.getObjectID(o)):"".concat(_t(o),"_").concat(o)});return i.join("|")}},{key:"getObjectID",value:function(n){if(this.objectIDMap.has(n))return this.objectIDMap.get(n);var r=this.nextID;return this.objectIDMap.set(n,r),this.nextID+=1,r}},{key:"clear",value:function(){var n=this;if(this.accessBeat>1e4){var r=Date.now();this.lastAccessBeat.forEach(function(i,o){r-i>AP&&(n.map.delete(o),n.lastAccessBeat.delete(o))}),this.accessBeat=0}}}]),e})(),P1=new DP;function HP(e,t){return Q.useMemo(function(){var n=P1.get(t);if(n)return n;var r=e();return P1.set(t,r),r},t)}var FP=function(){return{}};function WP(e){var t=e.useCSP,n=t===void 0?FP:t,r=e.useToken,i=e.usePrefix,o=e.getResetStyles,a=e.getCommonStyle,c=e.getCompUnitless;function u(g,v,b,_){var S=Array.isArray(g)?g[0]:g;function C(N){return"".concat(String(S)).concat(N.slice(0,1).toUpperCase()).concat(N.slice(1))}var E=(_==null?void 0:_.unitless)||{},k=typeof c=="function"?c(g):{},$=X(X({},k),{},K({},C("zIndexPopup"),!0));Object.keys(E).forEach(function(N){$[C(N)]=E[N]});var P=X(X({},_),{},{unitless:$,prefixToken:C}),T=f(g,v,b,P),O=d(S,b,P);return function(N){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:N,z=T(N,I),A=se(z,2),M=A[1],j=O(I),B=se(j,2),F=B[0],W=B[1];return[F,M,W]}}function d(g,v,b){var _=b.unitless,S=b.injectStyle,C=S===void 0?!0:S,E=b.prefixToken,k=b.ignore,$=function(O){var N=O.rootCls,I=O.cssVar,z=I===void 0?{}:I,A=r(),M=A.realToken;return tP({path:[g],prefix:z.prefix,key:z.key,unitless:_,ignore:k,token:M,scope:N},function(){var j=T1(g,M,v),B=$1(g,M,j,{deprecatedTokens:b==null?void 0:b.deprecatedTokens});return Object.keys(j).forEach(function(F){B[E(F)]=B[F],delete B[F]}),B}),null},P=function(O){var N=r(),I=N.cssVar;return[function(z){return C&&I?Q.createElement(Q.Fragment,null,Q.createElement($,{rootCls:O,cssVar:I,component:g}),z):z},I==null?void 0:I.key]};return P}function f(g,v,b){var _=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},S=Array.isArray(g)?g:[g,g],C=se(S,1),E=C[0],k=S.join("-"),$=e.layer||{name:"antd"};return function(P){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:P,O=r(),N=O.theme,I=O.realToken,z=O.hashId,A=O.token,M=O.cssVar,j=i(),B=j.rootPrefixCls,F=j.iconPrefixCls,W=n(),V=M?"css":"js",L=HP(function(){var ee=new Set;return M&&Object.keys(_.unitless||{}).forEach(function(Z){ee.add(wh(Z,M.prefix)),ee.add(wh(Z,k1(E,M.prefix)))}),zP(V,ee)},[V,E,M==null?void 0:M.prefix]),G=LP(V),U=G.max,D=G.min,q={theme:N,token:A,hashId:z,nonce:function(){return W.nonce},clientOnly:_.clientOnly,layer:$,order:_.order||-999};typeof o=="function"&&yv(X(X({},q),{},{clientOnly:!1,path:["Shared",B]}),function(){return o(A,{prefix:{rootPrefixCls:B,iconPrefixCls:F},csp:W})});var Y=yv(X(X({},q),{},{path:[k,P,F]}),function(){if(_.injectStyle===!1)return[];var ee=BP(A),Z=ee.token,re=ee.flush,he=T1(E,I,b),fe=".".concat(P),ue=$1(E,I,he,{deprecatedTokens:_.deprecatedTokens});M&&he&&_t(he)==="object"&&Object.keys(he).forEach(function(ce){he[ce]="var(".concat(wh(ce,k1(E,M.prefix)),")")});var Se=tn(Z,{componentCls:fe,prefixCls:P,iconCls:".".concat(F),antCls:".".concat(B),calc:L,max:U,min:D},M?he:ue),ae=v(Se,{hashId:z,prefixCls:P,rootPrefixCls:B,iconPrefixCls:F});re(E,ue);var le=typeof a=="function"?a(Se,P,T,_.resetFont):null;return[_.resetStyle===!1?null:le,ae]});return[Y,z]}}function p(g,v,b){var _=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},S=f(g,v,b,X({resetStyle:!1,order:-998},_)),C=function(k){var $=k.prefixCls,P=k.rootCls,T=P===void 0?$:P;return S($,T),null};return C}return{genStyleHooks:u,genSubStyleComponent:p,genComponentStyleHook:f}}const Qs=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],VP="5.29.3";function cg(e){return e>=0&&e<=255}function Xc(e,t){const{r:n,g:r,b:i,a:o}=new vn(e).toRgb();if(o<1)return e;const{r:a,g:c,b:u}=new vn(t).toRgb();for(let d=.01;d<=1;d+=.01){const f=Math.round((n-a*(1-d))/d),p=Math.round((r-c*(1-d))/d),g=Math.round((i-u*(1-d))/d);if(cg(f)&&cg(p)&&cg(g))return new vn({r:f,g:p,b:g,a:Math.round(d*100)/100}).toRgbString()}return new vn({r:n,g:r,b:i,a:1}).toRgbString()}var qP=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function sE(e){const{override:t}=e,n=qP(e,["override"]),r=Object.assign({},t);Object.keys(yu).forEach(g=>{delete r[g]});const i=Object.assign(Object.assign({},n),r),o=480,a=576,c=768,u=992,d=1200,f=1600;return i.motion===!1&&(i.motionDurationFast="0s",i.motionDurationMid="0s",i.motionDurationSlow="0s"),Object.assign(Object.assign(Object.assign({},i),{colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:Xc(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:Xc(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:Xc(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:i.lineWidth*3,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:Xc(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:`
64
- 0 6px 16px 0 rgba(0, 0, 0, 0.08),
65
- 0 3px 6px -4px rgba(0, 0, 0, 0.12),
66
- 0 9px 28px 8px rgba(0, 0, 0, 0.05)
67
- `,boxShadowSecondary:`
68
- 0 6px 16px 0 rgba(0, 0, 0, 0.08),
69
- 0 3px 6px -4px rgba(0, 0, 0, 0.12),
70
- 0 9px 28px 8px rgba(0, 0, 0, 0.05)
71
- `,boxShadowTertiary:`
72
- 0 1px 2px 0 rgba(0, 0, 0, 0.03),
73
- 0 1px 6px -1px rgba(0, 0, 0, 0.02),
74
- 0 2px 4px 0 rgba(0, 0, 0, 0.02)
75
- `,screenXS:o,screenXSMin:o,screenXSMax:a-1,screenSM:a,screenSMMin:a,screenSMMax:c-1,screenMD:c,screenMDMin:c,screenMDMax:u-1,screenLG:u,screenLGMin:u,screenLGMax:d-1,screenXL:d,screenXLMin:d,screenXLMax:f-1,screenXXL:f,screenXXLMin:f,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
76
- 0 1px 2px -2px ${new vn("rgba(0, 0, 0, 0.16)").toRgbString()},
77
- 0 3px 6px 0 ${new vn("rgba(0, 0, 0, 0.12)").toRgbString()},
78
- 0 5px 12px 4px ${new vn("rgba(0, 0, 0, 0.09)").toRgbString()}
79
- `,boxShadowDrawerRight:`
80
- -6px 0 16px 0 rgba(0, 0, 0, 0.08),
81
- -3px 0 6px -4px rgba(0, 0, 0, 0.12),
82
- -9px 0 28px 8px rgba(0, 0, 0, 0.05)
83
- `,boxShadowDrawerLeft:`
84
- 6px 0 16px 0 rgba(0, 0, 0, 0.08),
85
- 3px 0 6px -4px rgba(0, 0, 0, 0.12),
86
- 9px 0 28px 8px rgba(0, 0, 0, 0.05)
87
- `,boxShadowDrawerUp:`
88
- 0 6px 16px 0 rgba(0, 0, 0, 0.08),
89
- 0 3px 6px -4px rgba(0, 0, 0, 0.12),
90
- 0 9px 28px 8px rgba(0, 0, 0, 0.05)
91
- `,boxShadowDrawerDown:`
92
- 0 -6px 16px 0 rgba(0, 0, 0, 0.08),
93
- 0 -3px 6px -4px rgba(0, 0, 0, 0.12),
94
- 0 -9px 28px 8px rgba(0, 0, 0, 0.05)
95
- `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var O1=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const aE={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},UP={motionBase:!0,motionUnit:!0},KP={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},lE=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:i}=t,o=O1(t,["override"]);let a=Object.assign(Object.assign({},r),{override:i});return a=sE(a),o&&Object.entries(o).forEach(([c,u])=>{const{theme:d}=u,f=O1(u,["theme"]);let p=f;d&&(p=lE(Object.assign(Object.assign({},a),f),{override:f},d)),a[c]=p}),a};function mi(){const{token:e,hashed:t,theme:n,override:r,cssVar:i}=Q.useContext(tE),o=`${VP}-${t||""}`,a=n||eE,[c,u,d]=$5(a,[yu,e],{salt:o,override:r,getComputedToken:lE,formatToken:sE,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:aE,ignore:UP,preserve:KP}});return[a,d,t?u:"",c,i]}const _u={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Vn=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),Zl=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),Jh=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),GP=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),XP=(e,t,n,r)=>{const i=`[class^="${t}"], [class*=" ${t}"]`,o=n?`.${n}`:i,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let c={};return r!==!1&&(c={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[o]:Object.assign(Object.assign(Object.assign({},c),a),{[i]:a})}},Ta=(e,t)=>({outline:`${te(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:"outline-offset 0s, outline 0s"}),uo=(e,t)=>({"&:focus-visible":Ta(e,t)}),cE=e=>({[`.${e}`]:Object.assign(Object.assign({},Zl()),{[`.${e} .${e}-icon`]:{display:"block"}})}),uE=e=>Object.assign(Object.assign({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},uo(e)),{"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}}),{genStyleHooks:yn,genComponentStyleHook:YP,genSubStyleComponent:zu}=WP({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=h.useContext(Ot);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,i]=mi();return{theme:e,realToken:t,hashId:n,token:r,cssVar:i}},useCSP:()=>{const{csp:e}=h.useContext(Ot);return e??{}},getResetStyles:(e,t)=>{var n;const r=GP(e);return[r,{"&":r},cE((n=t==null?void 0:t.prefix.iconPrefixCls)!==null&&n!==void 0?n:Mf)]},getCommonStyle:XP,getCompUnitless:()=>aE});function zf(e,t){return Qs.reduce((n,r)=>{const i=e[`${r}1`],o=e[`${r}3`],a=e[`${r}6`],c=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:i,lightBorderColor:o,darkColor:a,textColor:c}))},{})}const JP=(e,t)=>{const[n,r]=mi();return yv({token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>cE(e))},QP=Object.assign({},Rf),{useId:I1}=QP,ZP=()=>"",eO=typeof I1>"u"?ZP:I1;function tO(e,t,n){var r;Nf();const i=e||{},o=i.inherit===!1||!t?Object.assign(Object.assign({},Yh),{hashed:(r=t==null?void 0:t.hashed)!==null&&r!==void 0?r:Yh.hashed,cssVar:t==null?void 0:t.cssVar}):t,a=eO();return Nu(()=>{var c,u;if(!e)return t;const d=Object.assign({},o.components);Object.keys(e.components||{}).forEach(g=>{d[g]=Object.assign(Object.assign({},d[g]),e.components[g])});const f=`css-var-${a.replace(/:/g,"")}`,p=((c=i.cssVar)!==null&&c!==void 0?c:o.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n==null?void 0:n.prefixCls},typeof o.cssVar=="object"?o.cssVar:{}),typeof i.cssVar=="object"?i.cssVar:{}),{key:typeof i.cssVar=="object"&&((u=i.cssVar)===null||u===void 0?void 0:u.key)||f});return Object.assign(Object.assign(Object.assign({},o),i),{token:Object.assign(Object.assign({},o.token),i.token),components:d,cssVar:p})},[i,o],(c,u)=>c.some((d,f)=>{const p=u[f];return!gu(d,p,!0)}))}var nO=["children"],dE=h.createContext({});function rO(e){var t=e.children,n=Lt(e,nO);return h.createElement(dE.Provider,{value:n},t)}var iO=(function(e){ms(n,e);var t=ps(n);function n(){return gr(this,n),t.apply(this,arguments)}return vr(n,[{key:"render",value:function(){return this.props.children}}]),n})(h.Component);function oO(e){var t=h.useReducer(function(c){return c+1},0),n=se(t,2),r=n[1],i=h.useRef(e),o=Zn(function(){return i.current}),a=Zn(function(c){i.current=typeof c=="function"?c(i.current):c,r()});return[o,a]}var Ds="none",th="appear",nh="enter",rh="leave",N1="none",xo="prepare",Il="start",Nl="active",vy="end",hE="prepared";function M1(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function sO(e,t){var n={animationend:M1("Animation","AnimationEnd"),transitionend:M1("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var aO=sO(ii(),typeof window<"u"?window:{}),fE={};if(ii()){var lO=document.createElement("div");fE=lO.style}var ih={};function mE(e){if(ih[e])return ih[e];var t=aO[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i<r;i+=1){var o=n[i];if(Object.prototype.hasOwnProperty.call(t,o)&&o in fE)return ih[e]=t[o],ih[e]}return""}var pE=mE("animationend"),gE=mE("transitionend"),vE=!!(pE&&gE),z1=pE||"animationend",j1=gE||"transitionend";function B1(e,t){if(!e)return null;if(_t(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}const cO=(function(e){var t=h.useRef();function n(i){i&&(i.removeEventListener(j1,e),i.removeEventListener(z1,e))}function r(i){t.current&&t.current!==i&&n(t.current),i&&i!==t.current&&(i.addEventListener(j1,e),i.addEventListener(z1,e),t.current=i)}return h.useEffect(function(){return function(){n(t.current)}},[]),[r,n]});var yE=ii()?h.useLayoutEffect:h.useEffect;const uO=(function(){var e=h.useRef(null);function t(){Rn.cancel(e.current)}function n(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var o=Rn(function(){i<=1?r({isCanceled:function(){return o!==e.current}}):n(r,i-1)});e.current=o}return h.useEffect(function(){return function(){t()}},[]),[n,t]});var dO=[xo,Il,Nl,vy],hO=[xo,hE],bE=!1,fO=!0;function _E(e){return e===Nl||e===vy}const mO=(function(e,t,n){var r=Kl(N1),i=se(r,2),o=i[0],a=i[1],c=uO(),u=se(c,2),d=u[0],f=u[1];function p(){a(xo,!0)}var g=t?hO:dO;return yE(function(){if(o!==N1&&o!==vy){var v=g.indexOf(o),b=g[v+1],_=n(o);_===bE?a(b,!0):b&&d(function(S){function C(){S.isCanceled()||a(b,!0)}_===!0?C():Promise.resolve(_).then(C)})}},[e,o]),h.useEffect(function(){return function(){f()}},[]),[p,o]});function pO(e,t,n,r){var i=r.motionEnter,o=i===void 0?!0:i,a=r.motionAppear,c=a===void 0?!0:a,u=r.motionLeave,d=u===void 0?!0:u,f=r.motionDeadline,p=r.motionLeaveImmediately,g=r.onAppearPrepare,v=r.onEnterPrepare,b=r.onLeavePrepare,_=r.onAppearStart,S=r.onEnterStart,C=r.onLeaveStart,E=r.onAppearActive,k=r.onEnterActive,$=r.onLeaveActive,P=r.onAppearEnd,T=r.onEnterEnd,O=r.onLeaveEnd,N=r.onVisibleChanged,I=Kl(),z=se(I,2),A=z[0],M=z[1],j=oO(Ds),B=se(j,2),F=B[0],W=B[1],V=Kl(null),L=se(V,2),G=L[0],U=L[1],D=F(),q=h.useRef(!1),Y=h.useRef(null);function ee(){return n()}var Z=h.useRef(!1);function re(){W(Ds),U(null,!0)}var he=Zn(function(Ee){var ke=F();if(ke!==Ds){var je=ee();if(!(Ee&&!Ee.deadline&&Ee.target!==je)){var Oe=Z.current,Qe;ke===th&&Oe?Qe=P==null?void 0:P(je,Ee):ke===nh&&Oe?Qe=T==null?void 0:T(je,Ee):ke===rh&&Oe&&(Qe=O==null?void 0:O(je,Ee)),Oe&&Qe!==!1&&re()}}}),fe=cO(he),ue=se(fe,1),Se=ue[0],ae=function(ke){switch(ke){case th:return K(K(K({},xo,g),Il,_),Nl,E);case nh:return K(K(K({},xo,v),Il,S),Nl,k);case rh:return K(K(K({},xo,b),Il,C),Nl,$);default:return{}}},le=h.useMemo(function(){return ae(D)},[D]),ce=mO(D,!e,function(Ee){if(Ee===xo){var ke=le[xo];return ke?ke(ee()):bE}if(de in le){var je;U(((je=le[de])===null||je===void 0?void 0:je.call(le,ee(),null))||null)}return de===Nl&&D!==Ds&&(Se(ee()),f>0&&(clearTimeout(Y.current),Y.current=setTimeout(function(){he({deadline:!0})},f))),de===hE&&re(),fO}),ye=se(ce,2),me=ye[0],de=ye[1],be=_E(de);Z.current=be;var xe=h.useRef(null);yE(function(){if(!(q.current&&xe.current===t)){M(t);var Ee=q.current;q.current=!0;var ke;!Ee&&t&&c&&(ke=th),Ee&&t&&o&&(ke=nh),(Ee&&!t&&d||!Ee&&p&&!t&&d)&&(ke=rh);var je=ae(ke);ke&&(e||je[xo])?(W(ke),me()):W(Ds),xe.current=t}},[t]),h.useEffect(function(){(D===th&&!c||D===nh&&!o||D===rh&&!d)&&W(Ds)},[c,o,d]),h.useEffect(function(){return function(){q.current=!1,clearTimeout(Y.current)}},[]);var Te=h.useRef(!1);h.useEffect(function(){A&&(Te.current=!0),A!==void 0&&D===Ds&&((Te.current||A)&&(N==null||N(A)),Te.current=!0)},[A,D]);var ze=G;return le[xo]&&de===Il&&(ze=X({transition:"none"},ze)),[D,de,ze,A??t]}function gO(e){var t=e;_t(e)==="object"&&(t=e.transitionSupport);function n(i,o){return!!(i.motionName&&t&&o!==!1)}var r=h.forwardRef(function(i,o){var a=i.visible,c=a===void 0?!0:a,u=i.removeOnLeave,d=u===void 0?!0:u,f=i.forceRender,p=i.children,g=i.motionName,v=i.leavedClassName,b=i.eventProps,_=h.useContext(dE),S=_.motion,C=n(i,S),E=h.useRef(),k=h.useRef();function $(){try{return E.current instanceof HTMLElement?E.current:xh(k.current)}catch{return null}}var P=pO(C,c,$,i),T=se(P,4),O=T[0],N=T[1],I=T[2],z=T[3],A=h.useRef(z);z&&(A.current=!0);var M=h.useCallback(function(L){E.current=L,iy(o,L)},[o]),j,B=X(X({},b),{},{visible:c});if(!p)j=null;else if(O===Ds)z?j=p(X({},B),M):!d&&A.current&&v?j=p(X(X({},B),{},{className:v}),M):f||!d&&!v?j=p(X(X({},B),{},{style:{display:"none"}}),M):j=null;else{var F;N===xo?F="prepare":_E(N)?F="active":N===Il&&(F="start");var W=B1(g,"".concat(O,"-").concat(F));j=p(X(X({},B),{},{className:ne(B1(g,O),K(K({},W,W&&F),g,typeof g=="string")),style:I}),M)}if(h.isValidElement(j)&&ta(j)){var V=ja(j);V||(j=h.cloneElement(j,{ref:M}))}return h.createElement(iO,{ref:k},j)});return r.displayName="CSSMotion",r}const Vi=gO(vE);var Ov="add",Iv="keep",Nv="remove",ug="removed";function vO(e){var t;return e&&_t(e)==="object"&&"key"in e?t=e:t={key:e},X(X({},t),{},{key:String(t.key)})}function Mv(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(vO)}function yO(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,i=t.length,o=Mv(e),a=Mv(t);o.forEach(function(d){for(var f=!1,p=r;p<i;p+=1){var g=a[p];if(g.key===d.key){r<p&&(n=n.concat(a.slice(r,p).map(function(v){return X(X({},v),{},{status:Ov})})),r=p),n.push(X(X({},g),{},{status:Iv})),r+=1,f=!0;break}}f||n.push(X(X({},d),{},{status:Nv}))}),r<i&&(n=n.concat(a.slice(r).map(function(d){return X(X({},d),{},{status:Ov})})));var c={};n.forEach(function(d){var f=d.key;c[f]=(c[f]||0)+1});var u=Object.keys(c).filter(function(d){return c[d]>1});return u.forEach(function(d){n=n.filter(function(f){var p=f.key,g=f.status;return p!==d||g!==Nv}),n.forEach(function(f){f.key===d&&(f.status=Iv)})}),n}var bO=["component","children","onVisibleChanged","onAllRemoved"],_O=["status"],SO=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function CO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Vi,n=(function(r){ms(o,r);var i=ps(o);function o(){var a;gr(this,o);for(var c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];return a=i.call.apply(i,[this].concat(u)),K(Zt(a),"state",{keyEntities:[]}),K(Zt(a),"removeKey",function(f){a.setState(function(p){var g=p.keyEntities.map(function(v){return v.key!==f?v:X(X({},v),{},{status:ug})});return{keyEntities:g}},function(){var p=a.state.keyEntities,g=p.filter(function(v){var b=v.status;return b!==ug}).length;g===0&&a.props.onAllRemoved&&a.props.onAllRemoved()})}),a}return vr(o,[{key:"render",value:function(){var c=this,u=this.state.keyEntities,d=this.props,f=d.component,p=d.children,g=d.onVisibleChanged;d.onAllRemoved;var v=Lt(d,bO),b=f||h.Fragment,_={};return SO.forEach(function(S){_[S]=v[S],delete v[S]}),delete v.keys,h.createElement(b,v,u.map(function(S,C){var E=S.status,k=Lt(S,_O),$=E===Ov||E===Iv;return h.createElement(t,Re({},_,{key:k.key,visible:$,eventProps:k,onVisibleChanged:function(T){g==null||g(T,{key:k.key}),T||c.removeKey(k.key)}}),function(P,T){return p(X(X({},P),{},{index:C}),T)})}))}}],[{key:"getDerivedStateFromProps",value:function(c,u){var d=c.keys,f=u.keyEntities,p=Mv(d),g=yO(f,p);return{keyEntities:g.filter(function(v){var b=f.find(function(_){var S=_.key;return v.key===S});return!(b&&b.status===ug&&v.status===Nv)})}}}]),o})(h.Component);return K(n,"defaultProps",{component:"div"}),n}const xO=CO(vE),L1=h.createContext(!0);function wO(e){const t=h.useContext(L1),{children:n}=e,[,r]=mi(),{motion:i}=r,o=h.useRef(!1);return o.current||(o.current=t!==i),o.current?h.createElement(L1.Provider,{value:i},h.createElement(rO,{motion:i},n)):n}const EO=()=>null;var kO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const $O=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let Qh,SE,CE,xE;function Ih(){return Qh||bu}function RO(){return SE||Mf}function TO(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const PO=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:i}=e;t!==void 0&&(Qh=t),n!==void 0&&(SE=n),"holderRender"in e&&(xE=i),r&&(TO(r)?TP(Ih(),r):CE=r)},wE=()=>({getPrefixCls:(e,t)=>t||(e?`${Ih()}-${e}`:Ih()),getIconPrefixCls:RO,getRootPrefixCls:()=>Qh||Ih(),getTheme:()=>CE,holderRender:xE}),OO=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:i,anchor:o,form:a,locale:c,componentSize:u,direction:d,space:f,splitter:p,virtual:g,dropdownMatchSelectWidth:v,popupMatchSelectWidth:b,popupOverflow:_,legacyLocale:S,parentContext:C,iconPrefixCls:E,theme:k,componentDisabled:$,segmented:P,statistic:T,spin:O,calendar:N,carousel:I,cascader:z,collapse:A,typography:M,checkbox:j,descriptions:B,divider:F,drawer:W,skeleton:V,steps:L,image:G,layout:U,list:D,mentions:q,modal:Y,progress:ee,result:Z,slider:re,breadcrumb:he,menu:fe,pagination:ue,input:Se,textArea:ae,empty:le,badge:ce,radio:ye,rate:me,switch:de,transfer:be,avatar:xe,message:Te,tag:ze,table:Ee,card:ke,tabs:je,timeline:Oe,timePicker:Qe,upload:at,notification:$t,tree:pt,colorPicker:Je,datePicker:ft,rangePicker:Xe,flex:yt,wave:tt,dropdown:Le,warning:rt,tour:Me,tooltip:Ue,popover:It,popconfirm:St,floatButton:nn,floatButtonGroup:Jt,variant:bn,inputNumber:On,treeSelect:on}=e,Ht=h.useCallback((nt,Ft)=>{const{prefixCls:Kt}=e;if(Ft)return Ft;const Bt=Kt||C.getPrefixCls("");return nt?`${Bt}-${nt}`:Bt},[C.getPrefixCls,e.prefixCls]),Rt=E||C.iconPrefixCls||Mf,sn=n||C.csp;JP(Rt,sn);const Xt=tO(k,C.theme,{prefixCls:Ht("")}),ot={csp:sn,autoInsertSpaceInButton:r,alert:i,anchor:o,locale:c||S,direction:d,space:f,splitter:p,virtual:g,popupMatchSelectWidth:b??v,popupOverflow:_,getPrefixCls:Ht,iconPrefixCls:Rt,theme:Xt,segmented:P,statistic:T,spin:O,calendar:N,carousel:I,cascader:z,collapse:A,typography:M,checkbox:j,descriptions:B,divider:F,drawer:W,skeleton:V,steps:L,image:G,input:Se,textArea:ae,layout:U,list:D,mentions:q,modal:Y,progress:ee,result:Z,slider:re,breadcrumb:he,menu:fe,pagination:ue,empty:le,badge:ce,radio:ye,rate:me,switch:de,transfer:be,avatar:xe,message:Te,tag:ze,table:Ee,card:ke,tabs:je,timeline:Oe,timePicker:Qe,upload:at,notification:$t,tree:pt,colorPicker:Je,datePicker:ft,rangePicker:Xe,flex:yt,wave:tt,dropdown:Le,warning:rt,tour:Me,tooltip:Ue,popover:It,popconfirm:St,floatButton:nn,floatButtonGroup:Jt,variant:bn,inputNumber:On,treeSelect:on},Et=Object.assign({},C);Object.keys(ot).forEach(nt=>{ot[nt]!==void 0&&(Et[nt]=ot[nt])}),$O.forEach(nt=>{const Ft=e[nt];Ft&&(Et[nt]=Ft)}),typeof r<"u"&&(Et.button=Object.assign({autoInsertSpace:r},Et.button));const mt=Nu(()=>Et,Et,(nt,Ft)=>{const Kt=Object.keys(nt),Bt=Object.keys(Ft);return Kt.length!==Bt.length||Kt.some(At=>nt[At]!==Ft[At])}),{layer:Ie}=h.useContext(Mu),$e=h.useMemo(()=>({prefixCls:Rt,csp:sn,layer:Ie?"antd":void 0}),[Rt,sn,Ie]);let we=h.createElement(h.Fragment,null,h.createElement(EO,{dropdownMatchSelectWidth:v}),t);const Ae=h.useMemo(()=>{var nt,Ft,Kt,Bt;return Ol(((nt=Ys.Form)===null||nt===void 0?void 0:nt.defaultValidateMessages)||{},((Kt=(Ft=mt.locale)===null||Ft===void 0?void 0:Ft.Form)===null||Kt===void 0?void 0:Kt.defaultValidateMessages)||{},((Bt=mt.form)===null||Bt===void 0?void 0:Bt.validateMessages)||{},(a==null?void 0:a.validateMessages)||{})},[mt,a==null?void 0:a.validateMessages]);Object.keys(Ae).length>0&&(we=h.createElement(aP.Provider,{value:Ae},we)),c&&(we=h.createElement(hP,{locale:c,_ANT_MARK__:dP},we)),we=h.createElement(my.Provider,{value:$e},we),u&&(we=h.createElement(PP,{size:u},we)),we=h.createElement(wO,null,we);const et=h.useMemo(()=>{const nt=Xt||{},{algorithm:Ft,token:Kt,components:Bt,cssVar:At}=nt,Tn=kO(nt,["algorithm","token","components","cssVar"]),En=Ft&&(!Array.isArray(Ft)||Ft.length>0)?fv(Ft):eE,In={};Object.entries(Bt||{}).forEach(([ln,fn])=>{const He=Object.assign({},fn);"algorithm"in He&&(He.algorithm===!0?He.theme=En:(Array.isArray(He.algorithm)||typeof He.algorithm=="function")&&(He.theme=fv(He.algorithm)),delete He.algorithm),In[ln]=He});const Dn=Object.assign(Object.assign({},yu),Kt);return Object.assign(Object.assign({},Tn),{theme:En,token:Dn,components:In,override:Object.assign({override:Dn},In),cssVar:At})},[Xt]);return k&&(we=h.createElement(tE.Provider,{value:et},we)),mt.warning&&(we=h.createElement(sP.Provider,{value:mt.warning},we)),$!==void 0&&(we=h.createElement(nE,{disabled:$},we)),h.createElement(Ot.Provider,{value:mt},we)},Yo=e=>{const t=h.useContext(Ot),n=h.useContext(py);return h.createElement(OO,Object.assign({parentContext:t,legacyLocale:n},e))};Yo.ConfigContext=Ot;Yo.SizeContext=Ul;Yo.config=PO;Yo.useConfig=OP;Object.defineProperty(Yo,"SizeContext",{get:()=>Ul});var IO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function EE(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function NO(e){return EE(e)instanceof ShadowRoot}function Zh(e){return NO(e)?EE(e):null}function MO(e){return e.replace(/-(.)/g,function(t,n){return n.toUpperCase()})}function zO(e,t){Br(e,"[@ant-design/icons] ".concat(t))}function A1(e){return _t(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(_t(e.icon)==="object"||typeof e.icon=="function")}function D1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:delete t[n],t[MO(n)]=r}return t},{})}function zv(e,t,n){return n?Q.createElement(e.tag,X(X({key:t},D1(e.attrs)),n),(e.children||[]).map(function(r,i){return zv(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):Q.createElement(e.tag,X({key:t},D1(e.attrs)),(e.children||[]).map(function(r,i){return zv(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function kE(e){return Ra(e)[0]}function $E(e){return e?Array.isArray(e)?e:[e]:[]}var jO=`
96
- .anticon {
97
- display: inline-flex;
98
- align-items: center;
99
- color: inherit;
100
- font-style: normal;
101
- line-height: 0;
102
- text-align: center;
103
- text-transform: none;
104
- vertical-align: -0.125em;
105
- text-rendering: optimizeLegibility;
106
- -webkit-font-smoothing: antialiased;
107
- -moz-osx-font-smoothing: grayscale;
108
- }
109
-
110
- .anticon > * {
111
- line-height: 1;
112
- }
113
-
114
- .anticon svg {
115
- display: inline-block;
116
- }
117
-
118
- .anticon::before {
119
- display: none;
120
- }
121
-
122
- .anticon .anticon-icon {
123
- display: block;
124
- }
125
-
126
- .anticon[tabindex] {
127
- cursor: pointer;
128
- }
129
-
130
- .anticon-spin::before,
131
- .anticon-spin {
132
- display: inline-block;
133
- -webkit-animation: loadingCircle 1s infinite linear;
134
- animation: loadingCircle 1s infinite linear;
135
- }
136
-
137
- @-webkit-keyframes loadingCircle {
138
- 100% {
139
- -webkit-transform: rotate(360deg);
140
- transform: rotate(360deg);
141
- }
142
- }
143
-
144
- @keyframes loadingCircle {
145
- 100% {
146
- -webkit-transform: rotate(360deg);
147
- transform: rotate(360deg);
148
- }
149
- }
150
- `,BO=function(t){var n=h.useContext(my),r=n.csp,i=n.prefixCls,o=n.layer,a=jO;i&&(a=a.replace(/anticon/g,i)),o&&(a="@layer ".concat(o,` {
151
- `).concat(a,`
152
- }`)),h.useEffect(function(){var c=t.current,u=Zh(c);fs(a,"@ant-design-icons",{prepend:!o,csp:r,attachTo:u})},[])},LO=["icon","className","onClick","style","primaryColor","secondaryColor"],au={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function AO(e){var t=e.primaryColor,n=e.secondaryColor;au.primaryColor=t,au.secondaryColor=n||kE(t),au.calculated=!!n}function DO(){return X({},au)}var ec=function(t){var n=t.icon,r=t.className,i=t.onClick,o=t.style,a=t.primaryColor,c=t.secondaryColor,u=Lt(t,LO),d=h.useRef(),f=au;if(a&&(f={primaryColor:a,secondaryColor:c||kE(a)}),BO(d),zO(A1(n),"icon should be icon definiton, but got ".concat(n)),!A1(n))return null;var p=n;return p&&typeof p.icon=="function"&&(p=X(X({},p),{},{icon:p.icon(f.primaryColor,f.secondaryColor)})),zv(p.icon,"svg-".concat(p.name),X(X({className:r,onClick:i,style:o,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u),{},{ref:d}))};ec.displayName="IconReact";ec.getTwoToneColors=DO;ec.setTwoToneColors=AO;function RE(e){var t=$E(e),n=se(t,2),r=n[0],i=n[1];return ec.setTwoToneColors({primaryColor:r,secondaryColor:i})}function HO(){var e=ec.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var FO=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];RE(Xh.primary);var Cn=h.forwardRef(function(e,t){var n=e.className,r=e.icon,i=e.spin,o=e.rotate,a=e.tabIndex,c=e.onClick,u=e.twoToneColor,d=Lt(e,FO),f=h.useContext(my),p=f.prefixCls,g=p===void 0?"anticon":p,v=f.rootClassName,b=ne(v,g,K(K({},"".concat(g,"-").concat(r.name),!!r.name),"".concat(g,"-spin"),!!i||r.name==="loading"),n),_=a;_===void 0&&c&&(_=-1);var S=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,C=$E(u),E=se(C,2),k=E[0],$=E[1];return h.createElement("span",Re({role:"img","aria-label":r.name},d,{ref:t,tabIndex:_,onClick:c,className:b}),h.createElement(ec,{icon:r,primaryColor:k,secondaryColor:$,style:S}))});Cn.displayName="AntdIcon";Cn.getTwoToneColor=HO;Cn.setTwoToneColor=RE;var WO=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:IO}))},TE=h.forwardRef(WO),VO={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},qO=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:VO}))},jf=h.forwardRef(qO),UO={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},KO=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:UO}))},Zs=h.forwardRef(KO),GO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},XO=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:GO}))},PE=h.forwardRef(XO),YO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},JO=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:YO}))},OE=h.forwardRef(JO),QO=`accept acceptCharset accessKey action allowFullScreen allowTransparency
153
- alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
154
- charSet checked classID className colSpan cols content contentEditable contextMenu
155
- controls coords crossOrigin data dateTime default defer dir disabled download draggable
156
- encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
157
- headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
158
- is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
159
- mediaGroup method min minLength multiple muted name noValidate nonce open
160
- optimum pattern placeholder poster preload radioGroup readOnly rel required
161
- reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
162
- shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
163
- summary tabIndex target title type useMap value width wmode wrap`,ZO=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
164
- onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
165
- onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
166
- onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
167
- onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
168
- onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
169
- onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,eI="".concat(QO," ").concat(ZO).split(/[\s\n]+/),tI="aria-",nI="data-";function H1(e,t){return e.indexOf(t)===0}function qi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n=X({},t);var r={};return Object.keys(e).forEach(function(i){(n.aria&&(i==="role"||H1(i,tI))||n.data&&H1(i,nI)||n.attr&&eI.includes(i))&&(r[i]=e[i])}),r}function IE(e){return e&&Q.isValidElement(e)&&e.type===Q.Fragment}const NE=(e,t,n)=>Q.isValidElement(e)?Q.cloneElement(e,typeof n=="function"?n(e.props||{}):n):t;function fi(e,t){return NE(e,e,t)}const Po=e=>{const[,,,,t]=mi();return t?`${e}-css-var`:""};var Ge={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},ME=h.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,i=e.className,o=e.duration,a=o===void 0?4.5:o,c=e.showProgress,u=e.pauseOnHover,d=u===void 0?!0:u,f=e.eventKey,p=e.content,g=e.closable,v=e.closeIcon,b=v===void 0?"x":v,_=e.props,S=e.onClick,C=e.onNoticeClose,E=e.times,k=e.hovering,$=h.useState(!1),P=se($,2),T=P[0],O=P[1],N=h.useState(0),I=se(N,2),z=I[0],A=I[1],M=h.useState(0),j=se(M,2),B=j[0],F=j[1],W=k||T,V=a>0&&c,L=function(){C(f)},G=function(Z){(Z.key==="Enter"||Z.code==="Enter"||Z.keyCode===Ge.ENTER)&&L()};h.useEffect(function(){if(!W&&a>0){var ee=Date.now()-B,Z=setTimeout(function(){L()},a*1e3-B);return function(){d&&clearTimeout(Z),F(Date.now()-ee)}}},[a,W,E]),h.useEffect(function(){if(!W&&V&&(d||B===0)){var ee=performance.now(),Z,re=function he(){cancelAnimationFrame(Z),Z=requestAnimationFrame(function(fe){var ue=fe+B-ee,Se=Math.min(ue/(a*1e3),1);A(Se*100),Se<1&&he()})};return re(),function(){d&&cancelAnimationFrame(Z)}}},[a,B,W,V,E]);var U=h.useMemo(function(){return _t(g)==="object"&&g!==null?g:g?{closeIcon:b}:{}},[g,b]),D=qi(U,!0),q=100-(!z||z<0?0:z>100?100:z),Y="".concat(n,"-notice");return h.createElement("div",Re({},_,{ref:t,className:ne(Y,i,K({},"".concat(Y,"-closable"),g)),style:r,onMouseEnter:function(Z){var re;O(!0),_==null||(re=_.onMouseEnter)===null||re===void 0||re.call(_,Z)},onMouseLeave:function(Z){var re;O(!1),_==null||(re=_.onMouseLeave)===null||re===void 0||re.call(_,Z)},onClick:S}),h.createElement("div",{className:"".concat(Y,"-content")},p),g&&h.createElement("a",Re({tabIndex:0,className:"".concat(Y,"-close"),onKeyDown:G,"aria-label":"Close"},D,{onClick:function(Z){Z.preventDefault(),Z.stopPropagation(),L()}}),U.closeIcon),V&&h.createElement("progress",{className:"".concat(Y,"-progress"),max:"100",value:q},q+"%"))}),zE=Q.createContext({}),rI=function(t){var n=t.children,r=t.classNames;return Q.createElement(zE.Provider,{value:{classNames:r}},n)},F1=8,W1=3,V1=16,iI=function(t){var n={offset:F1,threshold:W1,gap:V1};if(t&&_t(t)==="object"){var r,i,o;n.offset=(r=t.offset)!==null&&r!==void 0?r:F1,n.threshold=(i=t.threshold)!==null&&i!==void 0?i:W1,n.gap=(o=t.gap)!==null&&o!==void 0?o:V1}return[!!t,n]},oI=["className","style","classNames","styles"],sI=function(t){var n=t.configList,r=t.placement,i=t.prefixCls,o=t.className,a=t.style,c=t.motion,u=t.onAllNoticeRemoved,d=t.onNoticeClose,f=t.stack,p=h.useContext(zE),g=p.classNames,v=h.useRef({}),b=h.useState(null),_=se(b,2),S=_[0],C=_[1],E=h.useState([]),k=se(E,2),$=k[0],P=k[1],T=n.map(function(W){return{config:W,key:String(W.key)}}),O=iI(f),N=se(O,2),I=N[0],z=N[1],A=z.offset,M=z.threshold,j=z.gap,B=I&&($.length>0||T.length<=M),F=typeof c=="function"?c(r):c;return h.useEffect(function(){I&&$.length>1&&P(function(W){return W.filter(function(V){return T.some(function(L){var G=L.key;return V===G})})})},[$,T,I]),h.useEffect(function(){var W;if(I&&v.current[(W=T[T.length-1])===null||W===void 0?void 0:W.key]){var V;C(v.current[(V=T[T.length-1])===null||V===void 0?void 0:V.key])}},[T,I]),Q.createElement(xO,Re({key:r,className:ne(i,"".concat(i,"-").concat(r),g==null?void 0:g.list,o,K(K({},"".concat(i,"-stack"),!!I),"".concat(i,"-stack-expanded"),B)),style:a,keys:T,motionAppear:!0},F,{onAllRemoved:function(){u(r)}}),function(W,V){var L=W.config,G=W.className,U=W.style,D=W.index,q=L,Y=q.key,ee=q.times,Z=String(Y),re=L,he=re.className,fe=re.style,ue=re.classNames,Se=re.styles,ae=Lt(re,oI),le=T.findIndex(function(Oe){return Oe.key===Z}),ce={};if(I){var ye=T.length-1-(le>-1?le:D-1),me=r==="top"||r==="bottom"?"-50%":"0";if(ye>0){var de,be,xe;ce.height=B?(de=v.current[Z])===null||de===void 0?void 0:de.offsetHeight:S==null?void 0:S.offsetHeight;for(var Te=0,ze=0;ze<ye;ze++){var Ee;Te+=((Ee=v.current[T[T.length-1-ze].key])===null||Ee===void 0?void 0:Ee.offsetHeight)+j}var ke=(B?Te:ye*A)*(r.startsWith("top")?1:-1),je=!B&&S!==null&&S!==void 0&&S.offsetWidth&&(be=v.current[Z])!==null&&be!==void 0&&be.offsetWidth?((S==null?void 0:S.offsetWidth)-A*2*(ye<3?ye:3))/((xe=v.current[Z])===null||xe===void 0?void 0:xe.offsetWidth):1;ce.transform="translate3d(".concat(me,", ").concat(ke,"px, 0) scaleX(").concat(je,")")}else ce.transform="translate3d(".concat(me,", 0, 0)")}return Q.createElement("div",{ref:V,className:ne("".concat(i,"-notice-wrapper"),G,ue==null?void 0:ue.wrapper),style:X(X(X({},U),ce),Se==null?void 0:Se.wrapper),onMouseEnter:function(){return P(function(Qe){return Qe.includes(Z)?Qe:[].concat(We(Qe),[Z])})},onMouseLeave:function(){return P(function(Qe){return Qe.filter(function(at){return at!==Z})})}},Q.createElement(ME,Re({},ae,{ref:function(Qe){le>-1?v.current[Z]=Qe:delete v.current[Z]},prefixCls:i,classNames:ue,styles:Se,className:ne(he,g==null?void 0:g.notice),style:fe,times:ee,key:Y,eventKey:Y,onNoticeClose:d,hovering:I&&$.length>0})))})},aI=h.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-notification":n,i=e.container,o=e.motion,a=e.maxCount,c=e.className,u=e.style,d=e.onAllRemoved,f=e.stack,p=e.renderNotifications,g=h.useState([]),v=se(g,2),b=v[0],_=v[1],S=function(I){var z,A=b.find(function(M){return M.key===I});A==null||(z=A.onClose)===null||z===void 0||z.call(A),_(function(M){return M.filter(function(j){return j.key!==I})})};h.useImperativeHandle(t,function(){return{open:function(I){_(function(z){var A=We(z),M=A.findIndex(function(F){return F.key===I.key}),j=X({},I);if(M>=0){var B;j.times=(((B=z[M])===null||B===void 0?void 0:B.times)||0)+1,A[M]=j}else j.times=0,A.push(j);return a>0&&A.length>a&&(A=A.slice(-a)),A})},close:function(I){S(I)},destroy:function(){_([])}}});var C=h.useState({}),E=se(C,2),k=E[0],$=E[1];h.useEffect(function(){var N={};b.forEach(function(I){var z=I.placement,A=z===void 0?"topRight":z;A&&(N[A]=N[A]||[],N[A].push(I))}),Object.keys(k).forEach(function(I){N[I]=N[I]||[]}),$(N)},[b]);var P=function(I){$(function(z){var A=X({},z),M=A[I]||[];return M.length||delete A[I],A})},T=h.useRef(!1);if(h.useEffect(function(){Object.keys(k).length>0?T.current=!0:T.current&&(d==null||d(),T.current=!1)},[k]),!i)return null;var O=Object.keys(k);return Xs.createPortal(h.createElement(h.Fragment,null,O.map(function(N){var I=k[N],z=h.createElement(sI,{key:N,configList:I,placement:N,prefixCls:r,className:c==null?void 0:c(N),style:u==null?void 0:u(N),motion:o,onNoticeClose:S,onAllNoticeRemoved:P,stack:f});return p?p(z,{prefixCls:r,key:N}):z})),i)}),lI=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],cI=function(){return document.body},q1=0;function uI(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(i){i&&Object.keys(i).forEach(function(o){var a=i[o];a!==void 0&&(e[o]=a)})}),e}function dI(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.getContainer,n=t===void 0?cI:t,r=e.motion,i=e.prefixCls,o=e.maxCount,a=e.className,c=e.style,u=e.onAllRemoved,d=e.stack,f=e.renderNotifications,p=Lt(e,lI),g=h.useState(),v=se(g,2),b=v[0],_=v[1],S=h.useRef(),C=h.createElement(aI,{container:b,ref:S,prefixCls:i,motion:r,maxCount:o,className:a,style:c,onAllRemoved:u,stack:d,renderNotifications:f}),E=h.useState([]),k=se(E,2),$=k[0],P=k[1],T=Zn(function(N){var I=uI(p,N);(I.key===null||I.key===void 0)&&(I.key="rc-notification-".concat(q1),q1+=1),P(function(z){return[].concat(We(z),[{type:"open",config:I}])})}),O=h.useMemo(function(){return{open:T,close:function(I){P(function(z){return[].concat(We(z),[{type:"close",key:I}])})},destroy:function(){P(function(I){return[].concat(We(I),[{type:"destroy"}])})}}},[]);return h.useEffect(function(){_(n())}),h.useEffect(function(){if(S.current&&$.length){$.forEach(function(z){switch(z.type){case"open":S.current.open(z.config);break;case"close":S.current.close(z.key);break;case"destroy":S.current.destroy();break}});var N,I;P(function(z){return(N!==z||!I)&&(N=z,I=z.filter(function(A){return!$.includes(A)})),I})}},[$]),[O,C]}var hI={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},fI=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:hI}))},ju=h.forwardRef(fI);function jv(...e){const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(r=>{n[r]!==void 0&&(t[r]=n[r])})}),t}function Gl(e){if(!e)return;const{closable:t,closeIcon:n}=e;return{closable:t,closeIcon:n}}function U1(e){const{closable:t,closeIcon:n}=e||{};return Q.useMemo(()=>{if(!t&&(t===!1||n===!1||n===null))return!1;if(t===void 0&&n===void 0)return null;let r={closeIcon:typeof n!="boolean"&&n!==null?n:void 0};return t&&typeof t=="object"&&(r=Object.assign(Object.assign({},r),t)),r},[t,n])}const mI={},yy=(e,t,n=mI)=>{const r=U1(e),i=U1(t),[o]=gs("global",Ys.global),a=typeof r!="boolean"?!!(r!=null&&r.disabled):!1,c=Q.useMemo(()=>Object.assign({closeIcon:Q.createElement(Zs,null)},n),[n]),u=Q.useMemo(()=>r===!1?!1:r?jv(c,i,r):i===!1?!1:i?jv(c,i):c.closable?c:!1,[r,i,c]);return Q.useMemo(()=>{var d,f;if(u===!1)return[!1,null,a,{}];const{closeIconRender:p}=c,{closeIcon:g}=u;let v=g;const b=qi(u,!0);return v!=null&&(p&&(v=p(g)),v=Q.isValidElement(v)?Q.cloneElement(v,Object.assign(Object.assign(Object.assign({},v.props),{"aria-label":(f=(d=v.props)===null||d===void 0?void 0:d["aria-label"])!==null&&f!==void 0?f:o.close}),b)):Q.createElement("span",Object.assign({"aria-label":o.close},b),v)),[!0,v,a,b]},[a,o.close,u,c])},pI=()=>Q.useReducer(e=>e+1,0),gI=()=>{const[e,t]=h.useState([]),n=h.useCallback(r=>(t(i=>[].concat(We(i),[r])),()=>{t(i=>i.filter(o=>o!==r))}),[]);return[e,n]},Bu=Q.createContext(void 0),Hs=100,vI=10,jE=Hs*vI,BE={Modal:Hs,Drawer:Hs,Popover:Hs,Popconfirm:Hs,Tooltip:Hs,Tour:Hs,FloatButton:Hs},yI={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function bI(e){return e in BE}const tc=(e,t)=>{const[,n]=mi(),r=Q.useContext(Bu),i=bI(e);let o;if(t!==void 0)o=[t,t];else{let a=r??0;i?a+=(r?0:n.zIndexPopupBase)+BE[e]:a+=yI[e],o=[r===void 0?t:a,a]}return o},_I=e=>{const{componentCls:t,iconCls:n,boxShadow:r,colorText:i,colorSuccess:o,colorError:a,colorWarning:c,colorInfo:u,fontSizeLG:d,motionEaseInOutCirc:f,motionDurationSlow:p,marginXS:g,paddingXS:v,borderRadiusLG:b,zIndexPopup:_,contentPadding:S,contentBg:C}=e,E=`${t}-notice`,k=new Yt("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:v,transform:"translateY(0)",opacity:1}}),$=new Yt("MessageMoveOut",{"0%":{maxHeight:e.height,padding:v,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),P={padding:v,textAlign:"center",[`${t}-custom-content`]:{display:"flex",alignItems:"center"},[`${t}-custom-content > ${n}`]:{marginInlineEnd:g,fontSize:d},[`${E}-content`]:{display:"inline-block",padding:S,background:C,borderRadius:b,boxShadow:r,pointerEvents:"all"},[`${t}-success > ${n}`]:{color:o},[`${t}-error > ${n}`]:{color:a},[`${t}-warning > ${n}`]:{color:c},[`${t}-info > ${n},
170
- ${t}-loading > ${n}`]:{color:u}};return[{[t]:Object.assign(Object.assign({},Vn(e)),{color:i,position:"fixed",top:g,width:"100%",pointerEvents:"none",zIndex:_,[`${t}-move-up`]:{animationFillMode:"forwards"},[`
171
- ${t}-move-up-appear,
172
- ${t}-move-up-enter
173
- `]:{animationName:k,animationDuration:p,animationPlayState:"paused",animationTimingFunction:f},[`
174
- ${t}-move-up-appear${t}-move-up-appear-active,
175
- ${t}-move-up-enter${t}-move-up-enter-active
176
- `]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:$,animationDuration:p,animationPlayState:"paused",animationTimingFunction:f},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[t]:{[`${E}-wrapper`]:Object.assign({},P)}},{[`${t}-notice-pure-panel`]:Object.assign(Object.assign({},P),{padding:0,textAlign:"start"})}]},SI=e=>({zIndexPopup:e.zIndexPopupBase+jE+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`}),LE=yn("Message",e=>{const t=tn(e,{height:150});return _I(t)},SI);var CI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const xI={info:h.createElement(OE,null),success:h.createElement(TE,null),error:h.createElement(jf,null),warning:h.createElement(PE,null),loading:h.createElement(ju,null)},AE=({prefixCls:e,type:t,icon:n,children:r})=>h.createElement("div",{className:ne(`${e}-custom-content`,`${e}-${t}`)},n||xI[t],h.createElement("span",null,r)),wI=e=>{const{prefixCls:t,className:n,type:r,icon:i,content:o}=e,a=CI(e,["prefixCls","className","type","icon","content"]),{getPrefixCls:c}=h.useContext(Ot),u=t||c("message"),d=Po(u),[f,p,g]=LE(u,d);return f(h.createElement(ME,Object.assign({},a,{prefixCls:u,className:ne(n,p,`${u}-notice-pure-panel`,g,d),eventKey:"pure",duration:null,content:h.createElement(AE,{prefixCls:u,type:r,icon:i},o)})))};function EI(e,t){return{motionName:t??`${e}-move-up`}}function by(e){let t;const n=new Promise(i=>{t=e(()=>{i(!0)})}),r=()=>{t==null||t()};return r.then=(i,o)=>n.then(i,o),r.promise=n,r}var kI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const $I=8,RI=3,TI=({children:e,prefixCls:t})=>{const n=Po(t),[r,i,o]=LE(t,n);return r(h.createElement(rI,{classNames:{list:ne(i,o,n)}},e))},PI=(e,{prefixCls:t,key:n})=>h.createElement(TI,{prefixCls:t,key:n},e),OI=h.forwardRef((e,t)=>{const{top:n,prefixCls:r,getContainer:i,maxCount:o,duration:a=RI,rtl:c,transitionName:u,onAllRemoved:d}=e,{getPrefixCls:f,getPopupContainer:p,message:g,direction:v}=h.useContext(Ot),b=r||f("message"),_=()=>({left:"50%",transform:"translateX(-50%)",top:n??$I}),S=()=>ne({[`${b}-rtl`]:c??v==="rtl"}),C=()=>EI(b,u),E=h.createElement("span",{className:`${b}-close-x`},h.createElement(Zs,{className:`${b}-close-icon`})),[k,$]=dI({prefixCls:b,style:_,className:S,motion:C,closable:!1,closeIcon:E,duration:a,getContainer:()=>(i==null?void 0:i())||(p==null?void 0:p())||document.body,maxCount:o,onAllRemoved:d,renderNotifications:PI});return h.useImperativeHandle(t,()=>Object.assign(Object.assign({},k),{prefixCls:b,message:g})),$});let K1=0;function DE(e){const t=h.useRef(null);return Nf(),[h.useMemo(()=>{const r=u=>{var d;(d=t.current)===null||d===void 0||d.close(u)},i=u=>{if(!t.current){const T=()=>{};return T.then=()=>{},T}const{open:d,prefixCls:f,message:p}=t.current,g=`${f}-notice`,{content:v,icon:b,type:_,key:S,className:C,style:E,onClose:k}=u,$=kI(u,["content","icon","type","key","className","style","onClose"]);let P=S;return P==null&&(K1+=1,P=`antd-message-${K1}`),by(T=>(d(Object.assign(Object.assign({},$),{key:P,content:h.createElement(AE,{prefixCls:f,type:_,icon:b},v),placement:"top",className:ne(_&&`${g}-${_}`,C,p==null?void 0:p.className),style:Object.assign(Object.assign({},p==null?void 0:p.style),E),onClose:()=>{k==null||k(),T()}})),()=>{r(P)}))},a={open:i,destroy:u=>{var d;u!==void 0?r(u):(d=t.current)===null||d===void 0||d.destroy()}};return["info","success","warning","error","loading"].forEach(u=>{const d=(f,p,g)=>{let v;f&&typeof f=="object"&&"content"in f?v=f:v={content:f};let b,_;typeof p=="function"?_=p:(b=p,_=g);const S=Object.assign(Object.assign({onClose:_,duration:b},v),{type:u});return i(S)};a[u]=d}),a},[]),h.createElement(OI,Object.assign({key:"message-holder"},e,{ref:t}))]}function II(e){return DE(e)}function HE(e,t){this.v=e,this.k=t}function ni(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}ni=function(a,c,u,d){function f(p,g){ni(a,p,function(v){return this._invoke(p,g,v)})}c?i?i(a,c,{value:u,enumerable:!d,configurable:!d,writable:!d}):a[c]=u:(f("next",0),f("throw",1),f("return",2))},ni(e,t,n,r)}function _y(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(v,b,_,S){var C=b&&b.prototype instanceof c?b:c,E=Object.create(C.prototype);return ni(E,"_invoke",(function(k,$,P){var T,O,N,I=0,z=P||[],A=!1,M={p:0,n:0,v:e,a:j,f:j.bind(e,4),d:function(F,W){return T=F,O=0,N=e,M.n=W,a}};function j(B,F){for(O=B,N=F,t=0;!A&&I&&!W&&t<z.length;t++){var W,V=z[t],L=M.p,G=V[2];B>3?(W=G===F)&&(N=V[(O=V[4])?5:(O=3,3)],V[4]=V[5]=e):V[0]<=L&&((W=B<2&&L<V[1])?(O=0,M.v=F,M.n=V[1]):L<G&&(W=B<3||V[0]>F||F>G)&&(V[4]=B,V[5]=F,M.n=G,O=0))}if(W||B>1)return a;throw A=!0,F}return function(B,F,W){if(I>1)throw TypeError("Generator is already running");for(A&&F===1&&j(F,W),O=F,N=W;(t=O<2?e:N)||!A;){T||(O?O<3?(O>1&&(M.n=-1),j(O,N)):M.n=N:M.v=N);try{if(I=2,T){if(O||(B="next"),t=T[B]){if(!(t=t.call(T,N)))throw TypeError("iterator result is not an object");if(!t.done)return t;N=t.value,O<2&&(O=0)}else O===1&&(t=T.return)&&t.call(T),O<2&&(N=TypeError("The iterator does not provide a '"+B+"' method"),O=1);T=e}else if((t=(A=M.n<0)?N:k.call($,M))!==a)break}catch(V){T=e,O=1,N=V}finally{I=1}}return{value:t,done:A}}})(v,_,S),!0),E}var a={};function c(){}function u(){}function d(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(ni(t={},r,function(){return this}),t),p=d.prototype=c.prototype=Object.create(f);function g(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,d):(v.__proto__=d,ni(v,i,"GeneratorFunction")),v.prototype=Object.create(p),v}return u.prototype=d,ni(p,"constructor",d),ni(d,"constructor",u),u.displayName="GeneratorFunction",ni(d,i,"GeneratorFunction"),ni(p),ni(p,i,"Generator"),ni(p,r,function(){return this}),ni(p,"toString",function(){return"[object Generator]"}),(_y=function(){return{w:o,m:g}})()}function ef(e,t){function n(i,o,a,c){try{var u=e[i](o),d=u.value;return d instanceof HE?t.resolve(d.v).then(function(f){n("next",f,a,c)},function(f){n("throw",f,a,c)}):t.resolve(d).then(function(f){u.value=f,a(u)},function(f){return n("throw",f,a,c)})}catch(f){c(f)}}var r;this.next||(ni(ef.prototype),ni(ef.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),ni(this,"_invoke",function(i,o,a){function c(){return new t(function(u,d){n(i,a,u,d)})}return r=r?r.then(c,c):c()},!0)}function FE(e,t,n,r,i){return new ef(_y().w(e,t,n,r),i||Promise)}function NI(e,t,n,r,i){var o=FE(e,t,n,r,i);return o.next().then(function(a){return a.done?a.value:o.next()})}function MI(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function i(){for(;n.length;)if((r=n.pop())in t)return i.value=r,i.done=!1,i;return i.done=!0,i}}function G1(e){if(e!=null){var t=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(_t(e)+" is not iterable")}function oi(){var e=_y(),t=e.m(oi),n=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function r(a){var c=typeof a=="function"&&a.constructor;return!!c&&(c===n||(c.displayName||c.name)==="GeneratorFunction")}var i={throw:1,return:2,break:3,continue:3};function o(a){var c,u;return function(d){c||(c={stop:function(){return u(d.a,2)},catch:function(){return d.v},abrupt:function(p,g){return u(d.a,i[p],g)},delegateYield:function(p,g,v){return c.resultName=g,u(d.d,G1(p),v)},finish:function(p){return u(d.f,p)}},u=function(p,g,v){d.p=c.prev,d.n=c.next;try{return p(g,v)}finally{c.next=d.n}}),c.resultName&&(c[c.resultName]=d.v,c.resultName=void 0),c.sent=d.v,c.next=d.n;try{return a.call(this,c)}finally{d.p=c.prev,d.n=c.next}}}return(oi=function(){return{wrap:function(u,d,f,p){return e.w(o(u),d,f,p&&p.reverse())},isGeneratorFunction:r,mark:e.m,awrap:function(u,d){return new HE(u,d)},AsyncIterator:ef,async:function(u,d,f,p,g){return(r(d)?FE:NI)(o(u),d,f,p,g)},keys:MI,values:G1}})()}function X1(e,t,n,r,i,o,a){try{var c=e[o](a),u=c.value}catch(d){return void n(d)}c.done?t(u):Promise.resolve(u).then(r,i)}function Ba(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(u){X1(o,r,i,a,c,"next",u)}function c(u){X1(o,r,i,a,c,"throw",u)}a(void 0)})}}var Lu=X({},yT),zI=Lu.version,dg=Lu.render,jI=Lu.unmountComponentAtNode,Bf;try{var BI=Number((zI||"").split(".")[0]);BI>=18&&(Bf=Lu.createRoot)}catch{}function Y1(e){var t=Lu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&_t(t)==="object"&&(t.usingClientEntryPoint=e)}var tf="__rc_react_root__";function LI(e,t){Y1(!0);var n=t[tf]||Bf(t);Y1(!1),n.render(e),t[tf]=n}function AI(e,t){dg==null||dg(e,t)}function DI(e,t){if(Bf){LI(e,t);return}AI(e,t)}function HI(e){return Bv.apply(this,arguments)}function Bv(){return Bv=Ba(oi().mark(function e(t){return oi().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var i;(i=t[tf])===null||i===void 0||i.unmount(),delete t[tf]}));case 1:case"end":return r.stop()}},e)})),Bv.apply(this,arguments)}function FI(e){jI(e)}function WI(e){return Lv.apply(this,arguments)}function Lv(){return Lv=Ba(oi().mark(function e(t){return oi().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(Bf===void 0){r.next=2;break}return r.abrupt("return",HI(t));case 2:FI(t);case 3:case"end":return r.stop()}},e)})),Lv.apply(this,arguments)}const VI=(e,t)=>(DI(e,t),()=>WI(t));let qI=VI;function Sy(e){return qI}const hg=()=>({height:0,opacity:0}),J1=e=>{const{scrollHeight:t}=e;return{height:t,opacity:1}},UI=e=>({height:e?e.offsetHeight:0}),fg=(e,t)=>(t==null?void 0:t.deadline)===!0||t.propertyName==="height",WE=(e=bu)=>({motionName:`${e}-motion-collapse`,onAppearStart:hg,onEnterStart:hg,onAppearActive:J1,onEnterActive:J1,onLeaveStart:UI,onLeaveActive:hg,onAppearEnd:fg,onEnterEnd:fg,onLeaveEnd:fg,motionDeadline:500}),qo=(e,t,n)=>n!==void 0?n:`${e}-${t}`;function dr(e,t){var n=Object.assign({},e);return Array.isArray(t)&&t.forEach(function(r){delete n[r]}),n}const Cy=(function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var i=e.getBoundingClientRect(),o=i.width,a=i.height;if(o||a)return!0}}return!1}),KI=e=>{const{componentCls:t,colorPrimary:n}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${e.motionDurationSlow} ${e.motionEaseInOut}`,`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(",")}}}}},GI=YP("Wave",KI),xy=`${bu}-wave-target`;function XI(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"&&e!=="canvastext"}function YI(e){var t;const{borderTopColor:n,borderColor:r,backgroundColor:i}=getComputedStyle(e);return(t=[n,r,i].find(XI))!==null&&t!==void 0?t:null}function mg(e){return Number.isNaN(e)?0:e}const JI=e=>{const{className:t,target:n,component:r,registerUnmount:i}=e,o=h.useRef(null),a=h.useRef(null);h.useEffect(()=>{a.current=i()},[]);const[c,u]=h.useState(null),[d,f]=h.useState([]),[p,g]=h.useState(0),[v,b]=h.useState(0),[_,S]=h.useState(0),[C,E]=h.useState(0),[k,$]=h.useState(!1),P={left:p,top:v,width:_,height:C,borderRadius:d.map(N=>`${N}px`).join(" ")};c&&(P["--wave-color"]=c);function T(){const N=getComputedStyle(n);u(YI(n));const I=N.position==="static",{borderLeftWidth:z,borderTopWidth:A}=N;g(I?n.offsetLeft:mg(-Number.parseFloat(z))),b(I?n.offsetTop:mg(-Number.parseFloat(A))),S(n.offsetWidth),E(n.offsetHeight);const{borderTopLeftRadius:M,borderTopRightRadius:j,borderBottomLeftRadius:B,borderBottomRightRadius:F}=N;f([M,j,F,B].map(W=>mg(Number.parseFloat(W))))}if(h.useEffect(()=>{if(n){const N=Rn(()=>{T(),$(!0)});let I;return typeof ResizeObserver<"u"&&(I=new ResizeObserver(T),I.observe(n)),()=>{Rn.cancel(N),I==null||I.disconnect()}}},[n]),!k)return null;const O=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(xy));return h.createElement(Vi,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(N,I)=>{var z,A;if(I.deadline||I.propertyName==="opacity"){const M=(z=o.current)===null||z===void 0?void 0:z.parentElement;(A=a.current)===null||A===void 0||A.call(a).then(()=>{M==null||M.remove()})}return!1}},({className:N},I)=>h.createElement("div",{ref:ho(o,I),className:ne(t,N,{"wave-quick":O}),style:P}))},QI=(e,t)=>{var n;const{component:r}=t;if(r==="Checkbox"&&!(!((n=e.querySelector("input"))===null||n===void 0)&&n.checked))return;const i=document.createElement("div");i.style.position="absolute",i.style.left="0px",i.style.top="0px",e==null||e.insertBefore(i,e==null?void 0:e.firstChild);const o=Sy();let a=null;function c(){return a}a=o(h.createElement(JI,Object.assign({},t,{target:e,registerUnmount:c})),i)},ZI=(e,t,n)=>{const{wave:r}=h.useContext(Ot),[,i,o]=mi(),a=Zn(d=>{const f=e.current;if(r!=null&&r.disabled||!f)return;const p=f.querySelector(`.${xy}`)||f,{showEffect:g}=r||{};(g||QI)(p,{className:t,token:i,component:n,event:d,hashId:o})}),c=h.useRef(null);return d=>{Rn.cancel(c.current),c.current=Rn(()=>{a(d)})}},Lf=e=>{const{children:t,disabled:n,component:r}=e,{getPrefixCls:i}=h.useContext(Ot),o=h.useRef(null),a=i("wave"),[,c]=GI(a),u=ZI(o,ne(a,c),r);if(Q.useEffect(()=>{const f=o.current;if(!f||f.nodeType!==window.Node.ELEMENT_NODE||n)return;const p=g=>{!Cy(g.target)||!f.getAttribute||f.getAttribute("disabled")||f.disabled||f.className.includes("disabled")&&!f.className.includes("disabled:")||f.getAttribute("aria-disabled")==="true"||f.className.includes("-leave")||u(g)};return f.addEventListener("click",p,!0),()=>{f.removeEventListener("click",p,!0)}},[n]),!Q.isValidElement(t))return t??null;const d=ta(t)?ho(ja(t),o):o;return fi(t,{ref:d})},Jo=e=>{const t=Q.useContext(Ul);return Q.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},eN=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},tN=yn(["Space","Compact"],e=>[eN(e)],()=>({}),{resetStyle:!1});var VE=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Af=h.createContext(null),Au=(e,t)=>{const n=h.useContext(Af),r=h.useMemo(()=>{if(!n)return"";const{compactDirection:i,isFirstItem:o,isLastItem:a}=n,c=i==="vertical"?"-vertical-":"-";return ne(`${e}-compact${c}item`,{[`${e}-compact${c}first-item`]:o,[`${e}-compact${c}last-item`]:a,[`${e}-compact${c}item-rtl`]:t==="rtl"})},[e,t,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},nN=e=>{const{children:t}=e;return h.createElement(Af.Provider,{value:null},t)},rN=e=>{const{children:t}=e,n=VE(e,["children"]);return h.createElement(Af.Provider,{value:h.useMemo(()=>n,[n])},t)},iN=e=>{const{getPrefixCls:t,direction:n}=h.useContext(Ot),{size:r,direction:i,block:o,prefixCls:a,className:c,rootClassName:u,children:d}=e,f=VE(e,["size","direction","block","prefixCls","className","rootClassName","children"]),p=Jo(k=>r??k),g=t("space-compact",a),[v,b]=tN(g),_=ne(g,b,{[`${g}-rtl`]:n==="rtl",[`${g}-block`]:o,[`${g}-vertical`]:i==="vertical"},c,u),S=h.useContext(Af),C=hi(d),E=h.useMemo(()=>C.map((k,$)=>{const P=(k==null?void 0:k.key)||`${g}-item-${$}`;return h.createElement(rN,{key:P,compactSize:p,compactDirection:i,isFirstItem:$===0&&(!S||(S==null?void 0:S.isFirstItem)),isLastItem:$===C.length-1&&(!S||(S==null?void 0:S.isLastItem))},k)}),[C,S,i,p,g]);return C.length===0?null:v(h.createElement("div",Object.assign({className:_},f),E))};var oN=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const qE=h.createContext(void 0),sN=e=>{const{getPrefixCls:t,direction:n}=h.useContext(Ot),{prefixCls:r,size:i,className:o}=e,a=oN(e,["prefixCls","size","className"]),c=t("btn-group",r),[,,u]=mi(),d=h.useMemo(()=>{switch(i){case"large":return"lg";case"small":return"sm";default:return""}},[i]),f=ne(c,{[`${c}-${d}`]:d,[`${c}-rtl`]:n==="rtl"},o,u);return h.createElement(qE.Provider,{value:i},h.createElement("div",Object.assign({},a,{className:f})))},Q1=/^[\u4E00-\u9FA5]{2}$/,Av=Q1.test.bind(Q1);function UE(e){return e==="danger"?{danger:!0}:{type:e}}function Z1(e){return typeof e=="string"}function pg(e){return e==="text"||e==="link"}function aN(e,t){if(e==null)return;const n=t?" ":"";return typeof e!="string"&&typeof e!="number"&&Z1(e.type)&&Av(e.props.children)?fi(e,{children:e.props.children.split("").join(n)}):Z1(e)?Av(e)?Q.createElement("span",null,e.split("").join(n)):Q.createElement("span",null,e):IE(e)?Q.createElement("span",null,e):e}function lN(e,t){let n=!1;const r=[];return Q.Children.forEach(e,i=>{const o=typeof i,a=o==="string"||o==="number";if(n&&a){const c=r.length-1,u=r[c];r[c]=`${u}${i}`}else r.push(i);n=a}),Q.Children.map(r,i=>aN(i,t))}["default","primary","danger"].concat(We(Qs));const KE=h.forwardRef((e,t)=>{const{className:n,style:r,children:i,prefixCls:o}=e,a=ne(`${o}-icon`,n);return Q.createElement("span",{ref:t,className:a,style:r},i)}),eC=h.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:i,iconClassName:o}=e,a=ne(`${n}-loading-icon`,r);return Q.createElement(KE,{prefixCls:n,className:a,style:i,ref:t},Q.createElement(ju,{className:o}))}),gg=()=>({width:0,opacity:0,transform:"scale(0)"}),vg=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),cN=e=>{const{prefixCls:t,loading:n,existIcon:r,className:i,style:o,mount:a}=e,c=!!n;return r?Q.createElement(eC,{prefixCls:t,className:i,style:o}):Q.createElement(Vi,{visible:c,motionName:`${t}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:gg,onAppearActive:vg,onEnterStart:gg,onEnterActive:vg,onLeaveStart:vg,onLeaveActive:gg},({className:u,style:d},f)=>{const p=Object.assign(Object.assign({},o),d);return Q.createElement(eC,{prefixCls:t,className:ne(i,u),style:p,ref:f})})},tC=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),uN=e=>{const{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:i,colorErrorHover:o}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},tC(`${t}-primary`,i),tC(`${t}-danger`,o)]}};var dN=["b"],hN=["v"],yg=function(t){return Math.round(Number(t||0))},fN=function(t){if(t instanceof vn)return t;if(t&&_t(t)==="object"&&"h"in t&&"b"in t){var n=t,r=n.b,i=Lt(n,dN);return X(X({},i),{},{v:r})}return typeof t=="string"&&/hsb/.test(t)?t.replace(/hsb/,"hsv"):t},Su=(function(e){ms(n,e);var t=ps(n);function n(r){return gr(this,n),t.call(this,fN(r))}return vr(n,[{key:"toHsbString",value:function(){var i=this.toHsb(),o=yg(i.s*100),a=yg(i.b*100),c=yg(i.h),u=i.a,d="hsb(".concat(c,", ").concat(o,"%, ").concat(a,"%)"),f="hsba(".concat(c,", ").concat(o,"%, ").concat(a,"%, ").concat(u.toFixed(u===0?0:2),")");return u===1?d:f}},{key:"toHsb",value:function(){var i=this.toHsv(),o=i.v,a=Lt(i,hN);return X(X({},a),{},{b:o,a:this.a})}}]),n})(vn),mN=function(t){return t instanceof Su?t:new Su(t)};mN("#1677ff");const pN=(e,t)=>(e==null?void 0:e.replace(/[^\w/]/g,"").slice(0,t?8:6))||"",gN=(e,t)=>e?pN(e,t):"";let Dv=(function(){function e(t){gr(this,e);var n;if(this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(n=t.colors)===null||n===void 0?void 0:n.map(i=>({color:new e(i.color),percent:i.percent})),this.cleared=t.cleared;return}const r=Array.isArray(t);r&&t.length?(this.colors=t.map(({color:i,percent:o})=>({color:new e(i),percent:o})),this.metaColor=new Su(this.colors[0].color.metaColor)):this.metaColor=new Su(r?"":t),(!t||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return vr(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return gN(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(i=>`${i.color.toRgbString()} ${i.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,i)=>{const o=n.colors[i];return r.percent===o.percent&&r.color.equals(o.color)}):this.toHexString()===n.toHexString()}}])})();var vN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},yN=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:vN}))},Hi=h.forwardRef(yN),GE=Q.forwardRef(function(e,t){var n=e.prefixCls,r=e.forceRender,i=e.className,o=e.style,a=e.children,c=e.isActive,u=e.role,d=e.classNames,f=e.styles,p=Q.useState(c||r),g=se(p,2),v=g[0],b=g[1];return Q.useEffect(function(){(r||c)&&b(!0)},[r,c]),v?Q.createElement("div",{ref:t,className:ne("".concat(n,"-content"),K(K({},"".concat(n,"-content-active"),c),"".concat(n,"-content-inactive"),!c),i),style:o,role:u},Q.createElement("div",{className:ne("".concat(n,"-content-box"),d==null?void 0:d.body),style:f==null?void 0:f.body},a)):null});GE.displayName="PanelContent";var bN=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],XE=Q.forwardRef(function(e,t){var n=e.showArrow,r=n===void 0?!0:n,i=e.headerClass,o=e.isActive,a=e.onItemClick,c=e.forceRender,u=e.className,d=e.classNames,f=d===void 0?{}:d,p=e.styles,g=p===void 0?{}:p,v=e.prefixCls,b=e.collapsible,_=e.accordion,S=e.panelKey,C=e.extra,E=e.header,k=e.expandIcon,$=e.openMotion,P=e.destroyInactivePanel,T=e.children,O=Lt(e,bN),N=b==="disabled",I=C!=null&&typeof C!="boolean",z=K(K(K({onClick:function(){a==null||a(S)},onKeyDown:function(V){(V.key==="Enter"||V.keyCode===Ge.ENTER||V.which===Ge.ENTER)&&(a==null||a(S))},role:_?"tab":"button"},"aria-expanded",o),"aria-disabled",N),"tabIndex",N?-1:0),A=typeof k=="function"?k(e):Q.createElement("i",{className:"arrow"}),M=A&&Q.createElement("div",Re({className:"".concat(v,"-expand-icon")},["header","icon"].includes(b)?z:{}),A),j=ne("".concat(v,"-item"),K(K({},"".concat(v,"-item-active"),o),"".concat(v,"-item-disabled"),N),u),B=ne(i,"".concat(v,"-header"),K({},"".concat(v,"-collapsible-").concat(b),!!b),f.header),F=X({className:B,style:g.header},["header","icon"].includes(b)?{}:z);return Q.createElement("div",Re({},O,{ref:t,className:j}),Q.createElement("div",F,r&&M,Q.createElement("span",Re({className:"".concat(v,"-header-text")},b==="header"?z:{}),E),I&&Q.createElement("div",{className:"".concat(v,"-extra")},C)),Q.createElement(Vi,Re({visible:o,leavedClassName:"".concat(v,"-content-hidden")},$,{forceRender:c,removeOnLeave:P}),function(W,V){var L=W.className,G=W.style;return Q.createElement(GE,{ref:V,prefixCls:v,className:L,classNames:f,style:G,styles:g,isActive:o,forceRender:c,role:_?"tabpanel":void 0},T)}))}),_N=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],SN=function(t,n){var r=n.prefixCls,i=n.accordion,o=n.collapsible,a=n.destroyInactivePanel,c=n.onItemClick,u=n.activeKey,d=n.openMotion,f=n.expandIcon;return t.map(function(p,g){var v=p.children,b=p.label,_=p.key,S=p.collapsible,C=p.onItemClick,E=p.destroyInactivePanel,k=Lt(p,_N),$=String(_??g),P=S??o,T=E??a,O=function(z){P!=="disabled"&&(c(z),C==null||C(z))},N=!1;return i?N=u[0]===$:N=u.indexOf($)>-1,Q.createElement(XE,Re({},k,{prefixCls:r,key:$,panelKey:$,isActive:N,accordion:i,openMotion:d,expandIcon:f,header:b,collapsible:P,onItemClick:O,destroyInactivePanel:T}),v)})},CN=function(t,n,r){if(!t)return null;var i=r.prefixCls,o=r.accordion,a=r.collapsible,c=r.destroyInactivePanel,u=r.onItemClick,d=r.activeKey,f=r.openMotion,p=r.expandIcon,g=t.key||String(n),v=t.props,b=v.header,_=v.headerClass,S=v.destroyInactivePanel,C=v.collapsible,E=v.onItemClick,k=!1;o?k=d[0]===g:k=d.indexOf(g)>-1;var $=C??a,P=function(N){$!=="disabled"&&(u(N),E==null||E(N))},T={key:g,panelKey:g,header:b,headerClass:_,isActive:k,prefixCls:i,destroyInactivePanel:S??c,openMotion:f,accordion:o,children:t.props.children,onItemClick:P,expandIcon:p,collapsible:$};return typeof t.type=="string"?t:(Object.keys(T).forEach(function(O){typeof T[O]>"u"&&delete T[O]}),Q.cloneElement(t,T))};function xN(e,t,n){return Array.isArray(e)?SN(e,n):hi(t).map(function(r,i){return CN(r,i,n)})}function wN(e){var t=e;if(!Array.isArray(t)){var n=_t(t);t=n==="number"||n==="string"?[t]:[]}return t.map(function(r){return String(r)})}var EN=Q.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-collapse":n,i=e.destroyInactivePanel,o=i===void 0?!1:i,a=e.style,c=e.accordion,u=e.className,d=e.children,f=e.collapsible,p=e.openMotion,g=e.expandIcon,v=e.activeKey,b=e.defaultActiveKey,_=e.onChange,S=e.items,C=ne(r,u),E=er([],{value:v,onChange:function(I){return _==null?void 0:_(I)},defaultValue:b,postState:wN}),k=se(E,2),$=k[0],P=k[1],T=function(I){return P(function(){if(c)return $[0]===I?[]:[I];var z=$.indexOf(I),A=z>-1;return A?$.filter(function(M){return M!==I}):[].concat(We($),[I])})};Br(!d,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var O=xN(S,d,{prefixCls:r,accordion:c,openMotion:p,expandIcon:g,collapsible:f,destroyInactivePanel:o,onItemClick:T,activeKey:$});return Q.createElement("div",Re({ref:t,className:C,style:a,role:c?"tablist":void 0},qi(e,{aria:!0,data:!0})),O)});const wy=Object.assign(EN,{Panel:XE});wy.Panel;const kN=h.forwardRef((e,t)=>{const{getPrefixCls:n}=h.useContext(Ot),{prefixCls:r,className:i,showArrow:o=!0}=e,a=n("collapse",r),c=ne({[`${a}-no-arrow`]:!o},i);return h.createElement(wy.Panel,Object.assign({ref:t},e,{prefixCls:a,className:c}))}),YE=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
177
- opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
178
- opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),$N=e=>({animationDuration:e,animationFillMode:"both"}),RN=e=>({animationDuration:e,animationFillMode:"both"}),Df=(e,t,n,r,i=!1)=>{const o=i?"&":"";return{[`
179
- ${o}${e}-enter,
180
- ${o}${e}-appear
181
- `]:Object.assign(Object.assign({},$N(r)),{animationPlayState:"paused"}),[`${o}${e}-leave`]:Object.assign(Object.assign({},RN(r)),{animationPlayState:"paused"}),[`
182
- ${o}${e}-enter${e}-enter-active,
183
- ${o}${e}-appear${e}-appear-active
184
- `]:{animationName:t,animationPlayState:"running"},[`${o}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},TN=new Yt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),PN=new Yt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),ON=(e,t=!1)=>{const{antCls:n}=e,r=`${n}-fade`,i=t?"&":"";return[Df(r,TN,PN,e.motionDurationMid,t),{[`
185
- ${i}${r}-enter,
186
- ${i}${r}-appear
187
- `]:{opacity:0,animationTimingFunction:"linear"},[`${i}${r}-leave`]:{animationTimingFunction:"linear"}}]},IN=new Yt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),NN=new Yt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),MN=new Yt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),zN=new Yt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),jN=new Yt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),BN=new Yt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),LN=new Yt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),AN=new Yt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),DN={"move-up":{inKeyframes:LN,outKeyframes:AN},"move-down":{inKeyframes:IN,outKeyframes:NN},"move-left":{inKeyframes:MN,outKeyframes:zN},"move-right":{inKeyframes:jN,outKeyframes:BN}},nf=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:o}=DN[t];return[Df(r,i,o,e.motionDurationMid),{[`
188
- ${r}-enter,
189
- ${r}-appear
190
- `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Ey=new Yt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),ky=new Yt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),$y=new Yt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Ry=new Yt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),HN=new Yt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),FN=new Yt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),WN=new Yt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),VN=new Yt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),qN={"slide-up":{inKeyframes:Ey,outKeyframes:ky},"slide-down":{inKeyframes:$y,outKeyframes:Ry},"slide-left":{inKeyframes:HN,outKeyframes:FN},"slide-right":{inKeyframes:WN,outKeyframes:VN}},ea=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:o}=qN[t];return[Df(r,i,o,e.motionDurationMid),{[`
191
- ${r}-enter,
192
- ${r}-appear
193
- `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},UN=new Yt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),KN=new Yt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),nC=new Yt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),rC=new Yt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),GN=new Yt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),XN=new Yt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),YN=new Yt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),JN=new Yt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),QN=new Yt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),ZN=new Yt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),e6=new Yt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),t6=new Yt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),n6={zoom:{inKeyframes:UN,outKeyframes:KN},"zoom-big":{inKeyframes:nC,outKeyframes:rC},"zoom-big-fast":{inKeyframes:nC,outKeyframes:rC},"zoom-left":{inKeyframes:YN,outKeyframes:JN},"zoom-right":{inKeyframes:QN,outKeyframes:ZN},"zoom-up":{inKeyframes:GN,outKeyframes:XN},"zoom-down":{inKeyframes:e6,outKeyframes:t6}},Du=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:o}=n6[t];return[Df(r,i,o,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[`
194
- ${r}-enter,
195
- ${r}-appear
196
- `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},r6=e=>{const{componentCls:t,contentBg:n,padding:r,headerBg:i,headerPadding:o,collapseHeaderPaddingSM:a,collapseHeaderPaddingLG:c,collapsePanelBorderRadius:u,lineWidth:d,lineType:f,colorBorder:p,colorText:g,colorTextHeading:v,colorTextDisabled:b,fontSizeLG:_,lineHeight:S,lineHeightLG:C,marginSM:E,paddingSM:k,paddingLG:$,paddingXS:P,motionDurationSlow:T,fontSizeIcon:O,contentPadding:N,fontHeight:I,fontHeightLG:z}=e,A=`${te(d)} ${f} ${p}`;return{[t]:Object.assign(Object.assign({},Vn(e)),{backgroundColor:i,border:A,borderRadius:u,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:A,"&:first-child":{[`
197
- &,
198
- & > ${t}-header`]:{borderRadius:`${te(u)} ${te(u)} 0 0`}},"&:last-child":{[`
199
- &,
200
- & > ${t}-header`]:{borderRadius:`0 0 ${te(u)} ${te(u)}`}},[`> ${t}-header`]:Object.assign(Object.assign({position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:o,color:v,lineHeight:S,cursor:"pointer",transition:`all ${T}, visibility 0s`},uo(e)),{[`> ${t}-header-text`]:{flex:"auto"},[`${t}-expand-icon`]:{height:I,display:"flex",alignItems:"center",paddingInlineEnd:E},[`${t}-arrow`]:Object.assign(Object.assign({},Zl()),{fontSize:O,transition:`transform ${T}`,svg:{transition:`transform ${T}`}}),[`${t}-header-text`]:{marginInlineEnd:"auto"}}),[`${t}-collapsible-header`]:{cursor:"default",[`${t}-header-text`]:{flex:"none",cursor:"pointer"},[`${t}-expand-icon`]:{cursor:"pointer"}},[`${t}-collapsible-icon`]:{cursor:"unset",[`${t}-expand-icon`]:{cursor:"pointer"}}},[`${t}-content`]:{color:g,backgroundColor:n,borderTop:A,[`& > ${t}-content-box`]:{padding:N},"&-hidden":{display:"none"}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:a,paddingInlineStart:P,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(k).sub(P).equal()}},[`> ${t}-content > ${t}-content-box`]:{padding:k}}},"&-large":{[`> ${t}-item`]:{fontSize:_,lineHeight:C,[`> ${t}-header`]:{padding:c,paddingInlineStart:r,[`> ${t}-expand-icon`]:{height:z,marginInlineStart:e.calc($).sub(r).equal()}},[`> ${t}-content > ${t}-content-box`]:{padding:$}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-content`]:{borderRadius:`0 0 ${te(u)} ${te(u)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:b,cursor:"not-allowed"}},[`&${t}-icon-position-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:E}}}}})}},i6=e=>{const{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},o6=e=>{const{componentCls:t,headerBg:n,borderlessContentPadding:r,borderlessContentBg:i,colorBorder:o}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${o}`},[`
201
- > ${t}-item:last-child,
202
- > ${t}-item:last-child ${t}-header
203
- `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-content`]:{backgroundColor:i,borderTop:0},[`> ${t}-item > ${t}-content > ${t}-content-box`]:{padding:r}}}},s6=e=>{const{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-content`]:{backgroundColor:"transparent",border:0,[`> ${t}-content-box`]:{paddingBlock:n}}}}}},a6=e=>({headerPadding:`${e.paddingSM}px ${e.padding}px`,headerBg:e.colorFillAlter,contentPadding:`${e.padding}px 16px`,contentBg:e.colorBgContainer,borderlessContentPadding:`${e.paddingXXS}px 16px ${e.padding}px`,borderlessContentBg:"transparent"}),l6=yn("Collapse",e=>{const t=tn(e,{collapseHeaderPaddingSM:`${te(e.paddingXS)} ${te(e.paddingSM)}`,collapseHeaderPaddingLG:`${te(e.padding)} ${te(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[r6(t),o6(t),s6(t),i6(t),YE(t)]},a6),c6=h.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,expandIcon:i,className:o,style:a}=Ur("collapse"),{prefixCls:c,className:u,rootClassName:d,style:f,bordered:p=!0,ghost:g,size:v,expandIconPosition:b="start",children:_,destroyInactivePanel:S,destroyOnHidden:C,expandIcon:E}=e,k=Jo(F=>{var W;return(W=v??F)!==null&&W!==void 0?W:"middle"}),$=n("collapse",c),P=n(),[T,O,N]=l6($),I=h.useMemo(()=>b==="left"?"start":b==="right"?"end":b,[b]),z=E??i,A=h.useCallback((F={})=>{const W=typeof z=="function"?z(F):h.createElement(Hi,{rotate:F.isActive?r==="rtl"?-90:90:void 0,"aria-label":F.isActive?"expanded":"collapsed"});return fi(W,()=>{var V;return{className:ne((V=W.props)===null||V===void 0?void 0:V.className,`${$}-arrow`)}})},[z,$,r]),M=ne(`${$}-icon-position-${I}`,{[`${$}-borderless`]:!p,[`${$}-rtl`]:r==="rtl",[`${$}-ghost`]:!!g,[`${$}-${k}`]:k!=="middle"},o,u,d,O,N),j=h.useMemo(()=>Object.assign(Object.assign({},WE(P)),{motionAppear:!1,leavedClassName:`${$}-content-hidden`}),[P,$]),B=h.useMemo(()=>_?hi(_).map((F,W)=>{var V,L;const G=F.props;if(G!=null&&G.disabled){const U=(V=F.key)!==null&&V!==void 0?V:String(W),D=Object.assign(Object.assign({},dr(F.props,["disabled"])),{key:U,collapsible:(L=G.collapsible)!==null&&L!==void 0?L:"disabled"});return fi(F,D)}return F}):null,[_]);return T(h.createElement(wy,Object.assign({ref:t,openMotion:j},dr(e,["rootClassName"]),{expandIcon:A,prefixCls:$,className:M,style:Object.assign(Object.assign({},a),f),destroyInactivePanel:C??S}),B))}),Yc=Object.assign(c6,{Panel:kN}),u6=e=>e instanceof Dv?e:new Dv(e),d6=(e,t)=>{const{r:n,g:r,b:i,a:o}=e.toRgb(),a=new Su(e.toRgbString()).onBackground(t).toHsv();return o<=.5?a.v>.5:n*.299+r*.587+i*.114>192},JE=e=>{const{paddingInline:t,onlyIconSize:n}=e;return tn(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},QE=e=>{var t,n,r,i,o,a;const c=(t=e.contentFontSize)!==null&&t!==void 0?t:e.fontSize,u=(n=e.contentFontSizeSM)!==null&&n!==void 0?n:e.fontSize,d=(r=e.contentFontSizeLG)!==null&&r!==void 0?r:e.fontSizeLG,f=(i=e.contentLineHeight)!==null&&i!==void 0?i:Oh(c),p=(o=e.contentLineHeightSM)!==null&&o!==void 0?o:Oh(u),g=(a=e.contentLineHeightLG)!==null&&a!==void 0?a:Oh(d),v=d6(new Dv(e.colorBgSolid),"#fff")?"#000":"#fff",b=Qs.reduce((_,S)=>Object.assign(Object.assign({},_),{[`${S}ShadowColor`]:`0 ${te(e.controlOutlineWidth)} 0 ${Xc(e[`${S}1`],e.colorBgContainer)}`}),{});return Object.assign(Object.assign({},b),{fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorder,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:v,contentFontSize:c,contentFontSizeSM:u,contentFontSizeLG:d,contentLineHeight:f,contentLineHeightSM:p,contentLineHeightLG:g,paddingBlock:Math.max((e.controlHeight-c*f)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-u*p)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-d*g)/2-e.lineWidth,0)})},h6=e=>{const{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:o,motionEaseInOut:a,iconGap:c,calc:u}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:c,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${te(e.lineWidth)} ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:e.colorText,"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:Zl(),"> a":{color:"currentColor"},"&:not(:disabled)":uo(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"}},[`&${t}-loading`]:{opacity:i,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(d=>`${d} ${o} ${a}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:u(c).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:u(c).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:u(c).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:u(c).mul(-1).equal()}}}}}},ZE=(e,t,n)=>({[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":t,"&:active":n}}),f6=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),m6=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),Hf=(e,t,n,r,i,o,a,c)=>({[`&${e}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:t,borderColor:r||void 0,boxShadow:"none"},ZE(e,Object.assign({background:t},a),Object.assign({background:t},c))),{"&:disabled":{cursor:"not-allowed",color:i||void 0,borderColor:o||void 0}})}),p6=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},m6(e))}),g6=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",color:e.colorTextDisabled}}),Ff=(e,t,n,r)=>{const o=r&&["link","text"].includes(r)?g6:p6;return Object.assign(Object.assign({},o(e)),ZE(e.componentCls,t,n))},Wf=(e,t,n,r,i)=>({[`&${e.componentCls}-variant-solid`]:Object.assign({color:t,background:n},Ff(e,r,i))}),Vf=(e,t,n,r,i)=>({[`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]:Object.assign({borderColor:t,background:n},Ff(e,r,i))}),qf=e=>({[`&${e.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),Uf=(e,t,n,r)=>({[`&${e.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:t},Ff(e,n,r))}),Uo=(e,t,n,r,i)=>({[`&${e.componentCls}-variant-${n}`]:Object.assign({color:t,boxShadow:"none"},Ff(e,r,i,n))}),v6=e=>{const{componentCls:t}=e;return Qs.reduce((n,r)=>{const i=e[`${r}6`],o=e[`${r}1`],a=e[`${r}5`],c=e[`${r}2`],u=e[`${r}3`],d=e[`${r}7`];return Object.assign(Object.assign({},n),{[`&${t}-color-${r}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:i,boxShadow:e[`${r}ShadowColor`]},Wf(e,e.colorTextLightSolid,i,{background:a},{background:d})),Vf(e,i,e.colorBgContainer,{color:a,borderColor:a,background:e.colorBgContainer},{color:d,borderColor:d,background:e.colorBgContainer})),qf(e)),Uf(e,o,{color:i,background:c},{color:i,background:u})),Uo(e,i,"link",{color:a},{color:d})),Uo(e,i,"text",{color:a,background:o},{color:d,background:u}))})},{})},y6=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.defaultColor,boxShadow:e.defaultShadow},Wf(e,e.solidTextColor,e.colorBgSolid,{color:e.solidTextColor,background:e.colorBgSolidHover},{color:e.solidTextColor,background:e.colorBgSolidActive})),qf(e)),Uf(e,e.colorFillTertiary,{color:e.defaultColor,background:e.colorFillSecondary},{color:e.defaultColor,background:e.colorFill})),Hf(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),Uo(e,e.textTextColor,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),b6=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorPrimary,boxShadow:e.primaryShadow},Vf(e,e.colorPrimary,e.colorBgContainer,{color:e.colorPrimaryTextHover,borderColor:e.colorPrimaryHover,background:e.colorBgContainer},{color:e.colorPrimaryTextActive,borderColor:e.colorPrimaryActive,background:e.colorBgContainer})),qf(e)),Uf(e,e.colorPrimaryBg,{color:e.colorPrimary,background:e.colorPrimaryBgHover},{color:e.colorPrimary,background:e.colorPrimaryBorder})),Uo(e,e.colorPrimaryText,"text",{color:e.colorPrimaryTextHover,background:e.colorPrimaryBg},{color:e.colorPrimaryTextActive,background:e.colorPrimaryBorder})),Uo(e,e.colorPrimaryText,"link",{color:e.colorPrimaryTextHover,background:e.linkHoverBg},{color:e.colorPrimaryTextActive})),Hf(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),_6=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorError,boxShadow:e.dangerShadow},Wf(e,e.dangerColor,e.colorError,{background:e.colorErrorHover},{background:e.colorErrorActive})),Vf(e,e.colorError,e.colorBgContainer,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),qf(e)),Uf(e,e.colorErrorBg,{color:e.colorError,background:e.colorErrorBgFilledHover},{color:e.colorError,background:e.colorErrorBgActive})),Uo(e,e.colorError,"text",{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBgActive})),Uo(e,e.colorError,"link",{color:e.colorErrorHover},{color:e.colorErrorActive})),Hf(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),S6=e=>Object.assign(Object.assign({},Uo(e,e.colorLink,"link",{color:e.colorLinkHover},{color:e.colorLinkActive})),Hf(e.componentCls,e.ghostBg,e.colorInfo,e.colorInfo,e.colorTextDisabled,e.colorBorder,{color:e.colorInfoHover,borderColor:e.colorInfoHover},{color:e.colorInfoActive,borderColor:e.colorInfoActive})),C6=e=>{const{componentCls:t}=e;return Object.assign({[`${t}-color-default`]:y6(e),[`${t}-color-primary`]:b6(e),[`${t}-color-dangerous`]:_6(e),[`${t}-color-link`]:S6(e)},v6(e))},x6=e=>Object.assign(Object.assign(Object.assign(Object.assign({},Vf(e,e.defaultBorderColor,e.defaultBg,{color:e.defaultHoverColor,borderColor:e.defaultHoverBorderColor,background:e.defaultHoverBg},{color:e.defaultActiveColor,borderColor:e.defaultActiveBorderColor,background:e.defaultActiveBg})),Uo(e,e.textTextColor,"text",{color:e.textTextHoverColor,background:e.textHoverBg},{color:e.textTextActiveColor,background:e.colorBgTextActive})),Wf(e,e.primaryColor,e.colorPrimary,{background:e.colorPrimaryHover,color:e.primaryColor},{background:e.colorPrimaryActive,color:e.primaryColor})),Uo(e,e.colorLink,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),Ty=(e,t="")=>{const{componentCls:n,controlHeight:r,fontSize:i,borderRadius:o,buttonPaddingHorizontal:a,iconCls:c,buttonPaddingVertical:u,buttonIconOnlyFontSize:d}=e;return[{[t]:{fontSize:i,height:r,padding:`${te(u)} ${te(a)}`,borderRadius:o,[`&${n}-icon-only`]:{width:r,[c]:{fontSize:d}}}},{[`${n}${n}-circle${t}`]:f6(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},w6=e=>{const t=tn(e,{fontSize:e.contentFontSize});return Ty(t,e.componentCls)},E6=e=>{const t=tn(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return Ty(t,`${e.componentCls}-sm`)},k6=e=>{const t=tn(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return Ty(t,`${e.componentCls}-lg`)},$6=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},R6=yn("Button",e=>{const t=JE(e);return[h6(t),w6(t),E6(t),k6(t),$6(t),C6(t),x6(t),uN(t)]},QE,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function T6(e,t,n,r){const{focusElCls:i,focus:o,borderElCls:a}=n,c=a?"> *":"",u=["hover",o?"focus":null,"active"].filter(Boolean).map(d=>`&:${d} ${c}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":Object.assign(Object.assign({[u]:{zIndex:3}},i?{[`&${i}`]:{zIndex:3}}:{}),{[`&[disabled] ${c}`]:{zIndex:0}})}}function P6(e,t,n){const{borderElCls:r}=n,i=r?`> ${r}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Kf(e,t={focus:!0}){const{componentCls:n}=e,{componentCls:r}=t,i=r||n,o=`${i}-compact`;return{[o]:Object.assign(Object.assign({},T6(e,o,t,i)),P6(i,o,t))}}function O6(e,t,n){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function I6(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function N6(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},O6(e,t,e.componentCls)),I6(e.componentCls,t))}}const M6=e=>{const{componentCls:t,colorPrimaryHover:n,lineWidth:r,calc:i}=e,o=i(r).mul(-1).equal(),a=c=>{const u=`${t}-compact${c?"-vertical":""}-item${t}-primary:not([disabled])`;return{[`${u} + ${u}::before`]:{position:"absolute",top:c?o:0,insetInlineStart:c?0:o,backgroundColor:n,content:'""',width:c?"100%":r,height:c?r:"100%"}}};return Object.assign(Object.assign({},a()),a(!0))},z6=zu(["Button","compact"],e=>{const t=JE(e);return[Kf(t),N6(t),M6(t)]},QE);var j6=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function B6(e){if(typeof e=="object"&&e){let t=e==null?void 0:e.delay;return t=!Number.isNaN(t)&&typeof t=="number"?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}const L6={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},A6=Q.forwardRef((e,t)=>{var n,r;const{loading:i=!1,prefixCls:o,color:a,variant:c,type:u,danger:d=!1,shape:f,size:p,styles:g,disabled:v,className:b,rootClassName:_,children:S,icon:C,iconPosition:E="start",ghost:k=!1,block:$=!1,htmlType:P="button",classNames:T,style:O={},autoInsertSpace:N,autoFocus:I}=e,z=j6(e,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),A=u||"default",{button:M}=Q.useContext(Ot),j=f||(M==null?void 0:M.shape)||"default",[B,F]=h.useMemo(()=>{if(a&&c)return[a,c];if(u||d){const St=L6[A]||[];return d?["danger",St[1]]:St}return M!=null&&M.color&&(M!=null&&M.variant)?[M.color,M.variant]:["default","outlined"]},[a,c,u,d,M==null?void 0:M.color,M==null?void 0:M.variant,A]),V=B==="danger"?"dangerous":B,{getPrefixCls:L,direction:G,autoInsertSpace:U,className:D,style:q,classNames:Y,styles:ee}=Ur("button"),Z=(n=N??U)!==null&&n!==void 0?n:!0,re=L("btn",o),[he,fe,ue]=R6(re),Se=h.useContext(Js),ae=v??Se,le=h.useContext(qE),ce=h.useMemo(()=>B6(i),[i]),[ye,me]=h.useState(ce.loading),[de,be]=h.useState(!1),xe=h.useRef(null),Te=Xo(t,xe),ze=h.Children.count(S)===1&&!C&&!pg(F),Ee=h.useRef(!0);Q.useEffect(()=>(Ee.current=!1,()=>{Ee.current=!0}),[]),hn(()=>{let St=null;ce.delay>0?St=setTimeout(()=>{St=null,me(!0)},ce.delay):me(ce.loading);function nn(){St&&(clearTimeout(St),St=null)}return nn},[ce.delay,ce.loading]),h.useEffect(()=>{if(!xe.current||!Z)return;const St=xe.current.textContent||"";ze&&Av(St)?de||be(!0):de&&be(!1)}),h.useEffect(()=>{I&&xe.current&&xe.current.focus()},[]);const ke=Q.useCallback(St=>{var nn;if(ye||ae){St.preventDefault();return}(nn=e.onClick)===null||nn===void 0||nn.call(e,("href"in e,St))},[e.onClick,ye,ae]),{compactSize:je,compactItemClassnames:Oe}=Au(re,G),Qe={large:"lg",small:"sm",middle:void 0},at=Jo(St=>{var nn,Jt;return(Jt=(nn=p??je)!==null&&nn!==void 0?nn:le)!==null&&Jt!==void 0?Jt:St}),$t=at&&(r=Qe[at])!==null&&r!==void 0?r:"",pt=ye?"loading":C,Je=dr(z,["navigate"]),ft=ne(re,fe,ue,{[`${re}-${j}`]:j!=="default"&&j,[`${re}-${A}`]:A,[`${re}-dangerous`]:d,[`${re}-color-${V}`]:V,[`${re}-variant-${F}`]:F,[`${re}-${$t}`]:$t,[`${re}-icon-only`]:!S&&S!==0&&!!pt,[`${re}-background-ghost`]:k&&!pg(F),[`${re}-loading`]:ye,[`${re}-two-chinese-chars`]:de&&Z&&!ye,[`${re}-block`]:$,[`${re}-rtl`]:G==="rtl",[`${re}-icon-end`]:E==="end"},Oe,b,_,D),Xe=Object.assign(Object.assign({},q),O),yt=ne(T==null?void 0:T.icon,Y.icon),tt=Object.assign(Object.assign({},(g==null?void 0:g.icon)||{}),ee.icon||{}),Le=St=>Q.createElement(KE,{prefixCls:re,className:yt,style:tt},St),rt=()=>Q.createElement(cN,{existIcon:!!C,prefixCls:re,loading:ye,mount:Ee.current});let Me;C&&!ye?Me=Le(C):i&&typeof i=="object"&&i.icon?Me=Le(i.icon):Me=rt();const Ue=S||S===0?lN(S,ze&&Z):null;if(Je.href!==void 0)return he(Q.createElement("a",Object.assign({},Je,{className:ne(ft,{[`${re}-disabled`]:ae}),href:ae?void 0:Je.href,style:Xe,onClick:ke,ref:Te,tabIndex:ae?-1:0,"aria-disabled":ae}),Me,Ue));let It=Q.createElement("button",Object.assign({},z,{type:P,className:ft,style:Xe,onClick:ke,disabled:ae,ref:Te}),Me,Ue,Oe&&Q.createElement(z6,{prefixCls:re}));return pg(F)||(It=Q.createElement(Lf,{component:"Button",disabled:ye},It)),he(It)}),ur=A6;ur.Group=sN;ur.__ANT_BUTTON=!0;const bg=e=>typeof(e==null?void 0:e.then)=="function",ek=e=>{const{type:t,children:n,prefixCls:r,buttonProps:i,close:o,autoFocus:a,emitEvent:c,isSilent:u,quitOnNullishReturnValue:d,actionFn:f}=e,p=h.useRef(!1),g=h.useRef(null),[v,b]=Kl(!1),_=(...E)=>{o==null||o.apply(void 0,E)};h.useEffect(()=>{let E=null;return a&&(E=setTimeout(()=>{var k;(k=g.current)===null||k===void 0||k.focus({preventScroll:!0})})),()=>{E&&clearTimeout(E)}},[a]);const S=E=>{bg(E)&&(b(!0),E.then((...k)=>{b(!1,!0),_.apply(void 0,k),p.current=!1},k=>{if(b(!1,!0),p.current=!1,!(u!=null&&u()))return Promise.reject(k)}))},C=E=>{if(p.current)return;if(p.current=!0,!f){_();return}let k;if(c){if(k=f(E),d&&!bg(k)){p.current=!1,_(E);return}}else if(f.length)k=f(o),p.current=!1;else if(k=f(),!bg(k)){_();return}S(k)};return h.createElement(ur,Object.assign({},UE(t),{onClick:C,loading:v,prefixCls:r},i,{ref:g}),n)},Hu=Q.createContext({}),{Provider:tk}=Hu,iC=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:i,rootPrefixCls:o,close:a,onCancel:c,onConfirm:u}=h.useContext(Hu);return i?Q.createElement(ek,{isSilent:r,actionFn:c,close:(...d)=>{a==null||a.apply(void 0,d),u==null||u(!1)},autoFocus:e==="cancel",buttonProps:t,prefixCls:`${o}-btn`},n):null},oC=()=>{const{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:i,okTextLocale:o,okType:a,onConfirm:c,onOk:u}=h.useContext(Hu);return Q.createElement(ek,{isSilent:n,type:a||"primary",actionFn:u,close:(...d)=>{t==null||t.apply(void 0,d),c==null||c(!0)},autoFocus:e==="ok",buttonProps:r,prefixCls:`${i}-btn`},o)};var nk=h.createContext(null),sC=[];function D6(e,t){var n=h.useState(function(){if(!ii())return null;var b=document.createElement("div");return b}),r=se(n,1),i=r[0],o=h.useRef(!1),a=h.useContext(nk),c=h.useState(sC),u=se(c,2),d=u[0],f=u[1],p=a||(o.current?void 0:function(b){f(function(_){var S=[b].concat(We(_));return S})});function g(){i.parentElement||document.body.appendChild(i),o.current=!0}function v(){var b;(b=i.parentElement)===null||b===void 0||b.removeChild(i),o.current=!1}return hn(function(){return e?a?a(g):g():v(),v},[e]),hn(function(){d.length&&(d.forEach(function(b){return b()}),f(sC))},[d]),[i,p]}function H6(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=t;var r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";var i,o;if(e){var a=getComputedStyle(e);r.scrollbarColor=a.scrollbarColor,r.scrollbarWidth=a.scrollbarWidth;var c=getComputedStyle(e,"::-webkit-scrollbar"),u=parseInt(c.width,10),d=parseInt(c.height,10);try{var f=u?"width: ".concat(c.width,";"):"",p=d?"height: ".concat(c.height,";"):"";fs(`
204
- #`.concat(t,`::-webkit-scrollbar {
205
- `).concat(f,`
206
- `).concat(p,`
207
- }`),t)}catch(b){console.error(b),i=u,o=d}}document.body.appendChild(n);var g=e&&i&&!isNaN(i)?i:n.offsetWidth-n.clientWidth,v=e&&o&&!isNaN(o)?o:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),pu(t),{width:g,height:v}}function F6(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:H6(e)}function W6(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var V6="rc-util-locker-".concat(Date.now()),aC=0;function q6(e){var t=!!e,n=h.useState(function(){return aC+=1,"".concat(V6,"_").concat(aC)}),r=se(n,1),i=r[0];hn(function(){if(t){var o=F6(document.body).width,a=W6();fs(`
208
- html body {
209
- overflow-y: hidden;
210
- `.concat(a?"width: calc(100% - ".concat(o,"px);"):"",`
211
- }`),i)}else pu(i);return function(){pu(i)}},[t,i])}var U6=!1;function K6(e){return U6}var lC=function(t){return t===!1?!1:!ii()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},Gf=h.forwardRef(function(e,t){var n=e.open,r=e.autoLock,i=e.getContainer;e.debug;var o=e.autoDestroy,a=o===void 0?!0:o,c=e.children,u=h.useState(n),d=se(u,2),f=d[0],p=d[1],g=f||n;h.useEffect(function(){(a||n)&&p(n)},[n,a]);var v=h.useState(function(){return lC(i)}),b=se(v,2),_=b[0],S=b[1];h.useEffect(function(){var A=lC(i);S(A??null)});var C=D6(g&&!_),E=se(C,2),k=E[0],$=E[1],P=_??k;q6(r&&n&&ii()&&(P===k||P===document.body));var T=null;if(c&&ta(c)&&t){var O=c;T=O.ref}var N=Xo(T,t);if(!g||!ii()||_===void 0)return null;var I=P===!1||K6(),z=c;return t&&(z=h.cloneElement(c,{ref:N})),h.createElement(nk.Provider,{value:$},I?z:Xs.createPortal(z,P))}),rk=h.createContext({});function G6(){var e=X({},Rf);return e.useId}var cC=0,uC=G6();const Xf=uC?(function(t){var n=uC();return t||n}):(function(t){var n=h.useState("ssr-id"),r=se(n,2),i=r[0],o=r[1];return h.useEffect(function(){var a=cC;cC+=1,o("rc_unique_".concat(a))},[]),t||i});function dC(e,t,n){var r=t;return!r&&n&&(r="".concat(e,"-").concat(n)),r}function hC(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if(typeof n!="number"){var i=e.document;n=i.documentElement[r],typeof n!="number"&&(n=i.body[r])}return n}function X6(e){var t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=hC(i),n.top+=hC(i,!0),n}const Y6=h.memo(function(e){var t=e.children;return t},function(e,t){var n=t.shouldUpdate;return!n});var J6={width:0,height:0,overflow:"hidden",outline:"none"},Q6={outline:"none"},ik=Q.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,i=e.style,o=e.title,a=e.ariaId,c=e.footer,u=e.closable,d=e.closeIcon,f=e.onClose,p=e.children,g=e.bodyStyle,v=e.bodyProps,b=e.modalRender,_=e.onMouseDown,S=e.onMouseUp,C=e.holderRef,E=e.visible,k=e.forceRender,$=e.width,P=e.height,T=e.classNames,O=e.styles,N=Q.useContext(rk),I=N.panel,z=Xo(C,I),A=h.useRef(),M=h.useRef();Q.useImperativeHandle(t,function(){return{focus:function(){var q;(q=A.current)===null||q===void 0||q.focus({preventScroll:!0})},changeActive:function(q){var Y=document,ee=Y.activeElement;q&&ee===M.current?A.current.focus({preventScroll:!0}):!q&&ee===A.current&&M.current.focus({preventScroll:!0})}}});var j={};$!==void 0&&(j.width=$),P!==void 0&&(j.height=P);var B=c?Q.createElement("div",{className:ne("".concat(n,"-footer"),T==null?void 0:T.footer),style:X({},O==null?void 0:O.footer)},c):null,F=o?Q.createElement("div",{className:ne("".concat(n,"-header"),T==null?void 0:T.header),style:X({},O==null?void 0:O.header)},Q.createElement("div",{className:"".concat(n,"-title"),id:a},o)):null,W=h.useMemo(function(){return _t(u)==="object"&&u!==null?u:u?{closeIcon:d??Q.createElement("span",{className:"".concat(n,"-close-x")})}:{}},[u,d,n]),V=qi(W,!0),L=_t(u)==="object"&&u.disabled,G=u?Q.createElement("button",Re({type:"button",onClick:f,"aria-label":"Close"},V,{className:"".concat(n,"-close"),disabled:L}),W.closeIcon):null,U=Q.createElement("div",{className:ne("".concat(n,"-content"),T==null?void 0:T.content),style:O==null?void 0:O.content},G,F,Q.createElement("div",Re({className:ne("".concat(n,"-body"),T==null?void 0:T.body),style:X(X({},g),O==null?void 0:O.body)},v),p),B);return Q.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":o?a:null,"aria-modal":"true",ref:z,style:X(X({},i),j),className:ne(n,r),onMouseDown:_,onMouseUp:S},Q.createElement("div",{ref:A,tabIndex:0,style:Q6},Q.createElement(Y6,{shouldUpdate:E||k},b?b(U):U)),Q.createElement("div",{tabIndex:0,ref:M,style:J6}))}),ok=h.forwardRef(function(e,t){var n=e.prefixCls,r=e.title,i=e.style,o=e.className,a=e.visible,c=e.forceRender,u=e.destroyOnClose,d=e.motionName,f=e.ariaId,p=e.onVisibleChanged,g=e.mousePosition,v=h.useRef(),b=h.useState(),_=se(b,2),S=_[0],C=_[1],E={};S&&(E.transformOrigin=S);function k(){var $=X6(v.current);C(g&&(g.x||g.y)?"".concat(g.x-$.left,"px ").concat(g.y-$.top,"px"):"")}return h.createElement(Vi,{visible:a,onVisibleChanged:p,onAppearPrepare:k,onEnterPrepare:k,forceRender:c,motionName:d,removeOnLeave:u,ref:v},function($,P){var T=$.className,O=$.style;return h.createElement(ik,Re({},e,{ref:t,title:r,ariaId:f,prefixCls:n,holderRef:P,style:X(X(X({},O),i),E),className:ne(o,T)}))})});ok.displayName="Content";var Z6=function(t){var n=t.prefixCls,r=t.style,i=t.visible,o=t.maskProps,a=t.motionName,c=t.className;return h.createElement(Vi,{key:"mask",visible:i,motionName:a,leavedClassName:"".concat(n,"-mask-hidden")},function(u,d){var f=u.className,p=u.style;return h.createElement("div",Re({ref:d,style:X(X({},p),r),className:ne("".concat(n,"-mask"),f,c)},o))})},eM=function(t){var n=t.prefixCls,r=n===void 0?"rc-dialog":n,i=t.zIndex,o=t.visible,a=o===void 0?!1:o,c=t.keyboard,u=c===void 0?!0:c,d=t.focusTriggerAfterClose,f=d===void 0?!0:d,p=t.wrapStyle,g=t.wrapClassName,v=t.wrapProps,b=t.onClose,_=t.afterOpenChange,S=t.afterClose,C=t.transitionName,E=t.animation,k=t.closable,$=k===void 0?!0:k,P=t.mask,T=P===void 0?!0:P,O=t.maskTransitionName,N=t.maskAnimation,I=t.maskClosable,z=I===void 0?!0:I,A=t.maskStyle,M=t.maskProps,j=t.rootClassName,B=t.classNames,F=t.styles,W=h.useRef(),V=h.useRef(),L=h.useRef(),G=h.useState(a),U=se(G,2),D=U[0],q=U[1],Y=Xf();function ee(){uv(V.current,document.activeElement)||(W.current=document.activeElement)}function Z(){if(!uv(V.current,document.activeElement)){var me;(me=L.current)===null||me===void 0||me.focus()}}function re(me){if(me)Z();else{if(q(!1),T&&W.current&&f){try{W.current.focus({preventScroll:!0})}catch{}W.current=null}D&&(S==null||S())}_==null||_(me)}function he(me){b==null||b(me)}var fe=h.useRef(!1),ue=h.useRef(),Se=function(){clearTimeout(ue.current),fe.current=!0},ae=function(){ue.current=setTimeout(function(){fe.current=!1})},le=null;z&&(le=function(de){fe.current?fe.current=!1:V.current===de.target&&he(de)});function ce(me){if(u&&me.keyCode===Ge.ESC){me.stopPropagation(),he(me);return}a&&me.keyCode===Ge.TAB&&L.current.changeActive(!me.shiftKey)}h.useEffect(function(){a&&(q(!0),ee())},[a]),h.useEffect(function(){return function(){clearTimeout(ue.current)}},[]);var ye=X(X(X({zIndex:i},p),F==null?void 0:F.wrapper),{},{display:D?null:"none"});return h.createElement("div",Re({className:ne("".concat(r,"-root"),j)},qi(t,{data:!0})),h.createElement(Z6,{prefixCls:r,visible:T&&a,motionName:dC(r,O,N),style:X(X({zIndex:i},A),F==null?void 0:F.mask),maskProps:M,className:B==null?void 0:B.mask}),h.createElement("div",Re({tabIndex:-1,onKeyDown:ce,className:ne("".concat(r,"-wrap"),g,B==null?void 0:B.wrapper),ref:V,onClick:le,style:ye},v),h.createElement(ok,Re({},t,{onMouseDown:Se,onMouseUp:ae,ref:L,closable:$,ariaId:Y,prefixCls:r,visible:a&&D,onClose:he,onVisibleChanged:re,motionName:dC(r,C,E)}))))},sk=function(t){var n=t.visible,r=t.getContainer,i=t.forceRender,o=t.destroyOnClose,a=o===void 0?!1:o,c=t.afterClose,u=t.panelRef,d=h.useState(n),f=se(d,2),p=f[0],g=f[1],v=h.useMemo(function(){return{panel:u}},[u]);return h.useEffect(function(){n&&g(!0)},[n]),!i&&a&&!p?null:h.createElement(rk.Provider,{value:v},h.createElement(Gf,{open:n||i||p,autoDestroy:!1,getContainer:r,autoLock:n||p},h.createElement(eM,Re({},t,{destroyOnClose:a,afterClose:function(){c==null||c(),g(!1)}}))))};sk.displayName="Dialog";var Sa="RC_FORM_INTERNAL_HOOKS",Nn=function(){Br(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Xl=h.createContext({getFieldValue:Nn,getFieldsValue:Nn,getFieldError:Nn,getFieldWarning:Nn,getFieldsError:Nn,isFieldsTouched:Nn,isFieldTouched:Nn,isFieldValidating:Nn,isFieldsValidating:Nn,resetFields:Nn,setFields:Nn,setFieldValue:Nn,setFieldsValue:Nn,validateFields:Nn,submit:Nn,getInternalHooks:function(){return Nn(),{dispatch:Nn,initEntityValue:Nn,registerField:Nn,useSubscribe:Nn,setInitialValues:Nn,destroyForm:Nn,setCallbacks:Nn,registerWatch:Nn,getFields:Nn,setValidateMessages:Nn,setPreserve:Nn,getInitialValue:Nn}}}),rf=h.createContext(null);function Hv(e){return e==null?[]:Array.isArray(e)?e:[e]}function tM(e){return e&&!!e._init}function Fv(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",tel:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var Wv=Fv();function nM(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function rM(e,t,n){if(sy())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&hu(i,n.prototype),i}function Vv(e){var t=typeof Map=="function"?new Map:void 0;return Vv=function(r){if(r===null||!nM(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return rM(r,arguments,fu(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),hu(i,r)},Vv(e)}var iM=/%[sdj%]/g,oM=function(){};function qv(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function Fi(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,o=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var a=e.replace(iM,function(c){if(c==="%%")return"%";if(i>=o)return c;switch(c){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return c}});return a}return e}function sM(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"||e==="tel"}function Er(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||sM(t)&&typeof e=="string"&&!e)}function aM(e,t,n){var r=[],i=0,o=e.length;function a(c){r.push.apply(r,We(c||[])),i++,i===o&&n(r)}e.forEach(function(c){t(c,a)})}function fC(e,t,n){var r=0,i=e.length;function o(a){if(a&&a.length){n(a);return}var c=r;r=r+1,c<i?t(e[c],o):n([])}o([])}function lM(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,We(e[n]||[]))}),t}var mC=(function(e){ms(n,e);var t=ps(n);function n(r,i){var o;return gr(this,n),o=t.call(this,"Async Validation Error"),K(Zt(o),"errors",void 0),K(Zt(o),"fields",void 0),o.errors=r,o.fields=i,o}return vr(n)})(Vv(Error));function cM(e,t,n,r,i){if(t.first){var o=new Promise(function(g,v){var b=function(C){return r(C),C.length?v(new mC(C,qv(C))):g(i)},_=lM(e);fC(_,n,b)});return o.catch(function(g){return g}),o}var a=t.firstFields===!0?Object.keys(e):t.firstFields||[],c=Object.keys(e),u=c.length,d=0,f=[],p=new Promise(function(g,v){var b=function(S){if(f.push.apply(f,S),d++,d===u)return r(f),f.length?v(new mC(f,qv(f))):g(i)};c.length||(r(f),g(i)),c.forEach(function(_){var S=e[_];a.indexOf(_)!==-1?fC(S,n,b):aM(S,n,b)})});return p.catch(function(g){return g}),p}function uM(e){return!!(e&&e.message!==void 0)}function dM(e,t){for(var n=e,r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]]}return n}function pC(e,t){return function(n){var r;return e.fullFields?r=dM(t,e.fullFields):r=t[n.field||e.fullField],uM(n)?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||e.fullField}}}function gC(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];_t(r)==="object"&&_t(e[n])==="object"?e[n]=X(X({},e[n]),r):e[n]=r}}return e}var pl="enum",hM=function(t,n,r,i,o){t[pl]=Array.isArray(t[pl])?t[pl]:[],t[pl].indexOf(n)===-1&&i.push(Fi(o.messages[pl],t.fullField,t[pl].join(", ")))},fM=function(t,n,r,i,o){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||i.push(Fi(o.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var a=new RegExp(t.pattern);a.test(n)||i.push(Fi(o.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},mM=function(t,n,r,i,o){var a=typeof t.len=="number",c=typeof t.min=="number",u=typeof t.max=="number",d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=n,p=null,g=typeof n=="number",v=typeof n=="string",b=Array.isArray(n);if(g?p="number":v?p="string":b&&(p="array"),!p)return!1;b&&(f=n.length),v&&(f=n.replace(d,"_").length),a?f!==t.len&&i.push(Fi(o.messages[p].len,t.fullField,t.len)):c&&!u&&f<t.min?i.push(Fi(o.messages[p].min,t.fullField,t.min)):u&&!c&&f>t.max?i.push(Fi(o.messages[p].max,t.fullField,t.max)):c&&u&&(f<t.min||f>t.max)&&i.push(Fi(o.messages[p].range,t.fullField,t.min,t.max))},ak=function(t,n,r,i,o,a){t.required&&(!r.hasOwnProperty(t.field)||Er(n,a||t.type))&&i.push(Fi(o.messages.required,t.fullField))},oh;const pM=(function(){if(oh)return oh;var e="[a-fA-F\\d:]",t=function(T){return T&&T.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",i=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],o="(?:%[0-9a-zA-Z]{1,})?",a="(?:".concat(i.join("|"),")").concat(o),c=new RegExp("(?:^".concat(n,"$)|(?:^").concat(a,"$)")),u=new RegExp("^".concat(n,"$")),d=new RegExp("^".concat(a,"$")),f=function(T){return T&&T.exact?c:new RegExp("(?:".concat(t(T)).concat(n).concat(t(T),")|(?:").concat(t(T)).concat(a).concat(t(T),")"),"g")};f.v4=function(P){return P&&P.exact?u:new RegExp("".concat(t(P)).concat(n).concat(t(P)),"g")},f.v6=function(P){return P&&P.exact?d:new RegExp("".concat(t(P)).concat(a).concat(t(P)),"g")};var p="(?:(?:[a-z]+:)?//)",g="(?:\\S+(?::\\S*)?@)?",v=f.v4().source,b=f.v6().source,_="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",S="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",C="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",E="(?::\\d{2,5})?",k='(?:[/?#][^\\s"]*)?',$="(?:".concat(p,"|www\\.)").concat(g,"(?:localhost|").concat(v,"|").concat(b,"|").concat(_).concat(S).concat(C,")").concat(E).concat(k);return oh=new RegExp("(?:^".concat($,"$)"),"i"),oh});var _g={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Jc={integer:function(t){return Jc.number(t)&&parseInt(t,10)===t},float:function(t){return Jc.number(t)&&!Jc.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return _t(t)==="object"&&!Jc.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(_g.email)},tel:function(t){return typeof t=="string"&&t.length<=32&&!!t.match(_g.tel)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(pM())},hex:function(t){return typeof t=="string"&&!!t.match(_g.hex)}},gM=function(t,n,r,i,o){if(t.required&&n===void 0){ak(t,n,r,i,o);return}var a=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],c=t.type;a.indexOf(c)>-1?Jc[c](n)||i.push(Fi(o.messages.types[c],t.fullField,t.type)):c&&_t(n)!==t.type&&i.push(Fi(o.messages.types[c],t.fullField,t.type))},vM=function(t,n,r,i,o){(/^\s+$/.test(n)||n==="")&&i.push(Fi(o.messages.whitespace,t.fullField))};const cn={required:ak,whitespace:vM,type:gM,range:mM,enum:hM,pattern:fM};var yM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(Er(n)&&!t.required)return r();cn.required(t,n,i,a,o)}r(a)},bM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(n==null&&!t.required)return r();cn.required(t,n,i,a,o,"array"),n!=null&&(cn.type(t,n,i,a,o),cn.range(t,n,i,a,o))}r(a)},_M=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(Er(n)&&!t.required)return r();cn.required(t,n,i,a,o),n!==void 0&&cn.type(t,n,i,a,o)}r(a)},SM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(Er(n,"date")&&!t.required)return r();if(cn.required(t,n,i,a,o),!Er(n,"date")){var u;n instanceof Date?u=n:u=new Date(n),cn.type(t,u,i,a,o),u&&cn.range(t,u.getTime(),i,a,o)}}r(a)},CM="enum",xM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(Er(n)&&!t.required)return r();cn.required(t,n,i,a,o),n!==void 0&&cn[CM](t,n,i,a,o)}r(a)},wM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(Er(n)&&!t.required)return r();cn.required(t,n,i,a,o),n!==void 0&&(cn.type(t,n,i,a,o),cn.range(t,n,i,a,o))}r(a)},EM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(Er(n)&&!t.required)return r();cn.required(t,n,i,a,o),n!==void 0&&(cn.type(t,n,i,a,o),cn.range(t,n,i,a,o))}r(a)},kM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(Er(n)&&!t.required)return r();cn.required(t,n,i,a,o),n!==void 0&&cn.type(t,n,i,a,o)}r(a)},$M=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(n===""&&(n=void 0),Er(n)&&!t.required)return r();cn.required(t,n,i,a,o),n!==void 0&&(cn.type(t,n,i,a,o),cn.range(t,n,i,a,o))}r(a)},RM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(Er(n)&&!t.required)return r();cn.required(t,n,i,a,o),n!==void 0&&cn.type(t,n,i,a,o)}r(a)},TM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(Er(n,"string")&&!t.required)return r();cn.required(t,n,i,a,o),Er(n,"string")||cn.pattern(t,n,i,a,o)}r(a)},PM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(Er(n)&&!t.required)return r();cn.required(t,n,i,a,o),Er(n)||cn.type(t,n,i,a,o)}r(a)},OM=function(t,n,r,i,o){var a=[],c=Array.isArray(n)?"array":_t(n);cn.required(t,n,i,a,o,c),r(a)},IM=function(t,n,r,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(Er(n,"string")&&!t.required)return r();cn.required(t,n,i,a,o,"string"),Er(n,"string")||(cn.type(t,n,i,a,o),cn.range(t,n,i,a,o),cn.pattern(t,n,i,a,o),t.whitespace===!0&&cn.whitespace(t,n,i,a,o))}r(a)},sh=function(t,n,r,i,o){var a=t.type,c=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(Er(n,a)&&!t.required)return r();cn.required(t,n,i,c,o,a),Er(n,a)||cn.type(t,n,i,c,o)}r(c)};const lu={string:IM,method:kM,number:$M,boolean:_M,regexp:PM,integer:EM,float:wM,array:bM,object:RM,enum:xM,pattern:TM,date:SM,url:sh,hex:sh,email:sh,tel:sh,required:OM,any:yM};var Fu=(function(){function e(t){gr(this,e),K(this,"rules",null),K(this,"_messages",Wv),this.define(t)}return vr(e,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(_t(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(i){var o=n[i];r.rules[i]=Array.isArray(o)?o:[o]})}},{key:"messages",value:function(n){return n&&(this._messages=gC(Fv(),n)),this._messages}},{key:"validate",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=n,c=i,u=o;if(typeof c=="function"&&(u=c,c={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,a),Promise.resolve(a);function d(b){var _=[],S={};function C(k){if(Array.isArray(k)){var $;_=($=_).concat.apply($,We(k))}else _.push(k)}for(var E=0;E<b.length;E++)C(b[E]);_.length?(S=qv(_),u(_,S)):u(null,a)}if(c.messages){var f=this.messages();f===Wv&&(f=Fv()),gC(f,c.messages),c.messages=f}else c.messages=this.messages();var p={},g=c.keys||Object.keys(this.rules);g.forEach(function(b){var _=r.rules[b],S=a[b];_.forEach(function(C){var E=C;typeof E.transform=="function"&&(a===n&&(a=X({},a)),S=a[b]=E.transform(S),S!=null&&(E.type=E.type||(Array.isArray(S)?"array":_t(S)))),typeof E=="function"?E={validator:E}:E=X({},E),E.validator=r.getValidationMethod(E),E.validator&&(E.field=b,E.fullField=E.fullField||b,E.type=r.getType(E),p[b]=p[b]||[],p[b].push({rule:E,value:S,source:a,field:b}))})});var v={};return cM(p,c,function(b,_){var S=b.rule,C=(S.type==="object"||S.type==="array")&&(_t(S.fields)==="object"||_t(S.defaultField)==="object");C=C&&(S.required||!S.required&&b.value),S.field=b.field;function E(O,N){return X(X({},N),{},{fullField:"".concat(S.fullField,".").concat(O),fullFields:S.fullFields?[].concat(We(S.fullFields),[O]):[O]})}function k(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],N=Array.isArray(O)?O:[O];!c.suppressWarning&&N.length&&e.warning("async-validator:",N),N.length&&S.message!==void 0&&S.message!==null&&(N=[].concat(S.message));var I=N.map(pC(S,a));if(c.first&&I.length)return v[S.field]=1,_(I);if(!C)_(I);else{if(S.required&&!b.value)return S.message!==void 0?I=[].concat(S.message).map(pC(S,a)):c.error&&(I=[c.error(S,Fi(c.messages.required,S.field))]),_(I);var z={};S.defaultField&&Object.keys(b.value).map(function(j){z[j]=S.defaultField}),z=X(X({},z),b.rule.fields);var A={};Object.keys(z).forEach(function(j){var B=z[j],F=Array.isArray(B)?B:[B];A[j]=F.map(E.bind(null,j))});var M=new e(A);M.messages(c.messages),b.rule.options&&(b.rule.options.messages=c.messages,b.rule.options.error=c.error),M.validate(b.value,b.rule.options||c,function(j){var B=[];I&&I.length&&B.push.apply(B,We(I)),j&&j.length&&B.push.apply(B,We(j)),_(B.length?B:null)})}}var $;if(S.asyncValidator)$=S.asyncValidator(S,b.value,k,b.source,c);else if(S.validator){try{$=S.validator(S,b.value,k,b.source,c)}catch(O){var P,T;(P=(T=console).error)===null||P===void 0||P.call(T,O),c.suppressValidatorError||setTimeout(function(){throw O},0),k(O.message)}$===!0?k():$===!1?k(typeof S.message=="function"?S.message(S.fullField||S.field):S.message||"".concat(S.fullField||S.field," fails")):$ instanceof Array?k($):$ instanceof Error&&k($.message)}$&&$.then&&$.then(function(){return k()},function(O){return k(O)})},function(b){d(b)},a)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!lu.hasOwnProperty(n.type))throw new Error(Fi("Unknown rule type %s",n.type));return n.type||"string"}},{key:"getValidationMethod",value:function(n){if(typeof n.validator=="function")return n.validator;var r=Object.keys(n),i=r.indexOf("message");return i!==-1&&r.splice(i,1),r.length===1&&r[0]==="required"?lu.required:lu[this.getType(n)]||void 0}}]),e})();K(Fu,"register",function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");lu[t]=n});K(Fu,"warning",oM);K(Fu,"messages",Wv);K(Fu,"validators",lu);var ji="'${name}' is not a valid ${type}",lk={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:ji,method:ji,array:ji,object:ji,number:ji,date:ji,boolean:ji,integer:ji,float:ji,regexp:ji,email:ji,url:ji,hex:ji},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},vC=Fu;function NM(e,t){return e.replace(/\\?\$\{\w+\}/g,function(n){if(n.startsWith("\\"))return n.slice(1);var r=n.slice(2,-1);return t[r]})}var yC="CODE_LOGIC_ERROR";function Uv(e,t,n,r,i){return Kv.apply(this,arguments)}function Kv(){return Kv=Ba(oi().mark(function e(t,n,r,i,o){var a,c,u,d,f,p,g,v,b;return oi().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return a=X({},r),delete a.ruleIndex,vC.warning=function(){},a.validator&&(c=a.validator,a.validator=function(){try{return c.apply(void 0,arguments)}catch(C){return console.error(C),Promise.reject(yC)}}),u=null,a&&a.type==="array"&&a.defaultField&&(u=a.defaultField,delete a.defaultField),d=new vC(K({},t,[a])),f=Ol(lk,i.validateMessages),d.messages(f),p=[],S.prev=10,S.next=13,Promise.resolve(d.validate(K({},t,n),X({},i)));case 13:S.next=18;break;case 15:S.prev=15,S.t0=S.catch(10),S.t0.errors&&(p=S.t0.errors.map(function(C,E){var k=C.message,$=k===yC?f.default:k;return h.isValidElement($)?h.cloneElement($,{key:"error_".concat(E)}):$}));case 18:if(!(!p.length&&u&&Array.isArray(n)&&n.length>0)){S.next=23;break}return S.next=21,Promise.all(n.map(function(C,E){return Uv("".concat(t,".").concat(E),C,u,i,o)}));case 21:return g=S.sent,S.abrupt("return",g.reduce(function(C,E){return[].concat(We(C),We(E))},[]));case 23:return v=X(X({},r),{},{name:t,enum:(r.enum||[]).join(", ")},o),b=p.map(function(C){return typeof C=="string"?NM(C,v):C}),S.abrupt("return",b);case 26:case"end":return S.stop()}},e,null,[[10,15]])})),Kv.apply(this,arguments)}function MM(e,t,n,r,i,o){var a=e.join("."),c=n.map(function(f,p){var g=f.validator,v=X(X({},f),{},{ruleIndex:p});return g&&(v.validator=function(b,_,S){var C=!1,E=function(){for(var P=arguments.length,T=new Array(P),O=0;O<P;O++)T[O]=arguments[O];Promise.resolve().then(function(){Br(!C,"Your validator function has already return a promise. `callback` will be ignored."),C||S.apply(void 0,T)})},k=g(b,_,E);C=k&&typeof k.then=="function"&&typeof k.catch=="function",Br(C,"`callback` is deprecated. Please return a promise instead."),C&&k.then(function(){S()}).catch(function($){S($||" ")})}),v}).sort(function(f,p){var g=f.warningOnly,v=f.ruleIndex,b=p.warningOnly,_=p.ruleIndex;return!!g==!!b?v-_:g?1:-1}),u;if(i===!0)u=new Promise((function(){var f=Ba(oi().mark(function p(g,v){var b,_,S;return oi().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:b=0;case 1:if(!(b<c.length)){E.next=12;break}return _=c[b],E.next=5,Uv(a,t,_,r,o);case 5:if(S=E.sent,!S.length){E.next=9;break}return v([{errors:S,rule:_}]),E.abrupt("return");case 9:b+=1,E.next=1;break;case 12:g([]);case 13:case"end":return E.stop()}},p)}));return function(p,g){return f.apply(this,arguments)}})());else{var d=c.map(function(f){return Uv(a,t,f,r,o).then(function(p){return{errors:p,rule:f}})});u=(i?jM(d):zM(d)).then(function(f){return Promise.reject(f)})}return u.catch(function(f){return f}),u}function zM(e){return Gv.apply(this,arguments)}function Gv(){return Gv=Ba(oi().mark(function e(t){return oi().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.all(t).then(function(i){var o,a=(o=[]).concat.apply(o,We(i));return a}));case 1:case"end":return r.stop()}},e)})),Gv.apply(this,arguments)}function jM(e){return Xv.apply(this,arguments)}function Xv(){return Xv=Ba(oi().mark(function e(t){var n;return oi().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return n=0,i.abrupt("return",new Promise(function(o){t.forEach(function(a){a.then(function(c){c.errors.length&&o([c]),n+=1,n===t.length&&o([])})})}));case 2:case"end":return i.stop()}},e)})),Xv.apply(this,arguments)}function lr(e){return Hv(e)}function bC(e,t){var n={};return t.forEach(function(r){var i=Ho(e,r);n=Co(n,r,i)}),n}function Ll(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return e&&e.some(function(r){return ck(t,r,n)})}function ck(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!e||!t||!n&&e.length!==t.length?!1:t.every(function(r,i){return e[i]===r})}function BM(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||_t(e)!=="object"||_t(t)!=="object")return!1;var n=Object.keys(e),r=Object.keys(t),i=new Set([].concat(n,r));return We(i).every(function(o){var a=e[o],c=t[o];return typeof a=="function"&&typeof c=="function"?!0:a===c})}function LM(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&_t(t.target)==="object"&&e in t.target?t.target[e]:t}function _C(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var i=e[t],o=t-n;return o>0?[].concat(We(e.slice(0,n)),[i],We(e.slice(n,t)),We(e.slice(t+1,r))):o<0?[].concat(We(e.slice(0,t)),We(e.slice(t+1,n+1)),[i],We(e.slice(n+1,r))):e}var AM=["name"],eo=[];function Sg(e,t,n,r,i,o){return typeof e=="function"?e(t,n,"source"in o?{source:o.source}:{}):r!==i}var Py=(function(e){ms(n,e);var t=ps(n);function n(r){var i;if(gr(this,n),i=t.call(this,r),K(Zt(i),"state",{resetCount:0}),K(Zt(i),"cancelRegisterFunc",null),K(Zt(i),"mounted",!1),K(Zt(i),"touched",!1),K(Zt(i),"dirty",!1),K(Zt(i),"validatePromise",void 0),K(Zt(i),"prevValidating",void 0),K(Zt(i),"errors",eo),K(Zt(i),"warnings",eo),K(Zt(i),"cancelRegister",function(){var u=i.props,d=u.preserve,f=u.isListField,p=u.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(f,d,lr(p)),i.cancelRegisterFunc=null}),K(Zt(i),"getNamePath",function(){var u=i.props,d=u.name,f=u.fieldContext,p=f.prefixName,g=p===void 0?[]:p;return d!==void 0?[].concat(We(g),We(d)):[]}),K(Zt(i),"getRules",function(){var u=i.props,d=u.rules,f=d===void 0?[]:d,p=u.fieldContext;return f.map(function(g){return typeof g=="function"?g(p):g})}),K(Zt(i),"refresh",function(){i.mounted&&i.setState(function(u){var d=u.resetCount;return{resetCount:d+1}})}),K(Zt(i),"metaCache",null),K(Zt(i),"triggerMetaEvent",function(u){var d=i.props.onMetaChange;if(d){var f=X(X({},i.getMeta()),{},{destroy:u});gu(i.metaCache,f)||d(f),i.metaCache=f}else i.metaCache=null}),K(Zt(i),"onStoreChange",function(u,d,f){var p=i.props,g=p.shouldUpdate,v=p.dependencies,b=v===void 0?[]:v,_=p.onReset,S=f.store,C=i.getNamePath(),E=i.getValue(u),k=i.getValue(S),$=d&&Ll(d,C);switch(f.type==="valueUpdate"&&f.source==="external"&&!gu(E,k)&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=eo,i.warnings=eo,i.triggerMetaEvent()),f.type){case"reset":if(!d||$){i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=eo,i.warnings=eo,i.triggerMetaEvent(),_==null||_(),i.refresh();return}break;case"remove":{if(g&&Sg(g,u,S,E,k,f)){i.reRender();return}break}case"setField":{var P=f.data;if($){"touched"in P&&(i.touched=P.touched),"validating"in P&&!("originRCField"in P)&&(i.validatePromise=P.validating?Promise.resolve([]):null),"errors"in P&&(i.errors=P.errors||eo),"warnings"in P&&(i.warnings=P.warnings||eo),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}else if("value"in P&&Ll(d,C,!0)){i.reRender();return}if(g&&!C.length&&Sg(g,u,S,E,k,f)){i.reRender();return}break}case"dependenciesUpdate":{var T=b.map(lr);if(T.some(function(O){return Ll(f.relatedFields,O)})){i.reRender();return}break}default:if($||(!b.length||C.length||g)&&Sg(g,u,S,E,k,f)){i.reRender();return}break}g===!0&&i.reRender()}),K(Zt(i),"validateRules",function(u){var d=i.getNamePath(),f=i.getValue(),p=u||{},g=p.triggerName,v=p.validateOnly,b=v===void 0?!1:v,_=Promise.resolve().then(Ba(oi().mark(function S(){var C,E,k,$,P,T,O;return oi().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:if(i.mounted){I.next=2;break}return I.abrupt("return",[]);case 2:if(C=i.props,E=C.validateFirst,k=E===void 0?!1:E,$=C.messageVariables,P=C.validateDebounce,T=i.getRules(),g&&(T=T.filter(function(z){return z}).filter(function(z){var A=z.validateTrigger;if(!A)return!0;var M=Hv(A);return M.includes(g)})),!(P&&g)){I.next=10;break}return I.next=8,new Promise(function(z){setTimeout(z,P)});case 8:if(i.validatePromise===_){I.next=10;break}return I.abrupt("return",[]);case 10:return O=MM(d,f,T,u,k,$),O.catch(function(z){return z}).then(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:eo;if(i.validatePromise===_){var A;i.validatePromise=null;var M=[],j=[];(A=z.forEach)===null||A===void 0||A.call(z,function(B){var F=B.rule.warningOnly,W=B.errors,V=W===void 0?eo:W;F?j.push.apply(j,We(V)):M.push.apply(M,We(V))}),i.errors=M,i.warnings=j,i.triggerMetaEvent(),i.reRender()}}),I.abrupt("return",O);case 13:case"end":return I.stop()}},S)})));return b||(i.validatePromise=_,i.dirty=!0,i.errors=eo,i.warnings=eo,i.triggerMetaEvent(),i.reRender()),_}),K(Zt(i),"isFieldValidating",function(){return!!i.validatePromise}),K(Zt(i),"isFieldTouched",function(){return i.touched}),K(Zt(i),"isFieldDirty",function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var u=i.props.fieldContext,d=u.getInternalHooks(Sa),f=d.getInitialValue;return f(i.getNamePath())!==void 0}),K(Zt(i),"getErrors",function(){return i.errors}),K(Zt(i),"getWarnings",function(){return i.warnings}),K(Zt(i),"isListField",function(){return i.props.isListField}),K(Zt(i),"isList",function(){return i.props.isList}),K(Zt(i),"isPreserve",function(){return i.props.preserve}),K(Zt(i),"getMeta",function(){i.prevValidating=i.isFieldValidating();var u={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:i.validatePromise===null};return u}),K(Zt(i),"getOnlyChild",function(u){if(typeof u=="function"){var d=i.getMeta();return X(X({},i.getOnlyChild(u(i.getControlled(),d,i.props.fieldContext))),{},{isFunction:!0})}var f=hi(u);return f.length!==1||!h.isValidElement(f[0])?{child:f,isFunction:!1}:{child:f[0],isFunction:!1}}),K(Zt(i),"getValue",function(u){var d=i.props.fieldContext.getFieldsValue,f=i.getNamePath();return Ho(u||d(!0),f)}),K(Zt(i),"getControlled",function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=i.props,f=d.name,p=d.trigger,g=d.validateTrigger,v=d.getValueFromEvent,b=d.normalize,_=d.valuePropName,S=d.getValueProps,C=d.fieldContext,E=g!==void 0?g:C.validateTrigger,k=i.getNamePath(),$=C.getInternalHooks,P=C.getFieldsValue,T=$(Sa),O=T.dispatch,N=i.getValue(),I=S||function(B){return K({},_,B)},z=u[p],A=f!==void 0?I(N):{},M=X(X({},u),A);M[p]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var B,F=arguments.length,W=new Array(F),V=0;V<F;V++)W[V]=arguments[V];v?B=v.apply(void 0,W):B=LM.apply(void 0,[_].concat(W)),b&&(B=b(B,N,P(!0))),B!==N&&O({type:"updateValue",namePath:k,value:B}),z&&z.apply(void 0,W)};var j=Hv(E||[]);return j.forEach(function(B){var F=M[B];M[B]=function(){F&&F.apply(void 0,arguments);var W=i.props.rules;W&&W.length&&O({type:"validateField",namePath:k,triggerName:B})}}),M}),r.fieldContext){var o=r.fieldContext.getInternalHooks,a=o(Sa),c=a.initEntityValue;c(Zt(i))}return i}return vr(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.shouldUpdate,a=i.fieldContext;if(this.mounted=!0,a){var c=a.getInternalHooks,u=c(Sa),d=u.registerField;this.cancelRegisterFunc=d(this)}o===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var i=this.state.resetCount,o=this.props.children,a=this.getOnlyChild(o),c=a.child,u=a.isFunction,d;return u?d=c:h.isValidElement(c)?d=h.cloneElement(c,this.getControlled(c.props)):(Br(!c,"`children` of Field is not validate ReactElement."),d=c),h.createElement(h.Fragment,{key:i},d)}}]),n})(h.Component);K(Py,"contextType",Xl);K(Py,"defaultProps",{trigger:"onChange",valuePropName:"value"});function uk(e){var t,n=e.name,r=Lt(e,AM),i=h.useContext(Xl),o=h.useContext(rf),a=n!==void 0?lr(n):void 0,c=(t=r.isListField)!==null&&t!==void 0?t:!!o,u="keep";return c||(u="_".concat((a||[]).join("_"))),h.createElement(Py,Re({key:u,name:a,isListField:c},r,{fieldContext:i}))}function DM(e){var t=e.name,n=e.initialValue,r=e.children,i=e.rules,o=e.validateTrigger,a=e.isListField,c=h.useContext(Xl),u=h.useContext(rf),d=h.useRef({keys:[],id:0}),f=d.current,p=h.useMemo(function(){var _=lr(c.prefixName)||[];return[].concat(We(_),We(lr(t)))},[c.prefixName,t]),g=h.useMemo(function(){return X(X({},c),{},{prefixName:p})},[c,p]),v=h.useMemo(function(){return{getKey:function(S){var C=p.length,E=S[C];return[f.keys[E],S.slice(C+1)]}}},[p]);if(typeof r!="function")return Br(!1,"Form.List only accepts function as children."),null;var b=function(S,C,E){var k=E.source;return k==="internal"?!1:S!==C};return h.createElement(rf.Provider,{value:v},h.createElement(Xl.Provider,{value:g},h.createElement(uk,{name:[],shouldUpdate:b,rules:i,validateTrigger:o,initialValue:n,isList:!0,isListField:a??!!u},function(_,S){var C=_.value,E=C===void 0?[]:C,k=_.onChange,$=c.getFieldValue,P=function(){var I=$(p||[]);return I||[]},T={add:function(I,z){var A=P();z>=0&&z<=A.length?(f.keys=[].concat(We(f.keys.slice(0,z)),[f.id],We(f.keys.slice(z))),k([].concat(We(A.slice(0,z)),[I],We(A.slice(z))))):(f.keys=[].concat(We(f.keys),[f.id]),k([].concat(We(A),[I]))),f.id+=1},remove:function(I){var z=P(),A=new Set(Array.isArray(I)?I:[I]);A.size<=0||(f.keys=f.keys.filter(function(M,j){return!A.has(j)}),k(z.filter(function(M,j){return!A.has(j)})))},move:function(I,z){if(I!==z){var A=P();I<0||I>=A.length||z<0||z>=A.length||(f.keys=_C(f.keys,I,z),k(_C(A,I,z)))}}},O=E||[];return Array.isArray(O)||(O=[]),r(O.map(function(N,I){var z=f.keys[I];return z===void 0&&(f.keys[I]=f.id,z=f.keys[I],f.id+=1),{name:I,key:z,isListField:!0}}),T,S)})))}function HM(e){var t=!1,n=e.length,r=[];return e.length?new Promise(function(i,o){e.forEach(function(a,c){a.catch(function(u){return t=!0,u}).then(function(u){n-=1,r[c]=u,!(n>0)&&(t&&o(r),i(r))})})}):Promise.resolve([])}var dk="__@field_split__";function Cg(e){return e.map(function(t){return"".concat(_t(t),":").concat(t)}).join(dk)}var gl=(function(){function e(){gr(this,e),K(this,"kvs",new Map)}return vr(e,[{key:"set",value:function(n,r){this.kvs.set(Cg(n),r)}},{key:"get",value:function(n){return this.kvs.get(Cg(n))}},{key:"update",value:function(n,r){var i=this.get(n),o=r(i);o?this.set(n,o):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(Cg(n))}},{key:"map",value:function(n){return We(this.kvs.entries()).map(function(r){var i=se(r,2),o=i[0],a=i[1],c=o.split(dk);return n({key:c.map(function(u){var d=u.match(/^([^:]*):(.*)$/),f=se(d,3),p=f[1],g=f[2];return p==="number"?Number(g):g}),value:a})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var i=r.key,o=r.value;return n[i.join(".")]=o,null}),n}}]),e})(),FM=["name"],WM=vr(function e(t){var n=this;gr(this,e),K(this,"formHooked",!1),K(this,"forceRootUpdate",void 0),K(this,"subscribable",!0),K(this,"store",{}),K(this,"fieldEntities",[]),K(this,"initialValues",{}),K(this,"callbacks",{}),K(this,"validateMessages",null),K(this,"preserve",null),K(this,"lastValidatePromise",null),K(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),K(this,"getInternalHooks",function(r){return r===Sa?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(Br(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),K(this,"useSubscribe",function(r){n.subscribable=r}),K(this,"prevWithoutPreserves",null),K(this,"setInitialValues",function(r,i){if(n.initialValues=r||{},i){var o,a=Ol(r,n.store);(o=n.prevWithoutPreserves)===null||o===void 0||o.map(function(c){var u=c.key;a=Co(a,u,Ho(r,u))}),n.prevWithoutPreserves=null,n.updateStore(a)}}),K(this,"destroyForm",function(r){if(r)n.updateStore({});else{var i=new gl;n.getFieldEntities(!0).forEach(function(o){n.isMergedPreserve(o.isPreserve())||i.set(o.getNamePath(),!0)}),n.prevWithoutPreserves=i}}),K(this,"getInitialValue",function(r){var i=Ho(n.initialValues,r);return r.length?Ol(i):i}),K(this,"setCallbacks",function(r){n.callbacks=r}),K(this,"setValidateMessages",function(r){n.validateMessages=r}),K(this,"setPreserve",function(r){n.preserve=r}),K(this,"watchList",[]),K(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(i){return i!==r})}}),K(this,"notifyWatch",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var i=n.getFieldsValue(),o=n.getFieldsValue(!0);n.watchList.forEach(function(a){a(i,o,r)})}}),K(this,"timeoutId",null),K(this,"warningUnhooked",function(){}),K(this,"updateStore",function(r){n.store=r}),K(this,"getFieldEntities",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(i){return i.getNamePath().length}):n.fieldEntities}),K(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new gl;return n.getFieldEntities(r).forEach(function(o){var a=o.getNamePath();i.set(a,o)}),i}),K(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var i=n.getFieldsMap(!0);return r.map(function(o){var a=lr(o);return i.get(a)||{INVALIDATE_NAME_PATH:lr(o)}})}),K(this,"getFieldsValue",function(r,i){n.warningUnhooked();var o,a,c;if(r===!0||Array.isArray(r)?(o=r,a=i):r&&_t(r)==="object"&&(c=r.strict,a=r.filter),o===!0&&!a)return n.store;var u=n.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),d=[];return u.forEach(function(f){var p,g,v="INVALIDATE_NAME_PATH"in f?f.INVALIDATE_NAME_PATH:f.getNamePath();if(c){var b,_;if((b=(_=f).isList)!==null&&b!==void 0&&b.call(_))return}else if(!o&&(p=(g=f).isListField)!==null&&p!==void 0&&p.call(g))return;if(!a)d.push(v);else{var S="getMeta"in f?f.getMeta():null;a(S)&&d.push(v)}}),bC(n.store,d.map(lr))}),K(this,"getFieldValue",function(r){n.warningUnhooked();var i=lr(r);return Ho(n.store,i)}),K(this,"getFieldsError",function(r){n.warningUnhooked();var i=n.getFieldEntitiesForNamePathList(r);return i.map(function(o,a){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:lr(r[a]),errors:[],warnings:[]}})}),K(this,"getFieldError",function(r){n.warningUnhooked();var i=lr(r),o=n.getFieldsError([i])[0];return o.errors}),K(this,"getFieldWarning",function(r){n.warningUnhooked();var i=lr(r),o=n.getFieldsError([i])[0];return o.warnings}),K(this,"isFieldsTouched",function(){n.warningUnhooked();for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=i[0],c=i[1],u,d=!1;i.length===0?u=null:i.length===1?Array.isArray(a)?(u=a.map(lr),d=!1):(u=null,d=a):(u=a.map(lr),d=c);var f=n.getFieldEntities(!0),p=function(S){return S.isFieldTouched()};if(!u)return d?f.every(function(_){return p(_)||_.isList()}):f.some(p);var g=new gl;u.forEach(function(_){g.set(_,[])}),f.forEach(function(_){var S=_.getNamePath();u.forEach(function(C){C.every(function(E,k){return S[k]===E})&&g.update(C,function(E){return[].concat(We(E),[_])})})});var v=function(S){return S.some(p)},b=g.map(function(_){var S=_.value;return S});return d?b.every(v):b.some(v)}),K(this,"isFieldTouched",function(r){return n.warningUnhooked(),n.isFieldsTouched([r])}),K(this,"isFieldsValidating",function(r){n.warningUnhooked();var i=n.getFieldEntities();if(!r)return i.some(function(a){return a.isFieldValidating()});var o=r.map(lr);return i.some(function(a){var c=a.getNamePath();return Ll(o,c)&&a.isFieldValidating()})}),K(this,"isFieldValidating",function(r){return n.warningUnhooked(),n.isFieldsValidating([r])}),K(this,"resetWithFieldInitialValue",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=new gl,o=n.getFieldEntities(!0);o.forEach(function(u){var d=u.props.initialValue,f=u.getNamePath();if(d!==void 0){var p=i.get(f)||new Set;p.add({entity:u,value:d}),i.set(f,p)}});var a=function(d){d.forEach(function(f){var p=f.props.initialValue;if(p!==void 0){var g=f.getNamePath(),v=n.getInitialValue(g);if(v!==void 0)Br(!1,"Form already set 'initialValues' with path '".concat(g.join("."),"'. Field can not overwrite it."));else{var b=i.get(g);if(b&&b.size>1)Br(!1,"Multiple Field with path '".concat(g.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(b){var _=n.getFieldValue(g),S=f.isListField();!S&&(!r.skipExist||_===void 0)&&n.updateStore(Co(n.store,g,We(b)[0].value))}}}})},c;r.entities?c=r.entities:r.namePathList?(c=[],r.namePathList.forEach(function(u){var d=i.get(u);if(d){var f;(f=c).push.apply(f,We(We(d).map(function(p){return p.entity})))}})):c=o,a(c)}),K(this,"resetFields",function(r){n.warningUnhooked();var i=n.store;if(!r){n.updateStore(Ol(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(i,null,{type:"reset"}),n.notifyWatch();return}var o=r.map(lr);o.forEach(function(a){var c=n.getInitialValue(a);n.updateStore(Co(n.store,a,c))}),n.resetWithFieldInitialValue({namePathList:o}),n.notifyObservers(i,o,{type:"reset"}),n.notifyWatch(o)}),K(this,"setFields",function(r){n.warningUnhooked();var i=n.store,o=[];r.forEach(function(a){var c=a.name,u=Lt(a,FM),d=lr(c);o.push(d),"value"in u&&n.updateStore(Co(n.store,d,u.value)),n.notifyObservers(i,[d],{type:"setField",data:a})}),n.notifyWatch(o)}),K(this,"getFields",function(){var r=n.getFieldEntities(!0),i=r.map(function(o){var a=o.getNamePath(),c=o.getMeta(),u=X(X({},c),{},{name:a,value:n.getFieldValue(a)});return Object.defineProperty(u,"originRCField",{value:!0}),u});return i}),K(this,"initEntityValue",function(r){var i=r.props.initialValue;if(i!==void 0){var o=r.getNamePath(),a=Ho(n.store,o);a===void 0&&n.updateStore(Co(n.store,o,i))}}),K(this,"isMergedPreserve",function(r){var i=r!==void 0?r:n.preserve;return i??!0}),K(this,"registerField",function(r){n.fieldEntities.push(r);var i=r.getNamePath();if(n.notifyWatch([i]),r.props.initialValue!==void 0){var o=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(o,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(a,c){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(p){return p!==r}),!n.isMergedPreserve(c)&&(!a||u.length>1)){var d=a?void 0:n.getInitialValue(i);if(i.length&&n.getFieldValue(i)!==d&&n.fieldEntities.every(function(p){return!ck(p.getNamePath(),i)})){var f=n.store;n.updateStore(Co(f,i,d,!0)),n.notifyObservers(f,[i],{type:"remove"}),n.triggerDependenciesUpdate(f,i)}}n.notifyWatch([i])}}),K(this,"dispatch",function(r){switch(r.type){case"updateValue":{var i=r.namePath,o=r.value;n.updateValue(i,o);break}case"validateField":{var a=r.namePath,c=r.triggerName;n.validateFields([a],{triggerName:c});break}}}),K(this,"notifyObservers",function(r,i,o){if(n.subscribable){var a=X(X({},o),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(c){var u=c.onStoreChange;u(r,i,a)})}else n.forceRootUpdate()}),K(this,"triggerDependenciesUpdate",function(r,i){var o=n.getDependencyChildrenFields(i);return o.length&&n.validateFields(o),n.notifyObservers(r,o,{type:"dependenciesUpdate",relatedFields:[i].concat(We(o))}),o}),K(this,"updateValue",function(r,i){var o=lr(r),a=n.store;n.updateStore(Co(n.store,o,i)),n.notifyObservers(a,[o],{type:"valueUpdate",source:"internal"}),n.notifyWatch([o]);var c=n.triggerDependenciesUpdate(a,o),u=n.callbacks.onValuesChange;if(u){var d=bC(n.store,[o]);u(d,n.getFieldsValue())}n.triggerOnFieldsChange([o].concat(We(c)))}),K(this,"setFieldsValue",function(r){n.warningUnhooked();var i=n.store;if(r){var o=Ol(n.store,r);n.updateStore(o)}n.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),K(this,"setFieldValue",function(r,i){n.setFields([{name:r,value:i,errors:[],warnings:[]}])}),K(this,"getDependencyChildrenFields",function(r){var i=new Set,o=[],a=new gl;n.getFieldEntities().forEach(function(u){var d=u.props.dependencies;(d||[]).forEach(function(f){var p=lr(f);a.update(p,function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return g.add(u),g})})});var c=function u(d){var f=a.get(d)||new Set;f.forEach(function(p){if(!i.has(p)){i.add(p);var g=p.getNamePath();p.isFieldDirty()&&g.length&&(o.push(g),u(g))}})};return c(r),o}),K(this,"triggerOnFieldsChange",function(r,i){var o=n.callbacks.onFieldsChange;if(o){var a=n.getFields();if(i){var c=new gl;i.forEach(function(d){var f=d.name,p=d.errors;c.set(f,p)}),a.forEach(function(d){d.errors=c.get(d.name)||d.errors})}var u=a.filter(function(d){var f=d.name;return Ll(r,f)});u.length&&o(u,a)}}),K(this,"validateFields",function(r,i){n.warningUnhooked();var o,a;Array.isArray(r)||typeof r=="string"||typeof i=="string"?(o=r,a=i):a=r;var c=!!o,u=c?o.map(lr):[],d=[],f=String(Date.now()),p=new Set,g=a||{},v=g.recursive,b=g.dirty;n.getFieldEntities(!0).forEach(function(E){if(c||u.push(E.getNamePath()),!(!E.props.rules||!E.props.rules.length)&&!(b&&!E.isFieldDirty())){var k=E.getNamePath();if(p.add(k.join(f)),!c||Ll(u,k,v)){var $=E.validateRules(X({validateMessages:X(X({},lk),n.validateMessages)},a));d.push($.then(function(){return{name:k,errors:[],warnings:[]}}).catch(function(P){var T,O=[],N=[];return(T=P.forEach)===null||T===void 0||T.call(P,function(I){var z=I.rule.warningOnly,A=I.errors;z?N.push.apply(N,We(A)):O.push.apply(O,We(A))}),O.length?Promise.reject({name:k,errors:O,warnings:N}):{name:k,errors:O,warnings:N}}))}}});var _=HM(d);n.lastValidatePromise=_,_.catch(function(E){return E}).then(function(E){var k=E.map(function($){var P=$.name;return P});n.notifyObservers(n.store,k,{type:"validateFinish"}),n.triggerOnFieldsChange(k,E)});var S=_.then(function(){return n.lastValidatePromise===_?Promise.resolve(n.getFieldsValue(u)):Promise.reject([])}).catch(function(E){var k=E.filter(function($){return $&&$.errors.length});return Promise.reject({values:n.getFieldsValue(u),errorFields:k,outOfDate:n.lastValidatePromise!==_})});S.catch(function(E){return E});var C=u.filter(function(E){return p.has(E.join(f))});return n.triggerOnFieldsChange(C),S}),K(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(r){var i=n.callbacks.onFinish;if(i)try{i(r)}catch(o){console.error(o)}}).catch(function(r){var i=n.callbacks.onFinishFailed;i&&i(r)})}),this.forceRootUpdate=t});function hk(e){var t=h.useRef(),n=h.useState({}),r=se(n,2),i=r[1];if(!t.current)if(e)t.current=e;else{var o=function(){i({})},a=new WM(o);t.current=a.getForm()}return[t.current]}var Yv=h.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),VM=function(t){var n=t.validateMessages,r=t.onFormChange,i=t.onFormFinish,o=t.children,a=h.useContext(Yv),c=h.useRef({});return h.createElement(Yv.Provider,{value:X(X({},a),{},{validateMessages:X(X({},a.validateMessages),n),triggerFormChange:function(d,f){r&&r(d,{changedFields:f,forms:c.current}),a.triggerFormChange(d,f)},triggerFormFinish:function(d,f){i&&i(d,{values:f,forms:c.current}),a.triggerFormFinish(d,f)},registerForm:function(d,f){d&&(c.current=X(X({},c.current),{},K({},d,f))),a.registerForm(d,f)},unregisterForm:function(d){var f=X({},c.current);delete f[d],c.current=f,a.unregisterForm(d)}})},o)},qM=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],UM=function(t,n){var r=t.name,i=t.initialValues,o=t.fields,a=t.form,c=t.preserve,u=t.children,d=t.component,f=d===void 0?"form":d,p=t.validateMessages,g=t.validateTrigger,v=g===void 0?"onChange":g,b=t.onValuesChange,_=t.onFieldsChange,S=t.onFinish,C=t.onFinishFailed,E=t.clearOnDestroy,k=Lt(t,qM),$=h.useRef(null),P=h.useContext(Yv),T=hk(a),O=se(T,1),N=O[0],I=N.getInternalHooks(Sa),z=I.useSubscribe,A=I.setInitialValues,M=I.setCallbacks,j=I.setValidateMessages,B=I.setPreserve,F=I.destroyForm;h.useImperativeHandle(n,function(){return X(X({},N),{},{nativeElement:$.current})}),h.useEffect(function(){return P.registerForm(r,N),function(){P.unregisterForm(r)}},[P,N,r]),j(X(X({},P.validateMessages),p)),M({onValuesChange:b,onFieldsChange:function(ee){if(P.triggerFormChange(r,ee),_){for(var Z=arguments.length,re=new Array(Z>1?Z-1:0),he=1;he<Z;he++)re[he-1]=arguments[he];_.apply(void 0,[ee].concat(re))}},onFinish:function(ee){P.triggerFormFinish(r,ee),S&&S(ee)},onFinishFailed:C}),B(c);var W=h.useRef(null);A(i,!W.current),W.current||(W.current=!0),h.useEffect(function(){return function(){return F(E)}},[]);var V,L=typeof u=="function";if(L){var G=N.getFieldsValue(!0);V=u(G,N)}else V=u;z(!L);var U=h.useRef();h.useEffect(function(){BM(U.current||[],o||[])||N.setFields(o||[]),U.current=o},[o,N]);var D=h.useMemo(function(){return X(X({},N),{},{validateTrigger:v})},[N,v]),q=h.createElement(rf.Provider,{value:null},h.createElement(Xl.Provider,{value:D},V));return f===!1?q:h.createElement(f,Re({},k,{ref:$,onSubmit:function(ee){ee.preventDefault(),ee.stopPropagation(),N.submit()},onReset:function(ee){var Z;ee.preventDefault(),N.resetFields(),(Z=k.onReset)===null||Z===void 0||Z.call(k,ee)}}),q)};function SC(e){try{return JSON.stringify(e)}catch{return Math.random()}}function KM(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],i=t[1],o=i===void 0?{}:i,a=tM(o)?{form:o}:o,c=a.form,u=h.useState(),d=se(u,2),f=d[0],p=d[1],g=h.useMemo(function(){return SC(f)},[f]),v=h.useRef(g);v.current=g;var b=h.useContext(Xl),_=c||b,S=_&&_._init,C=lr(r),E=h.useRef(C);return E.current=C,h.useEffect(function(){if(S){var k=_.getFieldsValue,$=_.getInternalHooks,P=$(Sa),T=P.registerWatch,O=function(A,M){var j=a.preserve?M:A;return typeof r=="function"?r(j):Ho(j,E.current)},N=T(function(z,A){var M=O(z,A),j=SC(M);v.current!==j&&(v.current=j,p(M))}),I=O(k(),k(!0));return f!==I&&p(I),N}},[S]),f}var GM=h.forwardRef(UM),Wu=GM;Wu.FormProvider=VM;Wu.Field=uk;Wu.List=DM;Wu.useForm=hk;Wu.useWatch=KM;const Cu=h.createContext({}),XM=({children:e,status:t,override:n})=>{const r=h.useContext(Cu),i=h.useMemo(()=>{const o=Object.assign({},r);return n&&delete o.isFormItemInput,t&&(delete o.status,delete o.hasFeedback,delete o.feedbackIcon),o},[t,n,r]);return h.createElement(Cu.Provider,{value:i},e)},YM=h.createContext(void 0),Vu=e=>{const{space:t,form:n,children:r}=e;if(r==null)return null;let i=r;return n&&(i=Q.createElement(XM,{override:!0,status:!0},i)),t&&(i=Q.createElement(nN,null,i)),i};var JM=function(t){if(ii()&&window.document.documentElement){var n=Array.isArray(t)?t:[t],r=window.document.documentElement;return n.some(function(i){return i in r.style})}return!1};function CC(e,t){return JM(e)}const QM=()=>ii()&&window.document.documentElement,Yf=e=>{const{prefixCls:t,className:n,style:r,size:i,shape:o}=e,a=ne({[`${t}-lg`]:i==="large",[`${t}-sm`]:i==="small"}),c=ne({[`${t}-circle`]:o==="circle",[`${t}-square`]:o==="square",[`${t}-round`]:o==="round"}),u=h.useMemo(()=>typeof i=="number"?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return h.createElement("span",{className:ne(t,a,c,n),style:Object.assign(Object.assign({},u),r)})},ZM=new Yt("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),Jf=e=>({height:e,lineHeight:te(e)}),Al=e=>Object.assign({width:e},Jf(e)),e8=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:ZM,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),xg=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},Jf(e)),t8=e=>{const{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:i,controlHeightSM:o}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},Al(r)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},Al(i)),[`${t}${t}-sm`]:Object.assign({},Al(o))}},n8=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:c}=e;return{[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},xg(t,c)),[`${r}-lg`]:Object.assign({},xg(i,c)),[`${r}-sm`]:Object.assign({},xg(o,c))}},xC=e=>Object.assign({width:e},Jf(e)),r8=e=>{const{skeletonImageCls:t,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:i,calc:o}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:r,borderRadius:i},xC(o(n).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},xC(n)),{maxWidth:o(n).mul(4).equal(),maxHeight:o(n).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},wg=(e,t,n)=>{const{skeletonButtonCls:r}=e;return{[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:t}}},Eg=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},Jf(e)),i8=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:c}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:t,width:c(r).mul(2).equal(),minWidth:c(r).mul(2).equal()},Eg(r,c))},wg(e,r,n)),{[`${n}-lg`]:Object.assign({},Eg(i,c))}),wg(e,i,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},Eg(o,c))}),wg(e,o,`${n}-sm`))},o8=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:i,skeletonButtonCls:o,skeletonInputCls:a,skeletonImageCls:c,controlHeight:u,controlHeightLG:d,controlHeightSM:f,gradientFromColor:p,padding:g,marginSM:v,borderRadius:b,titleHeight:_,blockRadius:S,paragraphLiHeight:C,controlHeightXS:E,paragraphMarginTop:k}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:g,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:p},Al(u)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},Al(d)),[`${n}-sm`]:Object.assign({},Al(f))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:_,background:p,borderRadius:S,[`+ ${i}`]:{marginBlockStart:f}},[i]:{padding:0,"> li":{width:"100%",height:C,listStyle:"none",background:p,borderRadius:S,"+ li":{marginBlockStart:E}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${r}, ${i} > li`]:{borderRadius:b}}},[`${t}-with-avatar ${t}-content`]:{[r]:{marginBlockStart:v,[`+ ${i}`]:{marginBlockStart:k}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},i8(e)),t8(e)),n8(e)),r8(e)),[`${t}${t}-block`]:{width:"100%",[o]:{width:"100%"},[a]:{width:"100%"}},[`${t}${t}-active`]:{[`
212
- ${r},
213
- ${i} > li,
214
- ${n},
215
- ${o},
216
- ${a},
217
- ${c}
218
- `]:Object.assign({},e8(e))}}},s8=e=>{const{colorFillContent:t,colorFill:n}=e,r=t,i=n;return{color:r,colorGradientEnd:i,gradientFromColor:r,gradientToColor:i,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},nc=yn("Skeleton",e=>{const{componentCls:t,calc:n}=e,r=tn(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return o8(r)},s8,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),a8=e=>{const{prefixCls:t,className:n,rootClassName:r,active:i,shape:o="circle",size:a="default"}=e,{getPrefixCls:c}=h.useContext(Ot),u=c("skeleton",t),[d,f,p]=nc(u),g=dr(e,["prefixCls","className"]),v=ne(u,`${u}-element`,{[`${u}-active`]:i},n,r,f,p);return d(h.createElement("div",{className:v},h.createElement(Yf,Object.assign({prefixCls:`${u}-avatar`,shape:o,size:a},g))))},l8=e=>{const{prefixCls:t,className:n,rootClassName:r,active:i,block:o=!1,size:a="default"}=e,{getPrefixCls:c}=h.useContext(Ot),u=c("skeleton",t),[d,f,p]=nc(u),g=dr(e,["prefixCls"]),v=ne(u,`${u}-element`,{[`${u}-active`]:i,[`${u}-block`]:o},n,r,f,p);return d(h.createElement("div",{className:v},h.createElement(Yf,Object.assign({prefixCls:`${u}-button`,size:a},g))))},c8="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",u8=e=>{const{prefixCls:t,className:n,rootClassName:r,style:i,active:o}=e,{getPrefixCls:a}=h.useContext(Ot),c=a("skeleton",t),[u,d,f]=nc(c),p=ne(c,`${c}-element`,{[`${c}-active`]:o},n,r,d,f);return u(h.createElement("div",{className:p},h.createElement("div",{className:ne(`${c}-image`,n),style:i},h.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${c}-image-svg`},h.createElement("title",null,"Image placeholder"),h.createElement("path",{d:c8,className:`${c}-image-path`})))))},d8=e=>{const{prefixCls:t,className:n,rootClassName:r,active:i,block:o,size:a="default"}=e,{getPrefixCls:c}=h.useContext(Ot),u=c("skeleton",t),[d,f,p]=nc(u),g=dr(e,["prefixCls"]),v=ne(u,`${u}-element`,{[`${u}-active`]:i,[`${u}-block`]:o},n,r,f,p);return d(h.createElement("div",{className:v},h.createElement(Yf,Object.assign({prefixCls:`${u}-input`,size:a},g))))},h8=e=>{const{prefixCls:t,className:n,rootClassName:r,style:i,active:o,children:a}=e,{getPrefixCls:c}=h.useContext(Ot),u=c("skeleton",t),[d,f,p]=nc(u),g=ne(u,`${u}-element`,{[`${u}-active`]:o},f,n,r,p);return d(h.createElement("div",{className:g},h.createElement("div",{className:ne(`${u}-image`,n),style:i},a)))},f8=(e,t)=>{const{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},m8=e=>{const{prefixCls:t,className:n,style:r,rows:i=0}=e,o=Array.from({length:i}).map((a,c)=>h.createElement("li",{key:c,style:{width:f8(c,e)}}));return h.createElement("ul",{className:ne(t,n),style:r},o)},p8=({prefixCls:e,className:t,width:n,style:r})=>h.createElement("h3",{className:ne(e,t),style:Object.assign({width:n},r)});function kg(e){return e&&typeof e=="object"?e:{}}function g8(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function v8(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function y8(e,t){const n={};return(!e||!t)&&(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}const La=e=>{const{prefixCls:t,loading:n,className:r,rootClassName:i,style:o,children:a,avatar:c=!1,title:u=!0,paragraph:d=!0,active:f,round:p}=e,{getPrefixCls:g,direction:v,className:b,style:_}=Ur("skeleton"),S=g("skeleton",t),[C,E,k]=nc(S);if(n||!("loading"in e)){const $=!!c,P=!!u,T=!!d;let O;if($){const z=Object.assign(Object.assign({prefixCls:`${S}-avatar`},g8(P,T)),kg(c));O=h.createElement("div",{className:`${S}-header`},h.createElement(Yf,Object.assign({},z)))}let N;if(P||T){let z;if(P){const M=Object.assign(Object.assign({prefixCls:`${S}-title`},v8($,T)),kg(u));z=h.createElement(p8,Object.assign({},M))}let A;if(T){const M=Object.assign(Object.assign({prefixCls:`${S}-paragraph`},y8($,P)),kg(d));A=h.createElement(m8,Object.assign({},M))}N=h.createElement("div",{className:`${S}-content`},z,A)}const I=ne(S,{[`${S}-with-avatar`]:$,[`${S}-active`]:f,[`${S}-rtl`]:v==="rtl",[`${S}-round`]:p},b,r,i,E,k);return C(h.createElement("div",{className:I,style:Object.assign(Object.assign({},_),o)},O,N))}return a??null};La.Button=l8;La.Avatar=a8;La.Input=d8;La.Image=u8;La.Node=h8;function wC(){}const b8=h.createContext({add:wC,remove:wC});function fk(e){const t=h.useContext(b8),n=h.useRef(null);return Zn(i=>{if(i){const o=e?i.querySelector(e):i;o&&(t.add(o),n.current=o)}else t.remove(n.current)})}const EC=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=h.useContext(Hu);return Q.createElement(ur,Object.assign({onClick:n},e),t)},kC=()=>{const{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:i}=h.useContext(Hu);return Q.createElement(ur,Object.assign({},UE(n),{loading:e,onClick:i},t),r)};function mk(e,t){return Q.createElement("span",{className:`${e}-close-x`},t||Q.createElement(Zs,{className:`${e}-close-icon`}))}const pk=e=>{const{okText:t,okType:n="primary",cancelText:r,confirmLoading:i,onOk:o,onCancel:a,okButtonProps:c,cancelButtonProps:u,footer:d}=e,[f]=gs("Modal",X2()),p=t||(f==null?void 0:f.okText),g=r||(f==null?void 0:f.cancelText),v=Q.useMemo(()=>({confirmLoading:i,okButtonProps:c,cancelButtonProps:u,okTextLocale:p,cancelTextLocale:g,okType:n,onOk:o,onCancel:a}),[i,c,u,p,g,n,o,a]);let b;return typeof d=="function"||typeof d>"u"?(b=Q.createElement(Q.Fragment,null,Q.createElement(EC,null),Q.createElement(kC,null)),typeof d=="function"&&(b=d(b,{OkBtn:kC,CancelBtn:EC})),b=Q.createElement(tk,{value:v},b)):b=d,Q.createElement(nE,{disabled:!1},b)},_8=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},S8=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},C8=(e,t)=>{const{prefixCls:n,componentCls:r,gridColumns:i}=e,o={};for(let a=i;a>=0;a--)a===0?(o[`${r}${t}-${a}`]={display:"none"},o[`${r}-push-${a}`]={insetInlineStart:"auto"},o[`${r}-pull-${a}`]={insetInlineEnd:"auto"},o[`${r}${t}-push-${a}`]={insetInlineStart:"auto"},o[`${r}${t}-pull-${a}`]={insetInlineEnd:"auto"},o[`${r}${t}-offset-${a}`]={marginInlineStart:0},o[`${r}${t}-order-${a}`]={order:0}):(o[`${r}${t}-${a}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${a/i*100}%`,maxWidth:`${a/i*100}%`}],o[`${r}${t}-push-${a}`]={insetInlineStart:`${a/i*100}%`},o[`${r}${t}-pull-${a}`]={insetInlineEnd:`${a/i*100}%`},o[`${r}${t}-offset-${a}`]={marginInlineStart:`${a/i*100}%`},o[`${r}${t}-order-${a}`]={order:a});return o[`${r}${t}-flex`]={flex:`var(--${n}${t}-flex)`},o},Jv=(e,t)=>C8(e,t),x8=(e,t,n)=>({[`@media (min-width: ${te(t)})`]:Object.assign({},Jv(e,n))}),w8=()=>({}),E8=()=>({}),k8=yn("Grid",_8,w8),gk=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin}),$8=yn("Grid",e=>{const t=tn(e,{gridColumns:24}),n=gk(t);return delete n.xs,[S8(t),Jv(t,""),Jv(t,"-xs"),Object.keys(n).map(r=>x8(t,n[r],`-${r}`)).reduce((r,i)=>Object.assign(Object.assign({},r),i),{})]},E8);function $C(e){return{position:e,inset:0}}const R8=e=>{const{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${n}-zoom-leave ${t}-content`]:{pointerEvents:"none"},[`${t}-mask`]:Object.assign(Object.assign({},$C("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:Object.assign(Object.assign({},$C("fixed")),{zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${t}-root`]:ON(e)}]},T8=e=>{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${te(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},Vn(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${te(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:Object.assign({position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:te(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive}},uo(e)),[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${te(e.margin)} auto`}},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}})},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-content,
219
- ${t}-body,
220
- ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},P8=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},O8=e=>{const{componentCls:t}=e,n=gk(e),r=Object.assign({},n);delete r.xs;const i=`--${t.replace(".","")}-`,o=Object.keys(r).map(a=>({[`@media (min-width: ${te(r[a])})`]:{width:`var(${i}${a}-width)`}}));return{[`${t}-root`]:{[t]:[].concat(We(Object.keys(n).map((a,c)=>{const u=Object.keys(n)[c-1];return u?{[`${i}${a}-width`]:`var(${i}${u}-width)`}:null})),[{width:`var(${i}xs-width)`}],We(o))}}},vk=e=>{const t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return tn(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},yk=e=>({footerBg:"transparent",headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${te(e.paddingMD)} ${te(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${te(e.padding)} ${te(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${te(e.paddingXS)} ${te(e.padding)}`:0,footerBorderTop:e.wireframe?`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${te(e.padding*2)} ${te(e.padding*2)} ${te(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM}),bk=yn("Modal",e=>{const t=vk(e);return[T8(t),P8(t),R8(t),Du(t,"zoom"),O8(t)]},yk,{unitless:{titleLineHeight:!0}});var I8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let Qv;const N8=e=>{Qv={x:e.pageX,y:e.pageY},setTimeout(()=>{Qv=null},100)};QM()&&document.documentElement.addEventListener("click",N8,!0);const _k=e=>{const{prefixCls:t,className:n,rootClassName:r,open:i,wrapClassName:o,centered:a,getContainer:c,focusTriggerAfterClose:u=!0,style:d,visible:f,width:p=520,footer:g,classNames:v,styles:b,children:_,loading:S,confirmLoading:C,zIndex:E,mousePosition:k,onOk:$,onCancel:P,destroyOnHidden:T,destroyOnClose:O,panelRef:N=null,modalRender:I}=e,z=I8(e,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading","confirmLoading","zIndex","mousePosition","onOk","onCancel","destroyOnHidden","destroyOnClose","panelRef","modalRender"]),{getPopupContainer:A,getPrefixCls:M,direction:j,modal:B}=h.useContext(Ot),F=xe=>{C||P==null||P(xe)},W=xe=>{$==null||$(xe)},V=M("modal",t),L=M(),G=Po(V),[U,D,q]=bk(V,G),Y=ne(o,{[`${V}-centered`]:a??(B==null?void 0:B.centered),[`${V}-wrap-rtl`]:j==="rtl"}),ee=g!==null&&!S?h.createElement(pk,Object.assign({},e,{onOk:W,onCancel:F})):null,[Z,re,he,fe]=yy(Gl(e),Gl(B),{closable:!0,closeIcon:h.createElement(Zs,{className:`${V}-close-icon`}),closeIconRender:xe=>mk(V,xe)}),ue=I?xe=>h.createElement("div",{className:`${V}-render`},I(xe)):void 0,Se=`.${V}-${I?"render":"content"}`,ae=fk(Se),le=ho(N,ae),[ce,ye]=tc("Modal",E),[me,de]=h.useMemo(()=>p&&typeof p=="object"?[void 0,p]:[p,void 0],[p]),be=h.useMemo(()=>{const xe={};return de&&Object.keys(de).forEach(Te=>{const ze=de[Te];ze!==void 0&&(xe[`--${V}-${Te}-width`]=typeof ze=="number"?`${ze}px`:ze)}),xe},[V,de]);return U(h.createElement(Vu,{form:!0,space:!0},h.createElement(Bu.Provider,{value:ye},h.createElement(sk,Object.assign({width:me},z,{zIndex:ce,getContainer:c===void 0?A:c,prefixCls:V,rootClassName:ne(D,r,q,G),footer:ee,visible:i??f,mousePosition:k??Qv,onClose:F,closable:Z&&Object.assign({disabled:he,closeIcon:re},fe),closeIcon:re,focusTriggerAfterClose:u,transitionName:qo(L,"zoom",e.transitionName),maskTransitionName:qo(L,"fade",e.maskTransitionName),className:ne(D,n,B==null?void 0:B.className),style:Object.assign(Object.assign(Object.assign({},B==null?void 0:B.style),d),be),classNames:Object.assign(Object.assign(Object.assign({},B==null?void 0:B.classNames),v),{wrapper:ne(Y,v==null?void 0:v.wrapper)}),styles:Object.assign(Object.assign({},B==null?void 0:B.styles),b),panelRef:le,destroyOnClose:T??O,modalRender:ue}),S?h.createElement(La,{active:!0,title:!1,paragraph:{rows:4},className:`${V}-body-skeleton`}):_))))},M8=e=>{const{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:i,fontSize:o,lineHeight:a,modalTitleHeight:c,fontHeight:u,confirmBodyPadding:d}=e,f=`${t}-confirm`;return{[f]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${f}-body-wrapper`]:Object.assign({},Jh()),[`&${t} ${t}-body`]:{padding:d},[`${f}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:i,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(u).sub(i).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(c).sub(i).equal()).div(2).equal()}},[`${f}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${te(e.marginSM)})`},[`${e.iconCls} + ${f}-paragraph`]:{maxWidth:`calc(100% - ${te(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${f}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${f}-content`]:{color:e.colorText,fontSize:o,lineHeight:a},[`${f}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${f}-error ${f}-body > ${e.iconCls}`]:{color:e.colorError},[`${f}-warning ${f}-body > ${e.iconCls},
221
- ${f}-confirm ${f}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${f}-info ${f}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${f}-success ${f}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},z8=zu(["Modal","confirm"],e=>{const t=vk(e);return M8(t)},yk,{order:-1e3});var j8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Sk=e=>{const{prefixCls:t,icon:n,okText:r,cancelText:i,confirmPrefixCls:o,type:a,okCancel:c,footer:u,locale:d}=e,f=j8(e,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]);let p=n;if(!n&&n!==null)switch(a){case"info":p=h.createElement(OE,null);break;case"success":p=h.createElement(TE,null);break;case"error":p=h.createElement(jf,null);break;default:p=h.createElement(PE,null)}const g=c??a==="confirm",v=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",[b]=gs("Modal"),_=d||b,S=r||(g?_==null?void 0:_.okText:_==null?void 0:_.justOkText),C=i||(_==null?void 0:_.cancelText),E=h.useMemo(()=>Object.assign({autoFocusButton:v,cancelTextLocale:C,okTextLocale:S,mergedOkCancel:g},f),[v,C,S,g,f]),k=h.createElement(h.Fragment,null,h.createElement(iC,null),h.createElement(oC,null)),$=e.title!==void 0&&e.title!==null,P=`${o}-body`;return h.createElement("div",{className:`${o}-body-wrapper`},h.createElement("div",{className:ne(P,{[`${P}-has-title`]:$})},p,h.createElement("div",{className:`${o}-paragraph`},$&&h.createElement("span",{className:`${o}-title`},e.title),h.createElement("div",{className:`${o}-content`},e.content))),u===void 0||typeof u=="function"?h.createElement(tk,{value:E},h.createElement("div",{className:`${o}-btns`},typeof u=="function"?u(k,{OkBtn:oC,CancelBtn:iC}):k)):u,h.createElement(z8,{prefixCls:t}))},B8=e=>{const{close:t,zIndex:n,maskStyle:r,direction:i,prefixCls:o,wrapClassName:a,rootPrefixCls:c,bodyStyle:u,closable:d=!1,onConfirm:f,styles:p,title:g}=e,v=`${o}-confirm`,b=e.width||416,_=e.style||{},S=e.mask===void 0?!0:e.mask,C=e.maskClosable===void 0?!1:e.maskClosable,E=ne(v,`${v}-${e.type}`,{[`${v}-rtl`]:i==="rtl"},e.className),[,k]=mi(),$=h.useMemo(()=>n!==void 0?n:k.zIndexPopupBase+jE,[n,k]);return h.createElement(_k,Object.assign({},e,{className:E,wrapClassName:ne({[`${v}-centered`]:!!e.centered},a),onCancel:()=>{t==null||t({triggerCancel:!0}),f==null||f(!1)},title:g,footer:null,transitionName:qo(c||"","zoom",e.transitionName),maskTransitionName:qo(c||"","fade",e.maskTransitionName),mask:S,maskClosable:C,style:_,styles:Object.assign({body:u,mask:r},p),width:b,zIndex:$,closable:d}),h.createElement(Sk,Object.assign({},e,{confirmPrefixCls:v})))},Ck=e=>{const{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:i}=e;return h.createElement(Yo,{prefixCls:t,iconPrefixCls:n,direction:r,theme:i},h.createElement(B8,Object.assign({},e)))},Ca=[];let xk="";function wk(){return xk}const L8=e=>{var t,n;const{prefixCls:r,getContainer:i,direction:o}=e,a=X2(),c=h.useContext(Ot),u=wk()||c.getPrefixCls(),d=r||`${u}-modal`;let f=i;return f===!1&&(f=void 0),Q.createElement(Ck,Object.assign({},e,{rootPrefixCls:u,prefixCls:d,iconPrefixCls:c.iconPrefixCls,theme:c.theme,direction:o??c.direction,locale:(n=(t=c.locale)===null||t===void 0?void 0:t.Modal)!==null&&n!==void 0?n:a,getContainer:f}))};function qu(e){const t=wE(),n=document.createDocumentFragment();let r=Object.assign(Object.assign({},e),{close:u,open:!0}),i,o;function a(...f){var p;if(f.some(b=>b==null?void 0:b.triggerCancel)){var v;(p=e.onCancel)===null||p===void 0||(v=p).call.apply(v,[e,()=>{}].concat(We(f.slice(1))))}for(let b=0;b<Ca.length;b++)if(Ca[b]===u){Ca.splice(b,1);break}o()}const c=f=>{clearTimeout(i),i=setTimeout(()=>{const p=t.getPrefixCls(void 0,wk()),g=t.getIconPrefixCls(),v=t.getTheme(),b=Q.createElement(L8,Object.assign({},f));o=Sy()(Q.createElement(Yo,{prefixCls:p,iconPrefixCls:g,theme:v},typeof t.holderRender=="function"?t.holderRender(b):b),n)})};function u(...f){r=Object.assign(Object.assign({},r),{open:!1,afterClose:()=>{typeof e.afterClose=="function"&&e.afterClose(),a.apply(this,f)}}),r.visible&&delete r.visible,c(r)}function d(f){typeof f=="function"?r=f(r):r=Object.assign(Object.assign({},r),f),c(r)}return c(r),Ca.push(u),{destroy:u,update:d}}function Ek(e){return Object.assign(Object.assign({},e),{type:"warning"})}function kk(e){return Object.assign(Object.assign({},e),{type:"info"})}function $k(e){return Object.assign(Object.assign({},e),{type:"success"})}function Rk(e){return Object.assign(Object.assign({},e),{type:"error"})}function Tk(e){return Object.assign(Object.assign({},e),{type:"confirm"})}function A8({rootPrefixCls:e}){xk=e}var D8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const H8=(e,t)=>{var n,{afterClose:r,config:i}=e,o=D8(e,["afterClose","config"]);const[a,c]=h.useState(!0),[u,d]=h.useState(i),{direction:f,getPrefixCls:p}=h.useContext(Ot),g=p("modal"),v=p(),b=()=>{var E;r(),(E=u.afterClose)===null||E===void 0||E.call(u)},_=(...E)=>{var k;if(c(!1),E.some(T=>T==null?void 0:T.triggerCancel)){var P;(k=u.onCancel)===null||k===void 0||(P=k).call.apply(P,[u,()=>{}].concat(We(E.slice(1))))}};h.useImperativeHandle(t,()=>({destroy:_,update:E=>{d(k=>{const $=typeof E=="function"?E(k):E;return Object.assign(Object.assign({},k),$)})}}));const S=(n=u.okCancel)!==null&&n!==void 0?n:u.type==="confirm",[C]=gs("Modal",Ys.Modal);return h.createElement(Ck,Object.assign({prefixCls:g,rootPrefixCls:v},u,{close:_,open:a,afterClose:b,okText:u.okText||(S?C==null?void 0:C.okText:C==null?void 0:C.justOkText),direction:u.direction||f,cancelText:u.cancelText||(C==null?void 0:C.cancelText)},o))},F8=h.forwardRef(H8);let RC=0;const W8=h.memo(h.forwardRef((e,t)=>{const[n,r]=gI();return h.useImperativeHandle(t,()=>({patchElement:r}),[r]),h.createElement(h.Fragment,null,n)}));function V8(){const e=h.useRef(null),[t,n]=h.useState([]);h.useEffect(()=>{t.length&&(We(t).forEach(a=>{a()}),n([]))},[t]);const r=h.useCallback(o=>function(c){var u;RC+=1;const d=h.createRef();let f;const p=new Promise(S=>{f=S});let g=!1,v;const b=h.createElement(F8,{key:`modal-${RC}`,config:o(c),ref:d,afterClose:()=>{v==null||v()},isSilent:()=>g,onConfirm:S=>{f(S)}});return v=(u=e.current)===null||u===void 0?void 0:u.patchElement(b),v&&Ca.push(v),{destroy:()=>{function S(){var C;(C=d.current)===null||C===void 0||C.destroy()}d.current?S():n(C=>[].concat(We(C),[S]))},update:S=>{function C(){var E;(E=d.current)===null||E===void 0||E.update(S)}d.current?C():n(E=>[].concat(We(E),[C]))},then:S=>(g=!0,p.then(S))}},[]);return[h.useMemo(()=>({info:r(kk),success:r($k),error:r(Rk),warning:r(Ek),confirm:r(Tk)}),[r]),h.createElement(W8,{key:"modal-holder",ref:e})]}const q8=Q.createContext({});function Pk(e){return t=>h.createElement(Yo,{theme:{token:{motion:!1,zIndexPopupBase:0}}},h.createElement(e,Object.assign({},t)))}const Ok=(e,t,n,r,i)=>Pk(a=>{const{prefixCls:c,style:u}=a,d=h.useRef(null),[f,p]=h.useState(0),[g,v]=h.useState(0),[b,_]=er(!1,{value:a.open}),{getPrefixCls:S}=h.useContext(Ot),C=S(r||"select",c);h.useEffect(()=>{if(_(!0),typeof ResizeObserver<"u"){const $=new ResizeObserver(T=>{const O=T[0].target;p(O.offsetHeight+8),v(O.offsetWidth)}),P=setInterval(()=>{var T;const O=i?`.${i(C)}`:`.${C}-dropdown`,N=(T=d.current)===null||T===void 0?void 0:T.querySelector(O);N&&(clearInterval(P),$.observe(N))},10);return()=>{clearInterval(P),$.disconnect()}}},[C]);let E=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},u),{margin:0}),open:b,visible:b,getPopupContainer:()=>d.current});t&&Object.assign(E,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});const k={paddingBottom:f,position:"relative",minWidth:g};return h.createElement("div",{ref:d,style:k},h.createElement(e,Object.assign({},E)))}),Oy=(function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e==null?void 0:e.substr(0,4))});var Qf=function(t){var n=t.className,r=t.customizeIcon,i=t.customizeIconProps,o=t.children,a=t.onMouseDown,c=t.onClick,u=typeof r=="function"?r(i):r;return h.createElement("span",{className:n,onMouseDown:function(f){f.preventDefault(),a==null||a(f)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:c,"aria-hidden":!0},u!==void 0?u:h.createElement("span",{className:ne(n.split(/\s+/).map(function(d){return"".concat(d,"-icon")}))},o))},U8=function(t,n,r,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,c=arguments.length>6?arguments[6]:void 0,u=arguments.length>7?arguments[7]:void 0,d=Q.useMemo(function(){if(_t(i)==="object")return i.clearIcon;if(o)return o},[i,o]),f=Q.useMemo(function(){return!!(!a&&i&&(r.length||c)&&!(u==="combobox"&&c===""))},[i,a,r.length,c,u]);return{allowClear:f,clearIcon:Q.createElement(Qf,{className:"".concat(t,"-clear"),onMouseDown:n,customizeIcon:d},"×")}},Ik=h.createContext(null);function K8(){return h.useContext(Ik)}function G8(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=h.useState(!1),n=se(t,2),r=n[0],i=n[1],o=h.useRef(null),a=function(){window.clearTimeout(o.current)};h.useEffect(function(){return a},[]);var c=function(d,f){a(),o.current=window.setTimeout(function(){i(d),f&&f()},e)};return[r,c,a]}function Nk(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=h.useRef(null),n=h.useRef(null);h.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function r(i){(i||t.current===null)&&(t.current=i),window.clearTimeout(n.current),n.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},r]}function X8(e,t,n,r){var i=h.useRef(null);i.current={open:t,triggerOpen:n,customizedTrigger:r},h.useEffect(function(){function o(a){var c;if(!((c=i.current)!==null&&c!==void 0&&c.customizedTrigger)){var u=a.target;u.shadowRoot&&a.composed&&(u=a.composedPath()[0]||u),i.current.open&&e().filter(function(d){return d}).every(function(d){return!d.contains(u)&&d!==u})&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",o),function(){return window.removeEventListener("mousedown",o)}},[])}function Y8(e){return e&&![Ge.ESC,Ge.SHIFT,Ge.BACKSPACE,Ge.TAB,Ge.WIN_KEY,Ge.ALT,Ge.META,Ge.WIN_KEY_RIGHT,Ge.CTRL,Ge.SEMICOLON,Ge.EQUALS,Ge.CAPS_LOCK,Ge.CONTEXT_MENU,Ge.F1,Ge.F2,Ge.F3,Ge.F4,Ge.F5,Ge.F6,Ge.F7,Ge.F8,Ge.F9,Ge.F10,Ge.F11,Ge.F12].includes(e)}var J8=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],vl=void 0;function Q8(e,t){var n=e.prefixCls,r=e.invalidate,i=e.item,o=e.renderItem,a=e.responsive,c=e.responsiveDisabled,u=e.registerSize,d=e.itemKey,f=e.className,p=e.style,g=e.children,v=e.display,b=e.order,_=e.component,S=_===void 0?"div":_,C=Lt(e,J8),E=a&&!v;function k(N){u(d,N)}h.useEffect(function(){return function(){k(null)}},[]);var $=o&&i!==vl?o(i,{index:b}):g,P;r||(P={opacity:E?0:1,height:E?0:vl,overflowY:E?"hidden":vl,order:a?b:vl,pointerEvents:E?"none":vl,position:E?"absolute":vl});var T={};E&&(T["aria-hidden"]=!0);var O=h.createElement(S,Re({className:ne(!r&&n,f),style:X(X({},P),p)},T,C,{ref:t}),$);return a&&(O=h.createElement(ao,{onResize:function(I){var z=I.offsetWidth;k(z)},disabled:c},O)),O}var Ml=h.forwardRef(Q8);Ml.displayName="Item";function Z8(e){if(typeof MessageChannel>"u")Rn(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function ez(){var e=h.useRef(null),t=function(r){e.current||(e.current=[],Z8(function(){Xs.unstable_batchedUpdates(function(){e.current.forEach(function(i){i()}),e.current=null})})),e.current.push(r)};return t}function yl(e,t){var n=h.useState(t),r=se(n,2),i=r[0],o=r[1],a=Zn(function(c){e(function(){o(c)})});return[i,a]}var of=Q.createContext(null),tz=["component"],nz=["className"],rz=["className"],iz=function(t,n){var r=h.useContext(of);if(!r){var i=t.component,o=i===void 0?"div":i,a=Lt(t,tz);return h.createElement(o,Re({},a,{ref:n}))}var c=r.className,u=Lt(r,nz),d=t.className,f=Lt(t,rz);return h.createElement(of.Provider,{value:null},h.createElement(Ml,Re({ref:n,className:ne(c,d)},u,f)))},Mk=h.forwardRef(iz);Mk.displayName="RawItem";var oz=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],zk="responsive",jk="invalidate";function sz(e){return"+ ".concat(e.length," ...")}function az(e,t){var n=e.prefixCls,r=n===void 0?"rc-overflow":n,i=e.data,o=i===void 0?[]:i,a=e.renderItem,c=e.renderRawItem,u=e.itemKey,d=e.itemWidth,f=d===void 0?10:d,p=e.ssr,g=e.style,v=e.className,b=e.maxCount,_=e.renderRest,S=e.renderRawRest,C=e.prefix,E=e.suffix,k=e.component,$=k===void 0?"div":k,P=e.itemComponent,T=e.onVisibleChange,O=Lt(e,oz),N=p==="full",I=ez(),z=yl(I,null),A=se(z,2),M=A[0],j=A[1],B=M||0,F=yl(I,new Map),W=se(F,2),V=W[0],L=W[1],G=yl(I,0),U=se(G,2),D=U[0],q=U[1],Y=yl(I,0),ee=se(Y,2),Z=ee[0],re=ee[1],he=yl(I,0),fe=se(he,2),ue=fe[0],Se=fe[1],ae=yl(I,0),le=se(ae,2),ce=le[0],ye=le[1],me=h.useState(null),de=se(me,2),be=de[0],xe=de[1],Te=h.useState(null),ze=se(Te,2),Ee=ze[0],ke=ze[1],je=h.useMemo(function(){return Ee===null&&N?Number.MAX_SAFE_INTEGER:Ee||0},[Ee,M]),Oe=h.useState(!1),Qe=se(Oe,2),at=Qe[0],$t=Qe[1],pt="".concat(r,"-item"),Je=Math.max(D,Z),ft=b===zk,Xe=o.length&&ft,yt=b===jk,tt=Xe||typeof b=="number"&&o.length>b,Le=h.useMemo(function(){var $e=o;return Xe?M===null&&N?$e=o:$e=o.slice(0,Math.min(o.length,B/f)):typeof b=="number"&&($e=o.slice(0,b)),$e},[o,f,M,b,Xe]),rt=h.useMemo(function(){return Xe?o.slice(je+1):o.slice(Le.length)},[o,Le,Xe,je]),Me=h.useCallback(function($e,we){var Ae;return typeof u=="function"?u($e):(Ae=u&&($e==null?void 0:$e[u]))!==null&&Ae!==void 0?Ae:we},[u]),Ue=h.useCallback(a||function($e){return $e},[a]);function It($e,we,Ae){Ee===$e&&(we===void 0||we===be)||(ke($e),Ae||($t($e<o.length-1),T==null||T($e)),we!==void 0&&xe(we))}function St($e,we){j(we.clientWidth)}function nn($e,we){L(function(Ae){var et=new Map(Ae);return we===null?et.delete($e):et.set($e,we),et})}function Jt($e,we){re(we),q(Z)}function bn($e,we){Se(we)}function On($e,we){ye(we)}function on($e){return V.get(Me(Le[$e],$e))}hn(function(){if(B&&typeof Je=="number"&&Le){var $e=ue+ce,we=Le.length,Ae=we-1;if(!we){It(0,null);return}for(var et=0;et<we;et+=1){var nt=on(et);if(N&&(nt=nt||0),nt===void 0){It(et-1,void 0,!0);break}if($e+=nt,Ae===0&&$e<=B||et===Ae-1&&$e+on(Ae)<=B){It(Ae,null);break}else if($e+Je>B){It(et-1,$e-nt-ce+Z);break}}E&&on(0)+ce>B&&xe(null)}},[B,V,Z,ue,ce,Me,Le]);var Ht=at&&!!rt.length,Rt={};be!==null&&Xe&&(Rt={position:"absolute",left:be,top:0});var sn={prefixCls:pt,responsive:Xe,component:P,invalidate:yt},Xt=c?function($e,we){var Ae=Me($e,we);return h.createElement(of.Provider,{key:Ae,value:X(X({},sn),{},{order:we,item:$e,itemKey:Ae,registerSize:nn,display:we<=je})},c($e,we))}:function($e,we){var Ae=Me($e,we);return h.createElement(Ml,Re({},sn,{order:we,key:Ae,item:$e,renderItem:Ue,itemKey:Ae,registerSize:nn,display:we<=je}))},ot={order:Ht?je:Number.MAX_SAFE_INTEGER,className:"".concat(pt,"-rest"),registerSize:Jt,display:Ht},Et=_||sz,mt=S?h.createElement(of.Provider,{value:X(X({},sn),ot)},S(rt)):h.createElement(Ml,Re({},sn,ot),typeof Et=="function"?Et(rt):Et),Ie=h.createElement($,Re({className:ne(!yt&&r,v),style:g,ref:t},O),C&&h.createElement(Ml,Re({},sn,{responsive:ft,responsiveDisabled:!Xe,order:-1,className:"".concat(pt,"-prefix"),registerSize:bn,display:!0}),C),Le.map(Xt),tt?mt:null,E&&h.createElement(Ml,Re({},sn,{responsive:ft,responsiveDisabled:!Xe,order:je,className:"".concat(pt,"-suffix"),registerSize:On,display:!0,style:Rt}),E));return ft?h.createElement(ao,{onResize:St,disabled:!Xe},Ie):Ie}var Wo=h.forwardRef(az);Wo.displayName="Overflow";Wo.Item=Mk;Wo.RESPONSIVE=zk;Wo.INVALIDATE=jk;function lz(e,t,n){var r=X(X({},e),t);return Object.keys(t).forEach(function(i){var o=t[i];typeof o=="function"&&(r[i]=function(){for(var a,c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];return o.apply(void 0,u),(a=e[i])===null||a===void 0?void 0:a.call.apply(a,[e].concat(u))})}),r}var cz=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],uz=function(t,n){var r=t.prefixCls,i=t.id,o=t.inputElement,a=t.autoFocus,c=t.autoComplete,u=t.editable,d=t.activeDescendantId,f=t.value,p=t.open,g=t.attrs,v=Lt(t,cz),b=o||h.createElement("input",null),_=b,S=_.ref,C=_.props;return"maxLength"in b.props,b=h.cloneElement(b,X(X(X({type:"search"},lz(v,C)),{},{id:i,ref:ho(n,S),autoComplete:c||"off",autoFocus:a,className:ne("".concat(r,"-selection-search-input"),C==null?void 0:C.className),role:"combobox","aria-expanded":p||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":p?d:void 0},g),{},{value:u?f:"",readOnly:!u,unselectable:u?null:"on",style:X(X({},C.style),{},{opacity:u?null:0})})),b},Bk=h.forwardRef(uz);function Lk(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var dz=typeof window<"u"&&window.document&&window.document.documentElement,hz=dz;function fz(e){return e!=null}function mz(e){return!e&&e!==0}function TC(e){return["string","number"].includes(_t(e))}function Ak(e){var t=void 0;return e&&(TC(e.title)?t=e.title.toString():TC(e.label)&&(t=e.label.toString())),t}function pz(e,t){hz?h.useLayoutEffect(e,t):h.useEffect(e,t)}function gz(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var PC=function(t){t.preventDefault(),t.stopPropagation()},vz=function(t){var n=t.id,r=t.prefixCls,i=t.values,o=t.open,a=t.searchValue,c=t.autoClearSearchValue,u=t.inputRef,d=t.placeholder,f=t.disabled,p=t.mode,g=t.showSearch,v=t.autoFocus,b=t.autoComplete,_=t.activeDescendantId,S=t.tabIndex,C=t.removeIcon,E=t.maxTagCount,k=t.maxTagTextLength,$=t.maxTagPlaceholder,P=$===void 0?function(ye){return"+ ".concat(ye.length," ...")}:$,T=t.tagRender,O=t.onToggleOpen,N=t.onRemove,I=t.onInputChange,z=t.onInputPaste,A=t.onInputKeyDown,M=t.onInputMouseDown,j=t.onInputCompositionStart,B=t.onInputCompositionEnd,F=t.onInputBlur,W=h.useRef(null),V=h.useState(0),L=se(V,2),G=L[0],U=L[1],D=h.useState(!1),q=se(D,2),Y=q[0],ee=q[1],Z="".concat(r,"-selection"),re=o||p==="multiple"&&c===!1||p==="tags"?a:"",he=p==="tags"||p==="multiple"&&c===!1||g&&(o||Y);pz(function(){U(W.current.scrollWidth)},[re]);var fe=function(me,de,be,xe,Te){return h.createElement("span",{title:Ak(me),className:ne("".concat(Z,"-item"),K({},"".concat(Z,"-item-disabled"),be))},h.createElement("span",{className:"".concat(Z,"-item-content")},de),xe&&h.createElement(Qf,{className:"".concat(Z,"-item-remove"),onMouseDown:PC,onClick:Te,customizeIcon:C},"×"))},ue=function(me,de,be,xe,Te,ze){var Ee=function(je){PC(je),O(!o)};return h.createElement("span",{onMouseDown:Ee},T({label:de,value:me,disabled:be,closable:xe,onClose:Te,isMaxTag:!!ze}))},Se=function(me){var de=me.disabled,be=me.label,xe=me.value,Te=!f&&!de,ze=be;if(typeof k=="number"&&(typeof be=="string"||typeof be=="number")){var Ee=String(ze);Ee.length>k&&(ze="".concat(Ee.slice(0,k),"..."))}var ke=function(Oe){Oe&&Oe.stopPropagation(),N(me)};return typeof T=="function"?ue(xe,ze,de,Te,ke):fe(me,ze,de,Te,ke)},ae=function(me){if(!i.length)return null;var de=typeof P=="function"?P(me):P;return typeof T=="function"?ue(void 0,de,!1,!1,void 0,!0):fe({title:de},de,!1)},le=h.createElement("div",{className:"".concat(Z,"-search"),style:{width:G},onFocus:function(){ee(!0)},onBlur:function(){ee(!1)}},h.createElement(Bk,{ref:u,open:o,prefixCls:r,id:n,inputElement:null,disabled:f,autoFocus:v,autoComplete:b,editable:he,activeDescendantId:_,value:re,onKeyDown:A,onMouseDown:M,onChange:I,onPaste:z,onCompositionStart:j,onCompositionEnd:B,onBlur:F,tabIndex:S,attrs:qi(t,!0)}),h.createElement("span",{ref:W,className:"".concat(Z,"-search-mirror"),"aria-hidden":!0},re," ")),ce=h.createElement(Wo,{prefixCls:"".concat(Z,"-overflow"),data:i,renderItem:Se,renderRest:ae,suffix:le,itemKey:gz,maxCount:E});return h.createElement("span",{className:"".concat(Z,"-wrap")},ce,!i.length&&!re&&h.createElement("span",{className:"".concat(Z,"-placeholder")},d))},yz=function(t){var n=t.inputElement,r=t.prefixCls,i=t.id,o=t.inputRef,a=t.disabled,c=t.autoFocus,u=t.autoComplete,d=t.activeDescendantId,f=t.mode,p=t.open,g=t.values,v=t.placeholder,b=t.tabIndex,_=t.showSearch,S=t.searchValue,C=t.activeValue,E=t.maxLength,k=t.onInputKeyDown,$=t.onInputMouseDown,P=t.onInputChange,T=t.onInputPaste,O=t.onInputCompositionStart,N=t.onInputCompositionEnd,I=t.onInputBlur,z=t.title,A=h.useState(!1),M=se(A,2),j=M[0],B=M[1],F=f==="combobox",W=F||_,V=g[0],L=S||"";F&&C&&!j&&(L=C),h.useEffect(function(){F&&B(!1)},[F,C]);var G=f!=="combobox"&&!p&&!_?!1:!!L,U=z===void 0?Ak(V):z,D=h.useMemo(function(){return V?null:h.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:G?{visibility:"hidden"}:void 0},v)},[V,G,v,r]);return h.createElement("span",{className:"".concat(r,"-selection-wrap")},h.createElement("span",{className:"".concat(r,"-selection-search")},h.createElement(Bk,{ref:o,prefixCls:r,id:i,open:p,inputElement:n,disabled:a,autoFocus:c,autoComplete:u,editable:W,activeDescendantId:d,value:L,onKeyDown:k,onMouseDown:$,onChange:function(Y){B(!0),P(Y)},onPaste:T,onCompositionStart:O,onCompositionEnd:N,onBlur:I,tabIndex:b,attrs:qi(t,!0),maxLength:F?E:void 0})),!F&&V?h.createElement("span",{className:"".concat(r,"-selection-item"),title:U,style:G?{visibility:"hidden"}:void 0},V.label):null,D)},bz=function(t,n){var r=h.useRef(null),i=h.useRef(!1),o=t.prefixCls,a=t.open,c=t.mode,u=t.showSearch,d=t.tokenWithEnter,f=t.disabled,p=t.prefix,g=t.autoClearSearchValue,v=t.onSearch,b=t.onSearchSubmit,_=t.onToggleOpen,S=t.onInputKeyDown,C=t.onInputBlur,E=t.domRef;h.useImperativeHandle(n,function(){return{focus:function(U){r.current.focus(U)},blur:function(){r.current.blur()}}});var k=Nk(0),$=se(k,2),P=$[0],T=$[1],O=function(U){var D=U.which,q=r.current instanceof HTMLTextAreaElement;!q&&a&&(D===Ge.UP||D===Ge.DOWN)&&U.preventDefault(),S&&S(U),D===Ge.ENTER&&c==="tags"&&!i.current&&!a&&(b==null||b(U.target.value)),!(q&&!a&&~[Ge.UP,Ge.DOWN,Ge.LEFT,Ge.RIGHT].indexOf(D))&&Y8(D)&&_(!0)},N=function(){T(!0)},I=h.useRef(null),z=function(U){v(U,!0,i.current)!==!1&&_(!0)},A=function(){i.current=!0},M=function(U){i.current=!1,c!=="combobox"&&z(U.target.value)},j=function(U){var D=U.target.value;if(d&&I.current&&/[\r\n]/.test(I.current)){var q=I.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");D=D.replace(q,I.current)}I.current=null,z(D)},B=function(U){var D=U.clipboardData,q=D==null?void 0:D.getData("text");I.current=q||""},F=function(U){var D=U.target;if(D!==r.current){var q=document.body.style.msTouchAction!==void 0;q?setTimeout(function(){r.current.focus()}):r.current.focus()}},W=function(U){var D=P();U.target!==r.current&&!D&&!(c==="combobox"&&f)&&U.preventDefault(),(c!=="combobox"&&(!u||!D)||!a)&&(a&&g!==!1&&v("",!0,!1),_())},V={inputRef:r,onInputKeyDown:O,onInputMouseDown:N,onInputChange:j,onInputPaste:B,onInputCompositionStart:A,onInputCompositionEnd:M,onInputBlur:C},L=c==="multiple"||c==="tags"?h.createElement(vz,Re({},t,V)):h.createElement(yz,Re({},t,V));return h.createElement("div",{ref:E,className:"".concat(o,"-selector"),onClick:F,onMouseDown:W},p&&h.createElement("div",{className:"".concat(o,"-prefix")},p),L)},_z=h.forwardRef(bz);function Sz(e){var t=e.prefixCls,n=e.align,r=e.arrow,i=e.arrowPos,o=r||{},a=o.className,c=o.content,u=i.x,d=u===void 0?0:u,f=i.y,p=f===void 0?0:f,g=h.useRef();if(!n||!n.points)return null;var v={position:"absolute"};if(n.autoArrow!==!1){var b=n.points[0],_=n.points[1],S=b[0],C=b[1],E=_[0],k=_[1];S===E||!["t","b"].includes(S)?v.top=p:S==="t"?v.top=0:v.bottom=0,C===k||!["l","r"].includes(C)?v.left=d:C==="l"?v.left=0:v.right=0}return h.createElement("div",{ref:g,className:ne("".concat(t,"-arrow"),a),style:v},c)}function Cz(e){var t=e.prefixCls,n=e.open,r=e.zIndex,i=e.mask,o=e.motion;return i?h.createElement(Vi,Re({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(a){var c=a.className;return h.createElement("div",{style:{zIndex:r},className:ne("".concat(t,"-mask"),c)})}):null}var xz=h.memo(function(e){var t=e.children;return t},function(e,t){return t.cache}),wz=h.forwardRef(function(e,t){var n=e.popup,r=e.className,i=e.prefixCls,o=e.style,a=e.target,c=e.onVisibleChanged,u=e.open,d=e.keepDom,f=e.fresh,p=e.onClick,g=e.mask,v=e.arrow,b=e.arrowPos,_=e.align,S=e.motion,C=e.maskMotion,E=e.forceRender,k=e.getPopupContainer,$=e.autoDestroy,P=e.portal,T=e.zIndex,O=e.onMouseEnter,N=e.onMouseLeave,I=e.onPointerEnter,z=e.onPointerDownCapture,A=e.ready,M=e.offsetX,j=e.offsetY,B=e.offsetR,F=e.offsetB,W=e.onAlign,V=e.onPrepare,L=e.stretch,G=e.targetWidth,U=e.targetHeight,D=typeof n=="function"?n():n,q=u||d,Y=(k==null?void 0:k.length)>0,ee=h.useState(!k||!Y),Z=se(ee,2),re=Z[0],he=Z[1];if(hn(function(){!re&&Y&&a&&he(!0)},[re,Y,a]),!re)return null;var fe="auto",ue={left:"-1000vw",top:"-1000vh",right:fe,bottom:fe};if(A||!u){var Se,ae=_.points,le=_.dynamicInset||((Se=_._experimental)===null||Se===void 0?void 0:Se.dynamicInset),ce=le&&ae[0][1]==="r",ye=le&&ae[0][0]==="b";ce?(ue.right=B,ue.left=fe):(ue.left=M,ue.right=fe),ye?(ue.bottom=F,ue.top=fe):(ue.top=j,ue.bottom=fe)}var me={};return L&&(L.includes("height")&&U?me.height=U:L.includes("minHeight")&&U&&(me.minHeight=U),L.includes("width")&&G?me.width=G:L.includes("minWidth")&&G&&(me.minWidth=G)),u||(me.pointerEvents="none"),h.createElement(P,{open:E||q,getContainer:k&&function(){return k(a)},autoDestroy:$},h.createElement(Cz,{prefixCls:i,open:u,zIndex:T,mask:g,motion:C}),h.createElement(ao,{onResize:W,disabled:!u},function(de){return h.createElement(Vi,Re({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:E,leavedClassName:"".concat(i,"-hidden")},S,{onAppearPrepare:V,onEnterPrepare:V,visible:u,onVisibleChanged:function(xe){var Te;S==null||(Te=S.onVisibleChanged)===null||Te===void 0||Te.call(S,xe),c(xe)}}),function(be,xe){var Te=be.className,ze=be.style,Ee=ne(i,Te,r);return h.createElement("div",{ref:ho(de,t,xe),className:Ee,style:X(X(X(X({"--arrow-x":"".concat(b.x||0,"px"),"--arrow-y":"".concat(b.y||0,"px")},ue),me),ze),{},{boxSizing:"border-box",zIndex:T},o),onMouseEnter:O,onMouseLeave:N,onPointerEnter:I,onClick:p,onPointerDownCapture:z},v&&h.createElement(Sz,{prefixCls:i,arrow:v,arrowPos:b,align:_}),h.createElement(xz,{cache:!u&&!f},D))})}))}),Ez=h.forwardRef(function(e,t){var n=e.children,r=e.getTriggerDOMNode,i=ta(n),o=h.useCallback(function(c){iy(t,r?r(c):c)},[r]),a=Xo(o,ja(n));return i?h.cloneElement(n,{ref:a}):n}),OC=h.createContext(null);function IC(e){return e?Array.isArray(e)?e:[e]:[]}function kz(e,t,n,r){return h.useMemo(function(){var i=IC(n??t),o=IC(r??t),a=new Set(i),c=new Set(o);return e&&(a.has("hover")&&(a.delete("hover"),a.add("click")),c.has("hover")&&(c.delete("hover"),c.add("click"))),[a,c]},[e,t,n,r])}function $z(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function Rz(e,t,n,r){for(var i=n.points,o=Object.keys(e),a=0;a<o.length;a+=1){var c,u=o[a];if($z((c=e[u])===null||c===void 0?void 0:c.points,i,r))return"".concat(t,"-placement-").concat(u)}return""}function NC(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function Uu(e){return e.ownerDocument.defaultView}function Zv(e){for(var t=[],n=e==null?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var i=Uu(n).getComputedStyle(n),o=i.overflowX,a=i.overflowY,c=i.overflow;[o,a,c].some(function(u){return r.includes(u)})&&t.push(n),n=n.parentElement}return t}function xu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function jc(e){return xu(parseFloat(e),0)}function MC(e,t){var n=X({},e);return(t||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var i=Uu(r).getComputedStyle(r),o=i.overflow,a=i.overflowClipMargin,c=i.borderTopWidth,u=i.borderBottomWidth,d=i.borderLeftWidth,f=i.borderRightWidth,p=r.getBoundingClientRect(),g=r.offsetHeight,v=r.clientHeight,b=r.offsetWidth,_=r.clientWidth,S=jc(c),C=jc(u),E=jc(d),k=jc(f),$=xu(Math.round(p.width/b*1e3)/1e3),P=xu(Math.round(p.height/g*1e3)/1e3),T=(b-_-E-k)*$,O=(g-v-S-C)*P,N=S*P,I=C*P,z=E*$,A=k*$,M=0,j=0;if(o==="clip"){var B=jc(a);M=B*$,j=B*P}var F=p.x+z-M,W=p.y+N-j,V=F+p.width+2*M-z-A-T,L=W+p.height+2*j-N-I-O;n.left=Math.max(n.left,F),n.top=Math.max(n.top,W),n.right=Math.min(n.right,V),n.bottom=Math.min(n.bottom,L)}}),n}function zC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(t),r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function jC(e,t){var n=t||[],r=se(n,2),i=r[0],o=r[1];return[zC(e.width,i),zC(e.height,o)]}function BC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function bl(e,t){var n=t[0],r=t[1],i,o;return n==="t"?o=e.y:n==="b"?o=e.y+e.height:o=e.y+e.height/2,r==="l"?i=e.x:r==="r"?i=e.x+e.width:i=e.x+e.width/2,{x:i,y:o}}function js(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map(function(r,i){return i===t?n[r]||"c":r}).join("")}function Tz(e,t,n,r,i,o,a){var c=h.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[r]||{}}),u=se(c,2),d=u[0],f=u[1],p=h.useRef(0),g=h.useMemo(function(){return t?Zv(t):[]},[t]),v=h.useRef({}),b=function(){v.current={}};e||b();var _=Zn(function(){if(t&&n&&e){let Kn=function(si,yi){var Ui=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qe,Pi=q.x+si,Va=q.y+yi,qa=Pi+ye,dt=Va+ce,Dt=Math.max(Pi,Ui.left),zn=Math.max(Va,Ui.top),Ln=Math.min(qa,Ui.right),jn=Math.min(dt,Ui.bottom);return Math.max(0,(Ln-Dt)*(jn-zn))},Yr=function(){En=q.y+Et,In=En+ce,Dn=q.x+ot,ln=Dn+ye};var Wa=Kn,Qo=Yr,E,k,$,P,T=t,O=T.ownerDocument,N=Uu(T),I=N.getComputedStyle(T),z=I.position,A=T.style.left,M=T.style.top,j=T.style.right,B=T.style.bottom,F=T.style.overflow,W=X(X({},i[r]),o),V=O.createElement("div");(E=T.parentElement)===null||E===void 0||E.appendChild(V),V.style.left="".concat(T.offsetLeft,"px"),V.style.top="".concat(T.offsetTop,"px"),V.style.position=z,V.style.height="".concat(T.offsetHeight,"px"),V.style.width="".concat(T.offsetWidth,"px"),T.style.left="0",T.style.top="0",T.style.right="auto",T.style.bottom="auto",T.style.overflow="hidden";var L;if(Array.isArray(n))L={x:n[0],y:n[1],width:0,height:0};else{var G,U,D=n.getBoundingClientRect();D.x=(G=D.x)!==null&&G!==void 0?G:D.left,D.y=(U=D.y)!==null&&U!==void 0?U:D.top,L={x:D.x,y:D.y,width:D.width,height:D.height}}var q=T.getBoundingClientRect(),Y=N.getComputedStyle(T),ee=Y.height,Z=Y.width;q.x=(k=q.x)!==null&&k!==void 0?k:q.left,q.y=($=q.y)!==null&&$!==void 0?$:q.top;var re=O.documentElement,he=re.clientWidth,fe=re.clientHeight,ue=re.scrollWidth,Se=re.scrollHeight,ae=re.scrollTop,le=re.scrollLeft,ce=q.height,ye=q.width,me=L.height,de=L.width,be={left:0,top:0,right:he,bottom:fe},xe={left:-le,top:-ae,right:ue-le,bottom:Se-ae},Te=W.htmlRegion,ze="visible",Ee="visibleFirst";Te!=="scroll"&&Te!==Ee&&(Te=ze);var ke=Te===Ee,je=MC(xe,g),Oe=MC(be,g),Qe=Te===ze?Oe:je,at=ke?Oe:Qe;T.style.left="auto",T.style.top="auto",T.style.right="0",T.style.bottom="0";var $t=T.getBoundingClientRect();T.style.left=A,T.style.top=M,T.style.right=j,T.style.bottom=B,T.style.overflow=F,(P=T.parentElement)===null||P===void 0||P.removeChild(V);var pt=xu(Math.round(ye/parseFloat(Z)*1e3)/1e3),Je=xu(Math.round(ce/parseFloat(ee)*1e3)/1e3);if(pt===0||Je===0||du(n)&&!Cy(n))return;var ft=W.offset,Xe=W.targetOffset,yt=jC(q,ft),tt=se(yt,2),Le=tt[0],rt=tt[1],Me=jC(L,Xe),Ue=se(Me,2),It=Ue[0],St=Ue[1];L.x-=It,L.y-=St;var nn=W.points||[],Jt=se(nn,2),bn=Jt[0],On=Jt[1],on=BC(On),Ht=BC(bn),Rt=bl(L,on),sn=bl(q,Ht),Xt=X({},W),ot=Rt.x-sn.x+Le,Et=Rt.y-sn.y+rt,mt=Kn(ot,Et),Ie=Kn(ot,Et,Oe),$e=bl(L,["t","l"]),we=bl(q,["t","l"]),Ae=bl(L,["b","r"]),et=bl(q,["b","r"]),nt=W.overflow||{},Ft=nt.adjustX,Kt=nt.adjustY,Bt=nt.shiftX,At=nt.shiftY,Tn=function(yi){return typeof yi=="boolean"?yi:yi>=0},En,In,Dn,ln;Yr();var fn=Tn(Kt),He=Ht[0]===on[0];if(fn&&Ht[0]==="t"&&(In>at.bottom||v.current.bt)){var Ye=Et;He?Ye-=ce-me:Ye=$e.y-et.y-rt;var Pt=Kn(ot,Ye),gt=Kn(ot,Ye,Oe);Pt>mt||Pt===mt&&(!ke||gt>=Ie)?(v.current.bt=!0,Et=Ye,rt=-rt,Xt.points=[js(Ht,0),js(on,0)]):v.current.bt=!1}if(fn&&Ht[0]==="b"&&(En<at.top||v.current.tb)){var lt=Et;He?lt+=ce-me:lt=Ae.y-we.y-rt;var Ze=Kn(ot,lt),Tt=Kn(ot,lt,Oe);Ze>mt||Ze===mt&&(!ke||Tt>=Ie)?(v.current.tb=!0,Et=lt,rt=-rt,Xt.points=[js(Ht,0),js(on,0)]):v.current.tb=!1}var Gt=Tn(Ft),Ke=Ht[1]===on[1];if(Gt&&Ht[1]==="l"&&(ln>at.right||v.current.rl)){var vt=ot;Ke?vt-=ye-de:vt=$e.x-et.x-Le;var Nt=Kn(vt,Et),pn=Kn(vt,Et,Oe);Nt>mt||Nt===mt&&(!ke||pn>=Ie)?(v.current.rl=!0,ot=vt,Le=-Le,Xt.points=[js(Ht,1),js(on,1)]):v.current.rl=!1}if(Gt&&Ht[1]==="r"&&(Dn<at.left||v.current.lr)){var ir=ot;Ke?ir+=ye-de:ir=Ae.x-we.x-Le;var Bn=Kn(ir,Et),Kr=Kn(ir,Et,Oe);Bn>mt||Bn===mt&&(!ke||Kr>=Ie)?(v.current.lr=!0,ot=ir,Le=-Le,Xt.points=[js(Ht,1),js(on,1)]):v.current.lr=!1}Yr();var yr=Bt===!0?0:Bt;typeof yr=="number"&&(Dn<Oe.left&&(ot-=Dn-Oe.left-Le,L.x+de<Oe.left+yr&&(ot+=L.x-Oe.left+de-yr)),ln>Oe.right&&(ot-=ln-Oe.right-Le,L.x>Oe.right-yr&&(ot+=L.x-Oe.right+yr)));var Gr=At===!0?0:At;typeof Gr=="number"&&(En<Oe.top&&(Et-=En-Oe.top-rt,L.y+me<Oe.top+Gr&&(Et+=L.y-Oe.top+me-Gr)),In>Oe.bottom&&(Et-=In-Oe.bottom-rt,L.y>Oe.bottom-Gr&&(Et+=L.y-Oe.bottom+Gr)));var br=q.x+ot,Ar=br+ye,Xr=q.y+Et,un=Xr+ce,ut=L.x,st=ut+de,an=L.y,dn=an+me,_n=Math.max(br,ut),xn=Math.min(Ar,st),Dr=(_n+xn)/2,or=Dr-br,qt=Math.max(Xr,an),_r=Math.min(un,dn),$r=(qt+_r)/2,vi=$r-Xr;a==null||a(t,Xt);var Rr=$t.right-q.x-(ot+q.width),bs=$t.bottom-q.y-(Et+q.height);pt===1&&(ot=Math.floor(ot),Rr=Math.floor(Rr)),Je===1&&(Et=Math.floor(Et),bs=Math.floor(bs));var Fa={ready:!0,offsetX:ot/pt,offsetY:Et/Je,offsetR:Rr/pt,offsetB:bs/Je,arrowX:or/pt,arrowY:vi/Je,scaleX:pt,scaleY:Je,align:Xt};f(Fa)}}),S=function(){p.current+=1;var k=p.current;Promise.resolve().then(function(){p.current===k&&_()})},C=function(){f(function(k){return X(X({},k),{},{ready:!1})})};return hn(C,[r]),hn(function(){e||C()},[e]),[d.ready,d.offsetX,d.offsetY,d.offsetR,d.offsetB,d.arrowX,d.arrowY,d.scaleX,d.scaleY,d.align,S]}function Pz(e,t,n,r,i){hn(function(){if(e&&t&&n){let g=function(){r(),i()};var p=g,o=t,a=n,c=Zv(o),u=Zv(a),d=Uu(a),f=new Set([d].concat(We(c),We(u)));return f.forEach(function(v){v.addEventListener("scroll",g,{passive:!0})}),d.addEventListener("resize",g,{passive:!0}),r(),function(){f.forEach(function(v){v.removeEventListener("scroll",g),d.removeEventListener("resize",g)})}}},[e,t,n])}function Oz(e,t,n,r,i,o,a,c){var u=h.useRef(e);u.current=e;var d=h.useRef(!1);h.useEffect(function(){if(t&&r&&(!i||o)){var p=function(){d.current=!1},g=function(S){var C;u.current&&!a(((C=S.composedPath)===null||C===void 0||(C=C.call(S))===null||C===void 0?void 0:C[0])||S.target)&&!d.current&&c(!1)},v=Uu(r);v.addEventListener("pointerdown",p,!0),v.addEventListener("mousedown",g,!0),v.addEventListener("contextmenu",g,!0);var b=Zh(n);return b&&(b.addEventListener("mousedown",g,!0),b.addEventListener("contextmenu",g,!0)),function(){v.removeEventListener("pointerdown",p,!0),v.removeEventListener("mousedown",g,!0),v.removeEventListener("contextmenu",g,!0),b&&(b.removeEventListener("mousedown",g,!0),b.removeEventListener("contextmenu",g,!0))}}},[t,n,r,i,o]);function f(){d.current=!0}return f}var Iz=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function Nz(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Gf,t=h.forwardRef(function(n,r){var i=n.prefixCls,o=i===void 0?"rc-trigger-popup":i,a=n.children,c=n.action,u=c===void 0?"hover":c,d=n.showAction,f=n.hideAction,p=n.popupVisible,g=n.defaultPopupVisible,v=n.onPopupVisibleChange,b=n.afterPopupVisibleChange,_=n.mouseEnterDelay,S=n.mouseLeaveDelay,C=S===void 0?.1:S,E=n.focusDelay,k=n.blurDelay,$=n.mask,P=n.maskClosable,T=P===void 0?!0:P,O=n.getPopupContainer,N=n.forceRender,I=n.autoDestroy,z=n.destroyPopupOnHide,A=n.popup,M=n.popupClassName,j=n.popupStyle,B=n.popupPlacement,F=n.builtinPlacements,W=F===void 0?{}:F,V=n.popupAlign,L=n.zIndex,G=n.stretch,U=n.getPopupClassNameFromAlign,D=n.fresh,q=n.alignPoint,Y=n.onPopupClick,ee=n.onPopupAlign,Z=n.arrow,re=n.popupMotion,he=n.maskMotion,fe=n.popupTransitionName,ue=n.popupAnimation,Se=n.maskTransitionName,ae=n.maskAnimation,le=n.className,ce=n.getTriggerDOMNode,ye=Lt(n,Iz),me=I||z||!1,de=h.useState(!1),be=se(de,2),xe=be[0],Te=be[1];hn(function(){Te(Oy())},[]);var ze=h.useRef({}),Ee=h.useContext(OC),ke=h.useMemo(function(){return{registerSubPopup:function(Dt,zn){ze.current[Dt]=zn,Ee==null||Ee.registerSubPopup(Dt,zn)}}},[Ee]),je=Xf(),Oe=h.useState(null),Qe=se(Oe,2),at=Qe[0],$t=Qe[1],pt=h.useRef(null),Je=Zn(function(dt){pt.current=dt,du(dt)&&at!==dt&&$t(dt),Ee==null||Ee.registerSubPopup(je,dt)}),ft=h.useState(null),Xe=se(ft,2),yt=Xe[0],tt=Xe[1],Le=h.useRef(null),rt=Zn(function(dt){du(dt)&&yt!==dt&&(tt(dt),Le.current=dt)}),Me=h.Children.only(a),Ue=(Me==null?void 0:Me.props)||{},It={},St=Zn(function(dt){var Dt,zn,Ln=yt;return(Ln==null?void 0:Ln.contains(dt))||((Dt=Zh(Ln))===null||Dt===void 0?void 0:Dt.host)===dt||dt===Ln||(at==null?void 0:at.contains(dt))||((zn=Zh(at))===null||zn===void 0?void 0:zn.host)===dt||dt===at||Object.values(ze.current).some(function(jn){return(jn==null?void 0:jn.contains(dt))||dt===jn})}),nn=NC(o,re,ue,fe),Jt=NC(o,he,ae,Se),bn=h.useState(g||!1),On=se(bn,2),on=On[0],Ht=On[1],Rt=p??on,sn=Zn(function(dt){p===void 0&&Ht(dt)});hn(function(){Ht(p||!1)},[p]);var Xt=h.useRef(Rt);Xt.current=Rt;var ot=h.useRef([]);ot.current=[];var Et=Zn(function(dt){var Dt;sn(dt),((Dt=ot.current[ot.current.length-1])!==null&&Dt!==void 0?Dt:Rt)!==dt&&(ot.current.push(dt),v==null||v(dt))}),mt=h.useRef(),Ie=function(){clearTimeout(mt.current)},$e=function(Dt){var zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Ie(),zn===0?Et(Dt):mt.current=setTimeout(function(){Et(Dt)},zn*1e3)};h.useEffect(function(){return Ie},[]);var we=h.useState(!1),Ae=se(we,2),et=Ae[0],nt=Ae[1];hn(function(dt){(!dt||Rt)&&nt(!0)},[Rt]);var Ft=h.useState(null),Kt=se(Ft,2),Bt=Kt[0],At=Kt[1],Tn=h.useState(null),En=se(Tn,2),In=En[0],Dn=En[1],ln=function(Dt){Dn([Dt.clientX,Dt.clientY])},fn=Tz(Rt,at,q&&In!==null?In:yt,B,W,V,ee),He=se(fn,11),Ye=He[0],Pt=He[1],gt=He[2],lt=He[3],Ze=He[4],Tt=He[5],Gt=He[6],Ke=He[7],vt=He[8],Nt=He[9],pn=He[10],ir=kz(xe,u,d,f),Bn=se(ir,2),Kr=Bn[0],yr=Bn[1],Gr=Kr.has("click"),br=yr.has("click")||yr.has("contextMenu"),Ar=Zn(function(){et||pn()}),Xr=function(){Xt.current&&q&&br&&$e(!1)};Pz(Rt,yt,at,Ar,Xr),hn(function(){Ar()},[In,B]),hn(function(){Rt&&!(W!=null&&W[B])&&Ar()},[JSON.stringify(V)]);var un=h.useMemo(function(){var dt=Rz(W,o,Nt,q);return ne(dt,U==null?void 0:U(Nt))},[Nt,U,W,o,q]);h.useImperativeHandle(r,function(){return{nativeElement:Le.current,popupElement:pt.current,forceAlign:Ar}});var ut=h.useState(0),st=se(ut,2),an=st[0],dn=st[1],_n=h.useState(0),xn=se(_n,2),Dr=xn[0],or=xn[1],qt=function(){if(G&&yt){var Dt=yt.getBoundingClientRect();dn(Dt.width),or(Dt.height)}},_r=function(){qt(),Ar()},$r=function(Dt){nt(!1),pn(),b==null||b(Dt)},vi=function(){return new Promise(function(Dt){qt(),At(function(){return Dt})})};hn(function(){Bt&&(pn(),Bt(),At(null))},[Bt]);function Rr(dt,Dt,zn,Ln){It[dt]=function(jn){var Ua;Ln==null||Ln(jn),$e(Dt,zn);for(var Zo=arguments.length,_s=new Array(Zo>1?Zo-1:0),fo=1;fo<Zo;fo++)_s[fo-1]=arguments[fo];(Ua=Ue[dt])===null||Ua===void 0||Ua.call.apply(Ua,[Ue,jn].concat(_s))}}(Gr||br)&&(It.onClick=function(dt){var Dt;Xt.current&&br?$e(!1):!Xt.current&&Gr&&(ln(dt),$e(!0));for(var zn=arguments.length,Ln=new Array(zn>1?zn-1:0),jn=1;jn<zn;jn++)Ln[jn-1]=arguments[jn];(Dt=Ue.onClick)===null||Dt===void 0||Dt.call.apply(Dt,[Ue,dt].concat(Ln))});var bs=Oz(Rt,br,yt,at,$,T,St,$e),Fa=Kr.has("hover"),Wa=yr.has("hover"),Qo,Kn;Fa&&(Rr("onMouseEnter",!0,_,function(dt){ln(dt)}),Rr("onPointerEnter",!0,_,function(dt){ln(dt)}),Qo=function(Dt){(Rt||et)&&at!==null&&at!==void 0&&at.contains(Dt.target)&&$e(!0,_)},q&&(It.onMouseMove=function(dt){var Dt;(Dt=Ue.onMouseMove)===null||Dt===void 0||Dt.call(Ue,dt)})),Wa&&(Rr("onMouseLeave",!1,C),Rr("onPointerLeave",!1,C),Kn=function(){$e(!1,C)}),Kr.has("focus")&&Rr("onFocus",!0,E),yr.has("focus")&&Rr("onBlur",!1,k),Kr.has("contextMenu")&&(It.onContextMenu=function(dt){var Dt;Xt.current&&yr.has("contextMenu")?$e(!1):(ln(dt),$e(!0)),dt.preventDefault();for(var zn=arguments.length,Ln=new Array(zn>1?zn-1:0),jn=1;jn<zn;jn++)Ln[jn-1]=arguments[jn];(Dt=Ue.onContextMenu)===null||Dt===void 0||Dt.call.apply(Dt,[Ue,dt].concat(Ln))}),le&&(It.className=ne(Ue.className,le));var Yr=h.useRef(!1);Yr.current||(Yr.current=N||Rt||et);var si=X(X({},Ue),It),yi={},Ui=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Ui.forEach(function(dt){ye[dt]&&(yi[dt]=function(){for(var Dt,zn=arguments.length,Ln=new Array(zn),jn=0;jn<zn;jn++)Ln[jn]=arguments[jn];(Dt=si[dt])===null||Dt===void 0||Dt.call.apply(Dt,[si].concat(Ln)),ye[dt].apply(ye,Ln)})});var Pi=h.cloneElement(Me,X(X({},si),yi)),Va={x:Tt,y:Gt},qa=Z?X({},Z!==!0?Z:{}):null;return h.createElement(h.Fragment,null,h.createElement(ao,{disabled:!Rt,ref:rt,onResize:_r},h.createElement(Ez,{getTriggerDOMNode:ce},Pi)),Yr.current&&h.createElement(OC.Provider,{value:ke},h.createElement(wz,{portal:e,ref:Je,prefixCls:o,popup:A,className:ne(M,un),style:j,target:yt,onMouseEnter:Qo,onMouseLeave:Kn,onPointerEnter:Qo,zIndex:L,open:Rt,keepDom:et,fresh:D,onClick:Y,onPointerDownCapture:bs,mask:$,motion:nn,maskMotion:Jt,onVisibleChanged:$r,onPrepare:vi,forceRender:N,autoDestroy:me,getPopupContainer:O,align:Nt,arrow:qa,arrowPos:Va,ready:Ye,offsetX:Pt,offsetY:gt,offsetR:lt,offsetB:Ze,onAlign:Ar,stretch:G,targetWidth:an/Ke,targetHeight:Dr/vt})))});return t}const Zf=Nz(Gf);var Mz=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],zz=function(t){var n=t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"}}},jz=function(t,n){var r=t.prefixCls;t.disabled;var i=t.visible,o=t.children,a=t.popupElement,c=t.animation,u=t.transitionName,d=t.dropdownStyle,f=t.dropdownClassName,p=t.direction,g=p===void 0?"ltr":p,v=t.placement,b=t.builtinPlacements,_=t.dropdownMatchSelectWidth,S=t.dropdownRender,C=t.dropdownAlign,E=t.getPopupContainer,k=t.empty,$=t.getTriggerDOMNode,P=t.onPopupVisibleChange,T=t.onPopupMouseEnter,O=Lt(t,Mz),N="".concat(r,"-dropdown"),I=a;S&&(I=S(a));var z=h.useMemo(function(){return b||zz(_)},[b,_]),A=c?"".concat(N,"-").concat(c):u,M=typeof _=="number",j=h.useMemo(function(){return M?null:_===!1?"minWidth":"width"},[_,M]),B=d;M&&(B=X(X({},B),{},{width:_}));var F=h.useRef(null);return h.useImperativeHandle(n,function(){return{getPopupElement:function(){var V;return(V=F.current)===null||V===void 0?void 0:V.popupElement}}}),h.createElement(Zf,Re({},O,{showAction:P?["click"]:[],hideAction:P?["click"]:[],popupPlacement:v||(g==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:z,prefixCls:N,popupTransitionName:A,popup:h.createElement("div",{onMouseEnter:T},I),ref:F,stretch:j,popupAlign:C,popupVisible:i,getPopupContainer:E,popupClassName:ne(f,K({},"".concat(N,"-empty"),k)),popupStyle:B,getTriggerDOMNode:$,onPopupVisibleChange:P}),o)},Bz=h.forwardRef(jz);function LC(e,t){var n=e.key,r;return"value"in e&&(r=e.value),n??(r!==void 0?r:"rc-index-key-".concat(t))}function e0(e){return typeof e<"u"&&!Number.isNaN(e)}function Dk(e,t){var n=e||{},r=n.label,i=n.value,o=n.options,a=n.groupLabel,c=r||(t?"children":"label");return{label:c,value:i||"value",options:o||"options",groupLabel:a||c}}function Lz(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,i=[],o=Dk(n,!1),a=o.label,c=o.value,u=o.options,d=o.groupLabel;function f(p,g){Array.isArray(p)&&p.forEach(function(v){if(g||!(u in v)){var b=v[c];i.push({key:LC(v,i.length),groupOption:g,data:v,label:v[a],value:b})}else{var _=v[d];_===void 0&&r&&(_=v.label),i.push({key:LC(v,i.length),group:!0,data:v,label:_}),f(v[u],!0)}})}return f(e,!1),i}function t0(e){var t=X({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Br(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var Az=function(t,n,r){if(!n||!n.length)return null;var i=!1,o=function c(u,d){var f=q2(d),p=f[0],g=f.slice(1);if(!p)return[u];var v=u.split(p);return i=i||v.length>1,v.reduce(function(b,_){return[].concat(We(b),We(c(_,g)))},[]).filter(Boolean)},a=o(t,n);return i?typeof r<"u"?a.slice(0,r):a:null},Iy=h.createContext(null);function Dz(e){var t=e.visible,n=e.values;if(!t)return null;var r=50;return h.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,r).map(function(i){var o=i.label,a=i.value;return["number","string"].includes(_t(o))?o:a}).join(", ")),n.length>r?", ...":null)}var Hz=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Fz=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],n0=function(t){return t==="tags"||t==="multiple"},Wz=h.forwardRef(function(e,t){var n,r=e.id,i=e.prefixCls,o=e.className,a=e.showSearch,c=e.tagRender,u=e.direction,d=e.omitDomProps,f=e.displayValues,p=e.onDisplayValuesChange,g=e.emptyOptions,v=e.notFoundContent,b=v===void 0?"Not Found":v,_=e.onClear,S=e.mode,C=e.disabled,E=e.loading,k=e.getInputElement,$=e.getRawInputElement,P=e.open,T=e.defaultOpen,O=e.onDropdownVisibleChange,N=e.activeValue,I=e.onActiveValueChange,z=e.activeDescendantId,A=e.searchValue,M=e.autoClearSearchValue,j=e.onSearch,B=e.onSearchSplit,F=e.tokenSeparators,W=e.allowClear,V=e.prefix,L=e.suffixIcon,G=e.clearIcon,U=e.OptionList,D=e.animation,q=e.transitionName,Y=e.dropdownStyle,ee=e.dropdownClassName,Z=e.dropdownMatchSelectWidth,re=e.dropdownRender,he=e.dropdownAlign,fe=e.placement,ue=e.builtinPlacements,Se=e.getPopupContainer,ae=e.showAction,le=ae===void 0?[]:ae,ce=e.onFocus,ye=e.onBlur,me=e.onKeyUp,de=e.onKeyDown,be=e.onMouseDown,xe=Lt(e,Hz),Te=n0(S),ze=(a!==void 0?a:Te)||S==="combobox",Ee=X({},xe);Fz.forEach(function(ut){delete Ee[ut]}),d==null||d.forEach(function(ut){delete Ee[ut]});var ke=h.useState(!1),je=se(ke,2),Oe=je[0],Qe=je[1];h.useEffect(function(){Qe(Oy())},[]);var at=h.useRef(null),$t=h.useRef(null),pt=h.useRef(null),Je=h.useRef(null),ft=h.useRef(null),Xe=h.useRef(!1),yt=G8(),tt=se(yt,3),Le=tt[0],rt=tt[1],Me=tt[2];h.useImperativeHandle(t,function(){var ut,st;return{focus:(ut=Je.current)===null||ut===void 0?void 0:ut.focus,blur:(st=Je.current)===null||st===void 0?void 0:st.blur,scrollTo:function(dn){var _n;return(_n=ft.current)===null||_n===void 0?void 0:_n.scrollTo(dn)},nativeElement:at.current||$t.current}});var Ue=h.useMemo(function(){var ut;if(S!=="combobox")return A;var st=(ut=f[0])===null||ut===void 0?void 0:ut.value;return typeof st=="string"||typeof st=="number"?String(st):""},[A,S,f]),It=S==="combobox"&&typeof k=="function"&&k()||null,St=typeof $=="function"&&$(),nn=Xo($t,St==null||(n=St.props)===null||n===void 0?void 0:n.ref),Jt=h.useState(!1),bn=se(Jt,2),On=bn[0],on=bn[1];hn(function(){on(!0)},[]);var Ht=er(!1,{defaultValue:T,value:P}),Rt=se(Ht,2),sn=Rt[0],Xt=Rt[1],ot=On?sn:!1,Et=!b&&g;(C||Et&&ot&&S==="combobox")&&(ot=!1);var mt=Et?!1:ot,Ie=h.useCallback(function(ut){var st=ut!==void 0?ut:!ot;C||(Xt(st),ot!==st&&(O==null||O(st)))},[C,ot,Xt,O]),$e=h.useMemo(function(){return(F||[]).some(function(ut){return[`
222
- `,`\r
223
- `].includes(ut)})},[F]),we=h.useContext(Iy)||{},Ae=we.maxCount,et=we.rawValues,nt=function(st,an,dn){if(!(Te&&e0(Ae)&&(et==null?void 0:et.size)>=Ae)){var _n=!0,xn=st;I==null||I(null);var Dr=Az(st,F,e0(Ae)?Ae-et.size:void 0),or=dn?null:Dr;return S!=="combobox"&&or&&(xn="",B==null||B(or),Ie(!1),_n=!1),j&&Ue!==xn&&j(xn,{source:an?"typing":"effect"}),_n}},Ft=function(st){!st||!st.trim()||j(st,{source:"submit"})};h.useEffect(function(){!ot&&!Te&&S!=="combobox"&&nt("",!1,!1)},[ot]),h.useEffect(function(){sn&&C&&Xt(!1),C&&!Xe.current&&rt(!1)},[C]);var Kt=Nk(),Bt=se(Kt,2),At=Bt[0],Tn=Bt[1],En=h.useRef(!1),In=function(st){var an=At(),dn=st.key,_n=dn==="Enter";if(_n&&(S!=="combobox"&&st.preventDefault(),ot||Ie(!0)),Tn(!!Ue),dn==="Backspace"&&!an&&Te&&!Ue&&f.length){for(var xn=We(f),Dr=null,or=xn.length-1;or>=0;or-=1){var qt=xn[or];if(!qt.disabled){xn.splice(or,1),Dr=qt;break}}Dr&&p(xn,{type:"remove",values:[Dr]})}for(var _r=arguments.length,$r=new Array(_r>1?_r-1:0),vi=1;vi<_r;vi++)$r[vi-1]=arguments[vi];if(ot&&(!_n||!En.current)){var Rr;_n&&(En.current=!0),(Rr=ft.current)===null||Rr===void 0||Rr.onKeyDown.apply(Rr,[st].concat($r))}de==null||de.apply(void 0,[st].concat($r))},Dn=function(st){for(var an=arguments.length,dn=new Array(an>1?an-1:0),_n=1;_n<an;_n++)dn[_n-1]=arguments[_n];if(ot){var xn;(xn=ft.current)===null||xn===void 0||xn.onKeyUp.apply(xn,[st].concat(dn))}st.key==="Enter"&&(En.current=!1),me==null||me.apply(void 0,[st].concat(dn))},ln=function(st){var an=f.filter(function(dn){return dn!==st});p(an,{type:"remove",values:[st]})},fn=function(){En.current=!1},He=h.useRef(!1),Ye=function(){rt(!0),C||(ce&&!He.current&&ce.apply(void 0,arguments),le.includes("focus")&&Ie(!0)),He.current=!0},Pt=function(){Xe.current=!0,rt(!1,function(){He.current=!1,Xe.current=!1,Ie(!1)}),!C&&(Ue&&(S==="tags"?j(Ue,{source:"submit"}):S==="multiple"&&j("",{source:"blur"})),ye&&ye.apply(void 0,arguments))},gt=[];h.useEffect(function(){return function(){gt.forEach(function(ut){return clearTimeout(ut)}),gt.splice(0,gt.length)}},[]);var lt=function(st){var an,dn=st.target,_n=(an=pt.current)===null||an===void 0?void 0:an.getPopupElement();if(_n&&_n.contains(dn)){var xn=setTimeout(function(){var _r=gt.indexOf(xn);if(_r!==-1&&gt.splice(_r,1),Me(),!Oe&&!_n.contains(document.activeElement)){var $r;($r=Je.current)===null||$r===void 0||$r.focus()}});gt.push(xn)}for(var Dr=arguments.length,or=new Array(Dr>1?Dr-1:0),qt=1;qt<Dr;qt++)or[qt-1]=arguments[qt];be==null||be.apply(void 0,[st].concat(or))},Ze=h.useState({}),Tt=se(Ze,2),Gt=Tt[1];function Ke(){Gt({})}var vt;St&&(vt=function(st){Ie(st)}),X8(function(){var ut;return[at.current,(ut=pt.current)===null||ut===void 0?void 0:ut.getPopupElement()]},mt,Ie,!!St);var Nt=h.useMemo(function(){return X(X({},e),{},{notFoundContent:b,open:ot,triggerOpen:mt,id:r,showSearch:ze,multiple:Te,toggleOpen:Ie})},[e,b,mt,ot,r,ze,Te,Ie]),pn=!!L||E,ir;pn&&(ir=h.createElement(Qf,{className:ne("".concat(i,"-arrow"),K({},"".concat(i,"-arrow-loading"),E)),customizeIcon:L,customizeIconProps:{loading:E,searchValue:Ue,open:ot,focused:Le,showSearch:ze}}));var Bn=function(){var st;_==null||_(),(st=Je.current)===null||st===void 0||st.focus(),p([],{type:"clear",values:f}),nt("",!1,!1)},Kr=U8(i,Bn,f,W,G,C,Ue,S),yr=Kr.allowClear,Gr=Kr.clearIcon,br=h.createElement(U,{ref:ft}),Ar=ne(i,o,K(K(K(K(K(K(K(K(K(K({},"".concat(i,"-focused"),Le),"".concat(i,"-multiple"),Te),"".concat(i,"-single"),!Te),"".concat(i,"-allow-clear"),W),"".concat(i,"-show-arrow"),pn),"".concat(i,"-disabled"),C),"".concat(i,"-loading"),E),"".concat(i,"-open"),ot),"".concat(i,"-customize-input"),It),"".concat(i,"-show-search"),ze)),Xr=h.createElement(Bz,{ref:pt,disabled:C,prefixCls:i,visible:mt,popupElement:br,animation:D,transitionName:q,dropdownStyle:Y,dropdownClassName:ee,direction:u,dropdownMatchSelectWidth:Z,dropdownRender:re,dropdownAlign:he,placement:fe,builtinPlacements:ue,getPopupContainer:Se,empty:g,getTriggerDOMNode:function(st){return $t.current||st},onPopupVisibleChange:vt,onPopupMouseEnter:Ke},St?h.cloneElement(St,{ref:nn}):h.createElement(_z,Re({},e,{domRef:$t,prefixCls:i,inputElement:It,ref:Je,id:r,prefix:V,showSearch:ze,autoClearSearchValue:M,mode:S,activeDescendantId:z,tagRender:c,values:f,open:ot,onToggleOpen:Ie,activeValue:N,searchValue:Ue,onSearch:nt,onSearchSubmit:Ft,onRemove:ln,tokenWithEnter:$e,onInputBlur:fn}))),un;return St?un=Xr:un=h.createElement("div",Re({className:Ar},Ee,{ref:at,onMouseDown:lt,onKeyDown:In,onKeyUp:Dn,onFocus:Ye,onBlur:Pt}),h.createElement(Dz,{visible:Le&&!ot,values:f}),Xr,ir,yr&&Gr),h.createElement(Ik.Provider,{value:Nt},un)}),Ny=function(){return null};Ny.isSelectOptGroup=!0;var My=function(){return null};My.isSelectOption=!0;var Hk=h.forwardRef(function(e,t){var n=e.height,r=e.offsetY,i=e.offsetX,o=e.children,a=e.prefixCls,c=e.onInnerResize,u=e.innerProps,d=e.rtl,f=e.extra,p={},g={display:"flex",flexDirection:"column"};return r!==void 0&&(p={height:n,position:"relative",overflow:"hidden"},g=X(X({},g),{},K(K(K(K(K({transform:"translateY(".concat(r,"px)")},d?"marginRight":"marginLeft",-i),"position","absolute"),"left",0),"right",0),"top",0))),h.createElement("div",{style:p},h.createElement(ao,{onResize:function(b){var _=b.offsetHeight;_&&c&&c()}},h.createElement("div",Re({style:g,className:ne(K({},"".concat(a,"-holder-inner"),a)),ref:t},u),o,f)))});Hk.displayName="Filler";function Vz(e){var t=e.children,n=e.setRef,r=h.useCallback(function(i){n(i)},[]);return h.cloneElement(t,{ref:r})}function qz(e,t,n,r,i,o,a,c){var u=c.getKey;return e.slice(t,n+1).map(function(d,f){var p=t+f,g=a(d,p,{style:{width:r},offsetX:i}),v=u(d);return h.createElement(Vz,{key:v,setRef:function(_){return o(d,_)}},g)})}function Uz(e,t,n){var r=e.length,i=t.length,o,a;if(r===0&&i===0)return null;r<i?(o=e,a=t):(o=t,a=e);var c={__EMPTY_ITEM__:!0};function u(b){return b!==void 0?n(b):c}for(var d=null,f=Math.abs(r-i)!==1,p=0;p<a.length;p+=1){var g=u(o[p]),v=u(a[p]);if(g!==v){d=p,f=f||g!==u(a[p+1]);break}}return d===null?null:{index:d,multiple:f}}function Kz(e,t,n){var r=h.useState(e),i=se(r,2),o=i[0],a=i[1],c=h.useState(null),u=se(c,2),d=u[0],f=u[1];return h.useEffect(function(){var p=Uz(o||[],e||[],t);(p==null?void 0:p.index)!==void 0&&f(e[p.index]),a(e)},[e]),[d]}var AC=(typeof navigator>"u"?"undefined":_t(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const Fk=(function(e,t,n,r){var i=h.useRef(!1),o=h.useRef(null);function a(){clearTimeout(o.current),i.current=!0,o.current=setTimeout(function(){i.current=!1},50)}var c=h.useRef({top:e,bottom:t,left:n,right:r});return c.current.top=e,c.current.bottom=t,c.current.left=n,c.current.right=r,function(u,d){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,p=u?d<0&&c.current.left||d>0&&c.current.right:d<0&&c.current.top||d>0&&c.current.bottom;return f&&p?(clearTimeout(o.current),i.current=!1):(!p||i.current)&&a(),!i.current&&p}});function Gz(e,t,n,r,i,o,a){var c=h.useRef(0),u=h.useRef(null),d=h.useRef(null),f=h.useRef(!1),p=Fk(t,n,r,i);function g(E,k){if(Rn.cancel(u.current),!p(!1,k)){var $=E;if(!$._virtualHandled)$._virtualHandled=!0;else return;c.current+=k,d.current=k,AC||$.preventDefault(),u.current=Rn(function(){var P=f.current?10:1;a(c.current*P,!1),c.current=0})}}function v(E,k){a(k,!0),AC||E.preventDefault()}var b=h.useRef(null),_=h.useRef(null);function S(E){if(e){Rn.cancel(_.current),_.current=Rn(function(){b.current=null},2);var k=E.deltaX,$=E.deltaY,P=E.shiftKey,T=k,O=$;(b.current==="sx"||!b.current&&P&&$&&!k)&&(T=$,O=0,b.current="sx");var N=Math.abs(T),I=Math.abs(O);b.current===null&&(b.current=o&&N>I?"x":"y"),b.current==="y"?g(E,O):v(E,T)}}function C(E){e&&(f.current=E.detail===d.current)}return[S,C]}function Xz(e,t,n,r){var i=h.useMemo(function(){return[new Map,[]]},[e,n.id,r]),o=se(i,2),a=o[0],c=o[1],u=function(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f,g=a.get(f),v=a.get(p);if(g===void 0||v===void 0)for(var b=e.length,_=c.length;_<b;_+=1){var S,C=e[_],E=t(C);a.set(E,_);var k=(S=n.get(E))!==null&&S!==void 0?S:r;if(c[_]=(c[_-1]||0)+k,E===f&&(g=_),E===p&&(v=_),g!==void 0&&v!==void 0)break}return{top:c[g-1]||0,bottom:c[v]}};return u}var Yz=(function(){function e(){gr(this,e),K(this,"maps",void 0),K(this,"id",0),K(this,"diffRecords",new Map),this.maps=Object.create(null)}return vr(e,[{key:"set",value:function(n,r){this.diffRecords.set(n,this.maps[n]),this.maps[n]=r,this.id+=1}},{key:"get",value:function(n){return this.maps[n]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),e})();function DC(e){var t=parseFloat(e);return isNaN(t)?0:t}function Jz(e,t,n){var r=h.useState(0),i=se(r,2),o=i[0],a=i[1],c=h.useRef(new Map),u=h.useRef(new Yz),d=h.useRef(0);function f(){d.current+=1}function p(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;f();var b=function(){var C=!1;c.current.forEach(function(E,k){if(E&&E.offsetParent){var $=E.offsetHeight,P=getComputedStyle(E),T=P.marginTop,O=P.marginBottom,N=DC(T),I=DC(O),z=$+N+I;u.current.get(k)!==z&&(u.current.set(k,z),C=!0)}}),C&&a(function(E){return E+1})};if(v)b();else{d.current+=1;var _=d.current;Promise.resolve().then(function(){_===d.current&&b()})}}function g(v,b){var _=e(v);c.current.get(_),b?(c.current.set(_,b),p()):c.current.delete(_)}return h.useEffect(function(){return f},[]),[g,p,u.current,o]}var HC=14/15;function Qz(e,t,n){var r=h.useRef(!1),i=h.useRef(0),o=h.useRef(0),a=h.useRef(null),c=h.useRef(null),u,d=function(v){if(r.current){var b=Math.ceil(v.touches[0].pageX),_=Math.ceil(v.touches[0].pageY),S=i.current-b,C=o.current-_,E=Math.abs(S)>Math.abs(C);E?i.current=b:o.current=_;var k=n(E,E?S:C,!1,v);k&&v.preventDefault(),clearInterval(c.current),k&&(c.current=setInterval(function(){E?S*=HC:C*=HC;var $=Math.floor(E?S:C);(!n(E,$,!0)||Math.abs($)<=.1)&&clearInterval(c.current)},16))}},f=function(){r.current=!1,u()},p=function(v){u(),v.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(v.touches[0].pageX),o.current=Math.ceil(v.touches[0].pageY),a.current=v.target,a.current.addEventListener("touchmove",d,{passive:!1}),a.current.addEventListener("touchend",f,{passive:!0}))};u=function(){a.current&&(a.current.removeEventListener("touchmove",d),a.current.removeEventListener("touchend",f))},hn(function(){return e&&t.current.addEventListener("touchstart",p,{passive:!0}),function(){var g;(g=t.current)===null||g===void 0||g.removeEventListener("touchstart",p),u(),clearInterval(c.current)}},[e])}function FC(e){return Math.floor(Math.pow(e,.5))}function r0(e,t){var n="touches"in e?e.touches[0]:e;return n[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function Zz(e,t,n){h.useEffect(function(){var r=t.current;if(e&&r){var i=!1,o,a,c=function(){Rn.cancel(o)},u=function g(){c(),o=Rn(function(){n(a),g()})},d=function(){i=!1,c()},f=function(v){if(!(v.target.draggable||v.button!==0)){var b=v;b._virtualHandled||(b._virtualHandled=!0,i=!0)}},p=function(v){if(i){var b=r0(v,!1),_=r.getBoundingClientRect(),S=_.top,C=_.bottom;if(b<=S){var E=S-b;a=-FC(E),u()}else if(b>=C){var k=b-C;a=FC(k),u()}else c()}};return r.addEventListener("mousedown",f),r.ownerDocument.addEventListener("mouseup",d),r.ownerDocument.addEventListener("mousemove",p),r.ownerDocument.addEventListener("dragend",d),function(){r.removeEventListener("mousedown",f),r.ownerDocument.removeEventListener("mouseup",d),r.ownerDocument.removeEventListener("mousemove",p),r.ownerDocument.removeEventListener("dragend",d),c()}}},[e])}var ej=10;function tj(e,t,n,r,i,o,a,c){var u=h.useRef(),d=h.useState(null),f=se(d,2),p=f[0],g=f[1];return hn(function(){if(p&&p.times<ej){if(!e.current){g(function(G){return X({},G)});return}o();var v=p.targetAlign,b=p.originAlign,_=p.index,S=p.offset,C=e.current.clientHeight,E=!1,k=v,$=null;if(C){for(var P=v||b,T=0,O=0,N=0,I=Math.min(t.length-1,_),z=0;z<=I;z+=1){var A=i(t[z]);O=T;var M=n.get(A);N=O+(M===void 0?r:M),T=N}for(var j=P==="top"?S:C-S,B=I;B>=0;B-=1){var F=i(t[B]),W=n.get(F);if(W===void 0){E=!0;break}if(j-=W,j<=0)break}switch(P){case"top":$=O-S;break;case"bottom":$=N-C+S;break;default:{var V=e.current.scrollTop,L=V+C;O<V?k="top":N>L&&(k="bottom")}}$!==null&&a($),$!==p.lastTop&&(E=!0)}E&&g(X(X({},p),{},{times:p.times+1,targetAlign:k,lastTop:$}))}},[p,e.current]),function(v){if(v==null){c();return}if(Rn.cancel(u.current),typeof v=="number")a(v);else if(v&&_t(v)==="object"){var b,_=v.align;"index"in v?b=v.index:b=t.findIndex(function(E){return i(E)===v.key});var S=v.offset,C=S===void 0?0:S;g({times:0,index:b,offset:C,originAlign:_})}}}var WC=h.forwardRef(function(e,t){var n=e.prefixCls,r=e.rtl,i=e.scrollOffset,o=e.scrollRange,a=e.onStartMove,c=e.onStopMove,u=e.onScroll,d=e.horizontal,f=e.spinSize,p=e.containerSize,g=e.style,v=e.thumbStyle,b=e.showScrollBar,_=h.useState(!1),S=se(_,2),C=S[0],E=S[1],k=h.useState(null),$=se(k,2),P=$[0],T=$[1],O=h.useState(null),N=se(O,2),I=N[0],z=N[1],A=!r,M=h.useRef(),j=h.useRef(),B=h.useState(b),F=se(B,2),W=F[0],V=F[1],L=h.useRef(),G=function(){b===!0||b===!1||(clearTimeout(L.current),V(!0),L.current=setTimeout(function(){V(!1)},3e3))},U=o-p||0,D=p-f||0,q=h.useMemo(function(){if(i===0||U===0)return 0;var ae=i/U;return ae*D},[i,U,D]),Y=function(le){le.stopPropagation(),le.preventDefault()},ee=h.useRef({top:q,dragging:C,pageY:P,startTop:I});ee.current={top:q,dragging:C,pageY:P,startTop:I};var Z=function(le){E(!0),T(r0(le,d)),z(ee.current.top),a(),le.stopPropagation(),le.preventDefault()};h.useEffect(function(){var ae=function(me){me.preventDefault()},le=M.current,ce=j.current;return le.addEventListener("touchstart",ae,{passive:!1}),ce.addEventListener("touchstart",Z,{passive:!1}),function(){le.removeEventListener("touchstart",ae),ce.removeEventListener("touchstart",Z)}},[]);var re=h.useRef();re.current=U;var he=h.useRef();he.current=D,h.useEffect(function(){if(C){var ae,le=function(me){var de=ee.current,be=de.dragging,xe=de.pageY,Te=de.startTop;Rn.cancel(ae);var ze=M.current.getBoundingClientRect(),Ee=p/(d?ze.width:ze.height);if(be){var ke=(r0(me,d)-xe)*Ee,je=Te;!A&&d?je-=ke:je+=ke;var Oe=re.current,Qe=he.current,at=Qe?je/Qe:0,$t=Math.ceil(at*Oe);$t=Math.max($t,0),$t=Math.min($t,Oe),ae=Rn(function(){u($t,d)})}},ce=function(){E(!1),c()};return window.addEventListener("mousemove",le,{passive:!0}),window.addEventListener("touchmove",le,{passive:!0}),window.addEventListener("mouseup",ce,{passive:!0}),window.addEventListener("touchend",ce,{passive:!0}),function(){window.removeEventListener("mousemove",le),window.removeEventListener("touchmove",le),window.removeEventListener("mouseup",ce),window.removeEventListener("touchend",ce),Rn.cancel(ae)}}},[C]),h.useEffect(function(){return G(),function(){clearTimeout(L.current)}},[i]),h.useImperativeHandle(t,function(){return{delayHidden:G}});var fe="".concat(n,"-scrollbar"),ue={position:"absolute",visibility:W?null:"hidden"},Se={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return d?(Object.assign(ue,{height:8,left:0,right:0,bottom:0}),Object.assign(Se,K({height:"100%",width:f},A?"left":"right",q))):(Object.assign(ue,K({width:8,top:0,bottom:0},A?"right":"left",0)),Object.assign(Se,{width:"100%",height:f,top:q})),h.createElement("div",{ref:M,className:ne(fe,K(K(K({},"".concat(fe,"-horizontal"),d),"".concat(fe,"-vertical"),!d),"".concat(fe,"-visible"),W)),style:X(X({},ue),g),onMouseDown:Y,onMouseMove:G},h.createElement("div",{ref:j,className:ne("".concat(fe,"-thumb"),K({},"".concat(fe,"-thumb-moving"),C)),style:X(X({},Se),v),onMouseDown:Z}))}),nj=20;function VC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,nj),Math.floor(n)}var rj=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],ij=[],oj={overflowY:"auto",overflowAnchor:"none"};function sj(e,t){var n=e.prefixCls,r=n===void 0?"rc-virtual-list":n,i=e.className,o=e.height,a=e.itemHeight,c=e.fullHeight,u=c===void 0?!0:c,d=e.style,f=e.data,p=e.children,g=e.itemKey,v=e.virtual,b=e.direction,_=e.scrollWidth,S=e.component,C=S===void 0?"div":S,E=e.onScroll,k=e.onVirtualScroll,$=e.onVisibleChange,P=e.innerProps,T=e.extraRender,O=e.styles,N=e.showScrollBar,I=N===void 0?"optional":N,z=Lt(e,rj),A=h.useCallback(function(He){return typeof g=="function"?g(He):He==null?void 0:He[g]},[g]),M=Jz(A),j=se(M,4),B=j[0],F=j[1],W=j[2],V=j[3],L=!!(v!==!1&&o&&a),G=h.useMemo(function(){return Object.values(W.maps).reduce(function(He,Ye){return He+Ye},0)},[W.id,W.maps]),U=L&&f&&(Math.max(a*f.length,G)>o||!!_),D=b==="rtl",q=ne(r,K({},"".concat(r,"-rtl"),D),i),Y=f||ij,ee=h.useRef(),Z=h.useRef(),re=h.useRef(),he=h.useState(0),fe=se(he,2),ue=fe[0],Se=fe[1],ae=h.useState(0),le=se(ae,2),ce=le[0],ye=le[1],me=h.useState(!1),de=se(me,2),be=de[0],xe=de[1],Te=function(){xe(!0)},ze=function(){xe(!1)},Ee={getKey:A};function ke(He){Se(function(Ye){var Pt;typeof He=="function"?Pt=He(Ye):Pt=He;var gt=on(Pt);return ee.current.scrollTop=gt,gt})}var je=h.useRef({start:0,end:Y.length}),Oe=h.useRef(),Qe=Kz(Y,A),at=se(Qe,1),$t=at[0];Oe.current=$t;var pt=h.useMemo(function(){if(!L)return{scrollHeight:void 0,start:0,end:Y.length-1,offset:void 0};if(!U){var He;return{scrollHeight:((He=Z.current)===null||He===void 0?void 0:He.offsetHeight)||0,start:0,end:Y.length-1,offset:void 0}}for(var Ye=0,Pt,gt,lt,Ze=Y.length,Tt=0;Tt<Ze;Tt+=1){var Gt=Y[Tt],Ke=A(Gt),vt=W.get(Ke),Nt=Ye+(vt===void 0?a:vt);Nt>=ue&&Pt===void 0&&(Pt=Tt,gt=Ye),Nt>ue+o&&lt===void 0&&(lt=Tt),Ye=Nt}return Pt===void 0&&(Pt=0,gt=0,lt=Math.ceil(o/a)),lt===void 0&&(lt=Y.length-1),lt=Math.min(lt+1,Y.length-1),{scrollHeight:Ye,start:Pt,end:lt,offset:gt}},[U,L,ue,Y,V,o]),Je=pt.scrollHeight,ft=pt.start,Xe=pt.end,yt=pt.offset;je.current.start=ft,je.current.end=Xe,h.useLayoutEffect(function(){var He=W.getRecord();if(He.size===1){var Ye=Array.from(He.keys())[0],Pt=He.get(Ye),gt=Y[ft];if(gt&&Pt===void 0){var lt=A(gt);if(lt===Ye){var Ze=W.get(Ye),Tt=Ze-a;ke(function(Gt){return Gt+Tt})}}}W.resetRecord()},[Je]);var tt=h.useState({width:0,height:o}),Le=se(tt,2),rt=Le[0],Me=Le[1],Ue=function(Ye){Me({width:Ye.offsetWidth,height:Ye.offsetHeight})},It=h.useRef(),St=h.useRef(),nn=h.useMemo(function(){return VC(rt.width,_)},[rt.width,_]),Jt=h.useMemo(function(){return VC(rt.height,Je)},[rt.height,Je]),bn=Je-o,On=h.useRef(bn);On.current=bn;function on(He){var Ye=He;return Number.isNaN(On.current)||(Ye=Math.min(Ye,On.current)),Ye=Math.max(Ye,0),Ye}var Ht=ue<=0,Rt=ue>=bn,sn=ce<=0,Xt=ce>=_,ot=Fk(Ht,Rt,sn,Xt),Et=function(){return{x:D?-ce:ce,y:ue}},mt=h.useRef(Et()),Ie=Zn(function(He){if(k){var Ye=X(X({},Et()),He);(mt.current.x!==Ye.x||mt.current.y!==Ye.y)&&(k(Ye),mt.current=Ye)}});function $e(He,Ye){var Pt=He;Ye?(Xs.flushSync(function(){ye(Pt)}),Ie()):ke(Pt)}function we(He){var Ye=He.currentTarget.scrollTop;Ye!==ue&&ke(Ye),E==null||E(He),Ie()}var Ae=function(Ye){var Pt=Ye,gt=_?_-rt.width:0;return Pt=Math.max(Pt,0),Pt=Math.min(Pt,gt),Pt},et=Zn(function(He,Ye){Ye?(Xs.flushSync(function(){ye(function(Pt){var gt=Pt+(D?-He:He);return Ae(gt)})}),Ie()):ke(function(Pt){var gt=Pt+He;return gt})}),nt=Gz(L,Ht,Rt,sn,Xt,!!_,et),Ft=se(nt,2),Kt=Ft[0],Bt=Ft[1];Qz(L,ee,function(He,Ye,Pt,gt){var lt=gt;return ot(He,Ye,Pt)?!1:!lt||!lt._virtualHandled?(lt&&(lt._virtualHandled=!0),Kt({preventDefault:function(){},deltaX:He?Ye:0,deltaY:He?0:Ye}),!0):!1}),Zz(U,ee,function(He){ke(function(Ye){return Ye+He})}),hn(function(){function He(Pt){var gt=Ht&&Pt.detail<0,lt=Rt&&Pt.detail>0;L&&!gt&&!lt&&Pt.preventDefault()}var Ye=ee.current;return Ye.addEventListener("wheel",Kt,{passive:!1}),Ye.addEventListener("DOMMouseScroll",Bt,{passive:!0}),Ye.addEventListener("MozMousePixelScroll",He,{passive:!1}),function(){Ye.removeEventListener("wheel",Kt),Ye.removeEventListener("DOMMouseScroll",Bt),Ye.removeEventListener("MozMousePixelScroll",He)}},[L,Ht,Rt]),hn(function(){if(_){var He=Ae(ce);ye(He),Ie({x:He})}},[rt.width,_]);var At=function(){var Ye,Pt;(Ye=It.current)===null||Ye===void 0||Ye.delayHidden(),(Pt=St.current)===null||Pt===void 0||Pt.delayHidden()},Tn=tj(ee,Y,W,a,A,function(){return F(!0)},ke,At);h.useImperativeHandle(t,function(){return{nativeElement:re.current,getScrollInfo:Et,scrollTo:function(Ye){function Pt(gt){return gt&&_t(gt)==="object"&&("left"in gt||"top"in gt)}Pt(Ye)?(Ye.left!==void 0&&ye(Ae(Ye.left)),Tn(Ye.top)):Tn(Ye)}}}),hn(function(){if($){var He=Y.slice(ft,Xe+1);$(He,Y)}},[ft,Xe,Y]);var En=Xz(Y,A,W,a),In=T==null?void 0:T({start:ft,end:Xe,virtual:U,offsetX:ce,offsetY:yt,rtl:D,getSize:En}),Dn=qz(Y,ft,Xe,_,ce,B,p,Ee),ln=null;o&&(ln=X(K({},u?"height":"maxHeight",o),oj),L&&(ln.overflowY="hidden",_&&(ln.overflowX="hidden"),be&&(ln.pointerEvents="none")));var fn={};return D&&(fn.dir="rtl"),h.createElement("div",Re({ref:re,style:X(X({},d),{},{position:"relative"}),className:q},fn,z),h.createElement(ao,{onResize:Ue},h.createElement(C,{className:"".concat(r,"-holder"),style:ln,ref:ee,onScroll:we,onMouseEnter:At},h.createElement(Hk,{prefixCls:r,height:Je,offsetX:ce,offsetY:yt,scrollWidth:_,onInnerResize:F,ref:Z,innerProps:P,rtl:D,extra:In},Dn))),U&&Je>o&&h.createElement(WC,{ref:It,prefixCls:r,scrollOffset:ue,scrollRange:Je,rtl:D,onScroll:$e,onStartMove:Te,onStopMove:ze,spinSize:Jt,containerSize:rt.height,style:O==null?void 0:O.verticalScrollBar,thumbStyle:O==null?void 0:O.verticalScrollBarThumb,showScrollBar:I}),U&&_>rt.width&&h.createElement(WC,{ref:St,prefixCls:r,scrollOffset:ce,scrollRange:_,rtl:D,onScroll:$e,onStartMove:Te,onStopMove:ze,spinSize:nn,containerSize:rt.width,horizontal:!0,style:O==null?void 0:O.horizontalScrollBar,thumbStyle:O==null?void 0:O.horizontalScrollBarThumb,showScrollBar:I}))}var Wk=h.forwardRef(sj);Wk.displayName="List";function aj(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var lj=["disabled","title","children","style","className"];function qC(e){return typeof e=="string"||typeof e=="number"}var cj=function(t,n){var r=K8(),i=r.prefixCls,o=r.id,a=r.open,c=r.multiple,u=r.mode,d=r.searchValue,f=r.toggleOpen,p=r.notFoundContent,g=r.onPopupScroll,v=h.useContext(Iy),b=v.maxCount,_=v.flattenOptions,S=v.onActiveValue,C=v.defaultActiveFirstOption,E=v.onSelect,k=v.menuItemSelectedIcon,$=v.rawValues,P=v.fieldNames,T=v.virtual,O=v.direction,N=v.listHeight,I=v.listItemHeight,z=v.optionRender,A="".concat(i,"-item"),M=Nu(function(){return _},[a,_],function(ae,le){return le[0]&&ae[1]!==le[1]}),j=h.useRef(null),B=h.useMemo(function(){return c&&e0(b)&&($==null?void 0:$.size)>=b},[c,b,$==null?void 0:$.size]),F=function(le){le.preventDefault()},W=function(le){var ce;(ce=j.current)===null||ce===void 0||ce.scrollTo(typeof le=="number"?{index:le}:le)},V=h.useCallback(function(ae){return u==="combobox"?!1:$.has(ae)},[u,We($).toString(),$.size]),L=function(le){for(var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ye=M.length,me=0;me<ye;me+=1){var de=(le+me*ce+ye)%ye,be=M[de]||{},xe=be.group,Te=be.data;if(!xe&&!(Te!=null&&Te.disabled)&&(V(Te.value)||!B))return de}return-1},G=h.useState(function(){return L(0)}),U=se(G,2),D=U[0],q=U[1],Y=function(le){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;q(le);var ye={source:ce?"keyboard":"mouse"},me=M[le];if(!me){S(null,-1,ye);return}S(me.value,le,ye)};h.useEffect(function(){Y(C!==!1?L(0):-1)},[M.length,d]);var ee=h.useCallback(function(ae){return u==="combobox"?String(ae).toLowerCase()===d.toLowerCase():$.has(ae)},[u,d,We($).toString(),$.size]);h.useEffect(function(){var ae=setTimeout(function(){if(!c&&a&&$.size===1){var ce=Array.from($)[0],ye=M.findIndex(function(me){var de=me.data;return d?String(de.value).startsWith(d):de.value===ce});ye!==-1&&(Y(ye),W(ye))}});if(a){var le;(le=j.current)===null||le===void 0||le.scrollTo(void 0)}return function(){return clearTimeout(ae)}},[a,d]);var Z=function(le){le!==void 0&&E(le,{selected:!$.has(le)}),c||f(!1)};if(h.useImperativeHandle(n,function(){return{onKeyDown:function(le){var ce=le.which,ye=le.ctrlKey;switch(ce){case Ge.N:case Ge.P:case Ge.UP:case Ge.DOWN:{var me=0;if(ce===Ge.UP?me=-1:ce===Ge.DOWN?me=1:aj()&&ye&&(ce===Ge.N?me=1:ce===Ge.P&&(me=-1)),me!==0){var de=L(D+me,me);W(de),Y(de,!0)}break}case Ge.TAB:case Ge.ENTER:{var be,xe=M[D];xe&&!(xe!=null&&(be=xe.data)!==null&&be!==void 0&&be.disabled)&&!B?Z(xe.value):Z(void 0),a&&le.preventDefault();break}case Ge.ESC:f(!1),a&&le.stopPropagation()}},onKeyUp:function(){},scrollTo:function(le){W(le)}}}),M.length===0)return h.createElement("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(A,"-empty"),onMouseDown:F},p);var re=Object.keys(P).map(function(ae){return P[ae]}),he=function(le){return le.label};function fe(ae,le){var ce=ae.group;return{role:ce?"presentation":"option",id:"".concat(o,"_list_").concat(le)}}var ue=function(le){var ce=M[le];if(!ce)return null;var ye=ce.data||{},me=ye.value,de=ce.group,be=qi(ye,!0),xe=he(ce);return ce?h.createElement("div",Re({"aria-label":typeof xe=="string"&&!de?xe:null},be,{key:le},fe(ce,le),{"aria-selected":ee(me)}),me):null},Se={role:"listbox",id:"".concat(o,"_list")};return h.createElement(h.Fragment,null,T&&h.createElement("div",Re({},Se,{style:{height:0,width:0,overflow:"hidden"}}),ue(D-1),ue(D),ue(D+1)),h.createElement(Wk,{itemKey:"key",ref:j,data:M,height:N,itemHeight:I,fullHeight:!1,onMouseDown:F,onScroll:g,virtual:T,direction:O,innerProps:T?null:Se},function(ae,le){var ce=ae.group,ye=ae.groupOption,me=ae.data,de=ae.label,be=ae.value,xe=me.key;if(ce){var Te,ze=(Te=me.title)!==null&&Te!==void 0?Te:qC(de)?de.toString():void 0;return h.createElement("div",{className:ne(A,"".concat(A,"-group"),me.className),title:ze},de!==void 0?de:xe)}var Ee=me.disabled,ke=me.title;me.children;var je=me.style,Oe=me.className,Qe=Lt(me,lj),at=dr(Qe,re),$t=V(be),pt=Ee||!$t&&B,Je="".concat(A,"-option"),ft=ne(A,Je,Oe,K(K(K(K({},"".concat(Je,"-grouped"),ye),"".concat(Je,"-active"),D===le&&!pt),"".concat(Je,"-disabled"),pt),"".concat(Je,"-selected"),$t)),Xe=he(ae),yt=!k||typeof k=="function"||$t,tt=typeof Xe=="number"?Xe:Xe||be,Le=qC(tt)?tt.toString():void 0;return ke!==void 0&&(Le=ke),h.createElement("div",Re({},qi(at),T?{}:fe(ae,le),{"aria-selected":ee(be),className:ft,title:Le,onMouseMove:function(){D===le||pt||Y(le)},onClick:function(){pt||Z(be)},style:je}),h.createElement("div",{className:"".concat(Je,"-content")},typeof z=="function"?z(ae,{index:le}):tt),h.isValidElement(k)||$t,yt&&h.createElement(Qf,{className:"".concat(A,"-option-state"),customizeIcon:k,customizeIconProps:{value:be,disabled:pt,isSelected:$t}},$t?"✓":null))}))},uj=h.forwardRef(cj);const dj=(function(e,t){var n=h.useRef({values:new Map,options:new Map}),r=h.useMemo(function(){var o=n.current,a=o.values,c=o.options,u=e.map(function(p){if(p.label===void 0){var g;return X(X({},p),{},{label:(g=a.get(p.value))===null||g===void 0?void 0:g.label})}return p}),d=new Map,f=new Map;return u.forEach(function(p){d.set(p.value,p),f.set(p.value,t.get(p.value)||c.get(p.value))}),n.current.values=d,n.current.options=f,u},[e,t]),i=h.useCallback(function(o){return t.get(o)||n.current.options.get(o)},[t]);return[r,i]});function $g(e,t){return Lk(e).join("").toUpperCase().includes(t)}const hj=(function(e,t,n,r,i){return h.useMemo(function(){if(!n||r===!1)return e;var o=t.options,a=t.label,c=t.value,u=[],d=typeof r=="function",f=n.toUpperCase(),p=d?r:function(v,b){return i?$g(b[i],f):b[o]?$g(b[a!=="children"?a:"label"],f):$g(b[c],f)},g=d?function(v){return t0(v)}:function(v){return v};return e.forEach(function(v){if(v[o]){var b=p(n,g(v));if(b)u.push(v);else{var _=v[o].filter(function(S){return p(n,g(S))});_.length&&u.push(X(X({},v),{},K({},o,_)))}return}p(n,g(v))&&u.push(v)}),u},[e,r,i,n,t])});var UC=0,fj=ii();function mj(){var e;return fj?(e=UC,UC+=1):e="TEST_OR_SSR",e}function pj(e){var t=h.useState(),n=se(t,2),r=n[0],i=n[1];return h.useEffect(function(){i("rc_select_".concat(mj()))},[]),e||r}var gj=["children","value"],vj=["children"];function yj(e){var t=e,n=t.key,r=t.props,i=r.children,o=r.value,a=Lt(r,gj);return X({key:n,value:o!==void 0?o:n,children:i},a)}function Vk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return hi(e).map(function(n,r){if(!h.isValidElement(n)||!n.type)return null;var i=n,o=i.type.isSelectOptGroup,a=i.key,c=i.props,u=c.children,d=Lt(c,vj);return t||!o?yj(n):X(X({key:"__RC_SELECT_GRP__".concat(a===null?r:a,"__"),label:a},d),{},{options:Vk(u)})}).filter(function(n){return n})}var bj=function(t,n,r,i,o){return h.useMemo(function(){var a=t,c=!t;c&&(a=Vk(n));var u=new Map,d=new Map,f=function(v,b,_){_&&typeof _=="string"&&v.set(b[_],b)},p=function g(v){for(var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_=0;_<v.length;_+=1){var S=v[_];!S[r.options]||b?(u.set(S[r.value],S),f(d,S,r.label),f(d,S,i),f(d,S,o)):g(S[r.options],!0)}};return p(a),{options:a,valueOptions:u,labelOptions:d}},[t,n,r,i,o])};function KC(e){var t=h.useRef();t.current=e;var n=h.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}var _j=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],Sj=["inputValue"];function Cj(e){return!e||_t(e)!=="object"}var xj=h.forwardRef(function(e,t){var n=e.id,r=e.mode,i=e.prefixCls,o=i===void 0?"rc-select":i,a=e.backfill,c=e.fieldNames,u=e.inputValue,d=e.searchValue,f=e.onSearch,p=e.autoClearSearchValue,g=p===void 0?!0:p,v=e.onSelect,b=e.onDeselect,_=e.dropdownMatchSelectWidth,S=_===void 0?!0:_,C=e.filterOption,E=e.filterSort,k=e.optionFilterProp,$=e.optionLabelProp,P=e.options,T=e.optionRender,O=e.children,N=e.defaultActiveFirstOption,I=e.menuItemSelectedIcon,z=e.virtual,A=e.direction,M=e.listHeight,j=M===void 0?200:M,B=e.listItemHeight,F=B===void 0?20:B,W=e.labelRender,V=e.value,L=e.defaultValue,G=e.labelInValue,U=e.onChange,D=e.maxCount,q=Lt(e,_j),Y=pj(n),ee=n0(r),Z=!!(!P&&O),re=h.useMemo(function(){return C===void 0&&r==="combobox"?!1:C},[C,r]),he=h.useMemo(function(){return Dk(c,Z)},[JSON.stringify(c),Z]),fe=er("",{value:d!==void 0?d:u,postState:function($e){return $e||""}}),ue=se(fe,2),Se=ue[0],ae=ue[1],le=bj(P,O,he,k,$),ce=le.valueOptions,ye=le.labelOptions,me=le.options,de=h.useCallback(function(Ie){var $e=Lk(Ie);return $e.map(function(we){var Ae,et,nt,Ft,Kt;if(Cj(we))Ae=we;else{var Bt;nt=we.key,et=we.label,Ae=(Bt=we.value)!==null&&Bt!==void 0?Bt:nt}var At=ce.get(Ae);if(At){var Tn;et===void 0&&(et=At==null?void 0:At[$||he.label]),nt===void 0&&(nt=(Tn=At==null?void 0:At.key)!==null&&Tn!==void 0?Tn:Ae),Ft=At==null?void 0:At.disabled,Kt=At==null?void 0:At.title}return{label:et,value:Ae,key:nt,disabled:Ft,title:Kt}})},[he,$,ce]),be=er(L,{value:V}),xe=se(be,2),Te=xe[0],ze=xe[1],Ee=h.useMemo(function(){var Ie,$e=ee&&Te===null?[]:Te,we=de($e);return r==="combobox"&&mz((Ie=we[0])===null||Ie===void 0?void 0:Ie.value)?[]:we},[Te,de,r,ee]),ke=dj(Ee,ce),je=se(ke,2),Oe=je[0],Qe=je[1],at=h.useMemo(function(){if(!r&&Oe.length===1){var Ie=Oe[0];if(Ie.value===null&&(Ie.label===null||Ie.label===void 0))return[]}return Oe.map(function($e){var we;return X(X({},$e),{},{label:(we=typeof W=="function"?W($e):$e.label)!==null&&we!==void 0?we:$e.value})})},[r,Oe,W]),$t=h.useMemo(function(){return new Set(Oe.map(function(Ie){return Ie.value}))},[Oe]);h.useEffect(function(){if(r==="combobox"){var Ie,$e=(Ie=Oe[0])===null||Ie===void 0?void 0:Ie.value;ae(fz($e)?String($e):"")}},[Oe]);var pt=KC(function(Ie,$e){var we=$e??Ie;return K(K({},he.value,Ie),he.label,we)}),Je=h.useMemo(function(){if(r!=="tags")return me;var Ie=We(me),$e=function(Ae){return ce.has(Ae)};return We(Oe).sort(function(we,Ae){return we.value<Ae.value?-1:1}).forEach(function(we){var Ae=we.value;$e(Ae)||Ie.push(pt(Ae,we.label))}),Ie},[pt,me,ce,Oe,r]),ft=hj(Je,he,Se,re,k),Xe=h.useMemo(function(){return r!=="tags"||!Se||ft.some(function(Ie){return Ie[k||"value"]===Se})||ft.some(function(Ie){return Ie[he.value]===Se})?ft:[pt(Se)].concat(We(ft))},[pt,k,r,ft,Se,he]),yt=function Ie($e){var we=We($e).sort(function(Ae,et){return E(Ae,et,{searchValue:Se})});return we.map(function(Ae){return Array.isArray(Ae.options)?X(X({},Ae),{},{options:Ae.options.length>0?Ie(Ae.options):Ae.options}):Ae})},tt=h.useMemo(function(){return E?yt(Xe):Xe},[Xe,E,Se]),Le=h.useMemo(function(){return Lz(tt,{fieldNames:he,childrenAsData:Z})},[tt,he,Z]),rt=function($e){var we=de($e);if(ze(we),U&&(we.length!==Oe.length||we.some(function(nt,Ft){var Kt;return((Kt=Oe[Ft])===null||Kt===void 0?void 0:Kt.value)!==(nt==null?void 0:nt.value)}))){var Ae=G?we:we.map(function(nt){return nt.value}),et=we.map(function(nt){return t0(Qe(nt.value))});U(ee?Ae:Ae[0],ee?et:et[0])}},Me=h.useState(null),Ue=se(Me,2),It=Ue[0],St=Ue[1],nn=h.useState(0),Jt=se(nn,2),bn=Jt[0],On=Jt[1],on=N!==void 0?N:r!=="combobox",Ht=h.useCallback(function(Ie,$e){var we=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ae=we.source,et=Ae===void 0?"keyboard":Ae;On($e),a&&r==="combobox"&&Ie!==null&&et==="keyboard"&&St(String(Ie))},[a,r]),Rt=function($e,we,Ae){var et=function(){var ln,fn=Qe($e);return[G?{label:fn==null?void 0:fn[he.label],value:$e,key:(ln=fn==null?void 0:fn.key)!==null&&ln!==void 0?ln:$e}:$e,t0(fn)]};if(we&&v){var nt=et(),Ft=se(nt,2),Kt=Ft[0],Bt=Ft[1];v(Kt,Bt)}else if(!we&&b&&Ae!=="clear"){var At=et(),Tn=se(At,2),En=Tn[0],In=Tn[1];b(En,In)}},sn=KC(function(Ie,$e){var we,Ae=ee?$e.selected:!0;Ae?we=ee?[].concat(We(Oe),[Ie]):[Ie]:we=Oe.filter(function(et){return et.value!==Ie}),rt(we),Rt(Ie,Ae),r==="combobox"?St(""):(!n0||g)&&(ae(""),St(""))}),Xt=function($e,we){rt($e);var Ae=we.type,et=we.values;(Ae==="remove"||Ae==="clear")&&et.forEach(function(nt){Rt(nt.value,!1,Ae)})},ot=function($e,we){if(ae($e),St(null),we.source==="submit"){var Ae=($e||"").trim();if(Ae){var et=Array.from(new Set([].concat(We($t),[Ae])));rt(et),Rt(Ae,!0),ae("")}return}we.source!=="blur"&&(r==="combobox"&&rt($e),f==null||f($e))},Et=function($e){var we=$e;r!=="tags"&&(we=$e.map(function(et){var nt=ye.get(et);return nt==null?void 0:nt.value}).filter(function(et){return et!==void 0}));var Ae=Array.from(new Set([].concat(We($t),We(we))));rt(Ae),Ae.forEach(function(et){Rt(et,!0)})},mt=h.useMemo(function(){var Ie=z!==!1&&S!==!1;return X(X({},le),{},{flattenOptions:Le,onActiveValue:Ht,defaultActiveFirstOption:on,onSelect:sn,menuItemSelectedIcon:I,rawValues:$t,fieldNames:he,virtual:Ie,direction:A,listHeight:j,listItemHeight:F,childrenAsData:Z,maxCount:D,optionRender:T})},[D,le,Le,Ht,on,sn,I,$t,he,z,S,A,j,F,Z,T]);return h.createElement(Iy.Provider,{value:mt},h.createElement(Wz,Re({},q,{id:Y,prefixCls:o,ref:t,omitDomProps:Sj,mode:r,displayValues:at,onDisplayValuesChange:Xt,direction:A,searchValue:Se,onSearch:ot,autoClearSearchValue:g,onSearchSplit:Et,dropdownMatchSelectWidth:S,OptionList:uj,emptyOptions:!Le.length,activeValue:It,activeDescendantId:"".concat(Y,"_list_").concat(bn)})))}),zy=xj;zy.Option=My;zy.OptGroup=Ny;function qk(e,t,n){return ne({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n})}const Uk=(e,t)=>t||e,wj=()=>{const[,e]=mi(),[t]=gs("Empty"),r=new vn(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return h.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},h.createElement("title",null,(t==null?void 0:t.description)||"Empty"),h.createElement("g",{fill:"none",fillRule:"evenodd"},h.createElement("g",{transform:"translate(24 31.67)"},h.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),h.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),h.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),h.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),h.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),h.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),h.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},h.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),h.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Ej=()=>{const[,e]=mi(),[t]=gs("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:o}=e,{borderColor:a,shadowColor:c,contentColor:u}=h.useMemo(()=>({borderColor:new vn(n).onBackground(o).toHexString(),shadowColor:new vn(r).onBackground(o).toHexString(),contentColor:new vn(i).onBackground(o).toHexString()}),[n,r,i,o]);return h.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},h.createElement("title",null,(t==null?void 0:t.description)||"Empty"),h.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},h.createElement("ellipse",{fill:c,cx:"32",cy:"33",rx:"32",ry:"7"}),h.createElement("g",{fillRule:"nonzero",stroke:a},h.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),h.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:u}))))},kj=e=>{const{componentCls:t,margin:n,marginXS:r,marginXL:i,fontSize:o,lineHeight:a}=e;return{[t]:{marginInline:r,fontSize:o,lineHeight:a,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:i,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},$j=yn("Empty",e=>{const{componentCls:t,controlHeightLG:n,calc:r}=e,i=tn(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return kj(i)});var Rj=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Kk=h.createElement(wj,null),Gk=h.createElement(Ej,null),Ri=e=>{var t;const{className:n,rootClassName:r,prefixCls:i,image:o,description:a,children:c,imageStyle:u,style:d,classNames:f,styles:p}=e,g=Rj(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:v,direction:b,className:_,style:S,classNames:C,styles:E,image:k}=Ur("empty"),$=v("empty",i),[P,T,O]=$j($),[N]=gs("Empty"),I=typeof a<"u"?a:N==null?void 0:N.description,z=typeof I=="string"?I:"empty",A=(t=o??k)!==null&&t!==void 0?t:Kk;let M=null;return typeof A=="string"?M=h.createElement("img",{draggable:!1,alt:z,src:A}):M=A,P(h.createElement("div",Object.assign({className:ne(T,O,$,_,{[`${$}-normal`]:A===Gk,[`${$}-rtl`]:b==="rtl"},n,r,C.root,f==null?void 0:f.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},E.root),S),p==null?void 0:p.root),d)},g),h.createElement("div",{className:ne(`${$}-image`,C.image,f==null?void 0:f.image),style:Object.assign(Object.assign(Object.assign({},u),E.image),p==null?void 0:p.image)},M),I&&h.createElement("div",{className:ne(`${$}-description`,C.description,f==null?void 0:f.description),style:Object.assign(Object.assign({},E.description),p==null?void 0:p.description)},I),c&&h.createElement("div",{className:ne(`${$}-footer`,C.footer,f==null?void 0:f.footer),style:Object.assign(Object.assign({},E.footer),p==null?void 0:p.footer)},c)))};Ri.PRESENTED_IMAGE_DEFAULT=Kk;Ri.PRESENTED_IMAGE_SIMPLE=Gk;const Xk=e=>{const{componentName:t}=e,{getPrefixCls:n}=h.useContext(Ot),r=n("empty");switch(t){case"Table":case"List":return Q.createElement(Ri,{image:Ri.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return Q.createElement(Ri,{image:Ri.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return Q.createElement(Ri,null)}},Yk=(e,t,n)=>{var r,i;const{variant:o,[e]:a}=h.useContext(Ot),c=h.useContext(YM),u=a==null?void 0:a.variant;let d;typeof t<"u"?d=t:n===!1?d="borderless":d=(i=(r=c??u)!==null&&r!==void 0?r:o)!==null&&i!==void 0?i:"outlined";const f=EP.includes(d);return[d,f]},Tj=e=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},n),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},n),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},n),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},n),{points:["br","tr"],offset:[0,-4]})}};function Pj(e,t){return e||Tj(t)}const GC=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:i}=e;return{position:"relative",display:"block",minHeight:t,padding:i,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},Oj=e=>{const{antCls:t,componentCls:n}=e,r=`${n}-item`,i=`&${t}-slide-up-enter${t}-slide-up-enter-active`,o=`&${t}-slide-up-appear${t}-slide-up-appear-active`,a=`&${t}-slide-up-leave${t}-slide-up-leave-active`,c=`${n}-dropdown-placement-`,u=`${r}-option-selected`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},Vn(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
224
- ${i}${c}bottomLeft,
225
- ${o}${c}bottomLeft
226
- `]:{animationName:Ey},[`
227
- ${i}${c}topLeft,
228
- ${o}${c}topLeft,
229
- ${i}${c}topRight,
230
- ${o}${c}topRight
231
- `]:{animationName:$y},[`${a}${c}bottomLeft`]:{animationName:ky},[`
232
- ${a}${c}topLeft,
233
- ${a}${c}topRight
234
- `]:{animationName:Ry},"&-hidden":{display:"none"},[r]:Object.assign(Object.assign({},GC(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},_u),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},GC(e)),{color:e.colorTextDisabled})}),[`${u}:has(+ ${u})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${u}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},ea(e,"slide-up"),ea(e,"slide-down"),nf(e,"move-up"),nf(e,"move-down")]},Ij=e=>{const{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=e,o=e.max(e.calc(n).sub(r).equal(),0),a=e.max(e.calc(o).sub(i).equal(),0);return{basePadding:o,containerPadding:a,itemHeight:te(t),itemLineHeight:te(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},Nj=e=>{const{multipleSelectItemHeight:t,selectHeight:n,lineWidth:r}=e;return e.calc(n).sub(t).div(2).sub(r).equal()},Mj=e=>{const{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:o,multipleItemColorDisabled:a,multipleItemBorderColorDisabled:c,colorIcon:u,colorIconHover:d,INTERNAL_FIXED_ITEM_MARGIN:f}=e;return{[`${t}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"calc(100% - 4px)",display:"inline-flex"},[`${t}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:f,borderRadius:r,cursor:"default",transition:`font-size ${i}, line-height ${i}, height ${i}`,marginInlineEnd:e.calc(f).mul(2).equal(),paddingInlineStart:o,paddingInlineEnd:e.calc(o).div(2).equal(),[`${t}-disabled&`]:{color:a,borderColor:c,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(o).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},Zl()),{display:"inline-flex",alignItems:"center",color:u,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:d}})}}}},zj=(e,t)=>{const{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:r}=e,i=`${n}-selection-overflow`,o=e.multipleSelectItemHeight,a=Nj(e),c=t?`${n}-${t}`:"",u=Ij(e);return{[`${n}-multiple${c}`]:Object.assign(Object.assign({},Mj(e)),{[`${n}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:u.basePadding,paddingBlock:u.containerPadding,borderRadius:e.borderRadius,[`${n}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${te(r)} 0`,lineHeight:te(o),visibility:"hidden",content:'"\\a0"'}},[`${n}-selection-item`]:{height:u.itemHeight,lineHeight:te(u.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:te(o),marginBlock:r}},[`${n}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(u.basePadding).equal()},[`${i}-item + ${i}-item,
235
- ${n}-prefix + ${n}-selection-wrap
236
- `]:{[`${n}-selection-search`]:{marginInlineStart:0},[`${n}-selection-placeholder`]:{insetInlineStart:0}},[`${i}-item-suffix`]:{minHeight:u.itemHeight,marginBlock:r},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(a).equal(),"\n &-input,\n &-mirror\n ":{height:o,fontFamily:e.fontFamily,lineHeight:te(o),transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(u.basePadding).equal(),insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}})}};function Rg(e,t){const{componentCls:n}=e,r=t?`${n}-${t}`:"",i={[`${n}-multiple${r}`]:{fontSize:e.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:"text"}},[`
237
- &${n}-show-arrow ${n}-selector,
238
- &${n}-allow-clear ${n}-selector
239
- `]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[zj(e,t),i]}const jj=e=>{const{componentCls:t}=e,n=tn(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),r=tn(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[Rg(e),Rg(n,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},Rg(r,"lg")]};function Tg(e,t){const{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:i}=e,o=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),a=t?`${n}-${t}`:"";return{[`${n}-single${a}`]:{fontSize:e.fontSize,height:e.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},Vn(e,!0)),{display:"flex",borderRadius:i,flex:"1 1 auto",[`${n}-selection-wrap:after`]:{lineHeight:te(o)},[`${n}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
240
- ${n}-selection-item,
241
- ${n}-selection-placeholder
242
- `]:{display:"block",padding:0,lineHeight:te(o),transition:`all ${e.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${n}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${n}-selection-item:empty:after`,`${n}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
243
- &${n}-show-arrow ${n}-selection-item,
244
- &${n}-show-arrow ${n}-selection-search,
245
- &${n}-show-arrow ${n}-selection-placeholder
246
- `]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${te(r)}`,[`${n}-selection-search-input`]:{height:o,fontSize:e.fontSize},"&:after":{lineHeight:te(o)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${te(r)}`,"&:after":{display:"none"}}}}}}}function Bj(e){const{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[Tg(e),Tg(tn(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${te(n)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()},[`
247
- &${t}-show-arrow ${t}-selection-item,
248
- &${t}-show-arrow ${t}-selection-placeholder
249
- `]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},Tg(tn(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const Lj=e=>{const{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:o,controlHeightLG:a,paddingXXS:c,controlPaddingHorizontal:u,zIndexPopupBase:d,colorText:f,fontWeightStrong:p,controlItemBgActive:g,controlItemBgHover:v,colorBgContainer:b,colorFillSecondary:_,colorBgContainerDisabled:S,colorTextDisabled:C,colorPrimaryHover:E,colorPrimary:k,controlOutline:$}=e,P=c*2,T=r*2,O=Math.min(i-P,i-T),N=Math.min(o-P,o-T),I=Math.min(a-P,a-T);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(c/2),zIndexPopup:d+50,optionSelectedColor:f,optionSelectedFontWeight:p,optionSelectedBg:g,optionActiveBg:v,optionPadding:`${(i-t*n)/2}px ${u}px`,optionFontSize:t,optionLineHeight:n,optionHeight:i,selectorBg:b,clearBg:b,singleItemHeightLG:a,multipleItemBg:_,multipleItemBorderColor:"transparent",multipleItemHeight:O,multipleItemHeightSM:N,multipleItemHeightLG:I,multipleSelectorBgDisabled:S,multipleItemColorDisabled:C,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:E,activeBorderColor:k,activeOutlineColor:$,selectAffixPadding:c}},Jk=(e,t)=>{const{componentCls:n,antCls:r,controlOutlineWidth:i}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${te(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${te(i)} ${t.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:t.color}}}},XC=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},Jk(e,t))}),Aj=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},Jk(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),XC(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),XC(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),Qk=(e,t)=>{const{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:t.bg,border:`${te(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:t.hoverBg},[`${n}-focused& ${n}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},YC=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},Qk(e,t))}),Dj=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},Qk(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),YC(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),YC(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),Hj=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:"transparent",border:`${te(e.lineWidth)} ${e.lineType} transparent`},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),Zk=(e,t)=>{const{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`${te(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,background:e.selectorBg,borderRadius:0},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:`transparent transparent ${t.hoverBorderHover} transparent`},[`${n}-focused& ${n}-selector`]:{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0},[`${n}-prefix`]:{color:t.color}}}},JC=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},Zk(e,t))}),Fj=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},Zk(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),JC(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),JC(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),Wj=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},Aj(e)),Dj(e)),Hj(e)),Fj(e))}),Vj=e=>{const{componentCls:t}=e;return{position:"relative",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${t}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},qj=e=>{const{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},Uj=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:r,iconCls:i}=e,o={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[n]:Object.assign(Object.assign({},Vn(e)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},Vj(e)),qj(e)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},_u),{[`> ${t}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},_u),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},Zl()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${e.motionDurationSlow} ease`,[i]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":o,"&:hover":o}),[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(r).add(e.fontSize).add(e.paddingXS).equal()}}}}}},Kj=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},Uj(e),Bj(e),jj(e),Oj(e),{[`${t}-rtl`]:{direction:"rtl"}},Kf(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},Gj=yn("Select",(e,{rootPrefixCls:t})=>{const n=tn(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[Kj(n),Wj(n)]},Lj,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var Xj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},Yj=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:Xj}))},e$=h.forwardRef(Yj),Jj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},Qj=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:Jj}))},us=h.forwardRef(Qj),Zj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},eB=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:Zj}))},tB=h.forwardRef(eB);function nB({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:r,loading:i,multiple:o,hasFeedback:a,prefixCls:c,showSuffixIcon:u,feedbackIcon:d,showArrow:f,componentName:p}){const g=t??h.createElement(jf,null),v=C=>e===null&&!a&&!f?null:h.createElement(h.Fragment,null,u!==!1&&C,a&&d);let b=null;if(e!==void 0)b=v(e);else if(i)b=v(h.createElement(ju,{spin:!0}));else{const C=`${c}-suffix`;b=({open:E,showSearch:k})=>v(E&&k?h.createElement(tB,{className:C}):h.createElement(us,{className:C}))}let _=null;n!==void 0?_=n:o?_=h.createElement(e$,null):_=null;let S=null;return r!==void 0?S=r:S=h.createElement(Zs,null),{clearIcon:g,suffixIcon:b,itemIcon:_,removeIcon:S}}function rB(e){return Q.useMemo(()=>{if(e)return(...t)=>Q.createElement(Vu,{space:!0},e.apply(void 0,t))},[e])}function iB(e,t){return t!==void 0?t:e!==null}var oB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const t$="SECRET_COMBOBOX_MODE_DO_NOT_USE",sB=(e,t)=>{var n,r,i,o,a;const{prefixCls:c,bordered:u,className:d,rootClassName:f,getPopupContainer:p,popupClassName:g,dropdownClassName:v,listHeight:b=256,placement:_,listItemHeight:S,size:C,disabled:E,notFoundContent:k,status:$,builtinPlacements:P,dropdownMatchSelectWidth:T,popupMatchSelectWidth:O,direction:N,style:I,allowClear:z,variant:A,dropdownStyle:M,transitionName:j,tagRender:B,maxCount:F,prefix:W,dropdownRender:V,popupRender:L,onDropdownVisibleChange:G,onOpenChange:U,styles:D,classNames:q}=e,Y=oB(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:ee,getPrefixCls:Z,renderEmpty:re,direction:he,virtual:fe,popupMatchSelectWidth:ue,popupOverflow:Se}=h.useContext(Ot),{showSearch:ae,style:le,styles:ce,className:ye,classNames:me}=Ur("select"),[,de]=mi(),be=S??(de==null?void 0:de.controlHeight),xe=Z("select",c),Te=Z(),ze=N??he,{compactSize:Ee,compactItemClassnames:ke}=Au(xe,ze),[je,Oe]=Yk("select",A,u),Qe=Po(xe),[at,$t,pt]=Gj(xe,Qe),Je=h.useMemo(()=>{const{mode:Ae}=e;if(Ae!=="combobox")return Ae===t$?"combobox":Ae},[e.mode]),ft=Je==="multiple"||Je==="tags",Xe=iB(e.suffixIcon,e.showArrow),yt=(n=O??T)!==null&&n!==void 0?n:ue,tt=((r=D==null?void 0:D.popup)===null||r===void 0?void 0:r.root)||((i=ce.popup)===null||i===void 0?void 0:i.root)||M,Le=rB(L||V),rt=U||G,{status:Me,hasFeedback:Ue,isFormItemInput:It,feedbackIcon:St}=h.useContext(Cu),nn=Uk(Me,$);let Jt;k!==void 0?Jt=k:Je==="combobox"?Jt=null:Jt=(re==null?void 0:re("Select"))||h.createElement(Xk,{componentName:"Select"});const{suffixIcon:bn,itemIcon:On,removeIcon:on,clearIcon:Ht}=nB(Object.assign(Object.assign({},Y),{multiple:ft,hasFeedback:Ue,feedbackIcon:St,showSuffixIcon:Xe,prefixCls:xe,componentName:"Select"})),Rt=z===!0?{clearIcon:Ht}:z,sn=dr(Y,["suffixIcon","itemIcon"]),Xt=ne(((o=q==null?void 0:q.popup)===null||o===void 0?void 0:o.root)||((a=me==null?void 0:me.popup)===null||a===void 0?void 0:a.root)||g||v,{[`${xe}-dropdown-${ze}`]:ze==="rtl"},f,me.root,q==null?void 0:q.root,pt,Qe,$t),ot=Jo(Ae=>{var et;return(et=C??Ee)!==null&&et!==void 0?et:Ae}),Et=h.useContext(Js),mt=E??Et,Ie=ne({[`${xe}-lg`]:ot==="large",[`${xe}-sm`]:ot==="small",[`${xe}-rtl`]:ze==="rtl",[`${xe}-${je}`]:Oe,[`${xe}-in-form-item`]:It},qk(xe,nn,Ue),ke,ye,d,me.root,q==null?void 0:q.root,f,pt,Qe,$t),$e=h.useMemo(()=>_!==void 0?_:ze==="rtl"?"bottomRight":"bottomLeft",[_,ze]),[we]=tc("SelectLike",tt==null?void 0:tt.zIndex);return at(h.createElement(zy,Object.assign({ref:t,virtual:fe,showSearch:ae},sn,{style:Object.assign(Object.assign(Object.assign(Object.assign({},ce.root),D==null?void 0:D.root),le),I),dropdownMatchSelectWidth:yt,transitionName:qo(Te,"slide-up",j),builtinPlacements:Pj(P,Se),listHeight:b,listItemHeight:be,mode:Je,prefixCls:xe,placement:$e,direction:ze,prefix:W,suffixIcon:bn,menuItemSelectedIcon:On,removeIcon:on,allowClear:Rt,notFoundContent:Jt,className:Ie,getPopupContainer:p||ee,dropdownClassName:Xt,disabled:mt,dropdownStyle:Object.assign(Object.assign({},tt),{zIndex:we}),maxCount:ft?F:void 0,tagRender:ft?B:void 0,dropdownRender:Le,onDropdownVisibleChange:rt})))},Aa=h.forwardRef(sB),aB=Ok(Aa,"dropdownAlign");Aa.SECRET_COMBOBOX_MODE_DO_NOT_USE=t$;Aa.Option=My;Aa.OptGroup=Ny;Aa._InternalPanelDoNotUseOrYouWillBeFired=aB;const n$=(e,t)=>{typeof(e==null?void 0:e.addEventListener)<"u"?e.addEventListener("change",t):typeof(e==null?void 0:e.addListener)<"u"&&e.addListener(t)},r$=(e,t)=>{typeof(e==null?void 0:e.removeEventListener)<"u"?e.removeEventListener("change",t):typeof(e==null?void 0:e.removeListener)<"u"&&e.removeListener(t)},Pa=["xxl","xl","lg","md","sm","xs"],lB=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`}),cB=e=>{const t=e,n=[].concat(Pa).reverse();return n.forEach((r,i)=>{const o=r.toUpperCase(),a=`screen${o}Min`,c=`screen${o}`;if(!(t[a]<=t[c]))throw new Error(`${a}<=${c} fails : !(${t[a]}<=${t[c]})`);if(i<n.length-1){const u=`screen${o}Max`;if(!(t[c]<=t[u]))throw new Error(`${c}<=${u} fails : !(${t[c]}<=${t[u]})`);const f=`screen${n[i+1].toUpperCase()}Min`;if(!(t[u]<=t[f]))throw new Error(`${u}<=${f} fails : !(${t[u]}<=${t[f]})`)}}),e},uB=()=>{const[,e]=mi(),t=lB(cB(e));return Q.useMemo(()=>{const n=new Map;let r=-1,i={};return{responsiveMap:t,matchHandlers:{},dispatch(o){return i=o,n.forEach(a=>a(i)),n.size>=1},subscribe(o){return n.size||this.register(),r+=1,n.set(r,o),o(i),r},unsubscribe(o){n.delete(o),n.size||this.unregister()},register(){Object.entries(t).forEach(([o,a])=>{const c=({matches:d})=>{this.dispatch(Object.assign(Object.assign({},i),{[o]:d}))},u=window.matchMedia(a);n$(u,c),this.matchHandlers[a]={mql:u,listener:c},c(u)})},unregister(){Object.values(t).forEach(o=>{const a=this.matchHandlers[o];r$(a==null?void 0:a.mql,a==null?void 0:a.listener)}),n.clear()}}},[t])};function jy(e=!0,t={}){const n=h.useRef(t),[,r]=pI(),i=uB();return hn(()=>{const o=i.subscribe(a=>{n.current=a,e&&r()});return()=>i.unsubscribe(o)},[]),n.current}const sf=e=>e?typeof e=="function"?e():e:null;function By(e){var t=e.children,n=e.prefixCls,r=e.id,i=e.overlayInnerStyle,o=e.bodyClassName,a=e.className,c=e.style;return h.createElement("div",{className:ne("".concat(n,"-content"),a),style:c},h.createElement("div",{className:ne("".concat(n,"-inner"),o),id:r,role:"tooltip",style:i},typeof t=="function"?t():t))}var _l={shiftX:64,adjustY:1},Sl={adjustX:1,shiftY:!0},to=[0,0],dB={left:{points:["cr","cl"],overflow:Sl,offset:[-4,0],targetOffset:to},right:{points:["cl","cr"],overflow:Sl,offset:[4,0],targetOffset:to},top:{points:["bc","tc"],overflow:_l,offset:[0,-4],targetOffset:to},bottom:{points:["tc","bc"],overflow:_l,offset:[0,4],targetOffset:to},topLeft:{points:["bl","tl"],overflow:_l,offset:[0,-4],targetOffset:to},leftTop:{points:["tr","tl"],overflow:Sl,offset:[-4,0],targetOffset:to},topRight:{points:["br","tr"],overflow:_l,offset:[0,-4],targetOffset:to},rightTop:{points:["tl","tr"],overflow:Sl,offset:[4,0],targetOffset:to},bottomRight:{points:["tr","br"],overflow:_l,offset:[0,4],targetOffset:to},rightBottom:{points:["bl","br"],overflow:Sl,offset:[4,0],targetOffset:to},bottomLeft:{points:["tl","bl"],overflow:_l,offset:[0,4],targetOffset:to},leftBottom:{points:["br","bl"],overflow:Sl,offset:[-4,0],targetOffset:to}},hB=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],fB=function(t,n){var r=t.overlayClassName,i=t.trigger,o=i===void 0?["hover"]:i,a=t.mouseEnterDelay,c=a===void 0?0:a,u=t.mouseLeaveDelay,d=u===void 0?.1:u,f=t.overlayStyle,p=t.prefixCls,g=p===void 0?"rc-tooltip":p,v=t.children,b=t.onVisibleChange,_=t.afterVisibleChange,S=t.transitionName,C=t.animation,E=t.motion,k=t.placement,$=k===void 0?"right":k,P=t.align,T=P===void 0?{}:P,O=t.destroyTooltipOnHide,N=O===void 0?!1:O,I=t.defaultVisible,z=t.getTooltipContainer,A=t.overlayInnerStyle;t.arrowContent;var M=t.overlay,j=t.id,B=t.showArrow,F=B===void 0?!0:B,W=t.classNames,V=t.styles,L=Lt(t,hB),G=Xf(j),U=h.useRef(null);h.useImperativeHandle(n,function(){return U.current});var D=X({},L);"visible"in t&&(D.popupVisible=t.visible);var q=function(){return h.createElement(By,{key:"content",prefixCls:g,id:G,bodyClassName:W==null?void 0:W.body,overlayInnerStyle:X(X({},A),V==null?void 0:V.body)},M)},Y=function(){var Z=h.Children.only(v),re=(Z==null?void 0:Z.props)||{},he=X(X({},re),{},{"aria-describedby":M?G:null});return h.cloneElement(v,he)};return h.createElement(Zf,Re({popupClassName:ne(r,W==null?void 0:W.root),prefixCls:g,popup:q,action:o,builtinPlacements:dB,popupPlacement:$,ref:U,popupAlign:T,getPopupContainer:z,onPopupVisibleChange:b,afterPopupVisibleChange:_,popupTransitionName:S,popupAnimation:C,popupMotion:E,defaultPopupVisible:I,autoDestroy:N,mouseLeaveDelay:d,popupStyle:X(X({},f),V==null?void 0:V.root),mouseEnterDelay:c,arrow:F},D),Y())};const mB=h.forwardRef(fB);function Ly(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,i=t/2,o=0,a=i,c=r*1/Math.sqrt(2),u=i-r*(1-1/Math.sqrt(2)),d=i-n*(1/Math.sqrt(2)),f=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),p=2*i-d,g=f,v=2*i-c,b=u,_=2*i-o,S=a,C=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),E=r*(Math.sqrt(2)-1),k=`polygon(${E}px 100%, 50% ${E}px, ${2*i-E}px 100%, ${E}px 100%)`,$=`path('M ${o} ${a} A ${r} ${r} 0 0 0 ${c} ${u} L ${d} ${f} A ${n} ${n} 0 0 1 ${p} ${g} L ${v} ${b} A ${r} ${r} 0 0 0 ${_} ${S} Z')`;return{arrowShadowWidth:C,arrowPath:$,arrowPolygon:k}}const pB=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:i,arrowPath:o,arrowShadowWidth:a,borderRadiusXS:c,calc:u}=e;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:u(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${te(c)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},i$=8;function em(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?i$:r}}function ah(e,t){return e?t:{}}function Ay(e,t,n){const{componentCls:r,boxShadowPopoverArrow:i,arrowOffsetVertical:o,arrowOffsetHorizontal:a}=e,{arrowDistance:c=0,arrowPlacement:u={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},pB(e,t,i)),{"&:before":{background:t}})]},ah(!!u.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:c,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${te(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),ah(!!u.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:c,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${te(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),ah(!!u.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:c},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:o},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:o}})),ah(!!u.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:c},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:o},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:o}}))}}function gB(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const i=r&&typeof r=="object"?r:{},o={};switch(e){case"top":case"bottom":o.shiftX=t.arrowOffsetHorizontal*2+n,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=t.arrowOffsetVertical*2+n,o.shiftX=!0,o.adjustX=!0;break}const a=Object.assign(Object.assign({},o),i);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const QC={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},vB={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},yB=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function o$(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:o,visibleFirst:a}=e,c=t/2,u={},d=em({contentRadius:o,limitVerticalRadius:!0});return Object.keys(QC).forEach(f=>{const p=r&&vB[f]||QC[f],g=Object.assign(Object.assign({},p),{offset:[0,0],dynamicInset:!0});switch(u[f]=g,yB.has(f)&&(g.autoArrow=!1),f){case"top":case"topLeft":case"topRight":g.offset[1]=-c-i;break;case"bottom":case"bottomLeft":case"bottomRight":g.offset[1]=c+i;break;case"left":case"leftTop":case"leftBottom":g.offset[0]=-c-i;break;case"right":case"rightTop":case"rightBottom":g.offset[0]=c+i;break}if(r)switch(f){case"topLeft":case"bottomLeft":g.offset[0]=-d.arrowOffsetHorizontal-c;break;case"topRight":case"bottomRight":g.offset[0]=d.arrowOffsetHorizontal+c;break;case"leftTop":case"rightTop":g.offset[1]=-d.arrowOffsetHorizontal*2+c;break;case"leftBottom":case"rightBottom":g.offset[1]=d.arrowOffsetHorizontal*2-c;break}g.overflow=gB(f,d,t,n),a&&(g.htmlRegion="visibleFirst")}),u}const bB=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:i,tooltipBg:o,tooltipBorderRadius:a,zIndexPopup:c,controlHeight:u,boxShadowSecondary:d,paddingSM:f,paddingXS:p,arrowOffsetHorizontal:g,sizePopupArrow:v}=e,b=t(a).add(v).add(g).equal(),_=t(a).mul(2).add(v).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},Vn(e)),{position:"absolute",zIndex:c,display:"block",width:"max-content",maxWidth:r,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":o,[`${n}-inner`]:{minWidth:_,minHeight:u,padding:`${te(e.calc(f).div(2).equal())} ${te(p)}`,color:`var(--ant-tooltip-color, ${i})`,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:a,boxShadow:d,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:b},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(a,i$)}},[`${n}-content`]:{position:"relative"}}),zf(e,(S,{darkColor:C})=>({[`&${n}-${S}`]:{[`${n}-inner`]:{backgroundColor:C},[`${n}-arrow`]:{"--antd-arrow-background-color":C}}}))),{"&-rtl":{direction:"rtl"}})},Ay(e,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},_B=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},em({contentRadius:e.borderRadius,limitVerticalRadius:!0})),Ly(tn(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),s$=(e,t=!0)=>yn("Tooltip",r=>{const{borderRadius:i,colorTextLightSolid:o,colorBgSpotlight:a}=r,c=tn(r,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:i,tooltipBg:a});return[bB(c),Du(r,"zoom-big-fast")]},_B,{resetStyle:!1,injectStyle:t})(e),SB=Qs.map(e=>`${e}-inverse`),CB=["success","processing","error","default","warning"];function tm(e,t=!0){return t?[].concat(We(SB),We(Qs)).includes(e):Qs.includes(e)}function xB(e){return CB.includes(e)}function a$(e,t){const n=tm(t),r=ne({[`${e}-${t}`]:t&&n}),i={},o={},a=u6(t).toRgb(),u=(.299*a.r+.587*a.g+.114*a.b)/255<.5?"#FFF":"#000";return t&&!n&&(i.background=t,i["--ant-tooltip-color"]=u,o["--antd-arrow-background-color"]=t),{className:r,overlayStyle:i,arrowStyle:o}}const wB=e=>{const{prefixCls:t,className:n,placement:r="top",title:i,color:o,overlayInnerStyle:a}=e,{getPrefixCls:c}=h.useContext(Ot),u=c("tooltip",t),[d,f,p]=s$(u),g=a$(u,o),v=g.arrowStyle,b=Object.assign(Object.assign({},a),g.overlayStyle),_=ne(f,p,u,`${u}-pure`,`${u}-placement-${r}`,n,g.className);return d(h.createElement("div",{className:_,style:v},h.createElement("div",{className:`${u}-arrow`}),h.createElement(By,Object.assign({},e,{className:f,prefixCls:u,overlayInnerStyle:b}),i)))};var EB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const kB=h.forwardRef((e,t)=>{var n,r;const{prefixCls:i,openClassName:o,getTooltipContainer:a,color:c,overlayInnerStyle:u,children:d,afterOpenChange:f,afterVisibleChange:p,destroyTooltipOnHide:g,destroyOnHidden:v,arrow:b=!0,title:_,overlay:S,builtinPlacements:C,arrowPointAtCenter:E=!1,autoAdjustOverflow:k=!0,motion:$,getPopupContainer:P,placement:T="top",mouseEnterDelay:O=.1,mouseLeaveDelay:N=.1,overlayStyle:I,rootClassName:z,overlayClassName:A,styles:M,classNames:j}=e,B=EB(e,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","destroyOnHidden","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),F=!!b,[,W]=mi(),{getPopupContainer:V,getPrefixCls:L,direction:G,className:U,style:D,classNames:q,styles:Y}=Ur("tooltip"),ee=Nf(),Z=h.useRef(null),re=()=>{var Xe;(Xe=Z.current)===null||Xe===void 0||Xe.forceAlign()};h.useImperativeHandle(t,()=>{var Xe,yt;return{forceAlign:re,forcePopupAlign:()=>{ee.deprecated(!1,"forcePopupAlign","forceAlign"),re()},nativeElement:(Xe=Z.current)===null||Xe===void 0?void 0:Xe.nativeElement,popupElement:(yt=Z.current)===null||yt===void 0?void 0:yt.popupElement}});const[he,fe]=er(!1,{value:(n=e.open)!==null&&n!==void 0?n:e.visible,defaultValue:(r=e.defaultOpen)!==null&&r!==void 0?r:e.defaultVisible}),ue=!_&&!S&&_!==0,Se=Xe=>{var yt,tt;fe(ue?!1:Xe),ue||((yt=e.onOpenChange)===null||yt===void 0||yt.call(e,Xe),(tt=e.onVisibleChange)===null||tt===void 0||tt.call(e,Xe))},ae=h.useMemo(()=>{var Xe,yt;let tt=E;return typeof b=="object"&&(tt=(yt=(Xe=b.pointAtCenter)!==null&&Xe!==void 0?Xe:b.arrowPointAtCenter)!==null&&yt!==void 0?yt:E),C||o$({arrowPointAtCenter:tt,autoAdjustOverflow:k,arrowWidth:F?W.sizePopupArrow:0,borderRadius:W.borderRadius,offset:W.marginXXS,visibleFirst:!0})},[E,b,C,W]),le=h.useMemo(()=>_===0?_:S||_||"",[S,_]),ce=h.createElement(Vu,{space:!0},typeof le=="function"?le():le),ye=L("tooltip",i),me=L(),de=e["data-popover-inject"];let be=he;!("open"in e)&&!("visible"in e)&&ue&&(be=!1);const xe=h.isValidElement(d)&&!IE(d)?d:h.createElement("span",null,d),Te=xe.props,ze=!Te.className||typeof Te.className=="string"?ne(Te.className,o||`${ye}-open`):Te.className,[Ee,ke,je]=s$(ye,!de),Oe=a$(ye,c),Qe=Oe.arrowStyle,at=ne(A,{[`${ye}-rtl`]:G==="rtl"},Oe.className,z,ke,je,U,q.root,j==null?void 0:j.root),$t=ne(q.body,j==null?void 0:j.body),[pt,Je]=tc("Tooltip",B.zIndex),ft=h.createElement(mB,Object.assign({},B,{zIndex:pt,showArrow:F,placement:T,mouseEnterDelay:O,mouseLeaveDelay:N,prefixCls:ye,classNames:{root:at,body:$t},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Qe),Y.root),D),I),M==null?void 0:M.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},Y.body),u),M==null?void 0:M.body),Oe.overlayStyle)},getTooltipContainer:P||a||V,ref:Z,builtinPlacements:ae,overlay:ce,visible:be,onVisibleChange:Se,afterVisibleChange:f??p,arrowContent:h.createElement("span",{className:`${ye}-arrow-content`}),motion:{motionName:qo(me,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:v??!!g}),be?fi(xe,{className:ze}):xe);return Ee(h.createElement(Bu.Provider,{value:Je},ft))}),Ko=kB;Ko._InternalPanelDoNotUseOrYouWillBeFired=wB;const $B=e=>{const{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:i,innerPadding:o,boxShadowSecondary:a,colorTextHeading:c,borderRadiusLG:u,zIndexPopup:d,titleMarginBottom:f,colorBgElevated:p,popoverBg:g,titleBorderBottom:v,innerContentPadding:b,titlePadding:_}=e;return[{[t]:Object.assign(Object.assign({},Vn(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:d,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":p,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:g,backgroundClip:"padding-box",borderRadius:u,boxShadow:a,padding:o},[`${t}-title`]:{minWidth:r,marginBottom:f,color:c,fontWeight:i,borderBottom:v,padding:_},[`${t}-inner-content`]:{color:n,padding:b}})},Ay(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]},RB=e=>{const{componentCls:t}=e;return{[t]:Qs.map(n=>{const r=e[`${n}6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":r,[`${t}-inner`]:{backgroundColor:r},[`${t}-arrow`]:{background:"transparent"}}}})}},TB=e=>{const{lineWidth:t,controlHeight:n,fontHeight:r,padding:i,wireframe:o,zIndexPopupBase:a,borderRadiusLG:c,marginXS:u,lineType:d,colorSplit:f,paddingSM:p}=e,g=n-r,v=g/2,b=g/2-t,_=i;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},Ly(e)),em({contentRadius:c,limitVerticalRadius:!0})),{innerPadding:o?0:12,titleMarginBottom:o?0:u,titlePadding:o?`${v}px ${_}px ${b}px`:0,titleBorderBottom:o?`${t}px ${d} ${f}`:"none",innerContentPadding:o?`${p}px ${_}px`:0})},l$=yn("Popover",e=>{const{colorBgElevated:t,colorText:n}=e,r=tn(e,{popoverBg:t,popoverColor:n});return[$B(r),RB(r),Du(r,"zoom-big")]},TB,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var PB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const c$=({title:e,content:t,prefixCls:n})=>!e&&!t?null:h.createElement(h.Fragment,null,e&&h.createElement("div",{className:`${n}-title`},e),t&&h.createElement("div",{className:`${n}-inner-content`},t)),OB=e=>{const{hashId:t,prefixCls:n,className:r,style:i,placement:o="top",title:a,content:c,children:u}=e,d=sf(a),f=sf(c),p=ne(t,n,`${n}-pure`,`${n}-placement-${o}`,r);return h.createElement("div",{className:p,style:i},h.createElement("div",{className:`${n}-arrow`}),h.createElement(By,Object.assign({},e,{className:t,prefixCls:n}),u||h.createElement(c$,{prefixCls:n,title:d,content:f})))},IB=e=>{const{prefixCls:t,className:n}=e,r=PB(e,["prefixCls","className"]),{getPrefixCls:i}=h.useContext(Ot),o=i("popover",t),[a,c,u]=l$(o);return a(h.createElement(OB,Object.assign({},r,{prefixCls:o,hashId:c,className:ne(n,u)})))};var NB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const MB=h.forwardRef((e,t)=>{var n,r;const{prefixCls:i,title:o,content:a,overlayClassName:c,placement:u="top",trigger:d="hover",children:f,mouseEnterDelay:p=.1,mouseLeaveDelay:g=.1,onOpenChange:v,overlayStyle:b={},styles:_,classNames:S}=e,C=NB(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:E,className:k,style:$,classNames:P,styles:T}=Ur("popover"),O=E("popover",i),[N,I,z]=l$(O),A=E(),M=ne(c,I,z,k,P.root,S==null?void 0:S.root),j=ne(P.body,S==null?void 0:S.body),[B,F]=er(!1,{value:(n=e.open)!==null&&n!==void 0?n:e.visible,defaultValue:(r=e.defaultOpen)!==null&&r!==void 0?r:e.defaultVisible}),W=(D,q)=>{F(D,!0),v==null||v(D,q)},V=D=>{D.keyCode===Ge.ESC&&W(!1,D)},L=D=>{W(D)},G=sf(o),U=sf(a);return N(h.createElement(Ko,Object.assign({placement:u,trigger:d,mouseEnterDelay:p,mouseLeaveDelay:g},C,{prefixCls:O,classNames:{root:M,body:j},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},T.root),$),b),_==null?void 0:_.root),body:Object.assign(Object.assign({},T.body),_==null?void 0:_.body)},ref:t,open:B,onOpenChange:L,overlay:G||U?h.createElement(c$,{prefixCls:O,title:G,content:U}):null,transitionName:qo(A,"zoom-big",C.transitionName),"data-popover-inject":!0}),fi(f,{onKeyDown:D=>{var q,Y;h.isValidElement(f)&&((Y=f==null?void 0:(q=f.props).onKeyDown)===null||Y===void 0||Y.call(q,D)),V(D)}})))}),i0=MB;i0._InternalPanelDoNotUseOrYouWillBeFired=IB;const zB=new Yt("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),jB=new Yt("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),BB=new Yt("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),LB=new Yt("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),AB=new Yt("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),DB=new Yt("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),HB=e=>{const{componentCls:t,iconCls:n,antCls:r,badgeShadowSize:i,textFontSize:o,textFontSizeSM:a,statusSize:c,dotSize:u,textFontWeight:d,indicatorHeight:f,indicatorHeightSM:p,marginXS:g,calc:v}=e,b=`${r}-scroll-number`,_=zf(e,(S,{darkColor:C})=>({[`&${t} ${t}-color-${S}`]:{background:C,[`&:not(${t}-count)`]:{color:C},"a:hover &":{background:C}}}));return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},Vn(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:f,height:f,color:e.badgeTextColor,fontWeight:d,fontSize:o,lineHeight:te(f),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:v(f).div(2).equal(),boxShadow:`0 0 0 ${te(i)} ${e.badgeShadowColor}`,transition:`background ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:p,height:p,fontSize:a,lineHeight:te(p),borderRadius:v(p).div(2).equal()},[`${t}-multiple-words`]:{padding:`0 ${te(e.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:u,minWidth:u,height:u,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${te(i)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${b}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${n}-spin`]:{animationName:DB,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:c,height:c,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:i,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:zB,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:g,color:e.colorText,fontSize:e.fontSize}}}),_),{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:jB,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:BB,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:LB,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:AB,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${b}-custom-component, ${t}-count`]:{transform:"none"},[`${b}-custom-component, ${b}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[b]:{overflow:"hidden",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${b}-only`]:{position:"relative",display:"inline-block",height:f,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${b}-only-unit`]:{height:f,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${b}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${b}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}},u$=e=>{const{fontHeight:t,lineWidth:n,marginXS:r,colorBorderBg:i}=e,o=t,a=n,c=e.colorTextLightSolid,u=e.colorError,d=e.colorErrorHover;return tn(e,{badgeFontHeight:o,badgeShadowSize:a,badgeTextColor:c,badgeColor:u,badgeColorHover:d,badgeShadowColor:i,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},d$=e=>{const{fontSize:t,lineHeight:n,fontSizeSM:r,lineWidth:i}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*n)-2*i,indicatorHeightSM:t,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:"normal",statusSize:r/2}},FB=yn("Badge",e=>{const t=u$(e);return HB(t)},d$),WB=e=>{const{antCls:t,badgeFontHeight:n,marginXS:r,badgeRibbonOffset:i,calc:o}=e,a=`${t}-ribbon`,c=`${t}-ribbon-wrapper`,u=zf(e,(d,{darkColor:f})=>({[`&${a}-color-${d}`]:{background:f,color:f}}));return{[c]:{position:"relative"},[a]:Object.assign(Object.assign(Object.assign(Object.assign({},Vn(e)),{position:"absolute",top:r,padding:`0 ${te(e.paddingXS)}`,color:e.colorPrimary,lineHeight:te(n),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${a}-text`]:{color:e.badgeTextColor},[`${a}-corner`]:{position:"absolute",top:"100%",width:i,height:i,color:"currentcolor",border:`${te(o(i).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),u),{[`&${a}-placement-end`]:{insetInlineEnd:o(i).mul(-1).equal(),borderEndEndRadius:0,[`${a}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${a}-placement-start`]:{insetInlineStart:o(i).mul(-1).equal(),borderEndStartRadius:0,[`${a}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},VB=yn(["Badge","Ribbon"],e=>{const t=u$(e);return WB(t)},d$),qB=e=>{const{className:t,prefixCls:n,style:r,color:i,children:o,text:a,placement:c="end",rootClassName:u}=e,{getPrefixCls:d,direction:f}=h.useContext(Ot),p=d("ribbon",n),g=`${p}-wrapper`,[v,b,_]=VB(p,g),S=tm(i,!1),C=ne(p,`${p}-placement-${c}`,{[`${p}-rtl`]:f==="rtl",[`${p}-color-${i}`]:S},t),E={},k={};return i&&!S&&(E.background=i,k.color=i),v(h.createElement("div",{className:ne(g,u,b,_)},o,h.createElement("div",{className:ne(C,b),style:Object.assign(Object.assign({},E),r)},h.createElement("span",{className:`${p}-text`},a),h.createElement("div",{className:`${p}-corner`,style:k}))))},ZC=e=>{const{prefixCls:t,value:n,current:r,offset:i=0}=e;let o;return i&&(o={position:"absolute",top:`${i}00%`,left:0}),h.createElement("span",{style:o,className:ne(`${t}-only-unit`,{current:r})},n)};function UB(e,t,n){let r=e,i=0;for(;(r+10)%10!==t;)r+=n,i+=n;return i}const KB=e=>{const{prefixCls:t,count:n,value:r}=e,i=Number(r),o=Math.abs(n),[a,c]=h.useState(i),[u,d]=h.useState(o),f=()=>{c(i),d(o)};h.useEffect(()=>{const v=setTimeout(f,1e3);return()=>clearTimeout(v)},[i]);let p,g;if(a===i||Number.isNaN(i)||Number.isNaN(a))p=[h.createElement(ZC,Object.assign({},e,{key:i,current:!0}))],g={transition:"none"};else{p=[];const v=i+10,b=[];for(let E=i;E<=v;E+=1)b.push(E);const _=u<o?1:-1,S=b.findIndex(E=>E%10===a);p=(_<0?b.slice(0,S+1):b.slice(S)).map((E,k)=>{const $=E%10;return h.createElement(ZC,Object.assign({},e,{key:E,value:$,offset:_<0?k-S:k,current:k===S}))}),g={transform:`translateY(${-UB(a,i,_)}00%)`}}return h.createElement("span",{className:`${t}-only`,style:g,onTransitionEnd:f},p)};var GB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const XB=h.forwardRef((e,t)=>{const{prefixCls:n,count:r,className:i,motionClassName:o,style:a,title:c,show:u,component:d="sup",children:f}=e,p=GB(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:g}=h.useContext(Ot),v=g("scroll-number",n),b=Object.assign(Object.assign({},p),{"data-show":u,style:a,className:ne(v,i,o),title:c});let _=r;if(r&&Number(r)%1===0){const S=String(r).split("");_=h.createElement("bdi",null,S.map((C,E)=>h.createElement(KB,{prefixCls:v,count:Number(r),value:C,key:S.length-E})))}return a!=null&&a.borderColor&&(b.style=Object.assign(Object.assign({},a),{boxShadow:`0 0 0 1px ${a.borderColor} inset`})),f?fi(f,S=>({className:ne(`${v}-custom-component`,S==null?void 0:S.className,o)})):h.createElement(d,Object.assign({},b,{ref:t}),_)});var YB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const JB=h.forwardRef((e,t)=>{var n,r,i,o,a;const{prefixCls:c,scrollNumberPrefixCls:u,children:d,status:f,text:p,color:g,count:v=null,overflowCount:b=99,dot:_=!1,size:S="default",title:C,offset:E,style:k,className:$,rootClassName:P,classNames:T,styles:O,showZero:N=!1}=e,I=YB(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:z,direction:A,badge:M}=h.useContext(Ot),j=z("badge",c),[B,F,W]=FB(j),V=v>b?`${b}+`:v,L=V==="0"||V===0||p==="0"||p===0,G=v===null||L&&!N,U=(f!=null||g!=null)&&G,D=f!=null||!L,q=_&&!L,Y=q?"":V,ee=h.useMemo(()=>((Y==null||Y==="")&&(p==null||p==="")||L&&!N)&&!q,[Y,L,N,q,p]),Z=h.useRef(v);ee||(Z.current=v);const re=Z.current,he=h.useRef(Y);ee||(he.current=Y);const fe=he.current,ue=h.useRef(q);ee||(ue.current=q);const Se=h.useMemo(()=>{if(!E)return Object.assign(Object.assign({},M==null?void 0:M.style),k);const Te={marginTop:E[1]};return A==="rtl"?Te.left=Number.parseInt(E[0],10):Te.right=-Number.parseInt(E[0],10),Object.assign(Object.assign(Object.assign({},Te),M==null?void 0:M.style),k)},[A,E,k,M==null?void 0:M.style]),ae=C??(typeof re=="string"||typeof re=="number"?re:void 0),le=!ee&&(p===0?N:!!p&&p!==!0),ce=le?h.createElement("span",{className:`${j}-status-text`},p):null,ye=!re||typeof re!="object"?void 0:fi(re,Te=>({style:Object.assign(Object.assign({},Se),Te.style)})),me=tm(g,!1),de=ne(T==null?void 0:T.indicator,(n=M==null?void 0:M.classNames)===null||n===void 0?void 0:n.indicator,{[`${j}-status-dot`]:U,[`${j}-status-${f}`]:!!f,[`${j}-color-${g}`]:me}),be={};g&&!me&&(be.color=g,be.background=g);const xe=ne(j,{[`${j}-status`]:U,[`${j}-not-a-wrapper`]:!d,[`${j}-rtl`]:A==="rtl"},$,P,M==null?void 0:M.className,(r=M==null?void 0:M.classNames)===null||r===void 0?void 0:r.root,T==null?void 0:T.root,F,W);if(!d&&U&&(p||D||!G)){const Te=Se.color;return B(h.createElement("span",Object.assign({},I,{className:xe,style:Object.assign(Object.assign(Object.assign({},O==null?void 0:O.root),(i=M==null?void 0:M.styles)===null||i===void 0?void 0:i.root),Se)}),h.createElement("span",{className:de,style:Object.assign(Object.assign(Object.assign({},O==null?void 0:O.indicator),(o=M==null?void 0:M.styles)===null||o===void 0?void 0:o.indicator),be)}),le&&h.createElement("span",{style:{color:Te},className:`${j}-status-text`},p)))}return B(h.createElement("span",Object.assign({ref:t},I,{className:xe,style:Object.assign(Object.assign({},(a=M==null?void 0:M.styles)===null||a===void 0?void 0:a.root),O==null?void 0:O.root)}),d,h.createElement(Vi,{visible:!ee,motionName:`${j}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:Te})=>{var ze,Ee;const ke=z("scroll-number",u),je=ue.current,Oe=ne(T==null?void 0:T.indicator,(ze=M==null?void 0:M.classNames)===null||ze===void 0?void 0:ze.indicator,{[`${j}-dot`]:je,[`${j}-count`]:!je,[`${j}-count-sm`]:S==="small",[`${j}-multiple-words`]:!je&&fe&&fe.toString().length>1,[`${j}-status-${f}`]:!!f,[`${j}-color-${g}`]:me});let Qe=Object.assign(Object.assign(Object.assign({},O==null?void 0:O.indicator),(Ee=M==null?void 0:M.styles)===null||Ee===void 0?void 0:Ee.indicator),Se);return g&&!me&&(Qe=Qe||{},Qe.background=g),h.createElement(XB,{prefixCls:ke,show:!ee,motionClassName:Te,className:Oe,count:fe,title:ae,style:Qe,key:"scrollNumber"},ye)}),ce))}),Dy=JB;Dy.Ribbon=qB;var QB={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},ZB=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:QB}))},wu=h.forwardRef(ZB),eL=Ge.ESC,tL=Ge.TAB;function nL(e){var t=e.visible,n=e.triggerRef,r=e.onVisibleChange,i=e.autoFocus,o=e.overlayRef,a=h.useRef(!1),c=function(){if(t){var p,g;(p=n.current)===null||p===void 0||(g=p.focus)===null||g===void 0||g.call(p),r==null||r(!1)}},u=function(){var p;return(p=o.current)!==null&&p!==void 0&&p.focus?(o.current.focus(),a.current=!0,!0):!1},d=function(p){switch(p.keyCode){case eL:c();break;case tL:{var g=!1;a.current||(g=u()),g?p.preventDefault():c();break}}};h.useEffect(function(){return t?(window.addEventListener("keydown",d),i&&Rn(u,3),function(){window.removeEventListener("keydown",d),a.current=!1}):function(){a.current=!1}},[t])}var rL=h.forwardRef(function(e,t){var n=e.overlay,r=e.arrow,i=e.prefixCls,o=h.useMemo(function(){var c;return typeof n=="function"?c=n():c=n,c},[n]),a=ho(t,ja(o));return Q.createElement(Q.Fragment,null,r&&Q.createElement("div",{className:"".concat(i,"-arrow")}),Q.cloneElement(o,{ref:ta(o)?a:void 0}))}),Cl={adjustX:1,adjustY:1},xl=[0,0],iL={topLeft:{points:["bl","tl"],overflow:Cl,offset:[0,-4],targetOffset:xl},top:{points:["bc","tc"],overflow:Cl,offset:[0,-4],targetOffset:xl},topRight:{points:["br","tr"],overflow:Cl,offset:[0,-4],targetOffset:xl},bottomLeft:{points:["tl","bl"],overflow:Cl,offset:[0,4],targetOffset:xl},bottom:{points:["tc","bc"],overflow:Cl,offset:[0,4],targetOffset:xl},bottomRight:{points:["tr","br"],overflow:Cl,offset:[0,4],targetOffset:xl}},oL=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function sL(e,t){var n,r=e.arrow,i=r===void 0?!1:r,o=e.prefixCls,a=o===void 0?"rc-dropdown":o,c=e.transitionName,u=e.animation,d=e.align,f=e.placement,p=f===void 0?"bottomLeft":f,g=e.placements,v=g===void 0?iL:g,b=e.getPopupContainer,_=e.showAction,S=e.hideAction,C=e.overlayClassName,E=e.overlayStyle,k=e.visible,$=e.trigger,P=$===void 0?["hover"]:$,T=e.autoFocus,O=e.overlay,N=e.children,I=e.onVisibleChange,z=Lt(e,oL),A=Q.useState(),M=se(A,2),j=M[0],B=M[1],F="visible"in e?k:j,W=Q.useRef(null),V=Q.useRef(null),L=Q.useRef(null);Q.useImperativeHandle(t,function(){return W.current});var G=function(fe){B(fe),I==null||I(fe)};nL({visible:F,triggerRef:L,onVisibleChange:G,autoFocus:T,overlayRef:V});var U=function(fe){var ue=e.onOverlayClick;B(!1),ue&&ue(fe)},D=function(){return Q.createElement(rL,{ref:V,overlay:O,prefixCls:a,arrow:i})},q=function(){return typeof O=="function"?D:D()},Y=function(){var fe=e.minOverlayWidthMatchTrigger,ue=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?fe:!ue},ee=function(){var fe=e.openClassName;return fe!==void 0?fe:"".concat(a,"-open")},Z=Q.cloneElement(N,{className:ne((n=N.props)===null||n===void 0?void 0:n.className,F&&ee()),ref:ta(N)?ho(L,ja(N)):void 0}),re=S;return!re&&P.indexOf("contextMenu")!==-1&&(re=["click"]),Q.createElement(Zf,Re({builtinPlacements:v},z,{prefixCls:a,ref:W,popupClassName:ne(C,K({},"".concat(a,"-show-arrow"),i)),popupStyle:E,action:P,showAction:_,hideAction:re,popupPlacement:p,popupAlign:d,popupTransitionName:c,popupAnimation:u,popupVisible:F,stretch:Y()?"minWidth":"",popup:q(),onPopupVisibleChange:G,onPopupClick:U,getPopupContainer:b}),Z)}const h$=Q.forwardRef(sL),aL=e=>typeof e!="object"&&typeof e!="function"||e===null;var f$=h.createContext(null);function m$(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function p$(e){var t=h.useContext(f$);return m$(t,e)}var lL=["children","locked"],To=h.createContext(null);function cL(e,t){var n=X({},e);return Object.keys(t).forEach(function(r){var i=t[r];i!==void 0&&(n[r]=i)}),n}function Eu(e){var t=e.children,n=e.locked,r=Lt(e,lL),i=h.useContext(To),o=Nu(function(){return cL(i,r)},[i,r],function(a,c){return!n&&(a[0]!==c[0]||!gu(a[1],c[1],!0))});return h.createElement(To.Provider,{value:o},t)}var uL=[],g$=h.createContext(null);function nm(){return h.useContext(g$)}var v$=h.createContext(uL);function rc(e){var t=h.useContext(v$);return h.useMemo(function(){return e!==void 0?[].concat(We(t),[e]):t},[t,e])}var y$=h.createContext(null),Hy=h.createContext({});function ex(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Cy(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),i=e.getAttribute("tabindex"),o=Number(i),a=null;return i&&!Number.isNaN(o)?a=o:r&&a===null&&(a=0),r&&e.disabled&&(a=null),a!==null&&(a>=0||t&&a<0)}return!1}function dL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=We(e.querySelectorAll("*")).filter(function(r){return ex(r,t)});return ex(e,t)&&n.unshift(e),n}var o0=Ge.LEFT,s0=Ge.RIGHT,a0=Ge.UP,Nh=Ge.DOWN,Mh=Ge.ENTER,b$=Ge.ESC,Bc=Ge.HOME,Lc=Ge.END,tx=[a0,Nh,o0,s0];function hL(e,t,n,r){var i,o="prev",a="next",c="children",u="parent";if(e==="inline"&&r===Mh)return{inlineTrigger:!0};var d=K(K({},a0,o),Nh,a),f=K(K(K(K({},o0,n?a:o),s0,n?o:a),Nh,c),Mh,c),p=K(K(K(K(K(K({},a0,o),Nh,a),Mh,c),b$,u),o0,n?c:u),s0,n?u:c),g={inline:d,horizontal:f,vertical:p,inlineSub:d,horizontalSub:p,verticalSub:p},v=(i=g["".concat(e).concat(t?"":"Sub")])===null||i===void 0?void 0:i[r];switch(v){case o:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case u:return{offset:-1,sibling:!1};case c:return{offset:1,sibling:!1};default:return null}}function fL(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function mL(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}function Fy(e,t){var n=dL(e,!0);return n.filter(function(r){return t.has(r)})}function nx(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var i=Fy(e,t),o=i.length,a=i.findIndex(function(c){return n===c});return r<0?a===-1?a=o-1:a-=1:r>0&&(a+=1),a=(a+o)%o,i[a]}var l0=function(t,n){var r=new Set,i=new Map,o=new Map;return t.forEach(function(a){var c=document.querySelector("[data-menu-id='".concat(m$(n,a),"']"));c&&(r.add(c),o.set(c,a),i.set(a,c))}),{elements:r,key2element:i,element2key:o}};function pL(e,t,n,r,i,o,a,c,u,d){var f=h.useRef(),p=h.useRef();p.current=t;var g=function(){Rn.cancel(f.current)};return h.useEffect(function(){return function(){g()}},[]),function(v){var b=v.which;if([].concat(tx,[Mh,b$,Bc,Lc]).includes(b)){var _=o(),S=l0(_,r),C=S,E=C.elements,k=C.key2element,$=C.element2key,P=k.get(t),T=mL(P,E),O=$.get(T),N=hL(e,a(O,!0).length===1,n,b);if(!N&&b!==Bc&&b!==Lc)return;(tx.includes(b)||[Bc,Lc].includes(b))&&v.preventDefault();var I=function(V){if(V){var L=V,G=V.querySelector("a");G!=null&&G.getAttribute("href")&&(L=G);var U=$.get(V);c(U),g(),f.current=Rn(function(){p.current===U&&L.focus()})}};if([Bc,Lc].includes(b)||N.sibling||!T){var z;!T||e==="inline"?z=i.current:z=fL(T);var A,M=Fy(z,E);b===Bc?A=M[0]:b===Lc?A=M[M.length-1]:A=nx(z,E,T,N.offset),I(A)}else if(N.inlineTrigger)u(O);else if(N.offset>0)u(O,!0),g(),f.current=Rn(function(){S=l0(_,r);var W=T.getAttribute("aria-controls"),V=document.getElementById(W),L=nx(V,S.elements);I(L)},5);else if(N.offset<0){var j=a(O,!0),B=j[j.length-2],F=k.get(B);u(B,!1),I(F)}}d==null||d(v)}}function gL(e){Promise.resolve().then(e)}var Wy="__RC_UTIL_PATH_SPLIT__",rx=function(t){return t.join(Wy)},vL=function(t){return t.split(Wy)},c0="rc-menu-more";function yL(){var e=h.useState({}),t=se(e,2),n=t[1],r=h.useRef(new Map),i=h.useRef(new Map),o=h.useState([]),a=se(o,2),c=a[0],u=a[1],d=h.useRef(0),f=h.useRef(!1),p=function(){f.current||n({})},g=h.useCallback(function(k,$){var P=rx($);i.current.set(P,k),r.current.set(k,P),d.current+=1;var T=d.current;gL(function(){T===d.current&&p()})},[]),v=h.useCallback(function(k,$){var P=rx($);i.current.delete(P),r.current.delete(k)},[]),b=h.useCallback(function(k){u(k)},[]),_=h.useCallback(function(k,$){var P=r.current.get(k)||"",T=vL(P);return $&&c.includes(T[0])&&T.unshift(c0),T},[c]),S=h.useCallback(function(k,$){return k.filter(function(P){return P!==void 0}).some(function(P){var T=_(P,!0);return T.includes($)})},[_]),C=function(){var $=We(r.current.keys());return c.length&&$.push(c0),$},E=h.useCallback(function(k){var $="".concat(r.current.get(k)).concat(Wy),P=new Set;return We(i.current.keys()).forEach(function(T){T.startsWith($)&&P.add(i.current.get(T))}),P},[]);return h.useEffect(function(){return function(){f.current=!0}},[]),{registerPath:g,unregisterPath:v,refreshOverflowKeys:b,isSubPathKey:S,getKeyPath:_,getKeys:C,getSubPathKeys:E}}function Qc(e){var t=h.useRef(e);t.current=e;var n=h.useCallback(function(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(o))},[]);return e?n:void 0}var bL=Math.random().toFixed(5).toString().slice(2),ix=0;function _L(e){var t=er(e,{value:e}),n=se(t,2),r=n[0],i=n[1];return h.useEffect(function(){ix+=1;var o="".concat(bL,"-").concat(ix);i("rc-menu-uuid-".concat(o))},[]),r}function _$(e,t,n,r){var i=h.useContext(To),o=i.activeKey,a=i.onActive,c=i.onInactive,u={active:o===e};return t||(u.onMouseEnter=function(d){n==null||n({key:e,domEvent:d}),a(e)},u.onMouseLeave=function(d){r==null||r({key:e,domEvent:d}),c(e)}),u}function S$(e){var t=h.useContext(To),n=t.mode,r=t.rtl,i=t.inlineIndent;if(n!=="inline")return null;var o=e;return r?{paddingRight:o*i}:{paddingLeft:o*i}}function C$(e){var t=e.icon,n=e.props,r=e.children,i;return t===null||t===!1?null:(typeof t=="function"?i=h.createElement(t,X({},n)):typeof t!="boolean"&&(i=t),i||r||null)}var SL=["item"];function af(e){var t=e.item,n=Lt(e,SL);return Object.defineProperty(n,"item",{get:function(){return Br(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}var CL=["title","attribute","elementRef"],xL=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],wL=["active"],EL=(function(e){ms(n,e);var t=ps(n);function n(){return gr(this,n),t.apply(this,arguments)}return vr(n,[{key:"render",value:function(){var i=this.props,o=i.title,a=i.attribute,c=i.elementRef,u=Lt(i,CL),d=dr(u,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Br(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),h.createElement(Wo.Item,Re({},a,{title:typeof o=="string"?o:void 0},d,{ref:c}))}}]),n})(h.Component),kL=h.forwardRef(function(e,t){var n=e.style,r=e.className,i=e.eventKey;e.warnKey;var o=e.disabled,a=e.itemIcon,c=e.children,u=e.role,d=e.onMouseEnter,f=e.onMouseLeave,p=e.onClick,g=e.onKeyDown,v=e.onFocus,b=Lt(e,xL),_=p$(i),S=h.useContext(To),C=S.prefixCls,E=S.onItemClick,k=S.disabled,$=S.overflowDisabled,P=S.itemIcon,T=S.selectedKeys,O=S.onActive,N=h.useContext(Hy),I=N._internalRenderMenuItem,z="".concat(C,"-item"),A=h.useRef(),M=h.useRef(),j=k||o,B=Xo(t,M),F=rc(i),W=function(ue){return{key:i,keyPath:We(F).reverse(),item:A.current,domEvent:ue}},V=a||P,L=_$(i,j,d,f),G=L.active,U=Lt(L,wL),D=T.includes(i),q=S$(F.length),Y=function(ue){if(!j){var Se=W(ue);p==null||p(af(Se)),E(Se)}},ee=function(ue){if(g==null||g(ue),ue.which===Ge.ENTER){var Se=W(ue);p==null||p(af(Se)),E(Se)}},Z=function(ue){O(i),v==null||v(ue)},re={};e.role==="option"&&(re["aria-selected"]=D);var he=h.createElement(EL,Re({ref:A,elementRef:B,role:u===null?"none":u||"menuitem",tabIndex:o?null:-1,"data-menu-id":$&&_?null:_},dr(b,["extra"]),U,re,{component:"li","aria-disabled":o,style:X(X({},q),n),className:ne(z,K(K(K({},"".concat(z,"-active"),G),"".concat(z,"-selected"),D),"".concat(z,"-disabled"),j),r),onClick:Y,onKeyDown:ee,onFocus:Z}),c,h.createElement(C$,{props:X(X({},e),{},{isSelected:D}),icon:V}));return I&&(he=I(he,e,{selected:D})),he});function $L(e,t){var n=e.eventKey,r=nm(),i=rc(n);return h.useEffect(function(){if(r)return r.registerPath(n,i),function(){r.unregisterPath(n,i)}},[i]),r?null:h.createElement(kL,Re({},e,{ref:t}))}const Ku=h.forwardRef($L);var RL=["className","children"],TL=function(t,n){var r=t.className,i=t.children,o=Lt(t,RL),a=h.useContext(To),c=a.prefixCls,u=a.mode,d=a.rtl;return h.createElement("ul",Re({className:ne(c,d&&"".concat(c,"-rtl"),"".concat(c,"-sub"),"".concat(c,"-").concat(u==="inline"?"inline":"vertical"),r),role:"menu"},o,{"data-menu-list":!0,ref:n}),i)},Vy=h.forwardRef(TL);Vy.displayName="SubMenuList";function qy(e,t){return hi(e).map(function(n,r){if(h.isValidElement(n)){var i,o,a=n.key,c=(i=(o=n.props)===null||o===void 0?void 0:o.eventKey)!==null&&i!==void 0?i:a,u=c==null;u&&(c="tmp_key-".concat([].concat(We(t),[r]).join("-")));var d={key:c,eventKey:c};return h.cloneElement(n,d)}return n})}var ri={adjustX:1,adjustY:1},PL={topLeft:{points:["bl","tl"],overflow:ri},topRight:{points:["br","tr"],overflow:ri},bottomLeft:{points:["tl","bl"],overflow:ri},bottomRight:{points:["tr","br"],overflow:ri},leftTop:{points:["tr","tl"],overflow:ri},leftBottom:{points:["br","bl"],overflow:ri},rightTop:{points:["tl","tr"],overflow:ri},rightBottom:{points:["bl","br"],overflow:ri}},OL={topLeft:{points:["bl","tl"],overflow:ri},topRight:{points:["br","tr"],overflow:ri},bottomLeft:{points:["tl","bl"],overflow:ri},bottomRight:{points:["tr","br"],overflow:ri},rightTop:{points:["tr","tl"],overflow:ri},rightBottom:{points:["br","bl"],overflow:ri},leftTop:{points:["tl","tr"],overflow:ri},leftBottom:{points:["bl","br"],overflow:ri}};function x$(e,t,n){if(t)return t;if(n)return n[e]||n.other}var IL={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function NL(e){var t=e.prefixCls,n=e.visible,r=e.children,i=e.popup,o=e.popupStyle,a=e.popupClassName,c=e.popupOffset,u=e.disabled,d=e.mode,f=e.onVisibleChange,p=h.useContext(To),g=p.getPopupContainer,v=p.rtl,b=p.subMenuOpenDelay,_=p.subMenuCloseDelay,S=p.builtinPlacements,C=p.triggerSubMenuAction,E=p.forceSubMenuRender,k=p.rootClassName,$=p.motion,P=p.defaultMotions,T=h.useState(!1),O=se(T,2),N=O[0],I=O[1],z=X(v?X({},OL):X({},PL),S),A=IL[d],M=x$(d,$,P),j=h.useRef(M);d!=="inline"&&(j.current=M);var B=X(X({},j.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),F=h.useRef();return h.useEffect(function(){return F.current=Rn(function(){I(n)}),function(){Rn.cancel(F.current)}},[n]),h.createElement(Zf,{prefixCls:t,popupClassName:ne("".concat(t,"-popup"),K({},"".concat(t,"-rtl"),v),a,k),stretch:d==="horizontal"?"minWidth":null,getPopupContainer:g,builtinPlacements:z,popupPlacement:A,popupVisible:N,popup:i,popupStyle:o,popupAlign:c&&{offset:c},action:u?[]:[C],mouseEnterDelay:b,mouseLeaveDelay:_,onPopupVisibleChange:f,forceRender:E,popupMotion:B,fresh:!0},r)}function ML(e){var t=e.id,n=e.open,r=e.keyPath,i=e.children,o="inline",a=h.useContext(To),c=a.prefixCls,u=a.forceSubMenuRender,d=a.motion,f=a.defaultMotions,p=a.mode,g=h.useRef(!1);g.current=p===o;var v=h.useState(!g.current),b=se(v,2),_=b[0],S=b[1],C=g.current?n:!1;h.useEffect(function(){g.current&&S(!1)},[p]);var E=X({},x$(o,d,f));r.length>1&&(E.motionAppear=!1);var k=E.onVisibleChanged;return E.onVisibleChanged=function($){return!g.current&&!$&&S(!0),k==null?void 0:k($)},_?null:h.createElement(Eu,{mode:o,locked:!g.current},h.createElement(Vi,Re({visible:C},E,{forceRender:u,removeOnLeave:!1,leavedClassName:"".concat(c,"-hidden")}),function($){var P=$.className,T=$.style;return h.createElement(Vy,{id:t,className:P,style:T},i)}))}var zL=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],jL=["active"],BL=h.forwardRef(function(e,t){var n=e.style,r=e.className,i=e.title,o=e.eventKey;e.warnKey;var a=e.disabled,c=e.internalPopupClose,u=e.children,d=e.itemIcon,f=e.expandIcon,p=e.popupClassName,g=e.popupOffset,v=e.popupStyle,b=e.onClick,_=e.onMouseEnter,S=e.onMouseLeave,C=e.onTitleClick,E=e.onTitleMouseEnter,k=e.onTitleMouseLeave,$=Lt(e,zL),P=p$(o),T=h.useContext(To),O=T.prefixCls,N=T.mode,I=T.openKeys,z=T.disabled,A=T.overflowDisabled,M=T.activeKey,j=T.selectedKeys,B=T.itemIcon,F=T.expandIcon,W=T.onItemClick,V=T.onOpenChange,L=T.onActive,G=h.useContext(Hy),U=G._internalRenderSubMenuItem,D=h.useContext(y$),q=D.isSubPathKey,Y=rc(),ee="".concat(O,"-submenu"),Z=z||a,re=h.useRef(),he=h.useRef(),fe=d??B,ue=f??F,Se=I.includes(o),ae=!A&&Se,le=q(j,o),ce=_$(o,Z,E,k),ye=ce.active,me=Lt(ce,jL),de=h.useState(!1),be=se(de,2),xe=be[0],Te=be[1],ze=function(Me){Z||Te(Me)},Ee=function(Me){ze(!0),_==null||_({key:o,domEvent:Me})},ke=function(Me){ze(!1),S==null||S({key:o,domEvent:Me})},je=h.useMemo(function(){return ye||(N!=="inline"?xe||q([M],o):!1)},[N,ye,M,xe,o,q]),Oe=S$(Y.length),Qe=function(Me){Z||(C==null||C({key:o,domEvent:Me}),N==="inline"&&V(o,!Se))},at=Qc(function(rt){b==null||b(af(rt)),W(rt)}),$t=function(Me){N!=="inline"&&V(o,Me)},pt=function(){L(o)},Je=P&&"".concat(P,"-popup"),ft=h.useMemo(function(){return h.createElement(C$,{icon:N!=="horizontal"?ue:void 0,props:X(X({},e),{},{isOpen:ae,isSubMenu:!0})},h.createElement("i",{className:"".concat(ee,"-arrow")}))},[N,ue,e,ae,ee]),Xe=h.createElement("div",Re({role:"menuitem",style:Oe,className:"".concat(ee,"-title"),tabIndex:Z?null:-1,ref:re,title:typeof i=="string"?i:null,"data-menu-id":A&&P?null:P,"aria-expanded":ae,"aria-haspopup":!0,"aria-controls":Je,"aria-disabled":Z,onClick:Qe,onFocus:pt},me),i,ft),yt=h.useRef(N);if(N!=="inline"&&Y.length>1?yt.current="vertical":yt.current=N,!A){var tt=yt.current;Xe=h.createElement(NL,{mode:tt,prefixCls:ee,visible:!c&&ae&&N!=="inline",popupClassName:p,popupOffset:g,popupStyle:v,popup:h.createElement(Eu,{mode:tt==="horizontal"?"vertical":tt},h.createElement(Vy,{id:Je,ref:he},u)),disabled:Z,onVisibleChange:$t},Xe)}var Le=h.createElement(Wo.Item,Re({ref:t,role:"none"},$,{component:"li",style:n,className:ne(ee,"".concat(ee,"-").concat(N),r,K(K(K(K({},"".concat(ee,"-open"),ae),"".concat(ee,"-active"),je),"".concat(ee,"-selected"),le),"".concat(ee,"-disabled"),Z)),onMouseEnter:Ee,onMouseLeave:ke}),Xe,!A&&h.createElement(ML,{id:Je,open:ae,keyPath:Y},u));return U&&(Le=U(Le,e,{selected:le,active:je,open:ae,disabled:Z})),h.createElement(Eu,{onItemClick:at,mode:N==="horizontal"?"vertical":N,itemIcon:fe,expandIcon:ue},Le)}),rm=h.forwardRef(function(e,t){var n=e.eventKey,r=e.children,i=rc(n),o=qy(r,i),a=nm();h.useEffect(function(){if(a)return a.registerPath(n,i),function(){a.unregisterPath(n,i)}},[i]);var c;return a?c=o:c=h.createElement(BL,Re({ref:t},e),o),h.createElement(v$.Provider,{value:i},c)});function Uy(e){var t=e.className,n=e.style,r=h.useContext(To),i=r.prefixCls,o=nm();return o?null:h.createElement("li",{role:"separator",className:ne("".concat(i,"-item-divider"),t),style:n})}var LL=["className","title","eventKey","children"],AL=h.forwardRef(function(e,t){var n=e.className,r=e.title;e.eventKey;var i=e.children,o=Lt(e,LL),a=h.useContext(To),c=a.prefixCls,u="".concat(c,"-item-group");return h.createElement("li",Re({ref:t,role:"presentation"},o,{onClick:function(f){return f.stopPropagation()},className:ne(u,n)}),h.createElement("div",{role:"presentation",className:"".concat(u,"-title"),title:typeof r=="string"?r:void 0},r),h.createElement("ul",{role:"group",className:"".concat(u,"-list")},i))}),Ky=h.forwardRef(function(e,t){var n=e.eventKey,r=e.children,i=rc(n),o=qy(r,i),a=nm();return a?o:h.createElement(AL,Re({ref:t},dr(e,["warnKey"])),o)}),DL=["label","children","key","type","extra"];function u0(e,t,n){var r=t.item,i=t.group,o=t.submenu,a=t.divider;return(e||[]).map(function(c,u){if(c&&_t(c)==="object"){var d=c,f=d.label,p=d.children,g=d.key,v=d.type,b=d.extra,_=Lt(d,DL),S=g??"tmp-".concat(u);return p||v==="group"?v==="group"?h.createElement(i,Re({key:S},_,{title:f}),u0(p,t,n)):h.createElement(o,Re({key:S},_,{title:f}),u0(p,t,n)):v==="divider"?h.createElement(a,Re({key:S},_)):h.createElement(r,Re({key:S},_,{extra:b}),f,(!!b||b===0)&&h.createElement("span",{className:"".concat(n,"-item-extra")},b))}return null}).filter(function(c){return c})}function ox(e,t,n,r,i){var o=e,a=X({divider:Uy,item:Ku,group:Ky,submenu:rm},r);return t&&(o=u0(t,a,i)),qy(o,n)}var HL=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],ma=[],FL=h.forwardRef(function(e,t){var n,r=e,i=r.prefixCls,o=i===void 0?"rc-menu":i,a=r.rootClassName,c=r.style,u=r.className,d=r.tabIndex,f=d===void 0?0:d,p=r.items,g=r.children,v=r.direction,b=r.id,_=r.mode,S=_===void 0?"vertical":_,C=r.inlineCollapsed,E=r.disabled,k=r.disabledOverflow,$=r.subMenuOpenDelay,P=$===void 0?.1:$,T=r.subMenuCloseDelay,O=T===void 0?.1:T,N=r.forceSubMenuRender,I=r.defaultOpenKeys,z=r.openKeys,A=r.activeKey,M=r.defaultActiveFirst,j=r.selectable,B=j===void 0?!0:j,F=r.multiple,W=F===void 0?!1:F,V=r.defaultSelectedKeys,L=r.selectedKeys,G=r.onSelect,U=r.onDeselect,D=r.inlineIndent,q=D===void 0?24:D,Y=r.motion,ee=r.defaultMotions,Z=r.triggerSubMenuAction,re=Z===void 0?"hover":Z,he=r.builtinPlacements,fe=r.itemIcon,ue=r.expandIcon,Se=r.overflowedIndicator,ae=Se===void 0?"...":Se,le=r.overflowedIndicatorPopupClassName,ce=r.getPopupContainer,ye=r.onClick,me=r.onOpenChange,de=r.onKeyDown;r.openAnimation,r.openTransitionName;var be=r._internalRenderMenuItem,xe=r._internalRenderSubMenuItem,Te=r._internalComponents,ze=Lt(r,HL),Ee=h.useMemo(function(){return[ox(g,p,ma,Te,o),ox(g,p,ma,{},o)]},[g,p,Te]),ke=se(Ee,2),je=ke[0],Oe=ke[1],Qe=h.useState(!1),at=se(Qe,2),$t=at[0],pt=at[1],Je=h.useRef(),ft=_L(b),Xe=v==="rtl",yt=er(I,{value:z,postState:function(ut){return ut||ma}}),tt=se(yt,2),Le=tt[0],rt=tt[1],Me=function(ut){var st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function an(){rt(ut),me==null||me(ut)}st?Xs.flushSync(an):an()},Ue=h.useState(Le),It=se(Ue,2),St=It[0],nn=It[1],Jt=h.useRef(!1),bn=h.useMemo(function(){return(S==="inline"||S==="vertical")&&C?["vertical",C]:[S,!1]},[S,C]),On=se(bn,2),on=On[0],Ht=On[1],Rt=on==="inline",sn=h.useState(on),Xt=se(sn,2),ot=Xt[0],Et=Xt[1],mt=h.useState(Ht),Ie=se(mt,2),$e=Ie[0],we=Ie[1];h.useEffect(function(){Et(on),we(Ht),Jt.current&&(Rt?rt(St):Me(ma))},[on,Ht]);var Ae=h.useState(0),et=se(Ae,2),nt=et[0],Ft=et[1],Kt=nt>=je.length-1||ot!=="horizontal"||k;h.useEffect(function(){Rt&&nn(Le)},[Le]),h.useEffect(function(){return Jt.current=!0,function(){Jt.current=!1}},[]);var Bt=yL(),At=Bt.registerPath,Tn=Bt.unregisterPath,En=Bt.refreshOverflowKeys,In=Bt.isSubPathKey,Dn=Bt.getKeyPath,ln=Bt.getKeys,fn=Bt.getSubPathKeys,He=h.useMemo(function(){return{registerPath:At,unregisterPath:Tn}},[At,Tn]),Ye=h.useMemo(function(){return{isSubPathKey:In}},[In]);h.useEffect(function(){En(Kt?ma:je.slice(nt+1).map(function(un){return un.key}))},[nt,Kt]);var Pt=er(A||M&&((n=je[0])===null||n===void 0?void 0:n.key),{value:A}),gt=se(Pt,2),lt=gt[0],Ze=gt[1],Tt=Qc(function(un){Ze(un)}),Gt=Qc(function(){Ze(void 0)});h.useImperativeHandle(t,function(){return{list:Je.current,focus:function(ut){var st,an=ln(),dn=l0(an,ft),_n=dn.elements,xn=dn.key2element,Dr=dn.element2key,or=Fy(Je.current,_n),qt=lt??(or[0]?Dr.get(or[0]):(st=je.find(function(vi){return!vi.props.disabled}))===null||st===void 0?void 0:st.key),_r=xn.get(qt);if(qt&&_r){var $r;_r==null||($r=_r.focus)===null||$r===void 0||$r.call(_r,ut)}}}});var Ke=er(V||[],{value:L,postState:function(ut){return Array.isArray(ut)?ut:ut==null?ma:[ut]}}),vt=se(Ke,2),Nt=vt[0],pn=vt[1],ir=function(ut){if(B){var st=ut.key,an=Nt.includes(st),dn;W?an?dn=Nt.filter(function(xn){return xn!==st}):dn=[].concat(We(Nt),[st]):dn=[st],pn(dn);var _n=X(X({},ut),{},{selectedKeys:dn});an?U==null||U(_n):G==null||G(_n)}!W&&Le.length&&ot!=="inline"&&Me(ma)},Bn=Qc(function(un){ye==null||ye(af(un)),ir(un)}),Kr=Qc(function(un,ut){var st=Le.filter(function(dn){return dn!==un});if(ut)st.push(un);else if(ot!=="inline"){var an=fn(un);st=st.filter(function(dn){return!an.has(dn)})}gu(Le,st,!0)||Me(st,!0)}),yr=function(ut,st){var an=st??!Le.includes(ut);Kr(ut,an)},Gr=pL(ot,lt,Xe,ft,Je,ln,Dn,Ze,yr,de);h.useEffect(function(){pt(!0)},[]);var br=h.useMemo(function(){return{_internalRenderMenuItem:be,_internalRenderSubMenuItem:xe}},[be,xe]),Ar=ot!=="horizontal"||k?je:je.map(function(un,ut){return h.createElement(Eu,{key:un.key,overflowDisabled:ut>nt},un)}),Xr=h.createElement(Wo,Re({id:b,ref:Je,prefixCls:"".concat(o,"-overflow"),component:"ul",itemComponent:Ku,className:ne(o,"".concat(o,"-root"),"".concat(o,"-").concat(ot),u,K(K({},"".concat(o,"-inline-collapsed"),$e),"".concat(o,"-rtl"),Xe),a),dir:v,style:c,role:"menu",tabIndex:f,data:Ar,renderRawItem:function(ut){return ut},renderRawRest:function(ut){var st=ut.length,an=st?je.slice(-st):null;return h.createElement(rm,{eventKey:c0,title:ae,disabled:Kt,internalPopupClose:st===0,popupClassName:le},an)},maxCount:ot!=="horizontal"||k?Wo.INVALIDATE:Wo.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(ut){Ft(ut)},onKeyDown:Gr},ze));return h.createElement(Hy.Provider,{value:br},h.createElement(f$.Provider,{value:ft},h.createElement(Eu,{prefixCls:o,rootClassName:a,mode:ot,openKeys:Le,rtl:Xe,disabled:E,motion:$t?Y:null,defaultMotions:$t?ee:null,activeKey:lt,onActive:Tt,onInactive:Gt,selectedKeys:Nt,inlineIndent:q,subMenuOpenDelay:P,subMenuCloseDelay:O,forceSubMenuRender:N,builtinPlacements:he,triggerSubMenuAction:re,getPopupContainer:ce,itemIcon:fe,expandIcon:ue,onItemClick:Bn,onOpenChange:Kr},h.createElement(y$.Provider,{value:Ye},Xr),h.createElement("div",{style:{display:"none"},"aria-hidden":!0},h.createElement(g$.Provider,{value:He},Oe)))))}),ic=FL;ic.Item=Ku;ic.SubMenu=rm;ic.ItemGroup=Ky;ic.Divider=Uy;var WL={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},VL=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:WL}))},qL=h.forwardRef(VL);const w$=h.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),UL=e=>{const{antCls:t,componentCls:n,colorText:r,footerBg:i,headerHeight:o,headerPadding:a,headerColor:c,footerPadding:u,fontSize:d,bodyBg:f,headerBg:p}=e;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:f,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${n}-header`]:{height:o,padding:a,color:c,lineHeight:te(o),background:p,[`${t}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:u,color:r,fontSize:d,background:i},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},E$=e=>{const{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:i,controlHeightSM:o,marginXXS:a,colorTextLightSolid:c,colorBgContainer:u}=e,d=r*1.25;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${d}px`,headerColor:i,footerPadding:`${o}px ${d}px`,footerBg:t,siderBg:"#001529",triggerHeight:r+a*2,triggerBg:"#002140",triggerColor:c,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:u,lightTriggerBg:u,lightTriggerColor:i}},k$=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]],$$=yn("Layout",UL,E$,{deprecatedTokens:k$}),KL=e=>{const{componentCls:t,siderBg:n,motionDurationMid:r,motionDurationSlow:i,antCls:o,triggerHeight:a,triggerColor:c,triggerBg:u,headerHeight:d,zeroTriggerWidth:f,zeroTriggerHeight:p,borderRadiusLG:g,lightSiderBg:v,lightTriggerColor:b,lightTriggerBg:_,bodyBg:S}=e;return{[t]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:a},"&-right":{order:1},[`${t}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${o}-menu${o}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${t}-children`]:{overflow:"hidden"},[`${t}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:a,color:c,lineHeight:te(a),textAlign:"center",background:u,cursor:"pointer",transition:`all ${r}`},[`${t}-zero-width-trigger`]:{position:"absolute",top:d,insetInlineEnd:e.calc(f).mul(-1).equal(),zIndex:1,width:f,height:p,color:c,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:`0 ${te(g)} ${te(g)} 0`,cursor:"pointer",transition:`background ${i} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${i}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(f).mul(-1).equal(),borderRadius:`${te(g)} 0 0 ${te(g)}`}},"&-light":{background:v,[`${t}-trigger`]:{color:b,background:_},[`${t}-zero-width-trigger`]:{color:b,background:_,border:`1px solid ${S}`,borderInlineStart:0}}}}},GL=yn(["Layout","Sider"],KL,E$,{deprecatedTokens:k$});var XL=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const sx={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},YL=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),im=h.createContext({}),JL=(()=>{let e=0;return(t="")=>(e+=1,`${t}${e}`)})(),R$=h.forwardRef((e,t)=>{const{prefixCls:n,className:r,trigger:i,children:o,defaultCollapsed:a=!1,theme:c="dark",style:u={},collapsible:d=!1,reverseArrow:f=!1,width:p=200,collapsedWidth:g=80,zeroWidthTriggerStyle:v,breakpoint:b,onCollapse:_,onBreakpoint:S}=e,C=XL(e,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:E}=h.useContext(w$),[k,$]=h.useState("collapsed"in e?e.collapsed:a),[P,T]=h.useState(!1);h.useEffect(()=>{"collapsed"in e&&$(e.collapsed)},[e.collapsed]);const O=(fe,ue)=>{"collapsed"in e||$(fe),_==null||_(fe,ue)},{getPrefixCls:N,direction:I}=h.useContext(Ot),z=N("layout-sider",n),[A,M,j]=GL(z),B=h.useRef(null);B.current=fe=>{T(fe.matches),S==null||S(fe.matches),k!==fe.matches&&O(fe.matches,"responsive")},h.useEffect(()=>{function fe(Se){var ae;return(ae=B.current)===null||ae===void 0?void 0:ae.call(B,Se)}let ue;return typeof(window==null?void 0:window.matchMedia)<"u"&&b&&b in sx&&(ue=window.matchMedia(`screen and (max-width: ${sx[b]})`),n$(ue,fe),fe(ue)),()=>{r$(ue,fe)}},[b]),h.useEffect(()=>{const fe=JL("ant-sider-");return E.addSider(fe),()=>E.removeSider(fe)},[]);const F=()=>{O(!k,"clickTrigger")},W=dr(C,["collapsed"]),V=k?g:p,L=YL(V)?`${V}px`:String(V),G=Number.parseFloat(String(g||0))===0?h.createElement("span",{onClick:F,className:ne(`${z}-zero-width-trigger`,`${z}-zero-width-trigger-${f?"right":"left"}`),style:v},i||h.createElement(qL,null)):null,U=I==="rtl"==!f,Y={expanded:U?h.createElement(Hi,null):h.createElement(wu,null),collapsed:U?h.createElement(wu,null):h.createElement(Hi,null)}[k?"collapsed":"expanded"],ee=i!==null?G||h.createElement("div",{className:`${z}-trigger`,onClick:F,style:{width:L}},i||Y):null,Z=Object.assign(Object.assign({},u),{flex:`0 0 ${L}`,maxWidth:L,minWidth:L,width:L}),re=ne(z,`${z}-${c}`,{[`${z}-collapsed`]:!!k,[`${z}-has-trigger`]:d&&i!==null&&!G,[`${z}-below`]:!!P,[`${z}-zero-width`]:Number.parseFloat(L)===0},r,M,j),he=h.useMemo(()=>({siderCollapsed:k}),[k]);return A(h.createElement(im.Provider,{value:he},h.createElement("aside",Object.assign({className:re},W,{style:Z,ref:t}),h.createElement("div",{className:`${z}-children`},o),d||P&&G?ee:null)))});var QL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},ZL=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:QL}))},Gy=h.forwardRef(ZL);const lf=h.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var e7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const T$=e=>{const{prefixCls:t,className:n,dashed:r}=e,i=e7(e,["prefixCls","className","dashed"]),{getPrefixCls:o}=h.useContext(Ot),a=o("menu",t),c=ne({[`${a}-item-divider-dashed`]:!!r},n);return h.createElement(Uy,Object.assign({className:c},i))},P$=e=>{var t;const{className:n,children:r,icon:i,title:o,danger:a,extra:c}=e,{prefixCls:u,firstLevel:d,direction:f,disableMenuItemTitleTooltip:p,inlineCollapsed:g}=h.useContext(lf),v=k=>{const $=r==null?void 0:r[0],P=h.createElement("span",{className:ne(`${u}-title-content`,{[`${u}-title-content-with-extra`]:!!c||c===0})},r);return(!i||h.isValidElement(r)&&r.type==="span")&&r&&k&&d&&typeof $=="string"?h.createElement("div",{className:`${u}-inline-collapsed-noicon`},$.charAt(0)):P},{siderCollapsed:b}=h.useContext(im);let _=o;typeof o>"u"?_=d?r:"":o===!1&&(_="");const S={title:_};!b&&!g&&(S.title=null,S.open=!1);const C=hi(r).length;let E=h.createElement(Ku,Object.assign({},dr(e,["title","icon","danger"]),{className:ne({[`${u}-item-danger`]:a,[`${u}-item-only-child`]:(i?C+1:C)===1},n),title:typeof o=="string"?o:void 0}),fi(i,{className:ne(h.isValidElement(i)?(t=i.props)===null||t===void 0?void 0:t.className:void 0,`${u}-item-icon`)}),v(g));return p||(E=h.createElement(Ko,Object.assign({},S,{placement:f==="rtl"?"left":"right",classNames:{root:`${u}-inline-collapsed-tooltip`}}),E)),E};var t7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const cf=h.createContext(null),n7=h.forwardRef((e,t)=>{const{children:n}=e,r=t7(e,["children"]),i=h.useContext(cf),o=h.useMemo(()=>Object.assign(Object.assign({},i),r),[i,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=xT(n),c=Xo(t,a?ja(n):null);return h.createElement(cf.Provider,{value:o},h.createElement(Vu,{space:!0},a?h.cloneElement(n,{ref:c}):n))}),r7=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:i,lineWidth:o,lineType:a,itemPaddingInline:c}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${te(o)} ${a} ${i}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:c},[`> ${t}-item:hover,
250
- > ${t}-item-active,
251
- > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},i7=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
252
- ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${te(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${te(t)})`}}}}),ax=e=>Ta(e),lx=(e,t)=>{const{componentCls:n,itemColor:r,itemSelectedColor:i,subMenuItemSelectedColor:o,groupTitleColor:a,itemBg:c,subMenuItemBg:u,itemSelectedBg:d,activeBarHeight:f,activeBarWidth:p,activeBarBorderWidth:g,motionDurationSlow:v,motionEaseInOut:b,motionEaseOut:_,itemPaddingInline:S,motionDurationMid:C,itemHoverColor:E,lineType:k,colorSplit:$,itemDisabledColor:P,dangerItemColor:T,dangerItemHoverColor:O,dangerItemSelectedColor:N,dangerItemActiveBg:I,dangerItemSelectedBg:z,popupBg:A,itemHoverBg:M,itemActiveBg:j,menuSubMenuBg:B,horizontalItemSelectedColor:F,horizontalItemSelectedBg:W,horizontalItemBorderRadius:V,horizontalItemHoverBg:L}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:c,[`&${n}-root:focus-visible`]:Object.assign({},ax(e)),[`${n}-item`]:{"&-group-title, &-extra":{color:a}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:o},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:Object.assign({},ax(e))},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${P} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:E}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:M},"&:active":{backgroundColor:j}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:M},"&:active":{backgroundColor:j}}},[`${n}-item-danger`]:{color:T,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:O}},[`&${n}-item:active`]:{background:I}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:i,[`&${n}-item-danger`]:{color:N},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:d,[`&${n}-item-danger`]:{backgroundColor:z}},[`&${n}-submenu > ${n}`]:{backgroundColor:B},[`&${n}-popup > ${n}`]:{backgroundColor:A},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:A},[`&${n}-horizontal`]:Object.assign(Object.assign({},t==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:g,marginTop:e.calc(g).mul(-1).equal(),marginBottom:0,borderRadius:V,"&::after":{position:"absolute",insetInline:S,bottom:0,borderBottom:`${te(f)} solid transparent`,transition:`border-color ${v} ${b}`,content:'""'},"&:hover, &-active, &-open":{background:L,"&::after":{borderBottomWidth:f,borderBottomColor:F}},"&-selected":{color:F,backgroundColor:W,"&:hover":{backgroundColor:W},"&::after":{borderBottomWidth:f,borderBottomColor:F}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${te(g)} ${k} ${$}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:u},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${te(p)} solid ${i}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${C} ${_}`,`opacity ${C} ${_}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:N}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${C} ${b}`,`opacity ${C} ${b}`].join(",")}}}}}},cx=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:r,padding:i,menuArrowSize:o,marginXS:a,itemMarginBlock:c,itemWidth:u,itemPaddingInline:d}=e,f=e.calc(o).add(i).add(a).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:te(n),paddingInline:d,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:c,width:u},[`> ${t}-item,
253
- > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:te(n)},[`${t}-item-group-list ${t}-submenu-title,
254
- ${t}-submenu-title`]:{paddingInlineEnd:f}}},o7=e=>{const{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:i,dropdownWidth:o,controlHeightLG:a,motionEaseOut:c,paddingXL:u,itemMarginInline:d,fontSizeLG:f,motionDurationFast:p,motionDurationSlow:g,paddingXS:v,boxShadowSecondary:b,collapsedWidth:_,collapsedIconSize:S}=e,C={height:r,lineHeight:te(r),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},cx(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},cx(e)),{boxShadow:b})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:o,maxHeight:`calc(100vh - ${te(e.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${g}`,`background ${g}`,`padding ${p} ${c}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:C,[`& ${t}-item-group-title`]:{paddingInlineStart:u}},[`${t}-item`]:C}},{[`${t}-inline-collapsed`]:{width:_,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:f,textAlign:"center"}}},[`> ${t}-item,
255
- > ${t}-item-group > ${t}-item-group-list > ${t}-item,
256
- > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
257
- > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${te(e.calc(S).div(2).equal())} - ${te(d)})`,textOverflow:"clip",[`
258
- ${t}-submenu-arrow,
259
- ${t}-submenu-expand-icon
260
- `]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:S,lineHeight:te(r),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:i}},[`${t}-item-group-title`]:Object.assign(Object.assign({},_u),{paddingInline:v})}}]},ux=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:i,motionEaseOut:o,iconCls:a,iconSize:c,iconMarginInlineEnd:u}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding calc(${n} + 0.1s) ${i}`].join(","),[`${t}-item-icon, ${a}`]:{minWidth:c,fontSize:c,transition:[`font-size ${r} ${o}`,`margin ${n} ${i}`,`color ${n}`].join(","),"+ span":{marginInlineStart:u,opacity:1,transition:[`opacity ${n} ${i}`,`margin ${n}`,`color ${n}`].join(",")}},[`${t}-item-icon`]:Object.assign({},Zl()),[`&${t}-item-only-child`]:{[`> ${a}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},dx=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:i,menuArrowSize:o,menuArrowOffset:a}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:o,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(o).mul(.6).equal(),height:e.calc(o).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:i,transition:[`background ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${te(e.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${te(a)})`}}}}},s7=e=>{const{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:i,motionDurationMid:o,motionEaseInOut:a,paddingXS:c,padding:u,colorSplit:d,lineWidth:f,zIndexPopup:p,borderRadiusLG:g,subMenuItemBorderRadius:v,menuArrowSize:b,menuArrowOffset:_,lineType:S,groupTitleLineHeight:C,groupTitleFontSize:E}=e;return[{"":{[n]:Object.assign(Object.assign({},Jh()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Vn(e)),Jh()),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${te(c)} ${te(u)}`,fontSize:E,lineHeight:C,transition:`all ${i}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`,`padding ${o} ${a}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${i} ${a}`,`padding ${i} ${a}`].join(",")},[`${n}-title-content`]:{transition:`color ${i}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:d,borderStyle:S,borderWidth:0,borderTopWidth:f,marginBlock:f,padding:0,"&-dashed":{borderStyle:"dashed"}}}),ux(e)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${te(e.calc(r).mul(2).equal())} ${te(u)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:p,borderRadius:g,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:Object.assign(Object.assign(Object.assign({borderRadius:g},ux(e)),dx(e)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:v},[`${n}-submenu-title::after`]:{transition:`transform ${i} ${a}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}}}),dx(e)),{[`&-inline-collapsed ${n}-submenu-arrow,
261
- &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${te(_)})`},"&::after":{transform:`rotate(45deg) translateX(${te(e.calc(_).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${te(e.calc(b).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${te(e.calc(_).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${te(_)})`}}})},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},a7=e=>{var t,n,r;const{colorPrimary:i,colorError:o,colorTextDisabled:a,colorErrorBg:c,colorText:u,colorTextDescription:d,colorBgContainer:f,colorFillAlter:p,colorFillContent:g,lineWidth:v,lineWidthBold:b,controlItemBgActive:_,colorBgTextHover:S,controlHeightLG:C,lineHeight:E,colorBgElevated:k,marginXXS:$,padding:P,fontSize:T,controlHeightSM:O,fontSizeLG:N,colorTextLightSolid:I,colorErrorHover:z}=e,A=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,M=(n=e.activeBarBorderWidth)!==null&&n!==void 0?n:v,j=(r=e.itemMarginInline)!==null&&r!==void 0?r:e.marginXXS,B=new vn(I).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:u,itemColor:u,colorItemTextHover:u,itemHoverColor:u,colorItemTextHoverHorizontal:i,horizontalItemHoverColor:i,colorGroupTitle:d,groupTitleColor:d,colorItemTextSelected:i,itemSelectedColor:i,subMenuItemSelectedColor:i,colorItemTextSelectedHorizontal:i,horizontalItemSelectedColor:i,colorItemBg:f,itemBg:f,colorItemBgHover:S,itemHoverBg:S,colorItemBgActive:g,itemActiveBg:_,colorSubItemBg:p,subMenuItemBg:p,colorItemBgSelected:_,itemSelectedBg:_,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:A,colorActiveBarHeight:b,activeBarHeight:b,colorActiveBarBorderSize:v,activeBarBorderWidth:M,colorItemTextDisabled:a,itemDisabledColor:a,colorDangerItemText:o,dangerItemColor:o,colorDangerItemTextHover:o,dangerItemHoverColor:o,colorDangerItemTextSelected:o,dangerItemSelectedColor:o,colorDangerItemBgActive:c,dangerItemActiveBg:c,colorDangerItemBgSelected:c,dangerItemSelectedBg:c,itemMarginInline:j,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:C,groupTitleLineHeight:E,collapsedWidth:C*2,popupBg:k,itemMarginBlock:$,itemPaddingInline:P,horizontalLineHeight:`${C*1.15}px`,iconSize:T,iconMarginInlineEnd:O-T,collapsedIconSize:N,groupTitleFontSize:T,darkItemDisabledColor:new vn(I).setA(.25).toRgbString(),darkItemColor:B,darkDangerItemColor:o,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:I,darkItemSelectedBg:i,darkDangerItemSelectedBg:o,darkItemHoverBg:"transparent",darkGroupTitleColor:B,darkItemHoverColor:I,darkDangerItemHoverColor:z,darkDangerItemSelectedColor:I,darkDangerItemActiveBg:o,itemWidth:A?`calc(100% + ${M}px)`:`calc(100% - ${j*2}px)`}},l7=(e,t=e,n=!0)=>yn("Menu",i=>{const{colorBgElevated:o,controlHeightLG:a,fontSize:c,darkItemColor:u,darkDangerItemColor:d,darkItemBg:f,darkSubMenuItemBg:p,darkItemSelectedColor:g,darkItemSelectedBg:v,darkDangerItemSelectedBg:b,darkItemHoverBg:_,darkGroupTitleColor:S,darkItemHoverColor:C,darkItemDisabledColor:E,darkDangerItemHoverColor:k,darkDangerItemSelectedColor:$,darkDangerItemActiveBg:P,popupBg:T,darkPopupBg:O}=i,N=i.calc(c).div(7).mul(5).equal(),I=tn(i,{menuArrowSize:N,menuHorizontalHeight:i.calc(a).mul(1.15).equal(),menuArrowOffset:i.calc(N).mul(.25).equal(),menuSubMenuBg:o,calc:i.calc,popupBg:T}),z=tn(I,{itemColor:u,itemHoverColor:C,groupTitleColor:S,itemSelectedColor:g,subMenuItemSelectedColor:g,itemBg:f,popupBg:O,subMenuItemBg:p,itemActiveBg:"transparent",itemSelectedBg:v,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:_,itemDisabledColor:E,dangerItemColor:d,dangerItemHoverColor:k,dangerItemSelectedColor:$,dangerItemActiveBg:P,dangerItemSelectedBg:b,menuSubMenuBg:p,horizontalItemSelectedColor:g,horizontalItemSelectedBg:v});return[s7(I),r7(I),o7(I),lx(I,"light"),lx(z,"dark"),i7(I),YE(I),ea(I,"slide-up"),ea(I,"slide-down"),Du(I,"zoom-big")]},a7,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(e,t),O$=e=>{var t;const{popupClassName:n,icon:r,title:i,theme:o}=e,a=h.useContext(lf),{prefixCls:c,inlineCollapsed:u,theme:d}=a,f=rc();let p;if(!r)p=u&&!f.length&&i&&typeof i=="string"?h.createElement("div",{className:`${c}-inline-collapsed-noicon`},i.charAt(0)):h.createElement("span",{className:`${c}-title-content`},i);else{const b=h.isValidElement(i)&&i.type==="span";p=h.createElement(h.Fragment,null,fi(r,{className:ne(h.isValidElement(r)?(t=r.props)===null||t===void 0?void 0:t.className:void 0,`${c}-item-icon`)}),b?i:h.createElement("span",{className:`${c}-title-content`},i))}const g=h.useMemo(()=>Object.assign(Object.assign({},a),{firstLevel:!1}),[a]),[v]=tc("Menu");return h.createElement(lf.Provider,{value:g},h.createElement(rm,Object.assign({},dr(e,["icon"]),{title:p,popupClassName:ne(c,n,`${c}-${o||d}`),popupStyle:Object.assign({zIndex:v},e.popupStyle)})))};var c7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Pg(e){return e===null||e===!1}const u7={item:P$,submenu:O$,divider:T$},d7=h.forwardRef((e,t)=>{var n;const r=h.useContext(cf),i=r||{},{getPrefixCls:o,getPopupContainer:a,direction:c,menu:u}=h.useContext(Ot),d=o(),{prefixCls:f,className:p,style:g,theme:v="light",expandIcon:b,_internalDisableMenuItemTitleTooltip:_,inlineCollapsed:S,siderCollapsed:C,rootClassName:E,mode:k,selectable:$,onClick:P,overflowedIndicatorPopupClassName:T}=e,O=c7(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),N=dr(O,["collapsedWidth"]);(n=i.validator)===null||n===void 0||n.call(i,{mode:k});const I=Zn((...q)=>{var Y;P==null||P.apply(void 0,q),(Y=i.onClick)===null||Y===void 0||Y.call(i)}),z=i.mode||k,A=$??i.selectable,M=S??C,j={horizontal:{motionName:`${d}-slide-up`},inline:WE(d),other:{motionName:`${d}-zoom-big`}},B=o("menu",f||i.prefixCls),F=Po(B),[W,V,L]=l7(B,F,!r),G=ne(`${B}-${v}`,u==null?void 0:u.className,p),U=h.useMemo(()=>{var q,Y;if(typeof b=="function"||Pg(b))return b||null;if(typeof i.expandIcon=="function"||Pg(i.expandIcon))return i.expandIcon||null;if(typeof(u==null?void 0:u.expandIcon)=="function"||Pg(u==null?void 0:u.expandIcon))return(u==null?void 0:u.expandIcon)||null;const ee=(q=b??(i==null?void 0:i.expandIcon))!==null&&q!==void 0?q:u==null?void 0:u.expandIcon;return fi(ee,{className:ne(`${B}-submenu-expand-icon`,h.isValidElement(ee)?(Y=ee.props)===null||Y===void 0?void 0:Y.className:void 0)})},[b,i==null?void 0:i.expandIcon,u==null?void 0:u.expandIcon,B]),D=h.useMemo(()=>({prefixCls:B,inlineCollapsed:M||!1,direction:c,firstLevel:!0,theme:v,mode:z,disableMenuItemTitleTooltip:_}),[B,M,c,_,v]);return W(h.createElement(cf.Provider,{value:null},h.createElement(lf.Provider,{value:D},h.createElement(ic,Object.assign({getPopupContainer:a,overflowedIndicator:h.createElement(Gy,null),overflowedIndicatorPopupClassName:ne(B,`${B}-${v}`,T),mode:z,selectable:A,onClick:I},N,{inlineCollapsed:M,style:Object.assign(Object.assign({},u==null?void 0:u.style),g),className:G,prefixCls:B,direction:c,defaultMotions:j,expandIcon:U,ref:t,rootClassName:ne(E,V,i.rootClassName,L,F),_internalComponents:u7})))))}),Gu=h.forwardRef((e,t)=>{const n=h.useRef(null),r=h.useContext(im);return h.useImperativeHandle(t,()=>({menu:n.current,focus:i=>{var o;(o=n.current)===null||o===void 0||o.focus(i)}})),h.createElement(d7,Object.assign({ref:n},e,r))});Gu.Item=P$;Gu.SubMenu=O$;Gu.Divider=T$;Gu.ItemGroup=Ky;const h7=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:i}=e,o=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${o}`]:{[`&${o}-danger:not(${o}-disabled)`]:{color:r,"&:hover":{color:i,backgroundColor:r}}}}}},f7=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:i,sizePopupArrow:o,antCls:a,iconCls:c,motionDurationMid:u,paddingBlock:d,fontSize:f,dropdownEdgeChildPadding:p,colorTextDisabled:g,fontSizeIcon:v,controlPaddingHorizontal:b,colorBgElevated:_}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(o).div(2).sub(i).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${c}-down, & > ${a}-btn-icon > ${c}-down`]:{fontSize:v}},[`${t}-wrap`]:{position:"relative",[`${a}-btn > ${c}-down`]:{fontSize:v},[`${c}-down::before`]:{transition:`transform ${u}`}},[`${t}-wrap-open`]:{[`${c}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomLeft,
262
- &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomLeft,
263
- &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottom,
264
- &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottom,
265
- &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomRight,
266
- &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:Ey},[`&${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topLeft,
267
- &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topLeft,
268
- &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-top,
269
- &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-top,
270
- &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topRight,
271
- &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topRight`]:{animationName:$y},[`&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomLeft,
272
- &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottom,
273
- &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:ky},[`&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topLeft,
274
- &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-top,
275
- &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Ry}}},Ay(e,_,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:Object.assign(Object.assign({},Vn(e)),{[n]:Object.assign(Object.assign({padding:p,listStyleType:"none",backgroundColor:_,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},uo(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${te(d)} ${te(b)}`,color:e.colorTextDescription,transition:`all ${u}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:f,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${u}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${te(d)} ${te(b)}`,color:e.colorText,fontWeight:"normal",fontSize:f,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${u}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},uo(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:g,cursor:"not-allowed","&:hover":{color:g,backgroundColor:_,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${te(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:v,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${te(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(b).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:g,backgroundColor:_,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[ea(e,"slide-up"),ea(e,"slide-down"),nf(e,"move-up"),nf(e,"move-down"),Du(e,"zoom-big")]]},m7=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},em({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),Ly(e)),p7=yn("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:i}=e,o=tn(e,{menuCls:`${i}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[f7(o),h7(o)]},m7,{resetStyle:!1}),om=e=>{var t;const{menu:n,arrow:r,prefixCls:i,children:o,trigger:a,disabled:c,dropdownRender:u,popupRender:d,getPopupContainer:f,overlayClassName:p,rootClassName:g,overlayStyle:v,open:b,onOpenChange:_,visible:S,onVisibleChange:C,mouseEnterDelay:E=.15,mouseLeaveDelay:k=.1,autoAdjustOverflow:$=!0,placement:P="",overlay:T,transitionName:O,destroyOnHidden:N,destroyPopupOnHide:I}=e,{getPopupContainer:z,getPrefixCls:A,direction:M,dropdown:j}=h.useContext(Ot),B=d||u;Nf();const F=h.useMemo(()=>{const be=A();return O!==void 0?O:P.includes("top")?`${be}-slide-down`:`${be}-slide-up`},[A,P,O]),W=h.useMemo(()=>P?P.includes("Center")?P.slice(0,P.indexOf("Center")):P:M==="rtl"?"bottomRight":"bottomLeft",[P,M]),V=A("dropdown",i),L=Po(V),[G,U,D]=p7(V,L),[,q]=mi(),Y=h.Children.only(aL(o)?h.createElement("span",null,o):o),ee=fi(Y,{className:ne(`${V}-trigger`,{[`${V}-rtl`]:M==="rtl"},Y.props.className),disabled:(t=Y.props.disabled)!==null&&t!==void 0?t:c}),Z=c?[]:a,re=!!(Z!=null&&Z.includes("contextMenu")),[he,fe]=er(!1,{value:b??S}),ue=Zn(be=>{_==null||_(be,{source:"trigger"}),C==null||C(be),fe(be)}),Se=ne(p,g,U,D,L,j==null?void 0:j.className,{[`${V}-rtl`]:M==="rtl"}),ae=o$({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:$,offset:q.marginXXS,arrowWidth:r?q.sizePopupArrow:0,borderRadius:q.borderRadius}),le=Zn(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(_==null||_(!1,{source:"menu"}),fe(!1))}),ce=()=>{let be;return n!=null&&n.items?be=h.createElement(Gu,Object.assign({},n)):typeof T=="function"?be=T():be=T,B&&(be=B(be)),be=h.Children.only(typeof be=="string"?h.createElement("span",null,be):be),h.createElement(n7,{prefixCls:`${V}-menu`,rootClassName:ne(D,L),expandIcon:h.createElement("span",{className:`${V}-menu-submenu-arrow`},M==="rtl"?h.createElement(wu,{className:`${V}-menu-submenu-arrow-icon`}):h.createElement(Hi,{className:`${V}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:le,validator:({mode:xe})=>{}},be)},[ye,me]=tc("Dropdown",v==null?void 0:v.zIndex);let de=h.createElement(h$,Object.assign({alignPoint:re},dr(e,["rootClassName"]),{mouseEnterDelay:E,mouseLeaveDelay:k,visible:he,builtinPlacements:ae,arrow:!!r,overlayClassName:Se,prefixCls:V,getPopupContainer:f||z,transitionName:F,trigger:Z,overlay:ce,placement:W,onVisibleChange:ue,overlayStyle:Object.assign(Object.assign(Object.assign({},j==null?void 0:j.style),v),{zIndex:ye}),autoDestroy:N??I}),ee);return ye&&(de=h.createElement(Bu.Provider,{value:me},de)),G(de)},g7=Ok(om,"align",void 0,"dropdown",e=>e),v7=e=>h.createElement(g7,Object.assign({},e),h.createElement("span",null));om._InternalPanelDoNotUseOrYouWillBeFired=v7;var y7=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],b7=h.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-checkbox":n,i=e.className,o=e.style,a=e.checked,c=e.disabled,u=e.defaultChecked,d=u===void 0?!1:u,f=e.type,p=f===void 0?"checkbox":f,g=e.title,v=e.onChange,b=Lt(e,y7),_=h.useRef(null),S=h.useRef(null),C=er(d,{value:a}),E=se(C,2),k=E[0],$=E[1];h.useImperativeHandle(t,function(){return{focus:function(N){var I;(I=_.current)===null||I===void 0||I.focus(N)},blur:function(){var N;(N=_.current)===null||N===void 0||N.blur()},input:_.current,nativeElement:S.current}});var P=ne(r,i,K(K({},"".concat(r,"-checked"),k),"".concat(r,"-disabled"),c)),T=function(N){c||("checked"in e||$(N.target.checked),v==null||v({target:X(X({},e),{},{type:p,checked:N.target.checked}),stopPropagation:function(){N.stopPropagation()},preventDefault:function(){N.preventDefault()},nativeEvent:N.nativeEvent}))};return h.createElement("span",{className:P,title:g,style:o,ref:S},h.createElement("input",Re({},b,{className:"".concat(r,"-input"),ref:_,onChange:T,disabled:c,checked:!!k,type:p})),h.createElement("span",{className:"".concat(r,"-inner")}))});function _7(e){const t=Q.useRef(null),n=()=>{Rn.cancel(t.current),t.current=null};return[()=>{n(),t.current=Rn(()=>{t.current=null})},o=>{t.current&&(o.stopPropagation(),n()),e==null||e(o)}]}function sm(e){return tn(e,{inputAffixPadding:e.paddingXXS})}const am=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:o,controlHeightLG:a,fontSizeLG:c,lineHeightLG:u,paddingSM:d,controlPaddingHorizontalSM:f,controlPaddingHorizontal:p,colorFillAlter:g,colorPrimaryHover:v,colorPrimary:b,controlOutlineWidth:_,controlOutline:S,colorErrorOutline:C,colorWarningOutline:E,colorBgContainer:k,inputFontSize:$,inputFontSizeLG:P,inputFontSizeSM:T}=e,O=$||n,N=T||O,I=P||c,z=Math.round((t-O*r)/2*10)/10-i,A=Math.round((o-N*r)/2*10)/10-i,M=Math.ceil((a-I*u)/2*10)/10-i;return{paddingBlock:Math.max(z,0),paddingBlockSM:Math.max(A,0),paddingBlockLG:Math.max(M,0),paddingInline:d-i,paddingInlineSM:f-i,paddingInlineLG:p-i,addonBg:g,activeBorderColor:b,hoverBorderColor:v,activeShadow:`0 0 0 ${_}px ${S}`,errorActiveShadow:`0 0 0 ${_}px ${C}`,warningActiveShadow:`0 0 0 ${_}px ${E}`,hoverBg:k,activeBg:k,inputFontSize:O,inputFontSizeLG:I,inputFontSizeSM:N}},S7=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),lm=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},S7(tn(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),Xy=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),hx=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},Xy(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),C7=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Xy(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},lm(e))}),hx(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),hx(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),fx=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),x7=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},fx(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),fx(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},lm(e))}})}),w7=(e,t)=>{const{componentCls:n}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},I$=(e,t)=>{var n;return{background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(n=t==null?void 0:t.inputColor)!==null&&n!==void 0?n:"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}},mx=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},I$(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),E7=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},I$(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},lm(e))}),mx(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),mx(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),px=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),k7=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}}},px(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),px(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),N$=(e,t)=>({background:e.colorBgContainer,borderWidth:`${te(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),gx=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},N$(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),$7=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},N$(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),gx(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),gx(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),R7=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),M$=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=e;return{padding:`${te(t)} ${te(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},Yy=e=>({padding:`${te(e.paddingBlockSM)} ${te(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),Jy=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${te(e.paddingBlock)} ${te(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},R7(e.colorTextPlaceholder)),{"&-lg":Object.assign({},M$(e)),"&-sm":Object.assign({},Yy(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),T7=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},M$(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},Yy(e)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${te(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${te(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${te(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${te(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${te(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},Jh()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
276
- & > ${t}-affix-wrapper,
277
- & > ${t}-number-affix-wrapper,
278
- & > ${n}-picker-range
279
- `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${n}-select > ${n}-select-selector,
280
- & > ${n}-select-auto-complete ${t},
281
- & > ${n}-cascader-picker ${t},
282
- & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child,
283
- & > ${n}-select:first-child > ${n}-select-selector,
284
- & > ${n}-select-auto-complete:first-child ${t},
285
- & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
286
- & > ${n}-select:last-child > ${n}-select-selector,
287
- & > ${n}-cascader-picker:last-child ${t},
288
- & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},P7=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:i}=e,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Vn(e)),Jy(e)),C7(e)),E7(e)),w7(e)),$7(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},O7=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${te(e.inputAffixPadding)}`}}}},I7=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:o,colorIconHover:a,iconCls:c}=e,u=`${t}-affix-wrapper`,d=`${t}-affix-wrapper-disabled`;return{[u]:Object.assign(Object.assign(Object.assign(Object.assign({},Jy(e)),{display:"inline-flex",[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),O7(e)),{[`${c}${t}-password-icon`]:{color:o,cursor:"pointer",transition:`all ${i}`,"&:hover":{color:a}}}),[`${t}-underlined`]:{borderRadius:0},[d]:{[`${c}${t}-password-icon`]:{color:o,cursor:"not-allowed","&:hover":{color:o}}}}},N7=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},Vn(e)),T7(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}}},x7(e)),k7(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},M7=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-search`;return{[r]:{[t]:{"&:not([disabled]):hover, &:not([disabled]):focus":{[`+ ${t}-group-addon ${r}-button:not(${n}-btn-color-primary):not(${n}-btn-variant-text)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${r}-button:not(${n}-btn-color-primary)`]:{color:e.colorTextDescription,"&:not([disabled]):hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${n}-btn-loading::before`]:{inset:0}}}},[`${r}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button,
289
- > ${t},
290
- ${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},z7=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},j7=yn(["Input","Shared"],e=>{const t=tn(e,sm(e));return[P7(t),I7(t)]},am,{resetFont:!1});yn(["Input","Component"],e=>{const t=tn(e,sm(e));return[N7(t),M7(t),z7(t),Kf(t)]},am,{resetFont:!1});var B7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},L7=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:B7}))},A7=h.forwardRef(L7);const cm=h.createContext(null);var D7=function(t){var n=t.activeTabOffset,r=t.horizontal,i=t.rtl,o=t.indicator,a=o===void 0?{}:o,c=a.size,u=a.align,d=u===void 0?"center":u,f=h.useState(),p=se(f,2),g=p[0],v=p[1],b=h.useRef(),_=Q.useCallback(function(C){return typeof c=="function"?c(C):typeof c=="number"?c:C},[c]);function S(){Rn.cancel(b.current)}return h.useEffect(function(){var C={};if(n)if(r){C.width=_(n.width);var E=i?"right":"left";d==="start"&&(C[E]=n[E]),d==="center"&&(C[E]=n[E]+n.width/2,C.transform=i?"translateX(50%)":"translateX(-50%)"),d==="end"&&(C[E]=n[E]+n.width,C.transform="translateX(-100%)")}else C.height=_(n.height),d==="start"&&(C.top=n.top),d==="center"&&(C.top=n.top+n.height/2,C.transform="translateY(-50%)"),d==="end"&&(C.top=n.top+n.height,C.transform="translateY(-100%)");return S(),b.current=Rn(function(){var k=g&&C&&Object.keys(C).every(function($){var P=C[$],T=g[$];return typeof P=="number"&&typeof T=="number"?Math.round(P)===Math.round(T):P===T});k||v(C)}),S},[JSON.stringify(n),r,i,d,_]),{style:g}},vx={width:0,height:0,left:0,top:0};function H7(e,t,n){return h.useMemo(function(){for(var r,i=new Map,o=t.get((r=e[0])===null||r===void 0?void 0:r.key)||vx,a=o.left+o.width,c=0;c<e.length;c+=1){var u=e[c].key,d=t.get(u);if(!d){var f;d=t.get((f=e[c-1])===null||f===void 0?void 0:f.key)||vx}var p=i.get(u)||X({},d);p.right=a-p.left-p.width,i.set(u,p)}return i},[e.map(function(r){return r.key}).join("_"),t,n])}function yx(e,t){var n=h.useRef(e),r=h.useState({}),i=se(r,2),o=i[1];function a(c){var u=typeof c=="function"?c(n.current):c;u!==n.current&&t(u,n.current),n.current=u,o({})}return[n.current,a]}var F7=.1,bx=.01,zh=20,_x=Math.pow(.995,zh);function W7(e,t){var n=h.useState(),r=se(n,2),i=r[0],o=r[1],a=h.useState(0),c=se(a,2),u=c[0],d=c[1],f=h.useState(0),p=se(f,2),g=p[0],v=p[1],b=h.useState(),_=se(b,2),S=_[0],C=_[1],E=h.useRef();function k(I){var z=I.touches[0],A=z.screenX,M=z.screenY;o({x:A,y:M}),window.clearInterval(E.current)}function $(I){if(i){var z=I.touches[0],A=z.screenX,M=z.screenY;o({x:A,y:M});var j=A-i.x,B=M-i.y;t(j,B);var F=Date.now();d(F),v(F-u),C({x:j,y:B})}}function P(){if(i&&(o(null),C(null),S)){var I=S.x/g,z=S.y/g,A=Math.abs(I),M=Math.abs(z);if(Math.max(A,M)<F7)return;var j=I,B=z;E.current=window.setInterval(function(){if(Math.abs(j)<bx&&Math.abs(B)<bx){window.clearInterval(E.current);return}j*=_x,B*=_x,t(j*zh,B*zh)},zh)}}var T=h.useRef();function O(I){var z=I.deltaX,A=I.deltaY,M=0,j=Math.abs(z),B=Math.abs(A);j===B?M=T.current==="x"?z:A:j>B?(M=z,T.current="x"):(M=A,T.current="y"),t(-M,-M)&&I.preventDefault()}var N=h.useRef(null);N.current={onTouchStart:k,onTouchMove:$,onTouchEnd:P,onWheel:O},h.useEffect(function(){function I(j){N.current.onTouchStart(j)}function z(j){N.current.onTouchMove(j)}function A(j){N.current.onTouchEnd(j)}function M(j){N.current.onWheel(j)}return document.addEventListener("touchmove",z,{passive:!1}),document.addEventListener("touchend",A,{passive:!0}),e.current.addEventListener("touchstart",I,{passive:!0}),e.current.addEventListener("wheel",M,{passive:!1}),function(){document.removeEventListener("touchmove",z),document.removeEventListener("touchend",A)}},[])}function z$(e){var t=h.useState(0),n=se(t,2),r=n[0],i=n[1],o=h.useRef(0),a=h.useRef();return a.current=e,pv(function(){var c;(c=a.current)===null||c===void 0||c.call(a)},[r]),function(){o.current===r&&(o.current+=1,i(o.current))}}function V7(e){var t=h.useRef([]),n=h.useState({}),r=se(n,2),i=r[1],o=h.useRef(typeof e=="function"?e():e),a=z$(function(){var u=o.current;t.current.forEach(function(d){u=d(u)}),t.current=[],o.current=u,i({})});function c(u){t.current.push(u),a()}return[o.current,c]}var Sx={width:0,height:0,left:0,top:0,right:0};function q7(e,t,n,r,i,o,a){var c=a.tabs,u=a.tabPosition,d=a.rtl,f,p,g;return["top","bottom"].includes(u)?(f="width",p=d?"right":"left",g=Math.abs(n)):(f="height",p="top",g=-n),h.useMemo(function(){if(!c.length)return[0,0];for(var v=c.length,b=v,_=0;_<v;_+=1){var S=e.get(c[_].key)||Sx;if(Math.floor(S[p]+S[f])>Math.floor(g+t)){b=_-1;break}}for(var C=0,E=v-1;E>=0;E-=1){var k=e.get(c[E].key)||Sx;if(k[p]<g){C=E+1;break}}return C>b?[0,-1]:[C,b]},[e,t,r,i,o,g,u,c.map(function(v){return v.key}).join("_"),d])}function Cx(e){var t;return e instanceof Map?(t={},e.forEach(function(n,r){t[r]=n})):t=e,JSON.stringify(t)}var U7="TABS_DQ";function j$(e){return String(e).replace(/"/g,U7)}function Qy(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var B$=h.forwardRef(function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,o=e.style;return!r||r.showAdd===!1?null:h.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(i==null?void 0:i.addAriaLabel)||"Add tab",onClick:function(c){r.onEdit("add",{event:c})}},r.addIcon||"+")}),xx=h.forwardRef(function(e,t){var n=e.position,r=e.prefixCls,i=e.extra;if(!i)return null;var o,a={};return _t(i)==="object"&&!h.isValidElement(i)?a=i:a.right=i,n==="right"&&(o=a.right),n==="left"&&(o=a.left),o?h.createElement("div",{className:"".concat(r,"-extra-content"),ref:t},o):null}),K7=h.forwardRef(function(e,t){var n=e.prefixCls,r=e.id,i=e.tabs,o=e.locale,a=e.mobile,c=e.more,u=c===void 0?{}:c,d=e.style,f=e.className,p=e.editable,g=e.tabBarGutter,v=e.rtl,b=e.removeAriaLabel,_=e.onTabClick,S=e.getPopupContainer,C=e.popupClassName,E=h.useState(!1),k=se(E,2),$=k[0],P=k[1],T=h.useState(null),O=se(T,2),N=O[0],I=O[1],z=u.icon,A=z===void 0?"More":z,M="".concat(r,"-more-popup"),j="".concat(n,"-dropdown"),B=N!==null?"".concat(M,"-").concat(N):null,F=o==null?void 0:o.dropdownAriaLabel;function W(Y,ee){Y.preventDefault(),Y.stopPropagation(),p.onEdit("remove",{key:ee,event:Y})}var V=h.createElement(ic,{onClick:function(ee){var Z=ee.key,re=ee.domEvent;_(Z,re),P(!1)},prefixCls:"".concat(j,"-menu"),id:M,tabIndex:-1,role:"listbox","aria-activedescendant":B,selectedKeys:[N],"aria-label":F!==void 0?F:"expanded dropdown"},i.map(function(Y){var ee=Y.closable,Z=Y.disabled,re=Y.closeIcon,he=Y.key,fe=Y.label,ue=Qy(ee,re,p,Z);return h.createElement(Ku,{key:he,id:"".concat(M,"-").concat(he),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(he),disabled:Z},h.createElement("span",null,fe),ue&&h.createElement("button",{type:"button","aria-label":b||"remove",tabIndex:0,className:"".concat(j,"-menu-item-remove"),onClick:function(ae){ae.stopPropagation(),W(ae,he)}},re||p.removeIcon||"×"))}));function L(Y){for(var ee=i.filter(function(ue){return!ue.disabled}),Z=ee.findIndex(function(ue){return ue.key===N})||0,re=ee.length,he=0;he<re;he+=1){Z=(Z+Y+re)%re;var fe=ee[Z];if(!fe.disabled){I(fe.key);return}}}function G(Y){var ee=Y.which;if(!$){[Ge.DOWN,Ge.SPACE,Ge.ENTER].includes(ee)&&(P(!0),Y.preventDefault());return}switch(ee){case Ge.UP:L(-1),Y.preventDefault();break;case Ge.DOWN:L(1),Y.preventDefault();break;case Ge.ESC:P(!1);break;case Ge.SPACE:case Ge.ENTER:N!==null&&_(N,Y);break}}h.useEffect(function(){var Y=document.getElementById(B);Y&&Y.scrollIntoView&&Y.scrollIntoView(!1)},[N]),h.useEffect(function(){$||I(null)},[$]);var U=K({},v?"marginRight":"marginLeft",g);i.length||(U.visibility="hidden",U.order=1);var D=ne(K({},"".concat(j,"-rtl"),v)),q=a?null:h.createElement(h$,Re({prefixCls:j,overlay:V,visible:i.length?$:!1,onVisibleChange:P,overlayClassName:ne(D,C),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:S},u),h.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:U,"aria-haspopup":"listbox","aria-controls":M,id:"".concat(r,"-more"),"aria-expanded":$,onKeyDown:G},A));return h.createElement("div",{className:ne("".concat(n,"-nav-operations"),f),style:d,ref:t},q,h.createElement(B$,{prefixCls:n,locale:o,editable:p}))});const G7=h.memo(K7,function(e,t){return t.tabMoving});var X7=function(t){var n=t.prefixCls,r=t.id,i=t.active,o=t.focus,a=t.tab,c=a.key,u=a.label,d=a.disabled,f=a.closeIcon,p=a.icon,g=t.closable,v=t.renderWrapper,b=t.removeAriaLabel,_=t.editable,S=t.onClick,C=t.onFocus,E=t.onBlur,k=t.onKeyDown,$=t.onMouseDown,P=t.onMouseUp,T=t.style,O=t.tabCount,N=t.currentPosition,I="".concat(n,"-tab"),z=Qy(g,f,_,d);function A(W){d||S(W)}function M(W){W.preventDefault(),W.stopPropagation(),_.onEdit("remove",{key:c,event:W})}var j=h.useMemo(function(){return p&&typeof u=="string"?h.createElement("span",null,u):u},[u,p]),B=h.useRef(null);h.useEffect(function(){o&&B.current&&B.current.focus()},[o]);var F=h.createElement("div",{key:c,"data-node-key":j$(c),className:ne(I,K(K(K(K({},"".concat(I,"-with-remove"),z),"".concat(I,"-active"),i),"".concat(I,"-disabled"),d),"".concat(I,"-focus"),o)),style:T,onClick:A},h.createElement("div",{ref:B,role:"tab","aria-selected":i,id:r&&"".concat(r,"-tab-").concat(c),className:"".concat(I,"-btn"),"aria-controls":r&&"".concat(r,"-panel-").concat(c),"aria-disabled":d,tabIndex:d?null:i?0:-1,onClick:function(V){V.stopPropagation(),A(V)},onKeyDown:k,onMouseDown:$,onMouseUp:P,onFocus:C,onBlur:E},o&&h.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"Tab ".concat(N," of ").concat(O)),p&&h.createElement("span",{className:"".concat(I,"-icon")},p),u&&j),z&&h.createElement("button",{type:"button",role:"tab","aria-label":b||"remove",tabIndex:i?0:-1,className:"".concat(I,"-remove"),onClick:function(V){V.stopPropagation(),M(V)}},f||_.removeIcon||"×"));return v?v(F):F},Y7=function(t,n){var r=t.offsetWidth,i=t.offsetHeight,o=t.offsetTop,a=t.offsetLeft,c=t.getBoundingClientRect(),u=c.width,d=c.height,f=c.left,p=c.top;return Math.abs(u-r)<1?[u,d,f-n.left,p-n.top]:[r,i,a,o]},wl=function(t){var n=t.current||{},r=n.offsetWidth,i=r===void 0?0:r,o=n.offsetHeight,a=o===void 0?0:o;if(t.current){var c=t.current.getBoundingClientRect(),u=c.width,d=c.height;if(Math.abs(u-i)<1)return[u,d]}return[i,a]},lh=function(t,n){return t[n?0:1]},wx=h.forwardRef(function(e,t){var n=e.className,r=e.style,i=e.id,o=e.animated,a=e.activeKey,c=e.rtl,u=e.extra,d=e.editable,f=e.locale,p=e.tabPosition,g=e.tabBarGutter,v=e.children,b=e.onTabClick,_=e.onTabScroll,S=e.indicator,C=h.useContext(cm),E=C.prefixCls,k=C.tabs,$=h.useRef(null),P=h.useRef(null),T=h.useRef(null),O=h.useRef(null),N=h.useRef(null),I=h.useRef(null),z=h.useRef(null),A=p==="top"||p==="bottom",M=yx(0,function(lt,Ze){A&&_&&_({direction:lt>Ze?"left":"right"})}),j=se(M,2),B=j[0],F=j[1],W=yx(0,function(lt,Ze){!A&&_&&_({direction:lt>Ze?"top":"bottom"})}),V=se(W,2),L=V[0],G=V[1],U=h.useState([0,0]),D=se(U,2),q=D[0],Y=D[1],ee=h.useState([0,0]),Z=se(ee,2),re=Z[0],he=Z[1],fe=h.useState([0,0]),ue=se(fe,2),Se=ue[0],ae=ue[1],le=h.useState([0,0]),ce=se(le,2),ye=ce[0],me=ce[1],de=V7(new Map),be=se(de,2),xe=be[0],Te=be[1],ze=H7(k,xe,re[0]),Ee=lh(q,A),ke=lh(re,A),je=lh(Se,A),Oe=lh(ye,A),Qe=Math.floor(Ee)<Math.floor(ke+je),at=Qe?Ee-Oe:Ee-je,$t="".concat(E,"-nav-operations-hidden"),pt=0,Je=0;A&&c?(pt=0,Je=Math.max(0,ke-at)):(pt=Math.min(0,at-ke),Je=0);function ft(lt){return lt<pt?pt:lt>Je?Je:lt}var Xe=h.useRef(null),yt=h.useState(),tt=se(yt,2),Le=tt[0],rt=tt[1];function Me(){rt(Date.now())}function Ue(){Xe.current&&clearTimeout(Xe.current)}W7(O,function(lt,Ze){function Tt(Gt,Ke){Gt(function(vt){var Nt=ft(vt+Ke);return Nt})}return Qe?(A?Tt(F,lt):Tt(G,Ze),Ue(),Me(),!0):!1}),h.useEffect(function(){return Ue(),Le&&(Xe.current=setTimeout(function(){rt(0)},100)),Ue},[Le]);var It=q7(ze,at,A?B:L,ke,je,Oe,X(X({},e),{},{tabs:k})),St=se(It,2),nn=St[0],Jt=St[1],bn=Zn(function(){var lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a,Ze=ze.get(lt)||{width:0,height:0,left:0,right:0,top:0};if(A){var Tt=B;c?Ze.right<B?Tt=Ze.right:Ze.right+Ze.width>B+at&&(Tt=Ze.right+Ze.width-at):Ze.left<-B?Tt=-Ze.left:Ze.left+Ze.width>-B+at&&(Tt=-(Ze.left+Ze.width-at)),G(0),F(ft(Tt))}else{var Gt=L;Ze.top<-L?Gt=-Ze.top:Ze.top+Ze.height>-L+at&&(Gt=-(Ze.top+Ze.height-at)),F(0),G(ft(Gt))}}),On=h.useState(),on=se(On,2),Ht=on[0],Rt=on[1],sn=h.useState(!1),Xt=se(sn,2),ot=Xt[0],Et=Xt[1],mt=k.filter(function(lt){return!lt.disabled}).map(function(lt){return lt.key}),Ie=function(Ze){var Tt=mt.indexOf(Ht||a),Gt=mt.length,Ke=(Tt+Ze+Gt)%Gt,vt=mt[Ke];Rt(vt)},$e=function(Ze,Tt){var Gt=mt.indexOf(Ze),Ke=k.find(function(Nt){return Nt.key===Ze}),vt=Qy(Ke==null?void 0:Ke.closable,Ke==null?void 0:Ke.closeIcon,d,Ke==null?void 0:Ke.disabled);vt&&(Tt.preventDefault(),Tt.stopPropagation(),d.onEdit("remove",{key:Ze,event:Tt}),Gt===mt.length-1?Ie(-1):Ie(1))},we=function(Ze,Tt){Et(!0),Tt.button===1&&$e(Ze,Tt)},Ae=function(Ze){var Tt=Ze.code,Gt=c&&A,Ke=mt[0],vt=mt[mt.length-1];switch(Tt){case"ArrowLeft":{A&&Ie(Gt?1:-1);break}case"ArrowRight":{A&&Ie(Gt?-1:1);break}case"ArrowUp":{Ze.preventDefault(),A||Ie(-1);break}case"ArrowDown":{Ze.preventDefault(),A||Ie(1);break}case"Home":{Ze.preventDefault(),Rt(Ke);break}case"End":{Ze.preventDefault(),Rt(vt);break}case"Enter":case"Space":{Ze.preventDefault(),b(Ht??a,Ze);break}case"Backspace":case"Delete":{$e(Ht,Ze);break}}},et={};A?et[c?"marginRight":"marginLeft"]=g:et.marginTop=g;var nt=k.map(function(lt,Ze){var Tt=lt.key;return h.createElement(X7,{id:i,prefixCls:E,key:Tt,tab:lt,style:Ze===0?void 0:et,closable:lt.closable,editable:d,active:Tt===a,focus:Tt===Ht,renderWrapper:v,removeAriaLabel:f==null?void 0:f.removeAriaLabel,tabCount:mt.length,currentPosition:Ze+1,onClick:function(Ke){b(Tt,Ke)},onKeyDown:Ae,onFocus:function(){ot||Rt(Tt),bn(Tt),Me(),O.current&&(c||(O.current.scrollLeft=0),O.current.scrollTop=0)},onBlur:function(){Rt(void 0)},onMouseDown:function(Ke){return we(Tt,Ke)},onMouseUp:function(){Et(!1)}})}),Ft=function(){return Te(function(){var Ze,Tt=new Map,Gt=(Ze=N.current)===null||Ze===void 0?void 0:Ze.getBoundingClientRect();return k.forEach(function(Ke){var vt,Nt=Ke.key,pn=(vt=N.current)===null||vt===void 0?void 0:vt.querySelector('[data-node-key="'.concat(j$(Nt),'"]'));if(pn){var ir=Y7(pn,Gt),Bn=se(ir,4),Kr=Bn[0],yr=Bn[1],Gr=Bn[2],br=Bn[3];Tt.set(Nt,{width:Kr,height:yr,left:Gr,top:br})}}),Tt})};h.useEffect(function(){Ft()},[k.map(function(lt){return lt.key}).join("_")]);var Kt=z$(function(){var lt=wl($),Ze=wl(P),Tt=wl(T);Y([lt[0]-Ze[0]-Tt[0],lt[1]-Ze[1]-Tt[1]]);var Gt=wl(z);ae(Gt);var Ke=wl(I);me(Ke);var vt=wl(N);he([vt[0]-Gt[0],vt[1]-Gt[1]]),Ft()}),Bt=k.slice(0,nn),At=k.slice(Jt+1),Tn=[].concat(We(Bt),We(At)),En=ze.get(a),In=D7({activeTabOffset:En,horizontal:A,indicator:S,rtl:c}),Dn=In.style;h.useEffect(function(){bn()},[a,pt,Je,Cx(En),Cx(ze),A]),h.useEffect(function(){Kt()},[c]);var ln=!!Tn.length,fn="".concat(E,"-nav-wrap"),He,Ye,Pt,gt;return A?c?(Ye=B>0,He=B!==Je):(He=B<0,Ye=B!==pt):(Pt=L<0,gt=L!==pt),h.createElement(ao,{onResize:Kt},h.createElement("div",{ref:Xo(t,$),role:"tablist","aria-orientation":A?"horizontal":"vertical",className:ne("".concat(E,"-nav"),n),style:r,onKeyDown:function(){Me()}},h.createElement(xx,{ref:P,position:"left",extra:u,prefixCls:E}),h.createElement(ao,{onResize:Kt},h.createElement("div",{className:ne(fn,K(K(K(K({},"".concat(fn,"-ping-left"),He),"".concat(fn,"-ping-right"),Ye),"".concat(fn,"-ping-top"),Pt),"".concat(fn,"-ping-bottom"),gt)),ref:O},h.createElement(ao,{onResize:Kt},h.createElement("div",{ref:N,className:"".concat(E,"-nav-list"),style:{transform:"translate(".concat(B,"px, ").concat(L,"px)"),transition:Le?"none":void 0}},nt,h.createElement(B$,{ref:z,prefixCls:E,locale:f,editable:d,style:X(X({},nt.length===0?void 0:et),{},{visibility:ln?"hidden":null})}),h.createElement("div",{className:ne("".concat(E,"-ink-bar"),K({},"".concat(E,"-ink-bar-animated"),o.inkBar)),style:Dn}))))),h.createElement(G7,Re({},e,{removeAriaLabel:f==null?void 0:f.removeAriaLabel,ref:I,prefixCls:E,tabs:Tn,className:!ln&&$t,tabMoving:!!Le})),h.createElement(xx,{ref:T,position:"right",extra:u,prefixCls:E})))}),L$=h.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,i=e.style,o=e.id,a=e.active,c=e.tabKey,u=e.children;return h.createElement("div",{id:o&&"".concat(o,"-panel-").concat(c),role:"tabpanel",tabIndex:a?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(c),"aria-hidden":!a,style:i,className:ne(n,a&&"".concat(n,"-active"),r),ref:t},u)}),J7=["renderTabBar"],Q7=["label","key"],Z7=function(t){var n=t.renderTabBar,r=Lt(t,J7),i=h.useContext(cm),o=i.tabs;if(n){var a=X(X({},r),{},{panes:o.map(function(c){var u=c.label,d=c.key,f=Lt(c,Q7);return h.createElement(L$,Re({tab:u,key:d,tabKey:d},f))})});return n(a,wx)}return h.createElement(wx,r)},e9=["key","forceRender","style","className","destroyInactiveTabPane"],t9=function(t){var n=t.id,r=t.activeKey,i=t.animated,o=t.tabPosition,a=t.destroyInactiveTabPane,c=h.useContext(cm),u=c.prefixCls,d=c.tabs,f=i.tabPane,p="".concat(u,"-tabpane");return h.createElement("div",{className:ne("".concat(u,"-content-holder"))},h.createElement("div",{className:ne("".concat(u,"-content"),"".concat(u,"-content-").concat(o),K({},"".concat(u,"-content-animated"),f))},d.map(function(g){var v=g.key,b=g.forceRender,_=g.style,S=g.className,C=g.destroyInactiveTabPane,E=Lt(g,e9),k=v===r;return h.createElement(Vi,Re({key:v,visible:k,forceRender:b,removeOnLeave:!!(a||C),leavedClassName:"".concat(p,"-hidden")},i.tabPaneMotion),function($,P){var T=$.style,O=$.className;return h.createElement(L$,Re({},E,{prefixCls:p,id:n,tabKey:v,animated:f,active:k,style:X(X({},_),T),className:ne(S,O),ref:P}))})})))};function n9(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},t;return e===!1?t={inkBar:!1,tabPane:!1}:e===!0?t={inkBar:!0,tabPane:!1}:t=X({inkBar:!0},_t(e)==="object"?e:{}),t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}var r9=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],Ex=0,i9=h.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,i=r===void 0?"rc-tabs":r,o=e.className,a=e.items,c=e.direction,u=e.activeKey,d=e.defaultActiveKey,f=e.editable,p=e.animated,g=e.tabPosition,v=g===void 0?"top":g,b=e.tabBarGutter,_=e.tabBarStyle,S=e.tabBarExtraContent,C=e.locale,E=e.more,k=e.destroyInactiveTabPane,$=e.renderTabBar,P=e.onChange,T=e.onTabClick,O=e.onTabScroll,N=e.getPopupContainer,I=e.popupClassName,z=e.indicator,A=Lt(e,r9),M=h.useMemo(function(){return(a||[]).filter(function(ye){return ye&&_t(ye)==="object"&&"key"in ye})},[a]),j=c==="rtl",B=n9(p),F=h.useState(!1),W=se(F,2),V=W[0],L=W[1];h.useEffect(function(){L(Oy())},[]);var G=er(function(){var ye;return(ye=M[0])===null||ye===void 0?void 0:ye.key},{value:u,defaultValue:d}),U=se(G,2),D=U[0],q=U[1],Y=h.useState(function(){return M.findIndex(function(ye){return ye.key===D})}),ee=se(Y,2),Z=ee[0],re=ee[1];h.useEffect(function(){var ye=M.findIndex(function(de){return de.key===D});if(ye===-1){var me;ye=Math.max(0,Math.min(Z,M.length-1)),q((me=M[ye])===null||me===void 0?void 0:me.key)}re(ye)},[M.map(function(ye){return ye.key}).join("_"),D,Z]);var he=er(null,{value:n}),fe=se(he,2),ue=fe[0],Se=fe[1];h.useEffect(function(){n||(Se("rc-tabs-".concat(Ex)),Ex+=1)},[]);function ae(ye,me){T==null||T(ye,me);var de=ye!==D;q(ye),de&&(P==null||P(ye))}var le={id:ue,activeKey:D,animated:B,tabPosition:v,rtl:j,mobile:V},ce=X(X({},le),{},{editable:f,locale:C,more:E,tabBarGutter:b,onTabClick:ae,onTabScroll:O,extra:S,style:_,panes:null,getPopupContainer:N,popupClassName:I,indicator:z});return h.createElement(cm.Provider,{value:{tabs:M,prefixCls:i}},h.createElement("div",Re({ref:t,id:n,className:ne(i,"".concat(i,"-").concat(v),K(K(K({},"".concat(i,"-mobile"),V),"".concat(i,"-editable"),f),"".concat(i,"-rtl"),j),o)},A),h.createElement(Z7,Re({},ce,{renderTabBar:$})),h.createElement(t9,Re({destroyInactiveTabPane:k},le,{animated:B}))))});const o9={motionAppear:!1,motionEnter:!0,motionLeave:!0};function s9(e,t={inkBar:!0,tabPane:!1}){let n;return t===!1?n={inkBar:!1,tabPane:!1}:t===!0?n={inkBar:!0,tabPane:!0}:n=Object.assign({inkBar:!0},typeof t=="object"?t:{}),n.tabPane&&(n.tabPaneMotion=Object.assign(Object.assign({},o9),{motionName:qo(e,"switch")})),n}var a9=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function l9(e){return e.filter(t=>t)}function c9(e,t){if(e)return e.map(r=>{var i;const o=(i=r.destroyOnHidden)!==null&&i!==void 0?i:r.destroyInactiveTabPane;return Object.assign(Object.assign({},r),{destroyInactiveTabPane:o})});const n=hi(t).map(r=>{if(h.isValidElement(r)){const{key:i,props:o}=r,a=o||{},{tab:c}=a,u=a9(a,["tab"]);return Object.assign(Object.assign({key:String(i)},u),{label:c})}return null});return l9(n)}const u9=e=>{const{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[ea(e,"slide-up"),ea(e,"slide-down")]]},d9=e=>{const{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:o,itemSelectedColor:a}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${te(e.lineWidth)} ${e.lineType} ${o}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:a,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:Ta(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:"none"},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:te(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:te(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${te(e.borderRadiusLG)} 0 0 ${te(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},h9=e=>{const{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${t}-dropdown`]:Object.assign(Object.assign({},Vn(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${te(r)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":Object.assign(Object.assign({},_u),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${te(e.paddingXXS)} ${te(e.paddingSM)}`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},f9=e=>{const{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:o,verticalItemMargin:a,calc:c}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:i,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${te(e.lineWidth)} ${e.lineType} ${r}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
291
- right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,
292
- > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:c(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:o,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:a},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:te(c(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:c(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},m9=e=>{const{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:o,horizontalItemPaddingSM:a,horizontalItemPaddingLG:c}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:a,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:c,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${te(e.borderRadius)} ${te(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${te(e.borderRadius)} ${te(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${te(e.borderRadius)} ${te(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${te(e.borderRadius)} 0 0 ${te(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:o,minHeight:o}}}}}},p9=e=>{const{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:o,horizontalItemPadding:a,itemSelectedColor:c,itemColor:u}=e,d=`${t}-tab`;return{[d]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:a,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:u,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${d}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":Object.assign({flex:"none",lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},uo(e)),"&:hover":{color:r},[`&${d}-active ${d}-btn`]:{color:c,textShadow:e.tabsActiveTextShadow},[`&${d}-focus ${d}-btn:focus-visible`]:Ta(e),[`&${d}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${d}-disabled ${d}-btn, &${d}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${d}-remove ${i}`]:{margin:0,verticalAlign:"middle"},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${d} + ${d}`]:{margin:{_skip_check_:!0,value:o}}}},g9=e=>{const{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:o}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:te(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:te(e.marginXS)},marginLeft:{_skip_check_:!0,value:te(o(e.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},v9=e=>{const{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:o,itemActiveColor:a,colorBorderSecondary:c}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},Vn(e)),{display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:Object.assign({minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:"transparent",border:`${te(e.lineWidth)} ${e.lineType} ${c}`,borderRadius:`${te(e.borderRadiusLG)} ${te(e.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:a}},uo(e,-3))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"}}),p9(e)),{[`${t}-content`]:{position:"relative",width:"100%"},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:Object.assign(Object.assign({},uo(e)),{"&-hidden":{display:"none"}})}),[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:"auto"}}}}}},y9=e=>{const{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:o}=e,a=t||o,c=n||i,u=r||o+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:a,cardHeightSM:c,cardHeightLG:u,cardPadding:`${(a-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(c-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(u-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}},b9=yn("Tabs",e=>{const t=tn(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${te(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${te(e.horizontalItemGutter)}`});return[m9(t),g9(t),f9(t),h9(t),d9(t),v9(t),u9(t)]},y9),_9=()=>null;var S9=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const C9=h.forwardRef((e,t)=>{var n,r,i,o,a,c,u,d,f,p,g;const{type:v,className:b,rootClassName:_,size:S,onEdit:C,hideAdd:E,centered:k,addIcon:$,removeIcon:P,moreIcon:T,more:O,popupClassName:N,children:I,items:z,animated:A,style:M,indicatorSize:j,indicator:B,destroyInactiveTabPane:F,destroyOnHidden:W}=e,V=S9(e,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator","destroyInactiveTabPane","destroyOnHidden"]),{prefixCls:L}=V,{direction:G,tabs:U,getPrefixCls:D,getPopupContainer:q}=h.useContext(Ot),Y=D("tabs",L),ee=Po(Y),[Z,re,he]=b9(Y,ee),fe=h.useRef(null);h.useImperativeHandle(t,()=>({nativeElement:fe.current}));let ue;v==="editable-card"&&(ue={onEdit:(de,{key:be,event:xe})=>{C==null||C(de==="add"?xe:be,de)},removeIcon:(n=P??(U==null?void 0:U.removeIcon))!==null&&n!==void 0?n:h.createElement(Zs,null),addIcon:($??(U==null?void 0:U.addIcon))||h.createElement(A7,null),showAdd:E!==!0});const Se=D(),ae=Jo(S),le=c9(z,I),ce=s9(Y,A),ye=Object.assign(Object.assign({},U==null?void 0:U.style),M),me={align:(r=B==null?void 0:B.align)!==null&&r!==void 0?r:(i=U==null?void 0:U.indicator)===null||i===void 0?void 0:i.align,size:(u=(a=(o=B==null?void 0:B.size)!==null&&o!==void 0?o:j)!==null&&a!==void 0?a:(c=U==null?void 0:U.indicator)===null||c===void 0?void 0:c.size)!==null&&u!==void 0?u:U==null?void 0:U.indicatorSize};return Z(h.createElement(i9,Object.assign({ref:fe,direction:G,getPopupContainer:q},V,{items:le,className:ne({[`${Y}-${ae}`]:ae,[`${Y}-card`]:["card","editable-card"].includes(v),[`${Y}-editable-card`]:v==="editable-card",[`${Y}-centered`]:k},U==null?void 0:U.className,b,_,re,he,ee),popupClassName:ne(N,re,he,ee),style:ye,editable:ue,more:Object.assign({icon:(g=(p=(f=(d=U==null?void 0:U.more)===null||d===void 0?void 0:d.icon)!==null&&f!==void 0?f:U==null?void 0:U.moreIcon)!==null&&p!==void 0?p:T)!==null&&g!==void 0?g:h.createElement(Gy,null),transitionName:`${Se}-slide-up`},O),prefixCls:Y,animated:ce,indicator:me,destroyInactiveTabPane:W??F})))}),Zy=C9;Zy.TabPane=_9;function x9(e,t,n){var r=n||{},i=r.noTrailing,o=i===void 0?!1:i,a=r.noLeading,c=a===void 0?!1:a,u=r.debounceMode,d=u===void 0?void 0:u,f,p=!1,g=0;function v(){f&&clearTimeout(f)}function b(S){var C=S||{},E=C.upcomingOnly,k=E===void 0?!1:E;v(),p=!k}function _(){for(var S=arguments.length,C=new Array(S),E=0;E<S;E++)C[E]=arguments[E];var k=this,$=Date.now()-g;if(p)return;function P(){g=Date.now(),t.apply(k,C)}function T(){f=void 0}!c&&d&&!f&&P(),v(),d===void 0&&$>e?c?(g=Date.now(),o||(f=setTimeout(d?T:P,e))):P():o!==!0&&(f=setTimeout(d?T:P,d===void 0?e-$:e))}return _.cancel=b,_}function w9(e,t,n){var r={},i=r.atBegin,o=i===void 0?!1:i;return x9(e,t,{debounceMode:o!==!1})}const E9=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},Vn(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:Object.assign(Object.assign({},Vn(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},Vn(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:Ta(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${te(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`
293
- ${n}:not(${n}-disabled),
294
- ${t}:not(${t}-disabled)
295
- `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
296
- ${n}-checked:not(${n}-disabled),
297
- ${t}-checked:not(${t}-disabled)
298
- `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function k9(e,t){const n=tn(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return E9(n)}const A$=yn("Checkbox",(e,{prefixCls:t})=>[k9(t,e)]),D$=Q.createContext(null);var $9=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const R9=(e,t)=>{var n;const{prefixCls:r,className:i,rootClassName:o,children:a,indeterminate:c=!1,style:u,onMouseEnter:d,onMouseLeave:f,skipGroup:p=!1,disabled:g}=e,v=$9(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:b,direction:_,checkbox:S}=h.useContext(Ot),C=h.useContext(D$),{isFormItemInput:E}=h.useContext(Cu),k=h.useContext(Js),$=(n=(C==null?void 0:C.disabled)||g)!==null&&n!==void 0?n:k,P=h.useRef(v.value),T=h.useRef(null),O=ho(t,T);h.useEffect(()=>{C==null||C.registerValue(v.value)},[]),h.useEffect(()=>{if(!p)return v.value!==P.current&&(C==null||C.cancelValue(P.current),C==null||C.registerValue(v.value),P.current=v.value),()=>C==null?void 0:C.cancelValue(v.value)},[v.value]),h.useEffect(()=>{var L;!((L=T.current)===null||L===void 0)&&L.input&&(T.current.input.indeterminate=c)},[c]);const N=b("checkbox",r),I=Po(N),[z,A,M]=A$(N,I),j=Object.assign({},v);C&&!p&&(j.onChange=(...L)=>{v.onChange&&v.onChange.apply(v,L),C.toggleOption&&C.toggleOption({label:a,value:v.value})},j.name=C.name,j.checked=C.value.includes(v.value));const B=ne(`${N}-wrapper`,{[`${N}-rtl`]:_==="rtl",[`${N}-wrapper-checked`]:j.checked,[`${N}-wrapper-disabled`]:$,[`${N}-wrapper-in-form-item`]:E},S==null?void 0:S.className,i,o,M,I,A),F=ne({[`${N}-indeterminate`]:c},xy,A),[W,V]=_7(j.onClick);return z(h.createElement(Lf,{component:"Checkbox",disabled:$},h.createElement("label",{className:B,style:Object.assign(Object.assign({},S==null?void 0:S.style),u),onMouseEnter:d,onMouseLeave:f,onClick:W},h.createElement(b7,Object.assign({},j,{onClick:V,prefixCls:N,className:F,disabled:$,ref:O})),a!=null&&h.createElement("span",{className:`${N}-label`},a))))},H$=h.forwardRef(R9);var T9=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const P9=h.forwardRef((e,t)=>{const{defaultValue:n,children:r,options:i=[],prefixCls:o,className:a,rootClassName:c,style:u,onChange:d}=e,f=T9(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:p,direction:g}=h.useContext(Ot),[v,b]=h.useState(f.value||n||[]),[_,S]=h.useState([]);h.useEffect(()=>{"value"in f&&b(f.value||[])},[f.value]);const C=h.useMemo(()=>i.map(F=>typeof F=="string"||typeof F=="number"?{label:F,value:F}:F),[i]),E=F=>{S(W=>W.filter(V=>V!==F))},k=F=>{S(W=>[].concat(We(W),[F]))},$=F=>{const W=v.indexOf(F.value),V=We(v);W===-1?V.push(F.value):V.splice(W,1),"value"in f||b(V),d==null||d(V.filter(L=>_.includes(L)).sort((L,G)=>{const U=C.findIndex(q=>q.value===L),D=C.findIndex(q=>q.value===G);return U-D}))},P=p("checkbox",o),T=`${P}-group`,O=Po(P),[N,I,z]=A$(P,O),A=dr(f,["value","disabled"]),M=i.length?C.map(F=>h.createElement(H$,{prefixCls:P,key:F.value.toString(),disabled:"disabled"in F?F.disabled:f.disabled,value:F.value,checked:v.includes(F.value),onChange:F.onChange,className:ne(`${T}-item`,F.className),style:F.style,title:F.title,id:F.id,required:F.required},F.label)):r,j=h.useMemo(()=>({toggleOption:$,value:v,disabled:f.disabled,name:f.name,registerValue:k,cancelValue:E}),[$,v,f.disabled,f.name,k,E]),B=ne(T,{[`${T}-rtl`]:g==="rtl"},a,c,z,O,I);return N(h.createElement("div",Object.assign({className:B,style:u},A,{ref:t}),h.createElement(D$.Provider,{value:j},M)))}),eb=H$;eb.Group=P9;eb.__ANT_CHECKBOX=!0;const F$=h.createContext({});var O9=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function kx(e){return e==="auto"?"1 1 auto":typeof e=="number"?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}const I9=["xs","sm","md","lg","xl","xxl"],N9=h.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=h.useContext(Ot),{gutter:i,wrap:o}=h.useContext(F$),{prefixCls:a,span:c,order:u,offset:d,push:f,pull:p,className:g,children:v,flex:b,style:_}=e,S=O9(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),C=n("col",a),[E,k,$]=$8(C),P={};let T={};I9.forEach(I=>{let z={};const A=e[I];typeof A=="number"?z.span=A:typeof A=="object"&&(z=A||{}),delete S[I],T=Object.assign(Object.assign({},T),{[`${C}-${I}-${z.span}`]:z.span!==void 0,[`${C}-${I}-order-${z.order}`]:z.order||z.order===0,[`${C}-${I}-offset-${z.offset}`]:z.offset||z.offset===0,[`${C}-${I}-push-${z.push}`]:z.push||z.push===0,[`${C}-${I}-pull-${z.pull}`]:z.pull||z.pull===0,[`${C}-rtl`]:r==="rtl"}),z.flex&&(T[`${C}-${I}-flex`]=!0,P[`--${C}-${I}-flex`]=kx(z.flex))});const O=ne(C,{[`${C}-${c}`]:c!==void 0,[`${C}-order-${u}`]:u,[`${C}-offset-${d}`]:d,[`${C}-push-${f}`]:f,[`${C}-pull-${p}`]:p},g,T,k,$),N={};if(i!=null&&i[0]){const I=typeof i[0]=="number"?`${i[0]/2}px`:`calc(${i[0]} / 2)`;N.paddingLeft=I,N.paddingRight=I}return b&&(N.flex=kx(b),o===!1&&!N.minWidth&&(N.minWidth=0)),E(h.createElement("div",Object.assign({},S,{style:Object.assign(Object.assign(Object.assign({},N),_),P),className:O,ref:t}),v))});function M9(e,t){const n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0};return r.forEach((o,a)=>{if(typeof o=="object"&&o!==null)for(let c=0;c<Pa.length;c++){const u=Pa[c];if(i[u]&&o[u]!==void 0){n[a]=o[u];break}}else n[a]=o}),n}var z9=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function $x(e,t){const[n,r]=h.useState(typeof e=="string"?e:""),i=()=>{if(typeof e=="string"&&r(e),typeof e=="object")for(let o=0;o<Pa.length;o++){const a=Pa[o];if(!t||!t[a])continue;const c=e[a];if(c!==void 0){r(c);return}}};return h.useEffect(()=>{i()},[JSON.stringify(e),t]),n}const j9=h.forwardRef((e,t)=>{const{prefixCls:n,justify:r,align:i,className:o,style:a,children:c,gutter:u=0,wrap:d}=e,f=z9(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),{getPrefixCls:p,direction:g}=h.useContext(Ot),v=jy(!0,null),b=$x(i,v),_=$x(r,v),S=p("row",n),[C,E,k]=k8(S),$=M9(u,v),P=ne(S,{[`${S}-no-wrap`]:d===!1,[`${S}-${_}`]:_,[`${S}-${b}`]:b,[`${S}-rtl`]:g==="rtl"},o,E,k),T={};if($!=null&&$[0]){const z=typeof $[0]=="number"?`${$[0]/-2}px`:`calc(${$[0]} / -2)`;T.marginLeft=z,T.marginRight=z}const[O,N]=$;T.rowGap=N;const I=h.useMemo(()=>({gutter:[O,N],wrap:d}),[O,N,d]);return C(h.createElement(F$.Provider,{value:I},h.createElement("div",Object.assign({},f,{className:P,style:Object.assign(Object.assign({},T),a),ref:t}),c)))}),B9=e=>{const{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},L9=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:o,orientationMargin:a,verticalMarginInline:c}=e;return{[t]:Object.assign(Object.assign({},Vn(e)),{borderBlockStart:`${te(i)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${te(i)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${te(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${te(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${te(i)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${a} * 100%)`},"&::after":{width:`calc(100% - ${a} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${a} * 100%)`},"&::after":{width:`calc(${a} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${te(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${te(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}},A9=e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),D9=yn("Divider",e=>{const t=tn(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[L9(t),B9(t)]},A9,{unitless:{orientationMargin:!0}});var H9=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const F9={small:"sm",middle:"md"},Rx=e=>{const{getPrefixCls:t,direction:n,className:r,style:i}=Ur("divider"),{prefixCls:o,type:a="horizontal",orientation:c="center",orientationMargin:u,className:d,rootClassName:f,children:p,dashed:g,variant:v="solid",plain:b,style:_,size:S}=e,C=H9(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),E=t("divider",o),[k,$,P]=D9(E),T=Jo(S),O=F9[T],N=!!p,I=h.useMemo(()=>c==="left"?n==="rtl"?"end":"start":c==="right"?n==="rtl"?"start":"end":c,[n,c]),z=I==="start"&&u!=null,A=I==="end"&&u!=null,M=ne(E,r,$,P,`${E}-${a}`,{[`${E}-with-text`]:N,[`${E}-with-text-${I}`]:N,[`${E}-dashed`]:!!g,[`${E}-${v}`]:v!=="solid",[`${E}-plain`]:!!b,[`${E}-rtl`]:n==="rtl",[`${E}-no-default-orientation-margin-start`]:z,[`${E}-no-default-orientation-margin-end`]:A,[`${E}-${O}`]:!!O},d,f),j=h.useMemo(()=>typeof u=="number"?u:/^\d+$/.test(u)?Number(u):u,[u]),B={marginInlineStart:z?j:void 0,marginInlineEnd:A?j:void 0};return k(h.createElement("div",Object.assign({className:M,style:Object.assign(Object.assign({},i),_)},C,{role:"separator"}),p&&a!=="vertical"&&h.createElement("span",{className:`${E}-inner-text`,style:B},p)))};function W9(e){return!!(e.addonBefore||e.addonAfter)}function V9(e){return!!(e.prefix||e.suffix||e.allowClear)}function Tx(e,t,n){var r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},i}function Px(e,t,n,r){if(n){var i=t;if(t.type==="click"){i=Tx(t,e,""),n(i);return}if(e.type!=="file"&&r!==void 0){i=Tx(t,e,r),n(i);return}n(i)}}function q9(e,t){if(e){e.focus(t);var n=t||{},r=n.cursor;if(r){var i=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(i,i);break;default:e.setSelectionRange(0,i)}}}}var U9=Q.forwardRef(function(e,t){var n,r,i,o=e.inputElement,a=e.children,c=e.prefixCls,u=e.prefix,d=e.suffix,f=e.addonBefore,p=e.addonAfter,g=e.className,v=e.style,b=e.disabled,_=e.readOnly,S=e.focused,C=e.triggerFocus,E=e.allowClear,k=e.value,$=e.handleReset,P=e.hidden,T=e.classes,O=e.classNames,N=e.dataAttrs,I=e.styles,z=e.components,A=e.onClear,M=a??o,j=(z==null?void 0:z.affixWrapper)||"span",B=(z==null?void 0:z.groupWrapper)||"span",F=(z==null?void 0:z.wrapper)||"span",W=(z==null?void 0:z.groupAddon)||"span",V=h.useRef(null),L=function(me){var de;(de=V.current)!==null&&de!==void 0&&de.contains(me.target)&&(C==null||C())},G=V9(e),U=h.cloneElement(M,{value:k,className:ne((n=M.props)===null||n===void 0?void 0:n.className,!G&&(O==null?void 0:O.variant))||null}),D=h.useRef(null);if(Q.useImperativeHandle(t,function(){return{nativeElement:D.current||V.current}}),G){var q=null;if(E){var Y=!b&&!_&&k,ee="".concat(c,"-clear-icon"),Z=_t(E)==="object"&&E!==null&&E!==void 0&&E.clearIcon?E.clearIcon:"✖";q=Q.createElement("button",{type:"button",tabIndex:-1,onClick:function(me){$==null||$(me),A==null||A()},onMouseDown:function(me){return me.preventDefault()},className:ne(ee,K(K({},"".concat(ee,"-hidden"),!Y),"".concat(ee,"-has-suffix"),!!d))},Z)}var re="".concat(c,"-affix-wrapper"),he=ne(re,K(K(K(K(K({},"".concat(c,"-disabled"),b),"".concat(re,"-disabled"),b),"".concat(re,"-focused"),S),"".concat(re,"-readonly"),_),"".concat(re,"-input-with-clear-btn"),d&&E&&k),T==null?void 0:T.affixWrapper,O==null?void 0:O.affixWrapper,O==null?void 0:O.variant),fe=(d||E)&&Q.createElement("span",{className:ne("".concat(c,"-suffix"),O==null?void 0:O.suffix),style:I==null?void 0:I.suffix},q,d);U=Q.createElement(j,Re({className:he,style:I==null?void 0:I.affixWrapper,onClick:L},N==null?void 0:N.affixWrapper,{ref:V}),u&&Q.createElement("span",{className:ne("".concat(c,"-prefix"),O==null?void 0:O.prefix),style:I==null?void 0:I.prefix},u),U,fe)}if(W9(e)){var ue="".concat(c,"-group"),Se="".concat(ue,"-addon"),ae="".concat(ue,"-wrapper"),le=ne("".concat(c,"-wrapper"),ue,T==null?void 0:T.wrapper,O==null?void 0:O.wrapper),ce=ne(ae,K({},"".concat(ae,"-disabled"),b),T==null?void 0:T.group,O==null?void 0:O.groupWrapper);U=Q.createElement(B,{className:ce,ref:D},Q.createElement(F,{className:le},f&&Q.createElement(W,{className:Se},f),U,p&&Q.createElement(W,{className:Se},p)))}return Q.cloneElement(U,{className:ne((r=U.props)===null||r===void 0?void 0:r.className,g)||null,style:X(X({},(i=U.props)===null||i===void 0?void 0:i.style),v),hidden:P})}),K9=["show"];function G9(e,t){return h.useMemo(function(){var n={};t&&(n.show=_t(t)==="object"&&t.formatter?t.formatter:!!t),n=X(X({},n),e);var r=n,i=r.show,o=Lt(r,K9);return X(X({},o),{},{show:!!i,showFormatter:typeof i=="function"?i:void 0,strategy:o.strategy||function(a){return a.length}})},[e,t])}const X9=e=>{let t;return typeof e=="object"&&(e!=null&&e.clearIcon)?t=e:e&&(t={clearIcon:Q.createElement(jf,null)}),t};var Ox=h.createContext(null),W$=h.createContext({}),Y9=["prefixCls","className","containerRef"],J9=function(t){var n=t.prefixCls,r=t.className,i=t.containerRef,o=Lt(t,Y9),a=h.useContext(W$),c=a.panel,u=Xo(c,i);return h.createElement("div",Re({className:ne("".concat(n,"-content"),r),role:"dialog",ref:u},qi(t,{aria:!0}),{"aria-modal":"true"},o))};function Ix(e){return typeof e=="string"&&String(Number(e))===e?(Br(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}var Nx={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Q9(e,t){var n,r,i,o=e.prefixCls,a=e.open,c=e.placement,u=e.inline,d=e.push,f=e.forceRender,p=e.autoFocus,g=e.keyboard,v=e.classNames,b=e.rootClassName,_=e.rootStyle,S=e.zIndex,C=e.className,E=e.id,k=e.style,$=e.motion,P=e.width,T=e.height,O=e.children,N=e.mask,I=e.maskClosable,z=e.maskMotion,A=e.maskClassName,M=e.maskStyle,j=e.afterOpenChange,B=e.onClose,F=e.onMouseEnter,W=e.onMouseOver,V=e.onMouseLeave,L=e.onClick,G=e.onKeyDown,U=e.onKeyUp,D=e.styles,q=e.drawerRender,Y=h.useRef(),ee=h.useRef(),Z=h.useRef();h.useImperativeHandle(t,function(){return Y.current});var re=function(ke){var je=ke.keyCode,Oe=ke.shiftKey;switch(je){case Ge.TAB:{if(je===Ge.TAB){if(!Oe&&document.activeElement===Z.current){var Qe;(Qe=ee.current)===null||Qe===void 0||Qe.focus({preventScroll:!0})}else if(Oe&&document.activeElement===ee.current){var at;(at=Z.current)===null||at===void 0||at.focus({preventScroll:!0})}}break}case Ge.ESC:{B&&g&&(ke.stopPropagation(),B(ke));break}}};h.useEffect(function(){if(a&&p){var Ee;(Ee=Y.current)===null||Ee===void 0||Ee.focus({preventScroll:!0})}},[a]);var he=h.useState(!1),fe=se(he,2),ue=fe[0],Se=fe[1],ae=h.useContext(Ox),le;typeof d=="boolean"?le=d?{}:{distance:0}:le=d||{};var ce=(n=(r=(i=le)===null||i===void 0?void 0:i.distance)!==null&&r!==void 0?r:ae==null?void 0:ae.pushDistance)!==null&&n!==void 0?n:180,ye=h.useMemo(function(){return{pushDistance:ce,push:function(){Se(!0)},pull:function(){Se(!1)}}},[ce]);h.useEffect(function(){if(a){var Ee;ae==null||(Ee=ae.push)===null||Ee===void 0||Ee.call(ae)}else{var ke;ae==null||(ke=ae.pull)===null||ke===void 0||ke.call(ae)}},[a]),h.useEffect(function(){return function(){var Ee;ae==null||(Ee=ae.pull)===null||Ee===void 0||Ee.call(ae)}},[]);var me=h.createElement(Vi,Re({key:"mask"},z,{visible:N&&a}),function(Ee,ke){var je=Ee.className,Oe=Ee.style;return h.createElement("div",{className:ne("".concat(o,"-mask"),je,v==null?void 0:v.mask,A),style:X(X(X({},Oe),M),D==null?void 0:D.mask),onClick:I&&a?B:void 0,ref:ke})}),de=typeof $=="function"?$(c):$,be={};if(ue&&ce)switch(c){case"top":be.transform="translateY(".concat(ce,"px)");break;case"bottom":be.transform="translateY(".concat(-ce,"px)");break;case"left":be.transform="translateX(".concat(ce,"px)");break;default:be.transform="translateX(".concat(-ce,"px)");break}c==="left"||c==="right"?be.width=Ix(P):be.height=Ix(T);var xe={onMouseEnter:F,onMouseOver:W,onMouseLeave:V,onClick:L,onKeyDown:G,onKeyUp:U},Te=h.createElement(Vi,Re({key:"panel"},de,{visible:a,forceRender:f,onVisibleChanged:function(ke){j==null||j(ke)},removeOnLeave:!1,leavedClassName:"".concat(o,"-content-wrapper-hidden")}),function(Ee,ke){var je=Ee.className,Oe=Ee.style,Qe=h.createElement(J9,Re({id:E,containerRef:ke,prefixCls:o,className:ne(C,v==null?void 0:v.content),style:X(X({},k),D==null?void 0:D.content)},qi(e,{aria:!0}),xe),O);return h.createElement("div",Re({className:ne("".concat(o,"-content-wrapper"),v==null?void 0:v.wrapper,je),style:X(X(X({},be),Oe),D==null?void 0:D.wrapper)},qi(e,{data:!0})),q?q(Qe):Qe)}),ze=X({},_);return S&&(ze.zIndex=S),h.createElement(Ox.Provider,{value:ye},h.createElement("div",{className:ne(o,"".concat(o,"-").concat(c),b,K(K({},"".concat(o,"-open"),a),"".concat(o,"-inline"),u)),style:ze,tabIndex:-1,ref:Y,onKeyDown:re},me,h.createElement("div",{tabIndex:0,ref:ee,style:Nx,"aria-hidden":"true","data-sentinel":"start"}),Te,h.createElement("div",{tabIndex:0,ref:Z,style:Nx,"aria-hidden":"true","data-sentinel":"end"})))}var Z9=h.forwardRef(Q9),eA=function(t){var n=t.open,r=n===void 0?!1:n,i=t.prefixCls,o=i===void 0?"rc-drawer":i,a=t.placement,c=a===void 0?"right":a,u=t.autoFocus,d=u===void 0?!0:u,f=t.keyboard,p=f===void 0?!0:f,g=t.width,v=g===void 0?378:g,b=t.mask,_=b===void 0?!0:b,S=t.maskClosable,C=S===void 0?!0:S,E=t.getContainer,k=t.forceRender,$=t.afterOpenChange,P=t.destroyOnClose,T=t.onMouseEnter,O=t.onMouseOver,N=t.onMouseLeave,I=t.onClick,z=t.onKeyDown,A=t.onKeyUp,M=t.panelRef,j=h.useState(!1),B=se(j,2),F=B[0],W=B[1],V=h.useState(!1),L=se(V,2),G=L[0],U=L[1];hn(function(){U(!0)},[]);var D=G?r:!1,q=h.useRef(),Y=h.useRef();hn(function(){D&&(Y.current=document.activeElement)},[D]);var ee=function(ue){var Se;if(W(ue),$==null||$(ue),!ue&&Y.current&&!((Se=q.current)!==null&&Se!==void 0&&Se.contains(Y.current))){var ae;(ae=Y.current)===null||ae===void 0||ae.focus({preventScroll:!0})}},Z=h.useMemo(function(){return{panel:M}},[M]);if(!k&&!F&&!D&&P)return null;var re={onMouseEnter:T,onMouseOver:O,onMouseLeave:N,onClick:I,onKeyDown:z,onKeyUp:A},he=X(X({},t),{},{open:D,prefixCls:o,placement:c,autoFocus:d,keyboard:p,width:v,mask:_,maskClosable:C,inline:E===!1,afterOpenChange:ee,ref:q},re);return h.createElement(W$.Provider,{value:Z},h.createElement(Gf,{open:D||k||F,autoDestroy:!1,getContainer:E,autoLock:_&&(D||F)},h.createElement(Z9,he)))};const V$=e=>{var t,n;const{prefixCls:r,ariaId:i,title:o,footer:a,extra:c,closable:u,loading:d,onClose:f,headerStyle:p,bodyStyle:g,footerStyle:v,children:b,classNames:_,styles:S}=e,C=Ur("drawer");let E;u===!1?E=void 0:u===void 0||u===!0?E="start":E=(u==null?void 0:u.placement)==="end"?"end":"start";const k=h.useCallback(N=>h.createElement("button",{type:"button",onClick:f,className:ne(`${r}-close`,{[`${r}-close-${E}`]:E==="end"})},N),[f,r,E]),[$,P]=yy(Gl(e),Gl(C),{closable:!0,closeIconRender:k}),T=()=>{var N,I;return!o&&!$?null:h.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(N=C.styles)===null||N===void 0?void 0:N.header),p),S==null?void 0:S.header),className:ne(`${r}-header`,{[`${r}-header-close-only`]:$&&!o&&!c},(I=C.classNames)===null||I===void 0?void 0:I.header,_==null?void 0:_.header)},h.createElement("div",{className:`${r}-header-title`},E==="start"&&P,o&&h.createElement("div",{className:`${r}-title`,id:i},o)),c&&h.createElement("div",{className:`${r}-extra`},c),E==="end"&&P)},O=()=>{var N,I;if(!a)return null;const z=`${r}-footer`;return h.createElement("div",{className:ne(z,(N=C.classNames)===null||N===void 0?void 0:N.footer,_==null?void 0:_.footer),style:Object.assign(Object.assign(Object.assign({},(I=C.styles)===null||I===void 0?void 0:I.footer),v),S==null?void 0:S.footer)},a)};return h.createElement(h.Fragment,null,T(),h.createElement("div",{className:ne(`${r}-body`,_==null?void 0:_.body,(t=C.classNames)===null||t===void 0?void 0:t.body),style:Object.assign(Object.assign(Object.assign({},(n=C.styles)===null||n===void 0?void 0:n.body),g),S==null?void 0:S.body)},d?h.createElement(La,{active:!0,title:!1,paragraph:{rows:5},className:`${r}-body-skeleton`}):b),O())},tA=e=>{const t="100%";return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},q$=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),U$=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${t}`}}},q$({opacity:e},{opacity:1})),nA=(e,t)=>[U$(.7,t),q$({transform:tA(e)},{transform:"none"})],rA=e=>{const{componentCls:t,motionDurationSlow:n}=e;return{[t]:{[`${t}-mask-motion`]:U$(0,n),[`${t}-panel-motion`]:["left","right","top","bottom"].reduce((r,i)=>Object.assign(Object.assign({},r),{[`&-${i}`]:nA(i,n)}),{})}}},iA=e=>{const{borderRadiusSM:t,componentCls:n,zIndexPopup:r,colorBgMask:i,colorBgElevated:o,motionDurationSlow:a,motionDurationMid:c,paddingXS:u,padding:d,paddingLG:f,fontSizeLG:p,lineHeightLG:g,lineWidth:v,lineType:b,colorSplit:_,marginXS:S,colorIcon:C,colorIconHover:E,colorBgTextHover:k,colorBgTextActive:$,colorText:P,fontWeightStrong:T,footerPaddingBlock:O,footerPaddingInline:N,calc:I}=e,z=`${n}-content-wrapper`;return{[n]:{position:"fixed",inset:0,zIndex:r,pointerEvents:"none",color:P,"&-pure":{position:"relative",background:o,display:"flex",flexDirection:"column",[`&${n}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${n}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${n}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${n}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${n}-mask`]:{position:"absolute",inset:0,zIndex:r,background:i,pointerEvents:"auto"},[z]:{position:"absolute",zIndex:r,maxWidth:"100vw",transition:`all ${a}`,"&-hidden":{display:"none"}},[`&-left > ${z}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${z}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${z}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${z}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${n}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:o,pointerEvents:"auto"},[`${n}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${te(d)} ${te(f)}`,fontSize:p,lineHeight:g,borderBottom:`${te(v)} ${b} ${_}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${n}-extra`]:{flex:"none"},[`${n}-close`]:Object.assign({display:"inline-flex",width:I(p).add(u).equal(),height:I(p).add(u).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",color:C,fontWeight:T,fontSize:p,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${c}`,textRendering:"auto",[`&${n}-close-end`]:{marginInlineStart:S},[`&:not(${n}-close-end)`]:{marginInlineEnd:S},"&:hover":{color:E,backgroundColor:k,textDecoration:"none"},"&:active":{backgroundColor:$}},uo(e)),[`${n}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:p,lineHeight:g},[`${n}-body`]:{flex:1,minWidth:0,minHeight:0,padding:f,overflow:"auto",[`${n}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${n}-footer`]:{flexShrink:0,padding:`${te(O)} ${te(N)}`,borderTop:`${te(v)} ${b} ${_}`},"&-rtl":{direction:"rtl"}}}},oA=e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding}),K$=yn("Drawer",e=>{const t=tn(e,{});return[iA(t),rA(t)]},oA);var G$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const sA={distance:180},jh=e=>{const{rootClassName:t,width:n,height:r,size:i="default",mask:o=!0,push:a=sA,open:c,afterOpenChange:u,onClose:d,prefixCls:f,getContainer:p,panelRef:g=null,style:v,className:b,"aria-labelledby":_,visible:S,afterVisibleChange:C,maskStyle:E,drawerStyle:k,contentWrapperStyle:$,destroyOnClose:P,destroyOnHidden:T}=e,O=G$(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","aria-labelledby","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),N=Xf(),I=O.title?N:void 0,{getPopupContainer:z,getPrefixCls:A,direction:M,className:j,style:B,classNames:F,styles:W}=Ur("drawer"),V=A("drawer",f),[L,G,U]=K$(V),D=p===void 0&&z?()=>z(document.body):p,q=ne({"no-mask":!o,[`${V}-rtl`]:M==="rtl"},t,G,U),Y=h.useMemo(()=>n??(i==="large"?736:378),[n,i]),ee=h.useMemo(()=>r??(i==="large"?736:378),[r,i]),Z={motionName:qo(V,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},re=ce=>({motionName:qo(V,`panel-motion-${ce}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),he=fk(),fe=ho(g,he),[ue,Se]=tc("Drawer",O.zIndex),{classNames:ae={},styles:le={}}=O;return L(h.createElement(Vu,{form:!0,space:!0},h.createElement(Bu.Provider,{value:Se},h.createElement(eA,Object.assign({prefixCls:V,onClose:d,maskMotion:Z,motion:re},O,{classNames:{mask:ne(ae.mask,F.mask),content:ne(ae.content,F.content),wrapper:ne(ae.wrapper,F.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},le.mask),E),W.mask),content:Object.assign(Object.assign(Object.assign({},le.content),k),W.content),wrapper:Object.assign(Object.assign(Object.assign({},le.wrapper),$),W.wrapper)},open:c??S,mask:o,push:a,width:Y,height:ee,style:Object.assign(Object.assign({},B),v),className:ne(j,b),rootClassName:q,getContainer:D,afterOpenChange:u??C,panelRef:fe,zIndex:ue,"aria-labelledby":_??I,destroyOnClose:T??P}),h.createElement(V$,Object.assign({prefixCls:V},O,{ariaId:I,onClose:d}))))))},aA=e=>{const{prefixCls:t,style:n,className:r,placement:i="right"}=e,o=G$(e,["prefixCls","style","className","placement"]),{getPrefixCls:a}=h.useContext(Ot),c=a("drawer",t),[u,d,f]=K$(c),p=ne(c,`${c}-pure`,`${c}-${i}`,d,f,r);return u(h.createElement("div",{className:p,style:n},h.createElement(V$,Object.assign({prefixCls:c},o))))};jh._InternalPanelDoNotUseOrYouWillBeFired=aA;function Mx(e){return["small","middle","large"].includes(e)}function zx(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const lA=e=>{const{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:o,fontSizeLG:a,fontSizeSM:c,borderRadiusLG:u,borderRadiusSM:d,colorBgContainerDisabled:f,lineWidth:p}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:r,margin:0,background:f,borderWidth:p,borderStyle:"solid",borderColor:i,borderRadius:n,"&-large":{fontSize:a,borderRadius:u},"&-small":{paddingInline:o,borderRadius:d,fontSize:c},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},Kf(e,{focus:!1})]}},cA=yn(["Space","Addon"],e=>[lA(e)]);var uA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const dA=Q.forwardRef((e,t)=>{const{className:n,children:r,style:i,prefixCls:o}=e,a=uA(e,["className","children","style","prefixCls"]),{getPrefixCls:c,direction:u}=Q.useContext(Ot),d=c("space-addon",o),[f,p,g]=cA(d),{compactItemClassnames:v,compactSize:b}=Au(d,u),_=ne(d,p,v,g,{[`${d}-${b}`]:b},n);return f(Q.createElement("div",Object.assign({ref:t,className:_,style:i},a),r))}),X$=Q.createContext({latestIndex:0}),hA=X$.Provider,fA=({className:e,index:t,children:n,split:r,style:i})=>{const{latestIndex:o}=h.useContext(X$);return n==null?null:h.createElement(h.Fragment,null,h.createElement("div",{className:e,style:i},n),t<o&&r&&h.createElement("span",{className:`${e}-split`},r))},mA=e=>{const{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},pA=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},gA=yn("Space",e=>{const t=tn(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[mA(t),pA(t)]},()=>({}),{resetStyle:!1});var vA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const yA=h.forwardRef((e,t)=>{var n;const{getPrefixCls:r,direction:i,size:o,className:a,style:c,classNames:u,styles:d}=Ur("space"),{size:f=o??"small",align:p,className:g,rootClassName:v,children:b,direction:_="horizontal",prefixCls:S,split:C,style:E,wrap:k=!1,classNames:$,styles:P}=e,T=vA(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[O,N]=Array.isArray(f)?f:[f,f],I=Mx(N),z=Mx(O),A=zx(N),M=zx(O),j=hi(b,{keepEmpty:!0}),B=p===void 0&&_==="horizontal"?"center":p,F=r("space",S),[W,V,L]=gA(F),G=ne(F,a,V,`${F}-${_}`,{[`${F}-rtl`]:i==="rtl",[`${F}-align-${B}`]:B,[`${F}-gap-row-${N}`]:I,[`${F}-gap-col-${O}`]:z},g,v,L),U=ne(`${F}-item`,(n=$==null?void 0:$.item)!==null&&n!==void 0?n:u.item),D=Object.assign(Object.assign({},d.item),P==null?void 0:P.item),q=j.map((Z,re)=>{const he=(Z==null?void 0:Z.key)||`${U}-${re}`;return h.createElement(fA,{className:U,key:he,index:re,split:C,style:D},Z)}),Y=h.useMemo(()=>({latestIndex:j.reduce((re,he,fe)=>he!=null?fe:re,0)}),[j]);if(j.length===0)return null;const ee={};return k&&(ee.flexWrap="wrap"),!z&&M&&(ee.columnGap=O),!I&&A&&(ee.rowGap=N),W(h.createElement("div",Object.assign({ref:t,className:G,style:Object.assign(Object.assign(Object.assign({},ee),c),E)},T),h.createElement(hA,{value:Y},q)))}),ds=yA;ds.Compact=iN;ds.Addon=dA;var bA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Y$=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:r}=h.useContext(Ot),{prefixCls:i,type:o="default",danger:a,disabled:c,loading:u,onClick:d,htmlType:f,children:p,className:g,menu:v,arrow:b,autoFocus:_,overlay:S,trigger:C,align:E,open:k,onOpenChange:$,placement:P,getPopupContainer:T,href:O,icon:N=h.createElement(Gy,null),title:I,buttonsRender:z=ae=>ae,mouseEnterDelay:A,mouseLeaveDelay:M,overlayClassName:j,overlayStyle:B,destroyOnHidden:F,destroyPopupOnHide:W,dropdownRender:V,popupRender:L}=e,G=bA(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),U=n("dropdown",i),D=`${U}-button`,Y={menu:v,arrow:b,autoFocus:_,align:E,disabled:c,trigger:c?[]:C,onOpenChange:$,getPopupContainer:T||t,mouseEnterDelay:A,mouseLeaveDelay:M,overlayClassName:j,overlayStyle:B,destroyOnHidden:F,popupRender:L||V},{compactSize:ee,compactItemClassnames:Z}=Au(U,r),re=ne(D,Z,g);"destroyPopupOnHide"in e&&(Y.destroyPopupOnHide=W),"overlay"in e&&(Y.overlay=S),"open"in e&&(Y.open=k),"placement"in e?Y.placement=P:Y.placement=r==="rtl"?"bottomLeft":"bottomRight";const he=h.createElement(ur,{type:o,danger:a,disabled:c,loading:u,onClick:d,htmlType:f,href:O,title:I},p),fe=h.createElement(ur,{type:o,danger:a,icon:N}),[ue,Se]=z([he,fe]);return h.createElement(ds.Compact,Object.assign({className:re,size:ee,block:!0},G),ue,h.createElement(om,Object.assign({},Y),Se))};Y$.__ANT_BUTTON=!0;const d0=om;d0.Button=Y$;var _A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},SA=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:_A}))},cu=h.forwardRef(SA),CA=`
299
- min-height:0 !important;
300
- max-height:none !important;
301
- height:0 !important;
302
- visibility:hidden !important;
303
- overflow:hidden !important;
304
- position:absolute !important;
305
- z-index:-1000 !important;
306
- top:0 !important;
307
- right:0 !important;
308
- pointer-events: none !important;
309
- `,xA=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Og={},Bi;function wA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&Og[n])return Og[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),c=xA.map(function(d){return"".concat(d,":").concat(r.getPropertyValue(d))}).join(";"),u={sizingStyle:c,paddingSize:o,borderSize:a,boxSizing:i};return t&&n&&(Og[n]=u),u}function EA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Bi||(Bi=document.createElement("textarea"),Bi.setAttribute("tab-index","-1"),Bi.setAttribute("aria-hidden","true"),Bi.setAttribute("name","hiddenTextarea"),document.body.appendChild(Bi)),e.getAttribute("wrap")?Bi.setAttribute("wrap",e.getAttribute("wrap")):Bi.removeAttribute("wrap");var i=wA(e,t),o=i.paddingSize,a=i.borderSize,c=i.boxSizing,u=i.sizingStyle;Bi.setAttribute("style","".concat(u,";").concat(CA)),Bi.value=e.value||e.placeholder||"";var d=void 0,f=void 0,p,g=Bi.scrollHeight;if(c==="border-box"?g+=a:c==="content-box"&&(g-=o),n!==null||r!==null){Bi.value=" ";var v=Bi.scrollHeight-o;n!==null&&(d=v*n,c==="border-box"&&(d=d+o+a),g=Math.max(d,g)),r!==null&&(f=v*r,c==="border-box"&&(f=f+o+a),p=g>f?"":"hidden",g=Math.min(f,g))}var b={height:g,overflowY:p,resize:"none"};return d&&(b.minHeight=d),f&&(b.maxHeight=f),b}var kA=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ig=0,Ng=1,Mg=2,$A=h.forwardRef(function(e,t){var n=e,r=n.prefixCls,i=n.defaultValue,o=n.value,a=n.autoSize,c=n.onResize,u=n.className,d=n.style,f=n.disabled,p=n.onChange;n.onInternalAutoSize;var g=Lt(n,kA),v=er(i,{value:o,postState:function(Y){return Y??""}}),b=se(v,2),_=b[0],S=b[1],C=function(Y){S(Y.target.value),p==null||p(Y)},E=h.useRef();h.useImperativeHandle(t,function(){return{textArea:E.current}});var k=h.useMemo(function(){return a&&_t(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),$=se(k,2),P=$[0],T=$[1],O=!!a,N=h.useState(Mg),I=se(N,2),z=I[0],A=I[1],M=h.useState(),j=se(M,2),B=j[0],F=j[1],W=function(){A(Ig)};hn(function(){O&&W()},[o,P,T,O]),hn(function(){if(z===Ig)A(Ng);else if(z===Ng){var q=EA(E.current,!1,P,T);A(Mg),F(q)}},[z]);var V=h.useRef(),L=function(){Rn.cancel(V.current)},G=function(Y){z===Mg&&(c==null||c(Y),a&&(L(),V.current=Rn(function(){W()})))};h.useEffect(function(){return L},[]);var U=O?B:null,D=X(X({},d),U);return(z===Ig||z===Ng)&&(D.overflowY="hidden",D.overflowX="hidden"),h.createElement(ao,{onResize:G,disabled:!(a||c)},h.createElement("textarea",Re({},g,{ref:E,style:D,className:ne(r,u,K({},"".concat(r,"-disabled"),f)),disabled:f,value:_,onChange:C})))}),RA=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],TA=Q.forwardRef(function(e,t){var n,r=e.defaultValue,i=e.value,o=e.onFocus,a=e.onBlur,c=e.onChange,u=e.allowClear,d=e.maxLength,f=e.onCompositionStart,p=e.onCompositionEnd,g=e.suffix,v=e.prefixCls,b=v===void 0?"rc-textarea":v,_=e.showCount,S=e.count,C=e.className,E=e.style,k=e.disabled,$=e.hidden,P=e.classNames,T=e.styles,O=e.onResize,N=e.onClear,I=e.onPressEnter,z=e.readOnly,A=e.autoSize,M=e.onKeyDown,j=Lt(e,RA),B=er(r,{value:i,defaultValue:r}),F=se(B,2),W=F[0],V=F[1],L=W==null?"":String(W),G=Q.useState(!1),U=se(G,2),D=U[0],q=U[1],Y=Q.useRef(!1),ee=Q.useState(null),Z=se(ee,2),re=Z[0],he=Z[1],fe=h.useRef(null),ue=h.useRef(null),Se=function(){var Le;return(Le=ue.current)===null||Le===void 0?void 0:Le.textArea},ae=function(){Se().focus()};h.useImperativeHandle(t,function(){var tt;return{resizableTextArea:ue.current,focus:ae,blur:function(){Se().blur()},nativeElement:((tt=fe.current)===null||tt===void 0?void 0:tt.nativeElement)||Se()}}),h.useEffect(function(){q(function(tt){return!k&&tt})},[k]);var le=Q.useState(null),ce=se(le,2),ye=ce[0],me=ce[1];Q.useEffect(function(){if(ye){var tt;(tt=Se()).setSelectionRange.apply(tt,We(ye))}},[ye]);var de=G9(S,_),be=(n=de.max)!==null&&n!==void 0?n:d,xe=Number(be)>0,Te=de.strategy(L),ze=!!be&&Te>be,Ee=function(Le,rt){var Me=rt;!Y.current&&de.exceedFormatter&&de.max&&de.strategy(rt)>de.max&&(Me=de.exceedFormatter(rt,{max:de.max}),rt!==Me&&me([Se().selectionStart||0,Se().selectionEnd||0])),V(Me),Px(Le.currentTarget,Le,c,Me)},ke=function(Le){Y.current=!0,f==null||f(Le)},je=function(Le){Y.current=!1,Ee(Le,Le.currentTarget.value),p==null||p(Le)},Oe=function(Le){Ee(Le,Le.target.value)},Qe=function(Le){Le.key==="Enter"&&I&&I(Le),M==null||M(Le)},at=function(Le){q(!0),o==null||o(Le)},$t=function(Le){q(!1),a==null||a(Le)},pt=function(Le){V(""),ae(),Px(Se(),Le,c)},Je=g,ft;de.show&&(de.showFormatter?ft=de.showFormatter({value:L,count:Te,maxLength:be}):ft="".concat(Te).concat(xe?" / ".concat(be):""),Je=Q.createElement(Q.Fragment,null,Je,Q.createElement("span",{className:ne("".concat(b,"-data-count"),P==null?void 0:P.count),style:T==null?void 0:T.count},ft)));var Xe=function(Le){var rt;O==null||O(Le),(rt=Se())!==null&&rt!==void 0&&rt.style.height&&he(!0)},yt=!A&&!_&&!u;return Q.createElement(U9,{ref:fe,value:L,allowClear:u,handleReset:pt,suffix:Je,prefixCls:b,classNames:X(X({},P),{},{affixWrapper:ne(P==null?void 0:P.affixWrapper,K(K({},"".concat(b,"-show-count"),_),"".concat(b,"-textarea-allow-clear"),u))}),disabled:k,focused:D,className:ne(C,ze&&"".concat(b,"-out-of-range")),style:X(X({},E),re&&!yt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof ft=="string"?ft:void 0}},hidden:$,readOnly:z,onClear:N},Q.createElement($A,Re({},j,{autoSize:A,maxLength:d,onKeyDown:Qe,onChange:Oe,onFocus:at,onBlur:$t,onCompositionStart:ke,onCompositionEnd:je,className:ne(P==null?void 0:P.textarea),style:X(X({},T==null?void 0:T.textarea),{},{resize:E==null?void 0:E.resize}),disabled:k,prefixCls:b,onResize:Xe,ref:ue,readOnly:z})))});const PA=e=>{const{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
310
- &-allow-clear > ${t},
311
- &-affix-wrapper${r}-has-feedback ${t}
312
- `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},OA=yn(["Input","TextArea"],e=>{const t=tn(e,sm(e));return PA(t)},am,{resetFont:!1});var IA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const NA=h.forwardRef((e,t)=>{var n;const{prefixCls:r,bordered:i=!0,size:o,disabled:a,status:c,allowClear:u,classNames:d,rootClassName:f,className:p,style:g,styles:v,variant:b,showCount:_,onMouseDown:S,onResize:C}=e,E=IA(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:k,direction:$,allowClear:P,autoComplete:T,className:O,style:N,classNames:I,styles:z}=Ur("textArea"),A=h.useContext(Js),M=a??A,{status:j,hasFeedback:B,feedbackIcon:F}=h.useContext(Cu),W=Uk(j,c),V=h.useRef(null);h.useImperativeHandle(t,()=>{var de;return{resizableTextArea:(de=V.current)===null||de===void 0?void 0:de.resizableTextArea,focus:be=>{var xe,Te;q9((Te=(xe=V.current)===null||xe===void 0?void 0:xe.resizableTextArea)===null||Te===void 0?void 0:Te.textArea,be)},blur:()=>{var be;return(be=V.current)===null||be===void 0?void 0:be.blur()}}});const L=k("input",r),G=Po(L),[U,D,q]=j7(L,f),[Y]=OA(L,G),{compactSize:ee,compactItemClassnames:Z}=Au(L,$),re=Jo(de=>{var be;return(be=o??ee)!==null&&be!==void 0?be:de}),[he,fe]=Yk("textArea",b,i),ue=X9(u??P),[Se,ae]=h.useState(!1),[le,ce]=h.useState(!1),ye=de=>{ae(!0),S==null||S(de);const be=()=>{ae(!1),document.removeEventListener("mouseup",be)};document.addEventListener("mouseup",be)},me=de=>{var be,xe;if(C==null||C(de),Se&&typeof getComputedStyle=="function"){const Te=(xe=(be=V.current)===null||be===void 0?void 0:be.nativeElement)===null||xe===void 0?void 0:xe.querySelector("textarea");Te&&getComputedStyle(Te).resize==="both"&&ce(!0)}};return U(Y(h.createElement(TA,Object.assign({autoComplete:T},E,{style:Object.assign(Object.assign({},N),g),styles:Object.assign(Object.assign({},z),v),disabled:M,allowClear:ue,className:ne(q,G,p,f,Z,O,le&&`${L}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},d),I),{textarea:ne({[`${L}-sm`]:re==="small",[`${L}-lg`]:re==="large"},D,d==null?void 0:d.textarea,I.textarea,Se&&`${L}-mouse-active`),variant:ne({[`${L}-${he}`]:fe},qk(L,W)),affixWrapper:ne(`${L}-textarea-affix-wrapper`,{[`${L}-affix-wrapper-rtl`]:$==="rtl",[`${L}-affix-wrapper-sm`]:re==="small",[`${L}-affix-wrapper-lg`]:re==="large",[`${L}-textarea-show-count`]:_||((n=e.count)===null||n===void 0?void 0:n.show)},D)}),prefixCls:L,suffix:B&&h.createElement("span",{className:`${L}-textarea-suffix`},F),showCount:_,ref:V,onResize:me,onMouseDown:ye}))))});function MA(e,t,n){return typeof n=="boolean"?n:e.length?!0:hi(t).some(i=>i.type===R$)}var J$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function um({suffixCls:e,tagName:t,displayName:n}){return r=>h.forwardRef((o,a)=>h.createElement(r,Object.assign({ref:a,suffixCls:e,tagName:t},o)))}const tb=h.forwardRef((e,t)=>{const{prefixCls:n,suffixCls:r,className:i,tagName:o}=e,a=J$(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:c}=h.useContext(Ot),u=c("layout",n),[d,f,p]=$$(u),g=r?`${u}-${r}`:u;return d(h.createElement(o,Object.assign({className:ne(n||g,i,f,p),ref:t},a)))}),zA=h.forwardRef((e,t)=>{const{direction:n}=h.useContext(Ot),[r,i]=h.useState([]),{prefixCls:o,className:a,rootClassName:c,children:u,hasSider:d,tagName:f,style:p}=e,g=J$(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),v=dr(g,["suffixCls"]),{getPrefixCls:b,className:_,style:S}=Ur("layout"),C=b("layout",o),E=MA(r,u,d),[k,$,P]=$$(C),T=ne(C,{[`${C}-has-sider`]:E,[`${C}-rtl`]:n==="rtl"},_,a,c,$,P),O=h.useMemo(()=>({siderHook:{addSider:N=>{i(I=>[].concat(We(I),[N]))},removeSider:N=>{i(I=>I.filter(z=>z!==N))}}}),[]);return k(h.createElement(w$.Provider,{value:O},h.createElement(f,Object.assign({ref:t,className:T,style:Object.assign(Object.assign({},S),p)},v),u)))}),jA=um({tagName:"div",displayName:"Layout"})(zA),BA=um({suffixCls:"header",tagName:"header",displayName:"Header"})(tb),LA=um({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(tb),AA=um({suffixCls:"content",tagName:"main",displayName:"Content"})(tb),Ks=jA;Ks.Header=BA;Ks.Footer=LA;Ks.Content=AA;Ks.Sider=R$;Ks._InternalSiderContext=im;var DA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},HA=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:DA}))},jx=h.forwardRef(HA),FA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},WA=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:FA}))},Bx=h.forwardRef(WA),VA={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},qA=[10,20,50,100],UA=function(t){var n=t.pageSizeOptions,r=n===void 0?qA:n,i=t.locale,o=t.changeSize,a=t.pageSize,c=t.goButton,u=t.quickGo,d=t.rootPrefixCls,f=t.disabled,p=t.buildOptionText,g=t.showSizeChanger,v=t.sizeChangerRender,b=Q.useState(""),_=se(b,2),S=_[0],C=_[1],E=function(){return!S||Number.isNaN(S)?void 0:Number(S)},k=typeof p=="function"?p:function(M){return"".concat(M," ").concat(i.items_per_page)},$=function(j){C(j.target.value)},P=function(j){c||S===""||(C(""),!(j.relatedTarget&&(j.relatedTarget.className.indexOf("".concat(d,"-item-link"))>=0||j.relatedTarget.className.indexOf("".concat(d,"-item"))>=0))&&(u==null||u(E())))},T=function(j){S!==""&&(j.keyCode===Ge.ENTER||j.type==="click")&&(C(""),u==null||u(E()))},O=function(){return r.some(function(j){return j.toString()===a.toString()})?r:r.concat([a]).sort(function(j,B){var F=Number.isNaN(Number(j))?0:Number(j),W=Number.isNaN(Number(B))?0:Number(B);return F-W})},N="".concat(d,"-options");if(!g&&!u)return null;var I=null,z=null,A=null;return g&&v&&(I=v({disabled:f,size:a,onSizeChange:function(j){o==null||o(Number(j))},"aria-label":i.page_size,className:"".concat(N,"-size-changer"),options:O().map(function(M){return{label:k(M),value:M}})})),u&&(c&&(A=typeof c=="boolean"?Q.createElement("button",{type:"button",onClick:T,onKeyUp:T,disabled:f,className:"".concat(N,"-quick-jumper-button")},i.jump_to_confirm):Q.createElement("span",{onClick:T,onKeyUp:T},c)),z=Q.createElement("div",{className:"".concat(N,"-quick-jumper")},i.jump_to,Q.createElement("input",{disabled:f,type:"text",value:S,onChange:$,onKeyUp:T,onBlur:P,"aria-label":i.page}),i.page,A)),Q.createElement("li",{className:N},I,z)},Ac=function(t){var n=t.rootPrefixCls,r=t.page,i=t.active,o=t.className,a=t.showTitle,c=t.onClick,u=t.onKeyPress,d=t.itemRender,f="".concat(n,"-item"),p=ne(f,"".concat(f,"-").concat(r),K(K({},"".concat(f,"-active"),i),"".concat(f,"-disabled"),!r),o),g=function(){c(r)},v=function(S){u(S,c,r)},b=d(r,"page",Q.createElement("a",{rel:"nofollow"},r));return b?Q.createElement("li",{title:a?String(r):null,className:p,onClick:g,onKeyDown:v,tabIndex:0},b):null},KA=function(t,n,r){return r};function Lx(){}function Ax(e){var t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function pa(e,t,n){var r=typeof e>"u"?t:e;return Math.floor((n-1)/r)+1}var GA=function(t){var n=t.prefixCls,r=n===void 0?"rc-pagination":n,i=t.selectPrefixCls,o=i===void 0?"rc-select":i,a=t.className,c=t.current,u=t.defaultCurrent,d=u===void 0?1:u,f=t.total,p=f===void 0?0:f,g=t.pageSize,v=t.defaultPageSize,b=v===void 0?10:v,_=t.onChange,S=_===void 0?Lx:_,C=t.hideOnSinglePage,E=t.align,k=t.showPrevNextJumpers,$=k===void 0?!0:k,P=t.showQuickJumper,T=t.showLessItems,O=t.showTitle,N=O===void 0?!0:O,I=t.onShowSizeChange,z=I===void 0?Lx:I,A=t.locale,M=A===void 0?VA:A,j=t.style,B=t.totalBoundaryShowSizeChanger,F=B===void 0?50:B,W=t.disabled,V=t.simple,L=t.showTotal,G=t.showSizeChanger,U=G===void 0?p>F:G,D=t.sizeChangerRender,q=t.pageSizeOptions,Y=t.itemRender,ee=Y===void 0?KA:Y,Z=t.jumpPrevIcon,re=t.jumpNextIcon,he=t.prevIcon,fe=t.nextIcon,ue=Q.useRef(null),Se=er(10,{value:g,defaultValue:b}),ae=se(Se,2),le=ae[0],ce=ae[1],ye=er(1,{value:c,defaultValue:d,postState:function(vt){return Math.max(1,Math.min(vt,pa(void 0,le,p)))}}),me=se(ye,2),de=me[0],be=me[1],xe=Q.useState(de),Te=se(xe,2),ze=Te[0],Ee=Te[1];h.useEffect(function(){Ee(de)},[de]);var ke=Math.max(1,de-(T?3:5)),je=Math.min(pa(void 0,le,p),de+(T?3:5));function Oe(Ke,vt){var Nt=Ke||Q.createElement("button",{type:"button","aria-label":vt,className:"".concat(r,"-item-link")});return typeof Ke=="function"&&(Nt=Q.createElement(Ke,X({},t))),Nt}function Qe(Ke){var vt=Ke.target.value,Nt=pa(void 0,le,p),pn;return vt===""?pn=vt:Number.isNaN(Number(vt))?pn=ze:vt>=Nt?pn=Nt:pn=Number(vt),pn}function at(Ke){return Ax(Ke)&&Ke!==de&&Ax(p)&&p>0}var $t=p>le?P:!1;function pt(Ke){(Ke.keyCode===Ge.UP||Ke.keyCode===Ge.DOWN)&&Ke.preventDefault()}function Je(Ke){var vt=Qe(Ke);switch(vt!==ze&&Ee(vt),Ke.keyCode){case Ge.ENTER:yt(vt);break;case Ge.UP:yt(vt-1);break;case Ge.DOWN:yt(vt+1);break}}function ft(Ke){yt(Qe(Ke))}function Xe(Ke){var vt=pa(Ke,le,p),Nt=de>vt&&vt!==0?vt:de;ce(Ke),Ee(Nt),z==null||z(de,Ke),be(Nt),S==null||S(Nt,Ke)}function yt(Ke){if(at(Ke)&&!W){var vt=pa(void 0,le,p),Nt=Ke;return Ke>vt?Nt=vt:Ke<1&&(Nt=1),Nt!==ze&&Ee(Nt),be(Nt),S==null||S(Nt,le),Nt}return de}var tt=de>1,Le=de<pa(void 0,le,p);function rt(){tt&&yt(de-1)}function Me(){Le&&yt(de+1)}function Ue(){yt(ke)}function It(){yt(je)}function St(Ke,vt){if(Ke.key==="Enter"||Ke.charCode===Ge.ENTER||Ke.keyCode===Ge.ENTER){for(var Nt=arguments.length,pn=new Array(Nt>2?Nt-2:0),ir=2;ir<Nt;ir++)pn[ir-2]=arguments[ir];vt.apply(void 0,pn)}}function nn(Ke){St(Ke,rt)}function Jt(Ke){St(Ke,Me)}function bn(Ke){St(Ke,Ue)}function On(Ke){St(Ke,It)}function on(Ke){var vt=ee(Ke,"prev",Oe(he,"prev page"));return Q.isValidElement(vt)?Q.cloneElement(vt,{disabled:!tt}):vt}function Ht(Ke){var vt=ee(Ke,"next",Oe(fe,"next page"));return Q.isValidElement(vt)?Q.cloneElement(vt,{disabled:!Le}):vt}function Rt(Ke){(Ke.type==="click"||Ke.keyCode===Ge.ENTER)&&yt(ze)}var sn=null,Xt=qi(t,{aria:!0,data:!0}),ot=L&&Q.createElement("li",{className:"".concat(r,"-total-text")},L(p,[p===0?0:(de-1)*le+1,de*le>p?p:de*le])),Et=null,mt=pa(void 0,le,p);if(C&&p<=le)return null;var Ie=[],$e={rootPrefixCls:r,onClick:yt,onKeyPress:St,showTitle:N,itemRender:ee,page:-1},we=de-1>0?de-1:0,Ae=de+1<mt?de+1:mt,et=P&&P.goButton,nt=_t(V)==="object"?V.readOnly:!V,Ft=et,Kt=null;V&&(et&&(typeof et=="boolean"?Ft=Q.createElement("button",{type:"button",onClick:Rt,onKeyUp:Rt},M.jump_to_confirm):Ft=Q.createElement("span",{onClick:Rt,onKeyUp:Rt},et),Ft=Q.createElement("li",{title:N?"".concat(M.jump_to).concat(de,"/").concat(mt):null,className:"".concat(r,"-simple-pager")},Ft)),Kt=Q.createElement("li",{title:N?"".concat(de,"/").concat(mt):null,className:"".concat(r,"-simple-pager")},nt?ze:Q.createElement("input",{type:"text","aria-label":M.jump_to,value:ze,disabled:W,onKeyDown:pt,onKeyUp:Je,onChange:Je,onBlur:ft,size:3}),Q.createElement("span",{className:"".concat(r,"-slash")},"/"),mt));var Bt=T?1:2;if(mt<=3+Bt*2){mt||Ie.push(Q.createElement(Ac,Re({},$e,{key:"noPager",page:1,className:"".concat(r,"-item-disabled")})));for(var At=1;At<=mt;At+=1)Ie.push(Q.createElement(Ac,Re({},$e,{key:At,page:At,active:de===At})))}else{var Tn=T?M.prev_3:M.prev_5,En=T?M.next_3:M.next_5,In=ee(ke,"jump-prev",Oe(Z,"prev page")),Dn=ee(je,"jump-next",Oe(re,"next page"));$&&(sn=In?Q.createElement("li",{title:N?Tn:null,key:"prev",onClick:Ue,tabIndex:0,onKeyDown:bn,className:ne("".concat(r,"-jump-prev"),K({},"".concat(r,"-jump-prev-custom-icon"),!!Z))},In):null,Et=Dn?Q.createElement("li",{title:N?En:null,key:"next",onClick:It,tabIndex:0,onKeyDown:On,className:ne("".concat(r,"-jump-next"),K({},"".concat(r,"-jump-next-custom-icon"),!!re))},Dn):null);var ln=Math.max(1,de-Bt),fn=Math.min(de+Bt,mt);de-1<=Bt&&(fn=1+Bt*2),mt-de<=Bt&&(ln=mt-Bt*2);for(var He=ln;He<=fn;He+=1)Ie.push(Q.createElement(Ac,Re({},$e,{key:He,page:He,active:de===He})));if(de-1>=Bt*2&&de!==3&&(Ie[0]=Q.cloneElement(Ie[0],{className:ne("".concat(r,"-item-after-jump-prev"),Ie[0].props.className)}),Ie.unshift(sn)),mt-de>=Bt*2&&de!==mt-2){var Ye=Ie[Ie.length-1];Ie[Ie.length-1]=Q.cloneElement(Ye,{className:ne("".concat(r,"-item-before-jump-next"),Ye.props.className)}),Ie.push(Et)}ln!==1&&Ie.unshift(Q.createElement(Ac,Re({},$e,{key:1,page:1}))),fn!==mt&&Ie.push(Q.createElement(Ac,Re({},$e,{key:mt,page:mt})))}var Pt=on(we);if(Pt){var gt=!tt||!mt;Pt=Q.createElement("li",{title:N?M.prev_page:null,onClick:rt,tabIndex:gt?null:0,onKeyDown:nn,className:ne("".concat(r,"-prev"),K({},"".concat(r,"-disabled"),gt)),"aria-disabled":gt},Pt)}var lt=Ht(Ae);if(lt){var Ze,Tt;V?(Ze=!Le,Tt=tt?0:null):(Ze=!Le||!mt,Tt=Ze?null:0),lt=Q.createElement("li",{title:N?M.next_page:null,onClick:Me,tabIndex:Tt,onKeyDown:Jt,className:ne("".concat(r,"-next"),K({},"".concat(r,"-disabled"),Ze)),"aria-disabled":Ze},lt)}var Gt=ne(r,a,K(K(K(K(K({},"".concat(r,"-start"),E==="start"),"".concat(r,"-center"),E==="center"),"".concat(r,"-end"),E==="end"),"".concat(r,"-simple"),V),"".concat(r,"-disabled"),W));return Q.createElement("ul",Re({className:Gt,style:j,ref:ue},Xt),ot,Pt,V?Kt:Ie,lt,Q.createElement(UA,{locale:M,rootPrefixCls:r,disabled:W,selectPrefixCls:o,changeSize:Xe,pageSize:le,pageSizeOptions:q,quickGo:$t?yt:null,goButton:Ft,showSizeChanger:U,sizeChangerRender:D}))};const XA=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},YA=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:te(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:te(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:te(e.itemSizeSM)},[`&${t}-mini:not(${t}-disabled)`]:{[`${t}-prev, ${t}-next`]:{[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}}},[`
313
- &${t}-mini ${t}-prev ${t}-item-link,
314
- &${t}-mini ${t}-next ${t}-item-link
315
- `]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:te(e.itemSizeSM)}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:te(e.itemSizeSM)},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:te(e.itemSizeSM),input:Object.assign(Object.assign({},Yy(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},JA=e=>{const{componentCls:t}=e;return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSize,lineHeight:te(e.itemSize),verticalAlign:"top",[`${t}-item-link`]:{height:e.itemSize,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.itemSize,lineHeight:te(e.itemSize)}}},[`${t}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:e.itemSize,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:`0 ${te(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${te(e.inputOutlineOffset)} 0 ${te(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}},[`&${t}-mini`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSizeSM,lineHeight:te(e.itemSizeSM),[`${t}-item-link`]:{height:e.itemSizeSM,"&::after":{height:e.itemSizeSM,lineHeight:te(e.itemSizeSM)}}},[`${t}-simple-pager`]:{height:e.itemSizeSM,input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},QA=e=>{const{componentCls:t}=e;return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[`
316
- ${t}-prev,
317
- ${t}-jump-prev,
318
- ${t}-jump-next
319
- `]:{marginInlineEnd:e.marginXS},[`
320
- ${t}-prev,
321
- ${t}-next,
322
- ${t}-jump-prev,
323
- ${t}-jump-next
324
- `]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,color:e.colorText,fontFamily:e.fontFamily,lineHeight:te(e.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${te(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:te(e.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},Jy(e)),Xy(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{"&[disabled]":Object.assign({},lm(e)),width:e.quickJumperInputWidth,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},ZA=e=>{const{componentCls:t}=e;return{[`${t}-item`]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,marginInlineEnd:e.marginXS,fontFamily:e.fontFamily,lineHeight:te(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${te(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${te(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}},eD=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Vn(e)),{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.itemSize,marginInlineEnd:e.marginXS,lineHeight:te(e.calc(e.itemSize).sub(2).equal()),verticalAlign:"middle"}}),ZA(e)),QA(e)),JA(e)),YA(e)),XA(e)),{[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}}),[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},tD=e=>{const{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:Object.assign({},uo(e)),[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":Object.assign({[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}},Ta(e))},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:Ta(e)}}}},Q$=e=>Object.assign({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0},am(e)),Z$=e=>tn(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},sm(e)),nD=yn("Pagination",e=>{const t=Z$(e);return[eD(t),tD(t)]},Q$),rD=e=>{const{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled:not(${t}-mini)`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered:not(${t}-mini)`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},iD=zu(["Pagination","bordered"],e=>{const t=Z$(e);return rD(t)},Q$);function Dx(e){return h.useMemo(()=>typeof e=="boolean"?[e,{}]:e&&typeof e=="object"?[!0,e]:[void 0,void 0],[e])}var oD=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const sD=e=>{const{align:t,prefixCls:n,selectPrefixCls:r,className:i,rootClassName:o,style:a,size:c,locale:u,responsive:d,showSizeChanger:f,selectComponentClass:p,pageSizeOptions:g}=e,v=oD(e,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","responsive","showSizeChanger","selectComponentClass","pageSizeOptions"]),{xs:b}=jy(d),[,_]=mi(),{getPrefixCls:S,direction:C,showSizeChanger:E,className:k,style:$}=Ur("pagination"),P=S("pagination",n),[T,O,N]=nD(P),I=Jo(c),z=I==="small"||!!(b&&!I&&d),[A]=gs("Pagination",K2),M=Object.assign(Object.assign({},A),u),[j,B]=Dx(f),[F,W]=Dx(E),V=j??F,L=B??W,G=p||Aa,U=h.useMemo(()=>g?g.map(re=>Number(re)):void 0,[g]),D=re=>{var he;const{disabled:fe,size:ue,onSizeChange:Se,"aria-label":ae,className:le,options:ce}=re,{className:ye,onChange:me}=L||{},de=(he=ce.find(be=>String(be.value)===String(ue)))===null||he===void 0?void 0:he.value;return h.createElement(G,Object.assign({disabled:fe,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:be=>be.parentNode,"aria-label":ae,options:ce},L,{value:de,onChange:(be,xe)=>{Se==null||Se(be),me==null||me(be,xe)},size:z?"small":"middle",className:ne(le,ye)}))},q=h.useMemo(()=>{const re=h.createElement("span",{className:`${P}-item-ellipsis`},"•••"),he=h.createElement("button",{className:`${P}-item-link`,type:"button",tabIndex:-1},C==="rtl"?h.createElement(Hi,null):h.createElement(wu,null)),fe=h.createElement("button",{className:`${P}-item-link`,type:"button",tabIndex:-1},C==="rtl"?h.createElement(wu,null):h.createElement(Hi,null)),ue=h.createElement("a",{className:`${P}-item-link`},h.createElement("div",{className:`${P}-item-container`},C==="rtl"?h.createElement(Bx,{className:`${P}-item-link-icon`}):h.createElement(jx,{className:`${P}-item-link-icon`}),re)),Se=h.createElement("a",{className:`${P}-item-link`},h.createElement("div",{className:`${P}-item-container`},C==="rtl"?h.createElement(jx,{className:`${P}-item-link-icon`}):h.createElement(Bx,{className:`${P}-item-link-icon`}),re));return{prevIcon:he,nextIcon:fe,jumpPrevIcon:ue,jumpNextIcon:Se}},[C,P]),Y=S("select",r),ee=ne({[`${P}-${t}`]:!!t,[`${P}-mini`]:z,[`${P}-rtl`]:C==="rtl",[`${P}-bordered`]:_.wireframe},k,i,o,O,N),Z=Object.assign(Object.assign({},$),a);return T(h.createElement(h.Fragment,null,_.wireframe&&h.createElement(iD,{prefixCls:P}),h.createElement(GA,Object.assign({},q,v,{style:Z,prefixCls:P,selectPrefixCls:Y,className:ee,locale:M,pageSizeOptions:U,showSizeChanger:V,sizeChangerRender:D}))))},uf=100,e4=uf/5,t4=uf/2-e4/2,zg=t4*2*Math.PI,Hx=50,Fx=e=>{const{dotClassName:t,style:n,hasCircleCls:r}=e;return h.createElement("circle",{className:ne(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:t4,cx:Hx,cy:Hx,strokeWidth:e4,style:n})},aD=({percent:e,prefixCls:t})=>{const n=`${t}-dot`,r=`${n}-holder`,i=`${r}-hidden`,[o,a]=h.useState(!1);hn(()=>{e!==0&&a(!0)},[e!==0]);const c=Math.max(Math.min(e,100),0);if(!o)return null;const u={strokeDashoffset:`${zg/4}`,strokeDasharray:`${zg*c/100} ${zg*(100-c)/100}`};return h.createElement("span",{className:ne(r,`${n}-progress`,c<=0&&i)},h.createElement("svg",{viewBox:`0 0 ${uf} ${uf}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c},h.createElement(Fx,{dotClassName:n,hasCircleCls:!0}),h.createElement(Fx,{dotClassName:n,style:u})))};function lD(e){const{prefixCls:t,percent:n=0}=e,r=`${t}-dot`,i=`${r}-holder`,o=`${i}-hidden`;return h.createElement(h.Fragment,null,h.createElement("span",{className:ne(i,n>0&&o)},h.createElement("span",{className:ne(r,`${t}-dot-spin`)},[1,2,3,4].map(a=>h.createElement("i",{className:`${t}-dot-item`,key:a})))),h.createElement(aD,{prefixCls:t,percent:n}))}function cD(e){var t;const{prefixCls:n,indicator:r,percent:i}=e,o=`${n}-dot`;return r&&h.isValidElement(r)?fi(r,{className:ne((t=r.props)===null||t===void 0?void 0:t.className,o),percent:i}):h.createElement(lD,{prefixCls:n,percent:i})}const uD=new Yt("antSpinMove",{to:{opacity:1}}),dD=new Yt("antRotate",{to:{transform:"rotate(405deg)"}}),hD=e=>{const{componentCls:t,calc:n}=e;return{[t]:Object.assign(Object.assign({},Vn(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:n(n(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:n(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:n(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),height:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:uD,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:dD,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(r=>`${r} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal(),height:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}},fD=e=>{const{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:n}},mD=yn("Spin",e=>{const t=tn(e,{spinDotDefault:e.colorTextDescription});return hD(t)},fD),pD=200,Wx=[[30,.05],[70,.03],[96,.01]];function gD(e,t){const[n,r]=h.useState(0),i=h.useRef(null),o=t==="auto";return h.useEffect(()=>(o&&e&&(r(0),i.current=setInterval(()=>{r(a=>{const c=100-a;for(let u=0;u<Wx.length;u+=1){const[d,f]=Wx[u];if(a<=d)return a+c*f}return a})},pD)),()=>{i.current&&(clearInterval(i.current),i.current=null)}),[o,e]),o?n:t}var vD=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let n4;function yD(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}const Oa=e=>{var t;const{prefixCls:n,spinning:r=!0,delay:i=0,className:o,rootClassName:a,size:c="default",tip:u,wrapperClassName:d,style:f,children:p,fullscreen:g=!1,indicator:v,percent:b}=e,_=vD(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:S,direction:C,className:E,style:k,indicator:$}=Ur("spin"),P=S("spin",n),[T,O,N]=mD(P),[I,z]=h.useState(()=>r&&!yD(r,i)),A=gD(I,b);h.useEffect(()=>{if(r){const L=w9(i,()=>{z(!0)});return L(),()=>{var G;(G=L==null?void 0:L.cancel)===null||G===void 0||G.call(L)}}z(!1)},[i,r]);const M=h.useMemo(()=>typeof p<"u"&&!g,[p,g]),j=ne(P,E,{[`${P}-sm`]:c==="small",[`${P}-lg`]:c==="large",[`${P}-spinning`]:I,[`${P}-show-text`]:!!u,[`${P}-rtl`]:C==="rtl"},o,!g&&a,O,N),B=ne(`${P}-container`,{[`${P}-blur`]:I}),F=(t=v??$)!==null&&t!==void 0?t:n4,W=Object.assign(Object.assign({},k),f),V=h.createElement("div",Object.assign({},_,{style:W,className:j,"aria-live":"polite","aria-busy":I}),h.createElement(cD,{prefixCls:P,indicator:F,percent:A}),u&&(M||g)?h.createElement("div",{className:`${P}-text`},u):null);return T(M?h.createElement("div",Object.assign({},_,{className:ne(`${P}-nested-loading`,d,O,N)}),I&&h.createElement("div",{key:"loading"},V),h.createElement("div",{className:B,key:"container"},p)):g?h.createElement("div",{className:ne(`${P}-fullscreen`,{[`${P}-fullscreen-show`]:I},a,O,N)},V):V)};Oa.setDefaultIndicator=e=>{n4=e};const nb=Q.createContext({});nb.Consumer;var r4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const bD=e=>{var{prefixCls:t,className:n,avatar:r,title:i,description:o}=e,a=r4(e,["prefixCls","className","avatar","title","description"]);const{getPrefixCls:c}=h.useContext(Ot),u=c("list",t),d=ne(`${u}-item-meta`,n),f=Q.createElement("div",{className:`${u}-item-meta-content`},i&&Q.createElement("h4",{className:`${u}-item-meta-title`},i),o&&Q.createElement("div",{className:`${u}-item-meta-description`},o));return Q.createElement("div",Object.assign({},a,{className:d}),r&&Q.createElement("div",{className:`${u}-item-meta-avatar`},r),(i||o)&&f)},_D=Q.forwardRef((e,t)=>{const{prefixCls:n,children:r,actions:i,extra:o,styles:a,className:c,classNames:u,colStyle:d}=e,f=r4(e,["prefixCls","children","actions","extra","styles","className","classNames","colStyle"]),{grid:p,itemLayout:g}=h.useContext(nb),{getPrefixCls:v,list:b}=h.useContext(Ot),_=O=>{var N,I;return ne((I=(N=b==null?void 0:b.item)===null||N===void 0?void 0:N.classNames)===null||I===void 0?void 0:I[O],u==null?void 0:u[O])},S=O=>{var N,I;return Object.assign(Object.assign({},(I=(N=b==null?void 0:b.item)===null||N===void 0?void 0:N.styles)===null||I===void 0?void 0:I[O]),a==null?void 0:a[O])},C=()=>{let O=!1;return h.Children.forEach(r,N=>{typeof N=="string"&&(O=!0)}),O&&h.Children.count(r)>1},E=()=>g==="vertical"?!!o:!C(),k=v("list",n),$=i&&i.length>0&&Q.createElement("ul",{className:ne(`${k}-item-action`,_("actions")),key:"actions",style:S("actions")},i.map((O,N)=>Q.createElement("li",{key:`${k}-item-action-${N}`},O,N!==i.length-1&&Q.createElement("em",{className:`${k}-item-action-split`})))),P=p?"div":"li",T=Q.createElement(P,Object.assign({},f,p?{}:{ref:t},{className:ne(`${k}-item`,{[`${k}-item-no-flex`]:!E()},c)}),g==="vertical"&&o?[Q.createElement("div",{className:`${k}-item-main`,key:"content"},r,$),Q.createElement("div",{className:ne(`${k}-item-extra`,_("extra")),key:"extra",style:S("extra")},o)]:[r,$,fi(o,{key:"extra"})]);return p?Q.createElement(N9,{ref:t,flex:1,style:d},T):T}),i4=_D;i4.Meta=bD;const SD=e=>{const{listBorderedCls:t,componentCls:n,paddingLG:r,margin:i,itemPaddingSM:o,itemPaddingLG:a,marginLG:c,borderRadiusLG:u}=e,d=te(e.calc(u).sub(e.lineWidth).equal());return{[t]:{border:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:u,[`${n}-header`]:{borderRadius:`${d} ${d} 0 0`},[`${n}-footer`]:{borderRadius:`0 0 ${d} ${d}`},[`${n}-header,${n}-footer,${n}-item`]:{paddingInline:r},[`${n}-pagination`]:{margin:`${te(i)} ${te(c)}`}},[`${t}${n}-sm`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:o}},[`${t}${n}-lg`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:a}}}},CD=e=>{const{componentCls:t,screenSM:n,screenMD:r,marginLG:i,marginSM:o,margin:a}=e;return{[`@media screen and (max-width:${r}px)`]:{[t]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:i}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:i}}}},[`@media screen and (max-width: ${n}px)`]:{[t]:{[`${t}-item`]:{flexWrap:"wrap",[`${t}-action`]:{marginInlineStart:o}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:"wrap-reverse",[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${te(a)}`}}}}}},xD=e=>{const{componentCls:t,antCls:n,controlHeight:r,minHeight:i,paddingSM:o,marginLG:a,padding:c,itemPadding:u,colorPrimary:d,itemPaddingSM:f,itemPaddingLG:p,paddingXS:g,margin:v,colorText:b,colorTextDescription:_,motionDurationSlow:S,lineWidth:C,headerBg:E,footerBg:k,emptyTextPadding:$,metaMarginBottom:P,avatarMarginRight:T,titleMarginBottom:O,descriptionFontSize:N}=e;return{[t]:Object.assign(Object.assign({},Vn(e)),{position:"relative","--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:"none"},[`${t}-header`]:{background:E},[`${t}-footer`]:{background:k},[`${t}-header, ${t}-footer`]:{paddingBlock:o},[`${t}-pagination`]:{marginBlockStart:a,[`${n}-pagination-options`]:{textAlign:"start"}},[`${t}-spin`]:{minHeight:i,textAlign:"center"},[`${t}-items`]:{margin:0,padding:0,listStyle:"none"},[`${t}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:u,color:b,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:T},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:b},[`${t}-item-meta-title`]:{margin:`0 0 ${te(e.marginXXS)} 0`,color:b,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:b,transition:`all ${S}`,"&:hover":{color:d}}},[`${t}-item-meta-description`]:{color:_,fontSize:N,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${te(g)}`,color:_,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:C,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${te(c)} 0`,color:_,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:$,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},[`${t}-item-no-flex`]:{display:"block"}}),[`${t}-grid ${n}-col > ${t}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:v,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:a},[`${t}-item-meta`]:{marginBlockEnd:P,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:O,color:b,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:c,marginInlineStart:"auto","> li":{padding:`0 ${te(c)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:r},[`${t}-split${t}-something-after-last-item ${n}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${te(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:p},[`${t}-sm ${t}-item`]:{padding:f},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}},wD=e=>({contentWidth:220,itemPadding:`${te(e.paddingContentVertical)} 0`,itemPaddingSM:`${te(e.paddingContentVerticalSM)} ${te(e.paddingContentHorizontal)}`,itemPaddingLG:`${te(e.paddingContentVerticalLG)} ${te(e.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}),ED=yn("List",e=>{const t=tn(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[xD(t),SD(t),CD(t)]},wD);var kD=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function $D(e,t){const{pagination:n=!1,prefixCls:r,bordered:i=!1,split:o=!0,className:a,rootClassName:c,style:u,children:d,itemLayout:f,loadMore:p,grid:g,dataSource:v=[],size:b,header:_,footer:S,loading:C=!1,rowKey:E,renderItem:k,locale:$}=e,P=kD(e,["pagination","prefixCls","bordered","split","className","rootClassName","style","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]),T=n&&typeof n=="object"?n:{},[O,N]=h.useState(T.defaultCurrent||1),[I,z]=h.useState(T.defaultPageSize||10),{getPrefixCls:A,direction:M,className:j,style:B}=Ur("list"),{renderEmpty:F}=h.useContext(Ot),W={current:1,total:0,position:"bottom"},V=ke=>(je,Oe)=>{var Qe;N(je),z(Oe),n&&((Qe=n==null?void 0:n[ke])===null||Qe===void 0||Qe.call(n,je,Oe))},L=V("onChange"),G=V("onShowSizeChange"),U=(ke,je)=>{if(!k)return null;let Oe;return typeof E=="function"?Oe=E(ke):E?Oe=ke[E]:Oe=ke.key,Oe||(Oe=`list-item-${je}`),h.createElement(h.Fragment,{key:Oe},k(ke,je))},D=!!(p||n||S),q=A("list",r),[Y,ee,Z]=ED(q);let re=C;typeof re=="boolean"&&(re={spinning:re});const he=!!(re!=null&&re.spinning),fe=Jo(b);let ue="";switch(fe){case"large":ue="lg";break;case"small":ue="sm";break}const Se=ne(q,{[`${q}-vertical`]:f==="vertical",[`${q}-${ue}`]:ue,[`${q}-split`]:o,[`${q}-bordered`]:i,[`${q}-loading`]:he,[`${q}-grid`]:!!g,[`${q}-something-after-last-item`]:D,[`${q}-rtl`]:M==="rtl"},j,a,c,ee,Z),ae=jv(W,{total:v.length,current:O,pageSize:I},n||{}),le=Math.ceil(ae.total/ae.pageSize);ae.current=Math.min(ae.current,le);const ce=n&&h.createElement("div",{className:ne(`${q}-pagination`)},h.createElement(sD,Object.assign({align:"end"},ae,{onChange:L,onShowSizeChange:G})));let ye=We(v);n&&v.length>(ae.current-1)*ae.pageSize&&(ye=We(v).splice((ae.current-1)*ae.pageSize,ae.pageSize));const me=Object.keys(g||{}).some(ke=>["xs","sm","md","lg","xl","xxl"].includes(ke)),de=jy(me),be=h.useMemo(()=>{for(let ke=0;ke<Pa.length;ke+=1){const je=Pa[ke];if(de[je])return je}},[de]),xe=h.useMemo(()=>{if(!g)return;const ke=be&&g[be]?g[be]:g.column;if(ke)return{width:`${100/ke}%`,maxWidth:`${100/ke}%`}},[JSON.stringify(g),be]);let Te=he&&h.createElement("div",{style:{minHeight:53}});if(ye.length>0){const ke=ye.map(U);Te=g?h.createElement(j9,{gutter:g.gutter},h.Children.map(ke,je=>h.createElement("div",{key:je==null?void 0:je.key,style:xe},je))):h.createElement("ul",{className:`${q}-items`},ke)}else!d&&!he&&(Te=h.createElement("div",{className:`${q}-empty-text`},($==null?void 0:$.emptyText)||(F==null?void 0:F("List"))||h.createElement(Xk,{componentName:"List"})));const ze=ae.position,Ee=h.useMemo(()=>({grid:g,itemLayout:f}),[JSON.stringify(g),f]);return Y(h.createElement(nb.Provider,{value:Ee},h.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},B),u),className:Se},P),(ze==="top"||ze==="both")&&ce,_&&h.createElement("div",{className:`${q}-header`},_),h.createElement(Oa,Object.assign({},re),Te,d),S&&h.createElement("div",{className:`${q}-footer`},S),p||(ze==="bottom"||ze==="both")&&ce)))}const RD=h.forwardRef($D),ku=RD;ku.Item=i4;const TD=(e,t=!1)=>t&&e==null?[]:Array.isArray(e)?e:[e];let oo=null,xa=e=>e(),$u=[],Ru={};function Vx(){const{getContainer:e,duration:t,rtl:n,maxCount:r,top:i}=Ru,o=(e==null?void 0:e())||document.body;return{getContainer:()=>o,duration:t,rtl:n,maxCount:r,top:i}}const PD=Q.forwardRef((e,t)=>{const{messageConfig:n,sync:r}=e,{getPrefixCls:i}=h.useContext(Ot),o=Ru.prefixCls||i("message"),a=h.useContext(q8),[c,u]=DE(Object.assign(Object.assign(Object.assign({},n),{prefixCls:o}),a.message));return Q.useImperativeHandle(t,()=>{const d=Object.assign({},c);return Object.keys(d).forEach(f=>{d[f]=(...p)=>(r(),c[f].apply(c,p))}),{instance:d,sync:r}}),u}),OD=Q.forwardRef((e,t)=>{const[n,r]=Q.useState(Vx),i=()=>{r(Vx)};Q.useEffect(i,[]);const o=wE(),a=o.getRootPrefixCls(),c=o.getIconPrefixCls(),u=o.getTheme(),d=Q.createElement(PD,{ref:t,sync:i,messageConfig:n});return Q.createElement(Yo,{prefixCls:a,iconPrefixCls:c,theme:u},o.holderRender?o.holderRender(d):d)}),dm=()=>{if(!oo){const e=document.createDocumentFragment(),t={fragment:e};oo=t,xa(()=>{Sy()(Q.createElement(OD,{ref:r=>{const{instance:i,sync:o}=r||{};Promise.resolve().then(()=>{!t.instance&&i&&(t.instance=i,t.sync=o,dm())})}}),e)});return}oo.instance&&($u.forEach(e=>{const{type:t,skipped:n}=e;if(!n)switch(t){case"open":{xa(()=>{const r=oo.instance.open(Object.assign(Object.assign({},Ru),e.config));r==null||r.then(e.resolve),e.setCloseFn(r)});break}case"destroy":xa(()=>{oo==null||oo.instance.destroy(e.key)});break;default:xa(()=>{var r;const i=(r=oo.instance)[t].apply(r,We(e.args));i==null||i.then(e.resolve),e.setCloseFn(i)})}}),$u=[])};function ID(e){Ru=Object.assign(Object.assign({},Ru),e),xa(()=>{var t;(t=oo==null?void 0:oo.sync)===null||t===void 0||t.call(oo)})}function ND(e){const t=by(n=>{let r;const i={type:"open",config:e,resolve:n,setCloseFn:o=>{r=o}};return $u.push(i),()=>{r?xa(()=>{r()}):i.skipped=!0}});return dm(),t}function MD(e,t){const n=by(r=>{let i;const o={type:e,args:t,resolve:r,setCloseFn:a=>{i=a}};return $u.push(o),()=>{i?xa(()=>{i()}):o.skipped=!0}});return dm(),n}const zD=e=>{$u.push({type:"destroy",key:e}),dm()},jD=["success","info","warning","error","loading"],BD={open:ND,destroy:zD,config:ID,useMessage:II,_InternalPanelDoNotUseOrYouWillBeFired:wI},Di=BD;jD.forEach(e=>{Di[e]=(...t)=>MD(e,t)});var LD=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const AD=e=>{const{prefixCls:t,className:n,closeIcon:r,closable:i,type:o,title:a,children:c,footer:u}=e,d=LD(e,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:f}=h.useContext(Ot),p=f(),g=t||f("modal"),v=Po(p),[b,_,S]=bk(g,v),C=`${g}-confirm`;let E={};return o?E={closable:i??!1,title:"",footer:"",children:h.createElement(Sk,Object.assign({},e,{prefixCls:g,confirmPrefixCls:C,rootPrefixCls:p,content:c}))}:E={closable:i??!0,title:a,footer:u!==null&&h.createElement(pk,Object.assign({},e)),children:c},b(h.createElement(ik,Object.assign({prefixCls:g,className:ne(_,`${g}-pure-panel`,o&&C,o&&`${C}-${o}`,n,S,v)},d,{closeIcon:mk(g,r),closable:i},E)))},DD=Pk(AD);function o4(e){return qu(Ek(e))}const Ti=_k;Ti.useModal=V8;Ti.info=function(t){return qu(kk(t))};Ti.success=function(t){return qu($k(t))};Ti.error=function(t){return qu(Rk(t))};Ti.warning=o4;Ti.warn=o4;Ti.confirm=function(t){return qu(Tk(t))};Ti.destroyAll=function(){for(;Ca.length;){const t=Ca.pop();t&&t()}};Ti.config=A8;Ti._InternalPanelDoNotUseOrYouWillBeFired=DD;var HD=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],s4=h.forwardRef(function(e,t){var n,r=e.prefixCls,i=r===void 0?"rc-switch":r,o=e.className,a=e.checked,c=e.defaultChecked,u=e.disabled,d=e.loadingIcon,f=e.checkedChildren,p=e.unCheckedChildren,g=e.onClick,v=e.onChange,b=e.onKeyDown,_=Lt(e,HD),S=er(!1,{value:a,defaultValue:c}),C=se(S,2),E=C[0],k=C[1];function $(N,I){var z=E;return u||(z=N,k(z),v==null||v(z,I)),z}function P(N){N.which===Ge.LEFT?$(!1,N):N.which===Ge.RIGHT&&$(!0,N),b==null||b(N)}function T(N){var I=$(!E,N);g==null||g(I,N)}var O=ne(i,o,(n={},K(n,"".concat(i,"-checked"),E),K(n,"".concat(i,"-disabled"),u),n));return h.createElement("button",Re({},_,{type:"button",role:"switch","aria-checked":E,disabled:u,className:O,ref:t,onKeyDown:P,onClick:T}),d,h.createElement("span",{className:"".concat(i,"-inner")},h.createElement("span",{className:"".concat(i,"-inner-checked")},f),h.createElement("span",{className:"".concat(i,"-inner-unchecked")},p)))});s4.displayName="Switch";const FD=e=>{const{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:o,innerMaxMarginSM:a,handleSizeSM:c,calc:u}=e,d=`${t}-inner`,f=te(u(c).add(u(r).mul(2)).equal()),p=te(u(a).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:i,height:n,lineHeight:te(n),[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${d}-checked, ${d}-unchecked`]:{minHeight:n},[`${d}-checked`]:{marginInlineStart:`calc(-100% + ${f} - ${p})`,marginInlineEnd:`calc(100% - ${f} + ${p})`},[`${d}-unchecked`]:{marginTop:u(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:c,height:c},[`${t}-loading-icon`]:{top:u(u(c).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${d}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${d}-unchecked`]:{marginInlineStart:`calc(100% - ${f} + ${p})`,marginInlineEnd:`calc(-100% + ${f} - ${p})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${te(u(c).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${d}`]:{[`${d}-unchecked`]:{marginInlineStart:u(e.marginXXS).div(2).equal(),marginInlineEnd:u(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${d}`]:{[`${d}-checked`]:{marginInlineStart:u(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:u(e.marginXXS).div(2).equal()}}}}}}},WD=e=>{const{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},VD=e=>{const{componentCls:t,trackPadding:n,handleBg:r,handleShadow:i,handleSize:o,calc:a}=e,c=`${t}-handle`;return{[t]:{[c]:{position:"absolute",top:n,insetInlineStart:n,width:o,height:o,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:a(o).div(2).equal(),boxShadow:i,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${c}`]:{insetInlineStart:`calc(100% - ${te(a(o).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${c}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${c}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},qD=e=>{const{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:o,handleSize:a,calc:c}=e,u=`${t}-inner`,d=te(c(a).add(c(r).mul(2)).equal()),f=te(c(o).mul(2).equal());return{[t]:{[u]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:o,paddingInlineEnd:i,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${u}-checked, ${u}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${u}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${f})`,marginInlineEnd:`calc(100% - ${d} + ${f})`},[`${u}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${u}`]:{paddingInlineStart:i,paddingInlineEnd:o,[`${u}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${u}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${f})`,marginInlineEnd:`calc(-100% + ${d} - ${f})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${u}`]:{[`${u}-unchecked`]:{marginInlineStart:c(r).mul(2).equal(),marginInlineEnd:c(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${u}`]:{[`${u}-checked`]:{marginInlineStart:c(r).mul(-1).mul(2).equal(),marginInlineEnd:c(r).mul(2).equal()}}}}}},UD=e=>{const{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},Vn(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:te(n),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),uo(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}},KD=e=>{const{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:i}=e,o=t*n,a=r/2,c=2,u=o-c*2,d=a-c*2;return{trackHeight:o,trackHeightSM:a,trackMinWidth:u*2+c*4,trackMinWidthSM:d*2+c*2,trackPadding:c,handleBg:i,handleSize:u,handleSizeSM:d,handleShadow:`0 2px 4px 0 ${new vn("#00230b").setA(.2).toRgbString()}`,innerMinMargin:u/2,innerMaxMargin:u+c+c*2,innerMinMarginSM:d/2,innerMaxMarginSM:d+c+c*2}},GD=yn("Switch",e=>{const t=tn(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[UD(t),qD(t),VD(t),WD(t),FD(t)]},KD);var XD=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const YD=h.forwardRef((e,t)=>{const{prefixCls:n,size:r,disabled:i,loading:o,className:a,rootClassName:c,style:u,checked:d,value:f,defaultChecked:p,defaultValue:g,onChange:v}=e,b=XD(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[_,S]=er(!1,{value:d??f,defaultValue:p??g}),{getPrefixCls:C,direction:E,switch:k}=h.useContext(Ot),$=h.useContext(Js),P=(i??$)||o,T=C("switch",n),O=h.createElement("div",{className:`${T}-handle`},o&&h.createElement(ju,{className:`${T}-loading-icon`})),[N,I,z]=GD(T),A=Jo(r),M=ne(k==null?void 0:k.className,{[`${T}-small`]:A==="small",[`${T}-loading`]:o,[`${T}-rtl`]:E==="rtl"},a,c,I,z),j=Object.assign(Object.assign({},k==null?void 0:k.style),u),B=(...F)=>{S(F[0]),v==null||v.apply(void 0,F)};return N(h.createElement(Lf,{component:"Switch",disabled:P},h.createElement(s4,Object.assign({},b,{checked:_,onChange:B,prefixCls:T,className:M,style:j,disabled:P,ref:t,loadingIcon:O}))))}),Zc=YD;Zc.__ANT_SWITCH=!0;const JD=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:o}=e,a=o(r).sub(n).equal(),c=o(t).sub(n).equal();return{[i]:Object.assign(Object.assign({},Vn(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:a,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${te(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${i}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:c,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${i}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${i}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:a}}),[`${i}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},rb=e=>{const{lineWidth:t,fontSizeIcon:n,calc:r}=e,i=e.fontSizeSM;return tn(e,{tagFontSize:i,tagLineHeight:te(r(e.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},ib=e=>({defaultBg:new vn(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),a4=yn("Tag",e=>{const t=rb(e);return JD(t)},ib);var QD=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const ZD=h.forwardRef((e,t)=>{const{prefixCls:n,style:r,className:i,checked:o,children:a,icon:c,onChange:u,onClick:d}=e,f=QD(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:p,tag:g}=h.useContext(Ot),v=k=>{u==null||u(!o),d==null||d(k)},b=p("tag",n),[_,S,C]=a4(b),E=ne(b,`${b}-checkable`,{[`${b}-checkable-checked`]:o},g==null?void 0:g.className,i,S,C);return _(h.createElement("span",Object.assign({},f,{ref:t,style:Object.assign(Object.assign({},r),g==null?void 0:g.style),className:E,onClick:v}),c,h.createElement("span",null,a)))}),eH=e=>zf(e,(t,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:o})=>({[`${e.componentCls}${e.componentCls}-${t}`]:{color:n,background:i,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:o,borderColor:o},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}})),tH=zu(["Tag","preset"],e=>{const t=rb(e);return eH(t)},ib);function nH(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const ch=(e,t,n)=>{const r=nH(n);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},rH=zu(["Tag","status"],e=>{const t=rb(e);return[ch(t,"success","Success"),ch(t,"processing","Info"),ch(t,"error","Error"),ch(t,"warning","Warning")]},ib);var iH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const oH=h.forwardRef((e,t)=>{const{prefixCls:n,className:r,rootClassName:i,style:o,children:a,icon:c,color:u,onClose:d,bordered:f=!0,visible:p}=e,g=iH(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:v,direction:b,tag:_}=h.useContext(Ot),[S,C]=h.useState(!0),E=dr(g,["closeIcon","closable"]);h.useEffect(()=>{p!==void 0&&C(p)},[p]);const k=tm(u),$=xB(u),P=k||$,T=Object.assign(Object.assign({backgroundColor:u&&!P?u:void 0},_==null?void 0:_.style),o),O=v("tag",n),[N,I,z]=a4(O),A=ne(O,_==null?void 0:_.className,{[`${O}-${u}`]:P,[`${O}-has-color`]:u&&!P,[`${O}-hidden`]:!S,[`${O}-rtl`]:b==="rtl",[`${O}-borderless`]:!f},r,i,I,z),M=L=>{L.stopPropagation(),d==null||d(L),!L.defaultPrevented&&C(!1)},[,j]=yy(Gl(e),Gl(_),{closable:!1,closeIconRender:L=>{const G=h.createElement("span",{className:`${O}-close-icon`,onClick:M},L);return NE(L,G,U=>({onClick:D=>{var q;(q=U==null?void 0:U.onClick)===null||q===void 0||q.call(U,D),M(D)},className:ne(U==null?void 0:U.className,`${O}-close-icon`)}))}}),B=typeof g.onClick=="function"||a&&a.type==="a",F=c||null,W=F?h.createElement(h.Fragment,null,F,a&&h.createElement("span",null,a)):a,V=h.createElement("span",Object.assign({},E,{ref:t,className:A,style:T}),W,j,k&&h.createElement(tH,{key:"preset",prefixCls:O}),$&&h.createElement(rH,{key:"status",prefixCls:O}));return N(B?h.createElement(Lf,{component:"Tag"},V):V)}),Wi=oH;Wi.CheckableTag=ZD;const no=(e,t)=>new vn(e).setA(t).toRgbString(),El=(e,t)=>new vn(e).lighten(t).toHexString(),sH=e=>{const t=Ra(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},aH=(e,t)=>{const n=e||"#000",r=t||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:no(r,.85),colorTextSecondary:no(r,.65),colorTextTertiary:no(r,.45),colorTextQuaternary:no(r,.25),colorFill:no(r,.18),colorFillSecondary:no(r,.12),colorFillTertiary:no(r,.08),colorFillQuaternary:no(r,.04),colorBgSolid:no(r,.95),colorBgSolidHover:no(r,1),colorBgSolidActive:no(r,.9),colorBgElevated:El(n,12),colorBgContainer:El(n,8),colorBgLayout:El(n,0),colorBgSpotlight:El(n,26),colorBgBlur:no(r,.04),colorBorder:El(n,26),colorBorderSecondary:El(n,19)}},lH=(e,t)=>{const n=Object.keys(gy).map(o=>{const a=Ra(e[o],{theme:"dark"});return Array.from({length:10},()=>1).reduce((c,u,d)=>(c[`${o}-${d+1}`]=a[d],c[`${o}${d+1}`]=a[d],c),{})}).reduce((o,a)=>(o=Object.assign(Object.assign({},o),a),o),{}),r=t??Z2(e),i=Q2(e,{generateColorPalettes:sH,generateNeutralColorPalettes:aH});return Object.assign(Object.assign(Object.assign(Object.assign({},r),n),i),{colorPrimaryBg:i.colorPrimaryBorder,colorPrimaryBgHover:i.colorPrimaryBorderHover})},cH={defaultSeed:Yh.token,darkAlgorithm:lH};var uH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},dH=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:uH}))},hH=h.forwardRef(dH),fH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},mH=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:fH}))},pH=h.forwardRef(mH);const gH=(e,t,n,r)=>{const{titleMarginBottom:i,fontWeightStrong:o}=r;return{marginBottom:i,color:n,fontWeight:o,fontSize:e,lineHeight:t}},vH=e=>{const t=[1,2,3,4,5],n={};return t.forEach(r=>{n[`
325
- h${r}&,
326
- div&-h${r},
327
- div&-h${r} > textarea,
328
- h${r}
329
- `]=gH(e[`fontSizeHeading${r}`],e[`lineHeightHeading${r}`],e.colorTextHeading,e)}),n},yH=e=>{const{componentCls:t}=e;return{"a&, a":Object.assign(Object.assign({},uE(e)),{userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},bH=e=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:Gh[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),_H=e=>{const{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},SH=e=>({[`${e.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),CH=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),xH=e=>{const{componentCls:t,titleMarginTop:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger`]:{color:e.colorErrorText,"a&:active, a&:focus":{color:e.colorErrorTextActive},"a&:hover":{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},vH(e)),{[`
330
- & + h1${t},
331
- & + h2${t},
332
- & + h3${t},
333
- & + h4${t},
334
- & + h5${t}
335
- `]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}}}),bH(e)),yH(e)),{[`
336
- ${t}-expand,
337
- ${t}-collapse,
338
- ${t}-edit,
339
- ${t}-copy
340
- `]:Object.assign(Object.assign({},uE(e)),{marginInlineStart:e.marginXXS})}),_H(e)),SH(e)),CH()),{"&-rtl":{direction:"rtl"}})}},wH=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),l4=yn("Typography",xH,wH),EH=e=>{const{prefixCls:t,"aria-label":n,className:r,style:i,direction:o,maxLength:a,autoSize:c=!0,value:u,onSave:d,onCancel:f,onEnd:p,component:g,enterIcon:v=h.createElement(pH,null)}=e,b=h.useRef(null),_=h.useRef(!1),S=h.useRef(null),[C,E]=h.useState(u);h.useEffect(()=>{E(u)},[u]),h.useEffect(()=>{var B;if(!((B=b.current)===null||B===void 0)&&B.resizableTextArea){const{textArea:F}=b.current.resizableTextArea;F.focus();const{length:W}=F.value;F.setSelectionRange(W,W)}},[]);const k=({target:B})=>{E(B.value.replace(/[\n\r]/g,""))},$=()=>{_.current=!0},P=()=>{_.current=!1},T=({keyCode:B})=>{_.current||(S.current=B)},O=()=>{d(C.trim())},N=({keyCode:B,ctrlKey:F,altKey:W,metaKey:V,shiftKey:L})=>{S.current!==B||_.current||F||W||V||L||(B===Ge.ENTER?(O(),p==null||p()):B===Ge.ESC&&f())},I=()=>{O()},[z,A,M]=l4(t),j=ne(t,`${t}-edit-content`,{[`${t}-rtl`]:o==="rtl",[`${t}-${g}`]:!!g},r,A,M);return z(h.createElement("div",{className:j,style:i},h.createElement(NA,{ref:b,maxLength:a,value:C,onChange:k,onKeyDown:T,onKeyUp:N,onCompositionStart:$,onCompositionEnd:P,onBlur:I,"aria-label":n,rows:1,autoSize:c}),v!==null?fi(v,{className:`${t}-edit-content-confirm`}):null))};var jg,qx;function kH(){return qx||(qx=1,jg=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(i){e.addRange(i)}),t&&t.focus()}}),jg}var Bg,Ux;function $H(){if(Ux)return Bg;Ux=1;var e=kH(),t={"text/plain":"Text","text/html":"Url",default:"Text"},n="Copy to clipboard: #{key}, Enter";function r(o){var a=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return o.replace(/#{\s*key\s*}/g,a)}function i(o,a){var c,u,d,f,p,g,v=!1;a||(a={}),c=a.debug||!1;try{d=e(),f=document.createRange(),p=document.getSelection(),g=document.createElement("span"),g.textContent=o,g.ariaHidden="true",g.style.all="unset",g.style.position="fixed",g.style.top=0,g.style.clip="rect(0, 0, 0, 0)",g.style.whiteSpace="pre",g.style.webkitUserSelect="text",g.style.MozUserSelect="text",g.style.msUserSelect="text",g.style.userSelect="text",g.addEventListener("copy",function(_){if(_.stopPropagation(),a.format)if(_.preventDefault(),typeof _.clipboardData>"u"){c&&console.warn("unable to use e.clipboardData"),c&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var S=t[a.format]||t.default;window.clipboardData.setData(S,o)}else _.clipboardData.clearData(),_.clipboardData.setData(a.format,o);a.onCopy&&(_.preventDefault(),a.onCopy(_.clipboardData))}),document.body.appendChild(g),f.selectNodeContents(g),p.addRange(f);var b=document.execCommand("copy");if(!b)throw new Error("copy command was unsuccessful");v=!0}catch(_){c&&console.error("unable to copy using execCommand: ",_),c&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(a.format||"text",o),a.onCopy&&a.onCopy(window.clipboardData),v=!0}catch(S){c&&console.error("unable to copy using clipboardData: ",S),c&&console.error("falling back to prompt"),u=r("message"in a?a.message:n),window.prompt(u,o)}}finally{p&&(typeof p.removeRange=="function"?p.removeRange(f):p.removeAllRanges()),g&&document.body.removeChild(g),d()}return v}return Bg=i,Bg}var RH=$H();const TH=Iu(RH);var PH=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function c(f){try{d(r.next(f))}catch(p){a(p)}}function u(f){try{d(r.throw(f))}catch(p){a(p)}}function d(f){f.done?o(f.value):i(f.value).then(c,u)}d((r=r.apply(e,t||[])).next())})};const OH=({copyConfig:e,children:t})=>{const[n,r]=h.useState(!1),[i,o]=h.useState(!1),a=h.useRef(null),c=()=>{a.current&&clearTimeout(a.current)},u={};e.format&&(u.format=e.format),h.useEffect(()=>c,[]);const d=Zn(f=>PH(void 0,void 0,void 0,function*(){var p;f==null||f.preventDefault(),f==null||f.stopPropagation(),o(!0);try{const g=typeof e.text=="function"?yield e.text():e.text;TH(g||TD(t,!0).join("")||"",u),o(!1),r(!0),c(),a.current=setTimeout(()=>{r(!1)},3e3),(p=e.onCopy)===null||p===void 0||p.call(e,f)}catch(g){throw o(!1),g}}));return{copied:n,copyLoading:i,onClick:d}};function Lg(e,t){return h.useMemo(()=>{const n=!!e;return[n,Object.assign(Object.assign({},t),n&&typeof e=="object"?e:null)]},[e])}const IH=e=>{const t=h.useRef(void 0);return h.useEffect(()=>{t.current=e}),t.current},NH=(e,t,n)=>h.useMemo(()=>e===!0?{title:t??n}:h.isValidElement(e)?{title:e}:typeof e=="object"?Object.assign({title:t??n},e):{title:e},[e,t,n]);var MH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const c4=h.forwardRef((e,t)=>{const{prefixCls:n,component:r="article",className:i,rootClassName:o,setContentRef:a,children:c,direction:u,style:d}=e,f=MH(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:p,direction:g,className:v,style:b}=Ur("typography"),_=u??g,S=a?ho(t,a):t,C=p("typography",n),[E,k,$]=l4(C),P=ne(C,v,{[`${C}-rtl`]:_==="rtl"},i,o,k,$),T=Object.assign(Object.assign({},b),d);return E(h.createElement(r,Object.assign({className:P,style:T,ref:S},f),c))});var zH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},jH=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:zH}))},Bh=h.forwardRef(jH);function Kx(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function Ag(e,t,n){return e===!0||e===void 0?t:e||n&&t}function BH(e){const t=document.createElement("em");e.appendChild(t);const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}const ob=e=>["string","number"].includes(typeof e),LH=({prefixCls:e,copied:t,locale:n,iconOnly:r,tooltips:i,icon:o,tabIndex:a,onCopy:c,loading:u})=>{const d=Kx(i),f=Kx(o),{copied:p,copy:g}=n??{},v=t?p:g,b=Ag(d[t?1:0],v),_=typeof b=="string"?b:v;return h.createElement(Ko,{title:b},h.createElement("button",{type:"button",className:ne(`${e}-copy`,{[`${e}-copy-success`]:t,[`${e}-copy-icon-only`]:r}),onClick:c,"aria-label":_,tabIndex:a},t?Ag(f[1],h.createElement(e$,null),!0):Ag(f[0],u?h.createElement(ju,null):h.createElement(Bh,null),!0)))},uh=h.forwardRef(({style:e,children:t},n)=>{const r=h.useRef(null);return h.useImperativeHandle(n,()=>({isExceed:()=>{const i=r.current;return i.scrollHeight>i.clientHeight},getHeight:()=>r.current.clientHeight})),h.createElement("span",{"aria-hidden":!0,ref:r,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},e)},t)}),AH=e=>e.reduce((t,n)=>t+(ob(n)?String(n).length:1),0);function Gx(e,t){let n=0;const r=[];for(let i=0;i<e.length;i+=1){if(n===t)return r;const o=e[i],c=ob(o)?String(o).length:1,u=n+c;if(u>t){const d=t-n;return r.push(String(o).slice(0,d)),r}r.push(o),n=u}return e}const Dg=0,Hg=1,Fg=2,Wg=3,Xx=4,dh={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function DH(e){const{enableMeasure:t,width:n,text:r,children:i,rows:o,expanded:a,miscDeps:c,onEllipsis:u}=e,d=h.useMemo(()=>hi(r),[r]),f=h.useMemo(()=>AH(d),[r]),p=h.useMemo(()=>i(d,!1),[r]),[g,v]=h.useState(null),b=h.useRef(null),_=h.useRef(null),S=h.useRef(null),C=h.useRef(null),E=h.useRef(null),[k,$]=h.useState(!1),[P,T]=h.useState(Dg),[O,N]=h.useState(0),[I,z]=h.useState(null);hn(()=>{T(t&&n&&f?Hg:Dg)},[n,r,o,t,d]),hn(()=>{var B,F,W,V;if(P===Hg){T(Fg);const L=_.current&&getComputedStyle(_.current).whiteSpace;z(L)}else if(P===Fg){const L=!!(!((B=S.current)===null||B===void 0)&&B.isExceed());T(L?Wg:Xx),v(L?[0,f]:null),$(L);const G=((F=S.current)===null||F===void 0?void 0:F.getHeight())||0,U=o===1?0:((W=C.current)===null||W===void 0?void 0:W.getHeight())||0,D=((V=E.current)===null||V===void 0?void 0:V.getHeight())||0,q=Math.max(G,U+D);N(q+1),u(L)}},[P]);const A=g?Math.ceil((g[0]+g[1])/2):0;hn(()=>{var B;const[F,W]=g||[0,0];if(F!==W){const L=(((B=b.current)===null||B===void 0?void 0:B.getHeight())||0)>O;let G=A;W-F===1&&(G=L?F:W),v(L?[F,G]:[G,W])}},[g,A]);const M=h.useMemo(()=>{if(!t)return i(d,!1);if(P!==Wg||!g||g[0]!==g[1]){const B=i(d,!1);return[Xx,Dg].includes(P)?B:h.createElement("span",{style:Object.assign(Object.assign({},dh),{WebkitLineClamp:o})},B)}return i(a?d:Gx(d,g[0]),k)},[a,P,g,d].concat(We(c))),j={width:n,margin:0,padding:0,whiteSpace:I==="nowrap"?"normal":"inherit"};return h.createElement(h.Fragment,null,M,P===Fg&&h.createElement(h.Fragment,null,h.createElement(uh,{style:Object.assign(Object.assign(Object.assign({},j),dh),{WebkitLineClamp:o}),ref:S},p),h.createElement(uh,{style:Object.assign(Object.assign(Object.assign({},j),dh),{WebkitLineClamp:o-1}),ref:C},p),h.createElement(uh,{style:Object.assign(Object.assign(Object.assign({},j),dh),{WebkitLineClamp:1}),ref:E},i([],!0))),P===Wg&&g&&g[0]!==g[1]&&h.createElement(uh,{style:Object.assign(Object.assign({},j),{top:400}),ref:b},i(Gx(d,A),!0)),P===Hg&&h.createElement("span",{style:{whiteSpace:"inherit"},ref:_}))}const HH=({enableEllipsis:e,isEllipsis:t,children:n,tooltipProps:r})=>!(r!=null&&r.title)||!e?n:h.createElement(Ko,Object.assign({open:t?void 0:!1},r),n);var FH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function WH({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:o,italic:a},c){let u=c;function d(f,p){p&&(u=h.createElement(f,{},u))}return d("strong",i),d("u",n),d("del",r),d("code",t),d("mark",e),d("kbd",o),d("i",a),u}const VH="...",Yx=["delete","mark","code","underline","strong","keyboard","italic"],hm=h.forwardRef((e,t)=>{var n;const{prefixCls:r,className:i,style:o,type:a,disabled:c,children:u,ellipsis:d,editable:f,copyable:p,component:g,title:v}=e,b=FH(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:_,direction:S}=h.useContext(Ot),[C]=gs("Text"),E=h.useRef(null),k=h.useRef(null),$=_("typography",r),P=dr(b,Yx),[T,O]=Lg(f),[N,I]=er(!1,{value:O.editing}),{triggerType:z=["icon"]}=O,A=Me=>{var Ue;Me&&((Ue=O.onStart)===null||Ue===void 0||Ue.call(O)),I(Me)},M=IH(N);hn(()=>{var Me;!N&&M&&((Me=k.current)===null||Me===void 0||Me.focus())},[N]);const j=Me=>{Me==null||Me.preventDefault(),A(!0)},B=Me=>{var Ue;(Ue=O.onChange)===null||Ue===void 0||Ue.call(O,Me),A(!1)},F=()=>{var Me;(Me=O.onCancel)===null||Me===void 0||Me.call(O),A(!1)},[W,V]=Lg(p),{copied:L,copyLoading:G,onClick:U}=OH({copyConfig:V,children:u}),[D,q]=h.useState(!1),[Y,ee]=h.useState(!1),[Z,re]=h.useState(!1),[he,fe]=h.useState(!1),[ue,Se]=h.useState(!0),[ae,le]=Lg(d,{expandable:!1,symbol:Me=>Me?C==null?void 0:C.collapse:C==null?void 0:C.expand}),[ce,ye]=er(le.defaultExpanded||!1,{value:le.expanded}),me=ae&&(!ce||le.expandable==="collapsible"),{rows:de=1}=le,be=h.useMemo(()=>me&&(le.suffix!==void 0||le.onEllipsis||le.expandable||T||W),[me,le,T,W]);hn(()=>{ae&&!be&&(q(CC("webkitLineClamp")),ee(CC("textOverflow")))},[be,ae]);const[xe,Te]=h.useState(me),ze=h.useMemo(()=>be?!1:de===1?Y:D,[be,Y,D]);hn(()=>{Te(ze&&me)},[ze,me]);const Ee=me&&(xe?he:Z),ke=me&&de===1&&xe,je=me&&de>1&&xe,Oe=(Me,Ue)=>{var It;ye(Ue.expanded),(It=le.onExpand)===null||It===void 0||It.call(le,Me,Ue)},[Qe,at]=h.useState(0),$t=({offsetWidth:Me})=>{at(Me)},pt=Me=>{var Ue;re(Me),Z!==Me&&((Ue=le.onEllipsis)===null||Ue===void 0||Ue.call(le,Me))};h.useEffect(()=>{const Me=E.current;if(ae&&xe&&Me){const Ue=BH(Me);he!==Ue&&fe(Ue)}},[ae,xe,u,je,ue,Qe]),h.useEffect(()=>{const Me=E.current;if(typeof IntersectionObserver>"u"||!Me||!xe||!me)return;const Ue=new IntersectionObserver(()=>{Se(!!Me.offsetParent)});return Ue.observe(Me),()=>{Ue.disconnect()}},[xe,me]);const Je=NH(le.tooltip,O.text,u),ft=h.useMemo(()=>{if(!(!ae||xe))return[O.text,u,v,Je.title].find(ob)},[ae,xe,v,Je.title,Ee]);if(N)return h.createElement(EH,{value:(n=O.text)!==null&&n!==void 0?n:typeof u=="string"?u:"",onSave:B,onCancel:F,onEnd:O.onEnd,prefixCls:$,className:i,style:o,direction:S,component:g,maxLength:O.maxLength,autoSize:O.autoSize,enterIcon:O.enterIcon});const Xe=()=>{const{expandable:Me,symbol:Ue}=le;return Me?h.createElement("button",{type:"button",key:"expand",className:`${$}-${ce?"collapse":"expand"}`,onClick:It=>Oe(It,{expanded:!ce}),"aria-label":ce?C.collapse:C==null?void 0:C.expand},typeof Ue=="function"?Ue(ce):Ue):null},yt=()=>{if(!T)return;const{icon:Me,tooltip:Ue,tabIndex:It}=O,St=hi(Ue)[0]||(C==null?void 0:C.edit),nn=typeof St=="string"?St:"";return z.includes("icon")?h.createElement(Ko,{key:"edit",title:Ue===!1?"":St},h.createElement("button",{type:"button",ref:k,className:`${$}-edit`,onClick:j,"aria-label":nn,tabIndex:It},Me||h.createElement(hH,{role:"button"}))):null},tt=()=>W?h.createElement(LH,Object.assign({key:"copy"},V,{prefixCls:$,copied:L,locale:C,onCopy:U,loading:G,iconOnly:u==null})):null,Le=Me=>[Me&&Xe(),yt(),tt()],rt=Me=>[Me&&!ce&&h.createElement("span",{"aria-hidden":!0,key:"ellipsis"},VH),le.suffix,Le(Me)];return h.createElement(ao,{onResize:$t,disabled:!me},Me=>h.createElement(HH,{tooltipProps:Je,enableEllipsis:me,isEllipsis:Ee},h.createElement(c4,Object.assign({className:ne({[`${$}-${a}`]:a,[`${$}-disabled`]:c,[`${$}-ellipsis`]:ae,[`${$}-ellipsis-single-line`]:ke,[`${$}-ellipsis-multiple-line`]:je},i),prefixCls:r,style:Object.assign(Object.assign({},o),{WebkitLineClamp:je?de:void 0}),component:g,ref:ho(Me,E,t),direction:S,onClick:z.includes("text")?j:void 0,"aria-label":ft==null?void 0:ft.toString(),title:v},P),h.createElement(DH,{enableMeasure:me&&!xe,text:u,rows:de,width:Qe,onEllipsis:pt,expanded:ce,miscDeps:[L,ce,G,T,W,C].concat(We(Yx.map(Ue=>e[Ue])))},(Ue,It)=>WH(e,h.createElement(h.Fragment,null,Ue.length>0&&It&&!ce&&ft?h.createElement("span",{key:"show-content","aria-hidden":!0},Ue):Ue,rt(It)))))))});var qH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const UH=h.forwardRef((e,t)=>{const{ellipsis:n,rel:r,children:i,navigate:o}=e,a=qH(e,["ellipsis","rel","children","navigate"]),c=Object.assign(Object.assign({},a),{rel:r===void 0&&a.target==="_blank"?"noopener noreferrer":r});return h.createElement(hm,Object.assign({},c,{ref:t,ellipsis:!!n,component:"a"}),i)});var KH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const GH=h.forwardRef((e,t)=>{const{children:n}=e,r=KH(e,["children"]);return h.createElement(hm,Object.assign({ref:t},r,{component:"div"}),n)});var XH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const YH=(e,t)=>{const{ellipsis:n,children:r}=e,i=XH(e,["ellipsis","children"]),o=h.useMemo(()=>n&&typeof n=="object"?dr(n,["expandable","rows"]):n,[n]);return h.createElement(hm,Object.assign({ref:t},i,{ellipsis:o,component:"span"}),r)},JH=h.forwardRef(YH);var QH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const ZH=[1,2,3,4,5],eF=h.forwardRef((e,t)=>{const{level:n=1,children:r}=e,i=QH(e,["level","children"]),o=ZH.includes(n)?`h${n}`:"h1";return h.createElement(hm,Object.assign({ref:t},i,{component:o}),r)}),Oo=c4;Oo.Text=JH;Oo.Link=UH;Oo.Title=eF;Oo.Paragraph=GH;var tF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},nF=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:tF}))},rF=h.forwardRef(nF),iF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"},oF=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:iF}))},Jx=h.forwardRef(oF),sF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},aF=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:sF}))},Lh=h.forwardRef(aF),lF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z"}}]},name:"dashboard",theme:"outlined"},cF=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:lF}))},uF=h.forwardRef(cF),dF={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"},hF=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:dF}))},fF=h.forwardRef(hF),mF={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"},pF=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:mF}))},gF=h.forwardRef(pF),vF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"},yF=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:vF}))},bF=h.forwardRef(yF),_F={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},SF=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:_F}))},Qx=h.forwardRef(SF),CF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},xF=function(t,n){return h.createElement(Cn,Re({},t,{ref:n,icon:CF}))},wF=h.forwardRef(xF);const Zx=/command execution specialist|file search specialist|planning specialist|general-purpose agent/i;function df(e){const t=e==null?void 0:e.system;return typeof t=="string"?t:Array.isArray(t)?t.map(n=>n&&n.text||"").join(""):""}function Vr(e){if(!e)return!1;if(e.mainAgent){const r=df(e.body||{});return!Zx.test(r)}const t=e.body||{},n=t.tools;if(t.system&&Array.isArray(n)&&n.length>10){const r=n.some(a=>a.name==="Edit"),i=n.some(a=>a.name==="Bash"),o=n.some(a=>a.name==="Task"||a.name==="Agent");if(r&&i&&o){const a=df(t);if(a.includes("You are Claude Code")&&!Zx.test(a))return!0}}return!1}function h0(e){return e?/^Base directory for this skill:/i.test(e.trim()):!1}function sb(e){if(!e)return!0;const t=e.trim();return!!(!t||/^<[a-zA-Z_][\w-]*[\s>]/i.test(t)||/^\[SUGGESTION MODE:/i.test(t)||/^Your response was cut off because it exceeded the output token limit/i.test(t)||/^Base directory for this skill:/i.test(t))}function u4(e){if(!Array.isArray(e))return{commands:[],textBlocks:[],skillBlocks:[]};const t=e.some(o=>o.type==="text"&&/<command-message>/i.test(o.text||"")),n=[];if(t)for(const o of e){if(o.type!=="text")continue;const a=(o.text||"").match(/<command-name>\s*([^<]*)<\/command-name>/i);if(a){const c=a[1].trim();n.push(c.startsWith("/")?c:`/${c}`)}}let r=e.filter(o=>o.type==="text"&&!sb(o.text));t&&(r=r.filter(o=>!/<command-message>/i.test(o.text||"")));const i=r.filter(o=>h0(o.text));return i.length>0&&(r=r.filter(o=>!h0(o.text))),{commands:n,textBlocks:r,skillBlocks:i}}function d4(e,t){var v,b;const n=e[t];if(!Vr(n))return null;const r=(b=(v=n.response)==null?void 0:v.body)==null?void 0:b.usage;if(!r)return null;const i=r.cache_creation_input_tokens||0,o=r.cache_read_input_tokens||0;if(i===0||i<=o)return null;let a=null;for(let _=t-1;_>=0;_--)if(Vr(e[_])){a=e[_];break}if(!a)return null;if(n.timestamp-a.timestamp>300*1e3)return{reason:"ttl"};const u=ka(a.body),d=ka(n.body);if(!u||!d)return{reason:"key_change"};const f=[];u.model!==d.model&&f.push("model_change"),JSON.stringify(u.system)!==JSON.stringify(d.system)&&f.push("system_change"),JSON.stringify(u.tools)!==JSON.stringify(d.tools)&&f.push("tools_change");const p=u.messages||[],g=d.messages||[];if(g.length<p.length)f.push("msg_truncated");else{const _=Math.min(p.length,g.length);let S=!0;for(let C=0;C<_;C++)if(JSON.stringify(p[C])!==JSON.stringify(g[C])){S=!1;break}S||f.push("msg_modified")}return f.length===0?{reason:"key_change"}:{reason:f[0],reasons:f}}function hf(e){return e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):""}function h4(e){return e.content?typeof e.content=="string"?e.content:Array.isArray(e.content)?e.content.filter(t=>t.type==="text").map(t=>t.text).join(`
341
- `):JSON.stringify(e.content):String(e.content??"")}const EF=[{match:/claude/i,name:"Claude",color:"#000000",svg:'<svg t="1771495509570" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1570" width="200" height="200"><path d="M198.4 678.4l198.4-115.2 6.4-12.8H243.2l-96-6.4-102.4-6.4-19.2-6.4-25.6-25.6v-12.8l19.2-12.8h32l64 6.4 96 6.4 70.4 6.4L384 512h19.2V492.8l-6.4-6.4-102.4-64-108.8-76.8-51.2-38.4-32-19.2-19.2-25.6-6.4-38.4 32-32h44.8l38.4 32 83.2 64L384 364.8l12.8 12.8 6.4-6.4-6.4-12.8L339.2 256l-64-108.8-25.6-38.4-6.4-25.6c0-12.8-6.4-19.2-6.4-32l32-44.8 19.2-6.4 44.8 6.4 19.2 12.8 25.6 57.6 44.8 96 64 128 19.2 38.4 6.4 38.4 6.4 12.8h6.4V384l6.4-70.4 12.8-89.6 12.8-115.2 6.4-32 19.2-38.4 32-19.2 25.6 12.8 19.2 32v19.2l-32 70.4-19.2 121.6-19.2 83.2h6.4l12.8-12.8 44.8-57.6 70.4-89.6 32-32 38.4-38.4 25.6-19.2h44.8l32 51.2-12.8 51.2-51.2 57.6-38.4 51.2-51.2 70.4-38.4 57.6v6.4h6.4l121.6-25.6 64-12.8 76.8-12.8 38.4 19.2 6.4 19.2-12.8 32-83.2 19.2-96 19.2-147.2 32 64 6.4h96l128 6.4 32 19.2 25.6 38.4-6.4 19.2-51.2 25.6-70.4-12.8-160-38.4-57.6-12.8h-6.4v6.4l44.8 44.8 83.2 76.8 108.8 102.4 6.4 25.6-12.8 19.2h-12.8l-96-70.4-38.4-32-83.2-70.4h-6.4v6.4l19.2 25.6 102.4 147.2 6.4 44.8-6.4 12.8-25.6 6.4-25.6-6.4-57.6-83.2-64-83.2-51.2-83.2-6.4 6.4-25.6 307.2-12.8 12.8-32 12.8-25.6-19.2-12.8-32 12.8-64 19.2-83.2 12.8-64 12.8-83.2 6.4-25.6h-6.4l-64 83.2-96 128-70.4 76.8-19.2 6.4-32-12.8v-25.6l19.2-25.6 102.4-128 64-83.2 38.4-51.2v-6.4l-268.8 172.8-51.2 12.8-19.2-19.2v-32l12.8-12.8 76.8-57.6z m0 0" fill="#D97757" p-id="1571"></path></svg>'},{match:/gpt|o1|o3|o4/i,name:"OpenAI",color:"#00000",svg:'<svg t="1771495569354" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2752" width="200" height="200"><path d="M565.265178 954.519092c-22.289934 0-48.400999-8.151747-67.952455-14.838727a103.425292 103.425292 0 0 1-26.875292-11.272338c-12.737105-7.769634-15.411897-8.342804-19.806198-24.773669 21.971506-5.158528 81.581157-41.905075 103.871091-55.342721 148.896757-89.159735 119.028246-10.444426 119.028246-364.981743 15.029784 3.566389 82.791182 32.415932 82.791182 57.316972 0 133.102747 20.570425 273.847757-52.604243 354.91943-22.799418 25.47421-91.834527 58.972796-138.388646 58.972796z m-433.061569-299.321966c258.626916 136.860193 184.369594 157.048504 357.721593 52.094759 44.579867-27.193719 90.433445-49.292596 132.593263-77.568969v101.896839c-95.528287 22.226248-272.319304 227.038896-419.050754 100.686815l-25.856323-25.155782c-37.319718-43.943012-45.344094-72.410442-45.344094-151.889977z m375.744596-19.105658c-19.933569-13.310275-79.479535-51.330533-101.896839-57.316972v-133.739602a1158.312326 1158.312326 0 0 0 101.896839-57.316973c43.943012 10.189684 70.690933 47.063603 114.633945 57.316973v127.371049c-17.831947 12.10025-95.846715 58.718054-114.633945 63.749211z m-426.693016-178.31947c0-63.685525-4.26693-90.306074 38.84817-145.776166 23.945757-30.88748 47.509402-39.612396 82.090641-57.953828v261.110652c44.134069 23.372588 83.873836 49.037854 129.345301 74.448379l131.765351 78.396881c-59.545966 15.921381-63.685525 61.32916-109.602788 33.753328-104.699003-62.730242-272.38299-129.345301-272.38299-243.91556z m866.123138 127.37105c0 79.543221-47.573087 161.188063-121.002497 178.31947v-165.582365c0-82.791182 9.743885-84.574377-48.910483-116.608196L565.265178 362.371082c15.79401-23.62733 22.608361-19.105657 48.146256-34.835982 41.714019-25.47421 39.039227-16.112438 117.053995 28.785857 94.190891 54.196382 216.849212 100.559444 216.849212 228.885777z m-541.326961-197.425127v-95.528287c43.751956-23.181531 90.688187-50.94842 133.357489-76.804743 82.154327-49.547338 95.528287-63.303412 185.006449-63.303412 48.464684 0 102.533695 36.746548 125.651541 65.405034 42.223503 52.22213 39.930824 92.662439 39.930824 151.125751-31.078536-16.494551-192.393971-121.002497-222.899337-121.002498s-229.650003 123.422547-261.110652 140.108155z m-50.94842 159.213812c-16.36718-10.95391-63.112355-39.99451-82.791183-44.579867 0-168.320842-33.880699-314.606493 67.952455-390.519639 56.043262-41.714019 113.169178-53.814269 181.376375-30.696423 25.47421 8.661231 35.536523 20.888852 56.36169 26.429493-11.781822 16.048752-80.68956 50.311565-102.278953 63.303412-154.564769 93.235608-120.620384 7.451206-120.620384 376.063024z m-292.953415 121.002498c0 169.148754 115.143429 280.853165 274.293556 273.847756 59.800708-2.674792 26.811606-7.705949 69.417222 25.47421 97.820966 76.741057 228.822091 73.747838 319.637649 1.018969a251.939936 251.939936 0 0 0 52.604244-55.661149c58.20857-85.274918-10.95391-45.598836 81.96327-83.619094 130.236898-53.241099 199.399378-217.358696 128.64476-355.428914-27.448461-53.559526-40.249252-28.849543-28.276373-104.699003 18.723544-118.582447-63.176041-230.032116-157.621674-269.771884-98.90362-41.586648-129.090559 12.737105-178.892639-37.574459A161.888604 161.888604 0 0 0 580.103905 28.913674C474.003821-27.766443 331.284559 1.528898 258.428319 93.681853c-81.326415 102.979494 9.489143 54.705866-92.407697 98.648878C15.149614 257.353652-33.251385 439.175825 41.579107 561.06992c56.807488 92.598753 20.570425 4.967471 20.570424 106.800625z" fill="#EFA474" p-id="2753"></path></svg>'},{match:/gemini/i,name:"Gemini",color:"#4285F4",svg:'<svg t="1771495622863" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4556" width="200" height="200"><path d="M960 512.896A477.248 477.248 0 0 0 512.896 960h-1.792A477.184 477.184 0 0 0 64 512.896v-1.792A477.184 477.184 0 0 0 511.104 64h1.792A477.248 477.248 0 0 0 960 511.104z" fill="#448AFF" p-id="4557"></path></svg>'},{match:/qwen/i,name:"Qwen",color:"#00000",svg:'<svg t="1771495640319" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5634" width="200" height="200"><path d="M537.782857 57.161143c16.749714 29.44 33.426286 58.953143 50.102857 88.502857a7.68 7.68 0 0 0 6.692572 3.913143h236.873143c7.424 0 13.750857 4.681143 19.017142 13.933714l62.061715 109.677714c8.082286 14.372571 10.24 20.370286 1.024 35.693715a2262.893714 2262.893714 0 0 0-32.438857 55.478857l-15.652572 28.086857c-4.534857 8.338286-9.508571 11.922286-1.718857 21.833143l113.152 197.851428c7.314286 12.8 4.754286 21.065143-1.828571 32.841143-18.651429 33.499429-37.632 66.742857-56.978286 99.84-6.765714 11.593143-14.994286 16.018286-29.001143 15.798857a1833.398857 1833.398857 0 0 0-99.291429 0.658286 4.242286 4.242286 0 0 0-3.437714 2.157714 24571.830857 24571.830857 0 0 1-115.419428 202.24c-7.204571 12.507429-16.201143 15.469714-30.939429 15.506286-42.532571 0.146286-85.430857 0.182857-128.731429 0.109714a22.930286 22.930286 0 0 1-19.821714-11.556571l-56.978286-99.108571a3.84 3.84 0 0 0-3.547428-2.121143h-218.331429a76.288 76.288 0 0 1-34.377143-3.913143l-68.388571-118.198857a23.149714 23.149714 0 0 1-0.073143-23.04l51.492572-90.441143a8.448 8.448 0 0 0 0-8.411429 23594.496 23594.496 0 0 1-80.018286-139.593143L47.542857 425.325714c-6.838857-13.202286-7.387429-21.138286 4.022857-41.179428 19.858286-34.669714 39.570286-69.302857 59.209143-103.936 5.632-9.984 12.946286-14.262857 24.905143-14.262857 36.827429-0.182857 73.654857-0.182857 110.445714-0.073143 1.901714 0 3.657143-1.024 4.571429-2.669715l119.734857-208.859428a20.845714 20.845714 0 0 1 17.993143-10.496c22.381714-0.036571 44.946286 0 67.547428-0.256l43.410286-0.987429c14.555429-0.109714 30.866286 1.389714 38.4 14.518857z m-146.432 17.188571a2.56 2.56 0 0 0-2.194286 1.28l-122.331428 213.942857a6.692571 6.692571 0 0 1-5.741714 3.364572H138.788571c-2.377143 0-2.962286 1.060571-1.755428 3.145143l247.917714 433.334857c1.060571 1.792 0.548571 2.633143-1.462857 2.669714l-119.222857 0.658286a9.289143 9.289143 0 0 0-8.557714 4.937143l-56.32 98.56c-1.865143 3.328-0.914286 5.046857 2.925714 5.046857l243.858286 0.365714c1.974857 0 3.401143 0.841143 4.425142 2.56l59.867429 104.704c1.974857 3.474286 3.913143 3.510857 5.924571 0l213.577143-373.76 33.426286-58.953143a2.340571 2.340571 0 0 1 4.096 0l60.745143 107.958857a5.193143 5.193143 0 0 0 4.571428 2.633143l117.906286-0.841143a1.718857 1.718857 0 0 0 1.462857-2.56l-123.721143-217.014857a4.608 4.608 0 0 1 0-4.827428l12.507429-21.613715 47.798857-84.370285c1.024-1.755429 0.512-2.633143-1.499428-2.633143H392.521143c-2.486857 0-3.108571-1.097143-1.828572-3.291429l61.184-106.861714a4.571429 4.571429 0 0 0 0-4.864l-58.258285-102.253714a2.56 2.56 0 0 0-2.267429-1.316572z m268.361143 342.198857c1.974857 0 2.486857 0.841143 1.462857 2.56l-35.474286 62.500572-111.542857 195.620571a2.377143 2.377143 0 0 1-2.121143 1.243429 2.486857 2.486857 0 0 1-2.121142-1.243429l-147.346286-257.353143c-0.841143-1.462857-0.402286-2.230857 1.206857-2.304l9.216-0.512 286.793143-0.512h-0.073143z" fill="#7D5DED" p-id="5635"></path></svg>'},{match:/kimi|moonshot/i,name:"Kimi",color:"#00000",svg:'<svg t="1771495664798" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6649" width="200" height="200"><path d="M731.062857 590.262857v318.317714h-148.589714V443.977143a146.285714 146.285714 0 0 1-146.285714 146.285714l-214.491429-0.036571v318.354285H73.142857V165.814857h148.553143v275.858286h180.882286l119.771428-275.858286h167.753143l-67.84 156.269714a255.524571 255.524571 0 0 1-106.678857 119.588572h66.925714a148.553143 148.553143 0 0 1 148.516572 148.589714z m120.758857-473.965714a99.035429 99.035429 0 0 1 0 198.070857h-99.035428V215.332571a99.035429 99.035429 0 0 1 99.035428-99.035428z" fill="#F4F4F4" p-id="6650"></path></svg>'},{match:/glm|chatglm/i,name:"GLM",color:"#00000",svg:'<svg data-name="glm" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 217.2 200"> <!-- Generator: Adobe Illustrator 29.8.2, SVG Export Plug-In . SVG Version: 2.1.1 Build 3) --> <defs> <style> .st0 { fill: #fff; } </style> </defs> <path class="st0" d="M86.8,190.4H0L131.3,4.8h85.8L86.8,190.4h0ZM212.8,190h-107.9l14.9-21.6c2.3-3.3,6-5.2,9.9-5.2h83.1v26.8h0ZM99.4,26.3c-2.3,3.3-6,5.2-9.9,5.2H6.4V4.8h107.9l-14.9,21.6Z"/> </svg>'},{match:/minimax|abab/i,name:"MiniMax",color:"#00000",svg:'<svg viewBox="0 0 24 24" fill="#fff"><path d="M4 8l4-4 4 4 4-4 4 4v8l-4 4-4-4-4 4-4-4z" fill="none" stroke="#fff" stroke-width="1.5" stroke-linejoin="round"/></svg>'},{match:/deepseek/i,name:"DeepSeek",color:"#00000",svg:'<svg t="1771495947541" class="icon" viewBox="0 0 1391 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11539" width="200" height="200"><path d="M1326.70201318 112.02090779c-12.94676356-6.47485468-18.53640721 5.86654827-26.0997327 12.13814316-2.57756953 2.02376031-4.77807747 4.65435413-6.9785854 7.08168819-18.91788751 20.63528526-41.02017805 34.19182812-69.92725218 32.57311444-42.23384508-2.42733405-78.29772513 11.12773591-110.16384908 44.10589703-6.77679853-40.66668282-29.28560862-64.94444203-63.55255448-80.52327231-17.95608583-8.09209545-36.06388005-16.1856638-48.63358202-33.78825438-8.74900746-12.5431898-11.12773591-26.50330641-15.52727888-40.26016327-2.7823022-8.29535522-5.56460442-16.79249731-14.92044538-18.20942411-10.19244639-1.61871367-14.16337637 7.08168818-18.15934561 14.36516325-15.93232553 29.74073376-22.12880269 62.51710799-21.49692994 95.69705596 1.36684831 74.65672404 32.27117059 134.13819156 93.62469006 176.42358804 6.9800583 4.8546681 8.77551959 9.71080912 6.57501165 16.79102439-4.17271686 14.56695011-9.18056624 28.7303265-13.55506995 43.29727663-2.78377509 9.30723537-6.95501906 11.32952278-16.74241882 7.28347507-33.66158524-14.36516325-62.745407-35.60875491-88.46513227-61.30196806-43.62425973-43.09548975-83.0772755-90.64060097-132.26613965-127.86659667a581.67054343 581.67054343 0 0 0-35.07703915-24.48101901c-50.20074429-49.77065841 6.57501167-90.63912807 19.72650789-95.49526908 13.73181759-5.05792788 4.77955037-22.4572587-39.65480265-22.25547181s-85.07599655 15.3770434-136.87041526 35.60875491c-7.58541892 3.03416756-15.55379103 5.25971475-23.69596499 7.08168819-47.03990759-9.10544849-95.84876434-11.12773591-146.8596019-5.26118765-96.02551195 10.92594905-172.73103555 57.25739323-229.12678412 136.36373875-67.72674425 95.09022244-83.68558192 203.13015422-64.13582165 315.82149435 20.48504978 118.76262107 79.88992666 217.09027084 171.13736114 293.97106918 94.6350973 79.71317902 203.61031862 118.76262107 327.93607117 111.27735913 75.51542292-4.45256725 159.57953934-14.77020989 254.41642354-96.71040901 23.92426399 12.13961607 49.03715574 16.99575708 90.66564019 20.63675815 32.09295007 3.03416756 62.97223311-1.61871367 86.87145788-6.67664152 37.45429471-8.09209545 34.84874013-43.49906349 21.31870939-49.97244528-109.7838417-52.19946535-85.68283009-30.95587367-107.58333373-48.15194474 55.78891504-67.37324899 139.85303146-137.3770918 172.73103555-364.17669887 2.60408167-18.00616433 0.40357375-29.33568711 0-43.90263724-0.20325977-8.90218873 1.76894914-12.34287584 11.75960867-13.35328309 27.49014733-3.23742733 54.19671351-10.92594905 78.70277179-24.68280588 71.11440706-39.65480265 99.81822142-104.80250446 106.59649284-182.89844271 1.01188015-11.9363563-0.20178686-24.27775924-12.56970195-30.54935413M706.87018452 814.87993343c-106.36966673-85.37941333-157.98733782-113.5014334-179.30604722-112.28776638-19.92829476 1.21366703-16.33737217 24.48101902-11.96286844 39.65480264 4.5777635 14.97199677 10.57098089 25.2896394 18.94145384 38.44113563 5.76786417 8.70040186 9.76383341 21.64863831-5.78995762 31.35944742-34.26841876 21.64863831-93.82647692-7.28347506-96.60730623-8.69892897-69.3454579-41.67856295-127.33635378-96.710409-168.1797842-171.97249368-39.45154288-72.43117687-62.33888747-150.1220685-66.13306983-233.07267483-1.01188015-20.02992464 4.77955037-27.11161282 24.27923214-30.75408682a235.19659216 235.19659216 0 0 1 77.91771774-2.02228741c108.59668681 16.18713669 201.05631542 65.75453531 278.54394728 144.25552022 44.23256614 44.71125762 77.69089163 98.12439001 112.1861365 150.32385536 36.64567431 55.43394691 76.0986901 108.24024576 126.29943438 151.53604947 17.72778682 15.17378365 31.86465106 26.7065662 45.41972102 35.20370829-40.84343042 4.65435413-108.99878765 5.66476139-155.60860936-31.96628094m51.00936468-334.83953883c0-8.90218873 6.9815312-15.98387693 15.75557791-15.98387693q2.98408908 0.05155138 5.36134463 1.01188017a15.85720779 15.85720779 0 0 1 10.16740714 14.97199676 15.78061715 15.78061715 0 0 1-15.73053865 15.98387691 15.60386953 15.60386953 0 0 1-15.55379103-15.98387691m158.39238446 82.95060635c-10.1423679 4.24930749-20.30830215 7.89178146-30.09570191 8.29535522-15.12370514 0.81009328-31.66286419-5.46150162-40.61513142-13.15002332-13.96011661-11.93782919-23.92573689-18.61447073-28.09845373-39.45301577-1.79546129-8.90218873-0.81009328-22.65904557 0.78505403-30.54935414 3.59092258-16.99575708-0.40504665-27.92023321-12.13961606-37.8343021-9.55910075-8.09356835-21.72522894-10.31911553-35.07703915-10.31911552-4.98281013 0-9.55910075-2.22407429-12.94823645-4.04604774a13.27669246 13.27669246 0 0 1-5.76639128-18.61299783c1.39041466-2.8323807 8.16868608-9.71228202 9.7623605-10.92594905 18.13136058-10.52090241 39.04649623-7.08021529 58.36795748 0.81009328 17.93104659 7.48526194 31.46107731 21.24359167 51.01083757 40.6666828 19.92829476 23.46913885 23.51921733 29.94399353 34.84874013 47.54511123 8.97877936 13.75685685 17.14746545 27.92023321 22.71206987 44.10442409 3.41270206 10.11732865-0.98684091 18.41121097-12.74644958 23.46913885" fill="#4D6BFE" p-id="11540"></path></svg>'}];function kF(e){if(!e)return null;for(const t of EF)if(t.match.test(e))return{name:e.replace(/^claude-/,"").replace(/-\d{8,}$/,""),provider:t.name,color:t.color,svg:t.svg};return{name:e,provider:e,color:"#065f46",svg:Pl("agent")}}function Pl(e){return e==="user"?'<svg viewBox="0 0 24 24"><path d="M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z"/></svg>':e==="agent"?'<svg viewBox="0 0 24 24"><path d="M12 2a2 2 0 012 2c0 .74-.4 1.39-1 1.73V7h1a7 7 0 017 7h1a1 1 0 011 1v3a1 1 0 01-1 1h-1.17A7 7 0 0113 22h-2a7 7 0 01-6.83-3H3a1 1 0 01-1-1v-3a1 1 0 011-1h1a7 7 0 017-7h1V5.73c-.6-.34-1-.99-1-1.73a2 2 0 012-2zM9.5 13a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm5 0a1.5 1.5 0 100 3 1.5 1.5 0 000-3z"/></svg>':'<svg viewBox="0 0 24 24"><path d="M12 15.5A3.5 3.5 0 018.5 12 3.5 3.5 0 0112 8.5a3.5 3.5 0 013.5 3.5 3.5 3.5 0 01-3.5 3.5m7.43-2.53c.04-.32.07-.64.07-.97s-.03-.66-.07-1l2.11-1.63c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.49.49 0 0014 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64L4.57 11c-.04.34-.07.67-.07 1s.03.65.07.97l-2.11 1.66c-.19.15-.25.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1.01c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.58 1.69-.98l2.49 1.01c.22.08.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.66z"/></svg>'}function cr(e){return e==null||e===0?"0":e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":String(e)}function ka(e){if(Array.isArray(e))return e.map(ka);if(e&&typeof e=="object"){const t={};for(const n of Object.keys(e))n.startsWith("_")||(t[n]=ka(e[n]));return t}return e}function $F(e){var n,r,i;const t={};for(const o of e){const a=(r=(n=o.response)==null?void 0:n.body)==null?void 0:r.usage;if(!a)continue;const c=((i=o.body)==null?void 0:i.model)||"unknown";t[c]||(t[c]={input:0,output:0,cacheCreation:0,cacheRead:0});const u=t[c];u.input+=a.input_tokens||0,u.output+=a.output_tokens||0,u.cacheCreation+=a.cache_creation_input_tokens||0,u.cacheRead+=a.cache_read_input_tokens||0}return t}function RF(e){var n,r,i;const t={ttl:{count:0,cacheCreate:0},system_change:{count:0,cacheCreate:0},tools_change:{count:0,cacheCreate:0},model_change:{count:0,cacheCreate:0},msg_truncated:{count:0,cacheCreate:0},msg_modified:{count:0,cacheCreate:0},key_change:{count:0,cacheCreate:0}};for(let o=0;o<e.length;o++){const a=d4(e,o);if(!a)continue;const c=((i=(r=(n=e[o].response)==null?void 0:n.body)==null?void 0:r.usage)==null?void 0:i.cache_creation_input_tokens)||0,u=a.reasons||[a.reason];for(const d of u)t[d]&&(t[d].count++,t[d].cacheCreate+=c)}return t}function TF(e){var n,r;const t={};for(const i of e){const o=(r=(n=i.response)==null?void 0:n.body)==null?void 0:r.content;if(Array.isArray(o))for(const a of o)a.type==="tool_use"&&a.name&&(t[a.name]=(t[a.name]||0)+1)}return Object.entries(t).sort((i,o)=>o[1]-i[1])}function PF(e){var n;const t={};for(const r of e){const i=(n=r.body)==null?void 0:n.messages;if(Array.isArray(i))for(const o of i){if(o.role!=="user")continue;const a=o.content;if(Array.isArray(a))for(const c of a){if(c.type!=="text"||!h0(c.text))continue;const u=c.text.match(/^#\s+(.+)$/m),d=u?u[1]:"Skill";t[d]=(t[d]||0)+1}}}return Object.entries(t).sort((r,i)=>i[1]-r[1])}function ff(e){return typeof e!="string"?!1:e.includes("<system-reminder>")&&e.includes("# claudeMd")}function mf(e){return typeof e!="string"?!1:e.includes("<system-reminder>")&&e.includes("skills are available")}function OF(e){const t=e==null?void 0:e.messages;if(!Array.isArray(t))return!1;for(const n of t){const r=n==null?void 0:n.content;if(typeof r=="string"){if(ff(r))return!0}else if(Array.isArray(r)){for(const i of r)if(i.type==="text"&&ff(i.text))return!0}}return!1}function IF(e){const t=e==null?void 0:e.messages;if(!Array.isArray(t))return!1;for(const n of t){const r=n==null?void 0:n.content;if(typeof r=="string"){if(mf(r))return!0}else if(Array.isArray(r)){for(const i of r)if(i.type==="text"&&mf(i.text))return!0}}return!1}function NF(e){return e?e.replace(/^claude-/,"").replace(/-\d{8,}$/,""):null}function MF(e){const t=(e==null?void 0:e.url)||"";return!(e.isHeartbeat||e.isCountTokens||/\/api\/eval\/sdk-/.test(t)||/\/messages\/count_tokens/.test(t))}function ls(e){return e.filter(MF)}function ew(e,t){for(let n=t-1;n>=0;n--)if(Vr(e[n])&&e[n].timestamp)return e[n].timestamp;return null}function ab(e){const t=e==null?void 0:e.content;if(typeof t=="string")return t;if(Array.isArray(t)){for(const n of t)if((n==null?void 0:n.type)==="text"&&n.text)return n.text}return""}function zF(e){const t=e.body||{},n=df(t);if(/Extract any file paths/i.test(n)||/process Bash commands/i.test(n)||/command execution specialist/i.test(n))return"Bash";if(/file search specialist/i.test(n))return"Search";if(/planning specialist/i.test(n))return"Plan";if(/general-purpose agent/i.test(n))return"General";const r=t.messages||[];for(let i=r.length-1;i>=0;i--){if(r[i].role!=="user")continue;const o=ab(r[i]);if(/^Command:/m.test(o))return"Bash";break}return null}function jF(e){var r;const t=(r=e.body)==null?void 0:r.messages;if(!Array.isArray(t)||t.length!==1)return!1;const n=t[0];return n.role==="user"&&n.content==="count"}function BF(e,t){var u;const n=e.body||{},r=n.tools,i=n.messages||[];if(Array.isArray(r)&&r.length>0||i.length!==1||i[0].role!=="user")return!1;const o=ab(i[0]);if(!o||o.trim()==="count")return!1;const a=o.trim();if(/^Command:/m.test(o)||/^<policy_spec>/i.test(a)||/^<task-notification>/i.test(a))return!1;const c=df(n);if(!c.includes("Claude Code")||/process Bash commands/i.test(c)||/Extract any file paths/i.test(c))return!1;if(t){const d=((u=t.body)==null?void 0:u.messages)||[],f=o.slice(0,80);if(d.some(g=>{const v=g==null?void 0:g.content;return typeof v=="string"?v.includes(f):Array.isArray(v)?v.some(b=>(b==null?void 0:b.type)==="text"&&b.text&&b.text.includes(f)):!1}))return!0}return!1}function Ia(e,t){var r;if(Vr(e))return{type:"MainAgent",subType:null};if(e.isCountTokens||jF(e))return{type:"Count",subType:null};if(BF(e,t)){const i=ab((((r=e.body)==null?void 0:r.messages)||[])[0]);return/^Implement the following plan:/i.test(i.trim())?{type:"Plan",subType:"Prompt"}:{type:"Preflight",subType:null}}return{type:"SubAgent",subType:zF(e)}}function pf(e,t){return e==="Plan"&&t?`Plan:${t}`:e==="SubAgent"&&t?`SubAgent:${t}`:e}const LF={"ui.guide.title":{zh:"欢迎使用 CC Viewer",en:"Welcome to CC Viewer","zh-TW":"歡迎使用 CC Viewer",ko:"CC Viewer에 오신 것을 환영합니다",ja:"CC Viewer へようこそ",de:"Willkommen bei CC Viewer",es:"Bienvenido a CC Viewer",fr:"Bienvenue sur CC Viewer",it:"Benvenuto in CC Viewer",da:"Velkommen til CC Viewer",pl:"Witamy w CC Viewer",ru:"Добро пожаловать в CC Viewer",ar:"مرحبًا بك في CC Viewer",no:"Velkommen til CC Viewer","pt-BR":"Bem-vindo ao CC Viewer",th:"ยินดีต้อนรับสู่ CC Viewer",tr:"CC Viewer'a hoş geldiniz",uk:"Ласкаво просимо до CC Viewer"},"ui.guide.step1":{zh:"你可以先尝试在 Claude 中发起一轮对话。不知道说什么?可以问问:",en:"Try starting a conversation in Claude. Not sure what to say? Try asking:","zh-TW":"你可以先嘗試在 Claude 中發起一輪對話。不知道說什麼?可以問問:",ko:"Claude에서 대화를 시작해 보세요. 무슨 말을 해야 할지 모르겠다면:",ja:"まず Claude で会話を始めてみましょう。何を言えばいいかわからない場合:",de:"Starten Sie ein Gespräch in Claude. Nicht sicher, was Sie sagen sollen? Fragen Sie:",es:"Intenta iniciar una conversación en Claude. ¿No sabes qué decir? Prueba preguntar:",fr:"Essayez de lancer une conversation dans Claude. Vous ne savez pas quoi dire ? Demandez :",it:"Prova ad avviare una conversazione in Claude. Non sai cosa dire? Prova a chiedere:",da:"Prøv at starte en samtale i Claude. Ikke sikker på hvad du skal sige? Prøv at spørge:",pl:"Spróbuj rozpocząć rozmowę w Claude. Nie wiesz co powiedzieć? Zapytaj:",ru:"Попробуйте начать разговор в Claude. Не знаете, что сказать? Спросите:",ar:"جرّب بدء محادثة في Claude. لا تعرف ماذا تقول؟ جرّب أن تسأل:",no:"Prøv å starte en samtale i Claude. Usikker på hva du skal si? Prøv å spørre:","pt-BR":"Tente iniciar uma conversa no Claude. Não sabe o que dizer? Pergunte:",th:"ลองเริ่มบทสนทนาใน Claude ไม่รู้จะพูดอะไร? ลองถามว่า:",tr:"Claude'da bir sohbet başlatmayı deneyin. Ne söyleyeceğinizi bilmiyor musunuz? Şunu sorun:",uk:"Спробуйте розпочати розмову в Claude. Не знаєте, що сказати? Запитайте:"},"ui.guide.exampleQuestion":{zh:"看看我现在有多少 skill",en:"How many skills do I have right now?","zh-TW":"看看我現在有多少 skill",ko:"지금 내가 가진 skill이 몇 개인지 확인해줘",ja:"今いくつの skill があるか見てみて",de:"Wie viele Skills habe ich gerade?",es:"¿Cuántos skills tengo ahora mismo?",fr:"Combien de skills ai-je en ce moment ?",it:"Quanti skill ho in questo momento?",da:"Hvor mange skills har jeg lige nu?",pl:"Ile mam teraz skills?",ru:"Сколько у меня сейчас skills?",ar:"كم عدد الـ skills لديّ الآن؟",no:"Hvor mange skills har jeg nå?","pt-BR":"Quantos skills eu tenho agora?",th:"ตอนนี้ฉันมีกี่ skill?",tr:"Şu anda kaç tane skill'im var?",uk:"Скільки у мене зараз skills?"},"ui.guide.step2":{zh:"你能看到这段文字,说明服务已经启动。如果 Claude 有响应但这里没有变化,可以让 Claude 帮你排查:",en:"If you can see this, the service is running. If Claude responds but nothing shows here, ask Claude to help troubleshoot:","zh-TW":"你能看到這段文字,說明服務已經啟動。如果 Claude 有回應但這裡沒有變化,可以讓 Claude 幫你排查:",ko:"이 텍스트가 보이면 서비스가 실행 중입니다. Claude가 응답하지만 여기에 변화가 없다면 Claude에게 문제 해결을 요청하세요:",ja:"このテキストが見えていればサービスは起動しています。Claude が応答しているのにここに変化がない場合、Claude にトラブルシューティングを依頼してください:",de:"Wenn Sie diesen Text sehen, läuft der Dienst. Wenn Claude antwortet, aber hier nichts angezeigt wird, bitten Sie Claude um Hilfe:",es:"Si puedes ver este texto, el servicio está funcionando. Si Claude responde pero aquí no cambia nada, pide a Claude que te ayude:",fr:"Si vous voyez ce texte, le service fonctionne. Si Claude répond mais rien ne s'affiche ici, demandez à Claude de vous aider :",it:"Se puoi vedere questo testo, il servizio è in esecuzione. Se Claude risponde ma qui non cambia nulla, chiedi a Claude di aiutarti:",da:"Hvis du kan se denne tekst, kører tjenesten. Hvis Claude svarer, men intet vises her, bed Claude om hjælp:",pl:"Jeśli widzisz ten tekst, usługa działa. Jeśli Claude odpowiada, ale tutaj nic się nie zmienia, poproś Claude o pomoc:",ru:"Если вы видите этот текст, сервис запущен. Если Claude отвечает, но здесь ничего не меняется, попросите Claude помочь:",ar:"إذا كنت ترى هذا النص، فالخدمة تعمل. إذا كان Claude يستجيب ولكن لا شيء يظهر هنا، اطلب من Claude المساعدة:",no:"Hvis du kan se denne teksten, kjører tjenesten. Hvis Claude svarer men ingenting vises her, be Claude om hjelp:","pt-BR":"Se você pode ver este texto, o serviço está rodando. Se o Claude responde mas nada aparece aqui, peça ao Claude para ajudar:",th:"ถ้าคุณเห็นข้อความนี้ แสดงว่าบริการกำลังทำงาน หาก Claude ตอบกลับแต่ที่นี่ไม่มีการเปลี่ยนแปลง ให้ขอให้ Claude ช่วยแก้ไข:",tr:"Bu metni görebiliyorsanız, hizmet çalışıyor. Claude yanıt veriyor ama burada bir değişiklik olmuyorsa, Claude'dan yardım isteyin:",uk:"Якщо ви бачите цей текст, сервіс працює. Якщо Claude відповідає, але тут нічого не змінюється, попросіть Claude допомогти:"},"ui.guide.troubleshootCmd":{zh:"我已经启动了 cc-viewer,但是无法看到 cc-viewer 的请求,检查 npm 包中 cc-viewer 的实现,检查问题,并修复",en:"I've started cc-viewer but can't see any requests. Check the cc-viewer npm package implementation, find the issue, and fix it","zh-TW":"我已經啟動了 cc-viewer,但是無法看到 cc-viewer 的請求,檢查 npm 包中 cc-viewer 的實現,檢查問題,並修復",ko:"cc-viewer를 시작했지만 요청을 볼 수 없습니다. cc-viewer npm 패키지 구현을 확인하고 문제를 찾아 수정해 주세요",ja:"cc-viewer を起動しましたがリクエストが表示されません。cc-viewer npm パッケージの実装を確認し、問題を見つけて修正してください",de:"Ich habe cc-viewer gestartet, kann aber keine Anfragen sehen. Überprüfen Sie die cc-viewer npm-Paket-Implementierung, finden Sie das Problem und beheben Sie es",es:"He iniciado cc-viewer pero no puedo ver las solicitudes. Revisa la implementación del paquete npm cc-viewer, encuentra el problema y corrígelo",fr:"J'ai démarré cc-viewer mais je ne vois aucune requête. Vérifiez l'implémentation du package npm cc-viewer, trouvez le problème et corrigez-le",it:"Ho avviato cc-viewer ma non riesco a vedere le richieste. Controlla l'implementazione del pacchetto npm cc-viewer, trova il problema e risolvilo",da:"Jeg har startet cc-viewer, men kan ikke se nogen forespørgsler. Tjek cc-viewer npm-pakkens implementering, find problemet og ret det",pl:"Uruchomiłem cc-viewer, ale nie widzę żadnych żądań. Sprawdź implementację pakietu npm cc-viewer, znajdź problem i napraw go",ru:"Я запустил cc-viewer, но не вижу запросов. Проверьте реализацию npm-пакета cc-viewer, найдите проблему и исправьте её",ar:"لقد قمت بتشغيل cc-viewer ولكن لا أستطيع رؤية أي طلبات. تحقق من تنفيذ حزمة npm الخاصة بـ cc-viewer، وابحث عن المشكلة وأصلحها",no:"Jeg har startet cc-viewer, men kan ikke se noen forespørsler. Sjekk cc-viewer npm-pakkens implementering, finn problemet og fiks det","pt-BR":"Iniciei o cc-viewer mas não consigo ver as requisições. Verifique a implementação do pacote npm cc-viewer, encontre o problema e corrija",th:"ฉันเริ่ม cc-viewer แล้วแต่ไม่เห็นคำขอใดๆ ตรวจสอบการใช้งานแพ็กเกจ npm ของ cc-viewer หาปัญหาและแก้ไข",tr:"cc-viewer'ı başlattım ama istekleri göremiyorum. cc-viewer npm paketinin uygulamasını kontrol edin, sorunu bulun ve düzeltin",uk:"Я запустив cc-viewer, але не бачу жодних запитів. Перевірте реалізацію npm-пакету cc-viewer, знайдіть проблему та виправте її"},"ui.guide.step3":{zh:"在极端情况下,native 版本的 Claude 无法拦截。你可以尝试切回 npm 版本:",en:"In extreme cases, the native version of Claude cannot be intercepted. You can try switching back to the npm version:","zh-TW":"在極端情況下,native 版本的 Claude 無法攔截。你可以嘗試切回 npm 版本:",ko:"극단적인 경우 native 버전의 Claude는 가로챌 수 없습니다. npm 버전으로 전환해 보세요:",ja:"極端な場合、ネイティブ版の Claude はインターセプトできません。npm 版に切り替えてみてください:",de:"In extremen Fällen kann die native Version von Claude nicht abgefangen werden. Versuchen Sie, zur npm-Version zu wechseln:",es:"En casos extremos, la versión nativa de Claude no puede ser interceptada. Puedes intentar volver a la versión npm:",fr:"Dans les cas extrêmes, la version native de Claude ne peut pas être interceptée. Essayez de revenir à la version npm :",it:"In casi estremi, la versione nativa di Claude non può essere intercettata. Puoi provare a tornare alla versione npm:",da:"I ekstreme tilfælde kan den native version af Claude ikke opsnappes. Du kan prøve at skifte tilbage til npm-versionen:",pl:"W skrajnych przypadkach natywna wersja Claude nie może być przechwycona. Możesz spróbować przełączyć się na wersję npm:",ru:"В крайних случаях нативная версия Claude не может быть перехвачена. Попробуйте переключиться на npm-версию:",ar:"في الحالات القصوى، لا يمكن اعتراض النسخة الأصلية من Claude. يمكنك محاولة العودة إلى نسخة npm:",no:"I ekstreme tilfeller kan den native versjonen av Claude ikke fanges opp. Du kan prøve å bytte tilbake til npm-versjonen:","pt-BR":"Em casos extremos, a versão nativa do Claude não pode ser interceptada. Você pode tentar voltar para a versão npm:",th:"ในกรณีสุดขีด เวอร์ชัน native ของ Claude ไม่สามารถดักจับได้ คุณสามารถลองเปลี่ยนกลับไปใช้เวอร์ชัน npm:",tr:"Aşırı durumlarda, Claude'un native sürümü yakalanamaz. npm sürümüne geri dönmeyi deneyebilirsiniz:",uk:"У крайніх випадках нативну версію Claude неможливо перехопити. Спробуйте переключитися на npm-версію:"},"cli.alreadyWorking":{zh:"CC Viewer 已经能工作了",en:"CC Viewer is already working","zh-TW":"CC Viewer 已經能工作了",ko:"CC Viewer가 이미 작동 중입니다",ja:"CC Viewer は既に動作しています",de:"CC Viewer funktioniert bereits",es:"CC Viewer ya está funcionando",fr:"CC Viewer fonctionne déjà",it:"CC Viewer è già funzionante",da:"CC Viewer fungerer allerede",pl:"CC Viewer już działa",ru:"CC Viewer уже работает",ar:"CC Viewer يعمل بالفعل",no:"CC Viewer fungerer allerede","pt-BR":"CC Viewer já está funcionando",th:"CC Viewer ทำงานอยู่แล้ว",tr:"CC Viewer zaten çalışıyor",uk:"CC Viewer вже працює"},"cli.inject.success":{zh:"CC Viewer 安装成功",en:"CC Viewer installed successfully","zh-TW":"CC Viewer 安裝成功",ko:"CC Viewer 설치 성공",ja:"CC Viewer インストール成功",de:"CC Viewer erfolgreich installiert",es:"CC Viewer instalado correctamente",fr:"CC Viewer installé avec succès",it:"CC Viewer installato con successo",da:"CC Viewer installeret",pl:"CC Viewer zainstalowany pomyślnie",ru:"CC Viewer успешно установлен",ar:"تم تثبيت CC Viewer بنجاح",no:"CC Viewer installert","pt-BR":"CC Viewer instalado com sucesso",th:"ติดตั้ง CC Viewer สำเร็จ",tr:"CC Viewer başarıyla kuruldu",uk:"CC Viewer успішно встановлено"},"cli.inject.exists":{zh:"CC Viewer 已安装,无需重复操作",en:"CC Viewer already installed, no action needed","zh-TW":"CC Viewer 已安裝,無需重複操作",ko:"CC Viewer 이미 설치됨, 추가 작업 불필요",ja:"CC Viewer は既にインストール済み、操作不要",de:"CC Viewer bereits installiert, keine Aktion nötig",es:"CC Viewer ya instalado, no se requiere acción",fr:"CC Viewer déjà installé, aucune action nécessaire",it:"CC Viewer già installato, nessuna azione necessaria",da:"CC Viewer allerede installeret, ingen handling nødvendig",pl:"CC Viewer już zainstalowany, nie wymaga działania",ru:"CC Viewer уже установлен, действий не требуется",ar:"CC Viewer مثبت بالفعل، لا حاجة لأي إجراء",no:"CC Viewer allerede installert, ingen handling nødvendig","pt-BR":"CC Viewer já instalado, nenhuma ação necessária",th:"CC Viewer ติดตั้งแล้ว ไม่ต้องดำเนินการ",tr:"CC Viewer zaten kurulu, işlem gerekmiyor",uk:"CC Viewer вже встановлено, дій не потрібно"},"cli.inject.fail":{zh:"❌ 安装失败: {error}",en:"❌ Installation failed: {error}","zh-TW":"❌ 安裝失敗: {error}",ko:"❌ 설치 실패: {error}",ja:"❌ インストール失敗: {error}",de:"❌ Installation fehlgeschlagen: {error}",es:"❌ Instalación fallida: {error}",fr:"❌ Échec de l'installation : {error}",it:"❌ Installazione fallita: {error}",da:"❌ Installation mislykkedes: {error}",pl:"❌ Instalacja nie powiodła się: {error}",ru:"❌ Ошибка установки: {error}",ar:"❌ فشل التثبيت: {error}",no:"❌ Installasjon mislyktes: {error}","pt-BR":"❌ Falha na instalação: {error}",th:"❌ ติดตั้งล้มเหลว: {error}",tr:"❌ Kurulum başarısız: {error}",uk:"❌ Помилка встановлення: {error}"},"cli.inject.notFound":{zh:"❌ 找不到 Claude Code cli.js: {path}",en:"❌ Claude Code cli.js not found: {path}","zh-TW":"❌ 找不到 Claude Code cli.js: {path}",ko:"❌ Claude Code cli.js를 찾을 수 없음: {path}",ja:"❌ Claude Code cli.js が見つかりません: {path}",de:"❌ Claude Code cli.js nicht gefunden: {path}",es:"❌ Claude Code cli.js no encontrado: {path}",fr:"❌ Claude Code cli.js introuvable : {path}",it:"❌ Claude Code cli.js non trovato: {path}",da:"❌ Claude Code cli.js ikke fundet: {path}",pl:"❌ Nie znaleziono Claude Code cli.js: {path}",ru:"❌ Claude Code cli.js не найден: {path}",ar:"❌ لم يتم العثور على Claude Code cli.js: {path}",no:"❌ Claude Code cli.js ikke funnet: {path}","pt-BR":"❌ Claude Code cli.js não encontrado: {path}",th:"❌ ไม่พบ Claude Code cli.js: {path}",tr:"❌ Claude Code cli.js bulunamadı: {path}",uk:"❌ Claude Code cli.js не знайдено: {path}"},"cli.inject.notFoundHint":{zh:" 请确认 @anthropic-ai/claude-code 已安装",en:" Please make sure @anthropic-ai/claude-code is installed","zh-TW":" 請確認 @anthropic-ai/claude-code 已安裝",ko:" @anthropic-ai/claude-code가 설치되어 있는지 확인하세요",ja:" @anthropic-ai/claude-code がインストールされていることを確認してください",de:" Bitte stellen Sie sicher, dass @anthropic-ai/claude-code installiert ist",es:" Asegúrese de que @anthropic-ai/claude-code esté instalado",fr:" Veuillez vérifier que @anthropic-ai/claude-code est installé",it:" Assicurati che @anthropic-ai/claude-code sia installato",da:" Sørg for at @anthropic-ai/claude-code er installeret",pl:" Upewnij się, że @anthropic-ai/claude-code jest zainstalowany",ru:" Убедитесь, что @anthropic-ai/claude-code установлен",ar:" يرجى التأكد من تثبيت @anthropic-ai/claude-code",no:" Sørg for at @anthropic-ai/claude-code er installert","pt-BR":" Certifique-se de que @anthropic-ai/claude-code está instalado",th:" กรุณาตรวจสอบว่า @anthropic-ai/claude-code ถูกติดตั้งแล้ว",tr:" @anthropic-ai/claude-code'un kurulu olduğundan emin olun",uk:" Переконайтеся, що @anthropic-ai/claude-code встановлено"},"cli.hook.exists":{zh:"自动修复 hook 已存在于 {path}",en:"Auto-repair hook already exists in {path}","zh-TW":"自動修復 hook 已存在於 {path}",ko:"자동 복구 hook이 이미 {path}에 존재함",ja:"自動修復 hook は既に {path} に存在します",de:"Auto-Reparatur-Hook existiert bereits in {path}",es:"Hook de auto-reparación ya existe en {path}",fr:"Hook de réparation auto déjà présent dans {path}",it:"Hook di auto-riparazione già presente in {path}",da:"Auto-reparations-hook findes allerede i {path}",pl:"Hook auto-naprawy już istnieje w {path}",ru:"Hook автовосстановления уже существует в {path}",ar:"hook الإصلاح التلقائي موجود بالفعل في {path}",no:"Auto-reparasjons-hook finnes allerede i {path}","pt-BR":"Hook de auto-reparo já existe em {path}",th:"hook ซ่อมอัตโนมัติมีอยู่แล้วใน {path}",tr:"Otomatik onarım hook'u zaten {path} dosyasında mevcut",uk:"Hook автовідновлення вже існує в {path}"},"cli.hook.fail":{zh:"⚠️ shell hook 写入失败: {error}",en:"⚠️ Failed to write shell hook: {error}","zh-TW":"⚠️ shell hook 寫入失敗: {error}",ko:"⚠️ shell hook 작성 실패: {error}",ja:"⚠️ shell hook の書き込みに失敗: {error}",de:"⚠️ Shell-Hook konnte nicht geschrieben werden: {error}",es:"⚠️ Error al escribir el shell hook: {error}",fr:"⚠️ Échec de l'écriture du shell hook : {error}",it:"⚠️ Impossibile scrivere il shell hook: {error}",da:"⚠️ Kunne ikke skrive shell hook: {error}",pl:"⚠️ Nie udało się zapisać shell hook: {error}",ru:"⚠️ Не удалось записать shell hook: {error}",ar:"⚠️ فشل كتابة shell hook: {error}",no:"⚠️ Kunne ikke skrive shell hook: {error}","pt-BR":"⚠️ Falha ao escrever shell hook: {error}",th:"⚠️ เขียน shell hook ล้มเหลว: {error}",tr:"⚠️ Shell hook yazılamadı: {error}",uk:"⚠️ Не вдалося записати shell hook: {error}"},"cli.usage.hint":{zh:`
342
- 如需卸载,请运行: ccv --uninstall`,en:`
343
- To uninstall, run: ccv --uninstall`,"zh-TW":`
344
- 如需卸載,請執行: ccv --uninstall`,ko:`
345
- 제거하려면 실행: ccv --uninstall`,ja:`
346
- アンインストールするには: ccv --uninstall`,de:`
347
- Zum Deinstallieren: ccv --uninstall`,es:`
348
- Para desinstalar, ejecute: ccv --uninstall`,fr:`
349
- Pour désinstaller, exécutez : ccv --uninstall`,it:`
350
- Per disinstallare, esegui: ccv --uninstall`,da:`
351
- For at afinstallere, kør: ccv --uninstall`,pl:`
352
- Aby odinstalować, uruchom: ccv --uninstall`,ru:`
353
- Для удаления выполните: ccv --uninstall`,ar:`
354
- لإلغاء التثبيت، قم بتشغيل: ccv --uninstall`,no:`
355
- For å avinstallere, kjør: ccv --uninstall`,"pt-BR":`
356
- Para desinstalar, execute: ccv --uninstall`,th:`
357
- หากต้องการถอนการติดตั้ง ให้เรียกใช้: ccv --uninstall`,tr:`
358
- Kaldırmak için çalıştırın: ccv --uninstall`,uk:`
359
- Для видалення виконайте: ccv --uninstall`},"cli.help":{zh:`CC Viewer CLI
360
-
361
- 用法:
362
- ccv [options]
363
- ccv run -- <command> [args...]
364
-
365
- 选项:
366
- -h, --help 显示帮助
367
- -v, --version 显示版本
368
- --uninstall 移除 CC Viewer 集成
369
-
370
- 说明:
371
- 直接运行 ccv 将安装/修复 Claude Code 的集成 Hook。`,en:`CC Viewer CLI
372
-
373
- Usage:
374
- ccv [options]
375
- ccv run -- <command> [args...]
376
-
377
- Options:
378
- -h, --help Show help
379
- -v, --version Show version
380
- --uninstall Remove CC Viewer integration
381
-
382
- Notes:
383
- Running ccv without arguments installs/repairs the Claude Code hook.`,"zh-TW":`CC Viewer CLI
384
-
385
- 用法:
386
- ccv [options]
387
- ccv run -- <command> [args...]
388
-
389
- 選項:
390
- -h, --help 顯示說明
391
- -v, --version 顯示版本
392
- --uninstall 移除 CC Viewer 整合
393
-
394
- 說明:
395
- 直接執行 ccv 會安裝/修復 Claude Code 的整合 Hook。`},"cli.usage.uninstallHint":{zh:"",en:"","zh-TW":"",ko:"",ja:"",de:"",es:"",fr:"",it:"",da:"",pl:"",ru:"",ar:"",no:"","pt-BR":"",th:"",tr:"",uk:""},"cli.uninstall.cliCleaned":{zh:"✅ cli.js 已清理",en:"✅ cli.js cleaned","zh-TW":"✅ cli.js 已清理",ko:"✅ cli.js 정리 완료",ja:"✅ cli.js をクリーンアップしました",de:"✅ cli.js bereinigt",es:"✅ cli.js limpiado",fr:"✅ cli.js nettoyé",it:"✅ cli.js pulito",da:"✅ cli.js renset",pl:"✅ cli.js wyczyszczony",ru:"✅ cli.js очищен",ar:"✅ تم تنظيف cli.js",no:"✅ cli.js renset","pt-BR":"✅ cli.js limpo",th:"✅ ล้าง cli.js แล้ว",tr:"✅ cli.js temizlendi",uk:"✅ cli.js очищено"},"cli.uninstall.cliNotFound":{zh:"⚠️ 未找到 Claude Code cli.js,跳过",en:"⚠️ Claude Code cli.js not found, skipped","zh-TW":"⚠️ 未找到 Claude Code cli.js,跳過",ko:"⚠️ Claude Code cli.js를 찾을 수 없음, 건너뜀",ja:"⚠️ Claude Code cli.js が見つかりません、スキップ",de:"⚠️ Claude Code cli.js nicht gefunden, übersprungen",es:"⚠️ Claude Code cli.js no encontrado, omitido",fr:"⚠️ Claude Code cli.js introuvable, ignoré",it:"⚠️ Claude Code cli.js non trovato, saltato",da:"⚠️ Claude Code cli.js ikke fundet, sprunget over",pl:"⚠️ Nie znaleziono Claude Code cli.js, pominięto",ru:"⚠️ Claude Code cli.js не найден, пропущено",ar:"⚠️ لم يتم العثور على Claude Code cli.js، تم التخطي",no:"⚠️ Claude Code cli.js ikke funnet, hoppet over","pt-BR":"⚠️ Claude Code cli.js não encontrado, ignorado",th:"⚠️ ไม่พบ Claude Code cli.js ข้ามไป",tr:"⚠️ Claude Code cli.js bulunamadı, atlandı",uk:"⚠️ Claude Code cli.js не знайдено, пропущено"},"cli.uninstall.cliFail":{zh:"❌ cli.js 清理失败",en:"❌ Failed to clean cli.js","zh-TW":"❌ cli.js 清理失敗",ko:"❌ cli.js 정리 실패",ja:"❌ cli.js のクリーンアップに失敗",de:"❌ cli.js Bereinigung fehlgeschlagen",es:"❌ Fallo al limpiar cli.js",fr:"❌ Échec du nettoyage de cli.js",it:"❌ Pulizia cli.js fallita",da:"❌ Rensning af cli.js mislykkedes",pl:"❌ Czyszczenie cli.js nie powiodło się",ru:"❌ Ошибка очистки cli.js",ar:"❌ فشل تنظيف cli.js",no:"❌ Rensing av cli.js mislyktes","pt-BR":"❌ Falha ao limpar cli.js",th:"❌ ล้าง cli.js ล้มเหลว",tr:"❌ cli.js temizleme başarısız",uk:"❌ Помилка очищення cli.js"},"cli.uninstall.hookRemoved":{zh:"✅ shell hook 已从 {path} 移除",en:"✅ Shell hook removed from {path}","zh-TW":"✅ shell hook 已從 {path} 移除",ko:"✅ shell hook이 {path}에서 제거됨",ja:"✅ shell hook を {path} から削除しました",de:"✅ Shell-Hook aus {path} entfernt",es:"✅ Shell hook eliminado de {path}",fr:"✅ Shell hook supprimé de {path}",it:"✅ Shell hook rimosso da {path}",da:"✅ Shell hook fjernet fra {path}",pl:"✅ Shell hook usunięty z {path}",ru:"✅ Shell hook удалён из {path}",ar:"✅ تم إزالة shell hook من {path}",no:"✅ Shell hook fjernet fra {path}","pt-BR":"✅ Shell hook removido de {path}",th:"✅ Shell hook ถูกลบออกจาก {path}",tr:"✅ Shell hook {path} dosyasından kaldırıldı",uk:"✅ Shell hook видалено з {path}"},"cli.uninstall.hookClean":{zh:"✅ {path} 中无需清理",en:"✅ No cleanup needed in {path}","zh-TW":"✅ {path} 中無需清理",ko:"✅ {path}에서 정리할 항목 없음",ja:"✅ {path} のクリーンアップは不要です",de:"✅ Keine Bereinigung in {path} nötig",es:"✅ No se necesita limpieza en {path}",fr:"✅ Aucun nettoyage nécessaire dans {path}",it:"✅ Nessuna pulizia necessaria in {path}",da:"✅ Ingen oprydning nødvendig i {path}",pl:"✅ Brak potrzeby czyszczenia w {path}",ru:"✅ Очистка в {path} не требуется",ar:"✅ لا حاجة للتنظيف في {path}",no:"✅ Ingen opprydding nødvendig i {path}","pt-BR":"✅ Nenhuma limpeza necessária em {path}",th:"✅ ไม่จำเป็นต้องล้างใน {path}",tr:"✅ {path} dosyasında temizlik gerekmiyor",uk:"✅ Очищення в {path} не потрібне"},"cli.uninstall.hookFail":{zh:"❌ shell hook 清理失败: {error}",en:"❌ Failed to clean shell hook: {error}","zh-TW":"❌ shell hook 清理失敗: {error}",ko:"❌ shell hook 정리 실패: {error}",ja:"❌ shell hook のクリーンアップに失敗: {error}",de:"❌ Shell-Hook-Bereinigung fehlgeschlagen: {error}",es:"❌ Error al limpiar el shell hook: {error}",fr:"❌ Échec du nettoyage du shell hook : {error}",it:"❌ Pulizia shell hook fallita: {error}",da:"❌ Kunne ikke rense shell hook: {error}",pl:"❌ Nie udało się wyczyścić shell hook: {error}",ru:"❌ Не удалось очистить shell hook: {error}",ar:"❌ فشل تنظيف shell hook: {error}",no:"❌ Kunne ikke rense shell hook: {error}","pt-BR":"❌ Falha ao limpar shell hook: {error}",th:"❌ ล้าง shell hook ล้มเหลว: {error}",tr:"❌ Shell hook temizlenemedi: {error}",uk:"❌ Не вдалося очистити shell hook: {error}"},"cli.uninstall.done":{zh:`
396
- 🗑️ CC Viewer 集成已移除 (运行 'npm uninstall -g cc-viewer' 以彻底删除命令)`,en:`
397
- 🗑️ CC Viewer integration removed (Run 'npm uninstall -g cc-viewer' to remove command)`,"zh-TW":`
398
- 🗑️ CC Viewer 集成已移除 (運行 'npm uninstall -g cc-viewer' 以徹底刪除命令)`,ko:`
399
- 🗑️ CC Viewer 통합 제거됨 ('npm uninstall -g cc-viewer'를 실행하여 명령 삭제)`,ja:`
400
- 🗑️ CC Viewer 統合を削除しました (コマンドを完全に削除するには 'npm uninstall -g cc-viewer' を実行)`,de:`
401
- 🗑️ CC Viewer-Integration entfernt (Führen Sie 'npm uninstall -g cc-viewer' aus, um den Befehl zu entfernen)`,es:`
402
- 🗑️ Integración de CC Viewer eliminada (Ejecute 'npm uninstall -g cc-viewer' para eliminar el comando)`,fr:`
403
- 🗑️ Intégration CC Viewer supprimée (Exécutez 'npm uninstall -g cc-viewer' pour supprimer la commande)`,it:`
404
- 🗑️ Integrazione CC Viewer rimossa (Esegui 'npm uninstall -g cc-viewer' per rimuovere il comando)`,da:`
405
- 🗑️ CC Viewer integration fjernet (Kør 'npm uninstall -g cc-viewer' for at fjerne kommandoen)`,pl:`
406
- 🗑️ Integracja CC Viewer usunięta (Uruchom 'npm uninstall -g cc-viewer', aby usunąć polecenie)`,ru:`
407
- 🗑️ Интеграция CC Viewer удалена (Запустите 'npm uninstall -g cc-viewer' для удаления команды)`,ar:`
408
- 🗑️ تمت إزالة تكامل CC Viewer (قم بتشغيل 'npm uninstall -g cc-viewer' لإزالة الأمر)`,no:`
409
- 🗑️ CC Viewer-integrasjon fjernet (Kjør 'npm uninstall -g cc-viewer' for å fjerne kommandoen)`,"pt-BR":`
410
- 🗑️ Integração do CC Viewer removida (Execute 'npm uninstall -g cc-viewer' para remover o comando)`,th:`
411
- 🗑️ การรวม CC Viewer ถูกลบออก (เรียกใช้ 'npm uninstall -g cc-viewer' เพื่อลบคำสั่ง)`,tr:`
412
- 🗑️ CC Viewer entegrasyonu kaldırıldı (Komutu kaldırmak için 'npm uninstall -g cc-viewer' çalıştırın)`,uk:`
413
- 🗑️ Інтеграцію CC Viewer видалено (Запустіть 'npm uninstall -g cc-viewer', щоб видалити команду)`},"server.started":{zh:`
414
- Claude 请求监控服务已启动: http://{host}:{port}
415
- `,en:`
416
- CC Viewer started: http://{host}:{port}
417
- `,"zh-TW":`
418
- Claude 請求監控服務已啟動: http://{host}:{port}
419
- `,ko:`
420
- CC Viewer 시작됨: http://{host}:{port}
421
- `,ja:`
422
- CC Viewer 起動: http://{host}:{port}
423
- `,de:`
424
- CC Viewer gestartet: http://{host}:{port}
425
- `,es:`
426
- CC Viewer iniciado: http://{host}:{port}
427
- `,fr:`
428
- CC Viewer démarré : http://{host}:{port}
429
- `,it:`
430
- CC Viewer avviato: http://{host}:{port}
431
- `,da:`
432
- CC Viewer startet: http://{host}:{port}
433
- `,pl:`
434
- CC Viewer uruchomiony: http://{host}:{port}
435
- `,ru:`
436
- CC Viewer запущен: http://{host}:{port}
437
- `,ar:`
438
- تم تشغيل CC Viewer: http://{host}:{port}
439
- `,no:`
440
- CC Viewer startet: http://{host}:{port}
441
- `,"pt-BR":`
442
- CC Viewer iniciado: http://{host}:{port}
443
- `,th:`
444
- CC Viewer เริ่มทำงาน: http://{host}:{port}
445
- `,tr:`
446
- CC Viewer başlatıldı: http://{host}:{port}
447
- `,uk:`
448
- CC Viewer запущено: http://{host}:{port}
449
- `},"server.reuse":{zh:`
450
- CC Viewer 已在运行: http://{host}:{port}
451
- `,en:`
452
- CC Viewer already running: http://{host}:{port}
453
- `,"zh-TW":`
454
- CC Viewer 已在運行: http://{host}:{port}
455
- `,ko:`
456
- CC Viewer 이미 실행 중: http://{host}:{port}
457
- `,ja:`
458
- CC Viewer は既に実行中: http://{host}:{port}
459
- `,de:`
460
- CC Viewer läuft bereits: http://{host}:{port}
461
- `,es:`
462
- CC Viewer ya en ejecución: http://{host}:{port}
463
- `,fr:`
464
- CC Viewer déjà en cours d'exécution : http://{host}:{port}
465
- `,it:`
466
- CC Viewer già in esecuzione: http://{host}:{port}
467
- `,da:`
468
- CC Viewer kører allerede: http://{host}:{port}
469
- `,pl:`
470
- CC Viewer już działa: http://{host}:{port}
471
- `,ru:`
472
- CC Viewer уже запущен: http://{host}:{port}
473
- `,ar:`
474
- CC Viewer يعمل بالفعل: http://{host}:{port}
475
- `,no:`
476
- CC Viewer kjører allerede: http://{host}:{port}
477
- `,"pt-BR":`
478
- CC Viewer já em execução: http://{host}:{port}
479
- `,th:`
480
- CC Viewer กำลังทำงานอยู่แล้ว: http://{host}:{port}
481
- `,tr:`
482
- CC Viewer zaten çalışıyor: http://{host}:{port}
483
- `,uk:`
484
- CC Viewer вже працює: http://{host}:{port}
485
- `},"server.portsBusy":{zh:"⚠️ 端口 {start}-{end} 均被占用,请求监控服务未启动",en:"⚠️ Ports {start}-{end} are all in use, monitoring service not started","zh-TW":"⚠️ 端口 {start}-{end} 均被佔用,請求監控服務未啟動",ko:"⚠️ 포트 {start}-{end} 모두 사용 중, 모니터링 서비스 미시작",ja:"⚠️ ポート {start}-{end} はすべて使用中、監視サービスは起動されませんでした",de:"⚠️ Ports {start}-{end} sind alle belegt, Überwachungsdienst nicht gestartet",es:"⚠️ Puertos {start}-{end} están todos en uso, servicio de monitoreo no iniciado",fr:"⚠️ Ports {start}-{end} tous occupés, service de surveillance non démarré",it:"⚠️ Porte {start}-{end} tutte in uso, servizio di monitoraggio non avviato",da:"⚠️ Porte {start}-{end} er alle i brug, overvågningstjeneste ikke startet",pl:"⚠️ Porty {start}-{end} są wszystkie zajęte, usługa monitorowania nie uruchomiona",ru:"⚠️ Порты {start}-{end} все заняты, служба мониторинга не запущена",ar:"⚠️ المنافذ {start}-{end} كلها مشغولة، لم يتم تشغيل خدمة المراقبة",no:"⚠️ Porter {start}-{end} er alle i bruk, overvåkningstjeneste ikke startet","pt-BR":"⚠️ Portas {start}-{end} estão todas em uso, serviço de monitoramento não iniciado",th:"⚠️ พอร์ต {start}-{end} ถูกใช้งานทั้งหมด บริการตรวจสอบไม่ได้เริ่มทำงาน",tr:"⚠️ {start}-{end} portları kullanımda, izleme servisi başlatılamadı",uk:"⚠️ Порти {start}-{end} всі зайняті, служба моніторингу не запущена"},"ui.requestList":{zh:"请求列表",en:"Requests","zh-TW":"請求列表",ko:"요청 목록",ja:"リクエスト一覧",de:"Anfragen",es:"Solicitudes",fr:"Requêtes",it:"Richieste",da:"Forespørgsler",pl:"Żądania",ru:"Запросы",ar:"الطلبات",no:"Forespørsler","pt-BR":"Requisições",th:"รายการคำขอ",tr:"İstekler",uk:"Запити"},"ui.totalRequests":{zh:"总请求数: {count}",en:"Total: {count}","zh-TW":"總請求數: {count}",ko:"총 요청 수: {count}",ja:"合計: {count}",de:"Gesamt: {count}",es:"Total: {count}",fr:"Total : {count}",it:"Totale: {count}",da:"Total: {count}",pl:"Łącznie: {count}",ru:"Всего: {count}",ar:"الإجمالي: {count}",no:"Totalt: {count}","pt-BR":"Total: {count}",th:"ทั้งหมด: {count}",tr:"Toplam: {count}",uk:"Всього: {count}"},"ui.waitingRequests":{zh:"等待请求...",en:"Waiting for requests...","zh-TW":"等待請求...",ko:"요청 대기 중...",ja:"リクエスト待機中...",de:"Warte auf Anfragen...",es:"Esperando solicitudes...",fr:"En attente de requêtes...",it:"In attesa di richieste...",da:"Venter på forespørgsler...",pl:"Oczekiwanie na żądania...",ru:"Ожидание запросов...",ar:"في انتظار الطلبات...",no:"Venter på forespørsler...","pt-BR":"Aguardando requisições...",th:"รอคำขอ...",tr:"İstekler bekleniyor...",uk:"Очікування запитів..."},"ui.importLocalLogs":{zh:"日志管理工具",en:"Log Management","zh-TW":"日誌管理工具",ko:"로그 관리 도구",ja:"ログ管理ツール",de:"Log-Verwaltung",es:"Gestión de logs",fr:"Gestion des logs",it:"Gestione log",da:"Loghåndtering",pl:"Zarządzanie logami",ru:"Управление логами",ar:"إدارة السجلات",no:"Loggadministrasjon","pt-BR":"Gerenciamento de logs",th:"จัดการบันทึก",tr:"Log yönetimi",uk:"Керування логами"},"ui.loadLocalJsonl":{zh:"直接选择加载本地jsonl文件",en:"Load local JSONL file","zh-TW":"直接選擇載入本地jsonl檔案",ko:"로컬 JSONL 파일 선택",ja:"ローカルJSONLファイルを選択",de:"Lokale JSONL-Datei auswählen",es:"Seleccionar archivo JSONL local",fr:"Sélectionner un fichier JSONL local",it:"Seleziona file JSONL locale",da:"Vælg lokal JSONL-fil",pl:"Wybierz lokalny plik JSONL",ru:"Выбрать локальный JSONL файл",ar:"اختيار ملف JSONL محلي",no:"Velg lokal JSONL-fil","pt-BR":"Selecionar arquivo JSONL local",th:"เลือกไฟล์ JSONL ในเครื่อง",tr:"Yerel JSONL dosyası seç",uk:"Вибрати локальний JSONL файл"},"ui.fileTooLarge":{zh:"文件大小不能超过 500MB",en:"File size cannot exceed 500MB","zh-TW":"檔案大小不能超過 500MB",ko:"파일 크기는 500MB를 초과할 수 없습니다",ja:"ファイルサイズは500MBを超えることはできません",de:"Dateigröße darf 500MB nicht überschreiten",es:"El tamaño del archivo no puede superar 500MB",fr:"La taille du fichier ne peut pas dépasser 500 Mo",it:"La dimensione del file non può superare 500MB",da:"Filstørrelsen må ikke overstige 500MB",pl:"Rozmiar pliku nie może przekraczać 500MB",ru:"Размер файла не может превышать 500МБ",ar:"حجم الملف لا يمكن أن يتجاوز 500 ميجابايت",no:"Filstørrelsen kan ikke overstige 500MB","pt-BR":"O tamanho do arquivo não pode exceder 500MB",th:"ขนาดไฟล์ต้องไม่เกิน 500MB",tr:"Dosya boyutu 500MB'ı aşamaz",uk:"Розмір файлу не може перевищувати 500МБ"},"ui.saveLog":{zh:"下载当前日志",en:"Download current log","zh-TW":"下載當前日誌",ko:"현재 로그 다운로드",ja:"現在のログをダウンロード",de:"Aktuelles Log herunterladen",es:"Descargar log actual",fr:"Télécharger le log actuel",it:"Scarica log corrente",da:"Download nuværende log",pl:"Pobierz bieżący log",ru:"Скачать текущий лог",ar:"تحميل السجل الحالي",no:"Last ned gjeldende logg","pt-BR":"Baixar log atual",th:"ดาวน์โหลดล็อกปัจจุบัน",tr:"Mevcut günlüğü indir",uk:"Завантажити поточний лог"},"ui.exportPrompts":{zh:"查看用户 Prompt",en:"Export user prompts","zh-TW":"匯出用戶 Prompt",ko:"사용자 Prompt 내보내기",ja:"ユーザー Prompt をエクスポート",de:"Benutzer-Prompts exportieren",es:"Exportar prompts de usuario",fr:"Exporter les prompts utilisateur",it:"Esporta prompt utente",da:"Eksportér bruger-prompts",pl:"Eksportuj prompty użytkownika",ru:"Экспорт пользовательских Prompt",ar:"تصدير Prompt المستخدم",no:"Eksporter bruker-prompts","pt-BR":"Exportar prompts do usuário",th:"ส่งออก Prompt ผู้ใช้",tr:"Kullanıcı Prompt'larını dışa aktar",uk:"Експорт Prompt користувача"},"ui.exportPromptsTxt":{zh:"导出到本地 .txt",en:"Export to local .txt","zh-TW":"匯出到本地 .txt",ko:"로컬 .txt로 내보내기",ja:"ローカル .txt にエクスポート",de:"Als lokale .txt exportieren",es:"Exportar a .txt local",fr:"Exporter en .txt local",it:"Esporta in .txt locale",da:"Eksportér til lokal .txt",pl:"Eksportuj do lokalnego .txt",ru:"Экспорт в локальный .txt",ar:"تصدير إلى ملف .txt محلي",no:"Eksporter til lokal .txt","pt-BR":"Exportar para .txt local",th:"ส่งออกเป็นไฟล์ .txt ในเครื่อง",tr:"Yerel .txt olarak dışa aktar",uk:"Експорт у локальний .txt"},"ui.tokenStats":{zh:"数据统计",en:"Data Stats","zh-TW":"數據統計",ko:"데이터 통계",ja:"データ統計",de:"Datenstatistik",es:"Estadísticas de datos",fr:"Statistiques de données",it:"Statistiche dati",da:"Datastatistik",pl:"Statystyki danych",ru:"Статистика данных",ar:"إحصائيات البيانات",no:"Datastatistikk","pt-BR":"Estatísticas de dados",th:"สถิติข้อมูล",tr:"Veri İstatistikleri",uk:"Статистика даних"},"ui.liveMonitoring":{zh:"实时监控中",en:"Live","zh-TW":"即時監控中",ko:"실시간 모니터링",ja:"リアルタイム監視中",de:"Live",es:"En vivo",fr:"En direct",it:"Live",da:"Live",pl:"Na żywo",ru:"Мониторинг",ar:"مباشر",no:"Live","pt-BR":"Ao vivo",th:"สด",tr:"Canlı",uk:"Моніторинг"},"ui.inflightRequests":{zh:"在途请求",en:"Inflight Requests","zh-TW":"在途請求",ko:"진행 중인 요청",ja:"処理中のリクエスト",de:"Laufende Anfragen",es:"Solicitudes en curso",fr:"Requêtes en cours",it:"Richieste in corso",da:"Igangværende forespørgsler",pl:"Trwające żądania",ru:"Текущие запросы",ar:"الطلبات الجارية",no:"Pågående forespørsler","pt-BR":"Requisições em andamento",th:"คำขอที่กำลังดำเนินการ",tr:"Devam Eden İstekler",uk:"Поточні запити"},"ui.noInflightRequests":{zh:"暂无在途请求",en:"No inflight requests","zh-TW":"暫無在途請求",ko:"진행 중인 요청 없음",ja:"処理中のリクエストなし",de:"Keine laufenden Anfragen",es:"Sin solicitudes en curso",fr:"Aucune requête en cours",it:"Nessuna richiesta in corso",da:"Ingen igangværende forespørgsler",pl:"Brak trwających żądań",ru:"Нет текущих запросов",ar:"لا توجد طلبات جارية",no:"Ingen pågående forespørsler","pt-BR":"Nenhuma requisição em andamento",th:"ไม่มีคำขอที่กำลังดำเนินการ",tr:"Devam eden istek yok",uk:"Немає поточних запитів"},"ui.historyLog":{zh:"历史日志: {file}",en:"History: {file}","zh-TW":"歷史日誌: {file}",ko:"기록: {file}",ja:"履歴: {file}",de:"Verlauf: {file}",es:"Historial: {file}",fr:"Historique : {file}",it:"Cronologia: {file}",da:"Historik: {file}",pl:"Historia: {file}",ru:"История: {file}",ar:"السجل: {file}",no:"Historikk: {file}","pt-BR":"Histórico: {file}",th:"ประวัติ: {file}",tr:"Geçmiş: {file}",uk:"Історія: {file}"},"ui.chatMode":{zh:"对话模式",en:"Chat mode","zh-TW":"對話模式",ko:"대화 모드",ja:"チャットモード",de:"Chat-Modus",es:"Modo chat",fr:"Mode conversation",it:"Modalità chat",da:"Chat-tilstand",pl:"Tryb czatu",ru:"Режим чата",ar:"وضع المحادثة",no:"Chat-modus","pt-BR":"Modo chat",th:"โหมดแชท",tr:"Sohbet modu",uk:"Режим чату"},"ui.rawMode":{zh:"查看网络报文",en:"Network Packets","zh-TW":"查看網路封包",ko:"네트워크 패킷 보기",ja:"ネットワークパケット",de:"Netzwerkpakete",es:"Paquetes de red",fr:"Paquets réseau",it:"Pacchetti di rete",da:"Netværkspakker",pl:"Pakiety sieciowe",ru:"Сетевые пакеты",ar:"حزم الشبكة",no:"Nettverkspakker","pt-BR":"Pacotes de rede",th:"แพ็กเก็ตเครือข่าย",tr:"Ağ paketleri",uk:"Мережеві пакети"},"ui.viewRequest":{zh:"查看请求",en:"View Request","zh-TW":"查看請求",ko:"요청 보기",ja:"リクエストを表示",de:"Anfrage anzeigen",es:"Ver solicitud",fr:"Voir la requête",it:"Visualizza richiesta",da:"Vis forespørgsel",pl:"Zobacz żądanie",ru:"Просмотр запроса",ar:"عرض الطلب",no:"Vis forespørsel","pt-BR":"Ver requisição",th:"ดูคำขอ",tr:"İsteği görüntüle",uk:"Переглянути запит"},"ui.viewInChat":{zh:"在对话中查看",en:"View in chat","zh-TW":"在對話中查看",ko:"대화에서 보기",ja:"チャットで表示",de:"Im Chat anzeigen",es:"Ver en chat",fr:"Voir dans le chat",it:"Vedi nella chat",da:"Vis i chat",pl:"Zobacz w czacie",ru:"Посмотреть в чате",ar:"عرض في المحادثة",no:"Vis i chat","pt-BR":"Ver no chat",th:"ดูในแชท",tr:"Sohbette görüntüle",uk:"Переглянути в чаті"},"ui.cannotMap":{zh:"无法映射到对话",en:"Cannot map to conversation","zh-TW":"無法映射到對話",ko:"대화에 매핑할 수 없습니다",ja:"会話にマッピングできません",de:"Kann nicht zur Konversation zugeordnet werden",es:"No se puede mapear a la conversación",fr:"Impossible de mapper à la conversation",it:"Impossibile mappare alla conversazione",da:"Kan ikke mappe til samtale",pl:"Nie można zmapować do rozmowy",ru:"Невозможно сопоставить с диалогом",ar:"لا يمكن الربط بالمحادثة",no:"Kan ikke tilordne til samtale","pt-BR":"Não é possível mapear para a conversa",th:"ไม่สามารถแมปไปยังการสนทนาได้",tr:"Konuşmaya eşlenemedi",uk:"Неможливо зіставити з діалогом"},"ui.cacheExpired":{zh:"已失效",en:"Expired","zh-TW":"已失效",ko:"만료됨",ja:"期限切れ",de:"Abgelaufen",es:"Expirado",fr:"Expiré",it:"Scaduto",da:"Udløbet",pl:"Wygasło",ru:"Истёк",ar:"منتهي الصلاحية",no:"Utløpt","pt-BR":"Expirado",th:"หมดอายุ",tr:"Süresi doldu",uk:"Закінчився"},"ui.cacheCountdown":{zh:"MainAgent 缓存{type}失效倒计时:",en:"MainAgent cache{type} expires in: ","zh-TW":"MainAgent 快取{type}失效倒數:",ko:"MainAgent cache{type} 만료 카운트다운: ",ja:"MainAgent cache{type} 期限切れまで: ",de:"MainAgent Cache{type} läuft ab in: ",es:"Cache{type} de MainAgent expira en: ",fr:"Cache{type} MainAgent expire dans : ",it:"Cache{type} MainAgent scade tra: ",da:"MainAgent cache{type} udløber om: ",pl:"Cache{type} MainAgent wygasa za: ",ru:"Cache{type} MainAgent истекает через: ",ar:"ينتهي cache{type} لـ MainAgent خلال: ",no:"MainAgent cache{type} utløper om: ","pt-BR":"Cache{type} do MainAgent expira em: ",th:"Cache{type} ของ MainAgent หมดอายุใน: ",tr:"MainAgent cache{type} süresi doluyor: ",uk:"Cache{type} MainAgent закінчується через: "},"ui.minuteSecond":{zh:"{m}分{s}秒",en:"{m}m{s}s","zh-TW":"{m}分{s}秒",ko:"{m}분{s}초",ja:"{m}分{s}秒",de:"{m}m{s}s",es:"{m}m{s}s",fr:"{m}m{s}s",it:"{m}m{s}s",da:"{m}m{s}s",pl:"{m}m{s}s",ru:"{m}м{s}с",ar:"{m}د{s}ث",no:"{m}m{s}s","pt-BR":"{m}m{s}s",th:"{m}นาที{s}วินาที",tr:"{m}dk{s}sn",uk:"{m}хв{s}с"},"ui.second":{zh:"{s}秒",en:"{s}s","zh-TW":"{s}秒",ko:"{s}초",ja:"{s}秒",de:"{s}s",es:"{s}s",fr:"{s}s",it:"{s}s",da:"{s}s",pl:"{s}s",ru:"{s}с",ar:"{s}ث",no:"{s}s","pt-BR":"{s}s",th:"{s}วินาที",tr:"{s}sn",uk:"{s}с"},"ui.hitRate":{zh:"命中率",en:"Hit rate","zh-TW":"命中率",ko:"적중률",ja:"ヒット率",de:"Trefferquote",es:"Tasa de aciertos",fr:"Taux de succès",it:"Tasso di successo",da:"Hitrate",pl:"Współczynnik trafień",ru:"Процент попаданий",ar:"معدل الإصابة",no:"Treffrate","pt-BR":"Taxa de acerto",th:"อัตราการเข้าถึง",tr:"İsabet oranı",uk:"Відсоток влучень"},"ui.userPrompt":{zh:"用户 Prompt",en:"User Prompt","zh-TW":"用戶 Prompt",ko:"사용자 Prompt",ja:"ユーザー Prompt",de:"Benutzer-Prompt",es:"Prompt de usuario",fr:"Prompt utilisateur",it:"Prompt utente",da:"Bruger-Prompt",pl:"Prompt użytkownika",ru:"Prompt пользователя",ar:"Prompt المستخدم",no:"Bruker-Prompt","pt-BR":"Prompt do usuário",th:"Prompt ผู้ใช้",tr:"Kullanıcı Prompt",uk:"Prompt користувача"},"ui.noPrompt":{zh:"暂无用户 Prompt",en:"No user prompts yet","zh-TW":"暫無用戶 Prompt",ko:"사용자 Prompt 없음",ja:"ユーザー Prompt はまだありません",de:"Noch keine Benutzer-Prompts",es:"Sin prompts de usuario aún",fr:"Aucun prompt utilisateur",it:"Nessun prompt utente",da:"Ingen bruger-prompts endnu",pl:"Brak promptów użytkownika",ru:"Нет пользовательских Prompt",ar:"لا توجد Prompt للمستخدم بعد",no:"Ingen bruker-prompts ennå","pt-BR":"Nenhum prompt de usuário ainda",th:"ยังไม่มี Prompt ผู้ใช้",tr:"Henüz kullanıcı Prompt'u yok",uk:"Немає Prompt користувача"},"ui.promptCountUnit":{zh:"条",en:"","zh-TW":"條",ko:"개",ja:"件",de:"",es:"",fr:"",it:"",da:"",pl:"",ru:"",ar:"",no:"","pt-BR":"",th:"",tr:"",uk:""},"ui.promptModeOriginal":{zh:"原文模式",en:"Original"},"ui.promptModeContext":{zh:"上下文模式",en:"Context"},"ui.promptModeText":{zh:"Text模式",en:"Text"},"ui.unknownTime":{zh:"未知时间",en:"Unknown time","zh-TW":"未知時間",ko:"알 수 없는 시간",ja:"不明な時刻",de:"Unbekannte Zeit",es:"Hora desconocida",fr:"Heure inconnue",it:"Ora sconosciuta",da:"Ukendt tid",pl:"Nieznany czas",ru:"Неизвестное время",ar:"وقت غير معروف",no:"Ukjent tid","pt-BR":"Hora desconhecida",th:"เวลาไม่ทราบ",tr:"Bilinmeyen zaman",uk:"Невідомий час"},"ui.logCount":{zh:"{count} 个日志",en:"{count} logs","zh-TW":"{count} 個日誌",ko:"{count}개 로그",ja:"{count} 件のログ",de:"{count} Logs",es:"{count} logs",fr:"{count} logs",it:"{count} log",da:"{count} logs",pl:"{count} logów",ru:"{count} логов",ar:"{count} سجلات",no:"{count} logger","pt-BR":"{count} logs",th:"{count} บันทึก",tr:"{count} log",uk:"{count} логів"},"ui.noLogs":{zh:"暂无日志文件",en:"No log files","zh-TW":"暫無日誌檔案",ko:"로그 파일 없음",ja:"ログファイルなし",de:"Keine Log-Dateien",es:"Sin archivos de log",fr:"Aucun fichier de log",it:"Nessun file di log",da:"Ingen logfiler",pl:"Brak plików logów",ru:"Нет файлов логов",ar:"لا توجد ملفات سجلات",no:"Ingen loggfiler","pt-BR":"Nenhum arquivo de log",th:"ไม่มีไฟล์บันทึก",tr:"Log dosyası yok",uk:"Немає файлів логів"},"ui.footer.starRequest":{zh:"在此感谢各位GitHub大佬赏赐一个STAR",en:"Please give us a STAR on GitHub if you like it","zh-TW":"在此感謝各位GitHub大佬賞賜一個STAR",ko:"마음에 드시면 GitHub에서 STAR를 눌러주세요",ja:"よろしければGitHubでSTARをお願いします",de:"Bitte geben Sie uns einen STAR auf GitHub",es:"Por favor, danos una STAR en GitHub",fr:"Merci de nous donner une STAR sur GitHub",it:"Per favore, dacci una STAR su GitHub",da:"Giv os venligst en STAR på GitHub",pl:"Prosimy o STAR na GitHubie",ru:"Пожалуйста, поставьте нам STAR на GitHub",ar:"يرجى منحنا نجمة STAR على GitHub",no:"Vennligst gi oss en STAR på GitHub","pt-BR":"Por favor, nos dê uma STAR no GitHub",th:"กรุณาให้ STAR บน GitHub ด้วยนะครับ",tr:"Lütfen GitHub'da bize bir STAR verin",uk:"Будь ласка, поставте нам STAR на GitHub"},"ui.footer.contact":{zh:"如需帮助,请联系 @水映天辙(钉钉)",en:"Need help? Contact @水映天辙 (DingTalk)","zh-TW":"如需幫助,請聯繫 @水映天辙(釘釘)",ko:"도움이 필요하면 @水映天辙(DingTalk)에 연락하세요",ja:"ヘルプが必要な場合は @水映天辙(DingTalk) にご連絡ください",de:"Hilfe benötigt? Kontaktieren Sie @水映天辙 (DingTalk)",es:"¿Necesita ayuda? Contacte a @水映天辙 (DingTalk)",fr:"Besoin d'aide ? Contactez @水映天辙 (DingTalk)",it:"Hai bisogno di aiuto? Contatta @水映天辙 (DingTalk)",da:"Brug for hjælp? Kontakt @水映天辙 (DingTalk)",pl:"Potrzebujesz pomocy? Skontaktuj się z @水映天辙 (DingTalk)",ru:"Нужна помощь? Свяжитесь с @水映天辙 (DingTalk)",ar:"تحتاج مساعدة؟ تواصل مع @水映天辙 (DingTalk)",no:"Trenger du hjelp? Kontakt @水映天辙 (DingTalk)","pt-BR":"Precisa de ajuda? Entre em contato com @水映天辙 (DingTalk)",th:"ต้องการความช่วยเหลือ? ติดต่อ @水映天辙 (DingTalk)",tr:"Yardıma mı ihtiyacınız var? @水映天辙 (DingTalk) ile iletişime geçin",uk:"Потрібна допомога? Зв'яжіться з @水映天辙 (DingTalk)"},"ui.toolReturn":{zh:"工具返回",en:"Tool result","zh-TW":"工具返回",ko:"도구 결과",ja:"ツール結果",de:"Tool-Ergebnis",es:"Resultado de herramienta",fr:"Résultat d'outil",it:"Risultato strumento",da:"Værktøjsresultat",pl:"Wynik narzędzia",ru:"Результат инструмента",ar:"نتيجة الأداة",no:"Verktøyresultat","pt-BR":"Resultado da ferramenta",th:"ผลลัพธ์เครื่องมือ",tr:"Araç sonucu",uk:"Результат інструменту"},"ui.toolReturnNamed":{zh:"{name} 返回",en:"{name} result","zh-TW":"{name} 返回",ko:"{name} 결과",ja:"{name} 結果",de:"{name}-Ergebnis",es:"Resultado de {name}",fr:"Résultat de {name}",it:"Risultato di {name}",da:"{name}-resultat",pl:"Wynik {name}",ru:"Результат {name}",ar:"نتيجة {name}",no:"{name}-resultat","pt-BR":"Resultado de {name}",th:"ผลลัพธ์ {name}",tr:"{name} sonucu",uk:"Результат {name}"},"ui.lastResponse":{zh:"Last Response",en:"Last Response","zh-TW":"Last Response",ko:"Last Response",ja:"Last Response",de:"Last Response",es:"Last Response",fr:"Last Response",it:"Last Response",da:"Last Response",pl:"Last Response",ru:"Last Response",ar:"Last Response",no:"Last Response","pt-BR":"Last Response",th:"Last Response",tr:"Last Response",uk:"Last Response"},"ui.copySuccess":{zh:"复制成功",en:"Copied","zh-TW":"複製成功",ko:"복사됨",ja:"コピーしました",de:"Kopiert",es:"Copiado",fr:"Copié",it:"Copiato",da:"Kopieret",pl:"Skopiowano",ru:"Скопировано",ar:"تم النسخ",no:"Kopiert","pt-BR":"Copiado",th:"คัดลอกแล้ว",tr:"Kopyalandı",uk:"Скопійовано"},"ui.copy":{zh:"复制",en:"Copy","zh-TW":"複製",ko:"복사",ja:"コピー",de:"Kopieren",es:"Copiar",fr:"Copier",it:"Copia",da:"Kopiér",pl:"Kopiuj",ru:"Копировать",ar:"نسخ",no:"Kopier","pt-BR":"Copiar",th:"คัดลอก",tr:"Kopyala",uk:"Копіювати"},"ui.noHeaders":{zh:"无 Headers",en:"No Headers","zh-TW":"無 Headers",ko:"Headers 없음",ja:"Headers なし",de:"Keine Headers",es:"Sin Headers",fr:"Pas de Headers",it:"Nessun Header",da:"Ingen Headers",pl:"Brak Headers",ru:"Нет Headers",ar:"لا يوجد Headers",no:"Ingen Headers","pt-BR":"Sem Headers",th:"ไม่มี Headers",tr:"Header yok",uk:"Немає Headers"},"ui.noBody":{zh:"无 Body",en:"No Body","zh-TW":"無 Body",ko:"Body 없음",ja:"Body なし",de:"Kein Body",es:"Sin Body",fr:"Pas de Body",it:"Nessun Body",da:"Ingen Body",pl:"Brak Body",ru:"Нет Body",ar:"لا يوجد Body",no:"Ingen Body","pt-BR":"Sem Body",th:"ไม่มี Body",tr:"Body yok",uk:"Немає Body"},"ui.streamingResponse":{zh:"⚡ 流式响应 — 此请求使用了 SSE 流式传输,响应内容无法完整捕获。",en:"⚡ Streaming response — This request used SSE streaming, response content cannot be fully captured.","zh-TW":"⚡ 串流回應 — 此請求使用了 SSE 串流傳輸,回應內容無法完整擷取。",ko:"⚡ 스트리밍 응답 — 이 요청은 SSE 스트리밍을 사용하여 응답 내용을 완전히 캡처할 수 없습니다.",ja:"⚡ ストリーミングレスポンス — このリクエストは SSE ストリーミングを使用しており、レスポンス内容を完全にキャプチャできませんでした。",de:"⚡ Streaming-Antwort — Diese Anfrage nutzte SSE-Streaming, der Antwortinhalt konnte nicht vollständig erfasst werden.",es:"⚡ Respuesta en streaming — Esta solicitud usó streaming SSE, el contenido de la respuesta no se pudo capturar completamente.",fr:"⚡ Réponse en streaming — Cette requête a utilisé le streaming SSE, le contenu de la réponse n'a pas pu être entièrement capturé.",it:"⚡ Risposta in streaming — Questa richiesta ha utilizzato lo streaming SSE, il contenuto della risposta non può essere catturato completamente.",da:"⚡ Streaming-svar — Denne forespørgsel brugte SSE-streaming, svarindholdet kunne ikke fuldt indfanges.",pl:"⚡ Odpowiedź strumieniowa — To żądanie użyło strumieniowania SSE, treść odpowiedzi nie mogła zostać w pełni przechwycona.",ru:"⚡ Потоковый ответ — Этот запрос использовал SSE-потоковую передачу, содержимое ответа не может быть полностью захвачено.",ar:"⚡ استجابة متدفقة — استخدم هذا الطلب بث SSE، لا يمكن التقاط محتوى الاستجابة بالكامل.",no:"⚡ Strømmesvar — Denne forespørselen brukte SSE-strømming, svarinnholdet kunne ikke fanges fullstendig.","pt-BR":"⚡ Resposta em streaming — Esta requisição usou streaming SSE, o conteúdo da resposta não pôde ser totalmente capturado.",th:"⚡ การตอบกลับแบบสตรีม — คำขอนี้ใช้ SSE streaming เนื้อหาการตอบกลับไม่สามารถจับได้ทั้งหมด",tr:"⚡ Akış yanıtı — Bu istek SSE akışı kullandı, yanıt içeriği tam olarak yakalanamadı.",uk:"⚡ Потокова відповідь — Цей запит використовував SSE-потокову передачу, вміст відповіді не може бути повністю захоплений."},"ui.responseNotCaptured":{zh:"响应数据未捕获",en:"Response not captured","zh-TW":"回應資料未擷取",ko:"응답 데이터 미캡처",ja:"レスポンスデータ未キャプチャ",de:"Antwortdaten nicht erfasst",es:"Datos de respuesta no capturados",fr:"Données de réponse non capturées",it:"Dati di risposta non catturati",da:"Svardata ikke indfanget",pl:"Dane odpowiedzi nie przechwycone",ru:"Данные ответа не захвачены",ar:"لم يتم التقاط بيانات الاستجابة",no:"Svardata ikke fanget","pt-BR":"Dados de resposta não capturados",th:"ไม่ได้จับข้อมูลการตอบกลับ",tr:"Yanıt verileri yakalanamadı",uk:"Дані відповіді не захоплені"},"ui.expand":{zh:"▶ 展开",en:"▶ Expand","zh-TW":"▶ 展開",ko:"▶ 펼치기",ja:"▶ 展開",de:"▶ Aufklappen",es:"▶ Expandir",fr:"▶ Déplier",it:"▶ Espandi",da:"▶ Udvid",pl:"▶ Rozwiń",ru:"▶ Развернуть",ar:"▶ توسيع",no:"▶ Utvid","pt-BR":"▶ Expandir",th:"▶ ขยาย",tr:"▶ Genişlet",uk:"▶ Розгорнути"},"ui.collapse":{zh:"▼ 收起",en:"▼ Collapse","zh-TW":"▼ 收起",ko:"▼ 접기",ja:"▼ 折りたたむ",de:"▼ Zuklappen",es:"▼ Contraer",fr:"▼ Replier",it:"▼ Comprimi",da:"▼ Fold sammen",pl:"▼ Zwiń",ru:"▼ Свернуть",ar:"▼ طي",no:"▼ Skjul","pt-BR":"▼ Recolher",th:"▼ ย่อ",tr:"▼ Daralt",uk:"▼ Згорнути"},"ui.noChat":{zh:"暂无 MainAgent 对话数据",en:"No MainAgent conversation data","zh-TW":"暫無 MainAgent 對話資料",ko:"MainAgent 대화 데이터 없음",ja:"MainAgent の会話データがありません",de:"Keine MainAgent-Gesprächsdaten",es:"Sin datos de conversación de MainAgent",fr:"Aucune donnée de conversation MainAgent",it:"Nessun dato di conversazione MainAgent",da:"Ingen MainAgent samtaledata",pl:"Brak danych rozmowy MainAgent",ru:"Нет данных диалога MainAgent",ar:"لا توجد بيانات محادثة MainAgent",no:"Ingen MainAgent samtaledata","pt-BR":"Sem dados de conversa do MainAgent",th:"ไม่มีข้อมูลการสนทนา MainAgent",tr:"MainAgent konuşma verisi yok",uk:"Немає даних діалогу MainAgent"},"ui.terminal.exited":{zh:"[进程已退出,退出码: {code}]",en:"[Process exited with code {code}]","zh-TW":"[程序已退出,退出碼: {code}]",ko:"[프로세스가 코드 {code}(으)로 종료되었습니다]",ja:"[プロセスがコード {code} で終了しました]",de:"[Prozess mit Code {code} beendet]",es:"[Proceso finalizado con código {code}]",fr:"[Processus terminé avec le code {code}]",it:"[Processo terminato con codice {code}]",da:"[Proces afsluttet med kode {code}]",pl:"[Proces zakończony z kodem {code}]",ru:"[Процесс завершился с кодом {code}]",ar:"[انتهت العملية برمز {code}]",no:"[Prosess avsluttet med kode {code}]","pt-BR":"[Processo encerrado com código {code}]",th:"[กระบวนการออกด้วยรหัส {code}]",tr:"[İşlem {code} koduyla çıkış yaptı]",uk:"[Процес завершився з кодом {code}]"},"ui.diffWithPrev":{zh:"与上次请求的差异",en:"Diff with previous request","zh-TW":"與上次請求的差異",ko:"이전 요청과의 차이",ja:"前回リクエストとの差分",de:"Diff zur vorherigen Anfrage",es:"Diferencia con la solicitud anterior",fr:"Diff avec la requête précédente",it:"Diff con la richiesta precedente",da:"Diff med forrige anmodning",pl:"Różnica z poprzednim żądaniem",ru:"Отличия от предыдущего запроса",ar:"الفرق مع الطلب السابق",no:"Diff med forrige forespørsel","pt-BR":"Diff com a requisição anterior",th:"ความแตกต่างกับคำขอก่อนหน้า",tr:"Önceki istekle fark",uk:"Відмінності від попереднього запиту"},"ui.diffSessionChanged":{zh:"请求体大小减小,可能使用了 /clear、/compact 或 session 发生了变化",en:"Request body size decreased, possibly due to /clear, /compact, or session change","zh-TW":"請求體大小減小,可能使用了 /clear、/compact 或 session 發生了變化",ko:"요청 본문 크기가 줄었습니다. /clear, /compact 또는 세션 변경이 있었을 수 있습니다",ja:"リクエストボディのサイズが減少しました。/clear、/compact、またはセッション変更の可能性があります",de:"Anfragekörper wurde kleiner, möglicherweise durch /clear, /compact oder Sitzungswechsel",es:"El tamaño del cuerpo de la solicitud disminuyó, posiblemente debido a /clear, /compact o cambio de sesión",fr:"La taille du corps de la requête a diminué, possiblement dû à /clear, /compact ou un changement de session",it:"La dimensione del corpo della richiesta è diminuita, probabilmente a causa di /clear, /compact o cambio di sessione",da:"Anmodningens størrelse er reduceret, muligvis på grund af /clear, /compact eller sessionsændring",pl:"Rozmiar treści żądania zmniejszył się, prawdopodobnie z powodu /clear, /compact lub zmiany sesji",ru:"Размер тела запроса уменьшился, возможно из-за /clear, /compact или смены сессии",ar:"حجم نص الطلب انخفض، ربما بسبب /clear أو /compact أو تغيير الجلسة",no:"Forespørselens størrelse ble redusert, muligens på grunn av /clear, /compact eller sesjonsendring","pt-BR":"O tamanho do corpo da requisição diminuiu, possivelmente devido a /clear, /compact ou mudança de sessão",th:"ขนาดเนื้อหาคำขอลดลง อาจเกิดจาก /clear, /compact หรือการเปลี่ยนเซสชัน",tr:"İstek gövdesi boyutu küçüldü, muhtemelen /clear, /compact veya oturum değişikliği nedeniyle",uk:"Розмір тіла запиту зменшився, можливо через /clear, /compact або зміну сесії"},"ui.diffTooltip":{zh:"为了避免看冗长的全文,所以为大家简化展示了 MainAgent 的增量部分,通常只有 message 增加",en:"To avoid reading lengthy full text, only the incremental parts of MainAgent are shown — typically just new messages","zh-TW":"為了避免閱讀冗長的全文,簡化展示了 MainAgent 的增量部分,通常只有 message 增加",ko:"긴 전체 텍스트를 읽지 않도록 MainAgent의 증분 부분만 간략히 표시합니다. 일반적으로 message 추가만 있습니다",ja:"MainAgent の増分部分のみを簡略表示しています。長い全文を読む手間を省くため、通常は message の追加のみです",de:"Um das Lesen langer Volltexte zu vermeiden, werden nur die inkrementellen Teile des MainAgent angezeigt — in der Regel nur neue Nachrichten",es:"Para evitar leer textos completos extensos, solo se muestran las partes incrementales del MainAgent — normalmente solo mensajes nuevos",fr:"Pour éviter de lire de longs textes complets, seules les parties incrémentales du MainAgent sont affichées — généralement uniquement les nouveaux messages",it:"Per evitare di leggere lunghi testi completi, vengono mostrate solo le parti incrementali del MainAgent — di solito solo nuovi messaggi",da:"For at undgå at læse lange fuldtekster vises kun de inkrementelle dele af MainAgent — typisk kun nye beskeder",pl:"Aby uniknąć czytania długich pełnych tekstów, wyświetlane są tylko przyrostowe części MainAgent — zwykle tylko nowe wiadomości",ru:"Чтобы не читать длинный полный текст, отображаются только инкрементальные части MainAgent — обычно только новые сообщения",ar:"لتجنب قراءة النص الكامل الطويل، يتم عرض الأجزاء التزايدية فقط من MainAgent — عادةً فقط الرسائل الجديدة",no:"For å unngå å lese lange fulltekster vises kun de inkrementelle delene av MainAgent — vanligvis bare nye meldinger","pt-BR":"Para evitar ler textos completos longos, apenas as partes incrementais do MainAgent são exibidas — geralmente apenas novas mensagens",th:"เพื่อหลีกเลี่ยงการอ่านข้อความเต็มที่ยาว จึงแสดงเฉพาะส่วนที่เพิ่มขึ้นของ MainAgent เท่านั้น — โดยปกติจะมีเพียง message ใหม่",tr:"Uzun tam metinleri okumaktan kaçınmak için yalnızca MainAgent'ın artımlı kısımları gösterilir — genellikle yalnızca yeni mesajlar",uk:"Щоб не читати довгий повний текст, відображаються лише інкрементальні частини MainAgent — зазвичай лише нові повідомлення"},"cli.resume.prompt":{zh:"检测到1小时内的日志: {file}",en:"Recent log found (within 1 hour): {file}","zh-TW":"偵測到1小時內的日誌: {file}",ko:"1시간 이내 로그 감지: {file}",ja:"1時間以内のログを検出: {file}",de:"Kürzliches Log gefunden (innerhalb 1 Stunde): {file}",es:"Log reciente encontrado (dentro de 1 hora): {file}",fr:"Log récent trouvé (moins d'1 heure): {file}",it:"Log recente trovato (entro 1 ora): {file}",da:"Nylig log fundet (inden for 1 time): {file}",pl:"Znaleziono ostatni log (w ciągu 1 godziny): {file}",ru:"Обнаружен недавний лог (менее 1 часа): {file}",ar:"تم العثور على سجل حديث (خلال ساعة واحدة): {file}",no:"Nylig logg funnet (innen 1 time): {file}","pt-BR":"Log recente encontrado (dentro de 1 hora): {file}",th:"พบล็อกล่าสุด (ภายใน 1 ชั่วโมง): {file}",tr:"Son günlük bulundu (1 saat içinde): {file}",uk:"Знайдено нещодавній лог (менше 1 години): {file}"},"cli.resume.continue":{zh:"继续",en:"Continue","zh-TW":"繼續",ko:"계속",ja:"続行",de:"Fortsetzen",es:"Continuar",fr:"Continuer",it:"Continua",da:"Fortsæt",pl:"Kontynuuj",ru:"Продолжить",ar:"متابعة",no:"Fortsett","pt-BR":"Continuar",th:"ดำเนินการต่อ",tr:"Devam",uk:"Продовжити"},"cli.resume.new":{zh:"新开",en:"New","zh-TW":"新開",ko:"새로 시작",ja:"新規",de:"Neu",es:"Nuevo",fr:"Nouveau",it:"Nuovo",da:"Ny",pl:"Nowy",ru:"Новый",ar:"جديد",no:"Ny","pt-BR":"Novo",th:"ใหม่",tr:"Yeni",uk:"Новий"},"ui.resume.title":{zh:"检测到近期日志",en:"Recent Log Detected","zh-TW":"偵測到近期日誌",ko:"최근 로그 감지됨",ja:"最近のログを検出",de:"Kürzliches Log erkannt",es:"Log reciente detectado",fr:"Log récent détecté",it:"Log recente rilevato",da:"Nylig log fundet",pl:"Wykryto ostatni log",ru:"Обнаружен недавний лог",ar:"تم اكتشاف سجل حديث",no:"Nylig logg oppdaget","pt-BR":"Log recente detectado",th:"ตรวจพบล็อกล่าสุด",tr:"Son günlük tespit edildi",uk:"Виявлено нещодавній лог"},"ui.resume.message":{zh:"检测到1小时内的日志: {file},是否继续?",en:"Recent log found (within 1 hour): {file}. Continue?","zh-TW":"偵測到1小時內的日誌: {file},是否繼續?",ko:"1시간 이내 로그 감지: {file}. 계속하시겠습니까?",ja:"1時間以内のログを検出: {file}。続行しますか?",de:"Kürzliches Log gefunden (innerhalb 1 Stunde): {file}. Fortsetzen?",es:"Log reciente encontrado (dentro de 1 hora): {file}. ¿Continuar?",fr:"Log récent trouvé (moins d'1 heure): {file}. Continuer ?",it:"Log recente trovato (entro 1 ora): {file}. Continuare?",da:"Nylig log fundet (inden for 1 time): {file}. Fortsæt?",pl:"Znaleziono ostatni log (w ciągu 1 godziny): {file}. Kontynuować?",ru:"Обнаружен недавний лог (менее 1 часа): {file}. Продолжить?",ar:"تم العثور على سجل حديث (خلال ساعة واحدة): {file}. هل تريد المتابعة؟",no:"Nylig logg funnet (innen 1 time): {file}. Fortsette?","pt-BR":"Log recente encontrado (dentro de 1 hora): {file}. Continuar?",th:"พบล็อกล่าสุด (ภายใน 1 ชั่วโมง): {file} ต้องการดำเนินการต่อหรือไม่?",tr:"Son günlük bulundu (1 saat içinde): {file}. Devam edilsin mi?",uk:"Знайдено нещодавній лог (менше 1 години): {file}. Продовжити?"},"ui.resume.continue":{zh:"继续上次",en:"Continue","zh-TW":"繼續上次",ko:"이어서 계속",ja:"前回の続き",de:"Fortsetzen",es:"Continuar",fr:"Continuer",it:"Continua",da:"Fortsæt",pl:"Kontynuuj",ru:"Продолжить",ar:"متابعة",no:"Fortsett","pt-BR":"Continuar",th:"ดำเนินการต่อ",tr:"Devam et",uk:"Продовжити"},"ui.resume.new":{zh:"新开日志",en:"Start New","zh-TW":"新開日誌",ko:"새 로그 시작",ja:"新規ログ",de:"Neues Log",es:"Nuevo log",fr:"Nouveau log",it:"Nuovo log",da:"Ny log",pl:"Nowy log",ru:"Новый лог",ar:"سجل جديد",no:"Ny logg","pt-BR":"Novo log",th:"ล็อกใหม่",tr:"Yeni günlük",uk:"Новий лог"},"ui.settings":{zh:"设置",en:"Settings","zh-TW":"設定",ko:"설정",ja:"設定",de:"Einstellungen",es:"Configuración",fr:"Paramètres",it:"Impostazioni",da:"Indstillinger",pl:"Ustawienia",ru:"Настройки",ar:"الإعدادات",no:"Innstillinger","pt-BR":"Configurações",th:"ตั้งค่า",tr:"Ayarlar",uk:"Налаштування"},"ui.collapseToolResults":{zh:"折叠工具返回内容",en:"Collapse tool results","zh-TW":"摺疊工具回傳內容",ko:"도구 결과 접기",ja:"ツール結果を折りたたむ",de:"Werkzeugergebnisse einklappen",es:"Contraer resultados de herramientas",fr:"Réduire les résultats des outils",it:"Comprimi risultati strumenti",da:"Skjul værktøjsresultater",pl:"Zwiń wyniki narzędzi",ru:"Свернуть результаты инструментов",ar:"طي نتائج الأدوات",no:"Skjul verktøyresultater","pt-BR":"Recolher resultados de ferramentas",th:"ย่อผลลัพธ์เครื่องมือ",tr:"Araç sonuçlarını daralt",uk:"Згорнути результати інструментів"},"ui.expandThinking":{zh:'展开"思考过程"',en:'Expand "Thinking"',"zh-TW":'展開"思考過程"',ko:'"사고 과정" 펼치기',ja:'"思考プロセス"を展開',de:'"Denkprozess" aufklappen',es:'Expandir "Proceso de pensamiento"',fr:'Développer "Processus de réflexion"',it:'Espandi "Processo di pensiero"',da:'Udvid "Tænkeproces"',pl:'Rozwiń "Proces myślenia"',ru:'Развернуть "Процесс мышления"',ar:'توسيع "عملية التفكير"',no:'Utvid "Tenkeprosess"',"pt-BR":'Expandir "Processo de pensamento"',th:'ขยาย "กระบวนการคิด"',tr:'"Düşünce süreci"ni genişlet',uk:'Розгорнути "Процес мислення"'},"ui.expandDiff":{zh:"默认展开 Body Diff JSON",en:"Expand Body Diff JSON by default","zh-TW":"預設展開 Body Diff JSON",ko:"Body Diff JSON 기본 펼치기",ja:"Body Diff JSON をデフォルトで展開",de:"Body Diff JSON standardmäßig aufklappen",es:"Expandir Body Diff JSON por defecto",fr:"Développer Body Diff JSON par défaut",it:"Espandi Body Diff JSON per impostazione predefinita",da:"Udvid Body Diff JSON som standard",pl:"Domyślnie rozwiń Body Diff JSON",ru:"Разворачивать Body Diff JSON по умолчанию",ar:"توسيع Body Diff JSON افتراضيًا",no:"Utvid Body Diff JSON som standard","pt-BR":"Expandir Body Diff JSON por padrão",th:"ขยาย Body Diff JSON เป็นค่าเริ่มต้น",tr:"Body Diff JSON'u varsayılan olarak genişlet",uk:"Розгортати Body Diff JSON за замовчуванням"},"ui.globalSettings":{zh:"全局设置",en:"Global Settings","zh-TW":"全域設定",ko:"전역 설정",ja:"グローバル設定",de:"Globale Einstellungen",es:"Configuración global",fr:"Paramètres globaux",it:"Impostazioni globali",da:"Globale indstillinger",pl:"Ustawienia globalne",ru:"Глобальные настройки",ar:"الإعدادات العامة",no:"Globale innstillinger","pt-BR":"Configurações globais",th:"ตั้งค่าทั่วไป",tr:"Genel ayarlar",uk:"Глобальні налаштування"},"ui.filterIrrelevant":{zh:"过滤无关请求",en:"Filter irrelevant requests","zh-TW":"過濾無關請求",ko:"무관한 요청 필터링",ja:"無関係なリクエストをフィルタ",de:"Irrelevante Anfragen filtern",es:"Filtrar solicitudes irrelevantes",fr:"Filtrer les requêtes non pertinentes",it:"Filtra richieste irrilevanti",da:"Filtrer irrelevante forespørgsler",pl:"Filtruj nieistotne żądania",ru:"Фильтровать нерелевантные запросы",ar:"تصفية الطلبات غير ذات الصلة",no:"Filtrer irrelevante forespørsler","pt-BR":"Filtrar solicitações irrelevantes",th:"กรองคำขอที่ไม่เกี่ยวข้อง",tr:"İlgisiz istekleri filtrele",uk:"Фільтрувати нерелевантні запити"},"ui.thinking":{zh:"思考过程",en:"Thinking","zh-TW":"思考過程",ko:"사고 과정",ja:"思考プロセス",de:"Denkprozess",es:"Proceso de pensamiento",fr:"Processus de réflexion",it:"Processo di pensiero",da:"Tænkeproces",pl:"Proces myślenia",ru:"Процесс мышления",ar:"عملية التفكير",no:"Tenkeprosess","pt-BR":"Processo de pensamento",th:"กระบวนการคิด",tr:"Düşünce süreci",uk:"Процес мислення"},"ui.translate":{zh:"翻译",en:"Translate","zh-TW":"翻譯",ko:"번역",ja:"翻訳",de:"Übersetzen",es:"Traducir",fr:"Traduire",it:"Traduci",da:"Oversæt",pl:"Tłumacz",ru:"Перевести",ar:"ترجمة",no:"Oversett","pt-BR":"Traduzir",th:"แปล",tr:"Çevir",uk:"Перекласти"},"ui.translating":{zh:"翻译中…",en:"Translating…","zh-TW":"翻譯中…",ko:"번역 중…",ja:"翻訳中…",de:"Übersetze…",es:"Traduciendo…",fr:"Traduction…",it:"Traduzione…",da:"Oversætter…",pl:"Tłumaczenie…",ru:"Перевод…",ar:"جارٍ الترجمة…",no:"Oversetter…","pt-BR":"Traduzindo…",th:"กำลังแปล…",tr:"Çevriliyor…",uk:"Переклад…"},"ui.skillLoaded":{zh:"Skill 已加载",en:"Skill Loaded","zh-TW":"Skill 已載入",ko:"Skill 로드됨",ja:"Skill 読み込み済み",de:"Skill geladen",es:"Skill cargado",fr:"Skill chargé",it:"Skill caricato",da:"Skill indlæst",pl:"Skill załadowany",ru:"Skill загружен",ar:"تم تحميل Skill",no:"Skill lastet","pt-BR":"Skill carregado",th:"โหลด Skill แล้ว",tr:"Skill yüklendi",uk:"Skill завантажено"},"ui.cacheLoss.ttl":{zh:"缓存丢失:距上次 MainAgent 请求超过 5 分钟,缓存已过期",en:"Cache miss: over 5 minutes since last MainAgent request, cache expired","zh-TW":"快取遺失:距上次 MainAgent 請求超過 5 分鐘,快取已過期",ko:"캐시 손실: 마지막 MainAgent 요청 후 5분 초과, 캐시 만료",ja:"キャッシュミス:前回の MainAgent リクエストから5分以上経過、キャッシュ期限切れ",de:"Cache-Verlust: Über 5 Minuten seit letzter MainAgent-Anfrage, Cache abgelaufen",es:"Pérdida de caché: más de 5 minutos desde la última solicitud MainAgent, caché expirada",fr:"Perte de cache : plus de 5 minutes depuis la dernière requête MainAgent, cache expiré",it:"Cache persa: oltre 5 minuti dall'ultima richiesta MainAgent, cache scaduta",da:"Cache-tab: over 5 minutter siden sidste MainAgent-forespørgsel, cache udløbet",pl:"Utrata cache: ponad 5 minut od ostatniego żądania MainAgent, cache wygasł",ru:"Потеря кэша: прошло более 5 минут с последнего запроса MainAgent, кэш истёк",ar:"فقدان التخزين المؤقت: مرور أكثر من 5 دقائق منذ آخر طلب MainAgent، انتهت صلاحية التخزين المؤقت",no:"Cache-tap: over 5 minutter siden siste MainAgent-forespørsel, cache utløpt","pt-BR":"Perda de cache: mais de 5 minutos desde a última requisição MainAgent, cache expirado",th:"แคชหาย: เกิน 5 นาทีจากคำขอ MainAgent ล่าสุด แคชหมดอายุ",tr:"Önbellek kaybı: Son MainAgent isteğinden 5 dakikadan fazla geçti, önbellek süresi doldu",uk:"Втрата кешу: минуло понад 5 хвилин з останнього запиту MainAgent, кеш закінчився"},"ui.cacheLoss.systemChange":{zh:"缓存重建:system prompt 发生变更",en:"Cache rebuild: system prompt changed","zh-TW":"快取重建:system prompt 發生變更",ko:"캐시 재생성: 시스템 프롬프트 변경",ja:"キャッシュ再構築:システムプロンプトが変更されました",de:"Cache-Neuaufbau: System-Prompt geändert",es:"Reconstrucción de caché: el prompt del sistema cambió",fr:"Reconstruction du cache : le prompt système a changé",it:"Ricostruzione cache: il prompt di sistema è cambiato",da:"Cache-genopbygning: systemprompt ændret",pl:"Odbudowa cache: prompt systemowy zmieniony",ru:"Перестройка кэша: системный промпт изменён",ar:"إعادة بناء التخزين المؤقت: تم تغيير موجه النظام",no:"Cache-gjenoppbygging: systemprompt endret","pt-BR":"Reconstrução de cache: prompt do sistema alterado",th:"สร้างแคชใหม่: system prompt เปลี่ยนแปลง",tr:"Önbellek yeniden oluşturma: sistem istemi değişti",uk:"Перебудова кешу: системний промпт змінено"},"ui.cacheLoss.toolsChange":{zh:"缓存重建:工具定义发生变更",en:"Cache rebuild: tool definitions changed","zh-TW":"快取重建:工具定義發生變更",ko:"캐시 재생성: 도구 정의 변경",ja:"キャッシュ再構築:ツール定義が変更されました",de:"Cache-Neuaufbau: Tool-Definitionen geändert",es:"Reconstrucción de caché: las definiciones de herramientas cambiaron",fr:"Reconstruction du cache : les définitions d'outils ont changé",it:"Ricostruzione cache: le definizioni degli strumenti sono cambiate",da:"Cache-genopbygning: værktøjsdefinitioner ændret",pl:"Odbudowa cache: definicje narzędzi zmienione",ru:"Перестройка кэша: определения инструментов изменены",ar:"إعادة بناء التخزين المؤقت: تم تغيير تعريفات الأدوات",no:"Cache-gjenoppbygging: verktøydefinisjoner endret","pt-BR":"Reconstrução de cache: definições de ferramentas alteradas",th:"สร้างแคชใหม่: คำจำกัดความเครื่องมือเปลี่ยนแปลง",tr:"Önbellek yeniden oluşturma: araç tanımları değişti",uk:"Перебудова кешу: визначення інструментів змінено"},"ui.cacheLoss.modelChange":{zh:"缓存重建:模型切换",en:"Cache rebuild: model switched","zh-TW":"快取重建:模型切換",ko:"캐시 재생성: 모델 전환",ja:"キャッシュ再構築:モデルが切り替わりました",de:"Cache-Neuaufbau: Modell gewechselt",es:"Reconstrucción de caché: modelo cambiado",fr:"Reconstruction du cache : modèle changé",it:"Ricostruzione cache: modello cambiato",da:"Cache-genopbygning: model skiftet",pl:"Odbudowa cache: model zmieniony",ru:"Перестройка кэша: модель переключена",ar:"إعادة بناء التخزين المؤقت: تم تبديل النموذج",no:"Cache-gjenoppbygging: modell byttet","pt-BR":"Reconstrução de cache: modelo alterado",th:"สร้างแคชใหม่: เปลี่ยนโมเดล",tr:"Önbellek yeniden oluşturma: model değiştirildi",uk:"Перебудова кешу: модель переключено"},"ui.cacheLoss.msgTruncated":{zh:"缓存重建:消息栈被截断(上下文窗口溢出)",en:"Cache rebuild: message stack truncated (context window overflow)","zh-TW":"快取重建:訊息堆疊被截斷(上下文視窗溢出)",ko:"캐시 재생성: 메시지 스택 잘림 (컨텍스트 윈도우 오버플로)",ja:"キャッシュ再構築:メッセージスタックが切り詰められました(コンテキストウィンドウオーバーフロー)",de:"Cache-Neuaufbau: Nachrichtenstapel gekürzt (Kontextfenster-Überlauf)",es:"Reconstrucción de caché: pila de mensajes truncada (desbordamiento de ventana de contexto)",fr:"Reconstruction du cache : pile de messages tronquée (dépassement de la fenêtre de contexte)",it:"Ricostruzione cache: stack messaggi troncato (overflow finestra di contesto)",da:"Cache-genopbygning: beskedstakken afkortet (kontekstvindue-overløb)",pl:"Odbudowa cache: stos wiadomości obcięty (przepełnienie okna kontekstu)",ru:"Перестройка кэша: стек сообщений усечён (переполнение контекстного окна)",ar:"إعادة بناء التخزين المؤقت: تم اقتطاع مكدس الرسائل (تجاوز نافذة السياق)",no:"Cache-gjenoppbygging: meldingsstakken avkortet (kontekstvindu-overflyt)","pt-BR":"Reconstrução de cache: pilha de mensagens truncada (estouro da janela de contexto)",th:"สร้างแคชใหม่: สแต็กข้อความถูกตัด (context window ล้น)",tr:"Önbellek yeniden oluşturma: mesaj yığını kesildi (bağlam penceresi taşması)",uk:"Перебудова кешу: стек повідомлень обрізано (переповнення контекстного вікна)"},"ui.cacheLoss.msgModified":{zh:"缓存重建:历史消息内容被修改",en:"Cache rebuild: historical message content modified","zh-TW":"快取重建:歷史訊息內容被修改",ko:"캐시 재생성: 이전 메시지 내용 수정됨",ja:"キャッシュ再構築:過去のメッセージ内容が変更されました",de:"Cache-Neuaufbau: Historische Nachrichteninhalte geändert",es:"Reconstrucción de caché: contenido de mensajes históricos modificado",fr:"Reconstruction du cache : contenu des messages historiques modifié",it:"Ricostruzione cache: contenuto dei messaggi storici modificato",da:"Cache-genopbygning: historisk beskedindhold ændret",pl:"Odbudowa cache: treść historycznych wiadomości zmodyfikowana",ru:"Перестройка кэша: содержимое исторических сообщений изменено",ar:"إعادة بناء التخزين المؤقت: تم تعديل محتوى الرسائل السابقة",no:"Cache-gjenoppbygging: historisk meldingsinnhold endret","pt-BR":"Reconstrução de cache: conteúdo de mensagens históricas modificado",th:"สร้างแคชใหม่: เนื้อหาข้อความในประวัติถูกแก้ไข",tr:"Önbellek yeniden oluşturma: geçmiş mesaj içeriği değiştirildi",uk:"Перебудова кешу: вміст історичних повідомлень змінено"},"ui.cacheLoss.keyChange":{zh:"缓存重建:缓存键变更(原因未知)",en:"Cache rebuild: cache key changed (unknown reason)","zh-TW":"快取重建:快取鍵變更(原因未知)",ko:"캐시 재생성: 캐시 키 변경 (원인 불명)",ja:"キャッシュ再構築:キャッシュキーが変更されました(原因不明)",de:"Cache-Neuaufbau: Cache-Schlüssel geändert (Grund unbekannt)",es:"Reconstrucción de caché: clave de caché cambiada (razón desconocida)",fr:"Reconstruction du cache : clé de cache modifiée (raison inconnue)",it:"Ricostruzione cache: chiave cache cambiata (motivo sconosciuto)",da:"Cache-genopbygning: cache-nøgle ændret (ukendt årsag)",pl:"Odbudowa cache: klucz cache zmieniony (nieznana przyczyna)",ru:"Перестройка кэша: ключ кэша изменён (причина неизвестна)",ar:"إعادة بناء التخزين المؤقت: تم تغيير مفتاح التخزين المؤقت (سبب غير معروف)",no:"Cache-gjenoppbygging: cache-nøkkel endret (ukjent årsak)","pt-BR":"Reconstrução de cache: chave de cache alterada (motivo desconhecido)",th:"สร้างแคชใหม่: คีย์แคชเปลี่ยนแปลง (ไม่ทราบสาเหตุ)",tr:"Önbellek yeniden oluşturma: önbellek anahtarı değişti (bilinmeyen neden)",uk:"Перебудова кешу: ключ кешу змінено (причина невідома)"},"ui.cacheRebuildStats":{zh:"缓存重建统计",en:"Cache Rebuild Stats","zh-TW":"快取重建統計",ko:"캐시 재구축 통계",ja:"キャッシュ再構築統計",de:"Cache-Neuaufbau-Statistik",es:"Estadísticas de reconstrucción de caché",fr:"Statistiques de reconstruction du cache",it:"Statistiche ricostruzione cache",da:"Cache-genopbygningsstatistik",pl:"Statystyki przebudowy cache",ru:"Статистика перестройки кеша",ar:"إحصائيات إعادة بناء ذاكرة التخزين المؤقت",no:"Cache-gjenoppbyggingsstatistikk","pt-BR":"Estatísticas de reconstrução de cache",th:"สถิติการสร้างแคชใหม่",tr:"Önbellek Yeniden Oluşturma İstatistikleri",uk:"Статистика перебудови кешу"},"ui.cacheRebuild.reason":{zh:"原因",en:"Reason","zh-TW":"原因",ko:"원인",ja:"原因",de:"Ursache",es:"Razón",fr:"Raison",it:"Motivo",da:"Årsag",pl:"Przyczyna",ru:"Причина",ar:"السبب",no:"Årsak","pt-BR":"Razão",th:"สาเหตุ",tr:"Neden",uk:"Причина"},"ui.cacheRebuild.count":{zh:"次数",en:"Count","zh-TW":"次數",ko:"횟수",ja:"回数",de:"Anzahl",es:"Veces",fr:"Nombre",it:"Volte",da:"Antal",pl:"Liczba",ru:"Кол-во",ar:"العدد",no:"Antall","pt-BR":"Vezes",th:"จำนวน",tr:"Sayı",uk:"Кількість"},"ui.cacheRebuild.cacheCreate":{zh:"重建缓存量",en:"Cache Created","zh-TW":"重建快取量",ko:"재구축 캐시량",ja:"再構築キャッシュ量",de:"Cache erstellt",es:"Caché creado",fr:"Cache créé",it:"Cache creata",da:"Cache oprettet",pl:"Utworzony cache",ru:"Создано кеша",ar:"الذاكرة المؤقتة المُنشأة",no:"Cache opprettet","pt-BR":"Cache criado",th:"แคชที่สร้าง",tr:"Oluşturulan önbellek",uk:"Створено кешу"},"ui.cacheRebuild.ttl":{zh:"缓存过期",en:"Cache Expired","zh-TW":"快取過期",ko:"캐시 만료",ja:"キャッシュ期限切れ",de:"Cache abgelaufen",es:"Caché expirado",fr:"Cache expiré",it:"Cache scaduta",da:"Cache udløbet",pl:"Cache wygasł",ru:"Кеш истёк",ar:"انتهاء صلاحية الذاكرة المؤقتة",no:"Cache utløpt","pt-BR":"Cache expirado",th:"แคชหมดอายุ",tr:"Önbellek süresi doldu",uk:"Кеш закінчився"},"ui.cacheRebuild.systemChange":{zh:"System Prompt 变更",en:"System Prompt Changed","zh-TW":"System Prompt 變更",ko:"System Prompt 변경",ja:"System Prompt 変更",de:"System Prompt geändert",es:"System Prompt cambiado",fr:"System Prompt modifié",it:"System Prompt modificato",da:"System Prompt ændret",pl:"System Prompt zmieniony",ru:"System Prompt изменён",ar:"تغيير System Prompt",no:"System Prompt endret","pt-BR":"System Prompt alterado",th:"System Prompt เปลี่ยนแปลง",tr:"System Prompt değişti",uk:"System Prompt змінено"},"ui.cacheRebuild.toolsChange":{zh:"工具定义变更",en:"Tools Changed","zh-TW":"工具定義變更",ko:"도구 정의 변경",ja:"ツール定義変更",de:"Tools geändert",es:"Herramientas cambiadas",fr:"Outils modifiés",it:"Strumenti modificati",da:"Værktøjer ændret",pl:"Narzędzia zmienione",ru:"Инструменты изменены",ar:"تغيير الأدوات",no:"Verktøy endret","pt-BR":"Ferramentas alteradas",th:"เครื่องมือเปลี่ยนแปลง",tr:"Araçlar değişti",uk:"Інструменти змінено"},"ui.cacheRebuild.modelChange":{zh:"模型切换",en:"Model Switched","zh-TW":"模型切換",ko:"모델 전환",ja:"モデル切替",de:"Modell gewechselt",es:"Modelo cambiado",fr:"Modèle changé",it:"Modello cambiato",da:"Model skiftet",pl:"Model zmieniony",ru:"Модель переключена",ar:"تبديل النموذج",no:"Modell byttet","pt-BR":"Modelo alterado",th:"เปลี่ยนโมเดล",tr:"Model değiştirildi",uk:"Модель переключено"},"ui.cacheRebuild.msgTruncated":{zh:"消息栈被截断",en:"Messages Truncated","zh-TW":"訊息堆疊被截斷",ko:"메시지 스택 잘림",ja:"メッセージスタック切り詰め",de:"Nachrichten abgeschnitten",es:"Mensajes truncados",fr:"Messages tronqués",it:"Messaggi troncati",da:"Beskeder afkortet",pl:"Wiadomości obcięte",ru:"Сообщения обрезаны",ar:"اقتطاع الرسائل",no:"Meldinger avkortet","pt-BR":"Mensagens truncadas",th:"ข้อความถูกตัด",tr:"Mesajlar kesildi",uk:"Повідомлення обрізано"},"ui.cacheRebuild.msgModified":{zh:"历史消息修改",en:"Messages Modified","zh-TW":"歷史訊息修改",ko:"기록 메시지 수정",ja:"履歴メッセージ変更",de:"Nachrichten geändert",es:"Mensajes modificados",fr:"Messages modifiés",it:"Messaggi modificati",da:"Beskeder ændret",pl:"Wiadomości zmodyfikowane",ru:"Сообщения изменены",ar:"تعديل الرسائل",no:"Meldinger endret","pt-BR":"Mensagens modificadas",th:"ข้อความถูกแก้ไข",tr:"Mesajlar değiştirildi",uk:"Повідомлення змінено"},"ui.cacheRebuild.keyChange":{zh:"未知键变更",en:"Unknown Key Change","zh-TW":"未知鍵變更",ko:"알 수 없는 키 변경",ja:"不明なキー変更",de:"Unbekannte Schlüsseländerung",es:"Cambio de clave desconocido",fr:"Changement de clé inconnu",it:"Modifica chiave sconosciuta",da:"Ukendt nøgleændring",pl:"Nieznana zmiana klucza",ru:"Неизвестное изменение ключа",ar:"تغيير مفتاح غير معروف",no:"Ukjent nøkkelendring","pt-BR":"Alteração de chave desconhecida",th:"การเปลี่ยนแปลงคีย์ที่ไม่ทราบ",tr:"Bilinmeyen anahtar değişikliği",uk:"Невідома зміна ключа"},"ui.skillUsageStats":{zh:"Skill 使用统计",en:"Skill Usage Stats","zh-TW":"Skill 使用統計",ko:"Skill 사용 통계",ja:"Skill 使用統計",de:"Skill-Nutzungsstatistik",es:"Estadísticas de uso de Skills",fr:"Statistiques d'utilisation des Skills",it:"Statistiche utilizzo Skill",da:"Skill-brugsstatistik",pl:"Statystyki użycia Skill",ru:"Статистика использования Skill",ar:"إحصائيات استخدام Skill",no:"Skill-bruksstatistikk","pt-BR":"Estatísticas de uso de Skills",th:"สถิติการใช้ Skill",tr:"Skill Kullanım İstatistikleri",uk:"Статистика використання Skill"},"ui.toolUsageStats":{zh:"工具使用统计",en:"Tool Usage Stats","zh-TW":"工具使用統計",ko:"도구 사용 통계",ja:"ツール使用統計",de:"Tool-Nutzungsstatistik",es:"Estadísticas de uso de herramientas",fr:"Statistiques d'utilisation des outils",it:"Statistiche utilizzo strumenti",da:"Værktøjsbrugsstatistik",pl:"Statystyki użycia narzędzi",ru:"Статистика использования инструментов",ar:"إحصائيات استخدام الأدوات",no:"Verktøybruksstatistikk","pt-BR":"Estatísticas de uso de ferramentas",th:"สถิติการใช้เครื่องมือ",tr:"Araç Kullanım İstatistikleri",uk:"Статистика використання інструментів"},"ui.subAgentStats":{zh:"SubAgent 调用统计",en:"SubAgent Call Stats","zh-TW":"SubAgent 調用統計",ko:"SubAgent 호출 통계",ja:"SubAgent 呼び出し統計",de:"SubAgent-Aufrufstatistik",es:"Estadísticas de llamadas SubAgent",fr:"Statistiques d'appels SubAgent",it:"Statistiche chiamate SubAgent",da:"SubAgent-kaldsstatistik",pl:"Statystyki wywołań SubAgent",ru:"Статистика вызовов SubAgent",ar:"إحصائيات استدعاء SubAgent",no:"SubAgent-anropsstatistikk","pt-BR":"Estatísticas de chamadas SubAgent",th:"สถิติการเรียก SubAgent",tr:"SubAgent Çağrı İstatistikleri",uk:"Статистика викликів SubAgent"},"ui.mergeLogs":{zh:"合并日志",en:"Merge Logs","zh-TW":"合併日誌",ko:"로그 병합",ja:"ログを結合",de:"Logs zusammenführen",es:"Fusionar logs",fr:"Fusionner les logs",it:"Unisci log",da:"Flet logs",pl:"Scal logi",ru:"Объединить логи",ar:"دمج السجلات",no:"Slå sammen logger","pt-BR":"Mesclar logs",th:"รวมบันทึก",tr:"Logları birleştir",uk:"Об'єднати логи"},"ui.openLog":{zh:"打开",en:"Open","zh-TW":"開啟",ko:"열기",ja:"開く",de:"Öffnen",es:"Abrir",fr:"Ouvrir",it:"Apri",da:"Åbn",pl:"Otwórz",ru:"Открыть",ar:"فتح",no:"Åpne","pt-BR":"Abrir",th:"เปิด",tr:"Aç",uk:"Відкрити"},"ui.turns":{zh:"轮",en:"turns","zh-TW":"輪",ko:"턴",ja:"ターン",de:"Runden",es:"turnos",fr:"tours",it:"turni",da:"runder",pl:"tur",ru:"ходов",ar:"جولات",no:"runder","pt-BR":"turnos",th:"รอบ",tr:"tur",uk:"ходів"},"ui.mergeNotConsecutive":{zh:"请选择连续的日志文件",en:"Please select consecutive log files","zh-TW":"請選擇連續的日誌檔案",ko:"연속된 로그 파일을 선택하세요",ja:"連続したログファイルを選択してください",de:"Bitte wählen Sie aufeinanderfolgende Log-Dateien",es:"Seleccione archivos de log consecutivos",fr:"Veuillez sélectionner des fichiers de log consécutifs",it:"Seleziona file di log consecutivi",da:"Vælg venligst sammenhængende logfiler",pl:"Wybierz kolejne pliki logów",ru:"Выберите последовательные файлы логов",ar:"يرجى اختيار ملفات سجلات متتالية",no:"Velg sammenhengende loggfiler","pt-BR":"Selecione arquivos de log consecutivos",th:"กรุณาเลือกไฟล์บันทึกที่ต่อเนื่องกัน",tr:"Lütfen ardışık log dosyalarını seçin",uk:"Виберіть послідовні файли логів"},"ui.mergeTooLarge":{zh:"选中的日志文件总大小超过 500MB",en:"Selected log files exceed 500MB","zh-TW":"選中的日誌檔案總大小超過 500MB",ko:"선택한 로그 파일의 총 크기가 500MB를 초과합니다",ja:"選択したログファイルの合計サイズが 500MB を超えています",de:"Ausgewählte Log-Dateien überschreiten 500MB",es:"Los archivos de log seleccionados superan los 500MB",fr:"Les fichiers de log sélectionnés dépassent 500 Mo",it:"I file di log selezionati superano i 500MB",da:"Valgte logfiler overstiger 500MB",pl:"Wybrane pliki logów przekraczają 500MB",ru:"Выбранные файлы логов превышают 500МБ",ar:"ملفات السجلات المحددة تتجاوز 500 ميجابايت",no:"Valgte loggfiler overstiger 500MB","pt-BR":"Arquivos de log selecionados excedem 500MB",th:"ไฟล์บันทึกที่เลือกมีขนาดรวมเกิน 500MB",tr:"Seçilen log dosyaları 500MB'ı aşıyor",uk:"Вибрані файли логів перевищують 500МБ"},"ui.mergeSuccess":{zh:"日志合并成功",en:"Logs merged successfully","zh-TW":"日誌合併成功",ko:"로그 병합 성공",ja:"ログの結合に成功しました",de:"Logs erfolgreich zusammengeführt",es:"Logs fusionados correctamente",fr:"Logs fusionnés avec succès",it:"Log uniti con successo",da:"Logs flettet",pl:"Logi scalone pomyślnie",ru:"Логи успешно объединены",ar:"تم دمج السجلات بنجاح",no:"Logger slått sammen","pt-BR":"Logs mesclados com sucesso",th:"รวมบันทึกสำเร็จ",tr:"Loglar başarıyla birleştirildi",uk:"Логи успішно об'єднано"},"ui.mergeLatestNotAllowed":{zh:"最新的日志文件不允许被合并,以避免当前窗口日志丢失",en:"The latest log file cannot be merged to avoid losing the current session","zh-TW":"最新的日誌檔案不允許被合併,以避免當前視窗日誌遺失",ko:"현재 세션 손실을 방지하기 위해 최신 로그 파일은 병합할 수 없습니다",ja:"現在のセッションの損失を防ぐため、最新のログファイルは結合できません",de:"Die neueste Logdatei kann nicht zusammengeführt werden, um den Verlust der aktuellen Sitzung zu vermeiden",es:"El archivo de log más reciente no se puede fusionar para evitar perder la sesión actual",fr:"Le fichier de log le plus récent ne peut pas être fusionné pour éviter la perte de la session en cours",it:"Il file di log più recente non può essere unito per evitare la perdita della sessione corrente",da:"Den nyeste logfil kan ikke flettes for at undgå tab af den aktuelle session",pl:"Najnowszy plik logów nie może być scalony, aby uniknąć utraty bieżącej sesji",ru:"Последний файл логов не может быть объединён, чтобы избежать потери текущей сессии",ar:"لا يمكن دمج أحدث ملف سجل لتجنب فقدان الجلسة الحالية",no:"Den nyeste loggfilen kan ikke slås sammen for å unngå tap av gjeldende økt","pt-BR":"O arquivo de log mais recente não pode ser mesclado para evitar perda da sessão atual",th:"ไม่สามารถรวมไฟล์บันทึกล่าสุดเพื่อหลีกเลี่ยงการสูญเสียเซสชันปัจจุบัน",tr:"Mevcut oturumun kaybını önlemek için en son günlük dosyası birleştirilemez",uk:"Найновіший файл логів не може бути об'єднаний, щоб уникнути втрати поточної сесії"},"ui.projectStats":{zh:"项目统计",en:"Project Stats","zh-TW":"專案統計",ko:"프로젝트 통계",ja:"プロジェクト統計",de:"Projektstatistik",es:"Estadísticas del proyecto",fr:"Statistiques du projet",it:"Statistiche progetto",da:"Projektstatistik",pl:"Statystyki projektu",ru:"Статистика проекта",ar:"إحصائيات المشروع",no:"Prosjektstatistikk","pt-BR":"Estatísticas do projeto",th:"สถิติโปรเจกต์",tr:"Proje İstatistikleri",uk:"Статистика проєкту"},"ui.projectStats.totalRequests":{zh:"总请求数",en:"Total Requests","zh-TW":"總請求數",ko:"총 요청 수",ja:"リクエスト総数",de:"Gesamtanfragen",es:"Total de solicitudes",fr:"Total des requêtes",it:"Richieste totali",da:"Samlede forespørgsler",pl:"Łączna liczba żądań",ru:"Всего запросов",ar:"إجمالي الطلبات",no:"Totale forespørsler","pt-BR":"Total de requisições",th:"คำขอทั้งหมด",tr:"Toplam İstekler",uk:"Всього запитів"},"ui.projectStats.sessionCount":{zh:"会话轮次",en:"Sessions","zh-TW":"會話輪次",ko:"세션 수",ja:"セッション数",de:"Sitzungen",es:"Sesiones",fr:"Sessions",it:"Sessioni",da:"Sessioner",pl:"Sesje",ru:"Сессий",ar:"الجلسات",no:"Sesjoner","pt-BR":"Sessões",th:"เซสชัน",tr:"Oturumlar",uk:"Сесії"},"ui.projectStats.totalFiles":{zh:"会话文件数",en:"Session Files","zh-TW":"會話檔案數",ko:"세션 파일 수",ja:"セッションファイル数",de:"Sitzungsdateien",es:"Archivos de sesión",fr:"Fichiers de session",it:"File di sessione",da:"Sessionsfiler",pl:"Pliki sesji",ru:"Файлов сессий",ar:"ملفات الجلسات",no:"Sesjonsfiler","pt-BR":"Arquivos de sessão",th:"ไฟล์เซสชัน",tr:"Oturum Dosyaları",uk:"Файли сесій"},"ui.projectStats.modelUsage":{zh:"模型使用统计",en:"Model Usage","zh-TW":"模型使用統計",ko:"모델 사용 통계",ja:"モデル使用統計",de:"Modellnutzung",es:"Uso de modelos",fr:"Utilisation des modèles",it:"Utilizzo modelli",da:"Modelbrug",pl:"Użycie modeli",ru:"Использование моделей",ar:"استخدام النماذج",no:"Modellbruk","pt-BR":"Uso de modelos",th:"การใช้โมเดล",tr:"Model Kullanımı",uk:"Використання моделей"},"ui.projectStats.noData":{zh:"暂无统计数据",en:"No stats available","zh-TW":"暫無統計資料",ko:"통계 데이터 없음",ja:"統計データなし",de:"Keine Statistiken verfügbar",es:"Sin estadísticas disponibles",fr:"Aucune statistique disponible",it:"Nessuna statistica disponibile",da:"Ingen statistik tilgængelig",pl:"Brak dostępnych statystyk",ru:"Статистика недоступна",ar:"لا توجد إحصائيات متاحة",no:"Ingen statistikk tilgjengelig","pt-BR":"Sem estatísticas disponíveis",th:"ไม่มีข้อมูลสถิติ",tr:"İstatistik mevcut değil",uk:"Статистика недоступна"},"ui.projectStats.updatedAt":{zh:"更新于 {time}",en:"Updated at {time}","zh-TW":"更新於 {time}",ko:"{time}에 업데이트됨",ja:"{time} に更新",de:"Aktualisiert um {time}",es:"Actualizado a las {time}",fr:"Mis à jour à {time}",it:"Aggiornato alle {time}",da:"Opdateret {time}",pl:"Zaktualizowano {time}",ru:"Обновлено в {time}",ar:"تم التحديث في {time}",no:"Oppdatert {time}","pt-BR":"Atualizado em {time}",th:"อัปเดตเมื่อ {time}",tr:"{time} tarihinde güncellendi",uk:"Оновлено о {time}"},"ui.update.completed":{zh:"已更新到 v{version},下次启动生效",en:"Updated to v{version}, effective on next restart","zh-TW":"已更新到 v{version},下次啟動生效",ko:"v{version}으로 업데이트됨, 다음 시작 시 적용",ja:"v{version} に更新済み、次回起動時に有効",de:"Auf v{version} aktualisiert, wirksam beim nächsten Neustart",es:"Actualizado a v{version}, efectivo en el próximo reinicio",fr:"Mis à jour vers v{version}, effectif au prochain redémarrage",it:"Aggiornato a v{version}, effettivo al prossimo riavvio",da:"Opdateret til v{version}, træder i kraft ved næste genstart",pl:"Zaktualizowano do v{version}, obowiązuje po ponownym uruchomieniu",ru:"Обновлено до v{version}, вступит в силу при следующем запуске",ar:"تم التحديث إلى v{version}، سيسري عند إعادة التشغيل التالية",no:"Oppdatert til v{version}, trer i kraft ved neste omstart","pt-BR":"Atualizado para v{version}, efetivo na próxima reinicialização",th:"อัปเดตเป็น v{version} แล้ว มีผลเมื่อเริ่มใหม่",tr:"v{version} sürümüne güncellendi, bir sonraki başlatmada geçerli",uk:"Оновлено до v{version}, набуде чинності при наступному запуску"},"ui.update.majorAvailable":{zh:"新大版本 v{version} 可用,请手动更新: npm i -g cc-viewer@latest",en:"Major version v{version} available, update manually: npm i -g cc-viewer@latest","zh-TW":"新大版本 v{version} 可用,請手動更新: npm i -g cc-viewer@latest",ko:"새 메이저 버전 v{version} 사용 가능, 수동 업데이트: npm i -g cc-viewer@latest",ja:"メジャーバージョン v{version} が利用可能、手動更新: npm i -g cc-viewer@latest",de:"Hauptversion v{version} verfügbar, manuell aktualisieren: npm i -g cc-viewer@latest",es:"Versión principal v{version} disponible, actualice: npm i -g cc-viewer@latest",fr:"Version majeure v{version} disponible, mettez à jour : npm i -g cc-viewer@latest",it:"Versione principale v{version} disponibile, aggiornare: npm i -g cc-viewer@latest",da:"Hovedversion v{version} tilgængelig, opdater manuelt: npm i -g cc-viewer@latest",pl:"Główna wersja v{version} dostępna, zaktualizuj: npm i -g cc-viewer@latest",ru:"Доступна основная версия v{version}, обновите: npm i -g cc-viewer@latest",ar:"الإصدار الرئيسي v{version} متاح، حدّث يدويًا: npm i -g cc-viewer@latest",no:"Hovedversjon v{version} tilgjengelig, oppdater manuelt: npm i -g cc-viewer@latest","pt-BR":"Versão principal v{version} disponível, atualize: npm i -g cc-viewer@latest",th:"เวอร์ชันหลัก v{version} พร้อมใช้งาน อัปเดตด้วยตนเอง: npm i -g cc-viewer@latest",tr:"Ana sürüm v{version} mevcut, manuel güncelleyin: npm i -g cc-viewer@latest",uk:"Доступна основна версія v{version}, оновіть: npm i -g cc-viewer@latest"},"ui.chatInput.placeholder":{zh:"输入消息发送给 Claude...",en:"Type a message to Claude...","zh-TW":"輸入訊息傳送給 Claude...",ko:"Claude에게 메시지를 입력하세요...",ja:"Claudeにメッセージを入力...",de:"Nachricht an Claude eingeben...",es:"Escribe un mensaje para Claude...",fr:"Tapez un message pour Claude...",it:"Scrivi un messaggio per Claude...",da:"Skriv en besked til Claude...",pl:"Wpisz wiadomość do Claude...",ru:"Введите сообщение для Claude...",ar:"اكتب رسالة إلى Claude...",no:"Skriv en melding til Claude...","pt-BR":"Digite uma mensagem para o Claude...",th:"พิมพ์ข้อความถึง Claude...",tr:"Claude'a mesaj yazın...",uk:"Введіть повідомлення для Claude..."},"ui.chatInput.send":{zh:"发送",en:"Send","zh-TW":"傳送",ko:"보내기",ja:"送信",de:"Senden",es:"Enviar",fr:"Envoyer",it:"Invia",da:"Send",pl:"Wyślij",ru:"Отправить",ar:"إرسال",no:"Send","pt-BR":"Enviar",th:"ส่ง",tr:"Gönder",uk:"Надіслати"},"ui.chatInput.hintEnter":{zh:"Enter 发送,Shift+Enter 换行",en:"Enter to send, Shift+Enter for new line","zh-TW":"Enter 傳送,Shift+Enter 換行",ko:"Enter로 전송, Shift+Enter로 줄바꿈",ja:"Enterで送信、Shift+Enterで改行",de:"Enter zum Senden, Shift+Enter für neue Zeile",es:"Enter para enviar, Shift+Enter para nueva línea",fr:"Entrée pour envoyer, Shift+Entrée pour nouvelle ligne",it:"Invio per inviare, Shift+Invio per nuova riga",da:"Enter for at sende, Shift+Enter for ny linje",pl:"Enter aby wysłać, Shift+Enter nowa linia",ru:"Enter — отправить, Shift+Enter — новая строка",ar:"Enter للإرسال، Shift+Enter لسطر جديد",no:"Enter for å sende, Shift+Enter for ny linje","pt-BR":"Enter para enviar, Shift+Enter para nova linha",th:"Enter ส่ง, Shift+Enter ขึ้นบรรทัดใหม่",tr:"Enter gönder, Shift+Enter yeni satır",uk:"Enter — надіслати, Shift+Enter — новий рядок"},"ui.chatInput.hintTab":{zh:"Tab 接受建议",en:"Tab to accept suggestion","zh-TW":"Tab 接受建議",ko:"Tab으로 제안 수락",ja:"Tabで提案を受け入れ",de:"Tab zum Akzeptieren des Vorschlags",es:"Tab para aceptar sugerencia",fr:"Tab pour accepter la suggestion",it:"Tab per accettare il suggerimento",da:"Tab for at acceptere forslag",pl:"Tab aby zaakceptować sugestię",ru:"Tab — принять предложение",ar:"Tab لقبول الاقتراح",no:"Tab for å akseptere forslag","pt-BR":"Tab para aceitar sugestão",th:"Tab ยอมรับคำแนะนำ",tr:"Tab ile öneriyi kabul et",uk:"Tab — прийняти пропозицію"},"ui.terminal":{zh:"终端",en:"Terminal","zh-TW":"終端機",ko:"터미널",ja:"ターミナル",de:"Terminal",es:"Terminal",fr:"Terminal",it:"Terminale",da:"Terminal",pl:"Terminal",ru:"Терминал",ar:"طرفية",no:"Terminal","pt-BR":"Terminal",th:"เทอร์มินัล",tr:"Terminal",uk:"Термінал"},"ui.stickyBottom":{zh:"保持吸底",en:"Stick to bottom","zh-TW":"保持置底",ko:"하단 고정",ja:"下部に固定",de:"Unten fixieren",es:"Fijar al fondo",fr:"Fixer en bas",it:"Fissa in basso",da:"Fastgør i bunden",pl:"Przypnij na dole",ru:"Прикрепить внизу",ar:"تثبيت في الأسفل",no:"Fest til bunnen","pt-BR":"Fixar no fundo",th:"ตรึงด้านล่าง",tr:"Alta sabitle",uk:"Закріпити внизу"},"ui.askQuestion":{zh:"提问",en:"Question","zh-TW":"提問",ko:"질문",ja:"質問",de:"Frage",es:"Pregunta",fr:"Question",it:"Domanda",da:"Spørgsmål",pl:"Pytanie",ru:"Вопрос",ar:"سؤال",no:"Spørsmål","pt-BR":"Pergunta",th:"คำถาม",tr:"Soru",uk:"Питання"},"ui.enterPlanMode":{zh:"进入计划模式",en:"Entering Plan Mode","zh-TW":"進入計劃模式",ko:"계획 모드 진입",ja:"プランモードに入ります",de:"Planungsmodus wird gestartet",es:"Entrando en modo de planificación",fr:"Entrée en mode planification",it:"Accesso alla modalità pianificazione",da:"Går ind i planlægningstilstand",pl:"Wchodzenie w tryb planowania",ru:"Вход в режим планирования",ar:"الدخول في وضع التخطيط",no:"Går inn i planleggingsmodus","pt-BR":"Entrando no modo de planejamento",th:"เข้าสู่โหมดวางแผน",tr:"Plan moduna giriliyor",uk:"Вхід у режим планування"},"ui.exitPlanMode":{zh:"计划就绪,等待审批",en:"Plan Ready for Approval","zh-TW":"計劃就緒,等待審批",ko:"계획 준비 완료, 승인 대기",ja:"プラン準備完了、承認待ち",de:"Plan bereit zur Genehmigung",es:"Plan listo para aprobación",fr:"Plan prêt pour approbation",it:"Piano pronto per l'approvazione",da:"Plan klar til godkendelse",pl:"Plan gotowy do zatwierdzenia",ru:"План готов к утверждению",ar:"الخطة جاهزة للموافقة",no:"Plan klar for godkjenning","pt-BR":"Plano pronto para aprovação",th:"แผนพร้อมรอการอนุมัติ",tr:"Plan onaya hazır",uk:"План готовий до затвердження"},"ui.allowedPrompts":{zh:"请求的权限",en:"Requested Permissions","zh-TW":"請求的權限",ko:"요청된 권한",ja:"要求された権限",de:"Angeforderte Berechtigungen",es:"Permisos solicitados",fr:"Permissions demandées",it:"Permessi richiesti",da:"Anmodede tilladelser",pl:"Żądane uprawnienia",ru:"Запрошенные разрешения",ar:"الأذونات المطلوبة",no:"Forespurte tillatelser","pt-BR":"Permissões solicitadas",th:"สิทธิ์ที่ร้องขอ",tr:"İstenen izinler",uk:"Запитані дозволи"},"ui.context.systemPrompt":{zh:"系统提示词",en:"System Prompt","zh-TW":"系統提示詞",ko:"시스템 프롬프트",ja:"システムプロンプト",de:"System-Prompt",es:"Prompt del sistema",fr:"Prompt système",it:"Prompt di sistema",da:"System-prompt",pl:"Prompt systemowy",ru:"Системный промпт",ar:"موجه النظام",no:"System-prompt","pt-BR":"Prompt do sistema",th:"System Prompt",tr:"Sistem Prompt'u",uk:"Системний промпт"},"ui.context.messages":{zh:"消息",en:"Messages","zh-TW":"訊息",ko:"메시지",ja:"メッセージ",de:"Nachrichten",es:"Mensajes",fr:"Messages",it:"Messaggi",da:"Beskeder",pl:"Wiadomości",ru:"Сообщения",ar:"الرسائل",no:"Meldinger","pt-BR":"Mensagens",th:"ข้อความ",tr:"Mesajlar",uk:"Повідомлення"},"ui.context.tools":{zh:"工具",en:"Tools","zh-TW":"工具",ko:"도구",ja:"ツール",de:"Tools",es:"Herramientas",fr:"Outils",it:"Strumenti",da:"Værktøjer",pl:"Narzędzia",ru:"Инструменты",ar:"الأدوات",no:"Verktøy","pt-BR":"Ferramentas",th:"เครื่องมือ",tr:"Araçlar",uk:"Інструменти"},"ui.context.noData":{zh:"暂无 Context 数据",en:"No context data","zh-TW":"暫無 Context 資料",ko:"컨텍스트 데이터 없음",ja:"コンテキストデータなし",de:"Keine Kontextdaten",es:"Sin datos de contexto",fr:"Aucune donnée de contexte",it:"Nessun dato di contesto",da:"Ingen kontekstdata",pl:"Brak danych kontekstu",ru:"Нет данных контекста",ar:"لا توجد بيانات سياق",no:"Ingen kontekstdata","pt-BR":"Sem dados de contexto",th:"ไม่มีข้อมูล Context",tr:"Bağlam verisi yok",uk:"Немає даних контексту"},"ui.context.noFields":{zh:"Request body 中未找到 messages / system / tools",en:"No messages / system / tools found in request body","zh-TW":"Request body 中未找到 messages / system / tools",ko:"요청 본문에서 messages / system / tools를 찾을 수 없음",ja:"リクエストボディに messages / system / tools が見つかりません",de:"Keine messages / system / tools im Request-Body gefunden",es:"No se encontraron messages / system / tools en el cuerpo de la solicitud",fr:"Aucun messages / system / tools dans le corps de la requête",it:"Nessun messages / system / tools trovato nel corpo della richiesta",da:"Ingen messages / system / tools fundet i request body",pl:"Nie znaleziono messages / system / tools w treści żądania",ru:"В теле запроса не найдено messages / system / tools",ar:"لم يتم العثور على messages / system / tools في جسم الطلب",no:"Ingen messages / system / tools funnet i request body","pt-BR":"Nenhum messages / system / tools encontrado no corpo da requisição",th:"ไม่พบ messages / system / tools ใน request body",tr:"İstek gövdesinde messages / system / tools bulunamadı",uk:"У тілі запиту не знайдено messages / system / tools"},"ui.context.selectPrompt":{zh:"请在左侧选择一个要查看的内容",en:"Select an item on the left to view","zh-TW":"請在左側選擇一個要查看的內容",ko:"왼쪽에서 항목을 선택하세요",ja:"左側から項目を選択してください",de:"Wählen Sie links einen Eintrag aus",es:"Seleccione un elemento a la izquierda",fr:"Sélectionnez un élément à gauche",it:"Seleziona un elemento a sinistra",da:"Vælg et element til venstre",pl:"Wybierz element po lewej stronie",ru:"Выберите элемент слева",ar:"اختر عنصرًا على اليسار",no:"Velg et element til venstre","pt-BR":"Selecione um item à esquerda",th:"เลือกรายการทางซ้าย",tr:"Soldan bir öğe seçin",uk:"Виберіть елемент ліворуч"},"ui.context.history":{zh:"历史",en:"History","zh-TW":"歷史",ko:"기록",ja:"履歴",de:"Verlauf",es:"Historial",fr:"Historique",it:"Cronologia",da:"Historik",pl:"Historia",ru:"История",ar:"التاريخ",no:"Historikk","pt-BR":"Histórico",th:"ประวัติ",tr:"Geçmiş",uk:"Історія"},"ui.context.currentTurn":{zh:"当前轮次",en:"Current Turn","zh-TW":"當前輪次",ko:"현재 턴",ja:"現在のターン",de:"Aktueller Durchgang",es:"Turno actual",fr:"Tour actuel",it:"Turno corrente",da:"Aktuel tur",pl:"Bieżąca tura",ru:"Текущий ход",ar:"الدور الحالي",no:"Gjeldende tur","pt-BR":"Turno atual",th:"รอบปัจจุบัน",tr:"Mevcut tur",uk:"Поточний хід"},"ui.context.historyTurnNoTime":{zh:"历史轮次 {n}",en:"Turn {n}","zh-TW":"歷史輪次 {n}",ko:"턴 {n}",ja:"ターン {n}",de:"Runde {n}",es:"Turno {n}",fr:"Tour {n}",it:"Turno {n}",da:"Tur {n}",pl:"Tura {n}",ru:"Ход {n}",ar:"الدور {n}",no:"Tur {n}","pt-BR":"Turno {n}",th:"รอบ {n}",tr:"Tur {n}",uk:"Хід {n}"}},Dl={};for(const[e,t]of Object.entries(LF))for(const[n,r]of Object.entries(t))Dl[n]||(Dl[n]={}),Dl[n][e]=r;let lb="zh";const hh={zh:"zh","zh-cn":"zh","zh-hans":"zh","zh-tw":"zh-TW","zh-hk":"zh-TW","zh-hant":"zh-TW",en:"en",ko:"ko",de:"de",es:"es",fr:"fr",it:"it",da:"da",ja:"ja",pl:"pl",ru:"ru",ar:"ar",no:"no",nb:"no",nn:"no",pt:"pt-BR","pt-br":"pt-BR",th:"th",tr:"tr",uk:"uk"};function AF(e){if(!e)return"en";const t=e.toLowerCase().replace(/_/g,"-");if(hh[t])return hh[t];const n=t.split("-")[0];return hh[n]?hh[n]:"en"}function DF(){return typeof navigator<"u"&&navigator.language?AF(navigator.language):"en"}function cb(e){lb=Dl[e]?e:"en"}function Yl(){return lb}function Ce(e,t){var r;let n=((r=Dl[lb])==null?void 0:r[e])||Dl.en[e]||e;if(t)for(const[i,o]of Object.entries(t))n=n.replaceAll(`{${i}}`,o);return n}cb(DF());function ub(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Da=ub();function f4(e){Da=e}var _a={exec:()=>null};function mn(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(di.caret,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,t)};return r}var HF=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),di={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},FF=/^(?:[ \t]*(?:\n|$))+/,WF=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,VF=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Xu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qF=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,db=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,m4=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,p4=mn(m4).replace(/bull/g,db).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),UF=mn(m4).replace(/bull/g,db).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),hb=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,KF=/^[^\n]+/,fb=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,GF=mn(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",fb).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),XF=mn(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,db).getRegex(),fm="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",mb=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,YF=mn("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",mb).replace("tag",fm).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),g4=mn(hb).replace("hr",Xu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fm).getRegex(),JF=mn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",g4).getRegex(),pb={blockquote:JF,code:WF,def:GF,fences:VF,heading:qF,hr:Xu,html:YF,lheading:p4,list:XF,newline:FF,paragraph:g4,table:_a,text:KF},tw=mn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Xu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fm).getRegex(),QF={...pb,lheading:UF,table:tw,paragraph:mn(hb).replace("hr",Xu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",tw).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fm).getRegex()},ZF={...pb,html:mn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",mb).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_a,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:mn(hb).replace("hr",Xu).replace("heading",` *#{1,6} *[^
486
- ]`).replace("lheading",p4).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},eW=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,tW=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,v4=/^( {2,}|\\)\n(?!\s*$)/,nW=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,mm=/[\p{P}\p{S}]/u,gb=/[\s\p{P}\p{S}]/u,y4=/[^\s\p{P}\p{S}]/u,rW=mn(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,gb).getRegex(),b4=/(?!~)[\p{P}\p{S}]/u,iW=/(?!~)[\s\p{P}\p{S}]/u,oW=/(?:[^\s\p{P}\p{S}]|~)/u,_4=/(?![*_])[\p{P}\p{S}]/u,sW=/(?![*_])[\s\p{P}\p{S}]/u,aW=/(?:[^\s\p{P}\p{S}]|[*_])/u,lW=mn(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",HF?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),S4=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,cW=mn(S4,"u").replace(/punct/g,mm).getRegex(),uW=mn(S4,"u").replace(/punct/g,b4).getRegex(),C4="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",dW=mn(C4,"gu").replace(/notPunctSpace/g,y4).replace(/punctSpace/g,gb).replace(/punct/g,mm).getRegex(),hW=mn(C4,"gu").replace(/notPunctSpace/g,oW).replace(/punctSpace/g,iW).replace(/punct/g,b4).getRegex(),fW=mn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,y4).replace(/punctSpace/g,gb).replace(/punct/g,mm).getRegex(),mW=mn(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,_4).getRegex(),pW="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",gW=mn(pW,"gu").replace(/notPunctSpace/g,aW).replace(/punctSpace/g,sW).replace(/punct/g,_4).getRegex(),vW=mn(/\\(punct)/,"gu").replace(/punct/g,mm).getRegex(),yW=mn(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),bW=mn(mb).replace("(?:-->|$)","-->").getRegex(),_W=mn("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",bW).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),gf=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,SW=mn(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",gf).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),x4=mn(/^!?\[(label)\]\[(ref)\]/).replace("label",gf).replace("ref",fb).getRegex(),w4=mn(/^!?\[(ref)\](?:\[\])?/).replace("ref",fb).getRegex(),CW=mn("reflink|nolink(?!\\()","g").replace("reflink",x4).replace("nolink",w4).getRegex(),nw=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,vb={_backpedal:_a,anyPunctuation:vW,autolink:yW,blockSkip:lW,br:v4,code:tW,del:_a,delLDelim:_a,delRDelim:_a,emStrongLDelim:cW,emStrongRDelimAst:dW,emStrongRDelimUnd:fW,escape:eW,link:SW,nolink:w4,punctuation:rW,reflink:x4,reflinkSearch:CW,tag:_W,text:nW,url:_a},xW={...vb,link:mn(/^!?\[(label)\]\((.*?)\)/).replace("label",gf).getRegex(),reflink:mn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",gf).getRegex()},f0={...vb,emStrongRDelimAst:hW,emStrongLDelim:uW,delLDelim:mW,delRDelim:gW,url:mn(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",nw).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:mn(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",nw).getRegex()},wW={...f0,br:mn(v4).replace("{2,}","*").getRegex(),text:mn(f0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},fh={normal:pb,gfm:QF,pedantic:ZF},Dc={normal:vb,gfm:f0,breaks:wW,pedantic:xW},EW={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},rw=e=>EW[e];function Lo(e,t){if(t){if(di.escapeTest.test(e))return e.replace(di.escapeReplace,rw)}else if(di.escapeTestNoEncode.test(e))return e.replace(di.escapeReplaceNoEncode,rw);return e}function iw(e){try{e=encodeURI(e).replace(di.percentDecode,"%")}catch{return null}return e}function ow(e,t){var o;let n=e.replace(di.findPipe,(a,c,u)=>{let d=!1,f=c;for(;--f>=0&&u[f]==="\\";)d=!d;return d?"|":" |"}),r=n.split(di.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!((o=r.at(-1))!=null&&o.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(di.slashPipe,"|");return r}function Hc(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function kW(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function $W(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let o=4-n%4;r+=" ".repeat(o),n+=o}else r+=i,n++;return r}function sw(e,t,n,r,i){let o=t.href,a=t.title||null,c=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:a,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,u}function RW(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
487
- `).map(o=>{let a=o.match(n.other.beginningSpace);if(a===null)return o;let[c]=a;return c.length>=i.length?o.slice(i.length):o}).join(`
488
- `)}var vf=class{constructor(e){kt(this,"options");kt(this,"rules");kt(this,"lexer");this.options=e||Da}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Hc(n,`
489
- `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=RW(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=Hc(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Hc(t[0],`
490
- `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Hc(t[0],`
491
- `).split(`
492
- `),r="",i="",o=[];for(;n.length>0;){let a=!1,c=[],u;for(u=0;u<n.length;u++)if(this.rules.other.blockquoteStart.test(n[u]))c.push(n[u]),a=!0;else if(!a)c.push(n[u]);else break;n=n.slice(u);let d=c.join(`
493
- `),f=d.replace(this.rules.other.blockquoteSetextReplace,`
494
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
495
- ${d}`:d,i=i?`${i}
496
- ${f}`:f;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,o,!0),this.lexer.state.top=p,n.length===0)break;let g=o.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){let v=g,b=v.raw+`
497
- `+n.join(`
498
- `),_=this.blockquote(b);o[o.length-1]=_,r=r.substring(0,r.length-v.raw.length)+_.raw,i=i.substring(0,i.length-v.text.length)+_.text;break}else if((g==null?void 0:g.type)==="list"){let v=g,b=v.raw+`
499
- `+n.join(`
500
- `),_=this.list(b);o[o.length-1]=_,r=r.substring(0,r.length-g.raw.length)+_.raw,i=i.substring(0,i.length-v.raw.length)+_.raw,n=b.substring(o.at(-1).raw.length).split(`
501
- `);continue}}return{type:"blockquote",raw:r,tokens:o,text:i}}}list(e){var n,r;let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim(),o=i.length>1,a={type:"list",raw:"",ordered:o,start:o?+i.slice(0,-1):"",loose:!1,items:[]};i=o?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=o?i:"[*+-]");let c=this.rules.other.listItemRegex(i),u=!1;for(;e;){let f=!1,p="",g="";if(!(t=c.exec(e))||this.rules.block.hr.test(e))break;p=t[0],e=e.substring(p.length);let v=$W(t[2].split(`
502
- `,1)[0],t[1].length),b=e.split(`
503
- `,1)[0],_=!v.trim(),S=0;if(this.options.pedantic?(S=2,g=v.trimStart()):_?S=t[1].length+1:(S=v.search(this.rules.other.nonSpaceChar),S=S>4?1:S,g=v.slice(S),S+=t[1].length),_&&this.rules.other.blankLine.test(b)&&(p+=b+`
504
- `,e=e.substring(b.length+1),f=!0),!f){let C=this.rules.other.nextBulletRegex(S),E=this.rules.other.hrRegex(S),k=this.rules.other.fencesBeginRegex(S),$=this.rules.other.headingBeginRegex(S),P=this.rules.other.htmlBeginRegex(S),T=this.rules.other.blockquoteBeginRegex(S);for(;e;){let O=e.split(`
505
- `,1)[0],N;if(b=O,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),N=b):N=b.replace(this.rules.other.tabCharGlobal," "),k.test(b)||$.test(b)||P.test(b)||T.test(b)||C.test(b)||E.test(b))break;if(N.search(this.rules.other.nonSpaceChar)>=S||!b.trim())g+=`
506
- `+N.slice(S);else{if(_||v.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(v)||$.test(v)||E.test(v))break;g+=`
507
- `+b}_=!b.trim(),p+=O+`
508
- `,e=e.substring(O.length+1),v=N.slice(S)}}a.loose||(u?a.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(u=!0)),a.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(g),loose:!1,text:g,tokens:[]}),a.raw+=p}let d=a.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let f of a.items){if(this.lexer.state.top=!1,f.tokens=this.lexer.blockTokens(f.text,[]),f.task){if(f.text=f.text.replace(this.rules.other.listReplaceTask,""),((n=f.tokens[0])==null?void 0:n.type)==="text"||((r=f.tokens[0])==null?void 0:r.type)==="paragraph"){f.tokens[0].raw=f.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),f.tokens[0].text=f.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let g=this.lexer.inlineQueue.length-1;g>=0;g--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[g].src)){this.lexer.inlineQueue[g].src=this.lexer.inlineQueue[g].src.replace(this.rules.other.listReplaceTask,"");break}}let p=this.rules.other.listTaskCheckbox.exec(f.raw);if(p){let g={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};f.checked=g.checked,a.loose?f.tokens[0]&&["paragraph","text"].includes(f.tokens[0].type)&&"tokens"in f.tokens[0]&&f.tokens[0].tokens?(f.tokens[0].raw=g.raw+f.tokens[0].raw,f.tokens[0].text=g.raw+f.tokens[0].text,f.tokens[0].tokens.unshift(g)):f.tokens.unshift({type:"paragraph",raw:g.raw,text:g.raw,tokens:[g]}):f.tokens.unshift(g)}}if(!a.loose){let p=f.tokens.filter(v=>v.type==="space"),g=p.length>0&&p.some(v=>this.rules.other.anyLine.test(v.raw));a.loose=g}}if(a.loose)for(let f of a.items){f.loose=!0;for(let p of f.tokens)p.type==="text"&&(p.type="paragraph")}return a}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){var a;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=ow(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(a=t[3])!=null&&a.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
509
- `):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let c of r)this.rules.other.tableAlignRight.test(c)?o.align.push("right"):this.rules.other.tableAlignCenter.test(c)?o.align.push("center"):this.rules.other.tableAlignLeft.test(c)?o.align.push("left"):o.align.push(null);for(let c=0;c<n.length;c++)o.header.push({text:n[c],tokens:this.lexer.inline(n[c]),header:!0,align:o.align[c]});for(let c of i)o.rows.push(ow(c,o.header.length).map((u,d)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:o.align[d]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
510
- `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=Hc(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=kW(t[2],"()");if(o===-2)return;if(o>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(r);o&&(r=o[1],i=o[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),sw(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return sw(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,o,a,c=i,u=0,d=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(a=[...o].length,r[3]||r[4]){c+=a;continue}else if((r[5]||r[6])&&i%3&&!((i+a)%3)){u+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c+u);let f=[...r[0]][0].length,p=e.slice(0,i+r.index+f+a);if(Math.min(i,a)%2){let v=p.slice(1,-1);return{type:"em",raw:p,text:v,tokens:this.lexer.inlineTokens(v)}}let g=p.slice(2,-2);return{type:"strong",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,o,a,c=i,u=this.rules.inline.delRDelim;for(u.lastIndex=0,t=t.slice(-1*e.length+i);(r=u.exec(t))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o||(a=[...o].length,a!==i))continue;if(r[3]||r[4]){c+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c);let d=[...r[0]][0].length,f=e.slice(0,i+r.index+d+a),p=f.slice(i,-i);return{type:"del",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let o;do o=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(o!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},wo=class m0{constructor(t){kt(this,"tokens");kt(this,"options");kt(this,"state");kt(this,"inlineQueue");kt(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Da,this.options.tokenizer=this.options.tokenizer||new vf,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:di,block:fh.normal,inline:Dc.normal};this.options.pedantic?(n.block=fh.pedantic,n.inline=Dc.pedantic):this.options.gfm&&(n.block=fh.gfm,this.options.breaks?n.inline=Dc.breaks:n.inline=Dc.gfm),this.tokenizer.rules=n}static get rules(){return{block:fh,inline:Dc}}static lex(t,n){return new m0(n).lex(t)}static lexInline(t,n){return new m0(n).inlineTokens(t)}lex(t){t=t.replace(di.carriageReturn,`
511
- `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var i,o,a;for(this.options.pedantic&&(t=t.replace(di.tabCharGlobal," ").replace(di.spaceLine,""));t;){let c;if((o=(i=this.options.extensions)==null?void 0:i.block)!=null&&o.some(d=>(c=d.call({lexer:this},t,n))?(t=t.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.space(t)){t=t.substring(c.raw.length);let d=n.at(-1);c.raw.length===1&&d!==void 0?d.raw+=`
512
- `:n.push(c);continue}if(c=this.tokenizer.code(t)){t=t.substring(c.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
513
- `)?"":`
514
- `)+c.raw,d.text+=`
515
- `+c.text,this.inlineQueue.at(-1).src=d.text):n.push(c);continue}if(c=this.tokenizer.fences(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.heading(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.hr(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.blockquote(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.list(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.html(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.def(t)){t=t.substring(c.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
516
- `)?"":`
517
- `)+c.raw,d.text+=`
518
- `+c.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},n.push(c));continue}if(c=this.tokenizer.table(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.lheading(t)){t=t.substring(c.raw.length),n.push(c);continue}let u=t;if((a=this.options.extensions)!=null&&a.startBlock){let d=1/0,f=t.slice(1),p;this.options.extensions.startBlock.forEach(g=>{p=g.call({lexer:this},f),typeof p=="number"&&p>=0&&(d=Math.min(d,p))}),d<1/0&&d>=0&&(u=t.substring(0,d+1))}if(this.state.top&&(c=this.tokenizer.paragraph(u))){let d=n.at(-1);r&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=(d.raw.endsWith(`
519
- `)?"":`
520
- `)+c.raw,d.text+=`
521
- `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):n.push(c),r=u.length!==t.length,t=t.substring(c.raw.length);continue}if(c=this.tokenizer.text(t)){t=t.substring(c.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
522
- `)?"":`
523
- `)+c.raw,d.text+=`
524
- `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):n.push(c);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var u,d,f,p,g;let r=t,i=null;if(this.tokens.links){let v=Object.keys(this.tokens.links);if(v.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)v.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)o=i[2]?i[2].length:0,r=r.slice(0,i.index+o)+"["+"a".repeat(i[0].length-o-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=((d=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:d.call({lexer:this},r))??r;let a=!1,c="";for(;t;){a||(c=""),a=!1;let v;if((p=(f=this.options.extensions)==null?void 0:f.inline)!=null&&p.some(_=>(v=_.call({lexer:this},t,n))?(t=t.substring(v.raw.length),n.push(v),!0):!1))continue;if(v=this.tokenizer.escape(t)){t=t.substring(v.raw.length),n.push(v);continue}if(v=this.tokenizer.tag(t)){t=t.substring(v.raw.length),n.push(v);continue}if(v=this.tokenizer.link(t)){t=t.substring(v.raw.length),n.push(v);continue}if(v=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(v.raw.length);let _=n.at(-1);v.type==="text"&&(_==null?void 0:_.type)==="text"?(_.raw+=v.raw,_.text+=v.text):n.push(v);continue}if(v=this.tokenizer.emStrong(t,r,c)){t=t.substring(v.raw.length),n.push(v);continue}if(v=this.tokenizer.codespan(t)){t=t.substring(v.raw.length),n.push(v);continue}if(v=this.tokenizer.br(t)){t=t.substring(v.raw.length),n.push(v);continue}if(v=this.tokenizer.del(t,r,c)){t=t.substring(v.raw.length),n.push(v);continue}if(v=this.tokenizer.autolink(t)){t=t.substring(v.raw.length),n.push(v);continue}if(!this.state.inLink&&(v=this.tokenizer.url(t))){t=t.substring(v.raw.length),n.push(v);continue}let b=t;if((g=this.options.extensions)!=null&&g.startInline){let _=1/0,S=t.slice(1),C;this.options.extensions.startInline.forEach(E=>{C=E.call({lexer:this},S),typeof C=="number"&&C>=0&&(_=Math.min(_,C))}),_<1/0&&_>=0&&(b=t.substring(0,_+1))}if(v=this.tokenizer.inlineText(b)){t=t.substring(v.raw.length),v.raw.slice(-1)!=="_"&&(c=v.raw.slice(-1)),a=!0;let _=n.at(-1);(_==null?void 0:_.type)==="text"?(_.raw+=v.raw,_.text+=v.text):n.push(v);continue}if(t){let _="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(_);break}else throw new Error(_)}}return n}},yf=class{constructor(e){kt(this,"options");kt(this,"parser");this.options=e||Da}space(e){return""}code({text:e,lang:t,escaped:n}){var o;let r=(o=(t||"").match(di.notSpaceStart))==null?void 0:o[0],i=e.replace(di.endingNewline,"")+`
525
- `;return r?'<pre><code class="language-'+Lo(r)+'">'+(n?i:Lo(i,!0))+`</code></pre>
526
- `:"<pre><code>"+(n?i:Lo(i,!0))+`</code></pre>
527
- `}blockquote({tokens:e}){return`<blockquote>
528
- ${this.parser.parse(e)}</blockquote>
529
- `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
530
- `}hr(e){return`<hr>
531
- `}list(e){let t=e.ordered,n=e.start,r="";for(let a=0;a<e.items.length;a++){let c=e.items[a];r+=this.listitem(c)}let i=t?"ol":"ul",o=t&&n!==1?' start="'+n+'"':"";return"<"+i+o+`>
532
- `+r+"</"+i+`>
533
- `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
534
- `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
535
- `}table(e){let t="",n="";for(let i=0;i<e.header.length;i++)n+=this.tablecell(e.header[i]);t+=this.tablerow({text:n});let r="";for(let i=0;i<e.rows.length;i++){let o=e.rows[i];n="";for(let a=0;a<o.length;a++)n+=this.tablecell(o[a]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
536
- <thead>
537
- `+t+`</thead>
538
- `+r+`</table>
539
- `}tablerow({text:e}){return`<tr>
540
- ${e}</tr>
541
- `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
542
- `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Lo(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=iw(e);if(i===null)return r;e=i;let o='<a href="'+e+'"';return t&&(o+=' title="'+Lo(t)+'"'),o+=">"+r+"</a>",o}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=iw(e);if(i===null)return Lo(n);e=i;let o=`<img src="${e}" alt="${Lo(n)}"`;return t&&(o+=` title="${Lo(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Lo(e.text)}},yb=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},Eo=class p0{constructor(t){kt(this,"options");kt(this,"renderer");kt(this,"textRenderer");this.options=t||Da,this.options.renderer=this.options.renderer||new yf,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new yb}static parse(t,n){return new p0(n).parse(t)}static parseInline(t,n){return new p0(n).parseInline(t)}parse(t){var r,i;let n="";for(let o=0;o<t.length;o++){let a=t[o];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[a.type]){let u=a,d=this.options.extensions.renderers[u.type].call({parser:this},u);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){n+=d||"";continue}}let c=a;switch(c.type){case"space":{n+=this.renderer.space(c);break}case"hr":{n+=this.renderer.hr(c);break}case"heading":{n+=this.renderer.heading(c);break}case"code":{n+=this.renderer.code(c);break}case"table":{n+=this.renderer.table(c);break}case"blockquote":{n+=this.renderer.blockquote(c);break}case"list":{n+=this.renderer.list(c);break}case"checkbox":{n+=this.renderer.checkbox(c);break}case"html":{n+=this.renderer.html(c);break}case"def":{n+=this.renderer.def(c);break}case"paragraph":{n+=this.renderer.paragraph(c);break}case"text":{n+=this.renderer.text(c);break}default:{let u='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}parseInline(t,n=this.renderer){var i,o;let r="";for(let a=0;a<t.length;a++){let c=t[a];if((o=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&o[c.type]){let d=this.options.extensions.renderers[c.type].call({parser:this},c);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){r+=d||"";continue}}let u=c;switch(u.type){case"escape":{r+=n.text(u);break}case"html":{r+=n.html(u);break}case"link":{r+=n.link(u);break}case"image":{r+=n.image(u);break}case"checkbox":{r+=n.checkbox(u);break}case"strong":{r+=n.strong(u);break}case"em":{r+=n.em(u);break}case"codespan":{r+=n.codespan(u);break}case"br":{r+=n.br(u);break}case"del":{r+=n.del(u);break}case"text":{r+=n.text(u);break}default:{let d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return r}},Ch,eu=(Ch=class{constructor(e){kt(this,"options");kt(this,"block");this.options=e||Da}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?wo.lex:wo.lexInline}provideParser(){return this.block?Eo.parse:Eo.parseInline}},kt(Ch,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),kt(Ch,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ch),TW=class{constructor(...t){kt(this,"defaults",ub());kt(this,"options",this.setOptions);kt(this,"parse",this.parseMarkdown(!0));kt(this,"parseInline",this.parseMarkdown(!1));kt(this,"Parser",Eo);kt(this,"Renderer",yf);kt(this,"TextRenderer",yb);kt(this,"Lexer",wo);kt(this,"Tokenizer",vf);kt(this,"Hooks",eu);this.use(...t)}walkTokens(t,n){var i,o;let r=[];for(let a of t)switch(r=r.concat(n.call(this,a)),a.type){case"table":{let c=a;for(let u of c.header)r=r.concat(this.walkTokens(u.tokens,n));for(let u of c.rows)for(let d of u)r=r.concat(this.walkTokens(d.tokens,n));break}case"list":{let c=a;r=r.concat(this.walkTokens(c.items,n));break}default:{let c=a;(o=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&o[c.type]?this.defaults.extensions.childTokens[c.type].forEach(u=>{let d=c[u].flat(1/0);r=r.concat(this.walkTokens(d,n))}):c.tokens&&(r=r.concat(this.walkTokens(c.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=n.renderers[o.name];a?n.renderers[o.name]=function(...c){let u=o.renderer.apply(this,c);return u===!1&&(u=a.apply(this,c)),u}:n.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=n[o.level];a?a.unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(n.childTokens[o.name]=o.childTokens)}),i.extensions=n),r.renderer){let o=this.defaults.renderer||new yf(this.defaults);for(let a in r.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let c=a,u=r.renderer[c],d=o[c];o[c]=(...f)=>{let p=u.apply(o,f);return p===!1&&(p=d.apply(o,f)),p||""}}i.renderer=o}if(r.tokenizer){let o=this.defaults.tokenizer||new vf(this.defaults);for(let a in r.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let c=a,u=r.tokenizer[c],d=o[c];o[c]=(...f)=>{let p=u.apply(o,f);return p===!1&&(p=d.apply(o,f)),p}}i.tokenizer=o}if(r.hooks){let o=this.defaults.hooks||new eu;for(let a in r.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let c=a,u=r.hooks[c],d=o[c];eu.passThroughHooks.has(a)?o[c]=f=>{if(this.defaults.async&&eu.passThroughHooksRespectAsync.has(a))return(async()=>{let g=await u.call(o,f);return d.call(o,g)})();let p=u.call(o,f);return d.call(o,p)}:o[c]=(...f)=>{if(this.defaults.async)return(async()=>{let g=await u.apply(o,f);return g===!1&&(g=await d.apply(o,f)),g})();let p=u.apply(o,f);return p===!1&&(p=d.apply(o,f)),p}}i.hooks=o}if(r.walkTokens){let o=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(c){let u=[];return u.push(a.call(this,c)),o&&(u=u.concat(o.call(this,c))),u}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return wo.lex(t,n??this.defaults)}parser(t,n){return Eo.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},o={...this.defaults,...i},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&i.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(n):n,u=await(o.hooks?await o.hooks.provideLexer():t?wo.lex:wo.lexInline)(c,o),d=o.hooks?await o.hooks.processAllTokens(u):u;o.walkTokens&&await Promise.all(this.walkTokens(d,o.walkTokens));let f=await(o.hooks?await o.hooks.provideParser():t?Eo.parse:Eo.parseInline)(d,o);return o.hooks?await o.hooks.postprocess(f):f})().catch(a);try{o.hooks&&(n=o.hooks.preprocess(n));let c=(o.hooks?o.hooks.provideLexer():t?wo.lex:wo.lexInline)(n,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let u=(o.hooks?o.hooks.provideParser():t?Eo.parse:Eo.parseInline)(c,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(c){return a(c)}}}onError(t,n){return r=>{if(r.message+=`
543
- Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+Lo(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},Na=new TW;function Pn(e,t){return Na.parse(e,t)}Pn.options=Pn.setOptions=function(e){return Na.setOptions(e),Pn.defaults=Na.defaults,f4(Pn.defaults),Pn};Pn.getDefaults=ub;Pn.defaults=Da;Pn.use=function(...e){return Na.use(...e),Pn.defaults=Na.defaults,f4(Pn.defaults),Pn};Pn.walkTokens=function(e,t){return Na.walkTokens(e,t)};Pn.parseInline=Na.parseInline;Pn.Parser=Eo;Pn.parser=Eo.parse;Pn.Renderer=yf;Pn.TextRenderer=yb;Pn.Lexer=wo;Pn.lexer=wo.lex;Pn.Tokenizer=vf;Pn.Hooks=eu;Pn.parse=Pn;Pn.options;Pn.setOptions;Pn.use;Pn.walkTokens;Pn.parseInline;Eo.parse;wo.lex;function ko(e){if(!e)return"";try{return Pn.parse(e,{breaks:!0})}catch{return hf(e)}}const PW="_helpBtn_cvsqb_1",OW="_modalBody_cvsqb_24",IW="_spinWrap_cvsqb_54",Vg={helpBtn:PW,modalBody:OW,spinWrap:IW},NW=new Set(["Tool-Bash","Tool-Read","Tool-Edit","Tool-Write","Tool-Glob","Tool-Grep","Tool-NotebookEdit","Tool-WebFetch","Tool-WebSearch","Tool-Task","Tool-Agent","Tool-TaskOutput","Tool-TaskStop","Tool-TaskCreate","Tool-TaskGet","Tool-TaskUpdate","Tool-TaskList","Tool-EnterPlanMode","Tool-ExitPlanMode","Tool-AskUserQuestion","Tool-Skill","Tool-getDiagnostics","Tool-executeCode","MainAgent","Tools","CacheRebuild","BodyDiffJSON","TranslateContextPollution"]);function Hl({doc:e}){const[t,n]=h.useState(!1),[r,i]=h.useState(!1),[o,a]=h.useState(""),[c,u]=h.useState("");if(!e||!NW.has(e))return null;const d=h.useCallback(async()=>{n(!0),i(!0),a(""),u(e);const f=Yl();let p=null;try{const g=await fetch(`/api/concept?lang=${f}&doc=${encodeURIComponent(e)}`);g.ok&&(p=await g.text())}catch{}if(p){const g=p.match(/^#\s+(.+)/m);g&&u(g[1]),a(ko(p))}else a("<p>Document not found.</p>");i(!1)},[e]);return w.jsxs(w.Fragment,{children:[w.jsx("span",{className:Vg.helpBtn,onClick:f=>{f.stopPropagation(),d()},children:"?"}),w.jsx(Ti,{title:c,open:t,onCancel:()=>n(!1),footer:null,width:640,styles:{header:{background:"#1a1a1a"},body:{background:"#111",padding:"16px 24px 24px"},content:{background:"#1a1a1a",padding:"12px 20px"}},children:r?w.jsx("div",{className:Vg.spinWrap,children:w.jsx(Oa,{})}):w.jsx("div",{className:Vg.modalBody,dangerouslySetInnerHTML:{__html:o}})})]})}const MW="_headerBar_1ata5_2",zW="_titleText_1ata5_11",jW="_logoImage_1ata5_17",BW="_titleArrow_1ata5_25",LW="_tokenStatsTag_1ata5_31",AW="_tokenStatsIcon_1ata5_39",DW="_liveTag_1ata5_44",HW="_liveDotWrap_1ata5_48",FW="_liveSpinner_1ata5_70",WW="_liveSpinnerDiag_1ata5_75",VW="_inflightList_1ata5_90",qW="_inflightItem_1ata5_94",UW="_inflightTag_1ata5_106",KW="_inflightModel_1ata5_112",GW="_inflightTime_1ata5_117",XW="_liveTagHistory_1ata5_123",YW="_liveTagText_1ata5_129",JW="_countdownStrong_1ata5_134",QW="_langSelector_1ata5_139",ZW="_settingsBtn_1ata5_150",eV="_settingsItem_1ata5_166",tV="_settingsLabel_1ata5_173",nV="_tokenStatsEmpty_1ata5_178",rV="_tokenStatsContainer_1ata5_185",iV="_tokenStatsColumn_1ata5_191",oV="_toolStatsColumn_1ata5_195",sV="_modelCard_1ata5_200",aV="_modelCardSpaced_1ata5_207 _modelCard_1ata5_200",lV="_modelName_1ata5_213",cV="_statsTable_1ata5_223",uV="_th_1ata5_228",dV="_td_1ata5_238",hV="_label_1ata5_247",fV="_rowBorder_1ata5_257",mV="_rebuildTotalRow_1ata5_269",pV="_promptExportBar_1ata5_278",gV="_promptScrollArea_1ata5_282",vV="_promptEmpty_1ata5_287",yV="_promptTimestamp_1ata5_293",bV="_textPromptCard_1ata5_301",_V="_preText_1ata5_310",SV="_systemCollapse_1ata5_320",CV="_systemLabel_1ata5_327",xV="_preSys_1ata5_332",wV="_promptTextarea_1ata5_342",EV="_projectStatsCenter_1ata5_358",kV="_projectStatsEmpty_1ata5_364",$V="_projectStatsContent_1ata5_371",RV="_projectStatsUpdated_1ata5_377",TV="_projectStatsSummary_1ata5_383",PV="_projectStatCard_1ata5_389",OV="_projectStatValue_1ata5_397",IV="_projectStatLabel_1ata5_405",NV="_projectStatsSection_1ata5_411",MV="_projectStatsSectionTitle_1ata5_417",zV="_projectStatsModelCard_1ata5_425",jV="_projectStatsModelHeader_1ata5_432",BV="_projectStatsModelName_1ata5_441",LV="_projectStatsModelCount_1ata5_447",ge={headerBar:MW,titleText:zW,logoImage:jW,titleArrow:BW,tokenStatsTag:LW,tokenStatsIcon:AW,liveTag:DW,liveDotWrap:HW,liveSpinner:FW,liveSpinnerDiag:WW,inflightList:VW,inflightItem:qW,inflightTag:UW,inflightModel:KW,inflightTime:GW,liveTagHistory:XW,liveTagText:YW,countdownStrong:JW,langSelector:QW,settingsBtn:ZW,settingsItem:eV,settingsLabel:tV,tokenStatsEmpty:nV,tokenStatsContainer:rV,tokenStatsColumn:iV,toolStatsColumn:oV,modelCard:sV,modelCardSpaced:aV,modelName:lV,statsTable:cV,th:uV,td:dV,label:hV,rowBorder:fV,rebuildTotalRow:mV,promptExportBar:pV,promptScrollArea:gV,promptEmpty:vV,promptTimestamp:yV,textPromptCard:bV,preText:_V,systemCollapse:SV,systemLabel:CV,preSys:xV,promptTextarea:wV,projectStatsCenter:EV,projectStatsEmpty:kV,projectStatsContent:$V,projectStatsUpdated:RV,projectStatsSummary:TV,projectStatCard:PV,projectStatValue:OV,projectStatLabel:IV,projectStatsSection:NV,projectStatsSectionTitle:MV,projectStatsModelCard:zV,projectStatsModelHeader:jV,projectStatsModelName:BV,projectStatsModelCount:LV},aw=[{value:"zh",short:"zh",label:"简体中文"},{value:"en",short:"en",label:"English"},{value:"zh-TW",short:"zh-TW",label:"繁體中文"},{value:"ko",short:"ko",label:"한국어"},{value:"ja",short:"ja",label:"日本語"},{value:"de",short:"de",label:"Deutsch"},{value:"es",short:"es",label:"Español"},{value:"fr",short:"fr",label:"Français"},{value:"it",short:"it",label:"Italiano"},{value:"da",short:"da",label:"Dansk"},{value:"pl",short:"pl",label:"Polski"},{value:"ru",short:"ru",label:"Русский"},{value:"ar",short:"ar",label:"العربية"},{value:"no",short:"no",label:"Norsk"},{value:"pt-BR",short:"pt-BR",label:"Português (Brasil)"},{value:"th",short:"th",label:"ไทย"},{value:"tr",short:"tr",label:"Türkçe"},{value:"uk",short:"uk",label:"Українська"}],{Text:AV}=Oo,jl=class jl extends Q.Component{constructor(n){super(n);kt(this,"handleShowPrompts",()=>{this.setState({promptModalVisible:!0,promptData:this.extractUserPrompts()})});kt(this,"handleExportPromptsTxt",()=>{const n=this.state.promptData;if(!n||n.length===0)return;const r=[];for(const c of n){const u=[],d=c.timestamp?new Date(c.timestamp).toLocaleString():"";d&&u.push(`${d}:
544
- `);const f=(c.segments||[]).filter(p=>p.type==="text").map(p=>p.content);f.length>0&&u.push(f.join(`
545
- `)),r.push(u.join(`
546
- `))}if(r.length===0)return;const i=new Blob([r.join(`
547
-
548
-
549
-
550
- `)],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(i),a=document.createElement("a");a.href=o,a.download=`user-prompts-${new Date().toISOString().slice(0,10)}.txt`,a.click(),URL.revokeObjectURL(o)});kt(this,"handleShowProjectStats",()=>{this.setState({projectStatsVisible:!0,projectStatsLoading:!0}),fetch("/api/project-stats").then(n=>{if(!n.ok)throw new Error("not found");return n.json()}).then(n=>this.setState({projectStats:n,projectStatsLoading:!1})).catch(()=>this.setState({projectStats:null,projectStatsLoading:!1}))});this.state={countdownText:"",promptModalVisible:!1,promptData:[],promptViewMode:"original",settingsDrawerVisible:!1,globalSettingsVisible:!1,projectStatsVisible:!1,projectStats:null,projectStatsLoading:!1},this._rafId=null,this._expiredTimer=null,this.updateCountdown=this.updateCountdown.bind(this)}componentDidMount(){this.startCountdown()}componentDidUpdate(n){n.cacheExpireAt!==this.props.cacheExpireAt&&this.startCountdown()}componentWillUnmount(){this._rafId&&cancelAnimationFrame(this._rafId),this._expiredTimer&&clearTimeout(this._expiredTimer)}startCountdown(){if(this._rafId&&cancelAnimationFrame(this._rafId),this._expiredTimer&&clearTimeout(this._expiredTimer),!this.props.cacheExpireAt){this.setState({countdownText:""});return}this._rafId=requestAnimationFrame(this.updateCountdown)}updateCountdown(){const{cacheExpireAt:n}=this.props;if(!n){this.setState({countdownText:""});return}const r=Math.max(0,n-Date.now());if(r<=0){this.setState({countdownText:Ce("ui.cacheExpired")}),this._expiredTimer=setTimeout(()=>{this.setState({countdownText:""})},5e3);return}const i=Math.ceil(r/1e3);let o;if(i>=60){const a=Math.floor(i/60),c=i%60;o=Ce("ui.minuteSecond",{m:a,s:String(c).padStart(2,"0")})}else o=Ce("ui.second",{s:i});this.setState({countdownText:o}),this._rafId=requestAnimationFrame(this.updateCountdown)}static parseSegments(n){const r=[],i=/<([a-zA-Z_][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>/g;let o=0,a;for(;(a=i.exec(n))!==null;){const u=n.slice(o,a.index).trim();u&&r.push({type:"text",content:u});const d=a[1];if(o=a.index+a[0].length,jl.COMMAND_TAGS.has(d))continue;const f=new RegExp(`^<${d}(?:\\s[^>]*)?>([\\s\\S]*)<\\/${d}>$`),p=a[0].match(f),g=p?p[1].trim():a[0].trim();r.push({type:"system",content:g,label:d})}const c=n.slice(o).trim();return c&&r.push({type:"text",content:c}),r}static extractUserTexts(n){const r=[],i=[];let o=null;for(const a of n)if(a.role==="user"){if(typeof a.content=="string"){const c=a.content.trim();if(!c)continue;if(!sb(c)){if(/^Implement the following plan:/i.test(c))continue;r.push(c),i.push(c)}}else if(Array.isArray(a.content)){const{commands:c,textBlocks:u}=u4(a.content);c.length>0&&(o=c[c.length-1]);const d=[];for(const p of u)/^Implement the following plan:/i.test((p.text||"").trim())||d.push(p.text.trim());const f=a.content.filter(p=>{var g;return p.type==="text"&&((g=p.text)==null?void 0:g.trim())}).map(p=>p.text.trim());d.length>0&&(r.push(d.join(`
551
- `)),i.push(f.join(`
552
- `)))}}return{userMsgs:r,fullTexts:i,slashCmd:o}}extractUserPrompts(){var c;const{requests:n=[]}=this.props,r=[],i=new Set;let o=null;const a=n.filter(u=>Vr(u));for(let u=0;u<a.length;u++){const d=a[u],f=((c=d.body)==null?void 0:c.messages)||[],p=d.timestamp||"",{userMsgs:g,fullTexts:v,slashCmd:b}=jl.extractUserTexts(f);b&&b!=="/compact"&&b!==o&&r.push({type:"prompt",segments:[{type:"text",content:b}],timestamp:p}),o=b;for(let _=0;_<g.length;_++){const S=g[_];if(i.has(S))continue;i.add(S);const C=v[_]||S;r.push({type:"prompt",segments:jl.parseSegments(C),timestamp:p})}}return r}renderTokenStats(){const{requests:n=[]}=this.props,r=$F(n),i=Object.keys(r),o=TF(n),a=PF(n);if(i.length===0&&o.length===0)return w.jsx("div",{className:ge.tokenStatsEmpty,children:"暂无 token 数据"});const c=w.jsx("div",{className:ge.tokenStatsColumn,children:i.map(p=>{const g=r[p],v=g.input+g.cacheCreation+g.cacheRead,b=v>0?(g.cacheRead/v*100).toFixed(1):"0.0";return w.jsxs("div",{className:i.length>1?ge.modelCardSpaced:ge.modelCard,children:[w.jsx("div",{className:ge.modelName,children:p}),w.jsx("table",{className:ge.statsTable,children:w.jsxs("tbody",{children:[w.jsxs("tr",{children:[w.jsx("td",{className:ge.label,children:"Token"}),w.jsx("td",{className:ge.th,children:"input"}),w.jsx("td",{className:ge.th,children:"output"})]}),w.jsxs("tr",{className:ge.rowBorder,children:[w.jsx("td",{className:ge.label}),w.jsx("td",{className:ge.td,children:cr(v)}),w.jsx("td",{className:ge.td,children:cr(g.output)})]}),w.jsxs("tr",{children:[w.jsx("td",{className:ge.label,children:"Cache"}),w.jsx("td",{className:ge.th,children:"create"}),w.jsx("td",{className:ge.th,children:"read"})]}),w.jsxs("tr",{className:ge.rowBorder,children:[w.jsx("td",{className:ge.label}),w.jsx("td",{className:ge.td,children:cr(g.cacheCreation)}),w.jsx("td",{className:ge.td,children:cr(g.cacheRead)})]}),w.jsxs("tr",{children:[w.jsx("td",{className:ge.label,children:Ce("ui.hitRate")}),w.jsxs("td",{colSpan:2,className:ge.td,children:[b,"%"]})]})]})})]},p)})}),u=this.renderCacheRebuildStats(),d=o.length>0?w.jsx("div",{className:ge.toolStatsColumn,children:w.jsxs("div",{className:ge.modelCard,children:[w.jsx("div",{className:ge.modelName,children:Ce("ui.toolUsageStats")}),w.jsxs("table",{className:ge.statsTable,children:[w.jsx("thead",{children:w.jsxs("tr",{children:[w.jsx("td",{className:ge.th,style:{textAlign:"left"},children:"Tool"}),w.jsx("td",{className:ge.th,children:Ce("ui.cacheRebuild.count")})]})}),w.jsxs("tbody",{children:[o.map(([p,g])=>w.jsxs("tr",{className:ge.rowBorder,children:[w.jsxs("td",{className:ge.label,children:[p," ",w.jsx(Hl,{doc:`Tool-${p}`})]}),w.jsx("td",{className:ge.td,children:g})]},p)),o.length>1&&w.jsxs("tr",{className:ge.rebuildTotalRow,children:[w.jsx("td",{className:ge.label,children:"Total"}),w.jsx("td",{className:ge.td,children:o.reduce((p,g)=>p+g[1],0)})]})]})]})]})}):null,f=a.length>0?w.jsx("div",{className:ge.toolStatsColumn,children:w.jsxs("div",{className:ge.modelCard,children:[w.jsx("div",{className:ge.modelName,children:Ce("ui.skillUsageStats")}),w.jsxs("table",{className:ge.statsTable,children:[w.jsx("thead",{children:w.jsxs("tr",{children:[w.jsx("td",{className:ge.th,style:{textAlign:"left"},children:"Skill"}),w.jsx("td",{className:ge.th,children:Ce("ui.cacheRebuild.count")})]})}),w.jsxs("tbody",{children:[a.map(([p,g])=>w.jsxs("tr",{className:ge.rowBorder,children:[w.jsx("td",{className:ge.label,children:p}),w.jsx("td",{className:ge.td,children:g})]},p)),a.length>1&&w.jsxs("tr",{className:ge.rebuildTotalRow,children:[w.jsx("td",{className:ge.label,children:"Total"}),w.jsx("td",{className:ge.td,children:a.reduce((p,g)=>p+g[1],0)})]})]})]})]})}):null;return w.jsxs("div",{className:ge.tokenStatsContainer,children:[c,u,d,f]})}renderCacheRebuildStats(){const{requests:n=[]}=this.props,r=RF(n),i=["ttl","system_change","tools_change","model_change","msg_truncated","msg_modified","key_change"],o={ttl:"ttl",system_change:"systemChange",tools_change:"toolsChange",model_change:"modelChange",msg_truncated:"msgTruncated",msg_modified:"msgModified",key_change:"keyChange"},a=i.filter(v=>r[v].count>0),c=a.reduce((v,b)=>v+r[b].count,0),u=a.reduce((v,b)=>v+r[b].cacheCreate,0),d={};for(let v=0;v<n.length;v++){const b=Ia(n[v],n[v+1]);if(b.type==="SubAgent"){const _=b.subType||"Other";d[_]=(d[_]||0)+1}}const f=Object.entries(d).sort((v,b)=>b[1]-v[1]),p=a.length>0,g=f.length>0;return!p&&!g?null:w.jsxs("div",{className:ge.toolStatsColumn,children:[p&&w.jsxs("div",{className:g?ge.modelCardSpaced:ge.modelCard,children:[w.jsxs("div",{className:ge.modelName,children:["MainAgent",w.jsx(Hl,{doc:"MainAgent"})," ",Ce("ui.cacheRebuildStats"),w.jsx(Hl,{doc:"CacheRebuild"})]}),w.jsxs("table",{className:ge.statsTable,children:[w.jsx("thead",{children:w.jsxs("tr",{children:[w.jsx("td",{className:ge.th,style:{textAlign:"left"},children:Ce("ui.cacheRebuild.reason")}),w.jsx("td",{className:ge.th,children:Ce("ui.cacheRebuild.count")}),w.jsx("td",{className:ge.th,children:Ce("ui.cacheRebuild.cacheCreate")})]})}),w.jsxs("tbody",{children:[a.map(v=>w.jsxs("tr",{className:ge.rowBorder,children:[w.jsx("td",{className:ge.label,children:Ce(`ui.cacheRebuild.${o[v]}`)}),w.jsx("td",{className:ge.td,children:r[v].count}),w.jsx("td",{className:ge.td,children:cr(r[v].cacheCreate)})]},v)),a.length>1&&w.jsxs("tr",{className:ge.rebuildTotalRow,children:[w.jsx("td",{className:ge.label,children:"Total"}),w.jsx("td",{className:ge.td,children:c}),w.jsx("td",{className:ge.td,children:cr(u)})]})]})]})]}),g&&w.jsxs("div",{className:ge.modelCard,children:[w.jsx("div",{className:ge.modelName,children:Ce("ui.subAgentStats")}),w.jsxs("table",{className:ge.statsTable,children:[w.jsx("thead",{children:w.jsxs("tr",{children:[w.jsx("td",{className:ge.th,style:{textAlign:"left"},children:"SubAgent"}),w.jsx("td",{className:ge.th,children:Ce("ui.cacheRebuild.count")})]})}),w.jsxs("tbody",{children:[f.map(([v,b])=>w.jsxs("tr",{className:ge.rowBorder,children:[w.jsx("td",{className:ge.label,children:v}),w.jsx("td",{className:ge.td,children:b})]},v)),f.length>1&&w.jsxs("tr",{className:ge.rebuildTotalRow,children:[w.jsx("td",{className:ge.label,children:"Total"}),w.jsx("td",{className:ge.td,children:f.reduce((v,b)=>v+b[1],0)})]})]})]})]})]})}renderTextPrompt(n){return w.jsx("div",{className:ge.textPromptCard,children:n.segments.map((r,i)=>r.type==="text"?w.jsx("pre",{className:ge.preText,children:r.content},i):w.jsx(Yc,{size:"small",className:ge.systemCollapse,items:[{key:`sys-${i}`,label:w.jsx("span",{className:ge.systemLabel,children:r.label}),children:w.jsx("pre",{className:ge.preSys,children:r.content})}]},i))})}renderOriginalPrompt(n){const r=n.segments.filter(i=>i.type==="text");return r.length===0?null:w.jsx("div",{className:ge.textPromptCard,children:r.map((i,o)=>w.jsx("pre",{className:ge.preText,children:i.content},o))})}buildTextModeContent(){const{promptData:n}=this.state,r=[];for(const i of n){const o=(i.segments||[]).filter(a=>a.type==="text").map(a=>a.content);o.length>0&&r.push(o.join(`
553
- `))}return r.join(`
554
-
555
-
556
- `)}renderProjectStatsContent(){const{projectStats:n,projectStatsLoading:r}=this.state;if(r)return w.jsx("div",{className:ge.projectStatsCenter,children:w.jsx(Oa,{})});if(!n)return w.jsx("div",{className:ge.projectStatsEmpty,children:Ce("ui.projectStats.noData")});const{summary:i,models:o,updatedAt:a}=n;o&&Object.entries(o).sort((d,f)=>f[1]-d[1]);const c={};if(n.files){for(const d of Object.values(n.files))if(d.models)for(const[f,p]of Object.entries(d.models))c[f]||(c[f]={input:0,output:0,cacheRead:0,cacheCreation:0,count:0}),c[f].input+=p.input_tokens||0,c[f].output+=p.output_tokens||0,c[f].cacheRead+=p.cache_read_input_tokens||0,c[f].cacheCreation+=p.cache_creation_input_tokens||0,c[f].count+=p.count||0}const u=Object.entries(c).sort((d,f)=>f[1].count-d[1].count);return w.jsxs("div",{className:ge.projectStatsContent,children:[a&&w.jsx("div",{className:ge.projectStatsUpdated,children:Ce("ui.projectStats.updatedAt",{time:new Date(a).toLocaleString()})}),w.jsxs("div",{className:ge.projectStatsSummary,children:[w.jsxs("div",{className:ge.projectStatCard,children:[w.jsx("div",{className:ge.projectStatValue,children:(i==null?void 0:i.requestCount)??0}),w.jsx("div",{className:ge.projectStatLabel,children:Ce("ui.projectStats.totalRequests")})]}),w.jsxs("div",{className:ge.projectStatCard,children:[w.jsx("div",{className:ge.projectStatValue,children:(i==null?void 0:i.sessionCount)??0}),w.jsx("div",{className:ge.projectStatLabel,children:Ce("ui.projectStats.sessionCount")})]}),w.jsxs("div",{className:ge.projectStatCard,children:[w.jsx("div",{className:ge.projectStatValue,children:(i==null?void 0:i.fileCount)??0}),w.jsx("div",{className:ge.projectStatLabel,children:Ce("ui.projectStats.totalFiles")})]}),w.jsxs("div",{className:ge.projectStatCard,children:[w.jsx("div",{className:ge.projectStatValue,children:cr(i==null?void 0:i.input_tokens)}),w.jsx("div",{className:ge.projectStatLabel,children:"Input Tokens"})]}),w.jsxs("div",{className:ge.projectStatCard,children:[w.jsx("div",{className:ge.projectStatValue,children:cr(i==null?void 0:i.output_tokens)}),w.jsx("div",{className:ge.projectStatLabel,children:"Output Tokens"})]})]}),u.length>0&&w.jsxs("div",{className:ge.projectStatsSection,children:[w.jsx("div",{className:ge.projectStatsSectionTitle,children:Ce("ui.projectStats.modelUsage")}),u.map(([d,f])=>{const p=f.input+f.cacheRead+f.cacheCreation,g=p>0?(f.cacheRead/p*100).toFixed(1):"0.0";return w.jsxs("div",{className:ge.projectStatsModelCard,children:[w.jsxs("div",{className:ge.projectStatsModelHeader,children:[w.jsx("span",{className:ge.projectStatsModelName,children:d}),w.jsxs("span",{className:ge.projectStatsModelCount,children:[f.count," reqs"]})]}),w.jsx("table",{className:ge.statsTable,children:w.jsxs("tbody",{children:[w.jsxs("tr",{children:[w.jsx("td",{className:ge.label,children:"Token"}),w.jsx("td",{className:ge.th,children:"input"}),w.jsx("td",{className:ge.th,children:"output"})]}),w.jsxs("tr",{className:ge.rowBorder,children:[w.jsx("td",{className:ge.label}),w.jsx("td",{className:ge.td,children:cr(p)}),w.jsx("td",{className:ge.td,children:cr(f.output)})]}),w.jsxs("tr",{children:[w.jsx("td",{className:ge.label,children:"Cache"}),w.jsx("td",{className:ge.th,children:"create"}),w.jsx("td",{className:ge.th,children:"read"})]}),w.jsxs("tr",{className:ge.rowBorder,children:[w.jsx("td",{className:ge.label}),w.jsx("td",{className:ge.td,children:cr(f.cacheCreation)}),w.jsx("td",{className:ge.td,children:cr(f.cacheRead)})]}),w.jsxs("tr",{children:[w.jsx("td",{className:ge.label,children:Ce("ui.hitRate")}),w.jsxs("td",{colSpan:2,className:ge.td,children:[g,"%"]})]})]})})]},d)})]})]})}render(){var A;const{requestCount:n,requests:r=[],viewMode:i,cacheType:o,onToggleViewMode:a,onImportLocalLogs:c,onLangChange:u,isLocalLog:d,localLogFile:f,projectName:p,collapseToolResults:g,onCollapseToolResultsChange:v,expandThinking:b,onExpandThinkingChange:_,expandDiff:S,onExpandDiffChange:C,filterIrrelevant:E,onFilterIrrelevantChange:k,updateInfo:$,onDismissUpdate:P,cliMode:T,terminalVisible:O,onToggleTerminal:N}=this.props,{countdownText:I}=this.state,z=[{key:"import-local",icon:w.jsx(gF,{}),label:Ce("ui.importLocalLogs"),onClick:c},{key:"export-prompts",icon:w.jsx(fF,{}),label:Ce("ui.exportPrompts"),onClick:this.handleShowPrompts},{type:"divider"},{key:"project-stats",icon:w.jsx(Jx,{}),label:Ce("ui.projectStats"),onClick:this.handleShowProjectStats},{key:"global-settings",icon:w.jsx(Qx,{}),label:Ce("ui.globalSettings"),onClick:()=>this.setState({globalSettingsVisible:!0})}];return w.jsxs("div",{className:ge.headerBar,children:[w.jsxs(ds,{size:"middle",children:[w.jsx(d0,{menu:{items:z},trigger:["hover"],children:w.jsxs(AV,{strong:!0,className:ge.titleText,children:[w.jsx("img",{src:"/favicon.ico",alt:"Logo",className:ge.logoImage}),"CC-Viewer ",w.jsx(us,{className:ge.titleArrow})]})}),w.jsx(i0,{content:this.renderTokenStats(),trigger:"hover",placement:"bottomLeft",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px"},children:w.jsxs(Wi,{className:ge.tokenStatsTag,children:[w.jsx(uF,{className:ge.tokenStatsIcon}),Ce("ui.tokenStats")]})}),(()=>{const j=Date.now(),B=d?[]:(r||[]).filter(U=>!U.response&&j-new Date(U.timestamp).getTime()<3e5),F=B.length>0,W=d?null:F?w.jsxs("svg",{className:ge.liveSpinner,width:"10",height:"10",viewBox:"0 0 10 10",children:[w.jsx("line",{x1:"5",y1:"1",x2:"5",y2:"9",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round"}),w.jsx("line",{x1:"1",y1:"5",x2:"9",y2:"5",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round"}),w.jsx("line",{x1:"2.2",y1:"2.2",x2:"7.8",y2:"7.8",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round",className:ge.liveSpinnerDiag}),w.jsx("line",{x1:"7.8",y1:"2.2",x2:"2.2",y2:"7.8",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round",className:ge.liveSpinnerDiag})]}):w.jsx(Dy,{status:"processing",color:"green"}),V=!d&&!F,L=W&&w.jsx("span",{className:ge.liveDotWrap,children:V?w.jsx(Ko,{title:Ce("ui.noInflightRequests"),placement:"bottom",children:W}):W}),G=w.jsxs(Wi,{color:d?void 0:"green",className:`${ge.liveTag} ${d?ge.liveTagHistory:""}`,children:[L,w.jsx("span",{className:ge.liveTagText,children:d?Ce("ui.historyLog",{file:f}):Ce("ui.liveMonitoring")+(p?`:${p}`:"")})]});if(F){const U=w.jsx("div",{className:ge.inflightList,children:B.map((D,q)=>{var fe;const Y=Ia(D),ee=pf(Y.type,Y.subType),Z=((fe=D.body)==null?void 0:fe.model)||"",re=Z.includes("-")?Z.split("-").slice(0,2).join("-"):Z,he=new Date(D.timestamp).toLocaleTimeString("zh-CN");return w.jsxs("div",{className:ge.inflightItem,children:[w.jsx("span",{className:ge.inflightTag,children:ee}),w.jsx("span",{className:ge.inflightModel,children:re}),w.jsx("span",{className:ge.inflightTime,children:he})]},q)})});return w.jsx(i0,{content:U,title:Ce("ui.inflightRequests"),placement:"bottom",children:G})}return G})(),$&&w.jsx(Wi,{color:$.type==="completed"?"green":"orange",closable:!0,onClose:()=>P&&P(),children:$.type==="completed"?Ce("ui.update.completed",{version:$.version}):Ce("ui.update.majorAvailable",{version:$.version})})]}),w.jsxs(ds,{size:"middle",children:[I&&w.jsxs(Wi,{color:I===Ce("ui.cacheExpired")?"red":"green",children:[Ce("ui.cacheCountdown",{type:o?`(${o})`:""}),w.jsx("strong",{className:ge.countdownStrong,children:I})]}),i==="chat"&&w.jsxs("span",{className:ge.settingsBtn,onClick:()=>this.setState({settingsDrawerVisible:!0}),children:[w.jsx(Qx,{})," ",Ce("ui.settings")]}),w.jsx(d0,{trigger:["hover"],placement:"bottom",menu:{items:aw.map(M=>({key:M.value,label:M.label,style:M.value===Yl()?{color:"#3b82f6"}:{}})),onClick:({key:M})=>{cb(M),u&&u()}},children:w.jsx("span",{className:ge.langSelector,children:((A=aw.find(M=>M.value===Yl()))==null?void 0:A.label)||"简体中文"})}),T&&i==="chat"&&w.jsx(ur,{type:O?"primary":"default",ghost:O,icon:w.jsx(Lh,{}),onClick:N,children:Ce("ui.terminal")}),w.jsx(ur,{type:i==="raw"?"primary":"default",icon:i==="raw"?w.jsx(bF,{}):w.jsx(cu,{}),onClick:a,children:Ce(i==="raw"?"ui.chatMode":"ui.rawMode")})]}),w.jsxs(Ti,{title:`${Ce("ui.userPrompt")} (${this.state.promptData.length}${Ce("ui.promptCountUnit")})`,open:this.state.promptModalVisible,onCancel:()=>this.setState({promptModalVisible:!1}),footer:null,width:700,children:[w.jsx("div",{className:ge.promptExportBar,children:w.jsx(ur,{icon:w.jsx(rF,{}),onClick:this.handleExportPromptsTxt,children:Ce("ui.exportPromptsTxt")})}),w.jsx(Zy,{activeKey:this.state.promptViewMode,onChange:M=>this.setState({promptViewMode:M}),size:"small",items:[{key:"original",label:Ce("ui.promptModeOriginal")},{key:"context",label:Ce("ui.promptModeContext")},{key:"text",label:Ce("ui.promptModeText")}]}),this.state.promptViewMode==="text"?w.jsx("textarea",{readOnly:!0,className:ge.promptTextarea,value:this.buildTextModeContent()}):w.jsxs("div",{className:ge.promptScrollArea,children:[this.state.promptData.length===0&&w.jsx("div",{className:ge.promptEmpty,children:Ce("ui.noPrompt")}),this.state.promptData.map((M,j)=>{const B=M.timestamp?new Date(M.timestamp).toLocaleString():Ce("ui.unknownTime");return w.jsxs("div",{children:[w.jsxs("div",{className:ge.promptTimestamp,children:[B,":"]}),this.state.promptViewMode==="original"?this.renderOriginalPrompt(M):this.renderTextPrompt(M)]},j)})]})]}),w.jsxs(jh,{title:Ce("ui.settings"),placement:"right",width:320,open:this.state.settingsDrawerVisible,onClose:()=>this.setState({settingsDrawerVisible:!1}),children:[w.jsxs("div",{className:ge.settingsItem,children:[w.jsx("span",{className:ge.settingsLabel,children:Ce("ui.collapseToolResults")}),w.jsx(Zc,{checked:!!g,onChange:M=>v&&v(M)})]}),w.jsxs("div",{className:ge.settingsItem,children:[w.jsx("span",{className:ge.settingsLabel,children:Ce("ui.expandThinking")}),w.jsx(Zc,{checked:!!b,onChange:M=>_&&_(M)})]})]}),w.jsxs(jh,{title:Ce("ui.globalSettings"),placement:"left",width:400,open:this.state.globalSettingsVisible,onClose:()=>this.setState({globalSettingsVisible:!1}),children:[w.jsxs("div",{className:ge.settingsItem,children:[w.jsx("span",{className:ge.settingsLabel,children:Ce("ui.filterIrrelevant")}),w.jsx(Zc,{checked:!!E,onChange:M=>k&&k(M)})]}),w.jsxs("div",{className:ge.settingsItem,children:[w.jsx("span",{className:ge.settingsLabel,children:Ce("ui.expandDiff")}),w.jsx(Zc,{checked:!!S,onChange:M=>C&&C(M)})]})]}),w.jsx(jh,{title:w.jsxs("span",{children:[w.jsx(Jx,{style:{marginRight:8}}),Ce("ui.projectStats")]}),placement:"left",width:400,open:this.state.projectStatsVisible,onClose:()=>this.setState({projectStatsVisible:!1}),children:this.renderProjectStatsContent()})]})}};kt(jl,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let g0=jl;const DV="_centerEmpty_ckz8l_1",HV="_scrollContainer_ckz8l_8",FV="_listItem_ckz8l_13",WV="_listItemActive_ckz8l_25",VV="_itemContent_ckz8l_34",qV="_itemHeader_ckz8l_39",UV="_tagNoMargin_ckz8l_47",KV="_modelName_ckz8l_52",GV="_time_ckz8l_56",XV="_detailRow_ckz8l_62",YV="_urlText_ckz8l_69",JV="_duration_ckz8l_78",QV="_statusOk_ckz8l_83",ZV="_statusErr_ckz8l_89",eq="_statusDefault_ckz8l_94",tq="_usageBox_ckz8l_99",nq="_cacheDot_ckz8l_109",rq="_cacheDotLoss_ckz8l_118",iq="_cacheDotNormal_ckz8l_123",Yn={centerEmpty:DV,scrollContainer:HV,listItem:FV,listItemActive:WV,itemContent:VV,itemHeader:qV,tagNoMargin:UV,modelName:KV,time:GV,detailRow:XV,urlText:YV,duration:JV,statusOk:QV,statusErr:ZV,statusDefault:eq,usageBox:tq,cacheDot:nq,cacheDotLoss:rq,cacheDotNormal:iq};class oq extends Q.Component{constructor(t){super(t),this.activeItemRef=Q.createRef()}componentDidMount(){this.scrollToSelected(!0)}componentDidUpdate(t){this.props.scrollCenter&&t.selectedIndex!==this.props.selectedIndex?this.scrollToSelected(!0):t.requests!==this.props.requests&&this.scrollToSelected(!1)}scrollToSelected(t){this.activeItemRef.current&&(this.activeItemRef.current.scrollIntoView({block:t?"center":"nearest",behavior:"instant"}),t&&this.props.onScrollDone&&this.props.onScrollDone())}render(){const{requests:t,selectedIndex:n,onSelect:r}=this.props;return t.length===0?w.jsx("div",{className:Yn.centerEmpty,children:w.jsx(Ri,{description:Ce("ui.waitingRequests")})}):w.jsx("div",{className:Yn.scrollContainer,children:w.jsx(ku,{dataSource:t,size:"small",split:!1,renderItem:(i,o)=>{var $,P,T;const a=new Date(i.timestamp).toLocaleTimeString("zh-CN"),c=o===n,u=i.response&&i.response.status<400,d=i.response&&i.response.status>=400,f=NF(($=i.body)==null?void 0:$.model),p=o+1<t.length?t[o+1]:null,{type:g,subType:v}=Ia(i,p),b=(T=(P=i.response)==null?void 0:P.body)==null?void 0:T.usage,_=b?(b.input_tokens||0)+(b.cache_read_input_tokens||0)+(b.cache_creation_input_tokens||0):null,S=(b==null?void 0:b.output_tokens)||null,C=(b==null?void 0:b.cache_read_input_tokens)||0,E=(b==null?void 0:b.cache_creation_input_tokens)||0;let k=i.url;try{const O=new URL(i.url);k=O.host+O.pathname}catch{}return w.jsx(ku.Item,{ref:c?this.activeItemRef:void 0,onClick:()=>r(o),className:`${Yn.listItem} ${c?Yn.listItemActive:""}`,children:w.jsxs("div",{className:Yn.itemContent,children:[w.jsxs("div",{className:Yn.itemHeader,children:[g==="MainAgent"?w.jsx(Wi,{color:"orange",className:Yn.tagNoMargin,children:"MainAgent"}):g==="Plan"?w.jsx(Wi,{className:Yn.tagNoMargin,style:{color:"#a33",borderColor:"#a33",backgroundColor:"#000"},children:pf(g,v)}):g==="Count"||g==="Preflight"?w.jsx(Wi,{className:Yn.tagNoMargin,style:{color:"#666",borderColor:"#444",backgroundColor:"#000"},children:g}):w.jsx(Wi,{className:Yn.tagNoMargin,children:pf(g,v)}),f&&w.jsx("span",{className:Yn.modelName,style:{color:g==="MainAgent"?"#d4822d":"#8c8c8c"},children:f}),w.jsx("span",{className:Yn.time,children:a})]}),w.jsxs("div",{className:Yn.detailRow,children:[w.jsx("span",{className:Yn.urlText,title:i.url,children:k}),i.duration&&w.jsxs("span",{className:Yn.duration,children:[i.duration,"ms"]}),i.response&&w.jsx("span",{className:u?Yn.statusOk:d?Yn.statusErr:Yn.statusDefault,children:i.response.status})]}),b&&w.jsxs("div",{className:Yn.usageBox,children:[w.jsxs("div",{children:["token: output:",cr(S)||0,", input: ",cr(_)||0]}),(C>0||E>0)&&w.jsx("div",{children:(()=>{const O=d4(t,o),N={ttl:"ui.cacheLoss.ttl",system_change:"ui.cacheLoss.systemChange",tools_change:"ui.cacheLoss.toolsChange",model_change:"ui.cacheLoss.modelChange",msg_truncated:"ui.cacheLoss.msgTruncated",msg_modified:"ui.cacheLoss.msgModified",key_change:"ui.cacheLoss.keyChange"};let I;if(O){const A=(O.reasons||[O.reason]).map(M=>Ce(N[M]||N.key_change)).join(`
557
- `);I=w.jsx(Ko,{title:w.jsx("span",{style:{whiteSpace:"pre-line"},children:A}),children:w.jsx("span",{className:`${Yn.cacheDot} ${Yn.cacheDotLoss}`})})}else I=w.jsx("span",{className:`${Yn.cacheDot} ${Yn.cacheDotNormal}`});return w.jsxs(w.Fragment,{children:["cache",I,": ",C>0?`read:${cr(C)}`:"",C>0&&E>0?", ":"",E>0?`create:${cr(E)}`:""]})})()})]})]})})}})})}}const sq=e=>typeof e=="boolean"||e instanceof Boolean,aq=e=>typeof e=="number"||e instanceof Number,lq=e=>typeof e=="bigint"||e instanceof BigInt,E4=e=>!!e&&e instanceof Date,cq=e=>typeof e=="string"||e instanceof String,uq=e=>Array.isArray(e),k4=e=>typeof e=="object"&&e!==null,$4=e=>!!e&&e instanceof Object&&typeof e=="function";function bf(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function dq(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function R4(e){let{field:t,value:n,data:r,lastElement:i,openBracket:o,closeBracket:a,level:c,style:u,shouldExpandNode:d,clickToExpandNode:f,outerRef:p,beforeExpandChange:g}=e;const v=h.useRef(!1),[b,_]=h.useState(()=>d(c,n,t)),S=h.useRef(null);h.useEffect(()=>{v.current?_(d(c,n,t)):v.current=!0},[d]);const C=h.useId();if(r.length===0)return hq({field:t,openBracket:o,closeBracket:a,lastElement:i,style:u});const E=b?u.collapseIcon:u.expandIcon,k=b?u.ariaLables.collapseJson:u.ariaLables.expandJson,$=c+1,P=r.length-1,T=I=>{b!==I&&(!g||g({level:c,value:n,field:t,newExpandValue:I}))&&_(I)},O=I=>{if(I.key==="ArrowRight"||I.key==="ArrowLeft")I.preventDefault(),T(I.key==="ArrowRight");else if(I.key==="ArrowUp"||I.key==="ArrowDown"){I.preventDefault();const z=I.key==="ArrowUp"?-1:1;if(!p.current)return;const A=p.current.querySelectorAll("[role=button]");let M=-1;for(let B=0;B<A.length;B++)if(A[B].tabIndex===0){M=B;break}if(M<0)return;const j=(M+z+A.length)%A.length;A[M].tabIndex=-1,A[j].tabIndex=0,A[j].focus()}},N=()=>{var I;T(!b);const z=S.current;if(!z)return;const A=(I=p.current)===null||I===void 0?void 0:I.querySelector('[role=button][tabindex="0"]');A&&(A.tabIndex=-1),z.tabIndex=0,z.focus()};return h.createElement("div",{className:u.basicChildStyle,role:"treeitem","aria-expanded":b,"aria-selected":void 0},h.createElement("span",{className:E,onClick:N,onKeyDown:O,role:"button","aria-label":k,"aria-expanded":b,"aria-controls":b?C:void 0,ref:S,tabIndex:c===0?0:-1}),(t||t==="")&&(f?h.createElement("span",{className:u.clickableLabel,onClick:N,onKeyDown:O},bf(t,u.quotesForFieldNames),":"):h.createElement("span",{className:u.label},bf(t,u.quotesForFieldNames),":")),h.createElement("span",{className:u.punctuation},o),b?h.createElement("ul",{id:C,role:"group",className:u.childFieldsContainer},r.map((I,z)=>h.createElement(v0,{key:I[0]||z,field:I[0],value:I[1],style:u,lastElement:z===P,level:$,shouldExpandNode:d,clickToExpandNode:f,beforeExpandChange:g,outerRef:p}))):h.createElement("span",{className:u.collapsedContent,onClick:N,onKeyDown:O}),h.createElement("span",{className:u.punctuation},a),!i&&h.createElement("span",{className:u.punctuation},","))}function hq(e){let{field:t,openBracket:n,closeBracket:r,lastElement:i,style:o}=e;return h.createElement("div",{className:o.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&h.createElement("span",{className:o.label},bf(t,o.quotesForFieldNames),":"),h.createElement("span",{className:o.punctuation},n),h.createElement("span",{className:o.punctuation},r),!i&&h.createElement("span",{className:o.punctuation},","))}function fq(e){let{field:t,value:n,style:r,lastElement:i,shouldExpandNode:o,clickToExpandNode:a,level:c,outerRef:u,beforeExpandChange:d}=e;return R4({field:t,value:n,lastElement:i||!1,level:c,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:o,clickToExpandNode:a,data:Object.keys(n).map(f=>[f,n[f]]),outerRef:u,beforeExpandChange:d})}function mq(e){let{field:t,value:n,style:r,lastElement:i,level:o,shouldExpandNode:a,clickToExpandNode:c,outerRef:u,beforeExpandChange:d}=e;return R4({field:t,value:n,lastElement:i||!1,level:o,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:a,clickToExpandNode:c,data:n.map(f=>[void 0,f]),outerRef:u,beforeExpandChange:d})}function pq(e){let{field:t,value:n,style:r,lastElement:i}=e,o,a=r.otherValue;return n===null?(o="null",a=r.nullValue):n===void 0?(o="undefined",a=r.undefinedValue):cq(n)?(o=dq(n,!r.noQuotesForStringValues,r.stringifyStringValues),a=r.stringValue):sq(n)?(o=n?"true":"false",a=r.booleanValue):aq(n)?(o=n.toString(),a=r.numberValue):lq(n)?(o=`${n.toString()}n`,a=r.numberValue):E4(n)?o=n.toISOString():$4(n)?o="function() { }":o=n.toString(),h.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&h.createElement("span",{className:r.label},bf(t,r.quotesForFieldNames),":"),h.createElement("span",{className:a},o),!i&&h.createElement("span",{className:r.punctuation},","))}function v0(e){const t=e.value;return uq(t)?h.createElement(mq,Object.assign({},e)):k4(t)&&!E4(t)&&!$4(t)?h.createElement(fq,Object.assign({},e)):h.createElement(pq,Object.assign({},e))}var $n={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti","container-dark":"_11RoI _GzYRV","expand-icon-dark":"_17H2C _f10Tu _1MFti _1UmXx","collapse-icon-dark":"_3QHg2 _f10Tu _1MFti _1LId0","collapsed-content-dark":"_3fDAz _1pNG9 _1MFti","label-dark":"_2bSDX","clickable-label-dark":"_1RQEj _2bSDX _1MFti","punctuation-dark":"_gsbQL _3eOF8","value-null-dark":"_LaAZe","value-undefined-dark":"_GTKgm","value-string-dark":"_Chy1W","value-number-dark":"_2bveF","value-boolean-dark":"_2vRm-","value-other-dark":"_1prJR"};const T4={collapseJson:"collapse JSON",expandJson:"expand JSON"},qg={container:$n["container-light"],basicChildStyle:$n["basic-element-style"],childFieldsContainer:$n["child-fields-container"],label:$n["label-light"],clickableLabel:$n["clickable-label-light"],nullValue:$n["value-null-light"],undefinedValue:$n["value-undefined-light"],stringValue:$n["value-string-light"],booleanValue:$n["value-boolean-light"],numberValue:$n["value-number-light"],otherValue:$n["value-other-light"],punctuation:$n["punctuation-light"],collapseIcon:$n["collapse-icon-light"],expandIcon:$n["expand-icon-light"],collapsedContent:$n["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:T4,stringifyStringValues:!1},gq={container:$n["container-dark"],basicChildStyle:$n["basic-element-style"],childFieldsContainer:$n["child-fields-container"],label:$n["label-dark"],clickableLabel:$n["clickable-label-dark"],nullValue:$n["value-null-dark"],undefinedValue:$n["value-undefined-dark"],stringValue:$n["value-string-dark"],booleanValue:$n["value-boolean-dark"],numberValue:$n["value-number-dark"],otherValue:$n["value-other-dark"],punctuation:$n["punctuation-dark"],collapseIcon:$n["collapse-icon-dark"],expandIcon:$n["expand-icon-dark"],collapsedContent:$n["collapsed-content-dark"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:T4,stringifyStringValues:!1},vq=()=>!0,yq=e=>{let{data:t,style:n=qg,shouldExpandNode:r=vq,clickToExpandNode:i=!1,beforeExpandChange:o,compactTopLevel:a,...c}=e;const u=h.useRef(null);return h.createElement("div",Object.assign({"aria-label":"JSON view"},c,{className:n.container,ref:u,role:"tree"}),a&&k4(t)?Object.entries(t).map(d=>{let[f,p]=d;return h.createElement(v0,{key:f,field:f,value:p,style:{...qg,...n},lastElement:!0,level:1,shouldExpandNode:r,clickToExpandNode:i,beforeExpandChange:o,outerRef:u})}):h.createElement(v0,{value:t,style:{...qg,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:i,outerRef:u,beforeExpandChange:o}))},bq="_container_1h2lr_1",_q={container:bq},Sq={...gq,container:"rjv-container"};class _f extends Q.Component{shouldComponentUpdate(t){return t.data!==this.props.data||t.defaultExpand!==this.props.defaultExpand||t.expandNode!==this.props.expandNode}render(){const{data:t,defaultExpand:n,expandNode:r}=this.props;if(t==null)return null;const i=typeof r=="function"?r:n==="all"?()=>!0:n==="root"?o=>o<2:o=>o<1;return w.jsx("div",{className:_q.container,children:w.jsx(yq,{data:t,shouldExpandNode:i,style:Sq})})}}const Cq="_tag_17wfp_1",xq="_tagActive_17wfp_22",wq="_tagLoading_17wfp_27",Eq="_spinner_17wfp_32",mh={tag:Cq,tagActive:xq,tagLoading:wq,spinner:Eq};function bb({text:e,onTranslated:t}){const[n,r]=h.useState("idle"),i=h.useRef(null),o=h.useCallback(c=>{if(c.stopPropagation(),n==="loading")return;if(n==="done"){r("idle"),t==null||t(null);return}if(i.current){r("done"),t==null||t(i.current);return}r("loading");const u=window.location.port||"7008",d=`${window.location.protocol}//${window.location.hostname}:${u}`;fetch(`${d}/api/translate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:e,to:Yl()})}).then(f=>{if(!f.ok)throw new Error(`HTTP ${f.status}`);return f.json()}).then(f=>{const p=f.text||"";i.current=p,r("done"),t==null||t(p)}).catch(()=>{r("idle")})},[n,e,t]),a=Ce(n==="loading"?"ui.translating":"ui.translate");return w.jsxs("span",{className:`${mh.tag} ${n==="done"?mh.tagActive:""} ${n==="loading"?mh.tagLoading:""}`,onClick:o,children:[n==="loading"&&w.jsx("span",{className:mh.spinner}),a]})}const kq="_root_13xe8_1",$q="_sidebar_13xe8_9",Rq="_section_13xe8_17",Tq="_sectionHeader_13xe8_21",Pq="_arrow_13xe8_37",Oq="_sectionTitle_13xe8_43",Iq="_sectionCount_13xe8_51",Nq="_sectionBody_13xe8_60",Mq="_historyToggle_13xe8_65",zq="_historyToggleLabel_13xe8_81",jq="_item_13xe8_86",Bq="_itemActive_13xe8_102",Lq="_itemContent_13xe8_112",Aq="_itemLabel_13xe8_118",Dq="_itemSublabel_13xe8_126",Hq="_itemTime_13xe8_135",Fq="_content_13xe8_144",Wq="_contentEmpty_13xe8_151",Vq="_contentInner_13xe8_158",qq="_emptyWrap_13xe8_162",Uq="_roleHeader_13xe8_170",Kq="_roleBadge_13xe8_178",Gq="_role_user_13xe8_187",Xq="_role_assistant_13xe8_193",Yq="_roleLabel_13xe8_199",Jq="_contentTime_13xe8_206",Qq="_turnDivider_13xe8_214",Zq="_textBlock_13xe8_221",eU="_textBlockBar_13xe8_228",tU="_textBlockBody_13xe8_237",nU="_textBlockCompact_13xe8_245",rU="_textBlockCompactFloat_13xe8_252",iU="_thinkingBlock_13xe8_259",oU="_thinkingHeader_13xe8_267",sU="_thinkingPreview_13xe8_282",aU="_thinkingBody_13xe8_292",lU="_toolBlock_13xe8_298",cU="_toolBlockResult_13xe8_305",uU="_toolBlockError_13xe8_309",dU="_toolBlockHeader_13xe8_313",hU="_toolBlockBody_13xe8_324",fU="_toolName_13xe8_329",mU="_toolId_13xe8_335",pU="_errorLabel_13xe8_342",gU="_blockTag_13xe8_352",vU="_blockTagText_13xe8_365",yU="_blockTagThinking_13xe8_371",bU="_blockTagResult_13xe8_377",_U="_blockTagError_13xe8_383",SU="_jsonBlock_13xe8_390",CU="_jsonBlockLabel_13xe8_397",xU="_blockSeparator_13xe8_407",wU="_markdownBody_13xe8_414",it={root:kq,sidebar:$q,section:Rq,sectionHeader:Tq,arrow:Pq,sectionTitle:Oq,sectionCount:Iq,sectionBody:Nq,historyToggle:Mq,historyToggleLabel:zq,item:jq,itemActive:Bq,itemContent:Lq,itemLabel:Aq,itemSublabel:Dq,itemTime:Hq,content:Fq,contentEmpty:Wq,contentInner:Vq,emptyWrap:qq,roleHeader:Uq,roleBadge:Kq,role_user:Gq,role_assistant:Xq,roleLabel:Yq,contentTime:Jq,turnDivider:Qq,textBlock:Zq,textBlockBar:eU,textBlockBody:tU,textBlockCompact:nU,textBlockCompactFloat:rU,thinkingBlock:iU,thinkingHeader:oU,thinkingPreview:sU,thinkingBody:aU,toolBlock:lU,toolBlockResult:cU,toolBlockError:uU,toolBlockHeader:dU,toolBlockBody:hU,toolName:fU,toolId:mU,errorLabel:pU,blockTag:gU,blockTagText:vU,blockTagThinking:yU,blockTagResult:bU,blockTagError:_U,jsonBlock:SU,jsonBlockLabel:CU,blockSeparator:xU,markdownBody:wU},{Text:EU}=Oo;function y0(e){if(e==null)return[];if(typeof e=="string"){const t=e.trim();return t?[{type:"markdown",text:t}]:[]}if(Array.isArray(e)){const t=[];for(const n of e)if(n)if(n.type==="text"){const r=(n.text||"").trim();r&&t.push({type:"markdown",text:r})}else if(n.type==="tool_use")t.push({type:"tool_use",name:n.name||"unknown",id:n.id||"",input:n.input??{}});else if(n.type==="tool_result"){const r=kU(n.content);t.push({type:"tool_result",tool_use_id:n.tool_use_id||"",is_error:n.is_error,content:r})}else if(n.type==="thinking"){const r=n.thinking||"";r.trim()&&t.push({type:"thinking",text:r})}else n.type==="image"?t.push({type:"json",label:"image",data:n}):t.push({type:"json",label:n.type||"block",data:n});return t}return[{type:"json",label:"content",data:e}]}function kU(e){if(e==null)return[];if(typeof e=="string"){const t=e.trim();return t?[{type:"markdown",text:t}]:[]}return Array.isArray(e)?e.flatMap(t=>{if(!t)return[];if(t.type==="text"){const n=(t.text||"").trim();return n?[{type:"markdown",text:n}]:[]}return[{type:"json",label:t.type||"block",data:t}]}):[{type:"json",label:"content",data:e}]}function $U(e){if(!e)return null;if(typeof e=="string")return[{type:"markdown",text:e}];if(Array.isArray(e)){const t=[];return e.forEach((n,r)=>{r>0&&t.push({type:"separator"}),n&&(typeof n=="string"?t.push({type:"markdown",text:n}):n.type==="text"?t.push({type:"markdown",text:n.text||""}):t.push({type:"json",label:n.type||"item",data:n}))}),t}return[{type:"json",label:"system",data:e}]}function RU(e){const t=[],n=(e==null?void 0:e.name)||"unknown",r=(e==null?void 0:e.description)||"";let i=`### ${n}
558
-
559
- `;r&&(i+=`${r}
560
-
561
- `),t.push({type:"markdown",text:i});const o=(e==null?void 0:e.input_schema)||(e==null?void 0:e.parameters)||null;return o&&t.push({type:"json",label:"Parameters",data:o}),t}function TU(e){var t;if(typeof e=="string")return e.slice(0,60).replace(/\n/g," ");if(Array.isArray(e)){for(const n of e)if((n==null?void 0:n.type)==="text"&&((t=n.text)!=null&&t.trim()))return n.text.trim().slice(0,60).replace(/\n/g," ")}return""}function PU(e){var r;const t=[];let n=0;for(;n<e.length;){const i=e[n];if((i==null?void 0:i.role)!=="user"){n++;continue}const o=((r=e[n+1])==null?void 0:r.role)==="assistant"?e[n+1]:null;t.push({id:`turn__${n}`,isTurn:!0,turnIndex:t.length,timestamp:i._timestamp||null,assistantTimestamp:(o==null?void 0:o._timestamp)||null,userBlocks:y0(i==null?void 0:i.content),assistantBlocks:o?y0(o.content):null,preview:TU(i==null?void 0:i.content)}),n+=o?2:1}return t}function b0(e){try{return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch{return null}}function OU({text:e,compact:t}){const[n,r]=h.useState(null),i=n||ko(e),o=w.jsx(bb,{text:e,onTranslated:a=>r(a?ko(a):null)});return t?w.jsxs("div",{className:it.textBlockCompact,children:[w.jsx("span",{className:it.textBlockCompactFloat,children:o}),w.jsx("div",{className:`chat-md ${it.markdownBody}`,dangerouslySetInnerHTML:{__html:i}})]}):w.jsxs("div",{className:it.textBlock,children:[w.jsxs("div",{className:it.textBlockBar,children:[w.jsx("span",{className:`${it.blockTag} ${it.blockTagText}`,children:"text"}),o]}),w.jsx("div",{className:`chat-md ${it.textBlockBody}`,dangerouslySetInnerHTML:{__html:i}})]})}function IU({block:e}){const[t,n]=h.useState(!0),[r,i]=h.useState(null),o=e.text.length>60?e.text.slice(0,60).replace(/\n/g," ")+"…":e.text.replace(/\n/g," "),a=r||ko(e.text);return w.jsxs("div",{className:it.thinkingBlock,children:[w.jsxs("div",{className:it.thinkingHeader,onClick:()=>n(c=>!c),children:[t?w.jsx(us,{className:it.arrow}):w.jsx(Hi,{className:it.arrow}),w.jsx("span",{className:`${it.blockTag} ${it.blockTagThinking}`,children:"thinking"}),!t&&w.jsx("span",{className:it.thinkingPreview,children:o}),t&&w.jsx("span",{onClick:c=>c.stopPropagation(),children:w.jsx(bb,{text:e.text,onTranslated:c=>i(c?ko(c):null)})})]}),t&&w.jsx("div",{className:it.thinkingBody,children:w.jsx("div",{className:`chat-md ${it.markdownBody}`,dangerouslySetInnerHTML:{__html:a}})})]})}function Sf({blocks:e,compact:t}){return!e||e.length===0?null:w.jsx(w.Fragment,{children:e.map((n,r)=>w.jsx(NU,{block:n,compact:t},r))})}function NU({block:e,compact:t}){var n;return e.type==="separator"?w.jsx("hr",{className:it.blockSeparator}):e.type==="markdown"?(n=e.text)!=null&&n.trim()?w.jsx(OU,{text:e.text,compact:t}):null:e.type==="thinking"?w.jsx(IU,{block:e}):e.type==="tool_use"?w.jsxs("div",{className:it.toolBlock,children:[w.jsxs("div",{className:it.toolBlockHeader,children:[w.jsx("span",{className:it.blockTag,children:"tool_use"}),w.jsx("span",{className:it.toolName,children:e.name}),e.id&&w.jsx("span",{className:it.toolId,children:e.id})]}),w.jsx("div",{className:it.toolBlockBody,children:w.jsx(_f,{data:e.input,defaultExpand:"root"})})]}):e.type==="tool_result"?w.jsxs("div",{className:`${it.toolBlock} ${e.is_error?it.toolBlockError:it.toolBlockResult}`,children:[w.jsxs("div",{className:it.toolBlockHeader,children:[w.jsx("span",{className:`${it.blockTag} ${e.is_error?it.blockTagError:it.blockTagResult}`,children:"tool_result"}),e.tool_use_id&&w.jsx("span",{className:it.toolId,children:e.tool_use_id}),e.is_error&&w.jsx("span",{className:it.errorLabel,children:"error"})]}),w.jsx("div",{className:it.toolBlockBody,children:w.jsx(Sf,{blocks:e.content,compact:!0})})]}):e.type==="json"?w.jsxs("div",{className:it.jsonBlock,children:[e.label&&w.jsx("div",{className:it.jsonBlockLabel,children:e.label}),w.jsx(_f,{data:e.data,defaultExpand:"root"})]}):null}function MU({turn:e}){const t=e.timestamp?b0(e.timestamp):null,n=e.assistantTimestamp?b0(e.assistantTimestamp):null;return w.jsxs("div",{children:[w.jsxs("div",{className:it.roleHeader,children:[w.jsx("span",{className:`${it.roleBadge} ${it.role_user}`,children:"user"}),w.jsx("span",{className:it.roleLabel,children:`Turn ${e.turnIndex+1}`}),t&&w.jsx("span",{className:it.contentTime,children:t})]}),w.jsx(Sf,{blocks:e.userBlocks}),e.assistantBlocks&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:it.turnDivider}),w.jsxs("div",{className:it.roleHeader,children:[w.jsx("span",{className:`${it.roleBadge} ${it.role_assistant}`,children:"assistant"}),n&&w.jsx("span",{className:it.contentTime,children:n})]}),w.jsx(Sf,{blocks:e.assistantBlocks})]})]})}function zU({title:e,items:t,historyItems:n,onSelect:r,selectedId:i}){const[o,a]=h.useState(!0),[c,u]=h.useState(!1),d=t.length+((n==null?void 0:n.length)||0);function f(p){const g=i===p.id;return w.jsxs("div",{className:`${it.item} ${g?it.itemActive:""}`,onClick:()=>r(p),children:[w.jsxs("div",{className:it.itemContent,children:[w.jsx("span",{className:it.itemLabel,children:p.label}),p.sublabel&&!g&&w.jsx("div",{className:it.itemSublabel,children:p.sublabel})]}),p.time&&w.jsx("span",{className:it.itemTime,children:p.time})]},p.id)}return w.jsxs("div",{className:it.section,children:[w.jsxs("div",{className:it.sectionHeader,onClick:()=>a(p=>!p),children:[o?w.jsx(us,{className:it.arrow}):w.jsx(Hi,{className:it.arrow}),w.jsx("span",{className:it.sectionTitle,children:e}),w.jsx("span",{className:it.sectionCount,children:d})]}),o&&w.jsxs("div",{className:it.sectionBody,children:[n&&n.length>0&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:it.historyToggle,onClick:()=>u(p=>!p),children:[c?w.jsx(us,{className:it.arrow}):w.jsx(Hi,{className:it.arrow}),w.jsxs("span",{className:it.historyToggleLabel,children:[Ce("ui.context.history")," (",n.length,")"]})]}),c&&n.map(f)]}),t.map(f)]})]})}function jU({body:e,response:t}){const[n,r]=h.useState(null),i=h.useMemo(()=>{if(!Array.isArray(e==null?void 0:e.messages))return[];const u=PU(e.messages);if(u.length===0)return u;const d=u[u.length-1],f=t!=null&&t.content?y0(t.content):null;return[...u.slice(0,-1),{...d,assistantBlocks:f??d.assistantBlocks}]},[e,t]);if(h.useEffect(()=>{i.length>0?r(i[i.length-1]):r(null)},[e,t]),!e||typeof e!="object")return w.jsx("div",{className:it.emptyWrap,children:w.jsx(Ri,{description:Ce("ui.context.noData")})});const o=[],a=$U(e.system);if(a!=null&&o.push({key:"system",title:Ce("ui.context.systemPrompt"),items:[{id:"system__0",label:Ce("ui.context.systemPrompt"),blocks:a}]}),i.length>0){const u=g=>({...g,label:Ce("ui.context.historyTurnNoTime",{n:g.turnIndex+1}),time:g.timestamp?b0(g.timestamp):null,sublabel:g.preview||void 0}),d=g=>({...g,label:Ce("ui.context.currentTurn"),sublabel:g.preview||void 0}),f=i.slice(0,-1).map(u),p=d(i[i.length-1]);o.push({key:"messages",title:Ce("ui.context.messages"),historyItems:f.length>0?f:void 0,items:[p]})}if(Array.isArray(e.tools)&&e.tools.length>0&&o.push({key:"tools",title:Ce("ui.context.tools"),items:e.tools.map((u,d)=>({id:`tool__${d}`,label:(u==null?void 0:u.name)||`Tool ${d}`,blocks:RU(u)}))}),o.length===0)return w.jsx("div",{className:it.emptyWrap,children:w.jsx(Ri,{description:Ce("ui.context.noFields")})});const c=n!=null&&n.isTurn?i.find(u=>u.id===n.id)??null:n;return w.jsxs("div",{className:it.root,children:[w.jsx("div",{className:it.sidebar,children:o.map(u=>w.jsx(zU,{title:u.title,items:u.items,historyItems:u.historyItems,selectedId:c==null?void 0:c.id,onSelect:d=>r(d)},u.key))}),w.jsx("div",{className:it.content,children:c==null?w.jsx("div",{className:it.contentEmpty,children:w.jsx(EU,{type:"secondary",children:Ce("ui.context.selectPrompt")})}):w.jsx("div",{className:it.contentInner,children:c.isTurn?w.jsx(MU,{turn:c}):w.jsxs(w.Fragment,{children:[c.role&&w.jsxs("div",{className:it.roleHeader,children:[w.jsx("span",{className:`${it.roleBadge} ${it[`role_${c.role}`]||""}`,children:c.role}),w.jsx("span",{className:it.roleLabel,children:c.label})]}),w.jsx(Sf,{blocks:c.blocks})]})},c.id)})]})}const BU="_container_y3z3z_1",LU="_emptyState_y3z3z_7",AU="_urlSection_y3z3z_14",DU="_urlLeft_y3z3z_21",HU="_tokenStatsBox_y3z3z_26",FU="_tokenGrid_y3z3z_33",WU="_tokenRows_y3z3z_43",VU="_tokenRow_y3z3z_43",qU="_tokenRowBorder_y3z3z_51",UU="_tokenLabel_y3z3z_55",KU="_tokenTd_y3z3z_62",GU="_tokenHitRate_y3z3z_71",XU="_tokenHitRateLabel_y3z3z_84",YU="_urlText_y3z3z_94",JU="_metaText_y3z3z_101",QU="_headersContainer_y3z3z_105",ZU="_headerRow_y3z3z_109",eK="_headerKey_y3z3z_115",tK="_headerValue_y3z3z_120",nK="_streamingBox_y3z3z_125",rK="_rawTextPre_y3z3z_138",iK="_tabContent_y3z3z_151",oK="_bodyLabel_y3z3z_159",sK="_bodyHeader_y3z3z_163",aK="_diffSection_y3z3z_170",lK="_diffToggle_y3z3z_174",cK="_diffIcon_y3z3z_180",uK="_reminderSelect_y3z3z_206",jt={container:BU,emptyState:LU,urlSection:AU,urlLeft:DU,tokenStatsBox:HU,tokenGrid:FU,tokenRows:WU,tokenRow:VU,tokenRowBorder:qU,tokenLabel:UU,tokenTd:KU,tokenHitRate:GU,tokenHitRateLabel:XU,urlText:YU,metaText:JU,headersContainer:QU,headerRow:ZU,headerKey:eK,headerValue:tK,streamingBox:nK,rawTextPre:rK,tabContent:iK,bodyLabel:oK,bodyHeader:sK,diffSection:aK,diffToggle:lK,diffIcon:cK,reminderSelect:uK},{Text:Ei,Paragraph:dK}=Oo;class hK extends Q.Component{constructor(t){super(t),this.state={bodyViewMode:{request:"json",response:"json",diff:"json"},diffExpanded:!1,requestHeadersExpanded:!1,responseHeadersExpanded:!1,diffTooltipDismissed:!1,reminderFilters:null}}componentDidMount(){fetch("/api/preferences").then(t=>t.json()).then(t=>{t.diffTooltipDismissed&&this.setState({diffTooltipDismissed:!0})}).catch(()=>{})}dismissDiffTooltip(){this.setState({diffTooltipDismissed:!0}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({diffTooltipDismissed:!0})}).catch(()=>{})}shouldComponentUpdate(t,n){if(t.request!==this.props.request){const r=Vr(t.request);this.setState({diffExpanded:r&&!!t.expandDiff,requestHeadersExpanded:!1,responseHeadersExpanded:!1,reminderFilters:null})}return t.request!==this.props.request||t.currentTab!==this.props.currentTab||t.onTabChange!==this.props.onTabChange||t.selectedIndex!==this.props.selectedIndex||t.expandDiff!==this.props.expandDiff||n.bodyViewMode!==this.state.bodyViewMode||n.diffExpanded!==this.state.diffExpanded||n.requestHeadersExpanded!==this.state.requestHeadersExpanded||n.responseHeadersExpanded!==this.state.responseHeadersExpanded||n.diffTooltipDismissed!==this.state.diffTooltipDismissed||n.reminderFilters!==this.state.reminderFilters}toggleBodyViewMode(t){this.setState(n=>({bodyViewMode:{...n.bodyViewMode,[t]:n.bodyViewMode[t]==="json"?"text":"json"}}))}copyBody(t){var a;const{request:n}=this.props;if(!n)return;let r;if(t==="diff"?r=this._lastDiffResult:r=t==="request"?n.body:(a=n.response)==null?void 0:a.body,r==null)return;const i=typeof r=="object"?ka(r):r,o=typeof i=="string"?i:JSON.stringify(i,null,2);navigator.clipboard.writeText(o).then(()=>Di.success(Ce("ui.copySuccess")))}renderHeaders(t){return!t||Object.keys(t).length===0?w.jsx(Ei,{type:"secondary",children:Ce("ui.noHeaders")}):w.jsx("div",{className:jt.headersContainer,children:Object.entries(t).map(([n,r])=>w.jsxs("div",{className:jt.headerRow,children:[w.jsx(Ei,{code:!0,className:jt.headerKey,children:n}),n==="authorization"&&w.jsx(Hl,{doc:"TranslateContextPollution"}),w.jsx(Ei,{type:"secondary",className:jt.headerValue,children:String(r)})]},n))})}getRequestExpandNode(t,n){if(n!=="request"||!t||typeof t!="object")return;const{request:r,requests:i,selectedIndex:o}=this.props;if(!r)return;const a=i&&o!=null?i[o+1]:null,{type:c}=Ia(r,a);let u=null;if(this.state.reminderFilters==="claudeMd"&&Array.isArray(t.messages)){u=new Set,u.add(t.messages);for(const p of t.messages){if(!p||typeof p!="object")continue;const g=p.content;if(typeof g=="string")ff(g)&&u.add(p);else if(Array.isArray(g)){let v=!1;for(const b of g)b&&b.type==="text"&&ff(b.text)&&(u.add(b),v=!0);v&&(u.add(p),u.add(g))}}}let d=null;if(this.state.reminderFilters==="skills"&&Array.isArray(t.messages)){d=new Set,d.add(t.messages);for(const p of t.messages){if(!p||typeof p!="object")continue;const g=p.content;if(typeof g=="string")mf(g)&&d.add(p);else if(Array.isArray(g)){let v=!1;for(const b of g)b&&b.type==="text"&&mf(b.text)&&(d.add(b),v=!0);v&&(d.add(p),d.add(g))}}}const f=u||d;if(c==="Preflight"){const p=new Set,g=v=>{v&&typeof v=="object"&&(p.add(v),Array.isArray(v)?v.forEach(g):Object.values(v).forEach(g))};return Array.isArray(t.messages)&&g(t.messages),Array.isArray(t.system)&&t.system.length>=3&&g(t.system[2]),(v,b,_)=>!!(v<2||p.has(b)||f&&f.has(b)||v===1&&_==="system")}if(c==="MainAgent"&&Array.isArray(t.messages)&&t.messages.length===1){const p=t.messages[0],g=p&&Array.isArray(p.content)?p.content:null,v=g&&g.length>0?g[g.length-1]:null,b=new Set,_=S=>{S&&typeof S=="object"&&(b.add(S),Array.isArray(S)?S.forEach(_):Object.values(S).forEach(_))};return v&&_(v),b.add(t.messages),p&&typeof p=="object"&&b.add(p),g&&b.add(g),(S,C,E)=>!!(S<2||b.has(C)||f&&f.has(C))}if(f)return(p,g,v)=>!!(p<2||f.has(g))}renderBody(t,n){const{bodyViewMode:r}=this.state;if(t==null)return w.jsx(Ei,{type:"secondary",children:Ce("ui.noBody")});if(typeof t=="string"&&t.includes("Streaming Response"))return w.jsx("div",{className:jt.streamingBox,children:w.jsx(Ei,{type:"secondary",children:Ce("ui.streamingResponse")})});const i=typeof t=="object"?ka(t):t,o=r[n]==="json",a=this.getRequestExpandNode(i,n);return w.jsx("div",{children:o?w.jsx(_f,{data:i,defaultExpand:n==="response"?"all":"root",expandNode:a}):w.jsx("pre",{className:jt.rawTextPre,children:typeof i=="string"?i:JSON.stringify(i,null,2)})})}getPrevMainAgentRequest(){const{requests:t,selectedIndex:n}=this.props;if(!t||n==null)return null;for(let r=n-1;r>=0;r--)if(Vr(t[r]))return t[r];return null}computeDiff(t,n){if(t==null||n==null||typeof t!="object"||typeof n!="object")return null;const r={},i=new Set([...Object.keys(t),...Object.keys(n)]);for(const o of i)if(!o.startsWith("_"))if(!(o in t))r[o]=n[o];else if(o in n){const a=JSON.stringify(t[o]),c=JSON.stringify(n[o]);a!==c&&(o==="messages"&&Array.isArray(t[o])&&Array.isArray(n[o])&&n[o].length>t[o].length?r[o]=n[o].slice(t[o].length):r[o]=n[o])}else continue;return Object.keys(r).length?r:null}render(){var g,v,b;const{request:t,currentTab:n,onTabChange:r}=this.props;if(!t)return w.jsx("div",{className:jt.emptyState,children:w.jsx(Ri,{description:"选择一个请求查看详情"})});const i=new Date(t.timestamp).toLocaleString("zh-CN"),o=t.response&&t.response.status<400;let a=null;if(Vr(t)){const _=this.getPrevMainAgentRequest();if(_){const S=JSON.stringify(t.body).length,C=JSON.stringify(_.body).length;if(S<C)a=w.jsxs("div",{className:jt.diffSection,children:[w.jsxs(Ko,{title:this.state.diffTooltipDismissed?null:w.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8},children:[w.jsx("span",{style:{flex:1},children:Ce("ui.diffTooltip")}),w.jsx(Zs,{style:{cursor:"pointer",fontSize:10,marginTop:2,flexShrink:0},onClick:k=>{k.stopPropagation(),this.dismissDiffTooltip()}})]}),placement:"top",color:"#000",overlayStyle:{maxWidth:340},overlayInnerStyle:{fontSize:12,color:"#999"},children:[" ",w.jsxs(Ei,{strong:!0,className:jt.diffToggle,onClick:()=>this.setState(k=>({diffExpanded:!k.diffExpanded})),children:["Body Diff JSON ",w.jsx(Hl,{doc:"BodyDiffJSON"})," ",this.state.diffExpanded?w.jsx(us,{className:jt.diffIcon}):w.jsx(Hi,{className:jt.diffIcon})]})]}),this.state.diffExpanded&&w.jsx(Ei,{type:"secondary",children:Ce("ui.diffSessionChanged")})]});else{const k=ka(this.computeDiff(_.body,t.body));k&&(this._lastDiffResult=k,a=w.jsxs("div",{className:jt.diffSection,children:[w.jsxs(Ko,{title:this.state.diffTooltipDismissed?null:w.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8},children:[w.jsx("span",{style:{flex:1},children:Ce("ui.diffTooltip")}),w.jsx(Zs,{style:{cursor:"pointer",fontSize:10,marginTop:2,flexShrink:0},onClick:$=>{$.stopPropagation(),this.dismissDiffTooltip()}})]}),placement:"top",color:"#000",overlayStyle:{maxWidth:340},overlayInnerStyle:{fontSize:12,color:"#999"},children:[" ",w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[w.jsxs(Ei,{strong:!0,className:jt.diffToggle,onClick:()=>this.setState($=>({diffExpanded:!$.diffExpanded})),children:["Body Diff JSON ",w.jsx(Hl,{doc:"BodyDiffJSON"})," ",this.state.diffExpanded?w.jsx(us,{className:jt.diffIcon}):w.jsx(Hi,{className:jt.diffIcon})]}),this.state.diffExpanded&&w.jsxs(ds,{size:"small",style:{marginLeft:"auto"},children:[w.jsx(ur,{size:"small",icon:this.state.bodyViewMode.diff==="json"?w.jsx(cu,{}):w.jsx(Lh,{}),onClick:()=>this.toggleBodyViewMode("diff"),children:this.state.bodyViewMode.diff==="json"?"Text":"JSON"}),w.jsx(ur,{size:"small",icon:w.jsx(Bh,{}),onClick:()=>this.copyBody("diff"),children:Ce("ui.copy")})]})]})]}),this.state.diffExpanded&&w.jsx(w.Fragment,{children:this.state.bodyViewMode.diff==="json"?w.jsx(_f,{data:k,defaultExpand:"all"}):w.jsx("pre",{className:jt.rawTextPre,children:JSON.stringify(k,null,2)})})]}))}}}const c=OF(t.body),u=IF(t.body),d=[{key:"request",label:"Request",children:w.jsxs("div",{className:jt.tabContent,children:[w.jsxs("div",{className:jt.diffSection,children:[w.jsxs(Ei,{strong:!0,className:jt.diffToggle,onClick:()=>this.setState(_=>({requestHeadersExpanded:!_.requestHeadersExpanded})),children:["Headers ",this.state.requestHeadersExpanded?w.jsx(us,{className:jt.diffIcon}):w.jsx(Hi,{className:jt.diffIcon})]}),this.state.requestHeadersExpanded&&this.renderHeaders(t.headers)]}),a,w.jsxs("div",{children:[w.jsxs("div",{className:jt.bodyHeader,children:[w.jsx(Ei,{strong:!0,className:jt.bodyLabel,children:"Body"}),w.jsxs(ds,{size:"small",children:[(c||u)&&w.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[w.jsx("span",{style:{color:"#888",fontSize:12,fontFamily:"monospace"},children:"system-reminder:"}),w.jsx(Aa,{size:"small",className:jt.reminderSelect,placeholder:"filter",value:this.state.reminderFilters||void 0,onChange:_=>this.setState({reminderFilters:_||null}),options:[{label:"CLAUDE.md",value:"claudeMd",disabled:!c},{label:"Skills",value:"skills",disabled:!u}],popupMatchSelectWidth:!1,allowClear:!0})]}),w.jsx(ur,{size:"small",icon:this.state.bodyViewMode.request==="json"?w.jsx(cu,{}):w.jsx(Lh,{}),onClick:()=>this.toggleBodyViewMode("request"),children:this.state.bodyViewMode.request==="json"?"Text":"JSON"}),w.jsx(ur,{size:"small",icon:w.jsx(Bh,{}),onClick:()=>this.copyBody("request"),children:Ce("ui.copy")})]})]}),this.renderBody(t.body,"request")]})]})},{key:"response",label:"Response",children:w.jsx("div",{className:jt.tabContent,children:t.response?w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:jt.diffSection,children:[w.jsxs(Ei,{strong:!0,className:jt.diffToggle,onClick:()=>this.setState(_=>({responseHeadersExpanded:!_.responseHeadersExpanded})),children:["Headers ",this.state.responseHeadersExpanded?w.jsx(us,{className:jt.diffIcon}):w.jsx(Hi,{className:jt.diffIcon})]}),this.state.responseHeadersExpanded&&this.renderHeaders(t.response.headers)]}),w.jsxs("div",{children:[w.jsxs("div",{className:jt.bodyHeader,children:[w.jsx(Ei,{strong:!0,className:jt.bodyLabel,children:"Body"}),w.jsxs(ds,{size:"small",children:[w.jsx(ur,{size:"small",icon:this.state.bodyViewMode.response==="json"?w.jsx(cu,{}):w.jsx(Lh,{}),onClick:()=>this.toggleBodyViewMode("response"),children:this.state.bodyViewMode.response==="json"?"Text":"JSON"}),w.jsx(ur,{size:"small",icon:w.jsx(Bh,{}),onClick:()=>this.copyBody("response"),children:Ce("ui.copy")})]})]}),this.renderBody(t.response.body,"response")]})]}):w.jsx(Ri,{description:Ce("ui.responseNotCaptured")})})},{key:"context",label:"Context",children:w.jsx("div",{className:jt.tabContent,style:{height:"calc(100vh - 220px)",minHeight:400},children:w.jsx(jU,{body:t.body,response:(g=t.response)==null?void 0:g.body})})}],f=(b=(v=t.response)==null?void 0:v.body)==null?void 0:b.usage,p=f?(()=>{const _=f.input_tokens||0,S=f.output_tokens||0,C=f.cache_creation_input_tokens||0,E=f.cache_read_input_tokens||0,k=_+C+E,$=k>0?(E/k*100).toFixed(1):"0.0";return{input:_,output:S,cacheCreate:C,cacheRead:E,hitRate:$}})():null;return w.jsxs("div",{className:jt.container,children:[w.jsxs("div",{className:jt.urlSection,children:[w.jsxs("div",{className:jt.urlLeft,children:[w.jsx(dK,{className:jt.urlText,ellipsis:{rows:2,expandable:!0},children:t.url}),w.jsxs(ds,{size:"small",wrap:!0,children:[w.jsx(Wi,{color:t.method==="POST"?"blue":"green",children:t.method}),w.jsxs(Ei,{type:"secondary",className:jt.metaText,children:["🕐 ",i]}),t.duration&&w.jsxs(Ei,{type:"secondary",className:jt.metaText,children:["⏱️ ",t.duration,"ms"]}),t.response&&w.jsxs(Wi,{color:o?"success":"error",children:["HTTP ",t.response.status]})]})]}),p&&w.jsx("div",{className:jt.tokenStatsBox,children:w.jsxs("div",{className:jt.tokenGrid,children:[w.jsxs("div",{className:jt.tokenRows,children:[w.jsxs("div",{className:jt.tokenRow,children:[w.jsx("span",{className:jt.tokenLabel,children:"Token"}),w.jsxs("span",{className:jt.tokenTd,children:["input: ",cr(p.input)]}),w.jsxs("span",{className:jt.tokenTd,children:["output: ",cr(p.output)]})]}),w.jsxs("div",{className:`${jt.tokenRow} ${jt.tokenRowBorder}`,children:[w.jsx("span",{className:jt.tokenLabel,children:"Cache"}),w.jsxs("span",{className:jt.tokenTd,children:["create: ",cr(p.cacheCreate)]}),w.jsxs("span",{className:jt.tokenTd,children:["read: ",cr(p.cacheRead)]})]})]}),w.jsxs("div",{className:jt.tokenHitRate,children:[w.jsxs("div",{children:[p.hitRate,"%"]}),w.jsx("div",{className:jt.tokenHitRateLabel,children:Ce("ui.hitRate")})]})]})})]}),w.jsx(Zy,{activeKey:n,onChange:r,items:d,size:"small"})]})}}const fK=["system-reminder","local-command-caveat","project-reminder","important-instruction-reminders","file-modified-reminder","todo-reminder","user-prompt-submit-hook","local-command-stdout","command-name","task-notification","environment_details","context"];function mK(e){if(!e)return{segments:[]};const t=new RegExp("<("+fK.join("|")+")\\b[^>]*>([\\s\\S]*?)</\\1>","gi"),n=[];let r=0,i;for(;(i=t.exec(e))!==null;){if(i.index>r){const o=e.slice(r,i.index).trim();o&&n.push({type:"text",content:o})}n.push({type:"system-tag",tag:i[1],content:i[2].trim()}),r=i.index+i[0].length}if(r<e.length){const o=e.slice(r).trim();o&&n.push({type:"text",content:o})}return{segments:n}}function pK(e){const{segments:t}=mK(e);return t.length===0?{segments:[]}:{segments:t}}const gK="_wrapper_1o255_1",vK="_header_1o255_5",yK="_filePath_1o255_12",bK="_toggle_1o255_18",_K="_code_1o255_25",Fc={wrapper:gK,header:vK,filePath:yK,toggle:bK,code:_K},{Text:lw}=Oo;function SK({file_path:e,old_string:t,new_string:n}){const[r,i]=h.useState(!1),o=t.split(`
562
- `),a=n.split(`
563
- `),c=[];return o.forEach(u=>{c.push({type:"del",text:u})}),a.forEach(u=>{c.push({type:"add",text:u})}),w.jsxs("div",{className:`diff-view ${Fc.wrapper}`,children:[w.jsxs("div",{className:Fc.header,children:[w.jsxs(lw,{className:Fc.filePath,children:["Edit: ",e]}),w.jsx(lw,{className:Fc.toggle,onClick:()=>i(u=>!u),children:Ce(r?"ui.expand":"ui.collapse")})]}),!r&&w.jsx("pre",{className:Fc.code,children:c.map((u,d)=>w.jsxs("div",{className:u.type==="del"?"diff-line-del":"diff-line-add",children:[u.type==="del"?"- ":"+ ",u.text]},d))})]})}const CK="_plainResult_1uh60_1",xK="_plainTitle_1uh60_7",wK="_plainPre_1uh60_11",EK="_codeResult_1uh60_20",kK="_codeHeader_1uh60_27",$K="_codeTitle_1uh60_36",RK="_codeToggle_1uh60_41",TK="_codePre_1uh60_48",PK="_markdownBody_1uh60_57",ci={plainResult:CK,plainTitle:xK,plainPre:wK,codeResult:EK,codeHeader:kK,codeTitle:$K,codeToggle:RK,codePre:TK,markdownBody:PK},{Text:kl}=Oo,$l={js:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",c:"c",cpp:"cpp",h:"c",hpp:"cpp",css:"css",scss:"css",less:"css",html:"html",htm:"html",xml:"xml",svg:"xml",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",sh:"shell",bash:"shell",zsh:"shell",md:"markdown",sql:"sql"},OK=["Read","Grep","Glob","Bash","Write","Edit"];function IK(e,t,n){if(!t)return null;const r=t.file_path||"";if(r){const i=r.split(".").pop().toLowerCase();if($l[i])return $l[i]}if(e==="Bash")return"shell-output";if(e==="Glob")return"file-list";if(e==="Grep"){const i=t.glob||"";if(i){const o=i.replace(/[{}*]/g,",").split(",").filter(Boolean);for(const a of o){const c=a.replace(/^\./,"").toLowerCase();if($l[c])return $l[c]}}if(t.output_mode==="files_with_matches"||!t.output_mode)return"file-list";if(t.output_mode==="content"&&n){const o=n.match(/^[\w/.~-]+\.([\w]+):\d+/m);if(o&&$l[o[1].toLowerCase()])return $l[o[1].toLowerCase()]}return"shell-output"}return n?NK(n):null}function NK(e){const t=e.substring(0,2e3);return/^\s*[\[{]/.test(t)&&/[}\]]\s*$/.test(t.trimEnd())?"json":/^\s*<!DOCTYPE|^\s*<html|^\s*<\?xml/i.test(t)?"html":/^#!.*python/m.test(t)||/\bdef\s+\w+\s*\(.*\)\s*:/m.test(t)||/\bclass\s+\w+.*:/m.test(t)||/^\s*(from\s+\w+\s+import|import\s+\w+)/m.test(t)&&/:$/.test(t)?"python":/\bfn\s+\w+\s*\(/.test(t)&&/\blet\s+(mut\s+)?\w+/.test(t)?"rust":/^package\s+\w+/m.test(t)&&/\bfunc\s+/.test(t)?"go":/\bpublic\s+(class|interface|static)\b/.test(t)?"java":/\bdef\s+\w+/.test(t)&&/\bend\b/.test(t)&&!/;/.test(t)?"ruby":/^#!.*\b(bash|sh|zsh)\b/m.test(t)?"shell":/\b(const|let|var)\s+\w+\s*=/.test(t)&&(/=>/.test(t)||/\brequire\s*\(/.test(t))||/^\s*import\s+.*\s+from\s+['"]/.test(t)||/^\s*export\s+(default\s+)?(function|class|const)\b/m.test(t)?"javascript":/[.#][\w-]+\s*\{[\s\S]*?:\s*[\w#]/.test(t)?"css":/^[\w-]+\s*:(\s+\S|$)/m.test(t)&&!/[{;]/.test(t)?"yaml":/\b(SELECT|INSERT|UPDATE|DELETE|CREATE\s+TABLE)\b/i.test(t)?"sql":null}const MK={javascript:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`)/g,cls:"hl-string"},{pattern:/\b(const|let|var|function|return|if|else|for|while|class|import|export|from|default|new|this|async|await|try|catch|throw|switch|case|break|continue|typeof|instanceof|in|of|null|undefined|true|false)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],typescript:null,python:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/('''[\s\S]*?'''|"""[\s\S]*?"""|'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(def|class|return|if|elif|else|for|while|import|from|as|try|except|finally|raise|with|yield|lambda|pass|break|continue|and|or|not|in|is|None|True|False|self|async|await)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],go:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`[^`]*`)/g,cls:"hl-string"},{pattern:/\b(func|return|if|else|for|range|switch|case|default|break|continue|go|defer|select|chan|map|struct|interface|package|import|var|const|type|nil|true|false|make|new|append|len|cap)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],rust:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(fn|let|mut|return|if|else|for|while|loop|match|struct|enum|impl|trait|pub|use|mod|crate|self|super|where|async|await|move|ref|true|false|Some|None|Ok|Err)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],java:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(public|private|protected|class|interface|extends|implements|return|if|else|for|while|switch|case|break|continue|new|this|super|static|final|void|int|long|double|float|boolean|char|String|import|package|try|catch|throw|throws|null|true|false)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*[fFdDlL]?)\b/g,cls:"hl-number"}],ruby:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(def|end|class|module|return|if|elsif|else|unless|for|while|do|begin|rescue|ensure|raise|yield|block_given\?|nil|true|false|self|require|include|attr_accessor|attr_reader)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],css:[{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/([.#][\w-]+)/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*(px|em|rem|%|vh|vw|s|ms)?)\b/g,cls:"hl-number"}],json:[{pattern:/("(?:[^"\\]|\\.)*")\s*:/g,cls:"hl-keyword"},{pattern:/:\s*("(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(true|false|null)\b/g,cls:"hl-keyword"},{pattern:/\b(-?\d+\.?\d*([eE][+-]?\d+)?)\b/g,cls:"hl-number"}],shell:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(if|then|else|elif|fi|for|while|do|done|case|esac|function|return|exit|export|source|alias|cd|ls|grep|find|echo|cat|mkdir|rm|cp|mv|chmod|sudo|apt|npm|pip|git)\b/g,cls:"hl-keyword"}],sql:[{pattern:/(--.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/\b(SELECT|FROM|WHERE|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER|TABLE|INDEX|JOIN|LEFT|RIGHT|INNER|OUTER|ON|AND|OR|NOT|IN|IS|NULL|AS|ORDER|BY|GROUP|HAVING|LIMIT|OFFSET|UNION|SET|VALUES|INTO|DISTINCT|COUNT|SUM|AVG|MAX|MIN|LIKE|BETWEEN|EXISTS|CASE|WHEN|THEN|ELSE|END)\b/gi,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],html:[{pattern:/(<!--[\s\S]*?-->)/g,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/(<\/?[\w-]+|\/?>)/g,cls:"hl-keyword"}],xml:null,yaml:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/^([\w.-]+)\s*:/gm,cls:"hl-keyword"},{pattern:/\b(true|false|null|yes|no)\b/gi,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],markdown:[{pattern:/^(#{1,6}\s.*$)/gm,cls:"hl-keyword"},{pattern:/(`[^`]+`)/g,cls:"hl-string"},{pattern:/(\*\*[^*]+\*\*|__[^_]+__)/g,cls:"hl-keyword"},{pattern:/(\[[^\]]+\]\([^)]+\))/g,cls:"hl-string"}],toml:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/^([\w.-]+)\s*=/gm,cls:"hl-keyword"},{pattern:/(\[[\w.-]+\])/g,cls:"hl-keyword"},{pattern:/\b(true|false)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}]},zK=[{pattern:/(\/\/.*$|#.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`)/g,cls:"hl-string"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],jK=[{pattern:/^([\w/.~-]+:\d+[:-])/gm,cls:"hl-keyword"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],BK=[{pattern:/^(.*\.(jsx?|tsx?|mjs|cjs))$/gm,cls:"hl-string"},{pattern:/^(.*\.(py|rb|go|rs|java|c|cpp|h))$/gm,cls:"hl-keyword"},{pattern:/^(.*\.(json|ya?ml|toml|xml|html?|css|scss|less|md))$/gm,cls:"hl-number"},{pattern:/^(.*\.(log|txt|csv|jsonl))$/gm,cls:"hl-comment"}];function LK(e,t){let n=t;n==="typescript"&&(n="javascript"),n==="xml"&&(n="html"),(n==="c"||n==="cpp")&&(n="javascript");let r;n==="shell-output"?r=jK:n==="file-list"?r=BK:r=MK[n]||zK;const i=/^(\s*\d+→)/gm,o=[];let a=e.replace(i,f=>{const p=o.length;return o.push(f),`L${p}`});const c=hf(a),u=[];let d=c;for(const f of r)f.pattern.lastIndex=0,d=d.replace(f.pattern,p=>{const g=u.length;return u.push(`<span class="${f.cls}">${p}</span>`),`P${g}`});return d=d.replace(/\x02P(\d+)\x02/g,(f,p)=>u[parseInt(p)]),d=d.replace(/\x01L(\d+)\x01/g,(f,p)=>`<span class="hl-linenum">${hf(o[parseInt(p)])}</span>`),d}function cw({toolName:e,toolInput:t,resultText:n,defaultCollapsed:r}){const[i,o]=h.useState(r??!1);h.useEffect(()=>{o(r??!1)},[r]);const a=OK.includes(e),c=a?IK(e,t,n):null,u=n.length>5e3?n.substring(0,5e3)+`
564
- ... (truncated)`:n;let d=e?Ce("ui.toolReturnNamed",{name:e}):"Result";if(t){const p=t.file_path||t.path||"";if(p){const g=p.split("/");d=`${e}: ${g[g.length-1]}`}}if(!a)return e==="Task"?w.jsxs("div",{className:ci.plainResult,children:[w.jsxs("div",{className:ci.codeHeader,children:[w.jsx(kl,{type:"secondary",className:ci.plainTitle,children:d}),w.jsx(kl,{className:ci.codeToggle,onClick:()=>o(p=>!p),children:Ce(i?"ui.expand":"ui.collapse")})]}),!i&&w.jsx("div",{className:`chat-md ${ci.markdownBody}`,dangerouslySetInnerHTML:{__html:ko(u)}})]}):w.jsxs("div",{className:ci.plainResult,children:[w.jsxs("div",{className:ci.codeHeader,children:[w.jsx(kl,{type:"secondary",className:ci.plainTitle,children:d}),w.jsx(kl,{className:ci.codeToggle,onClick:()=>o(p=>!p),children:Ce(i?"ui.expand":"ui.collapse")})]}),!i&&w.jsx("pre",{className:ci.plainPre,children:u})]});const f=LK(u,c||"fallback");return w.jsxs("div",{className:`tool-result-code ${ci.codeResult}`,children:[w.jsxs("div",{className:ci.codeHeader,children:[w.jsxs(kl,{className:ci.codeTitle,children:[d,c?` (${c})`:""]}),w.jsx(kl,{className:ci.codeToggle,onClick:()=>o(p=>!p),children:Ce(i?"ui.expand":"ui.collapse")})]}),!i&&w.jsx("pre",{className:`code-highlight ${ci.codePre}`,dangerouslySetInnerHTML:{__html:f}})]})}const AK="_avatar_w9l4s_3",DK="_avatarImg_w9l4s_13",HK="_messageRow_w9l4s_32",FK="_messageRowEnd_w9l4s_38",WK="_contentCol_w9l4s_47",VK="_contentColLimited_w9l4s_52",qK="_labelRow_w9l4s_60",UK="_labelRowEnd_w9l4s_67",KK="_labelRight_w9l4s_74",GK="_labelText_w9l4s_82",XK="_timeText_w9l4s_86",YK="_timeTextNoMargin_w9l4s_92",JK="_labelTextRight_w9l4s_98",QK="_bubbleUser_w9l4s_105 _bubble_w9l4s_21",ZK="_bubbleAssistant_w9l4s_111 _bubble_w9l4s_21",eG="_bubbleHighlight_w9l4s_119",tG="_bubbleHighlightFading_w9l4s_123",nG="_borderSvg_w9l4s_128",rG="_borderSvgFading_w9l4s_137",iG="_borderRect_w9l4s_142",oG="_bubblePlan_w9l4s_151 _bubble_w9l4s_21",sG="_bubbleSubAgent_w9l4s_159 _bubble_w9l4s_21",aG="_bubbleSelection_w9l4s_165 _bubble_w9l4s_21",lG="_systemTagLabel_w9l4s_173",cG="_skillLabel_w9l4s_177",uG="_systemTagPre_w9l4s_182",dG="_collapseMargin_w9l4s_190",hG="_collapseNoMargin_w9l4s_194",fG="_thinkingLabel_w9l4s_200",mG="_toolBox_w9l4s_206",pG="_toolLabel_w9l4s_215",gG="_codePre_w9l4s_221",vG="_pathTag_w9l4s_233",yG="_descSpan_w9l4s_240",bG="_secondarySpan_w9l4s_245",_G="_patternSpan_w9l4s_249",SG="_kvContainer_w9l4s_255",CG="_kvItem_w9l4s_260",xG="_kvKey_w9l4s_264",wG="_kvValue_w9l4s_268",EG="_toolResult_w9l4s_274",kG="_toolResultLabel_w9l4s_283",$G="_compactLabel_w9l4s_289",RG="_compactPre_w9l4s_294",TG="_viewRequestBtn_w9l4s_304",PG="_optionList_w9l4s_318",OG="_optionDesc_w9l4s_322",IG="_questionText_w9l4s_330",NG="_questionSpacing_w9l4s_336",MG="_option_w9l4s_318",zG="_askQuestionBox_w9l4s_349",jG="_askQuestionHeader_w9l4s_358",BG="_askQuestionText_w9l4s_369",LG="_askOptionItem_w9l4s_375",AG="_planModeBox_w9l4s_383",DG="_planModeLabel_w9l4s_392",HG="_planModePermissions_w9l4s_397",FG="_planModePermLabel_w9l4s_403",De={avatar:AK,avatarImg:DK,messageRow:HK,messageRowEnd:FK,contentCol:WK,contentColLimited:VK,labelRow:qK,labelRowEnd:UK,labelRight:KK,labelText:GK,timeText:XK,timeTextNoMargin:YK,labelTextRight:JK,bubbleUser:QK,bubbleAssistant:ZK,bubbleHighlight:eG,bubbleHighlightFading:tG,borderSvg:nG,borderSvgFading:rG,borderRect:iG,bubblePlan:oG,bubbleSubAgent:sG,bubbleSelection:aG,systemTagLabel:lG,skillLabel:cG,systemTagPre:uG,collapseMargin:dG,collapseNoMargin:hG,thinkingLabel:fG,toolBox:mG,toolLabel:pG,codePre:gG,pathTag:vG,descSpan:yG,secondarySpan:bG,patternSpan:_G,kvContainer:SG,kvItem:CG,kvKey:xG,kvValue:wG,toolResult:EG,toolResultLabel:kG,compactLabel:$G,compactPre:RG,viewRequestBtn:TG,optionList:PG,optionDesc:OG,questionText:IG,questionSpacing:NG,option:MG,askQuestionBox:zG,askQuestionHeader:jG,askQuestionText:BG,askOptionItem:LG,planModeBox:AG,planModeLabel:DG,planModePermissions:HG,planModePermLabel:FG},{Text:ki}=Oo;class _o extends Q.Component{constructor(n){super(n);kt(this,"handleThinkingTranslated",(n,r)=>{this.setState(i=>({thinkingTranslated:{...i.thinkingTranslated,[n]:r?ko(r):null}}))});this.state={thinkingTranslated:{}}}formatTime(n){if(!n)return null;try{const r=new Date(n),i=o=>String(o).padStart(2,"0");return`${i(r.getMonth()+1)}-${i(r.getDate())} ${i(r.getHours())}:${i(r.getMinutes())}:${i(r.getSeconds())}`}catch{return null}}renderViewRequestBtn(){const{requestIndex:n,onViewRequest:r}=this.props;return n==null||!r?null:w.jsx("span",{className:De.viewRequestBtn,onClick:i=>{i.stopPropagation(),r(n)},children:Ce("ui.viewRequest")})}renderLabel(n,r){const{timestamp:i}=this.props,o=this.formatTime(i);return w.jsxs("div",{className:De.labelRow,children:[w.jsxs(ki,{type:"secondary",className:De.labelText,children:[n,r||""]}),w.jsxs("span",{className:De.labelRight,children:[this.renderViewRequestBtn(),o&&w.jsx(ki,{className:De.timeText,children:o})]})]})}renderUserAvatar(n){const{userProfile:r}=this.props;return r!=null&&r.avatar?w.jsx("img",{src:r.avatar,className:De.avatarImg,alt:r.name||"User"}):w.jsx("div",{className:De.avatar,style:{background:n},dangerouslySetInnerHTML:{__html:Pl("user")}})}getUserName(){const{userProfile:n}=this.props;return(n==null?void 0:n.name)||"User"}renderSegments(n){return n.map((r,i)=>r.type==="system-tag"?w.jsx(Yc,{ghost:!0,size:"small",items:[{key:"1",label:w.jsx(ki,{type:"secondary",className:De.systemTagLabel,children:r.tag}),children:w.jsx("pre",{className:De.systemTagPre,children:r.content})}],className:De.collapseMargin},i):w.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:ko(r.content)}},i))}renderToolCall(n){if(typeof n.input=="string")try{const f=n.input.replace(/^\[object Object\]/,"");n={...n,input:JSON.parse(f)}}catch{}if(n.name==="Edit"&&n.input&&n.input.old_string!=null&&n.input.new_string!=null)return w.jsx(SK,{file_path:n.input.file_path||"",old_string:n.input.old_string,new_string:n.input.new_string},n.id);const r=n.input&&typeof n.input=="object"?n.input:{},i=(f,p)=>w.jsxs("div",{className:De.toolBox,children:[w.jsx(ki,{strong:!0,className:De.toolLabel,children:f}),p]},n.id),o=(f,p)=>w.jsx("pre",{className:De.codePre,style:{color:p},children:f}),a=f=>w.jsx("span",{className:De.pathTag,children:f});if(n.name==="Bash"){const f=r.command||"",p=r.description||"";return i(w.jsxs(w.Fragment,{children:["Bash",p?w.jsxs("span",{className:De.descSpan,children:[" — ",p]}):""]}),o(f,"#c9d1d9"))}if(n.name==="Read"){const f=r.file_path||"",p=[];r.offset&&p.push(`offset: ${r.offset}`),r.limit&&p.push(`limit: ${r.limit}`);const g=p.length?` (${p.join(", ")})`:"";return i(w.jsxs(w.Fragment,{children:["Read: ",a(f),w.jsx("span",{className:De.secondarySpan,children:g})]}),null)}if(n.name==="Write"){const f=r.file_path||"",p=r.content||"",g=p.split(`
565
- `),v=g.length>20?g.slice(0,20).join(`
566
- `)+`
567
- ... (${g.length} lines total)`:p;return i(w.jsxs(w.Fragment,{children:["Write: ",a(f)," ",w.jsxs("span",{className:De.secondarySpan,children:["(",g.length," lines)"]})]}),o(v,"#c9d1d9"))}if(n.name==="Glob"){const f=r.pattern||"",p=r.path||"";return i(w.jsxs(w.Fragment,{children:["Glob: ",w.jsx("span",{className:De.patternSpan,children:f}),p?w.jsxs("span",{className:De.secondarySpan,children:[" in ",p]}):""]}),null)}if(n.name==="Grep"){const f=r.pattern||"",p=r.path||"",g=[];r.glob&&g.push(`glob: ${r.glob}`),r.output_mode&&g.push(`mode: ${r.output_mode}`),r.head_limit&&g.push(`limit: ${r.head_limit}`);const v=g.length?` (${g.join(", ")})`:"";return i(w.jsxs(w.Fragment,{children:["Grep: ",w.jsxs("span",{className:De.patternSpan,children:["/",f,"/"]}),p?w.jsxs("span",{className:De.secondarySpan,children:[" in ",p]}):"",w.jsx("span",{className:De.secondarySpan,children:v})]}),null)}if(n.name==="Task"){const f=r.subagent_type||"",p=r.description||"";return i(w.jsxs(w.Fragment,{children:["Task(",f,p?": "+p:"",")"]}),null)}if(n.name==="AskUserQuestion"){const f=r.questions||[];return w.jsx("div",{className:De.askQuestionBox,children:f.map((p,g)=>w.jsxs("div",{className:g<f.length-1?De.questionSpacing:void 0,children:[p.header&&w.jsx("span",{className:De.askQuestionHeader,children:p.header}),w.jsx("div",{className:De.askQuestionText,children:p.question}),w.jsx("div",{className:De.optionList,children:p.options&&p.options.map((v,b)=>w.jsxs("div",{className:De.askOptionItem,children:["○ ",v.label,v.description&&w.jsxs("span",{className:De.optionDesc,children:["— ",v.description]})]},b))})]},g))},n.id)}if(n.name==="EnterPlanMode")return w.jsx("div",{className:De.planModeBox,children:w.jsx("span",{className:De.planModeLabel,children:Ce("ui.enterPlanMode")})},n.id);if(n.name==="ExitPlanMode"){const f=r.allowedPrompts||[];return w.jsxs("div",{className:De.planModeBox,children:[w.jsx("span",{className:De.planModeLabel,children:Ce("ui.exitPlanMode")}),f.length>0&&w.jsxs("div",{className:De.planModePermissions,children:[w.jsx("div",{className:De.planModePermLabel,children:Ce("ui.allowedPrompts")}),f.map((p,g)=>w.jsxs("div",{className:De.askOptionItem,children:["• ",p.prompt||p.tool]},g))]})]},n.id)}let c=n.name;const u=Object.keys(r);if(u.length===0)return i(c,null);const d=u.map(f=>{const p=r[f],g=typeof p=="string"?p:JSON.stringify(p),v=g.length>200?g.substring(0,200)+"...":g;return w.jsxs("div",{className:De.kvItem,children:[w.jsxs("span",{className:De.kvKey,children:[f,": "]}),w.jsx("span",{className:De.kvValue,children:v})]},f)});return i(c,w.jsx("div",{className:De.kvContainer,children:d}))}renderHighlightBubble(n,r){const{highlight:i}=this.props,o=`${n}${i==="active"?" "+De.bubbleHighlight:""}${i==="fading"?" "+De.bubbleHighlightFading:""}`,a=n===De.bubbleUser;return w.jsxs("div",{className:o,style:{position:"relative"},children:[(i==="active"||i==="fading")&&w.jsx("svg",{className:`${De.borderSvg}${i==="fading"?" "+De.borderSvgFading:""}`,preserveAspectRatio:"none",children:w.jsx("rect",{x:"0.5",y:"0.5",width:"calc(100% - 1px)",height:"calc(100% - 1px)",rx:"8",ry:"8",fill:"none",stroke:a?"#ffffff":"#1668dc",strokeWidth:"1",strokeDasharray:"6 4",className:De.borderRect})}),r]})}renderUserMessage(){const{text:n,timestamp:r}=this.props,i=this.formatTime(r),o=this.getUserName();return n&&n.includes("This session is being continued from a previous conversation that ran out of context")?w.jsxs("div",{className:De.messageRowEnd,children:[w.jsxs("div",{className:De.contentColLimited,children:[w.jsxs("div",{className:De.labelRow,children:[i&&w.jsx(ki,{className:De.timeTextNoMargin,children:i}),this.renderViewRequestBtn(),w.jsxs(ki,{type:"secondary",className:De.labelTextRight,children:[o," — /compact"]})]}),this.renderHighlightBubble(De.bubbleUser,w.jsx(Yc,{ghost:!0,size:"small",items:[{key:"1",label:w.jsx(ki,{className:De.compactLabel,children:"Compact Summary"}),children:w.jsx("pre",{className:De.compactPre,children:n})}],className:De.collapseNoMargin}))]}),this.renderUserAvatar("#1e40af")]}):w.jsxs("div",{className:De.messageRowEnd,children:[w.jsxs("div",{className:De.contentColLimited,children:[w.jsxs("div",{className:De.labelRow,children:[i&&w.jsx(ki,{className:De.timeTextNoMargin,children:i}),this.renderViewRequestBtn(),w.jsx(ki,{type:"secondary",className:De.labelTextRight,children:o})]}),this.renderHighlightBubble(De.bubbleUser,hf(n))]}),this.renderUserAvatar("#1e40af")]})}renderToolResult(n){return n?w.jsxs("div",{className:De.toolResult,children:[w.jsx(ki,{type:"secondary",className:De.toolResultLabel,children:n.label}),w.jsx(cw,{toolName:n.toolName,toolInput:n.toolInput,resultText:n.resultText,defaultCollapsed:this.props.collapseToolResults})]}):null}renderAssistantContent(n,r={}){const i=n.filter(u=>u.type==="thinking"),o=n.filter(u=>u.type==="text"),a=n.filter(u=>u.type==="tool_use");let c=[];return i.forEach((u,d)=>{const p=this.state.thinkingTranslated[d]||ko(u.thinking||"");c.push(w.jsx(Yc,{ghost:!0,size:"small",defaultActiveKey:this.props.expandThinking?["1"]:[],items:[{key:"1",label:w.jsxs("span",{children:[w.jsx(ki,{type:"secondary",className:De.thinkingLabel,children:Ce("ui.thinking")}),w.jsx(bb,{text:u.thinking||"",onTranslated:g=>this.handleThinkingTranslated(d,g)})]}),children:w.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:p}})}],className:De.collapseMargin},`think-${d}-${this.props.expandThinking?"e":"c"}`))}),o.forEach((u,d)=>{if(u.text){const{segments:f}=pK(u.text);c.push(w.jsx("div",{children:this.renderSegments(f)},`text-${d}`))}}),a.forEach(u=>{c.push(this.renderToolCall(u));const d=r[u.id];d&&c.push(w.jsx(Q.Fragment,{children:this.renderToolResult(d)},`tr-${u.id}`))}),c}renderAssistantMessage(){const{content:n,toolResultMap:r={},modelInfo:i}=this.props,o=this.renderAssistantContent(n,r);return o.length===0?null:w.jsxs("div",{className:De.messageRow,children:[w.jsx("div",{className:De.avatar,style:{background:(i==null?void 0:i.color)||"#6b21a8"},dangerouslySetInnerHTML:{__html:(i==null?void 0:i.svg)||Pl("agent")}}),w.jsxs("div",{className:De.contentCol,children:[this.renderLabel((i==null?void 0:i.name)||"MainAgent"),this.renderHighlightBubble(De.bubbleAssistant,o)]})]})}renderSubAgentChatMessage(){const{content:n,toolResultMap:r={},label:i}=this.props,o=this.renderAssistantContent(n,r);return o.length===0?null:w.jsxs("div",{className:De.messageRowEnd,children:[w.jsxs("div",{className:De.contentColLimited,children:[w.jsxs("div",{className:De.labelRowEnd,children:[this.formatTime(this.props.timestamp)&&w.jsx(ki,{className:De.timeText,children:this.formatTime(this.props.timestamp)}),this.renderViewRequestBtn(),w.jsx(ki,{type:"secondary",className:De.labelTextRight,children:i||"SubAgent"})]}),this.renderHighlightBubble(De.bubbleAssistant,o)]}),w.jsx("div",{className:De.avatar,style:{background:"#4a1d96"},dangerouslySetInnerHTML:{__html:Pl("sub")}})]})}renderSubAgentMessage(){const{label:n,resultText:r,toolName:i,toolInput:o}=this.props;return w.jsxs("div",{className:De.messageRow,children:[w.jsx("div",{className:De.avatar,style:{background:"#4a1d96"},dangerouslySetInnerHTML:{__html:Pl("sub")}}),w.jsxs("div",{className:De.contentCol,children:[this.renderLabel(n),w.jsx("div",{className:De.bubbleSubAgent,children:w.jsx(cw,{toolName:i,toolInput:o,resultText:r})})]})]})}renderUserSelectionMessage(){const{questions:n,answers:r}=this.props,i=this.getUserName();return w.jsxs("div",{className:De.messageRowEnd,children:[w.jsxs("div",{className:De.contentColLimited,children:[this.renderLabel(i," — 选择"),w.jsx("div",{className:De.bubbleSelection,children:n&&n.map((o,a)=>{const c=(r==null?void 0:r[o.question])||"未选择";return w.jsxs("div",{className:a<n.length-1?De.questionSpacing:void 0,children:[w.jsx("div",{className:De.questionText,children:o.question}),w.jsx("div",{className:De.optionList,children:o.options&&o.options.map((u,d)=>{const f=c===u.label;return w.jsxs("div",{className:De.option,style:{color:f?"#e5e5e5":"#666",fontWeight:f?600:"normal"},children:[f?"● ":"○ ",u.label,u.description&&w.jsxs("span",{className:De.optionDesc,children:["— ",u.description]})]},d)})})]},a)})})]}),this.renderUserAvatar("#2ea043")]})}renderPlanPromptMessage(){const{text:n,timestamp:r,modelInfo:i}=this.props;this.formatTime(r);const o=(n||"").replace(/^Implement the following plan:\s*/i,"");return w.jsxs("div",{className:De.messageRow,children:[w.jsx("div",{className:De.avatar,style:{background:(i==null?void 0:i.color)||"#6b21a8"},dangerouslySetInnerHTML:{__html:(i==null?void 0:i.svg)||Pl("agent")}}),w.jsxs("div",{className:De.contentColLimited,children:[this.renderLabel((i==null?void 0:i.name)||"MainAgent"," (Plan)"),w.jsx("div",{className:De.bubblePlan,children:w.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:ko(o)}})})]})]})}renderSkillLoadedMessage(){const{text:n,skillName:r,timestamp:i}=this.props,o=this.formatTime(i);return w.jsxs("div",{className:De.messageRow,children:[w.jsx("div",{style:{width:32,flexShrink:0}}),w.jsx("div",{className:De.contentCol,children:w.jsx(Yc,{ghost:!0,size:"small",items:[{key:"1",label:w.jsxs("span",{className:De.skillLabel,children:["📦 ",Ce("ui.skillLoaded"),": ",r,o&&w.jsx(ki,{className:De.timeTextNoMargin,style:{marginLeft:8},children:o})]}),children:w.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:ko(n)}})}],className:De.collapseNoMargin})})]})}render(){const{role:n}=this.props;return n==="user"?this.renderUserMessage():n==="skill-loaded"?this.renderSkillLoadedMessage():n==="plan-prompt"?this.renderPlanPromptMessage():n==="user-selection"?this.renderUserSelectionMessage():n==="assistant"?this.renderAssistantMessage():n==="sub-agent-chat"?this.renderSubAgentChatMessage():n==="sub-agent"?this.renderSubAgentMessage():null}}/**
568
- * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
569
- * @license MIT
570
- *
571
- * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
572
- * @license MIT
573
- *
574
- * Originally forked from (with the author's permission):
575
- * Fabrice Bellard's javascript vt100 for jslinux:
576
- * http://bellard.org/jslinux/
577
- * Copyright (c) 2011 Fabrice Bellard
578
- */var P4=Object.defineProperty,WG=Object.getOwnPropertyDescriptor,VG=(e,t)=>{for(var n in t)P4(e,n,{get:t[n],enumerable:!0})},rr=(e,t,n,r)=>{for(var i=r>1?void 0:r?WG(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,n,i):a(i))||i);return r&&i&&P4(t,n,i),i},ct=(e,t)=>(n,r)=>t(n,r,e),uw="Terminal input",_0={get:()=>uw,set:e=>uw=e},dw="Too much output to announce, navigate to rows manually to read",S0={get:()=>dw,set:e=>dw=e};function qG(e){return e.replace(/\r?\n/g,"\r")}function UG(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function KG(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function GG(e,t,n,r){if(e.stopPropagation(),e.clipboardData){let i=e.clipboardData.getData("text/plain");O4(i,t,n,r)}}function O4(e,t,n,r){e=qG(e),e=UG(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=""}function I4(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,o=e.clientY-r.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${i}px`,t.style.top=`${o}px`,t.style.zIndex="1000",t.focus()}function hw(e,t,n,r,i){I4(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function Fs(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function pm(e,t=0,n=e.length){let r="";for(let i=t;i<n;++i){let o=e[i];o>65535?(o-=65536,r+=String.fromCharCode((o>>10)+55296)+String.fromCharCode(o%1024+56320)):r+=String.fromCharCode(o)}return r}var XG=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let o=e.charCodeAt(i++);56320<=o&&o<=57343?t[r++]=(this._interim-55296)*1024+o-56320+65536:(t[r++]=this._interim,t[r++]=o),this._interim=0}for(let o=i;o<n;++o){let a=e.charCodeAt(o);if(55296<=a&&a<=56319){if(++o>=n)return this._interim=a,r;let c=e.charCodeAt(o);56320<=c&&c<=57343?t[r++]=(a-55296)*1024+c-56320+65536:(t[r++]=a,t[r++]=c);continue}a!==65279&&(t[r++]=a)}return r}},YG=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,o,a,c,u=0,d=0;if(this.interim[0]){let g=!1,v=this.interim[0];v&=(v&224)===192?31:(v&240)===224?15:7;let b=0,_;for(;(_=this.interim[++b]&63)&&b<4;)v<<=6,v|=_;let S=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,C=S-b;for(;d<C;){if(d>=n)return 0;if(_=e[d++],(_&192)!==128){d--,g=!0;break}else this.interim[b++]=_,v<<=6,v|=_&63}g||(S===2?v<128?d--:t[r++]=v:S===3?v<2048||v>=55296&&v<=57343||v===65279||(t[r++]=v):v<65536||v>1114111||(t[r++]=v)),this.interim.fill(0)}let f=n-4,p=d;for(;p<n;){for(;p<f&&!((i=e[p])&128)&&!((o=e[p+1])&128)&&!((a=e[p+2])&128)&&!((c=e[p+3])&128);)t[r++]=i,t[r++]=o,t[r++]=a,t[r++]=c,p+=4;if(i=e[p++],i<128)t[r++]=i;else if((i&224)===192){if(p>=n)return this.interim[0]=i,r;if(o=e[p++],(o&192)!==128){p--;continue}if(u=(i&31)<<6|o&63,u<128){p--;continue}t[r++]=u}else if((i&240)===224){if(p>=n)return this.interim[0]=i,r;if(o=e[p++],(o&192)!==128){p--;continue}if(p>=n)return this.interim[0]=i,this.interim[1]=o,r;if(a=e[p++],(a&192)!==128){p--;continue}if(u=(i&15)<<12|(o&63)<<6|a&63,u<2048||u>=55296&&u<=57343||u===65279)continue;t[r++]=u}else if((i&248)===240){if(p>=n)return this.interim[0]=i,r;if(o=e[p++],(o&192)!==128){p--;continue}if(p>=n)return this.interim[0]=i,this.interim[1]=o,r;if(a=e[p++],(a&192)!==128){p--;continue}if(p>=n)return this.interim[0]=i,this.interim[1]=o,this.interim[2]=a,r;if(c=e[p++],(c&192)!==128){p--;continue}if(u=(i&7)<<18|(o&63)<<12|(a&63)<<6|c&63,u<65536||u>1114111)continue;t[r++]=u}}return r}},N4="",Us=" ",Yu=class M4{constructor(){this.fg=0,this.bg=0,this.extended=new Cf}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new M4;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Cf=class z4{constructor(t=0,n=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=n}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new z4(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},lo=class j4 extends Yu{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Cf,this.combinedData=""}static fromCharData(t){let n=new j4;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Fs(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let n=!1;if(t[1].length>2)n=!0;else if(t[1].length===2){let r=t[1].charCodeAt(0);if(55296<=r&&r<=56319){let i=t[1].charCodeAt(1);56320<=i&&i<=57343?this.content=(r-55296)*1024+i-56320+65536|t[2]<<22:n=!0}else n=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;n&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},fw="di$target",C0="di$dependencies",Ug=new Map;function JG(e){return e[C0]||[]}function Lr(e){if(Ug.has(e))return Ug.get(e);let t=function(n,r,i){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");QG(t,n,i)};return t._id=e,Ug.set(e,t),t}function QG(e,t,n){t[fw]===t?t[C0].push({id:e,index:n}):(t[C0]=[{id:e,index:n}],t[fw]=t)}var pi=Lr("BufferService"),B4=Lr("CoreMouseService"),Ha=Lr("CoreService"),ZG=Lr("CharsetService"),_b=Lr("InstantiationService"),L4=Lr("LogService"),gi=Lr("OptionsService"),A4=Lr("OscLinkService"),eX=Lr("UnicodeService"),Ju=Lr("DecorationService"),x0=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){var f;let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,o=new lo,a=n.getTrimmedLength(),c=-1,u=-1,d=!1;for(let p=0;p<a;p++)if(!(u===-1&&!n.hasContent(p))){if(n.loadCell(p,o),o.hasExtendedAttrs()&&o.extended.urlId)if(u===-1){u=p,c=o.extended.urlId;continue}else d=o.extended.urlId!==c;else u!==-1&&(d=!0);if(d||u!==-1&&p===a-1){let g=(f=this._oscLinkService.getLinkData(c))==null?void 0:f.uri;if(g){let v={start:{x:u+1,y:e},end:{x:p+(!d&&p===a-1?1:0),y:e}},b=!1;if(!(i!=null&&i.allowNonHttpProtocols))try{let _=new URL(g);["http:","https:"].includes(_.protocol)||(b=!0)}catch{b=!0}b||r.push({text:g,range:v,activate:(_,S)=>i?i.activate(_,S,v):tX(_,S),hover:(_,S)=>{var C;return(C=i==null?void 0:i.hover)==null?void 0:C.call(i,_,S,v)},leave:(_,S)=>{var C;return(C=i==null?void 0:i.leave)==null?void 0:C.call(i,_,S,v)}})}d=!1,o.hasExtendedAttrs()&&o.extended.urlId?(u=p,c=o.extended.urlId):(u=-1,c=-1)}}t(r)}};x0=rr([ct(0,pi),ct(1,gi),ct(2,A4)],x0);function tX(e,t){if(confirm(`Do you want to navigate to ${t}?
579
-
580
- WARNING: This link could potentially be dangerous`)){let n=window.open();if(n){try{n.opener=null}catch{}n.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var gm=Lr("CharSizeService"),vs=Lr("CoreBrowserService"),Sb=Lr("MouseService"),ys=Lr("RenderService"),nX=Lr("SelectionService"),D4=Lr("CharacterJoinerService"),oc=Lr("ThemeService"),H4=Lr("LinkProviderService"),rX=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?mw.isErrorNoTelemetry(e)?new mw(e.message+`
581
-
582
- `+e.stack):new Error(e.message+`
583
-
584
- `+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},iX=new rX;function Ah(e){oX(e)||iX.onUnexpectedError(e)}var w0="Canceled";function oX(e){return e instanceof sX?!0:e instanceof Error&&e.name===w0&&e.message===w0}var sX=class extends Error{constructor(){super(w0),this.name=this.message}};function aX(e){return new Error(`Illegal argument: ${e}`)}var mw=class E0 extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof E0)return t;let n=new E0;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},k0=class F4 extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,F4.prototype)}};function Li(e,t=0){return e[e.length-(1+t)]}var lX;(e=>{function t(o){return o<0}e.isLessThan=t;function n(o){return o<=0}e.isLessThanOrEqual=n;function r(o){return o>0}e.isGreaterThan=r;function i(o){return o===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(lX||(lX={}));function cX(e,t){let n=this,r=!1,i;return function(){return r||(r=!0,t||(i=e.apply(n,arguments))),i}}var W4;(e=>{function t($){return $&&typeof $=="object"&&typeof $[Symbol.iterator]=="function"}e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*i($){yield $}e.single=i;function o($){return t($)?$:i($)}e.wrap=o;function a($){return $||n}e.from=a;function*c($){for(let P=$.length-1;P>=0;P--)yield $[P]}e.reverse=c;function u($){return!$||$[Symbol.iterator]().next().done===!0}e.isEmpty=u;function d($){return $[Symbol.iterator]().next().value}e.first=d;function f($,P){let T=0;for(let O of $)if(P(O,T++))return!0;return!1}e.some=f;function p($,P){for(let T of $)if(P(T))return T}e.find=p;function*g($,P){for(let T of $)P(T)&&(yield T)}e.filter=g;function*v($,P){let T=0;for(let O of $)yield P(O,T++)}e.map=v;function*b($,P){let T=0;for(let O of $)yield*P(O,T++)}e.flatMap=b;function*_(...$){for(let P of $)yield*P}e.concat=_;function S($,P,T){let O=T;for(let N of $)O=P(O,N);return O}e.reduce=S;function*C($,P,T=$.length){for(P<0&&(P+=$.length),T<0?T+=$.length:T>$.length&&(T=$.length);P<T;P++)yield $[P]}e.slice=C;function E($,P=Number.POSITIVE_INFINITY){let T=[];if(P===0)return[T,$];let O=$[Symbol.iterator]();for(let N=0;N<P;N++){let I=O.next();if(I.done)return[T,e.empty()];T.push(I.value)}return[T,{[Symbol.iterator](){return O}}]}e.consume=E;async function k($){let P=[];for await(let T of $)P.push(T);return Promise.resolve(P)}e.asyncToArray=k})(W4||(W4={}));function Ma(e){if(W4.is(e)){let t=[];for(let n of e)if(n)try{n.dispose()}catch(r){t.push(r)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function uX(...e){return Un(()=>Ma(e))}function Un(e){return{dispose:cX(()=>{e()})}}var V4=class q4{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Ma(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?q4.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),void 0)}};V4.DISABLE_DISPOSED_WARNING=!1;var Gs=V4,en=class{constructor(){this._store=new Gs,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};en.None=Object.freeze({dispose(){}});var Jl=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)==null||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)==null||e.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e}},hs=typeof window=="object"?window:globalThis,$0=class R0{constructor(t){this.element=t,this.next=R0.Undefined,this.prev=R0.Undefined}};$0.Undefined=new $0(void 0);var Jn=$0,pw=class{constructor(){this._first=Jn.Undefined,this._last=Jn.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Jn.Undefined}clear(){let e=this._first;for(;e!==Jn.Undefined;){let t=e.next;e.prev=Jn.Undefined,e.next=Jn.Undefined,e=t}this._first=Jn.Undefined,this._last=Jn.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let n=new Jn(e);if(this._first===Jn.Undefined)this._first=n,this._last=n;else if(t){let i=this._last;this._last=n,n.prev=i,i.next=n}else{let i=this._first;this._first=n,n.next=i,i.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==Jn.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Jn.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Jn.Undefined&&e.next!==Jn.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Jn.Undefined&&e.next===Jn.Undefined?(this._first=Jn.Undefined,this._last=Jn.Undefined):e.next===Jn.Undefined?(this._last=this._last.prev,this._last.next=Jn.Undefined):e.prev===Jn.Undefined&&(this._first=this._first.next,this._first.prev=Jn.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Jn.Undefined;)yield e.element,e=e.next}},dX=globalThis.performance&&typeof globalThis.performance.now=="function",hX=class U4{static create(t){return new U4(t)}constructor(t){this._now=dX&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},qr;(e=>{e.None=()=>en.None;function t(M,j){return p(M,()=>{},0,void 0,!0,void 0,j)}e.defer=t;function n(M){return(j,B=null,F)=>{let W=!1,V;return V=M(L=>{if(!W)return V?V.dispose():W=!0,j.call(B,L)},null,F),W&&V.dispose(),V}}e.once=n;function r(M,j,B){return d((F,W=null,V)=>M(L=>F.call(W,j(L)),null,V),B)}e.map=r;function i(M,j,B){return d((F,W=null,V)=>M(L=>{j(L),F.call(W,L)},null,V),B)}e.forEach=i;function o(M,j,B){return d((F,W=null,V)=>M(L=>j(L)&&F.call(W,L),null,V),B)}e.filter=o;function a(M){return M}e.signal=a;function c(...M){return(j,B=null,F)=>{let W=uX(...M.map(V=>V(L=>j.call(B,L))));return f(W,F)}}e.any=c;function u(M,j,B,F){let W=B;return r(M,V=>(W=j(W,V),W),F)}e.reduce=u;function d(M,j){let B,F={onWillAddFirstListener(){B=M(W.fire,W)},onDidRemoveLastListener(){B==null||B.dispose()}},W=new qe(F);return j==null||j.add(W),W.event}function f(M,j){return j instanceof Array?j.push(M):j&&j.add(M),M}function p(M,j,B=100,F=!1,W=!1,V,L){let G,U,D,q=0,Y,ee={leakWarningThreshold:V,onWillAddFirstListener(){G=M(re=>{q++,U=j(U,re),F&&!D&&(Z.fire(U),U=void 0),Y=()=>{let he=U;U=void 0,D=void 0,(!F||q>1)&&Z.fire(he),q=0},typeof B=="number"?(clearTimeout(D),D=setTimeout(Y,B)):D===void 0&&(D=0,queueMicrotask(Y))})},onWillRemoveListener(){W&&q>0&&(Y==null||Y())},onDidRemoveLastListener(){Y=void 0,G.dispose()}},Z=new qe(ee);return L==null||L.add(Z),Z.event}e.debounce=p;function g(M,j=0,B){return e.debounce(M,(F,W)=>F?(F.push(W),F):[W],j,void 0,!0,void 0,B)}e.accumulate=g;function v(M,j=(F,W)=>F===W,B){let F=!0,W;return o(M,V=>{let L=F||!j(V,W);return F=!1,W=V,L},B)}e.latch=v;function b(M,j,B){return[e.filter(M,j,B),e.filter(M,F=>!j(F),B)]}e.split=b;function _(M,j=!1,B=[],F){let W=B.slice(),V=M(U=>{W?W.push(U):G.fire(U)});F&&F.add(V);let L=()=>{W==null||W.forEach(U=>G.fire(U)),W=null},G=new qe({onWillAddFirstListener(){V||(V=M(U=>G.fire(U)),F&&F.add(V))},onDidAddFirstListener(){W&&(j?setTimeout(L):L())},onDidRemoveLastListener(){V&&V.dispose(),V=null}});return F&&F.add(G),G.event}e.buffer=_;function S(M,j){return(B,F,W)=>{let V=j(new E);return M(function(L){let G=V.evaluate(L);G!==C&&B.call(F,G)},void 0,W)}}e.chain=S;let C=Symbol("HaltChainable");class E{constructor(){this.steps=[]}map(j){return this.steps.push(j),this}forEach(j){return this.steps.push(B=>(j(B),B)),this}filter(j){return this.steps.push(B=>j(B)?B:C),this}reduce(j,B){let F=B;return this.steps.push(W=>(F=j(F,W),F)),this}latch(j=(B,F)=>B===F){let B=!0,F;return this.steps.push(W=>{let V=B||!j(W,F);return B=!1,F=W,V?W:C}),this}evaluate(j){for(let B of this.steps)if(j=B(j),j===C)break;return j}}function k(M,j,B=F=>F){let F=(...G)=>L.fire(B(...G)),W=()=>M.on(j,F),V=()=>M.removeListener(j,F),L=new qe({onWillAddFirstListener:W,onDidRemoveLastListener:V});return L.event}e.fromNodeEventEmitter=k;function $(M,j,B=F=>F){let F=(...G)=>L.fire(B(...G)),W=()=>M.addEventListener(j,F),V=()=>M.removeEventListener(j,F),L=new qe({onWillAddFirstListener:W,onDidRemoveLastListener:V});return L.event}e.fromDOMEventEmitter=$;function P(M){return new Promise(j=>n(M)(j))}e.toPromise=P;function T(M){let j=new qe;return M.then(B=>{j.fire(B)},()=>{j.fire(void 0)}).finally(()=>{j.dispose()}),j.event}e.fromPromise=T;function O(M,j){return M(B=>j.fire(B))}e.forward=O;function N(M,j,B){return j(B),M(F=>j(F))}e.runAndSubscribe=N;class I{constructor(j,B){this._observable=j,this._counter=0,this._hasChanged=!1;let F={onWillAddFirstListener:()=>{j.addObserver(this)},onDidRemoveLastListener:()=>{j.removeObserver(this)}};this.emitter=new qe(F),B&&B.add(this.emitter)}beginUpdate(j){this._counter++}handlePossibleChange(j){}handleChange(j,B){this._hasChanged=!0}endUpdate(j){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function z(M,j){return new I(M,j).emitter.event}e.fromObservable=z;function A(M){return(j,B,F)=>{let W=0,V=!1,L={beginUpdate(){W++},endUpdate(){W--,W===0&&(M.reportChanges(),V&&(V=!1,j.call(B)))},handlePossibleChange(){},handleChange(){V=!0}};M.addObserver(L),M.reportChanges();let G={dispose(){M.removeObserver(L)}};return F instanceof Gs?F.add(G):Array.isArray(F)&&F.push(G),G}}e.fromObservableLight=A})(qr||(qr={}));var T0=class P0{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${P0._idPool++}`,P0.all.add(this)}start(t){this._stopWatch=new hX,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};T0.all=new Set,T0._idPool=0;var fX=T0,mX=-1,K4=class G4{constructor(t,n,r=(G4._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){var t;(t=this._stacks)==null||t.clear()}check(t,n){let r=this.threshold;if(r<=0||n<r)return;this._stacks||(this._stacks=new Map);let i=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,i+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=r*.5;let[o,a]=this.getMostFrequentStack(),c=`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${a}):`;console.warn(c),console.warn(o);let u=new vX(c,o);this._errorHandler(u)}return()=>{let o=this._stacks.get(t.value)||0;this._stacks.set(t.value,o-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,n=0;for(let[r,i]of this._stacks)(!t||n<i)&&(t=[r,i],n=i);return t}};K4._idPool=1;var pX=K4,gX=class X4{constructor(t){this.value=t}static create(){let t=new Error;return new X4(t.stack??"")}print(){console.warn(this.value.split(`
585
- `).slice(2).join(`
586
- `))}},vX=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},yX=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},bX=0,Kg=class{constructor(e){this.value=e,this.id=bX++}},_X=2,SX,qe=class{constructor(e){var t,n,r,i;this._size=0,this._options=e,this._leakageMon=(t=this._options)!=null&&t.leakWarningThreshold?new pX((e==null?void 0:e.onListenerError)??Ah,((n=this._options)==null?void 0:n.leakWarningThreshold)??mX):void 0,this._perfMon=(r=this._options)!=null&&r._profName?new fX(this._options._profName):void 0,this._deliveryQueue=(i=this._options)==null?void 0:i.deliveryQueue}dispose(){var e,t,n,r;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)==null?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(n=(t=this._options)==null?void 0:t.onDidRemoveLastListener)==null||n.call(t),(r=this._leakageMon)==null||r.dispose())}get event(){return this._event??(this._event=(e,t,n)=>{var a,c,u,d,f;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let p=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(p);let g=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],v=new yX(`${p}. HINT: Stack shows most frequent listener (${g[1]}-times)`,g[0]);return(((a=this._options)==null?void 0:a.onListenerError)||Ah)(v),en.None}if(this._disposed)return en.None;t&&(e=e.bind(t));let r=new Kg(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=gX.create(),i=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof Kg?(this._deliveryQueue??(this._deliveryQueue=new CX),this._listeners=[this._listeners,r]):this._listeners.push(r):((u=(c=this._options)==null?void 0:c.onWillAddFirstListener)==null||u.call(c,this),this._listeners=r,(f=(d=this._options)==null?void 0:d.onDidAddFirstListener)==null||f.call(d,this)),this._size++;let o=Un(()=>{i==null||i(),this._removeListener(r)});return n instanceof Gs?n.add(o):Array.isArray(n)&&n.push(o),o}),this._event}_removeListener(e){var i,o,a,c;if((o=(i=this._options)==null?void 0:i.onWillRemoveListener)==null||o.call(i,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(c=(a=this._options)==null?void 0:a.onDidRemoveLastListener)==null||c.call(a,this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;let r=this._deliveryQueue.current===this;if(this._size*_X<=t.length){let u=0;for(let d=0;d<t.length;d++)t[d]?t[u++]=t[d]:r&&(this._deliveryQueue.end--,u<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=u}}_deliver(e,t){var r;if(!e)return;let n=((r=this._options)==null?void 0:r.onListenerError)||Ah;if(!n){e.value(t);return}try{e.value(t)}catch(i){n(i)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){var t,n,r,i;if((t=this._deliveryQueue)!=null&&t.current&&(this._deliverQueue(this._deliveryQueue),(n=this._perfMon)==null||n.stop()),(r=this._perfMon)==null||r.start(this._size),this._listeners)if(this._listeners instanceof Kg)this._deliver(this._listeners,e);else{let o=this._deliveryQueue;o.enqueue(this,e,this._listeners.length),this._deliverQueue(o)}(i=this._perfMon)==null||i.stop()}hasListeners(){return this._size>0}},CX=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},O0=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new qe,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new qe,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,n){if(this.getZoomLevel(n)===t)return;let r=this.getWindowId(n);this.mapWindowIdToZoomLevel.set(r,t),this._onDidChangeZoomLevel.fire(r)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,n){this.mapWindowIdToZoomFactor.set(this.getWindowId(n),t)}setFullscreen(t,n){if(this.isFullscreen(n)===t)return;let r=this.getWindowId(n);this.mapWindowIdToFullScreen.set(r,t),this._onDidChangeFullscreen.fire(r)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};O0.INSTANCE=new O0;var Cb=O0;function xX(e,t,n){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",n)}Cb.INSTANCE.onDidChangeZoomLevel;function wX(e){return Cb.INSTANCE.getZoomFactor(e)}Cb.INSTANCE.onDidChangeFullscreen;var sc=typeof navigator=="object"?navigator.userAgent:"",I0=sc.indexOf("Firefox")>=0,EX=sc.indexOf("AppleWebKit")>=0,xb=sc.indexOf("Chrome")>=0,kX=!xb&&sc.indexOf("Safari")>=0;sc.indexOf("Electron/")>=0;sc.indexOf("Android")>=0;var Gg=!1;if(typeof hs.matchMedia=="function"){let e=hs.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=hs.matchMedia("(display-mode: fullscreen)");Gg=e.matches,xX(hs,e,({matches:n})=>{Gg&&t.matches||(Gg=n)})}var zl="en",N0=!1,M0=!1,Dh=!1,Y4=!1,ph,Hh=zl,gw=zl,$X,So,$a=globalThis,Wr,a2;typeof $a.vscode<"u"&&typeof $a.vscode.process<"u"?Wr=$a.vscode.process:typeof process<"u"&&typeof((a2=process==null?void 0:process.versions)==null?void 0:a2.node)=="string"&&(Wr=process);var l2,RX=typeof((l2=Wr==null?void 0:Wr.versions)==null?void 0:l2.electron)=="string",TX=RX&&(Wr==null?void 0:Wr.type)==="renderer",c2;if(typeof Wr=="object"){N0=Wr.platform==="win32",M0=Wr.platform==="darwin",Dh=Wr.platform==="linux",Dh&&Wr.env.SNAP&&Wr.env.SNAP_REVISION,Wr.env.CI||Wr.env.BUILD_ARTIFACTSTAGINGDIRECTORY,ph=zl,Hh=zl;let e=Wr.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);ph=t.userLocale,gw=t.osLocale,Hh=t.resolvedLanguage||zl,$X=(c2=t.languagePack)==null?void 0:c2.translationsConfigFile}catch{}Y4=!0}else typeof navigator=="object"&&!TX?(So=navigator.userAgent,N0=So.indexOf("Windows")>=0,M0=So.indexOf("Macintosh")>=0,(So.indexOf("Macintosh")>=0||So.indexOf("iPad")>=0||So.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Dh=So.indexOf("Linux")>=0,(So==null?void 0:So.indexOf("Mobi"))>=0,Hh=globalThis._VSCODE_NLS_LANGUAGE||zl,ph=navigator.language.toLowerCase(),gw=ph):console.error("Unable to resolve platform.");var J4=N0,Vo=M0,PX=Dh,vw=Y4,Go=So,Bs=Hh,OX;(e=>{function t(){return Bs}e.value=t;function n(){return Bs.length===2?Bs==="en":Bs.length>=3?Bs[0]==="e"&&Bs[1]==="n"&&Bs[2]==="-":!1}e.isDefaultVariant=n;function r(){return Bs==="en"}e.isDefault=r})(OX||(OX={}));var IX=typeof $a.postMessage=="function"&&!$a.importScripts;(()=>{if(IX){let e=[];$a.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=e.length;r<i;r++){let o=e[r];if(o.id===n.data.vscodeScheduleAsyncWork){e.splice(r,1),o.callback();return}}});let t=0;return n=>{let r=++t;e.push({id:r,callback:n}),$a.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})();var NX=!!(Go&&Go.indexOf("Chrome")>=0);Go&&Go.indexOf("Firefox")>=0;!NX&&Go&&Go.indexOf("Safari")>=0;Go&&Go.indexOf("Edg/")>=0;Go&&Go.indexOf("Android")>=0;var Rl=typeof navigator=="object"?navigator:{};vw||document.queryCommandSupported&&document.queryCommandSupported("copy")||Rl&&Rl.clipboard&&Rl.clipboard.writeText,vw||Rl&&Rl.clipboard&&Rl.clipboard.readText;var wb=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},Xg=new wb,yw=new wb,bw=new wb,MX=new Array(230),Q4;(e=>{function t(c){return Xg.keyCodeToStr(c)}e.toString=t;function n(c){return Xg.strToKeyCode(c)}e.fromString=n;function r(c){return yw.keyCodeToStr(c)}e.toUserSettingsUS=r;function i(c){return bw.keyCodeToStr(c)}e.toUserSettingsGeneral=i;function o(c){return yw.strToKeyCode(c)||bw.strToKeyCode(c)}e.fromUserSettings=o;function a(c){if(c>=98&&c<=113)return null;switch(c){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Xg.keyCodeToStr(c)}e.toElectronAccelerator=a})(Q4||(Q4={}));var zX=class Z4{constructor(t,n,r,i,o){this.ctrlKey=t,this.shiftKey=n,this.altKey=r,this.metaKey=i,this.keyCode=o}equals(t){return t instanceof Z4&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",n=this.shiftKey?"1":"0",r=this.altKey?"1":"0",i=this.metaKey?"1":"0";return`K${t}${n}${r}${i}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new jX([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},jX=class{constructor(e){if(e.length===0)throw aX("chords");this.chords=e}getHashCode(){let e="";for(let t=0,n=this.chords.length;t<n;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function BX(e){if(e.charCode){let n=String.fromCharCode(e.charCode).toUpperCase();return Q4.fromString(n)}let t=e.keyCode;if(t===3)return 7;if(I0)switch(t){case 59:return 85;case 60:if(PX)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(Vo)return 57;break}else if(EX&&(Vo&&t===93||!Vo&&t===92))return 57;return MX[t]||0}var LX=Vo?256:2048,AX=512,DX=1024,HX=Vo?2048:256,_w=class{constructor(e){var n;this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=(n=t.getModifierState)==null?void 0:n.call(t,"AltGraph"),this.keyCode=BX(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=LX),this.altKey&&(t|=AX),this.shiftKey&&(t|=DX),this.metaKey&&(t|=HX),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new zX(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},Sw=new WeakMap;function FX(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,n=e.parent.location;if(t.origin!=="null"&&n.origin!=="null"&&t.origin!==n.origin)return null}catch{return null}return e.parent}var WX=class{static getSameOriginWindowChain(e){let t=Sw.get(e);if(!t){t=[],Sw.set(e,t);let n=e,r;do r=FX(n),r?t.push({window:new WeakRef(n),iframeElement:n.frameElement||null}):t.push({window:new WeakRef(n),iframeElement:null}),n=r;while(n)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let n=0,r=0,i=this.getSameOriginWindowChain(e);for(let o of i){let a=o.window.deref();if(n+=(a==null?void 0:a.scrollY)??0,r+=(a==null?void 0:a.scrollX)??0,a===t||!o.iframeElement)break;let c=o.iframeElement.getBoundingClientRect();n+=c.top,r+=c.left}return{top:n,left:r}}},gh=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let n=WX.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=n.left,this.posy-=n.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},Cw=class{constructor(e,t=0,n=0){var i;this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=t;let r=!1;if(xb){let o=navigator.userAgent.match(/Chrome\/(\d+)/);r=(o?parseInt(o[1]):123)<=122}if(e){let o=e,a=e,c=((i=e.view)==null?void 0:i.devicePixelRatio)||1;if(typeof o.wheelDeltaY<"u")r?this.deltaY=o.wheelDeltaY/(120*c):this.deltaY=o.wheelDeltaY/120;else if(typeof a.VERTICAL_AXIS<"u"&&a.axis===a.VERTICAL_AXIS)this.deltaY=-a.detail/3;else if(e.type==="wheel"){let u=e;u.deltaMode===u.DOM_DELTA_LINE?I0&&!Vo?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof o.wheelDeltaX<"u")kX&&J4?this.deltaX=-(o.wheelDeltaX/120):r?this.deltaX=o.wheelDeltaX/(120*c):this.deltaX=o.wheelDeltaX/120;else if(typeof a.HORIZONTAL_AXIS<"u"&&a.axis===a.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let u=e;u.deltaMode===u.DOM_DELTA_LINE?I0&&!Vo?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(r?this.deltaY=e.wheelDelta/(120*c):this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;(e=this.browserEvent)==null||e.preventDefault()}stopPropagation(){var e;(e=this.browserEvent)==null||e.stopPropagation()}},eR=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),VX;(e=>{function t(n){return n===e.None||n===e.Cancelled||n instanceof qX?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:qr.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:eR})})(VX||(VX={}));var qX=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?eR:(this._emitter||(this._emitter=new qe),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Eb=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new k0("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new k0("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},UX=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){var e;(e=this.disposable)==null||e.dispose(),this.disposable=void 0}cancelAndSet(e,t,n=globalThis){if(this.isDisposed)throw new k0("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let r=n.setInterval(()=>{e()},t);this.disposable=Un(()=>{n.clearInterval(r),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},KX;(e=>{async function t(r){let i,o=await Promise.all(r.map(a=>a.then(c=>c,c=>{i||(i=c)})));if(typeof i<"u")throw i;return o}e.settled=t;function n(r){return new Promise(async(i,o)=>{try{await r(i,o)}catch(a){o(a)}})}e.withAsyncBody=n})(KX||(KX={}));var xw=class io{static fromArray(t){return new io(n=>{n.emitMany(t)})}static fromPromise(t){return new io(async n=>{n.emitMany(await t)})}static fromPromises(t){return new io(async n=>{await Promise.all(t.map(async r=>n.emitOne(await r)))})}static merge(t){return new io(async n=>{await Promise.all(t.map(async r=>{for await(let i of r)n.emitOne(i)}))})}constructor(t,n){this._state=0,this._results=[],this._error=null,this._onReturn=n,this._onStateChanged=new qe,queueMicrotask(async()=>{let r={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{await Promise.resolve(t(r)),this.resolve()}catch(i){this.reject(i)}finally{r.emitOne=void 0,r.emitMany=void 0,r.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await qr.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>{var n;return(n=this._onReturn)==null||n.call(this),{done:!0,value:void 0}}}}static map(t,n){return new io(async r=>{for await(let i of t)r.emitOne(n(i))})}map(t){return io.map(this,t)}static filter(t,n){return new io(async r=>{for await(let i of t)n(i)&&r.emitOne(i)})}filter(t){return io.filter(this,t)}static coalesce(t){return io.filter(t,n=>!!n)}coalesce(){return io.coalesce(this)}static async toPromise(t){let n=[];for await(let r of t)n.push(r);return n}toPromise(){return io.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};xw.EMPTY=xw.fromArray([]);var{getWindow:Fo,getWindowId:GX,onDidRegisterWindow:XX}=(function(){let e=new Map,t={window:hs,disposables:new Gs};e.set(hs.vscodeWindowId,t);let n=new qe,r=new qe,i=new qe;function o(a,c){return(typeof a=="number"?e.get(a):void 0)??(c?t:void 0)}return{onDidRegisterWindow:n.event,onWillUnregisterWindow:i.event,onDidUnregisterWindow:r.event,registerWindow(a){if(e.has(a.vscodeWindowId))return en.None;let c=new Gs,u={window:a,disposables:c.add(new Gs)};return e.set(a.vscodeWindowId,u),c.add(Un(()=>{e.delete(a.vscodeWindowId),r.fire(a)})),c.add(Vt(a,Nr.BEFORE_UNLOAD,()=>{i.fire(a)})),n.fire(u),c},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(a){return a.vscodeWindowId},hasWindow(a){return e.has(a)},getWindowById:o,getWindow(a){var d;let c=a;if((d=c==null?void 0:c.ownerDocument)!=null&&d.defaultView)return c.ownerDocument.defaultView.window;let u=a;return u!=null&&u.view?u.view.window:hs},getDocument(a){return Fo(a).document}}})(),YX=class{constructor(e,t,n,r){this._node=e,this._type=t,this._handler=n,this._options=r||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function Vt(e,t,n,r){return new YX(e,t,n,r)}var ww=function(e,t,n,r){return Vt(e,t,n,r)},kb,JX=class extends UX{constructor(e){super(),this.defaultTarget=e&&Fo(e)}cancelAndSet(e,t,n){return super.cancelAndSet(e,t,n??this.defaultTarget)}},Ew=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){Ah(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,n=new Map,r=new Map,i=o=>{n.set(o,!1);let a=e.get(o)??[];for(t.set(o,a),e.set(o,[]),r.set(o,!0);a.length>0;)a.sort(Ew.sort),a.shift().execute();r.set(o,!1)};kb=(o,a,c=0)=>{let u=GX(o),d=new Ew(a,c),f=e.get(u);return f||(f=[],e.set(u,f)),f.push(d),n.get(u)||(n.set(u,!0),o.requestAnimationFrame(()=>i(u))),d}})();function QX(e){let t=e.getBoundingClientRect(),n=Fo(e);return{left:t.left+n.scrollX,top:t.top+n.scrollY,width:t.width,height:t.height}}var Nr={CLICK:"click",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",KEY_DOWN:"keydown",KEY_UP:"keyup",BEFORE_UNLOAD:"beforeunload",CHANGE:"change",FOCUS:"focus",BLUR:"blur",INPUT:"input"},ZX=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=$i(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=$i(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=$i(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=$i(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=$i(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=$i(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=$i(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=$i(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=$i(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=$i(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=$i(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=$i(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=$i(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=$i(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function $i(e){return typeof e=="number"?`${e}px`:e}function uu(e){return new ZX(e)}var tR=class{constructor(){this._hooks=new Gs,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,n,r,i){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=r,this._onStopCallback=i;let o=e;try{e.setPointerCapture(t),this._hooks.add(Un(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{o=Fo(e)}this._hooks.add(Vt(o,Nr.POINTER_MOVE,a=>{if(a.buttons!==n){this.stopMonitoring(!0);return}a.preventDefault(),this._pointerMoveCallback(a)})),this._hooks.add(Vt(o,Nr.POINTER_UP,a=>this.stopMonitoring(!0)))}};function eY(e,t,n){let r=null,i=null;if(typeof n.value=="function"?(r="value",i=n.value,i.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof n.get=="function"&&(r="get",i=n.get),!i)throw new Error("not supported");let o=`$memoize$${t}`;n[r]=function(...a){return this.hasOwnProperty(o)||Object.defineProperty(this,o,{configurable:!1,enumerable:!1,writable:!1,value:i.apply(this,a)}),this[o]}}var Ao;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(Ao||(Ao={}));var tu=class ti extends en{constructor(){super(),this.dispatched=!1,this.targets=new pw,this.ignoreTargets=new pw,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(qr.runAndSubscribe(XX,({window:t,disposables:n})=>{n.add(Vt(t.document,"touchstart",r=>this.onTouchStart(r),{passive:!1})),n.add(Vt(t.document,"touchend",r=>this.onTouchEnd(t,r))),n.add(Vt(t.document,"touchmove",r=>this.onTouchMove(r),{passive:!1}))},{window:hs,disposables:this._store}))}static addTarget(t){if(!ti.isTouchDevice())return en.None;ti.INSTANCE||(ti.INSTANCE=new ti);let n=ti.INSTANCE.targets.push(t);return Un(n)}static ignoreTarget(t){if(!ti.isTouchDevice())return en.None;ti.INSTANCE||(ti.INSTANCE=new ti);let n=ti.INSTANCE.ignoreTargets.push(t);return Un(n)}static isTouchDevice(){return"ontouchstart"in hs||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let n=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let r=0,i=t.targetTouches.length;r<i;r++){let o=t.targetTouches.item(r);this.activeTouches[o.identifier]={id:o.identifier,initialTarget:o.target,initialTimeStamp:n,initialPageX:o.pageX,initialPageY:o.pageY,rollingTimestamps:[n],rollingPageX:[o.pageX],rollingPageY:[o.pageY]};let a=this.newGestureEvent(Ao.Start,o.target);a.pageX=o.pageX,a.pageY=o.pageY,this.dispatchEvent(a)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,n){let r=Date.now(),i=Object.keys(this.activeTouches).length;for(let o=0,a=n.changedTouches.length;o<a;o++){let c=n.changedTouches.item(o);if(!this.activeTouches.hasOwnProperty(String(c.identifier))){console.warn("move of an UNKNOWN touch",c);continue}let u=this.activeTouches[c.identifier],d=Date.now()-u.initialTimeStamp;if(d<ti.HOLD_DELAY&&Math.abs(u.initialPageX-Li(u.rollingPageX))<30&&Math.abs(u.initialPageY-Li(u.rollingPageY))<30){let f=this.newGestureEvent(Ao.Tap,u.initialTarget);f.pageX=Li(u.rollingPageX),f.pageY=Li(u.rollingPageY),this.dispatchEvent(f)}else if(d>=ti.HOLD_DELAY&&Math.abs(u.initialPageX-Li(u.rollingPageX))<30&&Math.abs(u.initialPageY-Li(u.rollingPageY))<30){let f=this.newGestureEvent(Ao.Contextmenu,u.initialTarget);f.pageX=Li(u.rollingPageX),f.pageY=Li(u.rollingPageY),this.dispatchEvent(f)}else if(i===1){let f=Li(u.rollingPageX),p=Li(u.rollingPageY),g=Li(u.rollingTimestamps)-u.rollingTimestamps[0],v=f-u.rollingPageX[0],b=p-u.rollingPageY[0],_=[...this.targets].filter(S=>u.initialTarget instanceof Node&&S.contains(u.initialTarget));this.inertia(t,_,r,Math.abs(v)/g,v>0?1:-1,f,Math.abs(b)/g,b>0?1:-1,p)}this.dispatchEvent(this.newGestureEvent(Ao.End,u.initialTarget)),delete this.activeTouches[c.identifier]}this.dispatched&&(n.preventDefault(),n.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,n){let r=document.createEvent("CustomEvent");return r.initEvent(t,!1,!0),r.initialTarget=n,r.tapCount=0,r}dispatchEvent(t){if(t.type===Ao.Tap){let n=new Date().getTime(),r=0;n-this._lastSetTapCountTime>ti.CLEAR_TAP_COUNT_TIME?r=1:r=2,this._lastSetTapCountTime=n,t.tapCount=r}else(t.type===Ao.Change||t.type===Ao.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let r of this.ignoreTargets)if(r.contains(t.initialTarget))return;let n=[];for(let r of this.targets)if(r.contains(t.initialTarget)){let i=0,o=t.initialTarget;for(;o&&o!==r;)i++,o=o.parentElement;n.push([i,r])}n.sort((r,i)=>r[0]-i[0]);for(let[r,i]of n)i.dispatchEvent(t),this.dispatched=!0}}inertia(t,n,r,i,o,a,c,u,d){this.handle=kb(t,()=>{let f=Date.now(),p=f-r,g=0,v=0,b=!0;i+=ti.SCROLL_FRICTION*p,c+=ti.SCROLL_FRICTION*p,i>0&&(b=!1,g=o*i*p),c>0&&(b=!1,v=u*c*p);let _=this.newGestureEvent(Ao.Change);_.translationX=g,_.translationY=v,n.forEach(S=>S.dispatchEvent(_)),b||this.inertia(t,n,f,i,o,a+g,c,u,d+v)})}onTouchMove(t){let n=Date.now();for(let r=0,i=t.changedTouches.length;r<i;r++){let o=t.changedTouches.item(r);if(!this.activeTouches.hasOwnProperty(String(o.identifier))){console.warn("end of an UNKNOWN touch",o);continue}let a=this.activeTouches[o.identifier],c=this.newGestureEvent(Ao.Change,a.initialTarget);c.translationX=o.pageX-Li(a.rollingPageX),c.translationY=o.pageY-Li(a.rollingPageY),c.pageX=o.pageX,c.pageY=o.pageY,this.dispatchEvent(c),a.rollingPageX.length>3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(o.pageX),a.rollingPageY.push(o.pageY),a.rollingTimestamps.push(n)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};tu.SCROLL_FRICTION=-.005,tu.HOLD_DELAY=700,tu.CLEAR_TAP_COUNT_TIME=400,rr([eY],tu,"isTouchDevice",1);var tY=tu,$b=class extends en{onclick(e,t){this._register(Vt(e,Nr.CLICK,n=>t(new gh(Fo(e),n))))}onmousedown(e,t){this._register(Vt(e,Nr.MOUSE_DOWN,n=>t(new gh(Fo(e),n))))}onmouseover(e,t){this._register(Vt(e,Nr.MOUSE_OVER,n=>t(new gh(Fo(e),n))))}onmouseleave(e,t){this._register(Vt(e,Nr.MOUSE_LEAVE,n=>t(new gh(Fo(e),n))))}onkeydown(e,t){this._register(Vt(e,Nr.KEY_DOWN,n=>t(new _w(n))))}onkeyup(e,t){this._register(Vt(e,Nr.KEY_UP,n=>t(new _w(n))))}oninput(e,t){this._register(Vt(e,Nr.INPUT,t))}onblur(e,t){this._register(Vt(e,Nr.BLUR,t))}onfocus(e,t){this._register(Vt(e,Nr.FOCUS,t))}onchange(e,t){this._register(Vt(e,Nr.CHANGE,t))}ignoreGesture(e){return tY.ignoreTarget(e)}},kw=11,nY=class extends $b{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=kw+"px",this.domNode.style.height=kw+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new tR),this._register(ww(this.bgDomNode,Nr.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(ww(this.domNode,Nr.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new JX),this._pointerdownScheduleRepeatTimer=this._register(new Eb)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Fo(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},rY=class z0{constructor(t,n,r,i,o,a,c){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(n=n|0,r=r|0,i=i|0,o=o|0,a=a|0,c=c|0),this.rawScrollLeft=i,this.rawScrollTop=c,n<0&&(n=0),i+n>r&&(i=r-n),i<0&&(i=0),o<0&&(o=0),c+o>a&&(c=a-o),c<0&&(c=0),this.width=n,this.scrollWidth=r,this.scrollLeft=i,this.height=o,this.scrollHeight=a,this.scrollTop=c}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,n){return new z0(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,n?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,n?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new z0(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,n){let r=this.width!==t.width,i=this.scrollWidth!==t.scrollWidth,o=this.scrollLeft!==t.scrollLeft,a=this.height!==t.height,c=this.scrollHeight!==t.scrollHeight,u=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:n,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:r,scrollWidthChanged:i,scrollLeftChanged:o,heightChanged:a,scrollHeightChanged:c,scrollTopChanged:u}}},iY=class extends en{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new qe),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new rY(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var r;let n=this._state.withScrollDimensions(e,t);this._setState(n,!!this._smoothScrolling),(r=this._smoothScrolling)==null||r.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let r;t?r=new Rw(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):r=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=r}else{let n=this._state.withScrollPosition(e);this._smoothScrolling=Rw.start(this._state,n,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,t)))}},$w=class{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}};function Yg(e,t){let n=t-e;return function(r){return e+n*aY(r)}}function oY(e,t,n){return function(r){return r<n?e(r/n):t((r-n)/(1-n))}}var Rw=class j0{constructor(t,n,r,i){this.from=t,this.to=n,this.duration=i,this.startTime=r,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,n,r){if(Math.abs(t-n)>2.5*r){let i,o;return t<n?(i=t+.75*r,o=n-.75*r):(i=t-.75*r,o=n+.75*r),oY(Yg(t,i),Yg(o,n),.33)}return Yg(t,n)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let n=(t-this.startTime)/this.duration;if(n<1){let r=this.scrollLeft(n),i=this.scrollTop(n);return new $w(r,i,!1)}return new $w(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,n,r){return j0.start(t,n,r)}static start(t,n,r){r=r+10;let i=Date.now()-10;return new j0(t,n,i,r)}};function sY(e){return Math.pow(e,3)}function aY(e){return 1-sY(1-e)}var lY=class extends en{constructor(e,t,n){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new Eb)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)==null||e.setClassName(this._visibleClassName)},0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(t=this._domNode)==null||t.setClassName(this._invisibleClassName+(e?" fade":"")))}},cY=140,nR=class extends $b{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new lY(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new tR),this._shouldRender=!0,this.domNode=uu(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(Vt(this.domNode.domNode,Nr.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new nY(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,r){this.slider=uu(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof n=="number"&&this.slider.setWidth(n),typeof r=="number"&&this.slider.setHeight(r),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(Vt(this.slider.domNode,Nr.POINTER_DOWN,i=>{i.button===0&&(i.preventDefault(),this._sliderPointerDown(i))})),this.onclick(this.slider.domNode,i=>{i.leftButton&&i.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),r=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),i=this._sliderPointerPosition(e);n<=i&&i<=r?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,n;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,n=e.offsetY;else{let i=QX(this.domNode.domNode);t=e.pageX-i.left,n=e.pageY-i.top}let r=this._pointerDownRelativePosition(t,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(r):this._scrollbarState.getDesiredScrollPositionFromOffset(r)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),n=this._sliderOrthogonalPointerPosition(e),r=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{let o=this._sliderOrthogonalPointerPosition(i),a=Math.abs(o-n);if(J4&&a>cY){this._setDesiredScrollPositionNow(r.getScrollPosition());return}let c=this._sliderPointerPosition(i)-t;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(c))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},rR=class B0{constructor(t,n,r,i,o,a){this._scrollbarSize=Math.round(n),this._oppositeScrollbarSize=Math.round(r),this._arrowSize=Math.round(t),this._visibleSize=i,this._scrollSize=o,this._scrollPosition=a,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new B0(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let n=Math.round(t);return this._visibleSize!==n?(this._visibleSize=n,this._refreshComputedValues(),!0):!1}setScrollSize(t){let n=Math.round(t);return this._scrollSize!==n?(this._scrollSize=n,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let n=Math.round(t);return this._scrollPosition!==n?(this._scrollPosition=n,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,n,r,i,o){let a=Math.max(0,r-t),c=Math.max(0,a-2*n),u=i>0&&i>r;if(!u)return{computedAvailableSize:Math.round(a),computedIsNeeded:u,computedSliderSize:Math.round(c),computedSliderRatio:0,computedSliderPosition:0};let d=Math.round(Math.max(20,Math.floor(r*c/i))),f=(c-d)/(i-r),p=o*f;return{computedAvailableSize:Math.round(a),computedIsNeeded:u,computedSliderSize:Math.round(d),computedSliderRatio:f,computedSliderPosition:Math.round(p)}}_refreshComputedValues(){let t=B0._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let n=t-this._arrowSize-this._computedSliderSize/2;return Math.round(n/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let n=t-this._arrowSize,r=this._scrollPosition;return n<this._computedSliderPosition?r-=this._visibleSize:r+=this._visibleSize,r}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let n=this._computedSliderPosition+t;return Math.round(n/this._computedSliderRatio)}},uY=class extends nR{constructor(e,t,n){let r=e.getScrollDimensions(),i=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new rR(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,r.width,r.scrollWidth,i.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},dY=class extends nR{constructor(e,t,n){let r=e.getScrollDimensions(),i=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new rR(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,r.height,r.scrollHeight,i.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},hY=500,Tw=50,fY=class{constructor(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0}},L0=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,n=0,r=1,i=this._rear;do{let o=i===this._front?t:Math.pow(2,-r);if(t-=o,n+=this._memory[i].score*o,i===this._front)break;i=(this._capacity+i-1)%this._capacity,r++}while(!0);return n<=.5}acceptStandardWheelEvent(t){if(xb){let n=Fo(t.browserEvent),r=wX(n);this.accept(Date.now(),t.deltaX*r,t.deltaY*r)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,n,r){let i=null,o=new fY(t,n,r);this._front===-1&&this._rear===-1?(this._memory[0]=o,this._front=0,this._rear=0):(i=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=o),o.score=this._computeScore(o,i)}_computeScore(t,n){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let r=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(r+=.25),n){let i=Math.abs(t.deltaX),o=Math.abs(t.deltaY),a=Math.abs(n.deltaX),c=Math.abs(n.deltaY),u=Math.max(Math.min(i,a),1),d=Math.max(Math.min(o,c),1),f=Math.max(i,a),p=Math.max(o,c);f%u===0&&p%d===0&&(r-=.5)}return Math.min(Math.max(r,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};L0.INSTANCE=new L0;var mY=L0,pY=class extends $b{constructor(e,t,n){super(),this._onScroll=this._register(new qe),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new qe),this.onWillScroll=this._onWillScroll.event,this._options=vY(t),this._scrollable=n,this._register(this._scrollable.onScroll(i=>{this._onWillScroll.fire(i),this._onDidScroll(i),this._onScroll.fire(i)}));let r={onMouseWheel:i=>this._onMouseWheel(i),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new dY(this._scrollable,this._options,r)),this._horizontalScrollbar=this._register(new uY(this._scrollable,this._options,r)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=uu(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=uu(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=uu(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,i=>this._onMouseOver(i)),this.onmouseleave(this._listenOnDomNode,i=>this._onMouseLeave(i)),this._hideTimeout=this._register(new Eb),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=Ma(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Vo&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new Cw(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Ma(this._mouseWheelToDispose),e)){let t=n=>{this._onMouseWheel(new Cw(n))};this._mouseWheelToDispose.push(Vt(this._listenOnDomNode,Nr.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){var i;if((i=e.browserEvent)!=null&&i.defaultPrevented)return;let t=mY.INSTANCE;t.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let o=e.deltaY*this._options.mouseWheelScrollSensitivity,a=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&a+o===0?a=o=0:Math.abs(o)>=Math.abs(a)?a=0:o=0),this._options.flipAxes&&([o,a]=[a,o]);let c=!Vo&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||c)&&!a&&(a=o,o=0),e.browserEvent&&e.browserEvent.altKey&&(a=a*this._options.fastScrollSensitivity,o=o*this._options.fastScrollSensitivity);let u=this._scrollable.getFutureScrollPosition(),d={};if(o){let f=Tw*o,p=u.scrollTop-(f<0?Math.floor(f):Math.ceil(f));this._verticalScrollbar.writeScrollPosition(d,p)}if(a){let f=Tw*a,p=u.scrollLeft-(f<0?Math.floor(f):Math.ceil(f));this._horizontalScrollbar.writeScrollPosition(d,p)}d=this._scrollable.validateScrollPosition(d),(u.scrollLeft!==d.scrollLeft||u.scrollTop!==d.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(d):this._scrollable.setScrollPositionNow(d),n=!0)}let r=n;!r&&this._options.alwaysConsumeMouseWheel&&(r=!0),!r&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(r=!0),r&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0,r=n?" left":"",i=t?" top":"",o=n||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${r}`),this._topShadowDomNode.setClassName(`shadow${i}`),this._topLeftShadowDomNode.setClassName(`shadow${o}${i}${r}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),hY)}},gY=class extends pY{constructor(e,t,n){super(e,t,n)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function vY(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,Vo&&(t.className+=" mac"),t}var A0=class extends en{constructor(e,t,n,r,i,o,a,c){super(),this._bufferService=n,this._optionsService=a,this._renderService=c,this._onRequestScrollLines=this._register(new qe),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let u=this._register(new iY({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:d=>kb(r.window,d)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{u.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new gY(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},u)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(i.onProtocolChange(d=>{this._scrollableElement.updateOptions({handleMouseWheel:!(d&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(qr.runAndSubscribe(o.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=o.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(Un(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=r.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(Un(()=>this._styleElement.remove())),this._register(qr.runAndSubscribe(o.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${o.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${o.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${o.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
587
- `)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(d=>this._handleScroll(d)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){var e;return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:((e=this._optionsService.rawOptions.overviewRuler)==null?void 0:e.width)||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),n=t-this._bufferService.buffer.ydisp;n!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(n)),this._isHandlingScroll=!1}};A0=rr([ct(2,pi),ct(3,vs),ct(4,B4),ct(5,oc),ct(6,gi),ct(7,ys)],A0);var D0=class extends en{constructor(e,t,n,r,i){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=n,this._decorationService=r,this._renderService=i,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(o=>this._removeDecoration(o))),this._register(Un(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){var r;let t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer",((r=e==null?void 0:e.options)==null?void 0:r.layer)==="top"),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let n=e.options.x??0;return n&&n>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let n=this._decorationElements.get(e);n||(n=this._createElement(e),e.element=n,this._decorationElements.set(e,n),this._container.appendChild(n),e.onDispose(()=>{this._decorationElements.delete(e),n.remove()})),n.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(n.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,n.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,n.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,n.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(n)}}_refreshXPosition(e,t=e.element){if(!t)return;let n=e.options.x??0;(e.options.anchor||"left")==="right"?t.style.right=n?`${n*this._renderService.dimensions.css.cell.width}px`:"":t.style.left=n?`${n*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(e){var t;(t=this._decorationElements.get(e))==null||t.remove(),this._decorationElements.delete(e),e.dispose()}};D0=rr([ct(1,pi),ct(2,vs),ct(3,Ju),ct(4,ys)],D0);var yY=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,n){return t>=e.startBufferLine-this._linePadding[n||"full"]&&t<=e.endBufferLine+this._linePadding[n||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},jo={full:0,left:0,center:0,right:0},Ls={full:0,left:0,center:0,right:0},Wc={full:0,left:0,center:0,right:0},xf=class extends en{constructor(e,t,n,r,i,o,a,c){var d;super(),this._viewportElement=e,this._screenElement=t,this._bufferService=n,this._decorationService=r,this._renderService=i,this._optionsService=o,this._themeService=a,this._coreBrowserService=c,this._colorZoneStore=new yY,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(d=this._viewportElement.parentElement)==null||d.insertBefore(this._canvas,this._viewportElement),this._register(Un(()=>{var f;return(f=this._canvas)==null?void 0:f.remove()}));let u=this._canvas.getContext("2d");if(u)this._ctx=u;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){var e;return((e=this._optionsService.options.overviewRuler)==null?void 0:e.width)||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);Ls.full=this._canvas.width,Ls.left=e,Ls.center=t,Ls.right=e,this._refreshDrawHeightConstants(),Wc.full=1,Wc.left=1,Wc.center=1+Ls.left,Wc.right=1+Ls.left+Ls.center}_refreshDrawHeightConstants(){jo.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);jo.left=t,jo.center=t,jo.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*jo.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*jo.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*jo.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*jo.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!=="full"&&this._renderColorZone(t);for(let t of e)t.position==="full"&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(Wc[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-jo[e.position||"full"]/2),Ls[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+jo[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};xf=rr([ct(2,pi),ct(3,Ju),ct(4,ys),ct(5,gi),ct(6,oc),ct(7,vs)],xf);var Pe;(e=>(e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="\x07",e.BS="\b",e.HT=" ",e.LF=`
588
- `,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL=""))(Pe||(Pe={}));var Fh;(e=>(e.PAD="€",e.HOP="",e.BPH="‚",e.NBH="ƒ",e.IND="„",e.NEL="…",e.SSA="†",e.ESA="‡",e.HTS="ˆ",e.HTJ="‰",e.VTS="Š",e.PLD="‹",e.PLU="Œ",e.RI="",e.SS2="Ž",e.SS3="",e.DCS="",e.PU1="‘",e.PU2="’",e.STS="“",e.CCH="”",e.MW="•",e.SPA="–",e.EPA="—",e.SOS="˜",e.SGCI="™",e.SCI="š",e.CSI="›",e.ST="œ",e.OSC="",e.PM="ž",e.APC="Ÿ"))(Fh||(Fh={}));var iR;(e=>e.ST=`${Pe.ESC}\\`)(iR||(iR={}));var H0=class{constructor(e,t,n,r,i,o){this._textarea=e,this._compositionView=t,this._bufferService=n,this._optionsService=r,this._coreService=i,this._renderService=o,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let n;t.start+=this._dataAlreadySent.length,this._isComposing?n=this._textarea.value.substring(t.start,this._compositionPosition.start):n=this._textarea.value.substring(t.start),n.length>0&&this._coreService.triggerDataEvent(n,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,n=t.replace(e,"");this._dataAlreadySent=n,t.length>e.length?this._coreService.triggerDataEvent(n,!0):t.length<e.length?this._coreService.triggerDataEvent(`${Pe.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),n=this._renderService.dimensions.css.cell.height,r=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,i=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=i+"px",this._compositionView.style.top=r+"px",this._compositionView.style.height=n+"px",this._compositionView.style.lineHeight=n+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let o=this._compositionView.getBoundingClientRect();this._textarea.style.left=i+"px",this._textarea.style.top=r+"px",this._textarea.style.width=Math.max(o.width,1)+"px",this._textarea.style.height=Math.max(o.height,1)+"px",this._textarea.style.lineHeight=o.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};H0=rr([ct(2,pi),ct(3,gi),ct(4,Ha),ct(5,ys)],H0);var Mr=0,zr=0,jr=0,nr=0,Pw={css:"#00000000",rgba:0},pr;(e=>{function t(i,o,a,c){return c!==void 0?`#${ga(i)}${ga(o)}${ga(a)}${ga(c)}`:`#${ga(i)}${ga(o)}${ga(a)}`}e.toCss=t;function n(i,o,a,c=255){return(i<<24|o<<16|a<<8|c)>>>0}e.toRgba=n;function r(i,o,a,c){return{css:e.toCss(i,o,a,c),rgba:e.toRgba(i,o,a,c)}}e.toColor=r})(pr||(pr={}));var Wn;(e=>{function t(u,d){if(nr=(d.rgba&255)/255,nr===1)return{css:d.css,rgba:d.rgba};let f=d.rgba>>24&255,p=d.rgba>>16&255,g=d.rgba>>8&255,v=u.rgba>>24&255,b=u.rgba>>16&255,_=u.rgba>>8&255;Mr=v+Math.round((f-v)*nr),zr=b+Math.round((p-b)*nr),jr=_+Math.round((g-_)*nr);let S=pr.toCss(Mr,zr,jr),C=pr.toRgba(Mr,zr,jr);return{css:S,rgba:C}}e.blend=t;function n(u){return(u.rgba&255)===255}e.isOpaque=n;function r(u,d,f){let p=Wh.ensureContrastRatio(u.rgba,d.rgba,f);if(p)return pr.toColor(p>>24&255,p>>16&255,p>>8&255)}e.ensureContrastRatio=r;function i(u){let d=(u.rgba|255)>>>0;return[Mr,zr,jr]=Wh.toChannels(d),{css:pr.toCss(Mr,zr,jr),rgba:d}}e.opaque=i;function o(u,d){return nr=Math.round(d*255),[Mr,zr,jr]=Wh.toChannels(u.rgba),{css:pr.toCss(Mr,zr,jr,nr),rgba:pr.toRgba(Mr,zr,jr,nr)}}e.opacity=o;function a(u,d){return nr=u.rgba&255,o(u,nr*d/255)}e.multiplyOpacity=a;function c(u){return[u.rgba>>24&255,u.rgba>>16&255,u.rgba>>8&255]}e.toColorRGB=c})(Wn||(Wn={}));var Qn;(e=>{let t,n;try{let i=document.createElement("canvas");i.width=1,i.height=1;let o=i.getContext("2d",{willReadFrequently:!0});o&&(t=o,t.globalCompositeOperation="copy",n=t.createLinearGradient(0,0,1,1))}catch{}function r(i){if(i.match(/#[\da-f]{3,8}/i))switch(i.length){case 4:return Mr=parseInt(i.slice(1,2).repeat(2),16),zr=parseInt(i.slice(2,3).repeat(2),16),jr=parseInt(i.slice(3,4).repeat(2),16),pr.toColor(Mr,zr,jr);case 5:return Mr=parseInt(i.slice(1,2).repeat(2),16),zr=parseInt(i.slice(2,3).repeat(2),16),jr=parseInt(i.slice(3,4).repeat(2),16),nr=parseInt(i.slice(4,5).repeat(2),16),pr.toColor(Mr,zr,jr,nr);case 7:return{css:i,rgba:(parseInt(i.slice(1),16)<<8|255)>>>0};case 9:return{css:i,rgba:parseInt(i.slice(1),16)>>>0}}let o=i.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(o)return Mr=parseInt(o[1]),zr=parseInt(o[2]),jr=parseInt(o[3]),nr=Math.round((o[5]===void 0?1:parseFloat(o[5]))*255),pr.toColor(Mr,zr,jr,nr);if(!t||!n)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=n,t.fillStyle=i,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[Mr,zr,jr,nr]=t.getImageData(0,0,1,1).data,nr!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:pr.toRgba(Mr,zr,jr,nr),css:i}}e.toColor=r})(Qn||(Qn={}));var ui;(e=>{function t(r){return n(r>>16&255,r>>8&255,r&255)}e.relativeLuminance=t;function n(r,i,o){let a=r/255,c=i/255,u=o/255,d=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),f=c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4),p=u<=.03928?u/12.92:Math.pow((u+.055)/1.055,2.4);return d*.2126+f*.7152+p*.0722}e.relativeLuminance2=n})(ui||(ui={}));var Wh;(e=>{function t(a,c){if(nr=(c&255)/255,nr===1)return c;let u=c>>24&255,d=c>>16&255,f=c>>8&255,p=a>>24&255,g=a>>16&255,v=a>>8&255;return Mr=p+Math.round((u-p)*nr),zr=g+Math.round((d-g)*nr),jr=v+Math.round((f-v)*nr),pr.toRgba(Mr,zr,jr)}e.blend=t;function n(a,c,u){let d=ui.relativeLuminance(a>>8),f=ui.relativeLuminance(c>>8);if(cs(d,f)<u){if(f<d){let v=r(a,c,u),b=cs(d,ui.relativeLuminance(v>>8));if(b<u){let _=i(a,c,u),S=cs(d,ui.relativeLuminance(_>>8));return b>S?v:_}return v}let p=i(a,c,u),g=cs(d,ui.relativeLuminance(p>>8));if(g<u){let v=r(a,c,u),b=cs(d,ui.relativeLuminance(v>>8));return g>b?p:v}return p}}e.ensureContrastRatio=n;function r(a,c,u){let d=a>>24&255,f=a>>16&255,p=a>>8&255,g=c>>24&255,v=c>>16&255,b=c>>8&255,_=cs(ui.relativeLuminance2(g,v,b),ui.relativeLuminance2(d,f,p));for(;_<u&&(g>0||v>0||b>0);)g-=Math.max(0,Math.ceil(g*.1)),v-=Math.max(0,Math.ceil(v*.1)),b-=Math.max(0,Math.ceil(b*.1)),_=cs(ui.relativeLuminance2(g,v,b),ui.relativeLuminance2(d,f,p));return(g<<24|v<<16|b<<8|255)>>>0}e.reduceLuminance=r;function i(a,c,u){let d=a>>24&255,f=a>>16&255,p=a>>8&255,g=c>>24&255,v=c>>16&255,b=c>>8&255,_=cs(ui.relativeLuminance2(g,v,b),ui.relativeLuminance2(d,f,p));for(;_<u&&(g<255||v<255||b<255);)g=Math.min(255,g+Math.ceil((255-g)*.1)),v=Math.min(255,v+Math.ceil((255-v)*.1)),b=Math.min(255,b+Math.ceil((255-b)*.1)),_=cs(ui.relativeLuminance2(g,v,b),ui.relativeLuminance2(d,f,p));return(g<<24|v<<16|b<<8|255)>>>0}e.increaseLuminance=i;function o(a){return[a>>24&255,a>>16&255,a>>8&255,a&255]}e.toChannels=o})(Wh||(Wh={}));function ga(e){let t=e.toString(16);return t.length<2?"0"+t:t}function cs(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var bY=class extends Yu{constructor(e,t,n){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=n}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},wf=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new lo}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let n=[],r=t.translateToString(!0),i=0,o=0,a=0,c=t.getFg(0),u=t.getBg(0);for(let d=0;d<t.getTrimmedLength();d++)if(t.loadCell(d,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==c||this._workCell.bg!==u){if(d-i>1){let f=this._getJoinedRanges(r,a,o,t,i);for(let p=0;p<f.length;p++)n.push(f[p])}i=d,a=o,c=this._workCell.fg,u=this._workCell.bg}o+=this._workCell.getChars().length||Us.length}if(this._bufferService.cols-i>1){let d=this._getJoinedRanges(r,a,o,t,i);for(let f=0;f<d.length;f++)n.push(d[f])}return n}_getJoinedRanges(e,t,n,r,i){let o=e.substring(t,n),a=[];try{a=this._characterJoiners[0].handler(o)}catch(c){console.error(c)}for(let c=1;c<this._characterJoiners.length;c++)try{let u=this._characterJoiners[c].handler(o);for(let d=0;d<u.length;d++)wf._mergeRanges(a,u[d])}catch(u){console.error(u)}return this._stringRangesToCellRanges(a,r,i),a}_stringRangesToCellRanges(e,t,n){let r=0,i=!1,o=0,a=e[r];if(a){for(let c=n;c<this._bufferService.cols;c++){let u=t.getWidth(c),d=t.getString(c).length||Us.length;if(u!==0){if(!i&&a[0]<=o&&(a[0]=c,i=!0),a[1]<=o){if(a[1]=c,a=e[++r],!a)break;a[0]<=o?(a[0]=c,i=!0):i=!1}o+=d}}a&&(a[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(n){if(t[1]<=i[0])return e[r-1][1]=t[1],e;if(t[1]<=i[1])return e[r-1][1]=Math.max(t[1],i[1]),e.splice(r,1),e;e.splice(r,1),r--}else{if(t[1]<=i[0])return e.splice(r,0,t),e;if(t[1]<=i[1])return i[0]=Math.min(t[0],i[0]),e;t[0]<i[1]&&(i[0]=Math.min(t[0],i[0]),n=!0);continue}}return n?e[e.length-1][1]=t[1]:e.push(t),e}};wf=rr([ct(0,pi)],wf);function _Y(e){return 57508<=e&&e<=57558}function SY(e){return 9472<=e&&e<=9631}function CY(e){return _Y(e)||SY(e)}function xY(){return{css:{canvas:vh(),cell:vh()},device:{canvas:vh(),cell:vh(),char:{width:0,height:0,left:0,top:0}}}}function vh(){return{width:0,height:0}}var F0=class{constructor(e,t,n,r,i,o,a){this._document=e,this._characterJoinerService=t,this._optionsService=n,this._coreBrowserService=r,this._coreService=i,this._decorationService=o,this._themeService=a,this._workCell=new lo,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,n){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=n}createRow(e,t,n,r,i,o,a,c,u,d,f){let p=[],g=this._characterJoinerService.getJoinedCharacters(t),v=this._themeService.colors,b=e.getNoBgTrimmedLength();n&&b<o+1&&(b=o+1);let _,S=0,C="",E=0,k=0,$=0,P=0,T=!1,O=0,N=!1,I=0,z=0,A=[],M=d!==-1&&f!==-1;for(let j=0;j<b;j++){e.loadCell(j,this._workCell);let B=this._workCell.getWidth();if(B===0)continue;let F=!1,W=j>=z,V=j,L=this._workCell;if(g.length>0&&j===g[0][0]&&W){let ce=g.shift(),ye=this._isCellInSelection(ce[0],t);for(E=ce[0]+1;E<ce[1];E++)W&&(W=ye===this._isCellInSelection(E,t));W&&(W=!n||o<ce[0]||o>=ce[1]),W?(F=!0,L=new bY(this._workCell,e.translateToString(!0,ce[0],ce[1]),ce[1]-ce[0]),V=ce[1]-1,B=L.getWidth()):z=ce[1]}let G=this._isCellInSelection(j,t),U=n&&j===o,D=M&&j>=d&&j<=f,q=!1;this._decorationService.forEachDecorationAtCell(j,t,void 0,ce=>{q=!0});let Y=L.getChars()||Us;if(Y===" "&&(L.isUnderline()||L.isOverline())&&(Y=" "),I=B*c-u.get(Y,L.isBold(),L.isItalic()),!_)_=this._document.createElement("span");else if(S&&(G&&N||!G&&!N&&L.bg===k)&&(G&&N&&v.selectionForeground||L.fg===$)&&L.extended.ext===P&&D===T&&I===O&&!U&&!F&&!q&&W){L.isInvisible()?C+=Us:C+=Y,S++;continue}else S&&(_.textContent=C),_=this._document.createElement("span"),S=0,C="";if(k=L.bg,$=L.fg,P=L.extended.ext,T=D,O=I,N=G,F&&o>=j&&o<=V&&(o=j),!this._coreService.isCursorHidden&&U&&this._coreService.isCursorInitialized){if(A.push("xterm-cursor"),this._coreBrowserService.isFocused)a&&A.push("xterm-cursor-blink"),A.push(r==="bar"?"xterm-cursor-bar":r==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(i)switch(i){case"outline":A.push("xterm-cursor-outline");break;case"block":A.push("xterm-cursor-block");break;case"bar":A.push("xterm-cursor-bar");break;case"underline":A.push("xterm-cursor-underline");break}}if(L.isBold()&&A.push("xterm-bold"),L.isItalic()&&A.push("xterm-italic"),L.isDim()&&A.push("xterm-dim"),L.isInvisible()?C=Us:C=L.getChars()||Us,L.isUnderline()&&(A.push(`xterm-underline-${L.extended.underlineStyle}`),C===" "&&(C=" "),!L.isUnderlineColorDefault()))if(L.isUnderlineColorRGB())_.style.textDecorationColor=`rgb(${Yu.toColorRGB(L.getUnderlineColor()).join(",")})`;else{let ce=L.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&L.isBold()&&ce<8&&(ce+=8),_.style.textDecorationColor=v.ansi[ce].css}L.isOverline()&&(A.push("xterm-overline"),C===" "&&(C=" ")),L.isStrikethrough()&&A.push("xterm-strikethrough"),D&&(_.style.textDecoration="underline");let ee=L.getFgColor(),Z=L.getFgColorMode(),re=L.getBgColor(),he=L.getBgColorMode(),fe=!!L.isInverse();if(fe){let ce=ee;ee=re,re=ce;let ye=Z;Z=he,he=ye}let ue,Se,ae=!1;this._decorationService.forEachDecorationAtCell(j,t,void 0,ce=>{ce.options.layer!=="top"&&ae||(ce.backgroundColorRGB&&(he=50331648,re=ce.backgroundColorRGB.rgba>>8&16777215,ue=ce.backgroundColorRGB),ce.foregroundColorRGB&&(Z=50331648,ee=ce.foregroundColorRGB.rgba>>8&16777215,Se=ce.foregroundColorRGB),ae=ce.options.layer==="top")}),!ae&&G&&(ue=this._coreBrowserService.isFocused?v.selectionBackgroundOpaque:v.selectionInactiveBackgroundOpaque,re=ue.rgba>>8&16777215,he=50331648,ae=!0,v.selectionForeground&&(Z=50331648,ee=v.selectionForeground.rgba>>8&16777215,Se=v.selectionForeground)),ae&&A.push("xterm-decoration-top");let le;switch(he){case 16777216:case 33554432:le=v.ansi[re],A.push(`xterm-bg-${re}`);break;case 50331648:le=pr.toColor(re>>16,re>>8&255,re&255),this._addStyle(_,`background-color:#${Ow((re>>>0).toString(16),"0",6)}`);break;case 0:default:fe?(le=v.foreground,A.push("xterm-bg-257")):le=v.background}switch(ue||L.isDim()&&(ue=Wn.multiplyOpacity(le,.5)),Z){case 16777216:case 33554432:L.isBold()&&ee<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ee+=8),this._applyMinimumContrast(_,le,v.ansi[ee],L,ue,void 0)||A.push(`xterm-fg-${ee}`);break;case 50331648:let ce=pr.toColor(ee>>16&255,ee>>8&255,ee&255);this._applyMinimumContrast(_,le,ce,L,ue,Se)||this._addStyle(_,`color:#${Ow(ee.toString(16),"0",6)}`);break;case 0:default:this._applyMinimumContrast(_,le,v.foreground,L,ue,Se)||fe&&A.push("xterm-fg-257")}A.length&&(_.className=A.join(" "),A.length=0),!U&&!F&&!q&&W?S++:_.textContent=C,I!==this.defaultSpacing&&(_.style.letterSpacing=`${I}px`),p.push(_),j=V}return _&&S&&(_.textContent=C),p}_applyMinimumContrast(e,t,n,r,i,o){if(this._optionsService.rawOptions.minimumContrastRatio===1||CY(r.getCode()))return!1;let a=this._getContrastCache(r),c;if(!i&&!o&&(c=a.getColor(t.rgba,n.rgba)),c===void 0){let u=this._optionsService.rawOptions.minimumContrastRatio/(r.isDim()?2:1);c=Wn.ensureContrastRatio(i||t,o||n,u),a.setColor((i||t).rgba,(o||n).rgba,c??null)}return c?(this._addStyle(e,`color:${c.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let n=this._selectionStart,r=this._selectionEnd;return!n||!r?!1:this._columnSelectMode?n[0]<=r[0]?e>=n[0]&&t>=n[1]&&e<r[0]&&t<=r[1]:e<n[0]&&t>=n[1]&&e>=r[0]&&t<=r[1]:t>n[1]&&t<r[1]||n[1]===r[1]&&t===n[1]&&e>=n[0]&&e<r[0]||n[1]<r[1]&&t===r[1]&&e<r[0]||n[1]<r[1]&&t===n[1]&&e>=n[0]}};F0=rr([ct(1,D4),ct(2,gi),ct(3,vs),ct(4,Ha),ct(5,Ju),ct(6,oc)],F0);function Ow(e,t,n){for(;e.length<n;)e=t+e;return e}var wY=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let n=e.createElement("span");n.classList.add("xterm-char-measure-element");let r=e.createElement("span");r.classList.add("xterm-char-measure-element"),r.style.fontWeight="bold";let i=e.createElement("span");i.classList.add("xterm-char-measure-element"),i.style.fontStyle="italic";let o=e.createElement("span");o.classList.add("xterm-char-measure-element"),o.style.fontWeight="bold",o.style.fontStyle="italic",this._measureElements=[n,r,i,o],this._container.appendChild(n),this._container.appendChild(r),this._container.appendChild(i),this._container.appendChild(o),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,n,r){e===this._font&&t===this._fontSize&&n===this._weight&&r===this._weightBold||(this._font=e,this._fontSize=t,this._weight=n,this._weightBold=r,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${n}`,this._measureElements[1].style.fontWeight=`${r}`,this._measureElements[2].style.fontWeight=`${n}`,this._measureElements[3].style.fontWeight=`${r}`,this.clear())}get(e,t,n){let r=0;if(!t&&!n&&e.length===1&&(r=e.charCodeAt(0))<256){if(this._flat[r]!==-9999)return this._flat[r];let a=this._measure(e,0);return a>0&&(this._flat[r]=a),a}let i=e;t&&(i+="B"),n&&(i+="I");let o=this._holey.get(i);if(o===void 0){let a=0;t&&(a|=1),n&&(a|=2),o=this._measure(e,a),o>0&&this._holey.set(i,o)}return o}_measure(e,t){let n=this._measureElements[t];return n.textContent=e.repeat(32),n.offsetWidth/32}},EY=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,n,r=!1){if(this.selectionStart=t,this.selectionEnd=n,!t||!n||t[0]===n[0]&&t[1]===n[1]){this.clear();return}let i=e.buffers.active.ydisp,o=t[1]-i,a=n[1]-i,c=Math.max(o,0),u=Math.min(a,e.rows-1);if(c>=e.rows||u<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=r,this.viewportStartRow=o,this.viewportEndRow=a,this.viewportCappedStartRow=c,this.viewportCappedEndRow=u,this.startCol=t[0],this.endCol=n[0]}isCellSelected(e,t,n){return this.hasSelection?(n-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&n>=this.viewportCappedStartRow&&t<this.endCol&&n<=this.viewportCappedEndRow:t<this.startCol&&n>=this.viewportCappedStartRow&&t>=this.endCol&&n<=this.viewportCappedEndRow:n>this.viewportStartRow&&n<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol):!1}};function kY(){return new EY}var Jg="xterm-dom-renderer-owner-",ro="xterm-rows",yh="xterm-fg-",Iw="xterm-bg-",Vc="xterm-focus",bh="xterm-selection",$Y=1,W0=class extends en{constructor(e,t,n,r,i,o,a,c,u,d,f,p,g,v){super(),this._terminal=e,this._document=t,this._element=n,this._screenElement=r,this._viewportElement=i,this._helperContainer=o,this._linkifier2=a,this._charSizeService=u,this._optionsService=d,this._bufferService=f,this._coreService=p,this._coreBrowserService=g,this._themeService=v,this._terminalClass=$Y++,this._rowElements=[],this._selectionRenderModel=kY(),this.onRequestRedraw=this._register(new qe).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(ro),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(bh),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=xY(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(b=>this._injectCss(b))),this._injectCss(this._themeService.colors),this._rowFactory=c.createInstance(F0,document),this._element.classList.add(Jg+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(b=>this._handleLinkHover(b))),this._register(this._linkifier2.onHideLinkUnderline(b=>this._handleLinkLeave(b))),this._register(Un(()=>{this._element.classList.remove(Jg+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new wY(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let n of this._rowElements)n.style.width=`${this.dimensions.css.canvas.width}px`,n.style.height=`${this.dimensions.css.cell.height}px`,n.style.lineHeight=`${this.dimensions.css.cell.height}px`,n.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${ro} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${ro} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${ro} .xterm-dim { color: ${Wn.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let n=`blink_underline_${this._terminalClass}`,r=`blink_bar_${this._terminalClass}`,i=`blink_block_${this._terminalClass}`;t+=`@keyframes ${n} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${r} { 50% { box-shadow: none; }}`,t+=`@keyframes ${i} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${ro}.${Vc} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${ro}.${Vc} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${ro}.${Vc} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${ro} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${ro} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${ro} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${ro} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${ro} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${bh} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${bh} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${bh} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[o,a]of e.ansi.entries())t+=`${this._terminalSelector} .${yh}${o} { color: ${a.css}; }${this._terminalSelector} .${yh}${o}.xterm-dim { color: ${Wn.multiplyOpacity(a,.5).css}; }${this._terminalSelector} .${Iw}${o} { background-color: ${a.css}; }`;t+=`${this._terminalSelector} .${yh}257 { color: ${Wn.opaque(e.background).css}; }${this._terminalSelector} .${yh}257.xterm-dim { color: ${Wn.multiplyOpacity(Wn.opaque(e.background),.5).css}; }${this._terminalSelector} .${Iw}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let n=this._rowElements.length;n<=t;n++){let r=this._document.createElement("div");this._rowContainer.appendChild(r),this._rowElements.push(r)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(Vc),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(Vc),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,n){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,n),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,n),!this._selectionRenderModel.hasSelection))return;let r=this._selectionRenderModel.viewportStartRow,i=this._selectionRenderModel.viewportEndRow,o=this._selectionRenderModel.viewportCappedStartRow,a=this._selectionRenderModel.viewportCappedEndRow,c=this._document.createDocumentFragment();if(n){let u=e[0]>t[0];c.appendChild(this._createSelectionElement(o,u?t[0]:e[0],u?e[0]:t[0],a-o+1))}else{let u=r===o?e[0]:0,d=o===i?t[0]:this._bufferService.cols;c.appendChild(this._createSelectionElement(o,u,d));let f=a-o-1;if(c.appendChild(this._createSelectionElement(o+1,0,this._bufferService.cols,f)),o!==a){let p=i===a?t[0]:this._bufferService.cols;c.appendChild(this._createSelectionElement(a,0,p))}}this._selectionContainer.appendChild(c)}_createSelectionElement(e,t,n,r=1){let i=this._document.createElement("div"),o=t*this.dimensions.css.cell.width,a=this.dimensions.css.cell.width*(n-t);return o+a>this.dimensions.css.canvas.width&&(a=this.dimensions.css.canvas.width-o),i.style.height=`${r*this.dimensions.css.cell.height}px`,i.style.top=`${e*this.dimensions.css.cell.height}px`,i.style.left=`${o}px`,i.style.width=`${a}px`,i}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let n=this._bufferService.buffer,r=n.ybase+n.y,i=Math.min(n.x,this._bufferService.cols-1),o=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,a=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,c=this._optionsService.rawOptions.cursorInactiveStyle;for(let u=e;u<=t;u++){let d=u+n.ydisp,f=this._rowElements[u],p=n.lines.get(d);if(!f||!p)break;f.replaceChildren(...this._rowFactory.createRow(p,d,d===r,a,c,i,o,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${Jg}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,n,r,i,o){n<0&&(e=0),r<0&&(t=0);let a=this._bufferService.rows-1;n=Math.max(Math.min(n,a),0),r=Math.max(Math.min(r,a),0),i=Math.min(i,this._bufferService.cols);let c=this._bufferService.buffer,u=c.ybase+c.y,d=Math.min(c.x,i-1),f=this._optionsService.rawOptions.cursorBlink,p=this._optionsService.rawOptions.cursorStyle,g=this._optionsService.rawOptions.cursorInactiveStyle;for(let v=n;v<=r;++v){let b=v+c.ydisp,_=this._rowElements[v],S=c.lines.get(b);if(!_||!S)break;_.replaceChildren(...this._rowFactory.createRow(S,b,b===u,p,g,d,f,this.dimensions.css.cell.width,this._widthCache,o?v===n?e:0:-1,o?(v===r?t:i)-1:-1))}}};W0=rr([ct(7,_b),ct(8,gm),ct(9,gi),ct(10,pi),ct(11,Ha),ct(12,vs),ct(13,oc)],W0);var V0=class extends en{constructor(e,t,n){super(),this._optionsService=n,this.width=0,this.height=0,this._onCharSizeChange=this._register(new qe),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new TY(this._optionsService))}catch{this._measureStrategy=this._register(new RY(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};V0=rr([ct(2,gi)],V0);var oR=class extends en{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},RY=class extends oR{constructor(e,t,n){super(),this._document=e,this._parentElement=t,this._optionsService=n,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},TY=class extends oR{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},PY=class extends en{constructor(e,t,n){super(),this._textarea=e,this._window=t,this.mainDocument=n,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new OY(this._window)),this._onDprChange=this._register(new qe),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new qe),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(r=>this._screenDprMonitor.setWindow(r))),this._register(qr.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(Vt(this._textarea,"focus",()=>this._isFocused=!0)),this._register(Vt(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},OY=class extends en{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new Jl),this._onDprChange=this._register(new qe),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(Un(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=Vt(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var e;this._outerListener&&((e=this._resolutionMediaMatchList)==null||e.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},IY=class extends en{constructor(){super(),this.linkProviders=[],this._register(Un(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function Rb(e,t,n){let r=n.getBoundingClientRect(),i=e.getComputedStyle(n),o=parseInt(i.getPropertyValue("padding-left")),a=parseInt(i.getPropertyValue("padding-top"));return[t.clientX-r.left-o,t.clientY-r.top-a]}function NY(e,t,n,r,i,o,a,c,u){if(!o)return;let d=Rb(e,t,n);if(d)return d[0]=Math.ceil((d[0]+(u?a/2:0))/a),d[1]=Math.ceil(d[1]/c),d[0]=Math.min(Math.max(d[0],1),r+(u?1:0)),d[1]=Math.min(Math.max(d[1],1),i),d}var q0=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,n,r,i){return NY(window,e,t,n,r,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,i)}getMouseReportCoords(e,t){let n=Rb(window,e,t);if(this._charSizeService.hasValidSize)return n[0]=Math.min(Math.max(n[0],0),this._renderService.dimensions.css.canvas.width-1),n[1]=Math.min(Math.max(n[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(n[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(n[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(n[0]),y:Math.floor(n[1])}}};q0=rr([ct(0,ys),ct(1,gm)],q0);var MY=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,n){this._rowCount=n,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},sR={};VG(sR,{getSafariVersion:()=>jY,isChromeOS:()=>uR,isFirefox:()=>aR,isIpad:()=>BY,isIphone:()=>LY,isLegacyEdge:()=>zY,isLinux:()=>Tb,isMac:()=>Ef,isNode:()=>vm,isSafari:()=>lR,isWindows:()=>cR});var vm=typeof process<"u"&&"title"in process,Qu=vm?"node":navigator.userAgent,Zu=vm?"node":navigator.platform,aR=Qu.includes("Firefox"),zY=Qu.includes("Edge"),lR=/^((?!chrome|android).)*safari/i.test(Qu);function jY(){if(!lR)return 0;let e=Qu.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var Ef=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(Zu),BY=Zu==="iPad",LY=Zu==="iPhone",cR=["Windows","Win16","Win32","WinCE"].includes(Zu),Tb=Zu.indexOf("Linux")>=0,uR=/\bCrOS\b/.test(Qu),dR=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,n=0,r=e.timeRemaining(),i=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),n=Math.max(t,n),i=e.timeRemaining(),n*1.5>i){r-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-t))}ms`),this._start();return}r=i}this.clear()}},AY=class extends dR{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},DY=class extends dR{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},kf=!vm&&"requestIdleCallback"in window?DY:AY,HY=class{constructor(){this._queue=new kf}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},U0=class extends en{constructor(e,t,n,r,i,o,a,c,u){super(),this._rowCount=e,this._optionsService=n,this._charSizeService=r,this._coreService=i,this._coreBrowserService=c,this._renderer=this._register(new Jl),this._pausedResizeTask=new HY,this._observerDisposable=this._register(new Jl),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new qe),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new qe),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new qe),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new qe),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new MY((d,f)=>this._renderRows(d,f),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new FY(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(Un(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(a.onResize(()=>this._fullRefresh())),this._register(a.buffers.onBufferActivate(()=>{var d;return(d=this._renderer.value)==null?void 0:d.clear()})),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(o.onDecorationRegistered(()=>this._fullRefresh())),this._register(o.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(a.cols,a.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(a.buffer.y,a.buffer.y,!0))),this._register(u.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(d=>this._registerIntersectionObserver(d,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let n=new e.IntersectionObserver(r=>this._handleIntersectionChange(r[r.length-1]),{threshold:0});n.observe(t),this._observerDisposable.value=Un(()=>n.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,n=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let r=this._syncOutputHandler.flush();r&&(e=Math.min(e,r.start),t=Math.max(t,r.end)),n||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var e,t;this._renderer.value&&((t=(e=this._renderer.value).clearTextureAtlas)==null||t.call(e),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var n;return(n=this._renderer.value)==null?void 0:n.handleResize(e,t)}):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){var e;(e=this._renderer.value)==null||e.handleCharSizeChanged()}handleBlur(){var e;(e=this._renderer.value)==null||e.handleBlur()}handleFocus(){var e;(e=this._renderer.value)==null||e.handleFocus()}handleSelectionChanged(e,t,n){var r;this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=n,(r=this._renderer.value)==null||r.handleSelectionChanged(e,t,n)}handleCursorMove(){var e;(e=this._renderer.value)==null||e.handleCursorMove()}clear(){var e;(e=this._renderer.value)==null||e.clear()}};U0=rr([ct(2,gi),ct(3,gm),ct(4,Ha),ct(5,Ju),ct(6,pi),ct(7,vs),ct(8,oc)],U0);var FY=class{constructor(e,t,n){this._coreBrowserService=e,this._coreService=t,this._onTimeout=n,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function WY(e,t,n,r){let i=n.buffer.x,o=n.buffer.y;if(!n.buffer.hasScrollback)return UY(i,o,e,t,n,r)+ym(o,t,n,r)+KY(i,o,e,t,n,r);let a;if(o===t)return a=i>e?"D":"C",Pu(Math.abs(i-e),Tu(a,r));a=o>t?"D":"C";let c=Math.abs(o-t),u=qY(o>t?e:i,n)+(c-1)*n.cols+1+VY(o>t?i:e);return Pu(u,Tu(a,r))}function VY(e,t){return e-1}function qY(e,t){return t.cols-e}function UY(e,t,n,r,i,o){return ym(t,r,i,o).length===0?"":Pu(fR(e,t,e,t-za(t,i),!1,i).length,Tu("D",o))}function ym(e,t,n,r){let i=e-za(e,n),o=t-za(t,n),a=Math.abs(i-o)-GY(e,t,n);return Pu(a,Tu(hR(e,t),r))}function KY(e,t,n,r,i,o){let a;ym(t,r,i,o).length>0?a=r-za(r,i):a=t;let c=r,u=XY(e,t,n,r,i,o);return Pu(fR(e,a,n,c,u==="C",i).length,Tu(u,o))}function GY(e,t,n){var a;let r=0,i=e-za(e,n),o=t-za(t,n);for(let c=0;c<Math.abs(i-o);c++){let u=hR(e,t)==="A"?-1:1;(a=n.buffer.lines.get(i+u*c))!=null&&a.isWrapped&&r++}return r}function za(e,t){let n=0,r=t.buffer.lines.get(e),i=r==null?void 0:r.isWrapped;for(;i&&e>=0&&e<t.rows;)n++,r=t.buffer.lines.get(--e),i=r==null?void 0:r.isWrapped;return n}function XY(e,t,n,r,i,o){let a;return ym(n,r,i,o).length>0?a=r-za(r,i):a=t,e<n&&a<=r||e>=n&&a<r?"C":"D"}function hR(e,t){return e>t?"A":"B"}function fR(e,t,n,r,i,o){let a=e,c=t,u="";for(;(a!==n||c!==r)&&c>=0&&c<o.buffer.lines.length;)a+=i?1:-1,i&&a>o.cols-1?(u+=o.buffer.translateBufferLineToString(c,!1,e,a),a=0,e=0,c++):!i&&a<0&&(u+=o.buffer.translateBufferLineToString(c,!1,0,e+1),a=o.cols-1,e=a,c--);return u+o.buffer.translateBufferLineToString(c,!1,e,a)}function Tu(e,t){let n=t?"O":"[";return Pe.ESC+n+e}function Pu(e,t){e=Math.floor(e);let n="";for(let r=0;r<e;r++)n+=t;return n}var YY=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:!this.selectionEnd||!this.selectionStart?this.selectionStart:this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function Nw(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var Qg=50,JY=15,QY=50,ZY=500,eJ=" ",tJ=new RegExp(eJ,"g"),K0=class extends en{constructor(e,t,n,r,i,o,a,c,u){super(),this._element=e,this._screenElement=t,this._linkifier=n,this._bufferService=r,this._coreService=i,this._mouseService=o,this._optionsService=a,this._renderService=c,this._coreBrowserService=u,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new lo,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new qe),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new qe),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new qe),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new qe),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=d=>this._handleMouseMove(d),this._mouseUpListener=d=>this._handleMouseUp(d),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(d=>this._handleTrim(d)),this._register(this._bufferService.buffers.onBufferActivate(d=>this._handleBufferActivate(d))),this.enable(),this._model=new YY(this._bufferService),this._activeSelectionMode=0,this._register(Un(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(d=>{d.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let n=this._bufferService.buffer,r=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let i=e[0]<t[0]?e[0]:t[0],o=e[0]<t[0]?t[0]:e[0];for(let a=e[1];a<=t[1];a++){let c=n.translateBufferLineToString(a,!0,i,o);r.push(c)}}else{let i=e[1]===t[1]?t[0]:void 0;r.push(n.translateBufferLineToString(e[1],!0,e[0],i));for(let o=e[1]+1;o<=t[1]-1;o++){let a=n.lines.get(o),c=n.translateBufferLineToString(o,!0);a!=null&&a.isWrapped?r[r.length-1]+=c:r.push(c)}if(e[1]!==t[1]){let o=n.lines.get(t[1]),a=n.translateBufferLineToString(t[1],!0,0,t[0]);o&&o.isWrapped?r[r.length-1]+=a:r.push(a)}}return r.map(i=>i.replace(tJ," ")).join(cR?`\r
589
- `:`
590
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),Tb&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r||!t?!1:this._areCoordsInSelection(t,n,r)}isCellInSelection(e,t){let n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r?!1:this._areCoordsInSelection([e,t],n,r)}_areCoordsInSelection(e,t,n){return e[1]>t[1]&&e[1]<n[1]||t[1]===n[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<n[0]||t[1]<n[1]&&e[1]===n[1]&&e[0]<n[0]||t[1]<n[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){var i,o;let n=(o=(i=this._linkifier.currentLink)==null?void 0:i.link)==null?void 0:o.range;if(n)return this._model.selectionStart=[n.start.x-1,n.start.y-1],this._model.selectionStartLength=Nw(n,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let r=this._getMouseBufferCoords(e);return r?(this._selectWordAt(r,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=Rb(this._coreBrowserService.window,e,this._screenElement)[1],n=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=n?0:(t>n&&(t-=n),t=Math.min(Math.max(t,-Qg),Qg),t/=Qg,t/Math.abs(t)+Math.round(t*(JY-1)))}shouldForceSelection(e){return Ef?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),QY)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(Ef&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let n=this._bufferService.buffer;if(this._model.selectionEnd[1]<n.lines.length){let r=n.lines.get(this._model.selectionEnd[1]);r&&r.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[1]!==this._model.selectionEnd[1])&&this.refresh(!0)}_dragScroll(){if(!(!this._model.selectionEnd||!this._model.selectionStart)&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<ZY&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let n=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(n&&n[0]!==void 0&&n[1]!==void 0){let r=WY(n[0]-1,n[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(r,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,n=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!n){this._oldHasSelection&&this._fireOnSelectionChange(e,t,n);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,n)}_fireOnSelectionChange(e,t,n){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=n,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(t=>this._handleTrim(t))}_convertViewportColToCharacterIndex(e,t){let n=t;for(let r=0;t>=r;r++){let i=e.loadCell(r,this._workCell).getChars().length;this._workCell.getWidth()===0?n--:i>1&&t!==r&&(n+=i-1)}return n}setSelection(e,t,n){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=n,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,n=!0,r=!0){if(e[0]>=this._bufferService.cols)return;let i=this._bufferService.buffer,o=i.lines.get(e[1]);if(!o)return;let a=i.translateBufferLineToString(e[1],!1),c=this._convertViewportColToCharacterIndex(o,e[0]),u=c,d=e[0]-c,f=0,p=0,g=0,v=0;if(a.charAt(c)===" "){for(;c>0&&a.charAt(c-1)===" ";)c--;for(;u<a.length&&a.charAt(u+1)===" ";)u++}else{let S=e[0],C=e[0];o.getWidth(S)===0&&(f++,S--),o.getWidth(C)===2&&(p++,C++);let E=o.getString(C).length;for(E>1&&(v+=E-1,u+=E-1);S>0&&c>0&&!this._isCharWordSeparator(o.loadCell(S-1,this._workCell));){o.loadCell(S-1,this._workCell);let k=this._workCell.getChars().length;this._workCell.getWidth()===0?(f++,S--):k>1&&(g+=k-1,c-=k-1),c--,S--}for(;C<o.length&&u+1<a.length&&!this._isCharWordSeparator(o.loadCell(C+1,this._workCell));){o.loadCell(C+1,this._workCell);let k=this._workCell.getChars().length;this._workCell.getWidth()===2?(p++,C++):k>1&&(v+=k-1,u+=k-1),u++,C++}}u++;let b=c+d-f+g,_=Math.min(this._bufferService.cols,u-c+f+p-g-v);if(!(!t&&a.slice(c,u).trim()==="")){if(n&&b===0&&o.getCodePoint(0)!==32){let S=i.lines.get(e[1]-1);if(S&&o.isWrapped&&S.getCodePoint(this._bufferService.cols-1)!==32){let C=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(C){let E=this._bufferService.cols-C.start;b-=E,_+=E}}}if(r&&b+_===this._bufferService.cols&&o.getCodePoint(this._bufferService.cols-1)!==32){let S=i.lines.get(e[1]+1);if(S!=null&&S.isWrapped&&S.getCodePoint(0)!==32){let C=this._getWordAt([0,e[1]+1],!1,!1,!0);C&&(_+=C.length)}}return{start:b,length:_}}}_selectWordAt(e,t){let n=this._getWordAt(e,t);if(n){for(;n.start<0;)n.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[n.start,e[1]],this._model.selectionStartLength=n.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let n=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,n--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,n++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,n]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),n={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=Nw(n,this._bufferService.cols)}};K0=rr([ct(3,pi),ct(4,Ha),ct(5,Sb),ct(6,gi),ct(7,ys),ct(8,vs)],K0);var Mw=class{constructor(){this._data={}}set(e,t,n){this._data[e]||(this._data[e]={}),this._data[e][t]=n}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},zw=class{constructor(){this._color=new Mw,this._css=new Mw}setCss(e,t,n){this._css.set(e,t,n)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,n){this._color.set(e,t,n)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},xr=Object.freeze((()=>{let e=[Qn.toColor("#2e3436"),Qn.toColor("#cc0000"),Qn.toColor("#4e9a06"),Qn.toColor("#c4a000"),Qn.toColor("#3465a4"),Qn.toColor("#75507b"),Qn.toColor("#06989a"),Qn.toColor("#d3d7cf"),Qn.toColor("#555753"),Qn.toColor("#ef2929"),Qn.toColor("#8ae234"),Qn.toColor("#fce94f"),Qn.toColor("#729fcf"),Qn.toColor("#ad7fa8"),Qn.toColor("#34e2e2"),Qn.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let n=0;n<216;n++){let r=t[n/36%6|0],i=t[n/6%6|0],o=t[n%6];e.push({css:pr.toCss(r,i,o),rgba:pr.toRgba(r,i,o)})}for(let n=0;n<24;n++){let r=8+n*10;e.push({css:pr.toCss(r,r,r),rgba:pr.toRgba(r,r,r)})}return e})()),va=Qn.toColor("#ffffff"),nu=Qn.toColor("#000000"),jw=Qn.toColor("#ffffff"),Bw=nu,qc={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},nJ=va,G0=class extends en{constructor(e){super(),this._optionsService=e,this._contrastCache=new zw,this._halfContrastCache=new zw,this._onChangeColors=this._register(new qe),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:va,background:nu,cursor:jw,cursorAccent:Bw,selectionForeground:void 0,selectionBackgroundTransparent:qc,selectionBackgroundOpaque:Wn.blend(nu,qc),selectionInactiveBackgroundTransparent:qc,selectionInactiveBackgroundOpaque:Wn.blend(nu,qc),scrollbarSliderBackground:Wn.opacity(va,.2),scrollbarSliderHoverBackground:Wn.opacity(va,.4),scrollbarSliderActiveBackground:Wn.opacity(va,.5),overviewRulerBorder:va,ansi:xr.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=Mn(e.foreground,va),t.background=Mn(e.background,nu),t.cursor=Wn.blend(t.background,Mn(e.cursor,jw)),t.cursorAccent=Wn.blend(t.background,Mn(e.cursorAccent,Bw)),t.selectionBackgroundTransparent=Mn(e.selectionBackground,qc),t.selectionBackgroundOpaque=Wn.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=Mn(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=Wn.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?Mn(e.selectionForeground,Pw):void 0,t.selectionForeground===Pw&&(t.selectionForeground=void 0),Wn.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=Wn.opacity(t.selectionBackgroundTransparent,.3)),Wn.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=Wn.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=Mn(e.scrollbarSliderBackground,Wn.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=Mn(e.scrollbarSliderHoverBackground,Wn.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=Mn(e.scrollbarSliderActiveBackground,Wn.opacity(t.foreground,.5)),t.overviewRulerBorder=Mn(e.overviewRulerBorder,nJ),t.ansi=xr.slice(),t.ansi[0]=Mn(e.black,xr[0]),t.ansi[1]=Mn(e.red,xr[1]),t.ansi[2]=Mn(e.green,xr[2]),t.ansi[3]=Mn(e.yellow,xr[3]),t.ansi[4]=Mn(e.blue,xr[4]),t.ansi[5]=Mn(e.magenta,xr[5]),t.ansi[6]=Mn(e.cyan,xr[6]),t.ansi[7]=Mn(e.white,xr[7]),t.ansi[8]=Mn(e.brightBlack,xr[8]),t.ansi[9]=Mn(e.brightRed,xr[9]),t.ansi[10]=Mn(e.brightGreen,xr[10]),t.ansi[11]=Mn(e.brightYellow,xr[11]),t.ansi[12]=Mn(e.brightBlue,xr[12]),t.ansi[13]=Mn(e.brightMagenta,xr[13]),t.ansi[14]=Mn(e.brightCyan,xr[14]),t.ansi[15]=Mn(e.brightWhite,xr[15]),e.extendedAnsi){let n=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let r=0;r<n;r++)t.ansi[r+16]=Mn(e.extendedAnsi[r],xr[r+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t];return}switch(e){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};G0=rr([ct(0,gi)],G0);function Mn(e,t){if(e!==void 0)try{return Qn.toColor(e)}catch{}return t}var rJ=class{constructor(...e){this._entries=new Map;for(let[t,n]of e)this.set(t,n)}set(e,t){let n=this._entries.get(e);return this._entries.set(e,t),n}forEach(e){for(let[t,n]of this._entries.entries())e(t,n)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},iJ=class{constructor(){this._services=new rJ,this._services.set(_b,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let n=JG(e).sort((o,a)=>o.index-a.index),r=[];for(let o of n){let a=this._services.get(o.id);if(!a)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${o.id._id}.`);r.push(a)}let i=n.length>0?n[0].index:t.length;if(t.length!==i)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${i+1} conflicts with ${t.length} static arguments`);return new e(...t,...r)}},oJ={trace:0,debug:1,info:2,warn:3,error:4,off:5},sJ="xterm.js: ",X0=class extends en{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=oJ[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,n){this._evalLazyOptionalParams(n),e.call(console,(this._optionsService.options.logger?"":sJ)+t,...n)}trace(e,...t){var n;this._logLevel<=0&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.trace.bind(this._optionsService.options.logger))??console.log,e,t)}debug(e,...t){var n;this._logLevel<=1&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.debug.bind(this._optionsService.options.logger))??console.log,e,t)}info(e,...t){var n;this._logLevel<=2&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.info.bind(this._optionsService.options.logger))??console.info,e,t)}warn(e,...t){var n;this._logLevel<=3&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.warn.bind(this._optionsService.options.logger))??console.warn,e,t)}error(e,...t){var n;this._logLevel<=4&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.error.bind(this._optionsService.options.logger))??console.error,e,t)}};X0=rr([ct(0,gi)],X0);var Lw=class extends en{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new qe),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new qe),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new qe),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=new Array(e);for(let n=0;n<Math.min(e,this.length);n++)t[n]=this._array[this._getCyclicIndex(n)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(e,t,...n){if(t){for(let r=e;r<this._length-t;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let r=this._length-1;r>=e;r--)this._array[this._getCyclicIndex(r+n.length)]=this._array[this._getCyclicIndex(r)];for(let r=0;r<n.length;r++)this._array[this._getCyclicIndex(e+r)]=n[r];if(n.length&&this.onInsertEmitter.fire({index:e,amount:n.length}),this._length+n.length>this._maxLength){let r=this._length+n.length-this._maxLength;this._startIndex+=r,this._length=this._maxLength,this.onTrimEmitter.fire(r)}else this._length+=n.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,n){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+n<0)throw new Error("Cannot shift elements in list beyond index 0");if(n>0){for(let i=t-1;i>=0;i--)this.set(e+i+n,this.get(e+i));let r=e+t+n-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r<t;r++)this.set(e+r+n,this.get(e+r))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},Qt=3,fr=Object.freeze(new Yu),_h=0,Zg=2,ru=class mR{constructor(t,n,r=!1){this.isWrapped=r,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*Qt);let i=n||lo.fromCharData([0,N4,1,0]);for(let o=0;o<t;++o)this.setCell(o,i);this.length=t}get(t){let n=this._data[t*Qt+0],r=n&2097151;return[this._data[t*Qt+1],n&2097152?this._combined[t]:r?Fs(r):"",n>>22,n&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):r]}set(t,n){this._data[t*Qt+1]=n[0],n[1].length>1?(this._combined[t]=n[1],this._data[t*Qt+0]=t|2097152|n[2]<<22):this._data[t*Qt+0]=n[1].charCodeAt(0)|n[2]<<22}getWidth(t){return this._data[t*Qt+0]>>22}hasWidth(t){return this._data[t*Qt+0]&12582912}getFg(t){return this._data[t*Qt+1]}getBg(t){return this._data[t*Qt+2]}hasContent(t){return this._data[t*Qt+0]&4194303}getCodePoint(t){let n=this._data[t*Qt+0];return n&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):n&2097151}isCombined(t){return this._data[t*Qt+0]&2097152}getString(t){let n=this._data[t*Qt+0];return n&2097152?this._combined[t]:n&2097151?Fs(n&2097151):""}isProtected(t){return this._data[t*Qt+2]&536870912}loadCell(t,n){return _h=t*Qt,n.content=this._data[_h+0],n.fg=this._data[_h+1],n.bg=this._data[_h+2],n.content&2097152&&(n.combinedData=this._combined[t]),n.bg&268435456&&(n.extended=this._extendedAttrs[t]),n}setCell(t,n){n.content&2097152&&(this._combined[t]=n.combinedData),n.bg&268435456&&(this._extendedAttrs[t]=n.extended),this._data[t*Qt+0]=n.content,this._data[t*Qt+1]=n.fg,this._data[t*Qt+2]=n.bg}setCellFromCodepoint(t,n,r,i){i.bg&268435456&&(this._extendedAttrs[t]=i.extended),this._data[t*Qt+0]=n|r<<22,this._data[t*Qt+1]=i.fg,this._data[t*Qt+2]=i.bg}addCodepointToCell(t,n,r){let i=this._data[t*Qt+0];i&2097152?this._combined[t]+=Fs(n):i&2097151?(this._combined[t]=Fs(i&2097151)+Fs(n),i&=-2097152,i|=2097152):i=n|1<<22,r&&(i&=-12582913,i|=r<<22),this._data[t*Qt+0]=i}insertCells(t,n,r){if(t%=this.length,t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,r),n<this.length-t){let i=new lo;for(let o=this.length-t-n-1;o>=0;--o)this.setCell(t+n+o,this.loadCell(t+o,i));for(let o=0;o<n;++o)this.setCell(t+o,r)}else for(let i=t;i<this.length;++i)this.setCell(i,r);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,r)}deleteCells(t,n,r){if(t%=this.length,n<this.length-t){let i=new lo;for(let o=0;o<this.length-t-n;++o)this.setCell(t+o,this.loadCell(t+n+o,i));for(let o=this.length-n;o<this.length;++o)this.setCell(o,r)}else for(let i=t;i<this.length;++i)this.setCell(i,r);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,r),this.getWidth(t)===0&&!this.hasContent(t)&&this.setCellFromCodepoint(t,0,1,r)}replaceCells(t,n,r,i=!1){if(i){for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,r),n<this.length&&this.getWidth(n-1)===2&&!this.isProtected(n)&&this.setCellFromCodepoint(n,0,1,r);t<n&&t<this.length;)this.isProtected(t)||this.setCell(t,r),t++;return}for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,r),n<this.length&&this.getWidth(n-1)===2&&this.setCellFromCodepoint(n,0,1,r);t<n&&t<this.length;)this.setCell(t++,r)}resize(t,n){if(t===this.length)return this._data.length*4*Zg<this._data.buffer.byteLength;let r=t*Qt;if(t>this.length){if(this._data.buffer.byteLength>=r*4)this._data=new Uint32Array(this._data.buffer,0,r);else{let i=new Uint32Array(r);i.set(this._data),this._data=i}for(let i=this.length;i<t;++i)this.setCell(i,n)}else{this._data=this._data.subarray(0,r);let i=Object.keys(this._combined);for(let a=0;a<i.length;a++){let c=parseInt(i[a],10);c>=t&&delete this._combined[c]}let o=Object.keys(this._extendedAttrs);for(let a=0;a<o.length;a++){let c=parseInt(o[a],10);c>=t&&delete this._extendedAttrs[c]}}return this.length=t,r*4*Zg<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*Zg<this._data.buffer.byteLength){let t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,n=!1){if(n){for(let r=0;r<this.length;++r)this.isProtected(r)||this.setCell(r,t);return}this._combined={},this._extendedAttrs={};for(let r=0;r<this.length;++r)this.setCell(r,t)}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(let n in t._combined)this._combined[n]=t._combined[n];this._extendedAttrs={};for(let n in t._extendedAttrs)this._extendedAttrs[n]=t._extendedAttrs[n];this.isWrapped=t.isWrapped}clone(){let t=new mR(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let n in this._combined)t._combined[n]=this._combined[n];for(let n in this._extendedAttrs)t._extendedAttrs[n]=this._extendedAttrs[n];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Qt+0]&4194303)return t+(this._data[t*Qt+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Qt+0]&4194303||this._data[t*Qt+2]&50331648)return t+(this._data[t*Qt+0]>>22);return 0}copyCellsFrom(t,n,r,i,o){let a=t._data;if(o)for(let u=i-1;u>=0;u--){for(let d=0;d<Qt;d++)this._data[(r+u)*Qt+d]=a[(n+u)*Qt+d];a[(n+u)*Qt+2]&268435456&&(this._extendedAttrs[r+u]=t._extendedAttrs[n+u])}else for(let u=0;u<i;u++){for(let d=0;d<Qt;d++)this._data[(r+u)*Qt+d]=a[(n+u)*Qt+d];a[(n+u)*Qt+2]&268435456&&(this._extendedAttrs[r+u]=t._extendedAttrs[n+u])}let c=Object.keys(t._combined);for(let u=0;u<c.length;u++){let d=parseInt(c[u],10);d>=n&&(this._combined[d-n+r]=t._combined[d])}}translateToString(t,n,r,i){n=n??0,r=r??this.length,t&&(r=Math.min(r,this.getTrimmedLength())),i&&(i.length=0);let o="";for(;n<r;){let a=this._data[n*Qt+0],c=a&2097151,u=a&2097152?this._combined[n]:c?Fs(c):Us;if(o+=u,i)for(let d=0;d<u.length;++d)i.push(n);n+=a>>22||1}return i&&i.push(n),o}};function aJ(e,t,n,r,i,o){let a=[];for(let c=0;c<e.length-1;c++){let u=c,d=e.get(++u);if(!d.isWrapped)continue;let f=[e.get(c)];for(;u<e.length&&d.isWrapped;)f.push(d),d=e.get(++u);if(!o&&r>=c&&r<u){c+=f.length-1;continue}let p=0,g=Ou(f,p,t),v=1,b=0;for(;v<f.length;){let S=Ou(f,v,t),C=S-b,E=n-g,k=Math.min(C,E);f[p].copyCellsFrom(f[v],b,g,k,!1),g+=k,g===n&&(p++,g=0),b+=k,b===S&&(v++,b=0),g===0&&p!==0&&f[p-1].getWidth(n-1)===2&&(f[p].copyCellsFrom(f[p-1],n-1,g++,1,!1),f[p-1].setCell(n-1,i))}f[p].replaceCells(g,n,i);let _=0;for(let S=f.length-1;S>0&&(S>p||f[S].getTrimmedLength()===0);S--)_++;_>0&&(a.push(c+f.length-_),a.push(_)),c+=f.length-1}return a}function lJ(e,t){let n=[],r=0,i=t[r],o=0;for(let a=0;a<e.length;a++)if(i===a){let c=t[++r];e.onDeleteEmitter.fire({index:a-o,amount:c}),a+=c-1,o+=c,i=t[++r]}else n.push(a);return{layout:n,countRemoved:o}}function cJ(e,t){let n=[];for(let r=0;r<t.length;r++)n.push(e.get(t[r]));for(let r=0;r<n.length;r++)e.set(r,n[r]);e.length=t.length}function uJ(e,t,n){let r=[],i=e.map((u,d)=>Ou(e,d,t)).reduce((u,d)=>u+d),o=0,a=0,c=0;for(;c<i;){if(i-c<n){r.push(i-c);break}o+=n;let u=Ou(e,a,t);o>u&&(o-=u,a++);let d=e[a].getWidth(o-1)===2;d&&o--;let f=d?n-1:n;r.push(f),c+=f}return r}function Ou(e,t,n){if(t===e.length-1)return e[t].getTrimmedLength();let r=!e[t].hasContent(n-1)&&e[t].getWidth(n-1)===1,i=e[t+1].getWidth(0)===2;return r&&i?n-1:n}var pR=class gR{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=gR._nextId++,this._onDispose=this.register(new qe),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),Ma(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};pR._nextId=1;var dJ=pR,kr={},ya=kr.B;kr[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"};kr.A={"#":"£"};kr.B=void 0;kr[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"};kr.C=kr[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};kr.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"};kr.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"};kr.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"};kr.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"};kr.E=kr[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"};kr.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"};kr.H=kr[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};kr["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"};var Aw=4294967295,Dw=class{constructor(e,t,n){this._hasScrollback=e,this._optionsService=t,this._bufferService=n,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=fr.clone(),this.savedCharset=ya,this.markers=[],this._nullCell=lo.fromCharData([0,N4,1,0]),this._whitespaceCell=lo.fromCharData([0,Us,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new kf,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new Lw(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new Cf),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new Cf),this._whitespaceCell}getBlankLine(e,t){return new ru(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>Aw?Aw:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=fr);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new Lw(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let n=this.getNullCell(fr),r=0,i=this._getCorrectBufferLength(t);if(i>this.lines.maxLength&&(this.lines.maxLength=i),this.lines.length>0){if(this._cols<e)for(let a=0;a<this.lines.length;a++)r+=+this.lines.get(a).resize(e,n);let o=0;if(this._rows<t)for(let a=this._rows;a<t;a++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new ru(e,n)):this.ybase>0&&this.lines.length<=this.ybase+this.y+o+1?(this.ybase--,o++,this.ydisp>0&&this.ydisp--):this.lines.push(new ru(e,n)));else for(let a=this._rows;a>t;a--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(i<this.lines.maxLength){let a=this.lines.length-i;a>0&&(this.lines.trimStart(a),this.ybase=Math.max(this.ybase-a,0),this.ydisp=Math.max(this.ydisp-a,0),this.savedY=Math.max(this.savedY-a,0)),this.lines.maxLength=i}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),o&&(this.y+=o),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let o=0;o<this.lines.length;o++)r+=+this.lines.get(o).resize(e,n);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),r>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let n=this._optionsService.rawOptions.reflowCursorLine,r=aJ(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(fr),n);if(r.length>0){let i=lJ(this.lines,r);cJ(this.lines,i.layout),this._reflowLargerAdjustViewport(e,t,i.countRemoved)}}_reflowLargerAdjustViewport(e,t,n){let r=this.getNullCell(fr),i=n;for(;i-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new ru(e,r))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-n,0)}_reflowSmaller(e,t){let n=this._optionsService.rawOptions.reflowCursorLine,r=this.getNullCell(fr),i=[],o=0;for(let a=this.lines.length-1;a>=0;a--){let c=this.lines.get(a);if(!c||!c.isWrapped&&c.getTrimmedLength()<=e)continue;let u=[c];for(;c.isWrapped&&a>0;)c=this.lines.get(--a),u.unshift(c);if(!n){let k=this.ybase+this.y;if(k>=a&&k<a+u.length)continue}let d=u[u.length-1].getTrimmedLength(),f=uJ(u,this._cols,e),p=f.length-u.length,g;this.ybase===0&&this.y!==this.lines.length-1?g=Math.max(0,this.y-this.lines.maxLength+p):g=Math.max(0,this.lines.length-this.lines.maxLength+p);let v=[];for(let k=0;k<p;k++){let $=this.getBlankLine(fr,!0);v.push($)}v.length>0&&(i.push({start:a+u.length+o,newLines:v}),o+=v.length),u.push(...v);let b=f.length-1,_=f[b];_===0&&(b--,_=f[b]);let S=u.length-p-1,C=d;for(;S>=0;){let k=Math.min(C,_);if(u[b]===void 0)break;if(u[b].copyCellsFrom(u[S],C-k,_-k,k,!0),_-=k,_===0&&(b--,_=f[b]),C-=k,C===0){S--;let $=Math.max(S,0);C=Ou(u,$,this._cols)}}for(let k=0;k<u.length;k++)f[k]<e&&u[k].setCell(f[k],r);let E=p-g;for(;E-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+o)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+p,this.ybase+t-1)}if(i.length>0){let a=[],c=[];for(let _=0;_<this.lines.length;_++)c.push(this.lines.get(_));let u=this.lines.length,d=u-1,f=0,p=i[f];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+o);let g=0;for(let _=Math.min(this.lines.maxLength-1,u+o-1);_>=0;_--)if(p&&p.start>d+g){for(let S=p.newLines.length-1;S>=0;S--)this.lines.set(_--,p.newLines[S]);_++,a.push({index:d+1,amount:p.newLines.length}),g+=p.newLines.length,p=i[++f]}else this.lines.set(_,c[d--]);let v=0;for(let _=a.length-1;_>=0;_--)a[_].index+=v,this.lines.onInsertEmitter.fire(a[_]),v+=a[_].amount;let b=Math.max(0,u+o-this.lines.maxLength);b>0&&this.lines.onTrimEmitter.fire(b)}}translateBufferLineToString(e,t,n=0,r){let i=this.lines.get(e);return i?i.translateToString(t,n,r):""}getWrappedRangeForLine(e){let t=e,n=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;n+1<this.lines.length&&this.lines.get(n+1).isWrapped;)n++;return{first:t,last:n}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new dJ(e);return this.markers.push(t),t.register(this.lines.onTrim(n=>{t.line-=n,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(n=>{t.line>=n.index&&(t.line+=n.amount)})),t.register(this.lines.onDelete(n=>{t.line>=n.index&&t.line<n.index+n.amount&&t.dispose(),t.line>n.index&&(t.line-=n.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},hJ=class extends en{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new qe),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new Dw(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new Dw(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},vR=2,yR=1,Y0=class extends en{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new qe),this.onResize=this._onResize.event,this._onScroll=this._register(new qe),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,vR),this.rows=Math.max(e.rawOptions.rows||0,yR),this.buffers=this._register(new hJ(e,this)),this._register(this.buffers.onBufferActivate(t=>{this._onScroll.fire(t.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let n=this.cols!==e,r=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:n,rowsChanged:r})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let n=this.buffer,r;r=this._cachedBlankLine,(!r||r.length!==this.cols||r.getFg(0)!==e.fg||r.getBg(0)!==e.bg)&&(r=n.getBlankLine(e,t),this._cachedBlankLine=r),r.isWrapped=t;let i=n.ybase+n.scrollTop,o=n.ybase+n.scrollBottom;if(n.scrollTop===0){let a=n.lines.isFull;o===n.lines.length-1?a?n.lines.recycle().copyFrom(r):n.lines.push(r.clone()):n.lines.splice(o+1,0,r.clone()),a?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{let a=o-i+1;n.lines.shiftElements(i+1,a-1,-1),n.lines.set(o,r.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)}scrollLines(e,t){let n=this.buffer;if(e<0){if(n.ydisp===0)return;this.isUserScrolling=!0}else e+n.ydisp>=n.ybase&&(this.isUserScrolling=!1);let r=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+e,n.ybase),0),r!==n.ydisp&&(t||this._onScroll.fire(n.ydisp))}};Y0=rr([ct(0,gi)],Y0);var Tl={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:Ef,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},fJ=["normal","bold","100","200","300","400","500","600","700","800","900"],mJ=class extends en{constructor(e){super(),this._onOptionChange=this._register(new qe),this.onOptionChange=this._onOptionChange.event;let t={...Tl};for(let n in e)if(n in t)try{let r=e[n];t[n]=this._sanitizeAndValidateOption(n,r)}catch(r){console.error(r)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(Un(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(n=>{n===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(n=>{e.indexOf(n)!==-1&&t()})}_setupOptions(){let e=n=>{if(!(n in Tl))throw new Error(`No option with key "${n}"`);return this.rawOptions[n]},t=(n,r)=>{if(!(n in Tl))throw new Error(`No option with key "${n}"`);r=this._sanitizeAndValidateOption(n,r),this.rawOptions[n]!==r&&(this.rawOptions[n]=r,this._onOptionChange.fire(n))};for(let n in this.rawOptions){let r={get:e.bind(this,n),set:t.bind(this,n)};Object.defineProperty(this.options,n,r)}}_sanitizeAndValidateOption(e,t){switch(e){case"cursorStyle":if(t||(t=Tl[e]),!pJ(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=Tl[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=fJ.includes(t)?t:Tl[e];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${e} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case"scrollback":if(t=Math.min(t,4294967295),t<0)throw new Error(`${e} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${e} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{};break}return t}};function pJ(e){return e==="block"||e==="underline"||e==="bar"}function iu(e,t=5){if(typeof e!="object")return e;let n=Array.isArray(e)?[]:{};for(let r in e)n[r]=t<=1?e[r]:e[r]&&iu(e[r],t-1);return n}var Hw=Object.freeze({insertMode:!1}),Fw=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),J0=class extends en{constructor(e,t,n){super(),this._bufferService=e,this._logService=t,this._optionsService=n,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new qe),this.onData=this._onData.event,this._onUserInput=this._register(new qe),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new qe),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new qe),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=iu(Hw),this.decPrivateModes=iu(Fw)}reset(){this.modes=iu(Hw),this.decPrivateModes=iu(Fw)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let n=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&n.ybase!==n.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace("sending data (codes)",()=>e.split("").map(r=>r.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace("sending binary (codes)",()=>e.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(e))}};J0=rr([ct(0,pi),ct(1,L4),ct(2,gi)],J0);var Ww={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function ev(e,t){let n=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(n|=64,n|=e.action):(n|=e.button&3,e.button&4&&(n|=64),e.button&8&&(n|=128),e.action===32?n|=32:e.action===0&&!t&&(n|=3)),n}var tv=String.fromCharCode,Vw={DEFAULT:e=>{let t=[ev(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${tv(t[0])}${tv(t[1])}${tv(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${ev(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${ev(e,!0)};${e.x};${e.y}${t}`}},Q0=class extends en{constructor(e,t,n){super(),this._bufferService=e,this._coreService=t,this._optionsService=n,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new qe),this.onProtocolChange=this._onProtocolChange.event;for(let r of Object.keys(Ww))this.addProtocol(r,Ww[r]);for(let r of Object.keys(Vw))this.addEncoding(r,Vw[r]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,n){if(e.deltaY===0||e.shiftKey||t===void 0||n===void 0)return 0;let r=t/n,i=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(i/=r+0,Math.abs(e.deltaY)<50&&(i*=.3),this._wheelPartialScroll+=i,i=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._bufferService.rows),i}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,n){if(n){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};Q0=rr([ct(0,pi),ct(1,Ha),ct(2,gi)],Q0);var nv=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],gJ=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],wr;function vJ(e,t){let n=0,r=t.length-1,i;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=n;)if(i=n+r>>1,e>t[i][1])n=i+1;else if(e<t[i][0])r=i-1;else return!0;return!1}var yJ=class{constructor(){if(this.version="6",!wr){wr=new Uint8Array(65536),wr.fill(1),wr[0]=0,wr.fill(0,1,32),wr.fill(0,127,160),wr.fill(2,4352,4448),wr[9001]=2,wr[9002]=2,wr.fill(2,11904,42192),wr[12351]=1,wr.fill(2,44032,55204),wr.fill(2,63744,64256),wr.fill(2,65040,65050),wr.fill(2,65072,65136),wr.fill(2,65280,65377),wr.fill(2,65504,65511);for(let e=0;e<nv.length;++e)wr.fill(0,nv[e][0],nv[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?wr[e]:vJ(e,gJ)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let n=this.wcwidth(e),r=n===0&&t!==0;if(r){let i=wa.extractWidth(t);i===0?r=!1:i>n&&(n=i)}return wa.createPropertyValue(0,n,r)}},wa=class Vh{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new qe,this.onChange=this._onChange.event;let t=new yJ;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,n,r=!1){return(t&16777215)<<3|(n&3)<<1|(r?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let n=0,r=0,i=t.length;for(let o=0;o<i;++o){let a=t.charCodeAt(o);if(55296<=a&&a<=56319){if(++o>=i)return n+this.wcwidth(a);let d=t.charCodeAt(o);56320<=d&&d<=57343?a=(a-55296)*1024+d-56320+65536:n+=this.wcwidth(d)}let c=this.charProperties(a,r),u=Vh.extractWidth(c);Vh.extractShouldJoin(c)&&(u-=Vh.extractWidth(r)),n+=u,r=c}return n}charProperties(t,n){return this._activeProvider.charProperties(t,n)}},bJ=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function qw(e){var r;let t=(r=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1))==null?void 0:r.get(e.cols-1),n=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);n&&t&&(n.isWrapped=t[3]!==0&&t[3]!==32)}var Uc=2147483647,_J=256,bR=class Z0{constructor(t=32,n=32){if(this.maxLength=t,this.maxSubParamsLength=n,n>_J)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(n),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let n=new Z0;if(!t.length)return n;for(let r=Array.isArray(t[0])?1:0;r<t.length;++r){let i=t[r];if(Array.isArray(i))for(let o=0;o<i.length;++o)n.addSubParam(i[o]);else n.addParam(i)}return n}clone(){let t=new Z0(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let t=[];for(let n=0;n<this.length;++n){t.push(this.params[n]);let r=this._subParamsIdx[n]>>8,i=this._subParamsIdx[n]&255;i-r>0&&t.push(Array.prototype.slice.call(this._subParams,r,i))}return t}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(t){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>Uc?Uc:t}addSubParam(t){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>Uc?Uc:t,this._subParamsIdx[this.length-1]++}}hasSubParams(t){return(this._subParamsIdx[t]&255)-(this._subParamsIdx[t]>>8)>0}getSubParams(t){let n=this._subParamsIdx[t]>>8,r=this._subParamsIdx[t]&255;return r-n>0?this._subParams.subarray(n,r):null}getSubParamsAll(){let t={};for(let n=0;n<this.length;++n){let r=this._subParamsIdx[n]>>8,i=this._subParamsIdx[n]&255;i-r>0&&(t[n]=this._subParams.slice(r,i))}return t}addDigit(t){let n;if(this._rejectDigits||!(n=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let r=this._digitIsSub?this._subParams:this.params,i=r[n-1];r[n-1]=~i?Math.min(i*10+t,Uc):t}},Kc=[],SJ=class{constructor(){this._state=0,this._active=Kc,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let n=this._handlers[e];return n.push(t),{dispose:()=>{let r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Kc}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=Kc,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||Kc,!this._active.length)this._handlerFb(this._id,"START");else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,n){if(!this._active.length)this._handlerFb(this._id,"PUT",pm(e,t,n));else for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n)}start(){this.reset(),this._state=1}put(e,t,n){if(this._state!==3){if(this._state===1)for(;t<n;){let r=e[t++];if(r===59){this._state=2,this._start();break}if(r<48||57<r){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+r-48}this._state===2&&n-t>0&&this._put(e,t,n)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",e);else{let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&n===!1){for(;r>=0&&(n=this._active[r].end(e),n!==!0);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].end(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}this._active=Kc,this._id=-1,this._state=0}}},Ai=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=pm(e,t,n),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(n=>(this._data="",this._hitLimit=!1,n));return this._data="",this._hitLimit=!1,t}},Gc=[],CJ=class{constructor(){this._handlers=Object.create(null),this._active=Gc,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Gc}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let n=this._handlers[e];return n.push(t),{dispose:()=>{let r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=Gc,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||Gc,!this._active.length)this._handlerFb(this._ident,"HOOK",t);else for(let n=this._active.length-1;n>=0;n--)this._active[n].hook(t)}put(e,t,n){if(!this._active.length)this._handlerFb(this._ident,"PUT",pm(e,t,n));else for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",e);else{let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&n===!1){for(;r>=0&&(n=this._active[r].unhook(e),n!==!0);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].unhook(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}this._active=Gc,this._ident=0}},ou=new bR;ou.addParam(0);var Uw=class{constructor(e){this._handler=e,this._data="",this._params=ou,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():ou,this._data="",this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=pm(e,t,n),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(n=>(this._params=ou,this._data="",this._hitLimit=!1,n));return this._params=ou,this._data="",this._hitLimit=!1,t}},xJ=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,n,r){this.table[t<<8|e]=n<<4|r}addMany(e,t,n,r){for(let i=0;i<e.length;i++)this.table[t<<8|e[i]]=n<<4|r}},so=160,wJ=(function(){let e=new xJ(4095),t=Array.apply(null,Array(256)).map((c,u)=>u),n=(c,u)=>t.slice(c,u),r=n(32,127),i=n(0,24);i.push(25),i.push.apply(i,n(28,32));let o=n(0,14),a;e.setDefault(1,0),e.addMany(r,0,2,0);for(a in o)e.addMany([24,26,153,154],a,3,0),e.addMany(n(128,144),a,3,0),e.addMany(n(144,152),a,3,0),e.add(156,a,0,0),e.add(27,a,11,1),e.add(157,a,4,8),e.addMany([152,158,159],a,0,7),e.add(155,a,11,3),e.add(144,a,11,9);return e.addMany(i,0,3,0),e.addMany(i,1,3,1),e.add(127,1,0,1),e.addMany(i,8,0,8),e.addMany(i,3,3,3),e.add(127,3,0,3),e.addMany(i,4,3,4),e.add(127,4,0,4),e.addMany(i,6,3,6),e.addMany(i,5,3,5),e.add(127,5,0,5),e.addMany(i,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(r,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(n(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(r,7,0,7),e.addMany(i,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(n(64,127),3,7,0),e.addMany(n(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(n(48,60),4,8,4),e.addMany(n(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(n(32,64),6,0,6),e.add(127,6,0,6),e.addMany(n(64,127),6,0,0),e.addMany(n(32,48),3,9,5),e.addMany(n(32,48),5,9,5),e.addMany(n(48,64),5,0,6),e.addMany(n(64,127),5,7,0),e.addMany(n(32,48),4,9,5),e.addMany(n(32,48),1,9,2),e.addMany(n(32,48),2,9,2),e.addMany(n(48,127),2,10,0),e.addMany(n(48,80),1,10,0),e.addMany(n(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(n(96,127),1,10,0),e.add(80,1,11,9),e.addMany(i,9,0,9),e.add(127,9,0,9),e.addMany(n(28,32),9,0,9),e.addMany(n(32,48),9,9,12),e.addMany(n(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(i,11,0,11),e.addMany(n(32,128),11,0,11),e.addMany(n(28,32),11,0,11),e.addMany(i,10,0,10),e.add(127,10,0,10),e.addMany(n(28,32),10,0,10),e.addMany(n(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(n(32,48),10,9,12),e.addMany(i,12,0,12),e.add(127,12,0,12),e.addMany(n(28,32),12,0,12),e.addMany(n(32,48),12,9,12),e.addMany(n(48,64),12,0,11),e.addMany(n(64,127),12,12,13),e.addMany(n(64,127),10,12,13),e.addMany(n(64,127),9,12,13),e.addMany(i,13,13,13),e.addMany(r,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(so,0,2,0),e.add(so,8,5,8),e.add(so,6,0,6),e.add(so,11,0,11),e.add(so,13,13,13),e})(),EJ=class extends en{constructor(e=wJ){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new bR,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(t,n,r)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,n)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(Un(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new SJ),this._dcsParser=this._register(new CJ),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e,t=[64,126]){let n=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(n=e.prefix.charCodeAt(0),n&&60>n||n>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let i=0;i<e.intermediates.length;++i){let o=e.intermediates.charCodeAt(i);if(32>o||o>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");n<<=8,n|=o}}if(e.final.length!==1)throw new Error("final must be a single byte");let r=e.final.charCodeAt(0);if(t[0]>r||r>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return n<<=8,n|=r,n}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let n=this._identifier(e,[48,126]);this._escHandlers[n]===void 0&&(this._escHandlers[n]=[]);let r=this._escHandlers[n];return r.push(t),{dispose:()=>{let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let n=this._identifier(e);this._csiHandlers[n]===void 0&&(this._csiHandlers[n]=[]);let r=this._csiHandlers[n];return r.push(t),{dispose:()=>{let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,n,r,i){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=n,this._parseStack.transition=r,this._parseStack.chunkPos=i}parse(e,t,n){let r=0,i=0,o=0,a;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,o=this._parseStack.chunkPos+1;else{if(n===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let c=this._parseStack.handlers,u=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(n===!1&&u>-1){for(;u>=0&&(a=c[u](this._params),a!==!0);u--)if(a instanceof Promise)return this._parseStack.handlerPos=u,a}this._parseStack.handlers=[];break;case 4:if(n===!1&&u>-1){for(;u>=0&&(a=c[u](),a!==!0);u--)if(a instanceof Promise)return this._parseStack.handlerPos=u,a}this._parseStack.handlers=[];break;case 6:if(r=e[this._parseStack.chunkPos],a=this._dcsParser.unhook(r!==24&&r!==26,n),a)return a;r===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(r=e[this._parseStack.chunkPos],a=this._oscParser.end(r!==24&&r!==26,n),a)return a;r===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,o=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let c=o;c<t;++c){switch(r=e[c],i=this._transitions.table[this.currentState<<8|(r<160?r:so)],i>>4){case 2:for(let g=c+1;;++g){if(g>=t||(r=e[g])<32||r>126&&r<so){this._printHandler(e,c,g),c=g-1;break}if(++g>=t||(r=e[g])<32||r>126&&r<so){this._printHandler(e,c,g),c=g-1;break}if(++g>=t||(r=e[g])<32||r>126&&r<so){this._printHandler(e,c,g),c=g-1;break}if(++g>=t||(r=e[g])<32||r>126&&r<so){this._printHandler(e,c,g),c=g-1;break}}break;case 3:this._executeHandlers[r]?this._executeHandlers[r]():this._executeHandlerFb(r),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:c,code:r,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let u=this._csiHandlers[this._collect<<8|r],d=u?u.length-1:-1;for(;d>=0&&(a=u[d](this._params),a!==!0);d--)if(a instanceof Promise)return this._preserveStack(3,u,d,i,c),a;d<0&&this._csiHandlerFb(this._collect<<8|r,this._params),this.precedingJoinState=0;break;case 8:do switch(r){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(r-48)}while(++c<t&&(r=e[c])>47&&r<60);c--;break;case 9:this._collect<<=8,this._collect|=r;break;case 10:let f=this._escHandlers[this._collect<<8|r],p=f?f.length-1:-1;for(;p>=0&&(a=f[p](),a!==!0);p--)if(a instanceof Promise)return this._preserveStack(4,f,p,i,c),a;p<0&&this._escHandlerFb(this._collect<<8|r),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|r,this._params);break;case 13:for(let g=c+1;;++g)if(g>=t||(r=e[g])===24||r===26||r===27||r>127&&r<so){this._dcsParser.put(e,c,g),c=g-1;break}break;case 14:if(a=this._dcsParser.unhook(r!==24&&r!==26),a)return this._preserveStack(6,[],0,i,c),a;r===27&&(i|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let g=c+1;;g++)if(g>=t||(r=e[g])<32||r>127&&r<so){this._oscParser.put(e,c,g),c=g-1;break}break;case 6:if(a=this._oscParser.end(r!==24&&r!==26),a)return this._preserveStack(5,[],0,i,c),a;r===27&&(i|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=i&15}}},kJ=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,$J=/^[\da-f]+$/;function Kw(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let n=kJ.exec(t);if(n){let r=n[1]?15:n[4]?255:n[7]?4095:65535;return[Math.round(parseInt(n[1]||n[4]||n[7]||n[10],16)/r*255),Math.round(parseInt(n[2]||n[5]||n[8]||n[11],16)/r*255),Math.round(parseInt(n[3]||n[6]||n[9]||n[12],16)/r*255)]}}else if(t.indexOf("#")===0&&(t=t.slice(1),$J.exec(t)&&[3,6,9,12].includes(t.length))){let n=t.length/3,r=[0,0,0];for(let i=0;i<3;++i){let o=parseInt(t.slice(n*i,n*i+n),16);r[i]=n===1?o<<4:n===2?o:n===3?o>>4:o>>8}return r}}function rv(e,t){let n=e.toString(16),r=n.length<2?"0"+n:n;switch(t){case 4:return n[0];case 8:return r;case 12:return(r+r).slice(0,3);default:return r+r}}function RJ(e,t=16){let[n,r,i]=e;return`rgb:${rv(n,t)}/${rv(r,t)}/${rv(i,t)}`}var TJ={"(":0,")":1,"*":2,"+":3,"-":1,".":2},As=131072,Gw=10;function Xw(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var Yw=5e3,Jw=0,PJ=class extends en{constructor(e,t,n,r,i,o,a,c,u=new EJ){super(),this._bufferService=e,this._charsetService=t,this._coreService=n,this._logService=r,this._optionsService=i,this._oscLinkService=o,this._coreMouseService=a,this._unicodeService=c,this._parser=u,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new XG,this._utf8Decoder=new YG,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=fr.clone(),this._eraseAttrDataInternal=fr.clone(),this._onRequestBell=this._register(new qe),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new qe),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new qe),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new qe),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new qe),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new qe),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new qe),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new qe),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new qe),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new qe),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new qe),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new qe),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new qe),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new ey(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(d=>this._activeBuffer=d.activeBuffer)),this._parser.setCsiHandlerFallback((d,f)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(d),params:f.toArray()})}),this._parser.setEscHandlerFallback(d=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(d)})}),this._parser.setExecuteHandlerFallback(d=>{this._logService.debug("Unknown EXECUTE code: ",{code:d})}),this._parser.setOscHandlerFallback((d,f,p)=>{this._logService.debug("Unknown OSC code: ",{identifier:d,action:f,data:p})}),this._parser.setDcsHandlerFallback((d,f,p)=>{f==="HOOK"&&(p=p.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(d),action:f,payload:p})}),this._parser.setPrintHandler((d,f,p)=>this.print(d,f,p)),this._parser.registerCsiHandler({final:"@"},d=>this.insertChars(d)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},d=>this.scrollLeft(d)),this._parser.registerCsiHandler({final:"A"},d=>this.cursorUp(d)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},d=>this.scrollRight(d)),this._parser.registerCsiHandler({final:"B"},d=>this.cursorDown(d)),this._parser.registerCsiHandler({final:"C"},d=>this.cursorForward(d)),this._parser.registerCsiHandler({final:"D"},d=>this.cursorBackward(d)),this._parser.registerCsiHandler({final:"E"},d=>this.cursorNextLine(d)),this._parser.registerCsiHandler({final:"F"},d=>this.cursorPrecedingLine(d)),this._parser.registerCsiHandler({final:"G"},d=>this.cursorCharAbsolute(d)),this._parser.registerCsiHandler({final:"H"},d=>this.cursorPosition(d)),this._parser.registerCsiHandler({final:"I"},d=>this.cursorForwardTab(d)),this._parser.registerCsiHandler({final:"J"},d=>this.eraseInDisplay(d,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},d=>this.eraseInDisplay(d,!0)),this._parser.registerCsiHandler({final:"K"},d=>this.eraseInLine(d,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},d=>this.eraseInLine(d,!0)),this._parser.registerCsiHandler({final:"L"},d=>this.insertLines(d)),this._parser.registerCsiHandler({final:"M"},d=>this.deleteLines(d)),this._parser.registerCsiHandler({final:"P"},d=>this.deleteChars(d)),this._parser.registerCsiHandler({final:"S"},d=>this.scrollUp(d)),this._parser.registerCsiHandler({final:"T"},d=>this.scrollDown(d)),this._parser.registerCsiHandler({final:"X"},d=>this.eraseChars(d)),this._parser.registerCsiHandler({final:"Z"},d=>this.cursorBackwardTab(d)),this._parser.registerCsiHandler({final:"`"},d=>this.charPosAbsolute(d)),this._parser.registerCsiHandler({final:"a"},d=>this.hPositionRelative(d)),this._parser.registerCsiHandler({final:"b"},d=>this.repeatPrecedingCharacter(d)),this._parser.registerCsiHandler({final:"c"},d=>this.sendDeviceAttributesPrimary(d)),this._parser.registerCsiHandler({prefix:">",final:"c"},d=>this.sendDeviceAttributesSecondary(d)),this._parser.registerCsiHandler({final:"d"},d=>this.linePosAbsolute(d)),this._parser.registerCsiHandler({final:"e"},d=>this.vPositionRelative(d)),this._parser.registerCsiHandler({final:"f"},d=>this.hVPosition(d)),this._parser.registerCsiHandler({final:"g"},d=>this.tabClear(d)),this._parser.registerCsiHandler({final:"h"},d=>this.setMode(d)),this._parser.registerCsiHandler({prefix:"?",final:"h"},d=>this.setModePrivate(d)),this._parser.registerCsiHandler({final:"l"},d=>this.resetMode(d)),this._parser.registerCsiHandler({prefix:"?",final:"l"},d=>this.resetModePrivate(d)),this._parser.registerCsiHandler({final:"m"},d=>this.charAttributes(d)),this._parser.registerCsiHandler({final:"n"},d=>this.deviceStatus(d)),this._parser.registerCsiHandler({prefix:"?",final:"n"},d=>this.deviceStatusPrivate(d)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},d=>this.softReset(d)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},d=>this.setCursorStyle(d)),this._parser.registerCsiHandler({final:"r"},d=>this.setScrollRegion(d)),this._parser.registerCsiHandler({final:"s"},d=>this.saveCursor(d)),this._parser.registerCsiHandler({final:"t"},d=>this.windowOptions(d)),this._parser.registerCsiHandler({final:"u"},d=>this.restoreCursor(d)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},d=>this.insertColumns(d)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},d=>this.deleteColumns(d)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},d=>this.selectProtected(d)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},d=>this.requestMode(d,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},d=>this.requestMode(d,!1)),this._parser.setExecuteHandler(Pe.BEL,()=>this.bell()),this._parser.setExecuteHandler(Pe.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(Pe.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(Pe.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(Pe.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(Pe.BS,()=>this.backspace()),this._parser.setExecuteHandler(Pe.HT,()=>this.tab()),this._parser.setExecuteHandler(Pe.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(Pe.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(Fh.IND,()=>this.index()),this._parser.setExecuteHandler(Fh.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(Fh.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new Ai(d=>(this.setTitle(d),this.setIconName(d),!0))),this._parser.registerOscHandler(1,new Ai(d=>this.setIconName(d))),this._parser.registerOscHandler(2,new Ai(d=>this.setTitle(d))),this._parser.registerOscHandler(4,new Ai(d=>this.setOrReportIndexedColor(d))),this._parser.registerOscHandler(8,new Ai(d=>this.setHyperlink(d))),this._parser.registerOscHandler(10,new Ai(d=>this.setOrReportFgColor(d))),this._parser.registerOscHandler(11,new Ai(d=>this.setOrReportBgColor(d))),this._parser.registerOscHandler(12,new Ai(d=>this.setOrReportCursorColor(d))),this._parser.registerOscHandler(104,new Ai(d=>this.restoreIndexedColor(d))),this._parser.registerOscHandler(110,new Ai(d=>this.restoreFgColor(d))),this._parser.registerOscHandler(111,new Ai(d=>this.restoreBgColor(d))),this._parser.registerOscHandler(112,new Ai(d=>this.restoreCursorColor(d))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let d in kr)this._parser.registerEscHandler({intermediates:"(",final:d},()=>this.selectCharset("("+d)),this._parser.registerEscHandler({intermediates:")",final:d},()=>this.selectCharset(")"+d)),this._parser.registerEscHandler({intermediates:"*",final:d},()=>this.selectCharset("*"+d)),this._parser.registerEscHandler({intermediates:"+",final:d},()=>this.selectCharset("+"+d)),this._parser.registerEscHandler({intermediates:"-",final:d},()=>this.selectCharset("-"+d)),this._parser.registerEscHandler({intermediates:".",final:d},()=>this.selectCharset("."+d)),this._parser.registerEscHandler({intermediates:"/",final:d},()=>this.selectCharset("/"+d));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(d=>(this._logService.error("Parsing error: ",d),d)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new Uw((d,f)=>this.requestStatusString(d,f)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,n,r){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=n,this._parseStack.position=r}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((t,n)=>setTimeout(()=>n("#SLOW_TIMEOUT"),Yw))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${Yw} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let n,r=this._activeBuffer.x,i=this._activeBuffer.y,o=0,a=this._parseStack.paused;if(a){if(n=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(n),n;r=this._parseStack.cursorStartX,i=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>As&&(o=this._parseStack.position+As)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,d=>String.fromCharCode(d)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(d=>d.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<As&&(this._parseBuffer=new Uint32Array(Math.min(e.length,As))),a||this._dirtyRowTracker.clearRange(),e.length>As)for(let d=o;d<e.length;d+=As){let f=d+As<e.length?d+As:e.length,p=typeof e=="string"?this._stringDecoder.decode(e.substring(d,f),this._parseBuffer):this._utf8Decoder.decode(e.subarray(d,f),this._parseBuffer);if(n=this._parser.parse(this._parseBuffer,p))return this._preserveStack(r,i,p,d),this._logSlowResolvingAsync(n),n}else if(!a){let d=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(n=this._parser.parse(this._parseBuffer,d))return this._preserveStack(r,i,d,0),this._logSlowResolvingAsync(n),n}(this._activeBuffer.x!==r||this._activeBuffer.y!==i)&&this._onCursorMove.fire();let c=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),u=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);u<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(u,this._bufferService.rows-1),end:Math.min(c,this._bufferService.rows-1)})}print(e,t,n){let r,i,o=this._charsetService.charset,a=this._optionsService.rawOptions.screenReaderMode,c=this._bufferService.cols,u=this._coreService.decPrivateModes.wraparound,d=this._coreService.modes.insertMode,f=this._curAttrData,p=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&n-t>0&&p.getWidth(this._activeBuffer.x-1)===2&&p.setCellFromCodepoint(this._activeBuffer.x-1,0,1,f);let g=this._parser.precedingJoinState;for(let v=t;v<n;++v){if(r=e[v],r<127&&o){let C=o[String.fromCharCode(r)];C&&(r=C.charCodeAt(0))}let b=this._unicodeService.charProperties(r,g);i=wa.extractWidth(b);let _=wa.extractShouldJoin(b),S=_?wa.extractWidth(g):0;if(g=b,a&&this._onA11yChar.fire(Fs(r)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+i-S>c){if(u){let C=p,E=this._activeBuffer.x-S;for(this._activeBuffer.x=S,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),p=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),S>0&&p instanceof ru&&p.copyCellsFrom(C,E,0,S,!1);E<c;)C.setCellFromCodepoint(E++,0,1,f)}else if(this._activeBuffer.x=c-1,i===2)continue}if(_&&this._activeBuffer.x){let C=p.getWidth(this._activeBuffer.x-1)?1:2;p.addCodepointToCell(this._activeBuffer.x-C,r,i);for(let E=i-S;--E>=0;)p.setCellFromCodepoint(this._activeBuffer.x++,0,0,f);continue}if(d&&(p.insertCells(this._activeBuffer.x,i-S,this._activeBuffer.getNullCell(f)),p.getWidth(c-1)===2&&p.setCellFromCodepoint(c-1,0,1,f)),p.setCellFromCodepoint(this._activeBuffer.x++,r,i,f),i>0)for(;--i;)p.setCellFromCodepoint(this._activeBuffer.x++,0,0,f)}this._parser.precedingJoinState=g,this._activeBuffer.x<c&&n-t>0&&p.getWidth(this._activeBuffer.x)===0&&!p.hasContent(this._activeBuffer.x)&&p.setCellFromCodepoint(this._activeBuffer.x,0,1,f),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final==="t"&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,n=>Xw(n.params[0],this._optionsService.rawOptions.windowOptions)?t(n):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new Uw(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new Ai(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var e;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&e.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);t.hasWidth(this._activeBuffer.x)&&!t.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,n,r=!1,i=!1){let o=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);o.replaceCells(t,n,this._activeBuffer.getNullCell(this._eraseAttrData()),i),r&&(o.isWrapped=!1)}_resetBufferLine(e,t=!1){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n&&(n.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),n.isWrapped=!1)}eraseInDisplay(e,t=!1){var r;this._restrictCursor(this._bufferService.cols);let n;switch(e.params[0]){case 0:for(n=this._activeBuffer.y,this._dirtyRowTracker.markDirty(n),this._eraseInBufferLine(n++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);n<this._bufferService.rows;n++)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(n);break;case 1:for(n=this._activeBuffer.y,this._dirtyRowTracker.markDirty(n),this._eraseInBufferLine(n,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(n+1).isWrapped=!1);n--;)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(n=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,n-1);n--&&!((r=this._activeBuffer.lines.get(this._activeBuffer.ybase+n))!=null&&r.getTrimmedLength()););for(;n>=0;n--)this._bufferService.scroll(this._eraseAttrData())}else{for(n=this._bufferService.rows,this._dirtyRowTracker.markDirty(n-1);n--;)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let i=this._activeBuffer.lines.length-this._bufferService.rows;i>0&&(this._activeBuffer.lines.trimStart(i),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-i,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-i,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let n=this._activeBuffer.ybase+this._activeBuffer.y,r=this._bufferService.rows-1-this._activeBuffer.scrollBottom,i=this._bufferService.rows-1+this._activeBuffer.ybase-r+1;for(;t--;)this._activeBuffer.lines.splice(i-1,1),this._activeBuffer.lines.splice(n,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let n=this._activeBuffer.ybase+this._activeBuffer.y,r;for(r=this._bufferService.rows-1-this._activeBuffer.scrollBottom,r=this._bufferService.rows-1+this._activeBuffer.ybase-r;t--;)this._activeBuffer.lines.splice(n,1),this._activeBuffer.lines.splice(r,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(fr));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let n=this._activeBuffer.scrollTop;n<=this._activeBuffer.scrollBottom;++n){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+n);r.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),r.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let n=this._activeBuffer.scrollTop;n<=this._activeBuffer.scrollBottom;++n){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+n);r.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),r.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let n=this._activeBuffer.scrollTop;n<=this._activeBuffer.scrollBottom;++n){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+n);r.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),r.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let n=this._activeBuffer.scrollTop;n<=this._activeBuffer.scrollBottom;++n){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+n);r.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),r.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let n=e.params[0]||1,r=wa.extractWidth(t),i=this._activeBuffer.x-r,o=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(i),a=new Uint32Array(o.length*n),c=0;for(let d=0;d<o.length;){let f=o.codePointAt(d)||0;a[c++]=f,d+=f>65535?2:1}let u=c;for(let d=1;d<n;++d)a.copyWithin(u,0,c),u+=c;return this.print(a,0,u),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(Pe.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(Pe.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(Pe.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(Pe.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(Pe.ESC+"[>83;40003;0c")),!0}_is(e){return(this._optionsService.rawOptions.termName+"").indexOf(e)===0}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,ya),this._charsetService.setgCharset(1,ya),this._charsetService.setgCharset(2,ya),this._charsetService.setgCharset(3,ya);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){(_=>(_[_.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",_[_.SET=1]="SET",_[_.RESET=2]="RESET",_[_.PERMANENTLY_SET=3]="PERMANENTLY_SET",_[_.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(void 0||(n={}));let r=this._coreService.decPrivateModes,{activeProtocol:i,activeEncoding:o}=this._coreMouseService,a=this._coreService,{buffers:c,cols:u}=this._bufferService,{active:d,alt:f}=c,p=this._optionsService.rawOptions,g=(_,S)=>(a.triggerDataEvent(`${Pe.ESC}[${t?"":"?"}${_};${S}$y`),!0),v=_=>_?1:2,b=e.params[0];return t?b===2?g(b,4):b===4?g(b,v(a.modes.insertMode)):b===12?g(b,3):b===20?g(b,v(p.convertEol)):g(b,0):b===1?g(b,v(r.applicationCursorKeys)):b===3?g(b,p.windowOptions.setWinLines?u===80?2:u===132?1:0:0):b===6?g(b,v(r.origin)):b===7?g(b,v(r.wraparound)):b===8?g(b,3):b===9?g(b,v(i==="X10")):b===12?g(b,v(p.cursorBlink)):b===25?g(b,v(!a.isCursorHidden)):b===45?g(b,v(r.reverseWraparound)):b===66?g(b,v(r.applicationKeypad)):b===67?g(b,4):b===1e3?g(b,v(i==="VT200")):b===1002?g(b,v(i==="DRAG")):b===1003?g(b,v(i==="ANY")):b===1004?g(b,v(r.sendFocus)):b===1005?g(b,4):b===1006?g(b,v(o==="SGR")):b===1015?g(b,4):b===1016?g(b,v(o==="SGR_PIXELS")):b===1048?g(b,1):b===47||b===1047||b===1049?g(b,v(d===f)):b===2004?g(b,v(r.bracketedPasteMode)):b===2026?g(b,v(r.synchronizedOutput)):g(b,0)}_updateAttrColor(e,t,n,r,i){return t===2?(e|=50331648,e&=-16777216,e|=Yu.fromColorRGB([n,r,i])):t===5&&(e&=-50331904,e|=33554432|n&255),e}_extractColor(e,t,n){let r=[0,0,-1,0,0,0],i=0,o=0;do{if(r[o+i]=e.params[t+o],e.hasSubParams(t+o)){let a=e.getSubParams(t+o),c=0;do r[1]===5&&(i=1),r[o+c+1+i]=a[c];while(++c<a.length&&c+o+1+i<r.length);break}if(r[1]===5&&o+i>=2||r[1]===2&&o+i>=5)break;r[1]&&(i=1)}while(++o+t<e.length&&o+i<r.length);for(let a=2;a<r.length;++a)r[a]===-1&&(r[a]=0);switch(r[0]){case 38:n.fg=this._updateAttrColor(n.fg,r[1],r[3],r[4],r[5]);break;case 48:n.bg=this._updateAttrColor(n.bg,r[1],r[3],r[4],r[5]);break;case 58:n.extended=n.extended.clone(),n.extended.underlineColor=this._updateAttrColor(n.extended.underlineColor,r[1],r[3],r[4],r[5])}return o}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=fr.fg,e.bg=fr.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,n,r=this._curAttrData;for(let i=0;i<t;i++)n=e.params[i],n>=30&&n<=37?(r.fg&=-50331904,r.fg|=16777216|n-30):n>=40&&n<=47?(r.bg&=-50331904,r.bg|=16777216|n-40):n>=90&&n<=97?(r.fg&=-50331904,r.fg|=16777216|n-90|8):n>=100&&n<=107?(r.bg&=-50331904,r.bg|=16777216|n-100|8):n===0?this._processSGR0(r):n===1?r.fg|=134217728:n===3?r.bg|=67108864:n===4?(r.fg|=268435456,this._processUnderline(e.hasSubParams(i)?e.getSubParams(i)[0]:1,r)):n===5?r.fg|=536870912:n===7?r.fg|=67108864:n===8?r.fg|=1073741824:n===9?r.fg|=2147483648:n===2?r.bg|=134217728:n===21?this._processUnderline(2,r):n===22?(r.fg&=-134217729,r.bg&=-134217729):n===23?r.bg&=-67108865:n===24?(r.fg&=-268435457,this._processUnderline(0,r)):n===25?r.fg&=-536870913:n===27?r.fg&=-67108865:n===28?r.fg&=-1073741825:n===29?r.fg&=2147483647:n===39?(r.fg&=-67108864,r.fg|=fr.fg&16777215):n===49?(r.bg&=-67108864,r.bg|=fr.bg&16777215):n===38||n===48||n===58?i+=this._extractColor(e,i,r):n===53?r.bg|=1073741824:n===55?r.bg&=-1073741825:n===59?(r.extended=r.extended.clone(),r.extended.underlineColor=-1,r.updateExtended()):n===100?(r.fg&=-67108864,r.fg|=fr.fg&16777215,r.bg&=-67108864,r.bg|=fr.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",n);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${Pe.ESC}[0n`);break;case 6:let t=this._activeBuffer.y+1,n=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${Pe.ESC}[${t};${n}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let t=this._activeBuffer.y+1,n=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${Pe.ESC}[?${t};${n}R`);break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=fr.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let n=t%2===1;this._coreService.decPrivateModes.cursorBlink=n}return!0}setScrollRegion(e){let t=e.params[0]||1,n;return(e.length<2||(n=e.params[1])>this._bufferService.rows||n===0)&&(n=this._bufferService.rows),n>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=n-1,this._setCursor(0,0)),!0}windowOptions(e){if(!Xw(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${Pe.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>Gw&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>Gw&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],n=e.split(";");for(;n.length>1;){let r=n.shift(),i=n.shift();if(/^\d+$/.exec(r)){let o=parseInt(r);if(Qw(o))if(i==="?")t.push({type:0,index:o});else{let a=Kw(i);a&&t.push({type:1,index:o,color:a})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(";");if(t===-1)return!0;let n=e.slice(0,t).trim(),r=e.slice(t+1);return r?this._createHyperlink(n,r):n.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let n=e.split(":"),r,i=n.findIndex(o=>o.startsWith("id="));return i!==-1&&(r=n[i].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:r,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let n=e.split(";");for(let r=0;r<n.length&&!(t>=this._specialColors.length);++r,++t)if(n[r]==="?")this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let i=Kw(n[r]);i&&this._onColor.fire([{type:1,index:this._specialColors[t],color:i}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],n=e.split(";");for(let r=0;r<n.length;++r)if(/^\d+$/.exec(n[r])){let i=parseInt(n[r]);Qw(i)&&t.push({type:2,index:i})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,ya),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(TJ[e[0]],kr[e[1]]||ya),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=fr.clone(),this._eraseAttrDataInternal=fr.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new lo;e.content=1<<22|69,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let n=this._activeBuffer.ybase+this._activeBuffer.y+t,r=this._activeBuffer.lines.get(n);r&&(r.fill(e),r.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let n=a=>(this._coreService.triggerDataEvent(`${Pe.ESC}${a}${Pe.ESC}\\`),!0),r=this._bufferService.buffer,i=this._optionsService.rawOptions;return n(e==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:e==='"p'?'P1$r61;1"p':e==="r"?`P1$r${r.scrollTop+1};${r.scrollBottom+1}r`:e==="m"?"P1$r0m":e===" q"?`P1$r${{block:2,underline:4,bar:6}[i.cursorStyle]-(i.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},ey=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(Jw=e,e=t,t=Jw),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};ey=rr([ct(0,pi)],ey);function Qw(e){return 0<=e&&e<256}var OJ=5e7,Zw=12,IJ=50,NJ=class extends en{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new qe),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let n;for(;n=this._writeBuffer.shift();){this._action(n);let r=this._callbacks.shift();r&&r()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>OJ)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let n=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let r=this._writeBuffer[this._bufferOffset],i=this._action(r,t);if(i){let a=c=>performance.now()-n>=Zw?setTimeout(()=>this._innerWrite(0,c)):this._innerWrite(n,c);i.catch(c=>(queueMicrotask(()=>{throw c}),Promise.resolve(!1))).then(a);return}let o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=r.length,performance.now()-n>=Zw)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>IJ&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},ty=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let c=t.addMarker(t.ybase+t.y),u={data:e,id:this._nextId++,lines:[c]};return c.onDispose(()=>this._removeMarkerFromLink(u,c)),this._dataByLinkId.set(u.id,u),u.id}let n=e,r=this._getEntryIdKey(n),i=this._entriesWithId.get(r);if(i)return this.addLineToLink(i.id,t.ybase+t.y),i.id;let o=t.addMarker(t.ybase+t.y),a={id:this._nextId++,key:this._getEntryIdKey(n),data:n,lines:[o]};return o.onDispose(()=>this._removeMarkerFromLink(a,o)),this._entriesWithId.set(a.key,a),this._dataByLinkId.set(a.id,a),a.id}addLineToLink(e,t){let n=this._dataByLinkId.get(e);if(n&&n.lines.every(r=>r.line!==t)){let r=this._bufferService.buffer.addMarker(t);n.lines.push(r),r.onDispose(()=>this._removeMarkerFromLink(n,r))}}getLinkData(e){var t;return(t=this._dataByLinkId.get(e))==null?void 0:t.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let n=e.lines.indexOf(t);n!==-1&&(e.lines.splice(n,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};ty=rr([ct(0,pi)],ty);var e2=!1,MJ=class extends en{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new Jl),this._onBinary=this._register(new qe),this.onBinary=this._onBinary.event,this._onData=this._register(new qe),this.onData=this._onData.event,this._onLineFeed=this._register(new qe),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new qe),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new qe),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new qe),this._instantiationService=new iJ,this.optionsService=this._register(new mJ(e)),this._instantiationService.setService(gi,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(Y0)),this._instantiationService.setService(pi,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(X0)),this._instantiationService.setService(L4,this._logService),this.coreService=this._register(this._instantiationService.createInstance(J0)),this._instantiationService.setService(Ha,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(Q0)),this._instantiationService.setService(B4,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(wa)),this._instantiationService.setService(eX,this.unicodeService),this._charsetService=this._instantiationService.createInstance(bJ),this._instantiationService.setService(ZG,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(ty),this._instantiationService.setService(A4,this._oscLinkService),this._inputHandler=this._register(new PJ(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(qr.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(qr.forward(this._bufferService.onResize,this._onResize)),this._register(qr.forward(this.coreService.onData,this._onData)),this._register(qr.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new NJ((t,n)=>this._inputHandler.parse(t,n))),this._register(qr.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new qe),this._onScroll.event(e=>{var t;(t=this._onScrollApi)==null||t.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!e2&&(this._logService.warn("writeSync is unreliable and will be removed soon."),e2=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,vR),t=Math.max(t,yR),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend==="conpty"&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(qw.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(qw(this._bufferService),!1))),this._windowsWrappingHeuristics.value=Un(()=>{for(let t of e)t.dispose()})}}},zJ={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};function jJ(e,t,n,r){var a;let i={type:0,cancel:!1,key:void 0},o=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key==="UIKeyInputUpArrow"?t?i.key=Pe.ESC+"OA":i.key=Pe.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?i.key=Pe.ESC+"OD":i.key=Pe.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?i.key=Pe.ESC+"OC":i.key=Pe.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?i.key=Pe.ESC+"OB":i.key=Pe.ESC+"[B");break;case 8:i.key=e.ctrlKey?"\b":Pe.DEL,e.altKey&&(i.key=Pe.ESC+i.key);break;case 9:if(e.shiftKey){i.key=Pe.ESC+"[Z";break}i.key=Pe.HT,i.cancel=!0;break;case 13:i.key=e.altKey?Pe.ESC+Pe.CR:Pe.CR,i.cancel=!0;break;case 27:i.key=Pe.ESC,e.altKey&&(i.key=Pe.ESC+Pe.ESC),i.cancel=!0;break;case 37:if(e.metaKey)break;o?i.key=Pe.ESC+"[1;"+(o+1)+"D":t?i.key=Pe.ESC+"OD":i.key=Pe.ESC+"[D";break;case 39:if(e.metaKey)break;o?i.key=Pe.ESC+"[1;"+(o+1)+"C":t?i.key=Pe.ESC+"OC":i.key=Pe.ESC+"[C";break;case 38:if(e.metaKey)break;o?i.key=Pe.ESC+"[1;"+(o+1)+"A":t?i.key=Pe.ESC+"OA":i.key=Pe.ESC+"[A";break;case 40:if(e.metaKey)break;o?i.key=Pe.ESC+"[1;"+(o+1)+"B":t?i.key=Pe.ESC+"OB":i.key=Pe.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(i.key=Pe.ESC+"[2~");break;case 46:o?i.key=Pe.ESC+"[3;"+(o+1)+"~":i.key=Pe.ESC+"[3~";break;case 36:o?i.key=Pe.ESC+"[1;"+(o+1)+"H":t?i.key=Pe.ESC+"OH":i.key=Pe.ESC+"[H";break;case 35:o?i.key=Pe.ESC+"[1;"+(o+1)+"F":t?i.key=Pe.ESC+"OF":i.key=Pe.ESC+"[F";break;case 33:e.shiftKey?i.type=2:e.ctrlKey?i.key=Pe.ESC+"[5;"+(o+1)+"~":i.key=Pe.ESC+"[5~";break;case 34:e.shiftKey?i.type=3:e.ctrlKey?i.key=Pe.ESC+"[6;"+(o+1)+"~":i.key=Pe.ESC+"[6~";break;case 112:o?i.key=Pe.ESC+"[1;"+(o+1)+"P":i.key=Pe.ESC+"OP";break;case 113:o?i.key=Pe.ESC+"[1;"+(o+1)+"Q":i.key=Pe.ESC+"OQ";break;case 114:o?i.key=Pe.ESC+"[1;"+(o+1)+"R":i.key=Pe.ESC+"OR";break;case 115:o?i.key=Pe.ESC+"[1;"+(o+1)+"S":i.key=Pe.ESC+"OS";break;case 116:o?i.key=Pe.ESC+"[15;"+(o+1)+"~":i.key=Pe.ESC+"[15~";break;case 117:o?i.key=Pe.ESC+"[17;"+(o+1)+"~":i.key=Pe.ESC+"[17~";break;case 118:o?i.key=Pe.ESC+"[18;"+(o+1)+"~":i.key=Pe.ESC+"[18~";break;case 119:o?i.key=Pe.ESC+"[19;"+(o+1)+"~":i.key=Pe.ESC+"[19~";break;case 120:o?i.key=Pe.ESC+"[20;"+(o+1)+"~":i.key=Pe.ESC+"[20~";break;case 121:o?i.key=Pe.ESC+"[21;"+(o+1)+"~":i.key=Pe.ESC+"[21~";break;case 122:o?i.key=Pe.ESC+"[23;"+(o+1)+"~":i.key=Pe.ESC+"[23~";break;case 123:o?i.key=Pe.ESC+"[24;"+(o+1)+"~":i.key=Pe.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?i.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?i.key=Pe.NUL:e.keyCode>=51&&e.keyCode<=55?i.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?i.key=Pe.DEL:e.keyCode===219?i.key=Pe.ESC:e.keyCode===220?i.key=Pe.FS:e.keyCode===221&&(i.key=Pe.GS);else if((!n||r)&&e.altKey&&!e.metaKey){let c=(a=zJ[e.keyCode])==null?void 0:a[e.shiftKey?1:0];if(c)i.key=Pe.ESC+c;else if(e.keyCode>=65&&e.keyCode<=90){let u=e.ctrlKey?e.keyCode-64:e.keyCode+32,d=String.fromCharCode(u);e.shiftKey&&(d=d.toUpperCase()),i.key=Pe.ESC+d}else if(e.keyCode===32)i.key=Pe.ESC+(e.ctrlKey?Pe.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let u=e.code.slice(3,4);e.shiftKey||(u=u.toLowerCase()),i.key=Pe.ESC+u,i.cancel=!0}}else n&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(i.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?i.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(i.key=Pe.US),e.key==="@"&&(i.key=Pe.NUL));break}return i}var ar=0,BJ=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new kf,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new kf,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((i,o)=>this._getKey(i)-this._getKey(o)),t=0,n=0,r=new Array(this._array.length+this._insertedValues.length);for(let i=0;i<r.length;i++)n>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[n])?(r[i]=e[t],t++):r[i]=this._array[n++];this._array=r,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(ar=this._search(t),ar===-1)||this._getKey(this._array[ar])!==t)return!1;do if(this._array[ar]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(ar),!0;while(++ar<this._array.length&&this._getKey(this._array[ar])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((i,o)=>i-o),t=0,n=new Array(this._array.length-e.length),r=0;for(let i=0;i<this._array.length;i++)e[t]===i?t++:n[r++]=this._array[i];this._array=n,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(ar=this._search(e),!(ar<0||ar>=this._array.length)&&this._getKey(this._array[ar])===e))do yield this._array[ar];while(++ar<this._array.length&&this._getKey(this._array[ar])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(ar=this._search(e),!(ar<0||ar>=this._array.length)&&this._getKey(this._array[ar])===e))do t(this._array[ar]);while(++ar<this._array.length&&this._getKey(this._array[ar])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,n=this._array.length-1;for(;n>=t;){let r=t+n>>1,i=this._getKey(this._array[r]);if(i>e)n=r-1;else if(i<e)t=r+1;else{for(;r>0&&this._getKey(this._array[r-1])===e;)r--;return r}}return t}},iv=0,t2=0,LJ=class extends en{constructor(){super(),this._decorations=new BJ(e=>e==null?void 0:e.marker.line),this._onDecorationRegistered=this._register(new qe),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new qe),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(Un(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new AJ(e);if(t){let n=t.marker.onDispose(()=>t.dispose()),r=t.onDispose(()=>{r.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),n.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,n){let r=0,i=0;for(let o of this._decorations.getKeyIterator(t))r=o.options.x??0,i=r+(o.options.width??1),e>=r&&e<i&&(!n||(o.options.layer??"bottom")===n)&&(yield o)}forEachDecorationAtCell(e,t,n,r){this._decorations.forEachByKey(t,i=>{iv=i.options.x??0,t2=iv+(i.options.width??1),e>=iv&&e<t2&&(!n||(i.options.layer??"bottom")===n)&&r(i)})}},AJ=class extends Gs{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new qe),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new qe),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=Qn.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=Qn.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},DJ=1e3,HJ=class{constructor(e,t=DJ){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,n){this._rowCount=n,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t;let r=performance.now();if(r-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=r,this._innerRefresh();else if(!this._additionalRefreshRequested){let i=r-this._lastRefreshMs,o=this._debounceThresholdMS-i;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},o)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},n2=20,$f=class extends en{constructor(e,t,n,r){super(),this._terminal=e,this._coreBrowserService=n,this._renderService=r,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let i=this._coreBrowserService.mainDocument;this._accessibilityContainer=i.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=i.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let o=0;o<this._terminal.rows;o++)this._rowElements[o]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[o]);if(this._topBoundaryFocusListener=o=>this._handleBoundaryFocus(o,0),this._bottomBoundaryFocusListener=o=>this._handleBoundaryFocus(o,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=i.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new HJ(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(o=>this._handleResize(o.rows))),this._register(this._terminal.onRender(o=>this._refreshRows(o.start,o.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(o=>this._handleChar(o))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
591
- `))),this._register(this._terminal.onA11yTab(o=>this._handleTab(o))),this._register(this._terminal.onKey(o=>this._handleKey(o.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(Vt(i,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(Un(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<n2+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
592
- `&&(this._liveRegionLineCount++,this._liveRegionLineCount===n2+1&&(this._liveRegion.textContent+=S0.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let n=this._terminal.buffer,r=n.lines.length.toString();for(let i=e;i<=t;i++){let o=n.lines.get(n.ydisp+i),a=[],c=(o==null?void 0:o.translateToString(!0,void 0,void 0,a))||"",u=(n.ydisp+i+1).toString(),d=this._rowElements[i];d&&(c.length===0?(d.textContent=" ",this._rowColumns.set(d,[0,1])):(d.textContent=c,this._rowColumns.set(d,a)),d.setAttribute("aria-posinset",u),d.setAttribute("aria-setsize",r),this._alignRowWidth(d))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let n=e.target,r=this._rowElements[t===0?1:this._rowElements.length-2],i=n.getAttribute("aria-posinset"),o=t===0?"1":`${this._terminal.buffer.lines.length}`;if(i===o||e.relatedTarget!==r)return;let a,c;if(t===0?(a=n,c=this._rowElements.pop(),this._rowContainer.removeChild(c)):(a=this._rowElements.shift(),c=n,this._rowContainer.removeChild(a)),a.removeEventListener("focus",this._topBoundaryFocusListener),c.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let u=this._createAccessibilityTreeNode();this._rowElements.unshift(u),this._rowContainer.insertAdjacentElement("afterbegin",u)}else{let u=this._createAccessibilityTreeNode();this._rowElements.push(u),this._rowContainer.appendChild(u)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){var c;if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},n={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(n.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===n.node&&t.offset>n.offset)&&([t,n]=[n,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let r=this._rowElements.slice(-1)[0];if(n.node.compareDocumentPosition(r)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(n={node:r,offset:((c=r.textContent)==null?void 0:c.length)??0}),!this._rowContainer.contains(n.node))return;let i=({node:u,offset:d})=>{let f=u instanceof Text?u.parentNode:u,p=parseInt(f==null?void 0:f.getAttribute("aria-posinset"),10)-1;if(isNaN(p))return console.warn("row is invalid. Race condition?"),null;let g=this._rowColumns.get(f);if(!g)return console.warn("columns is null. Race condition?"),null;let v=d<g.length?g[d]:g.slice(-1)[0]+1;return v>=this._terminal.cols&&(++p,v=0),{row:p,column:v}},o=i(t),a=i(n);if(!(!o||!a)){if(o.row>a.row||o.row===a.row&&o.column>=a.column)throw new Error("invalid range");this._terminal.select(o.column,o.row,(a.row-o.row)*this._terminal.cols-o.column+a.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){var i,o;e.style.transform="";let t=e.getBoundingClientRect().width,n=(o=(i=this._rowColumns.get(e))==null?void 0:i.slice(-1))==null?void 0:o[0];if(!n)return;let r=n*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${r/t})`}};$f=rr([ct(1,_b),ct(2,vs),ct(3,ys)],$f);var ny=class extends en{constructor(e,t,n,r,i){super(),this._element=e,this._mouseService=t,this._renderService=n,this._bufferService=r,this._linkProviderService=i,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new qe),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new qe),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(Un(()=>{var o;Ma(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,(o=this._activeProviderReplies)==null||o.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(Vt(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(Vt(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(Vt(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(Vt(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let n=e.composedPath();for(let r=0;r<n.length;r++){let i=n[r];if(i.classList.contains("xterm"))break;if(i.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){var r,i;(!this._activeProviderReplies||!t)&&((r=this._activeProviderReplies)==null||r.forEach(o=>{o==null||o.forEach(a=>{a.link.dispose&&a.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let n=!1;for(let[o,a]of this._linkProviderService.linkProviders.entries())t?(i=this._activeProviderReplies)!=null&&i.get(o)&&(n=this._checkLinkProviderResult(o,e,n)):a.provideLinks(e.y,c=>{var d,f;if(this._isMouseOut)return;let u=c==null?void 0:c.map(p=>({link:p}));(d=this._activeProviderReplies)==null||d.set(o,u),n=this._checkLinkProviderResult(o,e,n),((f=this._activeProviderReplies)==null?void 0:f.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let n=new Set;for(let r=0;r<t.size;r++){let i=t.get(r);if(i)for(let o=0;o<i.length;o++){let a=i[o],c=a.link.range.start.y<e?0:a.link.range.start.x,u=a.link.range.end.y>e?this._bufferService.cols:a.link.range.end.x;for(let d=c;d<=u;d++){if(n.has(d)){i.splice(o--,1);break}n.add(d)}}}}_checkLinkProviderResult(e,t,n){var o;if(!this._activeProviderReplies)return n;let r=this._activeProviderReplies.get(e),i=!1;for(let a=0;a<e;a++)(!this._activeProviderReplies.has(a)||this._activeProviderReplies.get(a))&&(i=!0);if(!i&&r){let a=r.find(c=>this._linkAtPosition(c.link,t));a&&(n=!0,this._handleNewLink(a))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let a=0;a<this._activeProviderReplies.size;a++){let c=(o=this._activeProviderReplies.get(a))==null?void 0:o.find(u=>this._linkAtPosition(u.link,t));if(c){n=!0,this._handleNewLink(c);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&FJ(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,Ma(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var n,r;return(r=(n=this._currentLink)==null?void 0:n.state)==null?void 0:r.decorations.pointerCursor},set:n=>{var r;(r=this._currentLink)!=null&&r.state&&this._currentLink.state.decorations.pointerCursor!==n&&(this._currentLink.state.decorations.pointerCursor=n,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",n))}},underline:{get:()=>{var n,r;return(r=(n=this._currentLink)==null?void 0:n.state)==null?void 0:r.decorations.underline},set:n=>{var r,i,o;(r=this._currentLink)!=null&&r.state&&((o=(i=this._currentLink)==null?void 0:i.state)==null?void 0:o.decorations.underline)!==n&&(this._currentLink.state.decorations.underline=n,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,n))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(n=>{if(!this._currentLink)return;let r=n.start===0?0:n.start+1+this._bufferService.buffer.ydisp,i=this._bufferService.buffer.ydisp+1+n.end;if(this._currentLink.link.range.start.y>=r&&this._currentLink.link.range.end.y<=i&&(this._clearCurrentLink(r,i),this._lastMouseEvent)){let o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._askForLink(o,!1)}})))}_linkHover(e,t,n){var r;(r=this._currentLink)!=null&&r.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(n,t.text)}_fireUnderlineEvent(e,t){let n=e.range,r=this._bufferService.buffer.ydisp,i=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-r-1,n.end.x,n.end.y-r-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(i)}_linkLeave(e,t,n){var r;(r=this._currentLink)!=null&&r.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(n,t.text)}_linkAtPosition(e,t){let n=e.range.start.y*this._bufferService.cols+e.range.start.x,r=e.range.end.y*this._bufferService.cols+e.range.end.x,i=t.y*this._bufferService.cols+t.x;return n<=i&&i<=r}_positionFromMouseEvent(e,t,n){let r=n.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(r)return{x:r[0],y:r[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,n,r,i){return{x1:e,y1:t,x2:n,y2:r,cols:this._bufferService.cols,fg:i}}};ny=rr([ct(1,Sb),ct(2,ys),ct(3,pi),ct(4,H4)],ny);function FJ(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var WJ=class extends MJ{constructor(e={}){super(e),this._linkifier=this._register(new Jl),this.browser=sR,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new Jl),this._onCursorMove=this._register(new qe),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new qe),this.onKey=this._onKey.event,this._onRender=this._register(new qe),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new qe),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new qe),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new qe),this.onBell=this._onBell.event,this._onFocus=this._register(new qe),this._onBlur=this._register(new qe),this._onA11yCharEmitter=this._register(new qe),this._onA11yTabEmitter=this._register(new qe),this._onWillOpen=this._register(new qe),this._setup(),this._decorationService=this._instantiationService.createInstance(LJ),this._instantiationService.setService(Ju,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(IY),this._instantiationService.setService(H4,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(x0)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh((t==null?void 0:t.start)??0,(t==null?void 0:t.end)??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register(qr.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(qr.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(qr.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(qr.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(Un(()=>{var t,n;this._customKeyEventHandler=void 0,(n=(t=this.element)==null?void 0:t.parentNode)==null||n.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let n,r="";switch(t.index){case 256:n="foreground",r="10";break;case 257:n="background",r="11";break;case 258:n="cursor",r="12";break;default:n="ansi",r="4;"+t.index}switch(t.type){case 0:let i=Wn.toColorRGB(n==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[n]);this.coreService.triggerDataEvent(`${Pe.ESC}]${r};${RJ(i)}${iR.ST}`);break;case 1:if(n==="ansi")this._themeService.modifyColors(o=>o.ansi[t.index]=pr.toColor(...t.color));else{let o=n;this._themeService.modifyColors(a=>a[o]=pr.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance($f,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Pe.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var e;return(e=this.textarea)==null?void 0:e.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Pe.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let n=Math.min(this.buffer.x,this.cols-1),r=this._renderService.dimensions.css.cell.height,i=t.getWidth(n),o=this._renderService.dimensions.css.cell.width*i,a=this.buffer.y*this._renderService.dimensions.css.cell.height,c=n*this._renderService.dimensions.css.cell.width;this.textarea.style.left=c+"px",this.textarea.style.top=a+"px",this.textarea.style.width=o+"px",this.textarea.style.height=r+"px",this.textarea.style.lineHeight=r+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(Vt(this.element,"copy",t=>{this.hasSelection()&&KG(t,this._selectionService)}));let e=t=>GG(t,this.textarea,this.coreService,this.optionsService);this._register(Vt(this.textarea,"paste",e)),this._register(Vt(this.element,"paste",e)),aR?this._register(Vt(this.element,"mousedown",t=>{t.button===2&&hw(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(Vt(this.element,"contextmenu",t=>{hw(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),Tb&&this._register(Vt(this.element,"auxclick",t=>{t.button===1&&I4(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(Vt(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(Vt(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(Vt(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(Vt(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(Vt(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(Vt(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(Vt(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){var i;if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((i=this.element)==null?void 0:i.ownerDocument.defaultView)&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(Vt(this.screenElement,"mousemove",o=>this.updateCursorStyle(o))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let n=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",_0.get()),uR||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>n.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(PY,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(vs,this._coreBrowserService),this._register(Vt(this.textarea,"focus",o=>this._handleTextAreaFocus(o))),this._register(Vt(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(V0,this._document,this._helperContainer),this._instantiationService.setService(gm,this._charSizeService),this._themeService=this._instantiationService.createInstance(G0),this._instantiationService.setService(oc,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(wf),this._instantiationService.setService(D4,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(U0,this.rows,this.screenElement)),this._instantiationService.setService(ys,this._renderService),this._register(this._renderService.onRenderedViewportChange(o=>this._onRender.fire(o))),this.onResize(o=>this._renderService.resize(o.cols,o.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(H0,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(q0),this._instantiationService.setService(Sb,this._mouseService);let r=this._linkifier.value=this._register(this._instantiationService.createInstance(ny,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(A0,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(o=>{super.scrollLines(o,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(K0,this.element,this.screenElement,r)),this._instantiationService.setService(nX,this._selectionService),this._register(this._selectionService.onRequestScrollLines(o=>this.scrollLines(o.amount,o.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(o=>this._renderService.handleSelectionChanged(o.start,o.end,o.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(o=>{this.textarea.value=o,this.textarea.focus(),this.textarea.select()})),this._register(qr.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{var o;this._selectionService.refresh(),(o=this._viewport)==null||o.queueSync()})),this._register(this._instantiationService.createInstance(D0,this.screenElement)),this._register(Vt(this.element,"mousedown",o=>this._selectionService.handleMouseDown(o))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance($f,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",o=>this._handleScreenReaderModeOptionChange(o))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(xf,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",o=>{!this._overviewRulerRenderer&&o&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(xf,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(W0,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function n(o){var d,f,p,g,v;let a=e._mouseService.getMouseReportCoords(o,e.screenElement);if(!a)return!1;let c,u;switch(o.overrideType||o.type){case"mousemove":u=32,o.buttons===void 0?(c=3,o.button!==void 0&&(c=o.button<3?o.button:3)):c=o.buttons&1?0:o.buttons&4?1:o.buttons&2?2:3;break;case"mouseup":u=0,c=o.button<3?o.button:3;break;case"mousedown":u=1,c=o.button<3?o.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(o)===!1)return!1;let b=o.deltaY;if(b===0||e.coreMouseService.consumeWheelEvent(o,(g=(p=(f=(d=e._renderService)==null?void 0:d.dimensions)==null?void 0:f.device)==null?void 0:p.cell)==null?void 0:g.height,(v=e._coreBrowserService)==null?void 0:v.dpr)===0)return!1;u=b<0?0:1,c=4;break;default:return!1}return u===void 0||c===void 0||c>4?!1:e.coreMouseService.triggerMouseEvent({col:a.col,row:a.row,x:a.x,y:a.y,button:c,action:u,ctrl:o.ctrlKey,alt:o.altKey,shift:o.shiftKey})}let r={mouseup:null,wheel:null,mousedrag:null,mousemove:null},i={mouseup:o=>(n(o),o.buttons||(this._document.removeEventListener("mouseup",r.mouseup),r.mousedrag&&this._document.removeEventListener("mousemove",r.mousedrag)),this.cancel(o)),wheel:o=>(n(o),this.cancel(o,!0)),mousedrag:o=>{o.buttons&&n(o)},mousemove:o=>{o.buttons||n(o)}};this._register(this.coreMouseService.onProtocolChange(o=>{o?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(o)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),o&8?r.mousemove||(t.addEventListener("mousemove",i.mousemove),r.mousemove=i.mousemove):(t.removeEventListener("mousemove",r.mousemove),r.mousemove=null),o&16?r.wheel||(t.addEventListener("wheel",i.wheel,{passive:!1}),r.wheel=i.wheel):(t.removeEventListener("wheel",r.wheel),r.wheel=null),o&2?r.mouseup||(r.mouseup=i.mouseup):(this._document.removeEventListener("mouseup",r.mouseup),r.mouseup=null),o&4?r.mousedrag||(r.mousedrag=i.mousedrag):(this._document.removeEventListener("mousemove",r.mousedrag),r.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(Vt(t,"mousedown",o=>{if(o.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(o)))return n(o),r.mouseup&&this._document.addEventListener("mouseup",r.mouseup),r.mousedrag&&this._document.addEventListener("mousemove",r.mousedrag),this.cancel(o)})),this._register(Vt(t,"wheel",o=>{var a,c,u,d,f;if(!r.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(o)===!1)return!1;if(!this.buffer.hasScrollback){if(o.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(o,(d=(u=(c=(a=e._renderService)==null?void 0:a.dimensions)==null?void 0:c.device)==null?void 0:u.cell)==null?void 0:d.height,(f=e._coreBrowserService)==null?void 0:f.dpr)===0)return this.cancel(o,!0);let p=Pe.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(o.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(p,!0),this.cancel(o,!0)}}},{passive:!1}))}refresh(e,t){var n;(n=this._renderService)==null||n.refreshRows(e,t)}updateCursorStyle(e){var t;(t=this._selectionService)!=null&&t.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){O4(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,n){this._selectionService.setSelection(e,t,n)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var e;(e=this._selectionService)==null||e.clearSelection()}selectAll(){var e;(e=this._selectionService)==null||e.selectAll()}selectLines(e,t){var n;(n=this._selectionService)==null||n.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let n=jJ(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),n.type===3||n.type===2){let r=this.rows-1;return this.scrollLines(n.type===2?-r:r),this.cancel(e,!0)}if(n.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(n.cancel&&this.cancel(e,!0),!n.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((n.key===Pe.ETX||n.key===Pe.CR)&&(this.textarea.value=""),this._onKey.fire({key:n.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(n.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let n=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?n:n&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(VJ(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){var n;(n=this._charSizeService)==null||n.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(fr));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){var t;this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),(t=this._selectionService)==null||t.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){var e;(e=this._renderService)==null||e.clearTextureAtlas()}_reportFocus(){var e;(e=this.element)!=null&&e.classList.contains("focus")?this.coreService.triggerDataEvent(Pe.ESC+"[I"):this.coreService.triggerDataEvent(Pe.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),n=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Pe.ESC}[4;${n};${t}t`);break;case 1:let r=this._renderService.dimensions.css.cell.width.toFixed(0),i=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Pe.ESC}[6;${i};${r}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function VJ(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var qJ=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let n={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(n),t.dispose=()=>this._wrappedAddonDispose(n),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let n=0;n<this._addons.length;n++)if(this._addons[n]===e){t=n;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},UJ=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new lo)}translateToString(e,t,n){return this._line.translateToString(e,t,n)}},r2=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new UJ(t)}getNullCell(){return new lo}},KJ=class extends en{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new qe),this.onBufferChange=this._onBufferChange.event,this._normal=new r2(this._core.buffers.normal,"normal"),this._alternate=new r2(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},GJ=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,n=>t(n.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(n,r)=>t(n,r.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},XJ=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},YJ=["cols","rows"],Bo=0,JJ=class extends en{constructor(e){super(),this._core=this._register(new WJ(e)),this._addonManager=this._register(new qJ),this._publicOptions={...this._core.options};let t=r=>this._core.options[r],n=(r,i)=>{this._checkReadonlyOptions(r),this._core.options[r]=i};for(let r in this._core.options){let i={get:t.bind(this,r),set:n.bind(this,r)};Object.defineProperty(this._publicOptions,r,i)}}_checkReadonlyOptions(e){if(YJ.includes(e))throw new Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new GJ(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new XJ(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this._register(new KJ(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,n){this._verifyIntegers(e,t,n),this._core.select(e,t,n)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
593
- `,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return _0.get()},set promptLabel(e){_0.set(e)},get tooMuchOutput(){return S0.get()},set tooMuchOutput(e){S0.set(e)}}}_verifyIntegers(...e){for(Bo of e)if(Bo===1/0||isNaN(Bo)||Bo%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(Bo of e)if(Bo&&(Bo===1/0||isNaN(Bo)||Bo%1!==0||Bo<0))throw new Error("This API only accepts positive integers")}};/**
594
- * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
595
- * @license MIT
596
- *
597
- * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
598
- * @license MIT
599
- *
600
- * Originally forked from (with the author's permission):
601
- * Fabrice Bellard's javascript vt100 for jslinux:
602
- * http://bellard.org/jslinux/
603
- * Copyright (c) 2011 Fabrice Bellard
604
- */var QJ=2,ZJ=1,eQ=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){var p;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:((p=this._terminal.options.overviewRuler)==null?void 0:p.width)||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue("height")),i=Math.max(0,parseInt(n.getPropertyValue("width"))),o=window.getComputedStyle(this._terminal.element),a={top:parseInt(o.getPropertyValue("padding-top")),bottom:parseInt(o.getPropertyValue("padding-bottom")),right:parseInt(o.getPropertyValue("padding-right")),left:parseInt(o.getPropertyValue("padding-left"))},c=a.top+a.bottom,u=a.right+a.left,d=r-c,f=i-u-t;return{cols:Math.max(QJ,Math.floor(f/e.css.cell.width)),rows:Math.max(ZJ,Math.floor(d/e.css.cell.height))}}};const tQ="_terminalPanel_821xm_1",nQ="_terminalContainer_821xm_8",rQ="_virtualKeybar_821xm_14",iQ="_virtualKey_821xm_14",Sh={terminalPanel:tQ,terminalContainer:nQ,virtualKeybar:rQ,virtualKey:iQ},i2=/Android|iPhone|iPad|iPod|Mobile/i.test(navigator.userAgent),oQ=[{label:"↑",seq:"\x1B[A"},{label:"↓",seq:"\x1B[B"},{label:"←",seq:"\x1B[D"},{label:"→",seq:"\x1B[C"},{label:"Enter",seq:"\r"},{label:"Tab",seq:" "},{label:"Esc",seq:"\x1B"},{label:"Ctrl+C",seq:""}];class _R extends Q.Component{constructor(n){super(n);kt(this,"handleVirtualKey",n=>{var r;this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({type:"input",data:n})),(r=this.terminal)==null||r.focus()});this.containerRef=Q.createRef(),this.terminal=null,this.fitAddon=null,this.ws=null,this.resizeObserver=null}componentDidMount(){this.initTerminal(),this.connectWebSocket(),this.setupResizeObserver()}componentWillUnmount(){this.ws&&(this.ws.close(),this.ws=null),this.resizeObserver&&this.resizeObserver.disconnect(),this.terminal&&this.terminal.dispose()}initTerminal(){this.terminal=new JJ({cursorBlink:!0,fontSize:i2?11:13,fontFamily:'Menlo, Monaco, "Courier New", monospace',theme:{background:"#0a0a0a",foreground:"#d4d4d4",cursor:"#d4d4d4",selectionBackground:"#264f78"},allowProposedApi:!0}),this.fitAddon=new eQ,this.terminal.loadAddon(this.fitAddon),this.terminal.open(this.containerRef.current),requestAnimationFrame(()=>{this.fitAddon.fit()}),this.terminal.onData(n=>{this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({type:"input",data:n}))})}connectWebSocket(){const r=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/terminal`;this.ws=new WebSocket(r),this.ws.onmessage=i=>{try{const o=JSON.parse(i.data);o.type==="data"?this.terminal.write(o.data):o.type==="exit"?this.terminal.write(`\r
605
- \x1B[33m${Ce("ui.terminal.exited",{code:o.exitCode??"?"})}\x1B[0m\r
606
- `):o.type==="state"&&!o.running&&o.exitCode!==null&&this.terminal.write(`\x1B[33m${Ce("ui.terminal.exited",{code:o.exitCode})}\x1B[0m\r
607
- `)}catch{}},this.ws.onclose=()=>{setTimeout(()=>{this.containerRef.current&&this.connectWebSocket()},2e3)},this.ws.onopen=()=>{this.sendResize()}}sendResize(){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.terminal&&this.ws.send(JSON.stringify({type:"resize",cols:this.terminal.cols,rows:this.terminal.rows}))}setupResizeObserver(){this.resizeObserver=new ResizeObserver(()=>{if(this.fitAddon&&this.containerRef.current)try{this.fitAddon.fit(),this.sendResize()}catch{}}),this.containerRef.current&&this.resizeObserver.observe(this.containerRef.current)}render(){return w.jsxs("div",{className:Sh.terminalPanel,children:[w.jsx("div",{ref:this.containerRef,className:Sh.terminalContainer}),i2&&w.jsx("div",{className:Sh.virtualKeybar,children:oQ.map(n=>w.jsx("button",{className:Sh.virtualKey,onTouchStart:r=>{r.preventDefault(),this.handleVirtualKey(n.seq)},onClick:()=>this.handleVirtualKey(n.seq),children:n.label},n.label))})]})}}const sQ="_centerEmpty_s1mzc_1",aQ="_container_s1mzc_8",lQ="_sessionDividerText_s1mzc_16",cQ="_lastResponseLabel_s1mzc_21",uQ="_splitContainer_s1mzc_25",dQ="_chatSection_s1mzc_32",hQ="_vResizer_s1mzc_39",fQ="_chatInputBar_s1mzc_53",mQ="_chatInputWrapper_s1mzc_63",pQ="_chatTextareaWrap_s1mzc_78",gQ="_chatTextarea_s1mzc_78",vQ="_chatInputHint_s1mzc_102",yQ="_chatSendBtn_s1mzc_109",bQ="_messageListWrap_s1mzc_138",_Q="_stickyBottomBtn_s1mzc_146",SQ="_ptyPromptBubble_s1mzc_172",CQ="_ptyPromptResolved_s1mzc_181",xQ="_ptyPromptQuestion_s1mzc_190",wQ="_ptyPromptOptions_s1mzc_197",EQ="_ptyPromptOption_s1mzc_197",kQ="_ptyPromptOptionPrimary_s1mzc_221",$Q="_ptyPromptOptionChosen_s1mzc_239",RQ="_ptyPromptOptionDimmed_s1mzc_250",TQ="_ghostText_s1mzc_261",PQ="_suggestionChip_s1mzc_277",OQ="_suggestionChipText_s1mzc_293",IQ="_suggestionChipAction_s1mzc_302",wn={centerEmpty:sQ,container:aQ,sessionDividerText:lQ,lastResponseLabel:cQ,splitContainer:uQ,chatSection:dQ,vResizer:hQ,chatInputBar:fQ,chatInputWrapper:mQ,chatTextareaWrap:pQ,chatTextarea:gQ,chatInputHint:vQ,chatSendBtn:yQ,messageListWrap:bQ,stickyBottomBtn:_Q,ptyPromptBubble:SQ,ptyPromptResolved:CQ,ptyPromptQuestion:xQ,ptyPromptOptions:wQ,ptyPromptOption:EQ,ptyPromptOptionPrimary:kQ,ptyPromptOptionChosen:$Q,ptyPromptOptionDimmed:RQ,ghostText:TQ,suggestionChip:PQ,suggestionChipText:OQ,suggestionChipAction:IQ},{Text:o2}=Oo,NQ=20;function MQ(){return 100+Math.random()*50}function s2(e){const t={};for(const r of e)if(r.role==="assistant"&&Array.isArray(r.content))for(const i of r.content)i.type==="tool_use"&&(t[i.id]=i);const n={};for(const r of e)if(r.role==="user"&&Array.isArray(r.content)){for(const i of r.content)if(i.type==="tool_result"){const o=t[i.tool_use_id];let a=Ce("ui.toolReturn"),c=null,u=null;if(o)if(c=o.name,u=o.input,o.name==="Task"&&o.input){const d=o.input.subagent_type||"",f=o.input.description||"";a=`SubAgent: ${d}${f?" — "+f:""}`}else a=Ce("ui.toolReturnNamed",{name:o.name});n[i.tool_use_id]={label:a,toolName:c,toolInput:u,resultText:h4(i)}}}return{toolUseMap:t,toolResultMap:n}}class zQ extends Q.Component{constructor(n){super(n);kt(this,"handleStickToBottom",()=>{this.setState({stickyBottom:!0},()=>{const n=this.containerRef.current;n&&(n.scrollTop=n.scrollHeight)})});kt(this,"handlePromptOptionClick",n=>{const r=this._inputWs;if(!r||r.readyState!==WebSocket.OPEN)return;const i=this.state.ptyPrompt;if(!i)return;const o=i.options,a=o.findIndex(g=>g.number===n);let c=o.findIndex(g=>g.selected);c<0&&(c=0);const u=a-c,d=u>0?"\x1B[B":"\x1B[A",f=Math.abs(u),p=g=>{g<f?(r.send(JSON.stringify({type:"input",data:d})),setTimeout(()=>p(g+1),30)):setTimeout(()=>{r.readyState===WebSocket.OPEN&&r.send(JSON.stringify({type:"input",data:"\r"}))},50)};p(0),this.setState(g=>{const v=g.ptyPromptHistory.slice(),b=v[v.length-1];return b&&b.status==="active"&&(v[v.length-1]={...b,status:"answered",selectedNumber:n}),{ptyPrompt:null,ptyPromptHistory:v}}),this._ptyBuffer="",this._ptyDebounceTimer&&clearTimeout(this._ptyDebounceTimer)});kt(this,"handleInputSend",()=>{const n=this._inputRef.current;if(!n)return;const r=n.value.trim();r&&this._inputWs&&this._inputWs.readyState===WebSocket.OPEN&&(this._inputWs.send(JSON.stringify({type:"input",data:r})),setTimeout(()=>{this._inputWs&&this._inputWs.readyState===WebSocket.OPEN&&this._inputWs.send(JSON.stringify({type:"input",data:"\r"}))},50),n.value="",n.style.height="auto",this.setState({inputEmpty:!0,pendingInput:r,inputSuggestion:null},()=>this.scrollToBottom()))});kt(this,"handleInputKeyDown",n=>{if(n.key==="Tab"&&this.state.inputSuggestion){n.preventDefault();const r=this._inputRef.current;r&&(r.value=this.state.inputSuggestion,r.style.height="auto",r.style.height=Math.min(r.scrollHeight,120)+"px"),this.setState({inputSuggestion:null,inputEmpty:!1});return}n.key==="Enter"&&!n.shiftKey&&(n.preventDefault(),this.handleInputSend())});kt(this,"handleInputChange",n=>{const r=n.target;r.style.height="auto",r.style.height=Math.min(r.scrollHeight,120)+"px";const i=!r.value.trim();this.setState({inputEmpty:i}),this.state.inputSuggestion&&!i&&this.setState({inputSuggestion:null})});kt(this,"handleSuggestionToTerminal",()=>{const n=this.state.inputSuggestion;!n||!this._inputWs||this._inputWs.readyState!==WebSocket.OPEN||(this._inputWs.send(JSON.stringify({type:"input",data:n})),setTimeout(()=>{this._inputWs&&this._inputWs.readyState===WebSocket.OPEN&&this._inputWs.send(JSON.stringify({type:"input",data:"\r"}))},50),this.setState({inputSuggestion:null,pendingInput:n},()=>this.scrollToBottom()))});kt(this,"handleSplitMouseDown",n=>{n.preventDefault(),this._resizing=!0;const r=o=>{if(!this._resizing)return;const a=this.splitContainerRef.current;if(!a)return;const c=a.getBoundingClientRect(),u=(o.clientX-c.left)/c.width,d=Math.min(.85,Math.max(.25,u));this.setState({splitRatio:d})},i=()=>{this._resizing=!1,document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",i),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",r),document.addEventListener("mouseup",i),document.body.style.cursor="col-resize",document.body.style.userSelect="none"});this.containerRef=Q.createRef(),this.splitContainerRef=Q.createRef(),this.state={visibleCount:0,loading:!1,allItems:[],highlightTs:null,highlightFading:!1,splitRatio:.6,inputEmpty:!0,pendingInput:null,stickyBottom:!0,ptyPrompt:null,ptyPromptHistory:[],inputSuggestion:null},this._queueTimer=null,this._prevItemsLen=0,this._scrollTargetIdx=null,this._scrollTargetRef=Q.createRef(),this._scrollFadeTimer=null,this._resizing=!1,this._inputWs=null,this._inputRef=Q.createRef(),this._ptyBuffer="",this._ptyDebounceTimer=null}componentDidMount(){this.startRender(),this.props.cliMode&&this.connectInputWs(),this._bindStickyScroll()}componentDidUpdate(n){if(n.mainAgentSessions!==this.props.mainAgentSessions)this.startRender(),this.state.pendingInput&&this.setState({pendingInput:null}),this._updateSuggestion();else if(n.collapseToolResults!==this.props.collapseToolResults||n.expandThinking!==this.props.expandThinking){const r=this.buildAllItems();this.setState({allItems:r,visibleCount:r.length})}if(!n.scrollToTimestamp&&this.props.scrollToTimestamp){const r=this.buildAllItems();this.setState({allItems:r,visibleCount:r.length},()=>this.scrollToBottom())}!n.cliMode&&this.props.cliMode&&this.connectInputWs(),this._rebindStickyEl()}componentWillUnmount(){this._queueTimer&&clearTimeout(this._queueTimer),this._fadeClearTimer&&clearTimeout(this._fadeClearTimer),this._ptyDebounceTimer&&clearTimeout(this._ptyDebounceTimer),this._unbindScrollFade(),this._unbindStickyScroll(),this._inputWs&&(this._inputWs.close(),this._inputWs=null)}startRender(){this._queueTimer&&clearTimeout(this._queueTimer);const n=this.buildAllItems(),r=this._prevItemsLen;this._prevItemsLen=n.length;const i=n.length-r;if(i<=0||r>0&&i<=3){this.setState({allItems:n,visibleCount:n.length,loading:!1},()=>this.scrollToBottom());return}if(n.length>NQ)this.setState({allItems:n,visibleCount:0,loading:!0}),this._queueTimer=setTimeout(()=>{this.setState({visibleCount:n.length,loading:!1},()=>this.scrollToBottom())},300);else{const o=Math.max(0,r);this.setState({allItems:n,visibleCount:o,loading:!1}),this.queueNext(o,n.length)}}queueNext(n,r){n>=r||(this._queueTimer=setTimeout(()=>{this.setState({visibleCount:n+1},()=>{this.scrollToBottom(),this.queueNext(n+1,r)})},MQ()))}_isNearBottom(){const n=this.containerRef.current;return n?n.scrollHeight-n.scrollTop-n.clientHeight<=30:!0}scrollToBottom(){if(this._scrollTargetRef.current){const n=this._scrollTargetRef.current,r=this.containerRef.current;r&&n.offsetHeight>r.clientHeight?n.scrollIntoView({block:"start",behavior:"instant"}):n.scrollIntoView({block:"center",behavior:"instant"});const i=this.props.scrollToTimestamp;this._scrollTargetRef=Q.createRef(),i&&(this.setState({highlightTs:i,highlightFading:!1}),this._bindScrollFade()),this.props.onScrollTsDone&&this.props.onScrollTsDone();return}if(this.state.stickyBottom){const n=this.containerRef.current;n&&(n.scrollTop=n.scrollHeight)}}_bindStickyScroll(){this._onStickyScroll=()=>{if(this._stickyScrollLock)return;const n=this.containerRef.current;if(!n)return;const r=n.scrollHeight-n.scrollTop-n.clientHeight;this.state.stickyBottom&&r>30?this.setState({stickyBottom:!1}):!this.state.stickyBottom&&r<=5&&this.setState({stickyBottom:!0})},this._rebindStickyEl()}_rebindStickyEl(){const n=this.containerRef.current;n!==this._stickyBoundEl&&(this._stickyBoundEl&&this._stickyBoundEl.removeEventListener("scroll",this._onStickyScroll),this._stickyBoundEl=n,n&&n.addEventListener("scroll",this._onStickyScroll))}_unbindStickyScroll(){this._stickyBoundEl&&this._onStickyScroll&&(this._stickyBoundEl.removeEventListener("scroll",this._onStickyScroll),this._stickyBoundEl=null)}_bindScrollFade(){this._unbindScrollFade();const n=this.containerRef.current;n&&(this._scrollFadeIgnoreFirst=!0,this._onScrollFade=()=>{if(this._scrollFadeIgnoreFirst){this._scrollFadeIgnoreFirst=!1;return}this.setState({highlightFading:!0}),this._fadeClearTimer=setTimeout(()=>{this.setState({highlightTs:null,highlightFading:!1})},2e3),this._unbindScrollFade()},n.addEventListener("scroll",this._onScrollFade))}_unbindScrollFade(){this._onScrollFade&&this.containerRef.current&&(this.containerRef.current.removeEventListener("scroll",this._onScrollFade),this._onScrollFade=null)}renderSessionMessages(n,r,i,o){var v;const{userProfile:a,collapseToolResults:c,expandThinking:u,onViewRequest:d}=this.props,{toolUseMap:f,toolResultMap:p}=s2(n),g=[];for(let b=0;b<n.length;b++){const _=n[b],S=_.content,C=_._timestamp||null,E=C?o[C]:void 0,k=E!=null&&d?{requestIndex:E,onViewRequest:d}:{};if(_.role==="user"){if(Array.isArray(S)){const $=S.find(T=>T.type==="text"&&/^\[SUGGESTION MODE:/i.test((T.text||"").trim())),P=S.filter(T=>T.type==="tool_result");if($&&P.length>0){let T=null,O={};for(const N of P){const I=f[N.tool_use_id];if(I&&I.name==="AskUserQuestion"&&((v=I.input)!=null&&v.questions)){T=I.input.questions;const z=h4(N);try{O=JSON.parse(z).answers||{}}catch{}break}}T&&g.push(w.jsx(_o,{role:"user-selection",questions:T,answers:O,timestamp:C,userProfile:a,...k},`${r}-selection-${b}`))}else{const{commands:T,textBlocks:O,skillBlocks:N}=u4(S);for(let I=0;I<T.length;I++)g.push(w.jsx(_o,{role:"user",text:T[I],timestamp:C,userProfile:a,modelInfo:i,...k},`${r}-cmd-${b}-${I}`));for(const I of N){const z=I.text.match(/^#\s+(.+)$/m),A=z?z[1]:"Skill";g.push(w.jsx(_o,{role:"skill-loaded",text:I.text,skillName:A,timestamp:C,...k},`${r}-skill-${b}`))}for(let I=0;I<O.length;I++){const z=/^Implement the following plan:/i.test((O[I].text||"").trim());g.push(w.jsx(_o,{role:z?"plan-prompt":"user",text:O[I].text,timestamp:C,userProfile:a,modelInfo:i,...k},`${r}-user-${b}-${I}`))}}}else if(typeof S=="string"&&!sb(S)){const $=/^Implement the following plan:/i.test(S.trim());g.push(w.jsx(_o,{role:$?"plan-prompt":"user",text:S,timestamp:C,userProfile:a,modelInfo:i,...k},`${r}-user-${b}`))}}else _.role==="assistant"&&(Array.isArray(S)?g.push(w.jsx(_o,{role:"assistant",content:S,toolResultMap:p,timestamp:C,modelInfo:i,collapseToolResults:c,expandThinking:u,...k},`${r}-asst-${b}`)):typeof S=="string"&&g.push(w.jsx(_o,{role:"assistant",content:[{type:"text",text:S}],toolResultMap:p,timestamp:C,modelInfo:i,collapseToolResults:c,expandThinking:u,...k},`${r}-asst-${b}`)))}return g}buildAllItems(){var _,S,C,E;const{mainAgentSessions:n,requests:r,collapseToolResults:i,expandThinking:o,onViewRequest:a}=this.props;if(!n||n.length===0)return[];const c={};if(r)for(let k=0;k<r.length;k++)Vr(r[k])&&r[k].timestamp&&(c[r[k].timestamp]=k);let u=null;if(r){for(let k=r.length-1;k>=0;k--)if(Vr(r[k])&&((_=r[k].body)!=null&&_.model)){u=r[k].body.model;break}}const d=kF(u),f=[],p={},g=[];if(r)for(let k=0;k<r.length;k++){const $=r[k];if(!$.timestamp)continue;const P=Ia($,r[k+1]);if(P.type==="SubAgent"){const T=(C=(S=$.response)==null?void 0:S.body)==null?void 0:C.content;if(Array.isArray(T)&&T.length>0){const O=s2(((E=$.body)==null?void 0:E.messages)||[]).toolResultMap;g.push({timestamp:$.timestamp,content:T,toolResultMap:O,label:pf(P.type,P.subType),requestIndex:k})}}}let v=0;n.forEach((k,$)=>{var T,O,N,I;$>0&&f.push(w.jsx(Rx,{style:{borderColor:"#333",margin:"16px 0"},children:w.jsx(o2,{className:wn.sessionDividerText,children:"Session"})},`session-div-${$}`));const P=this.renderSessionMessages(k.messages,`s${$}`,d,c);for(const z of P){const A=z.props.timestamp;for(;v<g.length&&A&&g[v].timestamp<=A;){const M=g[v];M.timestamp&&(p[M.timestamp]=f.length),f.push(w.jsx(_o,{role:"sub-agent-chat",content:M.content,toolResultMap:M.toolResultMap,label:M.label,timestamp:M.timestamp,collapseToolResults:i,expandThinking:o,requestIndex:M.requestIndex,onViewRequest:a},`sub-chat-${v}`)),v++}A&&(p[A]=f.length),f.push(z)}for(;v<g.length;){const z=g[v],A=$<n.length-1&&((O=(T=n[$+1].messages)==null?void 0:T[0])==null?void 0:O._timestamp);if(A&&z.timestamp>A)break;z.timestamp&&(p[z.timestamp]=f.length),f.push(w.jsx(_o,{role:"sub-agent-chat",content:z.content,toolResultMap:z.toolResultMap,label:z.label,timestamp:z.timestamp,collapseToolResults:i,expandThinking:o,requestIndex:z.requestIndex,onViewRequest:a},`sub-chat-${v}`)),v++}if($===n.length-1&&((I=(N=k.response)==null?void 0:N.body)!=null&&I.content)){const z=k.response.body.content;Array.isArray(z)&&(f.push(w.jsx(Q.Fragment,{children:w.jsx(Rx,{style:{borderColor:"#2a2a2a",margin:"8px 0"},children:w.jsx(o2,{type:"secondary",className:wn.lastResponseLabel,children:Ce("ui.lastResponse")})})},"resp-divider")),k.entryTimestamp&&(p[k.entryTimestamp]=f.length),f.push(w.jsx(_o,{role:"assistant",content:z,timestamp:k.entryTimestamp,modelInfo:d,collapseToolResults:i,expandThinking:o,toolResultMap:{}},"resp-asst")))}});const{scrollToTimestamp:b}=this.props;return this._scrollTargetIdx=b&&p[b]!=null?p[b]:null,this._tsItemMap=p,f}_extractSuggestion(){var u;const{mainAgentSessions:n}=this.props;if(!(n!=null&&n.length))return null;const r=n[n.length-1],i=r==null?void 0:r.response;if(!i)return null;const o=i.body;if(!o)return null;const a=o.stop_reason;if(a!=="end_turn"&&a!=="max_tokens")return null;const c=o.content;if(!Array.isArray(c))return null;for(let d=c.length-1;d>=0;d--)if(c[d].type==="text"&&((u=c[d].text)!=null&&u.trim()))return c[d].text.trim();return null}_updateSuggestion(){const n=this._extractSuggestion();this.setState({inputSuggestion:n||null})}connectInputWs(){const r=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/terminal`;this._inputWs=new WebSocket(r),this._inputWs.onmessage=i=>{try{const o=JSON.parse(i.data);o.type==="data"?this._appendPtyData(o.data):o.type==="exit"&&this._clearPtyPrompt()}catch{}},this._inputWs.onclose=()=>{setTimeout(()=>{this.splitContainerRef.current&&this.props.cliMode&&this.connectInputWs()},2e3)}}_stripAnsi(n){return n.replace(/\x1b\[[0-9;]*[A-Za-z]/g,"").replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)/g,"").replace(/\x1b[^[\]](.|$)/g,"").replace(/[\x00-\x08\x0b\x0c\x0e-\x1f]/g,"")}_appendPtyData(n){const r=this._stripAnsi(n);this._ptyBuffer+=r,this._ptyBuffer.length>4096&&(this._ptyBuffer=this._ptyBuffer.slice(-4096)),this._ptyDebounceTimer&&clearTimeout(this._ptyDebounceTimer),this._ptyDebounceTimer=setTimeout(()=>this._detectPrompt(),200)}_detectPrompt(){const r=this._ptyBuffer.match(/([^\n]*\?)\s*\n((?:\s*[❯>]?\s*\d+\.\s+[^\n]+\n?){2,})$/);if(r){const i=r[1].trim(),a=r[2].match(/\s*([❯>])?\s*(\d+)\.\s+([^\n]+)/g);if(a){const c=a.map(f=>{const p=f.match(/\s*([❯>])?\s*(\d+)\.\s+(.+)/);return{number:parseInt(p[2],10),text:p[3].trim(),selected:!!p[1]}}),u=this.state.ptyPrompt,d={question:i,options:c};u&&u.question===i?this.setState({ptyPrompt:d}):(this.setState(f=>{const p=f.ptyPromptHistory.slice();if(f.ptyPrompt){const g=p[p.length-1];g&&g.status==="active"&&(p[p.length-1]={...g,status:"dismissed"})}return p.push({...d,status:"active",selectedNumber:null,timestamp:new Date().toISOString()}),{ptyPrompt:d,ptyPromptHistory:p}}),this.scrollToBottom());return}}this.state.ptyPrompt&&this.setState(i=>{const o=i.ptyPromptHistory.slice(),a=o[o.length-1];return a&&a.status==="active"&&(o[o.length-1]={...a,status:"dismissed"}),{ptyPrompt:null,ptyPromptHistory:o}})}_clearPtyPrompt(){this._ptyBuffer="",this._ptyDebounceTimer&&clearTimeout(this._ptyDebounceTimer),this.state.ptyPrompt&&this.setState({ptyPrompt:null})}render(){const{mainAgentSessions:n,cliMode:r,terminalVisible:i}=this.props,{allItems:o,visibleCount:a,loading:c,splitRatio:u}=this.state,d=!n||n.length===0;if(d&&!r)return w.jsx("div",{className:wn.centerEmpty,children:w.jsx(Ri,{description:Ce("ui.noChat")})});if(c&&!r)return w.jsx("div",{className:wn.centerEmpty,children:w.jsx(Oa,{size:"large"})});const f=this._scrollTargetIdx,{highlightTs:p,highlightFading:g}=this.state,v=p&&this._tsItemMap&&this._tsItemMap[p]!=null?this._tsItemMap[p]:null,b=o.slice(0,a),{pendingInput:_,stickyBottom:S,ptyPromptHistory:C}=this.state,E=r&&_?w.jsx(_o,{role:"user",text:_,timestamp:new Date().toISOString(),userProfile:this.props.userProfile},"pending-input"):null,k=S?null:w.jsxs("button",{className:wn.stickyBottomBtn,onClick:this.handleStickToBottom,children:[w.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:w.jsx("polyline",{points:"6 9 12 15 18 9"})}),Ce("ui.stickyBottom")]}),$=r&&C.length>0?C.map((T,O)=>{const N=T.status==="active",I=T.status==="answered";return w.jsxs("div",{className:`${wn.ptyPromptBubble}${N?"":" "+wn.ptyPromptResolved}`,children:[w.jsx("div",{className:wn.ptyPromptQuestion,children:T.question}),w.jsx("div",{className:wn.ptyPromptOptions,children:T.options.map(z=>{const A=I&&T.selectedNumber===z.number;let M=wn.ptyPromptOption;return N&&z.selected&&(M=wn.ptyPromptOptionPrimary),A&&(M=wn.ptyPromptOptionChosen),!N&&!A&&(M=wn.ptyPromptOptionDimmed),w.jsxs("button",{className:M,disabled:!N,onClick:N?()=>this.handlePromptOptionClick(z.number):void 0,children:[z.number,". ",z.text]},z.number)})})]},`pty-prompt-${O}`)}):null,P=d||c?w.jsxs("div",{className:wn.messageListWrap,children:[w.jsxs("div",{ref:this.containerRef,className:wn.container,children:[!r||c?w.jsx("div",{className:wn.centerEmpty,children:c?w.jsx(Oa,{size:"large"}):w.jsx(Ri,{description:Ce("ui.noChat")})}):null,E,$]}),k]}):w.jsxs("div",{className:wn.messageListWrap,children:[w.jsxs("div",{ref:this.containerRef,className:wn.container,children:[b.map((T,O)=>{const N=O===f,I=O===v;let z=T;return I&&(z=Q.cloneElement(z,{highlight:g?"fading":"active"})),N?w.jsx("div",{ref:this._scrollTargetRef,children:z},T.key+"-anchor"):z}),E,$]}),k]});return r?w.jsxs("div",{ref:this.splitContainerRef,className:wn.splitContainer,children:[w.jsxs("div",{className:wn.chatSection,style:i?{flex:u,minWidth:0}:{flex:1,minWidth:0},children:[P,!i&&w.jsxs("div",{className:wn.chatInputBar,children:[w.jsxs("div",{className:wn.chatInputWrapper,children:[w.jsxs("div",{className:wn.chatTextareaWrap,children:[w.jsx("textarea",{ref:this._inputRef,className:wn.chatTextarea,placeholder:this.state.inputSuggestion?"":Ce("ui.chatInput.placeholder"),rows:1,onKeyDown:this.handleInputKeyDown,onInput:this.handleInputChange}),this.state.inputSuggestion&&this.state.inputEmpty&&w.jsx("div",{className:wn.ghostText,children:this.state.inputSuggestion})]}),w.jsx("div",{className:wn.chatInputHint,children:this.state.inputSuggestion&&this.state.inputEmpty?Ce("ui.chatInput.hintTab"):Ce("ui.chatInput.hintEnter")})]}),w.jsx("button",{className:wn.chatSendBtn,onClick:this.handleInputSend,disabled:this.state.inputEmpty,title:Ce("ui.chatInput.send"),children:w.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),w.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),i&&this.state.inputSuggestion&&w.jsxs("div",{className:wn.suggestionChip,onClick:this.handleSuggestionToTerminal,children:[w.jsx("span",{className:wn.suggestionChipText,children:this.state.inputSuggestion}),w.jsx("span",{className:wn.suggestionChipAction,children:"↵"})]})]}),i&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:wn.vResizer,onMouseDown:this.handleSplitMouseDown}),w.jsx("div",{style:{flex:1-u,minWidth:200,display:"flex",flexDirection:"column"},children:w.jsx(_R,{})})]})]}):P}}const jQ="_resizer_yamj2_1",BQ={resizer:jQ};class LQ extends Q.Component{constructor(t){super(t),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this)}handleMouseDown(t){t.preventDefault(),document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}handleMouseMove(t){this.props.onResize&&this.props.onResize(t.clientX)}handleMouseUp(){document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)}componentWillUnmount(){document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)}render(){return w.jsx("div",{onMouseDown:this.handleMouseDown,className:BQ.resizer})}}const AQ="_layout_1hck6_1",DQ="_header_1hck6_6",HQ="_content_1hck6_14",FQ="_mainContainer_1hck6_19",WQ="_leftPanel_1hck6_24",VQ="_leftPanelHeader_1hck6_32",qQ="_leftPanelCount_1hck6_43",UQ="_leftPanelBody_1hck6_49",KQ="_rightPanel_1hck6_54",GQ="_modalActions_1hck6_60",XQ="_spinCenter_1hck6_64",YQ="_emptyCenter_1hck6_69",JQ="_logCheckbox_1hck6_75",QQ="_logListContainer_1hck6_79",ZQ="_logListItem_1hck6_85",eZ="_logItemRow_1hck6_91",tZ="_logFileName_1hck6_108",nZ="_logFileIcon_1hck6_121",rZ="_loadingOverlay_1hck6_127",iZ="_loadingText_1hck6_140",oZ="_footer_1hck6_146",sZ="_footerRight_1hck6_156",aZ="_footerText_1hck6_164",lZ="_footerLink_1hck6_169",cZ="_footerIcon_1hck6_181",uZ="_footerDivider_1hck6_186",dZ="_guideContainer_1hck6_194",hZ="_guideContent_1hck6_202",fZ="_guideTitle_1hck6_207",mZ="_guideStep_1hck6_214",pZ="_guideStepNum_1hck6_220",gZ="_guideStepBody_1hck6_235",vZ="_guideText_1hck6_240",yZ="_guideCode_1hck6_247",Ut={layout:AQ,header:DQ,content:HQ,mainContainer:FQ,leftPanel:WQ,leftPanelHeader:VQ,leftPanelCount:qQ,leftPanelBody:UQ,rightPanel:KQ,modalActions:GQ,spinCenter:XQ,emptyCenter:YQ,logCheckbox:JQ,logListContainer:QQ,logListItem:ZQ,logItemRow:eZ,logFileName:tZ,logFileIcon:nZ,loadingOverlay:rZ,loadingText:iZ,footer:oZ,footerRight:sZ,footerText:aZ,footerLink:lZ,footerIcon:cZ,footerDivider:uZ,guideContainer:dZ,guideContent:hZ,guideTitle:fZ,guideStep:mZ,guideStepNum:pZ,guideStepBody:gZ,guideText:vZ,guideCode:yZ};class bZ extends Q.Component{constructor(n){super(n);kt(this,"handleSelectRequest",n=>{this.setState({selectedIndex:n,scrollCenter:!1})});kt(this,"handleViewRequest",n=>{this.setState({viewMode:"raw",selectedIndex:n,scrollCenter:!0})});kt(this,"handleViewInChat",()=>{this.setState(n=>{const i=(n.showAll?n.requests:ls(n.requests))[n.selectedIndex];if(!i)return null;let o=null;if(Vr(i)&&i.timestamp)o=i.timestamp;else{if(Ia(i).type==="SubAgent"&&i.timestamp)o=i.timestamp;else{const c=n.requests.indexOf(i);c>=0&&(o=ew(n.requests,c))}o||Di.info(Ce("ui.cannotMap"))}return{viewMode:"chat",chatScrollToTs:o}})});kt(this,"handleToggleViewMode",()=>{this.setState(n=>{const r=n.viewMode==="raw"?"chat":"raw";if(r==="raw"){if(n.selectedIndex===null){const a=n.showAll?n.requests:ls(n.requests);return{viewMode:r,selectedIndex:a.length>0?a.length-1:null,scrollCenter:!0}}return{viewMode:r,scrollCenter:!0}}const i=n.showAll?n.requests:ls(n.requests),o=n.selectedIndex!=null?i[n.selectedIndex]:null;if(o){let a=null;if(Vr(o)&&o.timestamp)a=o.timestamp;else if(Ia(o).type==="SubAgent"&&o.timestamp)a=o.timestamp;else{const u=n.requests.indexOf(o);u>=0&&(a=ew(n.requests,u)),a||Di.info(Ce("ui.cannotMap"))}return{viewMode:r,chatScrollToTs:a}}return{viewMode:r,chatScrollToTs:null}})});kt(this,"handleLangChange",()=>{const n=Yl();this.setState({lang:n}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({lang:n})}).catch(()=>{})});kt(this,"handleCollapseToolResultsChange",n=>{this.setState({collapseToolResults:n}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({collapseToolResults:n})}).catch(()=>{})});kt(this,"handleExpandThinkingChange",n=>{this.setState({expandThinking:n}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expandThinking:n})}).catch(()=>{})});kt(this,"handleExpandDiffChange",n=>{this.setState({expandDiff:n}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expandDiff:n})}).catch(()=>{})});kt(this,"handleFilterIrrelevantChange",n=>{this.setState(r=>{const i=!n,o=i?r.requests:ls(r.requests);return{showAll:i,selectedIndex:o.length>0?o.length-1:null}}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filterIrrelevant:n})}).catch(()=>{})});kt(this,"handleTabChange",n=>{this.setState({currentTab:n})});kt(this,"handleResize",n=>{const r=this.mainContainerRef.current;if(!r)return;const i=r.getBoundingClientRect(),o=n-i.left;o>=250&&o<=800&&this.setState({leftPanelWidth:o})});kt(this,"handleImportLocalLogs",()=>{this.setState({importModalVisible:!0,localLogsLoading:!0}),fetch("/api/local-logs").then(n=>n.json()).then(n=>{const{_currentProject:r,...i}=n;this.setState({localLogs:i,currentProject:r||"",localLogsLoading:!1})}).catch(()=>{this.setState({localLogs:{},localLogsLoading:!1})})});kt(this,"handleCloseImportModal",()=>{this.setState({importModalVisible:!1,selectedLogs:new Set})});kt(this,"handleToggleLogSelect",(n,r)=>{this.setState(i=>{const o=new Set(i.selectedLogs);return r?o.add(n):o.delete(n),{selectedLogs:o}})});kt(this,"handleMergeLogs",()=>{const{selectedLogs:n,localLogs:r,currentProject:i}=this.state;if(n.size<2)return;const o=r[i];if(!o)return;const a=[];if(o.forEach((d,f)=>{n.has(d.file)&&a.push(f)}),a.sort((d,f)=>d-f),n.has(o[0].file)){Di.warning(Ce("ui.mergeLatestNotAllowed"));return}for(let d=1;d<a.length;d++)if(a[d]-a[d-1]!==1){Di.warning(Ce("ui.mergeNotConsecutive"));return}if(a.reduce((d,f)=>d+o[f].size,0)>500*1024*1024){Di.warning(Ce("ui.mergeTooLarge"));return}const u=a.map(d=>o[d].file).reverse();fetch("/api/merge-logs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:u})}).then(d=>d.json()).then(d=>{d.ok?(Di.success(Ce("ui.mergeSuccess")),this.setState({selectedLogs:new Set}),this.handleImportLocalLogs()):Di.error(d.error||"Merge failed")}).catch(()=>Di.error("Merge failed"))});kt(this,"handleOpenLogFile",n=>{const r=window.location.port||window.location.host.split(":")[1]||"7008";window.open(`${window.location.protocol}//${window.location.hostname}:${r}?logfile=${encodeURIComponent(n)}`,"_blank"),this.setState({importModalVisible:!1})});kt(this,"handleResumeChoice",n=>{fetch("/api/resume-choice",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({choice:n})}).catch(r=>console.error("resume-choice failed:",r))});kt(this,"handleLoadLocalJsonlFile",()=>{const n=document.createElement("input");n.type="file",n.accept=".jsonl",n.onchange=r=>{const i=r.target.files[0];if(!i)return;if(i.size>500*1024*1024){Di.error(Ce("ui.fileTooLarge"));return}this.setState({fileLoading:!0,fileLoadingCount:0});const o=new FileReader;o.onload=a=>{try{const u=a.target.result.split(`
608
- ---
609
- `).filter(d=>d.trim()).map(d=>{try{return JSON.parse(d)}catch{return null}}).filter(Boolean);if(u.length===0){Di.error(Ce("ui.noLogs")),this.setState({fileLoading:!1,fileLoadingCount:0});return}this.animateLoadingCount(u.length,()=>{let d=[];for(const p of u)Vr(p)&&p.body&&Array.isArray(p.body.messages)&&(d=this.mergeMainAgentSessions(d,p));const f=ls(u);this._isLocalLog=!0,this._localLogFile=i.name,this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.setState({requests:u,selectedIndex:f.length>0?f.length-1:null,mainAgentSessions:d,importModalVisible:!1,fileLoading:!1,fileLoadingCount:0})})}catch{Di.error(Ce("ui.noLogs")),this.setState({fileLoading:!1,fileLoadingCount:0})}},o.readAsText(i)},n.click()});const r=parseInt(localStorage.getItem("ccv_cacheExpireAt"),10)||null,i=localStorage.getItem("ccv_cacheType")||null,o=Date.now(),a=r&&r>o?r:null,c=a?i:null;this.state={requests:[],selectedIndex:null,viewMode:"raw",currentTab:"request",cacheExpireAt:a,cacheType:c,leftPanelWidth:380,mainAgentSessions:[],importModalVisible:!1,localLogs:{},localLogsLoading:!1,showAll:!1,lang:Yl(),userProfile:null,projectName:"",resumeModalVisible:!1,resumeFileName:"",collapseToolResults:!0,expandThinking:!0,expandDiff:!1,fileLoading:!1,fileLoadingCount:0,selectedLogs:new Set,githubStars:null,cliMode:!1,terminalVisible:!0},this.eventSource=null,this._autoSelectTimer=null,this.mainContainerRef=Q.createRef()}componentDidMount(){fetch("/api/preferences").then(i=>i.json()).then(i=>{i.lang&&(cb(i.lang),this.setState({lang:i.lang})),i.collapseToolResults!==void 0&&this.setState({collapseToolResults:!!i.collapseToolResults}),i.expandThinking!==void 0&&this.setState({expandThinking:!!i.expandThinking}),i.expandDiff!==void 0&&this.setState({expandDiff:!!i.expandDiff});const o=i.filterIrrelevant!==void 0?!!i.filterIrrelevant:!0;this.setState({showAll:!o})}).catch(()=>{}),fetch("/api/user-profile").then(i=>i.json()).then(i=>this.setState({userProfile:i})).catch(()=>{}),fetch("/api/project-name").then(i=>i.json()).then(i=>this.setState({projectName:i.projectName||""})).catch(()=>{}),fetch("https://api.github.com/repos/weiesky/cc-viewer").then(i=>i.json()).then(i=>{i.stargazers_count!=null&&this.setState({githubStars:i.stargazers_count})}).catch(()=>{}),fetch("/api/cli-mode").then(i=>i.json()).then(i=>{i.cliMode&&this.setState({cliMode:!0,viewMode:"chat"})}).catch(()=>{});const r=new URLSearchParams(window.location.search).get("logfile");r?this.loadLocalLogFile(r):this.initSSE()}componentWillUnmount(){this.eventSource&&this.eventSource.close(),this._autoSelectTimer&&clearTimeout(this._autoSelectTimer),this._loadingCountTimer&&cancelAnimationFrame(this._loadingCountTimer)}animateLoadingCount(n,r){const i=Math.min(800,Math.max(300,n*.5)),o=performance.now(),a=c=>{const u=Math.min((c-o)/i,1),d=Math.round(u*n);this.setState({fileLoadingCount:d}),u<1?this._loadingCountTimer=requestAnimationFrame(a):(this._loadingCountTimer=null,r())};this._loadingCountTimer=requestAnimationFrame(a)}initSSE(){this.setState({fileLoading:!0,fileLoadingCount:0});try{this.eventSource=new EventSource("/events"),this.eventSource.onmessage=n=>this.handleEventMessage(n),this.eventSource.addEventListener("resume_prompt",n=>{try{const r=JSON.parse(n.data);this.setState({resumeModalVisible:!0,resumeFileName:r.recentFileName||""})}catch{}}),this.eventSource.addEventListener("resume_resolved",()=>{this.setState({resumeModalVisible:!1,resumeFileName:""})}),this.eventSource.addEventListener("update_completed",n=>{try{const r=JSON.parse(n.data);this.setState({updateInfo:{type:"completed",version:r.version}})}catch{}}),this.eventSource.addEventListener("update_major_available",n=>{try{const r=JSON.parse(n.data);this.setState({updateInfo:{type:"major",version:r.version}})}catch{}}),this.eventSource.addEventListener("full_reload",n=>{try{const r=JSON.parse(n.data);if(Array.isArray(r)){this.assignMessageTimestamps(r);const i=this.buildSessionsFromEntries(r),o=ls(r);r.length>0?this.animateLoadingCount(r.length,()=>{this.setState({requests:r,selectedIndex:o.length>0?o.length-1:null,mainAgentSessions:i,fileLoading:!1,fileLoadingCount:0})}):this.setState({requests:r,selectedIndex:null,mainAgentSessions:i,fileLoading:!1,fileLoadingCount:0})}else this.setState({fileLoading:!1,fileLoadingCount:0})}catch{this.setState({fileLoading:!1,fileLoadingCount:0})}}),this.eventSource.onerror=()=>console.error("SSE连接错误")}catch(n){console.error("EventSource初始化失败:",n),this.setState({fileLoading:!1,fileLoadingCount:0})}}loadLocalLogFile(n){this._isLocalLog=!0,this._localLogFile=n,this.setState({fileLoading:!0,fileLoadingCount:0}),fetch(`/api/local-log?file=${encodeURIComponent(n)}`).then(r=>r.json()).then(r=>{Array.isArray(r)?this.animateLoadingCount(r.length,()=>{this.assignMessageTimestamps(r);const i=this.buildSessionsFromEntries(r),o=ls(r);this.setState({requests:r,selectedIndex:o.length>0?o.length-1:null,mainAgentSessions:i,fileLoading:!1,fileLoadingCount:0})}):this.setState({fileLoading:!1,fileLoadingCount:0})}).catch(r=>{console.error("加载日志文件失败:",r),this.setState({fileLoading:!1,fileLoadingCount:0})})}handleEventMessage(n){try{const r=JSON.parse(n.data);this.setState(i=>{var p,g;const o=[...i.requests],a=o.findIndex(v=>v.timestamp===r.timestamp&&v.url===r.url);a>=0?o[a]=r:o.push(r);let c=i.cacheExpireAt,u=i.cacheType;if(Vr(r)){const v=(g=(p=r.response)==null?void 0:p.body)==null?void 0:g.usage;if(v!=null&&v.cache_creation){const b=v.cache_creation,_=r.timestamp?new Date(r.timestamp).getTime():Date.now();let S=null,C=null;if(b.ephemeral_1h_input_tokens>0?(S=_+3600*1e3,C="1h"):b.ephemeral_5m_input_tokens>0&&(S=_+300*1e3,C="5m"),S&&S>Date.now()){c=S;const E=(v.cache_read_input_tokens||0)+(v.cache_creation_input_tokens||0);u=E>0?cr(E):C,localStorage.setItem("ccv_cacheExpireAt",String(c)),localStorage.setItem("ccv_cacheType",u)}}}let d=i.mainAgentSessions;if(Vr(r)&&r.body&&Array.isArray(r.body.messages)){const v=r.timestamp||new Date().toISOString(),b=d.length>0?d[d.length-1]:null,_=(b==null?void 0:b.messages)||[],S=r.body.messages,C=_.length,E=C>0&&S.length<C*.5&&C-S.length>4;for(let k=0;k<S.length;k++)!E&&k<C&&_[k]._timestamp?S[k]._timestamp=_[k]._timestamp:S[k]._timestamp||(S[k]._timestamp=v);d=this.mergeMainAgentSessions(i.mainAgentSessions,r)}return i.selectedIndex===null&&o.length>0&&(this._autoSelectTimer&&clearTimeout(this._autoSelectTimer),this._autoSelectTimer=setTimeout(()=>{this.setState(v=>{if(v.selectedIndex===null&&v.requests.length>0){const b=v.showAll?v.requests:ls(v.requests);return b.length>0?{selectedIndex:b.length-1}:null}return null})},200)),{requests:o,cacheExpireAt:c,cacheType:u,mainAgentSessions:d}})}catch(r){console.error("处理事件消息失败:",r)}}assignMessageTimestamps(n){var o;let r=[],i=null;for(const a of n){if(!Vr(a)||!a.body||!Array.isArray(a.body.messages))continue;const c=a.body.messages,u=c.length,d=((o=a.body.metadata)==null?void 0:o.user_id)||null,f=a.timestamp||new Date().toISOString(),p=r.length;p>0&&(u<p*.5&&p-u>4||i&&d&&d!==i)&&(r=[]);for(let v=r.length;v<u;v++)r.push(f);for(let v=0;v<u;v++)c[v]._timestamp=r[v];i=d}}buildSessionsFromEntries(n){let r=[];for(const i of n)Vr(i)&&i.body&&Array.isArray(i.body.messages)&&(r=this.mergeMainAgentSessions(r,i));return r}mergeMainAgentSessions(n,r){var p;const i=r.body.messages,o=r.response,a=((p=r.body.metadata)==null?void 0:p.user_id)||null,c=r.timestamp||null;if(n.length===0)return[{userId:a,messages:i,response:o,entryTimestamp:c}];const u=n[n.length-1],d=u.messages?u.messages.length:0,f=d>0&&i.length<d*.5&&d-i.length>4;if(a&&a===u.userId&&!f){const g=[...n];return g[g.length-1]={userId:a,messages:i,response:o,entryTimestamp:c},g}else return[...n,{userId:a,messages:i,response:o,entryTimestamp:c}]}formatTimestamp(n){return!n||n.length<15?n:`${n.slice(0,4)}-${n.slice(4,6)}-${n.slice(6,8)} ${n.slice(9,11)}:${n.slice(11,13)}:${n.slice(13,15)}`}formatSize(n){return n<1024?n+" B":n<1024*1024?(n/1024).toFixed(1)+" KB":(n/(1024*1024)).toFixed(1)+" MB"}render(){const{requests:n,selectedIndex:r,viewMode:i,currentTab:o,cacheExpireAt:a,cacheType:c,leftPanelWidth:u,mainAgentSessions:d,showAll:f,fileLoading:p,fileLoadingCount:g}=this.state,v=f?n:ls(n),b=r!==null?v[r]:null,_=/Android|iPhone|iPad|iPod|Mobile/i.test(navigator.userAgent);return this.state.cliMode&&_?w.jsxs("div",{style:{width:"100vw",height:"100vh",display:"flex",flexDirection:"column",background:"#000"},children:[w.jsxs("div",{style:{padding:"6px 12px",background:"#111",borderBottom:"1px solid #222",display:"flex",alignItems:"center",gap:6,flexShrink:0},children:[w.jsx(Dy,{status:"processing",color:"green"}),w.jsxs("span",{style:{fontSize:12,color:"#aaa"},children:[Ce("ui.liveMonitoring"),this.state.projectName?`: ${this.state.projectName}`:""]})]}),w.jsx(_R,{})]}):w.jsxs(Yo,{theme:{algorithm:cH.darkAlgorithm,token:{colorBgContainer:"#111",colorBgLayout:"#0a0a0a",colorBgElevated:"#1a1a1a",colorBorder:"#2a2a2a"}},children:[p&&w.jsx("div",{className:Ut.loadingOverlay,children:w.jsxs("div",{className:Ut.loadingText,children:["Loading...(",g,")"]})}),w.jsxs(Ks,{className:Ut.layout,children:[w.jsx(Ks.Header,{className:Ut.header,children:w.jsx(g0,{requestCount:v.length,requests:v,viewMode:i,cacheExpireAt:a,cacheType:c,onToggleViewMode:this.handleToggleViewMode,onLangChange:this.handleLangChange,onImportLocalLogs:this.handleImportLocalLogs,isLocalLog:!!this._isLocalLog,localLogFile:this._localLogFile,projectName:this.state.projectName,collapseToolResults:this.state.collapseToolResults,onCollapseToolResultsChange:this.handleCollapseToolResultsChange,expandThinking:this.state.expandThinking,onExpandThinkingChange:this.handleExpandThinkingChange,expandDiff:this.state.expandDiff,onExpandDiffChange:this.handleExpandDiffChange,filterIrrelevant:!this.state.showAll,onFilterIrrelevantChange:this.handleFilterIrrelevantChange,updateInfo:this.state.updateInfo,onDismissUpdate:()=>this.setState({updateInfo:null}),cliMode:this.state.cliMode,terminalVisible:this.state.terminalVisible,onToggleTerminal:()=>this.setState(S=>({terminalVisible:!S.terminalVisible}))})}),w.jsxs(Ks.Content,{className:Ut.content,children:[i==="raw"&&(v.length===0?w.jsx("div",{className:Ut.guideContainer,children:w.jsxs("div",{className:Ut.guideContent,children:[w.jsx("h2",{className:Ut.guideTitle,children:Ce("ui.guide.title")}),w.jsxs("div",{className:Ut.guideStep,children:[w.jsx("div",{className:Ut.guideStepNum,children:"1"}),w.jsxs("div",{className:Ut.guideStepBody,children:[w.jsx("p",{className:Ut.guideText,children:Ce("ui.guide.step1")}),w.jsx("code",{className:Ut.guideCode,children:Ce("ui.guide.exampleQuestion")})]})]}),w.jsxs("div",{className:Ut.guideStep,children:[w.jsx("div",{className:Ut.guideStepNum,children:"2"}),w.jsxs("div",{className:Ut.guideStepBody,children:[w.jsx("p",{className:Ut.guideText,children:Ce("ui.guide.step2")}),w.jsx("code",{className:Ut.guideCode,children:Ce("ui.guide.troubleshootCmd")})]})]}),w.jsxs("div",{className:Ut.guideStep,children:[w.jsx("div",{className:Ut.guideStepNum,children:"3"}),w.jsxs("div",{className:Ut.guideStepBody,children:[w.jsx("p",{className:Ut.guideText,children:Ce("ui.guide.step3")}),w.jsx("code",{className:Ut.guideCode,children:"npm install -g @anthropic-ai/claude-code"})]})]})]})}):w.jsxs("div",{ref:this.mainContainerRef,className:Ut.mainContainer,children:[w.jsxs("div",{className:Ut.leftPanel,style:{width:u},children:[w.jsxs("div",{className:Ut.leftPanelHeader,children:[w.jsx("span",{children:Ce("ui.requestList")}),w.jsx("span",{className:Ut.leftPanelCount,children:Ce("ui.totalRequests",{count:v.length})})]}),w.jsx("div",{className:Ut.leftPanelBody,children:w.jsx(oq,{requests:v,selectedIndex:r,scrollCenter:this.state.scrollCenter,onSelect:this.handleSelectRequest,onScrollDone:()=>this.setState({scrollCenter:!1})})})]}),w.jsx(LQ,{onResize:this.handleResize}),w.jsx("div",{className:Ut.rightPanel,children:w.jsx(hK,{request:b,requests:v,selectedIndex:r,currentTab:o,onTabChange:this.handleTabChange,onViewInChat:this.handleViewInChat,expandDiff:this.state.expandDiff})})]})),w.jsx("div",{style:{display:i==="chat"?"flex":"none",height:"100%",flexDirection:"column"},children:w.jsx(zQ,{requests:v,mainAgentSessions:d,userProfile:this.state.userProfile,collapseToolResults:this.state.collapseToolResults,expandThinking:this.state.expandThinking,onViewRequest:this.handleViewRequest,scrollToTimestamp:this.state.chatScrollToTs,onScrollTsDone:()=>this.setState({chatScrollToTs:null}),cliMode:this.state.cliMode,terminalVisible:this.state.terminalVisible})})]}),w.jsx("div",{className:Ut.footer,children:w.jsxs("div",{className:Ut.footerRight,children:[w.jsx("span",{className:Ut.footerText,children:Ce("ui.footer.starRequest")}),w.jsxs("a",{href:"https://github.com/weiesky/cc-viewer",target:"_blank",rel:"noopener noreferrer",className:Ut.footerLink,children:[w.jsx("svg",{className:Ut.footerIcon,viewBox:"0 0 16 16",fill:"currentColor",children:w.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})}),"GitHub",this.state.githubStars!=null?` ★ ${this.state.githubStars}`:""]}),w.jsx("span",{className:Ut.footerDivider,children:"|"}),w.jsx("a",{href:"dingtalk://dingtalkclient/action/sendmsg?dingtalk_id=sthk5es",className:Ut.footerLink,children:Ce("ui.footer.contact")})]})})]}),w.jsx(Ti,{title:Ce("ui.resume.title"),open:this.state.resumeModalVisible,closable:!1,maskClosable:!1,keyboard:!1,footer:[w.jsx(ur,{type:"primary",onClick:()=>this.handleResumeChoice("continue"),children:Ce("ui.resume.continue")},"continue"),w.jsx(ur,{onClick:()=>this.handleResumeChoice("new"),children:Ce("ui.resume.new")},"new")],children:w.jsx("p",{children:Ce("ui.resume.message",{file:this.state.resumeFileName})})}),w.jsxs(Ti,{title:Ce("ui.importLocalLogs"),open:this.state.importModalVisible,onCancel:this.handleCloseImportModal,footer:null,width:1e3,styles:{body:{maxHeight:"60vh",overflow:"auto"}},children:[w.jsxs("div",{className:Ut.modalActions,children:[w.jsx(ur,{icon:w.jsx(wF,{}),onClick:this.handleLoadLocalJsonlFile,children:Ce("ui.loadLocalJsonl")}),w.jsx(ur,{size:"small",type:this.state.selectedLogs.size>1?"primary":"default",disabled:this.state.selectedLogs.size<2,onClick:this.handleMergeLogs,style:{marginLeft:8},children:Ce("ui.mergeLogs")})]}),this.state.localLogsLoading?w.jsx("div",{className:Ut.spinCenter,children:w.jsx(Oa,{})}):(()=>{const S=this.state.localLogs[this.state.currentProject];return!S||S.length===0?w.jsx("div",{className:Ut.emptyCenter,children:Ce("ui.noLogs")}):w.jsx("div",{className:Ut.logListContainer,children:w.jsx(ku,{size:"small",dataSource:S,renderItem:C=>w.jsx(ku.Item,{className:Ut.logListItem,onClick:()=>{const E=!this.state.selectedLogs.has(C.file);this.handleToggleLogSelect(C.file,E)},children:w.jsxs("div",{className:Ut.logItemRow,children:[w.jsxs("span",{children:[w.jsx(eb,{className:Ut.logCheckbox,checked:this.state.selectedLogs.has(C.file)||!1,onClick:E=>E.stopPropagation(),onChange:E=>{E.stopPropagation(),this.handleToggleLogSelect(C.file,E.target.checked)}}),w.jsx(cu,{className:Ut.logFileIcon}),w.jsx("span",{className:Ut.logFileName,children:this.formatTimestamp(C.timestamp)})]}),w.jsxs("span",{children:[w.jsxs(Wi,{style:{background:"#0a0a0a",border:"1px solid #444",color:"#999"},children:[C.turns||0," ",Ce("ui.turns")]}),w.jsx(Wi,{style:{background:"#0a0a0a",border:"1px solid #444",color:"#999"},children:this.formatSize(C.size)}),w.jsx(ur,{size:"small",type:"primary",onClick:E=>{E.stopPropagation(),this.handleOpenLogFile(C.file)},children:Ce("ui.openLog")})]})]})})})})})()]})]})}}const _Z=sT.createRoot(document.getElementById("root"));_Z.render(w.jsx(bZ,{}));