@dsrcjs/ai-widget 0.0.0-stage → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +64 -0
- package/README.md +296 -2
- package/dist/ai-dana-chat.js +76 -0
- package/dist/avatar/model.d.ts +12 -0
- package/dist/drag.d.ts +44 -0
- package/dist/echarts-3nlHlFS7.js +18 -0
- package/dist/i18n.d.ts +288 -0
- package/dist/index-DizTRH1P.js +19 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.js +1 -0
- package/dist/markdown-impl-DUtQrIcL.js +34 -0
- package/dist/stream-entry-omwiGMtU.js +8 -0
- package/dist/theme.d.ts +82 -0
- package/package.json +36 -4
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var AiDanaChat=(function(dn){"use strict";var yse=Object.defineProperty;var xse=(dn,Ni,uo)=>Ni in dn?yse(dn,Ni,{enumerable:!0,configurable:!0,writable:!0,value:uo}):dn[Ni]=uo;var Rs=(dn,Ni,uo)=>xse(dn,typeof Ni!="symbol"?Ni+"":Ni,uo);function Ni(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function uo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mg={exports:{}},gu={},Lg={exports:{}},Qe={};var xk;function U3(){if(xk)return Qe;xk=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.iterator;function p(z){return z===null||typeof z!="object"?null:(z=d&&z[d]||z["@@iterator"],typeof z=="function"?z:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,y={};function x(z,W,F){this.props=z,this.context=W,this.refs=y,this.updater=F||v}x.prototype.isReactComponent={},x.prototype.setState=function(z,W){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,W,"setState")},x.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function b(){}b.prototype=x.prototype;function _(z,W,F){this.props=z,this.context=W,this.refs=y,this.updater=F||v}var S=_.prototype=new b;S.constructor=_,g(S,x.prototype),S.isPureReactComponent=!0;var T=Array.isArray,E=Object.prototype.hasOwnProperty,D={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};function R(z,W,F){var ee,ae={},ie=null,_e=null;if(W!=null)for(ee in W.ref!==void 0&&(_e=W.ref),W.key!==void 0&&(ie=""+W.key),W)E.call(W,ee)&&!L.hasOwnProperty(ee)&&(ae[ee]=W[ee]);var be=arguments.length-2;if(be===1)ae.children=F;else if(1<be){for(var xe=Array(be),Se=0;Se<be;Se++)xe[Se]=arguments[Se+2];ae.children=xe}if(z&&z.defaultProps)for(ee in be=z.defaultProps,be)ae[ee]===void 0&&(ae[ee]=be[ee]);return{$$typeof:e,type:z,key:ie,ref:_e,props:ae,_owner:D.current}}function O(z,W){return{$$typeof:e,type:z.type,key:W,ref:z.ref,props:z.props,_owner:z._owner}}function M(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function P(z){var W={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(F){return W[F]})}var j=/\/+/g;function B(z,W){return typeof z=="object"&&z!==null&&z.key!=null?P(""+z.key):W.toString(36)}function $(z,W,F,ee,ae){var ie=typeof z;(ie==="undefined"||ie==="boolean")&&(z=null);var _e=!1;if(z===null)_e=!0;else switch(ie){case"string":case"number":_e=!0;break;case"object":switch(z.$$typeof){case e:case t:_e=!0}}if(_e)return _e=z,ae=ae(_e),z=ee===""?"."+B(_e,0):ee,T(ae)?(F="",z!=null&&(F=z.replace(j,"$&/")+"/"),$(ae,W,F,"",function(Se){return Se})):ae!=null&&(M(ae)&&(ae=O(ae,F+(!ae.key||_e&&_e.key===ae.key?"":(""+ae.key).replace(j,"$&/")+"/")+z)),W.push(ae)),1;if(_e=0,ee=ee===""?".":ee+":",T(z))for(var be=0;be<z.length;be++){ie=z[be];var xe=ee+B(ie,be);_e+=$(ie,W,F,xe,ae)}else if(xe=p(z),typeof xe=="function")for(z=xe.call(z),be=0;!(ie=z.next()).done;)ie=ie.value,xe=ee+B(ie,be++),_e+=$(ie,W,F,xe,ae);else if(ie==="object")throw W=String(z),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.");return _e}function K(z,W,F){if(z==null)return z;var ee=[],ae=0;return $(z,ee,"","",function(ie){return W.call(F,ie,ae++)}),ee}function Z(z){if(z._status===-1){var W=z._result;W=W(),W.then(function(F){(z._status===0||z._status===-1)&&(z._status=1,z._result=F)},function(F){(z._status===0||z._status===-1)&&(z._status=2,z._result=F)}),z._status===-1&&(z._status=0,z._result=W)}if(z._status===1)return z._result.default;throw z._result}var re={current:null},Y={transition:null},G={ReactCurrentDispatcher:re,ReactCurrentBatchConfig:Y,ReactCurrentOwner:D};function I(){throw Error("act(...) is not supported in production builds of React.")}return Qe.Children={map:K,forEach:function(z,W,F){K(z,function(){W.apply(this,arguments)},F)},count:function(z){var W=0;return K(z,function(){W++}),W},toArray:function(z){return K(z,function(W){return W})||[]},only:function(z){if(!M(z))throw Error("React.Children.only expected to receive a single React element child.");return z}},Qe.Component=x,Qe.Fragment=r,Qe.Profiler=i,Qe.PureComponent=_,Qe.StrictMode=n,Qe.Suspense=l,Qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,Qe.act=I,Qe.cloneElement=function(z,W,F){if(z==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+z+".");var ee=g({},z.props),ae=z.key,ie=z.ref,_e=z._owner;if(W!=null){if(W.ref!==void 0&&(ie=W.ref,_e=D.current),W.key!==void 0&&(ae=""+W.key),z.type&&z.type.defaultProps)var be=z.type.defaultProps;for(xe in W)E.call(W,xe)&&!L.hasOwnProperty(xe)&&(ee[xe]=W[xe]===void 0&&be!==void 0?be[xe]:W[xe])}var xe=arguments.length-2;if(xe===1)ee.children=F;else if(1<xe){be=Array(xe);for(var Se=0;Se<xe;Se++)be[Se]=arguments[Se+2];ee.children=be}return{$$typeof:e,type:z.type,key:ae,ref:ie,props:ee,_owner:_e}},Qe.createContext=function(z){return z={$$typeof:o,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},z.Provider={$$typeof:a,_context:z},z.Consumer=z},Qe.createElement=R,Qe.createFactory=function(z){var W=R.bind(null,z);return W.type=z,W},Qe.createRef=function(){return{current:null}},Qe.forwardRef=function(z){return{$$typeof:s,render:z}},Qe.isValidElement=M,Qe.lazy=function(z){return{$$typeof:f,_payload:{_status:-1,_result:z},_init:Z}},Qe.memo=function(z,W){return{$$typeof:u,type:z,compare:W===void 0?null:W}},Qe.startTransition=function(z){var W=Y.transition;Y.transition={};try{z()}finally{Y.transition=W}},Qe.unstable_act=I,Qe.useCallback=function(z,W){return re.current.useCallback(z,W)},Qe.useContext=function(z){return re.current.useContext(z)},Qe.useDebugValue=function(){},Qe.useDeferredValue=function(z){return re.current.useDeferredValue(z)},Qe.useEffect=function(z,W){return re.current.useEffect(z,W)},Qe.useId=function(){return re.current.useId()},Qe.useImperativeHandle=function(z,W,F){return re.current.useImperativeHandle(z,W,F)},Qe.useInsertionEffect=function(z,W){return re.current.useInsertionEffect(z,W)},Qe.useLayoutEffect=function(z,W){return re.current.useLayoutEffect(z,W)},Qe.useMemo=function(z,W){return re.current.useMemo(z,W)},Qe.useReducer=function(z,W,F){return re.current.useReducer(z,W,F)},Qe.useRef=function(z){return re.current.useRef(z)},Qe.useState=function(z){return re.current.useState(z)},Qe.useSyncExternalStore=function(z,W,F){return re.current.useSyncExternalStore(z,W,F)},Qe.useTransition=function(){return re.current.useTransition()},Qe.version="18.3.1",Qe}var bk;function Ig(){return bk||(bk=1,Lg.exports=U3()),Lg.exports}var wk;function $3(){if(wk)return gu;wk=1;var e=Ig(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,l,u){var f,d={},p=null,v=null;u!==void 0&&(p=""+u),l.key!==void 0&&(p=""+l.key),l.ref!==void 0&&(v=l.ref);for(f in l)n.call(l,f)&&!a.hasOwnProperty(f)&&(d[f]=l[f]);if(s&&s.defaultProps)for(f in l=s.defaultProps,l)d[f]===void 0&&(d[f]=l[f]);return{$$typeof:t,type:s,key:p,ref:v,props:d,_owner:i.current}}return gu.Fragment=r,gu.jsx=o,gu.jsxs=o,gu}var _k;function G3(){return _k||(_k=1,Mg.exports=$3()),Mg.exports}var k=G3(),H=Ig();const W3=Ni({__proto__:null,default:uo(H)},[H]);var Xf={},Pg={exports:{}},Ir={},Ng={exports:{}},Rg={};var kk;function Y3(){return kk||(kk=1,(function(e){function t(Y,G){var I=Y.length;Y.push(G);e:for(;0<I;){var z=I-1>>>1,W=Y[z];if(0<i(W,G))Y[z]=G,Y[I]=W,I=z;else break e}}function r(Y){return Y.length===0?null:Y[0]}function n(Y){if(Y.length===0)return null;var G=Y[0],I=Y.pop();if(I!==G){Y[0]=I;e:for(var z=0,W=Y.length,F=W>>>1;z<F;){var ee=2*(z+1)-1,ae=Y[ee],ie=ee+1,_e=Y[ie];if(0>i(ae,I))ie<W&&0>i(_e,ae)?(Y[z]=_e,Y[ie]=I,z=ie):(Y[z]=ae,Y[ee]=I,z=ee);else if(ie<W&&0>i(_e,I))Y[z]=_e,Y[ie]=I,z=ie;else break e}}return G}function i(Y,G){var I=Y.sortIndex-G.sortIndex;return I!==0?I:Y.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],f=1,d=null,p=3,v=!1,g=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(Y){for(var G=r(u);G!==null;){if(G.callback===null)n(u);else if(G.startTime<=Y)n(u),G.sortIndex=G.expirationTime,t(l,G);else break;G=r(u)}}function T(Y){if(y=!1,S(Y),!g)if(r(l)!==null)g=!0,Z(E);else{var G=r(u);G!==null&&re(T,G.startTime-Y)}}function E(Y,G){g=!1,y&&(y=!1,b(R),R=-1),v=!0;var I=p;try{for(S(G),d=r(l);d!==null&&(!(d.expirationTime>G)||Y&&!P());){var z=d.callback;if(typeof z=="function"){d.callback=null,p=d.priorityLevel;var W=z(d.expirationTime<=G);G=e.unstable_now(),typeof W=="function"?d.callback=W:d===r(l)&&n(l),S(G)}else n(l);d=r(l)}if(d!==null)var F=!0;else{var ee=r(u);ee!==null&&re(T,ee.startTime-G),F=!1}return F}finally{d=null,p=I,v=!1}}var D=!1,L=null,R=-1,O=5,M=-1;function P(){return!(e.unstable_now()-M<O)}function j(){if(L!==null){var Y=e.unstable_now();M=Y;var G=!0;try{G=L(!0,Y)}finally{G?B():(D=!1,L=null)}}else D=!1}var B;if(typeof _=="function")B=function(){_(j)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,K=$.port2;$.port1.onmessage=j,B=function(){K.postMessage(null)}}else B=function(){x(j,0)};function Z(Y){L=Y,D||(D=!0,B())}function re(Y,G){R=x(function(){Y(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(Y){Y.callback=null},e.unstable_continueExecution=function(){g||v||(g=!0,Z(E))},e.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<Y?Math.floor(1e3/Y):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(Y){switch(p){case 1:case 2:case 3:var G=3;break;default:G=p}var I=p;p=G;try{return Y()}finally{p=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Y,G){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var I=p;p=Y;try{return G()}finally{p=I}},e.unstable_scheduleCallback=function(Y,G,I){var z=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?z+I:z):I=z,Y){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=I+W,Y={id:f++,callback:G,priorityLevel:Y,startTime:I,expirationTime:W,sortIndex:-1},I>z?(Y.sortIndex=I,t(u,Y),r(l)===null&&Y===r(u)&&(y?(b(R),R=-1):y=!0,re(T,I-z))):(Y.sortIndex=W,t(l,Y),g||v||(g=!0,Z(E))),Y},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(Y){var G=p;return function(){var I=p;p=G;try{return Y.apply(this,arguments)}finally{p=I}}}})(Rg)),Rg}var Sk;function X3(){return Sk||(Sk=1,Ng.exports=Y3()),Ng.exports}var Ck;function q3(){if(Ck)return Ir;Ck=1;var e=Ig(),t=X3();function r(c){for(var h="https://reactjs.org/docs/error-decoder.html?invariant="+c,m=1;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m]);return"Minified React error #"+c+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function a(c,h){o(c,h),o(c+"Capture",h)}function o(c,h){for(i[c]=h,c=0;c<h.length;c++)n.add(h[c])}var s=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},d={};function p(c){return l.call(d,c)?!0:l.call(f,c)?!1:u.test(c)?d[c]=!0:(f[c]=!0,!1)}function v(c,h,m,w){if(m!==null&&m.type===0)return!1;switch(typeof h){case"function":case"symbol":return!0;case"boolean":return w?!1:m!==null?!m.acceptsBooleans:(c=c.toLowerCase().slice(0,5),c!=="data-"&&c!=="aria-");default:return!1}}function g(c,h,m,w){if(h===null||typeof h>"u"||v(c,h,m,w))return!0;if(w)return!1;if(m!==null)switch(m.type){case 3:return!h;case 4:return h===!1;case 5:return isNaN(h);case 6:return isNaN(h)||1>h}return!1}function y(c,h,m,w,C,A,N){this.acceptsBooleans=h===2||h===3||h===4,this.attributeName=w,this.attributeNamespace=C,this.mustUseProperty=m,this.propertyName=c,this.type=h,this.sanitizeURL=A,this.removeEmptyString=N}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(c){x[c]=new y(c,0,!1,c,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(c){var h=c[0];x[h]=new y(h,1,!1,c[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(c){x[c]=new y(c,2,!1,c.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(c){x[c]=new y(c,2,!1,c,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(c){x[c]=new y(c,3,!1,c.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(c){x[c]=new y(c,3,!0,c,null,!1,!1)}),["capture","download"].forEach(function(c){x[c]=new y(c,4,!1,c,null,!1,!1)}),["cols","rows","size","span"].forEach(function(c){x[c]=new y(c,6,!1,c,null,!1,!1)}),["rowSpan","start"].forEach(function(c){x[c]=new y(c,5,!1,c.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function _(c){return c[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(c){var h=c.replace(b,_);x[h]=new y(h,1,!1,c,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(c){var h=c.replace(b,_);x[h]=new y(h,1,!1,c,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(c){var h=c.replace(b,_);x[h]=new y(h,1,!1,c,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(c){x[c]=new y(c,1,!1,c.toLowerCase(),null,!1,!1)}),x.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(c){x[c]=new y(c,1,!1,c.toLowerCase(),null,!0,!0)});function S(c,h,m,w){var C=x.hasOwnProperty(h)?x[h]:null;(C!==null?C.type!==0:w||!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(g(h,m,C,w)&&(m=null),w||C===null?p(h)&&(m===null?c.removeAttribute(h):c.setAttribute(h,""+m)):C.mustUseProperty?c[C.propertyName]=m===null?C.type===3?!1:"":m:(h=C.attributeName,w=C.attributeNamespace,m===null?c.removeAttribute(h):(C=C.type,m=C===3||C===4&&m===!0?"":""+m,w?c.setAttributeNS(w,h,m):c.setAttribute(h,m))))}var T=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=Symbol.for("react.element"),D=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),P=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),re=Symbol.for("react.offscreen"),Y=Symbol.iterator;function G(c){return c===null||typeof c!="object"?null:(c=Y&&c[Y]||c["@@iterator"],typeof c=="function"?c:null)}var I=Object.assign,z;function W(c){if(z===void 0)try{throw Error()}catch(m){var h=m.stack.trim().match(/\n( *(at )?)/);z=h&&h[1]||""}return`
|
|
2
|
+
`+z+c}var F=!1;function ee(c,h){if(!c||F)return"";F=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(h)if(h=function(){throw Error()},Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(te){var w=te}Reflect.construct(c,[],h)}else{try{h.call()}catch(te){w=te}c.call(h.prototype)}else{try{throw Error()}catch(te){w=te}c()}}catch(te){if(te&&w&&typeof te.stack=="string"){for(var C=te.stack.split(`
|
|
3
|
+
`),A=w.stack.split(`
|
|
4
|
+
`),N=C.length-1,V=A.length-1;1<=N&&0<=V&&C[N]!==A[V];)V--;for(;1<=N&&0<=V;N--,V--)if(C[N]!==A[V]){if(N!==1||V!==1)do if(N--,V--,0>V||C[N]!==A[V]){var X=`
|
|
5
|
+
`+C[N].replace(" at new "," at ");return c.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",c.displayName)),X}while(1<=N&&0<=V);break}}}finally{F=!1,Error.prepareStackTrace=m}return(c=c?c.displayName||c.name:"")?W(c):""}function ae(c){switch(c.tag){case 5:return W(c.type);case 16:return W("Lazy");case 13:return W("Suspense");case 19:return W("SuspenseList");case 0:case 2:case 15:return c=ee(c.type,!1),c;case 11:return c=ee(c.type.render,!1),c;case 1:return c=ee(c.type,!0),c;default:return""}}function ie(c){if(c==null)return null;if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case L:return"Fragment";case D:return"Portal";case O:return"Profiler";case R:return"StrictMode";case B:return"Suspense";case $:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case P:return(c.displayName||"Context")+".Consumer";case M:return(c._context.displayName||"Context")+".Provider";case j:var h=c.render;return c=c.displayName,c||(c=h.displayName||h.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case K:return h=c.displayName||null,h!==null?h:ie(c.type)||"Memo";case Z:h=c._payload,c=c._init;try{return ie(c(h))}catch{}}return null}function _e(c){var h=c.type;switch(c.tag){case 24:return"Cache";case 9:return(h.displayName||"Context")+".Consumer";case 10:return(h._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return c=h.render,c=c.displayName||c.name||"",h.displayName||(c!==""?"ForwardRef("+c+")":"ForwardRef");case 7:return"Fragment";case 5:return h;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ie(h);case 8:return h===R?"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 h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h}return null}function be(c){switch(typeof c){case"boolean":case"number":case"string":case"undefined":return c;case"object":return c;default:return""}}function xe(c){var h=c.type;return(c=c.nodeName)&&c.toLowerCase()==="input"&&(h==="checkbox"||h==="radio")}function Se(c){var h=xe(c)?"checked":"value",m=Object.getOwnPropertyDescriptor(c.constructor.prototype,h),w=""+c[h];if(!c.hasOwnProperty(h)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var C=m.get,A=m.set;return Object.defineProperty(c,h,{configurable:!0,get:function(){return C.call(this)},set:function(N){w=""+N,A.call(this,N)}}),Object.defineProperty(c,h,{enumerable:m.enumerable}),{getValue:function(){return w},setValue:function(N){w=""+N},stopTracking:function(){c._valueTracker=null,delete c[h]}}}}function Le(c){c._valueTracker||(c._valueTracker=Se(c))}function Xe(c){if(!c)return!1;var h=c._valueTracker;if(!h)return!0;var m=h.getValue(),w="";return c&&(w=xe(c)?c.checked?"true":"false":c.value),c=w,c!==m?(h.setValue(c),!0):!1}function nr(c){if(c=c||(typeof document<"u"?document:void 0),typeof c>"u")return null;try{return c.activeElement||c.body}catch{return c.body}}function Tt(c,h){var m=h.checked;return I({},h,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:m??c._wrapperState.initialChecked})}function nn(c,h){var m=h.defaultValue==null?"":h.defaultValue,w=h.checked!=null?h.checked:h.defaultChecked;m=be(h.value!=null?h.value:m),c._wrapperState={initialChecked:w,initialValue:m,controlled:h.type==="checkbox"||h.type==="radio"?h.checked!=null:h.value!=null}}function Dr(c,h){h=h.checked,h!=null&&S(c,"checked",h,!1)}function Ur(c,h){Dr(c,h);var m=be(h.value),w=h.type;if(m!=null)w==="number"?(m===0&&c.value===""||c.value!=m)&&(c.value=""+m):c.value!==""+m&&(c.value=""+m);else if(w==="submit"||w==="reset"){c.removeAttribute("value");return}h.hasOwnProperty("value")?Nn(c,h.type,m):h.hasOwnProperty("defaultValue")&&Nn(c,h.type,be(h.defaultValue)),h.checked==null&&h.defaultChecked!=null&&(c.defaultChecked=!!h.defaultChecked)}function xs(c,h,m){if(h.hasOwnProperty("value")||h.hasOwnProperty("defaultValue")){var w=h.type;if(!(w!=="submit"&&w!=="reset"||h.value!==void 0&&h.value!==null))return;h=""+c._wrapperState.initialValue,m||h===c.value||(c.value=h),c.defaultValue=h}m=c.name,m!==""&&(c.name=""),c.defaultChecked=!!c._wrapperState.initialChecked,m!==""&&(c.name=m)}function Nn(c,h,m){(h!=="number"||nr(c.ownerDocument)!==c)&&(m==null?c.defaultValue=""+c._wrapperState.initialValue:c.defaultValue!==""+m&&(c.defaultValue=""+m))}var Ei=Array.isArray;function an(c,h,m,w){if(c=c.options,h){h={};for(var C=0;C<m.length;C++)h["$"+m[C]]=!0;for(m=0;m<c.length;m++)C=h.hasOwnProperty("$"+c[m].value),c[m].selected!==C&&(c[m].selected=C),C&&w&&(c[m].defaultSelected=!0)}else{for(m=""+be(m),h=null,C=0;C<c.length;C++){if(c[C].value===m){c[C].selected=!0,w&&(c[C].defaultSelected=!0);return}h!==null||c[C].disabled||(h=c[C])}h!==null&&(h.selected=!0)}}function Ji(c,h){if(h.dangerouslySetInnerHTML!=null)throw Error(r(91));return I({},h,{value:void 0,defaultValue:void 0,children:""+c._wrapperState.initialValue})}function xv(c,h){var m=h.value;if(m==null){if(m=h.children,h=h.defaultValue,m!=null){if(h!=null)throw Error(r(92));if(Ei(m)){if(1<m.length)throw Error(r(93));m=m[0]}h=m}h==null&&(h=""),m=h}c._wrapperState={initialValue:be(m)}}function bv(c,h){var m=be(h.value),w=be(h.defaultValue);m!=null&&(m=""+m,m!==c.value&&(c.value=m),h.defaultValue==null&&c.defaultValue!==m&&(c.defaultValue=m)),w!=null&&(c.defaultValue=""+w)}function wv(c){var h=c.textContent;h===c._wrapperState.initialValue&&h!==""&&h!==null&&(c.value=h)}function _v(c){switch(c){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 ne(c,h){return c==null||c==="http://www.w3.org/1999/xhtml"?_v(h):c==="http://www.w3.org/2000/svg"&&h==="foreignObject"?"http://www.w3.org/1999/xhtml":c}var de,He=(function(c){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(h,m,w,C){MSApp.execUnsafeLocalFunction(function(){return c(h,m,w,C)})}:c})(function(c,h){if(c.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in c)c.innerHTML=h;else{for(de=de||document.createElement("div"),de.innerHTML="<svg>"+h.valueOf().toString()+"</svg>",h=de.firstChild;c.firstChild;)c.removeChild(c.firstChild);for(;h.firstChild;)c.appendChild(h.firstChild)}});function Ue(c,h){if(h){var m=c.firstChild;if(m&&m===c.lastChild&&m.nodeType===3){m.nodeValue=h;return}}c.textContent=h}var Vt={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},mt=["Webkit","ms","Moz","O"];Object.keys(Vt).forEach(function(c){mt.forEach(function(h){h=h+c.charAt(0).toUpperCase()+c.substring(1),Vt[h]=Vt[c]})});function ir(c,h,m){return h==null||typeof h=="boolean"||h===""?"":m||typeof h!="number"||h===0||Vt.hasOwnProperty(c)&&Vt[c]?(""+h).trim():h+"px"}function on(c,h){c=c.style;for(var m in h)if(h.hasOwnProperty(m)){var w=m.indexOf("--")===0,C=ir(m,h[m],w);m==="float"&&(m="cssFloat"),w?c.setProperty(m,C):c[m]=C}}var bs=I({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 ea(c,h){if(h){if(bs[c]&&(h.children!=null||h.dangerouslySetInnerHTML!=null))throw Error(r(137,c));if(h.dangerouslySetInnerHTML!=null){if(h.children!=null)throw Error(r(60));if(typeof h.dangerouslySetInnerHTML!="object"||!("__html"in h.dangerouslySetInnerHTML))throw Error(r(61))}if(h.style!=null&&typeof h.style!="object")throw Error(r(62))}}function ta(c,h){if(c.indexOf("-")===-1)return typeof h.is=="string";switch(c){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 Yl=null;function ws(c){return c=c.target||c.srcElement||window,c.correspondingUseElement&&(c=c.correspondingUseElement),c.nodeType===3?c.parentNode:c}var ar=null,sn=null,gr=null;function o5(c){if(c=Pf(c)){if(typeof ar!="function")throw Error(r(280));var h=c.stateNode;h&&(h=Gv(h),ar(c.stateNode,c.type,h))}}function s5(c){sn?gr?gr.push(c):gr=[c]:sn=c}function l5(){if(sn){var c=sn,h=gr;if(gr=sn=null,o5(c),h)for(c=0;c<h.length;c++)o5(h[c])}}function u5(c,h){return c(h)}function c5(){}var Ow=!1;function f5(c,h,m){if(Ow)return c(h,m);Ow=!0;try{return u5(c,h,m)}finally{Ow=!1,(sn!==null||gr!==null)&&(c5(),l5())}}function df(c,h){var m=c.stateNode;if(m===null)return null;var w=Gv(m);if(w===null)return null;m=w[h];e:switch(h){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(w=!w.disabled)||(c=c.type,w=!(c==="button"||c==="input"||c==="select"||c==="textarea")),c=!w;break e;default:c=!1}if(c)return null;if(m&&typeof m!="function")throw Error(r(231,h,typeof m));return m}var zw=!1;if(s)try{var hf={};Object.defineProperty(hf,"passive",{get:function(){zw=!0}}),window.addEventListener("test",hf,hf),window.removeEventListener("test",hf,hf)}catch{zw=!1}function Sae(c,h,m,w,C,A,N,V,X){var te=Array.prototype.slice.call(arguments,3);try{h.apply(m,te)}catch(se){this.onError(se)}}var pf=!1,kv=null,Sv=!1,Fw=null,Cae={onError:function(c){pf=!0,kv=c}};function Tae(c,h,m,w,C,A,N,V,X){pf=!1,kv=null,Sae.apply(Cae,arguments)}function Aae(c,h,m,w,C,A,N,V,X){if(Tae.apply(this,arguments),pf){if(pf){var te=kv;pf=!1,kv=null}else throw Error(r(198));Sv||(Sv=!0,Fw=te)}}function _s(c){var h=c,m=c;if(c.alternate)for(;h.return;)h=h.return;else{c=h;do h=c,(h.flags&4098)!==0&&(m=h.return),c=h.return;while(c)}return h.tag===3?m:null}function d5(c){if(c.tag===13){var h=c.memoizedState;if(h===null&&(c=c.alternate,c!==null&&(h=c.memoizedState)),h!==null)return h.dehydrated}return null}function h5(c){if(_s(c)!==c)throw Error(r(188))}function Eae(c){var h=c.alternate;if(!h){if(h=_s(c),h===null)throw Error(r(188));return h!==c?null:c}for(var m=c,w=h;;){var C=m.return;if(C===null)break;var A=C.alternate;if(A===null){if(w=C.return,w!==null){m=w;continue}break}if(C.child===A.child){for(A=C.child;A;){if(A===m)return h5(C),c;if(A===w)return h5(C),h;A=A.sibling}throw Error(r(188))}if(m.return!==w.return)m=C,w=A;else{for(var N=!1,V=C.child;V;){if(V===m){N=!0,m=C,w=A;break}if(V===w){N=!0,w=C,m=A;break}V=V.sibling}if(!N){for(V=A.child;V;){if(V===m){N=!0,m=A,w=C;break}if(V===w){N=!0,w=A,m=C;break}V=V.sibling}if(!N)throw Error(r(189))}}if(m.alternate!==w)throw Error(r(190))}if(m.tag!==3)throw Error(r(188));return m.stateNode.current===m?c:h}function p5(c){return c=Eae(c),c!==null?v5(c):null}function v5(c){if(c.tag===5||c.tag===6)return c;for(c=c.child;c!==null;){var h=v5(c);if(h!==null)return h;c=c.sibling}return null}var g5=t.unstable_scheduleCallback,m5=t.unstable_cancelCallback,Dae=t.unstable_shouldYield,Mae=t.unstable_requestPaint,Ot=t.unstable_now,Lae=t.unstable_getCurrentPriorityLevel,Bw=t.unstable_ImmediatePriority,y5=t.unstable_UserBlockingPriority,Cv=t.unstable_NormalPriority,Iae=t.unstable_LowPriority,x5=t.unstable_IdlePriority,Tv=null,Di=null;function Pae(c){if(Di&&typeof Di.onCommitFiberRoot=="function")try{Di.onCommitFiberRoot(Tv,c,void 0,(c.current.flags&128)===128)}catch{}}var ri=Math.clz32?Math.clz32:Oae,Nae=Math.log,Rae=Math.LN2;function Oae(c){return c>>>=0,c===0?32:31-(Nae(c)/Rae|0)|0}var Av=64,Ev=4194304;function vf(c){switch(c&-c){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 c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function Dv(c,h){var m=c.pendingLanes;if(m===0)return 0;var w=0,C=c.suspendedLanes,A=c.pingedLanes,N=m&268435455;if(N!==0){var V=N&~C;V!==0?w=vf(V):(A&=N,A!==0&&(w=vf(A)))}else N=m&~C,N!==0?w=vf(N):A!==0&&(w=vf(A));if(w===0)return 0;if(h!==0&&h!==w&&(h&C)===0&&(C=w&-w,A=h&-h,C>=A||C===16&&(A&4194240)!==0))return h;if((w&4)!==0&&(w|=m&16),h=c.entangledLanes,h!==0)for(c=c.entanglements,h&=w;0<h;)m=31-ri(h),C=1<<m,w|=c[m],h&=~C;return w}function zae(c,h){switch(c){case 1:case 2:case 4:return h+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 h+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 Fae(c,h){for(var m=c.suspendedLanes,w=c.pingedLanes,C=c.expirationTimes,A=c.pendingLanes;0<A;){var N=31-ri(A),V=1<<N,X=C[N];X===-1?((V&m)===0||(V&w)!==0)&&(C[N]=zae(V,h)):X<=h&&(c.expiredLanes|=V),A&=~V}}function jw(c){return c=c.pendingLanes&-1073741825,c!==0?c:c&1073741824?1073741824:0}function b5(){var c=Av;return Av<<=1,(Av&4194240)===0&&(Av=64),c}function Hw(c){for(var h=[],m=0;31>m;m++)h.push(c);return h}function gf(c,h,m){c.pendingLanes|=h,h!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,h=31-ri(h),c[h]=m}function Bae(c,h){var m=c.pendingLanes&~h;c.pendingLanes=h,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=h,c.mutableReadLanes&=h,c.entangledLanes&=h,h=c.entanglements;var w=c.eventTimes;for(c=c.expirationTimes;0<m;){var C=31-ri(m),A=1<<C;h[C]=0,w[C]=-1,c[C]=-1,m&=~A}}function Vw(c,h){var m=c.entangledLanes|=h;for(c=c.entanglements;m;){var w=31-ri(m),C=1<<w;C&h|c[w]&h&&(c[w]|=h),m&=~C}}var ht=0;function w5(c){return c&=-c,1<c?4<c?(c&268435455)!==0?16:536870912:4:1}var _5,Uw,k5,S5,C5,$w=!1,Mv=[],$a=null,Ga=null,Wa=null,mf=new Map,yf=new Map,Ya=[],jae="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 T5(c,h){switch(c){case"focusin":case"focusout":$a=null;break;case"dragenter":case"dragleave":Ga=null;break;case"mouseover":case"mouseout":Wa=null;break;case"pointerover":case"pointerout":mf.delete(h.pointerId);break;case"gotpointercapture":case"lostpointercapture":yf.delete(h.pointerId)}}function xf(c,h,m,w,C,A){return c===null||c.nativeEvent!==A?(c={blockedOn:h,domEventName:m,eventSystemFlags:w,nativeEvent:A,targetContainers:[C]},h!==null&&(h=Pf(h),h!==null&&Uw(h)),c):(c.eventSystemFlags|=w,h=c.targetContainers,C!==null&&h.indexOf(C)===-1&&h.push(C),c)}function Hae(c,h,m,w,C){switch(h){case"focusin":return $a=xf($a,c,h,m,w,C),!0;case"dragenter":return Ga=xf(Ga,c,h,m,w,C),!0;case"mouseover":return Wa=xf(Wa,c,h,m,w,C),!0;case"pointerover":var A=C.pointerId;return mf.set(A,xf(mf.get(A)||null,c,h,m,w,C)),!0;case"gotpointercapture":return A=C.pointerId,yf.set(A,xf(yf.get(A)||null,c,h,m,w,C)),!0}return!1}function A5(c){var h=ks(c.target);if(h!==null){var m=_s(h);if(m!==null){if(h=m.tag,h===13){if(h=d5(m),h!==null){c.blockedOn=h,C5(c.priority,function(){k5(m)});return}}else if(h===3&&m.stateNode.current.memoizedState.isDehydrated){c.blockedOn=m.tag===3?m.stateNode.containerInfo:null;return}}}c.blockedOn=null}function Lv(c){if(c.blockedOn!==null)return!1;for(var h=c.targetContainers;0<h.length;){var m=Ww(c.domEventName,c.eventSystemFlags,h[0],c.nativeEvent);if(m===null){m=c.nativeEvent;var w=new m.constructor(m.type,m);Yl=w,m.target.dispatchEvent(w),Yl=null}else return h=Pf(m),h!==null&&Uw(h),c.blockedOn=m,!1;h.shift()}return!0}function E5(c,h,m){Lv(c)&&m.delete(h)}function Vae(){$w=!1,$a!==null&&Lv($a)&&($a=null),Ga!==null&&Lv(Ga)&&(Ga=null),Wa!==null&&Lv(Wa)&&(Wa=null),mf.forEach(E5),yf.forEach(E5)}function bf(c,h){c.blockedOn===h&&(c.blockedOn=null,$w||($w=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Vae)))}function wf(c){function h(C){return bf(C,c)}if(0<Mv.length){bf(Mv[0],c);for(var m=1;m<Mv.length;m++){var w=Mv[m];w.blockedOn===c&&(w.blockedOn=null)}}for($a!==null&&bf($a,c),Ga!==null&&bf(Ga,c),Wa!==null&&bf(Wa,c),mf.forEach(h),yf.forEach(h),m=0;m<Ya.length;m++)w=Ya[m],w.blockedOn===c&&(w.blockedOn=null);for(;0<Ya.length&&(m=Ya[0],m.blockedOn===null);)A5(m),m.blockedOn===null&&Ya.shift()}var Xl=T.ReactCurrentBatchConfig,Iv=!0;function Uae(c,h,m,w){var C=ht,A=Xl.transition;Xl.transition=null;try{ht=1,Gw(c,h,m,w)}finally{ht=C,Xl.transition=A}}function $ae(c,h,m,w){var C=ht,A=Xl.transition;Xl.transition=null;try{ht=4,Gw(c,h,m,w)}finally{ht=C,Xl.transition=A}}function Gw(c,h,m,w){if(Iv){var C=Ww(c,h,m,w);if(C===null)u_(c,h,w,Pv,m),T5(c,w);else if(Hae(C,c,h,m,w))w.stopPropagation();else if(T5(c,w),h&4&&-1<jae.indexOf(c)){for(;C!==null;){var A=Pf(C);if(A!==null&&_5(A),A=Ww(c,h,m,w),A===null&&u_(c,h,w,Pv,m),A===C)break;C=A}C!==null&&w.stopPropagation()}else u_(c,h,w,null,m)}}var Pv=null;function Ww(c,h,m,w){if(Pv=null,c=ws(w),c=ks(c),c!==null)if(h=_s(c),h===null)c=null;else if(m=h.tag,m===13){if(c=d5(h),c!==null)return c;c=null}else if(m===3){if(h.stateNode.current.memoizedState.isDehydrated)return h.tag===3?h.stateNode.containerInfo:null;c=null}else h!==c&&(c=null);return Pv=c,null}function D5(c){switch(c){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(Lae()){case Bw:return 1;case y5:return 4;case Cv:case Iae:return 16;case x5:return 536870912;default:return 16}default:return 16}}var Xa=null,Yw=null,Nv=null;function M5(){if(Nv)return Nv;var c,h=Yw,m=h.length,w,C="value"in Xa?Xa.value:Xa.textContent,A=C.length;for(c=0;c<m&&h[c]===C[c];c++);var N=m-c;for(w=1;w<=N&&h[m-w]===C[A-w];w++);return Nv=C.slice(c,1<w?1-w:void 0)}function Rv(c){var h=c.keyCode;return"charCode"in c?(c=c.charCode,c===0&&h===13&&(c=13)):c=h,c===10&&(c=13),32<=c||c===13?c:0}function Ov(){return!0}function L5(){return!1}function ln(c){function h(m,w,C,A,N){this._reactName=m,this._targetInst=C,this.type=w,this.nativeEvent=A,this.target=N,this.currentTarget=null;for(var V in c)c.hasOwnProperty(V)&&(m=c[V],this[V]=m?m(A):A[V]);return this.isDefaultPrevented=(A.defaultPrevented!=null?A.defaultPrevented:A.returnValue===!1)?Ov:L5,this.isPropagationStopped=L5,this}return I(h.prototype,{preventDefault:function(){this.defaultPrevented=!0;var m=this.nativeEvent;m&&(m.preventDefault?m.preventDefault():typeof m.returnValue!="unknown"&&(m.returnValue=!1),this.isDefaultPrevented=Ov)},stopPropagation:function(){var m=this.nativeEvent;m&&(m.stopPropagation?m.stopPropagation():typeof m.cancelBubble!="unknown"&&(m.cancelBubble=!0),this.isPropagationStopped=Ov)},persist:function(){},isPersistent:Ov}),h}var ql={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(c){return c.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xw=ln(ql),_f=I({},ql,{view:0,detail:0}),Gae=ln(_f),qw,Kw,kf,zv=I({},_f,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qw,button:0,buttons:0,relatedTarget:function(c){return c.relatedTarget===void 0?c.fromElement===c.srcElement?c.toElement:c.fromElement:c.relatedTarget},movementX:function(c){return"movementX"in c?c.movementX:(c!==kf&&(kf&&c.type==="mousemove"?(qw=c.screenX-kf.screenX,Kw=c.screenY-kf.screenY):Kw=qw=0,kf=c),qw)},movementY:function(c){return"movementY"in c?c.movementY:Kw}}),I5=ln(zv),Wae=I({},zv,{dataTransfer:0}),Yae=ln(Wae),Xae=I({},_f,{relatedTarget:0}),Zw=ln(Xae),qae=I({},ql,{animationName:0,elapsedTime:0,pseudoElement:0}),Kae=ln(qae),Zae=I({},ql,{clipboardData:function(c){return"clipboardData"in c?c.clipboardData:window.clipboardData}}),Qae=ln(Zae),Jae=I({},ql,{data:0}),P5=ln(Jae),eoe={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},toe={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"},roe={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function noe(c){var h=this.nativeEvent;return h.getModifierState?h.getModifierState(c):(c=roe[c])?!!h[c]:!1}function Qw(){return noe}var ioe=I({},_f,{key:function(c){if(c.key){var h=eoe[c.key]||c.key;if(h!=="Unidentified")return h}return c.type==="keypress"?(c=Rv(c),c===13?"Enter":String.fromCharCode(c)):c.type==="keydown"||c.type==="keyup"?toe[c.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qw,charCode:function(c){return c.type==="keypress"?Rv(c):0},keyCode:function(c){return c.type==="keydown"||c.type==="keyup"?c.keyCode:0},which:function(c){return c.type==="keypress"?Rv(c):c.type==="keydown"||c.type==="keyup"?c.keyCode:0}}),aoe=ln(ioe),ooe=I({},zv,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),N5=ln(ooe),soe=I({},_f,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qw}),loe=ln(soe),uoe=I({},ql,{propertyName:0,elapsedTime:0,pseudoElement:0}),coe=ln(uoe),foe=I({},zv,{deltaX:function(c){return"deltaX"in c?c.deltaX:"wheelDeltaX"in c?-c.wheelDeltaX:0},deltaY:function(c){return"deltaY"in c?c.deltaY:"wheelDeltaY"in c?-c.wheelDeltaY:"wheelDelta"in c?-c.wheelDelta:0},deltaZ:0,deltaMode:0}),doe=ln(foe),hoe=[9,13,27,32],Jw=s&&"CompositionEvent"in window,Sf=null;s&&"documentMode"in document&&(Sf=document.documentMode);var poe=s&&"TextEvent"in window&&!Sf,R5=s&&(!Jw||Sf&&8<Sf&&11>=Sf),O5=" ",z5=!1;function F5(c,h){switch(c){case"keyup":return hoe.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function B5(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var Kl=!1;function voe(c,h){switch(c){case"compositionend":return B5(h);case"keypress":return h.which!==32?null:(z5=!0,O5);case"textInput":return c=h.data,c===O5&&z5?null:c;default:return null}}function goe(c,h){if(Kl)return c==="compositionend"||!Jw&&F5(c,h)?(c=M5(),Nv=Yw=Xa=null,Kl=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1<h.char.length)return h.char;if(h.which)return String.fromCharCode(h.which)}return null;case"compositionend":return R5&&h.locale!=="ko"?null:h.data;default:return null}}var moe={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 j5(c){var h=c&&c.nodeName&&c.nodeName.toLowerCase();return h==="input"?!!moe[c.type]:h==="textarea"}function H5(c,h,m,w){s5(w),h=Vv(h,"onChange"),0<h.length&&(m=new Xw("onChange","change",null,m,w),c.push({event:m,listeners:h}))}var Cf=null,Tf=null;function yoe(c){aO(c,0)}function Fv(c){var h=tu(c);if(Xe(h))return c}function xoe(c,h){if(c==="change")return h}var V5=!1;if(s){var e_;if(s){var t_="oninput"in document;if(!t_){var U5=document.createElement("div");U5.setAttribute("oninput","return;"),t_=typeof U5.oninput=="function"}e_=t_}else e_=!1;V5=e_&&(!document.documentMode||9<document.documentMode)}function $5(){Cf&&(Cf.detachEvent("onpropertychange",G5),Tf=Cf=null)}function G5(c){if(c.propertyName==="value"&&Fv(Tf)){var h=[];H5(h,Tf,c,ws(c)),f5(yoe,h)}}function boe(c,h,m){c==="focusin"?($5(),Cf=h,Tf=m,Cf.attachEvent("onpropertychange",G5)):c==="focusout"&&$5()}function woe(c){if(c==="selectionchange"||c==="keyup"||c==="keydown")return Fv(Tf)}function _oe(c,h){if(c==="click")return Fv(h)}function koe(c,h){if(c==="input"||c==="change")return Fv(h)}function Soe(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}var ni=typeof Object.is=="function"?Object.is:Soe;function Af(c,h){if(ni(c,h))return!0;if(typeof c!="object"||c===null||typeof h!="object"||h===null)return!1;var m=Object.keys(c),w=Object.keys(h);if(m.length!==w.length)return!1;for(w=0;w<m.length;w++){var C=m[w];if(!l.call(h,C)||!ni(c[C],h[C]))return!1}return!0}function W5(c){for(;c&&c.firstChild;)c=c.firstChild;return c}function Y5(c,h){var m=W5(c);c=0;for(var w;m;){if(m.nodeType===3){if(w=c+m.textContent.length,c<=h&&w>=h)return{node:m,offset:h-c};c=w}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=W5(m)}}function X5(c,h){return c&&h?c===h?!0:c&&c.nodeType===3?!1:h&&h.nodeType===3?X5(c,h.parentNode):"contains"in c?c.contains(h):c.compareDocumentPosition?!!(c.compareDocumentPosition(h)&16):!1:!1}function q5(){for(var c=window,h=nr();h instanceof c.HTMLIFrameElement;){try{var m=typeof h.contentWindow.location.href=="string"}catch{m=!1}if(m)c=h.contentWindow;else break;h=nr(c.document)}return h}function r_(c){var h=c&&c.nodeName&&c.nodeName.toLowerCase();return h&&(h==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||h==="textarea"||c.contentEditable==="true")}function Coe(c){var h=q5(),m=c.focusedElem,w=c.selectionRange;if(h!==m&&m&&m.ownerDocument&&X5(m.ownerDocument.documentElement,m)){if(w!==null&&r_(m)){if(h=w.start,c=w.end,c===void 0&&(c=h),"selectionStart"in m)m.selectionStart=h,m.selectionEnd=Math.min(c,m.value.length);else if(c=(h=m.ownerDocument||document)&&h.defaultView||window,c.getSelection){c=c.getSelection();var C=m.textContent.length,A=Math.min(w.start,C);w=w.end===void 0?A:Math.min(w.end,C),!c.extend&&A>w&&(C=w,w=A,A=C),C=Y5(m,A);var N=Y5(m,w);C&&N&&(c.rangeCount!==1||c.anchorNode!==C.node||c.anchorOffset!==C.offset||c.focusNode!==N.node||c.focusOffset!==N.offset)&&(h=h.createRange(),h.setStart(C.node,C.offset),c.removeAllRanges(),A>w?(c.addRange(h),c.extend(N.node,N.offset)):(h.setEnd(N.node,N.offset),c.addRange(h)))}}for(h=[],c=m;c=c.parentNode;)c.nodeType===1&&h.push({element:c,left:c.scrollLeft,top:c.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<h.length;m++)c=h[m],c.element.scrollLeft=c.left,c.element.scrollTop=c.top}}var Toe=s&&"documentMode"in document&&11>=document.documentMode,Zl=null,n_=null,Ef=null,i_=!1;function K5(c,h,m){var w=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;i_||Zl==null||Zl!==nr(w)||(w=Zl,"selectionStart"in w&&r_(w)?w={start:w.selectionStart,end:w.selectionEnd}:(w=(w.ownerDocument&&w.ownerDocument.defaultView||window).getSelection(),w={anchorNode:w.anchorNode,anchorOffset:w.anchorOffset,focusNode:w.focusNode,focusOffset:w.focusOffset}),Ef&&Af(Ef,w)||(Ef=w,w=Vv(n_,"onSelect"),0<w.length&&(h=new Xw("onSelect","select",null,h,m),c.push({event:h,listeners:w}),h.target=Zl)))}function Bv(c,h){var m={};return m[c.toLowerCase()]=h.toLowerCase(),m["Webkit"+c]="webkit"+h,m["Moz"+c]="moz"+h,m}var Ql={animationend:Bv("Animation","AnimationEnd"),animationiteration:Bv("Animation","AnimationIteration"),animationstart:Bv("Animation","AnimationStart"),transitionend:Bv("Transition","TransitionEnd")},a_={},Z5={};s&&(Z5=document.createElement("div").style,"AnimationEvent"in window||(delete Ql.animationend.animation,delete Ql.animationiteration.animation,delete Ql.animationstart.animation),"TransitionEvent"in window||delete Ql.transitionend.transition);function jv(c){if(a_[c])return a_[c];if(!Ql[c])return c;var h=Ql[c],m;for(m in h)if(h.hasOwnProperty(m)&&m in Z5)return a_[c]=h[m];return c}var Q5=jv("animationend"),J5=jv("animationiteration"),eO=jv("animationstart"),tO=jv("transitionend"),rO=new Map,nO="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 qa(c,h){rO.set(c,h),a(h,[c])}for(var o_=0;o_<nO.length;o_++){var s_=nO[o_],Aoe=s_.toLowerCase(),Eoe=s_[0].toUpperCase()+s_.slice(1);qa(Aoe,"on"+Eoe)}qa(Q5,"onAnimationEnd"),qa(J5,"onAnimationIteration"),qa(eO,"onAnimationStart"),qa("dblclick","onDoubleClick"),qa("focusin","onFocus"),qa("focusout","onBlur"),qa(tO,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Df="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(" "),Doe=new Set("cancel close invalid load scroll toggle".split(" ").concat(Df));function iO(c,h,m){var w=c.type||"unknown-event";c.currentTarget=m,Aae(w,h,void 0,c),c.currentTarget=null}function aO(c,h){h=(h&4)!==0;for(var m=0;m<c.length;m++){var w=c[m],C=w.event;w=w.listeners;e:{var A=void 0;if(h)for(var N=w.length-1;0<=N;N--){var V=w[N],X=V.instance,te=V.currentTarget;if(V=V.listener,X!==A&&C.isPropagationStopped())break e;iO(C,V,te),A=X}else for(N=0;N<w.length;N++){if(V=w[N],X=V.instance,te=V.currentTarget,V=V.listener,X!==A&&C.isPropagationStopped())break e;iO(C,V,te),A=X}}}if(Sv)throw c=Fw,Sv=!1,Fw=null,c}function St(c,h){var m=h[v_];m===void 0&&(m=h[v_]=new Set);var w=c+"__bubble";m.has(w)||(oO(h,c,2,!1),m.add(w))}function l_(c,h,m){var w=0;h&&(w|=4),oO(m,c,w,h)}var Hv="_reactListening"+Math.random().toString(36).slice(2);function Mf(c){if(!c[Hv]){c[Hv]=!0,n.forEach(function(m){m!=="selectionchange"&&(Doe.has(m)||l_(m,!1,c),l_(m,!0,c))});var h=c.nodeType===9?c:c.ownerDocument;h===null||h[Hv]||(h[Hv]=!0,l_("selectionchange",!1,h))}}function oO(c,h,m,w){switch(D5(h)){case 1:var C=Uae;break;case 4:C=$ae;break;default:C=Gw}m=C.bind(null,h,m,c),C=void 0,!zw||h!=="touchstart"&&h!=="touchmove"&&h!=="wheel"||(C=!0),w?C!==void 0?c.addEventListener(h,m,{capture:!0,passive:C}):c.addEventListener(h,m,!0):C!==void 0?c.addEventListener(h,m,{passive:C}):c.addEventListener(h,m,!1)}function u_(c,h,m,w,C){var A=w;if((h&1)===0&&(h&2)===0&&w!==null)e:for(;;){if(w===null)return;var N=w.tag;if(N===3||N===4){var V=w.stateNode.containerInfo;if(V===C||V.nodeType===8&&V.parentNode===C)break;if(N===4)for(N=w.return;N!==null;){var X=N.tag;if((X===3||X===4)&&(X=N.stateNode.containerInfo,X===C||X.nodeType===8&&X.parentNode===C))return;N=N.return}for(;V!==null;){if(N=ks(V),N===null)return;if(X=N.tag,X===5||X===6){w=A=N;continue e}V=V.parentNode}}w=w.return}f5(function(){var te=A,se=ws(m),le=[];e:{var oe=rO.get(c);if(oe!==void 0){var me=Xw,ke=c;switch(c){case"keypress":if(Rv(m)===0)break e;case"keydown":case"keyup":me=aoe;break;case"focusin":ke="focus",me=Zw;break;case"focusout":ke="blur",me=Zw;break;case"beforeblur":case"afterblur":me=Zw;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":me=I5;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=Yae;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=loe;break;case Q5:case J5:case eO:me=Kae;break;case tO:me=coe;break;case"scroll":me=Gae;break;case"wheel":me=doe;break;case"copy":case"cut":case"paste":me=Qae;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=N5}var Ce=(h&4)!==0,zt=!Ce&&c==="scroll",Q=Ce?oe!==null?oe+"Capture":null:oe;Ce=[];for(var q=te,J;q!==null;){J=q;var fe=J.stateNode;if(J.tag===5&&fe!==null&&(J=fe,Q!==null&&(fe=df(q,Q),fe!=null&&Ce.push(Lf(q,fe,J)))),zt)break;q=q.return}0<Ce.length&&(oe=new me(oe,ke,null,m,se),le.push({event:oe,listeners:Ce}))}}if((h&7)===0){e:{if(oe=c==="mouseover"||c==="pointerover",me=c==="mouseout"||c==="pointerout",oe&&m!==Yl&&(ke=m.relatedTarget||m.fromElement)&&(ks(ke)||ke[ra]))break e;if((me||oe)&&(oe=se.window===se?se:(oe=se.ownerDocument)?oe.defaultView||oe.parentWindow:window,me?(ke=m.relatedTarget||m.toElement,me=te,ke=ke?ks(ke):null,ke!==null&&(zt=_s(ke),ke!==zt||ke.tag!==5&&ke.tag!==6)&&(ke=null)):(me=null,ke=te),me!==ke)){if(Ce=I5,fe="onMouseLeave",Q="onMouseEnter",q="mouse",(c==="pointerout"||c==="pointerover")&&(Ce=N5,fe="onPointerLeave",Q="onPointerEnter",q="pointer"),zt=me==null?oe:tu(me),J=ke==null?oe:tu(ke),oe=new Ce(fe,q+"leave",me,m,se),oe.target=zt,oe.relatedTarget=J,fe=null,ks(se)===te&&(Ce=new Ce(Q,q+"enter",ke,m,se),Ce.target=J,Ce.relatedTarget=zt,fe=Ce),zt=fe,me&&ke)t:{for(Ce=me,Q=ke,q=0,J=Ce;J;J=Jl(J))q++;for(J=0,fe=Q;fe;fe=Jl(fe))J++;for(;0<q-J;)Ce=Jl(Ce),q--;for(;0<J-q;)Q=Jl(Q),J--;for(;q--;){if(Ce===Q||Q!==null&&Ce===Q.alternate)break t;Ce=Jl(Ce),Q=Jl(Q)}Ce=null}else Ce=null;me!==null&&sO(le,oe,me,Ce,!1),ke!==null&&zt!==null&&sO(le,zt,ke,Ce,!0)}}e:{if(oe=te?tu(te):window,me=oe.nodeName&&oe.nodeName.toLowerCase(),me==="select"||me==="input"&&oe.type==="file")var Te=xoe;else if(j5(oe))if(V5)Te=koe;else{Te=woe;var Re=boe}else(me=oe.nodeName)&&me.toLowerCase()==="input"&&(oe.type==="checkbox"||oe.type==="radio")&&(Te=_oe);if(Te&&(Te=Te(c,te))){H5(le,Te,m,se);break e}Re&&Re(c,oe,te),c==="focusout"&&(Re=oe._wrapperState)&&Re.controlled&&oe.type==="number"&&Nn(oe,"number",oe.value)}switch(Re=te?tu(te):window,c){case"focusin":(j5(Re)||Re.contentEditable==="true")&&(Zl=Re,n_=te,Ef=null);break;case"focusout":Ef=n_=Zl=null;break;case"mousedown":i_=!0;break;case"contextmenu":case"mouseup":case"dragend":i_=!1,K5(le,m,se);break;case"selectionchange":if(Toe)break;case"keydown":case"keyup":K5(le,m,se)}var Oe;if(Jw)e:{switch(c){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else Kl?F5(c,m)&&(Ve="onCompositionEnd"):c==="keydown"&&m.keyCode===229&&(Ve="onCompositionStart");Ve&&(R5&&m.locale!=="ko"&&(Kl||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&Kl&&(Oe=M5()):(Xa=se,Yw="value"in Xa?Xa.value:Xa.textContent,Kl=!0)),Re=Vv(te,Ve),0<Re.length&&(Ve=new P5(Ve,c,null,m,se),le.push({event:Ve,listeners:Re}),Oe?Ve.data=Oe:(Oe=B5(m),Oe!==null&&(Ve.data=Oe)))),(Oe=poe?voe(c,m):goe(c,m))&&(te=Vv(te,"onBeforeInput"),0<te.length&&(se=new P5("onBeforeInput","beforeinput",null,m,se),le.push({event:se,listeners:te}),se.data=Oe))}aO(le,h)})}function Lf(c,h,m){return{instance:c,listener:h,currentTarget:m}}function Vv(c,h){for(var m=h+"Capture",w=[];c!==null;){var C=c,A=C.stateNode;C.tag===5&&A!==null&&(C=A,A=df(c,m),A!=null&&w.unshift(Lf(c,A,C)),A=df(c,h),A!=null&&w.push(Lf(c,A,C))),c=c.return}return w}function Jl(c){if(c===null)return null;do c=c.return;while(c&&c.tag!==5);return c||null}function sO(c,h,m,w,C){for(var A=h._reactName,N=[];m!==null&&m!==w;){var V=m,X=V.alternate,te=V.stateNode;if(X!==null&&X===w)break;V.tag===5&&te!==null&&(V=te,C?(X=df(m,A),X!=null&&N.unshift(Lf(m,X,V))):C||(X=df(m,A),X!=null&&N.push(Lf(m,X,V)))),m=m.return}N.length!==0&&c.push({event:h,listeners:N})}var Moe=/\r\n?/g,Loe=/\u0000|\uFFFD/g;function lO(c){return(typeof c=="string"?c:""+c).replace(Moe,`
|
|
6
|
+
`).replace(Loe,"")}function Uv(c,h,m){if(h=lO(h),lO(c)!==h&&m)throw Error(r(425))}function $v(){}var c_=null,f_=null;function d_(c,h){return c==="textarea"||c==="noscript"||typeof h.children=="string"||typeof h.children=="number"||typeof h.dangerouslySetInnerHTML=="object"&&h.dangerouslySetInnerHTML!==null&&h.dangerouslySetInnerHTML.__html!=null}var h_=typeof setTimeout=="function"?setTimeout:void 0,Ioe=typeof clearTimeout=="function"?clearTimeout:void 0,uO=typeof Promise=="function"?Promise:void 0,Poe=typeof queueMicrotask=="function"?queueMicrotask:typeof uO<"u"?function(c){return uO.resolve(null).then(c).catch(Noe)}:h_;function Noe(c){setTimeout(function(){throw c})}function p_(c,h){var m=h,w=0;do{var C=m.nextSibling;if(c.removeChild(m),C&&C.nodeType===8)if(m=C.data,m==="/$"){if(w===0){c.removeChild(C),wf(h);return}w--}else m!=="$"&&m!=="$?"&&m!=="$!"||w++;m=C}while(m);wf(h)}function Ka(c){for(;c!=null;c=c.nextSibling){var h=c.nodeType;if(h===1||h===3)break;if(h===8){if(h=c.data,h==="$"||h==="$!"||h==="$?")break;if(h==="/$")return null}}return c}function cO(c){c=c.previousSibling;for(var h=0;c;){if(c.nodeType===8){var m=c.data;if(m==="$"||m==="$!"||m==="$?"){if(h===0)return c;h--}else m==="/$"&&h++}c=c.previousSibling}return null}var eu=Math.random().toString(36).slice(2),Mi="__reactFiber$"+eu,If="__reactProps$"+eu,ra="__reactContainer$"+eu,v_="__reactEvents$"+eu,Roe="__reactListeners$"+eu,Ooe="__reactHandles$"+eu;function ks(c){var h=c[Mi];if(h)return h;for(var m=c.parentNode;m;){if(h=m[ra]||m[Mi]){if(m=h.alternate,h.child!==null||m!==null&&m.child!==null)for(c=cO(c);c!==null;){if(m=c[Mi])return m;c=cO(c)}return h}c=m,m=c.parentNode}return null}function Pf(c){return c=c[Mi]||c[ra],!c||c.tag!==5&&c.tag!==6&&c.tag!==13&&c.tag!==3?null:c}function tu(c){if(c.tag===5||c.tag===6)return c.stateNode;throw Error(r(33))}function Gv(c){return c[If]||null}var g_=[],ru=-1;function Za(c){return{current:c}}function Ct(c){0>ru||(c.current=g_[ru],g_[ru]=null,ru--)}function wt(c,h){ru++,g_[ru]=c.current,c.current=h}var Qa={},mr=Za(Qa),$r=Za(!1),Ss=Qa;function nu(c,h){var m=c.type.contextTypes;if(!m)return Qa;var w=c.stateNode;if(w&&w.__reactInternalMemoizedUnmaskedChildContext===h)return w.__reactInternalMemoizedMaskedChildContext;var C={},A;for(A in m)C[A]=h[A];return w&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=h,c.__reactInternalMemoizedMaskedChildContext=C),C}function Gr(c){return c=c.childContextTypes,c!=null}function Wv(){Ct($r),Ct(mr)}function fO(c,h,m){if(mr.current!==Qa)throw Error(r(168));wt(mr,h),wt($r,m)}function dO(c,h,m){var w=c.stateNode;if(h=h.childContextTypes,typeof w.getChildContext!="function")return m;w=w.getChildContext();for(var C in w)if(!(C in h))throw Error(r(108,_e(c)||"Unknown",C));return I({},m,w)}function Yv(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||Qa,Ss=mr.current,wt(mr,c),wt($r,$r.current),!0}function hO(c,h,m){var w=c.stateNode;if(!w)throw Error(r(169));m?(c=dO(c,h,Ss),w.__reactInternalMemoizedMergedChildContext=c,Ct($r),Ct(mr),wt(mr,c)):Ct($r),wt($r,m)}var na=null,Xv=!1,m_=!1;function pO(c){na===null?na=[c]:na.push(c)}function zoe(c){Xv=!0,pO(c)}function Ja(){if(!m_&&na!==null){m_=!0;var c=0,h=ht;try{var m=na;for(ht=1;c<m.length;c++){var w=m[c];do w=w(!0);while(w!==null)}na=null,Xv=!1}catch(C){throw na!==null&&(na=na.slice(c+1)),g5(Bw,Ja),C}finally{ht=h,m_=!1}}return null}var iu=[],au=0,qv=null,Kv=0,Rn=[],On=0,Cs=null,ia=1,aa="";function Ts(c,h){iu[au++]=Kv,iu[au++]=qv,qv=c,Kv=h}function vO(c,h,m){Rn[On++]=ia,Rn[On++]=aa,Rn[On++]=Cs,Cs=c;var w=ia;c=aa;var C=32-ri(w)-1;w&=~(1<<C),m+=1;var A=32-ri(h)+C;if(30<A){var N=C-C%5;A=(w&(1<<N)-1).toString(32),w>>=N,C-=N,ia=1<<32-ri(h)+C|m<<C|w,aa=A+c}else ia=1<<A|m<<C|w,aa=c}function y_(c){c.return!==null&&(Ts(c,1),vO(c,1,0))}function x_(c){for(;c===qv;)qv=iu[--au],iu[au]=null,Kv=iu[--au],iu[au]=null;for(;c===Cs;)Cs=Rn[--On],Rn[On]=null,aa=Rn[--On],Rn[On]=null,ia=Rn[--On],Rn[On]=null}var un=null,cn=null,At=!1,ii=null;function gO(c,h){var m=jn(5,null,null,0);m.elementType="DELETED",m.stateNode=h,m.return=c,h=c.deletions,h===null?(c.deletions=[m],c.flags|=16):h.push(m)}function mO(c,h){switch(c.tag){case 5:var m=c.type;return h=h.nodeType!==1||m.toLowerCase()!==h.nodeName.toLowerCase()?null:h,h!==null?(c.stateNode=h,un=c,cn=Ka(h.firstChild),!0):!1;case 6:return h=c.pendingProps===""||h.nodeType!==3?null:h,h!==null?(c.stateNode=h,un=c,cn=null,!0):!1;case 13:return h=h.nodeType!==8?null:h,h!==null?(m=Cs!==null?{id:ia,overflow:aa}:null,c.memoizedState={dehydrated:h,treeContext:m,retryLane:1073741824},m=jn(18,null,null,0),m.stateNode=h,m.return=c,c.child=m,un=c,cn=null,!0):!1;default:return!1}}function b_(c){return(c.mode&1)!==0&&(c.flags&128)===0}function w_(c){if(At){var h=cn;if(h){var m=h;if(!mO(c,h)){if(b_(c))throw Error(r(418));h=Ka(m.nextSibling);var w=un;h&&mO(c,h)?gO(w,m):(c.flags=c.flags&-4097|2,At=!1,un=c)}}else{if(b_(c))throw Error(r(418));c.flags=c.flags&-4097|2,At=!1,un=c}}}function yO(c){for(c=c.return;c!==null&&c.tag!==5&&c.tag!==3&&c.tag!==13;)c=c.return;un=c}function Zv(c){if(c!==un)return!1;if(!At)return yO(c),At=!0,!1;var h;if((h=c.tag!==3)&&!(h=c.tag!==5)&&(h=c.type,h=h!=="head"&&h!=="body"&&!d_(c.type,c.memoizedProps)),h&&(h=cn)){if(b_(c))throw xO(),Error(r(418));for(;h;)gO(c,h),h=Ka(h.nextSibling)}if(yO(c),c.tag===13){if(c=c.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));e:{for(c=c.nextSibling,h=0;c;){if(c.nodeType===8){var m=c.data;if(m==="/$"){if(h===0){cn=Ka(c.nextSibling);break e}h--}else m!=="$"&&m!=="$!"&&m!=="$?"||h++}c=c.nextSibling}cn=null}}else cn=un?Ka(c.stateNode.nextSibling):null;return!0}function xO(){for(var c=cn;c;)c=Ka(c.nextSibling)}function ou(){cn=un=null,At=!1}function __(c){ii===null?ii=[c]:ii.push(c)}var Foe=T.ReactCurrentBatchConfig;function Nf(c,h,m){if(c=m.ref,c!==null&&typeof c!="function"&&typeof c!="object"){if(m._owner){if(m=m._owner,m){if(m.tag!==1)throw Error(r(309));var w=m.stateNode}if(!w)throw Error(r(147,c));var C=w,A=""+c;return h!==null&&h.ref!==null&&typeof h.ref=="function"&&h.ref._stringRef===A?h.ref:(h=function(N){var V=C.refs;N===null?delete V[A]:V[A]=N},h._stringRef=A,h)}if(typeof c!="string")throw Error(r(284));if(!m._owner)throw Error(r(290,c))}return c}function Qv(c,h){throw c=Object.prototype.toString.call(h),Error(r(31,c==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":c))}function bO(c){var h=c._init;return h(c._payload)}function wO(c){function h(Q,q){if(c){var J=Q.deletions;J===null?(Q.deletions=[q],Q.flags|=16):J.push(q)}}function m(Q,q){if(!c)return null;for(;q!==null;)h(Q,q),q=q.sibling;return null}function w(Q,q){for(Q=new Map;q!==null;)q.key!==null?Q.set(q.key,q):Q.set(q.index,q),q=q.sibling;return Q}function C(Q,q){return Q=so(Q,q),Q.index=0,Q.sibling=null,Q}function A(Q,q,J){return Q.index=J,c?(J=Q.alternate,J!==null?(J=J.index,J<q?(Q.flags|=2,q):J):(Q.flags|=2,q)):(Q.flags|=1048576,q)}function N(Q){return c&&Q.alternate===null&&(Q.flags|=2),Q}function V(Q,q,J,fe){return q===null||q.tag!==6?(q=hk(J,Q.mode,fe),q.return=Q,q):(q=C(q,J),q.return=Q,q)}function X(Q,q,J,fe){var Te=J.type;return Te===L?se(Q,q,J.props.children,fe,J.key):q!==null&&(q.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===Z&&bO(Te)===q.type)?(fe=C(q,J.props),fe.ref=Nf(Q,q,J),fe.return=Q,fe):(fe=_g(J.type,J.key,J.props,null,Q.mode,fe),fe.ref=Nf(Q,q,J),fe.return=Q,fe)}function te(Q,q,J,fe){return q===null||q.tag!==4||q.stateNode.containerInfo!==J.containerInfo||q.stateNode.implementation!==J.implementation?(q=pk(J,Q.mode,fe),q.return=Q,q):(q=C(q,J.children||[]),q.return=Q,q)}function se(Q,q,J,fe,Te){return q===null||q.tag!==7?(q=Ns(J,Q.mode,fe,Te),q.return=Q,q):(q=C(q,J),q.return=Q,q)}function le(Q,q,J){if(typeof q=="string"&&q!==""||typeof q=="number")return q=hk(""+q,Q.mode,J),q.return=Q,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case E:return J=_g(q.type,q.key,q.props,null,Q.mode,J),J.ref=Nf(Q,null,q),J.return=Q,J;case D:return q=pk(q,Q.mode,J),q.return=Q,q;case Z:var fe=q._init;return le(Q,fe(q._payload),J)}if(Ei(q)||G(q))return q=Ns(q,Q.mode,J,null),q.return=Q,q;Qv(Q,q)}return null}function oe(Q,q,J,fe){var Te=q!==null?q.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return Te!==null?null:V(Q,q,""+J,fe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case E:return J.key===Te?X(Q,q,J,fe):null;case D:return J.key===Te?te(Q,q,J,fe):null;case Z:return Te=J._init,oe(Q,q,Te(J._payload),fe)}if(Ei(J)||G(J))return Te!==null?null:se(Q,q,J,fe,null);Qv(Q,J)}return null}function me(Q,q,J,fe,Te){if(typeof fe=="string"&&fe!==""||typeof fe=="number")return Q=Q.get(J)||null,V(q,Q,""+fe,Te);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case E:return Q=Q.get(fe.key===null?J:fe.key)||null,X(q,Q,fe,Te);case D:return Q=Q.get(fe.key===null?J:fe.key)||null,te(q,Q,fe,Te);case Z:var Re=fe._init;return me(Q,q,J,Re(fe._payload),Te)}if(Ei(fe)||G(fe))return Q=Q.get(J)||null,se(q,Q,fe,Te,null);Qv(q,fe)}return null}function ke(Q,q,J,fe){for(var Te=null,Re=null,Oe=q,Ve=q=0,Kt=null;Oe!==null&&Ve<J.length;Ve++){Oe.index>Ve?(Kt=Oe,Oe=null):Kt=Oe.sibling;var ot=oe(Q,Oe,J[Ve],fe);if(ot===null){Oe===null&&(Oe=Kt);break}c&&Oe&&ot.alternate===null&&h(Q,Oe),q=A(ot,q,Ve),Re===null?Te=ot:Re.sibling=ot,Re=ot,Oe=Kt}if(Ve===J.length)return m(Q,Oe),At&&Ts(Q,Ve),Te;if(Oe===null){for(;Ve<J.length;Ve++)Oe=le(Q,J[Ve],fe),Oe!==null&&(q=A(Oe,q,Ve),Re===null?Te=Oe:Re.sibling=Oe,Re=Oe);return At&&Ts(Q,Ve),Te}for(Oe=w(Q,Oe);Ve<J.length;Ve++)Kt=me(Oe,Q,Ve,J[Ve],fe),Kt!==null&&(c&&Kt.alternate!==null&&Oe.delete(Kt.key===null?Ve:Kt.key),q=A(Kt,q,Ve),Re===null?Te=Kt:Re.sibling=Kt,Re=Kt);return c&&Oe.forEach(function(lo){return h(Q,lo)}),At&&Ts(Q,Ve),Te}function Ce(Q,q,J,fe){var Te=G(J);if(typeof Te!="function")throw Error(r(150));if(J=Te.call(J),J==null)throw Error(r(151));for(var Re=Te=null,Oe=q,Ve=q=0,Kt=null,ot=J.next();Oe!==null&&!ot.done;Ve++,ot=J.next()){Oe.index>Ve?(Kt=Oe,Oe=null):Kt=Oe.sibling;var lo=oe(Q,Oe,ot.value,fe);if(lo===null){Oe===null&&(Oe=Kt);break}c&&Oe&&lo.alternate===null&&h(Q,Oe),q=A(lo,q,Ve),Re===null?Te=lo:Re.sibling=lo,Re=lo,Oe=Kt}if(ot.done)return m(Q,Oe),At&&Ts(Q,Ve),Te;if(Oe===null){for(;!ot.done;Ve++,ot=J.next())ot=le(Q,ot.value,fe),ot!==null&&(q=A(ot,q,Ve),Re===null?Te=ot:Re.sibling=ot,Re=ot);return At&&Ts(Q,Ve),Te}for(Oe=w(Q,Oe);!ot.done;Ve++,ot=J.next())ot=me(Oe,Q,Ve,ot.value,fe),ot!==null&&(c&&ot.alternate!==null&&Oe.delete(ot.key===null?Ve:ot.key),q=A(ot,q,Ve),Re===null?Te=ot:Re.sibling=ot,Re=ot);return c&&Oe.forEach(function(mse){return h(Q,mse)}),At&&Ts(Q,Ve),Te}function zt(Q,q,J,fe){if(typeof J=="object"&&J!==null&&J.type===L&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case E:e:{for(var Te=J.key,Re=q;Re!==null;){if(Re.key===Te){if(Te=J.type,Te===L){if(Re.tag===7){m(Q,Re.sibling),q=C(Re,J.props.children),q.return=Q,Q=q;break e}}else if(Re.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===Z&&bO(Te)===Re.type){m(Q,Re.sibling),q=C(Re,J.props),q.ref=Nf(Q,Re,J),q.return=Q,Q=q;break e}m(Q,Re);break}else h(Q,Re);Re=Re.sibling}J.type===L?(q=Ns(J.props.children,Q.mode,fe,J.key),q.return=Q,Q=q):(fe=_g(J.type,J.key,J.props,null,Q.mode,fe),fe.ref=Nf(Q,q,J),fe.return=Q,Q=fe)}return N(Q);case D:e:{for(Re=J.key;q!==null;){if(q.key===Re)if(q.tag===4&&q.stateNode.containerInfo===J.containerInfo&&q.stateNode.implementation===J.implementation){m(Q,q.sibling),q=C(q,J.children||[]),q.return=Q,Q=q;break e}else{m(Q,q);break}else h(Q,q);q=q.sibling}q=pk(J,Q.mode,fe),q.return=Q,Q=q}return N(Q);case Z:return Re=J._init,zt(Q,q,Re(J._payload),fe)}if(Ei(J))return ke(Q,q,J,fe);if(G(J))return Ce(Q,q,J,fe);Qv(Q,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,q!==null&&q.tag===6?(m(Q,q.sibling),q=C(q,J),q.return=Q,Q=q):(m(Q,q),q=hk(J,Q.mode,fe),q.return=Q,Q=q),N(Q)):m(Q,q)}return zt}var su=wO(!0),_O=wO(!1),Jv=Za(null),eg=null,lu=null,k_=null;function S_(){k_=lu=eg=null}function C_(c){var h=Jv.current;Ct(Jv),c._currentValue=h}function T_(c,h,m){for(;c!==null;){var w=c.alternate;if((c.childLanes&h)!==h?(c.childLanes|=h,w!==null&&(w.childLanes|=h)):w!==null&&(w.childLanes&h)!==h&&(w.childLanes|=h),c===m)break;c=c.return}}function uu(c,h){eg=c,k_=lu=null,c=c.dependencies,c!==null&&c.firstContext!==null&&((c.lanes&h)!==0&&(Wr=!0),c.firstContext=null)}function zn(c){var h=c._currentValue;if(k_!==c)if(c={context:c,memoizedValue:h,next:null},lu===null){if(eg===null)throw Error(r(308));lu=c,eg.dependencies={lanes:0,firstContext:c}}else lu=lu.next=c;return h}var As=null;function A_(c){As===null?As=[c]:As.push(c)}function kO(c,h,m,w){var C=h.interleaved;return C===null?(m.next=m,A_(h)):(m.next=C.next,C.next=m),h.interleaved=m,oa(c,w)}function oa(c,h){c.lanes|=h;var m=c.alternate;for(m!==null&&(m.lanes|=h),m=c,c=c.return;c!==null;)c.childLanes|=h,m=c.alternate,m!==null&&(m.childLanes|=h),m=c,c=c.return;return m.tag===3?m.stateNode:null}var eo=!1;function E_(c){c.updateQueue={baseState:c.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function SO(c,h){c=c.updateQueue,h.updateQueue===c&&(h.updateQueue={baseState:c.baseState,firstBaseUpdate:c.firstBaseUpdate,lastBaseUpdate:c.lastBaseUpdate,shared:c.shared,effects:c.effects})}function sa(c,h){return{eventTime:c,lane:h,tag:0,payload:null,callback:null,next:null}}function to(c,h,m){var w=c.updateQueue;if(w===null)return null;if(w=w.shared,(rt&2)!==0){var C=w.pending;return C===null?h.next=h:(h.next=C.next,C.next=h),w.pending=h,oa(c,m)}return C=w.interleaved,C===null?(h.next=h,A_(w)):(h.next=C.next,C.next=h),w.interleaved=h,oa(c,m)}function tg(c,h,m){if(h=h.updateQueue,h!==null&&(h=h.shared,(m&4194240)!==0)){var w=h.lanes;w&=c.pendingLanes,m|=w,h.lanes=m,Vw(c,m)}}function CO(c,h){var m=c.updateQueue,w=c.alternate;if(w!==null&&(w=w.updateQueue,m===w)){var C=null,A=null;if(m=m.firstBaseUpdate,m!==null){do{var N={eventTime:m.eventTime,lane:m.lane,tag:m.tag,payload:m.payload,callback:m.callback,next:null};A===null?C=A=N:A=A.next=N,m=m.next}while(m!==null);A===null?C=A=h:A=A.next=h}else C=A=h;m={baseState:w.baseState,firstBaseUpdate:C,lastBaseUpdate:A,shared:w.shared,effects:w.effects},c.updateQueue=m;return}c=m.lastBaseUpdate,c===null?m.firstBaseUpdate=h:c.next=h,m.lastBaseUpdate=h}function rg(c,h,m,w){var C=c.updateQueue;eo=!1;var A=C.firstBaseUpdate,N=C.lastBaseUpdate,V=C.shared.pending;if(V!==null){C.shared.pending=null;var X=V,te=X.next;X.next=null,N===null?A=te:N.next=te,N=X;var se=c.alternate;se!==null&&(se=se.updateQueue,V=se.lastBaseUpdate,V!==N&&(V===null?se.firstBaseUpdate=te:V.next=te,se.lastBaseUpdate=X))}if(A!==null){var le=C.baseState;N=0,se=te=X=null,V=A;do{var oe=V.lane,me=V.eventTime;if((w&oe)===oe){se!==null&&(se=se.next={eventTime:me,lane:0,tag:V.tag,payload:V.payload,callback:V.callback,next:null});e:{var ke=c,Ce=V;switch(oe=h,me=m,Ce.tag){case 1:if(ke=Ce.payload,typeof ke=="function"){le=ke.call(me,le,oe);break e}le=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Ce.payload,oe=typeof ke=="function"?ke.call(me,le,oe):ke,oe==null)break e;le=I({},le,oe);break e;case 2:eo=!0}}V.callback!==null&&V.lane!==0&&(c.flags|=64,oe=C.effects,oe===null?C.effects=[V]:oe.push(V))}else me={eventTime:me,lane:oe,tag:V.tag,payload:V.payload,callback:V.callback,next:null},se===null?(te=se=me,X=le):se=se.next=me,N|=oe;if(V=V.next,V===null){if(V=C.shared.pending,V===null)break;oe=V,V=oe.next,oe.next=null,C.lastBaseUpdate=oe,C.shared.pending=null}}while(!0);if(se===null&&(X=le),C.baseState=X,C.firstBaseUpdate=te,C.lastBaseUpdate=se,h=C.shared.interleaved,h!==null){C=h;do N|=C.lane,C=C.next;while(C!==h)}else A===null&&(C.shared.lanes=0);Ms|=N,c.lanes=N,c.memoizedState=le}}function TO(c,h,m){if(c=h.effects,h.effects=null,c!==null)for(h=0;h<c.length;h++){var w=c[h],C=w.callback;if(C!==null){if(w.callback=null,w=m,typeof C!="function")throw Error(r(191,C));C.call(w)}}}var Rf={},Li=Za(Rf),Of=Za(Rf),zf=Za(Rf);function Es(c){if(c===Rf)throw Error(r(174));return c}function D_(c,h){switch(wt(zf,h),wt(Of,c),wt(Li,Rf),c=h.nodeType,c){case 9:case 11:h=(h=h.documentElement)?h.namespaceURI:ne(null,"");break;default:c=c===8?h.parentNode:h,h=c.namespaceURI||null,c=c.tagName,h=ne(h,c)}Ct(Li),wt(Li,h)}function cu(){Ct(Li),Ct(Of),Ct(zf)}function AO(c){Es(zf.current);var h=Es(Li.current),m=ne(h,c.type);h!==m&&(wt(Of,c),wt(Li,m))}function M_(c){Of.current===c&&(Ct(Li),Ct(Of))}var Dt=Za(0);function ng(c){for(var h=c;h!==null;){if(h.tag===13){var m=h.memoizedState;if(m!==null&&(m=m.dehydrated,m===null||m.data==="$?"||m.data==="$!"))return h}else if(h.tag===19&&h.memoizedProps.revealOrder!==void 0){if((h.flags&128)!==0)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===c)break;for(;h.sibling===null;){if(h.return===null||h.return===c)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}var L_=[];function I_(){for(var c=0;c<L_.length;c++)L_[c]._workInProgressVersionPrimary=null;L_.length=0}var ig=T.ReactCurrentDispatcher,P_=T.ReactCurrentBatchConfig,Ds=0,Mt=null,$t=null,Xt=null,ag=!1,Ff=!1,Bf=0,Boe=0;function yr(){throw Error(r(321))}function N_(c,h){if(h===null)return!1;for(var m=0;m<h.length&&m<c.length;m++)if(!ni(c[m],h[m]))return!1;return!0}function R_(c,h,m,w,C,A){if(Ds=A,Mt=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,ig.current=c===null||c.memoizedState===null?Uoe:$oe,c=m(w,C),Ff){A=0;do{if(Ff=!1,Bf=0,25<=A)throw Error(r(301));A+=1,Xt=$t=null,h.updateQueue=null,ig.current=Goe,c=m(w,C)}while(Ff)}if(ig.current=lg,h=$t!==null&&$t.next!==null,Ds=0,Xt=$t=Mt=null,ag=!1,h)throw Error(r(300));return c}function O_(){var c=Bf!==0;return Bf=0,c}function Ii(){var c={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xt===null?Mt.memoizedState=Xt=c:Xt=Xt.next=c,Xt}function Fn(){if($t===null){var c=Mt.alternate;c=c!==null?c.memoizedState:null}else c=$t.next;var h=Xt===null?Mt.memoizedState:Xt.next;if(h!==null)Xt=h,$t=c;else{if(c===null)throw Error(r(310));$t=c,c={memoizedState:$t.memoizedState,baseState:$t.baseState,baseQueue:$t.baseQueue,queue:$t.queue,next:null},Xt===null?Mt.memoizedState=Xt=c:Xt=Xt.next=c}return Xt}function jf(c,h){return typeof h=="function"?h(c):h}function z_(c){var h=Fn(),m=h.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=c;var w=$t,C=w.baseQueue,A=m.pending;if(A!==null){if(C!==null){var N=C.next;C.next=A.next,A.next=N}w.baseQueue=C=A,m.pending=null}if(C!==null){A=C.next,w=w.baseState;var V=N=null,X=null,te=A;do{var se=te.lane;if((Ds&se)===se)X!==null&&(X=X.next={lane:0,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),w=te.hasEagerState?te.eagerState:c(w,te.action);else{var le={lane:se,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null};X===null?(V=X=le,N=w):X=X.next=le,Mt.lanes|=se,Ms|=se}te=te.next}while(te!==null&&te!==A);X===null?N=w:X.next=V,ni(w,h.memoizedState)||(Wr=!0),h.memoizedState=w,h.baseState=N,h.baseQueue=X,m.lastRenderedState=w}if(c=m.interleaved,c!==null){C=c;do A=C.lane,Mt.lanes|=A,Ms|=A,C=C.next;while(C!==c)}else C===null&&(m.lanes=0);return[h.memoizedState,m.dispatch]}function F_(c){var h=Fn(),m=h.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=c;var w=m.dispatch,C=m.pending,A=h.memoizedState;if(C!==null){m.pending=null;var N=C=C.next;do A=c(A,N.action),N=N.next;while(N!==C);ni(A,h.memoizedState)||(Wr=!0),h.memoizedState=A,h.baseQueue===null&&(h.baseState=A),m.lastRenderedState=A}return[A,w]}function EO(){}function DO(c,h){var m=Mt,w=Fn(),C=h(),A=!ni(w.memoizedState,C);if(A&&(w.memoizedState=C,Wr=!0),w=w.queue,B_(IO.bind(null,m,w,c),[c]),w.getSnapshot!==h||A||Xt!==null&&Xt.memoizedState.tag&1){if(m.flags|=2048,Hf(9,LO.bind(null,m,w,C,h),void 0,null),qt===null)throw Error(r(349));(Ds&30)!==0||MO(m,h,C)}return C}function MO(c,h,m){c.flags|=16384,c={getSnapshot:h,value:m},h=Mt.updateQueue,h===null?(h={lastEffect:null,stores:null},Mt.updateQueue=h,h.stores=[c]):(m=h.stores,m===null?h.stores=[c]:m.push(c))}function LO(c,h,m,w){h.value=m,h.getSnapshot=w,PO(h)&&NO(c)}function IO(c,h,m){return m(function(){PO(h)&&NO(c)})}function PO(c){var h=c.getSnapshot;c=c.value;try{var m=h();return!ni(c,m)}catch{return!0}}function NO(c){var h=oa(c,1);h!==null&&li(h,c,1,-1)}function RO(c){var h=Ii();return typeof c=="function"&&(c=c()),h.memoizedState=h.baseState=c,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:jf,lastRenderedState:c},h.queue=c,c=c.dispatch=Voe.bind(null,Mt,c),[h.memoizedState,c]}function Hf(c,h,m,w){return c={tag:c,create:h,destroy:m,deps:w,next:null},h=Mt.updateQueue,h===null?(h={lastEffect:null,stores:null},Mt.updateQueue=h,h.lastEffect=c.next=c):(m=h.lastEffect,m===null?h.lastEffect=c.next=c:(w=m.next,m.next=c,c.next=w,h.lastEffect=c)),c}function OO(){return Fn().memoizedState}function og(c,h,m,w){var C=Ii();Mt.flags|=c,C.memoizedState=Hf(1|h,m,void 0,w===void 0?null:w)}function sg(c,h,m,w){var C=Fn();w=w===void 0?null:w;var A=void 0;if($t!==null){var N=$t.memoizedState;if(A=N.destroy,w!==null&&N_(w,N.deps)){C.memoizedState=Hf(h,m,A,w);return}}Mt.flags|=c,C.memoizedState=Hf(1|h,m,A,w)}function zO(c,h){return og(8390656,8,c,h)}function B_(c,h){return sg(2048,8,c,h)}function FO(c,h){return sg(4,2,c,h)}function BO(c,h){return sg(4,4,c,h)}function jO(c,h){if(typeof h=="function")return c=c(),h(c),function(){h(null)};if(h!=null)return c=c(),h.current=c,function(){h.current=null}}function HO(c,h,m){return m=m!=null?m.concat([c]):null,sg(4,4,jO.bind(null,h,c),m)}function j_(){}function VO(c,h){var m=Fn();h=h===void 0?null:h;var w=m.memoizedState;return w!==null&&h!==null&&N_(h,w[1])?w[0]:(m.memoizedState=[c,h],c)}function UO(c,h){var m=Fn();h=h===void 0?null:h;var w=m.memoizedState;return w!==null&&h!==null&&N_(h,w[1])?w[0]:(c=c(),m.memoizedState=[c,h],c)}function $O(c,h,m){return(Ds&21)===0?(c.baseState&&(c.baseState=!1,Wr=!0),c.memoizedState=m):(ni(m,h)||(m=b5(),Mt.lanes|=m,Ms|=m,c.baseState=!0),h)}function joe(c,h){var m=ht;ht=m!==0&&4>m?m:4,c(!0);var w=P_.transition;P_.transition={};try{c(!1),h()}finally{ht=m,P_.transition=w}}function GO(){return Fn().memoizedState}function Hoe(c,h,m){var w=ao(c);if(m={lane:w,action:m,hasEagerState:!1,eagerState:null,next:null},WO(c))YO(h,m);else if(m=kO(c,h,m,w),m!==null){var C=Lr();li(m,c,w,C),XO(m,h,w)}}function Voe(c,h,m){var w=ao(c),C={lane:w,action:m,hasEagerState:!1,eagerState:null,next:null};if(WO(c))YO(h,C);else{var A=c.alternate;if(c.lanes===0&&(A===null||A.lanes===0)&&(A=h.lastRenderedReducer,A!==null))try{var N=h.lastRenderedState,V=A(N,m);if(C.hasEagerState=!0,C.eagerState=V,ni(V,N)){var X=h.interleaved;X===null?(C.next=C,A_(h)):(C.next=X.next,X.next=C),h.interleaved=C;return}}catch{}m=kO(c,h,C,w),m!==null&&(C=Lr(),li(m,c,w,C),XO(m,h,w))}}function WO(c){var h=c.alternate;return c===Mt||h!==null&&h===Mt}function YO(c,h){Ff=ag=!0;var m=c.pending;m===null?h.next=h:(h.next=m.next,m.next=h),c.pending=h}function XO(c,h,m){if((m&4194240)!==0){var w=h.lanes;w&=c.pendingLanes,m|=w,h.lanes=m,Vw(c,m)}}var lg={readContext:zn,useCallback:yr,useContext:yr,useEffect:yr,useImperativeHandle:yr,useInsertionEffect:yr,useLayoutEffect:yr,useMemo:yr,useReducer:yr,useRef:yr,useState:yr,useDebugValue:yr,useDeferredValue:yr,useTransition:yr,useMutableSource:yr,useSyncExternalStore:yr,useId:yr,unstable_isNewReconciler:!1},Uoe={readContext:zn,useCallback:function(c,h){return Ii().memoizedState=[c,h===void 0?null:h],c},useContext:zn,useEffect:zO,useImperativeHandle:function(c,h,m){return m=m!=null?m.concat([c]):null,og(4194308,4,jO.bind(null,h,c),m)},useLayoutEffect:function(c,h){return og(4194308,4,c,h)},useInsertionEffect:function(c,h){return og(4,2,c,h)},useMemo:function(c,h){var m=Ii();return h=h===void 0?null:h,c=c(),m.memoizedState=[c,h],c},useReducer:function(c,h,m){var w=Ii();return h=m!==void 0?m(h):h,w.memoizedState=w.baseState=h,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:h},w.queue=c,c=c.dispatch=Hoe.bind(null,Mt,c),[w.memoizedState,c]},useRef:function(c){var h=Ii();return c={current:c},h.memoizedState=c},useState:RO,useDebugValue:j_,useDeferredValue:function(c){return Ii().memoizedState=c},useTransition:function(){var c=RO(!1),h=c[0];return c=joe.bind(null,c[1]),Ii().memoizedState=c,[h,c]},useMutableSource:function(){},useSyncExternalStore:function(c,h,m){var w=Mt,C=Ii();if(At){if(m===void 0)throw Error(r(407));m=m()}else{if(m=h(),qt===null)throw Error(r(349));(Ds&30)!==0||MO(w,h,m)}C.memoizedState=m;var A={value:m,getSnapshot:h};return C.queue=A,zO(IO.bind(null,w,A,c),[c]),w.flags|=2048,Hf(9,LO.bind(null,w,A,m,h),void 0,null),m},useId:function(){var c=Ii(),h=qt.identifierPrefix;if(At){var m=aa,w=ia;m=(w&~(1<<32-ri(w)-1)).toString(32)+m,h=":"+h+"R"+m,m=Bf++,0<m&&(h+="H"+m.toString(32)),h+=":"}else m=Boe++,h=":"+h+"r"+m.toString(32)+":";return c.memoizedState=h},unstable_isNewReconciler:!1},$oe={readContext:zn,useCallback:VO,useContext:zn,useEffect:B_,useImperativeHandle:HO,useInsertionEffect:FO,useLayoutEffect:BO,useMemo:UO,useReducer:z_,useRef:OO,useState:function(){return z_(jf)},useDebugValue:j_,useDeferredValue:function(c){var h=Fn();return $O(h,$t.memoizedState,c)},useTransition:function(){var c=z_(jf)[0],h=Fn().memoizedState;return[c,h]},useMutableSource:EO,useSyncExternalStore:DO,useId:GO,unstable_isNewReconciler:!1},Goe={readContext:zn,useCallback:VO,useContext:zn,useEffect:B_,useImperativeHandle:HO,useInsertionEffect:FO,useLayoutEffect:BO,useMemo:UO,useReducer:F_,useRef:OO,useState:function(){return F_(jf)},useDebugValue:j_,useDeferredValue:function(c){var h=Fn();return $t===null?h.memoizedState=c:$O(h,$t.memoizedState,c)},useTransition:function(){var c=F_(jf)[0],h=Fn().memoizedState;return[c,h]},useMutableSource:EO,useSyncExternalStore:DO,useId:GO,unstable_isNewReconciler:!1};function ai(c,h){if(c&&c.defaultProps){h=I({},h),c=c.defaultProps;for(var m in c)h[m]===void 0&&(h[m]=c[m]);return h}return h}function H_(c,h,m,w){h=c.memoizedState,m=m(w,h),m=m==null?h:I({},h,m),c.memoizedState=m,c.lanes===0&&(c.updateQueue.baseState=m)}var ug={isMounted:function(c){return(c=c._reactInternals)?_s(c)===c:!1},enqueueSetState:function(c,h,m){c=c._reactInternals;var w=Lr(),C=ao(c),A=sa(w,C);A.payload=h,m!=null&&(A.callback=m),h=to(c,A,C),h!==null&&(li(h,c,C,w),tg(h,c,C))},enqueueReplaceState:function(c,h,m){c=c._reactInternals;var w=Lr(),C=ao(c),A=sa(w,C);A.tag=1,A.payload=h,m!=null&&(A.callback=m),h=to(c,A,C),h!==null&&(li(h,c,C,w),tg(h,c,C))},enqueueForceUpdate:function(c,h){c=c._reactInternals;var m=Lr(),w=ao(c),C=sa(m,w);C.tag=2,h!=null&&(C.callback=h),h=to(c,C,w),h!==null&&(li(h,c,w,m),tg(h,c,w))}};function qO(c,h,m,w,C,A,N){return c=c.stateNode,typeof c.shouldComponentUpdate=="function"?c.shouldComponentUpdate(w,A,N):h.prototype&&h.prototype.isPureReactComponent?!Af(m,w)||!Af(C,A):!0}function KO(c,h,m){var w=!1,C=Qa,A=h.contextType;return typeof A=="object"&&A!==null?A=zn(A):(C=Gr(h)?Ss:mr.current,w=h.contextTypes,A=(w=w!=null)?nu(c,C):Qa),h=new h(m,A),c.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=ug,c.stateNode=h,h._reactInternals=c,w&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=C,c.__reactInternalMemoizedMaskedChildContext=A),h}function ZO(c,h,m,w){c=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(m,w),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(m,w),h.state!==c&&ug.enqueueReplaceState(h,h.state,null)}function V_(c,h,m,w){var C=c.stateNode;C.props=m,C.state=c.memoizedState,C.refs={},E_(c);var A=h.contextType;typeof A=="object"&&A!==null?C.context=zn(A):(A=Gr(h)?Ss:mr.current,C.context=nu(c,A)),C.state=c.memoizedState,A=h.getDerivedStateFromProps,typeof A=="function"&&(H_(c,h,A,m),C.state=c.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof C.getSnapshotBeforeUpdate=="function"||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(h=C.state,typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount(),h!==C.state&&ug.enqueueReplaceState(C,C.state,null),rg(c,m,C,w),C.state=c.memoizedState),typeof C.componentDidMount=="function"&&(c.flags|=4194308)}function fu(c,h){try{var m="",w=h;do m+=ae(w),w=w.return;while(w);var C=m}catch(A){C=`
|
|
7
|
+
Error generating stack: `+A.message+`
|
|
8
|
+
`+A.stack}return{value:c,source:h,stack:C,digest:null}}function U_(c,h,m){return{value:c,source:null,stack:m??null,digest:h??null}}function $_(c,h){try{console.error(h.value)}catch(m){setTimeout(function(){throw m})}}var Woe=typeof WeakMap=="function"?WeakMap:Map;function QO(c,h,m){m=sa(-1,m),m.tag=3,m.payload={element:null};var w=h.value;return m.callback=function(){gg||(gg=!0,ak=w),$_(c,h)},m}function JO(c,h,m){m=sa(-1,m),m.tag=3;var w=c.type.getDerivedStateFromError;if(typeof w=="function"){var C=h.value;m.payload=function(){return w(C)},m.callback=function(){$_(c,h)}}var A=c.stateNode;return A!==null&&typeof A.componentDidCatch=="function"&&(m.callback=function(){$_(c,h),typeof w!="function"&&(no===null?no=new Set([this]):no.add(this));var N=h.stack;this.componentDidCatch(h.value,{componentStack:N!==null?N:""})}),m}function e3(c,h,m){var w=c.pingCache;if(w===null){w=c.pingCache=new Woe;var C=new Set;w.set(h,C)}else C=w.get(h),C===void 0&&(C=new Set,w.set(h,C));C.has(m)||(C.add(m),c=ose.bind(null,c,h,m),h.then(c,c))}function t3(c){do{var h;if((h=c.tag===13)&&(h=c.memoizedState,h=h!==null?h.dehydrated!==null:!0),h)return c;c=c.return}while(c!==null);return null}function r3(c,h,m,w,C){return(c.mode&1)===0?(c===h?c.flags|=65536:(c.flags|=128,m.flags|=131072,m.flags&=-52805,m.tag===1&&(m.alternate===null?m.tag=17:(h=sa(-1,1),h.tag=2,to(m,h,1))),m.lanes|=1),c):(c.flags|=65536,c.lanes=C,c)}var Yoe=T.ReactCurrentOwner,Wr=!1;function Mr(c,h,m,w){h.child=c===null?_O(h,null,m,w):su(h,c.child,m,w)}function n3(c,h,m,w,C){m=m.render;var A=h.ref;return uu(h,C),w=R_(c,h,m,w,A,C),m=O_(),c!==null&&!Wr?(h.updateQueue=c.updateQueue,h.flags&=-2053,c.lanes&=~C,la(c,h,C)):(At&&m&&y_(h),h.flags|=1,Mr(c,h,w,C),h.child)}function i3(c,h,m,w,C){if(c===null){var A=m.type;return typeof A=="function"&&!dk(A)&&A.defaultProps===void 0&&m.compare===null&&m.defaultProps===void 0?(h.tag=15,h.type=A,a3(c,h,A,w,C)):(c=_g(m.type,null,w,h,h.mode,C),c.ref=h.ref,c.return=h,h.child=c)}if(A=c.child,(c.lanes&C)===0){var N=A.memoizedProps;if(m=m.compare,m=m!==null?m:Af,m(N,w)&&c.ref===h.ref)return la(c,h,C)}return h.flags|=1,c=so(A,w),c.ref=h.ref,c.return=h,h.child=c}function a3(c,h,m,w,C){if(c!==null){var A=c.memoizedProps;if(Af(A,w)&&c.ref===h.ref)if(Wr=!1,h.pendingProps=w=A,(c.lanes&C)!==0)(c.flags&131072)!==0&&(Wr=!0);else return h.lanes=c.lanes,la(c,h,C)}return G_(c,h,m,w,C)}function o3(c,h,m){var w=h.pendingProps,C=w.children,A=c!==null?c.memoizedState:null;if(w.mode==="hidden")if((h.mode&1)===0)h.memoizedState={baseLanes:0,cachePool:null,transitions:null},wt(hu,fn),fn|=m;else{if((m&1073741824)===0)return c=A!==null?A.baseLanes|m:m,h.lanes=h.childLanes=1073741824,h.memoizedState={baseLanes:c,cachePool:null,transitions:null},h.updateQueue=null,wt(hu,fn),fn|=c,null;h.memoizedState={baseLanes:0,cachePool:null,transitions:null},w=A!==null?A.baseLanes:m,wt(hu,fn),fn|=w}else A!==null?(w=A.baseLanes|m,h.memoizedState=null):w=m,wt(hu,fn),fn|=w;return Mr(c,h,C,m),h.child}function s3(c,h){var m=h.ref;(c===null&&m!==null||c!==null&&c.ref!==m)&&(h.flags|=512,h.flags|=2097152)}function G_(c,h,m,w,C){var A=Gr(m)?Ss:mr.current;return A=nu(h,A),uu(h,C),m=R_(c,h,m,w,A,C),w=O_(),c!==null&&!Wr?(h.updateQueue=c.updateQueue,h.flags&=-2053,c.lanes&=~C,la(c,h,C)):(At&&w&&y_(h),h.flags|=1,Mr(c,h,m,C),h.child)}function l3(c,h,m,w,C){if(Gr(m)){var A=!0;Yv(h)}else A=!1;if(uu(h,C),h.stateNode===null)fg(c,h),KO(h,m,w),V_(h,m,w,C),w=!0;else if(c===null){var N=h.stateNode,V=h.memoizedProps;N.props=V;var X=N.context,te=m.contextType;typeof te=="object"&&te!==null?te=zn(te):(te=Gr(m)?Ss:mr.current,te=nu(h,te));var se=m.getDerivedStateFromProps,le=typeof se=="function"||typeof N.getSnapshotBeforeUpdate=="function";le||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(V!==w||X!==te)&&ZO(h,N,w,te),eo=!1;var oe=h.memoizedState;N.state=oe,rg(h,w,N,C),X=h.memoizedState,V!==w||oe!==X||$r.current||eo?(typeof se=="function"&&(H_(h,m,se,w),X=h.memoizedState),(V=eo||qO(h,m,V,w,oe,X,te))?(le||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(h.flags|=4194308)):(typeof N.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=w,h.memoizedState=X),N.props=w,N.state=X,N.context=te,w=V):(typeof N.componentDidMount=="function"&&(h.flags|=4194308),w=!1)}else{N=h.stateNode,SO(c,h),V=h.memoizedProps,te=h.type===h.elementType?V:ai(h.type,V),N.props=te,le=h.pendingProps,oe=N.context,X=m.contextType,typeof X=="object"&&X!==null?X=zn(X):(X=Gr(m)?Ss:mr.current,X=nu(h,X));var me=m.getDerivedStateFromProps;(se=typeof me=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(V!==le||oe!==X)&&ZO(h,N,w,X),eo=!1,oe=h.memoizedState,N.state=oe,rg(h,w,N,C);var ke=h.memoizedState;V!==le||oe!==ke||$r.current||eo?(typeof me=="function"&&(H_(h,m,me,w),ke=h.memoizedState),(te=eo||qO(h,m,te,w,oe,ke,X)||!1)?(se||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(w,ke,X),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(w,ke,X)),typeof N.componentDidUpdate=="function"&&(h.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof N.componentDidUpdate!="function"||V===c.memoizedProps&&oe===c.memoizedState||(h.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||V===c.memoizedProps&&oe===c.memoizedState||(h.flags|=1024),h.memoizedProps=w,h.memoizedState=ke),N.props=w,N.state=ke,N.context=X,w=te):(typeof N.componentDidUpdate!="function"||V===c.memoizedProps&&oe===c.memoizedState||(h.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||V===c.memoizedProps&&oe===c.memoizedState||(h.flags|=1024),w=!1)}return W_(c,h,m,w,A,C)}function W_(c,h,m,w,C,A){s3(c,h);var N=(h.flags&128)!==0;if(!w&&!N)return C&&hO(h,m,!1),la(c,h,A);w=h.stateNode,Yoe.current=h;var V=N&&typeof m.getDerivedStateFromError!="function"?null:w.render();return h.flags|=1,c!==null&&N?(h.child=su(h,c.child,null,A),h.child=su(h,null,V,A)):Mr(c,h,V,A),h.memoizedState=w.state,C&&hO(h,m,!0),h.child}function u3(c){var h=c.stateNode;h.pendingContext?fO(c,h.pendingContext,h.pendingContext!==h.context):h.context&&fO(c,h.context,!1),D_(c,h.containerInfo)}function c3(c,h,m,w,C){return ou(),__(C),h.flags|=256,Mr(c,h,m,w),h.child}var Y_={dehydrated:null,treeContext:null,retryLane:0};function X_(c){return{baseLanes:c,cachePool:null,transitions:null}}function f3(c,h,m){var w=h.pendingProps,C=Dt.current,A=!1,N=(h.flags&128)!==0,V;if((V=N)||(V=c!==null&&c.memoizedState===null?!1:(C&2)!==0),V?(A=!0,h.flags&=-129):(c===null||c.memoizedState!==null)&&(C|=1),wt(Dt,C&1),c===null)return w_(h),c=h.memoizedState,c!==null&&(c=c.dehydrated,c!==null)?((h.mode&1)===0?h.lanes=1:c.data==="$!"?h.lanes=8:h.lanes=1073741824,null):(N=w.children,c=w.fallback,A?(w=h.mode,A=h.child,N={mode:"hidden",children:N},(w&1)===0&&A!==null?(A.childLanes=0,A.pendingProps=N):A=kg(N,w,0,null),c=Ns(c,w,m,null),A.return=h,c.return=h,A.sibling=c,h.child=A,h.child.memoizedState=X_(m),h.memoizedState=Y_,c):q_(h,N));if(C=c.memoizedState,C!==null&&(V=C.dehydrated,V!==null))return Xoe(c,h,N,w,V,C,m);if(A){A=w.fallback,N=h.mode,C=c.child,V=C.sibling;var X={mode:"hidden",children:w.children};return(N&1)===0&&h.child!==C?(w=h.child,w.childLanes=0,w.pendingProps=X,h.deletions=null):(w=so(C,X),w.subtreeFlags=C.subtreeFlags&14680064),V!==null?A=so(V,A):(A=Ns(A,N,m,null),A.flags|=2),A.return=h,w.return=h,w.sibling=A,h.child=w,w=A,A=h.child,N=c.child.memoizedState,N=N===null?X_(m):{baseLanes:N.baseLanes|m,cachePool:null,transitions:N.transitions},A.memoizedState=N,A.childLanes=c.childLanes&~m,h.memoizedState=Y_,w}return A=c.child,c=A.sibling,w=so(A,{mode:"visible",children:w.children}),(h.mode&1)===0&&(w.lanes=m),w.return=h,w.sibling=null,c!==null&&(m=h.deletions,m===null?(h.deletions=[c],h.flags|=16):m.push(c)),h.child=w,h.memoizedState=null,w}function q_(c,h){return h=kg({mode:"visible",children:h},c.mode,0,null),h.return=c,c.child=h}function cg(c,h,m,w){return w!==null&&__(w),su(h,c.child,null,m),c=q_(h,h.pendingProps.children),c.flags|=2,h.memoizedState=null,c}function Xoe(c,h,m,w,C,A,N){if(m)return h.flags&256?(h.flags&=-257,w=U_(Error(r(422))),cg(c,h,N,w)):h.memoizedState!==null?(h.child=c.child,h.flags|=128,null):(A=w.fallback,C=h.mode,w=kg({mode:"visible",children:w.children},C,0,null),A=Ns(A,C,N,null),A.flags|=2,w.return=h,A.return=h,w.sibling=A,h.child=w,(h.mode&1)!==0&&su(h,c.child,null,N),h.child.memoizedState=X_(N),h.memoizedState=Y_,A);if((h.mode&1)===0)return cg(c,h,N,null);if(C.data==="$!"){if(w=C.nextSibling&&C.nextSibling.dataset,w)var V=w.dgst;return w=V,A=Error(r(419)),w=U_(A,w,void 0),cg(c,h,N,w)}if(V=(N&c.childLanes)!==0,Wr||V){if(w=qt,w!==null){switch(N&-N){case 4:C=2;break;case 16:C=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:C=32;break;case 536870912:C=268435456;break;default:C=0}C=(C&(w.suspendedLanes|N))!==0?0:C,C!==0&&C!==A.retryLane&&(A.retryLane=C,oa(c,C),li(w,c,C,-1))}return fk(),w=U_(Error(r(421))),cg(c,h,N,w)}return C.data==="$?"?(h.flags|=128,h.child=c.child,h=sse.bind(null,c),C._reactRetry=h,null):(c=A.treeContext,cn=Ka(C.nextSibling),un=h,At=!0,ii=null,c!==null&&(Rn[On++]=ia,Rn[On++]=aa,Rn[On++]=Cs,ia=c.id,aa=c.overflow,Cs=h),h=q_(h,w.children),h.flags|=4096,h)}function d3(c,h,m){c.lanes|=h;var w=c.alternate;w!==null&&(w.lanes|=h),T_(c.return,h,m)}function K_(c,h,m,w,C){var A=c.memoizedState;A===null?c.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:w,tail:m,tailMode:C}:(A.isBackwards=h,A.rendering=null,A.renderingStartTime=0,A.last=w,A.tail=m,A.tailMode=C)}function h3(c,h,m){var w=h.pendingProps,C=w.revealOrder,A=w.tail;if(Mr(c,h,w.children,m),w=Dt.current,(w&2)!==0)w=w&1|2,h.flags|=128;else{if(c!==null&&(c.flags&128)!==0)e:for(c=h.child;c!==null;){if(c.tag===13)c.memoizedState!==null&&d3(c,m,h);else if(c.tag===19)d3(c,m,h);else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===h)break e;for(;c.sibling===null;){if(c.return===null||c.return===h)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}w&=1}if(wt(Dt,w),(h.mode&1)===0)h.memoizedState=null;else switch(C){case"forwards":for(m=h.child,C=null;m!==null;)c=m.alternate,c!==null&&ng(c)===null&&(C=m),m=m.sibling;m=C,m===null?(C=h.child,h.child=null):(C=m.sibling,m.sibling=null),K_(h,!1,C,m,A);break;case"backwards":for(m=null,C=h.child,h.child=null;C!==null;){if(c=C.alternate,c!==null&&ng(c)===null){h.child=C;break}c=C.sibling,C.sibling=m,m=C,C=c}K_(h,!0,m,null,A);break;case"together":K_(h,!1,null,null,void 0);break;default:h.memoizedState=null}return h.child}function fg(c,h){(h.mode&1)===0&&c!==null&&(c.alternate=null,h.alternate=null,h.flags|=2)}function la(c,h,m){if(c!==null&&(h.dependencies=c.dependencies),Ms|=h.lanes,(m&h.childLanes)===0)return null;if(c!==null&&h.child!==c.child)throw Error(r(153));if(h.child!==null){for(c=h.child,m=so(c,c.pendingProps),h.child=m,m.return=h;c.sibling!==null;)c=c.sibling,m=m.sibling=so(c,c.pendingProps),m.return=h;m.sibling=null}return h.child}function qoe(c,h,m){switch(h.tag){case 3:u3(h),ou();break;case 5:AO(h);break;case 1:Gr(h.type)&&Yv(h);break;case 4:D_(h,h.stateNode.containerInfo);break;case 10:var w=h.type._context,C=h.memoizedProps.value;wt(Jv,w._currentValue),w._currentValue=C;break;case 13:if(w=h.memoizedState,w!==null)return w.dehydrated!==null?(wt(Dt,Dt.current&1),h.flags|=128,null):(m&h.child.childLanes)!==0?f3(c,h,m):(wt(Dt,Dt.current&1),c=la(c,h,m),c!==null?c.sibling:null);wt(Dt,Dt.current&1);break;case 19:if(w=(m&h.childLanes)!==0,(c.flags&128)!==0){if(w)return h3(c,h,m);h.flags|=128}if(C=h.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),wt(Dt,Dt.current),w)break;return null;case 22:case 23:return h.lanes=0,o3(c,h,m)}return la(c,h,m)}var p3,Z_,v3,g3;p3=function(c,h){for(var m=h.child;m!==null;){if(m.tag===5||m.tag===6)c.appendChild(m.stateNode);else if(m.tag!==4&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===h)break;for(;m.sibling===null;){if(m.return===null||m.return===h)return;m=m.return}m.sibling.return=m.return,m=m.sibling}},Z_=function(){},v3=function(c,h,m,w){var C=c.memoizedProps;if(C!==w){c=h.stateNode,Es(Li.current);var A=null;switch(m){case"input":C=Tt(c,C),w=Tt(c,w),A=[];break;case"select":C=I({},C,{value:void 0}),w=I({},w,{value:void 0}),A=[];break;case"textarea":C=Ji(c,C),w=Ji(c,w),A=[];break;default:typeof C.onClick!="function"&&typeof w.onClick=="function"&&(c.onclick=$v)}ea(m,w);var N;m=null;for(te in C)if(!w.hasOwnProperty(te)&&C.hasOwnProperty(te)&&C[te]!=null)if(te==="style"){var V=C[te];for(N in V)V.hasOwnProperty(N)&&(m||(m={}),m[N]="")}else te!=="dangerouslySetInnerHTML"&&te!=="children"&&te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&te!=="autoFocus"&&(i.hasOwnProperty(te)?A||(A=[]):(A=A||[]).push(te,null));for(te in w){var X=w[te];if(V=C?.[te],w.hasOwnProperty(te)&&X!==V&&(X!=null||V!=null))if(te==="style")if(V){for(N in V)!V.hasOwnProperty(N)||X&&X.hasOwnProperty(N)||(m||(m={}),m[N]="");for(N in X)X.hasOwnProperty(N)&&V[N]!==X[N]&&(m||(m={}),m[N]=X[N])}else m||(A||(A=[]),A.push(te,m)),m=X;else te==="dangerouslySetInnerHTML"?(X=X?X.__html:void 0,V=V?V.__html:void 0,X!=null&&V!==X&&(A=A||[]).push(te,X)):te==="children"?typeof X!="string"&&typeof X!="number"||(A=A||[]).push(te,""+X):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(i.hasOwnProperty(te)?(X!=null&&te==="onScroll"&&St("scroll",c),A||V===X||(A=[])):(A=A||[]).push(te,X))}m&&(A=A||[]).push("style",m);var te=A;(h.updateQueue=te)&&(h.flags|=4)}},g3=function(c,h,m,w){m!==w&&(h.flags|=4)};function Vf(c,h){if(!At)switch(c.tailMode){case"hidden":h=c.tail;for(var m=null;h!==null;)h.alternate!==null&&(m=h),h=h.sibling;m===null?c.tail=null:m.sibling=null;break;case"collapsed":m=c.tail;for(var w=null;m!==null;)m.alternate!==null&&(w=m),m=m.sibling;w===null?h||c.tail===null?c.tail=null:c.tail.sibling=null:w.sibling=null}}function xr(c){var h=c.alternate!==null&&c.alternate.child===c.child,m=0,w=0;if(h)for(var C=c.child;C!==null;)m|=C.lanes|C.childLanes,w|=C.subtreeFlags&14680064,w|=C.flags&14680064,C.return=c,C=C.sibling;else for(C=c.child;C!==null;)m|=C.lanes|C.childLanes,w|=C.subtreeFlags,w|=C.flags,C.return=c,C=C.sibling;return c.subtreeFlags|=w,c.childLanes=m,h}function Koe(c,h,m){var w=h.pendingProps;switch(x_(h),h.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xr(h),null;case 1:return Gr(h.type)&&Wv(),xr(h),null;case 3:return w=h.stateNode,cu(),Ct($r),Ct(mr),I_(),w.pendingContext&&(w.context=w.pendingContext,w.pendingContext=null),(c===null||c.child===null)&&(Zv(h)?h.flags|=4:c===null||c.memoizedState.isDehydrated&&(h.flags&256)===0||(h.flags|=1024,ii!==null&&(lk(ii),ii=null))),Z_(c,h),xr(h),null;case 5:M_(h);var C=Es(zf.current);if(m=h.type,c!==null&&h.stateNode!=null)v3(c,h,m,w,C),c.ref!==h.ref&&(h.flags|=512,h.flags|=2097152);else{if(!w){if(h.stateNode===null)throw Error(r(166));return xr(h),null}if(c=Es(Li.current),Zv(h)){w=h.stateNode,m=h.type;var A=h.memoizedProps;switch(w[Mi]=h,w[If]=A,c=(h.mode&1)!==0,m){case"dialog":St("cancel",w),St("close",w);break;case"iframe":case"object":case"embed":St("load",w);break;case"video":case"audio":for(C=0;C<Df.length;C++)St(Df[C],w);break;case"source":St("error",w);break;case"img":case"image":case"link":St("error",w),St("load",w);break;case"details":St("toggle",w);break;case"input":nn(w,A),St("invalid",w);break;case"select":w._wrapperState={wasMultiple:!!A.multiple},St("invalid",w);break;case"textarea":xv(w,A),St("invalid",w)}ea(m,A),C=null;for(var N in A)if(A.hasOwnProperty(N)){var V=A[N];N==="children"?typeof V=="string"?w.textContent!==V&&(A.suppressHydrationWarning!==!0&&Uv(w.textContent,V,c),C=["children",V]):typeof V=="number"&&w.textContent!==""+V&&(A.suppressHydrationWarning!==!0&&Uv(w.textContent,V,c),C=["children",""+V]):i.hasOwnProperty(N)&&V!=null&&N==="onScroll"&&St("scroll",w)}switch(m){case"input":Le(w),xs(w,A,!0);break;case"textarea":Le(w),wv(w);break;case"select":case"option":break;default:typeof A.onClick=="function"&&(w.onclick=$v)}w=C,h.updateQueue=w,w!==null&&(h.flags|=4)}else{N=C.nodeType===9?C:C.ownerDocument,c==="http://www.w3.org/1999/xhtml"&&(c=_v(m)),c==="http://www.w3.org/1999/xhtml"?m==="script"?(c=N.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild)):typeof w.is=="string"?c=N.createElement(m,{is:w.is}):(c=N.createElement(m),m==="select"&&(N=c,w.multiple?N.multiple=!0:w.size&&(N.size=w.size))):c=N.createElementNS(c,m),c[Mi]=h,c[If]=w,p3(c,h,!1,!1),h.stateNode=c;e:{switch(N=ta(m,w),m){case"dialog":St("cancel",c),St("close",c),C=w;break;case"iframe":case"object":case"embed":St("load",c),C=w;break;case"video":case"audio":for(C=0;C<Df.length;C++)St(Df[C],c);C=w;break;case"source":St("error",c),C=w;break;case"img":case"image":case"link":St("error",c),St("load",c),C=w;break;case"details":St("toggle",c),C=w;break;case"input":nn(c,w),C=Tt(c,w),St("invalid",c);break;case"option":C=w;break;case"select":c._wrapperState={wasMultiple:!!w.multiple},C=I({},w,{value:void 0}),St("invalid",c);break;case"textarea":xv(c,w),C=Ji(c,w),St("invalid",c);break;default:C=w}ea(m,C),V=C;for(A in V)if(V.hasOwnProperty(A)){var X=V[A];A==="style"?on(c,X):A==="dangerouslySetInnerHTML"?(X=X?X.__html:void 0,X!=null&&He(c,X)):A==="children"?typeof X=="string"?(m!=="textarea"||X!=="")&&Ue(c,X):typeof X=="number"&&Ue(c,""+X):A!=="suppressContentEditableWarning"&&A!=="suppressHydrationWarning"&&A!=="autoFocus"&&(i.hasOwnProperty(A)?X!=null&&A==="onScroll"&&St("scroll",c):X!=null&&S(c,A,X,N))}switch(m){case"input":Le(c),xs(c,w,!1);break;case"textarea":Le(c),wv(c);break;case"option":w.value!=null&&c.setAttribute("value",""+be(w.value));break;case"select":c.multiple=!!w.multiple,A=w.value,A!=null?an(c,!!w.multiple,A,!1):w.defaultValue!=null&&an(c,!!w.multiple,w.defaultValue,!0);break;default:typeof C.onClick=="function"&&(c.onclick=$v)}switch(m){case"button":case"input":case"select":case"textarea":w=!!w.autoFocus;break e;case"img":w=!0;break e;default:w=!1}}w&&(h.flags|=4)}h.ref!==null&&(h.flags|=512,h.flags|=2097152)}return xr(h),null;case 6:if(c&&h.stateNode!=null)g3(c,h,c.memoizedProps,w);else{if(typeof w!="string"&&h.stateNode===null)throw Error(r(166));if(m=Es(zf.current),Es(Li.current),Zv(h)){if(w=h.stateNode,m=h.memoizedProps,w[Mi]=h,(A=w.nodeValue!==m)&&(c=un,c!==null))switch(c.tag){case 3:Uv(w.nodeValue,m,(c.mode&1)!==0);break;case 5:c.memoizedProps.suppressHydrationWarning!==!0&&Uv(w.nodeValue,m,(c.mode&1)!==0)}A&&(h.flags|=4)}else w=(m.nodeType===9?m:m.ownerDocument).createTextNode(w),w[Mi]=h,h.stateNode=w}return xr(h),null;case 13:if(Ct(Dt),w=h.memoizedState,c===null||c.memoizedState!==null&&c.memoizedState.dehydrated!==null){if(At&&cn!==null&&(h.mode&1)!==0&&(h.flags&128)===0)xO(),ou(),h.flags|=98560,A=!1;else if(A=Zv(h),w!==null&&w.dehydrated!==null){if(c===null){if(!A)throw Error(r(318));if(A=h.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(r(317));A[Mi]=h}else ou(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;xr(h),A=!1}else ii!==null&&(lk(ii),ii=null),A=!0;if(!A)return h.flags&65536?h:null}return(h.flags&128)!==0?(h.lanes=m,h):(w=w!==null,w!==(c!==null&&c.memoizedState!==null)&&w&&(h.child.flags|=8192,(h.mode&1)!==0&&(c===null||(Dt.current&1)!==0?Gt===0&&(Gt=3):fk())),h.updateQueue!==null&&(h.flags|=4),xr(h),null);case 4:return cu(),Z_(c,h),c===null&&Mf(h.stateNode.containerInfo),xr(h),null;case 10:return C_(h.type._context),xr(h),null;case 17:return Gr(h.type)&&Wv(),xr(h),null;case 19:if(Ct(Dt),A=h.memoizedState,A===null)return xr(h),null;if(w=(h.flags&128)!==0,N=A.rendering,N===null)if(w)Vf(A,!1);else{if(Gt!==0||c!==null&&(c.flags&128)!==0)for(c=h.child;c!==null;){if(N=ng(c),N!==null){for(h.flags|=128,Vf(A,!1),w=N.updateQueue,w!==null&&(h.updateQueue=w,h.flags|=4),h.subtreeFlags=0,w=m,m=h.child;m!==null;)A=m,c=w,A.flags&=14680066,N=A.alternate,N===null?(A.childLanes=0,A.lanes=c,A.child=null,A.subtreeFlags=0,A.memoizedProps=null,A.memoizedState=null,A.updateQueue=null,A.dependencies=null,A.stateNode=null):(A.childLanes=N.childLanes,A.lanes=N.lanes,A.child=N.child,A.subtreeFlags=0,A.deletions=null,A.memoizedProps=N.memoizedProps,A.memoizedState=N.memoizedState,A.updateQueue=N.updateQueue,A.type=N.type,c=N.dependencies,A.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext}),m=m.sibling;return wt(Dt,Dt.current&1|2),h.child}c=c.sibling}A.tail!==null&&Ot()>pu&&(h.flags|=128,w=!0,Vf(A,!1),h.lanes=4194304)}else{if(!w)if(c=ng(N),c!==null){if(h.flags|=128,w=!0,m=c.updateQueue,m!==null&&(h.updateQueue=m,h.flags|=4),Vf(A,!0),A.tail===null&&A.tailMode==="hidden"&&!N.alternate&&!At)return xr(h),null}else 2*Ot()-A.renderingStartTime>pu&&m!==1073741824&&(h.flags|=128,w=!0,Vf(A,!1),h.lanes=4194304);A.isBackwards?(N.sibling=h.child,h.child=N):(m=A.last,m!==null?m.sibling=N:h.child=N,A.last=N)}return A.tail!==null?(h=A.tail,A.rendering=h,A.tail=h.sibling,A.renderingStartTime=Ot(),h.sibling=null,m=Dt.current,wt(Dt,w?m&1|2:m&1),h):(xr(h),null);case 22:case 23:return ck(),w=h.memoizedState!==null,c!==null&&c.memoizedState!==null!==w&&(h.flags|=8192),w&&(h.mode&1)!==0?(fn&1073741824)!==0&&(xr(h),h.subtreeFlags&6&&(h.flags|=8192)):xr(h),null;case 24:return null;case 25:return null}throw Error(r(156,h.tag))}function Zoe(c,h){switch(x_(h),h.tag){case 1:return Gr(h.type)&&Wv(),c=h.flags,c&65536?(h.flags=c&-65537|128,h):null;case 3:return cu(),Ct($r),Ct(mr),I_(),c=h.flags,(c&65536)!==0&&(c&128)===0?(h.flags=c&-65537|128,h):null;case 5:return M_(h),null;case 13:if(Ct(Dt),c=h.memoizedState,c!==null&&c.dehydrated!==null){if(h.alternate===null)throw Error(r(340));ou()}return c=h.flags,c&65536?(h.flags=c&-65537|128,h):null;case 19:return Ct(Dt),null;case 4:return cu(),null;case 10:return C_(h.type._context),null;case 22:case 23:return ck(),null;case 24:return null;default:return null}}var dg=!1,br=!1,Qoe=typeof WeakSet=="function"?WeakSet:Set,we=null;function du(c,h){var m=c.ref;if(m!==null)if(typeof m=="function")try{m(null)}catch(w){Pt(c,h,w)}else m.current=null}function Q_(c,h,m){try{m()}catch(w){Pt(c,h,w)}}var m3=!1;function Joe(c,h){if(c_=Iv,c=q5(),r_(c)){if("selectionStart"in c)var m={start:c.selectionStart,end:c.selectionEnd};else e:{m=(m=c.ownerDocument)&&m.defaultView||window;var w=m.getSelection&&m.getSelection();if(w&&w.rangeCount!==0){m=w.anchorNode;var C=w.anchorOffset,A=w.focusNode;w=w.focusOffset;try{m.nodeType,A.nodeType}catch{m=null;break e}var N=0,V=-1,X=-1,te=0,se=0,le=c,oe=null;t:for(;;){for(var me;le!==m||C!==0&&le.nodeType!==3||(V=N+C),le!==A||w!==0&&le.nodeType!==3||(X=N+w),le.nodeType===3&&(N+=le.nodeValue.length),(me=le.firstChild)!==null;)oe=le,le=me;for(;;){if(le===c)break t;if(oe===m&&++te===C&&(V=N),oe===A&&++se===w&&(X=N),(me=le.nextSibling)!==null)break;le=oe,oe=le.parentNode}le=me}m=V===-1||X===-1?null:{start:V,end:X}}else m=null}m=m||{start:0,end:0}}else m=null;for(f_={focusedElem:c,selectionRange:m},Iv=!1,we=h;we!==null;)if(h=we,c=h.child,(h.subtreeFlags&1028)!==0&&c!==null)c.return=h,we=c;else for(;we!==null;){h=we;try{var ke=h.alternate;if((h.flags&1024)!==0)switch(h.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var Ce=ke.memoizedProps,zt=ke.memoizedState,Q=h.stateNode,q=Q.getSnapshotBeforeUpdate(h.elementType===h.type?Ce:ai(h.type,Ce),zt);Q.__reactInternalSnapshotBeforeUpdate=q}break;case 3:var J=h.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(fe){Pt(h,h.return,fe)}if(c=h.sibling,c!==null){c.return=h.return,we=c;break}we=h.return}return ke=m3,m3=!1,ke}function Uf(c,h,m){var w=h.updateQueue;if(w=w!==null?w.lastEffect:null,w!==null){var C=w=w.next;do{if((C.tag&c)===c){var A=C.destroy;C.destroy=void 0,A!==void 0&&Q_(h,m,A)}C=C.next}while(C!==w)}}function hg(c,h){if(h=h.updateQueue,h=h!==null?h.lastEffect:null,h!==null){var m=h=h.next;do{if((m.tag&c)===c){var w=m.create;m.destroy=w()}m=m.next}while(m!==h)}}function J_(c){var h=c.ref;if(h!==null){var m=c.stateNode;c.tag,c=m,typeof h=="function"?h(c):h.current=c}}function y3(c){var h=c.alternate;h!==null&&(c.alternate=null,y3(h)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(h=c.stateNode,h!==null&&(delete h[Mi],delete h[If],delete h[v_],delete h[Roe],delete h[Ooe])),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}function x3(c){return c.tag===5||c.tag===3||c.tag===4}function b3(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||x3(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function ek(c,h,m){var w=c.tag;if(w===5||w===6)c=c.stateNode,h?m.nodeType===8?m.parentNode.insertBefore(c,h):m.insertBefore(c,h):(m.nodeType===8?(h=m.parentNode,h.insertBefore(c,m)):(h=m,h.appendChild(c)),m=m._reactRootContainer,m!=null||h.onclick!==null||(h.onclick=$v));else if(w!==4&&(c=c.child,c!==null))for(ek(c,h,m),c=c.sibling;c!==null;)ek(c,h,m),c=c.sibling}function tk(c,h,m){var w=c.tag;if(w===5||w===6)c=c.stateNode,h?m.insertBefore(c,h):m.appendChild(c);else if(w!==4&&(c=c.child,c!==null))for(tk(c,h,m),c=c.sibling;c!==null;)tk(c,h,m),c=c.sibling}var or=null,oi=!1;function ro(c,h,m){for(m=m.child;m!==null;)w3(c,h,m),m=m.sibling}function w3(c,h,m){if(Di&&typeof Di.onCommitFiberUnmount=="function")try{Di.onCommitFiberUnmount(Tv,m)}catch{}switch(m.tag){case 5:br||du(m,h);case 6:var w=or,C=oi;or=null,ro(c,h,m),or=w,oi=C,or!==null&&(oi?(c=or,m=m.stateNode,c.nodeType===8?c.parentNode.removeChild(m):c.removeChild(m)):or.removeChild(m.stateNode));break;case 18:or!==null&&(oi?(c=or,m=m.stateNode,c.nodeType===8?p_(c.parentNode,m):c.nodeType===1&&p_(c,m),wf(c)):p_(or,m.stateNode));break;case 4:w=or,C=oi,or=m.stateNode.containerInfo,oi=!0,ro(c,h,m),or=w,oi=C;break;case 0:case 11:case 14:case 15:if(!br&&(w=m.updateQueue,w!==null&&(w=w.lastEffect,w!==null))){C=w=w.next;do{var A=C,N=A.destroy;A=A.tag,N!==void 0&&((A&2)!==0||(A&4)!==0)&&Q_(m,h,N),C=C.next}while(C!==w)}ro(c,h,m);break;case 1:if(!br&&(du(m,h),w=m.stateNode,typeof w.componentWillUnmount=="function"))try{w.props=m.memoizedProps,w.state=m.memoizedState,w.componentWillUnmount()}catch(V){Pt(m,h,V)}ro(c,h,m);break;case 21:ro(c,h,m);break;case 22:m.mode&1?(br=(w=br)||m.memoizedState!==null,ro(c,h,m),br=w):ro(c,h,m);break;default:ro(c,h,m)}}function _3(c){var h=c.updateQueue;if(h!==null){c.updateQueue=null;var m=c.stateNode;m===null&&(m=c.stateNode=new Qoe),h.forEach(function(w){var C=lse.bind(null,c,w);m.has(w)||(m.add(w),w.then(C,C))})}}function si(c,h){var m=h.deletions;if(m!==null)for(var w=0;w<m.length;w++){var C=m[w];try{var A=c,N=h,V=N;e:for(;V!==null;){switch(V.tag){case 5:or=V.stateNode,oi=!1;break e;case 3:or=V.stateNode.containerInfo,oi=!0;break e;case 4:or=V.stateNode.containerInfo,oi=!0;break e}V=V.return}if(or===null)throw Error(r(160));w3(A,N,C),or=null,oi=!1;var X=C.alternate;X!==null&&(X.return=null),C.return=null}catch(te){Pt(C,h,te)}}if(h.subtreeFlags&12854)for(h=h.child;h!==null;)k3(h,c),h=h.sibling}function k3(c,h){var m=c.alternate,w=c.flags;switch(c.tag){case 0:case 11:case 14:case 15:if(si(h,c),Pi(c),w&4){try{Uf(3,c,c.return),hg(3,c)}catch(Ce){Pt(c,c.return,Ce)}try{Uf(5,c,c.return)}catch(Ce){Pt(c,c.return,Ce)}}break;case 1:si(h,c),Pi(c),w&512&&m!==null&&du(m,m.return);break;case 5:if(si(h,c),Pi(c),w&512&&m!==null&&du(m,m.return),c.flags&32){var C=c.stateNode;try{Ue(C,"")}catch(Ce){Pt(c,c.return,Ce)}}if(w&4&&(C=c.stateNode,C!=null)){var A=c.memoizedProps,N=m!==null?m.memoizedProps:A,V=c.type,X=c.updateQueue;if(c.updateQueue=null,X!==null)try{V==="input"&&A.type==="radio"&&A.name!=null&&Dr(C,A),ta(V,N);var te=ta(V,A);for(N=0;N<X.length;N+=2){var se=X[N],le=X[N+1];se==="style"?on(C,le):se==="dangerouslySetInnerHTML"?He(C,le):se==="children"?Ue(C,le):S(C,se,le,te)}switch(V){case"input":Ur(C,A);break;case"textarea":bv(C,A);break;case"select":var oe=C._wrapperState.wasMultiple;C._wrapperState.wasMultiple=!!A.multiple;var me=A.value;me!=null?an(C,!!A.multiple,me,!1):oe!==!!A.multiple&&(A.defaultValue!=null?an(C,!!A.multiple,A.defaultValue,!0):an(C,!!A.multiple,A.multiple?[]:"",!1))}C[If]=A}catch(Ce){Pt(c,c.return,Ce)}}break;case 6:if(si(h,c),Pi(c),w&4){if(c.stateNode===null)throw Error(r(162));C=c.stateNode,A=c.memoizedProps;try{C.nodeValue=A}catch(Ce){Pt(c,c.return,Ce)}}break;case 3:if(si(h,c),Pi(c),w&4&&m!==null&&m.memoizedState.isDehydrated)try{wf(h.containerInfo)}catch(Ce){Pt(c,c.return,Ce)}break;case 4:si(h,c),Pi(c);break;case 13:si(h,c),Pi(c),C=c.child,C.flags&8192&&(A=C.memoizedState!==null,C.stateNode.isHidden=A,!A||C.alternate!==null&&C.alternate.memoizedState!==null||(ik=Ot())),w&4&&_3(c);break;case 22:if(se=m!==null&&m.memoizedState!==null,c.mode&1?(br=(te=br)||se,si(h,c),br=te):si(h,c),Pi(c),w&8192){if(te=c.memoizedState!==null,(c.stateNode.isHidden=te)&&!se&&(c.mode&1)!==0)for(we=c,se=c.child;se!==null;){for(le=we=se;we!==null;){switch(oe=we,me=oe.child,oe.tag){case 0:case 11:case 14:case 15:Uf(4,oe,oe.return);break;case 1:du(oe,oe.return);var ke=oe.stateNode;if(typeof ke.componentWillUnmount=="function"){w=oe,m=oe.return;try{h=w,ke.props=h.memoizedProps,ke.state=h.memoizedState,ke.componentWillUnmount()}catch(Ce){Pt(w,m,Ce)}}break;case 5:du(oe,oe.return);break;case 22:if(oe.memoizedState!==null){T3(le);continue}}me!==null?(me.return=oe,we=me):T3(le)}se=se.sibling}e:for(se=null,le=c;;){if(le.tag===5){if(se===null){se=le;try{C=le.stateNode,te?(A=C.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none"):(V=le.stateNode,X=le.memoizedProps.style,N=X!=null&&X.hasOwnProperty("display")?X.display:null,V.style.display=ir("display",N))}catch(Ce){Pt(c,c.return,Ce)}}}else if(le.tag===6){if(se===null)try{le.stateNode.nodeValue=te?"":le.memoizedProps}catch(Ce){Pt(c,c.return,Ce)}}else if((le.tag!==22&&le.tag!==23||le.memoizedState===null||le===c)&&le.child!==null){le.child.return=le,le=le.child;continue}if(le===c)break e;for(;le.sibling===null;){if(le.return===null||le.return===c)break e;se===le&&(se=null),le=le.return}se===le&&(se=null),le.sibling.return=le.return,le=le.sibling}}break;case 19:si(h,c),Pi(c),w&4&&_3(c);break;case 21:break;default:si(h,c),Pi(c)}}function Pi(c){var h=c.flags;if(h&2){try{e:{for(var m=c.return;m!==null;){if(x3(m)){var w=m;break e}m=m.return}throw Error(r(160))}switch(w.tag){case 5:var C=w.stateNode;w.flags&32&&(Ue(C,""),w.flags&=-33);var A=b3(c);tk(c,A,C);break;case 3:case 4:var N=w.stateNode.containerInfo,V=b3(c);ek(c,V,N);break;default:throw Error(r(161))}}catch(X){Pt(c,c.return,X)}c.flags&=-3}h&4096&&(c.flags&=-4097)}function ese(c,h,m){we=c,S3(c)}function S3(c,h,m){for(var w=(c.mode&1)!==0;we!==null;){var C=we,A=C.child;if(C.tag===22&&w){var N=C.memoizedState!==null||dg;if(!N){var V=C.alternate,X=V!==null&&V.memoizedState!==null||br;V=dg;var te=br;if(dg=N,(br=X)&&!te)for(we=C;we!==null;)N=we,X=N.child,N.tag===22&&N.memoizedState!==null?A3(C):X!==null?(X.return=N,we=X):A3(C);for(;A!==null;)we=A,S3(A),A=A.sibling;we=C,dg=V,br=te}C3(c)}else(C.subtreeFlags&8772)!==0&&A!==null?(A.return=C,we=A):C3(c)}}function C3(c){for(;we!==null;){var h=we;if((h.flags&8772)!==0){var m=h.alternate;try{if((h.flags&8772)!==0)switch(h.tag){case 0:case 11:case 15:br||hg(5,h);break;case 1:var w=h.stateNode;if(h.flags&4&&!br)if(m===null)w.componentDidMount();else{var C=h.elementType===h.type?m.memoizedProps:ai(h.type,m.memoizedProps);w.componentDidUpdate(C,m.memoizedState,w.__reactInternalSnapshotBeforeUpdate)}var A=h.updateQueue;A!==null&&TO(h,A,w);break;case 3:var N=h.updateQueue;if(N!==null){if(m=null,h.child!==null)switch(h.child.tag){case 5:m=h.child.stateNode;break;case 1:m=h.child.stateNode}TO(h,N,m)}break;case 5:var V=h.stateNode;if(m===null&&h.flags&4){m=V;var X=h.memoizedProps;switch(h.type){case"button":case"input":case"select":case"textarea":X.autoFocus&&m.focus();break;case"img":X.src&&(m.src=X.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(h.memoizedState===null){var te=h.alternate;if(te!==null){var se=te.memoizedState;if(se!==null){var le=se.dehydrated;le!==null&&wf(le)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}br||h.flags&512&&J_(h)}catch(oe){Pt(h,h.return,oe)}}if(h===c){we=null;break}if(m=h.sibling,m!==null){m.return=h.return,we=m;break}we=h.return}}function T3(c){for(;we!==null;){var h=we;if(h===c){we=null;break}var m=h.sibling;if(m!==null){m.return=h.return,we=m;break}we=h.return}}function A3(c){for(;we!==null;){var h=we;try{switch(h.tag){case 0:case 11:case 15:var m=h.return;try{hg(4,h)}catch(X){Pt(h,m,X)}break;case 1:var w=h.stateNode;if(typeof w.componentDidMount=="function"){var C=h.return;try{w.componentDidMount()}catch(X){Pt(h,C,X)}}var A=h.return;try{J_(h)}catch(X){Pt(h,A,X)}break;case 5:var N=h.return;try{J_(h)}catch(X){Pt(h,N,X)}}}catch(X){Pt(h,h.return,X)}if(h===c){we=null;break}var V=h.sibling;if(V!==null){V.return=h.return,we=V;break}we=h.return}}var tse=Math.ceil,pg=T.ReactCurrentDispatcher,rk=T.ReactCurrentOwner,Bn=T.ReactCurrentBatchConfig,rt=0,qt=null,Ut=null,sr=0,fn=0,hu=Za(0),Gt=0,$f=null,Ms=0,vg=0,nk=0,Gf=null,Yr=null,ik=0,pu=1/0,ua=null,gg=!1,ak=null,no=null,mg=!1,io=null,yg=0,Wf=0,ok=null,xg=-1,bg=0;function Lr(){return(rt&6)!==0?Ot():xg!==-1?xg:xg=Ot()}function ao(c){return(c.mode&1)===0?1:(rt&2)!==0&&sr!==0?sr&-sr:Foe.transition!==null?(bg===0&&(bg=b5()),bg):(c=ht,c!==0||(c=window.event,c=c===void 0?16:D5(c.type)),c)}function li(c,h,m,w){if(50<Wf)throw Wf=0,ok=null,Error(r(185));gf(c,m,w),((rt&2)===0||c!==qt)&&(c===qt&&((rt&2)===0&&(vg|=m),Gt===4&&oo(c,sr)),Xr(c,w),m===1&&rt===0&&(h.mode&1)===0&&(pu=Ot()+500,Xv&&Ja()))}function Xr(c,h){var m=c.callbackNode;Fae(c,h);var w=Dv(c,c===qt?sr:0);if(w===0)m!==null&&m5(m),c.callbackNode=null,c.callbackPriority=0;else if(h=w&-w,c.callbackPriority!==h){if(m!=null&&m5(m),h===1)c.tag===0?zoe(D3.bind(null,c)):pO(D3.bind(null,c)),Poe(function(){(rt&6)===0&&Ja()}),m=null;else{switch(w5(w)){case 1:m=Bw;break;case 4:m=y5;break;case 16:m=Cv;break;case 536870912:m=x5;break;default:m=Cv}m=z3(m,E3.bind(null,c))}c.callbackPriority=h,c.callbackNode=m}}function E3(c,h){if(xg=-1,bg=0,(rt&6)!==0)throw Error(r(327));var m=c.callbackNode;if(vu()&&c.callbackNode!==m)return null;var w=Dv(c,c===qt?sr:0);if(w===0)return null;if((w&30)!==0||(w&c.expiredLanes)!==0||h)h=wg(c,w);else{h=w;var C=rt;rt|=2;var A=L3();(qt!==c||sr!==h)&&(ua=null,pu=Ot()+500,Is(c,h));do try{ise();break}catch(V){M3(c,V)}while(!0);S_(),pg.current=A,rt=C,Ut!==null?h=0:(qt=null,sr=0,h=Gt)}if(h!==0){if(h===2&&(C=jw(c),C!==0&&(w=C,h=sk(c,C))),h===1)throw m=$f,Is(c,0),oo(c,w),Xr(c,Ot()),m;if(h===6)oo(c,w);else{if(C=c.current.alternate,(w&30)===0&&!rse(C)&&(h=wg(c,w),h===2&&(A=jw(c),A!==0&&(w=A,h=sk(c,A))),h===1))throw m=$f,Is(c,0),oo(c,w),Xr(c,Ot()),m;switch(c.finishedWork=C,c.finishedLanes=w,h){case 0:case 1:throw Error(r(345));case 2:Ps(c,Yr,ua);break;case 3:if(oo(c,w),(w&130023424)===w&&(h=ik+500-Ot(),10<h)){if(Dv(c,0)!==0)break;if(C=c.suspendedLanes,(C&w)!==w){Lr(),c.pingedLanes|=c.suspendedLanes&C;break}c.timeoutHandle=h_(Ps.bind(null,c,Yr,ua),h);break}Ps(c,Yr,ua);break;case 4:if(oo(c,w),(w&4194240)===w)break;for(h=c.eventTimes,C=-1;0<w;){var N=31-ri(w);A=1<<N,N=h[N],N>C&&(C=N),w&=~A}if(w=C,w=Ot()-w,w=(120>w?120:480>w?480:1080>w?1080:1920>w?1920:3e3>w?3e3:4320>w?4320:1960*tse(w/1960))-w,10<w){c.timeoutHandle=h_(Ps.bind(null,c,Yr,ua),w);break}Ps(c,Yr,ua);break;case 5:Ps(c,Yr,ua);break;default:throw Error(r(329))}}}return Xr(c,Ot()),c.callbackNode===m?E3.bind(null,c):null}function sk(c,h){var m=Gf;return c.current.memoizedState.isDehydrated&&(Is(c,h).flags|=256),c=wg(c,h),c!==2&&(h=Yr,Yr=m,h!==null&&lk(h)),c}function lk(c){Yr===null?Yr=c:Yr.push.apply(Yr,c)}function rse(c){for(var h=c;;){if(h.flags&16384){var m=h.updateQueue;if(m!==null&&(m=m.stores,m!==null))for(var w=0;w<m.length;w++){var C=m[w],A=C.getSnapshot;C=C.value;try{if(!ni(A(),C))return!1}catch{return!1}}}if(m=h.child,h.subtreeFlags&16384&&m!==null)m.return=h,h=m;else{if(h===c)break;for(;h.sibling===null;){if(h.return===null||h.return===c)return!0;h=h.return}h.sibling.return=h.return,h=h.sibling}}return!0}function oo(c,h){for(h&=~nk,h&=~vg,c.suspendedLanes|=h,c.pingedLanes&=~h,c=c.expirationTimes;0<h;){var m=31-ri(h),w=1<<m;c[m]=-1,h&=~w}}function D3(c){if((rt&6)!==0)throw Error(r(327));vu();var h=Dv(c,0);if((h&1)===0)return Xr(c,Ot()),null;var m=wg(c,h);if(c.tag!==0&&m===2){var w=jw(c);w!==0&&(h=w,m=sk(c,w))}if(m===1)throw m=$f,Is(c,0),oo(c,h),Xr(c,Ot()),m;if(m===6)throw Error(r(345));return c.finishedWork=c.current.alternate,c.finishedLanes=h,Ps(c,Yr,ua),Xr(c,Ot()),null}function uk(c,h){var m=rt;rt|=1;try{return c(h)}finally{rt=m,rt===0&&(pu=Ot()+500,Xv&&Ja())}}function Ls(c){io!==null&&io.tag===0&&(rt&6)===0&&vu();var h=rt;rt|=1;var m=Bn.transition,w=ht;try{if(Bn.transition=null,ht=1,c)return c()}finally{ht=w,Bn.transition=m,rt=h,(rt&6)===0&&Ja()}}function ck(){fn=hu.current,Ct(hu)}function Is(c,h){c.finishedWork=null,c.finishedLanes=0;var m=c.timeoutHandle;if(m!==-1&&(c.timeoutHandle=-1,Ioe(m)),Ut!==null)for(m=Ut.return;m!==null;){var w=m;switch(x_(w),w.tag){case 1:w=w.type.childContextTypes,w!=null&&Wv();break;case 3:cu(),Ct($r),Ct(mr),I_();break;case 5:M_(w);break;case 4:cu();break;case 13:Ct(Dt);break;case 19:Ct(Dt);break;case 10:C_(w.type._context);break;case 22:case 23:ck()}m=m.return}if(qt=c,Ut=c=so(c.current,null),sr=fn=h,Gt=0,$f=null,nk=vg=Ms=0,Yr=Gf=null,As!==null){for(h=0;h<As.length;h++)if(m=As[h],w=m.interleaved,w!==null){m.interleaved=null;var C=w.next,A=m.pending;if(A!==null){var N=A.next;A.next=C,w.next=N}m.pending=w}As=null}return c}function M3(c,h){do{var m=Ut;try{if(S_(),ig.current=lg,ag){for(var w=Mt.memoizedState;w!==null;){var C=w.queue;C!==null&&(C.pending=null),w=w.next}ag=!1}if(Ds=0,Xt=$t=Mt=null,Ff=!1,Bf=0,rk.current=null,m===null||m.return===null){Gt=1,$f=h,Ut=null;break}e:{var A=c,N=m.return,V=m,X=h;if(h=sr,V.flags|=32768,X!==null&&typeof X=="object"&&typeof X.then=="function"){var te=X,se=V,le=se.tag;if((se.mode&1)===0&&(le===0||le===11||le===15)){var oe=se.alternate;oe?(se.updateQueue=oe.updateQueue,se.memoizedState=oe.memoizedState,se.lanes=oe.lanes):(se.updateQueue=null,se.memoizedState=null)}var me=t3(N);if(me!==null){me.flags&=-257,r3(me,N,V,A,h),me.mode&1&&e3(A,te,h),h=me,X=te;var ke=h.updateQueue;if(ke===null){var Ce=new Set;Ce.add(X),h.updateQueue=Ce}else ke.add(X);break e}else{if((h&1)===0){e3(A,te,h),fk();break e}X=Error(r(426))}}else if(At&&V.mode&1){var zt=t3(N);if(zt!==null){(zt.flags&65536)===0&&(zt.flags|=256),r3(zt,N,V,A,h),__(fu(X,V));break e}}A=X=fu(X,V),Gt!==4&&(Gt=2),Gf===null?Gf=[A]:Gf.push(A),A=N;do{switch(A.tag){case 3:A.flags|=65536,h&=-h,A.lanes|=h;var Q=QO(A,X,h);CO(A,Q);break e;case 1:V=X;var q=A.type,J=A.stateNode;if((A.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(no===null||!no.has(J)))){A.flags|=65536,h&=-h,A.lanes|=h;var fe=JO(A,V,h);CO(A,fe);break e}}A=A.return}while(A!==null)}P3(m)}catch(Te){h=Te,Ut===m&&m!==null&&(Ut=m=m.return);continue}break}while(!0)}function L3(){var c=pg.current;return pg.current=lg,c===null?lg:c}function fk(){(Gt===0||Gt===3||Gt===2)&&(Gt=4),qt===null||(Ms&268435455)===0&&(vg&268435455)===0||oo(qt,sr)}function wg(c,h){var m=rt;rt|=2;var w=L3();(qt!==c||sr!==h)&&(ua=null,Is(c,h));do try{nse();break}catch(C){M3(c,C)}while(!0);if(S_(),rt=m,pg.current=w,Ut!==null)throw Error(r(261));return qt=null,sr=0,Gt}function nse(){for(;Ut!==null;)I3(Ut)}function ise(){for(;Ut!==null&&!Dae();)I3(Ut)}function I3(c){var h=O3(c.alternate,c,fn);c.memoizedProps=c.pendingProps,h===null?P3(c):Ut=h,rk.current=null}function P3(c){var h=c;do{var m=h.alternate;if(c=h.return,(h.flags&32768)===0){if(m=Koe(m,h,fn),m!==null){Ut=m;return}}else{if(m=Zoe(m,h),m!==null){m.flags&=32767,Ut=m;return}if(c!==null)c.flags|=32768,c.subtreeFlags=0,c.deletions=null;else{Gt=6,Ut=null;return}}if(h=h.sibling,h!==null){Ut=h;return}Ut=h=c}while(h!==null);Gt===0&&(Gt=5)}function Ps(c,h,m){var w=ht,C=Bn.transition;try{Bn.transition=null,ht=1,ase(c,h,m,w)}finally{Bn.transition=C,ht=w}return null}function ase(c,h,m,w){do vu();while(io!==null);if((rt&6)!==0)throw Error(r(327));m=c.finishedWork;var C=c.finishedLanes;if(m===null)return null;if(c.finishedWork=null,c.finishedLanes=0,m===c.current)throw Error(r(177));c.callbackNode=null,c.callbackPriority=0;var A=m.lanes|m.childLanes;if(Bae(c,A),c===qt&&(Ut=qt=null,sr=0),(m.subtreeFlags&2064)===0&&(m.flags&2064)===0||mg||(mg=!0,z3(Cv,function(){return vu(),null})),A=(m.flags&15990)!==0,(m.subtreeFlags&15990)!==0||A){A=Bn.transition,Bn.transition=null;var N=ht;ht=1;var V=rt;rt|=4,rk.current=null,Joe(c,m),k3(m,c),Coe(f_),Iv=!!c_,f_=c_=null,c.current=m,ese(m),Mae(),rt=V,ht=N,Bn.transition=A}else c.current=m;if(mg&&(mg=!1,io=c,yg=C),A=c.pendingLanes,A===0&&(no=null),Pae(m.stateNode),Xr(c,Ot()),h!==null)for(w=c.onRecoverableError,m=0;m<h.length;m++)C=h[m],w(C.value,{componentStack:C.stack,digest:C.digest});if(gg)throw gg=!1,c=ak,ak=null,c;return(yg&1)!==0&&c.tag!==0&&vu(),A=c.pendingLanes,(A&1)!==0?c===ok?Wf++:(Wf=0,ok=c):Wf=0,Ja(),null}function vu(){if(io!==null){var c=w5(yg),h=Bn.transition,m=ht;try{if(Bn.transition=null,ht=16>c?16:c,io===null)var w=!1;else{if(c=io,io=null,yg=0,(rt&6)!==0)throw Error(r(331));var C=rt;for(rt|=4,we=c.current;we!==null;){var A=we,N=A.child;if((we.flags&16)!==0){var V=A.deletions;if(V!==null){for(var X=0;X<V.length;X++){var te=V[X];for(we=te;we!==null;){var se=we;switch(se.tag){case 0:case 11:case 15:Uf(8,se,A)}var le=se.child;if(le!==null)le.return=se,we=le;else for(;we!==null;){se=we;var oe=se.sibling,me=se.return;if(y3(se),se===te){we=null;break}if(oe!==null){oe.return=me,we=oe;break}we=me}}}var ke=A.alternate;if(ke!==null){var Ce=ke.child;if(Ce!==null){ke.child=null;do{var zt=Ce.sibling;Ce.sibling=null,Ce=zt}while(Ce!==null)}}we=A}}if((A.subtreeFlags&2064)!==0&&N!==null)N.return=A,we=N;else e:for(;we!==null;){if(A=we,(A.flags&2048)!==0)switch(A.tag){case 0:case 11:case 15:Uf(9,A,A.return)}var Q=A.sibling;if(Q!==null){Q.return=A.return,we=Q;break e}we=A.return}}var q=c.current;for(we=q;we!==null;){N=we;var J=N.child;if((N.subtreeFlags&2064)!==0&&J!==null)J.return=N,we=J;else e:for(N=q;we!==null;){if(V=we,(V.flags&2048)!==0)try{switch(V.tag){case 0:case 11:case 15:hg(9,V)}}catch(Te){Pt(V,V.return,Te)}if(V===N){we=null;break e}var fe=V.sibling;if(fe!==null){fe.return=V.return,we=fe;break e}we=V.return}}if(rt=C,Ja(),Di&&typeof Di.onPostCommitFiberRoot=="function")try{Di.onPostCommitFiberRoot(Tv,c)}catch{}w=!0}return w}finally{ht=m,Bn.transition=h}}return!1}function N3(c,h,m){h=fu(m,h),h=QO(c,h,1),c=to(c,h,1),h=Lr(),c!==null&&(gf(c,1,h),Xr(c,h))}function Pt(c,h,m){if(c.tag===3)N3(c,c,m);else for(;h!==null;){if(h.tag===3){N3(h,c,m);break}else if(h.tag===1){var w=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof w.componentDidCatch=="function"&&(no===null||!no.has(w))){c=fu(m,c),c=JO(h,c,1),h=to(h,c,1),c=Lr(),h!==null&&(gf(h,1,c),Xr(h,c));break}}h=h.return}}function ose(c,h,m){var w=c.pingCache;w!==null&&w.delete(h),h=Lr(),c.pingedLanes|=c.suspendedLanes&m,qt===c&&(sr&m)===m&&(Gt===4||Gt===3&&(sr&130023424)===sr&&500>Ot()-ik?Is(c,0):nk|=m),Xr(c,h)}function R3(c,h){h===0&&((c.mode&1)===0?h=1:(h=Ev,Ev<<=1,(Ev&130023424)===0&&(Ev=4194304)));var m=Lr();c=oa(c,h),c!==null&&(gf(c,h,m),Xr(c,m))}function sse(c){var h=c.memoizedState,m=0;h!==null&&(m=h.retryLane),R3(c,m)}function lse(c,h){var m=0;switch(c.tag){case 13:var w=c.stateNode,C=c.memoizedState;C!==null&&(m=C.retryLane);break;case 19:w=c.stateNode;break;default:throw Error(r(314))}w!==null&&w.delete(h),R3(c,m)}var O3;O3=function(c,h,m){if(c!==null)if(c.memoizedProps!==h.pendingProps||$r.current)Wr=!0;else{if((c.lanes&m)===0&&(h.flags&128)===0)return Wr=!1,qoe(c,h,m);Wr=(c.flags&131072)!==0}else Wr=!1,At&&(h.flags&1048576)!==0&&vO(h,Kv,h.index);switch(h.lanes=0,h.tag){case 2:var w=h.type;fg(c,h),c=h.pendingProps;var C=nu(h,mr.current);uu(h,m),C=R_(null,h,w,c,C,m);var A=O_();return h.flags|=1,typeof C=="object"&&C!==null&&typeof C.render=="function"&&C.$$typeof===void 0?(h.tag=1,h.memoizedState=null,h.updateQueue=null,Gr(w)?(A=!0,Yv(h)):A=!1,h.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,E_(h),C.updater=ug,h.stateNode=C,C._reactInternals=h,V_(h,w,c,m),h=W_(null,h,w,!0,A,m)):(h.tag=0,At&&A&&y_(h),Mr(null,h,C,m),h=h.child),h;case 16:w=h.elementType;e:{switch(fg(c,h),c=h.pendingProps,C=w._init,w=C(w._payload),h.type=w,C=h.tag=cse(w),c=ai(w,c),C){case 0:h=G_(null,h,w,c,m);break e;case 1:h=l3(null,h,w,c,m);break e;case 11:h=n3(null,h,w,c,m);break e;case 14:h=i3(null,h,w,ai(w.type,c),m);break e}throw Error(r(306,w,""))}return h;case 0:return w=h.type,C=h.pendingProps,C=h.elementType===w?C:ai(w,C),G_(c,h,w,C,m);case 1:return w=h.type,C=h.pendingProps,C=h.elementType===w?C:ai(w,C),l3(c,h,w,C,m);case 3:e:{if(u3(h),c===null)throw Error(r(387));w=h.pendingProps,A=h.memoizedState,C=A.element,SO(c,h),rg(h,w,null,m);var N=h.memoizedState;if(w=N.element,A.isDehydrated)if(A={element:w,isDehydrated:!1,cache:N.cache,pendingSuspenseBoundaries:N.pendingSuspenseBoundaries,transitions:N.transitions},h.updateQueue.baseState=A,h.memoizedState=A,h.flags&256){C=fu(Error(r(423)),h),h=c3(c,h,w,m,C);break e}else if(w!==C){C=fu(Error(r(424)),h),h=c3(c,h,w,m,C);break e}else for(cn=Ka(h.stateNode.containerInfo.firstChild),un=h,At=!0,ii=null,m=_O(h,null,w,m),h.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling;else{if(ou(),w===C){h=la(c,h,m);break e}Mr(c,h,w,m)}h=h.child}return h;case 5:return AO(h),c===null&&w_(h),w=h.type,C=h.pendingProps,A=c!==null?c.memoizedProps:null,N=C.children,d_(w,C)?N=null:A!==null&&d_(w,A)&&(h.flags|=32),s3(c,h),Mr(c,h,N,m),h.child;case 6:return c===null&&w_(h),null;case 13:return f3(c,h,m);case 4:return D_(h,h.stateNode.containerInfo),w=h.pendingProps,c===null?h.child=su(h,null,w,m):Mr(c,h,w,m),h.child;case 11:return w=h.type,C=h.pendingProps,C=h.elementType===w?C:ai(w,C),n3(c,h,w,C,m);case 7:return Mr(c,h,h.pendingProps,m),h.child;case 8:return Mr(c,h,h.pendingProps.children,m),h.child;case 12:return Mr(c,h,h.pendingProps.children,m),h.child;case 10:e:{if(w=h.type._context,C=h.pendingProps,A=h.memoizedProps,N=C.value,wt(Jv,w._currentValue),w._currentValue=N,A!==null)if(ni(A.value,N)){if(A.children===C.children&&!$r.current){h=la(c,h,m);break e}}else for(A=h.child,A!==null&&(A.return=h);A!==null;){var V=A.dependencies;if(V!==null){N=A.child;for(var X=V.firstContext;X!==null;){if(X.context===w){if(A.tag===1){X=sa(-1,m&-m),X.tag=2;var te=A.updateQueue;if(te!==null){te=te.shared;var se=te.pending;se===null?X.next=X:(X.next=se.next,se.next=X),te.pending=X}}A.lanes|=m,X=A.alternate,X!==null&&(X.lanes|=m),T_(A.return,m,h),V.lanes|=m;break}X=X.next}}else if(A.tag===10)N=A.type===h.type?null:A.child;else if(A.tag===18){if(N=A.return,N===null)throw Error(r(341));N.lanes|=m,V=N.alternate,V!==null&&(V.lanes|=m),T_(N,m,h),N=A.sibling}else N=A.child;if(N!==null)N.return=A;else for(N=A;N!==null;){if(N===h){N=null;break}if(A=N.sibling,A!==null){A.return=N.return,N=A;break}N=N.return}A=N}Mr(c,h,C.children,m),h=h.child}return h;case 9:return C=h.type,w=h.pendingProps.children,uu(h,m),C=zn(C),w=w(C),h.flags|=1,Mr(c,h,w,m),h.child;case 14:return w=h.type,C=ai(w,h.pendingProps),C=ai(w.type,C),i3(c,h,w,C,m);case 15:return a3(c,h,h.type,h.pendingProps,m);case 17:return w=h.type,C=h.pendingProps,C=h.elementType===w?C:ai(w,C),fg(c,h),h.tag=1,Gr(w)?(c=!0,Yv(h)):c=!1,uu(h,m),KO(h,w,C),V_(h,w,C,m),W_(null,h,w,!0,c,m);case 19:return h3(c,h,m);case 22:return o3(c,h,m)}throw Error(r(156,h.tag))};function z3(c,h){return g5(c,h)}function use(c,h,m,w){this.tag=c,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=w,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jn(c,h,m,w){return new use(c,h,m,w)}function dk(c){return c=c.prototype,!(!c||!c.isReactComponent)}function cse(c){if(typeof c=="function")return dk(c)?1:0;if(c!=null){if(c=c.$$typeof,c===j)return 11;if(c===K)return 14}return 2}function so(c,h){var m=c.alternate;return m===null?(m=jn(c.tag,h,c.key,c.mode),m.elementType=c.elementType,m.type=c.type,m.stateNode=c.stateNode,m.alternate=c,c.alternate=m):(m.pendingProps=h,m.type=c.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=c.flags&14680064,m.childLanes=c.childLanes,m.lanes=c.lanes,m.child=c.child,m.memoizedProps=c.memoizedProps,m.memoizedState=c.memoizedState,m.updateQueue=c.updateQueue,h=c.dependencies,m.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},m.sibling=c.sibling,m.index=c.index,m.ref=c.ref,m}function _g(c,h,m,w,C,A){var N=2;if(w=c,typeof c=="function")dk(c)&&(N=1);else if(typeof c=="string")N=5;else e:switch(c){case L:return Ns(m.children,C,A,h);case R:N=8,C|=8;break;case O:return c=jn(12,m,h,C|2),c.elementType=O,c.lanes=A,c;case B:return c=jn(13,m,h,C),c.elementType=B,c.lanes=A,c;case $:return c=jn(19,m,h,C),c.elementType=$,c.lanes=A,c;case re:return kg(m,C,A,h);default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case M:N=10;break e;case P:N=9;break e;case j:N=11;break e;case K:N=14;break e;case Z:N=16,w=null;break e}throw Error(r(130,c==null?c:typeof c,""))}return h=jn(N,m,h,C),h.elementType=c,h.type=w,h.lanes=A,h}function Ns(c,h,m,w){return c=jn(7,c,w,h),c.lanes=m,c}function kg(c,h,m,w){return c=jn(22,c,w,h),c.elementType=re,c.lanes=m,c.stateNode={isHidden:!1},c}function hk(c,h,m){return c=jn(6,c,null,h),c.lanes=m,c}function pk(c,h,m){return h=jn(4,c.children!==null?c.children:[],c.key,h),h.lanes=m,h.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},h}function fse(c,h,m,w,C){this.tag=h,this.containerInfo=c,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hw(0),this.expirationTimes=Hw(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hw(0),this.identifierPrefix=w,this.onRecoverableError=C,this.mutableSourceEagerHydrationData=null}function vk(c,h,m,w,C,A,N,V,X){return c=new fse(c,h,m,V,X),h===1?(h=1,A===!0&&(h|=8)):h=0,A=jn(3,null,null,h),c.current=A,A.stateNode=c,A.memoizedState={element:w,isDehydrated:m,cache:null,transitions:null,pendingSuspenseBoundaries:null},E_(A),c}function dse(c,h,m){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:w==null?null:""+w,children:c,containerInfo:h,implementation:m}}function F3(c){if(!c)return Qa;c=c._reactInternals;e:{if(_s(c)!==c||c.tag!==1)throw Error(r(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break e;case 1:if(Gr(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break e}}h=h.return}while(h!==null);throw Error(r(171))}if(c.tag===1){var m=c.type;if(Gr(m))return dO(c,m,h)}return h}function B3(c,h,m,w,C,A,N,V,X){return c=vk(m,w,!0,c,C,A,N,V,X),c.context=F3(null),m=c.current,w=Lr(),C=ao(m),A=sa(w,C),A.callback=h??null,to(m,A,C),c.current.lanes=C,gf(c,C,w),Xr(c,w),c}function Sg(c,h,m,w){var C=h.current,A=Lr(),N=ao(C);return m=F3(m),h.context===null?h.context=m:h.pendingContext=m,h=sa(A,N),h.payload={element:c},w=w===void 0?null:w,w!==null&&(h.callback=w),c=to(C,h,N),c!==null&&(li(c,C,N,A),tg(c,C,N)),N}function Cg(c){return c=c.current,c.child?(c.child.tag===5,c.child.stateNode):null}function j3(c,h){if(c=c.memoizedState,c!==null&&c.dehydrated!==null){var m=c.retryLane;c.retryLane=m!==0&&m<h?m:h}}function gk(c,h){j3(c,h),(c=c.alternate)&&j3(c,h)}function hse(){return null}var H3=typeof reportError=="function"?reportError:function(c){console.error(c)};function mk(c){this._internalRoot=c}Tg.prototype.render=mk.prototype.render=function(c){var h=this._internalRoot;if(h===null)throw Error(r(409));Sg(c,h,null,null)},Tg.prototype.unmount=mk.prototype.unmount=function(){var c=this._internalRoot;if(c!==null){this._internalRoot=null;var h=c.containerInfo;Ls(function(){Sg(null,c,null,null)}),h[ra]=null}};function Tg(c){this._internalRoot=c}Tg.prototype.unstable_scheduleHydration=function(c){if(c){var h=S5();c={blockedOn:null,target:c,priority:h};for(var m=0;m<Ya.length&&h!==0&&h<Ya[m].priority;m++);Ya.splice(m,0,c),m===0&&A5(c)}};function yk(c){return!(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)}function Ag(c){return!(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11&&(c.nodeType!==8||c.nodeValue!==" react-mount-point-unstable "))}function V3(){}function pse(c,h,m,w,C){if(C){if(typeof w=="function"){var A=w;w=function(){var te=Cg(N);A.call(te)}}var N=B3(h,w,c,0,null,!1,!1,"",V3);return c._reactRootContainer=N,c[ra]=N.current,Mf(c.nodeType===8?c.parentNode:c),Ls(),N}for(;C=c.lastChild;)c.removeChild(C);if(typeof w=="function"){var V=w;w=function(){var te=Cg(X);V.call(te)}}var X=vk(c,0,!1,null,null,!1,!1,"",V3);return c._reactRootContainer=X,c[ra]=X.current,Mf(c.nodeType===8?c.parentNode:c),Ls(function(){Sg(h,X,m,w)}),X}function Eg(c,h,m,w,C){var A=m._reactRootContainer;if(A){var N=A;if(typeof C=="function"){var V=C;C=function(){var X=Cg(N);V.call(X)}}Sg(h,N,c,C)}else N=pse(m,h,c,C,w);return Cg(N)}_5=function(c){switch(c.tag){case 3:var h=c.stateNode;if(h.current.memoizedState.isDehydrated){var m=vf(h.pendingLanes);m!==0&&(Vw(h,m|1),Xr(h,Ot()),(rt&6)===0&&(pu=Ot()+500,Ja()))}break;case 13:Ls(function(){var w=oa(c,1);if(w!==null){var C=Lr();li(w,c,1,C)}}),gk(c,1)}},Uw=function(c){if(c.tag===13){var h=oa(c,134217728);if(h!==null){var m=Lr();li(h,c,134217728,m)}gk(c,134217728)}},k5=function(c){if(c.tag===13){var h=ao(c),m=oa(c,h);if(m!==null){var w=Lr();li(m,c,h,w)}gk(c,h)}},S5=function(){return ht},C5=function(c,h){var m=ht;try{return ht=c,h()}finally{ht=m}},ar=function(c,h,m){switch(h){case"input":if(Ur(c,m),h=m.name,m.type==="radio"&&h!=null){for(m=c;m.parentNode;)m=m.parentNode;for(m=m.querySelectorAll("input[name="+JSON.stringify(""+h)+'][type="radio"]'),h=0;h<m.length;h++){var w=m[h];if(w!==c&&w.form===c.form){var C=Gv(w);if(!C)throw Error(r(90));Xe(w),Ur(w,C)}}}break;case"textarea":bv(c,m);break;case"select":h=m.value,h!=null&&an(c,!!m.multiple,h,!1)}},u5=uk,c5=Ls;var vse={usingClientEntryPoint:!1,Events:[Pf,tu,Gv,s5,l5,uk]},Yf={findFiberByHostInstance:ks,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},gse={bundleType:Yf.bundleType,version:Yf.version,rendererPackageName:Yf.rendererPackageName,rendererConfig:Yf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:T.ReactCurrentDispatcher,findHostInstanceByFiber:function(c){return c=p5(c),c===null?null:c.stateNode},findFiberByHostInstance:Yf.findFiberByHostInstance||hse,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 Dg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Dg.isDisabled&&Dg.supportsFiber)try{Tv=Dg.inject(gse),Di=Dg}catch{}}return Ir.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vse,Ir.createPortal=function(c,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!yk(h))throw Error(r(200));return dse(c,h,null,m)},Ir.createRoot=function(c,h){if(!yk(c))throw Error(r(299));var m=!1,w="",C=H3;return h!=null&&(h.unstable_strictMode===!0&&(m=!0),h.identifierPrefix!==void 0&&(w=h.identifierPrefix),h.onRecoverableError!==void 0&&(C=h.onRecoverableError)),h=vk(c,1,!1,null,null,m,!1,w,C),c[ra]=h.current,Mf(c.nodeType===8?c.parentNode:c),new mk(h)},Ir.findDOMNode=function(c){if(c==null)return null;if(c.nodeType===1)return c;var h=c._reactInternals;if(h===void 0)throw typeof c.render=="function"?Error(r(188)):(c=Object.keys(c).join(","),Error(r(268,c)));return c=p5(h),c=c===null?null:c.stateNode,c},Ir.flushSync=function(c){return Ls(c)},Ir.hydrate=function(c,h,m){if(!Ag(h))throw Error(r(200));return Eg(null,c,h,!0,m)},Ir.hydrateRoot=function(c,h,m){if(!yk(c))throw Error(r(405));var w=m!=null&&m.hydratedSources||null,C=!1,A="",N=H3;if(m!=null&&(m.unstable_strictMode===!0&&(C=!0),m.identifierPrefix!==void 0&&(A=m.identifierPrefix),m.onRecoverableError!==void 0&&(N=m.onRecoverableError)),h=B3(h,null,c,1,m??null,C,!1,A,N),c[ra]=h.current,Mf(c),w)for(c=0;c<w.length;c++)m=w[c],C=m._getVersion,C=C(m._source),h.mutableSourceEagerHydrationData==null?h.mutableSourceEagerHydrationData=[m,C]:h.mutableSourceEagerHydrationData.push(m,C);return new Tg(h)},Ir.render=function(c,h,m){if(!Ag(h))throw Error(r(200));return Eg(null,c,h,!1,m)},Ir.unmountComponentAtNode=function(c){if(!Ag(c))throw Error(r(40));return c._reactRootContainer?(Ls(function(){Eg(null,null,c,!1,function(){c._reactRootContainer=null,c[ra]=null})}),!0):!1},Ir.unstable_batchedUpdates=uk,Ir.unstable_renderSubtreeIntoContainer=function(c,h,m,w){if(!Ag(m))throw Error(r(200));if(c==null||c._reactInternals===void 0)throw Error(r(38));return Eg(c,h,m,!1,w)},Ir.version="18.3.1-next-f1338f8080-20240426",Ir}var Tk;function K3(){if(Tk)return Pg.exports;Tk=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(),Pg.exports=q3(),Pg.exports}var Ak;function Z3(){if(Ak)return Xf;Ak=1;var e=K3();return Xf.createRoot=e.createRoot,Xf.hydrateRoot=e.hydrateRoot,Xf}var Q3=Z3();const J3=".aid-root{color-scheme:light;--background: 0 0% 100%;--background-secondary: 210, 40%, 96%;--foreground: 222.2 47.4% 11.2%;--foreground-secondary: 253, 40%, 16%;--scroll: 0, 0%, 78%;--sidebar-menu-background: 202, 100%, 18%;--sidebar: 210, 40%, 96%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 42%;--popover: 0 0% 100%;--popover-foreground: 222.2 47.4% 11.2%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--card: 0 0% 100%;--card-foreground: 222.2 47.4% 11.2%;--primary: 201, 100%, 29%;--primary-text: 201, 100%, 29%;--primary-foreground: 210, 40%, 96%;--primary-hovered: 202, 54%, 67%;--primary-pressed: 202, 100%, 18%;--disabled: 223, 8%, 18%, .15;--disabled-foreground: 223, 8%, 18%, .65;--main: 252, 39%, 16%;--main-foreground: 210, 40%, 96%;--secondary: 201, 95%, 36%, .1;--secondary-foreground: 201, 100%, 29%, 1;--secondary-hovered: 202, 54%, 67%;--secondary-pressed: 202, 100%, 18%;--accent: 223, 8%, 18%, .06;--accent-foreground: 223, 8%, 18%, 1;--destructive: 359, 84%, 50%, 1;--destructive-foreground: 0, 0%, 100%, 1;--destructive-background: 359, 84%, 50%, .1;--destructive-hovered: 359, 84%, 58%, 1;--destructive-pressed: 359, 84%, 44%, 1;--ring: 215 20.2% 65.1%;--radius: 12px;--header-height: 64px;--table-radius: 10px;--table-background: 202, 100%, 18%;--table-header-background: 223, 8%, 18%;--table-header-opacity: .02;--table-background-hover: 223, 8%, 18%;--chart-card: 210, 27%, 95%;--filled-filter: 343, 79%, 45%;--success: 100.24, 76.58%, 43.53%;--warning: 39.91, 95.83%, 52.94%;--error: 359, 84%, 50%;--processing: 201.2, 100%, 29.41%;--success-background: 90, 100%, 96%;--warning-background: 50, 100%, 95%, 1;--error-background: 8, 100%, 97%, 1;--processing-background: 204, 42%, 95%, 1;--default-background: 223, 8%, 18%, .02;--transfer-hovered: 223, 8%, 18%, .04;--transfer-selected: 204, 42%, 95%;--transfer-selected-hovered: 203, 55%, 91%;--toast-background: 204, 42%, 95%;--toast-border: 202, 55%, 85%;--toast-success-background: 90, 100%, 96%;--toast-success-border: 94, 70%, 74%;--toast-error-background: 8, 100%, 97%;--toast-error-border: 5, 100%, 89%, 1;--toast-warning-background: 50, 100%, 95%;--toast-warning-border: 46, 100%, 78%;--toast-info-background: 204, 42%, 95%;--toast-info-border: 202, 55%, 85%;--custom-magenta: 330 84% 33%;--custom-peach: 36 100% 94%;--custom-orange-soft: 18 100% 63%;--custom-orange-strong: 27, 95%, 55%;--chart-stroke: 0, 0%, 0%;--gray-soft: 220, 27%, 92%;--gray-softer: 0 0% 95%}.aid-root.dark{color-scheme:dark;--background: 222 47% 11%;--background-secondary: 217, 33%, 17%;--foreground: 210 40% 98%;--foreground-secondary: 210, 40%, 90%;--scroll: 215, 14%, 34%;--sidebar-menu-background: 222, 47%, 11%;--sidebar: 217, 33%, 17%;--muted: 217 33% 17%;--muted-foreground: 215 20.2% 65.1%;--popover: 222 47% 11%;--popover-foreground: 210 40% 98%;--border: 217 33% 25%;--input: 217 33% 25%;--card: 222 47% 11%;--card-foreground: 210 40% 98%;--primary: 201, 100%, 35%;--primary-text: 201, 90%, 60%;--primary-foreground: 210, 40%, 98%;--primary-hovered: 201, 100%, 39%;--primary-pressed: 201, 100%, 29%;--disabled: 215, 14%, 34%, .2;--disabled-foreground: 210, 40%, 90%, .5;--main: 210, 40%, 90%;--main-foreground: 222, 47%, 11%;--secondary: 201, 95%, 40%, .2;--secondary-foreground: 201, 100%, 70%, 1;--secondary-hovered: 201, 90%, 75%;--secondary-pressed: 201, 100%, 60%;--accent: 210, 40%, 90%, .1;--accent-foreground: 210, 40%, 90%, 1;--destructive: 0, 100%, 65%, 1;--destructive-foreground: 210, 40%, 98%, 1;--destructive-background: 359, 100%, 65%, .1;--destructive-hovered: 0, 100%, 70%, 1;--destructive-pressed: 0, 100%, 60%, 1;--ring: 215 20.2% 50%;--radius: 12px;--header-height: 64px;--table-radius: 10px;--table-background: 222, 47%, 15%;--table-header-background: 0, 0%, 100%;--table-header-opacity: .04;--table-background-hover: 0, 0%, 100%;--chart-card: 210, 25%, 18%;--filled-filter: 343, 79%, 55%;--success: 100.24, 76.58%, 43.53%;--warning: 39.91, 95.83%, 52.94%;--error: 359.33, 100%, 65.1%;--processing: 201, 90%, 60%;--success-background: 100, 77%, 44%, .12;--warning-background: 40, 96%, 53%, .12;--error-background: 359, 100%, 65%, .12;--processing-background: 201, 90%, 60%, .12;--default-background: 0, 0%, 100%, .04;--transfer-hovered: 0, 0%, 100%, .06;--transfer-selected: 201, 95%, 40%, .2;--transfer-selected-hovered: 201, 95%, 40%, .3;--toast-background: 222, 47%, 15%;--toast-border: 217, 33%, 25%;--toast-success-background: 142, 70%, 15%;--toast-success-border: 142, 70%, 25%;--toast-error-background: 0, 70%, 15%;--toast-error-border: 0, 70%, 25%;--toast-warning-background: 48, 70%, 15%;--toast-warning-border: 48, 70%, 25%;--toast-info-background: 201, 70%, 15%;--toast-info-border: 201, 70%, 25%;--custom-magenta: 330 84% 33%;--custom-peach: 36 100% 94%;--custom-orange-soft: 18 100% 63%;--custom-orange-strong: 27, 95%, 55%;--chart-stroke: 0, 0%, 100%;--gray-soft: 217, 33%, 22%;--gray-softer: 217 33% 17%}.aid-root{--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%}",Og=25,e4={ru:"ru-RU",kk:"kk-KZ",en:"en-US"};function Hn(e,t,r){return e===null?"—":new Intl.NumberFormat(e4[t],{minimumFractionDigits:r,maximumFractionDigits:r}).format(e).replace(new RegExp("\\u202F","g")," ")}const zg=e=>typeof e=="number"&&Number.isFinite(e)?e:null;function t4(e,t,r){const n=r==="asc"?1:-1,i=t.type==="number"||t.type==="integer",a=[],o=[];for(const s of e){const l=s[t.key];((i?zg(l)===null:l==null)?o:a).push(s)}return a.sort((s,l)=>i?n*((zg(s[t.key])??0)-(zg(l[t.key])??0)):n*String(s[t.key]).localeCompare(String(l[t.key]))),[...a,...o]}function r4(e,t){let r=e.data;const n=t.query?.trim().toLowerCase();if(n){const f=e.columns.filter(d=>d.type==="string").map(d=>d.key);r=r.filter(d=>f.some(p=>String(d[p]??"").toLowerCase().includes(n)))}const i=e.columns.find(f=>f.key===t.sortKey);i&&(r=t4(r,i,t.dir??"asc"));const a=r.length,o=Math.max(1,Math.ceil(a/Og)),s=Math.min(Math.max(1,Math.trunc(t.page)||1),o),l=(s-1)*Og,u=r.slice(l,l+Og);return{rows:u,page:s,pages:o,from:a===0?0:l+1,to:l+u.length,total:a}}function n4(e){return e.split(`
|
|
9
|
+
`).map(t=>{const r=t.trim();return r.startsWith("|")?/^\|[\s:|-]+\|?$/.test(r)?null:r.replace(/^\||\|$/g,"").split("|").map(n=>n.trim()).join(" — "):t}).filter(t=>t!==null).join(`
|
|
10
|
+
`).replace(/^\s{0,3}#+\s*/gm,"").replace(/[*_`]/g,"").trim()}function i4(e){const t=e.blocks.find(n=>n.kind==="plan"),r=[];return t&&t.passport.length>0&&r.push(t.passport.join(`
|
|
11
|
+
`)),r.push(n4(e.content)),t?.source&&r.push(`Источник: ${t.source.name}`),r.join(`
|
|
12
|
+
|
|
13
|
+
`)}function Ek(e,t){return t.isLastInBranch?t.now.getTime()>Date.parse(e.expires_at)?"expired":"open":"answered"}function a4(e,t){const r=t.trim().toLowerCase();return r?e.filter(n=>n.label.toLowerCase().includes(r)):e}function mu(e){return[...new Set(e.data.map(t=>t.period))].sort((t,r)=>t.localeCompare(r,void 0,{numeric:!0}))}const Dk=e=>e.value_kind!=="level",Mk=(e,t)=>{const r=mu(e),n=r.indexOf(t);return n>0?r[n-1]:void 0},Lk=(e,t)=>e.national?.period===t?e.national.value:null,o4=e=>{if(e.length===0)return null;const t=[...e].sort((n,i)=>n-i),r=Math.floor(t.length/2);return t.length%2?t[r]:(t[r-1]+t[r])/2},s4=e=>[e.territory_code??e.territory_name,e.item].filter(t=>!!t).join("|"),l4=e=>[e.territory_name??e.territory_code,e.item].filter(t=>!!t).join(", ");function Fg(e,t){const r=new Map;for(const n of e.data)n.period===t&&r.set(s4(n),{name:l4(n),value:n.value});return r}function u4(e,t,r){return t===null||r===null||r===void 0?null:Dk(e)?t-r:r<=0?null:(t/r-1)*100}const Ik=e=>e!==null&&Number.isFinite(e)?e:null;function c4(e,t){const r=Fg(e,t.period),n=Mk(e,t.period),i=n?Fg(e,n):void 0,a=[...r.values()].map(u=>u.value).filter(u=>u!==null),o=a.reduce((u,f)=>u+f,0),s=t.base==="national"?Lk(e,t.period):o4(a);return[...r].map(([u,{name:f,value:d}])=>{const p=Ik(i?u4(e,d,i.get(u)?.value):null);let v=d;t.mode==="deviation"?v=d===null||s===null?null:d-s:t.mode==="change"&&(v=p);const g=e.value_kind==="level"&&d!==null&&o!==0?d/o*100:null;return{key:u,name:f,value:d,display:Ik(v),share:g,delta:p}}).sort((u,f)=>u.display===null||f.display===null?+(u.display===null)-+(f.display===null):f.display-u.display)}function f4(e,t){return{deviation:[...Fg(e,t).values()].filter(n=>n.value!==null).length>=2,national:Lk(e,t)!==null,change:Mk(e,t)!==void 0}}function d4(e,t){return t==="value"?e.unit.label:Dk(e)?"п.п.":t==="deviation"?e.unit.label:"%"}function h4(e){const t=e.filter(Number.isFinite);if(t.length<2)return!0;const r=Math.max(...t),n=Math.min(...t);return r<=0||r===n?!0:(r-n)/r>=.2}function Pk(e){switch(e){case"pdf":return"report";case"docx":return"document";case"pptx":return"presentation";case"xlsx":return"excel";case"csv":return"csv"}}const hn=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ee=e=>typeof e=="string",Ri=e=>typeof e=="number"&&Number.isFinite(e),Bg=e=>e===null||Ee(e),pn=(e,t)=>Array.isArray(e)&&e.every(r=>hn(r)&&t(r)),qf=e=>Array.isArray(e)&&e.every(Ee),p4=["self","regions","districts"],v4=["string","number","integer","period"],g4=["indicator","territory","topic","period","scope","plan_confirm"];function m4(e){const{period:t}=e;return pn(e.indicators,r=>Ee(r.id)&&Ee(r.name)&&Ee(r.unit))&&pn(e.alternatives,r=>Ee(r.id)&&Ee(r.name))&&pn(e.territories,r=>Ee(r.code)&&Ee(r.name))&&Ee(e.scope)&&p4.includes(e.scope)&&hn(t)&&Ee(t.label)&&typeof t.substituted=="boolean"&&Bg(t.reason)&&Ee(e.breakdown)&&qf(e.passport)&&(e.source===void 0||hn(e.source)&&Ee(e.source.name))&&(e.methodology===void 0||hn(e.methodology)&&Ee(e.methodology.title)&&Ee(e.methodology.url))}function y4(e){return Ee(e.section_id)&&pn(e.columns,t=>Ee(t.key)&&Ee(t.title)&&Ee(t.type)&&v4.includes(t.type))&&pn(e.data,()=>!0)&&typeof e.truncated=="boolean"&&Ri(e.total_rows)}function x4(e){return Ee(e.topic)&&pn(e.sections,t=>Ee(t.id)&&qf(t.path)&&Ri(t.count))&&pn(e.indicators,t=>Ee(t.entity_id)&&Ee(t.name)&&Ee(t.unit)&&Ee(t.years)&&Ee(t.section))&&Ri(e.total)&&qf(e.examples)}function b4(e){return Ee(e.id)&&Ee(e.type)&&g4.includes(e.type)&&Ee(e.slot)&&Ee(e.question)&&pn(e.options,t=>Ee(t.value)&&Ee(t.label)&&Bg(t.hint))&&Bg(e.default)&&typeof e.allow_free_text=="boolean"&&Ri(e.round)&&Ee(e.expires_at)}const w4=["regional","trend","breakdown","multi"],_4=["level","percent","index","rate"],k4=["pdf","docx","pptx","xlsx","csv"],S4=["queued","running","done","failed","expired"],Nk=["territory_code","territory_name","item"],yu=e=>e==null,Os=e=>yu(e)||Ee(e),C4=e=>Ee(e.period)&&(e.value===null||Ri(e.value))&&Nk.every(t=>Os(e[t])),T4=e=>hn(e)&&Ee(e.title)&&Ee(e.url);function A4(e){return yu(e)?!0:!hn(e)||!Os(e.label)?!1:yu(e.editions)?!0:hn(e.editions)&&Object.values(e.editions).every(T4)}function E4(e){const{unit:t,national:r}=e;return Ee(e.id)&&Ee(e.title)&&Ee(e.shape)&&w4.includes(e.shape)&&hn(t)&&Ee(t.code)&&Ee(t.label)&&Ee(e.value_kind)&&_4.includes(e.value_kind)&&Ri(e.decimals)&&Ee(e.freq)&&Ee(e.period)&&Ee(e.latest_period)&&pn(e.data,C4)&&(yu(r)||hn(r)&&Ee(r.period)&&Ri(r.value))&&pn(e.kpis,n=>Ee(n.label)&&Ee(n.value)&&Os(n.sub)&&Os(n.tone))&&qf(e.findings)&&typeof e.truncated=="boolean"&&Ri(e.total_rows)&&A4(e.methodology)&&Os(e.source_url)&&Os(e.source_name)}function D4(e){const t={...e};for(const r of Nk)t[r]===null&&delete t[r];return t}function M4(e){if(!Ee(e.title)||!Array.isArray(e.sections))return;const t=e.sections.filter(r=>hn(r)&&E4(r)).map(r=>({...r,national:r.national??null,data:r.data.map(D4)}));if(t.length!==0)return{kind:"dashboard",title:e.title,auto_open:e.auto_open===!0,sections:t}}const Rk=e=>Ee(e.format)&&k4.includes(e.format)&&Ee(e.filename)&&Ee(e.title)&&Ee(e.download_url)&&Ri(e.size_bytes);function L4(e){const{error:t}=e;return Ee(e.job_id)&&Ee(e.status)&&S4.includes(e.status)&&pn(e.files,Rk)&&(yu(t)||hn(t)&&Ee(t.code)&&Ee(t.message))}function Ok(e){if(hn(e))switch(e.kind){case"plan":return m4(e)?e:void 0;case"table":return y4(e)?e:void 0;case"catalog":return x4(e)?e:void 0;case"clarification":return b4(e)?e:void 0;case"dashboard":return M4(e);case"export":return pn(e.files,Rk)?e:void 0;case"report":return L4(e)?e:void 0;default:return}}const jg="/chat/stream",I4=100;class wr extends Error{constructor(r,n,i=null){super(n);Rs(this,"status");Rs(this,"code");Rs(this,"body");this.name="ApiError",this.status=r,this.code=n,this.body=i}get resetAt(){const r=this.body;if(r&&typeof r=="object"&&"reset_at"in r&&typeof r.reset_at=="string")return r.reset_at}}function P4(e,t){if(e&&typeof e=="object"){if("detail"in e&&typeof e.detail=="string"&&e.detail)return e.detail;if("errors"in e&&Array.isArray(e.errors)){const r=e.errors[0];if(r&&typeof r=="object"&&"code"in r&&typeof r.code=="string"&&r.code)return r.code}}return`http_${t}`}async function N4(e){const t=await e.text();if(!t)return null;try{return JSON.parse(t)}catch{return null}}async function Hg(e){const t=await N4(e);return new wr(e.status,P4(t,e.status),t)}const R4=["О пользователе: ","Как отвечать: "],O4="Предыдущий диалог:",zk=`
|
|
14
|
+
Новый вопрос: `;function z4(e){let t=e;if(R4.some(r=>t.startsWith(r))){const r=t.indexOf(`
|
|
15
|
+
|
|
16
|
+
`);r!==-1&&(t=t.slice(r+2))}if(t.startsWith(O4)){const r=t.lastIndexOf(zk);r!==-1&&(t=t.slice(r+zk.length))}return t}const F4=["streaming","done","stopped","error"];function B4(e){return{...typeof e.id=="string"?{id:e.id}:{},node:typeof e.node=="string"?e.node:"",status:e.status==="running"?"running":"done",attempt:typeof e.attempt=="number"?e.attempt:1,...typeof e.durationMs=="number"?{durationMs:e.durationMs}:{},...typeof e.label=="string"?{label:e.label}:{},...typeof e.total=="number"||e.total===null?{total:e.total}:{},...typeof e.startedAt=="number"?{startedAt:e.startedAt}:{}}}function Fk(e){return{id:e.id,parentId:e.parent_id,role:e.role==="user"?"user":"assistant",content:e.role==="user"?z4(e.content):e.content,mode:e.mode,status:F4.find(t=>t===e.status)??"done",steps:e.steps.map(B4),durationMs:e.duration_ms,rating:e.rating,feedback:e.feedback,feedbackReason:e.feedback_reason??"",attachments:e.attachments??[],blocks:(e.blocks??[]).flatMap(t=>{const r=Ok(t);return r!=null?[r]:[]}),createdAt:e.created_at}}const j4=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Kf=e=>j4.test(e);class zs extends Error{constructor(t){super(t),this.name="StreamFailure"}}const H4=(e,t)=>Date.parse(e.createdAt)-Date.parse(t.createdAt)||(e.id<t.id?-1:e.id>t.id?1:0);function Bk(e){const t=new Map,r=new Map;for(const n of e){t.set(n.id,n);const i=r.get(n.parentId);i?i.push(n):r.set(n.parentId,[n])}for(const n of r.values())n.sort(H4);return{byId:t,children:r}}function V4(e,t){const r=[],n=new Set;let i=e.byId.get(t);for(;i&&!n.has(i.id);)n.add(i.id),r.push(i),i=i.parentId===null?void 0:e.byId.get(i.parentId);return r.reverse()}function jk(e,t){if(!e.byId.has(t))return null;let r=t;for(;;){const n=e.children.get(r),i=n?.[n.length-1];if(!i)return r;r=i.id}}function U4(e,t){const r=e.byId.get(t);if(!r)return{list:[],position:-1};const n=e.children.get(r.parentId)??[];return{list:n,position:n.findIndex(i=>i.id===t)}}function Hk(e,t){if(t&&e.byId.has(t))return t;const r=e.children.get(null),n=r?.[r.length-1];return n?jk(e,n.id):null}let $4=0;const G4=e=>`temp-${e}-${Date.now().toString(36)}-${($4++).toString(36)}`;function Vg(e,t,r){return{id:G4(e==="user"?"user":"stream"),parent_id:r,role:e,content:"",mode:t,status:e==="user"?"done":"streaming",steps:[],duration_ms:null,rating:null,feedback:"",created_at:new Date().toISOString()}}function W4(e){return!e||e.messages.length===0?null:Hk(Bk(e.messages.map(Fk)),e.current_leaf_id)}function Y4(e,t){if(e.regenerateOf!=null){const i=t?.messages.find(a=>a.id===e.regenerateOf);return{assistant:Vg("assistant",e.mode,i?.parent_id??null)}}const r=e.parentId===void 0?W4(t):e.parentId||null,n={...Vg("user",e.mode,r),content:e.query,...e.file?{attachments:[{name:e.file.name,url:""}]}:{}};return{user:n,assistant:Vg("assistant",e.mode,n.id)}}function X4(e,t,r){const n=new Map([[t.assistantId,r.assistantMessageId]]);t.userId!=null&&n.set(t.userId,r.userMessageId);const i=a=>a!=null?n.get(a)??a:a;return{...e,id:r.threadId,current_leaf_id:i(e.current_leaf_id),messages:e.messages.map(a=>n.has(a.id)||a.parent_id!=null&&n.has(a.parent_id)?{...a,id:i(a.id)??a.id,parent_id:i(a.parent_id)}:a)}}function q4(e,t){return{...e,content:t.text,steps:t.steps.map(r=>({...r})),...t.attachments.length>0?{attachments:t.attachments}:{},...t.blocks.length>0?{blocks:t.blocks.map(r=>({...r}))}:{}}}function K4(e,t,r,n){const i={...e,status:t,duration_ms:Date.now()-n};return t==="error"&&!e.content?{...i,content:r}:i}const Z4=["thread_busy","mode_overloaded","daily_limit","rate_limit","concurrency_limit","file_too_large","file_not_allowed","invalid_query","invalid_parent","mode_not_found","thread_not_found","interrupted"],Q4=e=>Z4.includes(e);function J4(e){if(e instanceof wr)return e.code;if(e instanceof zs)return e.message}function Zf(e){const t=J4(e);return t!=null&&Q4(t)?{kind:"code",code:t}:e instanceof wr?{kind:"status",status:e.status}:{kind:"generic"}}async function Qf(e,t,r={}){const n=r.method??"GET",i=new Headers(r.headers),a=await e.headers?.({method:n})??{};for(const[s,l]of Object.entries(a))i.set(s,l);return(e.fetch??fetch)(`${e.baseUrl}${t}`,{...r,method:n,headers:i,...e.credentials?{credentials:e.credentials}:{}})}const Vk="text/event-stream";function ez({query:e,mode:t,file:r,parentId:n,regenerateOf:i,clarification:a},o){const s=new FormData;return s.set("mode",t),i==null&&s.set("query",e),o!=null&&s.set("thread_id",o),n!==void 0&&s.set("parent_id",n),i!=null&&s.set("regenerate_of",i),r&&s.set("file",r),a&&s.set("clarification",JSON.stringify(a)),s}function tz(e,t,r){return Qf(e,jg,{method:"POST",body:t,headers:{Accept:Vk},signal:r})}function rz(e,t,r){return Qf(e,`${jg}/${t}`,{headers:{Accept:Vk},signal:r})}async function nz(e,t){const r=await Qf(e,`${jg}/${t}/stop`,{method:"POST"});if(!r.ok)throw await Hg(r)}async function iz(e){if(!e.ok)throw await Hg(e);if(e.body==null)throw new Error("empty_stream");return e.body}const az=45,oz=7,sz=.1,lz=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function uz(e,t){const r=e.charCodeAt(t-1);return r>=55296&&r<=56319?t+1:t}function cz(e,t){const[r,n]=H.useState(()=>e.length),i=H.useRef(r),a=H.useRef(e),o=H.useRef(null),s=H.useRef(null),[l]=H.useState(lz),u=t&&!l;return H.useLayoutEffect(()=>{a.current=e},[e]),H.useEffect(()=>{if(!u){i.current=a.current.length;return}if(i.current>e.length&&(i.current=e.length,n(e.length)),o.current!=null||i.current>=e.length)return;const f=d=>{const p=a.current,v=s.current;s.current=d;const g=v==null?1/60:Math.min((d-v)/1e3,sz),y=p.length-i.current;if(y<=0){o.current=null,s.current=null;return}const x=Math.max(1,Math.round(Math.max(az*g,y*Math.min(1,oz*g)))),b=Math.min(p.length,uz(p,i.current+x));i.current=b,n(b),o.current=requestAnimationFrame(f)};o.current=requestAnimationFrame(f)},[e,u]),H.useEffect(()=>()=>{o.current!=null&&cancelAnimationFrame(o.current),o.current=null},[]),H.useEffect(()=>{u||o.current==null||(cancelAnimationFrame(o.current),o.current=null,s.current=null)},[u]),u?r>=e.length?e:e.slice(0,r):e}const Ug="/api/v1/widget",$g="aid_visitor",Uk=4e3,Gg=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,$k=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}:[\w-]{10,100}$/i,fz=()=>{if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=(e[6]??0)&15|64,e[8]=(e[8]??0)&63|128;const t=Array.from(e,r=>r.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`},dz=(e,t)=>{if(e&&Gg.test(e))return e;try{const n=t?.getItem($g);if(n&&(Gg.test(n)||$k.test(n)))return n}catch{}const r=fz();try{t?.setItem($g,r)}catch{}return r},hz=/\/api\/v1\/attachments\/([0-9a-f-]{36})\/?(?:[?#].*)?$/i,xu=(e,t)=>{const r=hz.exec(e);if(!r?.[1]){const n=/\/api\/v1\/widget\/attachments\/([0-9a-f-]{36})\/?$/i.exec(e);return n?.[1]?`${Wg(t)}/attachments/${n[1]}`:null}return`${Wg(t)}/attachments/${r[1]}`},Wg=e=>`${e.replace(/\/+$/,"")}${Ug}`,pz=e=>{if(e==="")return e;let t;try{t=new URL(e)}catch{throw new TypeError(`AiDanaChat: api-url must be an absolute http(s) URL, got "${e}"`)}if(t.protocol!=="https:"&&t.protocol!=="http:")throw new TypeError(`AiDanaChat: api-url must be an http(s) URL, got "${e}"`);return e},Yg=e=>e&&(/^https:\/\//i.test(e)||/^\/(?!\/)/.test(e)||/^data:image\/(?:png|jpeg|webp|gif);/i.test(e))?e:void 0,Jf=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),vz=e=>{if(!Jf(e)||!Jf(e.site)||!Array.isArray(e.modes)||!e.modes.every(t=>Jf(t)&&typeof t.slug=="string")||!Jf(e.visitor))throw new Error("bad config");return e},gz=e=>{const t={};if(!e||typeof e!="object")return t;const r=v=>{const g=e[v];return typeof g=="string"&&g?g:void 0},n=r("primary"),i=r("font"),a=Yg(r("logoUrl")),o=r("title"),s=r("scheme");n&&(t.primary=n),i&&(t.font=i),a&&(t.logoUrl=a),o&&(t.title=o),(s==="light"||s==="dark"||s==="auto")&&(t.scheme=s);const l=r("launcher");(l==="icon"||l==="label")&&(t.launcher=l);const u=r("launcherLabel");u&&(t.launcherLabel=u);const f=r("launcherShape");(f==="circle"||f==="rounded"||f==="square")&&(t.launcherShape=f),(typeof e.radius=="number"||typeof e.radius=="string"&&e.radius)&&(t.radius=e.radius);for(const v of["background","foreground","bubble","border"]){const g=r(v);g&&(t[v]=g)}const d=v=>{const g=e[v],y=typeof g=="number"?g:typeof g=="string"&&g?Number(g):NaN;return Number.isFinite(y)?y:void 0};for(const v of["windowWidth","windowHeight","offsetX","offsetY"]){const g=d(v);g!==void 0&&(t[v]=g)}const p=r("position");return(p==="bottom-right"||p==="bottom-left")&&(t.position=p),t},Gk=e=>{throw e instanceof wr||e instanceof Error&&e.name==="AbortError"?e:new wr(0,"network",null)},mz=({apiUrl:e,siteKey:t,visitorId:r,rememberVisitor:n,fetch:i})=>{let a=r;const o=pz(e),s=encodeURIComponent,l={baseUrl:Wg(o),headers:()=>({"X-Visitor-Id":a,...t?{"X-Widget-Key":t}:{}}),credentials:"omit",...i?{fetch:i}:{}},u=async(p,v={})=>{const g=await Qf(l,p,v).catch(Gk);if(!g.ok)throw await Hg(g);return g},f=async(p,v)=>(await u(p,v)).json(),d=(p,v)=>({method:p,headers:{"Content-Type":"application/json"},body:JSON.stringify(v)});return{transport:l,apiUrl:o,config:async()=>vz(await f("/config")),health:()=>f("/modes/health"),threads:()=>f("/threads?limit=50"),thread:p=>f(`/threads/${s(p)}`),setLeaf:async(p,v)=>{await u(`/threads/${s(p)}`,d("PATCH",{current_leaf_id:v}))},deleteThread:async p=>{await u(`/threads/${s(p)}`,{method:"DELETE"})},rate:async(p,v)=>{await u(`/messages/${s(p)}/rating`,d("POST",{rating:v}))},feedback:async(p,v,g)=>{await u(`/messages/${s(p)}/feedback`,d("POST",g?{feedback:v,reason:g}:{feedback:v}))},stop:p=>nz(l,s(p)).catch(Gk),createReport:(p,v)=>f(`/messages/${s(p)}/report`,d("POST",{language:v})),reportStatus:p=>Gg.test(p)?f(`/report-jobs/${p}`):Promise.reject(new wr(0,"bad_job_id",null)),request:p=>u(p),attachment:async p=>{const v=xu(p,o);if(!v)throw new wr(0,"not_attachment",null);const g=v.slice(l.baseUrl.length),y=await(await u(g)).blob();return URL.createObjectURL(y)},adoptVisitor:p=>!p||!$k.test(p)||p===a?!1:(a=p,n?.(p),!0)}},Xg=["kk","ru","en"],yz=e=>Xg.includes(e),Wk=e=>{const t=[e,typeof document<"u"?document.documentElement.lang:void 0,typeof navigator<"u"?navigator.language:void 0];for(const r of t){const n=r?.toLowerCase().split("-")[0];if(yz(n))return n}return"ru"},Yk={title:"AI-Dana",open:"Открыть чат",unreadAnswers:"новых ответов: {count}",ask:"Задать вопрос",close:"Закрыть",history:"История",closeHistory:"Скрыть историю",newChat:"Новый чат",untitled:"Новый чат",historyEmpty:"Пока нет чатов",historyError:"Не удалось загрузить историю",delete:"Удалить",deleteConfirm:"Удалить чат?",deleteYes:"Удалить",deleteNo:"Отмена",deleteError:"Не удалось удалить чат",modeLabel:"Режим ответа","health.idle":"Свободен","health.busy":"Занят","health.unavailable":"Недоступен",placeholder:"Спросите что угодно",inputLabel:"Сообщение",send:"Отправить",stop:"Остановить",attach:"Прикрепить файл",attachOne:"Можно прикрепить только один файл",attachHint:"Можно прикрепить один файл: XLS, XLSX, CSV, TXT или MD до {size} МБ",disclaimer:"ИИ может ошибаться — проверяйте важную информацию",removeFile:"Удалить файл",counter:"{count} / {max}",counterLimit:"Достигнут предел знаков",counterOver:"Превышен предел знаков",fileTooLarge:"Файл «{name}» больше {size} МБ",fileType:"Файл «{name}» не подходит. Можно прикрепить XLS, XLSX, CSV, TXT или MD",modeUnavailable:"Режим сейчас недоступен, выберите другой",greeting:"Чем могу помочь?",loading:"Загрузка…",configError:"Чат временно недоступен",overloaded:"Сервис сейчас перегружен. Попробуйте позже.",retry:"Повторить",dismiss:"Скрыть",scrollDown:"Прокрутить вниз",settings:"Настройки","settings.language":"Язык","settings.theme":"Тема","settings.themeLight":"Светлая","settings.themeDark":"Тёмная","settings.themeAuto":"Как в системе","settings.model":"Модель по умолчанию","settings.modelHint":"С неё начинается каждый новый чат","settings.shortcuts":"Горячие клавиши","shortcut.search":"Поиск по чатам","shortcut.newChat":"Новый чат","shortcut.sidebar":"Показать или скрыть панель","shortcut.close":"Закрыть окно",search:"Поиск по чатам",searchEmpty:"Ничего не найдено",collapseSidebar:"Скрыть панель",expandSidebar:"Показать панель",expand:"Развернуть на всю страницу",shrink:"Свернуть",examples:"Примеры запросов","examples.whatCanDo":"Что можно сделать","group.pinned":"Закреплённые","group.today":"Сегодня","group.yesterday":"Вчера","group.week":"Последние 7 дней","group.earlier":"Ранее","errors.thread_busy":"AI-Dana ещё отвечает в этом чате. Дождитесь ответа или остановите его.","errors.mode_overloaded":"AI-Dana сейчас перегружена, попробуйте чуть позже","errors.daily_limit":"Лимит сообщений на сегодня исчерпан","errors.rate_limit":"Слишком много сообщений подряд. Подождите минуту.","errors.ip_limit":"Слишком много сообщений из вашей сети сегодня. Попробуйте завтра.","errors.concurrency_limit":"Дождитесь окончания предыдущего ответа","errors.file_too_large":"Файл слишком большой","errors.file_not_allowed":"Этот файл нельзя прикрепить. Подходят XLS, XLSX, CSV, TXT и MD","errors.invalid_query":"Сообщение пустое или слишком длинное","errors.invalid_parent":"Это сообщение больше нельзя изменить","errors.mode_not_found":"Выбранный режим сейчас недоступен. Выберите другой режим.","errors.thread_not_found":"Чат не найден","errors.interrupted":"Ответ прерван","errors.code":"Не удалось получить ответ (код {code}).","errors.generic":"Произошла ошибка при отправке сообщения.","errors.network":"Нет связи с сервером. Проверьте подключение.","errors.render":"Не удалось показать это сообщение.","agent.thinking":"Думаю…","agent.done":"Готово","agent.stopped":"Остановлено","agent.stopping":"Останавливаю…","agent.failed":"не смогла","agent.interrupted":"Ответ прерван","agent.answerStopped":"Ответ остановлен. Задайте вопрос заново, если нужно","agent.seconds":"{value} с","agent.attempt":"попытка {count}","agent.showSteps":"Показать шаги","agent.hideSteps":"Скрыть шаги","steps.router":"Разбираю вопрос","steps.context_builder":"Ищу нужные данные","steps.sql_architect":"Готовлю расчёт","steps.executor":"Считаю показатели","steps.responder":"Готовлю ответ","steps.rag":"Ищу в справочных материалах","steps.sql":"Ищу данные в открытых источниках","steps.document":"Читаю документ","steps.understand":"Разбираю вопрос","steps.search_law":"Ищу в законах","steps.run_sql":"Считаю показатели","steps.run_query":"Получаю данные","steps.data":"Получаю данные","steps.lookup_taxpayer":"Ищу налогоплательщика","steps.find_taxpayer":"Ищу компанию по названию","steps.ask_clarification":"Уточняю вопрос","steps.answer":"Готовлю ответ","steps.unknown":"Работаю над ответом",copy:"Копировать",copied:"Скопировано",download:"Скачать",regenerate:"Ответить заново",edit:"Изменить сообщение",editLabel:"Текст сообщения",cancel:"Отмена",actionsLabel:"Действия с сообщением",rate:"Оценить на {count} из 5",ratingError:"Не удалось сохранить оценку",feedbackOpen:"Оставить отзыв",feedbackEdit:"Изменить отзыв",feedbackLabel:"Отзыв об ответе",feedbackPlaceholder:"Что было не так с ответом?",save:"Сохранить","branch.label":"Варианты","branch.prev":"Предыдущий вариант","branch.next":"Следующий вариант","branch.error":"Не удалось переключить вариант","limit.remaining":"Сегодня осталось {count} из {limit} сообщений","limit.exhausted":"Лимит сообщений на сегодня исчерпан","limit.until":"Лимит сообщений исчерпан. Новые сообщения — после {time}.","blocks.data":"Данные","blocks.hideData":"Скрыть данные","blocks.methodology":"Методология","blocks.passport":"Что посчитано","blocks.indicator":"Показатель","blocks.territory":"Территория","blocks.period":"Период","blocks.breakdown":"Разрез","blocks.breakdown.sex":"по полу","blocks.breakdown.age":"по возрасту","blocks.breakdown.urban_rural":"город и село","blocks.breakdown.activity":"по видам деятельности","blocks.breakdown.item":"по товарам","blocks.substituted":"подстановка","blocks.alternatives":"Похожие показатели","blocks.table":"Таблица данных","blocks.tableSearch":"Поиск по таблице…","blocks.tableEmpty":"Нет данных","blocks.page":"{a} из {b}","blocks.prevPage":"Предыдущая страница","blocks.nextPage":"Следующая страница","blocks.truncated":"Показаны первые {n} строк — полные данные в Excel","blocks.catalogMore":"…и ещё {count} в каталоге","blocks.catalogExamples":"Можно спросить","blocks.options":"Варианты ответа","blocks.default":"по умолчанию","blocks.freeTextHint":"Выберите вариант или напишите свой в поле ниже","blocks.findOption":"Найти в списке…","blocks.chosen":"Выбрано: {label}","blocks.continue":"Продолжить","blocks.cancelPlan":"Отменить","blocks.expired":"Уточнение устарело","blocks.askAgain":"Задать вопрос заново","blocks.dashboard":"Дашборд","blocks.hideDashboard":"Скрыть дашборд","chart.kinds":"Вид диаграммы","chart.kind.bar":"Полосы","chart.kind.column":"Столбцы","chart.kind.pie":"Круговая","chart.kind.line":"Линии","chart.kind.area":"Области","chart.national":"РК {value}","chart.top":"Топ-{n} из {total} — всё в дашборде","chart.label":"{title}, {period}","files.list":"Файлы","files.report":"Готовый отчёт","files.document":"Редактируемый документ","files.presentation":"Презентация","files.excel":"Данные Excel","files.csv":"Данные CSV","files.failed":"Не удалось скачать файл","report.create":"Сформировать отчёт","report.pending":"Файлы отчёта формируются…","report.failed":"Не удалось сформировать файлы отчёта","report.retry":"Повторить","report.expired":"Срок файлов истёк","dashboard.eyebrow":"Аналитика","dashboard.label":"Дашборд","dashboard.sections":"Разделы дашборда","dashboard.regions":"регионов: {n}","dashboard.items":"позиций: {n}","dashboard.openSource":"Открыть в источнике","dashboard.methodology":"Методология","dashboard.fullscreen":"На весь экран","dashboard.collapse":"Свернуть","dashboard.close":"Закрыть","dashboard.chatTab":"Чат","dashboard.dashboardTab":"Дашборд","dashboard.view":"Чат или дашборд","dashboard.region":"Регион","dashboard.allRegions":"Все регионы","dashboard.period":"Период","dashboard.mode.label":"Режим","dashboard.mode.value":"Значение","dashboard.mode.deviation":"Отклонение","dashboard.mode.change":"Изменение","dashboard.base.label":"База отклонения","dashboard.base.median":"от медианы","dashboard.base.national":"от РК","dashboard.noPrevious":"Нет предыдущего периода","dashboard.noNational":"Нет значения по стране за этот период","dashboard.fewRegions":"Нужно хотя бы два значения","dashboard.ranking":"Рейтинг","dashboard.trend":"Динамика","dashboard.findings":"Выводы","dashboard.data":"Данные","dashboard.kpis":"Ключевые показатели","dashboard.table.rank":"№","dashboard.table.position":"Позиция","dashboard.table.value":"Значение, {unit}","dashboard.table.share":"Доля, %","dashboard.table.deviation":"Отклонение, {unit}","dashboard.table.change":"Изменение, {unit}","dashboard.source":"Источник: {name}","dashboard.points":"п.п.","dashboard.kpi.national":"Республика Казахстан","dashboard.kpi.max":"Максимум","dashboard.kpi.min":"Минимум","dashboard.kpi.median":"Медиана по регионам","dashboard.kpi.spread":"Размах","dashboard.kpi.gap":"Разрыв","dashboard.kpi.last":"Последнее значение","dashboard.kpi.first":"Начало периода","dashboard.kpi.change":"Изменение","dashboard.kpi.place":"Место","dashboard.kpi.placeOf":"{n} из {m}","dashboard.kpi.deviation":"Откл. от медианы","dashboard.kpi.previous":"К прошлому периоду","steps.counter":"{done} из {total}","feedback.reasonsLabel":"Что не так?","feedback.reason.wrong_number":"Неверная цифра","feedback.reason.wrong_indicator":"Не тот показатель","feedback.reason.wrong_territory":"Не та территория","feedback.reason.wrong_period":"Не тот период","feedback.reason.not_answered":"Нет ответа на вопрос","feedback.reason.language":"Язык ответа","feedback.reason.slow":"Слишком долго","feedback.reason.other":"Другое","intro.title":"Перед началом","intro.continue":"Продолжить",source:"Источник: {name}","shell.siteBlocked":"Чат недоступен на этом сайте","shell.siteBlockedHint":"Владелец сайта ещё не подключил AI-Dana или доступ приостановлен.","modes.none":"Режимы ответа сейчас недоступны. Попробуйте позже.","attachment.sending":"отправляется","agent.steps":"Шаги","agent.unfinished":"не завершён",rateGroup:"Оценка ответа","blocks.catalogTitle":"Каталог: {topic}","blocks.catalogSections":"Разделы","blocks.catalogIndicators":"Показатели","blocks.catalogSendHint":"Вопрос отправится сразу после выбора","blocks.clarification":"Уточнение","files.expired":"Срок файла истёк","files.notFound":"Файл не найден","files.unavailable":"Файл недоступен"},xz={kk:{title:"AI-Dana",open:"Чатты ашу",unreadAnswers:"жаңа жауаптар: {count}",ask:"Сұрақ қою",close:"Жабу",history:"Тарих",closeHistory:"Тарихты жасыру",newChat:"Жаңа чат",untitled:"Жаңа чат",historyEmpty:"Әзірге чаттар жоқ",historyError:"Тарихты жүктеу мүмкін болмады",delete:"Жою",deleteConfirm:"Чатты жою керек пе?",deleteYes:"Жою",deleteNo:"Бас тарту",deleteError:"Чатты жою мүмкін болмады",modeLabel:"Жауап режимі","health.idle":"Бос","health.busy":"Бос емес","health.unavailable":"Қолжетімсіз",placeholder:"Кез келген нәрсені сұраңыз",inputLabel:"Хабарлама",send:"Жіберу",stop:"Тоқтату",attach:"Файл тіркеу",attachOne:"Тек бір файл тіркеуге болады",attachHint:"Бір файл тіркеуге болады: XLS, XLSX, CSV, TXT немесе MD, {size} МБ-қа дейін",disclaimer:"ЖИ қателесуі мүмкін — маңызды ақпаратты тексеріңіз",removeFile:"Файлды жою",counter:"{count} / {max}",counterLimit:"Таңба шегіне жеттіңіз",counterOver:"Таңба шегінен асып кеттіңіз",fileTooLarge:"«{name}» файлы {size} МБ-тан үлкен",fileType:"«{name}» файлы жарамайды. XLS, XLSX, CSV, TXT немесе MD тіркеуге болады",modeUnavailable:"Режим қазір қолжетімсіз, басқасын таңдаңыз",greeting:"Қалай көмектесе аламын?",loading:"Жүктелуде…",configError:"Чат уақытша қолжетімсіз",overloaded:"Қызмет қазір шамадан тыс жүктелген. Кейінірек қайталап көріңіз.",retry:"Қайталау",dismiss:"Жасыру",scrollDown:"Төменге айналдыру",settings:"Баптаулар","settings.language":"Тіл","settings.theme":"Тақырып","settings.themeLight":"Ашық","settings.themeDark":"Қараңғы","settings.themeAuto":"Жүйедегідей","settings.model":"Әдепкі модель","settings.modelHint":"Әр жаңа чат осыдан басталады","settings.shortcuts":"Жылдам пернелер","shortcut.search":"Чаттардан іздеу","shortcut.newChat":"Жаңа чат","shortcut.sidebar":"Панельді көрсету не жасыру","shortcut.close":"Терезені жабу",search:"Чаттардан іздеу",searchEmpty:"Ештеңе табылмады",collapseSidebar:"Панельді жасыру",expandSidebar:"Панельді көрсету",expand:"Бүкіл бетке жаю",shrink:"Кішірейту",examples:"Сұрау мысалдары","examples.whatCanDo":"Не істей аласыз","group.pinned":"Бекітілгендер","group.today":"Бүгін","group.yesterday":"Кеше","group.week":"Соңғы 7 күн","group.earlier":"Бұрынырақ","errors.thread_busy":"AI-Dana бұл чатта әлі жауап беріп жатыр. Жауапты күтіңіз немесе тоқтатыңыз.","errors.mode_overloaded":"AI-Dana қазір шамадан тыс жүктелген, сәл кейінірек қайталап көріңіз","errors.daily_limit":"Бүгінгі хабарлама лимиті таусылды","errors.rate_limit":"Хабарламалар тым жиі жіберілді. Бір минут күтіңіз.","errors.ip_limit":"Бүгін сіздің желіңізден хабарламалар тым көп жіберілді. Ертең қайталап көріңіз.","errors.concurrency_limit":"Алдыңғы жауаптың аяқталуын күтіңіз","errors.file_too_large":"Файл тым үлкен","errors.file_not_allowed":"Бұл файлды тіркеуге болмайды. XLS, XLSX, CSV, TXT және MD жарайды","errors.invalid_query":"Хабарлама бос немесе тым ұзын","errors.invalid_parent":"Бұл хабарламаны енді өзгертуге болмайды","errors.mode_not_found":"Таңдалған режим қазір қолжетімсіз. Басқа режимді таңдаңыз.","errors.thread_not_found":"Чат табылмады","errors.interrupted":"Жауап үзілді","errors.code":"Жауап алу мүмкін болмады (код {code}).","errors.generic":"Хабарлама жіберу кезінде қате орын алды.","errors.network":"Сервермен байланыс жоқ. Қосылымды тексеріңіз.","errors.render":"Бұл хабарламаны көрсету мүмкін болмады.","agent.thinking":"Ойланып жатырмын…","agent.done":"Дайын","agent.stopped":"Тоқтатылды","agent.stopping":"Тоқтатып жатырмын…","agent.failed":"алмады","agent.interrupted":"Жауап үзілді","agent.answerStopped":"Жауап тоқтатылды. Қажет болса, сұрақты қайта қойыңыз","agent.seconds":"{value} с","agent.attempt":"{count}-әрекет","agent.showSteps":"Қадамдарды көрсету","agent.hideSteps":"Қадамдарды жасыру","steps.router":"Сұрақты талдап жатырмын","steps.context_builder":"Қажет деректерді іздеп жатырмын","steps.sql_architect":"Есептеуді дайындап жатырмын","steps.executor":"Көрсеткіштерді есептеп жатырмын","steps.responder":"Жауап дайындап жатырмын","steps.rag":"Анықтамалық материалдардан іздеп жатырмын","steps.sql":"Ашық дереккөздерден деректер іздеп жатырмын","steps.document":"Құжатты оқып жатырмын","steps.understand":"Сұрақты талдап жатырмын","steps.search_law":"Заңнамадан іздеп жатырмын","steps.run_sql":"Көрсеткіштерді есептеп жатырмын","steps.run_query":"Деректерді алып жатырмын","steps.data":"Деректерді алып жатырмын","steps.lookup_taxpayer":"Салық төлеушіні іздеп жатырмын","steps.find_taxpayer":"Компанияны атауы бойынша іздеп жатырмын","steps.ask_clarification":"Сұрақты нақтылап жатырмын","steps.answer":"Жауап дайындап жатырмын","steps.unknown":"Жауап үстінде жұмыс істеп жатырмын",copy:"Көшіру",copied:"Көшірілді",download:"Жүктеу",regenerate:"Қайта жауап беру",edit:"Хабарламаны өзгерту",editLabel:"Хабарлама мәтіні",cancel:"Болдырмау",actionsLabel:"Хабарлама әрекеттері",rate:"5-тен {count} деп бағалау",ratingError:"Бағаны сақтау мүмкін болмады",feedbackOpen:"Пікір қалдыру",feedbackEdit:"Пікірді өзгерту",feedbackLabel:"Жауап туралы пікір",feedbackPlaceholder:"Жауаптың қай жері дұрыс емес?",save:"Сақтау","branch.label":"Нұсқалар","branch.prev":"Алдыңғы нұсқа","branch.next":"Келесі нұсқа","branch.error":"Нұсқаны ауыстыру мүмкін болмады","limit.remaining":"Бүгін {limit} хабарламаның {count} қалды","limit.exhausted":"Бүгінгі хабарлама лимиті таусылды","limit.until":"Хабарлама лимиті таусылды. Жаңа хабарламаларды {time} кейін жіберуге болады.","blocks.data":"Деректер","blocks.hideData":"Деректерді жасыру","blocks.methodology":"Әдістеме","blocks.passport":"Не есептелді","blocks.indicator":"Көрсеткіш","blocks.territory":"Аумақ","blocks.period":"Кезең","blocks.breakdown":"Қима","blocks.breakdown.sex":"жынысы бойынша","blocks.breakdown.age":"жасы бойынша","blocks.breakdown.urban_rural":"қала және ауыл","blocks.breakdown.activity":"қызмет түрлері бойынша","blocks.breakdown.item":"тауарлар бойынша","blocks.substituted":"алмастырылды","blocks.alternatives":"Ұқсас көрсеткіштер","blocks.table":"Деректер кестесі","blocks.tableSearch":"Кестеден іздеу…","blocks.tableEmpty":"Деректер жоқ","blocks.page":"{b} ішінен {a}","blocks.prevPage":"Алдыңғы бет","blocks.nextPage":"Келесі бет","blocks.truncated":"Алғашқы {n} жол көрсетілді — толық деректер Excel-де","blocks.catalogMore":"…және каталогта тағы {count}","blocks.catalogExamples":"Сұрауға болады","blocks.options":"Жауап нұсқалары","blocks.default":"әдепкі","blocks.freeTextHint":"Нұсқаны таңдаңыз немесе төмендегі өріске өзіңіздікін жазыңыз","blocks.findOption":"Тізімнен іздеу…","blocks.chosen":"Таңдалды: {label}","blocks.continue":"Жалғастыру","blocks.cancelPlan":"Бас тарту","blocks.expired":"Нақтылаудың мерзімі өтті","blocks.askAgain":"Сұрақты қайта қою","blocks.dashboard":"Дашбордты ашу","blocks.hideDashboard":"Дашбордты жасыру","chart.kinds":"Диаграмма түрі","chart.kind.bar":"Жолақтар","chart.kind.column":"Бағандар","chart.kind.pie":"Дөңгелек","chart.kind.line":"Сызықтар","chart.kind.area":"Аймақтар","chart.national":"ҚР {value}","chart.top":"Үздік {n}, барлығы {total} — толығы дашбордта","chart.label":"{title}, {period}","files.list":"Файлдар","files.report":"Дайын есеп","files.document":"Өңделетін құжат","files.presentation":"Таныстырылым","files.excel":"Excel деректері","files.csv":"CSV деректері","files.failed":"Файлды жүктеу мүмкін болмады","report.create":"Есеп құру","report.pending":"Есеп файлдары дайындалуда…","report.failed":"Есеп файлдарын құру мүмкін болмады","report.retry":"Қайталау","report.expired":"Файлдардың мерзімі өтті","dashboard.eyebrow":"Талдау","dashboard.label":"Дашборд тақтасы","dashboard.sections":"Дашборд бөлімдері","dashboard.regions":"өңірлер: {n}","dashboard.items":"позициялар: {n}","dashboard.openSource":"Дереккөзде ашу","dashboard.methodology":"Әдістеме","dashboard.fullscreen":"Толық экран","dashboard.collapse":"Кішірейту","dashboard.close":"Жабу","dashboard.chatTab":"Сұхбат","dashboard.dashboardTab":"Дашборд тақтасы","dashboard.view":"Сұхбат немесе дашборд","dashboard.region":"Өңір","dashboard.allRegions":"Барлық өңірлер","dashboard.period":"Кезең","dashboard.mode.label":"Көрініс","dashboard.mode.value":"Мән","dashboard.mode.deviation":"Ауытқу","dashboard.mode.change":"Өзгеріс","dashboard.base.label":"Ауытқу базасы","dashboard.base.median":"медианадан","dashboard.base.national":"ҚР-дан","dashboard.noPrevious":"Алдыңғы кезең жоқ","dashboard.noNational":"Бұл кезеңге ел бойынша мән жоқ","dashboard.fewRegions":"Кемінде екі мән қажет","dashboard.ranking":"Орындар рейтингі","dashboard.trend":"Серпін","dashboard.findings":"Қорытындылар","dashboard.data":"Деректер","dashboard.kpis":"Негізгі көрсеткіштер","dashboard.table.rank":"№","dashboard.table.position":"Атауы","dashboard.table.value":"Мәні, {unit}","dashboard.table.share":"Үлесі, %","dashboard.table.deviation":"Ауытқу, {unit}","dashboard.table.change":"Өзгеріс, {unit}","dashboard.source":"Дереккөз: {name}","dashboard.points":"п.т.","dashboard.kpi.national":"Қазақстан Республикасы","dashboard.kpi.max":"Ең жоғары","dashboard.kpi.min":"Ең төмен","dashboard.kpi.median":"Өңірлер медианасы","dashboard.kpi.spread":"Құлаш","dashboard.kpi.gap":"Алшақтық","dashboard.kpi.last":"Соңғы мән","dashboard.kpi.first":"Кезең басы","dashboard.kpi.change":"Өзгеріс","dashboard.kpi.place":"Орын","dashboard.kpi.placeOf":"{m} ішінен {n}","dashboard.kpi.deviation":"Медианадан ауытқу","dashboard.kpi.previous":"Алдыңғы кезеңге","steps.counter":"{total} ішінен {done}","feedback.reasonsLabel":"Не қате болды?","feedback.reason.wrong_number":"Сан қате","feedback.reason.wrong_indicator":"Көрсеткіш басқа","feedback.reason.wrong_territory":"Аумақ басқа","feedback.reason.wrong_period":"Кезең басқа","feedback.reason.not_answered":"Сұраққа жауап жоқ","feedback.reason.language":"Жауап тілі","feedback.reason.slow":"Тым ұзақ","feedback.reason.other":"Басқа","intro.title":"Бастамас бұрын","intro.continue":"Жалғастыру",source:"Дереккөз: {name}","shell.siteBlocked":"Бұл сайтта чат қолжетімсіз","shell.siteBlockedHint":"Сайт иесі AI-Dana-ны әлі қоспаған немесе қолжетімділік тоқтатылған.","modes.none":"Жауап режимдері қазір қолжетімсіз. Кейінірек қайталап көріңіз.","attachment.sending":"жіберілуде","agent.steps":"Қадамдар","agent.unfinished":"аяқталмады",rateGroup:"Жауапты бағалау","blocks.catalogTitle":"Каталог: {topic}","blocks.catalogSections":"Бөлімдер","blocks.catalogIndicators":"Көрсеткіштер","blocks.catalogSendHint":"Сұрақ таңдалған бойда жіберіледі","blocks.clarification":"Нақтылау","files.expired":"Файл мерзімі өтті","files.notFound":"Файл табылмады","files.unavailable":"Файл қолжетімсіз"},ru:Yk,en:{title:"AI-Dana",open:"Open chat",unreadAnswers:"new answers: {count}",ask:"Ask a question",close:"Close",history:"History",closeHistory:"Hide history",newChat:"New chat",untitled:"New chat",historyEmpty:"No chats yet",historyError:"Could not load the history",delete:"Delete",deleteConfirm:"Delete this chat?",deleteYes:"Delete",deleteNo:"Cancel",deleteError:"Could not delete the chat",modeLabel:"Answer mode","health.idle":"Available","health.busy":"Busy","health.unavailable":"Unavailable",placeholder:"Ask anything",inputLabel:"Message",send:"Send",stop:"Stop",attach:"Attach file",attachOne:"Only one file can be attached",attachHint:"You can attach one file: XLS, XLSX, CSV, TXT or MD, up to {size} MB",disclaimer:"AI can make mistakes — check important information",removeFile:"Remove file",counter:"{count} / {max}",counterLimit:"Character limit reached",counterOver:"Character limit exceeded",fileTooLarge:"File “{name}” is larger than {size} MB",fileType:"File “{name}” is not supported. You can attach XLS, XLSX, CSV, TXT or MD",modeUnavailable:"This mode is unavailable right now, choose another one",greeting:"How can I help?",loading:"Loading…",configError:"The chat is temporarily unavailable",overloaded:"The service is overloaded right now. Please try again later.",retry:"Retry",dismiss:"Dismiss",scrollDown:"Scroll to bottom",settings:"Settings","settings.language":"Language","settings.theme":"Theme","settings.themeLight":"Light","settings.themeDark":"Dark","settings.themeAuto":"System","settings.model":"Default model","settings.modelHint":"Every new chat starts with it","settings.shortcuts":"Keyboard shortcuts","shortcut.search":"Search chats","shortcut.newChat":"New chat","shortcut.sidebar":"Show or hide the sidebar","shortcut.close":"Close the window",search:"Search chats",searchEmpty:"Nothing found",collapseSidebar:"Hide sidebar",expandSidebar:"Show sidebar",expand:"Expand to the whole page",shrink:"Shrink",examples:"Example queries","examples.whatCanDo":"What you can do","group.pinned":"Pinned","group.today":"Today","group.yesterday":"Yesterday","group.week":"Previous 7 days","group.earlier":"Earlier","errors.thread_busy":"AI-Dana is still answering in this chat. Wait for the answer or stop it.","errors.mode_overloaded":"AI-Dana is overloaded right now, please try again a bit later","errors.daily_limit":"You have used up today's message limit","errors.rate_limit":"Too many messages in a row. Please wait a minute.","errors.ip_limit":"Too many messages from your network today. Please try again tomorrow.","errors.concurrency_limit":"Wait for the previous answer to finish","errors.file_too_large":"The file is too large","errors.file_not_allowed":"This file cannot be attached. XLS, XLSX, CSV, TXT and MD are allowed","errors.invalid_query":"The message is empty or too long","errors.invalid_parent":"This message can no longer be changed","errors.mode_not_found":"The selected mode is unavailable right now. Choose another mode.","errors.thread_not_found":"Chat not found","errors.interrupted":"The answer was interrupted","errors.code":"Could not get an answer (code {code}).","errors.generic":"Something went wrong while sending the message.","errors.network":"No connection to the server. Check your network.","errors.render":"This message could not be shown.","agent.thinking":"Thinking…","agent.done":"Done","agent.stopped":"Stopped","agent.stopping":"Stopping…","agent.failed":"couldn’t","agent.interrupted":"Answer interrupted","agent.answerStopped":"Answer stopped. Ask again if needed","agent.seconds":"{value} s","agent.attempt":"attempt {count}","agent.showSteps":"Show steps","agent.hideSteps":"Hide steps","steps.router":"Understanding the question","steps.context_builder":"Looking for the data","steps.sql_architect":"Preparing the calculation","steps.executor":"Calculating the figures","steps.responder":"Preparing the answer","steps.rag":"Looking in reference materials","steps.sql":"Looking for data in open sources","steps.document":"Reading the document","steps.understand":"Understanding the question","steps.search_law":"Searching the law","steps.run_sql":"Calculating the figures","steps.run_query":"Getting the data","steps.data":"Getting the data","steps.lookup_taxpayer":"Looking up the taxpayer","steps.find_taxpayer":"Finding the company by name","steps.ask_clarification":"Clarifying the question","steps.answer":"Preparing the answer","steps.unknown":"Working on the answer",copy:"Copy",copied:"Copied",download:"Download",regenerate:"Regenerate",edit:"Edit message",editLabel:"Message text",cancel:"Cancel",actionsLabel:"Message actions",rate:"Rate {count} out of 5",ratingError:"Could not save the rating",feedbackOpen:"Leave feedback",feedbackEdit:"Edit feedback",feedbackLabel:"Feedback on the answer",feedbackPlaceholder:"What was wrong with the answer?",save:"Save","branch.label":"Versions","branch.prev":"Previous version","branch.next":"Next version","branch.error":"Could not switch the version","limit.remaining":"{count} of {limit} messages left today","limit.exhausted":"You have used up today's message limit","limit.until":"Message limit reached. You can write again after {time}.","blocks.data":"Data","blocks.hideData":"Hide data","blocks.methodology":"Methodology","blocks.passport":"What was calculated","blocks.indicator":"Indicator","blocks.territory":"Territory","blocks.period":"Period","blocks.breakdown":"Breakdown","blocks.breakdown.sex":"by sex","blocks.breakdown.age":"by age","blocks.breakdown.urban_rural":"urban and rural","blocks.breakdown.activity":"by economic activity","blocks.breakdown.item":"by item","blocks.substituted":"substituted","blocks.alternatives":"Similar indicators","blocks.table":"Data table","blocks.tableSearch":"Search the table…","blocks.tableEmpty":"No data","blocks.page":"{a} of {b}","blocks.prevPage":"Previous page","blocks.nextPage":"Next page","blocks.truncated":"Showing the first {n} rows — full data in Excel","blocks.catalogMore":"…and {count} more in the catalog","blocks.catalogExamples":"You can ask","blocks.options":"Answer options","blocks.default":"default","blocks.freeTextHint":"Choose an option or type your own below","blocks.findOption":"Find in the list…","blocks.chosen":"Selected: {label}","blocks.continue":"Continue","blocks.cancelPlan":"Cancel","blocks.expired":"This clarification has expired","blocks.askAgain":"Ask the question again","blocks.dashboard":"Dashboard","blocks.hideDashboard":"Hide dashboard","chart.kinds":"Chart type","chart.kind.bar":"Bars","chart.kind.column":"Columns","chart.kind.pie":"Pie","chart.kind.line":"Lines","chart.kind.area":"Areas","chart.national":"KZ {value}","chart.top":"Top {n} of {total} — all in the dashboard","chart.label":"{title}, {period}","files.list":"Files","files.report":"Final report","files.document":"Editable document","files.presentation":"Presentation","files.excel":"Excel data","files.csv":"CSV data","files.failed":"Could not download the file","report.create":"Generate report","report.pending":"Report files are being prepared…","report.failed":"Could not generate the report files","report.retry":"Retry","report.expired":"The files have expired","dashboard.eyebrow":"Analytics","dashboard.label":"Dashboard","dashboard.sections":"Dashboard sections","dashboard.regions":"regions: {n}","dashboard.items":"items: {n}","dashboard.openSource":"Open in source","dashboard.methodology":"Methodology","dashboard.fullscreen":"Full screen","dashboard.collapse":"Collapse","dashboard.close":"Close","dashboard.chatTab":"Chat","dashboard.dashboardTab":"Dashboard","dashboard.view":"Chat or dashboard","dashboard.region":"Region","dashboard.allRegions":"All regions","dashboard.period":"Period","dashboard.mode.label":"Mode","dashboard.mode.value":"Value","dashboard.mode.deviation":"Deviation","dashboard.mode.change":"Change","dashboard.base.label":"Deviation base","dashboard.base.median":"from median","dashboard.base.national":"from KZ","dashboard.noPrevious":"No previous period","dashboard.noNational":"No national value for this period","dashboard.fewRegions":"At least two values are needed","dashboard.ranking":"Ranking","dashboard.trend":"Trend","dashboard.findings":"Findings","dashboard.data":"Data","dashboard.kpis":"Key figures","dashboard.table.rank":"#","dashboard.table.position":"Item","dashboard.table.value":"Value, {unit}","dashboard.table.share":"Share, %","dashboard.table.deviation":"Deviation, {unit}","dashboard.table.change":"Change, {unit}","dashboard.source":"Source: {name}","dashboard.points":"p.p.","dashboard.kpi.national":"Republic of Kazakhstan","dashboard.kpi.max":"Maximum","dashboard.kpi.min":"Minimum","dashboard.kpi.median":"Regional median","dashboard.kpi.spread":"Range","dashboard.kpi.gap":"Gap","dashboard.kpi.last":"Latest value","dashboard.kpi.first":"Start of period","dashboard.kpi.change":"Change","dashboard.kpi.place":"Rank","dashboard.kpi.placeOf":"{n} of {m}","dashboard.kpi.deviation":"Deviation from median","dashboard.kpi.previous":"vs previous period","steps.counter":"{done} of {total}","feedback.reasonsLabel":"What went wrong?","feedback.reason.wrong_number":"Wrong number","feedback.reason.wrong_indicator":"Wrong indicator","feedback.reason.wrong_territory":"Wrong territory","feedback.reason.wrong_period":"Wrong period","feedback.reason.not_answered":"Question not answered","feedback.reason.language":"Answer language","feedback.reason.slow":"Too slow","feedback.reason.other":"Other","intro.title":"Before you start","intro.continue":"Continue",source:"Source: {name}","shell.siteBlocked":"The chat is not available on this site","shell.siteBlockedHint":"The site owner has not connected AI-Dana yet or access is suspended.","modes.none":"Answer modes are unavailable right now. Please try again later.","attachment.sending":"sending","agent.steps":"Steps","agent.unfinished":"not finished",rateGroup:"Rate the answer","blocks.catalogTitle":"Catalog: {topic}","blocks.catalogSections":"Sections","blocks.catalogIndicators":"Indicators","blocks.catalogSendHint":"The question is sent as soon as you pick it","blocks.clarification":"Clarification","files.expired":"The file has expired","files.notFound":"File not found","files.unavailable":"File unavailable"}},Vn=(e,t,r)=>{const n=xz[e][t];return r?n.replace(/\{(\w+)\}/g,(i,a)=>String(r[a]??i)):n},bz=e=>e in Yk,bu=(e,t)=>{if(!e)return"";for(const r of[e[t],e.ru,...Object.values(e)])if(r)return r;return""},Xk="aid_prefs",wz=["light","dark","auto"],qk=e=>{try{const t=JSON.parse(e?.getItem(Xk)??"{}"),r={};return Xg.includes(t.lang)&&(r.lang=t.lang),wz.includes(t.scheme)&&(r.scheme=t.scheme),r}catch{return{}}},_z=(e,t)=>{try{e?.setItem(Xk,JSON.stringify(t))}catch{}},Kk=({scheme:e})=>e?{scheme:e}:{},kz=(e,t,r)=>t?!r||e.expanded?e:{expanded:!0,byDashboard:!0}:e.byDashboard?{expanded:!1,byDashboard:!1}:e,qg=H.createContext(null),Kg=()=>{const e=H.useContext(qg);if(!e)throw new Error("usePrefs outside PrefsContext");return e},Sz=e=>{let t=e;const r=new Set;return{get:()=>t,set:n=>{t={...t,...n};for(const i of r)i()},subscribe:n=>(r.add(n),()=>r.delete(n))}};class Zg extends H.Component{constructor(){super(...arguments);Rs(this,"state",{failed:!1})}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}}const Cz='*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--aid-c-border)}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--aid-c-font);font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\\!container{width:100%!important;margin-right:auto!important;margin-left:auto!important;padding-right:32px!important;padding-left:32px!important}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:32px;padding-left:32px}@media(min-width:1400px){.\\!container{max-width:1400px!important}.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-\\[3px\\]{inset:3px}.inset-y-0{top:0;bottom:0}.bottom-3{bottom:12px}.bottom-\\[3\\.2rem\\]{bottom:51.2px}.bottom-\\[calc\\(100\\%\\+6px\\)\\]{bottom:calc(100% + 6px)}.left-0{left:0}.left-1\\/2{left:50%}.left-4{left:16px}.left-\\[11px\\]{left:11px}.right-1{right:4px}.right-2{right:8px}.top-0{top:0}.top-1\\/2{top:50%}.top-\\[calc\\(100\\%\\+6px\\)\\]{top:calc(100% + 6px)}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.m-0{margin:0}.mx-1\\.5{margin-left:6px;margin-right:6px}.mx-auto{margin-left:auto;margin-right:auto}.my-0\\.5{margin-top:2px;margin-bottom:2px}.my-4{margin-top:16px;margin-bottom:16px}.-ml-2{margin-left:-8px}.mb-2{margin-bottom:8px}.ml-0\\.5{margin-left:2px}.ml-1\\.5{margin-left:6px}.mr-1{margin-right:4px}.mr-auto{margin-right:auto}.mt-0\\.5{margin-top:2px}.mt-1{margin-top:4px}.mt-3{margin-top:12px}.mt-4{margin-top:16px}.mt-5{margin-top:20px}.mt-\\[18px\\]{margin-top:18px}.mt-px{margin-top:1px}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.\\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.size-10{width:40px;height:40px}.size-2{width:8px;height:8px}.size-3{width:12px;height:12px}.size-3\\.5{width:14px;height:14px}.size-4{width:16px;height:16px}.size-6{width:24px;height:24px}.size-7{width:28px;height:28px}.size-8{width:32px;height:32px}.size-9{width:36px;height:36px}.size-\\[26px\\]{width:26px;height:26px}.size-\\[30px\\]{width:30px;height:30px}.size-\\[34px\\]{width:34px;height:34px}.size-\\[52px\\]{width:52px;height:52px}.h-10{height:40px}.h-3{height:12px}.h-4{height:16px}.h-5{height:20px}.h-6{height:24px}.h-7{height:28px}.h-8{height:32px}.h-9{height:36px}.h-\\[11px\\]{height:11px}.h-\\[17px\\]{height:17px}.h-\\[18px\\]{height:18px}.h-\\[22px\\]{height:22px}.h-\\[30px\\]{height:30px}.h-\\[38px\\]{height:38px}.h-full{height:100%}.h-side-head{height:var(--aid-c-side-head-height)}.h-toolbar{height:var(--aid-c-toolbar-height)}.max-h-56{max-height:224px}.max-h-\\[28rem\\]{max-height:448px}.max-h-full{max-height:100%}.min-h-0{min-height:0px}.min-h-10{min-height:40px}.min-h-11{min-height:44px}.min-h-6{min-height:24px}.min-h-7{min-height:28px}.min-h-8{min-height:32px}.min-h-9{min-height:36px}.min-h-\\[30px\\]{min-height:30px}.min-h-\\[34px\\]{min-height:34px}.min-h-\\[76px\\]{min-height:76px}.w-1\\/2{width:50%}.w-10{width:40px}.w-8{width:32px}.w-\\[18px\\]{width:18px}.w-\\[340px\\]{width:340px}.w-\\[62\\%\\]{width:62%}.w-\\[7px\\]{width:7px}.w-\\[max-content\\]{width:-moz-max-content;width:max-content}.w-\\[min\\(400px\\,100\\%\\)\\]{width:min(400px,100%)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-side{width:var(--aid-c-side-width)}.w-side-over{width:var(--aid-c-side-over-width)}.min-w-0{min-width:0px}.min-w-16{min-width:64px}.min-w-24{min-width:96px}.min-w-32{min-width:128px}.min-w-4{min-width:16px}.min-w-40{min-width:160px}.min-w-5{min-width:20px}.min-w-\\[220px\\]{min-width:220px}.min-w-\\[22px\\]{min-width:22px}.min-w-\\[30px\\]{min-width:30px}.min-w-\\[480px\\]{min-width:480px}.min-w-full{min-width:100%}.max-w-60{max-width:240px}.max-w-\\[300px\\]{max-width:300px}.max-w-\\[340px\\]{max-width:340px}.max-w-\\[420px\\]{max-width:420px}.max-w-\\[440px\\]{max-width:440px}.max-w-\\[520px\\]{max-width:520px}.max-w-\\[640px\\]{max-width:640px}.max-w-\\[78\\%\\]{max-width:78%}.max-w-\\[820px\\]{max-width:820px}.max-w-\\[844px\\]{max-width:844px}.max-w-\\[calc\\(100\\%-2rem\\)\\]{max-width:calc(100% - 32px)}.max-w-\\[min\\(360px\\,100\\%\\)\\]{max-width:min(360px,100%)}.max-w-\\[min\\(360px\\,80vw\\)\\]{max-width:min(360px,80vw)}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-2{--tw-translate-y: 8px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[3px\\]{--tw-translate-y: 3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\\[repeat\\(auto-fit\\,minmax\\(9\\.5rem\\,1fr\\)\\)\\]{grid-template-columns:repeat(auto-fit,minmax(152px,1fr))}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\\.5{gap:2px}.gap-1{gap:4px}.gap-1\\.5{gap:6px}.gap-2{gap:8px}.gap-2\\.5{gap:10px}.gap-3{gap:12px}.gap-3\\.5{gap:14px}.gap-4{gap:16px}.gap-5{gap:20px}.gap-\\[22px\\]{gap:22px}.gap-\\[3px\\]{gap:3px}.gap-\\[7px\\]{gap:7px}.gap-px{gap:1px}.gap-x-3\\.5{-moz-column-gap:14px;column-gap:14px}.gap-y-1{row-gap:4px}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-x-contain{overscroll-behavior-x:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:var(--aid-c-radius)}.rounded-2xl{border-radius:16px}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[14px\\]{border-radius:14px}.rounded-\\[18px\\]{border-radius:18px}.rounded-\\[22\\.5\\%\\]{border-radius:22.5%}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[5px\\]{border-radius:5px}.rounded-\\[7px\\]{border-radius:7px}.rounded-\\[calc\\(var\\(--aid-c-radius\\)\\+6px\\)\\]{border-radius:calc(var(--aid-c-radius) + 6px)}.rounded-aid-field{border-radius:var(--aid-c-radius-field)}.rounded-aid-window{border-radius:var(--aid-c-radius-window)}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--aid-c-radius)}.rounded-md{border-radius:calc(var(--aid-c-radius) - 2px)}.rounded-sm{border-radius:calc(var(--aid-c-radius) - 4px)}.rounded-xl{border-radius:12px}.rounded-br-\\[6px\\]{border-bottom-right-radius:6px}.border{border-width:1px}.border-0{border-width:0px}.border-\\[1\\.5px\\]{border-width:1.5px}.border-\\[3px\\]{border-width:3px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-\\[3px\\]{border-left-width:3px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-border{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-border) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-current{border-color:currentColor}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\\/30{border-color:hsl(var(--destructive) / .3)}.border-error\\/30{border-color:hsl(var(--error),.3)}.border-error\\/35{border-color:hsl(var(--error),.35)}.border-input{border-color:hsl(var(--input))}.border-muted-foreground{border-color:hsl(var(--muted-foreground))}.border-primary{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-primary-30{border-color:color-mix(in srgb,var(--aid-c-primary) 30%,transparent)}.border-primary-35{border-color:color-mix(in srgb,var(--aid-c-primary) 35%,transparent)}.border-primary-50{border-color:color-mix(in srgb,var(--aid-c-primary) 50%,transparent)}.border-primary-pressed{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary-pressed) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-processing\\/25{border-color:hsl(var(--processing),.25)}.border-warning\\/40{border-color:hsl(var(--warning),.4)}.border-r-transparent{border-right-color:transparent}.bg-\\[\\#F3F5FA\\]{--tw-bg-opacity: 1;background-color:rgb(243 245 250 / var(--tw-bg-opacity, 1))}.bg-\\[hsl\\(var\\(--chart-card\\)\\)\\]{background-color:hsl(var(--chart-card))}.bg-accent{background-color:hsl(var(--accent))}.bg-background{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-background) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-border{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-border) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-card{background-color:hsl(var(--card))}.bg-current{background-color:currentColor}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive-background{background-color:hsla(var(--destructive-background))}.bg-destructive-pressed{background-color:hsl(var(--destructive-pressed))}.bg-error-background{background-color:hsla(var(--error-background))}.bg-file-csv{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-csv)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-file-doc{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-doc)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-file-other{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-other)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-file-pdf{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-pdf)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-file-ppt{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-ppt)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-file-xls{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-xls)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-foreground{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-foreground) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-hl{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--hl)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-mode-busy{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--mode-busy)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-mode-down{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--mode-down)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-mode-idle{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--mode-idle)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-muted{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-muted) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-muted-foreground\\/40{background-color:hsl(var(--muted-foreground) / .4)}.bg-muted\\/60{background-color:color-mix(in srgb,var(--aid-c-muted) 60%,transparent)}.bg-primary{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-primary-pressed{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-primary-pressed) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-processing-background{background-color:hsla(var(--processing-background))}.bg-scrim{background-color:var(--scrim)}.bg-secondary{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-secondary) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-transparent{background-color:transparent}.bg-warning-background{background-color:hsla(var(--warning-background))}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\\.5{padding:2px}.p-1{padding:4px}.p-1\\.5{padding:6px}.p-2{padding:8px}.p-2\\.5{padding:10px}.p-3{padding:12px}.p-3\\.5{padding:14px}.p-4{padding:16px}.p-6{padding:24px}.p-8{padding:32px}.px-0{padding-left:0;padding-right:0}.px-0\\.5{padding-left:2px;padding-right:2px}.px-1{padding-left:4px;padding-right:4px}.px-1\\.5{padding-left:6px;padding-right:6px}.px-2{padding-left:8px;padding-right:8px}.px-2\\.5{padding-left:10px;padding-right:10px}.px-3{padding-left:12px;padding-right:12px}.px-3\\.5{padding-left:14px;padding-right:14px}.px-4{padding-left:16px;padding-right:16px}.px-5{padding-left:20px;padding-right:20px}.px-\\[18px\\]{padding-left:18px;padding-right:18px}.px-\\[5px\\]{padding-left:5px;padding-right:5px}.px-px{padding-left:1px;padding-right:1px}.py-0{padding-top:0;padding-bottom:0}.py-0\\.5{padding-top:2px;padding-bottom:2px}.py-1{padding-top:4px;padding-bottom:4px}.py-1\\.5{padding-top:6px;padding-bottom:6px}.py-2{padding-top:8px;padding-bottom:8px}.py-2\\.5{padding-top:10px;padding-bottom:10px}.py-3{padding-top:12px;padding-bottom:12px}.py-3\\.5{padding-top:14px;padding-bottom:14px}.py-6{padding-top:24px;padding-bottom:24px}.py-\\[7px\\]{padding-top:7px;padding-bottom:7px}.py-\\[9px\\]{padding-top:9px;padding-bottom:9px}.py-px{padding-top:1px;padding-bottom:1px}.pb-1{padding-bottom:4px}.pb-1\\.5{padding-bottom:6px}.pb-2{padding-bottom:8px}.pb-2\\.5{padding-bottom:10px}.pb-3{padding-bottom:12px}.pb-4{padding-bottom:16px}.pb-5{padding-bottom:20px}.pb-\\[18px\\]{padding-bottom:18px}.pl-0\\.5{padding-left:2px}.pl-2{padding-left:8px}.pl-2\\.5{padding-left:10px}.pl-3{padding-left:12px}.pl-3\\.5{padding-left:14px}.pl-4{padding-left:16px}.pl-5{padding-left:20px}.pl-\\[18px\\]{padding-left:18px}.pl-\\[22px\\]{padding-left:22px}.pl-\\[34px\\]{padding-left:34px}.pr-1\\.5{padding-right:6px}.pr-2{padding-right:8px}.pr-2\\.5{padding-right:10px}.pr-3{padding-right:12px}.pr-3\\.5{padding-right:14px}.pr-4{padding-right:16px}.pr-7{padding-right:28px}.pr-9{padding-right:36px}.pt-0\\.5{padding-top:2px}.pt-1{padding-top:4px}.pt-1\\.5{padding-top:6px}.pt-14{padding-top:56px}.pt-2{padding-top:8px}.pt-3{padding-top:12px}.pt-3\\.5{padding-top:14px}.pt-7{padding-top:28px}.pt-\\[18px\\]{padding-top:18px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:var(--aid-c-font)}.text-2xl{font-size:20px}.text-2xs{font-size:12px}.text-3xl{font-size:24px}.text-\\[11px\\]{font-size:11px}.text-\\[13\\.5px\\]{font-size:13.5px}.text-\\[13px\\]{font-size:13px}.text-\\[15px\\]{font-size:15px}.text-\\[17px\\]{font-size:17px}.text-\\[9\\.5px\\]{font-size:9.5px}.text-base{font-size:15px}.text-lg{font-size:16px}.text-sm{font-size:14px}.text-xl{font-size:18px}.text-xs{font-size:13px}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-6{line-height:24px}.leading-\\[1\\.35\\]{line-height:1.35}.leading-\\[1\\.3\\]{line-height:1.3}.leading-\\[1\\.55\\]{line-height:1.55}.leading-\\[1\\.65\\]{line-height:1.65}.leading-none{line-height:1}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\\[0\\.02em\\]{letter-spacing:.02em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-\\[hsl\\(var\\(--foreground\\)\\)\\]{color:hsl(var(--foreground))}.text-background{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-background) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-foreground) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-inherit{color:inherit}.text-mode-busy{--tw-text-opacity: 1;color:color-mix(in srgb,hsl(var(--mode-busy)) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-mode-down{--tw-text-opacity: 1;color:color-mix(in srgb,hsl(var(--mode-down)) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-mode-idle{--tw-text-opacity: 1;color:color-mix(in srgb,hsl(var(--mode-idle)) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\\/70{color:hsl(var(--muted-foreground) / .7)}.text-primary{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-primary-foreground{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary-foreground) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-warn-text{--tw-text-opacity: 1;color:color-mix(in srgb,hsl(var(--warn-text)) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-warning{--tw-text-opacity: 1;color:hsl(var(--warning),var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_0_0_3px_var\\(--aid-c-secondary\\)\\]{--tw-shadow: 0 0 0 3px var(--aid-c-secondary);--tw-shadow-colored: 0 0 0 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[inset_0_0_0_1px_var\\(--aid-c-border\\)\\]{--tw-shadow: inset 0 0 0 1px var(--aid-c-border);--tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-panel{--tw-shadow: var(--aid-c-shadow-panel);--tw-shadow-colored: var(--aid-c-shadow-panel);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-pop{--tw-shadow: var(--shadow-pop);--tw-shadow-colored: var(--shadow-pop);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-side{--tw-shadow: var(--aid-c-shadow-side);--tw-shadow-colored: var(--aid-c-shadow-side);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-window{--tw-shadow: var(--aid-c-shadow-window);--tw-shadow-colored: var(--aid-c-shadow-window);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-\\[3px\\]{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-border{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-border) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.ring-secondary{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-secondary) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.ring-offset-background{--tw-ring-offset-color: color-mix(in srgb, var(--aid-c-background) 100% , transparent)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in{--tw-enter-opacity: 0}.slide-in-from-left-2{--tw-enter-translate-x: -8px}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.running{animation-play-state:running}.paused{animation-play-state:paused}:host{display:block}:host([hidden]){display:none!important}.aid-root{all:initial;display:block;width:100%;height:100%;box-sizing:border-box;--aid-d-primary-hovered: color-mix(in oklch, var(--aid-primary) 84%, white);--aid-d-primary-pressed: color-mix(in oklch, var(--aid-primary) 80%, black);--aid-d-primary-foreground: oklch(from var(--aid-primary) clamp(0, (.62 - l) * 1000, 1) 0 0);--aid-d-secondary: color-mix(in srgb, var(--aid-primary) 10%, transparent);--aid-d-ring: color-mix(in srgb, var(--aid-primary) 50%, transparent);--aid-c-primary: var(--aid-primary, hsl(var(--primary)));--aid-c-primary-hovered: var(--aid-primary-hovered, var(--aid-d-primary-hovered, hsl(var(--primary-hovered))));--aid-c-primary-pressed: var(--aid-primary-pressed, var(--aid-d-primary-pressed, hsl(var(--primary-pressed))));--aid-c-primary-foreground: var( --aid-primary-foreground, var(--aid-d-primary-foreground, hsl(var(--primary-foreground))) );--aid-c-secondary: var(--aid-secondary, var(--aid-d-secondary, hsl(var(--secondary))));--aid-c-ring: var(--aid-ring, var(--aid-d-ring, hsl(var(--ring))));--aid-c-background: var(--aid-background, hsl(var(--background)));--aid-c-foreground: var(--aid-foreground, hsl(var(--foreground)));--aid-c-muted: var(--aid-muted, hsl(var(--muted)));--aid-c-border: var(--aid-border, hsl(var(--border)));--aid-c-radius: var(--aid-radius, var(--radius));--aid-c-font: var( --aid-font, var( --aid-theme-font, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif ) );--aid-c-z: var(--aid-z-index, 2147483000);font-family:var(--aid-c-font);font-size:15px;line-height:1.5;color:var(--aid-c-foreground);-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;text-align:left}.aid-root{--warning: 21, 90%, 48%;--warning-background: 27, 96%, 61%, .2;--ring: 201 100% 35%;--chart-1: 201 100% 35%;--chart-2: 174 72% 30%;--chart-3: 27 95% 46%;--chart-4: 330 70% 42%;--chart-5: 252 45% 52%;--chart-ref: 222 47% 11%;--chart-neg: 359 72% 48%;--chart-dim: 201 45% 80%;--chart-grid: 214 32% 88%;--mode-idle: 142 72% 29%;--mode-busy: 32 95% 36%;--mode-down: 359 78% 44%;--file-pdf: 0 72% 45%;--file-doc: 214 80% 44%;--file-ppt: 18 88% 44%;--file-xls: 145 63% 30%;--file-csv: 174 70% 28%;--file-other: 215 16% 42%;--warn-text: 24 90% 30%;--hl: 45 100% 55% / .45;--scrim: rgb(2 6 23 / .48);--persona-ring: 214 32% 88%;--shadow-pop: 0 10px 28px -10px rgb(15 23 42 / .28);--aid-c-radius-window: calc(var(--aid-c-radius) + 6px);--aid-c-radius-field: calc(var(--aid-c-radius) + 4px);--aid-c-radius-bubble-corner: 6px;--aid-c-side-width: 248px;--aid-c-side-over-width: 290px;--aid-c-toolbar-height: 52px;--aid-c-side-head-height: 56px;--aid-c-shadow-launcher: 0 10px 30px -8px rgb(2 6 23 / .45), 0 2px 6px rgb(2 6 23 / .2);--aid-c-shadow-launcher-drag: 0 22px 44px -10px rgb(2 6 23 / .55);--aid-c-shadow-window: 0 30px 70px -20px rgb(2 6 23 / .55);--aid-c-shadow-panel: 0 20px 50px -16px rgb(2 6 23 / .5);--aid-c-shadow-side: 12px 0 30px -12px rgb(2 6 23 / .45)}.aid-root.dark{--ring: 201 90% 60%;--chart-1: 201 90% 60%;--chart-2: 170 60% 52%;--chart-3: 30 95% 62%;--chart-4: 330 75% 70%;--chart-5: 252 75% 76%;--chart-ref: 210 40% 98%;--chart-neg: 359 92% 70%;--chart-dim: 201 30% 32%;--chart-grid: 217 33% 25%;--mode-idle: 142 60% 55%;--mode-busy: 35 95% 62%;--mode-down: 359 95% 72%;--file-pdf: 0 80% 62%;--file-doc: 214 85% 62%;--file-ppt: 20 92% 60%;--file-xls: 145 55% 48%;--file-csv: 172 55% 46%;--file-other: 215 20% 60%;--warn-text: 32 95% 66%;--hl: 45 100% 55% / .35;--scrim: rgb(0 0 0 / .6);--persona-ring: 217 33% 30%;--shadow-pop: 0 12px 32px -10px rgb(0 0 0 / .6)}:where(.aid-root svg.lucide){width:16px;height:16px;flex-shrink:0}:where(.aid-root *),:where(.aid-root *):before,:where(.aid-root *):after{border-color:var(--aid-c-border)}.aid-root[data-mode=launcher]{width:0;height:0}.aid-root{--aid-c-launcher-size: 60px}@media(max-width:639px){.aid-root{--aid-c-launcher-size: 56px}}.aid-launcher{position:fixed;z-index:var(--aid-c-z);display:inline-flex;align-items:center;justify-content:center;gap:10px;box-sizing:border-box;min-width:var(--aid-c-launcher-size);height:var(--aid-c-launcher-size);padding:0;border:0;border-radius:9999px;background:var(--aid-c-primary);color:var(--aid-c-primary-foreground);box-shadow:var(--aid-c-shadow-launcher);font:600 15px/1 var(--aid-c-font);cursor:pointer;outline:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color .12s ease-out,transform .12s ease-out,box-shadow .12s ease-out}.aid-launcher[data-variant=label]{max-width:300px;padding:0 20px 0 8px}.aid-launcher[data-shape=rounded]{border-radius:16px}.aid-launcher[data-shape=square]{border-radius:4px}@media(hover:hover){.aid-launcher:hover{background:var(--aid-c-primary-hovered);transform:translateY(-2px)}}.aid-launcher:active{transform:scale(.96)}.aid-launcher:focus-visible{outline:3px solid var(--aid-c-ring);outline-offset:3px}.aid-launcher[data-dragging=true]{transform:scale(1.06);box-shadow:var(--aid-c-shadow-launcher-drag)}@media(prefers-reduced-motion:reduce){.aid-launcher,.aid-launcher:hover,.aid-launcher:active,.aid-launcher[data-dragging=true]{transition:none;transform:none}}.aid-launcher[data-dragging=true],.aid-window-header[data-dragging=true]{cursor:grabbing}.aid-launcher-origin{position:fixed;z-index:calc(var(--aid-c-z) - 1);box-sizing:border-box;border:1.5px dashed hsl(var(--muted-foreground) / .55);border-radius:9999px;pointer-events:none}.aid-launcher-origin[data-shape=rounded]{border-radius:16px}.aid-launcher-origin[data-shape=square]{border-radius:4px}.aid-root{--aid-c-window-gap: 24px;--aid-c-overlay: var(--aid-overlay, rgb(2 6 23 / .35))}.aid-window{position:fixed;z-index:var(--aid-c-z);display:flex;flex-direction:column;overflow:hidden;transition:opacity .2s ease-out,transform .26s cubic-bezier(.32,.72,0,1),visibility 0s linear 0s}.dana-av{position:relative;display:inline-block;flex-shrink:0;overflow:hidden}.dana-av>*{position:absolute;inset:0;width:100%;height:100%;display:block}.dana-av-body{transform-origin:50% 100%}.dana-av-dot{transform-box:fill-box;transform-origin:50% 50%}.dana-av[data-animated][data-mood=calm] .dana-av-body,.dana-av[data-animated][data-mood=listen] .dana-av-body{animation:dana-breathe 3.6s ease-in-out infinite alternate}.dana-av[data-animated][data-mood=typing] .dana-av-body{animation:dana-bob .34s ease-in-out infinite}.dana-av[data-animated][data-mood=think] .dana-av-body{animation:dana-sway 3.4s ease-in-out infinite alternate}.dana-av[data-animated][data-mood=eureka] .dana-av-body{animation:dana-lift 1.3s cubic-bezier(.3,0,.4,1) infinite}.dana-av[data-animated][data-mood=sorry] .dana-av-body{animation:dana-slump 2.8s ease-in-out infinite}.dana-av[data-animated] .dana-av-bubble,.dana-av[data-animated] .dana-av-dots{animation:dana-float 2.2s ease-in-out infinite alternate}.dana-av[data-animated] .dana-av-dot{animation:dana-dot 1.1s ease-in-out infinite}.dana-av[data-animated] .dana-av-dot:nth-child(3n+2){animation-delay:.18s}.dana-av[data-animated] .dana-av-dot:nth-child(3n){animation-delay:.36s}.dana-av[data-animated] .dana-av-spark{transform-origin:13% 30%;animation:dana-twinkle 1.3s ease-in-out infinite}.dana-av[data-animated] .dana-av-drop{animation:dana-drip 1.8s ease-in infinite}@keyframes dana-breathe{to{transform:translateY(-.5%) scale(1.004,1.01)}}@keyframes dana-bob{50%{transform:translateY(.5%)}}@keyframes dana-sway{0%{transform:rotate(-1.2deg)}to{transform:rotate(1.2deg)}}@keyframes dana-lift{15%{transform:scale(1.02,.98)}42%{transform:translateY(-2.5%) scale(.99,1.015)}65%{transform:scale(1.01,.99)}80%{transform:none}}@keyframes dana-slump{8%{transform:translate(-.7%) rotate(-.6deg)}16%{transform:translate(.7%) rotate(.6deg)}24%{transform:none}60%{transform:translateY(1%) rotate(-.8deg)}}@keyframes dana-float{to{transform:translateY(-1.5%)}}@keyframes dana-dot{0%,60%,to{transform:translateY(0);opacity:.45}30%{transform:translateY(-40%);opacity:1}}@keyframes dana-twinkle{0%,to{transform:scale(.75);opacity:.6}45%{transform:scale(1.08) rotate(12deg);opacity:1}}@keyframes dana-drip{0%{transform:translateY(-1.5%);opacity:0}15%{opacity:1}70%{transform:translateY(3.5%);opacity:1}to{transform:translateY(5.5%);opacity:0}}@media(prefers-reduced-motion:reduce){.dana-av *{animation:none!important}}.aid-overlay{position:fixed;inset:0;z-index:var(--aid-c-z);background:var(--aid-c-overlay);transition:opacity .2s ease-out,visibility 0s linear 0s}.aid-overlay[data-state=closed]{opacity:0;visibility:hidden;transition:opacity .2s ease-in,visibility 0s linear .2s}.aid-root[data-mode=launcher] .aid-window{top:var(--aid-c-window-gap);right:var(--aid-c-window-gap);bottom:var(--aid-c-window-gap);width:min(calc(100vw - 2 * var(--aid-c-window-gap)),max(720px,var(--aid-window-width, 60vw)));transition:opacity .2s ease-out,transform .26s cubic-bezier(.32,.72,0,1),width .26s cubic-bezier(.32,.72,0,1),visibility 0s linear 0s}.aid-root[data-mode=launcher] .aid-window[data-expanded=true]{width:calc(100vw - 2 * var(--aid-c-window-gap))}.aid-root .aid-window[data-state=closed]{opacity:0;transform:translateY(8px);visibility:hidden;pointer-events:none;transition:opacity .16s ease-in,transform .2s ease-in,visibility 0s linear .2s}.aid-root[data-mode=launcher] .aid-window[data-fullscreen=true]{inset:0;width:100%;border-width:0;border-radius:0;box-shadow:none}.aid-root[data-mode=window] .aid-window{position:relative;width:100%;height:100%;box-shadow:none}@media(prefers-reduced-motion:reduce){.aid-root .aid-window,.aid-root .aid-window[data-state=closed],.aid-overlay,.aid-overlay[data-state=closed]{transition:none}}.aid-launcher-badge{position:absolute;top:-4px;right:-4px;box-sizing:content-box;display:flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;border:2px solid var(--aid-c-background);border-radius:9999px;background:hsl(var(--destructive));color:hsl(var(--destructive-foreground));font:700 11px/1 var(--aid-c-font)}.placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.first\\:mt-0:first-child{margin-top:0}.last\\:border-b-0:last-child{border-bottom-width:0px}.empty\\:hidden:empty{display:none}.focus-within\\:border-destructive:focus-within{border-color:hsl(var(--destructive))}.focus-within\\:border-primary:focus-within{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.focus-within\\:ring-\\[3px\\]:focus-within{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-within\\:ring-secondary:focus-within{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-secondary) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.hover\\:border-primary:hover{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.hover\\:border-primary\\/50:hover{border-color:color-mix(in srgb,var(--aid-c-primary) 50%,transparent)}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\\:bg-background:hover{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-background) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.hover\\:bg-background\\/60:hover{background-color:color-mix(in srgb,var(--aid-c-background) 60%,transparent)}.hover\\:bg-destructive-hovered:hover{background-color:hsl(var(--destructive-hovered))}.hover\\:bg-muted:hover{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-muted) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.hover\\:bg-primary-hovered:hover{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-primary-hovered) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.hover\\:bg-secondary-hovered:hover{--tw-bg-opacity: 1;background-color:hsl(var(--secondary-hovered),var(--tw-bg-opacity, 1))}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:text-foreground:hover{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-foreground) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.hover\\:text-primary-foreground:hover{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary-foreground) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.hover\\:text-primary-hovered:hover{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary-hovered) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.hover\\:text-primary\\/80:hover{color:color-mix(in srgb,var(--aid-c-primary) 80%,transparent)}.hover\\:underline:hover{text-decoration-line:underline}.focus\\:border-primary:focus{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.focus\\:ring-\\[3px\\]:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-secondary:focus{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-secondary) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.focus-visible\\:border-primary:focus-visible{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.focus-visible\\:bg-accent:focus-visible{background-color:hsl(var(--accent))}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-inset:focus-visible{--tw-ring-inset: inset}.focus-visible\\:ring-destructive:focus-visible{--tw-ring-color: hsl(var(--destructive))}.focus-visible\\:ring-primary:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-primary) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-ring) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.focus-visible\\:ring-secondary:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-secondary) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.active\\:border-primary-pressed:active{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary-pressed) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.active\\:bg-destructive-pressed:active{background-color:hsl(var(--destructive-pressed))}.active\\:bg-primary-pressed:active{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-primary-pressed) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.active\\:bg-secondary-pressed:active{--tw-bg-opacity: 1;background-color:hsl(var(--secondary-pressed),var(--tw-bg-opacity, 1))}.active\\:text-primary-foreground:active{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary-foreground) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.active\\:text-primary-pressed:active{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary-pressed) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-disabled:disabled{background-color:hsl(var(--disabled))}.disabled\\:bg-muted:disabled{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-muted) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.disabled\\:bg-transparent:disabled{background-color:transparent}.disabled\\:text-disabled-foreground:disabled{color:hsl(var(--disabled-foreground))}.disabled\\:text-muted-foreground:disabled{color:hsl(var(--muted-foreground))}.disabled\\:opacity-100:disabled{opacity:1}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:opacity-60:disabled{opacity:.6}.group\\/attach:focus-within .group-focus-within\\/attach\\:block{display:block}.group:focus-within .group-focus-within\\:opacity-100{opacity:1}.group\\/attach:hover .group-hover\\/attach\\:block{display:block}.group:hover .group-hover\\:opacity-100{opacity:1}.aria-disabled\\:pointer-events-none[aria-disabled=true]{pointer-events:none}.aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}@media(prefers-reduced-motion:reduce){.motion-reduce\\:animate-none{animation:none}.motion-reduce\\:transition-none{transition-property:none}}.\\[\\&\\:\\:-webkit-search-cancel-button\\]\\:hidden::-webkit-search-cancel-button{display:none}.\\[\\&_a\\]\\:no-underline a{text-decoration-line:none}.\\[\\&_li\\+li\\]\\:mt-1 li+li{margin-top:4px}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_ul\\]\\:mt-1 ul{margin-top:4px}@media(hover:none){.\\[\\@media\\(hover\\:none\\)\\]\\:opacity-100{opacity:1}}',Zk=3e3,Qg=6*6e4,Qk={phase:"idle"},Jk={phase:"pending"},wu={phase:"failed"},eS={phase:"expired"},Tz=new Set(["pdf","docx","pptx","xlsx","csv"]),Jg=e=>{switch(e.status){case"queued":case"running":return Jk;case"done":{const t=e.files.filter(r=>Tz.has(r.format));return t.length>0?{phase:"done",files:t}:wu}case"expired":return eS;default:return wu}},qr=new Map,ed=new Set,Az=new Set(["done","failed","expired"]),td=new Set;let co=0;const ca=(e,t)=>{const r=qr.get(e)??{view:Qk};qr.set(e,{...r,...t});for(const n of td)n()},Ez=e=>{const t=qr.get(e);if(t?.jobId===void 0||t.deadline===void 0||t.api===void 0)return;if(clearTimeout(t.timer),Date.now()+Zk>t.deadline){ca(e,{view:wu,timer:void 0});return}const{jobId:r,api:n}=t,i=co,a=setTimeout(()=>{n.reportStatus(r).then(o=>{i===co&&qr.get(e)?.jobId===r&&em(e,o)},()=>{i===co&&qr.get(e)?.jobId===r&&ca(e,{view:wu,timer:void 0})})},Zk);ca(e,{timer:a})},em=(e,t)=>{const r=Jg(t),n=qr.get(e)?.jobId;n!==void 0&&n!==t.job_id&&ed.add(n);const i=qr.get(e)?.deadline??Date.now()+Qg;ca(e,{view:r,jobId:t.job_id,deadline:i,timer:void 0}),r.phase==="pending"&&Ez(e)},_u={subscribe:e=>(td.add(e),()=>{td.delete(e)}),view:e=>qr.get(e)?.view,adopt:(e,t,r)=>{if(ed.has(t.job_id))return;const n=qr.get(e);if(n!==void 0&&(n.jobId!==void 0||n.view.phase!=="idle")){if(n.view.phase==="pending")return;const i=t.job_id===n.jobId;if(i&&(!Az.has(t.status)||Jg(t).phase===n.view.phase)||i&&n.view.phase==="expired")return}clearTimeout(n?.timer),ca(e,{deadline:Date.now()+Qg,timer:void 0,api:r}),em(e,t)},start:(e,t,r)=>{const n=qr.get(e);if(n?.view.phase==="pending")return;clearTimeout(n?.timer),n?.jobId!==void 0&&ed.add(n.jobId),ca(e,{view:Jk,jobId:void 0,deadline:Date.now()+Qg,timer:void 0,api:t});const i=co;t.createReport(e,r).then(a=>{i===co&&em(e,a)},()=>{i===co&&ca(e,{view:wu})})},expire:e=>{qr.get(e)?.view.phase==="done"&&ca(e,{view:eS})}},Dz=()=>{co+=1;for(const e of qr.values())clearTimeout(e.timer);qr.clear(),ed.clear();for(const e of td)e()},Mz={calm:"idle",listen:"idle",think:"thinking",typing:"typing",eureka:"success",sorry:"fail"},Lz={think:"bubble",eureka:"spark",sorry:"drop"},Iz=(e,t)=>e==="error"?"sorry":e==="streaming"?t?"typing":"think":"calm",tS=e=>`${e.replace(/\/+$/,"")}/static/avatars/dana`,Pz={animated:!0,assetsBase:tS("")},tm=H.createContext(Pz),Nz=()=>H.useContext(tm),rd=({mood:e="calm",size:t=40,animated:r=!0,label:n,className:i,bare:a})=>{const{animated:o,assetsBase:s}=Nz(),l=Lz[e],u=f=>`${s}/${f}.webp`;return k.jsxs("span",{className:`dana-av ${a?"":"rounded-[22.5%] bg-[#F3F5FA] ring-1 ring-border"} ${i??""}`.trim(),style:{width:t,height:t},"data-mood":e,"data-animated":r&&o?"":void 0,role:n?"img":void 0,"aria-label":n,"aria-hidden":n?void 0:!0,children:[k.jsx("img",{className:"dana-av-body",src:u(Mz[e]),alt:"",decoding:"async",draggable:!1}),l&&k.jsx("img",{className:`dana-av-${l}`,src:u(l),alt:"",decoding:"async",draggable:!1}),e==="typing"&&k.jsxs("svg",{className:"dana-av-dots",viewBox:"0 0 240 240","aria-hidden":"true",focusable:"false",children:[k.jsx("rect",{x:"189",y:"32",width:"38.4",height:"18.6",rx:"9.3",fill:"#fff",stroke:"#1F3F75",strokeWidth:"1.3"}),[199.9,208.3,216.6].map(f=>k.jsx("circle",{className:"dana-av-dot",cx:f,cy:"41.3",r:"2.6",fill:"#1F3F75"},f))]}),e==="think"&&k.jsx("svg",{className:"dana-av-dots",viewBox:"0 0 240 240","aria-hidden":"true",focusable:"false",children:[26.1,34.4,43.4].map(f=>k.jsx("circle",{className:"dana-av-dot",cx:f,cy:"31.7",r:"1.8",fill:"#1C2B4A"},f))})]})},Rz=2500,Oz=(e,t)=>{const[r,n]=H.useState(!1),[i,a]=H.useState(e);return i!==e&&(a(e),i&&!e&&t==="done"&&n(!0)),H.useEffect(()=>{if(!r)return;const o=window.setTimeout(()=>{n(!1)},Rz);return()=>{window.clearTimeout(o)}},[r]),r},zz=12e3,Fz=5e3,rS="aid_mode",nS=H.createContext(null),ye=()=>{const e=H.useContext(nS);if(!e)throw new Error("useChat outside ChatProvider");return e},rm=(e,t)=>t.kind==="code"?Vn(e,`errors.${t.code}`):t.kind==="status"?t.status===0?Vn(e,"errors.network"):Vn(e,"errors.code",{code:t.status}):Vn(e,"errors.generic"),Fs="temp-thread",Bz=(e=null)=>({config:null,configError:!1,configErrorCode:null,health:{},mode:e,threads:[],threadsError:!1,threadsLoaded:!1,thread:null,loadingThread:null,turn:null,limit:{remaining:null,daily:null,blocked:!1,overloaded:!1},notice:null}),nm=(e,t,r)=>e&&{...e,messages:e.messages.map(n=>n.id===t?r(n):n)},jz=(e,t,r)=>{const n=new Map;for(const i of e?.steps??[])typeof i.id=="string"&&typeof i.startedAt=="number"&&n.set(i.id,i.startedAt);return{...t,steps:t.steps.map(i=>({...i,startedAt:n.get(i.id)??r}))}},Hz=(e,t)=>{const r=new Date(t).toISOString();return{id:Fs,title:e.query.slice(0,80),mode:e.mode,pinned:!1,created_at:r,updated_at:r,current_leaf_id:null,messages:[]}},Vz=e=>({id:e.id,title:e.title,mode:e.mode,pinned:e.pinned,created_at:e.created_at,updated_at:e.updated_at}),Uz=["widget_unauthorized","origin_not_allowed","origin_blocked"],$z=e=>e.configError?e.limit.overloaded?"overloaded":e.configErrorCode!==null&&Uz.includes(e.configErrorCode)?"siteBlocked":"unavailable":e.config?null:"loading",Gz=(e,t)=>{switch(t.type){case"config":{const{config:r}=t,n=r.modes.map(o=>o.slug),i=e.mode&&n.includes(e.mode)?e.mode:n[0]??null,a=r.visitor.remaining_today;return{...e,config:r,configError:!1,configErrorCode:null,mode:i,limit:{remaining:a,daily:r.visitor.daily_limit,blocked:a<=0,overloaded:!1,...a<=0&&(r.visitor.resets_at??e.limit.resetAt)?{resetAt:r.visitor.resets_at??e.limit.resetAt}:{}}}}case"configError":return{...e,configError:!0,configErrorCode:t.code??null,...t.overloaded?{limit:{...e.limit,blocked:!0,overloaded:!0}}:{}};case"health":return{...e,health:t.health};case"mode":return{...e,mode:t.mode};case"threads":return{...e,threads:t.threads,threadsError:!1,threadsLoaded:!0};case"threadsError":return{...e,threadsError:!0,threadsLoaded:!0};case"threadLoading":return{...e,loadingThread:t.id};case"thread":{if(e.turn&&e.thread?.id===t.thread.id||e.loadingThread!==t.thread.id&&e.thread?.id!==t.thread.id)return e;const r=e.config?.modes.map(n=>n.slug)??[];return{...e,thread:t.thread,loadingThread:null,mode:r.includes(t.thread.mode)?t.thread.mode:e.mode}}case"threadFailed":return e.loadingThread===t.id?{...e,loadingThread:null,notice:{kind:"error",reason:t.reason}}:e;case"newChat":return{...e,thread:null,loadingThread:null,turn:null,notice:null};case"threadDeleted":{const r=e.thread?.id===t.id;return{...e,threads:e.threads.filter(n=>n.id!==t.id),...r?{thread:null,turn:null}:{}}}case"turnStart":{const{request:r,token:n,at:i}=t,a=e.thread??Hz(r,i),{user:o,assistant:s}=Y4(r,a);return{...e,notice:null,thread:{...a,current_leaf_id:s.id,messages:[...a.messages,...o?[o]:[],s]},turn:{token:n,assistantId:s.id,...o?{userId:o.id}:{},startedAt:i,adopted:!1,previousLeaf:a.current_leaf_id,optimisticIds:[s.id,...o?[o.id]:[]]}}}case"resumeStart":return{...e,turn:{token:t.token,assistantId:t.messageId,startedAt:t.at,adopted:!0,previousLeaf:e.thread?.current_leaf_id??null,optimisticIds:[]}};case"adopt":{const{turn:r,thread:n}=e;if(r?.token!==t.token||r.adopted||!n)return e;const{metadata:i}=t,a=n.id===Fs,o=X4(n,{...r.userId?{userId:r.userId}:{},assistantId:r.assistantId},i),s=e.limit.remaining===null?null:Math.max(0,e.limit.remaining-1);return{...e,thread:o,threads:a?[Vz(o),...e.threads.filter(l=>l.id!==o.id)]:e.threads,turn:{...r,adopted:!0,assistantId:i.assistantMessageId,...r.userId?{userId:i.userMessageId}:{}},limit:{...e.limit,remaining:s}}}case"snapshot":{const{turn:r}=e;if(r?.token!==t.token)return e;const n=e.thread?.messages.find(a=>a.id===r.assistantId),i=jz(n,t.snapshot,t.at);return{...e,thread:nm(e.thread,r.assistantId,a=>q4(a,i))}}case"turnEnd":{const{turn:r}=e;if(r?.token!==t.token)return e;const n=t.status==="detached"?e.thread:nm(e.thread,r.assistantId,i=>K4(i,t.status,t.errorText,r.startedAt));return{...e,thread:n,turn:null,limit:{...e.limit,blocked:e.limit.blocked||e.limit.remaining===0}}}case"turnStopping":return e.turn?.token===t.token?{...e,turn:{...e.turn,stopping:!0}}:e;case"turnRejected":{const{turn:r,thread:n}=e;if(r?.token!==t.token)return e;const i=new Set(r.optimisticIds),a=n?.messages.filter(d=>!i.has(d.id))??[],o=n&&(n.id!==Fs||a.length>0)?{...n,current_leaf_id:r.previousLeaf,messages:a}:null,{error:s}=t,l=s.status===429&&s.code==="daily_limit",u=s.status===503&&s.code==="anon_budget";let f=e.limit;return l?f={...f,remaining:0,blocked:!0,...s.resetAt?{resetAt:s.resetAt}:{}}:u&&(f={...f,blocked:!0,overloaded:!0}),{...e,thread:o,turn:null,notice:l||u?null:{kind:"error",reason:s.reason},limit:f}}case"leaf":return e.thread?{...e,thread:{...e.thread,current_leaf_id:t.leafId}}:e;case"rating":return{...e,thread:nm(e.thread,t.messageId,r=>({...r,rating:t.rating,...t.feedback!==void 0?{feedback:t.feedback}:{},...t.feedbackReason!==void 0?{feedback_reason:t.feedbackReason}:{}}))};case"notice":return{...e,notice:t.notice}}},im=e=>{const t=e?e.messages.map(Fk):[],r=Bk(t),n=Hk(r,e?.current_leaf_id??null);return{index:r,path:n?V4(r,n):[]}},nd={text:2e5,steps:500,blocks:100,attachments:50},iS=e=>e.text.length>nd.text||e.steps.length>nd.steps||e.blocks.length>nd.blocks||e.attachments.length>nd.attachments,Wz=e=>e.code==="ip_limit"?{kind:"code",code:"ip_limit"}:Zf(e),aS=()=>{try{return window.localStorage}catch{return null}},Yz=()=>{try{return aS()?.getItem(rS)??null}catch{return null}},Xz=e=>e instanceof TypeError,qz=({api:e,lang:t,open:r,onAdminTheme:n,children:i})=>{const[a,o]=H.useReducer(Gz,null,()=>Bz(Yz())),s=H.useRef(a),l=H.useRef(null),u=H.useRef(0),f=H.useRef(t),d=H.useRef(n);H.useLayoutEffect(()=>{s.current=a,f.current=t,d.current=n});const p=H.useCallback(()=>{e.threads().then(G=>{o({type:"threads",threads:G})},()=>{o({type:"threadsError"})})},[e]),v=H.useCallback(()=>{e.config().then(G=>{o({type:"config",config:G}),d.current(gz(G.site.theme)),e.adoptVisitor(G.visitor.token)&&p()},G=>{const I=G instanceof wr&&G.status===503,z=G instanceof wr?G.code:null;o({type:"configError",...I?{overloaded:I}:{},...z?{code:z}:{}})})},[e,p]),g=H.useCallback(G=>{e.thread(G).then(I=>{o({type:"thread",thread:I})},()=>{})},[e]);H.useEffect(()=>{v(),p()},[v,p]);const y=a.config!==null;H.useEffect(()=>{if(!r||!y)return;const G=()=>{typeof document<"u"&&document.visibilityState==="hidden"||e.health().then(z=>{o({type:"health",health:z})},()=>{})};G();const I=window.setInterval(G,zz);return window.addEventListener("focus",G),()=>{window.clearInterval(I),window.removeEventListener("focus",G)}},[e,r,y]);const x=H.useCallback(()=>{l.current?.controller.abort(),l.current=null},[]);H.useEffect(()=>x,[x]);const b=G=>{const I={token:++u.current,controller:new AbortController,stopRequested:!1,...G?{assistantId:G}:{}};return l.current=I,I},_=(G,I)=>G.stopRequested?"stopped":G.tooBig?"error":G.controller.signal.aborted?"detached":I?"error":"done",S=G=>{l.current===G&&(l.current=null)},T=(G,I,z)=>{S(G),p(),z&&I&&I!==Fs&&g(I)},E=H.useCallback(async G=>{const I=s.current;if(I.turn||l.current||I.limit.blocked)return"busy";const z=I.thread&&I.thread.id!==Fs?I.thread.id:void 0,W=b(),{token:F}=W;o({type:"turnStart",token:F,request:G,at:Date.now()});let ee=z;const ae=Se=>{if(iS(Se)){W.tooBig=!0,W.controller.abort();return}Se.metadata&&W.assistantId===void 0&&(W.assistantId=Se.metadata.assistantMessageId,ee=Se.metadata.threadId,o({type:"adopt",token:F,metadata:Se.metadata})),o({type:"snapshot",token:F,snapshot:Se,at:Date.now()})};let ie,_e=!1;try{const{streamChatAnswer:Se}=await Promise.resolve().then(()=>pC);await Se({transport:e.transport,request:G,...z?{threadId:z}:{},signal:W.controller.signal,onSnapshot:ae})}catch(Se){_e=!0,ie=Se}if(!(W.assistantId!==void 0)&&(ie instanceof wr||Xz(ie))){const Se=ie instanceof wr?ie:new wr(0,"network",null);return o({type:"turnRejected",token:F,error:{status:Se.status,code:Se.code,resetAt:Se.resetAt,reason:Wz(Se)}}),S(W),Se.status===429&&v(),"rejected"}const xe=_(W,_e);return o({type:"turnEnd",token:F,status:xe,errorText:xe==="error"?rm(f.current,Zf(ie)):""}),T(W,ee,xe==="done"||xe==="stopped"),"sent"},[e,v,p,g]),D=H.useCallback(async(G,I)=>{if(l.current)return;const z=b(I),{token:W}=z;o({type:"resumeStart",token:W,messageId:I,at:Date.now()});let F,ee=!1;try{const{resumeChatAnswer:ie}=await Promise.resolve().then(()=>pC);await ie(e.transport,I,z.controller.signal,_e=>{if(iS(_e)){z.tooBig=!0,z.controller.abort();return}o({type:"snapshot",token:W,snapshot:_e,at:Date.now()})})}catch(ie){ee=!0,F=ie}if(F instanceof wr){o({type:"turnEnd",token:W,status:"detached",errorText:""}),T(z,G.id,!0);return}const ae=_(z,ee);o({type:"turnEnd",token:W,status:ae,errorText:ae==="error"?rm(f.current,Zf(F)):""}),T(z,G.id,ae==="done"||ae==="stopped")},[e,p,g]),L=H.useCallback(()=>{const G=l.current;if(!G)return;if(G.stopRequested=!0,o({type:"turnStopping",token:G.token}),G.assistantId===void 0){G.controller.abort();return}const I=window.setTimeout(()=>{G.controller.abort()},Fz);G.controller.signal.addEventListener("abort",()=>{window.clearTimeout(I)},{once:!0}),e.stop(G.assistantId).catch(()=>{G.controller.abort()})},[e]),R=H.useCallback(G=>{s.current.thread?.id!==G&&(x(),o({type:"newChat"}),o({type:"threadLoading",id:G}),e.thread(G).then(I=>{o({type:"thread",thread:I});const{path:z}=im(I),W=z[z.length-1];W?.role==="assistant"&&W.status==="streaming"&&D(I,W.id)},I=>{o({type:"threadFailed",id:G,reason:Zf(I)})}))},[e,x,D]),O=H.useCallback(()=>{x(),o({type:"newChat"})},[x]),M=H.useCallback(async G=>{try{await e.deleteThread(G),s.current.thread?.id===G&&x(),o({type:"threadDeleted",id:G})}catch{o({type:"notice",notice:{kind:"text",key:"deleteError"}})}},[e,x]),P=H.useMemo(()=>im(a.thread),[a.thread]),j=H.useCallback(G=>{const{thread:I}=s.current;if(!I||s.current.turn)return;const z=jk(im(I).index,G),W=I.current_leaf_id;!z||z===W||(o({type:"leaf",leafId:z}),e.setLeaf(I.id,z).catch(()=>{o({type:"leaf",leafId:W}),o({type:"notice",notice:{kind:"text",key:"branch.error"}})}))},[e]),B=H.useCallback((G,I)=>{const z=s.current.thread?.messages.find(ee=>ee.id===G);if(!z)return;const W=z.rating,F=I===W?null:I;o({type:"rating",messageId:G,rating:F}),e.rate(G,F).catch(()=>{o({type:"rating",messageId:G,rating:W}),o({type:"notice",notice:{kind:"text",key:"ratingError"}})})},[e]),$=H.useCallback(async(G,I,z)=>{const W=s.current.thread?.messages.find(F=>F.id===G);try{return await e.feedback(G,I,z),o({type:"rating",messageId:G,rating:W?.rating??null,feedback:I,feedbackReason:z??""}),!0}catch{return!1}},[e]),K=H.useCallback(G=>{o({type:"mode",mode:G});try{aS()?.setItem(rS,G)}catch{}},[]),Z=H.useCallback(()=>{o({type:"notice",notice:null})},[]),re=H.useCallback((G,I)=>Vn(t,G,I),[t]),Y=H.useMemo(()=>({state:a,lang:t,api:e,t:re,path:P.path,index:P.index,send:E,stop:L,openThread:R,newChat:O,deleteThread:M,refreshThreads:p,switchBranch:j,rate:B,saveFeedback:$,selectMode:K,reload:()=>{v(),p()},dismissNotice:Z}),[a,t,e,re,P,E,L,R,O,M,p,j,B,$,K,v,Z]);return k.jsx(nS.Provider,{value:Y,children:i})},oS=e=>H.useSyncExternalStore(t=>{if(typeof matchMedia>"u")return()=>{};const r=matchMedia(e);return r.addEventListener("change",t),()=>{r.removeEventListener("change",t)}},()=>typeof matchMedia<"u"&&matchMedia(e).matches,()=>!1),Kz=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),Zz=(e,t)=>{if(e.getAttribute("tabindex")==="-1"||e.getAttribute("aria-hidden")==="true"||getComputedStyle(e).visibility==="hidden")return!1;for(let r=e;r;r=r.parentElement){if(r.hasAttribute("inert")||r.hasAttribute("hidden")||getComputedStyle(r).display==="none")return!1;if(r===t)break}return!t.closest("[inert]")},sS=e=>Array.from(e.querySelectorAll(Kz)).filter(t=>Zz(t,e)),fo=(e,t)=>{H.useLayoutEffect(()=>{e.current?.toggleAttribute("inert",t)},[e,t])},lS=e=>{const t=e.getRootNode();return t instanceof ShadowRoot||t instanceof Document?t.activeElement:null},id=(e,t,r)=>{const n=H.useRef(r);H.useEffect(()=>{n.current=r}),H.useEffect(()=>{const i=e.current;if(!t||!i)return;const a=lS(i);(i.querySelector("[data-autofocus]")??sS(i)[0])?.focus({preventScroll:!0});const s=l=>{if(l.key!=="Tab")return;const u=sS(i),f=u[0],d=u[u.length-1];if(!f||!d){l.preventDefault();return}const p=lS(i);l.shiftKey&&(p===f||!i.contains(p))?(l.preventDefault(),d.focus()):!l.shiftKey&&(p===d||!i.contains(p))&&(l.preventDefault(),f.focus())};return i.addEventListener("keydown",s),()=>{i.removeEventListener("keydown",s),((a instanceof HTMLElement&&a.tagName!=="BODY"&&a.isConnected&&!i.contains(a)?a:null)??n.current?.())?.focus({preventScroll:!0})}},[e,t])},Qz=8,Jz=9,Oi=(e,t)=>e.find(r=>r.kind===t),uS=e=>e.filter(t=>t.kind==="report").at(-1),eF=e=>e.filter(t=>t.kind==="export").flatMap(t=>t.files),tF=(e,t)=>{const r=e.findIndex(a=>a.id===t),n=r>0?e[r-1]:void 0,i=r>=0?e[r+1]:void 0;return{question:n?.role==="user"?n.content:"",reply:i?.role==="user"?i.content:""}},rF=500,nF=(e,t,r)=>{const n=t.trim();if(n.length<1||n.length>rF)return;const i=e[e.length-1];if(i?.role!=="assistant")return;const a=Oi(i.blocks,"clarification");if(a?.allow_free_text&&Ek(a,{isLastInBranch:!0,now:r})==="open")return{clarification_id:a.id,slot:a.slot,value:null,free_text:n}},iF=e=>{if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const t=e.tagName;return t==="TEXTAREA"||t==="SELECT"||t==="INPUT"&&!["button","checkbox","radio"].includes(e.type)},aF=e=>typeof e=="number"&&Number.isFinite(e)?e:null,am=e=>typeof e=="string"?e:typeof e=="number"&&Number.isFinite(e)?String(e):"",ku={messageId:null,sectionId:null,fullscreen:!1,view:"chat"},om=(e,t=null)=>({messageId:e,sectionId:t,fullscreen:!1,view:"dashboard"}),cS=H.createContext(null),ho=()=>{},oF={state:ku,open:ho,toggle:ho,autoOpen:ho,close:ho,setSection:ho,setFullscreen:ho,setView:ho},fa=()=>H.useContext(cS)??oF,sF=1200;function lF(e){const{state:t,setFullscreen:r,close:n}=fa(),i=H.useRef({fullscreen:t.fullscreen,setFullscreen:r,close:n});H.useEffect(()=>{i.current={fullscreen:t.fullscreen,setFullscreen:r,close:n}}),H.useEffect(()=>{if(!e)return;const a=o=>{if(o.key!=="Escape"||o.defaultPrevented)return;o.preventDefault();const s=i.current;s.fullscreen?s.setFullscreen(!1):s.close()};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}},[e])}const uF=(e,t,r)=>e&&!t&&!r;const cF=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fF=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),fS=e=>{const t=fF(e);return t.charAt(0).toUpperCase()+t.slice(1)},dS=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),dF=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var hF={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const pF=H.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>H.createElement("svg",{ref:l,...hF,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:dS("lucide",i),...!a&&!dF(s)&&{"aria-hidden":"true"},...s},[...o.map(([u,f])=>H.createElement(u,f)),...Array.isArray(a)?a:[a]]));const Pe=(e,t)=>{const r=H.forwardRef(({className:n,...i},a)=>H.createElement(pF,{ref:a,iconNode:t,className:dS(`lucide-${cF(fS(e))}`,`lucide-${e}`,n),...i}));return r.displayName=fS(e),r};const hS=Pe("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);const vF=Pe("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);const gF=Pe("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);const pS=Pe("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);const ad=Pe("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);const mF=Pe("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);const yF=Pe("chart-column-big",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["rect",{x:"15",y:"5",width:"4",height:"12",rx:"1",key:"q8uenq"}],["rect",{x:"7",y:"8",width:"4",height:"9",rx:"1",key:"sr5ea"}]]);const da=Pe("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Bs=Pe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const vS=Pe("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const od=Pe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const po=Pe("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const gS=Pe("circle-minus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]]);const sm=Pe("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const lm=Pe("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const xF=Pe("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);const mS=Pe("download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);const um=Pe("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const bF=Pe("file-chart-column-increasing",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M12 18v-4",key:"q1q25u"}],["path",{d:"M16 18v-6",key:"15y0np"}]]);const wF=Pe("file-down",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);const _F=Pe("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const kF=Pe("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);const yS=Pe("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const SF=Pe("landmark",[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]]);const vo=Pe("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const xS=Pe("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const CF=Pe("map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);const bS=Pe("maximize-2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);const TF=Pe("message-circle-question",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const AF=Pe("message-circle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);const wS=Pe("message-square-text",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]]);const _S=Pe("message-square",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);const kS=Pe("minimize-2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);const EF=Pe("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);const DF=Pe("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);const MF=Pe("paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);const SS=Pe("pen-line",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);const LF=Pe("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const IF=Pe("receipt",[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]]);const CS=Pe("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const TS=Pe("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);const PF=Pe("scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);const Su=Pe("search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const NF=Pe("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const cm=Pe("sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);const AS=Pe("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const RF=Pe("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);const OF=Pe("table-2",[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]]);const zF=Pe("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const sd=Pe("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const FF=Pe("trending-up",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);const BF=Pe("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);const Cu=Pe("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function ES(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=ES(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function jF(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=ES(e))&&(n&&(n+=" "),n+=t);return n}const fm="-",HF=e=>{const t=UF(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(fm);return s[0]===""&&s.length!==1&&s.shift(),DS(s,t)||VF(o)},getConflictingClassGroupIds:(o,s)=>{const l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},DS=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?DS(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(fm);return t.validators.find(({validator:o})=>o(a))?.classGroupId},MS=/^\[(.+)\]$/,VF=e=>{if(MS.test(e)){const t=MS.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},UF=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return GF(Object.entries(e.classGroups),r).forEach(([a,o])=>{dm(o,n,a,t)}),n},dm=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:LS(t,i);a.classGroupId=r;return}if(typeof i=="function"){if($F(i)){dm(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([a,o])=>{dm(o,LS(t,a),r,n)})})},LS=(e,t)=>{let r=e;return t.split(fm).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},$F=e=>e.isThemeGetter,GF=(e,t)=>t?e.map(([r,n])=>{const i=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[t+o,s])):a);return[r,i]}):e,WF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(a,o)=>{r.set(a,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let o=r.get(a);if(o!==void 0)return o;if((o=n.get(a))!==void 0)return i(a,o),o},set(a,o){r.has(a)?r.set(a,o):i(a,o)}}},IS="!",YF=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],a=t.length,o=s=>{const l=[];let u=0,f=0,d;for(let x=0;x<s.length;x++){let b=s[x];if(u===0){if(b===i&&(n||s.slice(x,x+a)===t)){l.push(s.slice(f,x)),f=x+a;continue}if(b==="/"){d=x;continue}}b==="["?u++:b==="]"&&u--}const p=l.length===0?s:s.substring(f),v=p.startsWith(IS),g=v?p.substring(1):p,y=d&&d>f?d-f:void 0;return{modifiers:l,hasImportantModifier:v,baseClassName:g,maybePostfixModifierPosition:y}};return r?s=>r({className:s,parseClassName:o}):o},XF=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},qF=e=>({cache:WF(e.cacheSize),parseClassName:YF(e),...HF(e)}),KF=/\s+/,ZF=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(KF);let s="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:f,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:v}=r(u);let g=!!v,y=n(g?p.substring(0,v):p);if(!y){if(!g){s=u+(s.length>0?" "+s:s);continue}if(y=n(p),!y){s=u+(s.length>0?" "+s:s);continue}g=!1}const x=XF(f).join(":"),b=d?x+IS:x,_=b+y;if(a.includes(_))continue;a.push(_);const S=i(y,g);for(let T=0;T<S.length;++T){const E=S[T];a.push(b+E)}s=u+(s.length>0?" "+s:s)}return s};function QF(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=PS(t))&&(n&&(n+=" "),n+=r);return n}const PS=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=PS(e[n]))&&(r&&(r+=" "),r+=t);return r};function JF(e,...t){let r,n,i,a=o;function o(l){const u=t.reduce((f,d)=>d(f),e());return r=qF(u),n=r.cache.get,i=r.cache.set,a=s,s(l)}function s(l){const u=n(l);if(u)return u;const f=ZF(l,r);return i(l,f),f}return function(){return a(QF.apply(null,arguments))}}const _t=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},NS=/^\[(?:([a-z-]+):)?(.+)\]$/i,eB=/^\d+\/\d+$/,tB=new Set(["px","full","screen"]),rB=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nB=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,iB=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,aB=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,oB=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zi=e=>js(e)||tB.has(e)||eB.test(e),ha=e=>Hs(e,"length",pB),js=e=>!!e&&!Number.isNaN(Number(e)),hm=e=>Hs(e,"number",js),Tu=e=>!!e&&Number.isInteger(Number(e)),sB=e=>e.endsWith("%")&&js(e.slice(0,-1)),qe=e=>NS.test(e),pa=e=>rB.test(e),lB=new Set(["length","size","percentage"]),uB=e=>Hs(e,lB,RS),cB=e=>Hs(e,"position",RS),fB=new Set(["image","url"]),dB=e=>Hs(e,fB,gB),hB=e=>Hs(e,"",vB),Au=()=>!0,Hs=(e,t,r)=>{const n=NS.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},pB=e=>nB.test(e)&&!iB.test(e),RS=()=>!1,vB=e=>aB.test(e),gB=e=>oB.test(e),mB=JF(()=>{const e=_t("colors"),t=_t("spacing"),r=_t("blur"),n=_t("brightness"),i=_t("borderColor"),a=_t("borderRadius"),o=_t("borderSpacing"),s=_t("borderWidth"),l=_t("contrast"),u=_t("grayscale"),f=_t("hueRotate"),d=_t("invert"),p=_t("gap"),v=_t("gradientColorStops"),g=_t("gradientColorStopPositions"),y=_t("inset"),x=_t("margin"),b=_t("opacity"),_=_t("padding"),S=_t("saturate"),T=_t("scale"),E=_t("sepia"),D=_t("skew"),L=_t("space"),R=_t("translate"),O=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto",qe,t],j=()=>[qe,t],B=()=>["",zi,ha],$=()=>["auto",js,qe],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Z=()=>["solid","dashed","dotted","double","none"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],G=()=>["","0",qe],I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[js,qe];return{cacheSize:500,separator:":",theme:{colors:[Au],spacing:[zi,ha],blur:["none","",pa,qe],brightness:z(),borderColor:[e],borderRadius:["none","","full",pa,qe],borderSpacing:j(),borderWidth:B(),contrast:z(),grayscale:G(),hueRotate:z(),invert:G(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[sB,ha],inset:P(),margin:P(),opacity:z(),padding:j(),saturate:z(),scale:z(),sepia:G(),skew:z(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",qe]}],container:["container"],columns:[{columns:[pa]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...K(),qe]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Tu,qe]}],basis:[{basis:P()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",qe]}],grow:[{grow:G()}],shrink:[{shrink:G()}],order:[{order:["first","last","none",Tu,qe]}],"grid-cols":[{"grid-cols":[Au]}],"col-start-end":[{col:["auto",{span:["full",Tu,qe]},qe]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[Au]}],"row-start-end":[{row:["auto",{span:[Tu,qe]},qe]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",qe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qe]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",qe,t]}],"min-w":[{"min-w":[qe,t,"min","max","fit"]}],"max-w":[{"max-w":[qe,t,"none","full","min","max","fit","prose",{screen:[pa]},pa]}],h:[{h:[qe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",pa,ha]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",hm]}],"font-family":[{font:[Au]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",qe]}],"line-clamp":[{"line-clamp":["none",js,hm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",zi,qe]}],"list-image":[{"list-image":["none",qe]}],"list-style-type":[{list:["none","disc","decimal",qe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",zi,ha]}],"underline-offset":[{"underline-offset":["auto",zi,qe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),cB]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",uB]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},dB]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...Z(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:Z()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...Z()]}],"outline-offset":[{"outline-offset":[zi,qe]}],"outline-w":[{outline:[zi,ha]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[zi,ha]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",pa,hB]}],"shadow-color":[{shadow:[Au]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...re(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":re()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",pa,qe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[S]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",qe]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",qe]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",qe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[Tu,qe]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",qe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",qe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[zi,ha,hm]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}),he=(...e)=>mB(jF(e));H.createContext(!0),H.createContext(!1);const pm="opacity-0 transition-opacity motion-reduce:transition-none group-focus-within:opacity-100 group-hover:opacity-100 [@media(hover:none)]:opacity-100",OS=120,yB=200,zS=".xls,.xlsx,.csv,.txt,.md",vm=2e3,xB=4,Eu=["wrong_number","wrong_indicator","wrong_territory","wrong_period","not_answered","language","slow","other"],bB=[1,2,3,4,5],go=e=>{const t=e?.trim();if(!t)return null;if(t.startsWith("#"))return t;if(!/^https?:\/\//i.test(t))return null;try{return new URL(t),t}catch{return null}},FS=e=>e.replace(/[\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),gm=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{return wB(e)}},wB=e=>{const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(t),t.select();try{return document.execCommand("copy")}catch{return!1}finally{t.remove()}},_B=(e,t)=>{const r=document.createElement("a");r.href=e,r.download=t,r.rel="noopener",r.style.display="none",document.body.append(r),r.click(),r.remove(),window.setTimeout(()=>{URL.revokeObjectURL(e)},6e4)},kB=["group.pinned","group.today","group.yesterday","group.week","group.earlier"],BS=864e5,SB=(e,t=new Date)=>{const r=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),n=new Map;for(const i of e){const a=new Date(i.updated_at).getTime();let o;i.pinned?o="group.pinned":a>=r?o="group.today":a>=r-BS?o="group.yesterday":a>=r-7*BS?o="group.week":o="group.earlier",n.set(o,[...n.get(o)??[],i])}return kB.flatMap(i=>{const a=n.get(i);return a?[[i,a]]:[]})},CB=()=>{const{t:e}=ye(),{state:t,setView:r}=fa(),n=(i,a)=>k.jsx("button",{type:"button",role:"tab","aria-selected":t.view===i,onClick:()=>{r(i)},className:he("inline-flex h-7 items-center whitespace-nowrap rounded-[7px] px-2.5 text-[13px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",t.view===i?"bg-secondary text-secondary-foreground":"text-muted-foreground hover:text-foreground"),children:a});return k.jsxs("div",{part:"dashboard-tabs",role:"tablist","aria-label":e("dashboard.view"),className:"inline-flex shrink-0 gap-0.5 rounded-md border bg-background p-0.5",children:[n("chat",e("dashboard.chatTab")),n("dashboard",e("dashboard.dashboardTab"))]})},TB=({wide:e,chat:t,panel:r,onPanelFocusChange:n})=>{const{state:i}=fa(),{view:a,fullscreen:o}=i,s=r!=null,l=s&&!e&&a==="dashboard",u=s&&!e&&a==="chat"&&!o,f=H.useRef(null);return fo(f,s&&o),k.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1",children:[k.jsx("div",{ref:f,hidden:l,className:he("relative min-h-0 min-w-0 flex-1 flex-col",l?"hidden":"flex"),children:t}),s?k.jsx("aside",{part:"dashboard","data-fullscreen":o,hidden:u,onFocus:()=>{n?.(!0)},onBlur:d=>{d.currentTarget.contains(d.relatedTarget)||n?.(!1)},className:he("min-h-0 min-w-0 flex-col bg-background",u?"hidden":"flex",o&&"absolute inset-0 z-30",!o&&e&&"w-1/2 min-w-[480px] shrink-0 border-l",!o&&!e&&"flex-1 border-t"),children:r}):null]})};var AB=Object.defineProperty,mm=(e,t)=>AB(e,"name",{value:t,configurable:!0});function ym(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}mm(ym,"setRef");function jS(...e){return t=>{let r=!1;const n=e.map(i=>{const a=ym(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i<n.length;i++){const a=n[i];typeof a=="function"?a():ym(e[i],null)}}}}mm(jS,"composeRefs");function HS(...e){return H.useCallback(jS(...e),e)}mm(HS,"useComposedRefs");var EB=Object.defineProperty,Kr=(e,t)=>EB(e,"name",{value:t,configurable:!0});function VS(e){const t=H.forwardRef((r,n)=>{let{children:i,...a}=r,o=null,s=!1;const l=[];i=XS(i),H.Children.forEach(i,p=>{if(WS(p)){s=!0;const v=p;let g="child"in v.props?v.props.child:v.props.children;for(;xm(g)&&typeof ld=="function";)g=ld(g._payload);o=LB(v,g),l.push(o?.props?.children)}else l.push(p)}),o?o=H.cloneElement(o,void 0,l):!s&&H.Children.count(i)===1&&H.isValidElement(i)&&(o=i);const u=o?GS(o):void 0,f=HS(n,u);if(!o){if(i||i===0)throw new Error(s?NB(e):PB(e));return i}const d=$S(a,o.props??{});return o.type!==H.Fragment&&(d.ref=n?f:u),H.cloneElement(o,d)});return t.displayName=`${e}.Slot`,t}Kr(VS,"createSlot");var DB=VS("Slot"),US=Symbol.for("radix.slottable");function MB(e){const t=Kr(r=>"child"in r?r.children(r.child):r.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=US,t}Kr(MB,"createSlottable");var LB=Kr((e,t)=>"child"in e.props?H.isValidElement(t)?H.cloneElement(t,void 0,e.props.children(t.props.children)):null:H.isValidElement(t)?t:null,"getSlottableElementFromSlottable");function $S(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...s)=>{const l=a(...s);return i(...s),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"?r[n]=[i,a].filter(Boolean).join(" "):n==="aria-describedby"&&(r[n]=qS(a,i))}return{...e,...r}}Kr($S,"mergeProps");function GS(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}Kr(GS,"getElementRef");function WS(e){return H.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===US}Kr(WS,"isSlottable");var IB=Symbol.for("react.lazy");function xm(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===IB&&"_payload"in e&&YS(e._payload)}Kr(xm,"isLazyComponent");function YS(e){return typeof e=="object"&&e!==null&&"then"in e}Kr(YS,"isPromiseLike");function XS(e){let t=e;for(;xm(t)&&typeof ld=="function";)t=ld(t._payload);return t}Kr(XS,"useUnwrappedLazy");function qS(...e){const t=new Set;for(const r of e)if(typeof r=="string")for(const n of String(r).trim().split(/\s+/))n&&t.add(n);return t.size>0?Array.from(t).join(" "):void 0}Kr(qS,"concatAriaDescribedby");var PB=Kr(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),NB=Kr(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),ld=W3[" use ".trim().toString()];function KS(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=KS(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function RB(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=KS(e))&&(n&&(n+=" "),n+=t);return n}const ZS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,QS=RB,JS=((e,t)=>r=>{var n;if(t?.variants==null)return QS(e,r?.class,r?.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(u=>{const f=r?.[u],d=a?.[u];if(f===null)return null;const p=ZS(f)||ZS(d);return i[u][p]}),s=r&&Object.entries(r).reduce((u,f)=>{let[d,p]=f;return p===void 0||(u[d]=p),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:d,className:p,...v}=f;return Object.entries(v).every(g=>{let[y,x]=g;return Array.isArray(x)?x.includes({...a,...s}[y]):{...a,...s}[y]===x})?[...u,d,p]:u},[]);return QS(e,o,l,r?.class,r?.className)})("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 w-[max-content] disabled:bg-disabled disabled:text-disabled-foreground overflow-hidden shrink-0 whitespace-nowrap [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary-hovered focus-visible:ring-primary active:bg-primary-pressed",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive-hovered focus-visible:ring-destructive active:bg-destructive-pressed",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary-hovered focus-visible:ring-primary active:bg-secondary-pressed hover:text-primary-foreground active:text-primary-foreground",ghost:"hover:bg-accent hover:text-accent-foreground focus-visible:ring-primary disabled:bg-transparent",link:"overflow-visible text-primary underline-offset-4 hover:text-primary-hovered focus-visible:ring-primary active:text-primary-pressed disabled:bg-transparent",outline:"bg-secondary text-secondary-foreground hover:bg-secondary-hovered focus-visible:ring-primary active:bg-secondary-pressed hover:text-primary-foreground active:text-primary-foreground",input:"bg-background border border-input focus-visible:ring-primary hover:border-primary active:border-primary-pressed"},size:{default:"h-10 px-4 text-base",xsm:"h-5 px-1 text-xs",xs:"h-6 px-3",sm:"h-8 px-3",md:"h-9 px-4",icon:"size-8 text-base",smIcon:"size-6 rounded-full text-base",lgIcon:"size-10 text-base"},isMenu:{true:"w-full justify-start"}},defaultVariants:{variant:"default",size:"default",isMenu:!1}}),Be=H.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,loading:i=!1,isMenu:a=!1,type:o,...s},l)=>{const u=n?{}:{type:o??"button"};return k.jsx(n?DB:"button",i?{className:he(JS({variant:t,size:r,className:e,isMenu:a})),ref:l,...u,...s,disabled:!0,children:k.jsx(vo,{className:"size-4 animate-spin min-w-16"})}:{className:he(JS({variant:t,size:r,className:e,isMenu:a})),ref:l,...u,...s})});Be.displayName="Button";function bm(e,t,r){if(e===null)return Hn(null,t);const n=Hn(e,t,r);return e>0?`+${n}`:n}function e2(e){return[e.territory_code??e.territory_name,e.item].filter(Boolean).join("|")}function t2(e,t){return e.national?.period===t?e.national.value:null}function OB(e,t,r){const n=mu(e);return Du(e,{period:t,mode:"value",base:"median"}).filter(a=>a.value!==null).slice(0,r).map(a=>{const o=new Map(e.data.filter(s=>e2(s)===a.key).map(s=>[s.period,s.value]));return{key:a.key,name:a.name,points:n.map(s=>({period:s,value:o.get(s)??null}))}})}function zB(e,t){if(new Set(e.data.map(i=>i.territory_code??i.territory_name??"")).size!==1||!e.data.every(i=>i.item!=null&&i.item!==""))return t;const n=new Map(e.data.map(i=>[e2(i),i.item??""]));return t.map(i=>({...i,name:n.get(i.key)??i.name}))}function Du(e,t){return zB(e,c4(e,t))}function r2(e,t,r){const n=t2(e,t);if(n===null||e.value_kind!=="level")return n;const i=r.filter(a=>a!==null&&Number.isFinite(a));return i.length===0?null:n<=Math.max(...i)*1.05?n:null}const FB=["12 76% 61%","173 58% 39%","197 37% 24%","43 74% 66%","27 87% 67%"],wm=e=>e.clientWidth>0&&e.clientWidth<BB,BB=360;function _m(e){const t=document.createElement("span");e.appendChild(t);const r=i=>(t.style.color=i,getComputedStyle(t).color),n={series:FB.map((i,a)=>r(`hsl(var(--chart-${a+1}, ${i}))`)),text:r("hsl(var(--foreground))"),muted:r("hsl(var(--muted-foreground))"),border:r("hsl(var(--chart-grid, var(--border)))"),negative:r("hsl(var(--chart-neg, var(--destructive)))"),reference:r("hsl(var(--chart-ref, var(--foreground)))"),font:getComputedStyle(e).fontFamily,narrow:wm(e)};return t.remove(),n}function jB({option:e,signature:t,label:r,height:n}){const i=H.useRef(null),a=H.useRef(null),o=H.useRef(e);return H.useEffect(()=>{o.current=e}),H.useEffect(()=>{const s=i.current;if(!s)return;let l=!0,u;return Promise.resolve().then(()=>FQ).then(({init:f})=>{if(!l)return;a.current=f(s),a.current.setOption(o.current(_m(s)));let d=wm(s);u=new ResizeObserver(()=>{wm(s)!==d&&(d=!d,a.current?.setOption(o.current(_m(s)),!0)),a.current?.resize()}),u.observe(s)}).catch(()=>{}),()=>{l=!1,u?.disconnect(),a.current?.dispose(),a.current=null}},[]),H.useEffect(()=>{const s=i.current;s&&a.current&&a.current.setOption(o.current(_m(s)),!0)},[t]),k.jsx("div",{ref:i,role:"img","aria-label":r,style:{height:n},className:"w-full min-w-0"})}const HB=[[/товариществ[оа] с ограниченной ответственностью/giu,"ТОО"],[/республиканско(е|го) государственно(е|го) учреждени[ея]/giu,"РГУ"],[/республиканско(е|го) государственно(е|го) предприяти[ея]/giu,"РГП"],[/государственно(е|го) учреждени[ея]/giu,"ГУ"],[/акционерно(е|го) обществ[оа]/giu,"АО"],[/индивидуальный предприниматель/giu,"ИП"]],VB=e=>HB.reduce((t,[r,n])=>t.replace(r,n),e).replace(/\s+/g," ").trim();function UB(e){if(e.trend)return["line","area","column"];const t=["bar","column"],r=e.rows.map(n=>n.value).filter(n=>n!==null);return!e.signed&&r.length>1&&r.every(n=>n>0)&&t.push("pie"),!e.signed&&e.periods.length>1&&e.series.length>0&&t.push("line"),t}const $B=.3;function GB(e,t,r,n){const{lang:i,decimals:a}=n,o=E=>typeof E=="number"?t.signed?bm(E,i,a):Hn(E,i,a):"—",s=new Intl.NumberFormat(i,{notation:"compact",maximumFractionDigits:1}),l={color:r.muted,formatter:E=>s.format(E)},u={lineStyle:{color:r.border}},f=E=>D=>{const L=VB(D);return L.length>E?`${L.slice(0,E-1)}…`:L},d={color:r.muted,formatter:f(r.narrow?12:22)},p={animationDuration:400,color:r.series,textStyle:{fontFamily:r.font,color:r.text},tooltip:{trigger:e==="pie"?"item":"axis",confine:!0,valueFormatter:o}},v=t.rows.map(E=>E.value).filter(E=>E!==null),g=!t.signed&&v.every(E=>E>0)&&!h4(v);if(e==="pie")return{...p,legend:{type:"scroll",bottom:0,textStyle:{color:r.muted}},series:[{type:"pie",radius:["40%","68%"],center:["50%","44%"],itemStyle:{borderColor:"transparent",borderRadius:4},label:{show:!1},data:t.rows.filter(E=>E.value!==null).map(E=>({name:E.name,value:E.value}))}]};if(t.trend||e==="line"||e==="area")return{...p,legend:{type:"scroll",bottom:0,textStyle:{color:r.muted}},grid:{left:8,right:16,top:12,bottom:32,containLabel:!0},xAxis:{type:"category",data:t.periods,axisLabel:{color:r.muted},boundaryGap:e==="column"},yAxis:{type:"value",scale:e!=="column",axisLabel:l,splitLine:u},series:t.series.map(E=>({type:e==="column"?"bar":"line",name:E.name,data:t.periods.map(D=>E.points.find(L=>L.period===D)?.value??null),symbolSize:6,...e==="area"?{areaStyle:{opacity:.15}}:{}}))};const y=e==="bar",x=y?[...t.rows].reverse():t.rows,b=x.map(E=>E.name),_=t.national??null,S={type:"value",scale:g,axisLabel:l,splitLine:u,...r.narrow?{splitNumber:2}:{}},T={type:"category",data:b,axisTick:{show:!1},axisLabel:y?d:{...d,formatter:f(14),rotate:30,interval:0}};return{...p,tooltip:{...p.tooltip,axisPointer:{type:"shadow"}},grid:{left:8,right:y?56:16,top:_===null?12:24,bottom:8,containLabel:!0},xAxis:y?S:T,yAxis:y?T:S,series:[{type:"bar",barMaxWidth:28,data:x.map(E=>({value:E.value,itemStyle:{color:E.value!==null&&E.value<0?r.negative:r.series[0],opacity:t.highlightKey!==void 0&&E.key!==t.highlightKey?$B:1,borderRadius:y?[0,4,4,0]:[4,4,0,0]}})),label:{show:y,position:"right",color:r.text,formatter:E=>o(E.value)},..._===null?{}:{markLine:{symbol:"none",silent:!0,lineStyle:{type:"dashed",color:r.reference},label:{formatter:n.nationalLabel(o(_)),color:r.reference,position:y?"end":"insideEndTop"},data:[y?{xAxis:_}:{yAxis:_}]}}}]}}const WB=5,n2=({section:e,period:t,rows:r,national:n=null,signed:i=!1,highlightKey:a,compact:o=!1,label:s})=>{const{lang:l,t:u}=ye(),f={rows:r,series:OB(e,t,WB),periods:mu(e),trend:e.shape==="trend",national:n,signed:i,highlightKey:a},d=UB(f),[p,v]=H.useState(d[0]),g=d.includes(p)?p:d[0],x=g==="bar"&&!f.trend?Math.max(o?180:240,r.length*24+40):o?240:320;return k.jsxs("div",{part:"section-chart",className:"flex min-w-0 flex-col gap-2",children:[d.length>1?k.jsx("div",{role:"group","aria-label":u("chart.kinds"),className:"inline-flex flex-wrap gap-0.5 self-start rounded-md border bg-background p-0.5",children:d.map(b=>k.jsx("button",{type:"button","aria-pressed":b===g,onClick:()=>{v(b)},className:he("inline-flex h-7 items-center whitespace-nowrap rounded-[7px] px-2.5 text-[13px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",b===g?"bg-secondary text-secondary-foreground":"text-muted-foreground hover:text-foreground"),children:u(`chart.kind.${b}`)},b))}):null,k.jsx(jB,{label:s,height:x,signature:JSON.stringify([g,l,f]),option:b=>GB(g,f,b,{lang:l,decimals:e.decimals,nationalLabel:_=>u("chart.national",{value:_})})})]})},i2=(e,t)=>{const{api:r,lang:n}=ye(),a=H.useSyncExternalStore(_u.subscribe,()=>_u.view(e))??(t?Jg(t):Qk);H.useEffect(()=>{t&&_u.adopt(e,t,r)},[e,t,r]);const o=H.useCallback(()=>{_u.start(e,r,n)},[e,r,n]),s=H.useCallback(()=>{_u.expire(e)},[e]);return{view:a,start:o,expire:s}},a2=({messageId:e,block:t,disabled:r=!1,className:n})=>{const{t:i}=ye(),{view:a,start:o}=i2(e,t);return a.phase!=="idle"?null:k.jsxs(Be,{part:"report",variant:"input",size:"sm",className:he("gap-1.5 text-[13px]",n),disabled:r,onClick:o,children:[k.jsx(wF,{"aria-hidden":"true"}),i("report.create")]})},o2={pdf:"pdf",doc:"doc",docx:"doc",ppt:"ppt",pptx:"ppt",xls:"xls",xlsx:"xls",csv:"csv"},km=e=>{const t=e.lastIndexOf(".");return t<0?"":e.slice(t+1).toLowerCase()},s2=e=>Object.hasOwn(o2,e)?o2[e]??"other":"other",YB={pdf:"bg-file-pdf",doc:"bg-file-doc",ppt:"bg-file-ppt",xls:"bg-file-xls",csv:"bg-file-csv",other:"bg-file-other"},Sm=({ext:e,className:t})=>k.jsx("span",{part:"file-type","data-kind":s2(e),"aria-hidden":"true",className:he("flex size-[34px] shrink-0 items-center justify-center rounded-lg text-[9.5px] font-bold leading-none tracking-[0.02em] text-background",YB[s2(e)],t),children:e?e.slice(0,4).toUpperCase():"FILE"}),l2=["byte","kilobyte","megabyte","gigabyte"];function Cm(e,t){let r=e,n=0;for(;r>=1024&&n<l2.length-1;)r/=1024,n+=1;return new Intl.NumberFormat(t,{style:"unit",unit:l2[n]??"byte",unitDisplay:"short",maximumFractionDigits:n===0?0:1}).format(r)}const XB=/^\/api\/v1\/((?:report-jobs|messages)\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\/files\/\d{1,4})$/i,u2=e=>{const t=XB.exec(e);return t?.[1]?`${Ug}/${t[1]}`:null},qB=1e3,KB=async(e,t,r,n)=>{const i=u2(t);if(!i)return"unavailable";let a;try{a=await(await e.request(i.slice(Ug.length))).blob()}catch(l){return l instanceof wr&&l.status===410?"expired":l instanceof wr&&l.status===404?"notFound":"unavailable"}const o=URL.createObjectURL(a),s=document.createElement("a");s.href=o,s.download=FS(r),s.hidden=!0,n.appendChild(s);try{s.click()}finally{s.remove(),window.setTimeout(()=>{URL.revokeObjectURL(o)},qB)}return"ok"},ZB=["pdf","docx","pptx","xlsx","csv"],QB=e=>{const t=e.getRootNode();return t instanceof ShadowRoot?t:e.parentElement??e},c2=({files:e,onExpired:t,className:r})=>{const{api:n,lang:i,t:a}=ye(),[o,s]=H.useState(null),[l,u]=H.useState({}),f=H.useRef(l);H.useEffect(()=>{f.current=l});const d=e.filter(v=>ZB.includes(v.format)&&u2(v.download_url)!==null);if(d.length===0)return null;const p=(v,g)=>{o===null&&(s(v.download_url),u(y=>Object.fromEntries(Object.entries(y).filter(([x])=>x!==v.download_url))),KB(n,v.download_url,v.filename,QB(g.currentTarget)).then(y=>{if(s(null),y==="ok")return;const x={...f.current,[v.download_url]:y};u(x),d.every(b=>x[b.download_url]==="expired")&&t?.()}))};return k.jsxs("div",{part:"files",role:"group","aria-label":a("files.list"),className:he("flex flex-col gap-1.5",r),children:[k.jsx("div",{className:"text-2xs text-muted-foreground",children:a("files.list")}),k.jsx("ul",{"aria-label":a("files.list"),className:"m-0 flex list-none flex-col gap-1.5 p-0",children:d.map(v=>{const g=o===v.download_url,y=l[v.download_url];return k.jsxs("li",{"data-state":l[v.download_url]??void 0,className:he("flex min-w-0 items-center gap-3 rounded-xl border bg-card p-2",l[v.download_url]&&"border-error/35 bg-error-background"),children:[k.jsx(Sm,{ext:v.format}),k.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[k.jsx("span",{className:"truncate text-sm font-medium leading-tight",title:v.filename,children:a(`files.${Pk(v.format)}`)}),k.jsxs("span",{className:"text-2xs leading-tight text-muted-foreground",children:[v.format.toUpperCase(),v.size_bytes>0?` · ${Cm(v.size_bytes,i)}`:null]})]}),y?k.jsxs("span",{role:"alert",className:"flex shrink-0 items-center gap-1.5 text-[13px]",children:[k.jsx(po,{className:"text-destructive","aria-hidden":"true"}),a(`files.${y}`)]}):k.jsxs(Be,{variant:"ghost",size:"sm",className:"gap-1.5",title:v.filename,"aria-busy":g,disabled:o!==null,"aria-label":`${a("download")}: ${a(`files.${Pk(v.format)}`)}`,onClick:x=>{p(v,x)},children:[g?k.jsx(vo,{className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}):k.jsx(mS,{"aria-hidden":"true"}),a("download")]})]},`${v.format}-${v.download_url}`)})})]})},Tm="flex items-center gap-2.5 rounded-xl border px-3 py-2.5 text-sm",f2=({messageId:e,block:t,className:r})=>{const{t:n}=ye(),{view:i,start:a,expire:o}=i2(e,t);switch(i.phase){case"idle":return null;case"pending":return k.jsxs("div",{part:"report",role:"status","data-state":"pending",className:he(Tm,"border-processing/25 bg-processing-background",r),children:[k.jsx(vo,{className:"shrink-0 animate-spin text-primary-text motion-reduce:animate-none","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 flex-1",children:n("report.pending")})]});case"done":return k.jsx(c2,{files:i.files,onExpired:o,className:r});case"expired":return k.jsxs("div",{part:"report",role:"status","data-state":"expired",className:he(Tm,"bg-card",r),children:[k.jsx(sm,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 flex-1",children:n("report.expired")}),k.jsx(Be,{variant:"input",size:"sm",className:"gap-1.5 text-[13px]",onClick:a,children:n("report.create")})]});case"failed":return k.jsxs("div",{part:"report",role:"alert","data-state":"failed",className:he(Tm,"border-error/30 bg-error-background",r),children:[k.jsx(po,{className:"shrink-0 text-destructive","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 flex-1",children:n("report.failed")}),k.jsx(Be,{variant:"input",size:"sm",className:"gap-1.5 text-[13px]",onClick:a,children:n("report.retry")})]})}},JB=4;function ud(e,t,r){const n=d4(e,t);return n==="п.п."?r("dashboard.points"):n}function d2(e){if(e.length===0)return null;const t=[...e].sort((n,i)=>n-i),r=Math.floor(t.length/2);return t.length%2?t[r]??null:((t[r-1]??0)+(t[r]??0))/2}function Vs(e){const t=new Set;return e.filter(r=>!t.has(r.label)&&t.add(r.label)).slice(0,JB)}function ej(e,{period:t,region:r,lang:n,t:i}){if(r===void 0&&t===e.latest_period&&e.kpis.length>0)return Vs(e.kpis.map(g=>({label:g.label,value:g.value,sub:g.sub??null})));const a=g=>`${Hn(g,n,e.decimals)} ${e.unit.label}`,o=(g,y)=>g===null?Hn(null,n):`${bm(g,n,e.decimals)} ${y}`,s=Du(e,{period:t,mode:"value",base:"median"}).filter(g=>g.value!==null),l=s.map(g=>g.value??0),u=s[0],f=s[s.length-1];if(u===void 0||f===void 0)return[];if(r!==void 0){const g=s.findIndex(b=>b.key===r),y=s[g];if(y===void 0)return[];const x=d2(l);return Vs([{label:y.name,value:a(y.value),sub:t},{label:i("dashboard.kpi.place"),value:i("dashboard.kpi.placeOf",{n:g+1,m:s.length})},{label:i("dashboard.kpi.deviation"),value:o(x===null||y.value===null?null:y.value-x,ud(e,"deviation",i))},{label:i("dashboard.kpi.previous"),value:o(y.delta,ud(e,"change",i))}])}if(e.shape==="trend"){const g=mu(e).filter(T=>T<=t),y=T=>e.data.find(E=>E.period===T&&E.value!==null)?.value??null,x=g[0],b=y(t),_=x===void 0?null:y(x);let S=null;return b!==null&&_!==null&&x!==t&&(S=e.value_kind==="level"?_>0?(b/_-1)*100:null:b-_),Vs([{label:i("dashboard.kpi.last"),value:a(b),sub:t},...x!==void 0&&x!==t?[{label:i("dashboard.kpi.first"),value:a(_),sub:x},{label:i("dashboard.kpi.change"),value:o(S,ud(e,"change",i))}]:[]])}if(e.shape==="breakdown")return Vs([...s.slice(0,3).map(g=>({label:g.name,value:a(g.value),sub:g.share===null?t:`${Hn(g.share,n,1)} %`})),...s.length>1?[{label:i("dashboard.kpi.gap"),value:a((u.value??0)-(f.value??0)),sub:`${u.name} − ${f.name}`}]:[]]);const d=t2(e,t),p=d2(l),v=[{label:i("dashboard.kpi.max"),value:a(u.value),sub:u.name},{label:i("dashboard.kpi.min"),value:a(f.value),sub:f.name},{label:i("dashboard.kpi.median"),value:a(p),sub:t}];return Vs(d!==null?[{label:i("dashboard.kpi.national"),value:a(d),sub:t},...v]:[...v,{label:i("dashboard.kpi.spread"),value:a((u.value??0)-(f.value??0)),sub:`${u.name} − ${f.name}`}])}const tj=({kpis:e})=>{const{t}=ye();return e.length===0?null:k.jsx("ul",{"aria-label":t("dashboard.kpis"),className:"m-0 grid list-none grid-cols-[repeat(auto-fit,minmax(9.5rem,1fr))] gap-2.5 p-0",children:e.map((r,n)=>k.jsxs("li",{className:"flex min-w-0 flex-col gap-0.5 rounded-xl border bg-card px-3.5 py-3",children:[k.jsx("span",{"data-kpi-label":"",className:"truncate text-2xs text-muted-foreground",title:r.label,children:r.label}),k.jsx("span",{className:"text-xl font-semibold tabular-nums leading-snug",children:r.value}),r.sub!=null&&r.sub!==""?k.jsx("span",{className:"truncate text-2xs text-muted-foreground",title:r.sub,children:r.sub}):null]},n))})};function h2({label:e,value:t,options:r,onChange:n}){return k.jsx("div",{role:"group","aria-label":e,className:"inline-flex gap-0.5 rounded-md border bg-background p-0.5",children:r.map(i=>{const a=i.value===t,o=i.disabledHint!==void 0;return k.jsx("button",{type:"button","aria-pressed":a,"aria-disabled":o||void 0,title:i.disabledHint,onClick:()=>{o||n(i.value)},className:he("h-7 whitespace-nowrap rounded-[7px] px-2.5 text-[13px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",a?"bg-secondary text-secondary-foreground":"text-muted-foreground",o?"cursor-not-allowed opacity-50":!a&&"hover:text-foreground"),children:i.label},i.value)})})}const Mu="whitespace-nowrap px-3 py-[7px] text-[13px] font-semibold text-foreground",Us="whitespace-nowrap text-right tabular-nums",rj=({section:e,rows:t,mode:r,lang:n,highlightKey:i})=>{const{t:a}=ye(),o=e.value_kind==="level",s=r==="value"?null:a(r==="change"?"dashboard.table.change":"dashboard.table.deviation",{unit:ud(e,r,a)});return k.jsx("div",{className:"max-h-[28rem] overflow-auto overscroll-contain rounded-[10px] border bg-card",children:k.jsxs("table",{className:"w-full border-collapse text-[13.5px]",children:[k.jsx("thead",{className:"sticky top-0 bg-muted",children:k.jsxs("tr",{className:"border-b",children:[k.jsx("th",{scope:"col",className:he(Mu,"w-10 text-right"),children:a("dashboard.table.rank")}),k.jsx("th",{scope:"col",className:he(Mu,"text-left"),children:a("dashboard.table.position")}),k.jsx("th",{scope:"col",className:he(Mu,Us),children:a("dashboard.table.value",{unit:e.unit.label})}),s!==null?k.jsx("th",{scope:"col",className:he(Mu,Us),children:s}):null,o?k.jsx("th",{scope:"col",className:he(Mu,Us),children:a("dashboard.table.share")}):null]})}),k.jsx("tbody",{children:t.map((l,u)=>k.jsxs("tr",{className:he("h-9 border-b last:border-b-0",l.key===i&&"bg-accent"),children:[k.jsx("td",{className:"px-3 text-right tabular-nums text-muted-foreground",children:u+1}),k.jsx("td",{className:"px-3",children:l.name}),k.jsx("td",{className:he("px-3",Us),children:Hn(l.value,n,e.decimals)}),s!==null?k.jsx("td",{className:he("px-3",Us),children:bm(l.display,n,e.decimals)}):null,o?k.jsx("td",{className:he("px-3",Us),children:Hn(l.share,n,1)}):null]},l.key))})]})})},Am="__all__",Em="size-8 text-muted-foreground hover:text-foreground",nj=({message:e})=>{const{t}=ye(),{state:r,setSection:n}=fa(),i=Oi(e.blocks,"dashboard")?.sections??[],a=i.find(s=>s.id===r.sectionId)??i[0];if(a===void 0)return null;const o=i.length>1?k.jsx("div",{role:"tablist","aria-label":t("dashboard.sections"),className:"flex gap-1 self-start overflow-x-auto rounded-md bg-secondary p-1",children:i.map(s=>{const l=s.id===a.id;return k.jsx("button",{type:"button",role:"tab","aria-selected":l,onClick:()=>{n(s.id)},className:he("min-h-8 shrink-0 rounded-lg px-3 py-1.5 text-left text-sm font-medium leading-snug transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",l?"bg-background text-foreground shadow-sm":"text-secondary-foreground hover:text-foreground"),children:s.title},s.id)})}):null;return k.jsx("section",{"aria-label":t("dashboard.label"),className:"flex h-full min-h-0 min-w-0 flex-1 flex-col bg-background",children:k.jsx(ij,{section:a,message:e,tabs:o},a.id)})},p2=({label:e,value:t,onChange:r,children:n,className:i})=>k.jsxs("div",{className:he("flex flex-col gap-1",i),children:[k.jsx("span",{className:"text-2xs text-muted-foreground","aria-hidden":"true",children:e}),k.jsxs("span",{className:"relative inline-flex",children:[k.jsx("select",{"aria-label":e,value:t,onChange:a=>{r(a.target.value)},className:"h-8 w-full min-w-0 appearance-none truncate rounded-md border border-input bg-background py-0 pl-2.5 pr-7 text-sm text-foreground transition-colors hover:bg-muted focus-visible:border-primary focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-secondary motion-reduce:transition-none",children:n}),k.jsx(Bs,{className:"pointer-events-none absolute right-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"})]})]}),v2=({label:e,children:t})=>k.jsxs("div",{className:"flex flex-col gap-1",children:[k.jsx("span",{className:"text-2xs text-muted-foreground","aria-hidden":"true",children:e}),t]}),ij=({section:e,message:t,tabs:r})=>{const{lang:n,t:i}=ye(),{state:a,setFullscreen:o,close:s}=fa(),{fullscreen:l}=a,u=mu(e),[f,d]=H.useState(()=>u.includes(e.latest_period)?e.latest_period:u.at(-1)??e.latest_period),[p,v]=H.useState(),[g,y]=H.useState("value"),[x,b]=H.useState("median"),_=f4(e,f),S=e.shape==="trend",T=S||g==="change"&&!_.change||g==="deviation"&&!_.deviation?"value":g,E=x==="national"&&_.national?"national":"median",D=Du(e,{period:f,mode:T,base:E}),L=T==="value"?D:Du(e,{period:f,mode:"value",base:E}),R=[...L].sort((z,W)=>z.name.localeCompare(W.name,n)),O=p!==void 0&&R.some(z=>z.key===p)?p:void 0,M=ej(e,{period:f,region:O,lang:n,t:i}),P=f===e.latest_period&&O===void 0?e.findings:[],j=e.shape==="regional",B=L.filter(z=>z.value!==null).length,$=[f,e.unit.label,i(j?"dashboard.regions":"dashboard.items",{n:B})].join(" · "),K=go(e.source_url),Z=e.methodology?.editions,re=Z?.[n]??Z?.ru,Y=go(re?.url),G=`${i(S?"dashboard.trend":"dashboard.ranking")}: ${e.title}, ${f}`,I=uS(t.blocks);return k.jsxs(k.Fragment,{children:[k.jsxs("header",{className:"flex shrink-0 flex-col gap-2 border-b py-3.5 pl-5 pr-4",children:[k.jsxs("div",{className:"flex items-center gap-1",children:[k.jsx("span",{className:"min-w-0 flex-1 text-2xs font-semibold uppercase tracking-wide text-primary-text",children:i("dashboard.eyebrow")}),Y!==null?k.jsx(Be,{variant:"ghost",size:"icon",className:Em,asChild:!0,children:k.jsx("a",{href:Y,target:"_blank",rel:"noopener noreferrer","aria-label":i("dashboard.methodology"),title:re?.title??i("dashboard.methodology"),children:k.jsx(ad,{"aria-hidden":"true"})})}):null,K!==null?k.jsx(Be,{variant:"ghost",size:"icon",className:Em,asChild:!0,children:k.jsx("a",{href:K,target:"_blank",rel:"noopener noreferrer","aria-label":i("dashboard.openSource"),title:i("dashboard.openSource"),children:k.jsx(um,{"aria-hidden":"true"})})}):null,k.jsxs(Be,{variant:"ghost",size:"sm",className:"gap-1.5 text-muted-foreground hover:text-foreground","aria-pressed":l,onClick:()=>{o(!l)},children:[l?k.jsx(kS,{"aria-hidden":"true"}):k.jsx(bS,{"aria-hidden":"true"}),i(l?"dashboard.collapse":"dashboard.fullscreen")]}),k.jsx(Be,{variant:"ghost",size:"icon",className:Em,"aria-label":i("dashboard.close"),title:i("dashboard.close"),onClick:s,children:k.jsx(Cu,{"aria-hidden":"true"})})]}),k.jsx("h2",{className:"m-0 text-xl font-semibold leading-snug",children:e.title}),k.jsx("span",{className:"text-xs text-muted-foreground",children:$})]}),k.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3.5 overflow-y-auto overscroll-contain px-5 pb-5 pt-3.5",children:[r,k.jsxs("div",{className:"flex flex-wrap items-end gap-3",children:[j&&R.length>1?k.jsxs(p2,{label:i("dashboard.region"),value:O??Am,onChange:z=>{v(z===Am?void 0:z)},className:"min-w-40 max-w-60",children:[k.jsx("option",{value:Am,children:i("dashboard.allRegions")}),R.map(z=>k.jsx("option",{value:z.key,children:z.name},z.key))]}):null,u.length>1?k.jsx(p2,{label:i("dashboard.period"),value:f,onChange:d,className:"min-w-24",children:[...u].reverse().map(z=>k.jsx("option",{value:z,children:z},z))}):null,S?null:k.jsx(v2,{label:i("dashboard.mode.label"),children:k.jsx(h2,{label:i("dashboard.mode.label"),value:T,onChange:y,options:[{value:"value",label:i("dashboard.mode.value")},{value:"deviation",label:i("dashboard.mode.deviation"),disabledHint:_.deviation?void 0:i("dashboard.fewRegions")},{value:"change",label:i("dashboard.mode.change"),disabledHint:_.change?void 0:i("dashboard.noPrevious")}]})}),T==="deviation"?k.jsx(v2,{label:i("dashboard.base.label"),children:k.jsx(h2,{label:i("dashboard.base.label"),value:E,onChange:b,options:[{value:"median",label:i("dashboard.base.median")},{value:"national",label:i("dashboard.base.national"),disabledHint:_.national?void 0:i("dashboard.noNational")}]})}):null]}),k.jsx(tj,{kpis:M}),k.jsx(Dm,{title:i(S?"dashboard.trend":"dashboard.ranking"),card:!0,children:k.jsx(n2,{section:e,period:f,label:G,rows:D.map(z=>({key:z.key,name:z.name,value:z.display})),national:T==="value"?r2(e,f,D.map(z=>z.value)):null,signed:T!=="value",highlightKey:O})}),P.length>0?k.jsx(Dm,{title:i("dashboard.findings"),children:k.jsx("ul",{className:"flex list-disc flex-col gap-1 pl-5 text-sm",children:P.map((z,W)=>k.jsx("li",{children:z},W))})}):null,k.jsx(Dm,{title:i("dashboard.data"),children:k.jsx(rj,{section:e,rows:D,mode:T,lang:n,highlightKey:O})}),k.jsxs("footer",{className:"flex flex-col gap-3 border-t pt-3.5",children:[e.source_name!=null&&e.source_name!==""?k.jsx("p",{className:"text-xs text-muted-foreground",children:i("dashboard.source",{name:e.source_name})}):null,k.jsx("div",{className:"-ml-2 empty:hidden",children:k.jsx(a2,{messageId:t.id,block:I})}),k.jsx(f2,{messageId:t.id,block:I})]})]})]})},Dm=({title:e,children:t,card:r=!1})=>k.jsxs("section",{className:"flex flex-col gap-2",children:[k.jsx("h3",{className:"m-0 text-sm font-semibold",children:e}),r?k.jsx("div",{className:"rounded-xl bg-[hsl(var(--chart-card))] px-4 py-3.5",children:t}):t]}),aj=({threadId:e,children:t})=>{const[r,n]=H.useState(ku),[i,a]=H.useState(e);i!==e&&(a(e),i!==void 0&&n(ku));const o=H.useRef(new Set),s=H.useCallback((y,x)=>{n(om(y,x??null))},[]),l=H.useCallback(y=>{n(x=>x.messageId===y?ku:om(y))},[]),u=H.useCallback(y=>{o.current.has(y)||(o.current.add(y),n(om(y)))},[]),f=H.useCallback(()=>{n(ku)},[]),d=H.useCallback(y=>{n(x=>({...x,sectionId:y}))},[]),p=H.useCallback(y=>{n(x=>({...x,fullscreen:y}))},[]),v=H.useCallback(y=>{n(x=>({...x,view:y}))},[]),g=H.useMemo(()=>({state:r,open:s,toggle:l,autoOpen:u,close:f,setSection:d,setFullscreen:p,setView:v}),[r,s,l,u,f,d,p,v]);return k.jsx(cS.Provider,{value:g,children:t})};function oj(e,t,r){const{autoOpen:n}=fa(),[i,a]=H.useState(null);i?.threadId===void 0&&i!==null&&t===void 0?i.active!==r.streaming&&a({...i,active:r.streaming}):i?.threadId===void 0&&i!==null?i.active||r.streaming||e.some(f=>!Kf(f.id))?a({threadId:t,ids:i.ids,active:!0}):r.loaded&&a({threadId:t,ids:new Set(e.map(f=>f.id)),active:!1}):r.loaded&&(i===null||i.threadId!==t)&&a({threadId:t,ids:new Set(e.map(u=>u.id)),active:!1});const o=e.at(-1),s=o?.id,l=i!==null&&i.threadId===t&&o?.role==="assistant"&&!i.ids.has(o.id)&&o.status!=="streaming"&&Kf(o.id)&&Oi(o.blocks,"dashboard")?.auto_open===!0;H.useEffect(()=>{l&&s!=null&&n(s)},[l,s,n])}const g2="aid_intro_ack",sj=()=>{try{return window.localStorage.getItem(g2)!==null}catch{return!1}},lj=({active:e=!0})=>{const{state:t,lang:r,t:n}=ye(),i=bu(t.config?.intro_notice??void 0,r).trim(),[a,o]=H.useState(sj),s=e&&i!==""&&!a,l=H.useId(),u=i.split(`
|
|
17
|
+
`).filter(p=>p.trim()!==""),f=H.useRef(null);fo(f,!s),id(f,s,()=>{const p=f.current?.getRootNode();return p instanceof ShadowRoot||p instanceof Document?p.querySelector('[part="input"]'):null});const d=H.useCallback(()=>{o(!0);try{window.localStorage.setItem(g2,"1")}catch{}},[]);return H.useEffect(()=>{if(!s)return;const p=v=>{v.key==="Escape"&&(v.preventDefault(),d())};return window.addEventListener("keydown",p,!0),()=>{window.removeEventListener("keydown",p,!0)}},[s,d]),i===""?null:k.jsxs("div",{ref:f,className:he("absolute inset-0 z-50 flex items-center justify-center p-4 transition-opacity duration-150 motion-reduce:transition-none",s?"opacity-100":"pointer-events-none opacity-0"),"aria-hidden":!s,children:[k.jsx("div",{"aria-hidden":"true",className:"absolute inset-0 bg-scrim"}),k.jsxs("div",{part:"intro",role:"dialog","aria-modal":"true","aria-labelledby":l,className:he("relative flex max-h-full w-[min(400px,100%)] flex-col overflow-hidden rounded-aid-field border bg-background shadow-panel transition-transform duration-200 motion-reduce:transition-none",s?"translate-y-0":"translate-y-2"),children:[k.jsx("h2",{id:l,className:"m-0 py-3.5 pl-[18px] pr-3 pb-2.5 text-lg font-semibold",children:n("intro.title")}),k.jsx("div",{className:"flex min-h-0 flex-col gap-2.5 overflow-y-auto px-[18px] pt-1",children:u.map((p,v)=>k.jsx("p",{className:"text-[13px] leading-[1.55]",children:p},`${v}-${p}`))}),k.jsx("footer",{className:"flex shrink-0 justify-end px-[18px] pb-[18px] pt-3.5",children:k.jsx(Be,{"data-autofocus":!0,size:"md",onClick:d,children:n("intro.continue")})})]})]})},Lu=e=>e?!e.available||e.status==="down"||e.status==="overloaded"?"unavailable":e.status==="idle"?"idle":e.status==="busy"||e.status==="degraded"?"busy":"unknown":"unknown",uj={idle:"text-mode-idle",busy:"text-mode-busy",unavailable:"text-mode-down",unknown:"text-muted-foreground"},cj={idle:"health.idle",busy:"health.busy",unavailable:"health.unavailable"},m2=e=>cj[e],fj={bot:mF,"book-open":ad,database:xF,"file-text":_F,globe:kF,lock:xS,"message-circle":AF,"message-square":_S,search:Su,sparkles:cm},Mm=({name:e,className:t})=>{const r=fj[e]??cm;return k.jsx(r,{className:he("size-4 shrink-0",t),"aria-hidden":"true"})},Lm=({level:e,lang:t})=>e==="unknown"?null:k.jsxs("span",{part:"mode-health","data-level":e,className:he("inline-flex shrink-0 items-center gap-1.5 text-2xs font-semibold",uj[e]),children:[k.jsx("span",{"aria-hidden":"true",className:"size-2 shrink-0 rounded-full bg-current"}),Vn(t,m2(e))]}),y2="inline-flex h-8 min-w-0 max-w-[min(360px,100%)] items-center gap-[7px] rounded-full border bg-background pl-2.5 pr-2 text-[13px] font-medium text-foreground",x2=(e,t)=>bu(e.title,t)||e.slug,b2=({modes:e,health:t,value:r,onChange:n,lang:i,label:a,variant:o="field",placement:s="top"})=>{const l=o==="pill",[u,f]=H.useState(!1),d=Math.max(0,e.findIndex(M=>M.slug===r)),[p,v]=H.useState(d),g=H.useId(),y=H.useRef(null),x=H.useRef(null),b=e[d],_=Lu(b?t[b.slug]:void 0),S=H.useRef(null);H.useEffect(()=>{u&&x.current?.focus()},[u]),H.useEffect(()=>{if(!u)return;const M=j=>{j.key==="Escape"&&(j.preventDefault(),j.stopPropagation(),f(!1),y.current?.focus())},P=j=>{S.current&&!j.composedPath().includes(S.current)&&f(!1)};return window.addEventListener("keydown",M,!0),window.addEventListener("pointerdown",P,!0),()=>{window.removeEventListener("keydown",M,!0),window.removeEventListener("pointerdown",P,!0)}},[u]);const T=M=>{f(!1),M&&y.current?.focus()},E=()=>{v(d),f(!0)},D=M=>{const P=e[M];P&&n(P.slug),T(!0)},L=M=>{switch(M.key){case"ArrowDown":M.preventDefault(),v(P=>Math.min(e.length-1,P+1));break;case"ArrowUp":M.preventDefault(),v(P=>Math.max(0,P-1));break;case"Home":M.preventDefault(),v(0);break;case"End":M.preventDefault(),v(e.length-1);break;case"Enter":case" ":M.preventDefault(),D(p);break;case"Tab":T(!1);break}},R=b?x2(b,i):"",O=_==="unknown"?"":Vn(i,m2(_));return k.jsxs("div",{ref:S,className:he(l?"min-w-0":"flex flex-col gap-1.5"),onBlur:M=>{u&&M.relatedTarget instanceof Node&&!M.currentTarget.contains(M.relatedTarget)&&f(!1)},children:[k.jsxs("button",{ref:y,part:l?"mode-select":void 0,type:"button","aria-haspopup":"listbox","aria-expanded":u,"aria-controls":u?`${g}-list`:void 0,"aria-label":`${a}: ${R}${l&&O?`, ${O}`:""}`,onClick:()=>{u?T(!1):E()},onKeyDown:M=>{M.key==="ArrowDown"&&!u&&(M.preventDefault(),E())},className:he(l?he(y2,"transition-colors hover:bg-muted motion-reduce:transition-none"):"inline-flex h-8 w-full items-center justify-between gap-2 rounded-md border bg-background pl-2.5 pr-2 text-xs","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",u&&"border-primary shadow-[0_0_0_3px_var(--aid-c-secondary)]"),children:[l&&b?k.jsx(Mm,{name:b.icon}):null,k.jsx("span",{className:he("truncate",l&&"min-w-0"),children:R}),l?k.jsx(Lm,{level:_,lang:i}):null,k.jsx(Bs,{className:he("size-3.5 shrink-0 text-muted-foreground transition-transform motion-reduce:transition-none",(l?s==="top"!==u:u)&&"rotate-180"),"aria-hidden":"true"})]}),u?k.jsxs("ul",{ref:x,id:`${g}-list`,part:l?"mode-list":void 0,role:"listbox",tabIndex:-1,"aria-label":a,"aria-activedescendant":`${g}-${p}`,onKeyDown:L,className:he("flex max-h-56 flex-col overflow-y-auto rounded-md border bg-background p-1 shadow-pop focus-visible:outline-none",l&&he("absolute left-0 z-20 w-[340px] max-w-full duration-150 animate-in fade-in motion-reduce:animate-none",s==="top"?"bottom-[calc(100%+6px)]":"top-[calc(100%+6px)]")),children:[l?k.jsx("li",{role:"presentation",className:"px-2.5 pb-1 pt-1.5 text-2xs text-muted-foreground",children:a}):null,e.map((M,P)=>{const j=Lu(t[M.slug]),B=bu(M.description,i);return k.jsxs("li",{id:`${g}-${P}`,part:l?"mode-option":void 0,role:"option","aria-selected":P===d,onMouseDown:$=>{$.preventDefault()},onMouseEnter:()=>{v(P)},onClick:()=>{D(P)},className:he("flex cursor-pointer items-start gap-2.5 rounded-lg px-2.5 py-2",P===p&&"bg-accent",P===d&&"bg-secondary"),children:[k.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-lg bg-muted",children:k.jsx(Mm,{name:M.icon})}),k.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[k.jsx("span",{className:"truncate text-sm font-medium leading-[1.35]",children:x2(M,i)}),B?k.jsx("span",{className:"line-clamp-2 text-2xs leading-[1.35] text-muted-foreground",children:B}):null,k.jsx(Lm,{level:j,lang:i})]}),k.jsx(da,{className:he("mt-1 size-4 shrink-0 text-primary",P!==d&&"invisible"),"aria-hidden":"true"})]},M.slug)})]}):null]})},Im=(e,t)=>e===(t>=0?t:0)?0:-1,dj={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"start",End:"end"},Pm=(e,t=!1)=>{const r=dj[e.key];if(r===void 0)return;const n=Array.from(e.currentTarget.querySelectorAll('[role="radio"]:not(:disabled)')),i=e.currentTarget.getRootNode(),a=n.findIndex(s=>s===i.activeElement);if(n.length===0)return;e.preventDefault();const o=r==="start"?0:r==="end"?n.length-1:(Math.max(a,0)+r+n.length)%n.length;n[o]?.focus(),t&&n[o]?.click()},hj=({label:e,className:t,children:r})=>k.jsx("div",{role:"radiogroup","aria-label":e,className:t,onKeyDown:n=>{Pm(n,!0)},children:r}),pj=()=>typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgent),vj=["search","newChat","sidebar","close"],gj=e=>{const t=e?"⌘":"Ctrl",r=e?"⇧":"Shift",n=i=>e?[r,t,i]:[t,r,i];return{search:[t,"K"],newChat:n("O"),sidebar:n("S"),close:["Esc"]}},mj={kk:"Қазақша",ru:"Русский",en:"English"},cd=({title:e,hint:t,children:r})=>k.jsxs("section",{className:"flex flex-col gap-2",children:[k.jsx("h3",{className:"text-xs font-semibold text-muted-foreground",children:e}),r,t?k.jsx("p",{className:"text-xs text-muted-foreground",children:t}):null]}),w2=({value:e,options:t,onChange:r,label:n})=>{const i=t.findIndex(a=>a.value===e);return k.jsx(hj,{label:n,className:"grid grid-cols-3 gap-2",children:t.map((a,o)=>{const s=a.value===e;return k.jsxs("button",{type:"button",role:"radio","aria-checked":s,tabIndex:Im(o,i),lang:a.lang,onClick:()=>{r(a.value)},className:he("flex min-w-0 items-center gap-2.5 rounded-md border px-3 py-2.5 text-left text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",s?"border-primary bg-secondary":"bg-background hover:border-primary/50"),children:[k.jsx("span",{"aria-hidden":"true",className:he("relative size-4 shrink-0 rounded-full border-[1.5px] bg-background",s?"border-primary":"border-muted-foreground"),children:s?k.jsx("span",{className:"absolute inset-[3px] rounded-full bg-primary"}):null}),k.jsx("span",{className:"truncate",children:a.label})]},a.value)})})},yj=({children:e})=>k.jsx("kbd",{className:"inline-flex h-5 min-w-5 items-center justify-center rounded border bg-background px-[5px] font-sans text-[11px] font-medium leading-none text-muted-foreground",children:e}),xj=({open:e,onClose:t})=>{const{state:r,lang:n,t:i,selectMode:a}=ye(),o=Kg(),s=H.useRef(null);fo(s,!e),id(s,e),H.useEffect(()=>{if(!e)return;const p=v=>{v.key==="Escape"&&(s.current?.querySelector('[aria-haspopup="listbox"][aria-expanded="true"]')||(v.preventDefault(),t()))};return window.addEventListener("keydown",p,!0),()=>{window.removeEventListener("keydown",p,!0)}},[e,t]);const l=r.config?.modes??[],u=[{value:"light",label:i("settings.themeLight")},{value:"dark",label:i("settings.themeDark")},{value:"auto",label:i("settings.themeAuto")}],f=gj(pj()),d={search:i("shortcut.search"),newChat:i("shortcut.newChat"),sidebar:i("shortcut.sidebar"),close:i("shortcut.close")};return k.jsxs("div",{ref:s,className:he("absolute inset-0 z-40 flex items-start justify-center p-6 transition-opacity duration-150 motion-reduce:transition-none",e?"opacity-100":"pointer-events-none opacity-0"),"aria-hidden":!e,children:[k.jsx("button",{type:"button",tabIndex:-1,"aria-hidden":"true",className:"absolute inset-0 bg-scrim",onClick:t}),k.jsxs("div",{part:"settings",role:"dialog","aria-modal":"true","aria-label":i("settings"),className:he("relative flex max-h-full w-full max-w-[520px] flex-col overflow-hidden rounded-aid-field border bg-background shadow-panel transition-transform duration-200 motion-reduce:transition-none",e?"translate-y-0":"translate-y-2"),children:[k.jsxs("header",{className:"flex shrink-0 items-center justify-between pb-2.5 pl-[18px] pr-3 pt-3.5",children:[k.jsx("h2",{className:"text-lg font-semibold",children:i("settings")}),k.jsx(Be,{"data-autofocus":!0,variant:"ghost",size:"icon","aria-label":i("close"),onClick:t,children:k.jsx(Cu,{"aria-hidden":"true"})})]}),k.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-[18px] pb-[18px] pt-1",children:[k.jsx(cd,{title:i("settings.language"),children:k.jsx(w2,{label:i("settings.language"),value:n,options:Xg.map(p=>({value:p,label:mj[p],lang:p})),onChange:p=>{o.update({lang:p})}})}),k.jsx(cd,{title:i("settings.theme"),children:k.jsx(w2,{label:i("settings.theme"),value:o.scheme,options:u,onChange:p=>{o.update({scheme:p})}})}),l.length>0?k.jsx(cd,{title:i("settings.model"),hint:i("settings.modelHint"),children:k.jsx(b2,{modes:l,health:r.health,value:r.mode,onChange:a,lang:n,label:i("settings.model")})}):null,k.jsx(cd,{title:i("settings.shortcuts"),children:k.jsx("div",{className:"flex flex-col",children:vj.map(p=>k.jsxs("div",{className:"flex items-center justify-between py-1 text-xs",children:[k.jsx("span",{children:d[p]}),k.jsx("span",{className:"flex gap-[3px]",children:f[p].map(v=>k.jsx(yj,{children:v},v))})]},p))})})]})]})]})},bj={muted:"rounded-[10px] border bg-muted px-3 py-2",blocked:"rounded-[10px] border border-processing/25 bg-processing-background px-3 py-2",overloaded:"rounded-[10px] border border-warning/40 bg-warning-background px-3 py-2",hint:"px-1 pb-2 text-warn-text"},fd=({tone:e,icon:t,children:r,role:n="status",part:i,state:a})=>k.jsxs("div",{part:i,role:n,"data-tone":e,"data-state":a,className:he("mb-2 flex items-center gap-2.5 text-xs leading-snug",bj[e]),children:[k.jsx("span",{className:"flex shrink-0",children:t}),k.jsx("span",{className:"min-w-0 flex-1",children:r})]}),_2=({children:e,onDismiss:t,dismissLabel:r,part:n})=>k.jsxs("div",{part:n,role:"alert",className:"mb-2 flex items-center gap-2.5 rounded-[10px] border border-error/30 bg-error-background py-2 pl-3 pr-2 text-xs leading-snug text-[hsl(var(--foreground))]",children:[k.jsx(po,{className:"shrink-0 text-destructive","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 flex-1",children:e}),k.jsx(Be,{variant:"ghost",size:"xs",onClick:t,children:r})]}),wj=e=>new Intl.DateTimeFormat(e,{hour:"2-digit",minute:"2-digit"}),_j=()=>{const{state:e,lang:t,t:r}=ye(),{remaining:n,daily:i,blocked:a,resetAt:o,overloaded:s}=e.limit;if(s&&e.config)return k.jsx(fd,{tone:"overloaded",part:"limit-banner",state:"overloaded",icon:k.jsx(sd,{"aria-hidden":"true"}),children:r("overloaded")});if(a){const l=o?new Date(o):null,u=l&&!Number.isNaN(l.getTime())?r("limit.until",{time:wj(t).format(l)}):r("limit.exhausted");return k.jsx(fd,{tone:"blocked",part:"limit-banner",state:"blocked",icon:k.jsx(sm,{"aria-hidden":"true"}),children:u})}return n===null||i===null||n>3?null:k.jsx(fd,{tone:"muted",part:"limit-banner",state:"low",icon:k.jsx(yS,{"aria-hidden":"true"}),children:r("limit.remaining",{count:n,limit:i})})},kj=()=>{const{state:e,lang:t,t:r,dismissNotice:n}=ye(),{notice:i}=e;if(!i)return null;const a=i.kind==="error"?rm(t,i.reason):r(i.key);return k.jsx(_2,{part:"notice",onDismiss:n,dismissLabel:r("dismiss"),children:a})},Nm=({value:e,onChange:t,onSubmit:r,maxHeight:n=yB,className:i,onKeyDown:a,...o})=>{const s=H.useRef(null),l=H.useCallback(()=>{const f=s.current;f&&(f.style.height="auto",f.style.height=`${Math.min(f.scrollHeight,n)}px`,f.style.overflowY=f.scrollHeight>n?"auto":"hidden")},[n]);H.useLayoutEffect(l,[e,l]),H.useEffect(()=>{const f=s.current;if(!f||typeof ResizeObserver>"u")return;let d=f.clientWidth;const p=new ResizeObserver(()=>{f.clientWidth!==d&&(d=f.clientWidth,l())});return p.observe(f),()=>{p.disconnect()}},[l]);const u=f=>{a?.(f),!(f.defaultPrevented||!r)&&f.key==="Enter"&&!f.shiftKey&&!f.nativeEvent.isComposing&&(f.preventDefault(),r())};return k.jsx("textarea",{ref:s,rows:1,value:e,onChange:f=>{t(f.target.value)},onKeyDown:u,className:he("block w-full resize-none bg-transparent text-foreground outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-60",i),...o})},Sj=({file:e,onRemove:t})=>{const{lang:r,t:n}=ye();return k.jsxs("div",{part:"composer-file",className:"flex w-fit max-w-full items-center gap-2.5 self-start rounded-xl border bg-muted p-1.5",children:[k.jsx(Sm,{ext:km(e.name)}),k.jsxs("span",{className:"flex min-w-0 flex-col",children:[k.jsx("span",{className:"max-w-[420px] truncate text-[13px] font-medium leading-tight max-sm:max-w-[190px]",title:e.name,children:e.name}),k.jsx("span",{className:"text-2xs leading-tight text-muted-foreground",children:Cm(e.size,r)})]}),k.jsx(Be,{variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":n("removeFile"),onClick:t,children:k.jsx(Cu,{"aria-hidden":"true"})})]})},Cj=({children:e,text:t,id:r})=>k.jsxs("span",{className:"group/attach inline-flex",children:[e,k.jsx("span",{id:r,role:"tooltip",className:"pointer-events-none absolute bottom-[3.2rem] left-4 z-10 hidden w-max max-w-[calc(100%-2rem)] rounded-md bg-foreground px-2 py-1 text-2xs font-medium leading-snug text-background shadow-pop group-focus-within/attach:block group-hover/attach:block",children:t})]}),Tj=({message:e,onDismiss:t})=>{const{t:r}=ye();return e===null?null:k.jsx(_2,{part:"notice",dismissLabel:r("dismiss"),onDismiss:t,children:e})},Aj=.9,Ej=(e,t)=>e>t?"over":e===t?"limit":e>=t*Aj?"near":"hidden",k2=({count:e,max:t,id:r,part:n,className:i})=>{const{t:a}=ye(),o=Ej(e,t);return k.jsxs(k.Fragment,{children:[k.jsx("span",{id:r,part:n,className:he("shrink-0 whitespace-nowrap px-1 text-2xs tabular-nums text-muted-foreground",o==="hidden"&&"hidden",o==="limit"&&"font-semibold text-warn-text",o==="over"&&"font-semibold text-destructive",i),children:a("counter",{count:e,max:t})}),k.jsx("span",{"aria-live":"polite",className:"sr-only",children:o==="limit"?a("counterLimit"):o==="over"?a("counterOver"):""})]})},Dj=()=>{const{state:e,t}=ye(),{config:r}=e;if(!r)return null;const n=r.modes.find(a=>a.slug===e.mode),i=r.modes.length===0?t("modes.none"):n&&Lu(e.health[n.slug])==="unavailable"?t("modeUnavailable"):null;return i===null?null:k.jsx(fd,{tone:"hint",part:"composer-hint",icon:k.jsx(sd,{"aria-hidden":"true"}),children:i})},Mj=()=>ye().t("placeholder"),Lj=({placement:e="top"})=>{const{state:t,lang:r,t:n,selectMode:i}=ye(),a=t.config?.modes??[],o=a.find(s=>s.slug===t.mode);if(!o)return null;if(a.length<2){const s=Lu(t.health[o.slug]),l=bu(o.title,r)||o.slug,u=s==="unknown"?"":n(`health.${s}`),f=`${n("modeLabel")}: ${l}${u?`, ${u}`:""}`;return k.jsxs("div",{part:"mode-select",role:"group","aria-label":f,className:y2,children:[k.jsx(Mm,{name:o.icon}),k.jsx("span",{className:"min-w-0 truncate",children:l}),k.jsx(Lm,{level:s,lang:r})]})}return k.jsx(b2,{variant:"pill",placement:e,modes:a,health:t.health,value:t.mode,onChange:i,lang:r,label:n("modeLabel")})},S2="{name}",Ij=(e,t)=>{const[r="",n=""]=e.split(S2);return k.jsxs(k.Fragment,{children:[r,t,n]})},C2=H.forwardRef(({onDraftChange:e},t)=>{const{state:r,lang:n,path:i,t:a,send:o,stop:s}=ye(),l=Mj(),[u,f]=H.useState(""),d=H.useRef(null),p=H.useId(),v=H.useRef(!1),g=H.useId();H.useImperativeHandle(t,()=>({setText:ee=>{f(ee),setTimeout(()=>d.current?.querySelector("textarea")?.focus(),0)}}));const y=u.trim()!=="";H.useEffect(()=>{e?.(y)},[y,e]);const[x,b]=H.useState(null),[_,S]=H.useState(null),T=H.useRef(null),{config:E,turn:D,limit:L}=r,R=E?.modes.find(ee=>ee.slug===r.mode),O=E?.max_query_chars??Uk,M=R?Lu(r.health[R.slug])==="unavailable":!1,P=!!(E?.site.allow_files&&R?.allow_files),j=D!==null,B=D?.stopping===!0,$=!E||L.blocked||r.loadingThread!==null,K=u.trim(),Z=u.length>O,re=!$&&!j&&!M&&!!R&&K.length>0&&!Z;H.useEffect(()=>{if(j)return;const ee=d.current?.getRootNode(),ae=ee instanceof ShadowRoot||ee instanceof Document?ee.activeElement:null,ie=ae===null||ae===document.body;(v.current||ie)&&d.current?.querySelector("textarea")?.focus({preventScroll:!0}),v.current=!1},[j]);const Y=()=>{if(!re||!R)return;const ee=K,ae=x,ie=nF(i,ee,new Date);f(""),b(null),o({query:ee,mode:R.slug,...ae?{file:ae}:{},...ie?{clarification:ie}:{}}).then(_e=>{_e==="rejected"&&(f(be=>be||ee),b(be=>be??ae))})},G=ee=>{if(S(null),!(!ee||!R)){if(!zS.split(",").includes(`.${km(ee.name)}`)){S(a("fileType",{name:ee.name}));return}if(ee.size>R.max_file_mb*1024*1024){S(a("fileTooLarge",{name:ee.name,size:R.max_file_mb}));return}b(ee)}},I=E?.answer_source,z=I?.[n]??I?.ru??Object.values(I??{})[0],W=go(z?.url),F=W?k.jsxs("a",{href:W,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-primary-text hover:underline",children:[z?.name,k.jsx(um,{className:"size-3","aria-hidden":"true"})]}):z?.name;return k.jsxs("div",{part:"composer",className:"flex w-full shrink-0 flex-col",children:[k.jsx(Dj,{}),k.jsx(Tj,{message:_,onDismiss:()=>{S(null)}}),k.jsxs("div",{ref:d,className:he("relative flex flex-col gap-2.5 rounded-aid-field border border-input bg-background py-3 pl-4 pr-2.5 shadow-sm transition-colors motion-reduce:transition-none","focus-within:border-primary focus-within:ring-[3px] focus-within:ring-secondary",Z&&"border-destructive focus-within:border-destructive",$&&"bg-muted"),children:[x?k.jsx(Sj,{file:x,onRemove:()=>{b(null)}}):null,k.jsx(Nm,{part:"input","data-autofocus":!0,value:u,onChange:f,onSubmit:Y,disabled:$,placeholder:l,"aria-label":a("inputLabel"),"aria-invalid":Z||void 0,"aria-describedby":p,className:"block min-h-6 w-full pr-1.5 text-lg leading-6 disabled:text-muted-foreground disabled:opacity-100"}),k.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[k.jsx(Lj,{placement:"top"}),P?k.jsxs(k.Fragment,{children:[k.jsx(Cj,{id:g,text:x?a("attachOne"):a("attachHint",{size:R?.max_file_mb??0}),children:k.jsx(Be,{part:"attach",variant:"ghost",size:"icon",className:"size-8 rounded-full text-muted-foreground","aria-label":a(x?"attachOne":"attach"),"aria-describedby":g,disabled:$||j||x!==null,onClick:()=>T.current?.click(),children:k.jsx(MF,{"aria-hidden":"true"})})}),k.jsx("input",{ref:T,type:"file",hidden:!0,accept:zS,onChange:ee=>{G(ee.target.files?.[0]),ee.target.value=""}})]}):null,k.jsx("span",{className:"flex-1"}),k.jsx(k2,{id:p,part:"counter",count:u.length,max:O}),j?k.jsx(Be,{part:"stop",size:"icon",className:"size-9 rounded-full aria-disabled:pointer-events-none aria-disabled:opacity-50","aria-label":a(B?"agent.stopping":"stop"),title:a(B?"agent.stopping":"stop"),"aria-disabled":B||void 0,onFocus:()=>{v.current=!0},onBlur:ee=>{ee.relatedTarget&&(v.current=!1)},onClick:()=>{B||s()},children:k.jsx(AS,{className:"size-3.5 fill-current","aria-hidden":"true"})}):k.jsx(Be,{part:"send",size:"icon",className:"size-9 rounded-full","aria-label":a("send"),title:a("send"),disabled:!re,onClick:Y,children:k.jsx(pS,{"aria-hidden":"true"})})]})]}),k.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-x-3.5 gap-y-1 pt-2 text-center text-2xs leading-snug text-muted-foreground",children:[k.jsx("p",{part:"disclaimer",className:"text-2xs",children:a("disclaimer")}),z?.name?k.jsx("p",{part:"source",className:"text-2xs",children:Ij(a("source",{name:S2}),F)}):null]})]})});C2.displayName="Composer";const Pj=({composerRef:e,onDraftChange:t})=>{const{state:r}=ye();return k.jsxs("div",{className:"mx-auto w-full max-w-[844px] shrink-0 px-3 pb-2.5",children:[k.jsx(_j,{}),k.jsx(kj,{}),r.config&&!r.configError?k.jsx(C2,{ref:e,onDraftChange:t}):null]})},T2={receipt:IF,landmark:SF,map:CF,"trending-up":FF,scale:PF,users:BF,"file-chart":bF,"alert-triangle":sd},Nj=({name:e})=>{const t=(Object.hasOwn(T2,e)?T2[e]:void 0)??cm;return k.jsx(t,{className:"size-4 shrink-0 text-primary","aria-hidden":"true"})},Rj=4,Oj=6,zj=10,A2=(e,t)=>e?.[t]??e?.ru??Object.values(e??{})[0],Rm=({children:e,id:t})=>k.jsx("h2",{id:t,className:"m-0 px-0.5 text-2xs font-semibold text-muted-foreground",children:e}),Om=({example:e,onPick:t,sub:r})=>k.jsx("li",{className:"min-w-0",children:k.jsxs("button",{part:"example",type:"button",title:e.title,onClick:()=>{t(e.prompt)},className:he("flex w-full items-center gap-2.5 rounded-lg border bg-background px-3 py-2 text-left leading-snug text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",r?"min-h-9 border-dashed text-[13px]":"min-h-10 text-sm"),children:[k.jsx("span",{className:"min-w-0 flex-1",children:e.prompt}),k.jsx(vF,{className:"text-muted-foreground","aria-hidden":"true"})]})}),zm=e=>`${e.title}-${e.prompt}`,Fj=({onPick:e})=>{const{state:t,lang:r,t:n}=ye(),i=H.useId(),[a,o]=H.useState(null),s=A2(t.config?.prompt_examples,r)??[],l=(A2(t.config?.prompt_categories,r)??[]).filter(d=>s.some(p=>p.category===d.key));if(s.length===0)return null;if(l.length===0)return k.jsxs("section",{className:"flex flex-col gap-1.5",children:[k.jsx(Rm,{children:n("examples")}),k.jsx("ul",{"aria-label":n("examples"),className:"m-0 flex w-full list-none flex-col gap-1.5 p-0",children:s.slice(0,Rj).map(d=>k.jsx(Om,{example:d,onPick:e,sub:!1},zm(d)))})]});const u=l.find(d=>d.key===a),f=u?s.filter(d=>d.category===u.key).slice(0,zj):[];return k.jsxs("div",{className:"flex flex-col gap-5",children:[k.jsxs("section",{className:"flex flex-col gap-1.5",children:[k.jsx(Rm,{id:i,children:n("examples.whatCanDo")}),k.jsx("div",{role:"group","aria-labelledby":i,className:"flex flex-col gap-1.5",children:l.map(d=>{const p=d.key===u?.key,v=p?Bs:od;return k.jsxs(H.Fragment,{children:[k.jsxs("button",{part:"category",type:"button","aria-expanded":p,onClick:()=>{o(p?null:d.key)},className:he("flex min-h-11 w-full items-center gap-2.5 rounded-lg border bg-background px-2.5 py-1.5 text-left text-sm font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",p&&"border-primary"),children:[k.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-lg bg-secondary",children:k.jsx(Nj,{name:d.icon})}),k.jsx("span",{className:"min-w-0 flex-1 truncate",children:d.title}),k.jsx(v,{className:"text-muted-foreground","aria-hidden":"true"})]}),p&&f.length>0?k.jsx("ul",{"aria-label":d.title,className:"m-0 flex w-full list-none flex-col gap-1.5 pb-1.5 pl-[18px] pt-0.5",children:f.map(g=>k.jsx(Om,{example:g,onPick:e,sub:!0},zm(g)))}):null]},d.key)})})]}),u?null:k.jsxs("section",{className:"flex flex-col gap-1.5",children:[k.jsx(Rm,{children:n("examples")}),k.jsx("ul",{"aria-label":n("examples"),className:"m-0 flex w-full list-none flex-col gap-1.5 p-0",children:s.slice(0,Oj).map(d=>k.jsx(Om,{example:d,onPick:e,sub:!1},zm(d)))})]})]})},Bj=({listening:e,wide:t,onPick:r})=>{const{state:n,lang:i,t:a}=ye(),o=bu(n.config?.site.welcome,i),s=o?o.split(`
|
|
18
|
+
`).filter(l=>l.trim()!==""):[];return k.jsxs("div",{part:"empty",className:he("mx-auto flex w-full max-w-[640px] flex-col gap-5 px-4 pb-3",t?"pt-14":"pt-7"),children:[k.jsxs("div",{className:"flex flex-col items-center gap-2.5 text-center",children:[k.jsx("div",{part:"avatar",children:k.jsx(rd,{size:56,mood:e?"listen":"calm"})}),s.length>0?k.jsx("div",{part:"welcome",className:"flex max-w-[340px] flex-col gap-1 text-[15px] leading-normal",children:s.map((l,u)=>k.jsx("p",{className:he(u===0&&"text-xl font-semibold"),children:l},`${u}-${l}`))}):k.jsx("h2",{className:"m-0 text-2xl font-semibold tracking-tight",children:a("greeting")})]}),k.jsx(Fj,{onPick:r})]})},E2=()=>{const{t:e}=ye();return t=>{const r=`steps.${t.node}`;return e(bz(r)?r:"steps.unknown")}},D2=({step:e,position:t})=>{const{t:r}=ye(),n=E2();return k.jsxs(k.Fragment,{children:[n(e),t!=null&&e.total!=null?k.jsxs("span",{className:"text-muted-foreground/70",children:[" · ",r("steps.counter",{done:t,total:e.total})]}):null,e.attempt>1?k.jsxs("span",{className:"text-muted-foreground/70",children:[" · ",r("agent.attempt",{count:e.attempt})]}):null]})},M2=()=>k.jsx(vo,{className:"size-3 shrink-0 animate-spin text-primary motion-reduce:animate-none","aria-hidden":"true","data-testid":"step-spinner"}),jj=({steps:e,status:t,stopping:r})=>{const{t:n}=ye(),i=e.find(a=>a.status==="running");return t==="streaming"?k.jsxs(k.Fragment,{children:[k.jsx(M2,{}),k.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:r?n("agent.stopping"):i?k.jsx(D2,{step:i,position:e.indexOf(i)+1}):n("agent.thinking")})]}):t==="stopped"?k.jsxs(k.Fragment,{children:[k.jsx(AS,{className:"size-3.5 shrink-0","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:n("agent.stopped")})]}):t==="error"?k.jsxs(k.Fragment,{children:[k.jsx(gS,{className:"size-3.5 shrink-0 text-destructive","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:n("agent.interrupted")})]}):k.jsxs(k.Fragment,{children:[k.jsx(da,{className:"size-3.5 shrink-0 text-mode-idle","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:n("agent.done")})]})},Hj=({steps:e,status:t,stopping:r})=>{const{t:n}=ye(),i=E2();if(t==="streaming"){if(r)return n("agent.stopping");const a=e.find(o=>o.status==="running");return a?i(a):n("agent.thinking")}return n(t==="stopped"?"agent.stopped":t==="error"?"agent.interrupted":"agent.done")},L2="inline-flex min-h-[30px] max-w-full items-center gap-2 self-start rounded-full border bg-background py-1 pl-2 pr-2.5 text-left text-[13px] text-muted-foreground",Vj=H.memo(function(t){const{t:r}=ye(),[n,i]=H.useState(!1),{steps:a,status:o}=t,s=o==="streaming",l=Hj(t),u=k.jsx(k.Fragment,{children:k.jsx(jj,{...t})});return k.jsxs("div",{part:"steps",className:"flex flex-col gap-2 text-[13px] text-muted-foreground",children:[a.length>0?k.jsxs("button",{type:"button","aria-expanded":n,"aria-label":`${r(n?"agent.hideSteps":"agent.showSteps")}: ${l}`,onClick:()=>{i(!n)},className:he(L2,"hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",s&&"border-primary-35"),children:[u,n?k.jsx(Bs,{className:"size-3.5 shrink-0 rotate-180","aria-hidden":"true"}):k.jsx(Bs,{className:"size-3.5 shrink-0","aria-hidden":"true"})]}):k.jsx("div",{className:he(L2,s&&"border-primary-35"),role:"status",children:u}),n&&a.length>0?k.jsx("ol",{"aria-label":r("agent.steps"),className:"m-0 flex list-none flex-col self-stretch rounded-xl border bg-background px-3.5 py-1.5",children:a.map((f,d)=>{const p=f.status==="running",v=p&&!s;return k.jsxs("li",{className:"flex min-h-[34px] items-center gap-2.5 border-b border-dashed last:border-b-0",children:[k.jsx("span",{className:"flex w-[18px] shrink-0 justify-center",children:p&&s?k.jsx(M2,{}):v?k.jsx(gS,{className:"size-3.5","aria-hidden":"true"}):k.jsx(da,{className:"size-3.5 text-mode-idle","aria-hidden":"true"})}),k.jsx("span",{className:he("min-w-0 flex-1 truncate",v?"text-muted-foreground":"text-foreground"),children:k.jsx(D2,{step:f})}),v?k.jsx("span",{className:"shrink-0 whitespace-nowrap",children:r("agent.unfinished")}):null]},f.id??`${f.node}-${d}`)})}):null]})}),Uj=(e,t)=>{const r=(e.split(/[?#]/)[0]??"").split("/").filter(Boolean).pop();if(!r||/^[0-9a-f-]{36}$/i.test(r))return t;try{return decodeURIComponent(r)}catch{return r}},$j=e=>{try{return new URL(e,window.location.href).host}catch{return null}},I2=({url:e,name:t,className:r,children:n})=>{const{api:i}=ye(),[a,o]=H.useState(!1);if(!(xu(e,i.apiUrl)!==null)){const l=go(e);return l?k.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:r,children:n}):k.jsx("span",{className:r,children:n})}return k.jsx("button",{type:"button",part:"attachment",className:he(r,a&&"opacity-70"),disabled:a,onClick:()=>{o(!0),i.attachment(e).then(l=>{_B(l,t)}).catch(()=>{}).finally(()=>{o(!1)})},children:n})},P2=({attachment:e})=>{const{api:t,lang:r,t:n}=ye(),i=FS(e.name||Uj(e.url,"file")),a=e.url&&xu(e.url,t.apiUrl)===null?$j(e.url):null,o="inline-flex max-w-full items-center gap-2.5 rounded-xl border bg-muted p-1.5 text-left text-foreground",s=k.jsxs(k.Fragment,{children:[k.jsx(Sm,{ext:km(i)}),k.jsxs("span",{className:"flex min-w-0 flex-col",children:[k.jsx("span",{className:"truncate text-[13px] font-medium leading-tight",children:i}),k.jsxs("span",{className:"flex items-center gap-1.5 text-2xs leading-tight text-muted-foreground",children:[a??(e.size?Cm(e.size,r):null),e.url?null:k.jsxs(k.Fragment,{children:[e.size?k.jsx("span",{"aria-hidden":"true",children:"·"}):null,k.jsx("span",{children:n("attachment.sending")}),k.jsx(vo,{className:"size-3 animate-spin motion-reduce:animate-none","aria-hidden":"true"})]})]})]}),e.url&&a?k.jsx(um,{className:"mr-1 size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}):e.url?k.jsx(mS,{className:"mr-1 size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}):null]});return e.url?k.jsxs(I2,{url:e.url,name:i,className:he(o,"transition-colors hover:bg-accent"),children:[a?null:k.jsxs("span",{className:"sr-only",children:[n("download"),": "]}),s]}):k.jsx("span",{className:o,children:s})},Gj=({url:e,alt:t})=>{const{api:r}=ye(),[n,i]=H.useState(null),[a,o]=H.useState(!1);return H.useEffect(()=>{let s=null,l=!1;return r.attachment(e).then(u=>{l?URL.revokeObjectURL(u):(s=u,i(u))},()=>{l||o(!0)}),()=>{l=!0,s&&URL.revokeObjectURL(s)}},[r,e]),a?k.jsx("span",{className:"text-muted-foreground",children:t||e}):n?k.jsx("img",{src:n,alt:t,className:"max-w-full rounded-lg"}):k.jsx(vo,{className:"size-4 animate-spin text-muted-foreground","aria-label":t})},Wj=8,Fm=({children:e})=>k.jsx("div",{className:"text-2xs text-muted-foreground",children:e}),Yj=({block:e,onAsk:t})=>{const{lang:r,t:n}=ye(),i=Array.isArray(e.sections)?e.sections:[],o=(Array.isArray(e.indicators)?e.indicators:[]).slice(0,Wj),s=Math.max(0,e.total-o.length),l=Array.isArray(e.examples)?e.examples.filter(u=>typeof u=="string"&&u):[];return k.jsxs("section",{part:"catalog",className:"flex min-w-0 flex-col rounded-xl border bg-card",children:[e.topic?k.jsxs("h3",{className:"m-0 flex items-center gap-2 border-b px-3.5 py-2.5 text-sm font-semibold",children:[k.jsx(ad,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),n("blocks.catalogTitle",{topic:e.topic})]}):null,k.jsxs("div",{className:"flex flex-col gap-2.5 px-3.5 py-3",children:[i.length>0?k.jsxs("div",{children:[k.jsx(Fm,{children:n("blocks.catalogSections")}),k.jsx("ul",{className:"m-0 list-none p-0",children:i.map(u=>k.jsxs("li",{className:"flex items-center gap-2 border-b py-[7px] text-[13px] last:border-b-0",children:[k.jsx(od,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 flex-1 leading-snug",children:u.path.join(" › ")}),k.jsx("span",{className:"whitespace-nowrap tabular-nums text-muted-foreground",children:Hn(u.count,r)})]},u.id))})]}):null,o.length>0?k.jsxs("div",{children:[k.jsx(Fm,{children:n("blocks.catalogIndicators")}),k.jsx("ul",{className:"m-0 list-none p-0",children:o.map(u=>k.jsxs("li",{className:"flex flex-col border-b py-1.5 last:border-b-0",children:[k.jsx("span",{className:"text-[13px] font-medium leading-snug",children:u.name}),u.unit||u.years?k.jsx("span",{className:"text-2xs text-muted-foreground",children:[am(u.unit),am(u.years)].filter(Boolean).join(" · ")}):null]},u.entity_id))}),s>0?k.jsx("p",{className:"m-0 pt-1 text-[13px] text-muted-foreground",children:n("blocks.catalogMore",{count:Hn(s,r)})}):null]}):null,l.length>0?k.jsxs("div",{className:"flex flex-col gap-1.5",children:[k.jsx(Fm,{children:n("blocks.catalogExamples")}),l.map(u=>k.jsxs("button",{type:"button",className:"flex w-full items-center gap-2.5 rounded-[10px] border bg-background px-2.5 py-2 text-left text-[13px] leading-snug transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",onClick:()=>{t(u)},children:[k.jsx(TF,{className:"shrink-0 text-primary","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 flex-1",children:u})]},u)),k.jsx("div",{className:"text-2xs text-muted-foreground",children:n("blocks.catalogSendHint")})]}):null]})]})},dd=({rootRef:e,question:t,tone:r,children:n})=>{const{t:i}=ye();return k.jsxs("section",{part:"clarification",ref:e,role:"group","aria-label":i("blocks.clarification"),"data-state":r,className:he("overflow-hidden rounded-[14px] border",r==="open"&&"border-primary-30 bg-card",r==="done"&&"bg-card",r==="expired"&&"bg-muted"),children:[k.jsx("div",{className:"flex items-center gap-2 px-3.5 pb-1 pt-3",children:k.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground",children:[k.jsx(wS,{className:"size-3","aria-hidden":"true"}),i("blocks.clarification")]})}),k.jsx("p",{className:"m-0 px-3.5 pb-2.5 text-[15px] font-medium leading-snug",children:t}),n]})},N2=({children:e})=>k.jsx("kbd",{className:"inline-flex h-4 min-w-4 items-center justify-center rounded border border-current/40 px-1 font-sans text-2xs leading-none opacity-80",children:e}),Bm=({children:e})=>k.jsx("div",{className:"flex items-center gap-2 border-t px-3.5 py-2.5 text-[13px] text-muted-foreground",children:e}),Xj=2**31-1,qj=(e,t)=>{const[r,n]=H.useState(()=>new Date);return H.useEffect(()=>{if(!t)return;const i=Date.parse(e)-Date.now();if(!(i>0))return;const a=window.setTimeout(()=>{n(new Date)},Math.min(i+50,Xj));return()=>{window.clearTimeout(a)}},[e,t]),r},Kj=({block:e,isLastInBranch:t,question:r,reply:n,disabled:i,onAsk:a})=>{const{t:o}=ye(),s=H.useRef(null),l=qj(e.expires_at,t),u=Ek(e,{isLastInBranch:t,now:l}),[f,d]=H.useState(""),p=H.useRef(!1),[v,g]=H.useState(!1),y=e.options,x=i||v,b=(B,$=B.label)=>{if(p.current||i)return;p.current=!0,g(!0);const K=a($,{clarification_id:e.id,slot:e.slot,value:B.value,free_text:null});Promise.resolve(K).then(Z=>{Z===!1&&(p.current=!1,g(!1))})},_=H.useRef(b);H.useEffect(()=>{_.current=b});const S=e.type==="plan_confirm",T=y.find(B=>B.value===e.default)??y[0],E=y.find(B=>B!==T),D=S?[...T?[{option:T,text:o("blocks.continue")}]:[],...E?[{option:E,text:o("blocks.cancelPlan")}]:[]]:y.slice(0,Jz).map(B=>({option:B,text:B.label})),L=H.useRef(D);H.useEffect(()=>{L.current=D});const R=u==="open"&&!x,O=D.length;H.useEffect(()=>{if(!R||O===0)return;const B=s.current?.getRootNode();if(!B)return;const $=K=>{const Z=K;if(Z.defaultPrevented||Z.ctrlKey||Z.metaKey||Z.altKey||Z.repeat||iF(Z.composedPath()[0]))return;const re=Number(Z.key),Y=Number.isInteger(re)&&re>=1?L.current[re-1]:void 0;Y&&(Z.preventDefault(),_.current(Y.option,Y.text))};return B.addEventListener("keydown",$),()=>{B.removeEventListener("keydown",$)}},[R,O]);const M=u==="answered"&&r!==""&&n===r;if(u==="answered"&&!M)return k.jsx(dd,{rootRef:s,question:e.question,tone:"done",children:n?k.jsxs(Bm,{children:[k.jsx(da,{className:"shrink-0","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 flex-1",children:o("blocks.chosen",{label:n})})]}):null});if(u==="expired"||M)return k.jsx(dd,{rootRef:s,question:e.question,tone:"expired",children:k.jsxs(Bm,{children:[k.jsx(sm,{className:"shrink-0","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 flex-1",children:o("blocks.expired")}),r&&!M?k.jsxs(Be,{variant:"input",size:"sm",className:"gap-1.5",disabled:i,onClick:()=>{a(r)},children:[k.jsx(TS,{"aria-hidden":"true"}),o("blocks.askAgain")]}):null]})});if(S){const[B,$]=D;return k.jsx(dd,{rootRef:s,question:e.question,tone:"open",children:k.jsxs("div",{className:"flex flex-wrap gap-2 px-2.5 pb-2.5",children:[B?k.jsxs(Be,{size:"sm",disabled:x,onClick:()=>{b(B.option,B.text)},children:[k.jsx(N2,{children:"1"}),B.text]}):null,$?k.jsxs(Be,{variant:"input",size:"sm",disabled:x,onClick:()=>{b($.option,$.text)},children:[k.jsx(N2,{children:"2"}),$.text]}):null]})})}const P=y.length>=Qz,j=P?a4(y,f):y;return k.jsxs(dd,{rootRef:s,question:e.question,tone:"open",children:[k.jsxs("div",{className:"flex flex-col gap-1.5 px-2.5 pb-2.5",children:[P?k.jsxs("label",{className:"flex h-8 items-center gap-2 rounded-md border border-input bg-background px-2.5 text-sm focus-within:border-primary focus-within:ring-[3px] focus-within:ring-secondary",children:[k.jsx(Su,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),k.jsx("input",{type:"search",value:f,placeholder:o("blocks.findOption"),"aria-label":o("blocks.findOption"),className:"min-w-0 flex-1 bg-transparent outline-none placeholder:text-muted-foreground",onChange:B=>{d(B.target.value)}})]}):null,j.length>0?k.jsx("ul",{"aria-label":o("blocks.options"),className:"m-0 flex list-none flex-col gap-1.5 p-0",children:j.map(B=>{const $=y.indexOf(B)+1;return k.jsx("li",{children:k.jsxs("button",{type:"button",disabled:x,className:he("flex w-full items-start gap-3 rounded-[10px] border bg-background px-3 py-[9px] text-left transition-colors motion-reduce:transition-none","hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:bg-muted disabled:text-disabled-foreground"),onClick:()=>{b(B)},children:[k.jsx("span",{className:"mt-px flex h-[22px] min-w-[22px] shrink-0 items-center justify-center rounded-md border text-2xs font-semibold tabular-nums text-muted-foreground",children:$}),k.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[k.jsxs("span",{className:"text-sm font-medium leading-snug",children:[B.label,B.value===e.default?k.jsx("span",{className:"ml-1.5 whitespace-nowrap rounded-full bg-muted px-1.5 py-px text-2xs font-normal text-muted-foreground",children:o("blocks.default")}):null]}),B.hint?k.jsx("span",{className:"text-[13px] leading-snug text-muted-foreground",children:B.hint}):null]})]})},B.value)})}):k.jsx("p",{className:"px-1 py-2 text-sm text-muted-foreground",children:o("searchEmpty")})]}),e.allow_free_text?k.jsxs(Bm,{children:[k.jsx(wS,{className:"shrink-0","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 flex-1",children:o("blocks.freeTextHint")})]}):null]})},Zj=10,Qj=({section:e})=>{const{t}=ye(),r=e.latest_period,n=e.shape==="trend",i=n?[]:Du(e,{period:r,mode:"value",base:"median"}),a=i.slice(0,Zj);return k.jsxs("div",{part:"dashboard-preview",className:"flex min-w-0 flex-col gap-3 rounded-xl bg-[hsl(var(--chart-card))] px-4 py-3.5",children:[k.jsxs("div",{className:"min-w-0",children:[k.jsx("p",{className:"text-sm font-semibold leading-snug",children:e.title}),n?null:k.jsxs("p",{className:"text-2xs text-muted-foreground",children:[r,", ",e.unit.label]})]}),k.jsx(n2,{compact:!0,section:e,period:r,label:t("chart.label",{title:e.title,period:r}),rows:a,national:r2(e,r,a.map(o=>o.value))}),i.length>a.length?k.jsx("p",{className:"text-2xs text-muted-foreground",children:t("chart.top",{n:a.length,total:i.length})}):null]})},hd=e=>e.type==="number"||e.type==="integer",Jj=(e,t,r)=>hd(e)?Hn(aF(t),r,e.type==="integer"?0:void 0):am(t)||"—",e6={asc:pS,desc:hS},t6=({block:e})=>{const{lang:t,t:r}=ye(),[n,i]=H.useState(),[a,o]=H.useState("asc"),[s,l]=H.useState(1),[u,f]=H.useState(""),d=Array.isArray(e.columns)?e.columns:[],p=r4({...e,columns:d,data:Array.isArray(e.data)?e.data:[]},{...n?{sortKey:n,dir:a}:{},page:s,query:u}),v=d.some(y=>y.type==="string"),g=y=>{y===n?o(x=>x==="asc"?"desc":"asc"):(i(y),o("asc")),l(1)};return k.jsxs("div",{part:"data-table",className:"flex min-w-0 flex-col gap-2",children:[v?k.jsxs("label",{className:"flex h-8 items-center gap-2 rounded-md border border-input bg-background px-2.5 text-sm focus-within:border-primary focus-within:ring-[3px] focus-within:ring-secondary",children:[k.jsx(Su,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),k.jsx("input",{type:"search",value:u,placeholder:r("blocks.tableSearch"),"aria-label":r("blocks.tableSearch"),className:"min-w-0 flex-1 bg-transparent outline-none placeholder:text-muted-foreground",onChange:y=>{f(y.target.value),l(1)}})]}):null,k.jsxs("div",{className:"max-w-full overflow-x-auto overscroll-x-contain rounded-[10px] border bg-background",children:[k.jsxs("table",{className:"w-full border-collapse text-[13.5px]","aria-label":r("blocks.table"),children:[k.jsx("thead",{children:k.jsx("tr",{className:"border-b bg-muted",children:d.map(y=>{const x=y.key===n,b=x?e6[a]:gF;return k.jsx("th",{scope:"col","aria-sort":x?a==="asc"?"ascending":"descending":"none",className:he("p-0 font-semibold",hd(y)?"text-right":"text-left"),children:k.jsxs("button",{type:"button",className:he("inline-flex w-full items-center gap-1 whitespace-nowrap px-3 py-[7px] text-[13.5px] font-semibold text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",hd(y)&&"flex-row-reverse"),onClick:()=>{g(y.key)},children:[k.jsx("span",{children:y.title}),y.unit?k.jsxs("span",{className:"font-normal",children:[", ",y.unit]}):null,k.jsx(b,{className:he("shrink-0 text-muted-foreground",!x&&"opacity-50"),"aria-hidden":"true"})]})},y.key)})})}),k.jsx("tbody",{children:p.rows.map((y,x)=>k.jsx("tr",{className:"border-b last:border-b-0",children:d.map(b=>k.jsx("td",{className:he("px-3 py-[7px] align-top",hd(b)?"whitespace-nowrap text-right tabular-nums":"min-w-32"),children:Jj(b,y[b.key],t)},b.key))},p.from+x))})]}),p.total===0?k.jsx("p",{className:"px-3 py-3 text-center text-sm text-muted-foreground",children:r(u?"searchEmpty":"blocks.tableEmpty")}):null]}),p.pages>1?k.jsxs("div",{className:"flex items-center justify-end gap-1 text-2xs tabular-nums text-muted-foreground",children:[k.jsx(Be,{variant:"ghost",size:"icon",className:"size-7",disabled:p.page<=1,"aria-label":r("blocks.prevPage"),onClick:()=>{l(p.page-1)},children:k.jsx(vS,{"aria-hidden":"true"})}),k.jsx("span",{"aria-live":"polite",children:r("blocks.page",{a:p.page,b:p.pages})}),k.jsx(Be,{variant:"ghost",size:"icon",className:"size-7",disabled:p.page>=p.pages,"aria-label":r("blocks.nextPage"),onClick:()=>{l(p.page+1)},children:k.jsx(od,{"aria-hidden":"true"})})]}):null,e.truncated?k.jsx("p",{className:"text-2xs text-muted-foreground",children:r("blocks.truncated",{n:Array.isArray(e.data)?e.data.length:0})}):null]})},jm="inline-flex min-h-[30px] max-w-full items-center gap-1.5 rounded-lg bg-muted px-2.5 py-1 text-[13px]",r6=["sex","age","urban_rural","activity","item"],n6=e=>r6.includes(e),Hm=({label:e,children:t,title:r})=>k.jsxs(k.Fragment,{children:[k.jsx("span",{className:"shrink-0 whitespace-nowrap text-muted-foreground",children:e}),k.jsx("span",{className:"min-w-0 truncate font-medium",title:r,children:t})]}),Vm=({label:e,children:t,className:r})=>k.jsx("li",{className:he(jm,r),title:e,children:k.jsx(Hm,{label:e,children:t})}),i6=({block:e,question:t,onAsk:r})=>{const{t:n}=ye(),[i,a]=H.useState(!1),o=H.useId(),s=e.indicators.map(d=>d.name).join(", "),l=e.territories.map(d=>d.name).join(", "),u=e.breakdown&&n6(e.breakdown)?n(`blocks.breakdown.${e.breakdown}`):"",f=e.alternatives.length>0&&t!=="";return k.jsxs("div",{part:"plan",role:"group","aria-label":n("blocks.passport"),className:"flex flex-col gap-1.5",children:[k.jsx("div",{className:"text-2xs text-muted-foreground",children:n("blocks.passport")}),k.jsxs("ul",{"aria-label":n("blocks.passport"),className:"m-0 flex list-none flex-wrap items-center gap-1.5 p-0",children:[s?f?k.jsxs("li",{className:"relative max-w-full",children:[k.jsxs("button",{type:"button",className:he(jm,"border border-border bg-background transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",i&&"border-primary ring-[3px] ring-secondary"),title:s,"aria-haspopup":"menu","aria-expanded":i,"aria-controls":o,onClick:()=>{a(d=>!d)},children:[k.jsx(Hm,{label:n("blocks.indicator"),children:s}),k.jsx(Bs,{className:he("shrink-0 text-muted-foreground transition-transform motion-reduce:transition-none",i&&"rotate-180"),"aria-hidden":"true"})]}),i?k.jsxs("div",{id:o,role:"menu","aria-label":n("blocks.alternatives"),className:"absolute left-0 top-full z-20 mt-1 flex min-w-[220px] max-w-[min(360px,80vw)] flex-col rounded-md border bg-background p-1 shadow-pop",children:[k.jsx("div",{className:"px-2.5 pb-1 pt-1.5 text-2xs text-muted-foreground",children:n("blocks.alternatives")}),e.alternatives.map(d=>k.jsx("button",{type:"button",role:"menuitem",className:"flex min-h-9 w-full items-center rounded-md px-2.5 py-1.5 text-left text-sm transition-colors hover:bg-accent focus-visible:bg-accent focus-visible:outline-none motion-reduce:transition-none",onClick:()=>{a(!1),r(`${t} — ${d.name}`)},children:d.name},d.id))]}):null]}):k.jsx(Vm,{label:n("blocks.indicator"),children:s}):null,l?k.jsx(Vm,{label:n("blocks.territory"),children:l}):null,e.period.label?k.jsxs("li",{className:he(jm,e.period.substituted&&"border border-warning/40"),title:e.period.reason??n("blocks.period"),children:[k.jsx(Hm,{label:n("blocks.period"),children:e.period.label}),e.period.substituted?k.jsxs(k.Fragment,{children:[k.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"·"}),k.jsx("span",{className:"text-warn-text",children:n("blocks.substituted")})]}):null]}):null,u?k.jsx(Vm,{label:n("blocks.breakdown"),children:u}):null]})]})},R2="gap-1.5 text-[13px]",O2="gap-1.5 text-[13px] text-muted-foreground hover:text-foreground",a6=({text:e})=>{const{t}=ye(),[r,n]=H.useState(!1),i=H.useRef(void 0);return H.useEffect(()=>()=>{window.clearTimeout(i.current)},[]),k.jsxs(Be,{part:"copy",variant:"ghost",size:"sm",className:O2,onClick:()=>{gm(e).then(a=>{a&&(n(!0),window.clearTimeout(i.current),i.current=window.setTimeout(()=>{n(!1)},2e3))})},children:[r?k.jsx(da,{"aria-hidden":"true"}):k.jsx(lm,{"aria-hidden":"true"}),t(r?"copied":"copy")]})},o6=({message:e,isLastInBranch:t,onAsk:r,children:n,dashboardOpen:i=!1,onToggleDashboard:a})=>{const{path:o,t:s}=ye(),[l,u]=H.useState(!1),{blocks:f}=e,d=Oi(f,"plan"),p=Oi(f,"table"),v=Oi(f,"catalog"),g=Oi(f,"clarification"),{question:y,reply:x}=tF(o,e.id),b=e.status==="streaming",_=d?.methodology?go(d.methodology.url):null,S=f.length>0&&!b?i4(e):"",T=!b&&e.status!=="error"&&Kf(e.id),E=Oi(f,"dashboard"),D=E?.sections[0],L=T&&E!==void 0,R=L?a:void 0,O=uS(f),M=b?[]:eF(f);return k.jsxs(k.Fragment,{children:[d?k.jsx(i6,{block:d,question:y,onAsk:r}):null,n,v?k.jsx(Yj,{block:v,onAsk:r}):null,g?k.jsx(Kj,{block:g,isLastInBranch:t,question:y,reply:x,disabled:b,onAsk:r}):null,D?k.jsx(Qj,{section:D}):null,p&&l?k.jsx(t6,{block:p}):null,M.length>0?k.jsx(c2,{files:M}):null,T?k.jsx(f2,{messageId:e.id,block:O}):null,f.length>0&&!b?k.jsxs("div",{part:"answer-actions",role:"group",className:"flex flex-wrap items-center gap-1.5",children:[p?k.jsxs(Be,{part:"data-toggle",variant:"input",size:"sm",className:R2,"aria-expanded":l,onClick:()=>{u(P=>!P)},children:[k.jsx(OF,{"aria-hidden":"true"}),s(l?"blocks.hideData":"blocks.data")]}):null,R?k.jsxs(Be,{part:"dashboard-toggle","data-message-id":e.id,variant:"input",size:"sm",className:he(R2,i&&"border-primary bg-secondary text-secondary-foreground"),"aria-expanded":i,onClick:()=>{R(e.id)},children:[k.jsx(yF,{"aria-hidden":"true"}),s(i?"blocks.hideDashboard":"blocks.dashboard")]}):null,L?k.jsx(a2,{messageId:e.id,block:O}):null,d?.methodology&&_?k.jsx(Be,{part:"methodology",variant:"ghost",size:"sm",className:O2,asChild:!0,children:k.jsxs("a",{href:_,target:"_blank",rel:"noopener noreferrer",title:d.methodology.title,children:[k.jsx(ad,{"aria-hidden":"true"}),s("blocks.methodology")]})}):null,S?k.jsx(a6,{text:S}):null]}):null]})},s6=5e4,z2=2e5,l6=H.lazy(()=>Promise.resolve().then(()=>kae).then(e=>({default:e.MarkdownImpl}))),u6=H.memo(function({children:t,streaming:r=!1,className:n}){const i=k.jsx("span",{className:"whitespace-pre-wrap",children:t.length>z2?`${t.slice(0,z2)}…`:t});return k.jsxs("div",{part:"markdown",className:he("min-w-0 break-words text-[15px] leading-[1.65] text-foreground",n),children:[t.length>s6?i:k.jsx(Zg,{fallback:i,children:k.jsx(H.Suspense,{fallback:i,children:k.jsx(l6,{children:t})})}),r?k.jsx("span",{"aria-hidden":"true",className:"ml-0.5 inline-block h-[17px] w-[7px] translate-y-[3px] rounded-sm bg-primary animate-pulse motion-reduce:animate-none"}):null]})}),Iu="size-7 shrink-0 text-muted-foreground hover:text-foreground",F2=({messageId:e,disabled:t})=>{const{index:r,switchBranch:n,t:i}=ye(),{list:a,position:o}=U4(r,e);if(a.length<2||o<0)return null;const s=a[o-1],l=a[o+1];return k.jsxs("div",{part:"branch",className:"flex items-center text-[13px] tabular-nums text-muted-foreground",role:"group","aria-label":i("branch.label"),children:[k.jsx(Be,{variant:"ghost",size:"icon",className:Iu,disabled:t||!s,"aria-label":i("branch.prev"),onClick:()=>{s&&n(s.id)},children:k.jsx(vS,{"aria-hidden":"true"})}),k.jsxs("span",{"aria-live":"polite",className:"min-w-[30px] text-center",children:[o+1,"/",a.length]}),k.jsx(Be,{variant:"ghost",size:"icon",className:Iu,disabled:t||!l,"aria-label":i("branch.next"),onClick:()=>{l&&n(l.id)},children:k.jsx(od,{"aria-hidden":"true"})})]})},c6=({text:e})=>{const{t}=ye(),[r,n]=H.useState(!1),i=H.useRef(void 0);H.useEffect(()=>()=>{window.clearTimeout(i.current)},[]);const a=t(r?"copied":"copy");return k.jsx(Be,{part:"copy",variant:"ghost",size:"icon",className:Iu,"aria-label":a,title:a,onClick:()=>{gm(e).then(o=>{o&&(n(!0),window.clearTimeout(i.current),i.current=window.setTimeout(()=>{n(!1)},2e3))})},children:r?k.jsx(da,{"aria-hidden":"true"}):k.jsx(lm,{"aria-hidden":"true"})})},f6=({message:e})=>{const{rate:t,t:r}=ye(),[n,i]=H.useState(),a=e.rating??0;return k.jsx("span",{part:"rating",role:"radiogroup","aria-label":r("rateGroup"),className:"inline-flex items-center",onKeyDown:Pm,onMouseLeave:()=>{i(void 0)},children:bB.map((o,s)=>{const l=o<=a,u=!l&&a===0&&n!==void 0&&o<=n;return k.jsx("button",{type:"button",role:"radio",tabIndex:Im(s,a-1),"aria-checked":a===o,"aria-label":r("rate",{count:o}),className:he("inline-flex size-[30px] items-center justify-center rounded-md text-muted-foreground transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",(l||u)&&"text-warning"),onMouseEnter:()=>{i(o)},onClick:()=>{t(e.id,o)},children:k.jsx(RF,{className:he("size-4",l&&"fill-current"),"aria-hidden":"true"})},o)})})},d6=({message:e,isLast:t,busy:r,ready:n,persisted:i,canFeedback:a,feedbackOpen:o,onOpenFeedback:s})=>{const{send:l,state:u,t:f}=ye(),d=e.status==="error",p=t&&n&&!r&&!u.limit.blocked;if(d&&!p)return null;const v=Eu.find(x=>x===e.feedbackReason),g=e.blocks.length>0,y=()=>{l({query:"",mode:u.mode??e.mode,regenerateOf:e.id})};return k.jsxs("div",{part:"actions",role:"toolbar","aria-label":f("actionsLabel"),className:he("flex min-h-8 flex-wrap items-center gap-0.5",!d&&e.rating==null&&pm),children:[n&&!d&&e.content&&!g?k.jsx(c6,{text:e.content}):null,p?d?k.jsxs(Be,{part:"regenerate",variant:"input",size:"sm",className:"gap-1.5",onClick:y,children:[k.jsx(CS,{"aria-hidden":"true"}),f("regenerate")]}):k.jsxs(Be,{part:"regenerate",variant:"ghost",size:"icon",className:he(Iu,"max-sm:h-8 max-sm:w-auto max-sm:gap-1.5 max-sm:px-2.5 max-sm:text-[13px]"),"aria-label":f("regenerate"),title:f("regenerate"),onClick:y,children:[k.jsx(CS,{"aria-hidden":"true"}),k.jsx("span",{className:"hidden max-sm:inline",children:f("regenerate")})]}):null,n&&!d?k.jsxs(k.Fragment,{children:[k.jsx("span",{className:"mx-1.5 h-[18px] w-px bg-border","aria-hidden":"true"}),k.jsx(f6,{message:e})]}):null,k.jsx(F2,{messageId:e.id,disabled:r||!i}),a&&!o?k.jsx(Be,{variant:"link",size:"sm",onClick:s,children:e.feedback||v?f("feedbackEdit"):f("feedbackOpen")}):null]})},h6=({message:e,onClose:t})=>{const{saveFeedback:r,t:n}=ye(),[i,a]=H.useState(e.feedback),[o,s]=H.useState(!1),[l,u]=H.useState(!1),[f,d]=H.useState(()=>Eu.find(v=>v===e.feedbackReason)),p=()=>{s(!0),u(!1),r(e.id,i.trim(),f).then(v=>{s(!1),v?t():u(!0)})};return k.jsxs("form",{part:"feedback","aria-label":n("feedbackLabel"),onSubmit:v=>{v.preventDefault()},className:"flex flex-col gap-3 rounded-[14px] border bg-background p-3.5",children:[k.jsx("div",{className:"text-sm font-medium",children:n("feedback.reasonsLabel")}),k.jsx("div",{role:"radiogroup","aria-label":n("feedback.reasonsLabel"),className:"flex flex-wrap gap-1.5",onKeyDown:Pm,children:Eu.map((v,g)=>{const y=v===f;return k.jsx("button",{type:"button",role:"radio",tabIndex:Im(g,f?Eu.indexOf(f):-1),"aria-checked":y,disabled:o,onClick:()=>{d(y?void 0:v)},className:he("inline-flex h-[30px] items-center whitespace-nowrap rounded-full border px-3 text-[13px] transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-60 motion-reduce:transition-none",y?"border-primary-50 bg-secondary font-medium text-secondary-foreground":"bg-background text-foreground hover:bg-muted"),children:n(`feedback.reason.${v}`)},v)})}),k.jsx(Nm,{autoFocus:!0,value:i,onChange:a,placeholder:n("feedbackPlaceholder"),"aria-label":n("feedbackLabel"),maxLength:vm,disabled:o,className:"min-h-[76px] rounded-md border border-input bg-background px-3 py-2.5 text-[15px] leading-normal focus:border-primary focus:ring-[3px] focus:ring-secondary"}),l?k.jsxs("div",{role:"alert",className:"flex items-start gap-1.5 text-[13px] text-destructive",children:[k.jsx(po,{className:"mt-0.5 size-3.5 shrink-0","aria-hidden":"true"}),k.jsx("span",{children:n("ratingError")})]}):null,k.jsxs("div",{className:"flex items-center justify-end gap-2",children:[k.jsxs("span",{className:he("mr-auto text-2xs tabular-nums text-muted-foreground",i.length>=vm&&"font-semibold text-warn-text"),children:[i.length,"/",vm]}),k.jsx(Be,{variant:"ghost",size:"sm",onClick:t,disabled:o,children:n("cancel")}),k.jsxs(Be,{size:"sm",disabled:o,onClick:p,children:[o?k.jsx(vo,{className:"size-3 animate-spin motion-reduce:animate-none","aria-hidden":"true"}):null,n("save")]})]})]})},p6=({message:e})=>{const{t}=ye(),r=Eu.find(n=>n===e.feedbackReason);return!r&&!e.feedback?null:k.jsxs("div",{part:"feedback-saved",className:"flex flex-col gap-1 rounded-xl bg-muted px-3 py-2.5 text-sm",children:[r?k.jsx("span",{className:"font-semibold",children:t(`feedback.reason.${r}`)}):null,e.feedback?k.jsx("span",{className:"whitespace-pre-line break-words",children:e.feedback}):null]})},v6=({message:e,isLast:t,busy:r,persisted:n,dashboardOpen:i,onToggleDashboard:a})=>{const{send:o,state:s,t:l}=ye(),[u,f]=H.useState(!1),d=e.status==="streaming",p=e.status==="error",v=cz(e.content,d),g=Oz(d,e.status),y=!d&&n,x=y&&!p&&e.rating!=null&&e.rating<xB,b=!p&&(d||e.steps.length>0),_=Date.parse(e.createdAt)||0,S=g?"eureka":Iz(e.status,e.content.length>0),T=(E,D)=>o({query:E,mode:s.mode??e.mode,...D?{clarification:D}:{}}).then(L=>L==="sent");return k.jsxs("article",{part:"message","data-role":"assistant","data-status":e.status,"aria-busy":d,className:"group flex items-start gap-3",children:[k.jsxs("div",{part:"avatar",className:"relative w-8 shrink-0 max-sm:hidden",children:[k.jsx(rd,{mood:S,size:32,animated:d||g}),p?k.jsx("span",{"data-testid":"avatar-caption",className:"absolute left-0 top-full mt-1 whitespace-nowrap text-2xs leading-none text-muted-foreground",children:l("agent.failed")}):null]}),k.jsxs("div",{part:p?"bubble assistant-bubble error-bubble":"bubble assistant-bubble",className:"flex min-w-0 flex-1 flex-col gap-3",children:[b?k.jsx(Vj,{steps:e.steps,status:e.status,startedAt:_,durationMs:e.durationMs,stopping:s.turn?.stopping===!0&&s.turn.assistantId===e.id}):null,p?k.jsxs("div",{role:"alert",className:"flex items-start gap-2.5 rounded-xl border border-error/30 bg-destructive-background px-3.5 py-3 text-sm",children:[k.jsx(po,{className:"mt-0.5 size-4 shrink-0 text-destructive","aria-hidden":"true"}),k.jsx("span",{children:e.content||l("errors.generic")})]}):null,k.jsx(o6,{message:e,isLastInBranch:t,onAsk:T,dashboardOpen:i,onToggleDashboard:a,children:e.content&&!p?k.jsx(u6,{streaming:d,children:v}):null}),e.attachments.length>0?k.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.attachments.map((E,D)=>k.jsx(P2,{attachment:E},E.id??`${E.name}-${D}`))}):null,e.status==="stopped"?k.jsxs("div",{className:"flex items-center gap-2 text-[13px] text-muted-foreground",children:[k.jsx(yS,{className:"size-4 shrink-0","aria-hidden":"true"}),k.jsx("span",{children:l("agent.answerStopped")})]}):null,d?null:k.jsx(d6,{message:e,isLast:t,busy:r,ready:y,persisted:n,canFeedback:x,feedbackOpen:u,onOpenFeedback:()=>{f(!0)}}),x&&u?k.jsx(h6,{message:e,onClose:()=>{f(!1)}}):null,x&&!u?k.jsx(p6,{message:e}):null]})]})},g6=({message:e,onClose:t})=>{const{send:r,state:n,t:i}=ye(),a=H.useId(),[o,s]=H.useState(e.content),l=n.mode??e.mode,u=n.config?.max_query_chars??Uk,f=o.trim(),d=f!==e.content.trim(),p=o.length>u,v=f.length>0&&d&&!p&&!n.turn&&!n.limit.blocked,g=()=>{v&&(t(),r({query:f,mode:l,parentId:e.parentId??""}))};return k.jsxs("div",{part:"edit",onKeyDown:y=>{y.key==="Escape"&&(y.preventDefault(),y.stopPropagation(),t())},className:"flex w-full max-w-[640px] flex-col gap-2 rounded-2xl border border-primary bg-background px-3 py-2.5 ring-[3px] ring-secondary",children:[k.jsx(Nm,{autoFocus:!0,value:o,onChange:s,"aria-label":i("editLabel"),"aria-invalid":p||void 0,"aria-describedby":a,className:"py-0.5 text-lg",onSubmit:g}),k.jsxs("div",{className:"flex items-center justify-end gap-2",children:[k.jsx(k2,{id:a,count:o.length,max:u,className:"mr-auto px-0"}),k.jsx(Be,{variant:"ghost",size:"sm",onClick:t,children:i("cancel")}),k.jsx(Be,{size:"sm",disabled:!v,onClick:g,children:i("send")})]})]})},m6=({message:e,busy:t,persisted:r})=>{const{t:n}=ye(),[i,a]=H.useState(!1);return k.jsx("div",{part:"message","data-role":"user",className:"group flex flex-col items-end gap-1.5",children:i?k.jsx(g6,{message:e,onClose:()=>{a(!1)}}):k.jsxs(k.Fragment,{children:[e.attachments.length>0?k.jsx("div",{className:"flex max-w-[78%] flex-wrap justify-end gap-1.5 max-sm:max-w-[88%]",children:e.attachments.map((o,s)=>k.jsx(P2,{attachment:o},o.id??`${o.name}-${s}`))}):null,k.jsx("div",{part:"bubble user-bubble",className:"max-w-[78%] whitespace-pre-wrap break-words rounded-[calc(var(--aid-c-radius)+6px)] rounded-br-[6px] bg-primary px-3.5 py-2.5 text-[15px] leading-normal text-primary-foreground max-sm:max-w-[88%]",children:e.content}),k.jsxs("div",{className:"flex min-h-7 items-center gap-0.5",children:[r?k.jsx(Be,{part:"edit-button",variant:"ghost",size:"icon",className:he(Iu,pm),disabled:t,"aria-label":n("edit"),title:n("edit"),onClick:()=>{a(!0)},children:k.jsx(LF,{"aria-hidden":"true"})}):null,k.jsx(F2,{messageId:e.id,disabled:t||!r})]})]})})},y6=H.memo(function({message:t,isLast:r,busy:n,dashboardOpen:i,onToggleDashboard:a}){const{t:o}=ye(),s=Kf(t.id),l=k.jsx("p",{part:"message-error",className:"text-sm text-muted-foreground",children:o("errors.render")});return k.jsx(Zg,{fallback:l,children:t.role==="user"?k.jsx(m6,{message:t,busy:n,persisted:s}):k.jsx(v6,{message:t,isLast:r,busy:n,persisted:s,dashboardOpen:i,onToggleDashboard:a})})}),B2=e=>e.scrollHeight-e.scrollTop-e.clientHeight,x6=({resetKey:e,followKey:t})=>{const r=H.useRef(null),n=H.useRef(null),i=H.useRef(!0),a=H.useRef(0),[o,s]=H.useState(!0),l=H.useCallback(()=>{const d=r.current;d&&(d.scrollTop=d.scrollHeight)},[]),u=H.useCallback(()=>{const d=r.current;if(!d)return;i.current=!0;const p=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;d.scrollTo({top:d.scrollHeight,behavior:p?"auto":"smooth"})},[]),f=H.useCallback(()=>{const d=r.current;if(!d)return;const p=B2(d)<OS;p?i.current=!0:d.scrollTop<a.current-1&&(i.current=!1),a.current=d.scrollTop,s(p)},[]);return H.useLayoutEffect(()=>{i.current=!0,l()},[e,t,l]),H.useEffect(()=>{const d=n.current,p=r.current;if(!d||!p||typeof ResizeObserver>"u")return;const v=new ResizeObserver(()=>{i.current&&l(),s(B2(p)<OS)});return v.observe(d),()=>{v.disconnect()}},[l]),{scrollRef:r,contentRef:n,onScroll:f,atBottom:o,scrollToBottom:u}},b6=()=>{const{state:e,path:t,t:r}=ye(),{state:n,toggle:i}=fa(),a=t.filter(v=>v.role==="user").length,{scrollRef:o,contentRef:s,onScroll:l,atBottom:u,scrollToBottom:f}=x6({resetKey:e.thread?.id??null,followKey:a}),d=e.turn!==null,p=t[t.length-1];return k.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col",children:[k.jsx("div",{ref:o,part:"messages",onScroll:l,"aria-live":"polite","aria-busy":d,className:"min-h-0 flex-1 overflow-y-auto overscroll-contain",children:k.jsx("div",{ref:s,className:"mx-auto flex w-full max-w-[820px] flex-col gap-[22px] px-4 pb-4 pt-[18px]",children:t.map(v=>k.jsx(y6,{message:v,isLast:v===p,busy:d,dashboardOpen:v.id===n.messageId,onToggleDashboard:i},v.id))})}),u?null:k.jsxs("button",{part:"scroll-down",type:"button",className:"absolute bottom-3 left-1/2 inline-flex h-9 -translate-x-1/2 items-center gap-1.5 whitespace-nowrap rounded-full border bg-background pl-3 pr-3.5 text-[13px] font-medium text-foreground shadow-pop transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",onClick:f,children:[k.jsx(hS,{"aria-hidden":"true"}),r("scrollDown")]})]})},w6={error:"bg-error-background text-destructive",warning:"bg-warning-background text-warn-text",lock:"bg-muted text-muted-foreground"},j2=({tone:e,children:t})=>k.jsx("span",{className:he("flex size-[52px] items-center justify-center rounded-full",w6[e]),children:t}),_6=({kind:e,onRetry:t})=>{const{t:r}=ye();if(e==="loading")return k.jsxs("div",{part:"shell-status","data-state":"loading","aria-busy":"true",className:"flex min-h-0 flex-1 flex-col items-center justify-center gap-4 p-8 text-center",children:[k.jsx("span",{"aria-hidden":"true",className:"size-[26px] animate-spin rounded-full border-[3px] border-current border-r-transparent text-primary motion-reduce:animate-none"}),k.jsx("span",{role:"status",className:"text-xs text-muted-foreground",children:r("loading")})]});if(e==="siteBlocked")return k.jsxs("div",{part:"shell-status","data-state":"siteBlocked",role:"alert",className:"flex min-h-0 flex-1 flex-col items-center justify-center gap-4 p-8 text-center",children:[k.jsx(j2,{tone:"lock",children:k.jsx(xS,{className:"size-6","aria-hidden":"true"})}),k.jsx("p",{className:"max-w-[300px] text-lg font-semibold",children:r("shell.siteBlocked")}),k.jsx("p",{className:"max-w-[440px] text-xs text-muted-foreground",children:r("shell.siteBlockedHint")})]});const n=e==="overloaded";return k.jsxs("div",{part:"shell-status","data-state":n?"overloaded":"unavailable",role:"alert",className:"flex min-h-0 flex-1 flex-col items-center justify-center gap-4 p-8 text-center",children:[k.jsx(j2,{tone:n?"warning":"error",children:n?k.jsx(sd,{className:"size-6","aria-hidden":"true"}):k.jsx(po,{className:"size-6","aria-hidden":"true"})}),k.jsx("p",{className:"max-w-[300px] text-lg font-semibold",children:r(n?"overloaded":"configError")}),t?k.jsxs(Be,{variant:"input",size:"sm",onClick:t,children:[k.jsx(TS,{"aria-hidden":"true"}),r("retry")]}):null]})},k6=()=>{const{state:e,reload:t}=ye(),r=$z(e);return r===null?null:k.jsx(_6,{kind:r,onRetry:r==="siteBlocked"?void 0:t})},S6="h-3 rounded-md bg-muted animate-pulse motion-reduce:animate-none",C6=()=>{const{t:e}=ye();return k.jsxs("div",{"aria-busy":"true",className:"min-h-0 flex-1 overflow-hidden",children:[k.jsxs("div",{className:"mx-auto flex w-full max-w-[820px] flex-col gap-[22px] px-4 pb-4 pt-[18px]",children:[k.jsx("div",{className:"flex justify-end",children:k.jsx("div",{className:"h-[38px] w-[62%] rounded-[18px] rounded-br-[6px] bg-muted animate-pulse motion-reduce:animate-none"})}),k.jsx("div",{className:"flex flex-col gap-2.5",children:[90,76,84,40].map(t=>k.jsx("div",{className:S6,style:{width:`${t}%`}},t))})]}),k.jsx("span",{role:"status",className:"sr-only",children:e("loading")})]})},T6=({composerRef:e,wide:t})=>{const{state:r,path:n}=ye(),[i,a]=H.useState(!1),o=!!r.config&&!r.loadingThread&&!r.configError,s=o&&n.length===0,l=f=>{e&&"current"in e&&e.current?.setText(f)};let u;return o?s?u=k.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain",children:k.jsx(Bj,{listening:i,wide:t,onPick:l})}):u=k.jsx(b6,{}):u=r.loadingThread&&r.config&&!r.configError?k.jsx(C6,{}):k.jsx(k6,{}),k.jsxs(k.Fragment,{children:[u,k.jsx(Pj,{composerRef:e,onDraftChange:a})]})},Pu="size-8 shrink-0 text-muted-foreground hover:text-foreground",A6=({historyHidden:e,onShowHistory:t,onOpenSettings:r,title:n,logoUrl:i,threadTitle:a,tabs:o,inert:s=!1})=>{const{t:l,newChat:u}=ye(),f=Kg(),d=H.useRef(null);fo(d,s);const p=a!==void 0&&a!==""?a:e?n:"";return k.jsxs("div",{ref:d,part:"toolbar",className:"flex h-toolbar shrink-0 items-center gap-1 border-b py-0 pl-2.5 pr-2",children:[e?k.jsx(Be,{part:"history-toggle",variant:"ghost",size:"icon",className:Pu,"aria-expanded":!1,"aria-label":l("history"),title:l("history"),onClick:t,children:k.jsx(DF,{"aria-hidden":"true"})}):null,e&&i?k.jsx("img",{part:"logo",src:i,alt:"",referrerPolicy:"no-referrer",className:"size-6 shrink-0 rounded-md object-contain"}):null,k.jsx("span",{className:"min-w-0 flex-1 truncate px-1.5 text-sm font-semibold",children:p}),o,k.jsx(Be,{variant:"ghost",size:"icon",className:Pu,"aria-label":l("newChat"),title:l("newChat"),onClick:u,children:k.jsx(SS,{"aria-hidden":"true"})}),f.canExpand?k.jsx(Be,{part:"expand",variant:"ghost",size:"icon",className:Pu,"aria-label":f.expanded?l("shrink"):l("expand"),title:f.expanded?l("shrink"):l("expand"),onClick:()=>{f.setExpanded(!f.expanded)},children:f.expanded?k.jsx(kS,{"aria-hidden":"true"}):k.jsx(bS,{"aria-hidden":"true"})}):null,k.jsx(Be,{part:"settings-button",variant:"ghost",size:"icon",className:Pu,"aria-label":l("settings"),title:l("settings"),onClick:r,children:k.jsx(NF,{"aria-hidden":"true"})}),f.close?k.jsx(Be,{part:"close",variant:"ghost",size:"icon",className:Pu,"aria-label":l("close"),title:l("close"),onClick:f.close,children:k.jsx(Cu,{"aria-hidden":"true"})}):null]})},E6="flex shrink-0 flex-col border-r duration-200 animate-in fade-in slide-in-from-left-2 motion-reduce:animate-none",D6="w-side bg-muted",M6="absolute inset-y-0 left-0 z-30 w-side-over max-w-full bg-muted shadow-side",L6=({title:e,logoUrl:t,onHide:r})=>{const{t:n}=ye();return k.jsxs("div",{part:"header",className:"flex h-side-head shrink-0 items-center gap-2.5 pl-3.5 pr-2",children:[t?k.jsx("img",{part:"logo",src:t,alt:"",referrerPolicy:"no-referrer",className:"size-7 shrink-0 rounded-lg object-cover"}):k.jsx(rd,{size:28,animated:!1}),k.jsx("span",{part:"title",className:"min-w-0 flex-1 truncate text-[15px] font-bold",children:e}),k.jsx(Be,{variant:"ghost",size:"icon",className:"size-8 text-muted-foreground hover:text-foreground","aria-label":n("closeHistory"),title:n("closeHistory"),onClick:r,children:k.jsx(EF,{"aria-hidden":"true"})})]})},I6=({onClick:e})=>{const{t}=ye();return k.jsxs("button",{part:"new-chat",type:"button",onClick:e,className:"flex h-9 w-full items-center gap-2.5 rounded-md border bg-background pl-3 pr-2.5 text-left text-sm font-medium transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",children:[k.jsx(SS,{className:"size-4","aria-hidden":"true"}),t("newChat")]})},P6=({name:e,onConfirm:t,onCancel:r})=>{const{t:n}=ye(),i=H.useRef(null);return H.useEffect(()=>{i.current?.querySelector("[data-cancel]")?.focus()},[]),k.jsxs("div",{ref:i,role:"alertdialog","aria-label":n("deleteConfirm"),onKeyDown:a=>{a.key==="Escape"&&(a.preventDefault(),a.stopPropagation(),r())},className:"my-0.5 flex flex-col gap-2 rounded-[10px] border border-error/35 bg-destructive-background p-2.5",children:[k.jsx("div",{className:"text-[13px] font-semibold",children:n("deleteConfirm")}),k.jsx("div",{className:"truncate text-2xs text-muted-foreground",children:e}),k.jsxs("div",{className:"flex gap-2",children:[k.jsx(Be,{variant:"destructive",size:"xs",onClick:t,children:n("deleteYes")}),k.jsx(Be,{variant:"ghost",size:"xs","data-cancel":!0,onClick:r,children:n("deleteNo")})]})]})},N6=(e,t)=>{let r="";const n=[];let i=0;for(const s of e){const l=s.toLowerCase();n.push(...Array.from({length:l.length},()=>i)),r+=l,i+=s.length}n.push(i);const a=r.indexOf(t);if(a<0)return null;let o=a+t.length;for(;o<n.length&&n[o]===n[o-1];)o+=1;return[n[a]??0,n[o]??e.length]},R6=({text:e,query:t})=>{const r=t.trim().toLowerCase(),n=r?N6(e,r):null;if(!n)return k.jsx(k.Fragment,{children:e});const[i,a]=n;return k.jsxs(H.Fragment,{children:[e.slice(0,i),k.jsx("mark",{className:"rounded-[3px] bg-hl px-px text-inherit",children:e.slice(i,a)}),e.slice(a)]})},O6=({groups:e,query:t,activeId:r,confirmId:n,onOpen:i,onAskDelete:a,onCancelDelete:o,onDelete:s})=>{const{t:l}=ye();return k.jsx(k.Fragment,{children:e.map(([u,f])=>k.jsxs("section",{className:"pb-1","aria-label":l(u),children:[k.jsx("h3",{className:"px-2 pb-1 pt-3.5 text-2xs font-medium text-muted-foreground",children:l(u)}),k.jsx("ul",{className:"flex flex-col gap-px",children:f.map(d=>{const p=d.id===r,v=d.title||l("untitled");return n===d.id?k.jsx("li",{children:k.jsx(P6,{name:v,onConfirm:()=>{s(d.id)},onCancel:o})},d.id):k.jsxs("li",{className:"group relative",children:[k.jsx("button",{part:"thread-item",type:"button","aria-current":p?"page":void 0,title:v,onClick:()=>{i(d.id)},className:he("flex min-h-9 w-full items-center rounded-lg py-1 pl-2.5 pr-9 text-left text-sm transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",p&&"bg-background font-medium shadow-[inset_0_0_0_1px_var(--aid-c-border)] hover:bg-background"),children:k.jsx("span",{className:"min-w-0 truncate",children:k.jsx(R6,{text:v,query:t})})}),k.jsx(Be,{variant:"ghost",size:"icon",className:he("absolute right-1 top-1/2 size-7 -translate-y-1/2 text-muted-foreground",!p&&pm),"aria-label":`${l("delete")}: ${v}`,onClick:()=>{a(d.id)},children:k.jsx(zF,{"aria-hidden":"true"})})]},d.id)})})]},u))})},Um=({icon:e,children:t})=>k.jsxs("div",{className:"flex flex-col items-center gap-1.5 px-3 py-6 text-center text-sm text-muted-foreground",children:[e,t]}),z6=[82,64,90,58,76,70],F6=({query:e})=>{const{state:t,t:r,refreshThreads:n}=ye();return t.threadsLoaded?e.trim()!==""?k.jsx(Um,{icon:k.jsx(Su,{"aria-hidden":"true"}),children:k.jsx("span",{children:r("searchEmpty")})}):t.threadsError?k.jsxs(Um,{icon:k.jsx(po,{"aria-hidden":"true"}),children:[k.jsx("span",{children:r("historyError")}),k.jsx(Be,{variant:"input",size:"xs",onClick:n,children:r("retry")})]}):k.jsx(Um,{icon:k.jsx(_S,{"aria-hidden":"true"}),children:k.jsx("span",{children:r("historyEmpty")})}):k.jsxs("div",{"aria-busy":"true",className:"flex flex-col",children:[z6.map(i=>k.jsx("div",{className:"flex min-h-9 items-center px-2.5",children:k.jsx("span",{className:"h-[11px] animate-pulse rounded-md bg-border motion-reduce:animate-none",style:{width:`${i}%`}})},i)),k.jsx("span",{role:"status",className:"sr-only",children:r("loading")})]})},B6=(e,t,r)=>{id(e,t);const n=H.useRef(r);H.useEffect(()=>{n.current=r}),H.useEffect(()=>{if(!t)return;const a=o=>{if(o.key!=="Escape"||o.defaultPrevented)return;const s=o.composedPath(),l=s[0];l instanceof HTMLInputElement&&l.type==="search"&&l.value!==""||s.some(u=>u instanceof HTMLElement&&u.getAttribute("role")==="alertdialog")||(o.preventDefault(),o.stopPropagation(),n.current())};return window.addEventListener("keydown",a,!0),()=>{window.removeEventListener("keydown",a,!0)}},[t]);const i=H.useRef(!1);H.useEffect(()=>{const a=e.current?.getRootNode();if(i.current&&!t){const o=window.setTimeout(()=>{a?.querySelector('[part~="history-toggle"]')?.focus()},0);return i.current=!1,()=>{window.clearTimeout(o)}}i.current=t},[t,e])},j6=({query:e,onQuery:t,inputRef:r,autoFocus:n})=>{const{t:i}=ye();return k.jsxs("label",{className:"relative flex items-center",children:[k.jsx(Su,{className:"pointer-events-none absolute left-[11px] size-4 text-muted-foreground","aria-hidden":"true"}),k.jsx("input",{ref:r,part:"search",type:"search",value:e,"data-autofocus":n?"":void 0,onChange:a=>{t(a.target.value)},onKeyDown:a=>{a.key==="Escape"&&e&&(a.preventDefault(),t(""))},placeholder:i("search"),"aria-label":i("search"),className:"h-8 w-full rounded-md border border-input bg-background pl-[34px] pr-9 text-sm outline-none placeholder:text-muted-foreground focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-secondary [&::-webkit-search-cancel-button]:hidden"}),e?k.jsx("button",{type:"button","aria-label":i("dismiss"),className:"absolute right-2 rounded p-0.5 text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onClick:()=>{t(""),r.current?.focus()},children:k.jsx(Cu,{className:"size-3.5","aria-hidden":"true"})}):null]})},H6=({collapsed:e,onCollapsedChange:t,searchRef:r,searchSignal:n,overlay:i=!1,title:a,logoUrl:o,inert:s=!1})=>{const l=H.useRef(null);fo(l,s);const{state:u,t:f,openThread:d,newChat:p,deleteThread:v}=ye(),[g,y]=H.useState(""),[x,b]=H.useState(null),_=i&&!e;B6(l,_,()=>{t(!0)});const S=H.useMemo(()=>{const E=g.trim().toLowerCase(),D=E?u.threads.filter(L=>(L.title||f("untitled")).toLowerCase().includes(E)):u.threads;return SB(D)},[u.threads,g,f]);H.useEffect(()=>{n>0&&!e&&r.current?.focus()},[n,e,r]);const T=E=>()=>{E(),i&&t(!0)};return e?k.jsx("nav",{ref:l,part:"sidebar","data-state":"collapsed","aria-label":f("history"),hidden:!0}):k.jsxs("nav",{ref:l,part:"sidebar","data-state":"expanded","aria-label":f("history"),className:he(E6,i?M6:D6),children:[k.jsx(L6,{title:a,logoUrl:o,onHide:()=>{t(!0)}}),k.jsxs("div",{className:"flex shrink-0 flex-col gap-2 px-2.5 pb-2",children:[k.jsx(I6,{onClick:T(p)}),k.jsx(j6,{query:g,onQuery:y,inputRef:r,autoFocus:_})]}),k.jsxs("div",{part:"history",className:"min-h-0 flex-1 overflow-y-auto overscroll-contain px-2 pb-2",children:[S.length===0?k.jsx(F6,{query:g}):null,k.jsx(O6,{groups:S,query:g,activeId:u.thread?.id,confirmId:x,onOpen:E=>{T(()=>{d(E)})()},onAskDelete:b,onCancelDelete:()=>{b(null)},onDelete:E=>{b(null),v(E)}})]})]})};function V6(e){const t=H.useRef(null),[r,n]=H.useState(e);return H.useLayoutEffect(()=>{const i=t.current;if(!i)return;const a=Math.round(i.getBoundingClientRect().width);if(a>0&&n(a),typeof ResizeObserver>"u")return;const o=new ResizeObserver(([s])=>{const l=Math.round(s?.contentRect.width??0);l>0&&n(l)});return o.observe(i),()=>{o.disconnect()}},[]),[t,r]}const H2="aid_sidebar",U6=720,$6=e=>{try{const t=window.localStorage.getItem(H2);return t===null?e:t==="collapsed"}catch{return e}},G6=e=>{const{state:t}=ye(),r=t.thread?.id,n=r!==void 0&&r!==Fs?r:void 0;return k.jsx(aj,{threadId:n,children:k.jsx(W6,{...e,threadId:n})})},W6=({open:e,title:t,logoUrl:r,compact:n,threadId:i})=>{const{state:a,path:o,newChat:s}=ye(),l=Kg(),{expandForDashboard:u}=l,[f,d]=V6(0),v=(l.canExpand&&l.expanded?Math.max(d,window.innerWidth):d)>=sF,g=fa(),y=n||d>0&&d<U6,[x,b]=H.useState(()=>y||$6(!1)),[_,S]=H.useState(y);y!==_&&(S(y),y&&b(!0));const[T,E]=H.useState(!1),D=H.useRef(null),[L,R]=H.useState(0),O=()=>{P(!1),R(ae=>ae+1)},M=H.useRef(null),P=ae=>{if(b(ae),!y)try{window.localStorage.setItem(H2,ae?"collapsed":"expanded")}catch{}},j=H.useRef({collapsed:x,newChat:s,setCollapsed:P,focusSearch:O});H.useEffect(()=>{j.current={collapsed:x,newChat:s,setCollapsed:P,focusSearch:O}}),H.useEffect(()=>{if(!e)return;const ae=ie=>{if(!(ie.metaKey||ie.ctrlKey)||ie.altKey)return;const{collapsed:_e,newChat:be,setCollapsed:xe,focusSearch:Se}=j.current,Le=ie.key.toLowerCase();if(Le==="k"&&!ie.shiftKey)Se();else if(Le==="o"&&ie.shiftKey)be(),setTimeout(()=>M.current?.setText(""),0);else if(Le==="s"&&ie.shiftKey)xe(!_e);else return;ie.preventDefault()};return window.addEventListener("keydown",ae),()=>{window.removeEventListener("keydown",ae)}},[e]),oj(o,i,{loaded:i===void 0||a.thread!==null&&a.loadingThread===null,streaming:(a.turn?.optimisticIds.length??0)>0});const B=o.find(ae=>ae.id===g.state.messageId&&Oi(ae.blocks,"dashboard")!==void 0),$=B!==void 0;H.useEffect(()=>{if($)return u(!0),()=>{u(!1)}},[$,u]);const K=H.useRef(null),Z=H.useRef(!1),re=B?.id??null,Y=H.useRef(null);H.useEffect(()=>{const ae=Y.current;if(Y.current=re,ae===null||re!==null||!Z.current)return;Z.current=!1;const ie=K.current;(Array.from(ie?.querySelectorAll('[part="dashboard-toggle"]')??[]).find(be=>be.dataset.messageId===ae)??ie?.querySelector('[part="composer"] textarea'))?.focus()},[re]);const G=$&&g.state.fullscreen;fo(K,y&&!x);const[I,z]=H.useState(e);e!==I&&(z(e),!e&&y&&b(!0));const W=uF($,v,g.state.fullscreen);lF(e&&$&&(!W||g.state.view==="dashboard"));const F=a.thread?a.threads.find(ae=>ae.id===a.thread?.id)?.title:void 0,ee=a.config&&!a.loadingThread&&!a.configError;return k.jsxs("div",{ref:f,className:"relative flex min-h-0 flex-1",children:[k.jsx(H6,{collapsed:x,onCollapsedChange:P,overlay:y,searchRef:D,searchSignal:L,title:t,logoUrl:r,inert:G}),k.jsxs("div",{ref:K,className:"flex min-w-0 flex-1 flex-col",children:[k.jsx(A6,{historyHidden:x,onShowHistory:()=>{P(!1)},onOpenSettings:()=>{E(!0)},title:t,logoUrl:r,threadTitle:F,tabs:W?k.jsx(CB,{}):null,inert:G}),k.jsx(TB,{wide:v,onPanelFocusChange:ae=>{Z.current=ae},panel:B?k.jsx(nj,{message:B}):null,chat:k.jsx(T6,{composerRef:M,wide:d>=720})})]}),y&&!x?k.jsx("button",{type:"button",tabIndex:-1,"aria-hidden":"true",className:"absolute inset-0 z-20 bg-scrim",onClick:()=>{P(!0)}}):null,k.jsx(lj,{active:e&&!!ee}),k.jsx(xj,{open:T,onClose:()=>{E(!1)}})]})},V2=({open:e,title:t,logoUrl:r,fullscreen:n,expanded:i=!1,style:a,onClose:o})=>{const s=H.useRef(null);return fo(s,!e),id(s,e),H.useEffect(()=>{if(!e)return;const l=u=>{u.key==="Escape"&&!u.defaultPrevented&&o()};return window.addEventListener("keydown",l),()=>{window.removeEventListener("keydown",l)}},[e,o]),k.jsx("div",{ref:s,part:"window",role:"dialog","aria-modal":n,"aria-label":t,"aria-hidden":!e,"data-state":e?"open":"closed","data-fullscreen":n,"data-expanded":i,className:"aid-window rounded-aid-window border bg-background text-foreground shadow-window",style:a,children:k.jsx(G6,{open:e,title:t,logoUrl:r,compact:n})})},$m=60,Y6=6,X6=8,U2={x:20,y:20},q6=639,$2="aid_pos",K6=(e,t,r=Y6)=>e*e+t*t>=r*r,pd=(e,t,r=$m,n=X6)=>{const i=typeof r=="number"?{width:r,height:r}:r,a=(o,s)=>Math.round(Math.min(Math.max(o,n),Math.max(n,s)));return{x:a(e.x,t.width-i.width-n),y:a(e.y,t.height-i.height-n)}},G2=(e,t,r,n)=>({x:n==="bottom-right"?e.x-t:e.x+t,y:e.y-r}),Z6=e=>{try{const t=e?.getItem($2);if(!t)return null;const r=JSON.parse(t);if(typeof r=="object"&&r!==null&&typeof r.x=="number"&&typeof r.y=="number"&&Number.isFinite(r.x)&&Number.isFinite(r.y))return{x:r.x,y:r.y}}catch{}return null},Q6=(e,t)=>{try{e?.setItem($2,JSON.stringify(t))}catch{}},J6={width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e8=({size:e=24})=>k.jsx("svg",{...J6,width:e,height:e,children:k.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),W2=()=>({width:window.innerWidth,height:window.innerHeight}),Gm=e=>({width:e.offsetWidth,height:e.offsetHeight}),t8=()=>{try{return window.localStorage}catch{return null}},Y2=H.forwardRef(({open:e,lang:t,corner:r,offset:n,draggable:i,unread:a=0,variant:o,label:s,shape:l,onOffsetChange:u,onToggle:f},d)=>{const p=H.useRef(null),v=H.useRef(!1),[g,y]=H.useState(null),x=g!==null,b=L=>{!i||L.button!==0||(p.current={pointerX:L.clientX,pointerY:L.clientY,offset:n,moved:!1},L.currentTarget.setPointerCapture(L.pointerId))},_=L=>{const R=p.current;if(!R)return;const O=L.clientX-R.pointerX,M=L.clientY-R.pointerY;!R.moved&&!K6(O,M)||(R.moved||(R.moved=!0,y({offset:R.offset,...Gm(L.currentTarget)})),u(pd(G2(R.offset,O,M,r),W2(),Gm(L.currentTarget))))},S=L=>{const R=p.current;if(p.current=null,L.currentTarget.hasPointerCapture(L.pointerId)&&L.currentTarget.releasePointerCapture(L.pointerId),!R?.moved)return;y(null),v.current=!0;const O=L.clientX-R.pointerX,M=L.clientY-R.pointerY;Q6(t8(),pd(G2(R.offset,O,M,r),W2(),Gm(L.currentTarget)))},T=()=>{if(v.current){v.current=!1;return}f()},E=r==="bottom-right"?"right":"left",D=o==="label"&&!e?s??Vn(t,"ask"):null;return k.jsxs(k.Fragment,{children:[g?k.jsx("span",{"data-testid":"launcher-origin","aria-hidden":"true","data-shape":l??"circle",className:"aid-launcher-origin",style:{[E]:g.offset.x,bottom:g.offset.y,width:g.width,height:g.height}}):null,k.jsxs("button",{ref:d,part:"launcher",type:"button","aria-label":`${D??Vn(t,e?"close":"open")}${a>0&&!e?`, ${Vn(t,"unreadAnswers",{count:a})}`:""}`,"aria-expanded":e,"data-dragging":x,"data-variant":D?"label":"icon","data-shape":l??"circle",className:"aid-launcher",style:{[E]:n.x,bottom:n.y},onPointerDown:b,onPointerMove:_,onPointerUp:S,onPointerCancel:S,onClick:T,children:[e?k.jsx(e8,{}):k.jsx(rd,{size:D?44:40,animated:!1,bare:!0}),D?k.jsx("span",{part:"launcher-label",className:"truncate",children:D}):null,a>0&&!e?k.jsx("span",{part:"badge",className:"aid-launcher-badge",children:a>9?"9+":a}):null]})]})});Y2.displayName="Launcher";const r8=e=>{const{state:t}=ye(),{turn:r,thread:n}=t,[i,a]=H.useState({turn:r,open:e}),[o,s]=H.useState(0);return(i.turn!==r||i.open!==e)&&(a({turn:r,open:e}),e?o!==0&&s(0):i.turn&&!r&&n?.messages.find(l=>l.id===i.turn?.assistantId)?.status==="done"&&s(o+1)),o},X2=H.forwardRef((e,t)=>{const r=r8(e.open);return k.jsx(Y2,{ref:t,...e,unread:r})});X2.displayName="UnreadLauncher";const Nu=(e,t,r)=>Math.min(r,Math.max(t,e)),n8={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#008000",blue:"#0000ff",orange:"#ffa500",purple:"#800080",teal:"#008080",navy:"#000080",gray:"#808080",grey:"#808080"},q2=e=>{if(!/^[0-9a-f]+$/i.test(e)||![3,4,6,8].includes(e.length))return null;const t=e.length<=4?e.replace(/./g,n=>n+n):e,r=n=>parseInt(t.slice(n,n+2),16);return{r:r(0),g:r(2),b:r(4),a:t.length===8?r(6)/255:1}},K2=e=>{const t=e.replace(/\//g," ").replace(/,/g," ").trim().split(/\s+/).filter(Boolean);return t.length===3||t.length===4?t:null},vd=e=>{const t=Number(e);return e!==""&&Number.isFinite(t)?t:null},i8=e=>{if(e===void 0)return 1;const t=vd(e.endsWith("%")?e.slice(0,-1):e);return t===null?null:Nu(e.endsWith("%")?t/100:t,0,1)},Wm=e=>{const t=vd(e.endsWith("%")?e.slice(0,-1):e);return t===null?null:Nu(e.endsWith("%")?t/100*255:t,0,255)},Z2=e=>{const t=/^(-?[\d.]+)(deg|turn|rad|grad)?$/.exec(e);if(!t?.[1])return null;const r=vd(t[1]);if(r===null)return null;const n=t[2]??"deg";return((n==="turn"?r*360:n==="rad"?r*180/Math.PI:n==="grad"?r*.9:r)%360+360)%360},gd=e=>{const t=vd(e.endsWith("%")?e.slice(0,-1):e);return t===null?null:Nu(t,0,100)},md=({h:e,s:t,l:r,a:n})=>{const i=t/100,a=r/100,o=l=>(l+e/30)%12,s=l=>a-i*Math.min(a,1-a)*Math.max(-1,Math.min(o(l)-3,9-o(l),1));return{r:Math.round(s(0)*255),g:Math.round(s(8)*255),b:Math.round(s(4)*255),a:n}},a8=({r:e,g:t,b:r,a:n})=>{const i=e/255,a=t/255,o=r/255,s=Math.max(i,a,o),l=Math.min(i,a,o),u=(s+l)/2,f=s-l;if(f===0)return{h:0,s:0,l:u*100,a:n};const d=f/(1-Math.abs(2*u-1));let p;return s===i?p=(a-o)/f%6:s===a?p=(o-i)/f+2:p=(i-a)/f+4,{h:(p*60+360)%360,s:d*100,l:u*100,a:n}},Q2=e=>{const t=o8(e);if(!t)return null;const r=/^hsla?\((.*)\)$/.exec(e.trim().toLowerCase()),n=r?.[1]!==void 0?K2(r[1]):null;if(n){const[i,a,o]=[Z2(n[0]??""),gd(n[1]??""),gd(n[2]??"")];if(i!==null&&a!==null&&o!==null)return{h:i,s:a,l:o,a:t.a}}return a8(t)},o8=e=>{const t=e.trim().toLowerCase(),r=n8[t];if(r)return q2(r.slice(1));if(t.startsWith("#"))return q2(t.slice(1));const n=/^(rgba?|hsla?)\((.*)\)$/.exec(t);if(!n?.[1]||n[2]===void 0)return null;const i=K2(n[2]);if(!i)return null;const[a="",o="",s="",l]=i,u=i8(l);if(u===null)return null;if(n[1].startsWith("rgb")){const[v,g,y]=[Wm(a),Wm(o),Wm(s)];return v===null||g===null||y===null?null:{r:Math.round(v),g:Math.round(g),b:Math.round(y),a:u}}const[f,d,p]=[Z2(a),gd(o),gd(s)];return f===null||d===null||p===null?null:md({h:f,s:d,l:p,a:u})},J2=({r:e,g:t,b:r})=>{const n=i=>{const a=i/255;return a<=.03928?a/12.92:((a+.055)/1.055)**2.4};return .2126*n(e)+.7152*n(t)+.0722*n(r)},eC=(e,t)=>{const[r,n]=[J2(e),J2(t)].sort((i,a)=>a-i);return(r+.05)/(n+.05)},yd=e=>Math.round(e*10)/10,mo=({h:e,s:t,l:r,a:n})=>`${yd(e)}, ${yd(t)}%, ${yd(r)}%${n<1?`, ${yd(n*100)/100}`:""}`,tC={h:210,s:40,l:98,a:1},rC={h:222.2,s:47.4,l:11.2,a:1},s8=e=>{const t=Q2(e);if(!t)return null;const r={...t,a:1},n={...r,l:Nu(r.l>70?r.l-6:r.l+8,0,100)},i={...r,l:Nu(r.l-10,0,100)},a=md(r),o=eC(a,md(tC)),s=o>=4.5||o>=eC(a,md(rC))?tC:rC;return{primary:mo(r),primaryHovered:mo(n),primaryPressed:mo(i),primaryForeground:mo(s),secondary:mo({...r,a:.1}),ring:mo({...r,a:.5})}},l8=(...e)=>{const t={};for(const r of e)if(r)for(const[n,i]of Object.entries(r))i===void 0||i===""||(t[n]=i);return t},u8=e=>{const t={},r=e.primary?s8(e.primary):null;r&&(t["--primary"]=r.primary,t["--primary-text"]=r.primary,t["--primary-hovered"]=r.primaryHovered,t["--primary-pressed"]=r.primaryPressed,t["--primary-foreground"]=r.primaryForeground,t["--secondary"]=r.secondary,t["--secondary-foreground"]=r.primary,t["--ring"]=r.ring),e.radius!==void 0&&e.radius!==""&&(t["--radius"]=typeof e.radius=="number"?`${e.radius}px`:e.radius),e.font&&(t["--aid-theme-font"]=e.font);const n=u=>{const f=u?Q2(u):null;return f?mo(f):null},i=n(e.background);if(i)for(const u of["--background","--card","--popover"])t[u]=i;const a=n(e.foreground);if(a)for(const u of["--foreground","--card-foreground","--popover-foreground","--secondary-foreground"])t[u]=a;const o=n(e.bubble);if(o)for(const u of["--secondary","--muted","--accent"])t[u]=o;const s=n(e.border);if(s)for(const u of["--border","--input"])t[u]=s;const l=(u,f)=>{typeof f=="number"&&Number.isFinite(f)&&(t[u]=`${f}px`)};return l("--aid-t-window-width",e.windowWidth),l("--aid-t-window-height",e.windowHeight),l("--aid-t-offset-x",e.offsetX),l("--aid-t-offset-y",e.offsetY),t},c8=(e,t)=>e==="dark"||e==="auto"&&t?"dark":"light",f8=(e,t,r={})=>{for(const n of Object.keys(r))n in t||e.style.removeProperty(n);for(const[n,i]of Object.entries(t))e.style.setProperty(n,i)},d8=(e,t)=>{e.classList.toggle("dark",t==="dark"),e.dataset.scheme=t},nC=(e,t)=>{const r=parseFloat(e);return Number.isFinite(r)?r:t},Ym=()=>{try{return window.localStorage}catch{return null}},iC=(e,t,r)=>nC(e.getPropertyValue(`--aid-${t}`),nC(e.getPropertyValue(`--aid-t-${t}`),r)),h8=e=>{const t=getComputedStyle(e);return{x:iC(t,"offset-x",U2.x),y:iC(t,"offset-y",U2.y)}},aC=()=>({width:window.innerWidth,height:window.innerHeight}),p8={scheme:"auto"},v8=(e,t)=>{const r=H.useSyncExternalStore(e.subscribe,()=>e.get().theme),n=H.useSyncExternalStore(e.subscribe,()=>e.get().adminTheme),i=oS("(prefers-color-scheme: dark)"),a=l8(p8,n,r),o=c8(a.scheme,i),s=H.useRef({}),l=JSON.stringify(u8(a));return H.useLayoutEffect(()=>{const u=JSON.parse(l);f8(t,u,s.current),s.current=u},[t,l]),H.useLayoutEffect(()=>{d8(t,o)},[t,o]),a},g8=e=>{const{store:t,api:r}=e,n=H.useSyncExternalStore(t.subscribe,()=>t.get().open),i=H.useSyncExternalStore(t.subscribe,()=>t.get().lang),a=H.useCallback(o=>{t.set({adminTheme:o})},[t]);return k.jsx(qz,{api:r,lang:i,open:n,onAdminTheme:a,children:k.jsx(m8,{...e})})},m8=({store:e,root:t,mode:r,corner:n,draggable:i,api:a})=>{const o=H.useSyncExternalStore(e.subscribe,()=>e.get().open),s=H.useSyncExternalStore(e.subscribe,()=>e.get().lang),l=v8(e,t),u=n??l.position??"bottom-right",f=oS(`(max-width: ${q6}px)`),d=H.useRef(null),[p,v]=H.useState(()=>pd(Z6(Ym())??h8(t),aC(),$m));H.useEffect(()=>{if(r!=="launcher")return;const j=()=>{const B=d.current,$=B?{width:B.offsetWidth,height:B.offsetHeight}:$m;v(K=>pd(K,aC(),$))};return window.addEventListener("resize",j),()=>{window.removeEventListener("resize",j)}},[r]);const g=H.useCallback(()=>{e.set({open:!1})},[e]),y=H.useCallback(()=>{e.set({open:!e.get().open})},[e]),x=H.useRef(o);H.useEffect(()=>{x.current&&!o&&d.current?.focus({preventScroll:!0}),x.current=o},[o]);const b=l.title??Vn(s,"title"),_=tS(a.apiUrl),S=H.useMemo(()=>({animated:o,assetsBase:_}),[o,_]),[T,E]=H.useState({expanded:!1,byDashboard:!1}),{expanded:D}=T,L=r==="launcher"&&!f,R=H.useCallback(j=>{E({expanded:j,byDashboard:!1})},[]),O=H.useCallback(j=>{E(B=>kz(B,j,L))},[L]),M=l.scheme??"auto",P=H.useMemo(()=>({lang:s,scheme:M,expanded:D,canExpand:L,setExpanded:R,expandForDashboard:O,close:r==="launcher"?g:void 0,update:j=>{const B={...qk(Ym()),...j};_z(Ym(),B),e.set({...j.lang?{lang:j.lang}:{},theme:{...e.get().theme,...Kk(j)}})}}),[s,M,D,L,R,O,r,g,e]);return r==="window"?k.jsx(qg.Provider,{value:P,children:k.jsx(tm.Provider,{value:S,children:k.jsx(V2,{open:o,title:b,logoUrl:Yg(l.logoUrl),fullscreen:!1,onClose:g})})}):k.jsx(qg.Provider,{value:P,children:k.jsxs(tm.Provider,{value:S,children:[k.jsx("div",{part:"overlay",className:"aid-overlay","data-state":o?"open":"closed","aria-hidden":!0,onClick:g}),k.jsx(V2,{open:o,title:b,logoUrl:Yg(l.logoUrl),fullscreen:f,expanded:D&&!f,onClose:g}),o?null:k.jsx(X2,{ref:d,open:o,lang:s,corner:u,offset:p,draggable:i&&!f,variant:l.launcher,label:l.launcherLabel,shape:l.launcherShape,onOffsetChange:v,onToggle:y})]})})},oC="",y8=`${J3}
|
|
19
|
+
${Cz}`,Xm=(e,t,r,n)=>{const i=e.shadowRoot??e.attachShadow({mode:"open"});i.replaceChildren();const a=document.createElement("style");a.textContent=y8;const o=document.createElement("div");o.className="aid-root",o.dataset.mode=r,i.append(a,o);let s=null;try{s=window.localStorage}catch{}const l=qk(s),u=Sz({open:t.defaultOpen??r==="window",lang:l.lang??Wk(t.lang),theme:{...t.theme,...Kk(l)},adminTheme:null});let f=u.get().open;const d=u.subscribe(()=>{const{open:x}=u.get();x!==f&&(f=x,t.onOpenChange?.(x))}),p=mz({apiUrl:t.apiUrl??oC,siteKey:t.siteKey,visitorId:dz(t.visitorId,s),rememberVisitor:x=>{try{s?.setItem($g,x)}catch{}}}),v=Q3.createRoot(o);v.render(k.jsx(H.StrictMode,{children:k.jsx(Zg,{fallback:null,children:k.jsx(g8,{store:u,root:o,mode:r,corner:t.position,draggable:t.draggable??!0,api:p})})}));let g=!0;return{open:()=>{u.set({open:!0})},close:()=>{u.set({open:!1})},setTheme:x=>{u.set({theme:{...u.get().theme,...x}})},setLang:x=>{u.set({lang:Wk(x)})},unmount:()=>{g&&(g=!1,d(),v.unmount(),Dz(),i.replaceChildren(),n?.())}}};function sC(e,t){const r=e instanceof HTMLElement?t:t??e;if(!r)throw new TypeError("AiDanaChat.mountLauncher: options are required");if(e instanceof HTMLElement)return Xm(e,r,"launcher");const n=document.createElement("div");return n.setAttribute("data-ai-dana-chat",""),n.style.setProperty("all","initial"),document.body.append(n),Xm(n,r,"launcher",()=>{n.remove()})}const lC=(e,t)=>Xm(e,t,"window"),uC=["light","dark","auto"];class qm extends HTMLElement{constructor(){super(...arguments);Rs(this,"handle")}connectedCallback(){const r=this.getAttribute("theme"),n=this.getAttribute("position"),i=this.getAttribute("site-key"),a=this.getAttribute("api-url"),o={...i?{siteKey:i}:{},...a===null?{}:{apiUrl:a},...this.getAttribute("lang")?{lang:this.getAttribute("lang")}:{},...r&&uC.includes(r)?{theme:{scheme:r}}:{},...n==="bottom-left"||n==="bottom-right"?{position:n}:{},draggable:this.getAttribute("draggable")!=="false",defaultOpen:this.hasAttribute("open"),onOpenChange:s=>this.dispatchEvent(new CustomEvent("openchange",{detail:{open:s}}))};this.handle=this.hasAttribute("launcher")?sC(this,o):lC(this,o)}disconnectedCallback(){this.handle?.unmount(),this.handle=void 0}attributeChangedCallback(r,n,i){!this.handle||n===i||(r==="lang"&&i&&this.handle.setLang(i),r==="theme"&&i&&uC.includes(i)&&this.handle.setTheme({scheme:i}))}open(){this.handle?.open()}close(){this.handle?.close()}setTheme(r){this.handle?.setTheme(r)}setLang(r){this.handle?.setLang(r)}}Rs(qm,"observedAttributes",["lang","theme"]),typeof customElements<"u"&&!customElements.get("ai-dana-chat")&&customElements.define("ai-dana-chat",qm);const x8=()=>({parts:[]}),cC=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),$s=e=>typeof e=="string";function b8(e,t){cC(t)&&(e.metadata={...e.metadata,...t})}function fC(e,t){for(const n of e.parts)if(n.type==="text"&&n.id===t)return n;const r={type:"text",id:t,text:""};return e.parts.push(r),r}function w8(e,t,r){if(r.transient===!0)return;const n=$s(r.id)?r.id:void 0,i=n==null?void 0:e.parts.find(a=>a.type===t&&a.id===n);i!=null&&i.type!=="text"?i.data=r.data:e.parts.push({type:t,...n!=null?{id:n}:{},data:r.data})}function _8(e,t){if(!cC(t)||!$s(t.type))throw new zs("stream_error");switch(t.type){case"start":case"finish":case"message-metadata":b8(e,t.messageMetadata);return;case"text-start":$s(t.id)&&fC(e,t.id);return;case"text-delta":$s(t.id)&&$s(t.delta)&&(fC(e,t.id).text+=t.delta);return;case"data-step":case"data-attachment":case"data-block":w8(e,t.type,t);return;case"error":throw new zs($s(t.errorText)&&t.errorText!==""?t.errorText:"stream_error");default:return}}const k8="[DONE]";function dC(){const e=new Error("The operation was aborted.");return e.name="AbortError",e}function S8(e){let t;for(const r of e.split(`
|
|
20
|
+
`)){if(r.startsWith(":"))continue;const n=r.indexOf(":");if((n===-1?r:r.slice(0,n))!=="data")continue;let a=n===-1?"":r.slice(n+1);a.startsWith(" ")&&(a=a.slice(1)),(t??(t=[])).push(a)}return t?.join(`
|
|
21
|
+
`)}async function*C8(e,t){const r=e.getReader(),n=()=>{r.cancel().catch(()=>{})};t?.addEventListener("abort",n,{once:!0});const i=new TextDecoder;let a="";try{if(t?.aborted)throw dC();for(;;){const{done:o,value:s}=await r.read();if(t?.aborted)throw dC();if(o)return;a+=i.decode(s,{stream:!0});const l=a.endsWith("\r")?"\r":"";a=a.slice(0,a.length-l.length).replace(/\r\n?/g,`
|
|
22
|
+
`);for(let u=a.indexOf(`
|
|
23
|
+
|
|
24
|
+
`);u!==-1;u=a.indexOf(`
|
|
25
|
+
|
|
26
|
+
`)){const f=S8(a.slice(0,u));if(a=a.slice(u+2),f===k8)return;f!==void 0&&(yield f)}a+=l}}finally{t?.removeEventListener("abort",n),n()}}const Km=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Zm=e=>typeof e=="string"&&e!=="";function Qm(e){return Zm(e)?e:typeof e=="number"&&Number.isInteger(e)?String(e):void 0}function T8(e){if(!Km(e))return;const t=Qm(e.threadId),r=Qm(e.userMessageId),n=Qm(e.assistantMessageId);if(!(t==null||r==null||n==null||typeof e.mode!="string"))return{threadId:t,userMessageId:r,assistantMessageId:n,mode:e.mode}}function A8(e,t){if(!Km(t)||!Zm(t.node)||t.status!=="running"&&t.status!=="done"||typeof t.attempt!="number"||!Number.isInteger(t.attempt)||t.attempt<=0)return;const r={id:e,node:t.node,status:t.status,attempt:t.attempt},{durationMs:n}=t;if(n!==void 0){if(typeof n!="number"||n<0)return;r.durationMs=n}const{label:i,total:a}=t;return typeof i=="string"&&(r.label=i),(a===null||typeof a=="number"&&Number.isFinite(a))&&(r.total=a),r}function E8(e){if(!Km(e)||!Zm(e.url))return;const{name:t}=e;if(!(t!=null&&typeof t!="string"))return{name:t?.trim()?t:D8(e.url),url:e.url}}function D8(e){const t=e.split("?")[0]??e,r=t.slice(t.lastIndexOf("/")+1);try{return decodeURIComponent(r)}catch{return r}}function hC(e){const t={text:"",steps:[],attachments:[],blocks:[],metadata:T8(e.metadata)};for(const r of e.parts)if(r.type==="text")t.text+=r.text;else if(r.type==="data-step"){const n=r.id!=null?A8(r.id,r.data):void 0;n!=null&&t.steps.push(n)}else if(r.type==="data-block"){const n=Ok(r.data);n!=null&&t.blocks.push(n)}else{const n=E8(r.data);n!=null&&t.attachments.push(n)}return t}async function Jm(e,t,r){const n=await iz(e),i=x8();let a=!1,o=0;const s=()=>{o=Date.now(),a=!1,t(hC(i))};try{for await(const l of C8(n,r))_8(i,M8(l)),a=!0,Date.now()-o>=I4&&s()}catch(l){throw a&&s(),l instanceof Error&&l.name==="AbortError"||l instanceof zs?l:new zs(l instanceof Error?l.message:"stream_error")}a&&s()}function M8(e){try{return JSON.parse(e)}catch{throw new zs("stream_error")}}async function L8({transport:e,request:t,threadId:r,signal:n,onSnapshot:i}){const a=await tz(e,ez(t,r),n);await Jm(a,i,n)}async function I8(e,t,r,n){const i=await rz(e,t,r);await Jm(i,n,r)}const pC=Object.freeze(Object.defineProperty({__proto__:null,readUiMessageStream:Jm,resumeChatAnswer:I8,streamChatAnswer:L8,toSnapshot:hC},Symbol.toStringTag,{value:"Module"}));var ey=function(e,t){return ey=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},ey(e,t)};function ve(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ey(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var ty=12,P8="sans-serif",va=ty+"px "+P8,N8=20,R8=100,O8="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function z8(e){var t={};if(typeof JSON>"u")return t;for(var r=0;r<e.length;r++){var n=String.fromCharCode(r+32),i=(e.charCodeAt(r)-N8)/R8;t[n]=i}return t}var F8=z8(O8),Zr={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var e,t;return function(r,n){if(!e){var i=Zr.createCanvas();e=i&&i.getContext("2d")}if(e)return t!==n&&(t=e.font=n||va),e.measureText(r);r=r||"",n=n||va;var a=/((?:\d+)?\.?\d*)px/.exec(n),o=a&&+a[1]||ty,s=0;if(n.indexOf("mono")>=0)s=o*r.length;else for(var l=0;l<r.length;l++){var u=F8[r[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(e,t,r){var n=new Image;return n.onload=t,n.onerror=r,n.src=e,n},getTime:function(){return Date.now?Date.now():+new Date}},vC=ga(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),gC=ga(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),Ru=Object.prototype.toString,xd=Array.prototype,B8=xd.forEach,j8=xd.filter,ry=xd.slice,H8=xd.map,mC=function(){}.constructor,bd=mC?mC.prototype:null,ny="__proto__",iy=2311,V8=Math.pow(2,53)-1;function yC(){return iy>=V8&&(iy=0),iy++}function ay(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<"u"&&console.error.apply(console,e)}function Ke(e){if(e==null||typeof e!="object")return e;var t=e,r=Ru.call(e);if(r==="[object Array]"){if(!Bu(e)){t=[];for(var n=0,i=e.length;n<i;n++)t[n]=Ke(e[n])}}else if(gC[r]){if(!Bu(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var n=0,i=e.length;n<i;n++)t[n]=e[n]}}}else if(!vC[r]&&!Bu(e)&&!Ou(e)){t={};for(var o in e)e.hasOwnProperty(o)&&o!==ny&&(t[o]=Ke(e[o]))}return t}function st(e,t,r){if(!Ie(t)||!Ie(e))return r?Ke(t):e;for(var n in t)if(t.hasOwnProperty(n)&&n!==ny){var i=e[n],a=t[n];Ie(a)&&Ie(i)&&!pe(a)&&!pe(i)&&!Ou(a)&&!Ou(i)&&!xC(a)&&!xC(i)&&!Bu(a)&&!Bu(i)?st(i,a,r):(r||!(n in e))&&(e[n]=Ke(t[n]))}return e}function ce(e,t){if(Object.assign)Object.assign(e,t);else for(var r in t)t.hasOwnProperty(r)&&r!==ny&&(e[r]=t[r]);return e}function U8(e,t,r){e=e||{};for(var n=0;n<r.length;n++){var i=r[n];e[i]=t[i]}return e}function ct(e,t,r){for(var n=kt(t),i=0,a=n.length;i<a;i++){var o=n[i];e[o]==null&&(e[o]=t[o])}return e}function Je(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r}return-1}function $8(e,t){var r=e.prototype;function n(){}n.prototype=t.prototype,e.prototype=new n;for(var i in r)r.hasOwnProperty(i)&&(e.prototype[i]=r[i]);e.prototype.constructor=e,e.superClass=t}function Un(e,t,r){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var a=n[i];a!=="constructor"&&e[a]==null&&(e[a]=t[a])}else ct(e,t)}function Pr(e){return!e||typeof e=="string"?!1:typeof e.length=="number"}function U(e,t,r){if(e&&t)if(e.forEach&&e.forEach===B8)e.forEach(t,r);else if(e.length===+e.length)for(var n=0,i=e.length;n<i;n++)t.call(r,e[n],n,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(r,e[a],a,e)}function De(e,t,r){if(!e)return[];if(!t)return sy(e);if(e.map&&e.map===H8)return e.map(t,r);for(var n=[],i=0,a=e.length;i<a;i++)n.push(t.call(r,e[i],i,e));return n}function ga(e,t,r,n){if(e&&t){for(var i=0,a=e.length;i<a;i++)r=t.call(n,r,e[i],i,e);return r}}function Zt(e,t,r){if(!e)return[];if(!t)return sy(e);if(e.filter&&e.filter===j8)return e.filter(t,r);for(var n=[],i=0,a=e.length;i<a;i++)t.call(r,e[i],i,e)&&n.push(e[i]);return n}function G8(e,t,r){if(e&&t){for(var n=0,i=e.length;n<i;n++)if(t.call(r,e[n],n,e))return e[n]}}function kt(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t}function W8(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return function(){return e.apply(t,r.concat(ry.call(arguments)))}}var pt=bd&&$e(bd.bind)?bd.call.bind(bd.bind):W8;function yt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return function(){return e.apply(this,t.concat(ry.call(arguments)))}}function pe(e){return Array.isArray?Array.isArray(e):Ru.call(e)==="[object Array]"}function $e(e){return typeof e=="function"}function Me(e){return typeof e=="string"}function oy(e){return Ru.call(e)==="[object String]"}function ft(e){return typeof e=="number"}function Ie(e){var t=typeof e;return t==="function"||!!e&&t==="object"}function xC(e){return!!vC[Ru.call(e)]}function Nr(e){return!!gC[Ru.call(e)]}function Ou(e){return typeof e=="object"&&typeof e.nodeType=="number"&&typeof e.ownerDocument=="object"}function wd(e){return e.colorStops!=null}function Y8(e){return e.image!=null}function zu(e){return e!==e}function Fu(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e.length;r<n;r++)if(e[r]!=null)return e[r]}function Ae(e,t){return e??t}function yo(e,t,r){return e??t??r}function sy(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return ry.apply(e,t)}function ly(e){if(typeof e=="number")return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function Fi(e,t){if(!e)throw new Error(t)}function ui(e){return e==null?null:typeof e.trim=="function"?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var bC="__ec_primitive__";function uy(e){e[bC]=!0}function Bu(e){return e[bC]}var X8=(function(){function e(){this.data={}}return e.prototype.delete=function(t){var r=this.has(t);return r&&delete this.data[t],r},e.prototype.has=function(t){return this.data.hasOwnProperty(t)},e.prototype.get=function(t){return this.data[t]},e.prototype.set=function(t,r){return this.data[t]=r,this},e.prototype.keys=function(){return kt(this.data)},e.prototype.forEach=function(t){var r=this.data;for(var n in r)r.hasOwnProperty(n)&&t(r[n],n)},e})(),wC=typeof Map=="function";function q8(){return wC?new Map:new X8}var K8=(function(){function e(t){var r=pe(t);this.data=q8();var n=this;t instanceof e?t.each(i):t&&U(t,i);function i(a,o){r?n.set(a,o):n.set(o,a)}}return e.prototype.hasKey=function(t){return this.data.has(t)},e.prototype.get=function(t){return this.data.get(t)},e.prototype.set=function(t,r){return this.data.set(t,r),r},e.prototype.each=function(t,r){this.data.forEach(function(n,i){t.call(r,n,i)})},e.prototype.keys=function(){var t=this.data.keys();return wC?Array.from(t):t},e.prototype.removeKey=function(t){this.data.delete(t)},e})();function Fe(e){return new K8(e)}function Z8(e,t){for(var r=new e.constructor(e.length+t.length),n=0;n<e.length;n++)r[n]=e[n];for(var i=e.length,n=0;n<t.length;n++)r[n+i]=t[n];return r}function _d(e,t){var r;if(Object.create)r=Object.create(e);else{var n=function(){};n.prototype=e,r=new n}return t&&ce(r,t),r}function _C(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function _r(e,t){return e.hasOwnProperty(t)}function lr(){}var Q8=180/Math.PI,J8=(function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e})(),eH=(function(){function e(){this.browser=new J8,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return e})(),We=new eH;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(We.wxa=!0,We.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?We.worker=!0:!We.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(We.node=!0,We.svgSupported=!0):tH(navigator.userAgent,We);function tH(e,t){var r=t.browser,n=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var s=t.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in l||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}}var rH=".",xo="___EC__COMPONENT__CONTAINER___",kC="___EC__EXTENDED_CLASS___";function ci(e){var t={main:"",sub:""};if(e){var r=e.split(rH);t.main=r[0]||"",t.sub=r[1]||""}return t}function nH(e){Fi(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}function iH(e){return!!(e&&e[kC])}function cy(e,t){e.$constructor=e,e.extend=function(r){var n=this,i;return aH(n)?i=(function(a){ve(o,a);function o(){return a.apply(this,arguments)||this}return o})(n):(i=function(){(r.$constructor||n).apply(this,arguments)},$8(i,this)),ce(i.prototype,r),i[kC]=!0,i.extend=this.extend,i.superCall=lH,i.superApply=uH,i.superClass=n,i}}function aH(e){return $e(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function SC(e,t){e.extend=t.extend}var oH=Math.round(Math.random()*10);function sH(e){var t=["__\0is_clz",oH++].join("_");e.prototype[t]=!0,e.isInstance=function(r){return!!(r&&r[t])}}function lH(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return this.superClass.prototype[t].apply(e,r)}function uH(e,t,r){return this.superClass.prototype[t].apply(e,r)}function kd(e){var t={};e.registerClass=function(n){var i=n.type||n.prototype.type;if(i){nH(i),n.prototype.type=i;var a=ci(i);if(!a.sub)t[a.main]=n;else if(a.sub!==xo){var o=r(a);o[a.sub]=n}}return n},e.getClass=function(n,i,a){var o=t[n];if(o&&o[xo]&&(o=i?o[i]:null),a&&!o)throw new Error(i?"Component "+n+"."+(i||"")+" is used but not imported.":n+".type should be specified.");return o},e.getClassesByMainType=function(n){var i=ci(n),a=[],o=t[i.main];return o&&o[xo]?U(o,function(s,l){l!==xo&&a.push(s)}):a.push(o),a},e.hasClass=function(n){var i=ci(n);return!!t[i.main]},e.getAllClassMainTypes=function(){var n=[];return U(t,function(i,a){n.push(a)}),n},e.hasSubTypes=function(n){var i=ci(n),a=t[i.main];return a&&a[xo]};function r(n){var i=t[n.main];return(!i||!i[xo])&&(i=t[n.main]={},i[xo]=!0),i}}function ju(e,t){for(var r=0;r<e.length;r++)e[r][1]||(e[r][1]=e[r][0]);return t=t||!1,function(n,i,a){for(var o={},s=0;s<e.length;s++){var l=e[s][1];if(!(i&&Je(i,l)>=0||a&&Je(a,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[e[s][0]]=u)}}return o}}var cH=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],fH=ju(cH),dH=(function(){function e(){}return e.prototype.getAreaStyle=function(t,r){return fH(this,t,r)},e})(),CC=(function(){function e(t){this.value=t}return e})(),hH=(function(){function e(){this._len=0}return e.prototype.insert=function(t){var r=new CC(t);return this.insertEntry(r),r},e.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},e.prototype.remove=function(t){var r=t.prev,n=t.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,t.next=t.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e})(),Gs=(function(){function e(t){this._list=new hH,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,r){var n=this._list,i=this._map,a=null;if(i[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new CC(r),s.key=t,n.insertEntry(s),i[t]=s}return a},e.prototype.get=function(t){var r=this._map[t],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e})(),fy=new Gs(50);function pH(e){if(typeof e=="string"){var t=fy.get(e);return t&&t.image}else return e}function TC(e,t,r,n,i){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!r)return t;var a=fy.get(e),o={hostEl:r,cb:n,cbPayload:i};return a?(t=a.image,!Sd(t)&&a.pending.push(o)):(t=Zr.loadImage(e,AC,AC),t.__zrImageSrc=e,fy.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function AC(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var r=e.pending[t],n=r.cb;n&&n(this,r.cbPayload),r.hostEl.dirty()}e.pending.length=0}function Sd(e){return e&&e.width&&e.height}function fi(){return[1,0,0,1,0,0]}function Hu(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function dy(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Vu(e,t,r){var n=t[0]*r[0]+t[2]*r[1],i=t[1]*r[0]+t[3]*r[1],a=t[0]*r[2]+t[2]*r[3],o=t[1]*r[2]+t[3]*r[3],s=t[0]*r[4]+t[2]*r[5]+t[4],l=t[1]*r[4]+t[3]*r[5]+t[5];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e}function hy(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e}function py(e,t,r,n){n===void 0&&(n=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],f=Math.sin(r),d=Math.cos(r);return e[0]=i*d+s*f,e[1]=-i*f+s*d,e[2]=a*d+l*f,e[3]=-a*f+d*l,e[4]=d*(o-n[0])+f*(u-n[1])+n[0],e[5]=d*(u-n[1])-f*(o-n[0])+n[1],e}function vH(e,t,r){var n=r[0],i=r[1];return e[0]=t[0]*n,e[1]=t[1]*i,e[2]=t[2]*n,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*i,e}function Uu(e,t){var r=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=r*o-a*n;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-n*l,e[3]=r*l,e[4]=(n*s-o*i)*l,e[5]=(a*i-r*s)*l,e):null}function Ws(e,t){return e==null&&(e=0),t==null&&(t=0),[e,t]}function gH(e){return[e[0],e[1]]}function vy(e,t,r){return e[0]=t,e[1]=r,e}function EC(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function DC(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function mH(e){return Math.sqrt(yH(e))}function yH(e){return e[0]*e[0]+e[1]*e[1]}function gy(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function my(e,t){var r=mH(t);return r===0?(e[0]=0,e[1]=0):(e[0]=t[0]/r,e[1]=t[1]/r),e}function yy(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var xy=yy;function xH(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Ys=xH;function by(e,t,r,n){return e[0]=t[0]+n*(r[0]-t[0]),e[1]=t[1]+n*(r[1]-t[1]),e}function vn(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i+r[4],e[1]=r[1]*n+r[3]*i+r[5],e}function Xs(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function qs(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}var Ye=(function(){function e(t,r){this.x=t||0,this.y=r||0}return e.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(t,r){return this.x=t,this.y=r,this},e.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},e.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},e.prototype.scale=function(t){this.x*=t,this.y*=t},e.prototype.scaleAndAdd=function(t,r){this.x+=t.x*r,this.y+=t.y*r},e.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},e.prototype.dot=function(t){return this.x*t.x+this.y*t.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},e.prototype.distance=function(t){var r=this.x-t.x,n=this.y-t.y;return Math.sqrt(r*r+n*n)},e.prototype.distanceSquare=function(t){var r=this.x-t.x,n=this.y-t.y;return r*r+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(t){if(t){var r=this.x,n=this.y;return this.x=t[0]*r+t[2]*n+t[4],this.y=t[1]*r+t[3]*n+t[5],this}},e.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},e.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},e.set=function(t,r,n){t.x=r,t.y=n},e.copy=function(t,r){t.x=r.x,t.y=r.y},e.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.lenSquare=function(t){return t.x*t.x+t.y*t.y},e.dot=function(t,r){return t.x*r.x+t.y*r.y},e.add=function(t,r,n){t.x=r.x+n.x,t.y=r.y+n.y},e.sub=function(t,r,n){t.x=r.x-n.x,t.y=r.y-n.y},e.scale=function(t,r,n){t.x=r.x*n,t.y=r.y*n},e.scaleAndAdd=function(t,r,n,i){t.x=r.x+n.x*i,t.y=r.y+n.y*i},e.lerp=function(t,r,n,i){var a=1-i;t.x=a*r.x+i*n.x,t.y=a*r.y+i*n.y},e})(),bo=Math.min,Ks=Math.max,wy=Math.abs,MC=["x","y"],bH=["width","height"],wo=new Ye,_o=new Ye,ko=new Ye,So=new Ye,Qr=PC(),$u=Qr.minTv,_y=Qr.maxTv,Gu=[0,0],je=(function(){function e(t,r,n,i){ky(this,t,r,n,i)}return e.set=function(t,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),t.x=r,t.y=n,t.width=i,t.height=a,t},e.prototype.union=function(t){var r=bo(t.x,this.x),n=bo(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Ks(t.x+t.width,this.x+this.width)-r:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Ks(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=r,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(t){return wH(fi(),this,t)},e.prototype.intersect=function(t,r,n){return e.intersect(this,t,r,n)},e.intersect=function(t,r,n,i){n&&Ye.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!r)return!1;t instanceof e||(t=ky(_H,t.x,t.y,t.width,t.height)),r instanceof e||(r=ky(kH,r.x,r.y,r.width,r.height));var s=!!n;Qr.reset(i,s);var l=Qr.touchThreshold,u=t.x+l,f=t.x+t.width-l,d=t.y+l,p=t.y+t.height-l,v=r.x+l,g=r.x+r.width-l,y=r.y+l,x=r.y+r.height-l;if(u>f||d>p||v>g||y>x)return!1;var b=!(f<v||g<u||p<y||x<d);return(s||a)&&(Gu[0]=1/0,Gu[1]=0,IC(u,f,v,g,0,s,a,o),IC(d,p,y,x,1,s,a,o),s&&Ye.copy(n,b?Qr.useDir?Qr.dirMinTv:$u:_y)),b},e.contain=function(t,r,n){return r>=t.x&&r<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},e.prototype.contain=function(t,r){return e.contain(this,t,r)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){LC(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(t,r){return t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height,t},e.applyTransform=function(t,r,n){if(!n){t!==r&&LC(t,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];t.x=r.x*i+o,t.y=r.y*a+s,t.width=r.width*i,t.height=r.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}wo.x=ko.x=r.x,wo.y=So.y=r.y,_o.x=So.x=r.x+r.width,_o.y=ko.y=r.y+r.height,wo.transform(n),So.transform(n),_o.transform(n),ko.transform(n),t.x=bo(wo.x,_o.x,ko.x,So.x),t.y=bo(wo.y,_o.y,ko.y,So.y);var l=Ks(wo.x,_o.x,ko.x,So.x),u=Ks(wo.y,_o.y,ko.y,So.y);t.width=l-t.x,t.height=u-t.y},e.calculateTransform=function(t,r,n){var i=n.width/r.width,a=n.height/r.height;return t=Hu(t||[]),hy(t,t,vy(Sy,-r.x,-r.y)),vH(t,t,vy(Sy,i,a)),hy(t,t,vy(Sy,n.x,n.y)),t},e})();je.create;var ky=je.set,LC=je.copy,wH=je.calculateTransform;je.applyTransform,je.contain;var _H=new je(0,0,0,0),kH=new je(0,0,0,0),Sy=[];function IC(e,t,r,n,i,a,o,s){var l=wy(t-r),u=wy(n-e),f=bo(l,u),d=MC[i],p=MC[1-i],v=bH[i];t<r||n<e?l<u?(a&&(_y[d]=-l),s&&(o[d]=t,o[v]=0)):(a&&(_y[d]=u),s&&(o[d]=e,o[v]=0)):(o&&(o[d]=Ks(e,r),o[v]=bo(t,n)-o[d]),a&&(f<Gu[0]||Qr.useDir)&&(Gu[0]=bo(f,Gu[0]),(l<u||!Qr.bidirectional)&&($u[d]=l,$u[p]=0,Qr.useDir&&Qr.calcDirMTV()),(l>=u||!Qr.bidirectional)&&($u[d]=-u,$u[p]=0,Qr.useDir&&Qr.calcDirMTV())))}function PC(){var e=0,t=new Ye,r=new Ye,n={minTv:new Ye,maxTv:new Ye,useDir:!1,dirMinTv:new Ye,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=Ks(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),e=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(e),u=Math.cos(e),f=l*a.y+u*a.x;if(i(f)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(r.x=s*u/f,r.y=s*l/f,i(r.x)&&i(r.y)){o.set(0,0);return}(n.bidirectional||t.dot(r)>0)&&r.len()<o.len()&&o.copy(r)}};function i(a){return wy(a)<1e-10}return n}function di(e){Cd||(Cd=new Gs(100)),e=e||va;var t=Cd.get(e);return t||(t={font:e,strWidthCache:new Gs(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:Zr.measureText("国",e).width,asciiCharWidth:Zr.measureText("a",e).width},Cd.put(e,t)),t}var Cd;function SH(e){if(!(Cy>=NC)){e=e||va;for(var t=[],r=+new Date,n=0;n<=127;n++)t[n]=Zr.measureText(String.fromCharCode(n),e).width;var i=+new Date-r;return i>16?Cy=NC:i>2&&Cy++,t}}var Cy=0,NC=5;function RC(e,t){return e.asciiWidthMapTried||(e.asciiWidthMap=SH(e.font),e.asciiWidthMapTried=!0),0<=t&&t<=127?e.asciiWidthMap!=null?e.asciiWidthMap[t]:e.asciiCharWidth:e.stWideCharWidth}function hi(e,t){var r=e.strWidthCache,n=r.get(t);return n==null&&(n=Zr.measureText(t,e.font).width,r.put(t,n)),n}function OC(e,t,r,n){var i=hi(di(t),e),a=Td(t),o=Zs(0,i,r),s=Co(0,a,n),l=new je(o,s,i,a);return l}function zC(e,t,r,n){var i=((e||"")+"").split(`
|
|
27
|
+
`),a=i.length;if(a===1)return OC(i[0],t,r,n);for(var o=new je(0,0,0,0),s=0;s<i.length;s++){var l=OC(i[s],t,r,n);s===0?o.copy(l):o.union(l)}return o}function Zs(e,t,r,n){return r==="right"?n?e+=t:e-=t:r==="center"&&(n?e+=t/2:e-=t/2),e}function Co(e,t,r,n){return r==="middle"?n?e+=t/2:e-=t/2:r==="bottom"&&(n?e+=t:e-=t),e}function Td(e){return di(e).stWideCharWidth}function To(e,t){return typeof e=="string"?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function Ad(e,t,r){var n=t.position||"inside",i=t.distance!=null?t.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,f="left",d="top";if(n instanceof Array)l+=To(n[0],r.width),u+=To(n[1],r.height),f=null,d=null;else switch(n){case"left":l-=i,u+=s,f="right",d="middle";break;case"right":l+=i+o,u+=s,d="middle";break;case"top":l+=o/2,u-=i,f="center",d="bottom";break;case"bottom":l+=o/2,u+=a+i,f="center";break;case"inside":l+=o/2,u+=s,f="center",d="middle";break;case"insideLeft":l+=i,u+=s,d="middle";break;case"insideRight":l+=o-i,u+=s,f="right",d="middle";break;case"insideTop":l+=o/2,u+=i,f="center";break;case"insideBottom":l+=o/2,u+=a-i,f="center",d="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,f="right";break;case"insideBottomLeft":l+=i,u+=a-i,d="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,f="right",d="bottom";break}return e=e||{},e.x=l,e.y=u,e.align=f,e.verticalAlign=d,e}var Ty=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function CH(e,t,r,n,i,a){if(!r){e.text="",e.isTruncated=!1;return}var o=(t+"").split(`
|
|
28
|
+
`);a=FC(r,n,i,a);for(var s=!1,l={},u=0,f=o.length;u<f;u++)BC(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;e.text=o.join(`
|
|
29
|
+
`),e.isTruncated=s}function FC(e,t,r,n){n=n||{};var i=ce({},n);r=Ae(r,"..."),i.maxIterations=Ae(n.maxIterations,2);var a=i.minChar=Ae(n.minChar,0),o=i.fontMeasureInfo=di(t),s=o.asciiCharWidth;i.placeholder=Ae(n.placeholder,"");for(var l=e=Math.max(0,e-1),u=0;u<a&&l>=s;u++)l-=s;var f=hi(o,r);return f>l&&(r="",f=0),l=e-f,i.ellipsis=r,i.ellipsisWidth=f,i.contentWidth=l,i.containerWidth=e,i}function BC(e,t,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){e.textLine="",e.isTruncated=!1;return}var o=hi(a,t);if(o<=n){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=r.maxIterations){t+=r.ellipsis;break}var l=s===0?TH(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,l),o=hi(a,t)}t===""&&(t=r.placeholder),e.textLine=t,e.isTruncated=!0}function TH(e,t,r){for(var n=0,i=0,a=e.length;i<a&&n<t;i++)n+=RC(r,e.charCodeAt(i));return i}function AH(e,t,r,n){var i=Ey(e),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=t.font,f=a==="truncate",d=Td(u),p=Ae(t.lineHeight,d),v=t.lineOverflow==="truncate",g=!1,y=t.width;y==null&&r!=null&&(y=r-s);var x=t.height;x==null&&n!=null&&(x=n-l);var b;y!=null&&(a==="break"||a==="breakAll")?b=i?HC(i,t.font,y,a==="breakAll",0).lines:[]:b=i?i.split(`
|
|
30
|
+
`):[];var _=b.length*p;if(x==null&&(x=_),_>x&&v){var S=Math.floor(x/p);g=g||b.length>S,b=b.slice(0,S),_=b.length*p}if(i&&f&&y!=null)for(var T=FC(y,u,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),E={},D=0;D<b.length;D++)BC(E,b[D],T),b[D]=E.textLine,g=g||E.isTruncated;for(var L=x,R=0,O=di(u),D=0;D<b.length;D++)R=Math.max(hi(O,b[D]),R);y==null&&(y=R);var M=y;return L+=l,M+=s,{lines:b,height:x,outerWidth:M,outerHeight:L,lineHeight:p,calculatedLineHeight:d,contentWidth:R,contentHeight:_,width:y,isTruncated:g}}var EH=(function(){function e(){}return e})(),jC=(function(){function e(t){this.tokens=[],t&&(this.tokens=t)}return e})(),DH=(function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e})();function MH(e,t,r,n,i){var a=new DH,o=Ey(e);if(!o)return a;var s=t.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,f=t.width;f==null&&r!=null&&(f=r-l);var d=t.height;d==null&&n!=null&&(d=n-u);for(var p=t.overflow,v=(p==="break"||p==="breakAll")&&f!=null?{width:f,accumWidth:0,breakAll:p==="breakAll"}:null,g=Ty.lastIndex=0,y;(y=Ty.exec(o))!=null;){var x=y.index;x>g&&Ay(a,o.substring(g,x),t,v),Ay(a,y[2],t,v,y[1]),g=Ty.lastIndex}g<o.length&&Ay(a,o.substring(g,o.length),t,v);var b=[],_=0,S=0,T=p==="truncate",E=t.lineOverflow==="truncate",D={};function L(ie,_e,be){ie.width=_e,ie.lineHeight=be,_+=be,S=Math.max(S,_e)}e:for(var R=0;R<a.lines.length;R++){for(var O=a.lines[R],M=0,P=0,j=0;j<O.tokens.length;j++){var B=O.tokens[j],$=B.styleName&&t.rich[B.styleName]||{},K=B.textPadding=$.padding,Z=K?K[1]+K[3]:0,re=B.font=$.font||t.font;B.contentHeight=Td(re);var Y=Ae($.height,B.contentHeight);if(B.innerHeight=Y,K&&(Y+=K[0]+K[2]),B.height=Y,B.lineHeight=yo($.lineHeight,t.lineHeight,Y),B.align=$&&$.align||i,B.verticalAlign=$&&$.verticalAlign||"middle",E&&d!=null&&_+B.lineHeight>d){var G=a.lines.length;j>0?(O.tokens=O.tokens.slice(0,j),L(O,P,M),a.lines=a.lines.slice(0,R+1)):a.lines=a.lines.slice(0,R),a.isTruncated=a.isTruncated||a.lines.length<G;break e}var I=$.width,z=I==null||I==="auto";if(typeof I=="string"&&I.charAt(I.length-1)==="%")B.percentWidth=I,b.push(B),B.contentWidth=hi(di(re),B.text);else{if(z){var W=$.backgroundColor,F=W&&W.image;F&&(F=pH(F),Sd(F)&&(B.width=Math.max(B.width,F.width*Y/F.height)))}var ee=T&&f!=null?f-P:null;ee!=null&&ee<B.width?!z||ee<Z?(B.text="",B.width=B.contentWidth=0):(CH(D,B.text,ee-Z,re,t.ellipsis,{minChar:t.truncateMinChar}),B.text=D.text,a.isTruncated=a.isTruncated||D.isTruncated,B.width=B.contentWidth=hi(di(re),B.text)):B.contentWidth=hi(di(re),B.text)}B.width+=Z,P+=B.width,$&&(M=Math.max(M,B.lineHeight))}L(O,P,M)}a.outerWidth=a.width=Ae(f,S),a.outerHeight=a.height=Ae(d,_),a.contentHeight=_,a.contentWidth=S,a.outerWidth+=l,a.outerHeight+=u;for(var R=0;R<b.length;R++){var B=b[R],ae=B.percentWidth;B.width=parseInt(ae,10)/100*a.width}return a}function Ay(e,t,r,n,i){var a=t==="",o=i&&r.rich[i]||{},s=e.lines,l=o.font||r.font,u=!1,f,d;if(n){var p=o.padding,v=p?p[1]+p[3]:0;if(o.width!=null&&o.width!=="auto"){var g=To(o.width,n.width)+v;s.length>0&&g+n.accumWidth>n.width&&(f=t.split(`
|
|
31
|
+
`),u=!0),n.accumWidth=g}else{var y=HC(t,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=y.accumWidth+v,d=y.linesWidths,f=y.lines}}f||(f=t.split(`
|
|
32
|
+
`));for(var x=di(l),b=0;b<f.length;b++){var _=f[b],S=new EH;if(S.styleName=i,S.text=_,S.isLineHolder=!_&&!a,typeof o.width=="number"?S.width=o.width:S.width=d?d[b]:hi(x,_),!b&&!u){var T=(s[s.length-1]||(s[0]=new jC)).tokens,E=T.length;E===1&&T[0].isLineHolder?T[0]=S:(_||!E||a)&&T.push(S)}else s.push(new jC([S]))}}function LH(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var IH=ga(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function PH(e){return LH(e)?!!IH[e]:!0}function HC(e,t,r,n,i){for(var a=[],o=[],s="",l="",u=0,f=0,d=di(t),p=0;p<e.length;p++){var v=e.charAt(p);if(v===`
|
|
33
|
+
`){l&&(s+=l,f+=u),a.push(s),o.push(f),s="",l="",u=0,f=0;continue}var g=RC(d,v.charCodeAt(0)),y=n?!1:!PH(v);if(a.length?f+g>r:i+f+g>r){f?(s||l)&&(y?(s||(s=l,l="",u=0,f=u),a.push(s),o.push(f-u),l+=v,u+=g,s="",f=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(f),s=v,f=g)):y?(a.push(l),o.push(u),l=v,u=g):(a.push(v),o.push(g));continue}f+=g,y?(l+=v,u+=g):(l&&(s+=l,l="",u=0),s+=v)}return l&&(s+=l),s&&(a.push(s),o.push(f)),a.length===1&&(f+=i),{accumWidth:f,lines:a,linesWidths:o}}function VC(e,t,r,n,i,a){if(e.baseX=r,e.baseY=n,e.outerWidth=e.outerHeight=null,!!t){var o=t.width*2,s=t.height*2;je.set(UC,Zs(r,o,i),Co(n,s,a),o,s),je.intersect(t,UC,null,$C);var l=$C.outIntersectRect;e.outerWidth=l.width,e.outerHeight=l.height,e.baseX=Zs(l.x,l.width,i,!0),e.baseY=Co(l.y,l.height,a,!0)}}var UC=new je(0,0,0,0),$C={outIntersectRect:{},clamp:!0};function Ey(e){return e!=null?e+="":e=""}function NH(e){var t=Ey(e.text),r=e.font,n=hi(di(r),t),i=Td(r);return Dy(e,n,i,null)}function Dy(e,t,r,n){var i=new je(Zs(e.x||0,t,e.textAlign),Co(e.y||0,r,e.textBaseline),t,r),a=n??(GC(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function GC(e){var t=e.stroke;return t!=null&&t!=="none"&&e.lineWidth>0}var WC=Hu,YC=5e-5;function Ao(e){return e>YC||e<-YC}var Eo=[],Qs=[],My=fi(),Ly=Math.abs,Wu=(function(){function e(){}return e.prototype.getLocalTransform=function(t){return RH(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return Ao(this.rotation)||Ao(this.x)||Ao(this.y)||Ao(this.scaleX-1)||Ao(this.scaleY-1)||Ao(this.skewX)||Ao(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||t)){n&&(WC(n),this.invTransform=null);return}n=n||fi(),r?this.getLocalTransform(n):WC(n),t&&(r?Vu(n,t,n):dy(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||fi(),Uu(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(t){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Eo);var n=Eo[0]<0?-1:1,i=Eo[1]<0?-1:1,a=((Eo[0]-n)*r+n)/Eo[0]||0,o=((Eo[1]-i)*r+i)/Eo[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}},e.prototype.getComputedTransform=function(){for(var t=this,r=[];t;)r.push(t),t=t.parent;for(;t=r.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(t){var r=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),a=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,r=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||fi(),Vu(Qs,t.invTransform,r),r=Qs);var n=this.originX,i=this.originY;(n||i)&&(My[4]=n,My[5]=i,Vu(Qs,r,My),Qs[4]-=n,Qs[5]-=i,r=Qs),this.setLocalTransform(r)}},e.prototype.getGlobalScale=function(t){var r=this.transform;return t=t||[],r?(t[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),t[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(t[0]=-t[0]),r[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},e.prototype.transformCoordToLocal=function(t,r){var n=[t,r],i=this.invTransform;return i&&vn(n,n,i),n},e.prototype.transformCoordToGlobal=function(t,r){var n=[t,r],i=this.transform;return i&&vn(n,n,i),n},e.prototype.getLineScale=function(){var t=this.transform;return t&&Ly(t[0]-1)>1e-10&&Ly(t[3]-1)>1e-10?Math.sqrt(Ly(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){Dd(this,t)},e.getLocalTransform=function(t,r){r=r||[];var n=t.originX||0,i=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,f=t.x,d=t.y,p=t.skewX?Math.tan(t.skewX):0,v=t.skewY?Math.tan(-t.skewY):0;if(n||i||s||l){var g=n+s,y=i+l;r[4]=-g*a-p*y*o,r[5]=-y*o-v*g*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=v*a,r[2]=p*o,u&&py(r,r,u),r[4]+=n+f,r[5]+=i+d,r},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e})(),RH=Wu.getLocalTransform,Ed=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Dd(e,t){return U8(e,t,Ed)}var Yu={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)))},elasticOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},elasticInOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?-.5*(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)):r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Yu.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Yu.bounceIn(e*2)*.5:Yu.bounceOut(e*2-1)*.5+.5}},Md=Math.pow,ma=Math.sqrt,Ld=1e-8,XC=1e-4,qC=ma(3),Id=1/3,pi=Ws(),gn=Ws(),Js=Ws();function ya(e){return e>-Ld&&e<Ld}function KC(e){return e>Ld||e<-Ld}function Qt(e,t,r,n,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*n+3*a*r)}function ZC(e,t,r,n,i){var a=1-i;return 3*(((t-e)*a+2*(r-t)*i)*a+(n-r)*i*i)}function Pd(e,t,r,n,i,a){var o=n+3*(t-r)-e,s=3*(r-t*2+e),l=3*(t-e),u=e-i,f=s*s-3*o*l,d=s*l-9*o*u,p=l*l-3*s*u,v=0;if(ya(f)&&ya(d))if(ya(s))a[0]=0;else{var g=-l/s;g>=0&&g<=1&&(a[v++]=g)}else{var y=d*d-4*f*p;if(ya(y)){var x=d/f,g=-s/o+x,b=-x/2;g>=0&&g<=1&&(a[v++]=g),b>=0&&b<=1&&(a[v++]=b)}else if(y>0){var _=ma(y),S=f*s+1.5*o*(-d+_),T=f*s+1.5*o*(-d-_);S<0?S=-Md(-S,Id):S=Md(S,Id),T<0?T=-Md(-T,Id):T=Md(T,Id);var g=(-s-(S+T))/(3*o);g>=0&&g<=1&&(a[v++]=g)}else{var E=(2*f*s-3*o*d)/(2*ma(f*f*f)),D=Math.acos(E)/3,L=ma(f),R=Math.cos(D),g=(-s-2*L*R)/(3*o),b=(-s+L*(R+qC*Math.sin(D)))/(3*o),O=(-s+L*(R-qC*Math.sin(D)))/(3*o);g>=0&&g<=1&&(a[v++]=g),b>=0&&b<=1&&(a[v++]=b),O>=0&&O<=1&&(a[v++]=O)}}return v}function QC(e,t,r,n,i){var a=6*r-12*t+6*e,o=9*t+3*n-3*e-9*r,s=3*t-3*e,l=0;if(ya(o)){if(KC(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var f=a*a-4*o*s;if(ya(f))i[0]=-a/(2*o);else if(f>0){var d=ma(f),u=(-a+d)/(2*o),p=(-a-d)/(2*o);u>=0&&u<=1&&(i[l++]=u),p>=0&&p<=1&&(i[l++]=p)}}return l}function Nd(e,t,r,n,i,a){var o=(t-e)*i+e,s=(r-t)*i+t,l=(n-r)*i+r,u=(s-o)*i+o,f=(l-s)*i+s,d=(f-u)*i+u;a[0]=e,a[1]=o,a[2]=u,a[3]=d,a[4]=d,a[5]=f,a[6]=l,a[7]=n}function OH(e,t,r,n,i,a,o,s,l,u,f){var d,p=.005,v=1/0,g,y,x,b;pi[0]=l,pi[1]=u;for(var _=0;_<1;_+=.05)gn[0]=Qt(e,r,i,o,_),gn[1]=Qt(t,n,a,s,_),x=Ys(pi,gn),x<v&&(d=_,v=x);v=1/0;for(var S=0;S<32&&!(p<XC);S++)g=d-p,y=d+p,gn[0]=Qt(e,r,i,o,g),gn[1]=Qt(t,n,a,s,g),x=Ys(gn,pi),g>=0&&x<v?(d=g,v=x):(Js[0]=Qt(e,r,i,o,y),Js[1]=Qt(t,n,a,s,y),b=Ys(Js,pi),y<=1&&b<v?(d=y,v=b):p*=.5);return ma(v)}function zH(e,t,r,n,i,a,o,s,l){for(var u=e,f=t,d=0,p=1/l,v=1;v<=l;v++){var g=v*p,y=Qt(e,r,i,o,g),x=Qt(t,n,a,s,g),b=y-u,_=x-f;d+=Math.sqrt(b*b+_*_),u=y,f=x}return d}function Rr(e,t,r,n){var i=1-n;return i*(i*e+2*n*t)+n*n*r}function JC(e,t,r,n){return 2*((1-n)*(t-e)+n*(r-t))}function FH(e,t,r,n,i){var a=e-2*t+r,o=2*(t-e),s=e-n,l=0;if(ya(a)){if(KC(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var f=o*o-4*a*s;if(ya(f)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(f>0){var d=ma(f),u=(-o+d)/(2*a),p=(-o-d)/(2*a);u>=0&&u<=1&&(i[l++]=u),p>=0&&p<=1&&(i[l++]=p)}}return l}function eT(e,t,r){var n=e+r-2*t;return n===0?.5:(e-t)/n}function Rd(e,t,r,n,i){var a=(t-e)*n+e,o=(r-t)*n+t,s=(o-a)*n+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function BH(e,t,r,n,i,a,o,s,l){var u,f=.005,d=1/0;pi[0]=o,pi[1]=s;for(var p=0;p<1;p+=.05){gn[0]=Rr(e,r,i,p),gn[1]=Rr(t,n,a,p);var v=Ys(pi,gn);v<d&&(u=p,d=v)}d=1/0;for(var g=0;g<32&&!(f<XC);g++){var y=u-f,x=u+f;gn[0]=Rr(e,r,i,y),gn[1]=Rr(t,n,a,y);var v=Ys(gn,pi);if(y>=0&&v<d)u=y,d=v;else{Js[0]=Rr(e,r,i,x),Js[1]=Rr(t,n,a,x);var b=Ys(Js,pi);x<=1&&b<d?(u=x,d=b):f*=.5}}return ma(d)}function jH(e,t,r,n,i,a,o){for(var s=e,l=t,u=0,f=1/o,d=1;d<=o;d++){var p=d*f,v=Rr(e,r,i,p),g=Rr(t,n,a,p),y=v-s,x=g-l;u+=Math.sqrt(y*y+x*x),s=v,l=g}return u}var HH=/cubic-bezier\(([0-9,\.e ]+)\)/;function tT(e){var t=e&&HH.exec(e);if(t){var r=t[1].split(","),n=+ui(r[0]),i=+ui(r[1]),a=+ui(r[2]),o=+ui(r[3]);if(isNaN(n+i+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:Pd(0,n,a,1,l,s)&&Qt(0,i,o,1,s[0])}}}var VH=(function(){function e(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||lr,this.ondestroy=t.ondestroy||lr,this.onrestart=t.onrestart||lr,t.easing&&this.setEasing(t.easing)}return e.prototype.step=function(t,r){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=t-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(t){this.easing=t,this.easingFunc=$e(t)?t:Yu[t]||tT(t)},e})(),rT={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function xa(e){return e=Math.round(e),e<0?0:e>255?255:e}function Iy(e){return e<0?0:e>1?1:e}function Py(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?xa(parseFloat(t)/100*255):xa(parseInt(t,10))}function Do(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Iy(parseFloat(t)/100):Iy(parseFloat(t))}function Ny(e,t,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?e+(t-e)*r*6:r*2<1?t:r*3<2?e+(t-e)*(.6666666666666666-r)*6:e}function Od(e,t,r){return e+(t-e)*r}function mn(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function Ry(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var nT=new Gs(20),zd=null;function el(e,t){zd&&Ry(zd,t),zd=nT.put(e,zd||t.slice())}function vi(e,t){if(e){t=t||[];var r=nT.get(e);if(r)return Ry(t,r);e=e+"";var n=e.replace(/ /g,"").toLowerCase();if(n in rT)return Ry(t,rT[n]),el(e,t),t;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){mn(t,0,0,0,1);return}return mn(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),el(e,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){mn(t,0,0,0,1);return}return mn(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),el(e,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?mn(t,+u[0],+u[1],+u[2],1):mn(t,0,0,0,1);f=Do(u.pop());case"rgb":if(u.length>=3)return mn(t,Py(u[0]),Py(u[1]),Py(u[2]),u.length===3?f:Do(u[3])),el(e,t),t;mn(t,0,0,0,1);return;case"hsla":if(u.length!==4){mn(t,0,0,0,1);return}return u[3]=Do(u[3]),Oy(u,t),el(e,t),t;case"hsl":if(u.length!==3){mn(t,0,0,0,1);return}return Oy(u,t),el(e,t),t;default:return}}mn(t,0,0,0,1)}}function Oy(e,t){var r=(parseFloat(e[0])%360+360)%360/360,n=Do(e[1]),i=Do(e[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],mn(t,xa(Ny(o,a,r+.3333333333333333)*255),xa(Ny(o,a,r)*255),xa(Ny(o,a,r-.3333333333333333)*255),1),e.length===4&&(t[3]=e[3]),t}function UH(e){if(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var f=((a-t)/6+o/2)/o,d=((a-r)/6+o/2)/o,p=((a-n)/6+o/2)/o;t===a?l=p-d:r===a?l=.3333333333333333+f-p:n===a&&(l=.6666666666666666+d-f),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return e[3]!=null&&v.push(e[3]),v}}function iT(e,t){var r=vi(e);if(r){for(var n=0;n<3;n++)r[n]=r[n]*(1-t)|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return Xu(r,r.length===4?"rgba":"rgb")}}function $H(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=vi(t[i]),s=vi(t[a]),l=n-i,u=Xu([xa(Od(o[0],s[0],l)),xa(Od(o[1],s[1],l)),xa(Od(o[2],s[2],l)),Iy(Od(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}function zy(e,t,r,n){var i=vi(e);if(e)return i=UH(i),r!=null&&(i[1]=Do($e(r)?r(i[1]):r)),n!=null&&(i[2]=Do($e(n)?n(i[2]):n)),Xu(Oy(i),"rgba")}function Xu(e,t){if(!(!e||!e.length)){var r=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(r+=","+e[3]),t+"("+r+")"}}function Fd(e,t){var r=vi(e);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*t:0}var aT=new Gs(100);function oT(e){if(Me(e)){var t=aT.get(e);return t||(t=iT(e,-.1),aT.put(e,t)),t}else if(wd(e)){var r=ce({},e);return r.colorStops=De(e.colorStops,function(n){return{offset:n.offset,color:iT(n.color,-.1)}}),r}return e}function GH(e){return e.type==="linear"}function WH(e){return e.type==="radial"}(function(){return typeof Buffer<"u"&&typeof Buffer.from=="function"?function(e){return Buffer.from(e).toString("base64")}:typeof btoa=="function"&&typeof unescape=="function"&&typeof encodeURIComponent=="function"?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})();var Fy=Array.prototype.slice;function Bi(e,t,r){return(t-e)*r+e}function By(e,t,r,n){for(var i=t.length,a=0;a<i;a++)e[a]=Bi(t[a],r[a],n);return e}function YH(e,t,r,n){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=Bi(t[o][s],r[o][s],n)}return e}function Bd(e,t,r,n){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+r[a]*n;return e}function sT(e,t,r,n){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+r[o][s]*n}return e}function XH(e,t){for(var r=e.length,n=t.length,i=r>n?t:e,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(r,n);s++)i.push({offset:o.offset,color:o.color.slice()})}function qH(e,t,r){var n=e,i=t;if(!(!n.push||!i.push)){var a=n.length,o=i.length;if(a!==o){var s=a>o;if(s)n.length=o;else for(var l=a;l<o;l++)n.push(r===1?i[l]:Fy.call(i[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(r===1)isNaN(n[l])&&(n[l]=i[l]);else for(var f=0;f<u;f++)isNaN(n[l][f])&&(n[l][f]=i[l][f])}}function jd(e){if(Pr(e)){var t=e.length;if(Pr(e[0])){for(var r=[],n=0;n<t;n++)r.push(Fy.call(e[n]));return r}return Fy.call(e)}return e}function Hd(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],"rgba("+e.join(",")+")"}function KH(e){return Pr(e&&e[0])?2:1}var Vd=0,Ud=1,lT=2,qu=3,jy=4,Hy=5,uT=6;function cT(e){return e===jy||e===Hy}function $d(e){return e===Ud||e===lT}var Ku=[0,0,0,0],ZH=(function(){function e(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=uT,l=r;if(Pr(r)){var u=KH(r);s=u,(u===1&&!ft(r[0])||u===2&&!ft(r[0][0]))&&(o=!0)}else if(ft(r)&&!zu(r))s=Vd;else if(Me(r))if(!isNaN(+r))s=Vd;else{var f=vi(r);f&&(l=f,s=qu)}else if(wd(r)){var d=ce({},l);d.colorStops=De(r.colorStops,function(v){return{offset:v.offset,color:vi(v.color)}}),GH(r)?s=jy:WH(r)&&(s=Hy),l=d}a===0?this.valType=s:(s!==this.valType||s===uT)&&(o=!0),this.discrete=this.discrete||o;var p={time:t,value:l,rawValue:r,percent:0};return n&&(p.easing=n,p.easingFunc=$e(n)?n:Yu[n]||tT(n)),i.push(p),p},e.prototype.prepare=function(t,r){var n=this.keyframes;this._needsSort&&n.sort(function(y,x){return y.time-x.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=$d(i),u=cT(i),f=0;f<a;f++){var d=n[f],p=d.value,v=o.value;d.percent=d.time/t,s||(l&&f!==a-1?qH(p,v,i):u&&XH(p.colorStops,v.colorStops))}if(!s&&i!==Hy&&r&&this.needsAnimate()&&r.needsAnimate()&&i===r.valType&&!r._finished){this._additiveTrack=r;for(var g=n[0].value,f=0;f<a;f++)i===Vd?n[f].additiveValue=n[f].value-g:i===qu?n[f].additiveValue=Bd([],n[f].value,g,-1):$d(i)&&(n[f].additiveValue=i===Ud?Bd([],n[f].value,g,-1):sT([],n[f].value,g,-1))}},e.prototype.step=function(t,r){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,i=n?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===qu,f,d=this._lastFr,p=Math.min,v,g;if(s===1)v=g=o[0];else{if(r<0)f=0;else if(r<this._lastFrP){var y=p(d+1,s-1);for(f=y;f>=0&&!(o[f].percent<=r);f--);f=p(f,s-2)}else{for(f=d;f<s&&!(o[f].percent>r);f++);f=p(f-1,s-2)}g=o[f+1],v=o[f]}if(v&&g){this._lastFr=f,this._lastFrP=r;var x=g.percent-v.percent,b=x===0?1:p((r-v.percent)/x,1);g.easingFunc&&(b=g.easingFunc(b));var _=n?this._additiveValue:u?Ku:t[l];if(($d(a)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)t[l]=b<1?v.rawValue:g.rawValue;else if($d(a))a===Ud?By(_,v[i],g[i],b):YH(_,v[i],g[i],b);else if(cT(a)){var S=v[i],T=g[i],E=a===jy;t[l]={type:E?"linear":"radial",x:Bi(S.x,T.x,b),y:Bi(S.y,T.y,b),colorStops:De(S.colorStops,function(L,R){var O=T.colorStops[R];return{offset:Bi(L.offset,O.offset,b),color:Hd(By([],L.color,O.color,b))}}),global:T.global},E?(t[l].x2=Bi(S.x2,T.x2,b),t[l].y2=Bi(S.y2,T.y2,b)):t[l].r=Bi(S.r,T.r,b)}else if(u)By(_,v[i],g[i],b),n||(t[l]=Hd(_));else{var D=Bi(v[i],g[i],b);n?this._additiveValue=D:t[l]=D}n&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var r=this.valType,n=this.propName,i=this._additiveValue;r===Vd?t[n]=t[n]+i:r===qu?(vi(t[n],Ku),Bd(Ku,Ku,i,1),t[n]=Hd(Ku)):r===Ud?Bd(t[n],t[n],i,1):r===lT&&sT(t[n],t[n],i,1)},e})(),Vy=(function(){function e(t,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=r,r&&i){ay("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(t){this._target=t},e.prototype.when=function(t,r,n){return this.whenWithKeys(t,r,kt(r),n)},e.prototype.whenWithKeys=function(t,r,n,i){for(var a=this._tracks,o=0;o<n.length;o++){var s=n[o],l=a[s];if(!l){l=a[s]=new ZH(s);var u=void 0,f=this._getAdditiveTrack(s);if(f){var d=f.keyframes,p=d[d.length-1];u=p&&p.value,f.valType===qu&&u&&(u=Hd(u))}else u=this._target[s];if(u==null)continue;t>0&&l.addKeyframe(0,jd(u),i),this._trackKeys.push(s)}l.addKeyframe(t,jd(r[s]),i)}return this._maxTime=Math.max(this._maxTime,t),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var r=t.length,n=0;n<r;n++)t[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,r=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,r)for(var n=0;n<r.length;n++)r[n].call(this)},e.prototype._setTracksFinished=function(){for(var t=this._tracks,r=this._trackKeys,n=0;n<r.length;n++)t[r[n]].setFinished()},e.prototype._getAdditiveTrack=function(t){var r,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var a=n[i].getTrack(t);a&&(r=a)}return r},e.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,f=u.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var d=u[f-1];d&&(r._target[s.propName]=d.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var p=new VH({life:i,loop:this._loop,delay:this._delay||0,onframe:function(v){r._started=2;var g=r._additiveAnimators;if(g){for(var y=!1,x=0;x<g.length;x++)if(g[x]._clip){y=!0;break}y||(r._additiveAnimators=null)}for(var x=0;x<n.length;x++)n[x].step(r._target,v);var b=r._onframeCbs;if(b)for(var x=0;x<b.length;x++)b[x](r._target,v)},ondestroy:function(){r._doneCallback()}});this._clip=p,this.animation&&this.animation.addClip(p),t&&p.setEasing(t)}else this._doneCallback();return this}},e.prototype.stop=function(t){if(this._clip){var r=this._clip;t&&r.onframe(1),this._abortedCallback()}},e.prototype.delay=function(t){return this._delay=t,this},e.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},e.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},e.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(t){return this._tracks[t]},e.prototype.getTracks=function(){var t=this;return De(this._trackKeys,function(r){return t._tracks[r]})},e.prototype.stopTracks=function(t,r){if(!t.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,a=0;a<t.length;a++){var o=n[t[a]];o&&!o.isFinished()&&(r?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<i.length;a++)if(!n[i[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},e.prototype.saveTo=function(t,r,n){if(t){r=r||this._trackKeys;for(var i=0;i<r.length;i++){var a=r[i],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(t[a]=jd(l.rawValue))}}}},e.prototype.__changeFinalValue=function(t,r){r=r||kt(t);for(var n=0;n<r.length;n++){var i=r[n],a=this._tracks[i];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,t[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},e})(),gi=(function(){function e(t){t&&(this._$eventProcessor=t)}return e.prototype.on=function(t,r,n,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof r=="function"&&(i=n,n=r,r=null),!n||!t)return this;var o=this._$eventProcessor;r!=null&&o&&o.normalizeQuery&&(r=o.normalizeQuery(r)),a[t]||(a[t]=[]);for(var s=0;s<a[t].length;s++)if(a[t][s].h===n)return this;var l={h:n,query:r,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},u=a[t].length-1,f=a[t][u];return f&&f.callAtLast?a[t].splice(u,0,l):a[t].push(l),this},e.prototype.isSilent=function(t){var r=this._$handlers;return!r||!r[t]||!r[t].length},e.prototype.off=function(t,r){var n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(r){if(n[t]){for(var i=[],a=0,o=n[t].length;a<o;a++)n[t][a].h!==r&&i.push(n[t][a]);n[t]=i}n[t]&&n[t].length===0&&delete n[t]}else delete n[t];return this},e.prototype.trigger=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=r.length,s=i.length,l=0;l<s;l++){var u=i[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(t,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,r[0]);break;case 2:u.h.call(u.ctx,r[0],r[1]);break;default:u.h.apply(u.ctx,r);break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},e.prototype.triggerWithContext=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=r.length,s=r[o-1],l=i.length,u=0;u<l;u++){var f=i[u];if(!(a&&a.filter&&f.query!=null&&!a.filter(t,f.query)))switch(o){case 0:f.h.call(s);break;case 1:f.h.call(s,r[0]);break;case 2:f.h.call(s,r[0],r[1]);break;default:f.h.apply(s,r.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},e})(),fT=1;We.hasGlobalWindow&&(fT=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Gd=fT,Uy=.4,$y="#333",Gy="#ccc",QH="#eee",Or=1,Zu=2,tl=4,Wy="__zr_normal__",Yy=Ed.concat(["ignore"]),JH=ga(Ed,function(e,t){return e[t]=!0,e},{ignore:!1}),rl={},e9=new je(0,0,0,0),Wd=[],Yd=0,Xd=1,qd=(function(){function e(t){this.id=yC(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return e.prototype._init=function(t){this.attr(t)},e.prototype.drift=function(t,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":t=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=r,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(t){var r=this._textContent;if(r&&(!r.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;a.copyTransform(r);var f=n.position!=null,d=n.autoOverflowArea,p=void 0;if((d||f)&&(p=e9,n.layoutRect?p.copy(n.layoutRect):p.copy(this.getBoundingRect()),i||p.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(rl,n,p):Ad(rl,n,p),a.x=rl.x,a.y=rl.y,o=rl.align,s=rl.verticalAlign;var v=n.origin;if(v&&n.rotation!=null){var g=void 0,y=void 0;v==="center"?(g=p.width*.5,y=p.height*.5):(g=To(v[0],p.width),y=To(v[1],p.height)),u=!0,a.originX=-a.x+g+(i?0:p.x),a.originY=-a.y+y+(i?0:p.y)}}n.rotation!=null&&(a.rotation=n.rotation);var x=n.offset;x&&(a.x+=x[0],a.y+=x[1],u||(a.originX=-x[0],a.originY=-x[1]));var b=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(d){var _=b.overflowRect=b.overflowRect||new je(0,0,0,0);a.getLocalTransform(Wd),Uu(Wd,Wd),je.copy(_,p),_.applyTransform(Wd)}else b.overflowRect=null;var S=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,T=void 0,E=void 0,D=void 0;S&&this.canBeInsideText()?(T=n.insideFill,E=n.insideStroke,(T==null||T==="auto")&&(T=this.getInsideTextFill()),(E==null||E==="auto")&&(E=this.getInsideTextStroke(T),D=!0)):(T=n.outsideFill,E=n.outsideStroke,(T==null||T==="auto")&&(T=this.getOutsideFill()),(E==null||E==="auto")&&(E=this.getOutsideStroke(T),D=!0)),T=T||"#000",(T!==b.fill||E!==b.stroke||D!==b.autoStroke||o!==b.align||s!==b.verticalAlign)&&(l=!0,b.fill=T,b.stroke=E,b.autoStroke=D,b.align=o,b.verticalAlign=s,r.setDefaultTextStyle(b)),r.__dirty|=Or,l&&r.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(t){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Gy:$y},e.prototype.getOutsideStroke=function(t){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&vi(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,Xu(n,"rgba")},e.prototype.traverse=function(t,r){},e.prototype.attrKV=function(t,r){t==="textConfig"?this.setTextConfig(r):t==="textContent"?this.setTextContent(r):t==="clipPath"?this.setClipPath(r):t==="extra"?(this.extra=this.extra||{},ce(this.extra,r)):this[t]=r},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(t,r){if(typeof t=="string")this.attrKV(t,r);else if(Ie(t))for(var n=t,i=kt(n),a=0;a<i.length;a++){var o=i[a];this.attrKV(o,t[o])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var r=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],a=i.__fromStateTransition;if(!(i.getLoop()||a&&a!==Wy)){var o=i.targetName,s=o?r[o]:r;i.saveTo(s)}}},e.prototype._innerSaveToNormal=function(t){var r=this._normalState;r||(r=this._normalState={}),t.textConfig&&!r.textConfig&&(r.textConfig=this.textConfig),this._savePrimaryToNormal(t,r,Yy)},e.prototype._savePrimaryToNormal=function(t,r,n){for(var i=0;i<n.length;i++){var a=n[i];t[a]!=null&&!(a in r)&&(r[a]=this[a])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(t){return this.states[t]},e.prototype.ensureState=function(t){var r=this.states;return r[t]||(r[t]={}),r[t]},e.prototype.clearStates=function(t){this.useState(Wy,!1,t)},e.prototype.useState=function(t,r,n,i){var a=t===Wy,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(Je(s,t)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){ay("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var f=this._textContent,d=hT(this,f,u,i);d&&!this.__inHover&&(this.__inHover=d),this._applyStateObj(t,u,this._normalState,r,vT(this,n,l),l);var p=this._textGuide;return f&&f.useState(t,r,n,!!d),p&&p.useState(t,r,n,!!d),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!d&&this.__inHover&&(this.__inHover=Yd,this.__dirty&=~Or),u}}},e.prototype.useStates=function(t,r,n){if(!t.length)this.clearStates();else{var i=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l<o;l++)if(t[l]!==a[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=t[l],f=void 0;this.stateProxy&&(f=this.stateProxy(u,t)),f||(f=this.states[u]),f&&i.push(f)}var d=i[o-1],p=this._textContent,v=hT(this,p,d,n);v&&!this.__inHover&&(this.__inHover=v);var g=this._mergeStates(i),y=this.stateTransition;this.saveCurrentToNormalState(g),this._applyStateObj(t.join(","),g,this._normalState,!1,vT(this,r,y),y);var x=this._textGuide;p&&p.useStates(t,r,!!v),x&&x.useStates(t,r,!!v),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!v&&this.__inHover&&(this.__inHover=Yd,this.__dirty&=~Or)}},e.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var r=t.__hostTarget;t=r?t.ignoreHostSilent?null:r:t.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var r=this.animators[t];r.targetName&&r.changeTarget(this[r.targetName])}},e.prototype.removeState=function(t){var r=Je(this.currentStates,t);if(r>=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},e.prototype.replaceState=function(t,r,n){var i=this.currentStates.slice(),a=Je(i,t),o=Je(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},e.prototype.toggleState=function(t,r){r?this.useState(t,!0):this.removeState(t)},e.prototype._mergeStates=function(t){for(var r={},n,i=0;i<t.length;i++){var a=t[i];ce(r,a),a.textConfig&&(n=n||{},ce(n,a.textConfig))}return n&&(r.textConfig=n),r},e.prototype._applyStateObj=function(t,r,n,i,a,o){if(this.__inHover!==Xd){var s=!(r&&i);r&&r.textConfig?(this.textConfig=ce({},i?this.textConfig:n.textConfig),ce(this.textConfig,r.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,f=0;f<Yy.length;f++){var d=Yy[f],p=a&&JH[d];r&&r[d]!=null?p?(u=!0,l[d]=r[d]):this[d]=r[d]:s&&n[d]!=null&&(p?(u=!0,l[d]=n[d]):this[d]=n[d])}if(!a)for(var f=0;f<this.animators.length;f++){var v=this.animators[f],g=v.targetName;v.getLoop()||v.__changeFinalValue(g?(r||n)[g]:r||n)}u&&this._transitionState(t,l,o)}},e.prototype._attachComponent=function(t){if(!(t.__zr&&!t.__hostTarget)&&t!==this){var r=this.__zr;r&&t.addSelfToZr(r),t.__zr=r,t.__hostTarget=this}},e.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},e.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(t){var r=this._textContent;r!==t&&(r&&r!==t&&this.removeTextContent(),t.innerTransformable=new Wu,this._attachComponent(t),this._textContent=t,this.markRedraw())},e.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),ce(this.textConfig,t),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=Or;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var r=this.animators;if(r)for(var n=0;n<r.length;n++)t.animation.addAnimator(r[n]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var r=this.animators;if(r)for(var n=0;n<r.length;n++)t.animation.removeAnimator(r[n]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},e.prototype.animate=function(t,r,n){var i=t?this[t]:this,a=new Vy(i,r,n);return t&&(a.targetName=t),this.addAnimator(a,t),a},e.prototype.addAnimator=function(t,r){var n=this.__zr,i=this;t.during(function(){i.updateDuringAnimation(r)}).done(function(){var a=i.animators,o=Je(a,t);o>=0&&a.splice(o,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(t){this.markRedraw()},e.prototype.stopAnimation=function(t,r){for(var n=this.animators,i=n.length,a=[],o=0;o<i;o++){var s=n[o];!t||t===s.scope?s.stop(r):a.push(s)}return this.animators=a,this},e.prototype.animateTo=function(t,r,n){Xy(this,t,r,n)},e.prototype.animateFrom=function(t,r,n){Xy(this,t,r,n,!0)},e.prototype._transitionState=function(t,r,n,i){for(var a=Xy(this,r,n,i),o=0;o<a.length;o++)a[o].__fromStateTransition=t},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type="element",t.name="",t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=!1,t.__inHover=Yd,t.__dirty=Or;function r(n,i,a,o){Object.defineProperty(t,n,{get:function(){if(!this[i]){var l=this[i]=[];s(this,l)}return this[i]},set:function(l){this[a]=l[0],this[o]=l[1],this[i]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[a]},set:function(f){l[a]=f}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(f){l[o]=f}})}}Object.defineProperty&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))})(),e})();Un(qd,gi),Un(qd,Wu);function Xy(e,t,r,n,i){r=r||{};var a=[];dT(e,"",e,t,r,n,a,i);var o=a.length,s=!1,l=r.done,u=r.aborted,f=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},d=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),a.length>0&&r.during&&a[0].during(function(g,y){r.during(y)});for(var p=0;p<a.length;p++){var v=a[p];f&&v.done(f),d&&v.aborted(d),r.force&&v.duration(r.duration),v.start(r.easing)}return a}function qy(e,t,r){for(var n=0;n<r;n++)e[n]=t[n]}function t9(e){return Pr(e[0])}function r9(e,t,r){if(Pr(t[r]))if(Pr(e[r])||(e[r]=[]),Nr(t[r])){var n=t[r].length;e[r].length!==n&&(e[r]=new t[r].constructor(n),qy(e[r],t[r],n))}else{var i=t[r],a=e[r],o=i.length;if(t9(i))for(var s=i[0].length,l=0;l<o;l++)a[l]?qy(a[l],i[l],s):a[l]=Array.prototype.slice.call(i[l]);else qy(a,i,o);a.length=i.length}else e[r]=t[r]}function n9(e,t){return e===t||Pr(e)&&Pr(t)&&i9(e,t)}function i9(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++)if(e[n]!==t[n])return!1;return!0}function dT(e,t,r,n,i,a,o,s){for(var l=kt(n),u=i.duration,f=i.delay,d=i.additive,p=i.setToFinal,v=!Ie(a),g=e.animators,y=[],x=0;x<l.length;x++){var b=l[x],_=n[b];if(_!=null&&r[b]!=null&&(v||a[b]))if(Ie(_)&&!Pr(_)&&!wd(_)){if(t){s||(r[b]=_,e.updateDuringAnimation(t));continue}dT(e,b,r[b],_,i,a&&a[b],o,s)}else y.push(b);else s||(r[b]=_,e.updateDuringAnimation(t),y.push(b))}var S=y.length;if(!d&&S)for(var T=0;T<g.length;T++){var E=g[T];if(E.targetName===t){var D=E.stopTracks(y);if(D){var L=Je(g,E);g.splice(L,1)}}}if(i.force||(y=Zt(y,function(P){return!n9(n[P],r[P])}),S=y.length),S>0||i.force&&!o.length){var R=void 0,O=void 0,M=void 0;if(s){O={},p&&(R={});for(var T=0;T<S;T++){var b=y[T];O[b]=r[b],p?R[b]=n[b]:r[b]=n[b]}}else if(p){M={};for(var T=0;T<S;T++){var b=y[T];M[b]=jd(r[b]),r9(r,n,b)}}var E=new Vy(r,!1,!1,d?Zt(g,function(j){return j.targetName===t}):null);E.targetName=t,i.scope&&(E.scope=i.scope),p&&R&&E.whenWithKeys(0,R,y),M&&E.whenWithKeys(0,M,y),E.whenWithKeys(u??500,s?O:n,y).delay(f||0),e.addAnimator(E,t),o.push(E)}}function hT(e,t,r,n){return!(r&&r.hoverLayer||n)||pT(e)||t&&pT(t)?Yd:Xd}function pT(e){return e.type==="text"||e.type==="tspan"}function vT(e,t,r){return!t&&!e.__inHover&&r&&r.duration>0}var Ky="__zr_style_"+Math.round(Math.random()*10),Mo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Kd={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Mo[Ky]=!0;var gT=["z","z2","invisible"],a9=["invisible"],Qu=(function(e){ve(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var n=kt(r),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(r[a]):e.prototype.attrKV.call(this,a,r[a])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(r){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(r,n,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&o9(this,r,n)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths&&this.__clipPaths.length){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},t.prototype.contain=function(r,n){return this.rectContain(r,n)},t.prototype.traverse=function(r,n){r.call(n,this)},t.prototype.rectContain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();return a.contain(i[0],i[1])},t.prototype.getPaintRect=function(){var r=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;r=this._paintRect||(this._paintRect=new je(0,0,0,0)),n?je.applyTransform(r,i,n):r.copy(i),(o||s||l)&&(r.width+=o*2+Math.abs(s),r.height+=o*2+Math.abs(l),r.x=Math.min(r.x,r.x+s-o),r.y=Math.min(r.y,r.y+l-o));var u=this.dirtyRectTolerance;r.isZero()||(r.x=Math.floor(r.x-u),r.y=Math.floor(r.y-u),r.width=Math.ceil(r.width+1+u*2),r.height=Math.ceil(r.height+1+u*2))}return r},t.prototype.setPrevPaintRect=function(r){r?(this._prevPaintRect=this._prevPaintRect||new je(0,0,0,0),this._prevPaintRect.copy(r)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(r){return this.animate("style",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(r,n){r!=="style"?e.prototype.attrKV.call(this,r,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(r,n){return typeof r=="string"?this.style[r]=n:ce(this.style,r),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(r){r||this.markRedraw(),this.__dirty|=Zu,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&Zu)},t.prototype.styleUpdated=function(){this.__dirty&=~Zu},t.prototype.createStyle=function(r){return _d(Mo,r)},t.prototype.useStyle=function(r){r[Ky]||(r=this.createStyle(r)),this.style=r,this.dirtyStyle()},t.prototype._useHoverStyle=function(r){this.__hoverStyle=r},t.prototype.isStyleObject=function(r){return r[Ky]},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(r,n,gT)},t.prototype._applyStateObj=function(r,n,i,a,o,s){e.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u=this.__inHover===Xd,f;if(n&&n.style?o?a?f=n.style:(f=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(f,n.style)):(f=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(f,n.style)):l&&(f=i.style),f)if(o){var d=this.style;if(this.style=this.createStyle(l?{}:d),l)for(var p=kt(d),v=0;v<p.length;v++){var g=p[v];g in f&&(f[g]=f[g],this.style[g]=d[g])}for(var y=kt(f),v=0;v<y.length;v++){var g=y[v];this.style[g]=this.style[g]}this._transitionState(r,{style:f},s,this.getAnimationStyleProps())}else u?this._useHoverStyle(f):this.useStyle(f);if(!u)for(var x=this.__inHover?a9:gT,v=0;v<x.length;v++){var g=x[v];n&&n[g]!=null?this[g]=n[g]:l&&i[g]!=null&&(this[g]=i[g])}},t.prototype._mergeStates=function(r){for(var n=e.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(n.style=i),n},t.prototype._mergeStyle=function(r,n){return ce(r,n),r},t.prototype.getAnimationStyleProps=function(){return Kd},t.initDefaultProps=(function(){var r=t.prototype;r.type="displayable",r.invisible=!1,r.z=0,r.z2=0,r.zlevel=0,r.culling=!1,r.cursor="pointer",r.rectHover=!1,r.incremental=0,r._rect=null,r.dirtyRectTolerance=0,r.__dirty=Or|Zu})(),t})(qd),Zy=new je(0,0,0,0),Qy=new je(0,0,0,0);function o9(e,t,r){return Zy.copy(e.getBoundingRect()),e.transform&&Zy.applyTransform(e.transform),Qy.width=t,Qy.height=r,!Zy.intersect(Qy)}var yn=Math.min,xn=Math.max,Jy=Math.sin,e0=Math.cos,Lo=Math.PI*2,Zd=Ws(),Qd=Ws(),Jd=Ws();function mT(e,t,r,n,i,a){i[0]=yn(e,r),i[1]=yn(t,n),a[0]=xn(e,r),a[1]=xn(t,n)}var yT=[],xT=[];function s9(e,t,r,n,i,a,o,s,l,u){var f=QC,d=Qt,p=f(e,r,i,o,yT);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var v=0;v<p;v++){var g=d(e,r,i,o,yT[v]);l[0]=yn(g,l[0]),u[0]=xn(g,u[0])}p=f(t,n,a,s,xT);for(var v=0;v<p;v++){var y=d(t,n,a,s,xT[v]);l[1]=yn(y,l[1]),u[1]=xn(y,u[1])}l[0]=yn(e,l[0]),u[0]=xn(e,u[0]),l[0]=yn(o,l[0]),u[0]=xn(o,u[0]),l[1]=yn(t,l[1]),u[1]=xn(t,u[1]),l[1]=yn(s,l[1]),u[1]=xn(s,u[1])}function l9(e,t,r,n,i,a,o,s){var l=eT,u=Rr,f=xn(yn(l(e,r,i),1),0),d=xn(yn(l(t,n,a),1),0),p=u(e,r,i,f),v=u(t,n,a,d);o[0]=yn(e,i,p),o[1]=yn(t,a,v),s[0]=xn(e,i,p),s[1]=xn(t,a,v)}function u9(e,t,r,n,i,a,o,s,l){var u=Xs,f=qs,d=Math.abs(i-a);if(d%Lo<1e-4&&d>1e-4){s[0]=e-r,s[1]=t-n,l[0]=e+r,l[1]=t+n;return}if(Zd[0]=e0(i)*r+e,Zd[1]=Jy(i)*n+t,Qd[0]=e0(a)*r+e,Qd[1]=Jy(a)*n+t,u(s,Zd,Qd),f(l,Zd,Qd),i=i%Lo,i<0&&(i=i+Lo),a=a%Lo,a<0&&(a=a+Lo),i>a&&!o?a+=Lo:i<a&&o&&(i+=Lo),o){var p=a;a=i,i=p}for(var v=0;v<a;v+=Math.PI/2)v>i&&(Jd[0]=e0(v)*r+e,Jd[1]=Jy(v)*n+t,u(s,Jd,s),f(l,Jd,l))}var lt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Io=[],Po=[],mi=[],ba=[],yi=[],xi=[],t0=Math.min,r0=Math.max,No=Math.cos,Ro=Math.sin,ji=Math.abs,n0=Math.PI,wa=n0*2,i0=typeof Float32Array<"u",Ju=[];function a0(e){var t=Math.round(e/n0*1e8)/1e8;return t%2*n0}function bT(e,t){var r=a0(e[0]);r<0&&(r+=wa);var n=r-e[0],i=e[1];i+=n,!t&&i-r>=wa?i=r+wa:t&&r-i>=wa?i=r-wa:!t&&r>i?i=r+(wa-a0(r-i)):t&&r<i&&(i=r-(wa-a0(i-r))),e[0]=r,e[1]=i}var Oo=(function(){function e(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(t,r,n){n=n||0,n>0&&(this._ux=ji(n/Gd/t)||0,this._uy=ji(n/Gd/r)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,r){return this._drawPendingPt(),this.addData(lt.M,t,r),this._ctx&&this._ctx.moveTo(t,r),this._x0=t,this._y0=r,this._xi=t,this._yi=r,this},e.prototype.lineTo=function(t,r){var n=ji(t-this._xi),i=ji(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(lt.L,t,r),this._ctx&&a&&this._ctx.lineTo(t,r),a)this._xi=t,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=r,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,r,n,i,a,o){return this._drawPendingPt(),this.addData(lt.C,t,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,r,n,i,a,o),this._xi=a,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,r,n,i){return this._drawPendingPt(),this.addData(lt.Q,t,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,r,n,i),this._xi=n,this._yi=i,this},e.prototype.arc=function(t,r,n,i,a,o){this._drawPendingPt(),Ju[0]=i,Ju[1]=a,bT(Ju,o),i=Ju[0],a=Ju[1];var s=a-i;return this.addData(lt.A,t,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,r,n,i,a,o),this._xi=No(a)*n+t,this._yi=Ro(a)*n+r,this},e.prototype.arcTo=function(t,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,r,n,i,a),this},e.prototype.rect=function(t,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,r,n,i),this.addData(lt.R,t,r,n,i),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(lt.Z);var t=this._ctx,r=this._x0,n=this._y0;return t&&t.closePath(),this._xi=r,this._yi=n,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){if(this._saveData){var r=t.length;!(this.data&&this.data.length===r)&&i0&&(this.data=new Float32Array(r));for(var n=0;n<r;n++)this.data[n]=t[n];this._len=r}},e.prototype.appendPath=function(t){if(this._saveData){t instanceof Array||(t=[t]);for(var r=t.length,n=0,i=this._len,a=0;a<r;a++)n+=t[a].len();var o=this.data;if(i0&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(i+n),i>0&&o))for(var s=0;s<i;s++)this.data[s]=o[s];for(var a=0;a<r;a++)for(var l=t[a].data,s=0;s<l.length;s++)this.data[i++]=l[s];this._len=i}},e.prototype.addData=function(t,r,n,i,a,o,s,l,u){if(this._saveData){var f=this.data;this._len+arguments.length>f.length&&(this._expandData(),f=this.data);for(var d=0;d<arguments.length;d++)f[this._len++]=arguments[d]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],r=0;r<this._len;r++)t[r]=this.data[r];this.data=t}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,i0&&this._len>11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){mi[0]=mi[1]=yi[0]=yi[1]=Number.MAX_VALUE,ba[0]=ba[1]=xi[0]=xi[1]=-Number.MAX_VALUE;var t=this.data,r=0,n=0,i=0,a=0,o;for(o=0;o<this._len;){var s=t[o++],l=o===1;switch(l&&(r=t[o],n=t[o+1],i=r,a=n),s){case lt.M:r=i=t[o++],n=a=t[o++],yi[0]=i,yi[1]=a,xi[0]=i,xi[1]=a;break;case lt.L:mT(r,n,t[o],t[o+1],yi,xi),r=t[o++],n=t[o++];break;case lt.C:s9(r,n,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],yi,xi),r=t[o++],n=t[o++];break;case lt.Q:l9(r,n,t[o++],t[o++],t[o],t[o+1],yi,xi),r=t[o++],n=t[o++];break;case lt.A:var u=t[o++],f=t[o++],d=t[o++],p=t[o++],v=t[o++],g=t[o++]+v;o+=1;var y=!t[o++];l&&(i=No(v)*d+u,a=Ro(v)*p+f),u9(u,f,d,p,v,g,y,yi,xi),r=No(g)*d+u,n=Ro(g)*p+f;break;case lt.R:i=r=t[o++],a=n=t[o++];var x=t[o++],b=t[o++];mT(i,a,i+x,a+b,yi,xi);break;case lt.Z:r=i,n=a;break}Xs(mi,mi,yi),qs(ba,ba,xi)}return o===0&&(mi[0]=mi[1]=ba[0]=ba[1]=0),new je(mi[0],mi[1],ba[0]-mi[0],ba[1]-mi[1])},e.prototype._calculateLength=function(){var t=this.data,r=this._len,n=this._ux,i=this._uy,a=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,f=0,d=0,p=0;p<r;){var v=t[p++],g=p===1;g&&(a=t[p],o=t[p+1],s=a,l=o);var y=-1;switch(v){case lt.M:a=s=t[p++],o=l=t[p++];break;case lt.L:{var x=t[p++],b=t[p++],_=x-a,S=b-o;(ji(_)>n||ji(S)>i||p===r-1)&&(y=Math.sqrt(_*_+S*S),a=x,o=b);break}case lt.C:{var T=t[p++],E=t[p++],x=t[p++],b=t[p++],D=t[p++],L=t[p++];y=zH(a,o,T,E,x,b,D,L,10),a=D,o=L;break}case lt.Q:{var T=t[p++],E=t[p++],x=t[p++],b=t[p++];y=jH(a,o,T,E,x,b,10),a=x,o=b;break}case lt.A:var R=t[p++],O=t[p++],M=t[p++],P=t[p++],j=t[p++],B=t[p++],$=B+j;p+=1,g&&(s=No(j)*M+R,l=Ro(j)*P+O),y=r0(M,P)*t0(wa,Math.abs(B)),a=No($)*M+R,o=Ro($)*P+O;break;case lt.R:{s=a=t[p++],l=o=t[p++];var K=t[p++],Z=t[p++];y=K*2+Z*2;break}case lt.Z:{var _=s-a,S=l-o;y=Math.sqrt(_*_+S*S),a=s,o=l;break}}y>=0&&(u[d++]=y,f+=y)}return this._pathLen=f,f},e.prototype.rebuildPath=function(t,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,f,d,p,v=r<1,g,y,x=0,b=0,_,S=0,T,E;if(!(v&&(this._pathSegLen||this._calculateLength(),g=this._pathSegLen,y=this._pathLen,_=r*y,!_)))e:for(var D=0;D<o;){var L=n[D++],R=D===1;switch(R&&(u=n[D],f=n[D+1],s=u,l=f),L!==lt.L&&S>0&&(t.lineTo(T,E),S=0),L){case lt.M:s=u=n[D++],l=f=n[D++],t.moveTo(u,f);break;case lt.L:{d=n[D++],p=n[D++];var O=ji(d-u),M=ji(p-f);if(O>i||M>a){if(v){var P=g[b++];if(x+P>_){var j=(_-x)/P;t.lineTo(u*(1-j)+d*j,f*(1-j)+p*j);break e}x+=P}t.lineTo(d,p),u=d,f=p,S=0}else{var B=O*O+M*M;B>S&&(T=d,E=p,S=B)}break}case lt.C:{var $=n[D++],K=n[D++],Z=n[D++],re=n[D++],Y=n[D++],G=n[D++];if(v){var P=g[b++];if(x+P>_){var j=(_-x)/P;Nd(u,$,Z,Y,j,Io),Nd(f,K,re,G,j,Po),t.bezierCurveTo(Io[1],Po[1],Io[2],Po[2],Io[3],Po[3]);break e}x+=P}t.bezierCurveTo($,K,Z,re,Y,G),u=Y,f=G;break}case lt.Q:{var $=n[D++],K=n[D++],Z=n[D++],re=n[D++];if(v){var P=g[b++];if(x+P>_){var j=(_-x)/P;Rd(u,$,Z,j,Io),Rd(f,K,re,j,Po),t.quadraticCurveTo(Io[1],Po[1],Io[2],Po[2]);break e}x+=P}t.quadraticCurveTo($,K,Z,re),u=Z,f=re;break}case lt.A:var I=n[D++],z=n[D++],W=n[D++],F=n[D++],ee=n[D++],ae=n[D++],ie=n[D++],_e=!n[D++],be=W>F?W:F,xe=ji(W-F)>.001,Se=ee+ae,Le=!1;if(v){var P=g[b++];x+P>_&&(Se=ee+ae*(_-x)/P,Le=!0),x+=P}if(xe&&t.ellipse?t.ellipse(I,z,W,F,ie,ee,Se,_e):t.arc(I,z,be,ee,Se,_e),Le)break e;R&&(s=No(ee)*W+I,l=Ro(ee)*F+z),u=No(Se)*W+I,f=Ro(Se)*F+z;break;case lt.R:s=u=n[D],l=f=n[D+1],d=n[D++],p=n[D++];var Xe=n[D++],nr=n[D++];if(v){var P=g[b++];if(x+P>_){var Tt=_-x;t.moveTo(d,p),t.lineTo(d+t0(Tt,Xe),p),Tt-=Xe,Tt>0&&t.lineTo(d+Xe,p+t0(Tt,nr)),Tt-=nr,Tt>0&&t.lineTo(d+r0(Xe-Tt,0),p+nr),Tt-=Xe,Tt>0&&t.lineTo(d,p+r0(nr-Tt,0));break e}x+=P}t.rect(d,p,Xe,nr);break;case lt.Z:if(v){var P=g[b++];if(x+P>_){var j=(_-x)/P;t.lineTo(u*(1-j)+s*j,f*(1-j)+l*j);break e}x+=P}t.closePath(),u=s,f=l}}},e.prototype.clone=function(){var t=new e,r=this.data;return t.data=r.slice?r.slice():Array.prototype.slice.call(r),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=lt,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e})();function nl(e,t,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=e;if(o>t+s&&o>n+s||o<t-s&&o<n-s||a>e+s&&a>r+s||a<e-s&&a<r-s)return!1;if(e!==r)l=(t-n)/(e-r),u=(e*n-r*t)/(e-r);else return Math.abs(a-e)<=s/2;var f=l*a-o+u,d=f*f/(l*l+1);return d<=s/2*s/2}function c9(e,t,r,n,i,a,o,s,l,u,f){if(l===0)return!1;var d=l;if(f>t+d&&f>n+d&&f>a+d&&f>s+d||f<t-d&&f<n-d&&f<a-d&&f<s-d||u>e+d&&u>r+d&&u>i+d&&u>o+d||u<e-d&&u<r-d&&u<i-d&&u<o-d)return!1;var p=OH(e,t,r,n,i,a,o,s,u,f);return p<=d/2}function f9(e,t,r,n,i,a,o,s,l){if(o===0)return!1;var u=o;if(l>t+u&&l>n+u&&l>a+u||l<t-u&&l<n-u&&l<a-u||s>e+u&&s>r+u&&s>i+u||s<e-u&&s<r-u&&s<i-u)return!1;var f=BH(e,t,r,n,i,a,s,l);return f<=u/2}var wT=Math.PI*2;function eh(e){return e%=wT,e<0&&(e+=wT),e}var ec=Math.PI*2;function d9(e,t,r,n,i,a,o,s,l){if(o===0)return!1;var u=o;s-=e,l-=t;var f=Math.sqrt(s*s+l*l);if(f-u>r||f+u<r)return!1;if(Math.abs(n-i)%ec<1e-4)return!0;if(a){var d=n;n=eh(i),i=eh(d)}else n=eh(n),i=eh(i);n>i&&(i+=ec);var p=Math.atan2(l,s);return p<0&&(p+=ec),p>=n&&p<=i||p+ec>=n&&p+ec<=i}function zo(e,t,r,n,i,a){if(a>t&&a>n||a<t&&a<n||n===t)return 0;var o=(a-t)/(n-t),s=n<t?1:-1;(o===1||o===0)&&(s=n<t?.5:-.5);var l=o*(r-e)+e;return l===i?1/0:l>i?s:0}var _a=Oo.CMD,Fo=Math.PI*2,h9=1e-4;function p9(e,t){return Math.abs(e-t)<h9}var kr=[-1,-1,-1],bn=[-1,-1];function v9(){var e=bn[0];bn[0]=bn[1],bn[1]=e}function g9(e,t,r,n,i,a,o,s,l,u){if(u>t&&u>n&&u>a&&u>s||u<t&&u<n&&u<a&&u<s)return 0;var f=Pd(t,n,a,s,u,kr);if(f===0)return 0;for(var d=0,p=-1,v=void 0,g=void 0,y=0;y<f;y++){var x=kr[y],b=x===0||x===1?.5:1,_=Qt(e,r,i,o,x);_<l||(p<0&&(p=QC(t,n,a,s,bn),bn[1]<bn[0]&&p>1&&v9(),v=Qt(t,n,a,s,bn[0]),p>1&&(g=Qt(t,n,a,s,bn[1]))),p===2?x<bn[0]?d+=v<t?b:-b:x<bn[1]?d+=g<v?b:-b:d+=s<g?b:-b:x<bn[0]?d+=v<t?b:-b:d+=s<v?b:-b)}return d}function m9(e,t,r,n,i,a,o,s){if(s>t&&s>n&&s>a||s<t&&s<n&&s<a)return 0;var l=FH(t,n,a,s,kr);if(l===0)return 0;var u=eT(t,n,a);if(u>=0&&u<=1){for(var f=0,d=Rr(t,n,a,u),p=0;p<l;p++){var v=kr[p]===0||kr[p]===1?.5:1,g=Rr(e,r,i,kr[p]);g<o||(kr[p]<u?f+=d<t?v:-v:f+=a<d?v:-v)}return f}else{var v=kr[0]===0||kr[0]===1?.5:1,g=Rr(e,r,i,kr[0]);return g<o?0:a<t?v:-v}}function y9(e,t,r,n,i,a,o,s){if(s-=t,s>r||s<-r)return 0;var l=Math.sqrt(r*r-s*s);kr[0]=-l,kr[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=Fo-1e-4){n=0,i=Fo;var f=a?1:-1;return o>=kr[0]+e&&o<=kr[1]+e?f:0}if(n>i){var d=n;n=i,i=d}n<0&&(n+=Fo,i+=Fo);for(var p=0,v=0;v<2;v++){var g=kr[v];if(g+e>o){var y=Math.atan2(s,g),f=a?1:-1;y<0&&(y=Fo+y),(y>=n&&y<=i||y+Fo>=n&&y+Fo<=i)&&(y>Math.PI/2&&y<Math.PI*1.5&&(f=-f),p+=f)}}return p}function _T(e,t,r,n,i){for(var a=e.data,o=e.len(),s=0,l=0,u=0,f=0,d=0,p,v,g=0;g<o;){var y=a[g++],x=g===1;switch(y===_a.M&&g>1&&(r||(s+=zo(l,u,f,d,n,i))),x&&(l=a[g],u=a[g+1],f=l,d=u),y){case _a.M:f=a[g++],d=a[g++],l=f,u=d;break;case _a.L:if(r){if(nl(l,u,a[g],a[g+1],t,n,i))return!0}else s+=zo(l,u,a[g],a[g+1],n,i)||0;l=a[g++],u=a[g++];break;case _a.C:if(r){if(c9(l,u,a[g++],a[g++],a[g++],a[g++],a[g],a[g+1],t,n,i))return!0}else s+=g9(l,u,a[g++],a[g++],a[g++],a[g++],a[g],a[g+1],n,i)||0;l=a[g++],u=a[g++];break;case _a.Q:if(r){if(f9(l,u,a[g++],a[g++],a[g],a[g+1],t,n,i))return!0}else s+=m9(l,u,a[g++],a[g++],a[g],a[g+1],n,i)||0;l=a[g++],u=a[g++];break;case _a.A:var b=a[g++],_=a[g++],S=a[g++],T=a[g++],E=a[g++],D=a[g++];g+=1;var L=!!(1-a[g++]);p=Math.cos(E)*S+b,v=Math.sin(E)*T+_,x?(f=p,d=v):s+=zo(l,u,p,v,n,i);var R=(n-b)*T/S+b;if(r){if(d9(b,_,T,E,E+D,L,t,R,i))return!0}else s+=y9(b,_,T,E,E+D,L,R,i);l=Math.cos(E+D)*S+b,u=Math.sin(E+D)*T+_;break;case _a.R:f=l=a[g++],d=u=a[g++];var O=a[g++],M=a[g++];if(p=f+O,v=d+M,r){if(nl(f,d,p,d,t,n,i)||nl(p,d,p,v,t,n,i)||nl(p,v,f,v,t,n,i)||nl(f,v,f,d,t,n,i))return!0}else s+=zo(p,d,p,v,n,i),s+=zo(f,v,f,d,n,i);break;case _a.Z:if(r){if(nl(l,u,f,d,t,n,i))return!0}else s+=zo(l,u,f,d,n,i);l=f,u=d;break}}return!r&&!p9(u,d)&&(s+=zo(l,u,f,d,n,i)||0),s!==0}function x9(e,t,r){return _T(e,0,!1,t,r)}function b9(e,t,r,n){return _T(e,t,!0,r,n)}var kT=ct({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Mo),w9={style:ct({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Kd.style)},o0=Ed.concat(["invisible","culling","z","z2","zlevel","parent"]),ut=(function(e){ve(t,e);function t(r){return e.call(this,r)||this}return t.prototype.update=function(){var r=this;e.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s<o0.length;++s)i[o0[s]]=this[o0[s]];i.__dirty|=Or}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(r){var n=kt(r);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var a=0;a<n.length;a++){var o=n[a],s=r[o];o==="style"?this.style?ce(this.style,s):this.useStyle(s):o==="shape"?ce(this.shape,s):e.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var r=this.style.fill;if(r!=="none"){if(Me(r)){var n=Fd(r,0);return n>.5?$y:n>.2?QH:Gy}else if(r)return Gy}return $y},t.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(Me(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Fd(r,0)<Uy;if(a===o)return n}},t.prototype.buildPath=function(r,n,i){},t.prototype.pathUpdated=function(){this.__dirty&=~tl},t.prototype.getUpdatedPathProxy=function(r){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,r),this.path},t.prototype.createPathProxy=function(){this.path=new Oo(!1)},t.prototype.hasStroke=function(){var r=this.style,n=r.stroke;return!(n==null||n==="none"||!(r.lineWidth>0))},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&tl)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),b9(s,l/u,r,n)))return!0}if(this.hasFill())return x9(s,r,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=tl,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(r){return this.animate("shape",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):e.prototype.attrKV.call(this,r,n)},t.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:ce(i,r),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&tl)},t.prototype.createStyle=function(r){return _d(kT,r)},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=ce({},this.shape))},t.prototype._applyStateObj=function(r,n,i,a,o,s){if(e.prototype._applyStateObj.call(this,r,n,i,a,o,s),this.__inHover!==Xd){var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=ce({},i.shape),ce(u,n.shape)):(u=ce({},a?this.shape:i.shape),ce(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=ce({},this.shape);for(var f={},d=kt(u),p=0;p<d.length;p++){var v=d[p];typeof u[v]=="object"?this.shape[v]=u[v]:f[v]=u[v]}this._transitionState(r,{shape:f},s)}else this.shape=u,this.dirtyShape()}},t.prototype._mergeStates=function(r){for(var n=e.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(n.shape=i),n},t.prototype.getAnimationStyleProps=function(){return w9},t.prototype.isZeroArea=function(){return!1},t.extend=function(r){var n=(function(a){ve(o,a);function o(s){var l=a.call(this,s)||this;return r.init&&r.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return Ke(r.style)},o.prototype.getDefaultShape=function(){return Ke(r.shape)},o})(t);for(var i in r)typeof r[i]=="function"&&(n.prototype[i]=r[i]);return n},t.initDefaultProps=(function(){var r=t.prototype;r.type="path",r.strokeContainThreshold=5,r.segmentIgnoreThreshold=0,r.subPixelOptimize=!1,r.autoBatch=!1,r.__dirty=Or|Zu|tl})(),t})(Qu),_9=ct({strokeFirst:!0,font:va,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},kT),th=(function(e){ve(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return GC(this.style)},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.createStyle=function(r){return _d(_9,r)},t.prototype.setBoundingRect=function(r){this._rect=r},t.prototype.getBoundingRect=function(){return this._rect||(this._rect=NH(this.style)),this._rect},t.initDefaultProps=(function(){var r=t.prototype;r.dirtyRectTolerance=10})(),t})(Qu);th.prototype.type="tspan";var k9=ct({x:0,y:0},Mo),S9={style:ct({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Kd.style)};function C9(e){return!!(e&&typeof e!="string"&&e.width&&e.height)}var ka=(function(e){ve(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(r){return _d(k9,r)},t.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=C9(n.image)?n.image:this.__image;if(!a)return 0;var o=r==="width"?"height":"width",s=n[o];return s==null?a[r]:a[r]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return S9},t.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new je(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},t})(Qu);ka.prototype.type="image";function T9(e,t){var r=t.x,n=t.y,i=t.width,a=t.height,o=t.r,s,l,u,f;i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=f=o:o instanceof Array?o.length===1?s=l=u=f=o[0]:o.length===2?(s=u=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],f=o[3]):s=l=u=f=0;var d;s+l>i&&(d=s+l,s*=i/d,l*=i/d),u+f>i&&(d=u+f,u*=i/d,f*=i/d),l+u>a&&(d=l+u,l*=a/d,u*=a/d),s+f>a&&(d=s+f,s*=a/d,f*=a/d),e.moveTo(r+s,n),e.lineTo(r+i-l,n),l!==0&&e.arc(r+i-l,n+l,l,-Math.PI/2,0),e.lineTo(r+i,n+a-u),u!==0&&e.arc(r+i-u,n+a-u,u,0,Math.PI/2),e.lineTo(r+f,n+a),f!==0&&e.arc(r+f,n+a-f,f,Math.PI/2,Math.PI),e.lineTo(r,n+s),s!==0&&e.arc(r+s,n+s,s,Math.PI,Math.PI*1.5),e.closePath()}var il=Math.round;function ST(e,t,r){if(t){var n=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=n,e.x2=i,e.y1=a,e.y2=o;var s=r&&r.lineWidth;return s&&(il(n*2)===il(i*2)&&(e.x1=e.x2=Bo(n,s,!0)),il(a*2)===il(o*2)&&(e.y1=e.y2=Bo(a,s,!0))),e}}function CT(e,t,r){if(t){var n=t.x,i=t.y,a=t.width,o=t.height;e.x=n,e.y=i,e.width=a,e.height=o;var s=r&&r.lineWidth;return s&&(e.x=Bo(n,s,!0),e.y=Bo(i,s,!0),e.width=Math.max(Bo(n+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Bo(i+o,s,!1)-e.y,o===0?0:1)),e}}function Bo(e,t,r){if(!t)return e;var n=il(e*2);return(n+il(t))%2===0?n/2:(n+(r?1:-1))/2}var A9=(function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e})(),E9={},Nt=(function(e){ve(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new A9},t.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=CT(E9,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?T9(r,n):r.rect(i,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t})(ut);Nt.prototype.type="rect";var TT={fill:"#000"},AT=2,bi={},D9={style:ct({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Kd.style)},Sr=(function(e){ve(t,e);function t(r){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=TT,n.attr(r),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r<this._children.length;r++){var n=this._children[r];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var r=this.innerTransformable;r?(r.updateTransform(),r.transform&&(this.transform=r.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(r){var n=this.innerTransformable;return n?n.getLocalTransform(r):e.prototype.getLocalTransform.call(this,r)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,N9(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(r){e.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=r},t.prototype.removeSelfFromZr=function(r){e.prototype.removeSelfFromZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var r=new je(0,0,0,0),n=this._children,i=[],a=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),u=s.getLocalTransform(i);u?(r.copy(l),r.applyTransform(u),a=a||r.clone(),a.union(r)):(a=a||l.clone(),a.union(l))}this._rect=a||r}return this._rect},t.prototype.setDefaultTextStyle=function(r){this._defaultStyle=r||TT},t.prototype.setTextContent=function(r){},t.prototype._mergeStyle=function(r,n){if(!n)return r;var i=n.rich,a=r.rich||i&&{};return ce(r,n),i&&a?(this._mergeRich(a,i),r.rich=a):a&&(r.rich=a),r},t.prototype._mergeRich=function(r,n){for(var i=kt(n),a=0;a<i.length;a++){var o=i[a];r[o]=r[o]||{},ce(r[o],n[o])}},t.prototype.getAnimationStyleProps=function(){return D9},t.prototype._getOrCreateChild=function(r){var n=this._children[this._childCursor];return(!n||!(n instanceof r))&&(n=new r),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},t.prototype._updatePlainTexts=function(){var r=this.style,n=r.font||va,i=r.padding,a=this._defaultStyle,o=r.x||0,s=r.y||0,l=r.align||a.align||"left",u=r.verticalAlign||a.verticalAlign||"top";VC(bi,a.overflowRect,o,s,l,u),o=bi.baseX,s=bi.baseY;var f=NT(r),d=AH(f,r,bi.outerWidth,bi.outerHeight),p=s0(r),v=!!r.backgroundColor,g=d.outerHeight,y=d.outerWidth,x=d.lines,b=d.lineHeight;this.isTruncated=!!d.isTruncated;var _=o,S=Co(s,d.contentHeight,u);if(p||i){var T=Zs(o,y,l),E=Co(s,g,u);p&&this._renderBackground(r,r,T,E,y,g)}S+=b/2,i&&(_=PT(o,l,i),u==="top"?S+=i[0]:u==="bottom"&&(S-=i[2]));for(var D=0,L=!1,R=!1,O=IT("fill"in r?r.fill:(R=!0,a.fill)),M=LT("stroke"in r?r.stroke:!v&&(!a.autoStroke||R)?(D=AT,L=!0,a.stroke):null),P=r.textShadowBlur>0,j=0;j<x.length;j++){var B=this._getOrCreateChild(th),$=B.createStyle();B.useStyle($),$.text=x[j],$.x=_,$.y=S,$.textAlign=l,$.textBaseline="middle",$.opacity=r.opacity,$.strokeFirst=!0,P&&($.shadowBlur=r.textShadowBlur||0,$.shadowColor=r.textShadowColor||"transparent",$.shadowOffsetX=r.textShadowOffsetX||0,$.shadowOffsetY=r.textShadowOffsetY||0),$.stroke=M,$.fill=O,M&&($.lineWidth=r.lineWidth||D,$.lineDash=r.lineDash,$.lineDashOffset=r.lineDashOffset||0),$.font=n,DT($,r),S+=b,B.setBoundingRect(Dy($,d.contentWidth,d.calculatedLineHeight,L?0:null))}},t.prototype._updateRichTexts=function(){var r=this.style,n=this._defaultStyle,i=r.align||n.align,a=r.verticalAlign||n.verticalAlign,o=r.x||0,s=r.y||0;VC(bi,n.overflowRect,o,s,i,a),o=bi.baseX,s=bi.baseY;var l=NT(r),u=MH(l,r,bi.outerWidth,bi.outerHeight,i),f=u.width,d=u.outerWidth,p=u.outerHeight,v=r.padding;this.isTruncated=!!u.isTruncated;var g=Zs(o,d,i),y=Co(s,p,a),x=g,b=y;v&&(x+=v[3],b+=v[0]);var _=x+f;s0(r)&&this._renderBackground(r,r,g,y,d,p);for(var S=!!r.backgroundColor,T=0;T<u.lines.length;T++){for(var E=u.lines[T],D=E.tokens,L=D.length,R=E.lineHeight,O=E.width,M=0,P=x,j=_,B=L-1,$=void 0;M<L&&($=D[M],!$.align||$.align==="left");)this._placeToken($,r,R,b,P,"left",S),O-=$.width,P+=$.width,M++;for(;B>=0&&($=D[B],$.align==="right");)this._placeToken($,r,R,b,j,"right",S),O-=$.width,j-=$.width,B--;for(P+=(f-(P-x)-(_-j)-O)/2;M<=B;)$=D[M],this._placeToken($,r,R,b,P+$.width/2,"center",S),P+=$.width,M++;b+=R}},t.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var f=r.verticalAlign,d=a+i/2;f==="top"?d=a+r.height/2:f==="bottom"&&(d=a+i-r.height/2);var p=!r.isLineHolder&&s0(u);p&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,d-r.height/2,r.width,r.height);var v=!!u.backgroundColor,g=r.textPadding;g&&(o=PT(o,s,g),d-=r.height/2-g[0]-r.innerHeight/2);var y=this._getOrCreateChild(th),x=y.createStyle();y.useStyle(x);var b=this._defaultStyle,_=!1,S=0,T=!1,E=IT("fill"in u?u.fill:"fill"in n?n.fill:(_=!0,b.fill)),D=LT("stroke"in u?u.stroke:"stroke"in n?n.stroke:!v&&!l&&(!b.autoStroke||_)?(S=AT,T=!0,b.stroke):null),L=u.textShadowBlur>0||n.textShadowBlur>0;x.text=r.text,x.x=o,x.y=d,L&&(x.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,x.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",x.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,x.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),x.textAlign=s,x.textBaseline="middle",x.font=r.font||va,x.opacity=yo(u.opacity,n.opacity,1),DT(x,u),D&&(x.lineWidth=yo(u.lineWidth,n.lineWidth,S),x.lineDash=Ae(u.lineDash,n.lineDash),x.lineDashOffset=n.lineDashOffset||0,x.stroke=D),E&&(x.fill=E),y.setBoundingRect(Dy(x,r.contentWidth,r.contentHeight,T?0:null))},t.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,f=r.borderColor,d=l&&l.image,p=l&&!d,v=r.borderRadius,g=this,y,x;if(p||r.lineHeight||u&&f){y=this._getOrCreateChild(Nt),y.useStyle(y.createStyle()),y.style.fill=null;var b=y.shape;b.x=i,b.y=a,b.width=o,b.height=s,b.r=v,y.dirtyShape()}if(p){var _=y.style;_.fill=l||null,_.fillOpacity=Ae(r.fillOpacity,1)}else if(d){x=this._getOrCreateChild(ka),x.onload=function(){g.dirtyStyle()};var S=x.style;S.image=l.image,S.x=i,S.y=a,S.width=o,S.height=s}if(u&&f){var _=y.style;_.lineWidth=u,_.stroke=f,_.strokeOpacity=Ae(r.strokeOpacity,1),_.lineDash=r.borderDash,_.lineDashOffset=r.borderDashOffset||0,y.strokeContainThreshold=0,y.hasFill()&&y.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var T=(y||x).style;T.shadowBlur=r.shadowBlur||0,T.shadowColor=r.shadowColor||"transparent",T.shadowOffsetX=r.shadowOffsetX||0,T.shadowOffsetY=r.shadowOffsetY||0,T.opacity=yo(r.opacity,n.opacity,1)},t.makeFont=function(r){var n="";return P9(r)&&(n=[r.fontStyle,r.fontWeight,I9(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&ui(n)||r.textFont||r.font},t})(Qu),M9={left:!0,right:1,center:1},L9={top:1,bottom:1,middle:1},ET=["fontStyle","fontWeight","fontSize","fontFamily"];function I9(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?ty+"px":e+"px"}function DT(e,t){for(var r=0;r<ET.length;r++){var n=ET[r],i=t[n];i!=null&&(e[n]=i)}}function P9(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function N9(e){return MT(e),U(e.rich,MT),e}function MT(e){if(e){e.font=Sr.makeFont(e);var t=e.align;t==="middle"&&(t="center"),e.align=t==null||M9[t]?t:"left";var r=e.verticalAlign;r==="center"&&(r="middle"),e.verticalAlign=r==null||L9[r]?r:"top";var n=e.padding;n&&(e.padding=ly(e.padding))}}function LT(e,t){return e==null||t<=0||e==="transparent"||e==="none"?null:e.image||e.colorStops?"#000":e}function IT(e){return e==null||e==="none"?null:e.image||e.colorStops?"#000":e}function PT(e,t,r){return t==="right"?e-r[1]:t==="center"?e+r[3]/2-r[1]/2:e+r[3]}function NT(e){var t=e.text;return t!=null&&(t+=""),t}function s0(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var RT=1e-4,OT=20;function R9(e){return e.replace(/^\s+|\s+$/g,"")}var ur=Math.min,nt=Math.max,Ft=Math.abs,Hi=Math.round,jo=Math.floor,tc=Math.ceil,Ho=Math.pow,rc=Math.log,l0=Math.LN10,O9=Math.PI,z9=Math.random;function u0(e,t,r,n){var i=t[0],a=t[1],o=r[0],s=r[1],l=a-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(e<=i)return o;if(e>=a)return s}else{if(e>=i)return o;if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/l*u+o}var xt=F9;function F9(e,t,r){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return c0(e,t,r)}function c0(e,t,r){return Me(e)?B9(e)?parseFloat(e)/100*t+(r||0):parseFloat(e):e==null?NaN:+e}function B9(e){return!!R9(e).match(/%$/)}function et(e,t,r){return isNaN(t)?r?""+e:+e:(t=ur(nt(0,t),OT),e=(+e).toFixed(t),r?e:+e)}function f0(e){return e.sort(function(t,r){return t-r}),e}function Vi(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,r=0;r<15;r++,t*=10)if(Hi(e*t)/t===e)return r}return j9(e)}function j9(e){var t=e.toString().toLowerCase(),r=t.indexOf("e"),n=r>0?+t.slice(r+1):0,i=r>0?r:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return nt(0,o-n)}function H9(e,t,r){var n=Ft(e[1]-e[0]);if(!isFinite(n)||n===0)return NaN;var i=rc(2*Ft(r||1)*Ft(n))/l0,a=rc(Ft(t))/l0,o=nt(0,tc(-i+a));return isFinite(o)||(o=NaN),o}function V9(e,t){var r=ga(e,function(v,g){return v+(isNaN(g)?0:g)},0);if(r===0)return[];for(var n=Ho(10,t),i=De(e,function(v){return(isNaN(v)?0:v)/r*n*100}),a=n*100,o=De(i,function(v){return jo(v)}),s=ga(o,function(v,g){return v+g},0),l=De(i,function(v,g){return v-o[g]});s<a;){for(var u=Number.NEGATIVE_INFINITY,f=null,d=0,p=l.length;d<p;++d)l[d]>u&&(u=l[d],f=d);++o[f],l[f]=0,++s}return De(o,function(v){return v/n})}function U9(e,t){var r=nt(Vi(e),Vi(t)),n=e+t;return r>OT?n:et(n,r)}var zT=Ho(2,53)-1;function FT(e){var t=O9*2;return(e%t+t)%t}function rh(e){return e>-RT&&e<RT}var $9=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function al(e){if(e instanceof Date)return e;if(Me(e)){var t=$9.exec(e);if(!t)return new Date(NaN);if(t[8]){var r=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(r-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,r,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(e==null)return new Date(NaN);return new Date(Hi(e))}function BT(e){return Ho(10,d0(e))}function d0(e){if(e===0)return 0;var t=jo(rc(e)/l0);return e/Ho(10,t)>=10&&t++,t}var jT=2;function h0(e,t){var r=d0(e),n=Ho(10,r),i=e/n,a;return t===jT?a=1:t?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,e=a*n,et(e,-r)}function nh(e){var t=parseFloat(e);return t==e&&(t!==0||!Me(e)||e.indexOf("x")<=0)?t:NaN}function G9(e){return!isNaN(nh(e))}function p0(){return Hi(z9()*9)}function HT(e,t){return t===0?e:HT(t,e%t)}function VT(e,t){return e==null?t:t==null?e:e*t/HT(e,t)}function wn(e){return e!=null&&isFinite(e)}var W9="[ECharts] ",Y9=typeof console<"u"&&console.warn&&console.log;function X9(e,t,r){Y9&&console[e](W9+t)}function UT(e,t){X9("error",e)}function zr(e){throw new Error(e)}function $T(e,t,r){return(t-e)*r+e}var GT="series\0",q9="\0_ec_\0";function Cr(e){return e instanceof Array?e:e==null?[]:[e]}function ih(e,t,r){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var n=0,i=r.length;n<i;n++){var a=r[n];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var WT=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function nc(e){return Ie(e)&&!pe(e)&&!(e instanceof Date)?e.value:e}function K9(e){return Ie(e)&&!(e instanceof Array)}function Z9(e,t,r){var n=r==="normalMerge",i=r==="replaceMerge",a=r==="replaceAll";e=e||[],t=(t||[]).slice();var o=Fe();U(t,function(l,u){if(!Ie(l)){t[u]=null;return}});var s=Q9(e,o,r);return(n||i)&&J9(s,e,o,t),n&&eV(s,t),n||i?tV(s,t,i):a&&rV(s,t),nV(s),s}function Q9(e,t,r){var n=[];if(r==="replaceAll")return n;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),n.push({existing:r==="replaceMerge"||ac(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return n}function J9(e,t,r,n){U(n,function(i,a){if(!(!i||i.id==null)){var o=ic(i.id),s=r.get(o);if(s!=null){var l=e[s];Fi(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=t[s],n[a]=null}}})}function eV(e,t){U(t,function(r,n){if(!(!r||r.name==null))for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||r.id==null)&&!ac(r)&&!ac(a)&&YT("name",a,r)){e[i].newOption=r,t[n]=null;return}}})}function tV(e,t,r){U(t,function(n){if(n){for(var i,a=0;(i=e[a])&&(i.newOption||ac(i.existing)||i.existing&&n.id!=null&&!YT("id",n,i.existing));)a++;i?(i.newOption=n,i.brandNew=r):e.push({newOption:n,brandNew:r,existing:null,keyInfo:null}),a++}})}function rV(e,t){U(t,function(r){e.push({newOption:r,brandNew:!0,existing:null,keyInfo:null})})}function nV(e){var t=Fe();U(e,function(r){var n=r.existing;n&&t.set(n.id,r)}),U(e,function(r){var n=r.newOption;Fi(!n||n.id==null||!t.get(n.id)||t.get(n.id)===r,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&t.set(n.id,r),!r.keyInfo&&(r.keyInfo={})}),U(e,function(r,n){var i=r.existing,a=r.newOption,o=r.keyInfo;if(Ie(a)){if(o.name=a.name!=null?ic(a.name):i?i.name:GT+n,i)o.id=ic(i.id);else if(a.id!=null)o.id=ic(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(t.get(o.id))}t.set(o.id,r)}})}function YT(e,t,r){var n=wi(t[e],null),i=wi(r[e],null);return n!=null&&i!=null&&n===i}function ic(e){return wi(e,"")}function wi(e,t){return e==null?t:Me(e)?e:ft(e)||oy(e)?e+"":t}function v0(e){var t=e.name;return!!(t&&t.indexOf(GT))}function ac(e){return e&&e.id!=null&&ic(e.id).indexOf(q9)===0}function iV(e,t,r){U(e,function(n){var i=n.newOption;Ie(i)&&(n.keyInfo.mainType=t,n.keyInfo.subType=aV(t,i,n.existing,r))})}function aV(e,t,r,n){var i=t.type?t.type:r?r.subType:n.determineSubType(e,t);return i}function Vo(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return pe(t.dataIndex)?De(t.dataIndex,function(r){return e.indexOfRawIndex(r)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return pe(t.name)?De(t.name,function(r){return e.indexOfName(r)}):e.indexOfName(t.name)}function it(){var e="__ec_inner_"+oV++;return function(t){return t[e]||(t[e]={})}}var oV=p0();function g0(e,t,r){var n=m0(t,r),i=n.mainTypeSpecified,a=n.queryOptionMap,o=n.others,s=o,l=r?r.defaultMainType:null;return!i&&l&&a.set(l,{}),a.each(function(u,f){var d=oc(e,f,u,{useDefault:l===f,enableAll:r&&r.enableAll!=null?r.enableAll:!0,enableNone:r&&r.enableNone!=null?r.enableNone:!0});s[f+"Models"]=d.models,s[f+"Model"]=d.models[0]}),s}function m0(e,t){var r;if(Me(e)){var n={};n[e+"Index"]=0,r=n}else r=e;var i=Fe(),a={},o=!1;return U(r,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],f=u[1],d=(u[2]||"").toLowerCase();if(!(!f||!d||t&&t.includeMainTypes&&Je(t.includeMainTypes,f)<0)){o=o||!!f;var p=i.get(f)||i.set(f,{});p[d]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var _n={useDefault:!0,enableAll:!1,enableNone:!1};function oc(e,t,r,n){n=n||_n;var i=r.index,a=r.id,o=r.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=e.getComponent(t))?[l]:[],s}if(i==="none"||i===!1){if(n.enableNone)return s.models=[],s;i=-1}return i==="all"&&(n.enableAll?i=a=o=null:i=-1),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function sV(e,t,r){var n={};n[t+"Id"]=e[t+"Id"],n[t+"Index"]=e[t+"Index"],n[t+"Name"]=e[t+"Name"];var i={mainType:t,query:n};return r&&(i.subType=r),i}function XT(e,t,r){e.setAttribute?e.setAttribute(t,r):e[t]=r}function lV(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function uV(e){return e==="auto"?We.domSupported?"html":"richText":e||"html"}function cV(e,t,r,n,i){var a=t==null||t==="auto";if(n==null)return n;if(ft(n)){var o=$T(r||0,n,i);return et(o,a?Math.max(Vi(r||0),Vi(n)):t)}else{if(Me(n))return i<1?r:n;for(var s=[],l=r,u=n,f=Math.max(l?l.length:0,u.length),d=0;d<f;++d){var p=e.getDimensionInfo(d);if(p&&p.type==="ordinal")s[d]=(i<1&&l?l:u)[d];else{var v=l&&l[d]?l[d]:0,g=u[d],o=$T(v,g,i);s[d]=et(o,a?Math.max(Vi(v),Vi(g)):t)}}return s}}function kn(){return[1/0,-1/0]}function y0(e,t){Ui(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function qT(e,t){Ui(t)&&t<e[0]&&(e[0]=t)}function KT(e,t){Ui(t)&&t>e[1]&&(e[1]=t)}function fV(e,t){ol(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function Ui(e){return e!=null&&isFinite(e)}function ol(e,t){return Ui(e)&&Ui(t)&&e<=t}function dV(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function hV(e){ol(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function ZT(){var e="__ec_once_"+pV++;return function(t,r){_r(t,e)||(t[e]=1,r())}}var pV=p0();function x0(e,t,r){var n=Fe(),i=0;U(e,function(a){var o=t(a),s=n.get(o)||0;r&&r(a,s),!s&&!r&&(e[i++]=a),n.set(o,s+1)}),r||(e.length=i)}function vV(e){return e.value+""}function gV(e){return e+""}function mV(e,t){return Ae(t,!0)?e.seriesIndex+2:0}function QT(e,t,r){var n=e.getData().count();return{progressiveRender:r.progressiveEnabled&&t.incrementalPrepareRender&&n>=r.threshold,large:e.get("large")&&n>=e.get("largeThreshold"),modDataCount:e.get("progressiveChunkMode")==="mod"?e.getData().count():null}}function yV(e,t){return{seriesType:e,overallReset:t}}function b0(e){return{overallReset:e}}var tt=it(),xV=function(e,t,r,n){if(n){var i=tt(n);i.dataIndex=r,i.dataType=t,i.seriesIndex=e,i.ssrType="chart",n.type==="group"&&n.traverse(function(a){var o=tt(a);o.seriesIndex=e,o.dataIndex=r,o.dataType=t,o.ssrType="chart"})}},sl="undefined",JT="series",eA=Fe(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Jr="original",cr="arrayRows",Sn="objectRows",$n="keyedColumns",Sa="typedArray",tA="unknown",_i="column",Uo="row",bV=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],rA=(function(){function e(t){U(bV,function(r){this[r]=pt(t[r],t)},this)}return e})();function wV(e,t){return t.mainType===JT?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var nA=1,iA={},aA=it(),w0=it(),_0=0,ah=1,oh=2,Fr=["emphasis","blur","select"],sh=["normal","emphasis","blur","select"],_V=10,kV=9,$o="highlight",lh="downplay",uh="select",k0="unselect",ch="toggleSelect",S0="selectchanged";function ll(e){return e!=null&&e!=="none"}function fh(e,t,r){e.onHoverStateChange&&(e.hoverState||0)!==r&&e.onHoverStateChange(t),e.hoverState=r}function oA(e){fh(e,"emphasis",oh)}function sA(e){e.hoverState===oh&&fh(e,"normal",_0)}function C0(e){fh(e,"blur",ah)}function lA(e){e.hoverState===ah&&fh(e,"normal",_0)}function SV(e){e.selected=!0}function CV(e){e.selected=!1}function uA(e,t,r){t(e,r)}function $i(e,t,r){uA(e,t,r),e.isGroup&&e.traverse(function(n){uA(n,t,r)})}function cA(e,t){switch(t){case"emphasis":e.hoverState=oh;break;case"normal":e.hoverState=_0;break;case"blur":e.hoverState=ah;break;case"select":e.selected=!0}}function TV(e,t,r,n){for(var i=e.style,a={},o=0;o<t.length;o++){var s=t[o],l=i[s];a[s]=l??(n&&n[s])}for(var o=0;o<e.animators.length;o++){var u=e.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(r)<0&&u.targetName==="style"&&u.saveTo(a,t)}return a}function AV(e,t,r,n){var i=r&&Je(r,"select")>=0,a=!1;if(e instanceof ut){var o=aA(e),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(ll(s)||ll(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=ce({},n),u=ce({},u),u.fill=s):!ll(u.fill)&&ll(s)?(a=!0,n=ce({},n),u=ce({},u),u.fill=oT(s)):!ll(u.stroke)&&ll(l)&&(a||(n=ce({},n),u=ce({},u)),u.stroke=oT(l)),n.style=u}}if(n&&n.z2==null){a||(n=ce({},n));var f=e.z2EmphasisLift;n.z2=e.z2+(f??_V)}return n}function EV(e,t,r){if(r&&r.z2==null){r=ce({},r);var n=e.z2SelectLift;r.z2=e.z2+(n??kV)}return r}function DV(e,t,r){var n=Je(e.currentStates,t)>=0,i=e.style.opacity,a=n?null:TV(e,["opacity"],t,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=ce({},r),o=ce({opacity:n?i:a.opacity*.1},o),r.style=o),r}function T0(e,t){var r=this.states[e];if(this.style){if(e==="emphasis")return AV(this,e,t,r);if(e==="blur")return DV(this,e,r);if(e==="select")return EV(this,e,r)}return r}function MV(e){e.stateProxy=T0;var t=e.getTextContent(),r=e.getTextGuideLine();t&&(t.stateProxy=T0),r&&(r.stateProxy=T0)}function fA(e,t){!gA(e,t)&&!e.__highByOuter&&$i(e,oA)}function dA(e,t){!gA(e,t)&&!e.__highByOuter&&$i(e,sA)}function sc(e,t){e.__highByOuter|=1<<(t||0),$i(e,oA)}function lc(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&$i(e,sA)}function hA(e){$i(e,C0)}function A0(e){$i(e,lA)}function pA(e){$i(e,SV)}function vA(e){$i(e,CV)}function gA(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function mA(e){var t=e.getModel(),r=[],n=[];t.eachComponent(function(i,a){var o=w0(a),s=wV(e,a),l=i==="series";!l&&n.push(s),o.isBlured&&(s.group.traverse(function(u){lA(u)}),l&&r.push(a)),o.isBlured=!1}),U(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,t)})}function E0(e,t,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,f){for(var d=0;d<f.length;d++){var p=u.getItemGraphicEl(f[d]);p&&A0(p)}}if(e!=null&&!(!t||t==="none")){var o=i.getSeriesByIndex(e),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(u){var f=o===u,d=u.coordinateSystem;d&&d.master&&(d=d.master);var p=d&&s?d===s:f;if(!(r==="series"&&!f||r==="coordinateSystem"&&!p||t==="series"&&f)){var v=n.getViewOfSeriesModel(u);if(v.group.traverse(function(x){x.__highByOuter&&f&&t==="self"||C0(x)}),Pr(t))a(u.getData(),t);else if(Ie(t))for(var g=kt(t),y=0;y<g.length;y++)a(u.getData(g[y]),t[g[y]]);l.push(u),w0(u).isBlured=!0}}),i.eachComponent(function(u,f){if(u!=="series"){var d=n.getViewOfComponentModel(f);d&&d.toggleBlurSeries&&d.toggleBlurSeries(l,!0,i)}})}}function D0(e,t,r){if(!(e==null||t==null)){var n=r.getModel().getComponent(e,t);if(n){w0(n).isBlured=!0;var i=r.getViewOfComponentModel(n);!i||!i.focusBlurEnabled||i.group.traverse(function(a){C0(a)})}}}function LV(e,t,r){var n=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=Vo(i,t);a=(pe(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),l=0;!o&&l<s;)o=i.getItemGraphicEl(l++);if(o){var u=tt(o);E0(n,u.focus,u.blurScope,r)}else{var f=e.get(["emphasis","focus"]),d=e.get(["emphasis","blurScope"]);f!=null&&E0(n,f,d,r)}}}function M0(e,t,r,n){var i={focusSelf:!1,dispatchers:null};if(e==null||e==="series"||t==null||r==null)return i;var a=n.getModel().getComponent(e,t);if(!a)return i;var o=n.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(r),l,u=0;u<s.length;u++)if(tt(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function IV(e,t,r){var n=tt(e),i=M0(n.componentMainType,n.componentIndex,n.componentHighDownName,r),a=i.dispatchers,o=i.focusSelf;a?(o&&D0(n.componentMainType,n.componentIndex,r),U(a,function(s){return fA(s,t)})):(E0(n.seriesIndex,n.focus,n.blurScope,r),n.focus==="self"&&D0(n.componentMainType,n.componentIndex,r),fA(e,t))}function PV(e,t,r){mA(r);var n=tt(e),i=M0(n.componentMainType,n.componentIndex,n.componentHighDownName,r).dispatchers;i?U(i,function(a){return dA(a,t)}):dA(e,t)}function NV(e,t,r){if(P0(t)){var n=t.dataType,i=e.getData(n),a=Vo(i,t);pe(a)||(a=[a]),e[t.type===ch?"toggleSelect":t.type===uh?"select":"unselect"](a,n)}}function yA(e){var t=e.getAllData();U(t,function(r){var n=r.data,i=r.type;n.eachItemGraphicEl(function(a,o){e.isSelected(o,i)?pA(a):vA(a)})})}function RV(e){var t=[];return e.eachSeries(function(r){var n=r.getAllData();U(n,function(i){i.data;var a=i.type,o=r.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function L0(e,t,r){bA(e,!0),$i(e,MV),zV(e,t,r)}function OV(e){bA(e,!1)}function ul(e,t,r,n){n?OV(e):L0(e,t,r)}function zV(e,t,r){var n=tt(e);t!=null?(n.focus=t,n.blurScope=r):n.focus&&(n.focus=null)}var xA=["emphasis","blur","select"],FV={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function dh(e,t,r,n){r=r||"itemStyle";for(var i=0;i<xA.length;i++){var a=xA[i],o=t.getModel([a,r]),s=e.ensureState(a);s.style=o[FV[r]]()}}function bA(e,t){var r=t===!1,n=e;e.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!r||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!r)}function I0(e){return!!(e&&e.__highDownDispatcher)}function BV(e){var t=iA[e];return t==null&&nA<=32&&(t=iA[e]=nA++),t}function P0(e){var t=e.type;return t===uh||t===k0||t===ch}function wA(e){var t=e.type;return t===$o||t===lh}function jV(e){var t=aA(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var r=e.states.select||{};t.selectFill=r.style&&r.style.fill||null,t.selectStroke=r.style&&r.style.stroke||null}var cl=Oo.CMD,HV=[[],[],[]],_A=Math.sqrt,VV=Math.atan2;function UV(e,t){if(t){var r=e.data,n=e.len(),i,a,o,s,l,u,f=cl.M,d=cl.C,p=cl.L,v=cl.R,g=cl.A,y=cl.Q;for(o=0,s=0;o<n;){switch(i=r[o++],s=o,a=0,i){case f:a=1;break;case p:a=1;break;case d:a=3;break;case y:a=2;break;case g:var x=t[4],b=t[5],_=_A(t[0]*t[0]+t[1]*t[1]),S=_A(t[2]*t[2]+t[3]*t[3]),T=VV(-t[1]/S,t[0]/_);r[o]*=_,r[o++]+=x,r[o]*=S,r[o++]+=b,r[o++]*=_,r[o++]*=S,r[o++]+=T,r[o++]+=T,o+=2,s=o;break;case v:u[0]=r[o++],u[1]=r[o++],vn(u,u,t),r[s++]=u[0],r[s++]=u[1],u[0]+=r[o++],u[1]+=r[o++],vn(u,u,t),r[s++]=u[0],r[s++]=u[1]}for(l=0;l<a;l++){var E=HV[l];E[0]=r[o++],E[1]=r[o++],vn(E,E,t),r[s++]=E[0],r[s++]=E[1]}}e.increaseVersion()}}var N0=Math.sqrt,hh=Math.sin,ph=Math.cos,uc=Math.PI;function kA(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function R0(e,t){return(e[0]*t[0]+e[1]*t[1])/(kA(e)*kA(t))}function SA(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(R0(e,t))}function CA(e,t,r,n,i,a,o,s,l,u,f){var d=l*(uc/180),p=ph(d)*(e-r)/2+hh(d)*(t-n)/2,v=-1*hh(d)*(e-r)/2+ph(d)*(t-n)/2,g=p*p/(o*o)+v*v/(s*s);g>1&&(o*=N0(g),s*=N0(g));var y=(i===a?-1:1)*N0((o*o*(s*s)-o*o*(v*v)-s*s*(p*p))/(o*o*(v*v)+s*s*(p*p)))||0,x=y*o*v/s,b=y*-s*p/o,_=(e+r)/2+ph(d)*x-hh(d)*b,S=(t+n)/2+hh(d)*x+ph(d)*b,T=SA([1,0],[(p-x)/o,(v-b)/s]),E=[(p-x)/o,(v-b)/s],D=[(-1*p-x)/o,(-1*v-b)/s],L=SA(E,D);if(R0(E,D)<=-1&&(L=uc),R0(E,D)>=1&&(L=0),L<0){var R=Math.round(L/uc*1e6)/1e6;L=uc*2+R%2*uc}f.addData(u,_,S,o,s,T,L,d,a)}var $V=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,GV=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function WV(e){var t=new Oo;if(!e)return t;var r=0,n=0,i=r,a=n,o,s=Oo.CMD,l=e.match($V);if(!l)return t;for(var u=0;u<l.length;u++){for(var f=l[u],d=f.charAt(0),p=void 0,v=f.match(GV)||[],g=v.length,y=0;y<g;y++)v[y]=parseFloat(v[y]);for(var x=0;x<g;){var b=void 0,_=void 0,S=void 0,T=void 0,E=void 0,D=void 0,L=void 0,R=r,O=n,M=void 0,P=void 0;switch(d){case"l":r+=v[x++],n+=v[x++],p=s.L,t.addData(p,r,n);break;case"L":r=v[x++],n=v[x++],p=s.L,t.addData(p,r,n);break;case"m":r+=v[x++],n+=v[x++],p=s.M,t.addData(p,r,n),i=r,a=n,d="l";break;case"M":r=v[x++],n=v[x++],p=s.M,t.addData(p,r,n),i=r,a=n,d="L";break;case"h":r+=v[x++],p=s.L,t.addData(p,r,n);break;case"H":r=v[x++],p=s.L,t.addData(p,r,n);break;case"v":n+=v[x++],p=s.L,t.addData(p,r,n);break;case"V":n=v[x++],p=s.L,t.addData(p,r,n);break;case"C":p=s.C,t.addData(p,v[x++],v[x++],v[x++],v[x++],v[x++],v[x++]),r=v[x-2],n=v[x-1];break;case"c":p=s.C,t.addData(p,v[x++]+r,v[x++]+n,v[x++]+r,v[x++]+n,v[x++]+r,v[x++]+n),r+=v[x-2],n+=v[x-1];break;case"S":b=r,_=n,M=t.len(),P=t.data,o===s.C&&(b+=r-P[M-4],_+=n-P[M-3]),p=s.C,R=v[x++],O=v[x++],r=v[x++],n=v[x++],t.addData(p,b,_,R,O,r,n);break;case"s":b=r,_=n,M=t.len(),P=t.data,o===s.C&&(b+=r-P[M-4],_+=n-P[M-3]),p=s.C,R=r+v[x++],O=n+v[x++],r+=v[x++],n+=v[x++],t.addData(p,b,_,R,O,r,n);break;case"Q":R=v[x++],O=v[x++],r=v[x++],n=v[x++],p=s.Q,t.addData(p,R,O,r,n);break;case"q":R=v[x++]+r,O=v[x++]+n,r+=v[x++],n+=v[x++],p=s.Q,t.addData(p,R,O,r,n);break;case"T":b=r,_=n,M=t.len(),P=t.data,o===s.Q&&(b+=r-P[M-4],_+=n-P[M-3]),r=v[x++],n=v[x++],p=s.Q,t.addData(p,b,_,r,n);break;case"t":b=r,_=n,M=t.len(),P=t.data,o===s.Q&&(b+=r-P[M-4],_+=n-P[M-3]),r+=v[x++],n+=v[x++],p=s.Q,t.addData(p,b,_,r,n);break;case"A":S=v[x++],T=v[x++],E=v[x++],D=v[x++],L=v[x++],R=r,O=n,r=v[x++],n=v[x++],p=s.A,CA(R,O,r,n,D,L,S,T,E,p,t);break;case"a":S=v[x++],T=v[x++],E=v[x++],D=v[x++],L=v[x++],R=r,O=n,r+=v[x++],n+=v[x++],p=s.A,CA(R,O,r,n,D,L,S,T,E,p,t);break}}(d==="z"||d==="Z")&&(p=s.Z,t.addData(p),r=i,n=a),o=p}return t.toStatic(),t}var TA=(function(e){ve(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(r){},t})(ut);function AA(e){return e.setData!=null}function EA(e,t){var r=WV(e),n=ce({},t);return n.buildPath=function(i){var a=AA(i);if(a&&i.canSave()){i.appendPath(r);var o=i.getContext();o&&i.rebuildPath(o,1)}else{var o=a?i.getContext():i;o&&r.rebuildPath(o,1)}},n.applyTransform=function(i){UV(r,i),this.dirtyShape()},n}function YV(e,t){return new TA(EA(e,t))}function XV(e,t){var r=EA(e,t),n=(function(i){ve(a,i);function a(o){var s=i.call(this,o)||this;return s.applyTransform=r.applyTransform,s.buildPath=r.buildPath,s}return a})(TA);return n}function qV(e,t){for(var r=[],n=e.length,i=0;i<n;i++){var a=e[i];r.push(a.getUpdatedPathProxy(!0))}var o=new ut(t);return o.createPathProxy(),o.buildPath=function(s){if(AA(s)){s.appendPath(r);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}var Bt=(function(e){ve(t,e);function t(r){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(r),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(r){return this._children[r]},t.prototype.childOfName=function(r){for(var n=this._children,i=0;i<n.length;i++)if(n[i].name===r)return n[i]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(r){return r&&r!==this&&r.parent!==this&&(this._children.push(r),this._doAdd(r)),this},t.prototype.addBefore=function(r,n){if(r&&r!==this&&r.parent!==this&&n&&n.parent===this){var i=this._children,a=i.indexOf(n);a>=0&&(i.splice(a,0,r),this._doAdd(r))}return this},t.prototype.replace=function(r,n){var i=Je(this._children,r);return i>=0&&this.replaceAt(n,i),this},t.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},t.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},t.prototype.remove=function(r){var n=this.__zr,i=this._children,a=Je(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i<r.length;i++){var a=r[i];n&&a.removeSelfFromZr(n),a.parent=null}return r.length=0,this},t.prototype.eachChild=function(r,n){for(var i=this._children,a=0;a<i.length;a++){var o=i[a];r.call(n,o,a)}return this},t.prototype.traverse=function(r,n){for(var i=0;i<this._children.length;i++){var a=this._children[i],o=r.call(n,a);a.isGroup&&!o&&a.traverse(r,n)}return this},t.prototype.addSelfToZr=function(r){e.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.addSelfToZr(r)}},t.prototype.removeSelfFromZr=function(r){e.prototype.removeSelfFromZr.call(this,r);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.removeSelfFromZr(r)}},t.prototype.getBoundingRect=function(r){for(var n=new je(0,0,0,0),i=r||this._children,a=[],o=null,s=0;s<i.length;s++){var l=i[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),f=l.getLocalTransform(a);f?(je.applyTransform(n,u,f),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},t})(qd);Bt.prototype.type="group";var KV=(function(){function e(){this.cx=0,this.cy=0,this.r=0}return e})(),vh=(function(e){ve(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new KV},t.prototype.buildPath=function(r,n){r.moveTo(n.cx+n.r,n.cy),r.arc(n.cx,n.cy,n.r,0,Math.PI*2)},t})(ut);vh.prototype.type="circle";var ZV=(function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e})(),O0=(function(e){ve(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new ZV},t.prototype.buildPath=function(r,n){var i=.5522848,a=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*i,f=l*i;r.moveTo(a-s,o),r.bezierCurveTo(a-s,o-f,a-u,o-l,a,o-l),r.bezierCurveTo(a+u,o-l,a+s,o-f,a+s,o),r.bezierCurveTo(a+s,o+f,a+u,o+l,a,o+l),r.bezierCurveTo(a-u,o+l,a-s,o+f,a-s,o),r.closePath()},t})(ut);O0.prototype.type="ellipse";var DA=Math.PI,z0=DA*2,Go=Math.sin,fl=Math.cos,QV=Math.acos,fr=Math.atan2,MA=Math.abs,cc=Math.sqrt,fc=Math.max,ki=Math.min,Gn=1e-4;function JV(e,t,r,n,i,a,o,s){var l=r-e,u=n-t,f=o-i,d=s-a,p=d*l-f*u;if(!(p*p<Gn))return p=(f*(t-a)-d*(e-i))/p,[e+p*l,t+p*u]}function gh(e,t,r,n,i,a,o){var s=e-r,l=t-n,u=(o?a:-a)/cc(s*s+l*l),f=u*l,d=-u*s,p=e+f,v=t+d,g=r+f,y=n+d,x=(p+g)/2,b=(v+y)/2,_=g-p,S=y-v,T=_*_+S*S,E=i-a,D=p*y-g*v,L=(S<0?-1:1)*cc(fc(0,E*E*T-D*D)),R=(D*S-_*L)/T,O=(-D*_-S*L)/T,M=(D*S+_*L)/T,P=(-D*_+S*L)/T,j=R-x,B=O-b,$=M-x,K=P-b;return j*j+B*B>$*$+K*K&&(R=M,O=P),{cx:R,cy:O,x0:-f,y0:-d,x1:R*(i/E-1),y1:O*(i/E-1)}}function eU(e){var t;if(pe(e)){var r=e.length;if(!r)return e;r===1?t=[e[0],e[0],0,0]:r===2?t=[e[0],e[0],e[1],e[1]]:r===3?t=e.concat(e[2]):t=e}else t=[e,e,e,e];return t}function tU(e,t){var r,n=fc(t.r,0),i=fc(t.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var f=t.cx,d=t.cy,p=!!t.clockwise,v=MA(u-l),g=v>z0&&v%z0;if(g>Gn&&(v=g),!(n>Gn))e.moveTo(f,d);else if(v>z0-Gn)e.moveTo(f+n*fl(l),d+n*Go(l)),e.arc(f,d,n,l,u,!p),i>Gn&&(e.moveTo(f+i*fl(u),d+i*Go(u)),e.arc(f,d,i,u,l,p));else{var y=void 0,x=void 0,b=void 0,_=void 0,S=void 0,T=void 0,E=void 0,D=void 0,L=void 0,R=void 0,O=void 0,M=void 0,P=void 0,j=void 0,B=void 0,$=void 0,K=n*fl(l),Z=n*Go(l),re=i*fl(u),Y=i*Go(u),G=v>Gn;if(G){var I=t.cornerRadius;I&&(r=eU(I),y=r[0],x=r[1],b=r[2],_=r[3]);var z=MA(n-i)/2;if(S=ki(z,b),T=ki(z,_),E=ki(z,y),D=ki(z,x),O=L=fc(S,T),M=R=fc(E,D),(L>Gn||R>Gn)&&(P=n*fl(u),j=n*Go(u),B=i*fl(l),$=i*Go(l),v<DA)){var W=JV(K,Z,B,$,P,j,re,Y);if(W){var F=K-W[0],ee=Z-W[1],ae=P-W[0],ie=j-W[1],_e=1/Go(QV((F*ae+ee*ie)/(cc(F*F+ee*ee)*cc(ae*ae+ie*ie)))/2),be=cc(W[0]*W[0]+W[1]*W[1]);O=ki(L,(n-be)/(_e+1)),M=ki(R,(i-be)/(_e-1))}}}if(!G)e.moveTo(f+K,d+Z);else if(O>Gn){var xe=ki(b,O),Se=ki(_,O),Le=gh(B,$,K,Z,n,xe,p),Xe=gh(P,j,re,Y,n,Se,p);e.moveTo(f+Le.cx+Le.x0,d+Le.cy+Le.y0),O<L&&xe===Se?e.arc(f+Le.cx,d+Le.cy,O,fr(Le.y0,Le.x0),fr(Xe.y0,Xe.x0),!p):(xe>0&&e.arc(f+Le.cx,d+Le.cy,xe,fr(Le.y0,Le.x0),fr(Le.y1,Le.x1),!p),e.arc(f,d,n,fr(Le.cy+Le.y1,Le.cx+Le.x1),fr(Xe.cy+Xe.y1,Xe.cx+Xe.x1),!p),Se>0&&e.arc(f+Xe.cx,d+Xe.cy,Se,fr(Xe.y1,Xe.x1),fr(Xe.y0,Xe.x0),!p))}else e.moveTo(f+K,d+Z),e.arc(f,d,n,l,u,!p);if(!(i>Gn)||!G)e.lineTo(f+re,d+Y);else if(M>Gn){var xe=ki(y,M),Se=ki(x,M),Le=gh(re,Y,P,j,i,-Se,p),Xe=gh(K,Z,B,$,i,-xe,p);e.lineTo(f+Le.cx+Le.x0,d+Le.cy+Le.y0),M<R&&xe===Se?e.arc(f+Le.cx,d+Le.cy,M,fr(Le.y0,Le.x0),fr(Xe.y0,Xe.x0),!p):(Se>0&&e.arc(f+Le.cx,d+Le.cy,Se,fr(Le.y0,Le.x0),fr(Le.y1,Le.x1),!p),e.arc(f,d,i,fr(Le.cy+Le.y1,Le.cx+Le.x1),fr(Xe.cy+Xe.y1,Xe.cx+Xe.x1),p),xe>0&&e.arc(f+Xe.cx,d+Xe.cy,xe,fr(Xe.y1,Xe.x1),fr(Xe.y0,Xe.x0),!p))}else e.lineTo(f+re,d+Y),e.arc(f,d,i,u,l,p)}e.closePath()}}}var rU=(function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e})(),Ca=(function(e){ve(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new rU},t.prototype.buildPath=function(r,n){tU(r,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t})(ut);Ca.prototype.type="sector";var nU=(function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e})(),F0=(function(e){ve(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new nU},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},t})(ut);F0.prototype.type="ring";function iU(e,t,r,n){var i=[],a=[],o=[],s=[],l,u,f,d;if(n){f=[1/0,1/0],d=[-1/0,-1/0];for(var p=0,v=e.length;p<v;p++)Xs(f,f,e[p]),qs(d,d,e[p]);Xs(f,f,n[0]),qs(d,d,n[1])}for(var p=0,v=e.length;p<v;p++){var g=e[p];if(r)l=e[p?p-1:v-1],u=e[(p+1)%v];else if(p===0||p===v-1){i.push(gH(e[p]));continue}else l=e[p-1],u=e[p+1];DC(a,u,l),gy(a,a,t);var y=yy(g,l),x=yy(g,u),b=y+x;b!==0&&(y/=b,x/=b),gy(o,a,-y),gy(s,a,x);var _=EC([],g,o),S=EC([],g,s);n&&(qs(_,_,f),Xs(_,_,d),qs(S,S,f),Xs(S,S,d)),i.push(_),i.push(S)}return r&&i.push(i.shift()),i}function LA(e,t,r){var n=t.smooth,i=t.points;if(i&&i.length>=2){if(n){var a=iU(i,n,r,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],f=i[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;s<d;s++)e.lineTo(i[s][0],i[s][1])}r&&e.closePath()}}var aU=(function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e})(),B0=(function(e){ve(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new aU},t.prototype.buildPath=function(r,n){LA(r,n,!0)},t})(ut);B0.prototype.type="polygon";var oU=(function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e})(),dc=(function(e){ve(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new oU},t.prototype.buildPath=function(r,n){LA(r,n,!1)},t})(ut);dc.prototype.type="polyline";var sU={},lU=(function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e})(),Gi=(function(e){ve(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new lU},t.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=ST(sU,n,this.style);i=l.x1,a=l.y1,o=l.x2,s=l.y2}else i=n.x1,a=n.y1,o=n.x2,s=n.y2;var u=n.percent;u!==0&&(r.moveTo(i,a),u<1&&(o=i*(1-u)+o*u,s=a*(1-u)+s*u),r.lineTo(o,s))},t.prototype.pointAt=function(r){var n=this.shape;return[n.x1*(1-r)+n.x2*r,n.y1*(1-r)+n.y2*r]},t})(ut);Gi.prototype.type="line";var Br=[],uU=(function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return e})();function IA(e,t,r){var n=e.cpx2,i=e.cpy2;return n!=null||i!=null?[(r?ZC:Qt)(e.x1,e.cpx1,e.cpx2,e.x2,t),(r?ZC:Qt)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(r?JC:Rr)(e.x1,e.cpx1,e.x2,t),(r?JC:Rr)(e.y1,e.cpy1,e.y2,t)]}var mh=(function(e){ve(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new uU},t.prototype.buildPath=function(r,n){var i=n.x1,a=n.y1,o=n.x2,s=n.y2,l=n.cpx1,u=n.cpy1,f=n.cpx2,d=n.cpy2,p=n.percent;p!==0&&(r.moveTo(i,a),f==null||d==null?(p<1&&(Rd(i,l,o,p,Br),l=Br[1],o=Br[2],Rd(a,u,s,p,Br),u=Br[1],s=Br[2]),r.quadraticCurveTo(l,u,o,s)):(p<1&&(Nd(i,l,f,o,p,Br),l=Br[1],f=Br[2],o=Br[3],Nd(a,u,d,s,p,Br),u=Br[1],d=Br[2],s=Br[3]),r.bezierCurveTo(l,u,f,d,o,s)))},t.prototype.pointAt=function(r){return IA(this.shape,r,!1)},t.prototype.tangentAt=function(r){var n=IA(this.shape,r,!0);return my(n,n)},t})(ut);mh.prototype.type="bezier-curve";var cU=(function(){function e(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e})(),yh=(function(e){ve(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new cU},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r,0),s=n.startAngle,l=n.endAngle,u=n.clockwise,f=Math.cos(s),d=Math.sin(s);r.moveTo(f*o+i,d*o+a),r.arc(i,a,o,s,l,!u)},t})(ut);yh.prototype.type="arc";var fU=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="compound",r}return t.prototype._updatePathDirty=function(){for(var r=this.shape.paths,n=this.shapeChanged(),i=0;i<r.length;i++)n=n||r[i].shapeChanged();n&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var r=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<r.length;i++)r[i].path||r[i].createPathProxy(),r[i].path.setScale(n[0],n[1],r[i].segmentIgnoreThreshold)},t.prototype.buildPath=function(r,n){for(var i=n.paths||[],a=0;a<i.length;a++)i[a].buildPath(r,i[a].shape,!0)},t.prototype.afterBrush=function(){for(var r=this.shape.paths||[],n=0;n<r.length;n++)r[n].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),ut.prototype.getBoundingRect.call(this)},t})(ut),PA=(function(){function e(t){this.colorStops=t||[]}return e.prototype.addColorStop=function(t,r){this.colorStops.push({offset:t,color:r})},e})(),NA=(function(e){ve(t,e);function t(r,n,i,a,o,s){var l=e.call(this,o)||this;return l.x=r??0,l.y=n??0,l.x2=i??1,l.y2=a??0,l.type="linear",l.global=s||!1,l}return t})(PA),dU=(function(e){ve(t,e);function t(r,n,i,a,o){var s=e.call(this,a)||this;return s.x=r??.5,s.y=n??.5,s.r=i??.5,s.type="radial",s.global=o||!1,s}return t})(PA),j0=Math.min,hU=Math.max,xh=Math.abs,Wo=[0,0],Yo=[0,0],Wt=PC(),bh=Wt.minTv,wh=Wt.maxTv,RA=(function(){function e(t,r){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Ye;for(var n=0;n<2;n++)this._axes[n]=new Ye;t&&this.fromBoundingRect(t,r)}return e.prototype.fromBoundingRect=function(t,r){var n=this._corners,i=this._axes,a=t.x,o=t.y,s=a+t.width,l=o+t.height;if(n[0].set(a,o),n[1].set(s,o),n[2].set(s,l),n[3].set(a,l),r)for(var u=0;u<4;u++)n[u].transform(r);Ye.sub(i[0],n[1],n[0]),Ye.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var u=0;u<2;u++)this._origin[u]=i[u].dot(n[0])},e.prototype.intersect=function(t,r,n){var i=!0,a=!r;return r&&Ye.set(r,0,0),Wt.reset(n,!a),!this._intersectCheckOneSide(this,t,a,1)&&(i=!1,a)||!this._intersectCheckOneSide(t,this,a,-1)&&(i=!1,a)||!a&&!Wt.negativeSize&&Ye.copy(r,i?Wt.useDir?Wt.dirMinTv:bh:wh),i},e.prototype._intersectCheckOneSide=function(t,r,n,i){for(var a=!0,o=0;o<2;o++){var s=t._axes[o];if(t._getProjMinMaxOnAxis(o,t._corners,Wo),t._getProjMinMaxOnAxis(o,r._corners,Yo),Wt.negativeSize||Wo[1]<Yo[0]||Wo[0]>Yo[1]){if(a=!1,Wt.negativeSize||n)return a;var l=xh(Yo[0]-Wo[1]),u=xh(Wo[0]-Yo[1]);j0(l,u)>wh.len()&&(l<u?Ye.scale(wh,s,-l*i):Ye.scale(wh,s,u*i))}else if(!n){var l=xh(Yo[0]-Wo[1]),u=xh(Wo[0]-Yo[1]);(Wt.useDir||j0(l,u)<bh.len())&&((l<u||!Wt.bidirectional)&&(Ye.scale(bh,s,l*i),Wt.useDir&&Wt.calcDirMTV()),(l>=u||!Wt.bidirectional)&&(Ye.scale(bh,s,-u*i),Wt.useDir&&Wt.calcDirMTV()))}}return a},e.prototype._getProjMinMaxOnAxis=function(t,r,n){for(var i=this._axes[t],a=this._origin,o=r[0].dot(i)+a[t],s=o,l=o,u=1;u<r.length;u++){var f=r[u].dot(i)+a[t];s=j0(f,s),l=hU(f,l)}n[0]=s+Wt.touchThreshold,n[1]=l-Wt.touchThreshold,Wt.negativeSize=n[1]<n[0]},e})(),OA=0,pU=1,vU=2,gU=1,_h=0,mU=[],yU=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.notClear=!0,r.incremental=pU,r._displayables=[],r._temporaryDisplayables=[],r._cursor=0,r}return t.prototype.traverse=function(r,n){r.call(n,this)},t.prototype.useStyle=function(){this.style={}},t.prototype._useHoverStyle=function(){this.__hoverStyle=null},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(r,n){n?this._temporaryDisplayables.push(r):this._displayables.push(r),this.markRedraw()},t.prototype.addDisplayables=function(r,n){n=n||!1;for(var i=0;i<r.length;i++)this.addDisplayable(r[i],n)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(r){for(var n=this._cursor;n<this._displayables.length;n++)r&&r(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)r&&r(this._temporaryDisplayables[n])},t.prototype.update=function(){this.updateTransform();for(var r=this._cursor;r<this._displayables.length;r++){var n=this._displayables[r];n.parent=this,n.update(),n.parent=null}for(var r=0;r<this._temporaryDisplayables.length;r++){var n=this._temporaryDisplayables[r];n.parent=this,n.update(),n.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var r=new je(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var i=this._displayables[n],a=i.getBoundingRect().clone();i.needLocalTransform()&&a.applyTransform(i.getLocalTransform(mU)),r.union(a)}this._rect=r}return this._rect},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(a.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(r,n))return!0}return!1},t})(Qu),xU=it();function bU(e,t,r,n,i){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),l=e==="update";if(s){var u=void 0,f=void 0,d=void 0;n?(u=Ae(n.duration,200),f=Ae(n.easing,"cubicOut"),d=0):(u=t.getShallow(l?"animationDurationUpdate":"animationDuration"),f=t.getShallow(l?"animationEasingUpdate":"animationEasing"),d=t.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(f=a.easing),a.delay!=null&&(d=a.delay)),$e(d)&&(d=d(r,i)),$e(u)&&(u=u(r));var p={duration:u||0,delay:d,easing:f};return p}else return null}function H0(e,t,r,n,i,a,o){var s=!1,l;$e(i)?(o=a,a=i,i=null):Ie(i)&&(a=i.cb,o=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var u=e==="leave";u||t.stopAnimation("leave");var f=bU(e,n,i,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(t,i):null);if(f&&f.duration>0){var d=f.duration,p=f.delay,v=f.easing,g={duration:d,delay:p||0,easing:v,done:a,force:!!a||!!o,setToFinal:!u,scope:e,during:o};s?t.animateFrom(r,g):t.animateTo(r,g)}else t.stopAnimation(),!s&&t.attr(r),o&&o(1),a&&a()}function dr(e,t,r,n,i,a){H0("update",e,t,r,n,i,a)}function en(e,t,r,n,i,a){H0("enter",e,t,r,n,i,a)}function hc(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++){var r=e.animators[t];if(r.scope==="leave")return!0}return!1}function kh(e,t,r,n,i,a){hc(e)||H0("leave",e,t,r,n,i,a)}function zA(e,t,r,n){e.removeTextContent(),e.removeTextGuideLine(),kh(e,{style:{opacity:0}},t,r,n)}function pc(e,t,r){function n(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(i){i.isGroup||zA(i,t,r,n)}):zA(e,t,r,n)}function V0(e){xU(e).oldStyle=e.style}var U0={},Ta=["x","y"],dl=["width","height"],FA=0,BA=1,Sh=2;function wU(e){return ut.extend(e)}var _U=XV;function kU(e,t){return _U(e,t)}function Wn(e,t){U0[e]=t}function SU(e){if(U0.hasOwnProperty(e))return U0[e]}function $0(e,t,r,n){var i=YV(e,t);return r&&(n==="center"&&(r=HA(r,i.getBoundingRect())),VA(i,r)),i}function jA(e,t,r){var n=new ka({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(i){if(r==="center"){var a={width:i.width,height:i.height};n.setStyle(HA(t,a))}}});return n}function HA(e,t){var r=t.width/t.height,n=e.height*r,i;n<=e.width?i=e.height:(n=e.width,i=n/r);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-n/2,y:o-i/2,width:n,height:i}}var CU=qV;function VA(e,t){if(e.applyTransform){var r=e.getBoundingRect(),n=r.calculateTransform(t);e.applyTransform(n)}}function vc(e,t){return ST(e,e,{lineWidth:t}),e}function TU(e,t){return CT(e,e,t),e}var AU=Bo;function EU(e,t){for(var r=Hu([]);e&&e!==t;)Vu(r,e.getLocalTransform(),r),e=e.parent;return r}function G0(e,t,r){return t&&!Pr(t)&&(t=Wu.getLocalTransform(t)),r&&(t=Uu([],t)),vn([],e,t)}function DU(e,t,r){var n=t[4]===0||t[5]===0||t[0]===0?1:Ft(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:Ft(2*t[4]/t[2]),a=[e==="left"?-n:e==="right"?n:0,e==="top"?-i:e==="bottom"?i:0];return a=G0(a,t,r),Ft(a[0])>Ft(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function UA(e){return!e.isGroup}function MU(e){return e.shape!=null}function $A(e,t,r){if(!e||!t)return;function n(o){var s={};return o.traverse(function(l){UA(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return MU(o)&&(s.shape=Ke(o.shape)),s}var a=n(e);t.traverse(function(o){if(UA(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),dr(o,l,r,tt(o).dataIndex)}}})}function LU(e,t){return De(e,function(r){var n=r[0];n=nt(n,t.x),n=ur(n,t.x+t.width);var i=r[1];return i=nt(i,t.y),i=ur(i,t.y+t.height),[n,i]})}function IU(e,t){var r=nt(e.x,t.x),n=ur(e.x+e.width,t.x+t.width),i=nt(e.y,t.y),a=ur(e.y+e.height,t.y+t.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function W0(e,t,r){var n=ce({rectHover:!0},t),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},e)return e.indexOf("image://")===0?(i.image=e.slice(8),ct(i,r),new ka(n)):$0(e.replace("path://",""),n,r,"center")}function PU(e,t,r,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(GA(e,t,r,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function GA(e,t,r,n,i,a,o,s){var l=r-e,u=n-t,f=o-i,d=s-a,p=Y0(f,d,l,u);if(NU(p))return!1;var v=e-i,g=t-a,y=Y0(v,g,l,u)/p;if(y<0||y>1)return!1;var x=Y0(v,g,f,d)/p;return!(x<0||x>1)}function Y0(e,t,r,n){return e*n-r*t}function NU(e){return e<=1e-6&&e>=-1e-6}function Ch(e,t,r,n,i){return t==null||(ft(t)?bt[0]=bt[1]=bt[2]=bt[3]=t:(bt[0]=t[0],bt[1]=t[1],bt[2]=t[2],bt[3]=t[3]),n&&(bt[0]=nt(0,bt[0]),bt[1]=nt(0,bt[1]),bt[2]=nt(0,bt[2]),bt[3]=nt(0,bt[3])),r&&(bt[0]=-bt[0],bt[1]=-bt[1],bt[2]=-bt[2],bt[3]=-bt[3]),WA(e,bt,"x","width",3,1,i&&i[0]||0),WA(e,bt,"y","height",0,2,i&&i[1]||0)),e}var bt=[0,0,0,0];function WA(e,t,r,n,i,a,o){var s=t[a]+t[i],l=e[n];e[n]+=s,o=nt(0,ur(o,l)),e[n]<o?(e[n]=o,e[r]+=t[i]>=0?-t[i]:t[a]>=0?l+t[a]:Ft(s)>1e-8?(l-o)*t[i]/s:0):e[r]-=t[i]}function Th(e){var t=e.itemTooltipOption,r=e.componentModel,n=e.itemName,i=Me(t)?{formatter:t}:t,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=e.formatterParamsExtra;l&&U(kt(l),function(f){_r(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=tt(e.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:ct({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function X0(e,t){var r;e.isGroup&&(r=t(e)),r||e.traverse(t)}function gc(e,t){if(e)if(pe(e))for(var r=0;r<e.length;r++)X0(e[r],t);else X0(e,t)}function q0(e){return!e||Ft(e[1])<Ah&&Ft(e[2])<Ah||Ft(e[0])<Ah&&Ft(e[3])<Ah}var Ah=1e-5;function mc(e,t){return e?je.copy(e,t):t.clone()}function K0(e,t){return t?dy(e||fi(),t):void 0}function Z0(e){return{z:e.get("z")||0,zlevel:e.get("zlevel")||0}}function RU(e){var t=-1/0,r=1/0;X0(e,function(a){n(a),n(a.getTextContent()),n(a.getTextGuideLine())});function n(a){if(!(!a||a.isGroup)){var o=a.currentStates;if(o.length)for(var s=0;s<o.length;s++)i(a.states[o[s]]);i(a)}}function i(a){if(a){var o=a.z2;o>t&&(t=o),o<r&&(r=o)}}return r>t&&(r=t=0),{min:r,max:t}}function Q0(e,t,r){YA(e,t,r,-1/0)}function YA(e,t,r,n){if(e.ignoreModelZ)return n;var i=e.getTextContent(),a=e.getTextGuideLine(),o=e.isGroup;if(o)for(var s=e.childrenRef(),l=0;l<s.length;l++)n=nt(YA(s[l],t,r,n),n);else e.z=t,e.zlevel=r,n=nt(e.z2||0,n);if(i&&(i.z=t,i.zlevel=r,isFinite(n)&&(i.z2=n+2)),a){var u=e.textGuideLineConfig;a.z=t,a.zlevel=r,isFinite(n)&&(a.z2=n+(u&&u.showAbove?1:-1))}return n}function OU(e){return e.animation={duration:0},e}function zU(e,t){return t?dy(yc.transform,t):Hu(yc.transform),yc.decomposeTransform(),Dd(e,yc),e}var yc=new Wu;yc.transform=fi();function FU(e){var t=e.getZr().painter;return t.getType()==="canvas"?t:null}Wn("circle",vh),Wn("ellipse",O0),Wn("sector",Ca),Wn("ring",F0),Wn("polygon",B0),Wn("polyline",dc),Wn("rect",Nt),Wn("line",Gi),Wn("bezierCurve",mh),Wn("arc",yh);const BU=Object.freeze(Object.defineProperty({__proto__:null,Arc:yh,BezierCurve:mh,BoundingRect:je,Circle:vh,CompoundPath:fU,Ellipse:O0,Group:Bt,HOVER_LAYER_FOR_INCREMENTAL:Sh,HOVER_LAYER_FROM_THRESHOLD:BA,HOVER_LAYER_NO:FA,Image:ka,IncrementalDisplayable:yU,Line:Gi,LinearGradient:NA,OrientedBoundingRect:RA,Path:ut,Point:Ye,Polygon:B0,Polyline:dc,RadialGradient:dU,Rect:Nt,Ring:F0,Sector:Ca,Text:Sr,WH:dl,XY:Ta,applyTransform:G0,calcZ2Range:RU,clipPointsByRect:LU,clipRectByRect:IU,createIcon:W0,decomposeTransform:zU,ensureCopyRect:mc,ensureCopyTransform:K0,expandOrShrinkRect:Ch,extendPath:kU,extendShape:wU,getCurrentCanvasPainter:FU,getShapeClass:SU,getTransform:EU,groupTransition:$A,initProps:en,isBoundingRectAxisAligned:q0,isElementRemoved:hc,lineLineIntersect:GA,linePolygonIntersect:PU,makeImage:jA,makePath:$0,mergePath:CU,payloadDisableAnimation:OU,registerShape:Wn,removeElement:kh,removeElementWithFadeOut:pc,resizePath:VA,retrieveZInfo:Z0,setTooltipConfig:Th,subPixelOptimize:AU,subPixelOptimizeLine:vc,subPixelOptimizeRect:TU,transformDirection:DU,traverseElements:gc,traverseUpdateZ:Q0,updateProps:dr},Symbol.toStringTag,{value:"Module"}));var Eh={};function jU(e,t){for(var r=0;r<Fr.length;r++){var n=Fr[r],i=t[n],a=e.ensureState(n);a.style=a.style||{},a.style.text=i}var o=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(o,!0)}function XA(e,t,r){var n=e.labelFetcher,i=e.labelDataIndex,a=e.labelDimIndex,o=t.normal,s;n&&(s=n.getFormattedLabel(i,"normal",null,a,o&&o.get("formatter"),r!=null?{interpolatedValue:r}:null)),s==null&&(s=$e(e.defaultText)?e.defaultText(i,e,r):e.defaultText);for(var l={normal:s},u=0;u<Fr.length;u++){var f=Fr[u],d=t[f];l[f]=Ae(n?n.getFormattedLabel(i,f,null,a,d&&d.get("formatter")):null,s)}return l}function hl(e,t,r,n){r=r||Eh;for(var i=e instanceof Sr,a=!1,o=0;o<sh.length;o++){var s=t[sh[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=i?e:e.getTextContent();if(a){i||(l||(l=new Sr,e.setTextContent(l)),e.stateProxy&&(l.stateProxy=e.stateProxy));var u=XA(r,t),f=t.normal,d=!!f.getShallow("show"),p=pl(f,n&&n.normal,r,!1,!i);p.text=u.normal,i||e.setTextConfig(qA(f,r,!1));for(var o=0;o<Fr.length;o++){var v=Fr[o],s=t[v];if(s){var g=l.ensureState(v),y=!!Ae(s.getShallow("show"),d);if(y!==d&&(g.ignore=!y),g.style=pl(s,n&&n[v],r,!0,!i),g.style.text=u[v],!i){var x=e.ensureState(v);x.textConfig=qA(s,r,!0)}}}l.silent=!!f.getShallow("silent"),l.style.x!=null&&(p.x=l.style.x),l.style.y!=null&&(p.y=l.style.y),l.ignore=!d,l.useStyle(p),l.dirty(),r.enableTextSetter&&(Dh(l).setLabelText=function(b){var _=XA(r,t,b);jU(l,_)})}else l&&(l.ignore=!0);e.dirty()}function Xo(e,t){t=t||"label";for(var r={normal:e.getModel(t)},n=0;n<Fr.length;n++){var i=Fr[n];r[i]=e.getModel([i,t])}return r}function pl(e,t,r,n,i){var a={};return HU(a,e,r,n,i),t&&ce(a,t),a}function qA(e,t,r){t=t||{};var n={},i,a=e.getShallow("rotate"),o=Ae(e.getShallow("distance"),r?null:5),s=e.getShallow("offset");return i=e.getShallow("position")||(r?null:"inside"),i==="outside"&&(i=t.defaultOutsidePosition||"top"),i!=null&&(n.position=i),s!=null&&(n.offset=s),a!=null&&(a*=Math.PI/180,n.rotation=a),o!=null&&(n.distance=o),n.outsideFill=e.get("color")==="inherit"?t.inheritColor||null:"auto",t.autoOverflowArea!=null&&(n.autoOverflowArea=t.autoOverflowArea),t.layoutRect!=null&&(n.layoutRect=t.layoutRect),n}function HU(e,t,r,n,i){r=r||Eh;var a=t.ecModel,o=a&&a.option.textStyle,s=VU(t),l;if(s){l={};var u="richInheritPlainLabel",f=Ae(t.get(u),a?a.get(u):void 0);for(var d in s)if(s.hasOwnProperty(d)){var p=t.getModel(["rich",d]);JA(l[d]={},p,o,t,f,r,n,i,!1,!0)}}l&&(e.rich=l);var v=t.get("overflow");v&&(e.overflow=v);var g=t.get("lineOverflow");g&&(e.lineOverflow=g);var y=e,x=t.get("minMargin");if(x!=null)x=ft(x)?x/2:0,y.margin=[x,x,x,x],y.__marginType=vl.minMargin;else{var b=t.get("textMargin");b!=null&&(y.margin=ly(b),y.__marginType=vl.textMargin)}JA(e,t,o,null,null,r,n,i,!0,!1)}function VU(e){for(var t;e&&e!==e.ecModel;){var r=(e.option||Eh).rich;if(r){t=t||{};for(var n=kt(r),i=0;i<n.length;i++){var a=n[i];t[a]=1}}e=e.parentModel}return t}var KA=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],ZA=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],QA=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function JA(e,t,r,n,i,a,o,s,l,u){r=!o&&r||Eh;var f=a&&a.inheritColor,d=t.getShallow("color"),p=t.getShallow("textBorderColor"),v=Ae(t.getShallow("opacity"),r.opacity);(d==="inherit"||d==="auto")&&(f?d=f:d=null),(p==="inherit"||p==="auto")&&(f?p=f:p=null),s||(d=d||r.color,p=p||r.textBorderColor),d!=null&&(e.fill=d),p!=null&&(e.stroke=p);var g=Ae(t.getShallow("textBorderWidth"),r.textBorderWidth);g!=null&&(e.lineWidth=g);var y=Ae(t.getShallow("textBorderType"),r.textBorderType);y!=null&&(e.lineDash=y);var x=Ae(t.getShallow("textBorderDashOffset"),r.textBorderDashOffset);x!=null&&(e.lineDashOffset=x),!o&&v==null&&!u&&(v=a&&a.defaultOpacity),v!=null&&(e.opacity=v),!o&&!s&&e.fill==null&&a.inheritColor&&(e.fill=a.inheritColor);for(var b=0;b<KA.length;b++){var _=KA[b],S=i!==!1&&n?yo(t.getShallow(_),n.getShallow(_),r[_]):Ae(t.getShallow(_),r[_]);S!=null&&(e[_]=S)}for(var b=0;b<ZA.length;b++){var _=ZA[b],S=t.getShallow(_);S!=null&&(e[_]=S)}if(e.verticalAlign==null){var T=t.getShallow("baseline");T!=null&&(e.verticalAlign=T)}if(!l||!a.disableBox){for(var b=0;b<QA.length;b++){var _=QA[b],S=t.getShallow(_);S!=null&&(e[_]=S)}var E=t.getShallow("borderType");E!=null&&(e.borderDash=E),(e.backgroundColor==="auto"||e.backgroundColor==="inherit")&&f&&(e.backgroundColor=f),(e.borderColor==="auto"||e.borderColor==="inherit")&&f&&(e.borderColor=f)}}function UU(e,t){var r=t&&t.getModel("textStyle");return ui([e.fontStyle||r&&r.getShallow("fontStyle")||"",e.fontWeight||r&&r.getShallow("fontWeight")||"",(e.fontSize||r&&r.getShallow("fontSize")||12)+"px",e.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))}var Dh=it();function $U(e,t,r,n){if(e){var i=Dh(e);i.prevValue=i.value,i.value=r;var a=t.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=n,i.statesModels=t)}}var vl={minMargin:1,textMargin:2},GU=["textStyle","color"],J0=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],ex=new Sr,WU=(function(){function e(){}return e.prototype.getTextColor=function(t){var r=this.ecModel;return this.getShallow("color")||(!t&&r?r.get(GU):null)},e.prototype.getFont=function(){return UU({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},e.prototype.getTextRect=function(t){for(var r={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<J0.length;n++)r[J0[n]]=this.getShallow(J0[n]);return ex.useStyle(r),ex.update(),ex.getBoundingRect()},e})(),eE=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],YU=ju(eE),XU=(function(){function e(){}return e.prototype.getLineStyle=function(t){return YU(this,t)},e})(),tE=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],qU=ju(tE),KU=(function(){function e(){}return e.prototype.getItemStyle=function(t,r){return qU(this,t,r)},e})(),Et=(function(){function e(t,r,n){this.parentModel=r,this.ecModel=n,this.option=t}return e.prototype.init=function(t,r,n){},e.prototype.mergeOption=function(t,r){st(this.option,t,!0)},e.prototype.get=function(t,r){return t==null?this.option:this._doGet(this.parsePath(t),!r&&this.parentModel)},e.prototype.getShallow=function(t,r){var n=this.option,i=n==null?n:n[t];if(i==null&&!r){var a=this.parentModel;a&&(i=a.getShallow(t))}return i},e.prototype.getModel=function(t,r){var n=t!=null,i=n?this.parsePath(t):null,a=n?this._doGet(i):this.option;return r=r||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new e(a,r,this.ecModel)},e.prototype.isEmpty=function(){return this.option==null},e.prototype.restoreData=function(){},e.prototype.clone=function(){var t=this.constructor;return new t(Ke(this.option))},e.prototype.parsePath=function(t){return typeof t=="string"?t.split("."):t},e.prototype.resolveParentPath=function(t){return t},e.prototype.isAnimationEnabled=function(){if(!We.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(t,r){var n=this.option;if(!t)return n;for(var i=0;i<t.length&&!(t[i]&&(n=n&&typeof n=="object"?n[t[i]]:null,n==null));i++);return n==null&&r&&(n=r._doGet(this.resolveParentPath(t),r.parentModel)),n},e})();cy(Et),sH(Et),Un(Et,XU),Un(Et,KU),Un(Et,dH),Un(Et,WU);function xc(e){return e==null?0:e.length||1}function rE(e){return e}var ZU=(function(){function e(t,r,n,i,a,o){this._old=t,this._new=r,this._oldKeyGetter=n||rE,this._newKeyGetter=i||rE,this.context=a,this._diffModeMultiple=o==="multiple"}return e.prototype.add=function(t){return this._add=t,this},e.prototype.update=function(t){return this._update=t,this},e.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},e.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},e.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},e.prototype.remove=function(t){return this._remove=t,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var t=this._old,r=this._new,n={},i=new Array(t.length),a=new Array(r.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=i[o],l=n[s],u=xc(l);if(u>1){var f=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(f,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},e.prototype._executeMultiple=function(){var t=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=n[l],f=i[l],d=xc(u),p=xc(f);if(d>1&&p===1)this._updateManyToOne&&this._updateManyToOne(f,u),i[l]=null;else if(d===1&&p>1)this._updateOneToMany&&this._updateOneToMany(f,u),i[l]=null;else if(d===1&&p===1)this._update&&this._update(f,u),i[l]=null;else if(d>1&&p>1)this._updateManyToMany&&this._updateManyToMany(f,u),i[l]=null;else if(d>1)for(var v=0;v<d;v++)this._remove&&this._remove(u[v]);else this._remove&&this._remove(u)}this._performRestAdd(o,i)},e.prototype._performRestAdd=function(t,r){for(var n=0;n<t.length;n++){var i=t[n],a=r[i],o=xc(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);r[i]=null}},e.prototype._initIndexMap=function(t,r,n,i){for(var a=this._diffModeMultiple,o=0;o<t.length;o++){var s="_ec_"+this[i](t[o],o);if(a||(n[o]=s),!!r){var l=r[s],u=xc(l);u===0?(r[s]=o,a&&n.push(s)):u===1?r[s]=[l,o]:l.push(o)}}},e})(),Jt={Must:1,Might:2,Not:3},nE=it();function QU(e){nE(e).datasetMap=Fe()}function JU(e,t,r){var n={},i=tx(t);if(!i||!e)return n;var a=[],o=[],s=t.ecModel,l=nE(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,f,d;e=e.slice(),U(e,function(y,x){var b=Ie(y)?y:e[x]={name:y};b.type==="ordinal"&&f==null&&(f=x,d=g(b)),n[b.name]=[]});var p=l.get(u)||l.set(u,{categoryWayDim:d,valueWayDim:0});U(e,function(y,x){var b=y.name,_=g(y);if(f==null){var S=p.valueWayDim;v(n[b],S,_),v(o,S,_),p.valueWayDim+=_}else if(f===x)v(n[b],0,_),v(a,0,_);else{var S=p.categoryWayDim;v(n[b],S,_),v(o,S,_),p.categoryWayDim+=_}});function v(y,x,b){for(var _=0;_<b;_++)y.push(x+_)}function g(y){var x=y.dimsDef;return x?x.length:1}return a.length&&(n.itemName=a),o.length&&(n.seriesName=o),n}function e7(e,t,r){var n={},i=tx(e);if(!i)return n;var a=t.sourceFormat,o=t.dimensionsDefine,s;(a===Sn||a===$n)&&U(o,function(f,d){(Ie(f)?f.name:f)==="name"&&(s=d)});var l=(function(){for(var f={},d={},p=[],v=0,g=Math.min(5,r);v<g;v++){var y=aE(t.data,a,t.seriesLayoutBy,o,t.startIndex,v);p.push(y);var x=y===Jt.Not;if(x&&f.v==null&&v!==s&&(f.v=v),(f.n==null||f.n===f.v||!x&&p[f.n]===Jt.Not)&&(f.n=v),b(f)&&p[f.n]!==Jt.Not)return f;x||(y===Jt.Might&&d.v==null&&v!==s&&(d.v=v),(d.n==null||d.n===d.v)&&(d.n=v))}function b(_){return _.v!=null&&_.n!=null}return b(f)?f:b(d)?d:null})();if(l){n.value=[l.v];var u=s??l.n;n.itemName=[u],n.seriesName=[u]}return n}function tx(e){var t=e.get("data",!0);if(!t)return oc(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},_n).models[0]}function t7(e){return!e.get("transform",!0)&&!e.get("fromTransformResult",!0)?[]:oc(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},_n).models}function iE(e,t){return aE(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function aE(e,t,r,n,i,a){var o,s=5;if(Nr(e))return Jt.Not;var l,u;if(n){var f=n[a];Ie(f)?(l=f.name,u=f.type):Me(f)&&(l=f)}if(u!=null)return u==="ordinal"?Jt.Must:Jt.Not;if(t===cr){var d=e;if(r===Uo){for(var p=d[a],v=0;v<(p||[]).length&&v<s;v++)if((o=T(p[i+v]))!=null)return o}else for(var v=0;v<d.length&&v<s;v++){var g=d[i+v];if(g&&(o=T(g[a]))!=null)return o}}else if(t===Sn){var y=e;if(!l)return Jt.Not;for(var v=0;v<y.length&&v<s;v++){var x=y[v];if(x&&(o=T(x[l]))!=null)return o}}else if(t===$n){var b=e;if(!l)return Jt.Not;var p=b[l];if(!p||Nr(p))return Jt.Not;for(var v=0;v<p.length&&v<s;v++)if((o=T(p[v]))!=null)return o}else if(t===Jr)for(var _=e,v=0;v<_.length&&v<s;v++){var x=_[v],S=nc(x);if(!pe(S))return Jt.Not;if((o=T(S[a]))!=null)return o}function T(E){var D=Me(E);if(E!=null&&isFinite(Number(E))&&E!=="")return D?Jt.Might:Jt.Not;if(D&&E!=="-")return Jt.Must}return Jt.Not}var Mh=(function(){function e(t){this.data=t.data||(t.sourceFormat===$n?{}:[]),this.sourceFormat=t.sourceFormat||tA,this.seriesLayoutBy=t.seriesLayoutBy||_i,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var r=this.dimensionsDefine=t.dimensionsDefine;if(r)for(var n=0;n<r.length;n++){var i=r[n];i.type==null&&iE(this,n)===Jt.Must&&(i.type="ordinal")}}return e})();function rx(e){return e instanceof Mh}function nx(e,t,r){r=r||sE(e);var n=t.seriesLayoutBy,i=n7(e,r,n,t.sourceHeader,t.dimensions),a=new Mh({data:e,sourceFormat:r,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:Ke(t)});return a}function oE(e){return new Mh({data:e,sourceFormat:Nr(e)?Sa:Jr})}function r7(e){return new Mh({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:Ke(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function sE(e){var t=tA;if(Nr(e))t=Sa;else if(pe(e)){e.length===0&&(t=cr);for(var r=0,n=e.length;r<n;r++){var i=e[r];if(i!=null){if(pe(i)||Nr(i)){t=cr;break}else if(Ie(i)){t=Sn;break}}}}else if(Ie(e)){for(var a in e)if(_r(e,a)&&Pr(e[a])){t=$n;break}}return t}function n7(e,t,r,n,i){var a,o;if(!e)return{dimensionsDefine:lE(i),startIndex:o,dimensionsDetectedCount:a};if(t===cr){var s=e;n==="auto"||n==null?uE(function(u){u!=null&&u!=="-"&&(Me(u)?o==null&&(o=1):o=0)},r,s,10):o=ft(n)?n:n?1:0,!i&&o===1&&(i=[],uE(function(u,f){i[f]=u!=null?u+"":""},r,s,1/0)),a=i?i.length:r===Uo?s.length:s[0]?s[0].length:null}else if(t===Sn)i||(i=i7(e));else if(t===$n)i||(i=[],U(e,function(u,f){i.push(f)}));else if(t===Jr){var l=nc(e[0]);a=pe(l)&&l.length||1}return{startIndex:o,dimensionsDefine:lE(i),dimensionsDetectedCount:a}}function i7(e){for(var t=0,r;t<e.length&&!(r=e[t++]););if(r)return kt(r)}function lE(e){if(e){var t=Fe();return De(e,function(r,n){r=Ie(r)?r:{name:r};var i={name:r.name,displayName:r.displayName,type:r.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var a=t.get(i.name);return a?i.name+="-"+a.count++:t.set(i.name,{count:1}),i})}}function uE(e,t,r,n){if(t===Uo)for(var i=0;i<r.length&&i<n;i++)e(r[i]?r[i][0]:null,i);else for(var a=r[0]||[],i=0;i<a.length&&i<n;i++)e(a[i],i)}function cE(e){var t=e.sourceFormat;return t===Sn||t===$n}var qo,Ko,Zo,Qo,fE,dE,hE=(function(){function e(t,r){var n=rx(t)?t:oE(t);this._source=n;var i=this._data=n.data,a=n.sourceFormat;n.seriesLayoutBy,a===Sa&&(this._offset=0,this._dimSize=r,this._data=i),dE(this,i,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(t,r){},e.prototype.appendData=function(t){},e.prototype.clean=function(){},e.protoInitialize=(function(){var t=e.prototype;t.pure=!1,t.persistent=!0})(),e.internalField=(function(){var t;dE=function(o,s,l){var u=l.sourceFormat,f=l.seriesLayoutBy,d=l.startIndex,p=l.dimensionsDefine,v=fE[ax(u,f)];if(ce(o,v),u===Sa)o.getItem=r,o.count=i,o.fillStorage=n;else{var g=vE(u,f);o.getItem=pt(g,null,s,d,p);var y=mE(u,f);o.count=pt(y,null,s,d,p)}};var r=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,f=u*o,d=0;d<u;d++)s[d]=l[f+d];return s},n=function(o,s,l,u){for(var f=this._data,d=this._dimSize,p=0;p<d;p++){for(var v=u[p],g=v[0]==null?1/0:v[0],y=v[1]==null?-1/0:v[1],x=s-o,b=l[p],_=0;_<x;_++){var S=f[_*d+p];b[o+_]=S,S<g&&(g=S),S>y&&(y=S)}v[0]=g,v[1]=y}},i=function(){return this._data?this._data.length/this._dimSize:0};fE=(t={},t[cr+"_"+_i]={pure:!0,appendData:a},t[cr+"_"+Uo]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Sn]={pure:!0,appendData:a},t[$n]={pure:!0,appendData:function(o){var s=this._data;U(o,function(l,u){for(var f=s[u]||(s[u]=[]),d=0;d<(l||[]).length;d++)f.push(l[d])})}},t[Jr]={appendData:a},t[Sa]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}})(),e})(),Lh=function(e){pe(e)||UT("series.data or dataset.source must be an array.")};qo={},qo[cr+"_"+_i]=Lh,qo[cr+"_"+Uo]=Lh,qo[Sn]=Lh,qo[$n]=function(e,t){for(var r=0;r<t.length;r++){var n=t[r].name;n==null&&UT("dimension name must not be null/undefined.")}},qo[Jr]=Lh;var pE=function(e,t,r,n){return e[n]},a7=(Ko={},Ko[cr+"_"+_i]=function(e,t,r,n){return e[n+t]},Ko[cr+"_"+Uo]=function(e,t,r,n,i){n+=t;for(var a=i||[],o=e,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[n]:null}return a},Ko[Sn]=pE,Ko[$n]=function(e,t,r,n,i){for(var a=i||[],o=0;o<r.length;o++){var s=r[o].name,l=s!=null?e[s]:null;a[o]=l?l[n]:null}return a},Ko[Jr]=pE,Ko);function vE(e,t){var r=a7[ax(e,t)];return r}var gE=function(e,t,r){return e.length},o7=(Zo={},Zo[cr+"_"+_i]=function(e,t,r){return Math.max(0,e.length-t)},Zo[cr+"_"+Uo]=function(e,t,r){var n=e[0];return n?Math.max(0,n.length-t):0},Zo[Sn]=gE,Zo[$n]=function(e,t,r){var n=r[0].name,i=n!=null?e[n]:null;return i?i.length:0},Zo[Jr]=gE,Zo);function mE(e,t){var r=o7[ax(e,t)];return r}var ix=function(e,t,r){return e[t]},s7=(Qo={},Qo[cr]=ix,Qo[Sn]=function(e,t,r){return e[r]},Qo[$n]=ix,Qo[Jr]=function(e,t,r){var n=nc(e);return n instanceof Array?n[t]:n},Qo[Sa]=ix,Qo);function yE(e){var t=s7[e];return t}function ax(e,t){return e===cr?e+"_"+t:e}function gl(e,t,r){if(e){var n=e.getRawDataItem(t);if(n!=null){var i=e.getStore(),a=i.getSource().sourceFormat;if(r!=null){var o=e.getDimensionIndex(r),s=i.getDimensionProperty(o);return yE(a)(n,o,s)}else{var l=n;return a===Jr&&(l=nc(n)),l}}}}var l7=(function(){function e(t,r){this._encode=t,this._schema=r}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e})();function u7(e,t){var r={},n=r.encode={},i=Fe(),a=[],o=[],s={};U(e.dimensions,function(p){var v=e.getDimensionInfo(p),g=v.coordDim;if(g){var y=v.coordDimIndex;ox(n,g)[y]=p,v.isExtraCoord||(i.set(g,1),f7(v.type)&&(a[0]=p),ox(s,g)[y]=e.getDimensionIndex(v.name)),v.defaultTooltip&&o.push(p)}eA.each(function(x,b){var _=ox(n,b),S=v.otherDims[b];S!=null&&S!==!1&&(_[S]=v.name)})});var l=[],u={};i.each(function(p,v){var g=n[v];u[v]=g[0],l=l.concat(g)}),r.dataDimsOnCoord=l,r.dataDimIndicesOnCoord=De(l,function(p){return e.getDimensionInfo(p).storeDimIndex}),r.encodeFirstDimNotExtra=u;var f=n.label;f&&f.length&&(a=f.slice());var d=n.tooltip;return d&&d.length?o=d.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,r.userOutput=new l7(s,t),r}function ox(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function c7(e){return e==="category"?"ordinal":e==="time"?"time":"float"}function f7(e){return!(e==="ordinal"||e==="time")}var Ih=(function(){function e(t){this.otherDims={},t!=null&&ce(this,t)}return e})();function ml(e,t){var r=t&&t.type;return r==="ordinal"?e:(r==="time"&&!ft(e)&&e!=null&&e!=="-"&&(e=+al(e)),e==null||e===""?NaN:Number(e))}Fe({number:function(e){return parseFloat(e)},time:function(e){return+al(e)},trim:function(e){return Me(e)?ui(e):e}});var d7=(function(){function e(t,r){var n=t==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return e.prototype.evaluate=function(t,r){var n=ft(t)?t:nh(t),i=ft(r)?r:nh(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=Me(t),l=Me(r);s&&(n=l?t:0),l&&(i=s?r:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},e})();function xE(e){var t="",r=-1/0,n=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+="G"+e.g,r=e.g),e.ge!=null&&(t+="GE"+e.ge,n=e.ge),e.l!=null&&(t+="L"+e.l,i=e.l),e.le!=null&&(t+="LE"+e.le,a=e.le)),{key:t,g:r,ge:n,l:i,le:a}}function bE(e,t){return t>e.g&&t>=e.ge&&t<e.l&&t<=e.le}var h7=typeof Uint32Array===sl?Array:Uint32Array,p7=typeof Uint16Array===sl?Array:Uint16Array,wE=typeof Int32Array===sl?Array:Int32Array,_E=typeof Float64Array===sl?Array:Float64Array,kE={float:_E,int:wE,ordinal:Array,number:Array,time:_E},sx;function yl(e){return e>65535?h7:p7}function v7(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function SE(e,t,r,n,i){var a=kE[r||"float"];if(i){var o=e[t],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;u<s;u++)l[u]=o[u];e[t]=l}}else e[t]=new a(n)}var lx=(function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Fe()}return e.prototype.initData=function(t,r,n){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=t.getSource(),a=this.defaultDimValueGetter=sx[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[],cE(i),this._dimensions=De(r,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,t.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(t,r){var n=this._calcDimNameToIdx,i=this._dimensions,a=n.get(t);if(a!=null){if(i[a].type===r)return a}else a=i.length;return i[a]={type:r},n.set(t,a),this._chunks[a]=new kE[r||"float"](this._rawCount),this._rawExtent[a]=kn(),a},e.prototype.collectOrdinalMeta=function(t,r){var n=this._chunks[t],i=this._dimensions[t],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[t]=kn());for(var l=a[t],u=o;u<s;u++){var f=n[u]=r.parseAndCollect(n[u]);isNaN(f)||(l[0]=Math.min(f,l[0]),l[1]=Math.max(f,l[1]))}i.ordinalMeta=r,i.ordinalOffset=s,i.type="ordinal"},e.prototype.getOrdinalMeta=function(t){var r=this._dimensions[t],n=r.ordinalMeta;return n},e.prototype.getDimensionProperty=function(t){var r=this._dimensions[t];return r&&r.property},e.prototype.appendData=function(t){var r=this._provider,n=this.count();r.appendData(t);var i=r.count();return r.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},e.prototype.appendValues=function(t,r){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,r||0),u=0;u<a;u++){var f=i[u];SE(n,u,f.type,l,!0)}for(var d=[],p=s;p<l;p++)for(var v=p-s,g=0;g<a;g++){var f=i[g],y=sx.arrayRows.call(this,t[v]||d,f.property,v,g);n[g][p]=y;var x=o[g];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}return this._rawCount=this._count=l,{start:s,end:l}},e.prototype._initDataFromProvider=function(t,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=De(o,function(_){return _.property}),f=0;f<s;f++){var d=o[f];l[f]||(l[f]=kn()),SE(a,f,d.type,r,n)}if(i.fillStorage)i.fillStorage(t,r,a,l);else for(var p=[],v=t;v<r;v++){p=i.getItem(v,p);for(var g=0;g<s;g++){var y=a[g],x=this._dimValueGetter(p,u[g],v,g);y[v]=x;var b=l[g];x<b[0]&&(b[0]=x),x>b[1]&&(b[1]=x)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(t,r){if(!(r>=0&&r<this._count))return NaN;var n=this._chunks[t];return n?n[this.getRawIndex(r)]:NaN},e.prototype.getValues=function(t,r){var n=[],i=[];if(r==null){r=t,t=[];for(var a=0;a<this._dimensions.length;a++)i.push(a)}else i=t;for(var a=0,o=i.length;a<o;a++)n.push(this.get(i[a],r));return n},e.prototype.getByRawIndex=function(t,r){if(!(r>=0&&r<this._rawCount))return NaN;var n=this._chunks[t];return n?n[r]:NaN},e.prototype.getSum=function(t){var r=this._chunks[t],n=0;if(r)for(var i=0,a=this.count();i<a;i++){var o=this.get(t,i);isNaN(o)||(n+=o)}return n},e.prototype.getMedian=function(t){var r=[];this.each([t],function(i){isNaN(i)||r.push(i)}),f0(r);var n=this.count();return n===0?0:n%2===1?r[(n-1)/2]:(r[n/2]+r[n/2-1])/2},e.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var r=this._indices,n=r[t];if(n!=null&&n<this._count&&n===t)return t;for(var i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(r[o]<t)i=o+1;else if(r[o]>t)a=o-1;else return o}return-1},e.prototype.getIndices=function(){var t,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){t=new n(i);for(var a=0;a<i;a++)t[a]=r[a]}else t=new n(r.buffer,0,i)}else{var n=yl(this._rawCount);t=new n(this.count());for(var a=0;a<t.length;a++)t[a]=a}return t},e.prototype.filter=function(t,r){if(!this._count)return this;for(var n=this.clone(),i=n.count(),a=yl(n._rawCount),o=new a(i),s=[],l=t.length,u=0,f=t[0],d=n._chunks,p=0;p<i;p++){var v=void 0,g=n.getRawIndex(p);if(l===0)v=r(p);else if(l===1){var y=d[f][g];v=r(y,p)}else{for(var x=0;x<l;x++)s[x]=d[t[x]][g];s[x]=p,v=r.apply(null,s)}v&&(o[u++]=g)}return u<i&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(t){var r=this.clone(),n=r._count;if(!n)return this;var i=kt(t),a=i.length;if(!a)return this;var o=r.count(),s=yl(r._rawCount),l=new s(o),u=0,f=i[0],d=t[f][0],p=t[f][1],v=r._chunks,g=!1;if(!r._indices){var y=0;if(a===1){for(var x=v[i[0]],b=0;b<n;b++){var _=x[b];(_>=d&&_<=p||isNaN(_))&&(l[u++]=y),y++}g=!0}else if(a===2){for(var x=v[i[0]],S=v[i[1]],T=t[i[1]][0],E=t[i[1]][1],b=0;b<n;b++){var _=x[b],D=S[b];(_>=d&&_<=p||isNaN(_))&&(D>=T&&D<=E||isNaN(D))&&(l[u++]=y),y++}g=!0}}if(!g)if(a===1)for(var b=0;b<o;b++){var L=r.getRawIndex(b),_=v[i[0]][L];(_>=d&&_<=p||isNaN(_))&&(l[u++]=L)}else for(var b=0;b<o;b++){for(var R=!0,L=r.getRawIndex(b),O=0;O<a;O++){var M=i[O],_=v[M][L];(_<t[M][0]||_>t[M][1])&&(R=!1)}R&&(l[u++]=r.getRawIndex(b))}return u<o&&(r._indices=l),r._count=u,r._extent=[],r._updateGetRawIdx(),r},e.prototype.map=function(t,r){var n=this.clone(t);return this._updateDims(n,t,r),n},e.prototype.modify=function(t,r){this._updateDims(this,t,r)},e.prototype._updateDims=function(t,r,n){for(var i=t._chunks,a=[],o=r.length,s=t.count(),l=[],u=t._rawExtent,f=0;f<r.length;f++)u[r[f]]=kn();for(var d=0;d<s;d++){for(var p=t.getRawIndex(d),v=0;v<o;v++)l[v]=i[r[v]][p];l[o]=d;var g=n&&n.apply(null,l);if(g!=null){typeof g!="object"&&(a[0]=g,g=a);for(var f=0;f<g.length;f++){var y=r[f],x=g[f],b=u[y],_=i[y];_&&(_[p]=x),x<b[0]&&(b[0]=x),x>b[1]&&(b[1]=x)}}}},e.prototype.lttbDownSample=function(t,r){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),f,d,p,v=new(yl(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var g=1;g<o-1;g+=l){for(var y=Math.min(g+l,o-1),x=Math.min(g+l*2,o),b=(x+y)/2,_=0,S=y;S<x;S++){var T=this.getRawIndex(S),E=a[T];isNaN(E)||(_+=E)}_/=x-y;var D=g,L=Math.min(g+l,o),R=g-1,O=a[u];f=-1,p=D;for(var M=-1,P=0,S=D;S<L;S++){var T=this.getRawIndex(S),E=a[T];if(isNaN(E)){P++,M<0&&(M=T);continue}d=Math.abs((R-b)*(E-O)-(R-S)*(_-O)),d>f&&(f=d,p=T)}P>0&&P<L-D&&(v[s++]=Math.min(M,p),p=Math.max(M,p)),v[s++]=p,u=p}return v[s++]=this.getRawIndex(o-1),n._count=s,n._indices=v,n.getRawIndex=this._getRawIdx,n},e.prototype.minmaxDownSample=function(t,r){for(var n=this.clone([t],!0),i=n._chunks,a=Math.floor(1/r),o=i[t],s=this.count(),l=new(yl(this._rawCount))(Math.ceil(s/a)*2),u=0,f=0;f<s;f+=a){var d=f,p=o[this.getRawIndex(d)],v=f,g=o[this.getRawIndex(v)],y=a;f+a>s&&(y=s-f);for(var x=0;x<y;x++){var b=this.getRawIndex(f+x),_=o[b];_<p&&(p=_,d=f+x),_>g&&(g=_,v=f+x)}var S=this.getRawIndex(d),T=this.getRawIndex(v);d<v?(l[u++]=S,l[u++]=T):(l[u++]=T,l[u++]=S)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},e.prototype.downSample=function(t,r,n,i){for(var a=this.clone([t],!0),o=a._chunks,s=[],l=Math.floor(1/r),u=o[t],f=this.count(),d=a._rawExtent[t]=kn(),p=new(yl(this._rawCount))(Math.ceil(f/l)),v=0,g=0;g<f;g+=l){l>f-g&&(l=f-g,s.length=l);for(var y=0;y<l;y++){var x=this.getRawIndex(g+y);s[y]=u[x]}var b=n(s),_=this.getRawIndex(Math.min(g+i(s,b)||0,f-1));u[_]=b,b<d[0]&&(d[0]=b),b>d[1]&&(d[1]=b),p[v++]=_}return a._count=v,a._indices=p,a._updateGetRawIdx(),a},e.prototype.each=function(t,r){if(this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(n){case 0:r(a);break;case 1:r(i[t[0]][s],a);break;case 2:r(i[t[0]][s],i[t[1]][s],a);break;default:for(var l=0,u=[];l<n;l++)u[l]=i[t[l]][s];u[l]=a,r.apply(null,u)}}},e.prototype.getDataExtent=function(t,r){var n=this._chunks[t],i=kn();if(!n)return i;var a=this.count(),o=!this._indices&&!r;if(o)return this._rawExtent[t].slice();var s=this._extent,l=s[t]||(s[t]={}),u=xE(r),f=u.key,d=l[f];if(d)return d.slice();for(var p=i[0],v=i[1],g=0;g<a;g++){var y=this.getRawIndex(g),x=n[y];(!r||bE(u,x))&&(x<p&&(p=x),x>v&&(v=x))}return l[f]=[p,v]},e.prototype.getRawDataItem=function(t){var r=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][r]);return n},e.prototype.clone=function(t,r){var n=new e,i=this._chunks,a=t&&ga(t,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?v7(i[o]):i[o];else n._chunks=i;return this._copyCommonProps(n),r||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},e.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=Ke(this._extent),t._rawExtent=Ke(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,r=void 0;if(t===Array){var n=this._indices.length;r=new t(n);for(var i=0;i<n;i++)r[i]=this._indices[i]}else r=new t(this._indices);return r}return null},e.prototype._getRawIdxIdentity=function(t){return t},e.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=(function(){function t(r,n,i,a){return ml(r[a],this._dimensions[a])}sx={arrayRows:t,objectRows:function(r,n,i,a){return ml(r[n],this._dimensions[a])},keyedColumns:t,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return ml(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}})(),e})(),g7=it(),m7={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},CE=(function(){function e(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=AE(this.source)))},e.prototype.getSourceDimensionIndex=function(t){return Ae(this._dimNameMap.get(t),-1)},e.prototype.getSourceDimension=function(t){var r=this.source.dimensionsDefine;if(r)return r[t]},e.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,r=cE(this.source),n=!EE(t),i="",a=[],o=0,s=0;o<t;o++){var l=void 0,u=void 0,f=void 0,d=this.dimensions[s];if(d&&d.storeDimIndex===o)l=r?d.name:null,u=d.type,f=d.ordinalMeta,s++;else{var p=this.getSourceDimension(o);p&&(l=r?p.name:null,u=p.type)}a.push({property:l,type:u,ordinalMeta:f}),r&&l!=null&&(!d||!d.isCalculationCoord)&&(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=m7[u]||"f",f&&(i+=f.uid),i+="$"}var v=this.source,g=[v.seriesLayoutBy,v.startIndex,i].join("$$");return{dimensions:a,hash:g}},e.prototype.makeOutputDimensionNames=function(){for(var t=[],r=0,n=0;r<this._fullDimCount;r++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===r)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(r);o&&(i=o.name)}t.push(i)}return t},e.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e})();function TE(e){return e instanceof CE}function ux(e){for(var t=Fe(),r=0;r<(e||[]).length;r++){var n=e[r],i=Ie(n)?n.name:n;i!=null&&t.get(i)==null&&t.set(i,r)}return t}function AE(e){var t=g7(e);return t.dimNameMap||(t.dimNameMap=ux(e.dimensionsDefine))}function EE(e){return e>30}var bc=Ie,Aa=De,y7=typeof Int32Array>"u"?Array:Int32Array,x7="e\0\0",DE=-1,b7=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],w7=["_approximateExtent"],ME,Ph,wc,_c,cx,kc,fx,Sc=(function(){function e(t,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;TE(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},f=0;f<n.length;f++){var d=n[f],p=Me(d)?new Ih({name:d}):d instanceof Ih?d:new Ih(d),v=p.name;p.type=p.type||"float",p.coordDim||(p.coordDim=v,p.coordDimIndex=0);var g=p.otherDims=p.otherDims||{};o.push(v),a[v]=p,u[v]!=null&&(l=!0),p.createInvertedIndices&&(s[v]=[]),i&&(p.storeDimIndex=f),g.itemName===0&&(this._nameDimIdx=p.storeDimIndex),g.itemId===0&&(this._idDimIdx=p.storeDimIndex)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=r,this._invertedIndicesMap=s,this._dimOmitted){var y=this._dimIdxToName=Fe();U(o,function(x){y.set(a[x].storeDimIndex,x)})}}return e.prototype.getDimension=function(t){var r=this._recognizeDimIndex(t);if(r==null)return t;if(r=t,!this._dimOmitted)return this.dimensions[r];var n=this._dimIdxToName.get(r);if(n!=null)return n;var i=this._schema.getSourceDimension(r);if(i)return i.name},e.prototype.getDimensionIndex=function(t){var r=this._recognizeDimIndex(t);if(r!=null)return r;if(t==null)return-1;var n=this._getDimInfo(t);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},e.prototype._recognizeDimIndex=function(t){if(ft(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},e.prototype._getStoreDimIndex=function(t){var r=this.getDimensionIndex(t);return r},e.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},e.prototype._initGetDimensionInfo=function(t){var r=this._dimInfos;this._getDimInfo=t?function(n){return r.hasOwnProperty(n)?r[n]:void 0}:function(n){return r[n]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(t,r){var n=this._dimSummary;if(r==null)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return i?i[r]:null},e.prototype.mapDimensionsAll=function(t){var r=this._dimSummary,n=r.encode[t];return(n||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(t,r,n){var i=this,a;if(t instanceof lx&&(a=t),!a){var o=this.dimensions,s=rx(t)||Pr(t)?new hE(t,o.length):t;a=new lx;var l=Aa(o,function(u){return{type:i._dimInfos[u].type,property:u}});a.initData(s,l,n)}this._store=a,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=u7(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(t){var r=this._store.appendData(t);this._doInit(r[0],r[1])},e.prototype.appendValues=function(t,r){var n=this._store.appendValues(t,r&&r.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),r)for(var s=i;s<a;s++){var l=s-i;this._nameList[s]=r[l],o&&fx(this,s)}},e.prototype._updateOrdinalMeta=function(){for(var t=this._store,r=this.dimensions,n=0;n<r.length;n++){var i=this._dimInfos[r[n]];i.ordinalMeta&&t.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==Sa&&!t.fillStorage},e.prototype._doInit=function(t,r){if(!(t>=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Jr;if(l&&!i.pure)for(var u=[],f=t;f<r;f++){var d=i.getItem(f,u);if(!this.hasItemOption&&K9(d)&&(this.hasItemOption=!0),d){var p=d.name;a[f]==null&&p!=null&&(a[f]=wi(p,null));var v=d.id;o[f]==null&&v!=null&&(o[f]=wi(v,null))}}if(this._shouldMakeIdFromName())for(var f=t;f<r;f++)fx(this,f);ME(this)}},e.prototype.getApproximateExtent=function(t,r){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t),r)},e.prototype.setApproximateExtent=function(t,r){r=this.getDimension(r),this._approximateExtent[r]=t.slice()},e.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},e.prototype.setCalculationInfo=function(t,r){bc(t)?ce(this._calculationInfo,t):this._calculationInfo[t]=r},e.prototype.getName=function(t){var r=this.getRawIndex(t),n=this._nameList[r];return n==null&&this._nameDimIdx!=null&&(n=wc(this,this._nameDimIdx,r)),n==null&&(n=""),n},e.prototype._getCategory=function(t,r){var n=this._store.get(t,r),i=this._store.getOrdinalMeta(t);return i?i.categories[n]:n},e.prototype.getId=function(t){return Ph(this,this.getRawIndex(t))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(t,r){var n=this._store,i=this._dimInfos[t];if(i)return n.get(i.storeDimIndex,r)},e.prototype.getByRawIndex=function(t,r){var n=this._store,i=this._dimInfos[t];if(i)return n.getByRawIndex(i.storeDimIndex,r)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t),null)},e.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},e.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},e.prototype.getValues=function(t,r){var n=this,i=this._store;return pe(t)?i.getValues(Aa(t,function(a){return n._getStoreDimIndex(a)}),r):i.getValues(t)},e.prototype.hasValue=function(t){for(var r=this._dimSummary.dataDimIndicesOnCoord,n=0,i=r.length;n<i;n++)if(isNaN(this._store.get(r[n],t)))return!1;return!0},e.prototype.indexOfName=function(t){for(var r=0,n=this._store.count();r<n;r++)if(this.getName(r)===t)return r;return-1},e.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},e.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},e.prototype.rawIndexOf=function(t,r){var n=t&&this._invertedIndicesMap[t],i=n&&n[r];return i==null||isNaN(i)?DE:i},e.prototype.each=function(t,r,n){$e(t)&&(n=r,r=t,t=[]);var i=n||this,a=Aa(_c(t),this._getStoreDimIndex,this);this._store.each(a,i?pt(r,i):r)},e.prototype.filterSelf=function(t,r,n){$e(t)&&(n=r,r=t,t=[]);var i=n||this,a=Aa(_c(t),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?pt(r,i):r),this},e.prototype.selectRange=function(t){var r=this,n={},i=kt(t);return U(i,function(a){var o=r._getStoreDimIndex(a);n[o]=t[a]}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(t,r,n){$e(t)&&(n=r,r=t,t=[]),n=n||this;var i=[];return this.each(t,function(){i.push(r&&r.apply(this,arguments))},n),i},e.prototype.map=function(t,r,n,i){var a=n||i||this,o=Aa(_c(t),this._getStoreDimIndex,this),s=kc(this);return s._store=this._store.map(o,a?pt(r,a):r),s},e.prototype.modify=function(t,r,n,i){var a=n||i||this,o=Aa(_c(t),this._getStoreDimIndex,this);this._store.modify(o,a?pt(r,a):r)},e.prototype.downSample=function(t,r,n,i){var a=kc(this);return a._store=this._store.downSample(this._getStoreDimIndex(t),r,n,i),a},e.prototype.minmaxDownSample=function(t,r){var n=kc(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),r),n},e.prototype.lttbDownSample=function(t,r){var n=kc(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(t),r),n},e.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},e.prototype.getItemModel=function(t){var r=this.hostModel,n=this.getRawDataItem(t);return new Et(n,r,r&&r.ecModel)},e.prototype.diff=function(t){var r=this;return new ZU(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(n){return Ph(t,n)},function(n){return Ph(r,n)})},e.prototype.getVisual=function(t){var r=this._visual;return r&&r[t]},e.prototype.setVisual=function(t,r){this._visual=this._visual||{},bc(t)?ce(this._visual,t):this._visual[t]=r},e.prototype.getItemVisual=function(t,r){var n=this._itemVisuals[t],i=n&&n[r];return i??this.getVisual(r)},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(t,r){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[r];return a==null&&(a=this.getVisual(r),pe(a)?a=a.slice():bc(a)&&(a=ce({},a)),i[r]=a),a},e.prototype.setItemVisual=function(t,r,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,bc(r)?ce(i,r):i[r]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,r){bc(t)?ce(this._layout,t):this._layout[t]=r},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,r,n){this._itemLayouts[t]=n?ce(this._itemLayouts[t]||{},r):r},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,r){var n=this.hostModel&&this.hostModel.seriesIndex;xV(n,this.dataType,t,r),this._graphicEls[t]=r},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,r){U(this._graphicEls,function(n,i){n&&t&&t.call(r,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:Aa(this.dimensions,this._getDimInfo,this),this.hostModel)),cx(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,r){var n=this[t];$e(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(sy(arguments)))})},e.internalField=(function(){ME=function(t){var r=t._invertedIndicesMap;U(r,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=r[i]=new y7(o.categories.length);for(var l=0;l<n.length;l++)n[l]=DE;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},wc=function(t,r,n){return wi(t._getCategory(r,n),null)},Ph=function(t,r){var n=t._idList[r];return n==null&&t._idDimIdx!=null&&(n=wc(t,t._idDimIdx,r)),n==null&&(n=x7+r),n},_c=function(t){return pe(t)||(t=t!=null?[t]:[]),t},kc=function(t){var r=new e(t._schema?t._schema:Aa(t.dimensions,t._getDimInfo,t),t.hostModel);return cx(r,t),r},cx=function(t,r){U(b7.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(t[n]=r[n])}),t.__wrappedMethods=r.__wrappedMethods,U(w7,function(n){t[n]=Ke(r[n])}),t._calculationInfo=ce({},r._calculationInfo)},fx=function(t,r){var n=t._nameList,i=t._idList,a=t._nameDimIdx,o=t._idDimIdx,s=n[r],l=i[r];if(s==null&&a!=null&&(n[r]=s=wc(t,a,r)),l==null&&o!=null&&(i[r]=l=wc(t,o,r)),l==null&&s!=null){var u=t._nameRepeatCount,f=u[s]=(u[s]||0)+1;l=s,f>1&&(l+="__ec__"+f),i[r]=l}}})(),e})();function LE(e,t){rx(e)||(e=oE(e)),t=t||{};var r=t.coordDimensions||[],n=t.dimensionsDefine||e.dimensionsDefine||[],i=Fe(),a=[],o=_7(e,r,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&EE(o),l=n===e.dimensionsDefine,u=l?AE(e):ux(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(e,o));for(var d=Fe(f),p=new wE(o),v=0;v<p.length;v++)p[v]=-1;function g(O){var M=p[O];if(M<0){var P=n[O],j=Ie(P)?P:{name:P},B=new Ih,$=j.name;$!=null&&u.get($)!=null&&(B.name=B.displayName=$),j.type!=null&&(B.type=j.type),j.displayName!=null&&(B.displayName=j.displayName);var K=a.length;return p[O]=K,B.storeDimIndex=O,a.push(B),B}return a[M]}if(!s)for(var v=0;v<o;v++)g(v);d.each(function(O,M){var P=Cr(O).slice();if(P.length===1&&!Me(P[0])&&P[0]<0){d.set(M,!1);return}var j=d.set(M,[]);U(P,function(B,$){var K=Me(B)?u.get(B):B;K!=null&&K<o&&(j[$]=K,x(g(K),M,$))})});var y=0;U(r,function(O){var M,P,j,B;if(Me(O))M=O,B={};else{B=O,M=B.name;var $=B.ordinalMeta;B.ordinalMeta=null,B=ce({},B),B.ordinalMeta=$,P=B.dimsDef,j=B.otherDims,B.name=B.coordDim=B.coordDimIndex=B.dimsDef=B.otherDims=null}var K=d.get(M);if(K!==!1){if(K=Cr(K),!K.length)for(var Z=0;Z<(P&&P.length||1);Z++){for(;y<o&&g(y).coordDim!=null;)y++;y<o&&K.push(y++)}U(K,function(re,Y){var G=g(re);if(l&&B.type!=null&&(G.type=B.type),x(ct(G,B),M,Y),G.name==null&&P){var I=P[Y];!Ie(I)&&(I={name:I}),G.name=G.displayName=I.name,G.defaultTooltip=I.defaultTooltip}j&&ct(G.otherDims,j)})}});function x(O,M,P){eA.get(M)!=null?O.otherDims[M]=P:(O.coordDim=M,O.coordDimIndex=P,i.set(M,!0))}var b=t.generateCoord,_=t.generateCoordCount,S=_!=null;_=b?_||1:0;var T=b||"value";function E(O){O.name==null&&(O.name=O.coordDim)}if(s)U(a,function(O){E(O)}),a.sort(function(O,M){return O.storeDimIndex-M.storeDimIndex});else for(var D=0;D<o;D++){var L=g(D),R=L.coordDim;R==null&&(L.coordDim=k7(T,i,S),L.coordDimIndex=0,(!b||_<=0)&&(L.isExtraCoord=!0),_--),E(L),L.type==null&&(iE(e,D)===Jt.Must||L.isExtraCoord&&(L.otherDims.itemName!=null||L.otherDims.seriesName!=null))&&(L.type="ordinal")}return x0(a,function(O){return O.name},function(O,M){M>0&&(O.name=O.name+(M-1))}),new CE({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function _7(e,t,r,n){var i=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,n||0);return U(t,function(a){var o;Ie(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function k7(e,t,r){if(r||t.hasKey(e)){for(var n=0;t.hasKey(e+n);)n++;e+=n}return t.set(e,!0),e}var Nh={},dx={},hx=(function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(t,r){this._nonSeriesBoxMasterList=n(Nh),this._normalMasterList=n(dx);function n(i,a){var o=[];return U(i,function(s,l){var u=s.create(t,r);o=o.concat(u||[])}),o}},e.prototype.update=function(t,r){U(this._normalMasterList,function(n){n.update&&n.update(t,r)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(t,r){if(t==="matrix"||t==="calendar"){Nh[t]=r;return}dx[t]=r},e.get=function(t){return dx[t]||Nh[t]},e})();function S7(e){return!!Nh[e]}var C7=1,IE=2;function T7(e){PE.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var PE=Fe();function NE(e){var t=e.getShallow("coord",!0),r=C7;if(t==null){var n=PE.get(e.type);n&&n.getCoord2&&(r=IE,t=n.getCoord2(e))}return{coord:t,from:r}}var xl=0,Rh=1,A7=2;function E7(e,t){var r=e.getShallow("coordinateSystem"),n=e.getShallow("coordinateSystemUsage",!0),i=xl;if(r){var a=e.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(i=Rh,a||(i=xl)):n==="box"&&(i=A7,!a&&!S7(r)&&(i=xl))}return{coordSysType:r,kind:i}}function D7(e){var t=e.targetModel,r=e.coordSysType,n=e.coordSysProvider,i=e.isDefaultDataCoordSys,a=E7(t),o=a.kind,s=a.coordSysType;if(i&&o!==Rh&&(o=Rh,s=r),o===xl||s!==r)return xl;var l=n(r,t);return l?(o===Rh?t.coordinateSystem=l:t.boxCoordinateSystem=l,o):xl}var M7=(function(){function e(t){this.coordSysDims=[],this.axisMap=Fe(),this.categoryAxisMap=Fe(),this.coordSysName=t}return e})();function L7(e){var t=e.get("coordinateSystem"),r=new M7(t),n=I7[t];if(n)return n(e,r,r.axisMap,r.categoryAxisMap),r}var I7={cartesian2d:function(e,t,r,n){var i=e.getReferringComponents("xAxis",_n).models[0],a=e.getReferringComponents("yAxis",_n).models[0];t.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),bl(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),bl(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,n){var i=e.getReferringComponents("singleAxis",_n).models[0];t.coordSysDims=["single"],r.set("single",i),bl(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,r,n){var i=e.getReferringComponents("polar",_n).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),bl(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),bl(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,r,n){t.coordSysDims=["lng","lat"]},parallel:function(e,t,r,n){var i=e.ecModel,a=i.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();U(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),f=o[l];r.set(f,u),bl(u)&&(n.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(e,t,r,n){var i=e.getReferringComponents("matrix",_n).models[0];t.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function bl(e){return e.get("type")==="category"}function P7(e,t,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;N7(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(e&&e.get("stack")),u,f,d,p,v=!0;function g(T){return T.type!=="ordinal"&&T.type!=="time"}if(U(a,function(T,E){Me(T)&&(a[E]=T={name:T}),g(T)||(v=!1)}),U(a,function(T,E){l&&!T.isExtraCoord&&(!n&&!u&&T.ordinalMeta&&(u=T),!f&&g(T)&&(!v||T.coordDim!=="x"&&T.coordDim!=="angle")&&(!i||i===T.coordDim)&&(f=T))}),f&&!n&&!u&&(n=!0),f){d="__\0ecstackresult_"+e.id,p="__\0ecstackedover_"+e.id,u&&(u.createInvertedIndices=!0);var y=f.coordDim,x=f.type,b=0;U(a,function(T){T.coordDim===y&&b++});var _={name:d,coordDim:y,coordDimIndex:b,type:x,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},S={name:p,coordDim:p,coordDimIndex:b+1,type:x,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(_.storeDimIndex=s.ensureCalculationDimension(p,x),S.storeDimIndex=s.ensureCalculationDimension(d,x)),o.appendCalculationDimension(_),o.appendCalculationDimension(S)):(a.push(_),a.push(S))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:p,stackResultDimension:d}}function N7(e){return!TE(e.schema)}function Jo(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function RE(e,t){return Jo(e,t)?e.getCalculationInfo("stackResultDimension"):t}function R7(e,t){var r=e.get("coordinateSystem"),n=hx.get(r),i;return t&&t.coordSysDims&&(i=De(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=c7(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function O7(e,t,r){var n,i;return r&&U(e,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(e[n].otherDims.itemName=0),n}function px(e,t,r){r=r||{};var n=t.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===Jr;var o=L7(t),s=R7(t,o),l=r.useEncodeDefaulter,u=$e(l)?l:l?yt(JU,s,t):null,f={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},d=LE(i,f),p=O7(d.dimensions,r.createInvertedIndices,o),v=a?null:n.getSharedDataStore(d),g=P7(t,{schema:d,store:v}),y=new Sc(d,t);y.setCalculationInfo(g);var x=p!=null&&z7(i)?function(b,_,S,T){return T===p?S:this.defaultDimValueGetter(b,_,S,T)}:null;return y.hasItemOption=!1,y.initData(a?i:v,null,x),y}function z7(e){if(e.sourceFormat===Jr){var t=F7(e.data||[]);return!pe(nc(t))}}function F7(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}var B7=Math.round(Math.random()*10);function Oh(e){return[e||"",B7++].join("_")}function j7(e){var t={};e.registerSubTypeDefaulter=function(r,n){var i=ci(r);t[i.main]=n},e.determineSubType=function(r,n){var i=n.type;if(!i){var a=ci(r).main;e.hasSubTypes(r)&&t[a]&&(i=t[a](n))}return i}}function H7(e,t){e.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=r(o),f=u.graph,d=u.noEntryList,p={};for(U(a,function(_){p[_]=!0});d.length;){var v=d.pop(),g=f[v],y=!!p[v];y&&(s.call(l,v,g.originalDeps.slice()),delete p[v]),U(g.successor,y?b:x)}U(p,function(){var _="";throw new Error(_)});function x(_){f[_].entryCount--,f[_].entryCount===0&&d.push(_)}function b(_){p[_]=!0,x(_)}};function r(a){var o={},s=[];return U(a,function(l){var u=n(o,l),f=u.originalDeps=t(l),d=i(f,a);u.entryCount=d.length,u.entryCount===0&&s.push(l),U(d,function(p){Je(u.predecessor,p)<0&&u.predecessor.push(p);var v=n(o,p);Je(v.successor,p)<0&&v.successor.push(l)})}),{graph:o,noEntryList:s}}function n(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function i(a,o){var s=[];return U(a,function(l){Je(o,l)>=0&&s.push(l)}),s}}function OE(e,t){return st(st({},e,!0),t,!0)}var V7=Math.log(2);function vx(e,t,r,n,i,a){var o=n+"-"+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var l=Math.round(Math.log((1<<s)-1&~i)/V7);return e[r][l]}for(var u=n|1<<r,f=r+1;n&1<<f;)f++;for(var d=0,p=0,v=0;p<s;p++){var g=1<<p;g&i||(d+=(v%2?-1:1)*e[r][p]*vx(e,t-1,f,u,i|g,a),v++)}return a[o]=d,d}function zE(e,t){var r=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],n={},i=vx(r,8,0,0,0,n);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*vx(r,7,o===0?1:0,1<<o,1<<s,n)/i*t[o];return function(l,u,f){var d=u*a[6]+f*a[7]+1;l[0]=(u*a[0]+f*a[1]+a[2])/d,l[1]=(u*a[3]+f*a[4]+a[5])/d}}}var zh="___zrEVENTSAVED",gx=[];function U7(e,t,r,n,i){return mx(gx,t,n,i,!0)&&mx(e,r,gx[0],gx[1])}function $7(e,t){e&&r(e),t&&r(t);function r(n){var i=n[zh];i&&(i.clearMarkers&&i.clearMarkers(),delete n[zh])}}function mx(e,t,r,n,i){if(t.getBoundingClientRect&&We.domSupported&&!FE(t)){var a=t[zh]||(t[zh]={}),o=G7(t,a),s=W7(o,a,i);if(s)return s(e,r,n),!0}return!1}function G7(e,t){var r=t.markers;if(r)return r;r=t.markers=[];for(var n=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),e.appendChild(o),r.push(o)}return t.clearMarkers=function(){U(r,function(f){f.parentNode&&f.parentNode.removeChild(f)})},r}function W7(e,t,r){for(var n=r?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=e[u].getBoundingClientRect(),d=2*u,p=f.left,v=f.top;o.push(p,v),l=l&&a&&p===a[d]&&v===a[d+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&i?i:(t.srcCoords=o,t[n]=r?zE(s,o):zE(o,s))}function FE(e){return e.nodeName.toUpperCase()==="CANVAS"}var Y7=/([&<>"'])/g,X7={"&":"&","<":"<",">":">",'"':""","'":"'"};function jr(e){return e==null?"":(e+"").replace(Y7,function(t,r){return X7[r]})}const q7={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},K7={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var Fh="ZH",yx="EN",wl=yx,Bh={},xx={},BE=We.domSupported?(function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage||wl).toUpperCase();return e.indexOf(Fh)>-1?Fh:wl})():wl;function jE(e,t){e=e.toUpperCase(),xx[e]=new Et(t),Bh[e]=t}function Z7(e){if(Me(e)){var t=Bh[e.toUpperCase()]||{};return e===Fh||e===yx?Ke(t):st(Ke(t),Ke(Bh[wl]),!1)}else return st(Ke(e),Ke(Bh[wl]),!1)}function Q7(e){return xx[e]}function J7(){return xx[wl]}jE(yx,q7),jE(Fh,K7);var e$=null;function Tr(){return e$}function HE(e,t){var r=Tr(),n=t.breakOption,i=t.breakParsed;return!i&&r&&(i=r.parseAxisBreakOption(n,e)),i}function jh(e){var t=e.brk;return t?t.breaks:[]}function Hh(e){var t=e.brk;return t?t.hasBreaks():!1}var bx=1e3,_x=bx*60,Cc=_x*60,Cn=Cc*24,VE=Cn*365,t$={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},Vh={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},r$="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Uh="{yyyy}-{MM}-{dd}",UE={year:"{yyyy}",month:"{yyyy}-{MM}",day:Uh,hour:Uh+" "+Vh.hour,minute:Uh+" "+Vh.minute,second:Uh+" "+Vh.second,millisecond:r$},tn=["year","month","day","hour","minute","second","millisecond"],n$=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function i$(e){return!Me(e)&&!$e(e)?a$(e):e}function a$(e){e=e||{};var t={},r=!0;return U(tn,function(n){r&&(r=e[n]==null)}),U(tn,function(n,i){var a=e[n];t[n]={};for(var o=null,s=i;s>=0;s--){var l=tn[s],u=Ie(a)&&!pe(a)?a[l]:a,f=void 0;pe(u)?(f=u.slice(),o=f[0]||""):Me(u)?(o=u,f=[o]):(o==null?o=Vh[n]:t$[l].test(o)||(o=t[l][l][0]+" "+o),f=[o],r&&(f[1]="{primary|"+o+"}")),t[n][l]=f}}),t}function Ea(e,t){return e+="","0000".substr(0,t-e.length)+e}function Tc(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function o$(e){return e===Tc(e)}function s$(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function $h(e,t,r,n){var i=al(e),a=i[$E(r)](),o=i[Sx(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[Cx(r)](),u=i["get"+(r?"UTC":"")+"Day"](),f=i[Tx(r)](),d=(f-1)%12+1,p=i[Ax(r)](),v=i[Ex(r)](),g=i[Dx(r)](),y=f>=12?"pm":"am",x=y.toUpperCase(),b=n instanceof Et?n:Q7(n||BE)||J7(),_=b.getModel("time"),S=_.get("month"),T=_.get("monthAbbr"),E=_.get("dayOfWeek"),D=_.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,y+"").replace(/{A}/g,x+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Ea(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,S[o-1]).replace(/{MMM}/g,T[o-1]).replace(/{MM}/g,Ea(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Ea(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,E[u]).replace(/{ee}/g,D[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Ea(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Ea(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,Ea(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,Ea(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Ea(g,3)).replace(/{S}/g,g+"")}function l$(e,t,r,n,i){var a=null;if(Me(r))a=r;else if($e(r)){var o={time:e.time,level:e.time?e.time.level:0},s=Tr();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=r(e.value,t,o)}else{var l=e.time;if(l){var u=r[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var f=_l(e.value,i);a=r[f][f][0]}}return $h(new Date(e.value),a,i,n)}function _l(e,t){var r=al(e),n=r[Sx(t)]()+1,i=r[Cx(t)](),a=r[Tx(t)](),o=r[Ax(t)](),s=r[Ex(t)](),l=r[Dx(t)](),u=l===0,f=u&&s===0,d=f&&o===0,p=d&&a===0,v=p&&i===1,g=v&&n===1;return g?"year":v?"month":p?"day":d?"hour":f?"minute":u?"second":"millisecond"}function kx(e,t,r){switch(t){case"year":e[GE(r)](0);case"month":e[WE(r)](1);case"day":e[YE(r)](0);case"hour":e[XE(r)](0);case"minute":e[qE(r)](0);case"second":e[KE(r)](0)}return e}function $E(e){return e?"getUTCFullYear":"getFullYear"}function Sx(e){return e?"getUTCMonth":"getMonth"}function Cx(e){return e?"getUTCDate":"getDate"}function Tx(e){return e?"getUTCHours":"getHours"}function Ax(e){return e?"getUTCMinutes":"getMinutes"}function Ex(e){return e?"getUTCSeconds":"getSeconds"}function Dx(e){return e?"getUTCMilliseconds":"getMilliseconds"}function u$(e){return e?"setUTCFullYear":"setFullYear"}function GE(e){return e?"setUTCMonth":"setMonth"}function WE(e){return e?"setUTCDate":"setDate"}function YE(e){return e?"setUTCHours":"setHours"}function XE(e){return e?"setUTCMinutes":"setMinutes"}function qE(e){return e?"setUTCSeconds":"setSeconds"}function KE(e){return e?"setUTCMilliseconds":"setMilliseconds"}function ZE(e){if(!G9(e))return Me(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function QE(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var Gh=ly;function Mx(e,t,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(f){return f&&ui(f)?f:"-"}function a(f){return wn(f)}var o=t==="time",s=e instanceof Date;if(o||s){var l=o?al(e):e;if(isNaN(+l)){if(s)return"-"}else return $h(l,n,r)}if(t==="ordinal")return oy(e)?i(e):ft(e)&&a(e)?e+"":"-";var u=nh(e);return a(u)?ZE(u):oy(e)?i(e):typeof e=="boolean"?e+"":"-"}var JE=["a","b","c","d","e","f","g"],Lx=function(e,t){return"{"+e+(t??"")+"}"};function eD(e,t,r){pe(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=JE[a];e=e.replace(Lx(o),Lx(o,0))}for(var s=0;s<n;s++)for(var l=0;l<i.length;l++){var u=t[s][i[l]];e=e.replace(Lx(JE[l],s),r?jr(u):u)}return e}function c$(e,t){var r=Me(e)?{color:e,extraCssText:t}:e||{},n=r.color,i=r.type;t=r.extraCssText;var a=r.renderMode||"html";if(!n)return"";if(a==="html")return i==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+jr(n)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+jr(n)+";"+(t||"")+'"></span>';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function es(e,t){return t=t||"transparent",Me(e)?e:Ie(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var Wh=U,f$=["left","right","top","bottom","width","height"],Yh=[["width","left","right"],["height","top","bottom"]];function Ix(e,t,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;t.eachChild(function(l,u){var f=l.getBoundingRect(),d=t.childAt(u+1),p=d&&d.getBoundingRect(),v,g;if(e==="horizontal"){var y=f.width+(p?-p.x+f.x:0);v=a+y,v>n||l.newline?(a=0,v=y,o+=s+r,s=f.height):s=Math.max(s,f.height)}else{var x=f.height+(p?-p.y+f.y:0);g=o+x,g>i||l.newline?(a+=s+r,o=0,g=x,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),e==="horizontal"?a=v+r:o=g+r)})}var Ac=Ix;yt(Ix,"vertical"),yt(Ix,"horizontal");function d$(e,t){return{left:e.getShallow("left",t),top:e.getShallow("top",t),right:e.getShallow("right",t),bottom:e.getShallow("bottom",t),width:e.getShallow("width",t),height:e.getShallow("height",t)}}function h$(e,t){var r=Px(e,t,{enableLayoutOnlyByCenter:!0}),n=e.getBoxLayoutParams(),i,a;if(r.type===Ec.point)a=r.refPoint,i=ts(n,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get("center"),s=pe(o)?o:[o,o];i=ts(n,r.refContainer),a=r.boxCoordFrom===IE?r.refPoint:[xt(s[0],i.width)+i.x,xt(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function p$(e,t){var r=h$(e,t),n=r.viewRect,i=r.center,a=e.get("radius");pe(a)||(a=[0,a]);var o=xt(n.width,t.getWidth()),s=xt(n.height,t.getHeight()),l=Math.min(o,s),u=xt(a[0],l/2),f=xt(a[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:f,viewRect:n}}function ts(e,t,r){r=Gh(r||0);var n=t.width,i=t.height,a=xt(e.left,n),o=xt(e.top,i),s=xt(e.right,n),l=xt(e.bottom,i),u=xt(e.width,n),f=xt(e.height,i),d=r[2]+r[0],p=r[1]+r[3],v=e.aspect;switch(isNaN(u)&&(u=n-s-p-a),isNaN(f)&&(f=i-l-d-o),v!=null&&(isNaN(u)&&isNaN(f)&&(v>n/i?u=n*.8:f=i*.8),isNaN(u)&&(u=v*f),isNaN(f)&&(f=u/v)),isNaN(a)&&(a=n-s-u-p),isNaN(o)&&(o=i-l-f-d),e.left||e.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-p;break}switch(e.top||e.bottom){case"middle":case"center":o=i/2-f/2-r[0];break;case"bottom":o=i-f-d;break}a=a||0,o=o||0,isNaN(u)&&(u=n-p-a-(s||0)),isNaN(f)&&(f=i-d-o-(l||0));var g=new je((t.x||0)+a+r[3],(t.y||0)+o+r[0],u,f);return g.margin=r,g}var Ec={rect:1,point:2};function Px(e,t,r){var n,i,a,o=e.boxCoordinateSystem,s;if(o){var l=NE(e),u=l.coord,f=l.from;if(o.dataToLayout){a=Ec.rect,s=f;var d=o.dataToLayout(u);n=d.contentRect||d.rect}else r&&r.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=Ec.point,s=f,i=o.dataToPoint(u))}return a==null&&(a=Ec.rect),a===Ec.rect&&(n||(n={x:0,y:0,width:t.getWidth(),height:t.getHeight()}),i=[n.x+n.width/2,n.y+n.height/2]),{type:a,refContainer:n,refPoint:i,boxCoordFrom:s}}function Dc(e){var t=e.layoutMode||e.constructor.layoutMode;return Ie(t)?t:t?{type:t}:null}function Da(e,t,r){var n=r&&r.ignoreSize;!pe(n)&&(n=[n,n]);var i=o(Yh[0],0),a=o(Yh[1],1);l(Yh[0],e,i),l(Yh[1],e,a);function o(u,f){var d={},p=0,v={},g=0,y=2;if(Wh(u,function(_){v[_]=e[_]}),Wh(u,function(_){_r(t,_)&&(d[_]=v[_]=t[_]),s(d,_)&&p++,s(v,_)&&g++}),n[f])return s(t,u[1])?v[u[2]]=null:s(t,u[2])&&(v[u[1]]=null),v;if(g===y||!p)return v;if(p>=y)return d;for(var x=0;x<u.length;x++){var b=u[x];if(!_r(d,b)&&_r(e,b)){d[b]=e[b];break}}return d}function s(u,f){return u[f]!=null&&u[f]!=="auto"}function l(u,f,d){Wh(u,function(p){f[p]=d[p]})}}function Mc(e){return v$({},e)}function v$(e,t){return t&&e&&Wh(f$,function(r){_r(t,r)&&(e[r]=t[r])}),e}var g$=it(),dt=(function(e){ve(t,e);function t(r,n,i){var a=e.call(this,r,n,i)||this;return a.uid=Oh("ec_cpt_model"),a}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=Dc(this),a=i?Mc(r):{},o=n.getTheme();st(r,o.get(this.mainType)),st(r,this.getDefaultOption()),i&&Da(r,a,i)},t.prototype.mergeOption=function(r,n){st(this.option,r,!0);var i=Dc(this);i&&Da(this.option,r,i)},t.prototype.optionUpdated=function(r,n){},t.prototype.getDefaultOption=function(){var r=this.constructor;if(!iH(r))return r.defaultOption;var n=g$(this);if(!n.defaultOption){for(var i=[],a=r;a;){var o=a.prototype.defaultOption;o&&i.push(o),a=a.superClass}for(var s={},l=i.length-1;l>=0;l--)s=st(s,i[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return oc(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},t.prototype.getBoxLayoutParams=function(){return d$(this,!1)},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(r){this.option.zlevel=r},t.protoInitialize=(function(){var r=t.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0})(),t})(Et);SC(dt,Et),kd(dt),j7(dt),H7(dt,m$);function m$(e){var t=[];return U(dt.getClassesByMainType(e),function(r){t=t.concat(r.dependencies||r.prototype.dependencies||[])}),t=De(t,function(r){return ci(r).main}),e!=="dataset"&&Je(t,"dataset")<=0&&t.unshift("dataset"),t}var tD=it();it();var Nx=(function(){function e(){}return e.prototype.getColorFromPalette=function(t,r,n){var i=Cr(this.get("color",!0)),a=this.get("colorLayer",!0);return x$(this,tD,i,a,t,r,n)},e.prototype.clearColorPalette=function(){b$(this,tD)},e})();function y$(e,t){for(var r=e.length,n=0;n<r;n++)if(e[n].length>t)return e[n];return e[r-1]}function x$(e,t,r,n,i,a,o){a=a||e;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var f=o==null||!n?r:y$(n,o);if(f=f||r,!(!f||!f.length)){var d=f[l];return i&&(u[i]=d),s.paletteIdx=(l+1)%f.length,d}}function b$(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var w$=/\{@(.+?)\}/g,Rx=(function(){function e(){}return e.prototype.getDataParams=function(t,r){var n=this.getData(r),i=this.getRawValue(t,r),a=n.getRawIndex(t),o=n.getName(t),s=n.getRawDataItem(t),l=n.getItemVisual(t,"style"),u=l&&l[n.getItemVisual(t,"drawType")||"fill"],f=l&&l.stroke,d=this.mainType,p=d==="series",v=n.userOutput&&n.userOutput.get();return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:p?this.subType:null,seriesIndex:this.seriesIndex,seriesId:p?this.id:null,seriesName:p?this.name:null,name:o,dataIndex:a,data:s,dataType:r,value:i,color:u,borderColor:f,dimensionNames:v?v.fullDimensions:null,encode:v?v.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(t,r,n,i,a,o){r=r||"normal";var s=this.getData(n),l=this.getDataParams(t,n);if(o&&(l.value=o.interpolatedValue),i!=null&&pe(l.value)&&(l.value=l.value[i]),!a){var u=s.getItemModel(t);a=u.get(r==="normal"?["label","formatter"]:[r,"label","formatter"])}if($e(a))return l.status=r,l.dimensionIndex=i,a(l);if(Me(a)){var f=eD(a,l);return f.replace(w$,function(d,p){var v=p.length,g=p;g.charAt(0)==="["&&g.charAt(v-1)==="]"&&(g=+g.slice(1,v-1));var y=gl(s,t,g);if(o&&pe(o.interpolatedValue)){var x=s.getDimensionIndex(g);x>=0&&(y=o.interpolatedValue[x])}return y!=null?y+"":""})}},e.prototype.getRawValue=function(t,r){return gl(this.getData(r),t)},e.prototype.formatTooltip=function(t,r,n){},e})();function rD(e){var t,r;return Ie(e)?e.type&&(r=e):t=e,{text:t,frag:r}}function Lc(e){return new _$(e)}var _$=(function(){function e(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return e.prototype.perform=function(t){var r=this._upstream,n=t&&t.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function f(_){return!(_>=1)&&(_=1),_}var d;(this._dirty||a==="reset")&&(this._dirty=!1,d=this._doReset(n)),this._modBy=l,this._modDataCount=u;var p=t&&t.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,g=Math.min(p!=null?this._dueIndex+p:1/0,this._dueEnd);if(!n&&(d||v<g)){var y=this._progress;if(pe(y))for(var x=0;x<y.length;x++)this._doProgress(y[x],v,g,l,u);else this._doProgress(y,v,g,l,u)}this._dueIndex=g;var b=this._settedOutputEnd!=null?this._settedOutputEnd:g;this._outputDueEnd=b}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(t,r,n,i,a){nD.reset(r,n,i,a),this._callingProgress=t,this._callingProgress({start:r,end:n,count:n-r,next:nD.next},this.context)},e.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var r,n;!t&&this._reset&&(r=this._reset(this.context),r&&r.progress&&(n=r.forceFirstProgress,r=r.progress),pe(r)&&!r.length&&(r=null)),this._progress=r,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},e})(),nD=(function(){var e,t,r,n,i,a={reset:function(l,u,f,d){t=l,e=u,r=f,n=d,i=Math.ceil(n/r),a.next=r>1&&n>0?s:o}};return a;function o(){return t<e?t++:null}function s(){var l=t%i*r+Math.ceil(t/i),u=t>=e?null:l<n?l:t;return t++,u}})(),k$=(function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(t){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(t){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(t,r){},e.prototype.retrieveValueFromItem=function(t,r){},e.prototype.convertValue=function(t,r){return ml(t,r)},e})();function S$(e,t){var r=new k$,n=e.data,i=r.sourceFormat=e.sourceFormat,a=e.startIndex,o="";e.seriesLayoutBy!==_i&&zr(o);var s=[],l={},u=e.dimensionsDefine;if(u)U(u,function(y,x){var b=y.name,_={index:x,name:b,displayName:y.displayName};if(s.push(_),b!=null){var S="";_r(l,b)&&zr(S),l[b]=_}});else for(var f=0;f<e.dimensionsDetectedCount;f++)s.push({index:f});var d=vE(i,_i);t.__isBuiltIn&&(r.getRawDataItem=function(y){return d(n,a,s,y)},r.getRawData=pt(C$,null,e)),r.cloneRawData=pt(T$,null,e);var p=mE(i,_i);r.count=pt(p,null,n,a,s);var v=yE(i);r.retrieveValue=function(y,x){var b=d(n,a,s,y);return g(b,x)};var g=r.retrieveValueFromItem=function(y,x){if(y!=null){var b=s[x];if(b)return v(y,x,b.name)}};return r.getDimensionInfo=pt(A$,null,s,l),r.cloneAllDimensionInfo=pt(E$,null,s),r}function C$(e){var t=e.sourceFormat;if(!Ox(t)){var r="";zr(r)}return e.data}function T$(e){var t=e.sourceFormat,r=e.data;if(!Ox(t)){var n="";zr(n)}if(t===cr){for(var i=[],a=0,o=r.length;a<o;a++)i.push(r[a].slice());return i}else if(t===Sn){for(var i=[],a=0,o=r.length;a<o;a++)i.push(ce({},r[a]));return i}}function A$(e,t,r){if(r!=null){if(ft(r)||!isNaN(r)&&!_r(t,r))return e[r];if(_r(t,r))return t[r]}}function E$(e){return Ke(e)}var iD=Fe();function D$(e){e=Ke(e);var t=e.type,r="";t||zr(r);var n=t.split(":");n.length!==2&&zr(r);var i=!1;n[0]==="echarts"&&(t=n[1],i=!0),e.__isBuiltIn=i,iD.set(t,e)}function M$(e,t,r){var n=Cr(e),i=n.length,a="";i||zr(a);for(var o=0,s=i;o<s;o++){var l=n[o];t=L$(l,t),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function L$(e,t,r,n){var i="";t.length||zr(i),Ie(e)||zr(i);var a=e.type,o=iD.get(a);o||zr(i);var s=De(t,function(u){return S$(u,o)}),l=Cr(o.transform({upstream:s[0],upstreamList:s,config:Ke(e.config)}));return De(l,function(u,f){var d="";Ie(u)||zr(d),u.data||zr(d);var p=sE(u.data);Ox(p)||zr(d);var v,g=t[0];if(g&&f===0&&!u.dimensions){var y=g.startIndex;y&&(u.data=g.data.slice(0,y).concat(u.data)),v={seriesLayoutBy:_i,sourceHeader:y,dimensions:g.metaRawOption.dimensions}}else v={seriesLayoutBy:_i,sourceHeader:0,dimensions:u.dimensions};return nx(u.data,v,null)})}function Ox(e){return e===cr||e===Sn}var I$=(function(){function e(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(t,r){this._sourceList=t,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(Xh(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var f=r[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),l=Nr(s)?Sa:Jr,a=[];var d=this._getSourceMetaRawOption()||{},p=u&&u.metaRawOption||{},v=Ae(d.seriesLayoutBy,p.seriesLayoutBy)||null,g=Ae(d.sourceHeader,p.sourceHeader),y=Ae(d.dimensions,p.dimensions),x=v!==p.seriesLayoutBy||!!g!=!!p.sourceHeader||y;i=x?[nx(s,{seriesLayoutBy:v,sourceHeader:g,dimensions:y},l)]:[]}else{var b=t;if(n){var _=this._applyTransform(r);i=_.sourceList,a=_.upstreamSignList}else{var S=b.get("source",!0);i=[nx(S,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},e.prototype._applyTransform=function(t){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";t.length!==1&&aD(a)}var o,s=[],l=[];return U(t,function(u){u.prepareSource();var f=u.getSource(i||0),d="";i!=null&&!f&&aD(d),s.push(f),l.push(u._getVersionSign())}),n?o=M$(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[r7(s[0])]),{sourceList:o,upstreamSignList:l}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),r=0;r<t.length;r++){var n=t[r];if(n._isDirty()||this._upstreamSignList[r]!==n._getVersionSign())return!0}},e.prototype.getSource=function(t){t=t||0;var r=this._sourceList[t];if(!r){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(t)}return r},e.prototype.getSharedDataStore=function(t){var r=t.makeStoreSchema();return this._innerGetDataStore(r.dimensions,t.source,r.hash)},e.prototype._innerGetDataStore=function(t,r,n){var i=0,a=this._storeList,o=a[i];o||(o=a[i]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];Xh(this._sourceHost)&&l?s=l._innerGetDataStore(t,r,n):(s=new lx,s.initData(new hE(r,t.length),t)),o[n]=s}return s},e.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(Xh(t)){var r=tx(t);return r?[r.getSourceManager()]:[]}else return De(t7(t),function(n){return n.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,r,n,i;if(Xh(t))r=t.get("seriesLayoutBy",!0),n=t.get("sourceHeader",!0),i=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=t;r=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:r,sourceHeader:n,dimensions:i}},e})();function Xh(e){return e.mainType==="series"}function aD(e){throw new Error(e)}var Ne={color:{},darkColor:{},size:{}},Lt=Ne.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};ce(Lt,{primary:Lt.neutral80,secondary:Lt.neutral70,tertiary:Lt.neutral60,quaternary:Lt.neutral50,disabled:Lt.neutral20,border:Lt.neutral30,borderTint:Lt.neutral20,borderShade:Lt.neutral40,background:Lt.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:Lt.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:Lt.neutral70,axisLineTint:Lt.neutral40,axisTick:Lt.neutral70,axisTickMinor:Lt.neutral60,axisLabel:Lt.neutral70,axisSplitLine:Lt.neutral15,axisMinorSplitLine:Lt.neutral05});for(var rs in Lt)if(Lt.hasOwnProperty(rs)){var oD=Lt[rs];rs==="theme"?Ne.darkColor.theme=Lt.theme.slice():rs==="highlight"?Ne.darkColor.highlight="rgba(255,231,130,0.4)":rs.indexOf("accent")===0?Ne.darkColor[rs]=zy(oD,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Ne.darkColor[rs]=zy(oD,null,function(e){return e*.9},function(e){return 1-Math.pow(e,1.5)})}Ne.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var P$="line-height:1";function sD(e){var t=e.lineHeight;return t==null?P$:"line-height:"+jr(t+"")+"px"}function lD(e,t){var r=e.color||Ne.color.tertiary,n=e.fontSize||12,i=e.fontWeight||"400",a=e.color||Ne.color.secondary,o=e.fontSize||14,s=e.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+jr(n+"")+"px;color:"+jr(r)+";font-weight:"+jr(i+""),valueStyle:"font-size:"+jr(o+"")+"px;color:"+jr(a)+";font-weight:"+jr(s+"")}:{nameStyle:{fontSize:n,fill:r,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var N$=[0,10,20,30],R$=["",`
|
|
34
|
+
`,`
|
|
35
|
+
|
|
36
|
+
`,`
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
`];function ns(e,t){return t.type=e,t}function zx(e){return e.type==="section"}function uD(e){return zx(e)?O$:z$}function cD(e){if(zx(e)){var t=0,r=e.blocks.length,n=r>1||r>0&&!e.noHeader;return U(e.blocks,function(i){var a=cD(i);a>=t&&(t=a+ +(n&&(!a||zx(i)&&!i.noHeader)))}),t}return 0}function O$(e,t,r,n){var i=t.noHeader,a=F$(cD(t)),o=[],s=t.blocks||[];Fi(!s||pe(s)),s=s||[];var l=e.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(_r(u,l)){var f=new d7(u[l],null);s.sort(function(y,x){return f.evaluate(y.sortParam,x.sortParam)})}else l==="seriesDesc"&&s.reverse()}U(s,function(y,x){var b=t.valueFormatter,_=uD(y)(b?ce(ce({},e),{valueFormatter:b}):e,y,x>0?a.html:0,n);_!=null&&o.push(_)});var d=e.renderMode==="richText"?o.join(a.richText):Fx(n,o.join(""),i?r:a.html);if(i)return d;var p=Mx(t.header,"ordinal",e.useUTC),v=lD(n,e.renderMode).nameStyle,g=sD(n);return e.renderMode==="richText"?dD(e,p,v)+a.richText+d:Fx(n,'<div style="'+v+";"+g+';">'+jr(p)+"</div>"+d,r)}function z$(e,t,r,n){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,f=t.valueFormatter||e.valueFormatter||function(T){return T=pe(T)?T:[T],De(T,function(E,D){return Mx(E,pe(v)?v[D]:v,u)})};if(!(a&&o)){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Ne.color.secondary,i),p=a?"":Mx(l,"ordinal",u),v=t.valueType,g=o?[]:f(t.value,t.rawDataIndex),y=!s||!a,x=!s&&a,b=lD(n,i),_=b.nameStyle,S=b.valueStyle;return i==="richText"?(s?"":d)+(a?"":dD(e,p,_))+(o?"":H$(e,g,y,x,S)):Fx(n,(s?"":d)+(a?"":B$(p,!s,_))+(o?"":j$(g,y,x,S)),r)}}function fD(e,t,r,n,i,a){if(e){var o=uD(e),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,a)}}function F$(e){return{html:N$[e],richText:R$[e]}}function Fx(e,t,r){var n='<div style="clear:both"></div>',i="margin: "+r+"px 0 0",a=sD(e);return'<div style="'+i+";"+a+';">'+t+n+"</div>"}function B$(e,t,r){var n=t?"margin-left:2px":"";return'<span style="'+r+";"+n+'">'+jr(e)+"</span>"}function j$(e,t,r,n){var i=r?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return e=pe(e)?e:[e],'<span style="'+a+";"+n+'">'+De(e,function(o){return jr(o)}).join(" ")+"</span>"}function dD(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function H$(e,t,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(pe(t)?t.join(" "):t,a)}function V$(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return es(n)}function hD(e,t){var r=e.get("padding");return r??(t==="richText"?[8,10]:10)}var Bx=(function(){function e(){this.richTextStyles={},this._nextStyleNameId=p0()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,r,n){var i=n==="richText"?this._generateStyleName():null,a=c$({color:r,type:t,renderMode:n,markerId:i});return Me(a)?a:(this.richTextStyles[i]=a.style,a.content)},e.prototype.wrapRichTextStyle=function(t,r){var n={};pe(r)?U(r,function(a){return ce(n,a)}):ce(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},e})();function U$(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(r),l=pe(s),u=V$(t,r),f,d,p,v;if(o>1||l&&!o){var g=$$(s,t,r,a,u);f=g.inlineValues,d=g.inlineValueTypes,p=g.blocks,v=g.inlineValues[0]}else if(o){var y=i.getDimensionInfo(a[0]);v=f=gl(i,r,a[0]),d=y.type}else v=f=l?s[0]:s;var x=v0(t),b=x&&t.name||"",_=i.getName(r),S=n?b:_;return ns("section",{header:b,noHeader:n||!x,sortParam:v,blocks:[ns("nameValue",{markerType:"item",markerColor:u,name:S,noName:!ui(S),value:f,valueType:d,rawDataIndex:i.getRawIndex(r)})].concat(p||[])})}function $$(e,t,r,n,i){var a=t.getData(),o=ga(e,function(d,p,v){var g=a.getDimensionInfo(v);return d=d||g&&g.tooltip!==!1&&g.displayName!=null},!1),s=[],l=[],u=[];n.length?U(n,function(d){f(gl(a,r,d),d)}):U(e,f);function f(d,p){var v=a.getDimensionInfo(p);!v||v.otherDims.tooltip===!1||(o?u.push(ns("nameValue",{markerType:"subItem",markerColor:i,name:v.displayName,value:d,valueType:v.type})):(s.push(d),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Ma=it();function qh(e,t){return e.getName(t)||e.getId(t)}var G$="__universalTransitionEnabled",Yn=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return t.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Lc({count:Y$,reset:X$}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=Ma(this).sourceManager=new I$(this);a.prepareSource();var o=this.getInitialData(r,i);vD(o,this),this.dataTask.context.data=o,Ma(this).dataBeforeProcessed=o,pD(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=Dc(this),a=i?Mc(r):{},o=this.subType;dt.hasClass(o)&&(o+="Series"),st(r,n.getTheme().get(this.subType)),st(r,this.getDefaultOption()),ih(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&Da(r,a,i)},t.prototype.mergeOption=function(r,n){r=st(this.option,r,!0),this.fillDataTextStyle(r.data);var i=Dc(this);i&&Da(this.option,r,i);var a=Ma(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);vD(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Ma(this).dataBeforeProcessed=o,pD(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(r){if(r&&!Nr(r))for(var n=["show"],i=0;i<r.length;i++)r[i]&&r[i].label&&ih(r[i],"label",n)},t.prototype.getInitialData=function(r,n){},t.prototype.appendData=function(r){var n=this.getRawData();n.appendData(r.data)},t.prototype.getData=function(r){var n=jx(this);if(n){var i=n.context.data;return r==null||!i.getLinkedData?i:i.getLinkedData(r)}else return Ma(this).data},t.prototype.getAllData=function(){var r=this.getData();return r&&r.getLinkedDataAll?r.getLinkedDataAll():[{data:r}]},t.prototype.setData=function(r){var n=jx(this);if(n){var i=n.context;i.outputData=r,n!==this.dataTask&&(i.data=r)}Ma(this).data=r},t.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return Fe(r)},t.prototype.getSourceManager=function(){return Ma(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return Ma(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var r=this.get("colorBy");return r||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var r=this.coordinateSystem;return r&&r.getBaseAxis&&r.getBaseAxis()},t.prototype.indicesOfNearest=function(r,n,i,a){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(r);if(!s||!l)return[];var u=l.dataToCoord(i);a==null&&(a=1/0);for(var f=[],d=1/0,p=-1,v=0,g=o.getDimensionIndex(n),y=o.getStore(),x=0,b=y.count();x<b;x++){var _=y.get(g,x),S=l.dataToCoord(_),T=u-S,E=Math.abs(T);E<=a&&((E<d||E===d&&T>=0&&p<0)&&(d=E,p=T,v=0),T===p&&(f[v++]=x))}return f.length=v,f},t.prototype.formatTooltip=function(r,n,i){return U$({series:this,dataIndex:r,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(We.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=Nx.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},t.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},t.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<r.length;s++){var l=r[s],u=qh(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(r,n){for(var i=[],a=0;a<r.length;a++)i[0]=r[a],this.isSelected(r[a],n)?this.unselect(i,n):this.select(i,n)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var r=this._selectedDataIndicesMap,n=kt(r),i=[],a=0;a<n.length;a++){var o=r[n[a]];o>=0&&i.push(o)}return i},t.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[qh(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[G$])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},t.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Ie(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f<l;f++){var d=n[f],p=qh(r,d);u[p]=!0,this._selectedDataIndicesMap[p]=r.getRawIndex(d)}}else if(s==="single"||s===!0){var v=n[l-1],p=qh(r,v);o.selectedMap=(i={},i[p]=!0,i),this._selectedDataIndicesMap=(a={},a[p]=r.getRawIndex(v),a)}}},t.prototype._initSelectedMapFromData=function(r){if(!this.option.selectedMap){var n=[];r.hasItemOption&&r.each(function(i){var a=r.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(r,n)}},t.registerClass=function(r){return dt.registerClass(r)},t.protoInitialize=(function(){var r=t.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"})(),t})(dt);Un(Yn,Rx),Un(Yn,Nx),SC(Yn,dt);function pD(e){var t=e.name;v0(e)||(e.name=W$(e)||t)}function W$(e){var t=e.getRawData(),r=t.mapDimensionsAll("seriesName"),n=[];return U(r,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function Y$(e){return e.model.getRawData().count()}function X$(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),q$}function q$(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function vD(e,t){U(Z8(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(r){e.wrapMethod(r,yt(K$,t))})}function K$(e,t){var r=jx(e);return r&&r.setOutputEnd((t||this).count()),t}function jx(e){var t=(e.ecModel||{}).scheduler,r=t&&t.getPipeline(e.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(e.uid))}return n}}var Z$=ut.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var r=t.cx,n=t.cy,i=t.width/2,a=t.height/2;e.moveTo(r,n-a),e.lineTo(r+i,n+a),e.lineTo(r-i,n+a),e.closePath()}}),Q$=ut.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var r=t.cx,n=t.cy,i=t.width/2,a=t.height/2;e.moveTo(r,n-a),e.lineTo(r+i,n),e.lineTo(r,n+a),e.lineTo(r-i,n),e.closePath()}}),J$=ut.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var r=t.x,n=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),l=n-a+o+s,u=Math.asin(s/o),f=Math.cos(u)*o,d=Math.sin(u),p=Math.cos(u),v=o*.6,g=o*.7;e.moveTo(r-f,l+s),e.arc(r,l,o,Math.PI-u,Math.PI*2+u),e.bezierCurveTo(r+f-d*v,l+s+p*v,r,n-g,r,n),e.bezierCurveTo(r,n-g,r-f+d*v,l+s+p*v,r-f,l+s),e.closePath()}}),eG=ut.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var r=t.height,n=t.width,i=t.x,a=t.y,o=n/3*2;e.moveTo(i,a),e.lineTo(i+o,a+r),e.lineTo(i,a+r/4*3),e.lineTo(i-o,a+r),e.lineTo(i,a),e.closePath()}}),tG={line:Gi,rect:Nt,roundRect:Nt,square:Nt,circle:vh,diamond:Q$,pin:J$,arrow:eG,triangle:Z$},rG={line:function(e,t,r,n,i){i.x1=e,i.y1=t+n/2,i.x2=e+r,i.y2=t+n/2},rect:function(e,t,r,n,i){i.x=e,i.y=t,i.width=r,i.height=n},roundRect:function(e,t,r,n,i){i.x=e,i.y=t,i.width=r,i.height=n,i.r=Math.min(r,n)/4},square:function(e,t,r,n,i){var a=Math.min(r,n);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.r=Math.min(r,n)/2},diamond:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.width=r,i.height=n},pin:function(e,t,r,n,i){i.x=e+r/2,i.y=t+n/2,i.width=r,i.height=n},arrow:function(e,t,r,n,i){i.x=e+r/2,i.y=t+n/2,i.width=r,i.height=n},triangle:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.width=r,i.height=n}},Hx={};U(tG,function(e,t){Hx[t]=new e});var nG=ut.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,r){var n=Ad(e,t,r),i=this.shape;return i&&i.symbolType==="pin"&&t.position==="inside"&&(n.y=r.y+r.height*.4),n},buildPath:function(e,t,r){var n=t.symbolType;if(n!=="none"){var i=Hx[n];i||(n="rect",i=Hx[n]),rG[n](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,r)}}});function iG(e,t){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=e,r.fill=t||Ne.color.neutral00,r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=e:r.fill=e,this.markRedraw()}}function is(e,t,r,n,i,a,o){var s=e.indexOf("empty")===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var l;return e.indexOf("image://")===0?l=jA(e.slice(8),new je(t,r,n,i),o?"center":"cover"):e.indexOf("path://")===0?l=$0(e.slice(7),{},new je(t,r,n,i),o?"center":"cover"):l=new nG({shape:{symbolType:e,x:t,y:r,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=iG,a&&l.setColor(a),l}function Vx(e){return pe(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Kh(e,t){if(e!=null)return pe(e)||(e=[e,e]),[xt(e[0],t[0])||0,xt(Ae(e[1],e[0]),t[1])||0]}var aG=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r){return px(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(r){var n=new Bt,i=is("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(i),i.setStyle(r.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=r.itemHeight*.8,u=is(s,(r.itemWidth-l)/2,(r.itemHeight-l)/2,l,l,r.itemStyle.fill);n.add(u),u.setStyle(r.itemStyle);var f=r.iconRotate==="inherit"?o:r.iconRotate||0;return u.rotation=f*Math.PI/180,u.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=Ne.color.neutral00,u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1,triggerEvent:!1},t})(Yn);function Ux(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=gl(e,t,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<r.length;o++)a.push(gl(e,t,r[o]));return a.join(" ")}}function gD(e,t){var r=e.mapDimensionsAll("defaultedLabel");if(!pe(t))return t+"";for(var n=[],i=0;i<r.length;i++){var a=e.getDimensionIndex(r[i]);a>=0&&n.push(t[a])}return n.join(" ")}var $x=(function(e){ve(t,e);function t(r,n,i,a){var o=e.call(this)||this;return o.updateData(r,n,i,a),o}return t.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=is(r,-1,-1,2,2,null,s);l.attr({z2:Ae(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=oG,this._symbolType=r,this.add(l)},t.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){sc(this.childAt(0))},t.prototype.downplay=function(){lc(this.childAt(0))},t.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},t.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},t.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=t.getSymbolSize(r,n),u=t.getSymbolZ2(r,n),f=o!==this._symbolType,d=a&&a.disableAnimation;if(f){var p=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,p)}else{var v=this.childAt(0);v.silent=!1;var g={scaleX:l[0]/2,scaleY:l[1]/2};d?v.attr(g):dr(v,g,s,n),V0(v)}if(this._updateCommon(r,n,l,i,a),f){var v=this.childAt(0);if(!d){var g={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,en(v,g,s,n)}}d&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,f,d,p,v,g,y,x,b;if(a&&(u=a.emphasisItemStyle,f=a.blurItemStyle,d=a.selectItemStyle,p=a.focus,v=a.blurScope,y=a.labelStatesModels,x=a.hoverScale,b=a.cursorStyle,g=a.emphasisDisabled),!a||r.hasItemOption){var _=a&&a.itemModel?a.itemModel:r.getItemModel(n),S=_.getModel("emphasis");u=S.getModel("itemStyle").getItemStyle(),d=_.getModel(["select","itemStyle"]).getItemStyle(),f=_.getModel(["blur","itemStyle"]).getItemStyle(),p=S.get("focus"),v=S.get("blurScope"),g=S.get("disabled"),y=Xo(_),x=S.getShallow("scale"),b=_.getShallow("cursor")}var T=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(T||0)*Math.PI/180||0);var E=Kh(r.getItemVisual(n,"symbolOffset"),i);E&&(s.x=E[0],s.y=E[1]),b&&s.attr("cursor",b);var D=r.getItemVisual(n,"style"),L=D.fill;if(s instanceof ka){var R=s.style;s.useStyle(ce({image:R.image,x:R.x,y:R.y,width:R.width,height:R.height},D))}else s.__isEmptyBrush?s.useStyle(ce({},D)):s.useStyle(D),s.style.decal=null,s.setColor(L,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var O=r.getItemVisual(n,"liftZ"),M=this._z2;O!=null?M==null&&(this._z2=s.z2,s.z2+=O):M!=null&&(s.z2=M,this._z2=null);var P=o&&o.useNameLabel;hl(s,y,{labelFetcher:l,labelDataIndex:n,defaultText:j,inheritColor:L,defaultOpacity:D.opacity});function j(K){return P?r.getName(K):Ux(r,K)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var B=s.ensureState("emphasis");B.style=u,s.ensureState("select").style=d,s.ensureState("blur").style=f;var $=x==null||x===!0?Math.max(1.1,3/this._sizeY):isFinite(x)&&x>0?+x:1;B.scaleX=this._sizeX*$,B.scaleY=this._sizeY*$,this.setSymbolScale(1),ul(this,p,v,g)},t.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},t.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=tt(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&kh(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();kh(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},t.getSymbolSize=function(r,n){return Vx(r.getItemVisual(n,"symbolSize"))},t.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},t})(Bt);function oG(e,t){this.parent.drift(e,t)}function Zh(e,t,r,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n&&n.isIgnore&&n.isIgnore(r))&&!(n&&n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&e.getItemVisual(r,"symbol")!=="none"}function mD(e){return e!=null&&!Ie(e)&&(e={isIgnore:e}),e||{}}function yD(e){var t=e.hostModel,r=t.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:Xo(t),cursorStyle:t.get("cursor")}}function xD(e,t,r,n,i,a,o){var s=new e(t,r,n,i);return s.setPosition(a),t.setItemGraphicEl(r,s),o.add(s),s}var sG=(function(){function e(t){this.group=new Bt,this._SymbolCtor=t||$x}return e.prototype.updateData=function(t,r){this._progressiveEls=null,r=mD(r);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=this._seriesScope=yD(t),u={disableAnimation:s},f=r.getSymbolPoint||function(d){return t.getItemLayout(d)};a||n.removeAll(),t.diff(a).add(function(d){var p=f(d);Zh(t,p,d,r)&&xD(o,t,d,l,u,p,n)}).update(function(d,p){var v=a.getItemGraphicEl(p),g=f(d);if(!Zh(t,g,d,r)){n.remove(v);return}var y=t.getItemVisual(d,"symbol")||"circle",x=v&&v.getSymbolType&&v.getSymbolType();if(!v||x&&x!==y)n.remove(v),v=new o(t,d,l,u),v.setPosition(g);else{v.updateData(t,d,l,u);var b={x:g[0],y:g[1]};s?v.attr(b):dr(v,b,i)}n.add(v),t.setItemGraphicEl(d,v)}).remove(function(d){var p=a.getItemGraphicEl(d);p&&p.fadeOut(function(){n.remove(p)},i)}).execute(),this._getSymbolPoint=f,this._data=t},e.prototype.updateLayout=function(t){var r=this._data;if(r)for(var n=this,i=r.getStore(),a=0,o=i.count();a<o;a++){var s=r.getItemGraphicEl(a),l=n._getSymbolPoint(a);Zh(r,l,a,t)?(s=s||xD(n._SymbolCtor,r,a,n._seriesScope,{disableAnimation:!0},l,n.group),s.stopAnimation(),s.setPosition(l),s.markRedraw()):s&&(n.group.remove(s),r.setItemGraphicEl(a,null))}},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=yD(t),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r,n,i){this._progressiveEls=[],i=mD(i);function a(u){u.isGroup||(u.incremental=n,u.ensureState("emphasis").hoverLayer=Sh)}for(var o=t.start;o<t.end;o++){var s=r.getItemLayout(o);if(Zh(r,s,o,i)){var l=new this._SymbolCtor(r,o,this._seriesScope);l.traverse(a),l.setPosition(s),this.group.add(l),r.setItemGraphicEl(o,l),this._progressiveEls.push(l)}}},e.prototype.eachRendered=function(t){gc(this._progressiveEls||this.group,t)},e.prototype.remove=function(t){var r=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(i){i.fadeOut(function(){r.remove(i)},n.hostModel)}):r.removeAll()},e})();function bD(e,t,r){var n=e.getBaseAxis(),i=e.getOtherAxis(n),a=lG(i,r),o=n.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(o),f=s==="x"||s==="radius"?1:0,d=De(e.dimensions,function(g){return t.mapDimension(g)}),p=!1,v=t.getCalculationInfo("stackResultDimension");return Jo(t,d[0])&&(p=!0,d[0]=v),Jo(t,d[1])&&(p=!0,d[1]=v),{dataDimsForPoint:d,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:f,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function lG(e,t){var r=0,n=e.scale.getExtent();return t==="start"?r=n[0]:t==="end"?r=n[1]:ft(t)&&!isNaN(t)?r=t:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function wD(e,t,r,n){var i=NaN;e.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=r.get(e.baseDim,n),o[1-a]=i,t.dataToPoint(o)}function Tn(e,t){return!isFinite(e)||!isFinite(t)}var uG=typeof Float32Array!==sl?Float32Array:void 0,cG=typeof Float64Array!==sl?Float64Array:void 0;function Wi(e){return Gx({ctor:uG},e).arr}function Gx(e,t){var r=e.arr,n=e.ctor;if(t>zT&&(t=zT),!r||e.typed&&r.length<t){var i=void 0;if(n)try{i=new n(t),e.typed=!0,r&&i.set(r)}catch{}if(!i&&(i=[],e.typed=!1,r))for(var a=0,o=r.length;a<o;a++)i[a]=r[a];e.arr=i}return e}function fG(e,t){var r=[];return t.diff(e).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function dG(e,t,r,n,i,a,o,s){for(var l=fG(e,t),u=[],f=[],d=[],p=[],v=[],g=[],y=[],x=bD(i,t,o),b=e.getLayout("points")||[],_=t.getLayout("points")||[],S=0;S<l.length;S++){var T=l[S],E=!0,D=void 0,L=void 0;switch(T.cmd){case"=":D=T.idx*2,L=T.idx1*2;var R=b[D],O=b[D+1],M=_[L],P=_[L+1];(isNaN(R)||isNaN(O))&&(R=M,O=P),u.push(R,O),f.push(M,P),d.push(r[D],r[D+1]),p.push(n[L],n[L+1]),y.push(t.getRawIndex(T.idx1));break;case"+":var j=T.idx,B=x.dataDimsForPoint,$=i.dataToPoint([t.get(B[0],j),t.get(B[1],j)]);L=j*2,u.push($[0],$[1]),f.push(_[L],_[L+1]);var K=wD(x,i,t,j);d.push(K[0],K[1]),p.push(n[L],n[L+1]),y.push(t.getRawIndex(j));break;case"-":E=!1}E&&(v.push(T),g.push(g.length))}g.sort(function(ae,ie){return y[ae]-y[ie]});for(var Z=u.length,re=Wi(Z),Y=Wi(Z),G=Wi(Z),I=Wi(Z),z=[],S=0;S<g.length;S++){var W=g[S],F=S*2,ee=W*2;re[F]=u[ee],re[F+1]=u[ee+1],Y[F]=f[ee],Y[F+1]=f[ee+1],G[F]=d[ee],G[F+1]=d[ee+1],I[F]=p[ee],I[F+1]=p[ee+1],z[S]=v[W]}return{current:re,next:Y,stackedOnCurrent:G,stackedOnNext:I,status:z}}var La=Math.min,Ia=Math.max;function Wx(e,t,r,n,i,a,o,s,l){for(var u,f,d,p,v,g,y=r,x=0;x<n;x++){var b=t[y*2],_=t[y*2+1];if(y>=i||y<0)break;if(Tn(b,_)){if(l){y+=a;continue}break}if(y===r)e[a>0?"moveTo":"lineTo"](b,_),d=b,p=_;else{var S=b-u,T=_-f;if(S*S+T*T<.5){y+=a;continue}if(o>0){for(var E=y+a,D=t[E*2],L=t[E*2+1];D===b&&L===_&&x<n;)x++,E+=a,y+=a,D=t[E*2],L=t[E*2+1],b=t[y*2],_=t[y*2+1],S=b-u,T=_-f;var R=x+1;if(l)for(;Tn(D,L)&&R<n;)R++,E+=a,D=t[E*2],L=t[E*2+1];var O=.5,M=0,P=0,j=void 0,B=void 0;if(R>=n||Tn(D,L))v=b,g=_;else{M=D-u,P=L-f;var $=b-u,K=D-b,Z=_-f,re=L-_,Y=void 0,G=void 0;if(s==="x"){Y=Math.abs($),G=Math.abs(K);var I=M>0?1:-1;v=b-I*Y*o,g=_,j=b+I*G*o,B=_}else if(s==="y"){Y=Math.abs(Z),G=Math.abs(re);var z=P>0?1:-1;v=b,g=_-z*Y*o,j=b,B=_+z*G*o}else Y=Math.sqrt($*$+Z*Z),G=Math.sqrt(K*K+re*re),O=G/(G+Y),v=b-M*o*(1-O),g=_-P*o*(1-O),j=b+M*o*O,B=_+P*o*O,j=La(j,Ia(D,b)),B=La(B,Ia(L,_)),j=Ia(j,La(D,b)),B=Ia(B,La(L,_)),M=j-b,P=B-_,v=b-M*Y/G,g=_-P*Y/G,v=La(v,Ia(u,b)),g=La(g,Ia(f,_)),v=Ia(v,La(u,b)),g=Ia(g,La(f,_)),M=b-v,P=_-g,j=b+M*G/Y,B=_+P*G/Y}e.bezierCurveTo(d,p,v,g,b,_),d=j,p=B}else e.lineTo(b,_)}u=b,f=_,y+=a}return x}var _D=(function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e})(),hG=(function(e){ve(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:Ne.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new _D},t.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Tn(i[o*2-2],i[o*2-1]);o--);for(;a<o&&Tn(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=Wx(r,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},t.prototype.getPointOn=function(r,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=Oo.CMD,s,l,u=n==="x",f=[],d=0;d<a.length;){var p=a[d++],v=void 0,g=void 0,y=void 0,x=void 0,b=void 0,_=void 0,S=void 0;switch(p){case o.M:s=a[d++],l=a[d++];break;case o.L:if(v=a[d++],g=a[d++],S=u?(r-s)/(v-s):(r-l)/(g-l),S<=1&&S>=0){var T=u?(g-l)*S+l:(v-s)*S+s;return u?[r,T]:[T,r]}s=v,l=g;break;case o.C:v=a[d++],g=a[d++],y=a[d++],x=a[d++],b=a[d++],_=a[d++];var E=u?Pd(s,v,y,b,r,f):Pd(l,g,x,_,r,f);if(E>0)for(var D=0;D<E;D++){var L=f[D];if(L<=1&&L>=0){var T=u?Qt(l,g,x,_,L):Qt(s,v,y,b,L);return u?[r,T]:[T,r]}}s=b,l=_;break}}},t})(ut),pG=(function(e){ve(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(_D),vG=(function(e){ve(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new pG},t.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Tn(i[s*2-2],i[s*2-1]);s--);for(;o<s&&Tn(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=Wx(r,i,o,s,s,1,n.smooth,l,n.connectNulls);Wx(r,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,r.closePath()}},t})(ut);function Yx(){var e=it();return function(t){var r=e(t),n=t.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var kD=it(),gG=Yx(),An=(function(){function e(){this.group=new Bt,this.uid=Oh("viewChart"),this.renderTask=Lc({plan:mG,reset:yG}),this.renderTask.context={view:this}}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.highlight=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&CD(a,i,"emphasis")},e.prototype.downplay=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&CD(a,i,"normal")},e.prototype.remove=function(t,r){this.group.removeAll()},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateVisual=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.eachRendered=function(t){gc(this.group,t)},e.markUpdateMethod=function(t,r){kD(t).updateMethod=r},e.protoInitialize=(function(){var t=e.prototype;t.type="chart"})(),e})();function SD(e,t,r){e&&I0(e)&&(t==="emphasis"?sc:lc)(e,r)}function CD(e,t,r){var n=Vo(e,t),i=t&&t.highlightKey!=null?BV(t.highlightKey):null;n!=null?U(Cr(n),function(a){SD(e.getItemGraphicEl(a),r,i)}):e.eachItemGraphicEl(function(a){SD(a,r,i)})}cy(An),kd(An);function mG(e){return gG(e.model)}function yG(e){var t=e.model,r=e.ecModel,n=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&kD(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,r,n,i),xG[l]}var xG={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};function TD(e,t,r,n,i){var a=e.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,f=r.get(["lineStyle","width"])||0;o-=f/2,s-=f/2,l+=f,u+=f,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var d=new Nt({shape:{x:o,y:s,width:l,height:u}});if(t){var p=e.getBaseAxis(),v=p.isHorizontal(),g=p.inverse;v?(g&&(d.shape.x+=l),d.shape.width=0):(g||(d.shape.y+=u),d.shape.height=0);var y=$e(i)?function(x){i(x,d)}:null;en(d,{shape:{width:l,height:u,x:o,y:s}},r,null,n,y)}return d}function AD(e,t,r){var n=e.getArea(),i=et(n.r0,1),a=et(n.r,1),o=new Ca({shape:{cx:et(e.cx,1),cy:et(e.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(t){var s=e.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,en(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function bG(e,t,r,n,i){if(e){if(e.type==="polar")return AD(e,t,r);if(e.type==="cartesian2d")return TD(e,t,r,n,i)}else return null;return null}function Xx(e,t){return e.type===t}var Xn=(function(){function e(){}return e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e})();kd(Xn);var wG=0,qx=(function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++wG,this._onCollect=t.onCollect}return e.createByAxisModel=function(t){var r=t.option,n=r.data,i=n&&De(n,_G);return new e({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(t){var r,n=this._needCollect;if(!Me(t)&&!n)return t;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=t,this._onCollect&&this._onCollect(t,r),r;var i=this._getOrCreateMap();return r=i.get(t),r==null&&(n?(r=this.categories.length,this.categories[r]=t,i.set(t,r),this._onCollect&&this._onCollect(t,r)):r=NaN),r},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Fe(this.categories))},e})();function _G(e){return Ie(e)&&e.value!=null?e.value:e+""}var En=0,Ic=1,kG={needTransform:1,normalize:1,scale:1,transformIn:1,transformOut:1,contain:1,getExtent:1,getExtentUnsafe:1,setExtent:1,setExtent2:1,getFilter:1,sanitize:1,getDefaultStartValue:1,freeze:1},ED=kt(kG),Qh=2,DD=3;function Kx(e,t,r){var n;e=e||{};var i=Tr();if(i){var a=i.createBreakScaleMapper(t,r);a.hasBreaks()&&(U(ED,function(o){a[o]&&(e[o]=pt(a[o],a))}),n=a)}return n==null&&CG(e,r),{brk:n,mapper:e}}function MD(e,t){U(ED,function(r){e[r]=t[r]})}function LD(e,t){e.freeze=lr}function Pc(e){return e.getExtentUnsafe(En,Qh)}function Jh(e,t){return e.getExtentUnsafe(Ic,t)||e.getExtentUnsafe(En,t)}function SG(e){var t=Jh(e,DD);return t[1]-t[0]}function ep(e){var t=e.getExtentUnsafe(En,DD);return t[1]-t[0]}function CG(e,t){var r=e||{},n=[];return r._extents=n,n[En]=t?t.slice():kn(),ce(r,TG),r}var TG={needTransform:function(){return!1},normalize:function(e){var t=this._extents[Ic]||this._extents[En];return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},scale:function(e){var t=this._extents[Ic]||this._extents[En];return e*(t[1]-t[0])+t[0]},transformIn:function(e){return e},transformOut:function(e){return e},contain:function(e){var t=Jh(this,null);return e>=t[0]&&e<=t[1]},getExtent:function(){return this._extents[En].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){ID(this._extents,En,e,t)},setExtent2:function(e,t,r){var n=this._extents;n[e]||(n[e]=n[En].slice()),ID(n,e,t,r)},freeze:function(){}};function ID(e,t,r,n){ol(r,n)&&(e[t][0]=r,e[t][1]=n)}function PD(e){return tp(e)||kl(e)}function tp(e){return e.type==="interval"}function Zx(e){return e.type==="time"}function kl(e){return e.type==="log"}function qn(e){return e.type==="ordinal"}function AG(e){var t=d0(e),r=Ho(10,t),n=Hi(e/r);return n?n===2?n=3:n===3?n=5:n*=2:n=1,et(n*r,-t)}function as(e){return Vi(e)+2}function rp(e,t){return rc(e)/rc(t)}function Qx(e,t,r){var n=r&&r.lookup;if(n){for(var i=0;i<n.from.length;i++)if(e===n.from[i])return n.to[i]}return Ho(t,e)}function ND(e,t,r){var n=e.slice();if(n[0]===n[1]){var i=r&&r.ctnShp;if(n[0]!==0){var a=Ft(n[0]);t[1]||(n[1]+=a/2),n[0]-=a/2}else i&&(n[0]=-1),n[1]=1}return(!Ui(n[0])||!Ui(n[1]))&&(n[0]=0,n[1]=1),n[1]<n[0]&&n.reverse(),n}function EG(e,t){return[e[0]!==t[0],e[1]!==t[1]]}function Jx(e,t){return e=e||t,Hi(nt(e,1))}function RD(e,t,r){var n=Pc(e),i=n[0],a=e.count(),o=Math.max((t||0)+1,1);i!==0&&o>1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==n[0]&&l(n[0],!0,!0);for(var s=i;s<=n[1];s+=o)l(s,!1,s===n[0]||s===n[1]);s-o!==n[1]&&l(n[1],!0,!0);function l(u,f,d){r({value:u,offInterval:f},d)}}var OD=(function(e){ve(t,e);function t(r){var n=e.call(this)||this;n.type="ordinal",n.parse=t.parse,MD(n,t.decoratedMethods);var i=r.ordinalMeta;i||(i=new qx({})),pe(i)&&(i=new qx({categories:De(i,function(o){return Ie(o)?o.value:o})})),n._ordinalMeta=i;var a=Kx(null,null,r.extent||[0,i.categories.length-1]);return n._mapper=a.mapper,LD(n),n}return t.parse=function(r){return r==null?r=NaN:Me(r)?(r=this._ordinalMeta.getOrdinal(r),r==null&&(r=NaN)):r=Hi(r),r},t.prototype.getTicks=function(){var r=[];return RD(this,0,function(n){r.push(n)}),r},t.prototype.getMinorTicks=function(r){},t.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=ur(s,n.length);o<l;++o){var u=i[o]=n[o];a[u]=o}for(var f=0;o<s;++o){for(;a[f]!=null;)f++;i[o]=f,a[f]=o}},t.prototype._getTickNumber=function(r){var n=this._ticksByOrdinalNumber;return n&&r>=0&&r<n.length?n[r]:r},t.prototype.getRawOrdinalNumber=function(r){var n=this._ordinalNumbersByTick;return n&&r>=0&&r<n.length?n[r]:r},t.prototype.getLabel=function(r){if(!this.isBlank()){var n=this.getRawOrdinalNumber(r.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},t.prototype.count=function(){var r=Pc(this._mapper);return r[1]-r[0]+1},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.type="ordinal",t.decoratedMethods={needTransform:function(){return this._mapper.needTransform()},contain:function(r){return this._mapper.contain(this._getTickNumber(r))&&r>=0&&r<this._ordinalMeta.categories.length},normalize:function(r){return this._mapper.normalize(this._getTickNumber(r))},scale:function(r){return this.getRawOrdinalNumber(Hi(this._mapper.scale(r)))},transformIn:function(r,n){return this._mapper.transformIn(this._getTickNumber(r),n)},transformOut:function(r,n){return this.getRawOrdinalNumber(this._mapper.transformOut(r,n))},getExtent:function(){return this._mapper.getExtent()},getExtentUnsafe:function(r,n){return this._mapper.getExtentUnsafe(r,n)},setExtent:function(r,n){return this._mapper.setExtent(r,n)},setExtent2:function(r,n,i){return this._mapper.setExtent2(r,n,i)}},t})(Xn);Xn.registerClass(OD);function e1(e,t,r,n){for(var i=e.getTicks({expandToNicedExtent:!0}),a=[],o=e.getExtent(),s=1;s<i.length;s++){var l=i[s],u=i[s-1];if(!(u.break||l.break)){for(var f=0,d=[],p=l.value-u.value,v=p/t,g=as(v);f<t-1;){var y=et(u.value+(f+1)*v,g);y>o[0]&&y<o[1]&&d.push(y),f++}var x=Tr();x&&x.pruneTicksByBreak("auto",d,r,function(b){return b},n,o),a.push(d)}}return a}var Sl=(function(e){ve(t,e);function t(r){var n=e.call(this)||this;n.type="interval",n.parse=t.parse,r=r||{};var i=HE(n,r),a=Kx(n,i,null);return n.brk=a.brk,n._cfg={interval:0,intervalPrecision:2,intervalCount:void 0,niceExtent:void 0},n}return t.parse=function(r){return r==null||r===""?NaN:Number(r)},t.prototype.getConfig=function(){return Ke(this._cfg)},t.prototype.setConfig=function(r){var n=Pc(this);this._cfg=r=Ke(r),r.niceExtent==null&&(r.niceExtent=n.slice()),r.intervalPrecision==null&&(r.intervalPrecision=as(r.interval))},t.prototype.getTicks=function(r){r=r||{};var n=this._cfg,i=n.interval,a=Pc(this),o=n.niceExtent,s=n.intervalPrecision,l=Tr(),u=this.brk,f=l&&u,d=[];if(!i)return d;if(r.breakTicks==="only_break"&&f)return l.addBreaksToTicks(d,u.breaks,a),d;var p=3e3;a[0]<o[0]&&d.push({value:r.expandToNicedExtent?et(o[0]-i,s):a[0]});for(var v=function(S,T){return Hi((T-S)/i)},g=n.intervalCount,y=o[0],x=0;;x++){if(g==null){if(y>o[1]||!isFinite(y)||!isFinite(o[1]))break}else{if(x>g)break;y=ur(y,o[1]),x===g&&(y=o[1])}if(d.push({value:y}),y=et(y+i,s),u){var b=u.calcNiceTickMultiple(y,v);b>=0&&(y=et(y+b*i,s))}if(d.length>0&&y===d[d.length-1].value)break;if(d.length>p)return[]}var _=d.length?d[d.length-1].value:o[1];return a[1]>_&&d.push({value:r.expandToNicedExtent?et(_+i,s):a[1]}),f&&l.pruneTicksByBreak(r.pruneByBreak,d,u.breaks,function(S){return S.value},n.interval,a),f&&r.breakTicks!=="none"&&l.addBreaksToTicks(d,u.breaks,a),d},t.prototype.getMinorTicks=function(r){return e1(this,r,jh(this),this._cfg.interval)},t.prototype.getLabel=function(r,n){if(r==null)return"";var i=n&&n.precision;i==null?i=Vi(r.value)||0:i==="auto"&&(i=this._cfg.intervalPrecision);var a=et(r.value,i,!0);return ZE(a)},t.type="interval",t})(Xn);Xn.registerClass(Sl);var DG=function(e,t,r,n){for(;r<n;){var i=r+n>>>1;e[i][1]<t?r=i+1:n=i}return r},zD=(function(e){ve(t,e);function t(r){var n=e.call(this)||this;n.type="time",n.parse=t.parse,n._locale=r.locale,n._useUTC=r.useUTC,n._interval=0;var i=HE(n,r),a=Kx(n,i,null);return n.brk=a.brk,n}return t.prototype.getLabel=function(r){return $h(r.value,UE[s$(Tc(this._minLevelUnit))]||UE.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(r,n,i){return l$(r,n,i,this._locale,this._useUTC)},t.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=Pc(this),a=Tr(),o=this.brk,s=a&&o,l=[];if(!n)return l;var u=this._useUTC;if(s&&r.breakTicks==="only_break")return Tr().addBreaksToTicks(l,o.breaks,i),l;l=OG(this._minLevelUnit,this._approxInterval,u,i,ep(this),o);var f=tn.length-1,d=0;return U(l,function(p){p.time&&(f=Math.min(f,Je(tn,p.time.upperTimeUnit)),d=Math.max(d,p.time.level))}),s&&Tr().pruneTicksByBreak(r.pruneByBreak,l,o.breaks,function(p){return p.value},this._approxInterval,i),s&&r.breakTicks!=="none"&&Tr().addBreaksToTicks(l,o.breaks,i,function(p){for(var v=Math.max(Je(tn,_l(p.vmin,u)),Je(tn,_l(p.vmax,u))),g=0,y=0;y<tn.length;y++)if(!FD(tn[y],p.vmin,p.vmax,u)){g=y;break}var x=Math.min(g,f),b=Math.max(x,v);return{level:d,lowerTimeUnit:tn[b],upperTimeUnit:tn[x]}}),l},t.prototype.getMinorTicks=function(r){return e1(this,r,jh(this),this._interval)},t.prototype.setTimeInterval=function(r){this._interval=r.interval,this._approxInterval=r.approxInterval,this._minLevelUnit=r.minLevelUnit},t.parse=function(r){return ft(r)?Math.round(r):+al(r)},t.type="time",t})(Xn),np=[["second",bx],["minute",_x],["hour",Cc],["quarter-day",Cc*6],["half-day",Cc*12],["day",Cn*1.2],["half-week",Cn*3.5],["week",Cn*7],["month",Cn*31],["quarter",Cn*95],["half-year",VE/2],["year",VE]];function FD(e,t,r,n){return kx(new Date(t),e,n).getTime()===kx(new Date(r),e,n).getTime()}function MG(e,t){return e/=Cn,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function LG(e){var t=30*Cn;return e/=t,e>6?6:e>3?3:e>2?2:1}function IG(e){return e/=Cc,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function BD(e,t){return e/=t?_x:bx,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function PG(e){return nt(h0(e,!0),1)}function NG(e,t,r){var n=Math.max(0,Je(tn,t)-1);return kx(new Date(e),tn[n],r).getTime()}function RG(e,t){var r=new Date(0);r[e](1);var n=r.getTime();r[e](1+t);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function OG(e,t,r,n,i,a){var o=3e3,s=n$,l=0;function u(Z,re,Y,G,I,z,W){for(var F=RG(I,Z),ee=re,ae=new Date(ee);ee<Y&&ee<=n[1]&&(W.push({value:ee}),!(l++>o));)if(ae[I](ae[G]()+Z),ee=ae.getTime(),a){var ie=a.calcNiceTickMultiple(ee,F);ie>0&&(ae[I](ae[G]()+ie*Z),ee=ae.getTime())}W.push({value:ee,notAdd:ee>n[1]})}function f(Z,re,Y){var G=[],I=!re.length;if(!FD(Tc(Z),n[0],n[1],r)){I&&(re=[{value:NG(n[0],Z,r)},{value:n[1]}]);for(var z=0;z<re.length-1;z++){var W=re[z].value,F=re[z+1].value;if(W!==F){var ee=void 0,ae=void 0,ie=void 0,_e=!1;switch(Z){case"year":ee=Math.max(1,Math.round(t/Cn/365)),ae=$E(r),ie=u$(r);break;case"half-year":case"quarter":case"month":ee=LG(t),ae=Sx(r),ie=GE(r);break;case"week":case"half-week":case"day":ee=MG(t),ae=Cx(r),ie=WE(r),_e=!0;break;case"half-day":case"quarter-day":case"hour":ee=IG(t),ae=Tx(r),ie=YE(r);break;case"minute":ee=BD(t,!0),ae=Ax(r),ie=XE(r);break;case"second":ee=BD(t,!1),ae=Ex(r),ie=qE(r);break;case"millisecond":ee=PG(t),ae=Dx(r),ie=KE(r);break}F>=n[0]&&W<=n[1]&&u(ee,W,F,ae,ie,_e,G),Z==="year"&&Y.length>1&&z===0&&Y.unshift({value:Y[0].value-ee})}}for(var z=0;z<G.length;z++)Y.push(G[z])}}for(var d=[],p=[],v=0,g=0,y=0;y<s.length;++y){var x=Tc(s[y]);if(o$(s[y])){f(s[y],d[d.length-1]||[],p);var b=s[y+1]?Tc(s[y+1]):null;if(x!==b){if(p.length){g=v,p.sort(function(Z,re){return Z.value-re.value});for(var _=[],S=0;S<p.length;++S){var T=p[S].value;(S===0||p[S-1].value!==T)&&(_.push(p[S]),T>=n[0]&&T<=n[1]&&v++)}var E=i/t;if(v>E*1.5&&g>E/1.5||(d.push(_),v>E||e===s[y]))break}p=[]}}}for(var D=Zt(De(d,function(Z){return Zt(Z,function(re){return re.value>=n[0]&&re.value<=n[1]&&!re.notAdd})}),function(Z){return Z.length>0}),L=D.length-1,R=[],y=0;y<D.length;++y)for(var O=D[y],M=0;M<O.length;++M){var P=_l(O[M].value,r);R.push({value:O[M].value,time:{level:L-y,upperTimeUnit:P,lowerTimeUnit:P}})}x0(R,vV,null),R.sort(function(Z,re){return Z.value-re.value});var j=R[0],B=R[R.length-1],$=_l(n[0],r),K=_l(n[1],r);return(!j||j.value>n[0])&&R.unshift({value:n[0],time:{level:0,upperTimeUnit:$,lowerTimeUnit:$},notNice:!0}),(!B||B.value<n[1])&&R.push({value:n[1],time:{level:0,upperTimeUnit:K,lowerTimeUnit:K},notNice:!0}),R}var zG=function(e,t){var r=e.getExtent();if(r[0]===r[1]&&(r[0]-=Cn,r[1]+=Cn),r[1]===-1/0&&r[0]===1/0){var n=new Date;r[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),r[0]=r[1]-Cn}e.setExtent(r[0],r[1]);var i=Jx(t.splitNumber,10),a=ep(e)/i,o=t.minInterval,s=t.maxInterval;o!=null&&a<o&&(a=o),s!=null&&a>s&&(a=s);var l=np.length,u=Math.min(DG(np,a,0,l),l-1),f=np[u][1],d=np[Math.max(u-1,0)][0];e.setTimeInterval({approxInterval:a,interval:f,minLevelUnit:d})};Xn.registerClass(zD);var ip=0,ap=1,FG=2,jD=(function(e){ve(t,e);function t(r){var n=e.call(this)||this;n.type="log",n.parse=Sl.parse,n.base=r.logBase||10;var i=[],a=[],o=n._lookup={from:i,to:a};i[ip]=i[ap]=a[ip]=a[ap]=NaN,MD(n,t.mapperMethods);var s=Tr(),l=r.breakOption,u={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(l,n,{noNegative:!0},FG,u),n.powStub=new Sl({breakParsed:u.original}),n.intervalStub=new Sl({breakParsed:u.transformed}),LD(n,n.intervalStub),n}return t.prototype.getTicks=function(r){var n=this.base,i=this.powStub,a=Tr(),o=this.intervalStub,s=o.getExtent(),l=i.getExtent(),u={lookup:{from:s,to:l}};return De(o.getTicks(r||{}),function(f){var d=f.value,p=Qx(d,n,u),v;if(a){var g=a.getTicksBreakOutwardTransform(this,f,jh(i),this._lookup);g&&(v=g.vBreak,p=g.tickVal)}return{value:p,break:v}},this)},t.prototype.getMinorTicks=function(r){return e1(this,r,jh(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(r,n){return this.intervalStub.getLabel(r,n)},t.type="log",t.mapperMethods={needTransform:function(){return!0},normalize:function(r){return this.intervalStub.normalize(rp(r,this.base))},scale:function(r){return Qx(this.intervalStub.scale(r),this.base,null)},transformIn:function(r,n){return r=rp(r,this.base),n&&n.depth===Qh?r:this.intervalStub.transformIn(r,n)},transformOut:function(r,n){var i=n?n.depth:null;return HD.depth=i,VD.lookup=this._lookup,Qx(i===Qh?r:this.intervalStub.transformOut(r,HD),this.base,VD)},contain:function(r){return this.powStub.contain(r)},setExtent:function(r,n){this.setExtent2(En,r,n)},setExtent2:function(r,n,i){if(!(!ol(n,i)||n<=0||i<=0)){var a=UD,o=UD;if(r===En){var s=this._lookup;a=s.to,o=s.from}this.powStub.setExtent2(r,a[ip]=n,a[ap]=i);var l=this.base;this.intervalStub.setExtent2(r,o[ip]=rp(n,l),o[ap]=rp(i,l))}},getFilter:function(){return{g:0}},sanitize:function(r,n){return ol(n[0],n[1])&&wn(r)&&r<=0&&(r=n[0]),r},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(r,n){return n===null?this.powStub.getExtentUnsafe(r,null):this.intervalStub.getExtentUnsafe(r,n)}},t})(Xn);Xn.registerClass(jD);var HD={},VD={},UD=[],$D={value:1,category:1,time:1,log:1},GD=it();function BG(e){var t=e.get("type");return(t==null||!_r($D,t)&&!Xn.getClass(t))&&(t="value"),t}function jG(e,t,r){var n=Tr(),i;switch(n&&(i=WD(e,t)),t){case"category":return new OD({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:kn()});case"time":return new zD({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC"),breakOption:i});case"log":return new jD({logBase:e.get("logBase"),breakOption:i});case"value":return new Sl({breakOption:i});default:return new(Xn.getClass(t)||Sl)({})}}function HG(e,t,r){var n=e.getExtentUnsafe(En,null),i=n[0],a=n[1];return ol(i,a)?i===t||a===t?UG:i<t&&a>t?VG:t1:t1}var VG=1,UG=2,t1=3;function $G(e){GD(e).noOnMyZero=!0}function GG(e){return GD(e).noOnMyZero}function op(e){var t=e.getLabelModel().get("formatter");if(e.type==="time"){var r=i$(t);return function(i,a){return e.scale.getFormattedLabel(i,a,r)}}else{if(Me(t))return function(i){var a=e.scale.getLabel(i),o=t.replace("{value}",a??"");return o};if($e(t)){if(e.type==="category")return function(i,a){return t(sp(e,i),i.value-e.scale.getExtent()[0],null)};var n=Tr();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),t(sp(e,i),a,o)}}else return function(i){return e.scale.getLabel(i)}}}function sp(e,t){var r=e.scale;return qn(r)?r.getLabel(t):t.value}function r1(e){var t=e.get("interval");return t??"auto"}function WG(e){return e.type==="category"&&r1(e.getLabelModel())===0}function YG(e,t){var r={};return U(e.mapDimensionsAll(t),function(n){r[RE(e,n)]=!0}),kt(r)}function Cl(e){return e==="middle"||e==="center"}function Nc(e){return e.getShallow("show")}function WD(e,t,r){var n=e.get("breaks",!0);if(n!=null)return!Tr()||!XG(t)?void 0:n}function XG(e){return e!=="category"}function YD(e,t,r,n,i,a){var o=kl(e),s=o?e.intervalStub:e;if(s.setExtent(n[0],n[1]),o){var l=e.powStub,u={depth:Qh},f=e.transformOut(n[0],u),d=e.transformOut(n[1],u),p=EG(r,n);t[0]&&!p[0]&&(f=i[0]),t[1]&&!p[1]&&(d=i[1]),l.setExtent(f,d)}s.setConfig(a)}function Rc(e,t){return qn(e)?e.getRawOrdinalNumber(t.value):t.value}function XD(e,t){return qn(e)&&!!t.get("boundaryGap")}function qD(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function KD(e){for(var t=kn(),r=kn(),n=0;n<e.length;){var i=e[n++],a=e[n++];Tn(i,a)||(y0(t,i),y0(r,a))}return[t,r]}function ZD(e,t){var r=KD(e),n=r[0],i=r[1],a=KD(t),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(i[0]-s[0]),Math.abs(n[1]-o[1]),Math.abs(i[1]-s[1]))}function QD(e){return ft(e)?e:e?.5:0}function qG(e,t,r){if(r.valueDim==null)return[];for(var n=t.count(),i=Wi(n*2),a=0;a<n;a++){var o=wD(r,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Pa(e,t,r,n,i){var a=r.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],f=[],d=[],p=[];if(i){for(l=0;l<e.length;l+=2){var v=t||e;Tn(v[l],v[l+1])||p.push(e[l],e[l+1])}e=p}for(l=0;l<e.length-2;l+=2)switch(d[0]=e[l+2],d[1]=e[l+3],f[0]=e[l],f[1]=e[l+1],s.push(f[0],f[1]),n){case"end":u[o]=d[o],u[1-o]=f[1-o],s.push(u[0],u[1]);break;case"middle":var g=(f[o]+d[o])/2,y=[];u[o]=y[o]=g,u[1-o]=f[1-o],y[1-o]=d[1-o],s.push(u[0],u[1]),s.push(y[0],y[1]);break;default:u[o]=f[o],u[1-o]=d[1-o],s.push(u[0],u[1])}return s.push(e[l++],e[l++]),s}function KG(e,t){var r=[],n=e.length,i,a;function o(f,d,p){var v=f.coord,g=(p-v)/(d.coord-v),y=$H(g,[f.color,d.color]);return{coord:p,color:y}}for(var s=0;s<n;s++){var l=e[s],u=l.coord;if(u<0)i=l;else if(u>t){a?r.push(o(a,l,t)):i&&r.push(o(i,l,0),o(i,l,t));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function ZG(e,t,r){var n=e.getVisual("visualMeta");if(!(!n||!n.length||!e.count())&&t.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=e.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=t.getAxis(i),u=De(a.stops,function(S){return{coord:l.toGlobalCoord(l.dataToCoord(S.value)),color:S.color}}),f=u.length,d=a.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),d.reverse());var p=KG(u,i==="x"?r.getWidth():r.getHeight()),v=p.length;if(!v&&f)return u[0].coord<0?d[1]?d[1]:u[f-1].color:d[0]?d[0]:u[0].color;var g=10,y=p[0].coord-g,x=p[v-1].coord+g,b=x-y;if(b<.001)return"transparent";U(p,function(S){S.offset=(S.coord-y)/b}),p.push({offset:v?p[v-1].offset:.5,color:d[1]||"transparent"}),p.unshift({offset:v?p[0].offset:.5,color:d[0]||"transparent"});var _=new NA(0,0,0,0,p,!0);return _[i]=y,_[i+"2"]=x,_}}}function QG(e,t,r){var n=e.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&JG(a,t))){var o=t.mapDimension(a.dim),s={};return U(a.getViewLabels(),function(l){l.tick.offInterval||(s[Rc(a.scale,l.tick)]=1)}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function JG(e,t){var r=e.getExtent(),n=Math.abs(r[1]-r[0])/e.scale.count();isNaN(n)&&(n=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if($x.getSymbolSize(t,o)[e.isHorizontal()?1:0]*1.5>n)return!1;return!0}function eW(e){for(var t=e.length/2;t>0&&Tn(e[t*2-2],e[t*2-1]);t--);return t-1}function JD(e,t){return[e[t*2],e[t*2+1]]}function tW(e,t,r){for(var n=e.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u<n;u++)if(o=e[u*2+i],!Tn(o,e[u*2+1-i])){if(u===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function eM(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<Fr.length;t++)if(e.get([Fr[t],"endLabel","show"]))return!0;return!1}function n1(e,t,r,n){if(Xx(t,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=eM(n)?function(v,g){e._endLabelOnDuring(v,g,o,s,a,i,t)}:null,u=t.getBaseAxis().isHorizontal(),f=TD(t,r,n,function(){var v=e._endLabel;v&&r&&s.originalX!=null&&v.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var d=f.shape,p=Math.max(d.width,d.height);u?(d.y-=p,d.height+=p*2):(d.x-=p,d.width+=p*2)}return l&&l(1,f),f}else return AD(t,r,n)}function rW(e,t){var r=t.getBaseAxis(),n=r.isHorizontal(),i=r.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||a,verticalAlign:e.get("verticalAlign")||o}}}var nW=(function(e){ve(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var r=new Bt,n=new sG;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r,this._changePolyState=pt(this._changePolyState,this)},t.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=r.getModel("lineStyle"),u=r.getModel("areaStyle"),f=s.getLayout("points")||[],d=a.type==="polar",p=this._coordSys,v=this._symbolDraw,g=this._polyline,y=this._polygon,x=this._lineGroup,b=!n.ssr&&r.get("animation"),_=!u.isEmpty(),S=u.get("origin"),T=bD(a,s,S),E=_&&qG(a,s,T),D=r.get("showSymbol"),L=r.get("connectNulls"),R=D&&!d&&QG(r,s,a),O=this._data;O&&O.eachItemGraphicEl(function(xe,Se){xe.__temp&&(o.remove(xe),O.setItemGraphicEl(Se,null))}),D||v.remove(),o.add(x);var M=d?!1:r.get("step"),P;a&&a.getArea&&r.get("clip",!0)&&(P=a.getArea(),P.width!=null?(P.x-=.1,P.y-=.1,P.width+=.2,P.height+=.2):P.r0&&(P.r0-=.5,P.r+=.5)),this._clipShapeForSymbol=P;var j=ZG(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(g&&p.type===a.type&&M===this._step))D&&v.updateData(s,{isIgnore:R,clipShape:P,disableAnimation:!0,getSymbolPoint:function(xe){return[f[xe*2],f[xe*2+1]]}}),b&&this._initSymbolLabelAnimation(s,a,P),M&&(E&&(E=Pa(E,f,a,M,L)),f=Pa(f,null,a,M,L)),g=this._newPolyline(f),_?y=this._newPolygon(f,E):y&&(x.remove(y),y=this._polygon=null),d||this._initOrUpdateEndLabel(r,a,es(j)),x.setClipPath(n1(this,a,!0,r));else{_&&!y?y=this._newPolygon(f,E):y&&!_&&(x.remove(y),y=this._polygon=null),d||this._initOrUpdateEndLabel(r,a,es(j));var B=x.getClipPath();if(B){var $=n1(this,a,!1,r);en(B,{shape:$.shape},r)}else x.setClipPath(n1(this,a,!0,r));D&&v.updateData(s,{isIgnore:R,clipShape:P,disableAnimation:!0,getSymbolPoint:function(xe){return[f[xe*2],f[xe*2+1]]}}),(!qD(this._stackedOnPoints,E)||!qD(this._points,f))&&(b?this._doUpdateAnimation(s,E,a,i,M,S,L):(M&&(E&&(E=Pa(E,f,a,M,L)),f=Pa(f,null,a,M,L)),g.setShape({points:f}),y&&y.setShape({points:f,stackedOnPoints:E})))}var K=r.getModel("emphasis"),Z=K.get("focus"),re=K.get("blurScope"),Y=K.get("disabled");if(g.useStyle(ct(l.getLineStyle(),{fill:"none",stroke:j,lineJoin:"bevel"})),dh(g,r,"lineStyle"),g.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var G=g.getState("emphasis").style;G.lineWidth=+g.style.lineWidth+1}tt(g).seriesIndex=r.seriesIndex,ul(g,Z,re,Y);var I=QD(r.get("smooth")),z=r.get("smoothMonotone");if(g.setShape({smooth:I,smoothMonotone:z,connectNulls:L}),y){var W=s.getCalculationInfo("stackedOnSeries"),F=0;y.useStyle(ct(u.getAreaStyle(),{fill:j,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),W&&(F=QD(W.get("smooth"))),y.setShape({smooth:I,stackedOnSmooth:F,smoothMonotone:z,connectNulls:L}),dh(y,r,"areaStyle"),tt(y).seriesIndex=r.seriesIndex,ul(y,Z,re,Y)}var ee=this._changePolyState;s.eachItemGraphicEl(function(xe){xe&&(xe.onHoverStateChange=ee)}),this._polyline.onHoverStateChange=ee,this._data=s,this._coordSys=a,this._stackedOnPoints=E,this._points=f,this._step=M,this._valueOrigin=S;var ae=r.get("triggerEvent"),ie=r.get("triggerLineEvent"),_e=ie===!0||ae===!0||ae==="line",be=ie===!0||ae===!0||ae==="area";this.packEventData(r,g,_e),y&&this.packEventData(r,y,be)},t.prototype.packEventData=function(r,n,i){tt(n).eventData=i?{componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line",selfType:n===this._polygon?"area":"line"}:null},t.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=Vo(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],d=l[s*2+1];if(Tn(f,d)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,d))return;var p=r.get("zlevel")||0,v=r.get("z")||0;u=new $x(o,s),u.x=f,u.y=d,u.setZ(p,v);var g=u.getSymbolPath().getTextContent();g&&(g.zlevel=p,g.z=v,g.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else An.prototype.highlight.call(this,r,n,i,a)},t.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Vo(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else An.prototype.downplay.call(this,r,n,i,a)},t.prototype._changePolyState=function(r){var n=this._polygon;cA(this._polyline,r),n&&cA(n,r)},t.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new hG({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new vG({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,f=u.get("animationDuration");$e(f)&&(f=f(null));var d=u.get("animationDelay")||0,p=$e(d)?d(null):d;r.eachItemGraphicEl(function(v,g){var y=v;if(y){var x=[v.x,v.y],b=void 0,_=void 0,S=void 0;if(i)if(o){var T=i,E=n.pointToCoord(x);a?(b=T.startAngle,_=T.endAngle,S=-E[1]/180*Math.PI):(b=T.r0,_=T.r,S=E[0])}else{var D=i;a?(b=D.x,_=D.x+D.width,S=v.x):(b=D.y+D.height,_=D.y,S=v.y)}var L=_===b?0:(S-b)/(_-b);l&&(L=1-L);var R=$e(d)?d(g):f*L+p,O=y.getSymbolPath(),M=O.getTextContent();y.attr({scaleX:0,scaleY:0}),y.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:R}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:R}),O.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(eM(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Sr({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=eW(l);f>=0&&(hl(s,Xo(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:f,defaultText:function(d,p,v){return v!=null?gD(o,v):Ux(o,d)},enableTextSetter:!0},rW(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,f=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var d=i.getLayout("points"),p=i.hostModel,v=p.get("connectNulls"),g=s.get("precision"),y=s.get("distance")||0,x=l.getBaseAxis(),b=x.isHorizontal(),_=x.inverse,S=n.shape,T=_?b?S.x:S.y+S.height:b?S.x+S.width:S.y,E=(b?y:0)*(_?-1:1),D=(b?0:-y)*(_?-1:1),L=b?"x":"y",R=tW(d,T,L),O=R.range,M=O[1]-O[0],P=void 0;if(M>=1){if(M>1&&!v){var j=JD(d,O[0]);u.attr({x:j[0]+E,y:j[1]+D}),o&&(P=p.getRawValue(O[0]))}else{var j=f.getPointOn(T,L);j&&u.attr({x:j[0]+E,y:j[1]+D});var B=p.getRawValue(O[0]),$=p.getRawValue(O[1]);o&&(P=cV(i,g,B,$,R.t))}a.lastFrameIndex=O[0]}else{var K=r===1||a.lastFrameIndex>0?O[0]:0,j=JD(d,K);o&&(P=p.getRawValue(K)),u.attr({x:j[0]+E,y:j[1]+D})}if(o){var Z=Dh(u);typeof Z.setLabelText=="function"&&Z.setLabelText(P)}}},t.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,f=this._polygon,d=r.hostModel,p=dG(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),v=p.current,g=p.stackedOnCurrent,y=p.next,x=p.stackedOnNext;if(o&&(g=Pa(p.stackedOnCurrent,p.current,i,o,l),v=Pa(p.current,null,i,o,l),x=Pa(p.stackedOnNext,p.next,i,o,l),y=Pa(p.next,null,i,o,l)),ZD(v,y)>3e3||f&&ZD(g,x)>3e3){u.stopAnimation(),u.setShape({points:y}),f&&(f.stopAnimation(),f.setShape({points:y,stackedOnPoints:x}));return}u.shape.__points=p.current,u.shape.points=v;var b={shape:{points:y}};p.current!==v&&(b.shape.__points=p.next),u.stopAnimation(),dr(u,b,d),f&&(f.setShape({points:v,stackedOnPoints:g}),f.stopAnimation(),dr(f,{shape:{stackedOnPoints:x}},d),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var _=[],S=p.status,T=0;T<S.length;T++){var E=S[T].cmd;if(E==="="){var D=r.getItemGraphicEl(S[T].idx1);D&&_.push({el:D,ptIdx:T})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var L=u.shape.__points,R=0;R<_.length;R++){var O=_[R].el,M=_[R].ptIdx*2;O.x=L[M],O.y=L[M+1],O.markRedraw()}})},t.prototype.remove=function(r){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t})(An);function iW(e,t){return{seriesType:e,plan:Yx(),reset:function(r){var n=r.getData(),i=r.coordinateSystem;if(r.pipelineContext,!!i){var a=De(i.dimensions,function(d){return n.mapDimension(d)}).slice(0,2),o=a.length,s=n.getCalculationInfo("stackResultDimension");Jo(n,a[0])&&(a[0]=s),Jo(n,a[1])&&(a[1]=s);var l=n.getStore(),u=n.getDimensionIndex(a[0]),f=n.getDimensionIndex(a[1]);return o&&{progress:function(d,p){for(var v=d.end-d.start,g=Wi(v*o),y=[],x=[],b=d.start,_=0;b<d.end;b++){var S=void 0;if(o===1){var T=l.get(u,b);S=i.dataToPoint(T,null,x)}else y[0]=l.get(u,b),y[1]=l.get(f,b),S=i.dataToPoint(y,null,x);g[_++]=S[0],g[_++]=S[1]}p.setLayout("points",g),p.setLayout("pointsRange",{start:d.start,end:d.end})}}}}}}var aW={average:function(e){for(var t=0,r=0,n=0;n<e.length;n++)isNaN(e[n])||(t+=e[n],r++);return r===0?NaN:t/r},sum:function(e){for(var t=0,r=0;r<e.length;r++)t+=e[r]||0;return t},max:function(e){for(var t=-1/0,r=0;r<e.length;r++)e[r]>t&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r<e.length;r++)e[r]<t&&(t=e[r]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},oW=function(e){return Math.round(e.length/2)};function tM(e){return{seriesType:e,reset:function(t,r,n){var i=t.getData(),a=t.get("sampling"),o=t.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),d=n.getDevicePixelRatio(),p=Math.abs(f[1]-f[0])*(d||1),v=Math.round(s/p);if(isFinite(v)&&v>1){a==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/v)):a==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/v));var g=void 0;Me(a)?g=aW[a]:$e(a)&&(g=a),g&&t.setData(i.downSample(i.mapDimension(u.dim),1/v,g,oW))}}}}}function sW(e){e.registerChartView(nW),e.registerSeriesModel(aG),e.registerLayout(iW("line")),e.registerVisual({seriesType:"line",reset:function(t){var r=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,tM("line"))}var lW=it(),Oc=it(),Kn={estimate:1,determine:2};function lp(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function uW(e,t){var r=e.getLabelModel().get("customValues");if(r){var n=e.scale;return{labels:De(rM(r,n),function(i,a){return{formattedLabel:op(e)(i,a),rawLabel:n.getLabel(i),tick:i}})}}return e.type==="category"?fW(e,t):hW(e)}function cW(e,t,r){var n=e.scale,i=e.getTickModel().get("customValues");return i?{ticks:rM(i,n)}:e.type==="category"?dW(e,t):{ticks:n.getTicks(r)}}function rM(e,t){var r=t.getExtent(),n=[];return U(e,function(i){i=t.parse(i),i>=r[0]&&i<=r[1]&&n.push(i)}),x0(n,gV,null),f0(n),De(n,function(i){return{value:i}})}function fW(e,t){var r=e.getLabelModel(),n=nM(e,r,t);return!r.get("show")||e.scale.isBlank()?{labels:[]}:n}function nM(e,t,r){var n=vW(e),i=r1(t),a=r.kind===Kn.estimate;if(!a){var o=aM(n,i);if(o)return o}var s,l;$e(i)?s=up(e,i,!1):(l=i==="auto"?gW(e,r):i,s=up(e,l,!1));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return i1(n,i,u),!0}):i1(n,i,u),u}function dW(e,t){var r=pW(e),n=r1(t),i=aM(r,n);if(i)return i;var a,o;if((!t.get("show")||e.scale.isBlank())&&(a=[]),$e(n))a=up(e,n,!0);else if(n==="auto"){var s=nM(e,e.getLabelModel(),lp(Kn.determine));o=s.labelCategoryInterval,a=De(s.labels,function(l){return l.tick})}else o=n,a=up(e,o,!0);return i1(r,n,{ticks:a,tickCategoryInterval:o})}function hW(e){var t=e.scale.getTicks(),r=op(e);return{labels:De(t,function(n,i){return{formattedLabel:r(n,i),rawLabel:e.scale.getLabel(n),tick:n}})}}var pW=iM("axisTick"),vW=iM("axisLabel");function iM(e){return function(r){return Oc(r)[e]||(Oc(r)[e]={list:[]})}}function aM(e,t){for(var r=0;r<e.list.length;r++)if(e.list[r].key===t)return e.list[r].value}function i1(e,t,r){return e.list.push({key:t,value:r}),r}function gW(e,t){if(t.kind===Kn.estimate){var r=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return Oc(e).autoInterval=r,!0}),r}var n=Oc(e).autoInterval;return n??(Oc(e).autoInterval=e.calculateCategoryInterval(t))}function mW(e,t){var r=t.kind,n=xW(e),i=op(e),a=(n.axisRotate-n.labelRotate)/180*Math.PI,o=e.scale,s=o.getExtent(),l=o.count();if(s[1]-s[0]<1)return 0;var u=1,f=40;l>f&&(u=Math.max(1,Math.floor(l/f)));for(var d=s[0],p=e.dataToCoord(d+1)-e.dataToCoord(d),v=Math.abs(p*Math.cos(a)),g=Math.abs(p*Math.sin(a)),y=0,x=0;d<=s[1];d+=u){var b=0,_=0,S=zC(i({value:d}),n.font,"center","top");b=S.width*1.3,_=S.height*1.3,y=Math.max(y,b,7),x=Math.max(x,_,7)}var T=y/v,E=x/g;isNaN(T)&&(T=1/0),isNaN(E)&&(E=1/0);var D=Math.max(0,Math.floor(Math.min(T,E)));if(r===Kn.estimate)return t.out.noPxChangeTryDetermine.push(pt(yW,null,e,D,l)),D;var L=oM(e,D,l);return L??D}function yW(e,t,r){return oM(e,t,r)==null}function oM(e,t,r){var n=lW(e.model),i=e.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-r)<=1&&a>t&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=t,n.axisExtent0=i[0],n.axisExtent1=i[1]}function xW(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function up(e,t,r){var n=op(e),i=e.scale,a=[],o=$e(t);return RD(i,o?0:t,function(s,l){var u=i.getLabel(s);if(o){var f=!!t(s.value,u);if(s.offInterval=!f,!f&&!l)return}a.push(r?s:{formattedLabel:n(s),rawLabel:u,tick:s})}),a}var cp=it();function bW(e){cp(e).prepare={}}function wW(e){cp(e).fullUpdate={}}function _W(e){return cp(e).prepare}function Tl(e){return cp(e).fullUpdate}var kW=ZT(),a1="|&",Al=it(),sM=-2,SW=-1,CW=it();function lM(e,t){var r=e.model,n=Al(Tl(r.ecModel)).keyed,i=n&&n.get(t);return i&&i.get(r.uid)}function TW(e,t){return cM(lM(e,t))}function AW(e,t){var r=[];return uM(e.model.ecModel,function(n){for(var i=0;i<t.length;i++)t[i]&&n.serByIdx[t[i].seriesIndex]&&r.push(cM(n))}),r}function uM(e,t){var r=Al(Tl(e)).keyed;r&&r.each(function(n,i){n.each(function(a,o){t(a,i,o)})})}function cM(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function EW(e,t){var r=e.model.ecModel,n=Al(Tl(r)).axSer;n&&o1(r,n.get(e.model.uid),t)}function fM(e,t,r){var n=lM(e,t);n&&o1(e.model.ecModel,n.sers,r)}function o1(e,t,r){if(t)for(var n=0;n<t.length;n++){var i=t[n];e.isSeriesFiltered(i)||r(i)}}function DW(e,t,r){var n=Al(Tl(e)).keyed,i=n&&n.get(t);i&&i.each(function(a){r(a.axis)})}function dM(e,t){var r=e.model,n=Al(Tl(r.ecModel)).keys;n&&U(n.get(r.uid),function(i){t(i)})}function MW(e){var t=CW(_W(e)),r=t.keyed||(t.keyed=Fe());uM(e,function(n,i,a){var o=r.get(i)||r.set(i,Fe()),s=o.get(a)||o.set(a,{});n.metrics.liPosMinGap&&hM.liPosMinGap(e,n,s)})}function LW(e,t){hM[e]=t}var hM={};function pM(e,t,r){if(e){var n=t.ecModel,i=Al(Tl(n)),a=e.model.uid,o=i.axSer||(i.axSer=Fe()),s=o.get(a)||o.set(a,[]);s.push(t);var l=t.subType,u=t.getBaseAxis()===e,f=l1.get(s1(l,u,r))||l1.get(s1(l,u,null));if(f){var d=i.keyed||(i.keyed=Fe()),p=i.keys||(i.keys=Fe()),v=f.key,g=d.get(v)||d.set(v,Fe()),y=g.get(a);y||(y=g.set(a,{axis:e,sers:[],serByIdx:[]}),y.metrics=f.getMetrics(e),(p.get(a)||p.set(a,[])).push(v)),y.sers.push(t),y.serByIdx[t.seriesIndex]=t}}}function s1(e,t,r){return e+a1+Ae(t,!0)+a1+(r||"")}function IW(e,t){var r=s1(t.seriesType,t.baseAxis,t.coordSysType);l1.set(r,t),kW(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:MW})})}var l1=Fe(),PW=.8;function El(e,t){t=t||{};var r={w:NaN,w2:NaN},n=e.scale,i=t.fromStat,a=t.min,o=SG(n);wn(o)||(o=NaN);var s=e.getExtent(),l=Ft(s[1]-s[0]);return qn(n)?NW(r,e,o,l):i&&RW(r,e,o,l,i),a!=null&&(r.w=wn(r.w)?nt(a,r.w):a),r}function NW(e,t,r,n){var i=t.onBand,a=r+(i?1:0);a===0&&(a=1),e.w=n/a,!i&&r&&n&&(e.w2=e.w*r/n)}function RW(e,t,r,n,i){var a=!1,o=-1/0;U(i.key?[TW(t,i.key)]:AW(t,i.sers||[]),function(s){var l=s.liPosMinGap;l!=null&&(l>0?(l>o&&(o=l),a=!1):l===sM&&(a=!0))}),wn(r)&&r>0&&wn(o)?(e.w=n/r*o,e.w2=o):a&&(e.w=n*PW,e.w2=e.w*r/n)}var vM=[0,1],OW=(function(){function e(t,r,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=r,this._extent=n||[0,0]}return e.prototype.contain=function(t){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return t>=n&&t<=i},e.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,r){var n=this._extent;n[0]=t,n[1]=r},e.prototype.dataToCoord=function(t,r){var n=this.scale;return t=n.normalize(n.parse(t)),u0(t,vM,gM(this),r)},e.prototype.coordToData=function(t,r){var n=u0(t,gM(this),vM,r);return this.scale.scale(n)},e.prototype.pointToData=function(t,r){},e.prototype.getTicksCoords=function(t){t=t||{};var r=t.tickModel||this.getTickModel(),n=cW(this,r,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),i=De(n.ticks,function(s){return{coord:this.dataToCoord(Rc(this.scale,s)),tick:s}},this),a=r.get("alignWithLabel"),o=zW(this,i,a);return De(i,function(s){return{coord:s.coord,tickValue:s.tick.value,onBand:o}})},e.prototype.getMinorTicksCoords=function(){if(qn(this.scale))return[];var t=this.model.getModel("minorTick"),r=t.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=De(n,function(a){return De(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},e.prototype.getViewLabels=function(t){return t=t||lp(Kn.determine),uW(this,t).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){return El(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(t){return t=t||lp(Kn.determine),mW(this,t)},e})();function gM(e){var t=e.getExtent();if(e.onBand){var r=t[1]-t[0],n=r/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function zW(e,t,r){var n=t.length;if(!e.onBand||r||!n)return!1;var i=El(e).w;if(!i)return!1;U(t,function(s){s.coord-=i/2});var a=e.scale.getExtent(),o=t[n-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var FW=(function(e){ve(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},t})(OW),mM=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],BW=1,fp=2,yM=BW|fp;function dp(e,t,r){r=r||yM,t?e.dirty|=r:e.dirty&=~r}function xM(e,t){return t=t||yM,e.dirty==null||!!(e.dirty&t)}function Si(e){if(e)return xM(e)&&bM(e,e.label,e),e}function bM(e,t,r){var n=t.getComputedTransform();e.transform=K0(e.transform,n);var i=e.localRect=mc(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=r&&r.marginForce,l=r&&r.minMarginForce,u=r&&r.marginDefault,f=a.__marginType;f==null&&u&&(o=u,f=vl.textMargin);for(var d=0;d<4;d++)u1[d]=f===vl.minMargin&&l&&l[d]!=null?l[d]:s&&s[d]!=null?s[d]:o?o[d]:0;f===vl.textMargin&&Ch(i,u1,!1,!1);var p=e.rect=mc(e.rect,i);return n&&p.applyTransform(n),f===vl.minMargin&&Ch(p,u1,!1,!1),e.axisAligned=q0(n),(e.label=e.label||{}).ignore=t.ignore,dp(e,!1),dp(e,!0,fp),e}var u1=[0,0,0,0];function jW(e,t,r){return e.transform=K0(e.transform,r),e.localRect=mc(e.localRect,t),e.rect=mc(e.rect,t),r&&e.rect.applyTransform(r),e.axisAligned=q0(r),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function HW(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var r=e.transform;r&&(r[4]+=t.x,r[5]+=t.y);var n=e.rect;n&&(n.x+=t.x,n.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,r)}}function wM(e,t){for(var r=0;r<mM.length;r++){var n=mM[r];e[n]==null&&(e[n]=t[n])}return Si(e)}function _M(e){var t=e.obb;return(!t||xM(e,fp))&&(e.obb=t=t||new RA,t.fromBoundingRect(e.localRect,e.transform),dp(e,!1,fp)),t}function VW(e,t,r,n,i){var a=e.length,o=Ta[t],s=dl[t];if(a<2)return!1;e.sort(function(L,R){return L.rect[o]-R.rect[o]});for(var l=0,u,f=!1,d=0;d<a;d++){var p=e[d],v=p.rect;u=v[o]-l,u<0&&(v[o]-=u,p.label[o]-=u,f=!0),l=v[o]+v[s]}var g=e[0],y=e[a-1],x,b;_(),x<0&&E(-x,.8),b<0&&E(b,.8),_(),S(x,b,1),S(b,x,-1),_(),x<0&&D(-x),b<0&&D(b);function _(){x=g.rect[o]-r,b=n-y.rect[o]-y.rect[s]}function S(L,R,O){if(L<0){var M=Math.min(R,-L);if(M>0){T(M*O,0,a);var P=M+L;P<0&&E(-P*O,1)}else E(-L*O,1)}}function T(L,R,O){L!==0&&(f=!0);for(var M=R;M<O;M++){var P=e[M],j=P.rect;j[o]+=L,P.label[o]+=L}}function E(L,R){for(var O=[],M=0,P=1;P<a;P++){var j=e[P-1].rect,B=Math.max(e[P].rect[o]-j[o]-j[s],0);O.push(B),M+=B}if(M){var $=Math.min(Math.abs(L)/M,R);if(L>0)for(var P=0;P<a-1;P++){var K=O[P]*$;T(K,0,P+1)}else for(var P=a-1;P>0;P--){var K=O[P-1]*$;T(-K,P,a)}}}function D(L){var R=L<0?-1:1;L=Math.abs(L);for(var O=Math.ceil(L/(a-1)),M=0;M<a-1;M++)if(R>0?T(O,0,M+1):T(-O,a-M-1,a),L-=O,L<=0)return}return f}function UW(e){var t=[];e.sort(function(u,f){return(f.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||f.priority-u.priority});function r(u){if(!u.ignore){var f=u.ensureState("emphasis");f.ignore==null&&(f.ignore=!1)}u.ignore=!0}for(var n=0;n<e.length;n++){var i=Si(e[n]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,l=0;l<t.length;l++)if(c1(i,t[l],null,{touchThreshold:.05})){s=!0;break}s?(r(a),o&&r(o)):t.push(i)}}}function c1(e,t,r,n){return!e||!t||e.label&&e.label.ignore||t.label&&t.label.ignore||!e.rect.intersect(t.rect,r,n)?!1:e.axisAligned&&t.axisAligned?!0:_M(e).intersect(_M(t),r,n)}var $W=null;function hp(){return $W}var GW="expandAxisBreak",Na=Math.PI,WW=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],YW=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],os=it(),kM=it(),SM=(function(){function e(t){this.recordMap={},this.resolveAxisNameOverlap=t}return e.prototype.ensureRecord=function(t){var r=t.axis.dim,n=t.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},e})();function XW(e,t,r,n){var i=r.axis,a=t.ensureRecord(r),o=[],s,l=d1(e.axisName)&&Cl(e.nameLocation);U(n,function(g){var y=Si(g);if(!(!y||y.label.ignore)){o.push(y);var x=a.transGroup;l&&(x.transform?Uu(zc,x.transform):Hu(zc),y.transform&&Vu(zc,zc,y.transform),je.copy(pp,y.localRect),pp.applyTransform(zc),s?s.union(pp):je.copy(s=new je(0,0,0,0),pp))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",f=a.transGroup[u];if(o.sort(function(g,y){return Math.abs(g.label[u]-f)-Math.abs(y.label[u]-f)}),l&&s){var d=i.getExtent(),p=Math.min(d[0],d[1]),v=Math.max(d[0],d[1])-p;s.union(new je(p,0,v,1))}a.stOccupiedRect=s,a.labelInfoList=o}var zc=fi(),pp=new je(0,0,0,0),CM=function(e,t,r,n,i,a){if(Cl(e.nameLocation)){var o=a.stOccupiedRect;o&&TM(jW({},o,a.transGroup.transform),n,i)}else AM(a.labelInfoList,a.dirVec,n,i)};function TM(e,t,r){var n=new Ye;c1(e,t,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&HW(t,n)}function AM(e,t,r,n){for(var i=Ye.dot(n,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||TM(s,r,n)}}var Ra=(function(){function e(t,r,n,i){this.group=new Bt,this._axisModel=t,this._api=r,this._local={},this._shared=i||new SM(CM),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(t){var r=this._cfg.raw;r.position=t.position,r.labelOffset=t.labelOffset,this._resetCfgDetermined(r)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(t){var r=this._axisModel,n=r.getDefaultOption?r.getDefaultOption():{},i=Ae(t.axisName,r.get("name")),a=r.get("nameMoveOverlap");(a==null||a==="auto")&&(a=Ae(t.defaultNameMoveOverlap,!0));var o={raw:t,position:t.position,rotation:t.rotation,nameDirection:Ae(t.nameDirection,1),tickDirection:Ae(t.tickDirection,1),labelDirection:Ae(t.labelDirection,1),labelOffset:Ae(t.labelOffset,0),silent:Ae(t.silent,!0),axisName:i,nameLocation:yo(r.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:d1(i)&&a,optionHideOverlap:r.get(["axisLabel","hideOverlap"]),showMinorTicks:r.get(["minorTick","show"])};this._cfg=o;var s=new Bt({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(r);l.transGroup=this._transformGroup,l.dirVec=new Ye(Math.cos(-o.rotation),Math.sin(-o.rotation))},e.prototype.build=function(t,r){var n=this;return t||(t={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),U(qW,function(i){t[i]&&KW[i](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,r||{})}),this},e.innerTextLayout=function(t,r,n){var i=FT(r-t),a,o;return rh(i)?(o=n>0?"top":"bottom",a="center"):rh(i-Na)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<Na?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},e.makeAxisEventDataBase=function(t){var r={componentType:t.mainType,componentIndex:t.componentIndex};return r[t.mainType+"Index"]=t.componentIndex,r},e.isLabelSilent=function(t){var r=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||r&&r.show)},e})(),qW=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],KW={axisLine:function(e,t,r,n,i,a,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=a.transform,f=[l[0],0],d=[l[1],0],p=f[0]>d[0];u&&(vn(f,f,u),vn(d,d,u));var v=ce({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),g={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(n.get(["axisLine","breakLine"])&&Hh(n.axis.scale))hp().buildAxisBreakLine(n,i,a,g);else{var y=new Gi(ce({shape:{x1:f[0],y1:f[1],x2:d[0],y2:d[1]}},g));vc(y.shape,y.style.lineWidth),y.anid="line",i.add(y)}var x=n.get(["axisLine","symbol"]);if(x!=null){var b=n.get(["axisLine","symbolSize"]);Me(x)&&(x=[x,x]),(Me(b)||ft(b))&&(b=[b,b]);var _=Kh(n.get(["axisLine","symbolOffset"])||0,b),S=b[0],T=b[1];U([{rotate:e.rotation+Math.PI/2,offset:_[0],r:0},{rotate:e.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((f[0]-d[0])*(f[0]-d[0])+(f[1]-d[1])*(f[1]-d[1]))}],function(E,D){if(x[D]!=="none"&&x[D]!=null){var L=is(x[D],-S/2,-T/2,S,T,v.stroke,!0),R=E.r+E.offset,O=p?d:f;L.attr({rotation:E.rotate,x:O[0]+R*Math.cos(e.rotation),y:O[1]-R*Math.sin(e.rotation),silent:!0,z2:11}),i.add(L)}})}}},axisTickLabelEstimate:function(e,t,r,n,i,a,o,s){var l=MM(t,i,s);l&&EM(e,t,r,n,i,a,o,Kn.estimate)},axisTickLabelDetermine:function(e,t,r,n,i,a,o,s){var l=MM(t,i,s);l&&EM(e,t,r,n,i,a,o,Kn.determine);var u=eY(e,i,a,n);JW(e,t.labelLayoutList,u),tY(e,i,a,n,e.tickDirection)},axisName:function(e,t,r,n,i,a,o,s){var l=r.ensureRecord(n);t.nameEl&&(i.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=e.axisName;if(d1(u)){var f=e.nameLocation,d=e.nameDirection,p=n.getModel("nameTextStyle"),v=n.get("nameGap")||0,g=n.axis.getExtent(),y=n.axis.inverse?-1:1,x=new Ye(0,0),b=new Ye(0,0);f==="start"?(x.x=g[0]-y*v,b.x=-y):f==="end"?(x.x=g[1]+y*v,b.x=y):(x.x=(g[0]+g[1])/2,x.y=e.labelOffset+d*v,b.y=d);var _=fi();b.transform(py(_,_,e.rotation));var S=n.get("nameRotate");S!=null&&(S=S*Na/180);var T,E;Cl(f)?T=Ra.innerTextLayout(e.rotation,S??e.rotation,d):(T=ZW(e.rotation,f,S||0,g),E=e.raw.axisNameAvailableWidth,E!=null&&(E=Math.abs(E/Math.sin(T.rotation)),!isFinite(E)&&(E=null)));var D=p.getFont(),L=n.get("nameTruncate",!0)||{},R=L.ellipsis,O=Fu(e.raw.nameTruncateMaxWidth,L.maxWidth,E),M=s.nameMarginLevel||0,P=new Sr({x:x.x,y:x.y,rotation:T.rotation,silent:Ra.isLabelSilent(n),style:pl(p,{text:u,font:D,overflow:"truncate",width:O,ellipsis:R,fill:p.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:p.get("align")||T.textAlign,verticalAlign:p.get("verticalAlign")||T.textVerticalAlign}),z2:1});if(Th({el:P,componentModel:n,itemName:u}),P.__fullText=u,P.anid="name",n.get("triggerEvent")){var j=Ra.makeAxisEventDataBase(n);j.targetType="axisName",j.name=u,tt(P).eventData=j}a.add(P),P.updateTransform(),t.nameEl=P;var B=l.nameLayout=Si({label:P,priority:P.z2,defaultAttr:{ignore:P.ignore},marginDefault:Cl(f)?WW[M]:YW[M]});if(l.nameLocation=f,i.add(P),P.decomposeTransform(),e.shouldNameMoveOverlap&&B){var $=r.ensureRecord(n);r.resolveAxisNameOverlap(e,r,n,B,b,$)}}}};function EM(e,t,r,n,i,a,o,s){LM(t)||rY(e,t,i,s,n,o);var l=t.labelLayoutList;nY(e,n,l,a),oY(n,e.rotation,l);var u=e.optionHideOverlap;QW(n,l,u),u&&UW(Zt(l,function(f){return f&&!f.label.ignore})),XW(e,r,n,l)}function ZW(e,t,r,n){var i=FT(r-e),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return rh(i-Na/2)?(o=l?"bottom":"top",a="center"):rh(i-Na*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<Na*1.5&&i>Na/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function QW(e,t,r){var n=e.axis,i=e.get(["axisLabel","customValues"]);if(WG(n))return;function a(u,f,d){var p=Si(t[f]),v=Si(t[d]),g=n.scale;if(!(!p||!v)){if(u==null){if(!r&&i)return;var y=os(p.label).labelInfo.tick;if(Zx(g)&&y.notNice||qn(g)&&y.offInterval){Dl(p.label);return}}if(u===!1||p.suggestIgnore){Dl(p.label);return}if(v.suggestIgnore){Dl(v.label);return}var x=.1;if(!r){var b=[0,0,0,0];p=wM({marginForce:b},p),v=wM({marginForce:b},v)}c1(p,v,null,{touchThreshold:x})&&Dl(u?v.label:p.label)}}var o=e.get(["axisLabel","showMinLabel"]),s=e.get(["axisLabel","showMaxLabel"]),l=t.length;a(o,0,1),a(s,l-1,l-2)}function JW(e,t,r){e.showMinorTicks||U(t,function(n){if(n&&n.label.ignore)for(var i=0;i<r.length;i++){var a=r[i],o=kM(a),s=os(n.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.labelInfo.tick.value){Dl(a);return}}})}function Dl(e){e&&(e.ignore=!0)}function DM(e,t,r,n,i){for(var a=[],o=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=r,t&&(vn(o,o,t),vn(s,s,t));var f=new Gi({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});vc(f.shape,f.style.lineWidth),f.anid=i+"_"+e[l].tickValue,a.push(f);var d=kM(f);d.onBand=!!e[l].onBand,d.tickValue=e[l].tickValue}return a}function eY(e,t,r,n){var i=n.axis,a=n.getModel("axisTick"),o=a.get("show");if(o==="auto"&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel("lineStyle"),l=e.tickDirection*a.get("length"),u=i.getTicksCoords(),f=DM(u,r.transform,l,ct(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),d=0;d<f.length;d++)t.add(f[d]);return f}function tY(e,t,r,n,i){var a=n.axis,o=n.getModel("minorTick");if(!(!e.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=i*o.get("length"),f=ct(l.getLineStyle(),ct(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),d=0;d<s.length;d++)for(var p=DM(s[d],r.transform,u,f,"minorticks_"+d),v=0;v<p.length;v++)t.add(p[v])}}function MM(e,t,r){if(LM(e)){var n=e.axisLabelsCreationContext,i=n.out.noPxChangeTryDetermine;if(r.noPxChange){for(var a=!0,o=0;o<i.length;o++)a=a&&i[o]();if(a)return!1}i.length&&(t.remove(e.labelGroup),f1(e,null,null,null))}return!0}function rY(e,t,r,n,i,a){var o=i.axis,s=Fu(e.raw.axisLabelShow,i.get(["axisLabel","show"])),l=new Bt;r.add(l);var u=lp(n);if(!s||o.scale.isBlank()){f1(t,[],l,u);return}var f=i.getModel("axisLabel"),d=o.getViewLabels(u),p=(Fu(e.raw.labelRotate,f.get("rotate"))||0)*Na/180,v=Ra.innerTextLayout(e.rotation,p,e.labelDirection),g=i.getCategories&&i.getCategories(!0),y=[],x=i.get("triggerEvent"),b=1/0,_=-1/0;U(d,function(T,E){var D,L=T.tick,R=T.formattedLabel,O=T.rawLabel,M=f,P=Rc(o.scale,L);if(g&&g[P]){var j=g[P];Ie(j)&&j.textStyle&&(M=new Et(j.textStyle,f,i.ecModel))}var B=M.getTextColor()||i.get(["axisLine","lineStyle","color"]),$=M.getShallow("align",!0)||v.textAlign,K=Ae(M.getShallow("alignMinLabel",!0),$),Z=Ae(M.getShallow("alignMaxLabel",!0),$),re=M.getShallow("verticalAlign",!0)||M.getShallow("baseline",!0)||v.textVerticalAlign,Y=Ae(M.getShallow("verticalAlignMinLabel",!0),re),G=Ae(M.getShallow("verticalAlignMaxLabel",!0),re),I=10+(((D=L.time)===null||D===void 0?void 0:D.level)||0);b=Math.min(b,I),_=Math.max(_,I);var z=new Sr({x:0,y:0,rotation:0,silent:Ra.isLabelSilent(i),z2:I,style:pl(M,{text:R,align:E===0?K:E===d.length-1?Z:$,verticalAlign:E===0?Y:E===d.length-1?G:re,fill:$e(B)?B(o.type==="category"?O:o.type==="value"?P+"":P,E):B})});z.anid="label_"+P;var W=os(z);if(W.labelInfo=T,W.layoutRotation=v.rotation,Th({el:z,componentModel:i,itemName:R,formatterParamsExtra:{isTruncated:function(){return z.isTruncated},value:O,tickIndex:E}}),x){var F=Ra.makeAxisEventDataBase(i);F.targetType="axisLabel",F.value=O,F.tickIndex=E;var ee=T.tick.break;if(ee){var ae=ee.parsedBreak;F.break={start:ae.vmin,end:ae.vmax}}o.type==="category"&&(F.dataIndex=P),tt(z).eventData=F,ee&&aY(i,a,z,ee)}y.push(z),l.add(z)});var S=De(y,function(T){return{label:T,priority:os(T).labelInfo.tick.break?T.z2+(_-b+1):T.z2,defaultAttr:{ignore:T.ignore}}});f1(t,S,l,u)}function LM(e){return!!e.labelLayoutList}function f1(e,t,r,n){e.labelLayoutList=t,e.labelGroup=r,e.axisLabelsCreationContext=n}function nY(e,t,r,n){var i=t.get(["axisLabel","margin"]);U(r,function(a,o){var s=Si(a);if(s){var l=s.label,u=os(l);s.suggestIgnore=l.ignore,l.ignore=!1,Dd(Yi,iY);var f=t.axis;Yi.x=f.dataToCoord(Rc(f.scale,u.labelInfo.tick)),Yi.y=e.labelOffset+e.labelDirection*i,Yi.rotation=u.layoutRotation,n.add(Yi),Yi.updateTransform(),n.remove(Yi),Yi.decomposeTransform(),Dd(l,Yi),l.markRedraw(),dp(s,!0),Si(s)}})}var Yi=new Nt,iY=new Nt;function d1(e){return!!e}function aY(e,t,r,n){r.on("click",function(i){var a={type:GW,breaks:[{start:n.parsedBreak.breakOption.start,end:n.parsedBreak.breakOption.end}]};a[e.axis.dim+"AxisIndex"]=e.componentIndex,t.dispatchAction(a)})}function oY(e,t,r){var n=Tr();if(n){var i=n.retrieveAxisBreakPairs(r,function(o){return o&&os(o.label).labelInfo.tick.break},!0),a=e.get(["breakLabelLayout","moveOverlap"],!0);(a===!0||a==="auto")&&U(i,function(o){hp().adjustBreakLabelPair(e.axis.inverse,t,[Si(r[o[0]]),Si(r[o[1]])])})}}function vp(e,t,r){r=r||{};var n=t.axis,i={},a=n.getAxesOnZeroOf()[0],o=n.position,s=a?"onZero":o,l=n.dim,u=[e.x,e.x+e.width,e.y,e.y+e.height],f={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get("offset")||0,p=l==="x"?[u[2]-d,u[3]+d]:[u[0]-d,u[1]+d];if(a){var v=a.toGlobalCoord(a.dataToCoord(0));p[f.onZero]=Math.max(Math.min(v,p[1]),p[0])}i.position=[l==="y"?p[f[s]]:u[0],l==="x"?p[f[s]]:u[3]],i.rotation=Math.PI/2*(l==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=g[o],i.labelOffset=a?p[f[o]]-p[f.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Fu(r.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var y=t.get(["axisLabel","rotate"]);return i.labelRotate=s==="top"?-y:y,i.z2=1,i}function sY(e){return e.coordinateSystem&&e.coordinateSystem.type==="cartesian2d"}function lY(e){var t={xAxisModel:null,yAxisModel:null};return U(t,function(r,n){var i=n.replace(/Model$/,""),a=e.getReferringComponents(i,_n).models[0];t[n]=a}),t}function uY(e,t,r,n,i,a){for(var o=vp(e,r),s=!1,l=!1,u=0;u<t.length;u++)PD(t[u].getOtherAxis(r.axis).scale)&&(s=l=!0,r.axis.type==="category"&&r.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=a,new Ra(r,n,o,i)}function cY(e,t,r){var n=vp(t,r);e.updateCfg(n)}var fY=it(),dY=1,hY=3,IM=(function(){function e(t,r,n,i,a){var o=qn(t),s=o?r.getCategories().length:null,l;if(o){var u=r.getCategories(!0);l=u&&!u.length}var f=n.slice();(tp(t)||kl(t)||Zx(t))&&(qT(f,Fc(t,r.get("dataMin",!0))),KT(f,Fc(t,r.get("dataMax",!0)))),dV(f)||(f[0]=f[1]=NaN);var d=[],p=[!1,!1],v=r.get("min",!0);v==="dataMin"?(d[0]=f[0],p[0]=!0):(d[0]=Fc(t,$e(v)?v({min:f[0],max:f[1]}):v),p[0]=d[0]!=null);var g=r.get("max",!0);g==="dataMax"?(d[1]=f[1],p[1]=!0):(d[1]=Fc(t,$e(g)?g({min:f[0],max:f[1]}):g),p[1]=d[1]!=null);var y=pY(t,r),x=o?null:f[1]-f[0]||Math.abs(f[0]);d[0]==null&&(d[0]=o?l?f[0]:s?0:NaN:f[0]-y[0]*x),d[1]==null&&(d[1]=o?l?f[1]:s?s-1:NaN:f[1]+y[1]*x),!Ui(d[0])&&(d[0]=NaN),!Ui(d[1])&&(d[1]=NaN);var b=l||zu(d[0])||zu(d[1])||o&&!s,_=tp(t),S=_&&r.needIncludeZero&&r.needIncludeZero();S&&(d[0]>0&&d[1]>0&&!p[0]&&(d[0]=0),d[0]<0&&d[1]<0&&!p[1]&&(d[1]=0));var T=!1;d[0]>d[1]&&(d.reverse(),T=!0);var E=Fc(t,r.get("startValue",!0)),D=E!=null;!wn(E)&&i&&(E=t.getDefaultStartValue?t.getDefaultStartValue():0),wn(E)&&(D||!_||S)&&(E<d[0]&&!p[0]?(d[0]=E,p[0]=!0):E>d[1]&&!p[1]&&(d[1]=E,p[1]=!0));var L=this._i={scale:t,dataMM:f,noZoomEffMM:d,zoomMM:[],fixMM:p,zoomFixMM:[!1,!1],startValue:E,isBlank:b,incl0:S,tggAxInv:T,ctnShp:a};PM(L,d)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var t=this._i,r=t.zoomMM,n=t.noZoomEffMM,i=t.zoomFixMM,a=t.fixMM,o={fixMM:a,zoomFixMM:i,isBlank:t.isBlank,incl0:t.incl0,tggAxInv:t.tggAxInv,ctnShp:t.ctnShp,effMM:n.slice()},s=o.effMM;return r[0]!=null&&(s[0]=r[0],a[0]=i[0]=!0),r[1]!=null&&(s[1]=r[1],a[1]=i[1]=!0),PM(t,s),o},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(t,r){this._i.zoomMM[t]=r},e})();function PM(e,t){var r=e.scale,n=e.dataMM;r.sanitize&&(t[0]=r.sanitize(t[0],n),t[1]=r.sanitize(t[1],n),hV(t))}function Fc(e,t){return t==null?null:zu(t)?NaN:e.parse(t)}function pY(e,t){var r;if(qn(e))r=[0,0];else{var n=t.get("boundaryGap");typeof n=="boolean"&&(n=null),r=pe(n)?n:[n,n]}return[NM(r[0]),NM(r[1])]}function NM(e){return To(typeof e=="boolean"?0:e,1)||0}function RM(e){var t=fY(e.scale);return t.extent||(t.extent=kn()),t}function vY(e,t){RM(e).dimIdxInCoord=t.get(e.dim)}function gY(e,t){var r=e.scale,n=e.model,i=e.dim;r.rawExtentInfo||mY(r,e,i,n,t)}function mY(e,t,r,n,i){var a=RM(t),o=a.extent,s=!1;EW(t,function(f){if(f.boxCoordinateSystem){var d=NE(f).coord,p=a.dimIdxInCoord;if(p>=0){if(pe(d)){var v=d[p];v!=null&&!pe(v)&&y0(o,e.parse(v))}}}else if(f.coordinateSystem){var g=f.getData();if(g){var y=e.getFilter?e.getFilter():null;U(YG(g,r),function(x){fV(o,g.getApproximateExtent(x,y))})}f.__requireStartValue&&f.__requireStartValue(t)&&(s=!0)}});var l=bY(e,t,n),u=new IM(e,n,o,s,l);OM(e,u,i),a.extent=null}function yY(e,t){var r=e.scale;OM(r,new IM(r,e.model,t,!1,!1),hY)}function OM(e,t,r){e.rawExtentInfo=t,t.from=r}function xY(e,t){h1.set(e,t)}var h1=Fe();function zM(e,t,r,n,i){e.rawExtentInfo||yY({scale:e,model:t},kn());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),n&&a.tggAxInv&&r&&!r.get("legacyMinMaxDontInverseAxis")&&(n.inverse=!n.inverse),a}function bY(e,t,r){var n=XD(e,r),i=r.get("containShape",!0);if(i==null&&!n&&(i=!0),!i)return!1;var a=!1;return dM(t,function(o){a=!!h1.get(o)||a}),a}function wY(e,t,r,n){if(r.ctnShp){var i;if(dM(e,function(s){var l=h1.get(s);if(l){var u=l(e,n);u&&(i=i||[0,0],qT(i,u[0]),KT(i,u[1]),$G(e))}}),!!i){var a=t.getExtent();if(qn(t))e.onBand||t.setExtent2(Ic,ur(a[0],a[0]+i[0]),nt(a[1],a[1]+i[1]));else{var o=a.slice();r.zoomFixMM[0]||(o[0]=ur(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),r.zoomFixMM[1]||(o[1]=nt(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]<a[0]||o[1]>a[1])&&t.setExtent2(Ic,o[0],o[1])}}}}function _Y(){LW("liPosMinGap",kY)}function kY(e,t,r){var n=Fe(),i=r.serUids,a=r.liPosMinGap,o,s=t.axis,l=s.scale,u=l.needTransform(),f=l.getFilter?l.getFilter():null,d=xE(f);function p(S){o1(e,t.sers,function(T){var E=T.getRawData(),D=E.getDimensionIndex(E.mapDimension(s.dim));D>=0&&S(D,T,E.getStore())})}var v=0;if(p(function(S,T,E){n.set(T.uid,1),(!i||!i.hasKey(T.uid))&&(o=!0),v+=E.count()}),(!i||i.keys().length!==n.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}Gx(ss,v);var g=0;p(function(S,T,E){for(var D=0,L=E.count();D<L;++D){var R=E.get(S,D);isFinite(R)&&(!f||bE(d,R))&&(u&&(R=l.transformIn(R,null)),ss.arr[g++]=R)}});var y=ss.typed?ss.arr.subarray(0,g):(ss.arr.length=g,ss.arr);ss.typed?y.sort():f0(y);for(var x=1/0,b=1;b<g;++b){var _=y[b]-y[b-1];_>0&&_<x&&(x=_)}r.liPosMinGap=t.liPosMinGap=wn(x)?x:g>0?sM:SW,r.serUids=n}var ss=Gx({ctor:cG},50);function SY(e){return function(t,r){var n=El(t,{fromStat:{key:e}});if(wn(n.w2))return[-n.w2/2,n.w2/2]}}function gp(e,t){return e+a1+t}function CY(e){return _Y(),{liPosMinGap:!qn(e.scale)}}var Ml="bar";function TY(e,t,r,n){IW(e,{key:t,seriesType:r,coordSysType:n,getMetrics:CY})}function AY(e){var t=e.scale.rawExtentInfo.makeRenderInfo().startValue;return t}var FM={left:0,right:0,top:0,bottom:0},mp=["25%","25%"],Xi="cartesian2d",EY=(function(e){ve(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(r,n){var i=Mc(r.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&Da(r.outerBounds,i)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&Da(this.option.outerBounds,r.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:FM,outerBoundsContain:"all",outerBoundsClampWidth:mp[0],outerBoundsClampHeight:mp[1],backgroundColor:Ne.color.transparent,borderWidth:1,borderColor:Ne.color.neutral30},t})(dt),DY=ZT(),MY="__ec_stack_";function BM(e){return e.get("stack")||MY+e.seriesIndex}function LY(e,t){var r=IY(e,t);return r.columnMap=PY(r),r}function IY(e,t){var r=gp(t,Xi),n=[],i=El(e,{fromStat:{key:r},min:1});return fM(e,r,function(a){n.push({barWidth:xt(a.get("barWidth"),i.w),barMaxWidth:xt(a.get("barMaxWidth"),i.w),barMinWidth:xt(a.get("barMinWidth")||(jM(a)?.5:1),i.w),barGap:a.get("barGap"),barCategoryGap:a.get("barCategoryGap"),defaultBarGap:a.get("defaultBarGap"),stackId:BM(a)})}),{bandWidthResult:i,seriesInfo:n}}function PY(e){var t=e.bandWidthResult.w,r=t,n=0,i,a,o=[],s={};U(e.seriesInfo,function(y,x){x||(a=y.defaultBarGap||0);var b=y.stackId;_r(s,b)||n++;var _=s[b];_||(_=s[b]={width:0,maxWidth:0},o.push(b));var S=y.barWidth;S&&!_.width&&(_.width=S,S=ur(r,S),r-=S);var T=y.barMaxWidth;T&&(_.maxWidth=T);var E=y.barMinWidth;E&&(_.minWidth=E);var D=y.barGap;D!=null&&(a=D);var L=y.barCategoryGap;L!=null&&(i=L)}),i==null&&(i=nt(35-o.length*4,15)+"%");var l=xt(i,t),u=xt(a,1),f=(r-l)/(n+(n-1)*u);f=nt(f,0),U(o,function(y){var x=s[y],b=x.maxWidth,_=x.minWidth;if(x.width){var S=x.width;b&&(S=ur(S,b)),_&&(S=nt(S,_)),x.width=S,r-=S+u*S,n--}else{var S=f;b&&b<S&&(S=ur(b,r)),_&&_>S&&(S=_),S!==f&&(x.width=S,r-=S+u*S,n--)}}),f=(r-l)/(n+(n-1)*u),f=nt(f,0);var d=0,p;U(o,function(y){var x=s[y];x.width||(x.width=f),p=x,d+=x.width*(1+u)}),p&&(d-=p.width*u);var v={},g=-d/2;return U(o,function(y){var x=s[y];v[y]=v[y]||{bandWidth:t,offset:g,width:x.width},g+=x.width*(1+u)}),v}function NY(e){return{seriesType:e,overallReset:function(t){var r=gp(e,Xi);DW(t,r,function(n){var i=LY(n,e);fM(n,r,function(a){var o=i.columnMap[BM(a)];a.getData().setLayout({bandWidth:o.bandWidth,offset:o.offset,size:o.width})})})}}}function RY(e){return{seriesType:e,plan:Yx(),reset:function(t){if(sY(t)){var r=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=t.get("showBackground",!0),u=r.mapDimension(a.dim),f=r.getCalculationInfo("stackResultDimension"),d=Jo(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),p=a.isHorizontal(),v=a.toGlobalCoord(a.dataToCoord(AY(a))),g=jM(t),y=t.get("barMinHeight")||0,x=f&&r.getDimensionIndex(f),b=r.getLayout("size"),_=r.getLayout("offset");return{progress:function(S,T){for(var E=S.count,D=g&&Wi(E*3),L=g&&l&&Wi(E*3),R=g&&Wi(E),O=n.master.getRect(),M=p?O.width:O.height,P,j=T.getStore(),B=0;(P=S.next())!=null;){var $=j.get(d?x:o,P),K=j.get(s,P),Z=v,re=void 0;d&&(re=+$-j.get(o,P));var Y=void 0,G=void 0,I=void 0,z=void 0;if(p){var W=n.dataToPoint([$,K]);d&&(Z=n.dataToPoint([re,K])[0]),Y=Z,G=W[1]+_,I=W[0]-Z,z=b,Ft(I)<y&&(I=(I<0?-1:1)*y)}else{var W=n.dataToPoint([K,$]);d&&(Z=n.dataToPoint([K,re])[1]),Y=W[0]+_,G=Z,I=b,z=W[1]-Z,Ft(z)<y&&(z=(z<=0?-1:1)*y)}g?(D[B]=Y,D[B+1]=G,D[B+2]=p?I:z,L&&(L[B]=p?O.x:Y,L[B+1]=p?G:O.y,L[B+2]=M),R[P]=P):T.setItemLayout(P,{x:Y,y:G,width:I,height:z}),B+=3}g&&T.setLayout({largePoints:D,largeDataIndices:R,largeBackgroundPoints:L,valueAxisHorizontal:p})}}}}}}function jM(e){return e.pipelineContext&&e.pipelineContext.large}function OY(e){return SY(gp(e,Xi))}function zY(e){DY(e,function(){function t(r){var n=gp(r,Xi);TY(e,n,r,Xi),xY(n,OY(r))}t("bar"),t("pictorialBar")})}var p1=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return px(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)U(a.getAxes(),function(p,v){if(p.type==="category"&&n!=null){var g=p.getTicksCoords(),y=p.getTickModel().get("alignWithLabel"),x=o[v],b=n[v]==="x1"||n[v]==="y1";if(b&&!y&&(x+=1),g.length<2)return;if(g.length===2){s[v]=p.toGlobalCoord(p.getExtent()[b?1:0]);return}for(var _=void 0,S=void 0,T=1,E=0;E<g.length;E++){var D=g[E].coord,L=E===g.length-1?g[E-1].tickValue+T:g[E].tickValue;if(L===x){S=D;break}else if(L<x)_=D;else if(_!=null&&L>x){S=(D+_)/2;break}E===1&&(T=L-g[0].tickValue)}S==null&&(_?_&&(S=g[g.length-1].coord):S=g[0].coord),s[v]=p.toGlobalCoord(S)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),d=a.getBaseAxis().isHorizontal()?0:1;s[d]+=u+f/2}return s}return[NaN,NaN]},t.prototype.__requireStartValue=function(r){return this.getBaseAxis()!==r},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t})(Yn);Yn.registerClass(p1);var FY=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(){return px(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.__preparePipelineContext=function(r,n){var i=QT(this,r,n);return i.progressiveRender&&(i.large=!0),i},t.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},t.type="series."+Ml,t.dependencies=["grid","polar"],t.defaultOption=OE(p1.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Ne.color.primary,borderWidth:2}},realtimeSort:!1}),t})(p1),yp="\0__throttleOriginMethod",HM="\0__throttleRate",VM="\0__throttleType";function v1(e,t,r){var n,i=0,a=0,o=null,s,l,u,f;t=t||0;function d(){a=new Date().getTime(),o=null,e.apply(l,u||[])}var p=function(){for(var v=[],g=0;g<arguments.length;g++)v[g]=arguments[g];n=new Date().getTime(),l=this,u=v;var y=f||t,x=f||r;f=null,s=n-(x?i:a)-y,clearTimeout(o),x?o=setTimeout(d,y):s>=0?d():o=setTimeout(d,-s),i=n};return p.clear=function(){o&&(clearTimeout(o),o=null)},p.debounceNextCall=function(v){f=v},p}function UM(e,t,r,n){var i=e[t];if(i){var a=i[yp]||i,o=i[VM],s=i[HM];if(s!==r||o!==n){if(r==null||!n)return e[t]=a;i=e[t]=v1(a,r,n==="debounce"),i[yp]=a,i[VM]=n,i[HM]=r}return i}}function g1(e,t){var r=e[t];r&&r[yp]&&(r.clear&&r.clear(),e[t]=r[yp])}var BY=(function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e})(),$M=(function(e){ve(t,e);function t(r){var n=e.call(this,r)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new BY},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,f=n.startAngle,d=n.endAngle,p=n.clockwise,v=Math.PI*2,g=p?d-f<v:f-d<v;g||(f=d-(p?v:-v));var y=Math.cos(f),x=Math.sin(f),b=Math.cos(d),_=Math.sin(d);g?(r.moveTo(y*o+i,x*o+a),r.arc(y*u+i,x*u+a,l,-Math.PI+f,f,!p)):r.moveTo(y*s+i,x*s+a),r.arc(i,a,s,f,d,!p),r.arc(b*u+i,_*u+a,l,d-Math.PI*2,d-Math.PI,!p),o!==0&&r.arc(i,a,o,d,f,p)},t})(ut);function jY(e,t){t=t||{};var r=t.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return Ad(n,i,a);var s=e(o),l=i.distance!=null?i.distance:5,u=this.shape,f=u.cx,d=u.cy,p=u.r,v=u.r0,g=(p+v)/2,y=u.startAngle,x=u.endAngle,b=(y+x)/2,_=r?Math.abs(p-v)/2:0,S=Math.cos,T=Math.sin,E=f+p*S(y),D=d+p*T(y),L="left",R="top";switch(s){case"startArc":E=f+(v-l)*S(b),D=d+(v-l)*T(b),L="center",R="top";break;case"insideStartArc":E=f+(v+l)*S(b),D=d+(v+l)*T(b),L="center",R="bottom";break;case"startAngle":E=f+g*S(y)+xp(y,l+_,!1),D=d+g*T(y)+bp(y,l+_,!1),L="right",R="middle";break;case"insideStartAngle":E=f+g*S(y)+xp(y,-l+_,!1),D=d+g*T(y)+bp(y,-l+_,!1),L="left",R="middle";break;case"middle":E=f+g*S(b),D=d+g*T(b),L="center",R="middle";break;case"endArc":E=f+(p+l)*S(b),D=d+(p+l)*T(b),L="center",R="bottom";break;case"insideEndArc":E=f+(p-l)*S(b),D=d+(p-l)*T(b),L="center",R="top";break;case"endAngle":E=f+g*S(x)+xp(x,l+_,!0),D=d+g*T(x)+bp(x,l+_,!0),L="left",R="middle";break;case"insideEndAngle":E=f+g*S(x)+xp(x,-l+_,!0),D=d+g*T(x)+bp(x,-l+_,!0),L="right",R="middle";break;default:return Ad(n,i,a)}return n=n||{},n.x=E,n.y=D,n.align=L,n.verticalAlign=R,n}}function HY(e,t,r,n){if(ft(n)){e.setTextConfig({rotation:n});return}else if(pe(t)){e.setTextConfig({rotation:0});return}var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,l,u=r(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:e.setTextConfig({rotation:0});return}var f=Math.PI*1.5-l;u==="middle"&&f>Math.PI/2&&f<Math.PI*1.5&&(f-=Math.PI),e.setTextConfig({rotation:f})}function xp(e,t,r){return t*Math.sin(e)*(r?-1:1)}function bp(e,t,r){return t*Math.cos(e)*(r?1:-1)}function Bc(e,t,r){var n=e.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;pe(n)||(n=[n,n,n,n]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:De(n,function(a){return To(a,i)})}}var m1=Math.max,y1=Math.min,VY=(function(e){ve(t,e);function t(){var r=e.call(this)||this;return r.type=Ml,r._isFirstFrame=!0,r}return t.prototype.render=function(r,n,i,a){this._model=r,this._removeOnRenderedListener(i),this._updateDrawMode(r);var o=r.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,n,i):this._renderNormal(r,n,i,a))},t.prototype.incrementalPrepareRender=function(r){this._clear(),this._updateDrawMode(r),this._updateLargeClip(r)},t.prototype.incrementalRender=function(r,n){this._progressiveEls=[],this._incrementalRenderLarge(r,n)},t.prototype.eachRendered=function(r){gc(this._progressiveEls||this.group,r)},t.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(r,n,i,a){var o=this.group,s=r.getData(),l=this._data,u=r.coordinateSystem,f=u.getBaseAxis(),d;u.type==="cartesian2d"?d=f.isHorizontal():u.type==="polar"&&(d=f.dim==="angle");var p=r.isAnimationEnabled()?r:null,v=UY(r,u);v&&this._enableRealtimeSort(v,s,i);var g=r.get("clip",!0)||v,y=u.getArea();o.removeClipPath();var x=r.get("roundCap",!0),b=r.get("showBackground",!0),_=r.getModel("backgroundStyle"),S=_.get("borderRadius")||0,T=[],E=this._backgroundEls,D=a&&a.isInitSort,L=a&&a.type==="changeAxisOrder";function R(P){var j=wp[u.type](s,P);if(!j)return null;var B=KY(u,d,j);return B.useStyle(_.getItemStyle()),u.type==="cartesian2d"?B.setShape("r",S):B.setShape("cornerRadius",S),T[P]=B,B}s.diff(l).add(function(P){var j=s.getItemModel(P),B=wp[u.type](s,P,j);if(B&&(b&&R(P),!(!s.hasValue(P)||!qM[u.type](B)))){var $=!1;g&&($=GM[u.type](y,B));var K=WM[u.type](r,s,P,B,d,p,f.model,!1,x);v&&(K.forceLabelAnimation=!0),ZM(K,s,P,j,B,r,d,u.type==="polar"),D?K.attr({shape:B}):v?YM(v,p,K,B,P,d,!1,!1):en(K,{shape:B},r,P),s.setItemGraphicEl(P,K),o.add(K),K.ignore=$}}).update(function(P,j){var B=s.getItemModel(P),$=wp[u.type](s,P,B);if($){if(b){var K=void 0;E.length===0?K=R(j):(K=E[j],K.useStyle(_.getItemStyle()),u.type==="cartesian2d"?K.setShape("r",S):K.setShape("cornerRadius",S),T[P]=K);var Z=wp[u.type](s,P),re=tL(d,Z,u);dr(K,{shape:re},p,P)}var Y=l.getItemGraphicEl(j);if(!s.hasValue(P)||!qM[u.type]($)){o.remove(Y);return}var G=!1;g&&(G=GM[u.type](y,$),G&&o.remove(Y));var I=Y&&(Y.type==="sector"&&x||Y.type==="sausage"&&!x);if(I&&(Y&&pc(Y,r,j),Y=null),Y?V0(Y):Y=WM[u.type](r,s,P,$,d,p,f.model,!0,x),v&&(Y.forceLabelAnimation=!0),L){var z=Y.getTextContent();if(z){var W=Dh(z);W.prevValue!=null&&(W.prevValue=W.value)}}else ZM(Y,s,P,B,$,r,d,u.type==="polar");D?Y.attr({shape:$}):v?YM(v,p,Y,$,P,d,!0,L):dr(Y,{shape:$},r,P,null),s.setItemGraphicEl(P,Y),Y.ignore=G,o.add(Y)}}).remove(function(P){var j=l.getItemGraphicEl(P);j&&pc(j,r,P)}).execute();var O=this._backgroundGroup||(this._backgroundGroup=new Bt);O.removeAll();for(var M=0;M<T.length;++M)O.add(T[M]);o.add(O),this._backgroundEls=T,this._data=s},t.prototype._renderLarge=function(r,n,i){this._clear(),JM(r,this.group),this._updateLargeClip(r)},t.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),JM(n,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&bG(r.coordinateSystem,!1,r),i=this.group;n?i.setClipPath(n):i.removeClipPath()},t.prototype._enableRealtimeSort=function(r,n,i){var a=this;if(n.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,r,i),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),f=u&&u.shape;return f&&Math.abs(o.isHorizontal()?f.height:f.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(r,n,i){var a=[];return r.each(r.mapDimension(n.dim),function(o,s){var l=i(s);l=l??NaN,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:De(a,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(r,n,i){for(var a=i.scale,o=r.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var f=r.rawIndexOf(o,a.getRawOrdinalNumber(l)),d=f<0?Number.MIN_VALUE:n(r.indexOfRawIndex(f));if(d>s)return!0;s=d}return!1},t.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){pc(a,r,tt(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=Ml,t})(An),GM={cartesian2d:function(e,t){var r=t.width<0?-1:1,n=t.height<0?-1:1;r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=m1(t.x,e.x),s=y1(t.x+t.width,i),l=m1(t.y,e.y),u=y1(t.y+t.height,a),f=s<o,d=u<l;return t.x=f&&o>i?s:o,t.y=d&&l>a?u:l,t.width=f?0:s-o,t.height=d?0:u-l,r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),f||d},polar:function(e,t){var r=t.r0<=t.r?1:-1;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}var i=y1(t.r,e.r),a=m1(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},WM={cartesian2d:function(e,t,r,n,i,a,o,s,l){var u=new Nt({shape:ce({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var f=u.shape,d=i?"height":"width";f[d]=0}return u},polar:function(e,t,r,n,i,a,o,s,l){var u=!i&&l?$M:Ca,f=new u({shape:n,z2:1});f.name="item";var d=KM(i);if(f.calculateTextPosition=jY(d,{isRoundCap:u===$M}),a){var p=f.shape,v=i?"r":"endAngle",g={};p[v]=i?n.r0:n.startAngle,g[v]=n[v],(s?dr:en)(f,{shape:g},a)}return f}};function UY(e,t){var r=e.get("realtimeSort",!0),n=t.getBaseAxis();if(r&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function YM(e,t,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?dr:en)(r,{shape:l},t,i,null);var f=t?e.baseAxis.model:null;(o?dr:en)(r,{shape:u},f,i)}function XM(e,t){for(var r=0;r<t.length;r++)if(!isFinite(e[t[r]]))return!0;return!1}var $Y=["x","y","width","height"],GY=["cx","cy","r","startAngle","endAngle"],qM={cartesian2d:function(e){return!XM(e,$Y)},polar:function(e){return!XM(e,GY)}},wp={cartesian2d:function(e,t,r){var n=e.getItemLayout(t);if(!n)return null;var i=r?YY(r,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(e,t,r){var n=e.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function WY(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function KM(e){return(function(t){var r=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}})(e)}function ZM(e,t,r,n,i,a,o,s){var l=t.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var f=e.shape,d=Bc(n.getModel("itemStyle"),f,!0);ce(f,d),e.setShape(f)}}else{var u=n.get(["itemStyle","borderRadius"])||0;e.setShape("r",u)}e.useStyle(l);var p=n.getShallow("cursor");p&&e.attr("cursor",p);var v=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?ZY(i,a.coordinateSystem):QY(i,a.coordinateSystem),g=Xo(n);hl(e,g,{labelFetcher:a,labelDataIndex:r,defaultText:Ux(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var y=e.getTextContent();if(s&&y){var x=n.get(["label","position"]);e.textConfig.inside=x==="middle"?!0:null,HY(e,x==="outside"?v:x,KM(o),n.get(["label","rotate"]))}$U(y,g,a.getRawValue(r),function(_){return gD(t,_)});var b=n.getModel(["emphasis"]);ul(e,b.get("focus"),b.get("blurScope"),b.get("disabled")),dh(e,n),WY(i)&&(e.style.fill="none",e.style.stroke="none",U(e.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function YY(e,t){var r=e.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var XY=(function(){function e(){}return e})(),QM=(function(e){ve(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new XY},t.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f<i.length;f+=3)l[a]=u,l[o]=i[f+2],s[a]=i[f+a],s[o]=i[f+o],r.rect(s[0],s[1],l[0],l[1])},t})(ut);function JM(e,t,r,n){var i=e.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=e.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints"),f=n?mV(e):0;if(u){var d=new QM({shape:{points:u},incremental:f,silent:!0,z2:0});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,d.useStyle(l.getItemStyle()),t.add(d),r&&r.push(d)}var p=new QM({shape:{points:i.getLayout("largePoints")},incremental:f,ignoreCoarsePointer:!0,z2:1});p.baseDimIdx=a,p.largeDataIndices=o,p.barWidth=s,t.add(p),p.useStyle(i.getVisual("style")),p.style.stroke=null,tt(p).seriesIndex=e.seriesIndex,e.get("silent")||(p.on("mousedown",eL),p.on("mousemove",eL)),r&&r.push(p)}var eL=v1(function(e){var t=this,r=qY(t,e.offsetX,e.offsetY);tt(t).dataIndex=r>=0?r:null},30,!1);function qY(e,t,r){for(var n=e.baseDimIdx,i=1-n,a=e.shape.points,o=e.largeDataIndices,s=[],l=[],u=e.barWidth,f=0,d=a.length/3;f<d;f++){var p=f*3;if(l[n]=u,l[i]=a[p+2],s[n]=a[p+n],s[i]=a[p+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[f]}return-1}function tL(e,t,r){if(Xx(r,"cartesian2d")){var n=t,i=r.getArea();return{x:e?n.x:i.x,y:e?i.y:n.y,width:e?n.width:i.width,height:e?i.height:n.height}}else{var i=r.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function KY(e,t,r){var n=e.type==="polar"?Ca:Nt;return new n({shape:tL(t,r,e),silent:!0,z2:0})}function ZY(e,t){if(e.height===0){var r=t.getOtherAxis(t.getBaseAxis());return r.inverse?"bottom":"top"}return e.height>0?"bottom":"top"}function QY(e,t){if(e.width===0){var r=t.getOtherAxis(t.getBaseAxis());return r.inverse?"left":"right"}return e.width>=0?"right":"left"}function JY(e){e.registerChartView(VY),e.registerSeriesModel(FY),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,NY(Ml)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,RY(Ml)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,tM(Ml)),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,r){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})}),zY(e)}function eX(e,t){function r(n,i){var a=[];return n.eachComponent({mainType:"series",subType:e,query:i},function(o){a.push(o.seriesIndex)}),a}U([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],function(n){t(n[0],function(i,a,o){i=ce({},i),o.dispatchAction(ce(i,{type:n[1],seriesIndex:r(a,i)}))})})}function Ll(e,t,r,n,i){var a=e+t;r.isSilent(a)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,f=0;f<u.length;f++)if(u[f].seriesIndex===s){var d=o.getData(),p=Vo(d,i.fromActionPayload);r.trigger(a,{type:a,seriesId:o.id,name:pe(p)?d.getName(p[0]):d.getName(p),selected:Me(l)?l:ce({},l)})}})}function tX(e,t,r){e.on("selectchanged",function(n){var i=r.getModel();n.isFromClick?(Ll("map","selectchanged",t,i,n),Ll("pie","selectchanged",t,i,n)):n.fromAction==="select"?(Ll("map","selected",t,i,n),Ll("pie","selected",t,i,n)):n.fromAction==="unselect"&&(Ll("map","unselected",t,i,n),Ll("pie","unselected",t,i,n))})}function rX(e){return{seriesType:e,reset:function(t,r){var n=r.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=t.getData();i.filterSelf(function(a){for(var o=i.getName(a),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}function nX(e,t,r){t=pe(t)&&{coordDimensions:t}||ce({encodeDefine:e.getEncode()},t);var n=e.getSource(),i=LE(n,t).dimensions,a=new Sc(i,e);return a.initData(n,r),a}var iX=(function(){function e(t,r){this._getDataWithEncodedVisual=t,this._getRawData=r}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var r=this._getRawData();return r.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var r=this._getDataWithEncodedVisual();return r.indexOfName(t)},e.prototype.getItemVisual=function(t,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,r)},e})(),Oa="pie",aX=it(),rL=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new iX(pt(this.getData,this),pt(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return nX(this,{coordDimensions:["value"],encodeDefaulter:yt(e7,this)})},t.prototype.getDataParams=function(r){var n=this.getData(),i=aX(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=V9(o,n.hostModel.get("percentPrecision"))}var s=e.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(r){ih(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.type="series."+Oa,t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t})(Yn);T7({fullType:rL.type,getCoord2:function(e){return e.getShallow("center")}});function nL(e,t,r,n,i,a,o,s){var l=i-e,u=a-t,f=r-e,d=n-t,p=Math.sqrt(f*f+d*d);f/=p,d/=p;var v=l*f+u*d,g=v/p;g*=p;var y=o[0]=e+g*f,x=o[1]=t+g*d;return Math.sqrt((y-i)*(y-i)+(x-a)*(x-a))}var za=new Ye,It=new Ye,er=new Ye,Fa=new Ye,Ci=new Ye,_p=[],Ar=new Ye;function oX(e,t){if(t<=180&&t>0){t=t/180*Math.PI,za.fromArray(e[0]),It.fromArray(e[1]),er.fromArray(e[2]),Ye.sub(Fa,za,It),Ye.sub(Ci,er,It);var r=Fa.len(),n=Ci.len();if(!(r<.001||n<.001)){Fa.scale(1/r),Ci.scale(1/n);var i=Fa.dot(Ci),a=Math.cos(t);if(a<i){var o=nL(It.x,It.y,er.x,er.y,za.x,za.y,_p);Ar.fromArray(_p),Ar.scaleAndAdd(Ci,o/Math.tan(Math.PI-t));var s=er.x!==It.x?(Ar.x-It.x)/(er.x-It.x):(Ar.y-It.y)/(er.y-It.y);if(isNaN(s))return;s<0?Ye.copy(Ar,It):s>1&&Ye.copy(Ar,er),Ar.toArray(e[1])}}}}function sX(e,t,r){if(r<=180&&r>0){r=r/180*Math.PI,za.fromArray(e[0]),It.fromArray(e[1]),er.fromArray(e[2]),Ye.sub(Fa,It,za),Ye.sub(Ci,er,It);var n=Fa.len(),i=Ci.len();if(!(n<.001||i<.001)){Fa.scale(1/n),Ci.scale(1/i);var a=Fa.dot(t),o=Math.cos(r);if(a<o){var s=nL(It.x,It.y,er.x,er.y,za.x,za.y,_p);Ar.fromArray(_p);var l=Math.PI/2,u=Math.acos(Ci.dot(t)),f=l+u-r;if(f>=l)Ye.copy(Ar,er);else{Ar.scaleAndAdd(Ci,s/Math.tan(Math.PI/2-f));var d=er.x!==It.x?(Ar.x-It.x)/(er.x-It.x):(Ar.y-It.y)/(er.y-It.y);if(isNaN(d))return;d<0?Ye.copy(Ar,It):d>1&&Ye.copy(Ar,er)}Ar.toArray(e[1])}}}}function x1(e,t,r,n){var i=r==="normal",a=i?e:e.ensureState(r);a.ignore=t;var o=n.get("smooth");o=o===!0?.3:Math.max(+o,0)||0,a.shape=a.shape||{},a.shape.smooth=o;var s=n.getModel("lineStyle").getLineStyle();i?e.useStyle(s):a.style=s}function lX(e,t){var r=t.smooth,n=t.points;if(n)if(e.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=xy(n[0],n[1]),a=xy(n[1],n[2]);if(!i||!a){e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=by([],n[1],n[0],o/i),l=by([],n[1],n[2],o/a),u=by([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var f=1;f<n.length;f++)e.lineTo(n[f][0],n[f][1])}function uX(e,t,r){var n=e.getTextGuideLine(),i=e.getTextContent();if(!i){n&&e.removeTextGuideLine();return}for(var a=t.normal,o=a.get("show"),s=i.ignore,l=0;l<sh.length;l++){var u=sh[l],f=t[u],d=u==="normal";if(f){var p=f.get("show"),v=d?s:Ae(i.states[u]&&i.states[u].ignore,s);if(v||!Ae(p,o)){var g=d?n:n&&n.states[u];g&&(g.ignore=!0),n&&x1(n,!0,u,f);continue}n||(n=new dc,e.setTextGuideLine(n),!d&&(s||!o)&&x1(n,!0,"normal",t.normal),e.stateProxy&&(n.stateProxy=e.stateProxy)),x1(n,!1,u,f)}}if(n){ct(n.style,r),n.style.fill=null;var y=a.get("showAbove"),x=e.textGuideLineConfig=e.textGuideLineConfig||{};x.showAbove=y||!1,n.buildPath=lX}}function cX(e,t){t=t||"labelLine";for(var r={normal:e.getModel(t)},n=0;n<Fr.length;n++){var i=Fr[n];r[i]=e.getModel([i,t])}return r}var fX=Math.PI/180;function iL(e,t,r,n,i,a,o,s,l,u){if(e.length<2)return;function f(y){for(var x=y.rB,b=x*x,_=0;_<y.list.length;_++){var S=y.list[_],T=Math.abs(S.label.y-r),E=n+S.len,D=E*E,L=Math.sqrt(Math.abs((1-T*T/b)*D)),R=t+(L+S.len2)*i,O=R-S.label.x,M=S.targetTextWidth-O*i;aL(S,M,!0),S.label.x=R}}function d(y){for(var x={list:[],maxY:0},b={list:[],maxY:0},_=0;_<y.length;_++)if(y[_].labelAlignTo==="none"){var S=y[_],T=S.label.y>r?b:x,E=Math.abs(S.label.y-r);if(E>=T.maxY){var D=S.label.x-t-S.len2*i,L=n+S.len,R=Math.abs(D)<L?Math.sqrt(E*E/(1-D*D/L/L)):L;T.rB=R,T.maxY=E}T.list.push(S)}f(x),f(b)}for(var p=e.length,v=0;v<p;v++)if(e[v].position==="outer"&&e[v].labelAlignTo==="labelLine"){var g=e[v].label.x-u;e[v].linePoints[1][0]+=g,e[v].label.x=u}VW(e,1,l,l+o)&&d(e)}function dX(e,t,r,n,i,a,o,s){for(var l=[],u=[],f=Number.MAX_VALUE,d=-Number.MAX_VALUE,p=0;p<e.length;p++){var v=e[p].label;b1(e[p])||(v.x<t?(f=Math.min(f,v.x),l.push(e[p])):(d=Math.max(d,v.x),u.push(e[p])))}for(var p=0;p<e.length;p++){var g=e[p];if(!b1(g)&&g.linePoints){if(g.labelStyleWidth!=null)continue;var v=g.label,y=g.linePoints,x=void 0;g.labelAlignTo==="edge"?v.x<t?x=y[2][0]-g.labelDistance-o-g.edgeDistance:x=o+i-g.edgeDistance-y[2][0]-g.labelDistance:g.labelAlignTo==="labelLine"?v.x<t?x=f-o-g.bleedMargin:x=o+i-d-g.bleedMargin:v.x<t?x=v.x-o-g.bleedMargin:x=o+i-v.x-g.bleedMargin,g.targetTextWidth=x,aL(g,x,!1)}}iL(u,t,r,n,1,i,a,o,s,d),iL(l,t,r,n,-1,i,a,o,s,f);for(var p=0;p<e.length;p++){var g=e[p];if(!b1(g)&&g.linePoints){var v=g.label,y=g.linePoints,b=g.labelAlignTo==="edge",_=v.style.padding,S=_?_[1]+_[3]:0,T=v.style.backgroundColor?0:S,E=g.rect.width+T,D=y[1][0]-y[2][0];b?v.x<t?y[2][0]=o+g.edgeDistance+E+g.labelDistance:y[2][0]=o+i-g.edgeDistance-E-g.labelDistance:(v.x<t?y[2][0]=v.x+g.labelDistance:y[2][0]=v.x-g.labelDistance,y[1][0]=y[2][0]+D),y[1][1]=y[2][1]=v.y}}}function aL(e,t,r){if(e.labelStyleWidth==null){var n=e.label,i=n.style,a=e.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,f=a.width+(o?0:l);if(t<f||r){if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",t-l);var d=n.getBoundingRect();n.setStyle("width",Math.ceil(d.width)),n.setStyle("backgroundColor",o)}else{var p=t-l,v=t<f?p:r?p>e.unconstrainedWidth?null:p:null;n.setStyle("width",v)}oL(a,n)}}}function oL(e,t){sL.rect=e,bM(sL,t,hX)}var hX={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},sL={};function b1(e){return e.position==="center"}function pX(e){var t=e.getData(),r=[],n,i,a=!1,o=(e.get("minShowLabelAngle")||0)*fX,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,f=s.x,d=s.y,p=s.height;function v(D){D.ignore=!0}function g(D){if(!D.ignore)return!0;for(var L in D.states)if(D.states[L].ignore===!1)return!0;return!1}t.each(function(D){var L=t.getItemGraphicEl(D),R=L.shape,O=L.getTextContent(),M=L.getTextGuideLine(),P=t.getItemModel(D),j=P.getModel("label"),B=j.get("position")||P.get(["emphasis","label","position"]),$=j.get("distanceToLabelLine"),K=j.get("alignTo"),Z=xt(j.get("edgeDistance"),u),re=j.get("bleedMargin");re==null&&(re=Math.min(u,p)>200?10:2);var Y=P.getModel("labelLine"),G=Y.get("length");G=xt(G,u);var I=Y.get("length2");if(I=xt(I,u),Math.abs(R.endAngle-R.startAngle)<o){U(O.states,v),O.ignore=!0,M&&(U(M.states,v),M.ignore=!0);return}if(g(O)){var z=(R.startAngle+R.endAngle)/2,W=Math.cos(z),F=Math.sin(z),ee,ae,ie,_e;n=R.cx,i=R.cy;var be=B==="inside"||B==="inner";if(B==="center")ee=R.cx,ae=R.cy,_e="center";else{var xe=(be?(R.r+R.r0)/2*W:R.r*W)+n,Se=(be?(R.r+R.r0)/2*F:R.r*F)+i;if(ee=xe+W*3,ae=Se+F*3,!be){var Le=xe+W*(G+l-R.r),Xe=Se+F*(G+l-R.r),nr=Le+(W<0?-1:1)*I,Tt=Xe;K==="edge"?ee=W<0?f+Z:f+u-Z:ee=nr+(W<0?-$:$),ae=Tt,ie=[[xe,Se],[Le,Xe],[nr,Tt]]}_e=be?"center":K==="edge"?W>0?"right":"left":W>0?"left":"right"}var nn=Math.PI,Dr=0,Ur=j.get("rotate");if(ft(Ur))Dr=Ur*(nn/180);else if(B==="center")Dr=0;else if(Ur==="radial"||Ur===!0){var xs=W<0?-z+nn:-z;Dr=xs}else if(Ur==="tangential"||Ur==="tangential-noflip"&&B!=="outside"&&B!=="outer"){var Nn=Math.atan2(W,F);Nn<0&&(Nn=nn*2+Nn);var Ei=F>0;Ei&&Ur!=="tangential-noflip"&&(Nn=nn+Nn),Dr=Nn-nn}if(a=!!Dr,O.x=ee,O.y=ae,O.rotation=Dr,O.setStyle({verticalAlign:"middle"}),be){O.setStyle({align:_e});var Ji=O.states.select;Ji&&(Ji.x+=O.x,Ji.y+=O.y)}else{var an=new je(0,0,0,0);oL(an,O),r.push({label:O,labelLine:M,position:B,len:G,len2:I,minTurnAngle:Y.get("minTurnAngle"),maxSurfaceAngle:Y.get("maxSurfaceAngle"),surfaceNormal:new Ye(W,F),linePoints:ie,textAlign:_e,labelDistance:$,labelAlignTo:K,edgeDistance:Z,bleedMargin:re,rect:an,unconstrainedWidth:an.width,labelStyleWidth:O.style.width})}L.setTextConfig({inside:be})}}),!a&&e.get("avoidLabelOverlap")&&dX(r,n,i,l,u,p,f,d);for(var y=0;y<r.length;y++){var x=r[y],b=x.label,_=x.labelLine,S=isNaN(b.x)||isNaN(b.y);if(b){b.setStyle({align:x.textAlign}),S&&(U(b.states,v),b.ignore=!0);var T=b.states.select;T&&(T.x+=b.x,T.y+=b.y)}if(_){var E=x.linePoints;S||!E?(U(_.states,v),_.ignore=!0):(oX(E,x.minTurnAngle),sX(E,x.surfaceNormal,x.maxSurfaceAngle),_.setShape({points:E}),b.__hostTarget.textGuideLineConfig={anchor:new Ye(E[0][0],E[0][1])})}}}var lL=Math.PI*2,kp=Math.PI/180,vX=yV(Oa,gX);function gX(e,t){e.eachSeriesByType(Oa,function(r){var n=r.getData(),i=n.mapDimension("value"),a=p$(r,t),o=a.cx,s=a.cy,l=a.r,u=a.r0,f=a.viewRect,d=-r.get("startAngle")*kp,p=r.get("endAngle"),v=r.get("padAngle")*kp;p=p==="auto"?d-lL:-p*kp;var g=r.get("minAngle")*kp,y=g+v,x=0;n.each(i,function(Z){!isNaN(Z)&&x++});var b=n.getSum(i),_=Math.PI/(b||x)*2,S=r.get("clockwise"),T=r.get("roseType"),E=r.get("stillShowZeroSum"),D=n.getDataExtent(i);D[0]=0;var L=S?1:-1,R=[d,p],O=L*v/2;bT(R,!S),d=R[0],p=R[1];var M=uL(r);M.startAngle=d,M.endAngle=p,M.clockwise=S,M.cx=o,M.cy=s,M.r=l,M.r0=u;var P=Math.abs(p-d),j=P,B=0,$=d;if(n.setLayout({viewRect:f,r:l}),n.each(i,function(Z,re){var Y;if(isNaN(Z)){n.setItemLayout(re,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:o,cy:s,r0:u,r:T?NaN:l});return}T!=="area"?Y=b===0&&E?_:Z*_:Y=P/x,Y<y?(Y=y,j-=y):B+=Z;var G=$+L*Y,I=0,z=0;v>Y?(I=$+L*Y/2,z=I):(I=$+O,z=G-O),n.setItemLayout(re,{angle:Y,startAngle:I,endAngle:z,clockwise:S,cx:o,cy:s,r0:u,r:T?u0(Z,D,[u,l]):l}),$=G}),j<lL&&x)if(j<=.001){var K=P/x;n.each(i,function(Z,re){if(!isNaN(Z)){var Y=n.getItemLayout(re);Y.angle=K;var G=0,I=0;K<v?(G=d+L*(re+.5)*K,I=G):(G=d+L*re*K+O,I=d+L*(re+1)*K-O),Y.startAngle=G,Y.endAngle=I}})}else _=j/B,$=d,n.each(i,function(Z,re){if(!isNaN(Z)){var Y=n.getItemLayout(re),G=Y.angle===y?y:Z*_,I=0,z=0;G<v?(I=$+L*G/2,z=I):(I=$+O,z=$+L*G-O),Y.startAngle=I,Y.endAngle=z,$+=L*G}})})}var uL=it(),mX=(function(e){ve(t,e);function t(r,n,i){var a=e.call(this)||this;a.z2=2;var o=new Sr;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return t.prototype.updateData=function(r,n,i,a){var o=this,s=r.hostModel,l=r.getItemModel(n),u=l.getModel("emphasis"),f=r.getItemLayout(n),d=ce(Bc(l.getModel("itemStyle"),f,!0),f);if(isNaN(d.startAngle)){o.setShape(d);return}if(a){o.setShape(d);var p=s.getShallow("animationType");s.ecModel.ssr?(en(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=d.cx,o.originY=d.cy):p==="scale"?(o.shape.r=f.r0,en(o,{shape:{r:f.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),en(o,{shape:{startAngle:f.startAngle,endAngle:f.endAngle}},s,n)):(o.shape.endAngle=f.startAngle,dr(o,{shape:{endAngle:f.endAngle}},s,n))}else V0(o),dr(o,{shape:d},s,n);o.useStyle(r.getItemVisual(n,"style")),dh(o,l);var v=(f.startAngle+f.endAngle)/2,g=s.get("selectedOffset"),y=Math.cos(v)*g,x=Math.sin(v)*g,b=l.getShallow("cursor");b&&o.attr("cursor",b),this._updateLabel(s,r,n),o.ensureState("emphasis").shape=ce({r:f.r+(u.get("scale")&&u.get("scaleSize")||0)},Bc(u.getModel("itemStyle"),f)),ce(o.ensureState("select"),{x:y,y:x,shape:Bc(l.getModel(["select","itemStyle"]),f)}),ce(o.ensureState("blur"),{shape:Bc(l.getModel(["blur","itemStyle"]),f)});var _=o.getTextGuideLine(),S=o.getTextContent();_&&ce(_.ensureState("select"),{x:y,y:x}),ce(S.ensureState("select"),{x:y,y:x}),ul(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),l=n.getItemVisual(i,"style"),u=l&&l.fill,f=l&&l.opacity;hl(a,Xo(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:f,defaultText:r.getFormattedLabel(i,"normal")||n.getName(i)});var d=a.getTextContent();a.setTextConfig({position:null,rotation:null}),d.attr({z2:10});var p=o.get(["label","position"]);if(p!=="outside"&&p!=="outer")a.removeTextGuideLine();else{var v=this.getTextGuideLine();v||(v=new dc,this.setTextGuideLine(v)),uX(this,cX(o),{stroke:u,opacity:yo(s.get(["lineStyle","opacity"]),f,1)})}},t})(Ca),yX=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=Oa,r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,i,a){var o=r.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var f=o.getItemLayout(0),d=1;isNaN(f&&f.startAngle)&&d<o.count();++d)f=o.getItemLayout(d);f&&(u=f.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&r.get("showEmptyCircle")){var p=uL(r),v=new Ca({shape:Ke(p)});v.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=v,l.add(v)}o.diff(s).add(function(g){var y=new mX(o,g,u);o.setItemGraphicEl(g,y),l.add(y)}).update(function(g,y){var x=s.getItemGraphicEl(y);x.updateData(o,g,u),x.off("click"),l.add(x),o.setItemGraphicEl(g,x)}).remove(function(g){var y=s.getItemGraphicEl(g);pc(y,r,g)}).execute(),pX(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type=Oa,t})(An);function xX(e){return{seriesType:e,reset:function(t,r){var n=t.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(ft(o)&&!isNaN(o)&&o<0)})}}}function bX(e){e.registerChartView(yX),e.registerSeriesModel(rL),eX(Oa,e.registerAction),e.registerLayout(vX),e.registerProcessor(rX(Oa)),e.registerProcessor(xX(Oa))}var Il=(function(){function e(t,r){this.target=t,this.topTarget=r&&r.topTarget}return e})(),wX=(function(){function e(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(t){for(var r=t.target;r&&!r.draggable;)r=r.parent||r.__hostTarget;r&&(this._draggingTarget=r,r.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Il(r,t),"dragstart",t.event))},e.prototype._drag=function(t){var r=this._draggingTarget;if(r){var n=t.offsetX,i=t.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,r.drift(a,o,t),this.handler.dispatchToElement(new Il(r,t),"drag",t.event);var s=this.handler.findHover(n,i,r).target,l=this._dropTarget;this._dropTarget=s,r!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Il(l,t),"dragleave",t.event),s&&s!==l&&this.handler.dispatchToElement(new Il(s,t),"dragenter",t.event))}},e.prototype._dragEnd=function(t){var r=this._draggingTarget;r&&(r.dragging=!1),this.handler.dispatchToElement(new Il(r,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Il(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},e})(),_X=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,w1=[],kX=We.browser.firefox&&+We.browser.version.split(".")[0]<39;function _1(e,t,r,n){return r=r||{},n?cL(e,t,r):kX&&t.layerX!=null&&t.layerX!==t.offsetX?(r.zrX=t.layerX,r.zrY=t.layerY):t.offsetX!=null?(r.zrX=t.offsetX,r.zrY=t.offsetY):cL(e,t,r),r}function cL(e,t,r){if(We.domSupported&&e.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(FE(e)){var a=e.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(mx(w1,e,n,i)){r.zrX=w1[0],r.zrY=w1[1];return}}r.zrX=r.zrY=0}function k1(e){return e||window.event}function Dn(e,t,r){if(t=k1(t),t.zrX!=null)return t;var n=t.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&_1(e,o,t,r)}else{_1(e,t,t,r);var a=SX(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&_X.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function SX(e){var t=e.wheelDelta;if(t)return t;var r=e.deltaX,n=e.deltaY;if(r==null||n==null)return t;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function CX(e,t,r,n){e.addEventListener(t,r,n)}function TX(e,t,r,n){e.removeEventListener(t,r,n)}var fL=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},AX=(function(){function e(){this._track=[]}return e.prototype.recognize=function(t,r,n){return this._doTrack(t,r,n),this._recognize(t)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(t,r,n){var i=t.touches;if(i){for(var a={points:[],touches:[],target:r,event:t},o=0,s=i.length;o<s;o++){var l=i[o],u=_1(n,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},e.prototype._recognize=function(t){for(var r in S1)if(S1.hasOwnProperty(r)){var n=S1[r](this._track,t);if(n)return n}},e})();function dL(e){var t=e[1][0]-e[0][0],r=e[1][1]-e[0][1];return Math.sqrt(t*t+r*r)}function EX(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var S1={pinch:function(e,t){var r=e.length;if(r){var n=(e[r-1]||{}).points,i=(e[r-2]||{}).points||n;if(i&&i.length>1&&n&&n.length>1){var a=dL(n)/dL(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=EX(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}},hL="silent";function DX(e,t,r){return{type:e,event:r,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:MX}}function MX(){fL(this.event)}var LX=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.handler=null,r}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t})(gi),jc=(function(){function e(t,r){this.x=t,this.y=r}return e})(),IX=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],C1=new je(0,0,0,0),pL=(function(e){ve(t,e);function t(r,n,i,a,o){var s=e.call(this)||this;return s._hovered=new jc(0,0),s.storage=r,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new LX,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new wX(s),s}return t.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(U(IX,function(n){r.on&&r.on(n,this[n],this)},this),r.handler=this),this.proxy=r},t.prototype.mousemove=function(r){var n=r.zrX,i=r.zrY,a=gL(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new jc(n,i):this.findHover(n,i),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(l,"mousemove",r),u&&u!==s&&this.dispatchToElement(l,"mouseover",r)},t.prototype.mouseout=function(r){var n=r.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},t.prototype.resize=function(){this._hovered=new jc(0,0)},t.prototype.dispatch=function(r,n){var i=this[r];i&&i.call(this,n)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(r){var n=this.proxy;n.setCursor&&n.setCursor(r)},t.prototype.dispatchToElement=function(r,n,i){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+n,s=DX(n,r,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},t.prototype.findHover=function(r,n,i){var a=this.storage.getDisplayList(),o=new jc(r,n);if(vL(a,o,r,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new je(r-u,n-u,l,l),d=a.length-1;d>=0;d--){var p=a[d];p!==i&&!p.ignore&&!p.ignoreCoarsePointer&&(!p.parent||!p.parent.ignoreCoarsePointer)&&(C1.copy(p.getBoundingRect()),p.transform&&C1.applyTransform(p.transform),C1.intersect(f)&&s.push(p))}if(s.length)for(var v=4,g=Math.PI/12,y=Math.PI*2,x=0;x<u;x+=v)for(var b=0;b<y;b+=g){var _=r+x*Math.cos(b),S=n+x*Math.sin(b);if(vL(s,o,_,S,i),o.target)return o}}return o},t.prototype.processGesture=function(r,n){this._gestureMgr||(this._gestureMgr=new AX);var i=this._gestureMgr;n==="start"&&i.clear();var a=i.recognize(r,this.findHover(r.zrX,r.zrY,null).target,this.proxy.dom);if(n==="end"&&i.clear(),a){var o=a.type;r.gestureEvent=o;var s=new jc;s.target=a.target,this.dispatchToElement(s,o,a.event)}},t})(gi);U(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){pL.prototype[e]=function(t){var r=t.zrX,n=t.zrY,i=gL(this,r,n),a,o;if((e!=="mouseup"||!i)&&(a=this.findHover(r,n),o=a.target),e==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e==="mouseup")this._upEl=o;else if(e==="click"){if(this._downEl!==this._upEl||!this._downPoint||xy(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function PX(e,t,r){if(e[e.rectHover?"rectContain":"contain"](t,r)){for(var n=e,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,r))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return i?hL:!0}return!1}function vL(e,t,r,n,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=PX(o,r,n))&&(!t.topTarget&&(t.topTarget=o),s!==hL)){t.target=o;break}}}function gL(e,t,r){var n=e.painter;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}var mL=32,Hc=7;function NX(e){for(var t=0;e>=mL;)t|=e&1,e>>=1;return e+t}function yL(e,t,r,n){var i=t+1;if(i===r)return 1;if(n(e[i++],e[t])<0){for(;i<r&&n(e[i],e[i-1])<0;)i++;RX(e,t,i)}else for(;i<r&&n(e[i],e[i-1])>=0;)i++;return i-t}function RX(e,t,r){for(r--;t<r;){var n=e[t];e[t++]=e[r],e[r--]=n}}function xL(e,t,r,n,i){for(n===t&&n++;n<r;n++){for(var a=e[n],o=t,s=n,l;o<s;)l=o+s>>>1,i(a,e[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;u>0;)e[o+u]=e[o+u-1],u--}e[o]=a}}function T1(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])>0){for(s=n-i;l<s&&a(e,t[r+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&a(e,t[r+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var f=o+(l-o>>>1);a(e,t[r+f])>0?o=f+1:l=f}return l}function A1(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])<0){for(s=i+1;l<s&&a(e,t[r+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l<s&&a(e,t[r+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var f=o+(l-o>>>1);a(e,t[r+f])<0?l=f:o=f+1}return l}function OX(e,t){var r=Hc,n,i,a=0,o=[];n=[],i=[];function s(v,g){n[a]=v,i[a]=g,a+=1}function l(){for(;a>1;){var v=a-2;if(v>=1&&i[v-1]<=i[v]+i[v+1]||v>=2&&i[v-2]<=i[v]+i[v-1])i[v-1]<i[v+1]&&v--;else if(i[v]>i[v+1])break;f(v)}}function u(){for(;a>1;){var v=a-2;v>0&&i[v-1]<i[v+1]&&v--,f(v)}}function f(v){var g=n[v],y=i[v],x=n[v+1],b=i[v+1];i[v]=y+b,v===a-3&&(n[v+1]=n[v+2],i[v+1]=i[v+2]),a--;var _=A1(e[x],e,g,y,0,t);g+=_,y-=_,y!==0&&(b=T1(e[g+y-1],e,x,b,b-1,t),b!==0&&(y<=b?d(g,y,x,b):p(g,y,x,b)))}function d(v,g,y,x){var b=0;for(b=0;b<g;b++)o[b]=e[v+b];var _=0,S=y,T=v;if(e[T++]=e[S++],--x===0){for(b=0;b<g;b++)e[T+b]=o[_+b];return}if(g===1){for(b=0;b<x;b++)e[T+b]=e[S+b];e[T+x]=o[_];return}for(var E=r,D,L,R;;){D=0,L=0,R=!1;do if(t(e[S],o[_])<0){if(e[T++]=e[S++],L++,D=0,--x===0){R=!0;break}}else if(e[T++]=o[_++],D++,L=0,--g===1){R=!0;break}while((D|L)<E);if(R)break;do{if(D=A1(e[S],o,_,g,0,t),D!==0){for(b=0;b<D;b++)e[T+b]=o[_+b];if(T+=D,_+=D,g-=D,g<=1){R=!0;break}}if(e[T++]=e[S++],--x===0){R=!0;break}if(L=T1(o[_],e,S,x,0,t),L!==0){for(b=0;b<L;b++)e[T+b]=e[S+b];if(T+=L,S+=L,x-=L,x===0){R=!0;break}}if(e[T++]=o[_++],--g===1){R=!0;break}E--}while(D>=Hc||L>=Hc);if(R)break;E<0&&(E=0),E+=2}if(r=E,r<1&&(r=1),g===1){for(b=0;b<x;b++)e[T+b]=e[S+b];e[T+x]=o[_]}else{if(g===0)throw new Error;for(b=0;b<g;b++)e[T+b]=o[_+b]}}function p(v,g,y,x){var b=0;for(b=0;b<x;b++)o[b]=e[y+b];var _=v+g-1,S=x-1,T=y+x-1,E=0,D=0;if(e[T--]=e[_--],--g===0){for(E=T-(x-1),b=0;b<x;b++)e[E+b]=o[b];return}if(x===1){for(T-=g,_-=g,D=T+1,E=_+1,b=g-1;b>=0;b--)e[D+b]=e[E+b];e[T]=o[S];return}for(var L=r;;){var R=0,O=0,M=!1;do if(t(o[S],e[_])<0){if(e[T--]=e[_--],R++,O=0,--g===0){M=!0;break}}else if(e[T--]=o[S--],O++,R=0,--x===1){M=!0;break}while((R|O)<L);if(M)break;do{if(R=g-A1(o[S],e,v,g,g-1,t),R!==0){for(T-=R,_-=R,g-=R,D=T+1,E=_+1,b=R-1;b>=0;b--)e[D+b]=e[E+b];if(g===0){M=!0;break}}if(e[T--]=o[S--],--x===1){M=!0;break}if(O=x-T1(e[_],o,0,x,x-1,t),O!==0){for(T-=O,S-=O,x-=O,D=T+1,E=S+1,b=0;b<O;b++)e[D+b]=o[E+b];if(x<=1){M=!0;break}}if(e[T--]=e[_--],--g===0){M=!0;break}L--}while(R>=Hc||O>=Hc);if(M)break;L<0&&(L=0),L+=2}if(r=L,r<1&&(r=1),x===1){for(T-=g,_-=g,D=T+1,E=_+1,b=g-1;b>=0;b--)e[D+b]=e[E+b];e[T]=o[S]}else{if(x===0)throw new Error;for(E=T-(x-1),b=0;b<x;b++)e[E+b]=o[b]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function Sp(e,t,r,n){r||(r=0),n||(n=e.length);var i=n-r;if(!(i<2)){var a=0;if(i<mL){a=yL(e,r,n,t),xL(e,r,n,r+a,t);return}var o=OX(e,t),s=NX(i);do{if(a=yL(e,r,n,t),a<s){var l=i;l>s&&(l=s),xL(e,r,r+l,r+a,t),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var bL=!1;function E1(){bL||(bL=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function wL(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var zX=(function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=wL}return e.prototype.traverse=function(t,r){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,r)},e.prototype.getDisplayList=function(t,r){r=r||!1;var n=this._displayList;return(t||!n.length)&&this.updateDisplayList(r),n},e.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var r=this._roots,n=this._displayList,i=0,a=r.length;i<a;i++)this._updateAndAddDisplayable(r[i],null,t);n.length=this._displayListLen,Sp(n,wL)},e.prototype._updateAndAddDisplayable=function(t,r,n){if(!(t.ignore&&!n)){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath(),a=r&&r.length,o=0,s=t.__clipPaths;if(!t.ignoreClip&&(a||i)){if(s||(s=t.__clipPaths=[]),a)for(var l=0;l<r.length;l++)s[o++]=r[l];for(var u=i,f=t;u;)u.parent=f,u.updateTransform(),s[o++]=u,f=u,u=u.getClipPath()}if(s&&(s.length=o),t.childrenRef){for(var d=t.childrenRef(),p=0;p<d.length;p++){var v=d[p];t.__dirty&&(v.__dirty|=Or),this._updateAndAddDisplayable(v,s,n)}t.__dirty=0}else{var g=t;isNaN(g.z)&&(E1(),g.z=0),isNaN(g.z2)&&(E1(),g.z2=0),isNaN(g.zlevel)&&(E1(),g.zlevel=0),this._displayList[this._displayListLen++]=g}var y=t.getDecalElement&&t.getDecalElement();y&&this._updateAndAddDisplayable(y,s,n);var x=t.getTextGuideLine();x&&this._updateAndAddDisplayable(x,s,n);var b=t.getTextContent();b&&this._updateAndAddDisplayable(b,s,n)}},e.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},e.prototype.delRoot=function(t){if(t instanceof Array){for(var r=0,n=t.length;r<n;r++)this.delRoot(t[r]);return}var i=Je(this._roots,t);i>=0&&this._roots.splice(i,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e})(),Cp;Cp=We.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function Pl(){return new Date().getTime()}var FX=(function(e){ve(t,e);function t(r){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return t.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},t.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},t.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},t.prototype.update=function(r){for(var n=Pl()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(Cp(n),!r._paused&&r.update())}Cp(n)},t.prototype.start=function(){this._running||(this._time=Pl(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Pl(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Pl()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(r,n){n=n||{},this.start();var i=new Vy(r,n.loop);return this.addAnimator(i),i},t})(gi),BX=300,D1=We.domSupported,M1=(function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=De(e,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:e,touch:t,pointer:n}})(),_L={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},kL=!1;function L1(e){var t=e.pointerType;return t==="pen"||t==="touch"}function jX(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function I1(e){e&&(e.zrByTouch=!0)}function HX(e,t){return Dn(e.dom,new VX(e,t),!0)}function SL(e,t){for(var r=t,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==t&&r===e.painterRoot);)r=r.parentNode;return n}var VX=(function(){function e(t,r){this.stopPropagation=lr,this.stopImmediatePropagation=lr,this.preventDefault=lr,this.type=r.type,this.target=this.currentTarget=t.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return e})(),Zn={mousedown:function(e){e=Dn(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Dn(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=Dn(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=Dn(this.dom,e);var t=e.toElement||e.relatedTarget;SL(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){kL=!0,e=Dn(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){kL||(e=Dn(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=Dn(this.dom,e),I1(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Zn.mousemove.call(this,e),Zn.mousedown.call(this,e)},touchmove:function(e){e=Dn(this.dom,e),I1(e),this.handler.processGesture(e,"change"),Zn.mousemove.call(this,e)},touchend:function(e){e=Dn(this.dom,e),I1(e),this.handler.processGesture(e,"end"),Zn.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<BX&&Zn.click.call(this,e)},pointerdown:function(e){Zn.mousedown.call(this,e)},pointermove:function(e){L1(e)||Zn.mousemove.call(this,e)},pointerup:function(e){Zn.mouseup.call(this,e)},pointerout:function(e){L1(e)||Zn.mouseout.call(this,e)}};U(["click","dblclick","contextmenu"],function(e){Zn[e]=function(t){t=Dn(this.dom,t),this.trigger(e,t)}});var P1={pointermove:function(e){L1(e)||P1.mousemove.call(this,e)},pointerup:function(e){P1.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function UX(e,t){var r=t.domHandlers;We.pointerEventsSupported?U(M1.pointer,function(n){Tp(t,n,function(i){r[n].call(e,i)})}):(We.touchEventsSupported&&U(M1.touch,function(n){Tp(t,n,function(i){r[n].call(e,i),jX(t)})}),U(M1.mouse,function(n){Tp(t,n,function(i){i=k1(i),t.touching||r[n].call(e,i)})}))}function $X(e,t){We.pointerEventsSupported?U(_L.pointer,r):We.touchEventsSupported||U(_L.mouse,r);function r(n){function i(a){a=k1(a),SL(e,a.target)||(a=HX(e,a),t.domHandlers[n].call(e,a))}Tp(t,n,i,{capture:!0})}}function Tp(e,t,r,n){e.mounted[t]=r,e.listenerOpts[t]=n,CX(e.domTarget,t,r,n)}function N1(e){var t=e.mounted;for(var r in t)t.hasOwnProperty(r)&&TX(e.domTarget,r,t[r],e.listenerOpts[r]);e.mounted={}}var CL=(function(){function e(t,r){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=r}return e})(),GX=(function(e){ve(t,e);function t(r,n){var i=e.call(this)||this;return i.__pointerCapturing=!1,i.dom=r,i.painterRoot=n,i._localHandlerScope=new CL(r,Zn),D1&&(i._globalHandlerScope=new CL(document,P1)),UX(i,i._localHandlerScope),i}return t.prototype.dispose=function(){N1(this._localHandlerScope),D1&&N1(this._globalHandlerScope)},t.prototype.setCursor=function(r){this.dom.style&&(this.dom.style.cursor=r||"default")},t.prototype.__togglePointerCapture=function(r){if(this.__mayPointerCapture=null,D1&&+this.__pointerCapturing^+r){this.__pointerCapturing=r;var n=this._globalHandlerScope;r?$X(this,n):N1(n)}},t})(gi);var Ap={},TL={};function WX(e){delete TL[e]}function YX(e){if(!e)return!1;if(typeof e=="string")return Fd(e,1)<Uy;if(e.colorStops){for(var t=e.colorStops,r=0,n=t.length,i=0;i<n;i++)r+=Fd(t[i].color,1);return r/=n,r<Uy}return!1}var XX=(function(){function e(t,r,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,n=n||{},this.dom=r,this.id=t;var a=new zX,o=n.renderer||"canvas";Ap[o]||(o=kt(Ap)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new Ap[o](r,a,n,t),l=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!We.node&&!We.worker&&!l?new GX(s.getViewportRoot(),s.root):null,f=n.useCoarsePointer,d=f==null||f==="auto"?We.touchEventsSupported:!!f,p=44,v;d&&(v=Ae(n.pointerSize,p)),this.handler=new pL(a,s,u,s.root,v),this.animation=new FX({stage:{update:l?null:function(){return i._flush(!1)}}}),l||this.animation.start()}return e.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},e.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(t,r){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,r),this.refresh())},e.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=YX(t))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(t){this._darkMode=t},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(t){this._disposed||this._refresh({animUpdate:!t,refresh:!0,refreshHover:!1})},e.prototype._refresh=function(t){t.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:t.refresh,refreshHover:t.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!0)},e.prototype._flush=function(t){var r,n=Pl(),i=this._needsRefresh,a=this._needsRefreshHover;(i||a)&&(r=!0,this._refresh({animUpdate:t,refresh:i,refreshHover:a}));var o=Pl();r?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:o-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,r){if(!this._disposed)return this.handler.findHover(t,r)},e.prototype.on=function(t,r,n){return this._disposed||this.handler.on(t,r,n),this},e.prototype.off=function(t,r){this._disposed||this.handler.off(t,r)},e.prototype.trigger=function(t,r){this._disposed||this.handler.trigger(t,r)},e.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),r=0;r<t.length;r++)t[r]instanceof Bt&&t[r].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,WX(this.id))},e})();function AL(e,t){var r=new XX(yC(),e,t);return TL[r.id]=r,r}function qX(e,t){Ap[e]=t}var EL="";typeof navigator<"u"&&(EL=navigator.platform||"");var Nl="rgba(0, 0, 0, 0.2)",DL=Ne.color.theme[0],KX=zy(DL,null,null,.9);const ML={darkMode:"auto",colorBy:"series",color:Ne.color.theme,gradientColor:[KX,DL],aria:{decal:{decals:[{color:Nl,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Nl,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Nl,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Nl,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Nl,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Nl,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:EL.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var ZX=Fe();function QX(e,t,r){var n=ZX.get(t);if(!n)return r;var i=n(e);return i?r.concat(i):r}var Ep,Vc,LL,IL="\0_ec_inner",JX=1,R1=(function(e){ve(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new Et(a),this._locale=new Et(o),this._optionManager=s},t.prototype.setOption=function(r,n,i){var a=RL(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},t.prototype.resetOption=function(r,n){return this._resetOption(r,RL(n))},t.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?LL(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&U(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},t.prototype.mergeOption=function(r){this._mergeOption(r,null)},t.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=Fe(),u=n&&n.replaceMergeMainTypeMap;QU(this),U(r,function(d,p){d!=null&&(dt.hasClass(p)?p&&(s.push(p),l.set(p,!0)):i[p]=i[p]==null?Ke(d):st(i[p],d,!0))}),u&&u.each(function(d,p){dt.hasClass(p)&&!l.get(p)&&(s.push(p),l.set(p,!0))}),dt.topologicalTravel(s,dt.getAllClassMainTypes(),f,this);function f(d){var p=QX(this,d,Cr(r[d])),v=a.get(d),g=v?u&&u.get(d)?"replaceMerge":"normalMerge":"replaceAll",y=Z9(v,p,g);iV(y,d,dt),i[d]=null,a.set(d,null),o.set(d,0);var x=[],b=[],_=0,S;U(y,function(T,E){var D=T.existing,L=T.newOption;if(!L)D&&(D.mergeOption({},this),D.optionUpdated({},!1));else{var R=d==="series",O=dt.getClass(d,T.keyInfo.subType,!R);if(!O)return;if(d==="tooltip"){if(S)return;S=!0}if(D&&D.constructor===O)D.name=T.keyInfo.name,D.mergeOption(L,this),D.optionUpdated(L,!1);else{var M=ce({componentIndex:E},T.keyInfo);D=new O(L,this,this,M),ce(D,M),T.brandNew&&(D.__requireNewView=!0),D.init(L,this,this),D.optionUpdated(null,!0)}}D?(x.push(D.option),b.push(D),_++):(x.push(void 0),b.push(void 0))},this),i[d]=x,a.set(d,b),o.set(d,_),d==="series"&&Ep(this)}this._seriesIndices||Ep(this)},t.prototype.getOption=function(){var r=Ke(this.option);return U(r,function(n,i){if(dt.hasClass(i)){for(var a=Cr(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!ac(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[IL],r},t.prototype.setTheme=function(r){this._theme=new Et(r),this._resetOption("recreate",null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(r){this._payload=r},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},t.prototype.queryComponents=function(r){var n=r.mainType;if(!n)return[];var i=r.index,a=r.id,o=r.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return i!=null?(l=[],U(Cr(i),function(u){s[u]&&l.push(s[u])})):a!=null?l=PL("id",a,s):o!=null?l=PL("name",o,s):l=Zt(s,function(u){return!!u}),NL(l,r)},t.prototype.findComponents=function(r){var n=r.query,i=r.mainType,a=s(n),o=a?this.queryComponents(a):Zt(this._componentsMap.get(i),function(u){return!!u});return l(NL(o,r));function s(u){var f=i+"Index",d=i+"Id",p=i+"Name";return u&&(u[f]!=null||u[d]!=null||u[p]!=null)?{mainType:i,index:u[f],id:u[d],name:u[p]}:null}function l(u){return r.filter?Zt(u,r.filter):u}},t.prototype.eachComponent=function(r,n,i){var a=this._componentsMap;if($e(r)){var o=n,s=r;a.each(function(d,p){for(var v=0;d&&v<d.length;v++){var g=d[v];g&&s.call(o,p,g,g.componentIndex)}})}else for(var l=Me(r)?a.get(r):Ie(r)?this.findComponents(r):null,u=0;l&&u<l.length;u++){var f=l[u];f&&n.call(i,f,f.componentIndex)}},t.prototype.getSeriesByName=function(r){var n=wi(r,null);return Zt(this._componentsMap.get("series"),function(i){return!!i&&n!=null&&i.name===n})},t.prototype.getSeriesByIndex=function(r){return this._componentsMap.get("series")[r]},t.prototype.getSeriesByType=function(r){return Zt(this._componentsMap.get("series"),function(n){return!!n&&n.subType===r})},t.prototype.getSeries=function(){return Zt(this._componentsMap.get("series"),function(r){return!!r})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(r,n){Vc(this),U(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];r.call(n,a,i)},this)},t.prototype.eachRawSeries=function(r,n){U(this._componentsMap.get("series"),function(i){i&&r.call(n,i,i.componentIndex)})},t.prototype.eachSeriesByType=function(r,n,i){Vc(this),U(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===r&&n.call(i,o,a)},this)},t.prototype.eachRawSeriesByType=function(r,n,i){return U(this.getSeriesByType(r),n,i)},t.prototype.isSeriesFiltered=function(r){return Vc(this),this._seriesIndicesMap.get(r.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(r,n){Vc(this);var i=[];U(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];r.call(n,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=Fe(i)},t.prototype.restoreData=function(r){Ep(this);var n=this._componentsMap,i=[];n.each(function(a,o){dt.hasClass(o)&&i.push(o)}),dt.topologicalTravel(i,dt.getAllClassMainTypes(),function(a){U(n.get(a),function(o){o&&(a!=="series"||!eq(o,r))&&o.restoreData()})})},t.internalField=(function(){Ep=function(r){var n=r._seriesIndices=[];U(r._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),r._seriesIndicesMap=Fe(n)},Vc=function(r){},LL=function(r,n){r.option={},r.option[IL]=JX,r._componentsMap=Fe({series:[]}),r._componentsCount=Fe();var i=n.aria;Ie(i)&&i.enabled==null&&(i.enabled=!0),tq(n,r._theme.option),st(n,ML,!1),r._mergeOption(n,null)}})(),t})(Et);function eq(e,t){if(t){var r=t.seriesIndex,n=t.seriesId,i=t.seriesName;return r!=null&&e.componentIndex!==r||n!=null&&e.id!==n||i!=null&&e.name!==i}}function tq(e,t){var r=e.color&&!e.colorLayer;U(t,function(n,i){i==="colorLayer"&&r||i==="color"&&e.color||dt.hasClass(i)||(typeof n=="object"?e[i]=e[i]?st(e[i],n,!1):Ke(n):e[i]==null&&(e[i]=n))})}function PL(e,t,r){if(pe(t)){var n=Fe();return U(t,function(a){if(a!=null){var o=wi(a,null);o!=null&&n.set(a,!0)}}),Zt(r,function(a){return a&&n.get(a[e])})}else{var i=wi(t,null);return Zt(r,function(a){return a&&i!=null&&a[e]===i})}}function NL(e,t){return t.hasOwnProperty("subType")?Zt(e,function(r){return r&&r.subType===t.subType}):e}function RL(e){var t=Fe();return e&&U(Cr(e.replaceMerge),function(r){t.set(r,!0)}),{replaceMergeMainTypeMap:t}}Un(R1,Nx);var rq=/^(min|max)?(.+)$/,nq=(function(){function e(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return e.prototype.setOption=function(t,r,n){t&&(U(Cr(t.series),function(o){o&&o.data&&Nr(o.data)&&uy(o.data)}),U(Cr(t.dataset),function(o){o&&o.source&&Nr(o.source)&&uy(o.source)})),t=Ke(t);var i=this._optionBackup,a=iq(t,r,!i);this._newBaseOption=a.baseOption,i?(a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},e.prototype.mountOption=function(t){var r=this._optionBackup;return this._timelineOptions=r.timelineOptions,this._mediaList=r.mediaList,this._mediaDefault=r.mediaDefault,this._currentMediaIndices=[],Ke(t?r.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(t){var r,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(r=Ke(n[i.getCurrentIndex()]))}return r},e.prototype.getMediaOption=function(t){var r=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!i.length&&!a)return s;for(var l=0,u=i.length;l<u;l++)aq(i[l].query,r,n)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!sq(o,this._currentMediaIndices)&&(s=De(o,function(f){return Ke(f===-1?a.option:i[f].option)})),this._currentMediaIndices=o,s},e})();function iq(e,t,r){var n=[],i,a,o=e.baseOption,s=e.timeline,l=e.options,u=e.media,f=!!e.media,d=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((d||f)&&(e.options=e.media=null),a=e),f&&pe(u)&&U(u,function(v){v&&v.option&&(v.query?n.push(v):i||(i=v))}),p(a),U(l,function(v){return p(v)}),U(n,function(v){return p(v.option)});function p(v){U(t,function(g){g(v,r)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:i,mediaList:n}}function aq(e,t,r){var n={width:t,height:r,aspectratio:t/r},i=!0;return U(e,function(a,o){var s=o.match(rq);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();oq(n[u],a,l)||(i=!1)}}),i}function oq(e,t,r){return r==="min"?e>=t:r==="max"?e<=t:e===t}function sq(e,t){return e.join(",")===t.join(",")}var Qn=U,Uc=Ie,OL=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function O1(e){var t=e&&e.itemStyle;if(t)for(var r=0,n=OL.length;r<n;r++){var i=OL[r],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?st(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?st(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function hr(e,t,r){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var n=e[t].normal,i=e[t].emphasis;n&&(r?(e[t].normal=e[t].emphasis=null,ct(e[t],n)):e[t]=n),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function $c(e){hr(e,"itemStyle"),hr(e,"lineStyle"),hr(e,"areaStyle"),hr(e,"label"),hr(e,"labelLine"),hr(e,"upperLabel"),hr(e,"edgeLabel")}function Rt(e,t){var r=Uc(e)&&e[t],n=Uc(r)&&r.textStyle;if(n)for(var i=0,a=WT.length;i<a;i++){var o=WT[i];n.hasOwnProperty(o)&&(r[o]=n[o])}}function Mn(e){e&&($c(e),Rt(e,"label"),e.emphasis&&Rt(e.emphasis,"label"))}function lq(e){if(Uc(e)){O1(e),$c(e),Rt(e,"label"),Rt(e,"upperLabel"),Rt(e,"edgeLabel"),e.emphasis&&(Rt(e.emphasis,"label"),Rt(e.emphasis,"upperLabel"),Rt(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(O1(t),Mn(t));var r=e.markLine;r&&(O1(r),Mn(r));var n=e.markArea;n&&Mn(n);var i=e.data;if(e.type==="graph"){i=i||e.nodes;var a=e.links||e.edges;if(a&&!Nr(a))for(var o=0;o<a.length;o++)Mn(a[o]);U(e.categories,function(u){$c(u)})}if(i&&!Nr(i))for(var o=0;o<i.length;o++)Mn(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)Mn(s[o]);if(r=e.markLine,r&&r.data)for(var l=r.data,o=0;o<l.length;o++)pe(l[o])?(Mn(l[o][0]),Mn(l[o][1])):Mn(l[o]);e.type==="gauge"?(Rt(e,"axisLabel"),Rt(e,"title"),Rt(e,"detail")):e.type==="treemap"?(hr(e.breadcrumb,"itemStyle"),U(e.levels,function(u){$c(u)})):e.type==="tree"&&$c(e.leaves)}}function qi(e){return pe(e)?e:e?[e]:[]}function zL(e){return(pe(e)?e[0]:e)||{}}function uq(e,t){Qn(qi(e.series),function(n){Uc(n)&&lq(n)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),Qn(r,function(n){Qn(qi(e[n]),function(i){i&&(Rt(i,"axisLabel"),Rt(i.axisPointer,"label"))})}),Qn(qi(e.parallel),function(n){var i=n&&n.parallelAxisDefault;Rt(i,"axisLabel"),Rt(i&&i.axisPointer,"label")}),Qn(qi(e.calendar),function(n){hr(n,"itemStyle"),Rt(n,"dayLabel"),Rt(n,"monthLabel"),Rt(n,"yearLabel")}),Qn(qi(e.radar),function(n){Rt(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap)}),Qn(qi(e.geo),function(n){Uc(n)&&(Mn(n),Qn(qi(n.regions),function(i){Mn(i)}))}),Qn(qi(e.timeline),function(n){Mn(n),hr(n,"label"),hr(n,"itemStyle"),hr(n,"controlStyle",!0);var i=n.data;pe(i)&&U(i,function(a){Ie(a)&&(hr(a,"label"),hr(a,"itemStyle"))})}),Qn(qi(e.toolbox),function(n){hr(n,"iconStyle"),Qn(n.feature,function(i){hr(i,"iconStyle")})}),Rt(zL(e.axisPointer),"label"),Rt(zL(e.tooltip).axisPointer,"label")}function cq(e,t){for(var r=t.split(","),n=e,i=0;i<r.length&&(n=n&&n[r[i]],n!=null);i++);return n}function fq(e,t,r,n){for(var i=t.split(","),a=e,o,s=0;s<i.length-1;s++)o=i[s],a[o]==null&&(a[o]={}),a=a[o];a[i[s]]==null&&(a[i[s]]=r)}function FL(e){e&&U(dq,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var dq=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],hq=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],z1=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Gc(e){var t=e&&e.itemStyle;if(t)for(var r=0;r<z1.length;r++){var n=z1[r][1],i=z1[r][0];t[n]!=null&&(t[i]=t[n])}}function BL(e){e&&e.alignTo==="edge"&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function jL(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function pq(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus==null&&(e.emphasis.focus="adjacency"))}function HL(e,t){if(e)for(var r=0;r<e.length;r++)t(e[r]),e[r]&&HL(e[r].children,t)}function VL(e,t){uq(e,t),e.series=Cr(e.series),U(e.series,function(r){if(Ie(r)){var n=r.type;if(n==="line")r.clipOverflow!=null&&(r.clip=r.clipOverflow);else if(n==="pie"||n==="gauge"){r.clockWise!=null&&(r.clockwise=r.clockWise),BL(r.label);var i=r.data;if(i&&!Nr(i))for(var a=0;a<i.length;a++)BL(i[a]);r.hoverOffset!=null&&(r.emphasis=r.emphasis||{},(r.emphasis.scaleSize=null)&&(r.emphasis.scaleSize=r.hoverOffset))}else if(n==="gauge"){var o=cq(r,"pointer.color");o!=null&&fq(r,"itemStyle.color",o)}else if(n==="bar"){Gc(r),Gc(r.backgroundStyle),Gc(r.emphasis);var i=r.data;if(i&&!Nr(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(Gc(i[a]),Gc(i[a]&&i[a].emphasis))}else if(n==="sunburst"){var s=r.highlightPolicy;s&&(r.emphasis=r.emphasis||{},r.emphasis.focus||(r.emphasis.focus=s)),jL(r),HL(r.data,jL)}else n==="graph"||n==="sankey"?pq(r):n==="map"&&(r.mapType&&!r.map&&(r.map=r.mapType),r.mapLocation&&ct(r,r.mapLocation));r.hoverAnimation!=null&&(r.emphasis=r.emphasis||{},r.emphasis&&r.emphasis.scale==null&&(r.emphasis.scale=r.hoverAnimation)),FL(r)}}),e.dataRange&&(e.visualMap=e.dataRange),U(hq,function(r){var n=e[r];n&&(pe(n)||(n=[n]),U(n,function(i){FL(i)}))})}var vq=b0(gq);function gq(e){var t=Fe();e.eachSeries(function(r){var n=r.get("stack");if(n){var i=t.get(n)||t.set(n,[]),a=r.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:r};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.push(o)}}),t.each(function(r){if(r.length!==0){var n=r[0].seriesModel,i=n.get("stackOrder")||"seriesAsc";i==="seriesDesc"&&r.reverse(),U(r,function(a,o){a.data.setCalculationInfo("stackedOnSeries",o>0?r[o-1].seriesModel:null)}),mq(r)}})}function mq(e){U(e,function(t,r){var n=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,f,d){var p=o.get(t.stackedDimension,d);if(isNaN(p))return i;var v,g;s?g=o.getRawIndex(d):v=o.get(t.stackedByDimension,d);for(var y=NaN,x=r-1;x>=0;x--){var b=e[x];if(s||(g=b.data.rawIndexOf(b.stackedByDimension,v)),g>=0){var _=b.data.getByRawIndex(b.stackResultDimension,g);if(l==="all"||l==="positive"&&_>0||l==="negative"&&_<0||l==="samesign"&&p>=0&&_>0||l==="samesign"&&p<=0&&_<0){p=U9(p,_),y=_;break}}}return n[0]=p,n[1]=y,n})})}var Jn=(function(){function e(){this.group=new Bt,this.uid=Oh("viewComponent")}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){},e.prototype.updateLayout=function(t,r,n,i){},e.prototype.updateVisual=function(t,r,n,i){},e.prototype.toggleBlurSeries=function(t,r,n){},e.prototype.eachRendered=function(t){var r=this.group;r&&r.traverse(t)},e})();cy(Jn),kd(Jn);var UL=it(),$L={itemStyle:ju(tE,!0),lineStyle:ju(eE,!0)},yq={lineStyle:"stroke",itemStyle:"fill"};function GL(e,t){var r=e.visualStyleMapper||$L[t];return r||(console.warn("Unknown style type '"+t+"'."),$L.itemStyle)}function WL(e,t){var r=e.visualDrawType||yq[t];return r||(console.warn("Unknown style type '"+t+"'."),"fill")}var xq={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=e.getModel(n),a=GL(e,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=WL(e,n),u=o[l],f=$e(u)?u:null,d=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||d){var p=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[l]||(o[l]=p,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||$e(o.fill)?p:o.fill,o.stroke=o.stroke==="auto"||$e(o.stroke)?p:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!t.isSeriesFiltered(e)&&f)return r.setVisual("colorFromPalette",!1),{dataEach:function(v,g){var y=e.getDataParams(g),x=ce({},o);x[l]=f(y),v.setItemVisual(g,"style",x)}}}},Wc=new Et,bq={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=GL(e,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Wc.option=l[n];var u=i(Wc),f=o.ensureUniqueItemVisual(s,"style");ce(f,u),Wc.option.decal&&(o.setItemVisual(s,"decal",Wc.option.decal),Wc.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},wq={performRawSeries:!0,overallReset:function(e){var t=Fe();e.eachSeries(function(r){if(!r.isColorBySeries()){var n=r.type+"-"+r.getColorBy();UL(r).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(r){if(!r.isColorBySeries()){var n=r.getRawData(),i={},a=r.getData(),o=UL(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=WL(r,s);a.each(function(u){var f=a.getRawIndex(u);i[f]=u}),n.each(function(u){var f=i[u],d=a.getItemVisual(f,"colorFromPalette");if(d){var p=a.ensureUniqueItemVisual(f,"style"),v=n.getName(u)||u+"",g=n.count();p[l]=r.getColorFromPalette(v,o,g)}})}})}},Dp=Math.PI;function _q(e,t){t=t||{},ct(t,{text:"loading",textColor:Ne.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:Ne.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new Bt,n=new Nt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(n);var i=new Sr({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Nt({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});r.add(a);var o;return t.showSpinner&&(o=new yh({shape:{startAngle:-Dp/2,endAngle:-Dp/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Dp*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Dp*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(e.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),f=e.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),a.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r}var YL=(function(){function e(t,r,n,i){this._stageTaskMap=Fe(),this.ecInstance=t,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(t,r){t.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},e.prototype.getPerformArgs=function(t,r){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,r){var n=this._pipelineMap.get(t.uid),i=t.__preparePipelineContext?t.__preparePipelineContext(r,n):QT(t,r,n);t.pipelineContext=n.context=i},e.prototype.restorePipelines=function(t,r){var n=this,i=n._pipelineMap=Fe();r.eachSeries(function(a){var o=t.painter.type==="canvas"&&a.getProgressive(),s=a.uid;i.set(s,{id:s,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:o&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(o||700),count:0}),n._pipe(a,a.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,r=this.api.getModel(),n=this.api;U(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";Fi(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},e.prototype.prepareView=function(t,r,n,i){var a=t.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(r,a)},e.prototype.performDataProcessorTasks=function(t,r){this._performStageTasks(this._dataProcessorHandlers,t,r,{block:!0})},e.prototype.performVisualTasks=function(t,r,n){this._performStageTasks(this._visualHandlers,t,r,n)},e.prototype._performStageTasks=function(t,r,n,i){i=i||{};var a=!1,o=this;U(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),d=f.seriesTaskMap,p=f.overallTask;if(p){var v,g=p.agentStubMap;g.each(function(x){s(i,x)&&(x.dirty(),v=!0)}),v&&p.dirty(),o.updatePayload(p,n);var y=o.getPerformArgs(p,i.block);g.each(function(x){x.perform(y)}),p.perform(y)&&(a=!0)}else d&&d.each(function(x,b){s(i,x)&&x.dirty();var _=o.getPerformArgs(x,i.block);_.skip=!l.performRawSeries&&r.isSeriesFiltered(x.context.model),o.updatePayload(x,n),x.perform(_)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},e.prototype.performSeriesTasks=function(t){var r;t.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(t){var r=t.tail;do{if(r.__block){t.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},e.prototype.updatePayload=function(t,r){r!=="remain"&&(t.context.payload=r)},e.prototype._createSeriesStageTask=function(t,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=Fe(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(f):l?n.eachRawSeriesByType(l,f):u&&u(n,i).each(f);function f(d){var p=d.uid,v=s.set(p,o&&o.get(p)||Lc({plan:Aq,reset:Eq,count:Mq}));v.context={model:d,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(d,v)}},e.prototype._createOverallStageTask=function(t,r,n,i){var a=this,o=r.overallTask=r.overallTask||Lc({reset:kq});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=Fe(),u=t.seriesType,f=t.getTargetSeries,d=t.dirtyOnOverallProgress,p=!1,v="";Fi(!t.createOnAllSeries,v),u?n.eachRawSeriesByType(u,g):f?f(n,i).each(g):U(n.getSeries(),g);function g(y){var x=y.uid,b=l.set(x,s&&s.get(x)||(p=!0,Lc({reset:Sq,onDirty:Tq})));b.context={model:y,dirtyOnOverallProgress:d},b.agent=o,b.__block=d,a._pipe(y,b)}p&&o.dirty()},e.prototype._pipe=function(t,r){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},e.wrapStageHandler=function(t,r){return $e(t)&&(t={overallReset:t,seriesType:Lq(t)}),t.uid=Oh("stageHandler"),r&&(t.visualType=r),t},e})();function kq(e){e.overallReset(e.ecModel,e.api,e.payload)}function Sq(e){return e.dirtyOnOverallProgress&&Cq}function Cq(){this.agent.dirty(),this.getDownstream().dirty()}function Tq(){this.agent&&this.agent.dirty()}function Aq(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Eq(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Cr(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?De(t,function(r,n){return XL(n)}):Dq}var Dq=XL(0);function XL(e){return function(t,r){var n=r.data,i=r.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(t,n)}}function Mq(e){return e.data.count()}function Lq(e){Mp=null;try{e(Yc,qL)}catch{}return Mp}var Yc={},qL={},Mp;KL(Yc,R1),KL(qL,rA),Yc.eachSeriesByType=Yc.eachRawSeriesByType=function(e){Mp=e},Yc.eachComponent=function(e){e.mainType==="series"&&e.subType&&(Mp=e.subType)};function KL(e,t){for(var r in t.prototype)e[r]=lr}var ge=Ne.darkColor,ZL=ge.background,Xc=function(){return{axisLine:{lineStyle:{color:ge.axisLine}},splitLine:{lineStyle:{color:ge.axisSplitLine}},splitArea:{areaStyle:{color:[ge.backgroundTint,ge.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:ge.axisMinorSplitLine}},axisLabel:{color:ge.axisLabel},axisName:{}}},QL={label:{color:ge.secondary},itemStyle:{borderColor:ge.borderTint},dividerLineStyle:{color:ge.border}},JL={darkMode:!0,color:ge.theme,backgroundColor:ZL,axisPointer:{lineStyle:{color:ge.border},crossStyle:{color:ge.borderShade},label:{color:ge.tertiary}},legend:{textStyle:{color:ge.secondary},pageTextStyle:{color:ge.tertiary}},textStyle:{color:ge.secondary},title:{textStyle:{color:ge.primary},subtextStyle:{color:ge.quaternary}},toolbox:{iconStyle:{borderColor:ge.accent50},feature:{dataView:{backgroundColor:ZL,textColor:ge.primary,textareaColor:ge.background,textareaBorderColor:ge.border,buttonColor:ge.accent50,buttonTextColor:ge.neutral00}}},tooltip:{backgroundColor:ge.neutral20,defaultBorderColor:ge.border,textStyle:{color:ge.tertiary}},dataZoom:{borderColor:ge.accent10,textStyle:{color:ge.tertiary},brushStyle:{color:ge.backgroundTint},handleStyle:{color:ge.neutral00,borderColor:ge.accent20},moveHandleStyle:{color:ge.accent40},emphasis:{handleStyle:{borderColor:ge.accent50}},dataBackground:{lineStyle:{color:ge.accent30},areaStyle:{color:ge.accent20}},selectedDataBackground:{lineStyle:{color:ge.accent50},areaStyle:{color:ge.accent30}}},visualMap:{textStyle:{color:ge.secondary},handleStyle:{borderColor:ge.neutral30}},timeline:{lineStyle:{color:ge.accent10},label:{color:ge.tertiary},controlStyle:{color:ge.accent30,borderColor:ge.accent30}},calendar:{itemStyle:{color:ge.neutral00,borderColor:ge.neutral20},dayLabel:{color:ge.tertiary},monthLabel:{color:ge.secondary},yearLabel:{color:ge.secondary}},matrix:{x:QL,y:QL,backgroundColor:{borderColor:ge.axisLine},body:{itemStyle:{borderColor:ge.borderTint}}},timeAxis:Xc(),logAxis:Xc(),valueAxis:Xc(),categoryAxis:Xc(),line:{symbol:"circle"},graph:{color:ge.theme},gauge:{title:{color:ge.secondary},axisLine:{lineStyle:{color:[[1,ge.neutral05]]}},axisLabel:{color:ge.axisLabel},detail:{color:ge.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:ge.background}},radar:(function(){var e=Xc();return e.axisName={color:ge.axisLabel},e.axisLine.lineStyle.color=ge.neutral20,e})(),treemap:{breadcrumb:{itemStyle:{color:ge.neutral20,textStyle:{color:ge.secondary}},emphasis:{itemStyle:{color:ge.neutral30}}}},sunburst:{itemStyle:{borderColor:ge.background}},map:{itemStyle:{borderColor:ge.border,areaColor:ge.neutral10},label:{color:ge.tertiary},emphasis:{label:{color:ge.primary},itemStyle:{areaColor:ge.highlight}},select:{label:{color:ge.primary},itemStyle:{areaColor:ge.highlight}}},geo:{itemStyle:{borderColor:ge.border,areaColor:ge.neutral10},emphasis:{label:{color:ge.primary},itemStyle:{areaColor:ge.highlight}},select:{label:{color:ge.primary},itemStyle:{color:ge.highlight}}}};JL.categoryAxis.splitLine.show=!1;var Iq=(function(){function e(){}return e.prototype.normalizeQuery=function(t){var r={},n={},i={};if(Me(t)){var a=ci(t);r.mainType=a.main||null,r.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};U(t,function(l,u){for(var f=!1,d=0;d<o.length;d++){var p=o[d],v=u.lastIndexOf(p);if(v>0&&v===u.length-p.length){var g=u.slice(0,v);g!=="data"&&(r.mainType=g,r[p.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(n[u]=l,f=!0),f||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},e.prototype.filter=function(t,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,a,"name")&&f(u,a,"dataIndex")&&f(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,r.otherQuery,i,a));function f(d,p,v,g){return d[v]==null||p[g||v]===d[v]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e})(),F1=["symbol","symbolSize","symbolRotate","symbolOffset"],eI=F1.concat(["symbolKeepAspect"]),Pq={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData();if(e.legendIcon&&r.setVisual("legendIcon",e.legendIcon),!e.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<F1.length;o++){var s=F1[o],l=e.get(s);$e(l)?(a=!0,i[s]=l):n[s]=l}if(n.symbol=n.symbol||e.defaultSymbol,r.setVisual(ce({legendIcon:e.legendIcon||n.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},n)),t.isSeriesFiltered(e))return;var u=kt(i);function f(d,p){for(var v=e.getRawValue(p),g=e.getDataParams(p),y=0;y<u.length;y++){var x=u[y];d.setItemVisual(p,x,i[x](v,g))}}return{dataEach:a?f:null}}},Nq={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var r=e.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<eI.length;s++){var l=eI[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(a,l,u)}}return{dataEach:r.hasItemOption?n:null}}};function Rq(e,t,r){switch(r){case"color":var n=e.getItemVisual(t,"style");return n[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,r)}}function tI(e,t){switch(t){case"color":var r=e.getVisual("style");return r[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t)}}function qc(e,t,r){for(var n;e&&!(t(e)&&(n=e,r));)e=e.__hostTarget||e.parent;return n}var Ln=new gi,rI={};function Oq(e,t){rI[e]=t}function zq(e){return rI[e]}var Fq=Math.round(Math.random()*9),Bq=typeof Object.defineProperty=="function",jq=(function(){function e(){this._id="__ec_inner_"+Fq++}return e.prototype.get=function(t){return this._guard(t)[this._id]},e.prototype.set=function(t,r){var n=this._guard(t);return Bq?Object.defineProperty(n,this._id,{value:r,enumerable:!1,configurable:!0}):n[this._id]=r,this},e.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},e.prototype.has=function(t){return!!this._guard(t)[this._id]},e.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},e})();function ls(e){return isFinite(e)}function Hq(e,t,r){var n=t.x==null?0:t.x,i=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(n=n*r.width+r.x,i=i*r.width+r.x,a=a*r.height+r.y,o=o*r.height+r.y),n=ls(n)?n:0,i=ls(i)?i:1,a=ls(a)?a:0,o=ls(o)?o:0;var s=e.createLinearGradient(n,a,i,o);return s}function Vq(e,t,r){var n=r.width,i=r.height,a=Math.min(n,i),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,l=t.r==null?.5:t.r;t.global||(o=o*n+r.x,s=s*i+r.y,l=l*a),o=ls(o)?o:.5,s=ls(s)?s:.5,l=l>=0&&ls(l)?l:.5;var u=e.createRadialGradient(o,s,0,o,s,l);return u}function B1(e,t,r){for(var n=t.type==="radial"?Vq(e,t,r):Hq(e,t,r),i=t.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function Uq(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!0;return!1}function Lp(e){return parseInt(e,10)}function Ip(e,t,r){var n=["width","height"][t],i=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(r[n]!=null&&r[n]!=="auto")return parseFloat(r[n]);var s=document.defaultView.getComputedStyle(e);return(e[i]||Lp(s[n])||Lp(e.style[n]))-(Lp(s[a])||0)-(Lp(s[o])||0)||0}function $q(e,t){return!e||e==="solid"||!(t>0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:ft(e)?[e]:pe(e)?e:null}function nI(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&$q(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(r){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(r=De(r,function(a){return a/i}),n/=i)}return[r,n]}var Gq=new Oo(!0);function Pp(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function iI(e){return typeof e=="string"&&e!=="none"}function Np(e){var t=e.fill;return t!=null&&t!=="none"}function aI(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=r}else e.fill()}function oI(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=r}else e.stroke()}function j1(e,t,r){var n=TC(t.image,t.__image,r);if(Sd(n)){var i=e.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Q8),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function Wq(e,t,r,n,i){var a,o=Pp(r),s=Np(r),l=r.strokePercent,u=l<1,f=!t.path;(!t.silent||u)&&f&&t.createPathProxy();var d=t.path||Gq,p=t.__dirty;if(!n){var v=r.fill,g=r.stroke,y=s&&!!v.colorStops,x=o&&!!g.colorStops,b=s&&!!v.image,_=o&&!!g.image,S=void 0,T=void 0,E=void 0,D=void 0,L=void 0;(y||x)&&(L=t.getBoundingRect()),y&&(S=p?B1(e,v,L):t.__canvasFillGradient,t.__canvasFillGradient=S),x&&(T=p?B1(e,g,L):t.__canvasStrokeGradient,t.__canvasStrokeGradient=T),b&&(E=p||!t.__canvasFillPattern?j1(e,v,t):t.__canvasFillPattern,t.__canvasFillPattern=E),_&&(D=p||!t.__canvasStrokePattern?j1(e,g,t):t.__canvasStrokePattern,t.__canvasStrokePattern=D),y?e.fillStyle=S:b&&(E?e.fillStyle=E:s=!1),x?e.strokeStyle=T:_&&(D?e.strokeStyle=D:o=!1)}var R=t.getGlobalScale();d.setScale(R[0],R[1],t.segmentIgnoreThreshold);var O,M;e.setLineDash&&r.lineDash&&(a=nI(t),O=a[0],M=a[1]);var P=!0;(f||p&tl)&&(d.setDPR(e.dpr),u?d.setContext(null):(d.setContext(e),P=!1),d.reset(),t.buildPath(d,t.shape,n),d.toStatic(),t.pathUpdated()),P&&d.rebuildPath(e,u?l:1),O&&(e.setLineDash(O),e.lineDashOffset=M),n?(i.batchFill=s,i.batchStroke=o):r.strokeFirst?(o&&oI(e,r),s&&aI(e,r)):(s&&aI(e,r),o&&oI(e,r)),O&&e.setLineDash([])}function Yq(e,t,r){var n=t.__image=TC(r.image,t.__image,t,t.onload);if(!(!n||!Sd(n))){var i=r.x||0,a=r.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,f=r.sy||0;e.drawImage(n,u,f,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,f=r.sy,d=o-u,p=s-f;e.drawImage(n,u,f,d,p,i,a,o,s)}else e.drawImage(n,i,a,o,s)}}function Xq(e,t,r){var n,i=r.text;if(i!=null&&(i+=""),i){e.font=r.font||va,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var a=void 0,o=void 0;e.setLineDash&&r.lineDash&&(n=nI(t),a=n[0],o=n[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),r.strokeFirst?(Pp(r)&&e.strokeText(i,r.x,r.y),Np(r)&&e.fillText(i,r.x,r.y)):(Np(r)&&e.fillText(i,r.x,r.y),Pp(r)&&e.strokeText(i,r.x,r.y)),a&&e.setLineDash([])}}var sI=["shadowBlur","shadowOffsetX","shadowOffsetY"],lI=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function uI(e,t,r,n,i){var a=!1;if(!n&&(r=r||{},t===r))return!1;if(n||t.opacity!==r.opacity){Er(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Mo.opacity:o}(n||t.blend!==r.blend)&&(a||(Er(e,i),a=!0),e.globalCompositeOperation=t.blend||Mo.blend);for(var s=0;s<sI.length;s++){var l=sI[s];(n||t[l]!==r[l])&&(a||(Er(e,i),a=!0),e[l]=e.dpr*(t[l]||0))}return(n||t.shadowColor!==r.shadowColor)&&(a||(Er(e,i),a=!0),e.shadowColor=t.shadowColor||Mo.shadowColor),a}function cI(e,t,r,n,i){var a=t.style,o=n?null:r&&r.style||{};if(a===o)return!1;var s=uI(e,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(Er(e,i),s=!0),iI(a.fill)&&(e.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(Er(e,i),s=!0),iI(a.stroke)&&(e.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(Er(e,i),s=!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==u&&(s||(Er(e,i),s=!0),e.lineWidth=u)}for(var f=0;f<lI.length;f++){var d=lI[f],p=d[0];(n||a[p]!==o[p])&&(s||(Er(e,i),s=!0),e[p]=a[p]||d[1])}return s}function qq(e,t,r,n,i){return uI(e,t.style,r&&r.style,n,i)}function fI(e,t){var r=t.transform,n=e.dpr||1;r?e.setTransform(n*r[0],n*r[1],n*r[2],n*r[3],n*r[4],n*r[5]):e.setTransform(n,0,0,n,0,0)}function Kq(e,t,r){for(var n=!1,i=0;i<e.length;i++){var a=e[i];n=n||a.isZeroArea(),fI(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}r.allClipped=n}function Zq(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var dI=1,hI=2,pI=3,vI=4;function Qq(e){var t=Np(e),r=Pp(e);return!(e.lineDash||!(+t^+r)||t&&typeof e.fill!="string"||r&&typeof e.stroke!="string"||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function Er(e,t){t.batchFill&&(t.batchFill=!1,e.fill()),t.batchStroke&&(t.batchStroke=!1,e.stroke())}function gI(e,t){var r={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};us(e,t,r),Rl(e,r)}function us(e,t,r){var n=t.transform;if(!t.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){t.__dirty&=~Or,t.__isRendered=!1;return}var i=t.__clipPaths,a=r.prevElClipPaths,o=t.style,s=!1,l=!1;if((!a||Uq(i,a))&&(a&&(Er(e,r),e.restore(),l=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),i&&i.length&&(Er(e,r),e.save(),Kq(i,e,r),s=!0,r.prevElClipPaths=i)),r.allClipped){t.__dirty&=~Or,t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(r.beforeBrushParam),t.innerBeforeBrush();var u=r.prevEl;u||(l=s=!0);var f=t instanceof ut&&t.autoBatch&&Qq(o);s||Zq(n,u.transform)?(Er(e,r),fI(e,t)):f||Er(e,r),t instanceof ut?(r.lastDrawType!==dI&&(l=!0,r.lastDrawType=dI),cI(e,t,u,l,r),(!f||!r.batchFill&&!r.batchStroke)&&e.beginPath(),Wq(e,t,o,f,r)):t instanceof th?(r.lastDrawType!==pI&&(l=!0,r.lastDrawType=pI),cI(e,t,u,l,r),Xq(e,t,o)):t instanceof ka?(r.lastDrawType!==hI&&(l=!0,r.lastDrawType=hI),qq(e,t,u,l,r),Yq(e,t,o)):t.getTemporalDisplayables&&(r.lastDrawType!==vI&&(l=!0,r.lastDrawType=vI),Jq(e,t,r)),t.innerAfterBrush(),t.afterBrush&&(f&&Er(e,r),t.afterBrush()),r.prevEl=t,t.__dirty=0,t.__isRendered=!0}function Rl(e,t){Er(e,t),t.prevElClipPaths&&e.restore()}function Jq(e,t,r){var n=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover,beforeBrushParam:{}},o,s;for(o=t.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(r.beforeBrushParam),l.innerBeforeBrush(),us(e,l,a),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}Rl(e,a);for(var u=0,f=i.length;u<f;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(r.beforeBrushParam),l.innerBeforeBrush(),us(e,l,a),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}Rl(e,a),t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var H1=new jq,mI=new Gs(100),yI=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function V1(e,t){if(e==="none")return null;var r=t.getDevicePixelRatio(),n=t.getZr(),i=n.painter.type==="svg";e.dirty&&H1.delete(e);var a=H1.get(e);if(a)return a;var o=ct(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/r,H1.set(e,s),e.dirty=!1,s;function l(u){for(var f=[r],d=!0,p=0;p<yI.length;++p){var v=o[yI[p]];if(v!=null&&!pe(v)&&!Me(v)&&!ft(v)&&typeof v!="boolean"){d=!1;break}f.push(v)}var g;if(d){g=f.join(",")+(i?"-svg":"");var y=mI.get(g);y&&(i?u.svgElement=y:u.image=y)}var x=bI(o.dashArrayX),b=eK(o.dashArrayY),_=xI(o.symbol),S=tK(x),T=wI(b),E=!i&&Zr.createCanvas(),D=i&&{tag:"g",attrs:{},key:"dcl",children:[]},L=O(),R;E&&(E.width=L.width*r,E.height=L.height*r,R=E.getContext("2d")),M(),d&&mI.put(g,E||D),u.image=E,u.svgElement=D,u.svgWidth=L.width,u.svgHeight=L.height;function O(){for(var P=1,j=0,B=S.length;j<B;++j)P=VT(P,S[j]);for(var $=1,j=0,B=_.length;j<B;++j)$=VT($,_[j].length);P*=$;var K=T*S.length*_.length;return{width:Math.max(1,Math.min(P,o.maxTileWidth)),height:Math.max(1,Math.min(K,o.maxTileHeight))}}function M(){R&&(R.clearRect(0,0,E.width,E.height),o.backgroundColor&&(R.fillStyle=o.backgroundColor,R.fillRect(0,0,E.width,E.height)));for(var P=0,j=0;j<b.length;++j)P+=b[j];if(P<=0)return;for(var B=-T,$=0,K=0,Z=0;B<L.height;){if($%2===0){for(var re=K/2%_.length,Y=0,G=0,I=0;Y<L.width*2;){for(var z=0,j=0;j<x[Z].length;++j)z+=x[Z][j];if(z<=0)break;if(G%2===0){var W=(1-o.symbolSize)*.5,F=Y+x[Z][G]*W,ee=B+b[$]*W,ae=x[Z][G]*o.symbolSize,ie=b[$]*o.symbolSize,_e=I/2%_[re].length;be(F,ee,ae,ie,_[re][_e])}Y+=x[Z][G],++I,++G,G===x[Z].length&&(G=0)}++Z,Z===x.length&&(Z=0)}B+=b[$],++K,++$,$===b.length&&($=0)}function be(xe,Se,Le,Xe,nr){var Tt=i?1:r,nn=is(nr,xe*Tt,Se*Tt,Le*Tt,Xe*Tt,o.color,o.symbolKeepAspect);if(i){var Dr=n.painter.renderOneToVNode(nn);Dr&&D.children.push(Dr)}else gI(R,nn)}}}}function xI(e){if(!e||e.length===0)return[["rect"]];if(Me(e))return[[e]];for(var t=!0,r=0;r<e.length;++r)if(!Me(e[r])){t=!1;break}if(t)return xI([e]);for(var n=[],r=0;r<e.length;++r)Me(e[r])?n.push([e[r]]):n.push(e[r]);return n}function bI(e){if(!e||e.length===0)return[[0,0]];if(ft(e)){var t=Math.ceil(e);return[[t,t]]}for(var r=!0,n=0;n<e.length;++n)if(!ft(e[n])){r=!1;break}if(r)return bI([e]);for(var i=[],n=0;n<e.length;++n)if(ft(e[n])){var t=Math.ceil(e[n]);i.push([t,t])}else{var t=De(e[n],function(s){return Math.ceil(s)});t.length%2===1?i.push(t.concat(t)):i.push(t)}return i}function eK(e){if(!e||typeof e=="object"&&e.length===0)return[0,0];if(ft(e)){var t=Math.ceil(e);return[t,t]}var r=De(e,function(n){return Math.ceil(n)});return e.length%2?r.concat(r):r}function tK(e){return De(e,function(t){return wI(t)})}function wI(e){for(var t=0,r=0;r<e.length;++r)t+=e[r];return e.length%2===1?t*2:t}var rK=b0(nK);function nK(e,t){e.eachRawSeries(function(r){if(!e.isSeriesFiltered(r)){var n=r.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=V1(s,t)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=V1(i,t)}}})}var iK=1,aK=800,oK=900,sK=920,lK=1e3,uK=2e3,_I=5e3,kI=1e3,cK=1100,U1=2e3,SI=3e3,fK=4e3,Rp=4500,dK=4600,hK=5e3,pK=6e3,CI=7e3,vK={PROCESSOR:{SERIES_FILTER:aK,AXIS_STATISTICS:sK,FILTER:lK,STATISTIC:_I,STATISTICS:_I},VISUAL:{LAYOUT:kI,PROGRESSIVE_LAYOUT:cK,GLOBAL:U1,CHART:SI,POST_CHART_LAYOUT:dK,COMPONENT:fK,BRUSH:hK,CHART_ITEM:Rp,ARIA:pK,DECAL:CI}},jt="__flagInMainProcess",Op="__mainProcessVersion",Yt="__pendingUpdate",$1="__needsUpdateStatus",TI=/^[a-zA-Z0-9_]+$/,G1="__connectUpdateStatus",AI=0,gK=1,mK=2;function EI(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(this.isDisposed()){this.id;return}return MI(this,e,t)}}function DI(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return MI(this,e,t)}}function MI(e,t,r){return r[0]=r[0]&&r[0].toLowerCase(),gi.prototype[t].apply(e,r)}var LI=(function(e){ve(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(gi),II=LI.prototype;II.on=DI("on"),II.off=DI("off");var cs,W1,zp,Ki,Fp,Y1,X1,Ol,zl,PI,NI,q1,RI,Bp,OI,zI,In,FI,Fl,BI=(function(e){ve(t,e);function t(r,n,i){var a=e.call(this,new Iq)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},a.__v_skip=!0,a._dom=r;var o="canvas",s="auto",l=!1;a[Op]=1,i.ssr;var u=a._zr=AL(r,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:Ae(i.useDirtyRect,l),useCoarsePointer:Ae(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=v1(pt(u.flush,u),17),a._updateTheme(n),a._locale=Z7(i.locale||BE),a._coordSysMgr=new hx;var f=a._api=OI(a);function d(p,v){return p.__prio-v.__prio}return Sp(Hp,d),Sp(J1,d),a._scheduler=new YL(a,f,J1,Hp),a._messageCenter=new LI,a._initEvents(),a.resize=pt(a.resize,a),u.animation.on("frame",a._onframe,a),PI(u,a),NI(u,a),uy(a),a}return t.prototype._onframe=function(){if(!this._disposed){var r=this._scheduler,n=this._model,i=this._api;if(FI(this),this[Yt]){var a=this[Yt].silent;this[jt]=!0,Fl(this);try{cs(this),Ki.update.call(this,null,this[Yt].updateParams)}catch(l){throw this[jt]=!1,this[Yt]=null,l}this._zr.flush(),this[jt]=!1,this[Yt]=null,Ol.call(this,a),zl.call(this,a)}else if(r.unfinished){var o=iK;do{r.unfinished=!1;var s=Zr.getTime();r.performSeriesTasks(n),r.performDataProcessorTasks(n),Y1(this,n),r.performVisualTasks(n),Bp(this,this._model,i,"remain",{}),o-=Zr.getTime()-s}while(o>0&&r.unfinished);r.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(r,n,i){if(!this[jt]){if(this._disposed){this.id;return}var a,o,s;if(Ie(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[jt]=!0,Fl(this),!this._model||n){var l=new nq(this._api),u=this._theme,f=this._model=new R1;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},eb);var d={seriesTransition:s,optionChanged:!0};if(i)this[Yt]={silent:a,updateParams:d},this[jt]=!1,this.getZr().wakeUp();else{try{cs(this),Ki.update.call(this,null,d)}catch(p){throw this[Yt]=null,this[jt]=!1,p}this._ssr||this._zr.flush(),this[Yt]=null,this[jt]=!1,Ol.call(this,a),zl.call(this,a)}}},t.prototype.setTheme=function(r,n){if(!this[jt]){if(this._disposed){this.id;return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[Yt]&&(a==null&&(a=this[Yt].silent),o=this[Yt].updateParams,this[Yt]=null),this[jt]=!0,Fl(this);try{this._updateTheme(r),i.setTheme(this._theme),cs(this),Ki.update.call(this,{type:"setTheme"},o)}catch(s){throw this[jt]=!1,s}this[jt]=!1,Ol.call(this,a),zl.call(this,a)}}},t.prototype._updateTheme=function(r){Me(r)&&(r=jI[r]),r&&(r=Ke(r),r&&VL(r,!0),this._theme=r)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||We.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},t.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},t.prototype.getSvgDataURL=function(){var r=this._zr,n=r.storage.getDisplayList();return U(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},t.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;U(n,function(l){i.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return U(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(HI[i]){var l=s,u=s,f=-s,d=-s,p=[],v=r&&r.pixelRatio||this.getDevicePixelRatio();U(Kc,function(S,T){if(S.group===i){var E=n?S.getZr().painter.getSvgDom().innerHTML:S.renderToCanvas(Ke(r)),D=S.getDom().getBoundingClientRect();l=a(D.left,l),u=a(D.top,u),f=o(D.right,f),d=o(D.bottom,d),p.push({dom:E,left:D.left,top:D.top})}}),l*=v,u*=v,f*=v,d*=v;var g=f-l,y=d-u,x=Zr.createCanvas(),b=AL(x,{renderer:n?"svg":"canvas"});if(b.resize({width:g,height:y}),n){var _="";return U(p,function(S){var T=S.left-l,E=S.top-u;_+='<g transform="translate('+T+","+E+')">'+S.dom+"</g>"}),b.painter.getSvgRoot().innerHTML=_,r.connectedBackgroundColor&&b.painter.setBackgroundColor(r.connectedBackgroundColor),b.refreshImmediately(),b.painter.toDataURL()}else return r.connectedBackgroundColor&&b.add(new Nt({shape:{x:0,y:0,width:g,height:y},style:{fill:r.connectedBackgroundColor}})),U(p,function(S){var T=new ka({style:{x:S.left*v-l,y:S.top*v-u,image:S.dom}});b.add(T)}),b.refreshImmediately(),x.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},t.prototype.convertToPixel=function(r,n,i){return Fp(this,"convertToPixel",r,n,i)},t.prototype.convertToLayout=function(r,n,i){return Fp(this,"convertToLayout",r,n,i)},t.prototype.convertFromPixel=function(r,n,i){return Fp(this,"convertFromPixel",r,n,i)},t.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=g0(i,r);return U(o,function(s,l){l.indexOf("Models")>=0&&U(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(n);else if(l==="seriesModels"){var d=this._chartsMap[u.__viewId];d&&d.containPoint&&(a=a||d.containPoint(n,u))}},this)},this),!!a},t.prototype.getVisual=function(r,n){var i=this._model,a=g0(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?Rq(s,l,n):tI(s,n)},t.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},t.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},t.prototype._initEvents=function(){var r=this;U(yK,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,f=i==="globalout";if(f?u={}:l&&qc(l,function(y){var x=tt(y);if(x&&x.dataIndex!=null){var b=x.dataModel||s.getSeriesByIndex(x.seriesIndex);return u=b&&b.getDataParams(x.dataIndex,x.dataType,l)||{},!0}else if(x.eventData)return u=ce({},x.eventData),!0},!0),u){var d=u.componentType,p=u.componentIndex;(d==="markLine"||d==="markPoint"||d==="markArea")&&(d="series",p=u.seriesIndex);var v=d&&p!=null&&s.getComponent(d,p),g=v&&r[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];u.event=o,u.type=i,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:v,view:g},r.trigger(i,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;U(Q1,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),tX(n,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&XT(this.getDom(),rb,"");var n=this,i=n._api,a=n._model;U(n._componentsViews,function(o){o.dispose(a,i)}),U(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Kc[n.id]},t.prototype.resize=function(r){if(!this[jt]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[Yt]&&(a==null&&(a=this[Yt].silent),i=!0,this[Yt]=null),this[jt]=!0,Fl(this);try{i&&cs(this),Ki.update.call(this,{type:"resize",animation:ce({duration:0},r&&r.animation)})}catch(o){throw this[jt]=!1,o}this[jt]=!1,Ol.call(this,a),zl.call(this,a)}}},t.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(Ie(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!tb[r]){var i=tb[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(r){var n=ce({},r);return n.type=Z1[r.type],n},t.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(Ie(n)||(n={silent:!!n}),!!jp[r.type]&&this._model){if(this[jt]){this._pendingActions.push(r);return}var i=n.silent;X1.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&We.browser.weChat&&this._throttledZrFlush(),Ol.call(this,i),zl.call(this,i)}},t.prototype.updateLabelLayout=function(){Ln.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){cs=function(d){bW(d._model);var p=d._scheduler;p.restorePipelines(d._zr,d._model),p.prepareStageTasks(),W1(d,!0),W1(d,!1),p.plan()},W1=function(d,p){for(var v=d._model,g=d._scheduler,y=p?d._componentsViews:d._chartsViews,x=p?d._componentsMap:d._chartsMap,b=d._zr,_=d._api,S=0;S<y.length;S++)y[S].__alive=!1;p?v.eachComponent(function(D,L){D!=="series"&&T(L)}):v.eachSeries(T);function T(D){var L=D.__requireNewView;D.__requireNewView=!1;var R="_ec_"+D.id+"_"+D.type,O=!L&&x[R];if(!O){var M=ci(D.type),P=p?Jn.getClass(M.main,M.sub):An.getClass(M.sub);O=new P,O.init(v,_),x[R]=O,y.push(O),b.add(O.group)}D.__viewId=O.__id=R,O.__alive=!0,O.__model=D,O.group.__ecComponentInfo={mainType:D.mainType,index:D.componentIndex},!p&&g.prepareView(O,D,v,_)}for(var S=0;S<y.length;){var E=y[S];E.__alive?S++:(!p&&E.renderTask.dispose(),b.remove(E.group),E.dispose(v,_),y.splice(S,1),x[E.__id]===E&&delete x[E.__id],E.__id=E.group.__ecComponentInfo=null)}},zp=function(d,p,v,g,y){var x=d._model;if(x.setUpdatePayload(v),!g){U([].concat(d._componentsViews).concat(d._chartsViews),T);return}var b=sV(v,g,y),_=v.excludeSeriesId,S;_!=null&&(S=Fe(),U(Cr(_),function(E){var D=wi(E,null);D!=null&&S.set(D,!0)})),x&&x.eachComponent(b,function(E){var D=S&&S.get(E.id)!=null;if(!D)if(wA(v))if(E instanceof Yn)v.type===$o&&!v.notBlur&&!E.get(["emphasis","disabled"])&&LV(E,v,d._api);else{var L=M0(E.mainType,E.componentIndex,v.name,d._api),R=L.focusSelf,O=L.dispatchers;v.type===$o&&R&&!v.notBlur&&D0(E.mainType,E.componentIndex,d._api),O&&U(O,function(M){v.type===$o?sc(M):lc(M)})}else P0(v)&&E instanceof Yn&&(NV(E,v,d._api),yA(E),In(d))},d),x&&x.eachComponent(b,function(E){var D=S&&S.get(E.id)!=null;D||T(d[g==="series"?"_chartsMap":"_componentsMap"][E.__viewId])},d);function T(E){E&&E.__alive&&E[p]&&E[p](E.__model,x,d._api,v)}},Ki={prepareAndUpdate:function(d){cs(this),Ki.update.call(this,d,d&&{optionChanged:d.newOption!=null})},update:function(d,p){var v=this._model,g=this._api,y=this._zr,x=this._coordSysMgr,b=this._scheduler;if(v){wW(v),v.setUpdatePayload(d),b.restoreData(v,d),b.performSeriesTasks(v),x.create(v,g),Ln.trigger("coordsys:aftercreate",v,g),b.performDataProcessorTasks(v,d),Y1(this,v),x.update(v,g),n(v),b.performVisualTasks(v,d);var _=v.get("backgroundColor")||"transparent";y.setBackgroundColor(_);var S=v.get("darkMode");S!=null&&S!=="auto"&&y.setDarkMode(S),q1(this,v,g,d,p),Ln.trigger("afterupdate",v,g)}},updateTransform:function(d){var p=this,v=p._model,g=p._api;if(v){v.setUpdatePayload(d);var y=[];v.eachComponent(function(b,_){if(b!==JT){var S=p.getViewOfComponentModel(_);if(S&&S.__alive)if(S.updateTransform){var T=S.updateTransform(_,v,g,d);T&&T.update&&y.push(S)}else y.push(S)}});var x=Fe();v.eachSeries(function(b){var _=p._chartsMap[b.__viewId],S=b.pipelineContext;if(_.updateTransform&&!S.progressiveRender){var T=_.updateTransform(b,v,g,d);T&&T.update&&x.set(b.uid,1)}else x.set(b.uid,1)}),p._scheduler.performVisualTasks(v,d,{setDirty:!0,dirtyMap:x}),Bp(p,v,g,d,{},x),Ln.trigger("afterupdate",v,g)}},updateView:function(d){var p=this._model;p&&(p.setUpdatePayload(d),An.markUpdateMethod(d,"updateView"),n(p),this._scheduler.performVisualTasks(p,d,{setDirty:!0}),q1(this,p,this._api,d,{}),Ln.trigger("afterupdate",p,this._api))},updateVisual:function(d){var p=this,v=this._model;v&&(v.setUpdatePayload(d),v.eachSeries(function(g){g.getData().clearAllVisual()}),An.markUpdateMethod(d,"updateVisual"),n(v),this._scheduler.performVisualTasks(v,d,{visualType:"visual",setDirty:!0}),v.eachComponent(function(g,y){if(g!=="series"){var x=p.getViewOfComponentModel(y);x&&x.__alive&&x.updateVisual(y,v,p._api,d)}}),v.eachSeries(function(g){var y=p._chartsMap[g.__viewId];y.updateVisual(g,v,p._api,d)}),Ln.trigger("afterupdate",v,this._api))},updateLayout:function(d){Ki.update.call(this,d)}};function r(d,p,v,g,y){if(d._disposed){d.id;return}for(var x=d._model,b=d._coordSysMgr.getCoordinateSystems(),_,S=g0(x,v),T=0;T<b.length;T++){var E=b[T];if(E[p]&&(_=E[p](x,S,g,y))!=null)return _}}Fp=r,Y1=function(d,p){var v=d._chartsMap,g=d._scheduler;p.eachSeries(function(y){g.updateStreamModes(y,v[y.__viewId])})},X1=function(d,p){var v=this,g=this.getModel(),y=d.type,x=d.escapeConnect,b=jp[y],_=(b.update||"update").split(":"),S=_.pop(),T=_[0]!=null&&ci(_[0]);this[jt]=!0,Fl(this);var E=[d],D=!1;d.batch&&(D=!0,E=De(d.batch,function(Z){return Z=ct(ce({},Z),d),Z.batch=null,Z}));var L=[],R,O=[],M=b.nonRefinedEventType,P=P0(d),j=wA(d);if(j&&mA(this._api),U(E,function(Z){var re=b.action(Z,g,v._api);if(b.refineEvent?O.push(re):R=re,R=R||ce({},Z),R.type=M,L.push(R),j){var Y=m0(d),G=Y.queryOptionMap,I=Y.mainTypeSpecified,z=I?G.keys()[0]:"series";zp(v,S,Z,z),In(v)}else P?(zp(v,S,Z,"series"),In(v)):T&&zp(v,S,Z,T.main,T.sub)}),S!=="none"&&!j&&!P&&!T)try{this[Yt]?(cs(this),Ki.update.call(this,d),this[Yt]=null):Ki[S].call(this,d)}catch(Z){throw this[jt]=!1,Z}if(D?R={type:M,escapeConnect:x,batch:L}:R=L[0],this[jt]=!1,!p){var B=void 0;if(b.refineEvent){var $=b.refineEvent(O,d,g,this._api).eventContent;Fi(Ie($)),B=ct({type:b.refinedEventType},$),B.fromAction=d.type,B.fromActionPayload=d,B.escapeConnect=!0}var K=this._messageCenter;K.trigger(R.type,R),B&&K.trigger(B.type,B)}},Ol=function(d){for(var p=this._pendingActions;p.length;){var v=p.shift();X1.call(this,v,d)}},zl=function(d){!d&&this.trigger("updated")},PI=function(d,p){d.on("rendered",function(v){p.trigger("rendered",v),d.animation.isFinished()&&!p[Yt]&&!p._scheduler.unfinished&&!p._pendingActions.length?p.trigger("finished"):d.refresh()})},NI=function(d,p){d.on("mouseover",function(v){var g=v.target,y=qc(g,I0);y&&(IV(y,v,p._api),In(p))}).on("mouseout",function(v){var g=v.target,y=qc(g,I0);y&&(PV(y,v,p._api),In(p))}).on("click",function(v){var g=v.target,y=qc(g,function(_){return tt(_).dataIndex!=null},!0);if(y){var x=y.selected?"unselect":"select",b=tt(y);p._api.dispatchAction({type:x,dataType:b.dataType,dataIndexInside:b.dataIndex,seriesIndex:b.seriesIndex,isFromClick:!0})}})};function n(d){d.clearColorPalette(),d.eachSeries(function(p){p.clearColorPalette()})}function i(d){var p=[],v=[],g=!1;if(d.eachComponent(function(_,S){var T=S.get("zlevel")||0,E=S.get("z")||0,D=S.getZLevelKey();g=g||!!D,(_==="series"?v:p).push({zlevel:T,z:E,idx:S.componentIndex,type:_,key:D})}),g){var y=p.concat(v),x,b;Sp(y,function(_,S){return _.zlevel===S.zlevel?_.z-S.z:_.zlevel-S.zlevel}),U(y,function(_){var S=d.getComponent(_.type,_.idx),T=_.zlevel,E=_.key;x!=null&&(T=Math.max(x,T)),E?(T===x&&E!==b&&T++,b=E):b&&(T===x&&T++,b=""),x=T,S.setZLevel(T)})}}q1=function(d,p,v,g,y){i(p),RI(d,p,v,g,y),U(d._chartsViews,function(x){x.__alive=!1}),Bp(d,p,v,g,y),U(d._chartsViews,function(x){x.__alive||x.remove(p,v)})},RI=function(d,p,v,g,y,x){U(x||d._componentsViews,function(b){var _=b.__model;u(_,b),b.render(_,p,v,g),l(_,b),f(_,b)})},Bp=function(d,p,v,g,y,x){var b=d._scheduler;y=ce(y||{},{updatedSeries:p.getSeries()}),Ln.trigger("series:beforeupdate",p,v,y);var _=!1;p.eachSeries(function(S){var T=d._chartsMap[S.__viewId];T.__alive=!0;var E=T.renderTask;b.updatePayload(E,g),u(S,T),x&&x.get(S.uid)&&E.dirty(),E.perform(b.getPerformArgs(E))&&(_=!0),T.group.silent=!!S.get("silent"),s(S,T),yA(S)}),b.unfinished=_||b.unfinished,Ln.trigger("series:layoutlabels",p,v,y),Ln.trigger("series:transition",p,v,y),p.eachSeries(function(S){var T=d._chartsMap[S.__viewId];l(S,T),f(S,T)}),o(d,p),Ln.trigger("series:afterupdate",p,v,y)},In=function(d){d[$1]=!0,d.getZr().wakeUp()},Fl=function(d){d[Op]=(d[Op]+1)%1e6},FI=function(d){d[$1]&&(d.getZr().storage.traverse(function(p){hc(p)||a(p)}),d[$1]=!1)};function a(d){for(var p=[],v=d.currentStates,g=0;g<v.length;g++){var y=v[g];y==="emphasis"||y==="blur"||y==="select"||p.push(y)}d.selected&&d.states.select&&p.push("select"),d.hoverState===oh&&d.states.emphasis?p.push("emphasis"):d.hoverState===ah&&d.states.blur&&p.push("blur"),d.useStates(p)}function o(d,p){var v=d._zr;if(v.painter.type==="canvas"){var g=v.storage,y=0;g.traverse(function(b){b.isGroup||y++});var x=y>Ae(p.get("hoverLayerThreshold"),ML.hoverLayerThreshold)&&!We.node&&!We.worker;(d._usingTHL||x)&&(p.eachSeries(function(b){if(!b.preventUsingHoverLayer){var _=d._chartsMap[b.__viewId];_.__alive&&_.eachRendered(function(S){var T=S.states.emphasis;T&&T.hoverLayer!==Sh&&(T.hoverLayer=x?BA:FA)})}}),d._usingTHL=x)}}function s(d,p){var v=d.get("blendMode")||null;p.eachRendered(function(g){g.isGroup||(g.style.blend=v)})}function l(d,p){if(!d.preventAutoZ){var v=Z0(d);p.eachRendered(function(g){return Q0(g,v.z,v.zlevel),!0})}}function u(d,p){p.eachRendered(function(v){if(!hc(v)){var g=v.getTextContent(),y=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),y&&y.stateTransition&&(y.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function f(d,p){var v=d.getModel("stateAnimation"),g=d.isAnimationEnabled(),y=v.get("duration"),x=y>0?{duration:y,delay:v.get("delay"),easing:v.get("easing")}:null;p.eachRendered(function(b){if(b.states&&b.states.emphasis){if(hc(b))return;if(b instanceof ut&&jV(b),b.__dirty){var _=b.prevStates;_&&b.useStates(_)}if(g){b.stateTransition=x;var S=b.getTextContent(),T=b.getTextGuideLine();S&&(S.stateTransition=x),T&&(T.stateTransition=x)}b.__dirty&&a(b)}})}OI=function(d){return new((function(p){ve(v,p);function v(){return p!==null&&p.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return d._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(g){for(;g;){var y=g.__ecComponentInfo;if(y!=null)return d._model.getComponent(y.mainType,y.index);g=g.parent}},v.prototype.enterEmphasis=function(g,y){sc(g,y),In(d)},v.prototype.leaveEmphasis=function(g,y){lc(g,y),In(d)},v.prototype.enterBlur=function(g){hA(g),In(d)},v.prototype.leaveBlur=function(g){A0(g),In(d)},v.prototype.enterSelect=function(g){pA(g),In(d)},v.prototype.leaveSelect=function(g){vA(g),In(d)},v.prototype.getModel=function(){return d.getModel()},v.prototype.getViewOfComponentModel=function(g){return d.getViewOfComponentModel(g)},v.prototype.getViewOfSeriesModel=function(g){return d.getViewOfSeriesModel(g)},v.prototype.getECUpdateCycleVersion=function(){return d[Op]},v.prototype.usingTHL=function(){return d._usingTHL},v})(rA))(d)},zI=function(d){function p(v,g){for(var y=0;y<v.length;y++){var x=v[y];x[G1]=g}}U(Z1,function(v,g){d._messageCenter.on(g,function(y){if(HI[d.group]&&d[G1]!==AI){if(y&&y.escapeConnect)return;var x=d.makeActionFromEvent(y),b=[];U(Kc,function(_){_!==d&&_.group===d.group&&b.push(_)}),p(b,AI),U(b,function(_){_[G1]!==gK&&_.dispatchAction(x)}),p(b,mK)}})})}})(),t})(gi),K1=BI.prototype;K1.on=EI("on"),K1.off=EI("off"),K1.one=function(e,t,r){var n=this;function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];t&&t.apply&&t.apply(this,a),n.off(e,i)}this.on.call(this,e,i,r)};var yK=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Sle(e){}var jp={},Z1={},Q1={},J1=[],eb=[],Hp=[],jI={},tb={},Kc={},HI={},xK=+new Date-0,rb="_echarts_instance_";function bK(e,t,r){var n=!(r&&r.ssr);if(n){var i=wK(e);if(i)return i}var a=new BI(e,t,r);return a.id="ec_"+xK++,Kc[a.id]=a,n&&XT(e,rb,a.id),zI(a),Ln.trigger("afterinit",a),a}function wK(e){return Kc[lV(e,rb)]}function VI(e,t){jI[e]=t}function UI(e){Je(eb,e)<0&&eb.push(e)}function $I(e,t){ib(J1,e,t,uK)}function _K(e){nb("afterinit",e)}function kK(e){nb("afterupdate",e)}function nb(e,t){Ln.on(e,t)}function Bl(e,t,r){var n,i,a,o,s;$e(t)&&(r=t,t=""),Ie(e)?(n=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,r||(r=e.action),a=e.refineEvent):(n=e,i=t);function l(f){return f.toLowerCase()}i=l(i||n);var u=a?l(n):i;jp[n]||(Fi(TI.test(n)&&TI.test(i)),a&&Fi(i!==n),jp[n]={actionType:n,refinedEventType:i,nonRefinedEventType:u,update:o,action:r,refineEvent:a},Q1[i]=1,a&&s&&(Q1[u]=1),Z1[u]=n)}function SK(e,t){hx.register(e,t)}function CK(e,t){ib(Hp,e,t,kI,"layout")}function fs(e,t){ib(Hp,e,t,SI,"visual")}var GI=[];function ib(e,t,r,n,i,a){if(($e(t)||Ie(t))&&(r=t,t=n),!(Je(GI,r)>=0)){GI.push(r);var o=YL.wrapStageHandler(r,i);o.__prio=t,o.__raw=r,e.push(o)}}function WI(e,t){tb[e]=t}function TK(e,t,r){var n=zq("registerMap");n&&n(e,t,r)}var AK=D$;fs(U1,xq),fs(Rp,bq),fs(Rp,wq),fs(U1,Pq),fs(Rp,Nq),fs(CI,rK),UI(VL),$I(oK,vq),WI("default",_q),Bl({type:$o,event:$o,update:$o},lr),Bl({type:lh,event:lh,update:lh},lr),Bl({type:uh,event:S0,update:uh,action:lr,refineEvent:ab,publishNonRefinedEvent:!0}),Bl({type:k0,event:S0,update:k0,action:lr,refineEvent:ab,publishNonRefinedEvent:!0}),Bl({type:ch,event:S0,update:ch,action:lr,refineEvent:ab,publishNonRefinedEvent:!0});function ab(e,t,r,n){return{eventContent:{selected:RV(r),isFromClick:t.isFromClick||!1}}}VI("default",{}),VI("dark",JL);var YI=[],EK={registerPreprocessor:UI,registerProcessor:$I,registerPostInit:_K,registerPostUpdate:kK,registerUpdateLifecycle:nb,registerAction:Bl,registerCoordinateSystem:SK,registerLayout:CK,registerVisual:fs,registerTransform:AK,registerLoading:WI,registerMap:TK,registerImpl:Oq,PRIORITY:vK,ComponentModel:dt,ComponentView:Jn,SeriesModel:Yn,ChartView:An,registerComponentModel:function(e){dt.registerClass(e)},registerComponentView:function(e){Jn.registerClass(e)},registerSeriesModel:function(e){Yn.registerClass(e)},registerChartView:function(e){An.registerClass(e)},registerCustomSeries:function(e,t){},registerSubTypeDefaulter:function(e,t){dt.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){qX(e,t)}};function Ba(e){if(pe(e)){U(e,function(t){Ba(t)});return}Je(YI,e)>=0||(YI.push(e),$e(e)&&(e={install:e}),e.install(EK))}var DK=(function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e})(),ob=(function(e){ve(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",_n).models[0]},t.type="cartesian2dAxis",t})(dt);Un(ob,DK);var XI={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:"auto",onZeroAxisIndex:null,lineStyle:{color:Ne.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:Ne.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Ne.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[Ne.color.backgroundTint,Ne.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Ne.color.neutral00,borderColor:Ne.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},MK=st({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},XI),sb=st({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Ne.color.axisMinorSplitLine,width:1}}},XI),LK=st({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},sb),IK=ct({logBase:10},sb);const PK={category:MK,value:sb,time:LK,log:IK};function qI(e,t,r,n){U($D,function(i,a){var o=st(st({},PK[a],!0),n,!0),s=(function(l){ve(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+a,f}return u.prototype.mergeDefaultAndTheme=function(f,d){var p=Dc(this),v=p?Mc(f):{},g=d.getTheme();st(f,g.get(a+"Axis")),st(f,this.getDefaultOption()),f.type=KI(f),p&&Da(f,v,p)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=qx.createByAxisModel(this))},u.prototype.getCategories=function(f){var d=this.option;if(d.type==="category")return f?d.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(f){var d=hp();return d?d.updateModelAxisBreak(this,f):{breaks:[]}},u.type=t+"Axis."+a,u.defaultOption=o,u})(r);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",KI)}function KI(e){return e.type||(e.data?"category":"value")}var NK=(function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return De(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Zt(this.getAxes(),function(r){return r.scale.type===t})},e.prototype.addAxis=function(t){var r=t.dim;this._axes[r]=t,this._dimList.push(r)},e})(),Vp=["x","y"];function ZI(e){return(e.type==="interval"||e.type==="time")&&!Hh(e)}var RK=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=Xi,r.dimensions=Vp,r}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!ZI(r)||!ZI(n))){var i=Jh(r,null),a=Jh(n,null),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,d=(s[1]-o[1])/u,p=o[0]-i[0]*f,v=o[1]-a[0]*d,g=this._transform=[f,0,0,d,p,v];this._invTransform=Uu([],g)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},t.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},t.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new je(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return vn(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},t.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(r,n,i){if(i=i||[],this._invTransform)return vn(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},t.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},t.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new je(a,o,s,l)},t})(NK);function OK(e,t){var r=e.scale,n=e.model,i=zM(r,n,n.ecModel,e),a=kl(r),o=kl(t)?t.intervalStub:t,s=a?r.intervalStub:r,l=r.base,u=o.getTicks(),f=o.getTicks({expandToNicedExtent:!0}),d=u.length-1,p,v,g;if(d===1)p=v=0,g=1;else if(d===2){var y=Ft(u[0].value-u[1].value),x=Ft(u[1].value-u[2].value);p=v=0,y===x?g=2:(g=1,y<x?p=y/x:v=x/y)}else{var b=o.getConfig().interval;p=(1-(u[0].value-f[0].value)/b)%1,v=(1-(f[d].value-u[d].value)/b)%1,g=d-(p?1:0)-(v?1:0)}var _=i.zoomFixMM,S=_[0]||_[1],T=[i.fixMM[0]||S,i.fixMM[1]||S],E=r.getExtent(),D=s.getExtent(),L=ND(D,T),R,O,M,P,j,B;function $(W){for(var F=50,ee=0;ee<F&&!W();ee++)M=a?M*nt(l,2):AG(M),P=as(M)}function K(){R=et(B-M*p,P)}function Z(){O=et(j+M*v,P)}function re(){B=p?et(R+M*p,P):R}function Y(){j=v?et(O-M*v,P):O}if(T[0]&&T[1]){R=L[0],O=L[1],M=(O-R)/(g+p+v);var G=e.getExtent(),I=Ft(G[1]-G[0]);P=H9([O,R],I,.5/g),re(),Y(),wn(P)&&(M=et(M,P))}else{var z=L[1]-L[0];M=a?nt(BT(z),1):h0(z/g,jT),P=as(M),T[0]?(R=L[0],$(function(){if(re(),j=et(B+M*g,P),Z(),O>=L[1])return!0})):T[1]?(O=L[1],$(function(){if(Y(),B=et(j-M*g,P),K(),R<=L[0])return!0})):$(function(){B=et(tc(L[0]/M)*M,P),j=et(jo(L[1]/M)*M,P);var W=Hi((j-B)/M);if(W<=g){var F=g-W,ee=void 0,ae=i.incl0||a;if(ae&&L[0]===0)ee=[0,F];else if(ae&&L[1]===0)ee=[F,0];else{var ie=jo(F/2);ee=F%2===0?[ie,ie]:R+O<L[0]+L[1]?[ie,ie+1]:[ie+1,ie]}if(B=et(B-M*ee[0],P),j=et(j+M*ee[1],P),K(),Z(),R<=L[0]&&O>=L[1])return!0}})}YD(r,T,D,[R,O],E,{interval:M,intervalCount:g,intervalPrecision:P,niceExtent:[B,j]})}function QI(e,t){var r=kl(e),n=r?e.intervalStub:e,i=t.fixMinMax||[],a=r?e.getExtent():null,o=n.getExtent(),s=ND(o,i,t.rawExtentResult);n.setExtent(s[0],s[1]),s=n.getExtent();var l=r?FK(n,t):zK(n,t),u=l.intervalPrecision,f=l.interval,d=t.userInterval;d!=null&&(l.interval=d,l.intervalPrecision=as(d)),i[0]||(s[0]=et(jo(s[0]/f)*f,u)),i[1]||(s[1]=et(tc(s[1]/f)*f,u)),d!=null&&(l.niceExtent=s.slice()),YD(e,i,o,s,a,l)}function zK(e,t){var r=Jx(t.splitNumber,5),n=ep(e),i=t.minInterval,a=t.maxInterval,o=h0(n/r,!0);i!=null&&o<i&&(o=i),a!=null&&o>a&&(o=a);var s=as(o),l=e.getExtent(),u=[et(tc(l[0]/o)*o,s),et(jo(l[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:u}}function FK(e,t){var r=Jx(t.splitNumber,10),n=e.getExtent(),i=ep(e),a=nt(BT(i),1),o=r/i*a;o<=.5&&(a*=10);var s=as(a),l=[et(tc(n[0]/a)*a,s),et(jo(n[1]/a)*a,s)];return{intervalPrecision:s,interval:a,niceExtent:l}}function JI(e){var t=e.scale,r=e.model,n=r.axis,i=r.ecModel;BK(t,r,n,i)}function BK(e,t,r,n,i){var a=zM(e,t,n,r),o=tp(e)||Zx(e);jK(e,{splitNumber:t.get("splitNumber"),fixMinMax:a.fixMM,userInterval:t.get("interval"),minInterval:o?t.get("minInterval"):null,maxInterval:o?t.get("maxInterval"):null,rawExtentResult:a}),r&&n&&wY(r,e,a,n)}function jK(e,t){HK[e.type](e,t)}var HK={interval:QI,log:QI,time:zG,ordinal:lr},eP=[[3,1],[0,2]],VK=(function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Vp,this._initCartesian(t,r,n),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,r){var n=this._axesMap;U(this._axesList,function(o){gY(o,dY);var s=o.scale;qn(s)&&s.setSortInfo(o.model.get("categorySortInfo"))});function i(o){for(var s=kt(o),l=[],u=s.length-1;u>=0;u--){var f=o[+s[u]];f.__alignTo?l.push(f):JI(f)}U(l,function(d){$K(d,d.__alignTo)?JI(d):OK(d,d.__alignTo.scale)})}i(n.x),i(n.y);var a={};U(n.x,function(o){tP(n,"y",o,a)}),U(n.y,function(o){tP(n,"x",o,a)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var i=Px(t,r),a=this._rect=ts(t.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(iP(o,a),!n){var u=WK(a,s,o,l,r),f=void 0;if(l)f=oP(a.clone(),"axisLabel",null,a,o,u,i);else{var d=YK(t,a,i),p=d.outerBoundsRect,v=d.parsedOuterBoundsContain,g=d.outerBoundsClamp;p&&(f=oP(p,v,g,a,o,u,i))}sP(a,o,Kn.determine,null,f,i),U(this._coordsList,function(y){y.calcAffineTransform()})}},e.prototype.getAxis=function(t,r){var n=this._axesMap[t];if(n!=null)return n[r||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,r){if(t!=null&&r!=null){var n="x"+t+"y"+r;return this._coordsMap[n]}Ie(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===t||a[i].getAxis("y").index===r)return a[i]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(t,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(t,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(t){var r=t.seriesModel,n=t.xAxisModel||r&&r.getReferringComponents("xAxis",_n).models[0],i=t.yAxisModel||r&&r.getReferringComponents("yAxis",_n).models[0],a=t.gridModel,o=this._coordsList,s,l;if(r)s=r.coordinateSystem,Je(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},e.prototype.containPoint=function(t){var r=this._coordsList[0];if(r)return r.containPoint(t)},e.prototype._initCartesian=function(t,r,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(r.eachComponent("xAxis",u("x"),this),r.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,U(s.x,function(f,d){U(s.y,function(p,v){var g="x"+d+"y"+v,y=new RK(g);y.master=i,y.model=t,i._coordsMap[g]=y,i._coordsList.push(y),y.addAxis(f),y.addAxis(p)})}),nP(s.x),nP(s.y);function u(f){return function(d,p){if(UK(d,t)){var v=d.get("position");f==="x"?v!=="top"&&v!=="bottom"&&(v=o.bottom?"top":"bottom"):v!=="left"&&v!=="right"&&(v=o.left?"right":"left"),o[v]=!0;var g=BG(d),y=new FW(f,jG(d,g),[0,0],g,v);y.onBand=XD(y.scale,d),y.inverse=d.get("inverse"),d.axis=y,y.model=d,y.grid=a,y.index=p,a._axesList.push(y),s[f][p]=y,l[f]++}}}},e.prototype.getTooltipAxes=function(t){var r=[],n=[];return U(this.getCartesians(),function(i){var a=t!=null&&t!=="auto"?i.getAxis(t):i.getBaseAxis(),o=i.getOtherAxis(a);Je(r,a)<0&&r.push(a),Je(n,o)<0&&n.push(o)}),{baseAxes:r,otherAxes:n}},e.create=function(t,r){var n=[];return t.eachComponent("grid",function(i,a){var o=new e(i,t,r);o.name="grid_"+a,o.resize(i,r,!0),i.coordinateSystem=o,n.push(o),U(o._axesList,function(s){vY(s,e.dimIdxMap)})}),t.eachSeries(function(i){var a,o;D7({targetModel:i,coordSysType:Xi,coordSysProvider:s});function s(){var l=lY(i),u=l.xAxisModel,f=l.yAxisModel;a=u.axis,o=f.axis;var d=u.getCoordSysModel(),p=d.coordinateSystem;return p.getCartesian(u.componentIndex,f.componentIndex)}a&&o&&(pM(a,i,Xi),pM(o,i,Xi))},this),n},e.dimensions=Vp,e.dimIdxMap=ux(Vp),e})();function UK(e,t){return e.getCoordSysModel()===t}function tP(e,t,r,n){r.getAxesOnZeroOf=function(){return a?[a]:[]};var i=e[t],a,o=r.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)rP(s,i[l])&&(a=i[l]);else for(var u in i)if(_r(i,u)&&rP(s,i[u])&&!n[f(i[u])]){a=i[u];break}a&&(n[f(a)]=!0);function f(d){return d.dim+"_"+d.index}}function rP(e,t){if(!t)return!1;var r=t.scale,n=HG(r,0),i=t&&t.type!=="category"&&t.type!=="time"&&n!==t1;return i&&e==="auto"&&GG(t)&&(i=!1),i}function nP(e){for(var t=kt(e),r,n=[],i=t.length-1;i>=0;i--){var a=e[+t[i]];PD(a.scale)&&WD(a.model,a.type)==null&&(a.model.get("alignTicks")&&a.model.get("interval")==null?n.push(a):r=a)}r||(r=n.pop()),r&&U(n,function(o){o.__alignTo=r})}function $K(e,t){return Hh(e.scale)||Hh(t.scale)||t.scale.getTicks().length<2}function GK(e,t){var r=e.getExtent(),n=r[0]+r[1];e.toGlobalCoord=e.dim==="x"?function(i){return i+t}:function(i){return n-i+t},e.toLocalCoord=e.dim==="x"?function(i){return i-t}:function(i){return n-i+t}}function iP(e,t){U(e.x,function(r){return aP(r,t.x,t.width)}),U(e.y,function(r){return aP(r,t.y,t.height)})}function aP(e,t,r){var n=[0,r],i=e.inverse?1:0;e.setExtent(n[i],n[1-i]),GK(e,t)}function oP(e,t,r,n,i,a,o){sP(n,i,Kn.estimate,t,!1,o);var s=[0,0,0,0];u(0),u(1),f(n,0,NaN),f(n,1,NaN);var l=G8(s,function(p){return p>0})==null;return Ch(n,s,!0,!0,r),iP(i,n),l;function u(p){U(i[Ta[p]],function(v){if(Nc(v.model)){var g=a.ensureRecord(v.model),y=g.labelInfoList;if(y)for(var x=0;x<y.length;x++){var b=y[x],_=v.scale.normalize(Rc(v.scale,os(b.label).labelInfo.tick));_=p===1?1-_:_,f(b.rect,p,_),f(b.rect,1-p,NaN)}var S=g.nameLayout;if(S){var _=Cl(g.nameLocation)?.5:NaN;f(S.rect,p,_),f(S.rect,1-p,NaN)}}})}function f(p,v,g){var y=e[Ta[v]]-p[Ta[v]],x=p[dl[v]]+p[Ta[v]]-(e[dl[v]]+e[Ta[v]]);y=d(y,1-g),x=d(x,g);var b=eP[v][0],_=eP[v][1];s[b]=nt(s[b],y),s[_]=nt(s[_],x)}function d(p,v){return p>0&&!zu(v)&&v>1e-4&&(p/=v),p}}function WK(e,t,r,n,i){var a=new SM(XK);return U(r,function(o){return U(o,function(s){if(Nc(s.model)){var l=!n;s.axisBuilder=uY(e,t,s.model,i,a,l)}})}),a}function sP(e,t,r,n,i,a){var o=r===Kn.determine;U(t,function(u){return U(u,function(f){Nc(f.model)&&(cY(f.axisBuilder,e,f.model),f.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[Ta[1-u]]=e[dl[u]]<=a.refContainer[dl[u]]*.5?0:1-u===1?2:1}U(t,function(u,f){return U(u,function(d){Nc(d.model)&&((n==="all"||o)&&d.axisBuilder.build({axisName:!0},{nameMarginLevel:s[f]}),o&&d.axisBuilder.build({axisLine:!0}))})})}function YK(e,t,r){var n,i=e.get("outerBoundsMode",!0);i==="same"?n=t.clone():(i==null||i==="auto")&&(n=ts(e.get("outerBounds",!0)||FM,r.refContainer));var a=e.get("outerBoundsContain",!0),o;a==null||a==="auto"||Je(["all","axisLabel"],a)<0?o="all":o=a;var s=[c0(Ae(e.get("outerBoundsClampWidth",!0),mp[0]),t.width),c0(Ae(e.get("outerBoundsClampHeight",!0),mp[1]),t.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var XK=function(e,t,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";CM(e,t,r,n,i,a),Cl(e.nameLocation)||U(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&AM(s.labelInfoList,s.dirVec,n,i)})};function qK(e,t){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return KK(r,e,t),r.seriesInvolved&&QK(r,e),r}function KK(e,t,r){var n=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];U(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Zc(s.model),u=e.coordSysAxesInfo[l]={};e.coordSysMap[l]=s;var f=s.model,d=f.getModel("tooltip",n);if(U(s.getAxes(),yt(y,!1,null)),s.getTooltipAxes&&n&&d.get("show")){var p=d.get("trigger")==="axis",v=d.get(["axisPointer","type"])==="cross",g=s.getTooltipAxes(d.get(["axisPointer","axis"]));(p||v)&&U(g.baseAxes,yt(y,v?"cross":!0,p)),v&&U(g.otherAxes,yt(y,"cross",!1))}function y(x,b,_){var S=_.model.getModel("axisPointer",i),T=S.get("show");if(!(!T||T==="auto"&&!x&&!cb(S))){b==null&&(b=S.get("triggerTooltip")),S=x?ZK(_,d,i,t,x,b):S;var E=S.get("snap"),D=S.get("triggerEmphasis"),L=Zc(_.model),R=b||E||_.type==="category",O=e.axesInfo[L]={key:L,axis:_,coordSys:s,axisPointerModel:S,triggerTooltip:b,triggerEmphasis:D,involveSeries:R,snap:E,useHandle:cb(S),seriesModels:[],linkGroup:null};u[L]=O,e.seriesInvolved=e.seriesInvolved||R;var M=JK(a,_);if(M!=null){var P=o[M]||(o[M]={axesInfo:{}});P.axesInfo[L]=O,P.mapper=a[M].mapper,O.linkGroup=P}}}})}function ZK(e,t,r,n,i,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};U(s,function(p){l[p]=Ke(o.get(p))}),l.snap=e.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var f=o.get(["label","show"]);if(u.show=f??!0,!a){var d=l.lineStyle=o.get("crossStyle");d&&ct(u,d.textStyle)}}return e.model.getModel("axisPointer",new Et(l,r,n))}function QK(e,t){t.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||!n.model||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||U(e.coordSysAxesInfo[Zc(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function JK(e,t){for(var r=t.model,n=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(lb(a[n+"AxisId"],r.id)||lb(a[n+"AxisIndex"],r.componentIndex)||lb(a[n+"AxisName"],r.name))return i}}function lb(e,t){return e==="all"||pe(e)&&Je(e,t)>=0||e===t}function eZ(e){var t=ub(e);if(t){var r=t.axisPointerModel,n=t.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=cb(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent();(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}function ub(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Zc(e)]}function tZ(e){var t=ub(e);return t&&t.axisPointerModel}function cb(e){return!!e.get(["handle","show"])}function Zc(e){return e.type+"||"+e.id}var lP={},uP=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){this.axisPointerClass&&eZ(r),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,i,!0)},t.prototype.updateAxisPointer=function(r,n,i,a){this._doUpdateAxisPointerClass(r,i,!1)},t.prototype.remove=function(r,n){var i=this._axisPointer;i&&i.remove(n)},t.prototype.dispose=function(r,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(r,n,i){var a=t.getAxisPointerClass(this.axisPointerClass);if(a){var o=tZ(r);o?(this._axisPointer||(this._axisPointer=new a)).render(r,o,n,i):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},t.registerAxisPointerClass=function(r,n){lP[r]=n},t.getAxisPointerClass=function(r){return r&&lP[r]},t.type="axis",t})(Jn),fb=it();function rZ(e,t,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:a,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var f=s.length,d=fb(e).splitAreaColors,p=Fe(),v=0;if(d)for(var g=0;g<u.length;g++){var y=d.get(u[g].tickValue);if(y!=null){v=(y+(f-1)*g)%f;break}}var x=i.toGlobalCoord(u[0].coord),b=o.getAreaStyle();s=pe(s)?s:[s];for(var g=1;g<u.length;g++){var _=i.toGlobalCoord(u[g].coord),S=void 0,T=void 0,E=void 0,D=void 0;i.isHorizontal()?(S=x,T=l.y,E=_-S,D=l.height,x=S+E):(S=l.x,T=x,E=l.width,D=_-T,x=T+D);var L=u[g-1].tickValue;L!=null&&p.set(L,v),t.add(new Nt({anid:L!=null?"area_"+L:null,shape:{x:S,y:T,width:E,height:D},style:ct({fill:s[v]},b),autoBatch:!0,silent:!0})),v=(v+1)%f}fb(e).splitAreaColors=p}}}function nZ(e){fb(e).splitAreaColors=null}var iZ=["splitArea","splitLine","minorSplitLine","breakArea"],cP=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="CartesianAxisPointer",r}return t.prototype.render=function(r,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Bt,this.group.add(this._axisGroup),!!Nc(r)){this._axisGroup.add(r.axis.axisBuilder.group),U(iZ,function(l){r.get([l,"show"])&&aZ[l](this,this._axisGroup,r,r.getCoordSysModel(),i)},this);var s=a&&a.type==="changeAxisOrder"&&a.isInitSort;s||$A(o,this._axisGroup,r),e.prototype.render.call(this,r,n,i,a)}},t.prototype.remove=function(){nZ(this)},t.type="cartesianAxis",t})(uP),aZ={splitLine:function(e,t,r,n,i){var a=r.axis;if(!a.scale.isBlank()){var o=r.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,f=o.get("showMaxLine")!==!1;l=pe(l)?l:[l];for(var d=n.coordinateSystem.getRect(),p=a.isHorizontal(),v=0,g=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),y=[],x=[],b=s.getLineStyle(),_=0;_<g.length;_++){var S=a.toGlobalCoord(g[_].coord);if(!(_===0&&!u||_===g.length-1&&!f)){var T=g[_].tickValue;p?(y[0]=S,y[1]=d.y,x[0]=S,x[1]=d.y+d.height):(y[0]=d.x,y[1]=S,x[0]=d.x+d.width,x[1]=S);var E=v++%l.length,D=new Gi({anid:T!=null?"line_"+T:null,autoBatch:!0,shape:{x1:y[0],y1:y[1],x2:x[0],y2:x[1]},style:ct({stroke:l[E]},b),silent:!0});vc(D.shape,b.lineWidth),t.add(D)}}}},minorSplitLine:function(e,t,r,n,i){var a=r.axis,o=r.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=n.coordinateSystem.getRect(),u=a.isHorizontal(),f=a.getMinorTicksCoords();if(f.length)for(var d=[],p=[],v=s.getLineStyle(),g=0;g<f.length;g++)for(var y=0;y<f[g].length;y++){var x=a.toGlobalCoord(f[g][y].coord);u?(d[0]=x,d[1]=l.y,p[0]=x,p[1]=l.y+l.height):(d[0]=l.x,d[1]=x,p[0]=l.x+l.width,p[1]=x);var b=new Gi({anid:"minor_line_"+f[g][y].tickValue,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:p[0],y2:p[1]},style:v,silent:!0});vc(b.shape,v.lineWidth),t.add(b)}},splitArea:function(e,t,r,n,i){rZ(e,t,r,n)},breakArea:function(e,t,r,n,i){var a=hp(),o=r.axis.scale;a&&o.type!=="ordinal"&&a.rectCoordBuildBreakAxis(t,e,r,n.coordinateSystem.getRect(),i)}},fP=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="xAxis",t})(cP),oZ=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=fP.type,r}return t.type="yAxis",t})(cP),sZ=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="grid",r}return t.prototype.render=function(r,n){this.group.removeAll(),r.get("show")&&this.group.add(new Nt({shape:r.coordinateSystem.getRect(),style:ct({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t})(Jn),dP={offset:0};function lZ(e){e.registerComponentView(sZ),e.registerComponentModel(EY),e.registerCoordinateSystem("cartesian2d",VK),qI(e,"x",ob,dP),qI(e,"y",ob,dP),e.registerComponentView(fP),e.registerComponentView(oZ),e.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}var hP=Gi.prototype,db=mh.prototype,pP=(function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e})();(function(e){ve(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(pP);function hb(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var uZ=(function(e){ve(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-line",n}return t.prototype.getDefaultStyle=function(){return{stroke:Ne.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new pP},t.prototype.buildPath=function(r,n){hb(n)?hP.buildPath.call(this,r,n):db.buildPath.call(this,r,n)},t.prototype.pointAt=function(r){return hb(this.shape)?hP.pointAt.call(this,r):db.pointAt.call(this,r)},t.prototype.tangentAt=function(r){var n=this.shape,i=hb(n)?[n.x2-n.x1,n.y2-n.y1]:db.tangentAt.call(this,r);return my(i,i)},t})(ut),pb=["fromSymbol","toSymbol"];function vP(e){return"_"+e+"Type"}function gP(e,t,r){var n=t.getItemVisual(r,e);if(!n||n==="none")return n;var i=t.getItemVisual(r,e+"Size"),a=t.getItemVisual(r,e+"Rotate"),o=t.getItemVisual(r,e+"Offset"),s=t.getItemVisual(r,e+"KeepAspect"),l=Vx(i),u=Kh(o||0,l);return n+l+u+(a||"")+(s||"")}function mP(e,t,r){var n=t.getItemVisual(r,e);if(!(!n||n==="none")){var i=t.getItemVisual(r,e+"Size"),a=t.getItemVisual(r,e+"Rotate"),o=t.getItemVisual(r,e+"Offset"),s=t.getItemVisual(r,e+"KeepAspect"),l=Vx(i),u=Kh(o||0,l),f=is(n,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return f.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,f.name=e,f}}function cZ(e){var t=new uZ({name:"line",subPixelOptimize:!0});return vb(t.shape,e),t}function vb(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var r=t[2];r?(e.cpx1=r[0],e.cpy1=r[1]):(e.cpx1=NaN,e.cpy1=NaN)}var fZ=(function(e){ve(t,e);function t(r,n,i){var a=e.call(this)||this;return a._createLine(r,n,i),a}return t.prototype._createLine=function(r,n,i){var a=r.hostModel,o=r.getItemLayout(n),s=r.getItemVisual(n,"z2"),l=cZ(o);l.shape.percent=0,en(l,{z2:Ae(s,0),shape:{percent:1}},a,n),this.add(l),U(pb,function(u){var f=mP(u,r,n);this.add(f),this[vP(u)]=gP(u,r,n)},this),this._updateCommonStl(r,n,i)},t.prototype.updateData=function(r,n,i){var a=r.hostModel,o=this.childOfName("line"),s=r.getItemLayout(n),l={shape:{}};vb(l.shape,s),dr(o,l,a,n),U(pb,function(u){var f=gP(u,r,n),d=vP(u);if(this[d]!==f){this.remove(this.childOfName(u));var p=mP(u,r,n);this.add(p)}this[d]=f},this),this._updateCommonStl(r,n,i)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(r,n,i){var a=r.hostModel,o=this.childOfName("line"),s=i&&i.emphasisLineStyle,l=i&&i.blurLineStyle,u=i&&i.selectLineStyle,f=i&&i.labelStatesModels,d=i&&i.emphasisDisabled,p=i&&i.focus,v=i&&i.blurScope;if(!i||r.hasItemOption){var g=r.getItemModel(n),y=g.getModel("emphasis");s=y.getModel("lineStyle").getLineStyle(),l=g.getModel(["blur","lineStyle"]).getLineStyle(),u=g.getModel(["select","lineStyle"]).getLineStyle(),d=y.get("disabled"),p=y.get("focus"),v=y.get("blurScope"),f=Xo(g)}var x=r.getItemVisual(n,"style"),b=x.stroke;o.useStyle(x),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,U(pb,function(D){var L=this.childOfName(D);if(L){L.setColor(b),L.style.opacity=x.opacity;for(var R=0;R<Fr.length;R++){var O=Fr[R],M=o.getState(O);if(M){var P=M.style||{},j=L.ensureState(O),B=j.style||(j.style={});P.stroke!=null&&(B[L.__isEmptyBrush?"stroke":"fill"]=P.stroke),P.opacity!=null&&(B.opacity=P.opacity)}}L.markRedraw()}},this);var _=a.getRawValue(n);hl(this,f,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(D,L){return a.getFormattedLabel(D,L,r.dataType)}},inheritColor:b||Ne.color.neutral99,defaultOpacity:x.opacity,defaultText:(_==null?r.getName(n):isFinite(_)?et(_,10):_)+""});var S=this.getTextContent();if(S){var T=f.normal;S.__align=S.style.align,S.__verticalAlign=S.style.verticalAlign,S.__position=T.get("position")||"middle";var E=T.get("distance");pe(E)||(E=[E,E]),S.__labelDistance=E}this.setTextConfig({position:null,local:!0,inside:!1}),ul(this,p,v,d)},t.prototype.highlight=function(){sc(this)},t.prototype.downplay=function(){lc(this)},t.prototype.updateLayout=function(r,n){this.childOfName("line").stopAnimation(),this.setLinePoints(r.getItemLayout(n))},t.prototype.setLinePoints=function(r){var n=this.childOfName("line");vb(n.shape,r),n.dirty()},t.prototype.beforeUpdate=function(){var r=this,n=r.childOfName("fromSymbol"),i=r.childOfName("toSymbol"),a=r.getTextContent();if(!n&&!i&&(!a||a.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=r.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,f=l.pointAt(0),d=l.pointAt(u),p=DC([],d,f);my(p,p);function v(M,P){var j=M.__specifiedRotation;if(j==null){var B=l.tangentAt(P);M.attr("rotation",(P===1?-1:1)*Math.PI/2-Math.atan2(B[1],B[0]))}else M.attr("rotation",j)}if(n&&(n.setPosition(f),v(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),i&&(i.setPosition(d),v(i,1),i.scaleX=i.scaleY=o*u,i.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var g=void 0,y=void 0,x=a.__labelDistance,b=x[0]*o,_=x[1]*o,S=u/2,T=l.tangentAt(S),E=[T[1],-T[0]],D=l.pointAt(S);E[1]>0&&(E[0]=-E[0],E[1]=-E[1]);var L=T[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var R=-Math.atan2(T[1],T[0]);d[0]<f[0]&&(R=Math.PI+R),a.rotation=R}var O=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":O=-_,y="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":O=_,y="top";break;default:O=0,y="middle"}switch(a.__position){case"end":a.x=p[0]*b+d[0],a.y=p[1]*_+d[1],g=p[0]>.8?"left":p[0]<-.8?"right":"center",y=p[1]>.8?"top":p[1]<-.8?"bottom":"middle";break;case"start":a.x=-p[0]*b+f[0],a.y=-p[1]*_+f[1],g=p[0]>.8?"right":p[0]<-.8?"left":"center",y=p[1]>.8?"bottom":p[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=b*L+f[0],a.y=f[1]+O,g=T[0]<0?"right":"left",a.originX=-b*L,a.originY=-O;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=D[0],a.y=D[1]+O,g="center",a.originY=-O;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-b*L+d[0],a.y=d[1]+O,g=T[0]>=0?"right":"left",a.originX=b*L,a.originY=-O;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||y,align:a.__align||g})}},t})(Bt),dZ=(function(){function e(t){this.group=new Bt,this._LineCtor=t||fZ}return e.prototype.updateData=function(t){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=t,a||i.removeAll();var o=yP(t);t.diff(a).add(function(s){r._doAdd(t,s,o)}).update(function(s,l){r._doUpdate(a,t,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},e.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(r,n){r.updateLayout(t,n)},this)},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=yP(t),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r,n){this._progressiveEls=[];function i(l){!l.isGroup&&!hZ(l)&&(l.incremental=n,l.ensureState("emphasis").hoverLayer=Sh)}for(var a=t.start;a<t.end;a++){var o=r.getItemLayout(a);if(gb(o)){var s=new this._LineCtor(r,a,this._seriesScope);s.traverse(i),this.group.add(s),r.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(t){gc(this._progressiveEls||this.group,t)},e.prototype._doAdd=function(t,r,n){var i=t.getItemLayout(r);if(gb(i)){var a=new this._LineCtor(t,r,n);t.setItemGraphicEl(r,a),this.group.add(a)}},e.prototype._doUpdate=function(t,r,n,i,a){var o=t.getItemGraphicEl(n);if(!gb(r.getItemLayout(i))){this.group.remove(o);return}o?o.updateData(r,i,a):o=new this._LineCtor(r,i,a),r.setItemGraphicEl(i,o),this.group.add(o)},e})();function hZ(e){return e.animators&&e.animators.length>0}function yP(e){var t=e.hostModel,r=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:Xo(t)}}function xP(e){return isNaN(e[0])||isNaN(e[1])}function gb(e){return e&&!xP(e[0])&&!xP(e[1])}var ds=it(),bP=Ke,mb=pt,pZ=(function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(t,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=t,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,r,n);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var d=this._moveAnimation=this.determineAnimation(t,r);if(!s)s=this._group=new Bt,this.createPointerEl(s,u,t,r),this.createLabelEl(s,u,t,r),n.getZr().add(s);else{var p=yt(wP,r,d);this.updatePointerEl(s,u,p),this.updateLabelEl(s,u,p,r)}SP(s,r,!0),this._renderHandle(a)}},e.prototype.remove=function(t){this.clear(t)},e.prototype.dispose=function(t){this.clear(t)},e.prototype.determineAnimation=function(t,r){var n=r.get("animation"),i=t.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&El(i).w>s)return!0;if(o){var l=ub(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},e.prototype.makeElOption=function(t,r,n,i,a){},e.prototype.createPointerEl=function(t,r,n,i){var a=r.pointer;if(a){var o=ds(t).pointerEl=new BU[a.type](bP(r.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,r,n,i){if(r.label){var a=ds(t).labelEl=new Sr(bP(r.label));t.add(a),kP(a,i)}},e.prototype.updatePointerEl=function(t,r,n){var i=ds(t).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},e.prototype.updateLabelEl=function(t,r,n,i){var a=ds(t).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),kP(a,i))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=W0(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){fL(u.event)},onmousedown:mb(this._onHandleDragMove,this,0,0),drift:mb(this._onHandleDragMove,this),ondragend:mb(this._onHandleDragEnd,this)}),n.add(i)),SP(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");pe(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,UM(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},e.prototype._moveHandleToValue=function(t,r){wP(this._axisPointerModel,!r&&this._moveAnimation,this._handle,yb(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(yb(n),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(yb(i)),ds(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var r=t.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),g1(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(t,r,n){return n=n||0,{x:t[n],y:t[1-n],width:r[n],height:r[1-n]}},e})();function wP(e,t,r,n){_P(ds(r).lastProp,n)||(ds(r).lastProp=n,t?dr(r,n,e):(r.stopAnimation(),r.attr(n)))}function _P(e,t){if(Ie(e)&&Ie(t)){var r=!0;return U(t,function(n,i){r=r&&_P(e[i],n)}),!!r}else return e===t}function kP(e,t){e[t.get(["label","show"])?"show":"hide"]()}function yb(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function SP(e,t,r){var n=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function vZ(e){var t=e.get("type"),r=e.getModel(t+"Style"),n;return t==="line"?(n=r.getLineStyle(),n.fill=null):t==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function gZ(e,t,r,n,i){var a=r.get("value"),o=CP(a,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=Gh(s.get("padding")||0),u=s.getFont(),f=zC(o,u),d=i.position,p=f.width+l[1]+l[3],v=f.height+l[0]+l[2],g=i.align;g==="right"&&(d[0]-=p),g==="center"&&(d[0]-=p/2);var y=i.verticalAlign;y==="bottom"&&(d[1]-=v),y==="middle"&&(d[1]-=v/2),mZ(d,p,v,n);var x=s.get("backgroundColor");(!x||x==="auto")&&(x=t.get(["axisLine","lineStyle","color"])),e.label={x:d[0],y:d[1],style:pl(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:x}),z2:10}}function mZ(e,t,r,n){var i=n.getWidth(),a=n.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+r,a)-r,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function CP(e,t,r,n,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:sp(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};U(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,d=u&&u.getDataParams(f);d&&s.seriesData.push(d)}),Me(o)?a=o.replace("{value}",a):$e(o)&&(a=o(s))}return a}function TP(e,t,r){var n=fi();return py(n,n,r.rotation),hy(n,n,r.position),G0([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function yZ(e,t,r,n,i,a){var o=Ra.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),gZ(t,n,i,a,{position:TP(n.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function xZ(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function bZ(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}function wZ(e,t,r){return El(e,{fromStat:{sers:De(t,function(n){return r.getSeriesByIndex(n.seriesIndex)})},min:1}).w}function _Z(e,t,r){return[nt(ur(t[0],t[1]),e-r/2),ur(e+r/2,nt(t[0],t[1]))]}var kZ=(function(e){ve(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),f=s.getGlobalExtent(),d=AP(l,s).getOtherAxis(s).getGlobalExtent(),p=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var v=vZ(a),g=SZ[u](s,p,f,d,a.get("seriesDataIndices"),a.ecModel);g.style=v,r.graphicKey=g.type,r.pointer=g}var y=vp(l.getRect(),i);yZ(n,r,y,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=vp(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=TP(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=AP(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,d=[r.x,r.y];d[f]+=n[f],d[f]=ur(l[1],d[f]),d[f]=nt(l[0],d[f]);var p=(u[1]+u[0])/2,v=[p,p];v[f]=d[f];var g=[{verticalAlign:"middle"},{align:"center"}];return{x:d[0],y:d[1],rotation:r.rotation,cursorPoint:v,tooltipOption:g[f]}},t})(pZ);function AP(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var SZ={line:function(e,t,r,n){var i=xZ([t,n[0]],[t,n[1]],EP(e));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(e,t,r,n,i,a){var o=wZ(e,i,a),s=n[1]-n[0],l=_Z(t,r,o),u=l[0],f=l[1];return{type:"Rect",shape:bZ([u,n[0]],[f-u,s],EP(e))}}};function EP(e){return e.dim==="x"?0:1}var CZ=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Ne.color.border,width:1,type:"dashed"},shadowStyle:{color:Ne.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:Ne.color.neutral00,padding:[5,7,5,7],backgroundColor:Ne.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:Ne.color.accent40,throttle:40}},t})(dt),Zi=it(),TZ=U;function DP(e,t,r){if(!We.node){var n=t.getZr();Zi(n).records||(Zi(n).records={}),AZ(n,t);var i=Zi(n).records[e]||(Zi(n).records[e]={});i.handler=r}}function AZ(e,t){if(Zi(e).initialized)return;Zi(e).initialized=!0,r("click",yt(xb,"click")),r("mousemove",yt(xb,"mousemove")),r("mousewheel",yt(xb,"mousewheel")),r("globalout",DZ);function r(n,i){e.on(n,function(a){var o=MZ(t);TZ(Zi(e).records,function(s){s&&i(s,a,o.dispatchAction)}),EZ(o.pendings,t)})}}function EZ(e,t){var r=e.showTip.length,n=e.hideTip.length,i;r?i=e.showTip[r-1]:n&&(i=e.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function DZ(e,t,r){e.handler("leave",null,r)}function xb(e,t,r,n){t.handler(e,r,n)}function MZ(e){var t={showTip:[],hideTip:[]},r=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=r,e.dispatchAction(n))};return{dispatchAction:r,pendings:t}}function bb(e,t){if(!We.node){var r=t.getZr(),n=(Zi(r).records||{})[e];n&&(Zi(r).records[e]=null)}}var LZ=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click|mousewheel";DP("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(r,n){bb("axisPointer",n)},t.prototype.dispose=function(r,n){bb("axisPointer",n)},t.type="axisPointer",t})(Jn);function MP(e,t){var r=[],n=e.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Vo(a,e);if(o==null||o<0||pe(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),d=f.dim,p=u.dim,v=d==="x"||d==="radius"?1:0,g=a.mapDimension(p),y=[];y[v]=a.get(g,o),y[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(y)||[]}else r=l.dataToPoint(a.getValues(De(l.dimensions,function(b){return a.mapDimension(b)}),o))||[];else if(s){var x=s.getBoundingRect().clone();x.applyTransform(s.transform),r=[x.x+x.width/2,x.y+x.height/2]}return{point:r,el:s}}var LP=it();function IZ(e,t,r){var n=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||pt(r.dispatchAction,r),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Up(i)&&(i=MP({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=Up(i),u=a.axesInfo,f=s.axesInfo,d=n==="leave"||Up(i),p={},v={},g={list:[],map:{}},y={showPointer:yt(NZ,v),showTooltip:yt(RZ,g)};U(s.coordSysMap,function(b,_){var S=l||b.containPoint(i);U(s.coordSysAxesInfo[_],function(T,E){var D=T.axis,L=BZ(u,T);if(!d&&S&&(!u||L)){var R=L&&L.value;R==null&&!l&&(R=D.pointToData(i)),R!=null&&IP(T,R,y,!1,p)}})});var x={};return U(f,function(b,_){var S=b.linkGroup;S&&!v[_]&&U(S.axesInfo,function(T,E){var D=v[E];if(T!==b&&D){var L=D.value;S.mapper&&(L=b.axis.scale.parse(S.mapper(L,PP(T),PP(b)))),x[b.key]=L}})}),U(x,function(b,_){IP(f[_],b,y,!0,p)}),OZ(v,f,p),zZ(g,i,e,o),FZ(f,o,r),p}}function IP(e,t,r,n,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){r.showPointer(e,t);return}var o=PZ(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&ce(i,s[0]),!n&&e.snap&&a.containData(l)&&l!=null&&(t=l),r.showPointer(e,t,s),r.showTooltip(e,o,l)}}function PZ(e,t){var r=t.axis,n=r.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return U(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(n),d,p;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(f,e,r);p=v.dataIndices,d=v.nestestValue}else{if(p=l.indicesOfNearest(n,f[0],e,r.type==="category"?.5:null),!p.length)return;d=l.getData().get(f[0],p[0])}if(wn(d)){var g=e-d,y=Math.abs(g);y<=o&&((y<o||g>=0&&s<0)&&(o=y,s=g,i=d,a.length=0),U(p,function(x){a.push({seriesIndex:l.seriesIndex,dataIndexInside:x,dataIndex:l.getData().getRawIndex(x)})}))}}),{payloadBatch:a,snapToValue:i}}function NZ(e,t,r,n){e[t.key]={value:r,payloadBatch:n}}function RZ(e,t,r,n){var i=r.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=Zc(l),f=e.map[u];f||(f=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(f)),f.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function OZ(e,t,r){var n=r.axesInfo=[];U(t,function(i,a){var o=i.axisPointerModel.option,s=e[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function zZ(e,t,r,n){if(Up(t)||!e.list.length){n({type:"hideTip"});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function FZ(e,t,r){var n=r.getZr(),i="axisPointerLastHighlights",a=LP(n)[i]||{},o=LP(n)[i]={};U(e,function(f,d){var p=f.axisPointerModel.option;p.status==="show"&&f.triggerEmphasis&&U(p.seriesDataIndices,function(v){o[v.seriesIndex+"|"+v.dataIndex]=v})});var s=[],l=[];function u(f){return{seriesIndex:f.seriesIndex,dataIndex:f.dataIndex}}U(a,function(f,d){!o[d]&&l.push(u(f))}),U(o,function(f,d){!a[d]&&s.push(u(f))}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function BZ(e,t){for(var r=0;r<(e||[]).length;r++){var n=e[r];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function PP(e){var t=e.axis.model,r={},n=r.axisDim=e.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=t.componentIndex,r.axisName=r[n+"AxisName"]=t.name,r.axisId=r[n+"AxisId"]=t.id,r}function Up(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function NP(e){uP.registerAxisPointerClass("CartesianAxisPointer",kZ),e.registerComponentModel(CZ),e.registerComponentView(LZ),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var r=t.axisPointer.link;r&&!pe(r)&&(t.axisPointer.link=[r])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=qK(t,r)}}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},IZ)}function jZ(e){Ba(lZ),Ba(NP)}function HZ(e,t){var r=Gh(t.get("padding")),n=t.getItemStyle(["color","opacity"]);n.fill=t.get("backgroundColor");var i=new Nt({shape:{x:e.x-r[3],y:e.y-r[0],width:e.width+r[1]+r[3],height:e.height+r[0]+r[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var VZ=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click|mousewheel",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Ne.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Ne.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:Ne.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:Ne.color.tertiary,fontSize:14}},t})(dt);function RP(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function OP(e){if(We.domSupported){for(var t=document.documentElement.style,r=0,n=e.length;r<n;r++)if(e[r]in t)return e[r]}}var zP=OP(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),UZ=OP(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function FP(e,t){if(!e)return t;t=QE(t,!0);var r=e.indexOf(t);return e=r===-1?t:"-"+e.slice(0,r)+"-"+t,e.toLowerCase()}function $Z(e,t){var r=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return r?r[t]:null}var GZ=FP(UZ,"transition"),wb=FP(zP,"transform"),WZ="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(We.transform3dSupported?"will-change:transform;":"");function YZ(e){return e=e==="left"?"right":e==="right"?"left":e==="top"?"bottom":"top",e}function XZ(e,t,r){if(!Me(r)||r==="inside")return"";var n=e.get("backgroundColor"),i=e.get("borderWidth");t=es(t);var a=YZ(r),o=Math.max(Math.round(i)*1.5,6),s="",l=wb+":",u;Je(["left","right"],a)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var f=u*Math.PI/180,d=o+i,p=d*Math.abs(Math.cos(f))+d*Math.abs(Math.sin(f)),v=Math.round(((p-Math.SQRT2*i)/2+Math.SQRT2*i-(p-d)/2)*100)/100;s+=";"+a+":-"+v+"px";var g=t+" solid "+i+"px;",y=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+g,"border-right:"+g,"background-color:"+n+";"];return'<div style="'+y.join("")+'"></div>'}function qZ(e,t,r){var n="cubic-bezier(0.23,1,0.32,1)",i="",a="";return r&&(i=" "+e/2+"s "+n,a="opacity"+i+",visibility"+i),t||(i=" "+e+"s "+n,a+=(a.length?",":"")+(We.transformSupported?""+wb+i:",left"+i+",top"+i)),GZ+":"+a}function BP(e,t,r){var n=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!We.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=We.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+wb+":"+o+";":[["top",0],["left",0],[zP,o]]}function KZ(e){var t=[],r=e.get("fontSize"),n=e.getTextColor();n&&t.push("color:"+n),t.push("font:"+e.getFont());var i=Ae(e.get("lineHeight"),Math.round(r*3/2));r&&t.push("line-height:"+i+"px");var a=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,s=e.get("textShadowOffsetX")||0,l=e.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),U(["decoration","align"],function(u){var f=e.get(u);f&&t.push("text-"+u+":"+f)}),t.join(";")}function ZZ(e,t,r,n){var i=[],a=e.get("transitionDuration"),o=e.get("backgroundColor"),s=e.get("shadowBlur"),l=e.get("shadowColor"),u=e.get("shadowOffsetX"),f=e.get("shadowOffsetY"),d=e.getModel("textStyle"),p=hD(e,"html"),v=u+"px "+f+"px "+s+"px "+l;return i.push("box-shadow:"+v),t&&a>0&&i.push(qZ(a,r,n)),o&&i.push("background-color:"+o),U(["width","color","radius"],function(g){var y="border-"+g,x=QE(y),b=e.get(x);b!=null&&i.push(y+":"+b+(g==="color"?"":"px"))}),i.push(KZ(d)),p!=null&&i.push("padding:"+Gh(p).join("px ")+"px"),i.join(";")+";"}function jP(e,t,r,n,i){var a=t&&t.painter;if(r){var o=a&&a.getViewportRoot();o&&U7(e,o,r,n,i)}else{e[0]=n,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var QZ=(function(){function e(t,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,We.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=t.getZr(),a=r.appendTo,o=a&&(Me(a)?document.querySelector(a):Ou(a)?a:$e(a)&&a(t.getDom()));jP(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,f=i.painter.getViewportRoot();Dn(f,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(t){if(!this._container){var r=this._api.getDom(),n=$Z(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},e.prototype.show=function(t,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=WZ+ZZ(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+BP(a[0],a[1],!0)+("border-color:"+es(r)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,r,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(Me(a)&&n.get("trigger")==="item"&&!RP(n)&&(s=XZ(n,i,a)),Me(t))o.innerHTML=t+s;else if(t){o.innerHTML="",pe(t)||(t=[t]);for(var l=0;l<t.length;l++)Ou(t[l])&&t[l].parentNode!==o&&o.appendChild(t[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},e.prototype.setEnterable=function(t){this._enterable=t},e.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},e.prototype.moveTo=function(t,r){if(this.el){var n=this._styleCoord;if(jP(n,this._zr,this._container,t,r),n[0]!=null&&n[1]!=null){var i=this.el.style,a=BP(n[0],n[1]);U(a,function(o){i[o[0]]=o[1]})}}},e.prototype._moveIfResized=function(){var t=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),r*this._zr.getHeight())},e.prototype.hide=function(){var t=this,r=this.el.style;this._enableDisplayTransition?(r.visibility="hidden",r.opacity="0"):r.display="none",We.transform3dSupported&&(r.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},e.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(pt(this.hide,this),t)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this._zr;$7(t&&t.painter&&t.painter.getViewportRoot(),this._container);var r=this.el;if(r){r.onmouseenter=r.onmousemove=r.onmouseleave=null;var n=r.parentNode;n&&n.removeChild(r)}this.el=this._container=null},e})(),JZ=(function(){function e(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),VP(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return e.prototype.update=function(t){var r=t.get("alwaysShowContent");r&&this._moveIfResized(),this._alwaysShowContent=r},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(t,r,n,i,a){var o=this;Ie(t)&&zr(""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new Sr({style:{rich:r.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:hD(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),U(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),U(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},e.prototype.setEnterable=function(t){this._enterable=t},e.prototype.getSize=function(){var t=this.el,r=this.el.getBoundingRect(),n=HP(t.style);return[r.width+n.left+n.right,r.height+n.top+n.bottom]},e.prototype.moveTo=function(t,r){var n=this.el;if(n){var i=this._styleCoord;VP(i,this._zr,t,r),t=i[0],r=i[1];var a=n.style,o=ja(a.borderWidth||0),s=HP(a);n.x=t+o+s.left,n.y=r+o+s.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var t=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),r*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(pt(this.hide,this),t)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e})();function ja(e){return Math.max(0,e)}function HP(e){var t=ja(e.shadowBlur||0),r=ja(e.shadowOffsetX||0),n=ja(e.shadowOffsetY||0);return{left:ja(t-r),right:ja(t+r),top:ja(t-n),bottom:ja(t+n)}}function VP(e,t,r,n){e[0]=r,e[1]=n,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var eQ=new Nt({shape:{x:-1,y:-1,width:2,height:2}}),tQ=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){if(!(We.node||!n.getDom())){var i=r.getComponent("tooltip"),a=this._renderMode=uV(i.get("renderMode"));this._tooltipContent=a==="richText"?new JZ(n):new QZ(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},t.prototype.render=function(r,n,i){if(!(We.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=r,this._ecModel=n,this._api=i;var a=this._tooltipContent;a.update(r),a.setEnterable(r.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&r.get("transitionDuration")?UM(this,"_updatePosition",50,"fixRate"):g1(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var r=this._tooltipModel,n=r.get("triggerOn");DP("itemTooltip",this._api,pt(function(i,a,o){n!=="none"&&(n.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(r.get("trigger")!=="axis"&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||We.node||!i.getDom())){var o=UP(a,i);this._ticket="";var s=a.dataByCoordSys,l=aQ(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=eQ;f.x=a.x,f.y=a.y,f.update(),tt(f).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:f},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var d=MP(a,n),p=d.point[0],v=d.point[1];p!=null&&v!=null&&this._tryShow({offsetX:p,offsetY:v,target:d.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,a.from!==this.uid&&this._hide(UP(a,i))},t.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var f=u.getData(),d=Qc([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(d.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=tt(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null,this._cbParamsList=null;var l,u;qc(i,function(f){if(f.tooltipDisabled)return l=u=null,!0;l||u||(tt(f).dataIndex!=null?l=f:tt(f).tooltipConfig!=null&&(u=f))},!0),l?this._showSeriesItemTooltip(r,l,n):u?this._showComponentItemTooltip(r,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(n)}},t.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=pt(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Qc([n.tooltipOption],a),l=this._renderMode,u=[],f=ns("section",{blocks:[],noHeader:!0}),d=[],p=new Bx;U(r,function(_){U(_.dataByAxis,function(S){var T=i.getComponent(S.axisDim+"Axis",S.axisIndex),E=S.value,D=T.axis,L=D.scale.parse(E);if(!(!T||E==null)){var R=CP(E,D,i,S.seriesDataIndices,S.valueLabelOpt),O=ns("section",{header:R,noHeader:!ui(R),sortBlocks:!0,blocks:[]});f.blocks.push(O),U(S.seriesDataIndices,function(M){var P=i.getSeriesByIndex(M.seriesIndex),j=M.dataIndexInside,B=P.getDataParams(j);if(!(B.dataIndex<0)){B.axisDim=S.axisDim,B.axisIndex=S.axisIndex,B.axisType=S.axisType,B.axisId=S.axisId,B.axisValue=sp(T.axis,{value:L}),B.axisValueLabel=R,B.marker=p.makeTooltipMarker("item",es(B.color),l);var $=rD(P.formatTooltip(j,!0,null)),K=$.frag;if(K){var Z=Qc([P],a).get("valueFormatter");O.blocks.push(Z?ce({valueFormatter:Z},K):K)}$.text&&d.push($.text),u.push(B)}})}})}),f.blocks.reverse(),d.reverse();var v=n.position,g=s.get("order"),y=fD(f,p,l,g,i.get("useUTC"),s.get("textStyle"));y&&d.unshift(y);var x=l==="richText"?`
|
|
40
|
+
|
|
41
|
+
`:"<br/>",b=d.join(x);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,b,u,Math.random()+"",o[0],o[1],v,null,p)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=tt(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,d=o.dataType,p=u.getData(d),v=this._renderMode,g=r.positionDefault,y=Qc([p.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,g?{position:g}:null),x=y.get("trigger");if(!(x!=null&&x!=="item")){var b=u.getDataParams(f,d),_=new Bx;b.marker=_.makeTooltipMarker("item",es(b.color),v);var S=rD(u.formatTooltip(f,!1,d)),T=y.get("order"),E=y.get("valueFormatter"),D=S.frag,L=D?fD(E?ce({valueFormatter:E},D):D,_,v,T,a.get("useUTC"),y.get("textStyle")):S.text,R="item_"+u.name+"_"+f;this._showOrMove(y,function(){this._showTooltipContent(y,L,b,R,r.offsetX,r.offsetY,r.position,r.target,_)}),i({type:"showTip",dataIndexInside:f,dataIndex:p.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=tt(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(Me(l)){var f=l;l={content:f,formatter:f},u=!0}u&&a&&l.content&&(l=Ke(l),l.content=jr(l.content));var d=[l],p=this._ecModel.getComponent(o.componentMainType,o.componentIndex);p&&d.push(p),d.push({formatter:l.content});var v=r.positionDefault,g=Qc(d,this._tooltipModel,v?{position:v}:null),y=g.get("content"),x=Math.random()+"",b=new Bx;this._showOrMove(g,function(){var _=Ke(g.get("formatterParams")||{});this._showTooltipContent(g,y,_,x,r.offsetX,r.offsetY,r.position,n,b)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,f){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var d=this._tooltipContent;d.setEnterable(r.get("enterable"));var p=r.get("formatter");l=l||r.get("position");var v=n,g=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor"),r.get("defaultBorderColor",!0)),y=g.color;if(p)if(Me(p)){var x=r.ecModel.get("useUTC"),b=pe(i)?i[0]:i,_=b&&b.axisType&&b.axisType.indexOf("time")>=0;v=p,_&&(v=$h(b.axisValue,v,x)),v=eD(v,i,!0)}else if($e(p)){var S=pt(function(T,E){T===this._ticket&&(d.setContent(E,f,r,y,l),this._updatePosition(r,l,o,s,d,i,u))},this);this._ticket=a,v=p(i,a,S)}else v=p;d.setContent(v,f,r,y,l),d.show(r,y),this._updatePosition(r,l,o,s,d,i,u)}},t.prototype._getNearestPoint=function(r,n,i,a,o){if(i==="axis"||pe(n))return{color:a||o};if(!pe(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();n=n||r.get("position");var d=o.getSize(),p=r.get("align"),v=r.get("verticalAlign"),g=l&&l.getBoundingRect().clone();if(l&&g.applyTransform(l.transform),$e(n)&&(n=n([i,a],s,o.el,g,{viewSize:[u,f],contentSize:d.slice()})),pe(n))i=xt(n[0],u),a=xt(n[1],f);else if(Ie(n)){var y=n;y.width=d[0],y.height=d[1];var x=ts(y,{width:u,height:f});i=x.x,a=x.y,p=null,v=null}else if(Me(n)&&l){var b=iQ(n,g,d,r.get("borderWidth"));i=b[0],a=b[1]}else{var b=rQ(i,a,o,u,f,p?null:20,v?null:20);i=b[0],a=b[1]}if(p&&(i-=$P(p)?d[0]/2:p==="right"?d[0]:0),v&&(a-=$P(v)?d[1]/2:v==="bottom"?d[1]:0),RP(r)){var b=nQ(i,a,o,u,f);i=b[0],a=b[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&U(i,function(s,l){var u=s.dataByAxis||[],f=r[l]||{},d=f.dataByAxis||[];o=o&&u.length===d.length,o&&U(u,function(p,v){var g=d[v]||{},y=p.seriesDataIndices||[],x=g.seriesDataIndices||[];o=o&&p.value===g.value&&p.axisType===g.axisType&&p.axisId===g.axisId&&y.length===x.length,o&&U(y,function(b,_){var S=x[_];o=o&&b.seriesIndex===S.seriesIndex&&b.dataIndex===S.dataIndex}),a&&U(p.seriesDataIndices,function(b){var _=b.seriesIndex,S=n[_],T=a[_];S&&T&&T.data!==S.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,this._cbParamsList=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){We.node||!n.getDom()||(g1(this,"_updatePosition"),this._tooltipContent.dispose(),bb("itemTooltip",n),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type="tooltip",t})(Jn);function Qc(e,t,r){var n=t.ecModel,i;r?(i=new Et(r,n,n),i=new Et(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof Et&&(o=o.get("tooltip",!0)),Me(o)&&(o={formatter:o}),o&&(i=new Et(o,i,n)))}return i}function UP(e,t){return e.dispatchAction||pt(t.dispatchAction,t)}function rQ(e,t,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(e+l+a+2>n?e-=l+a:e+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[e,t]}function nQ(e,t,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function iQ(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,f=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+f/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+f+o;break;case"left":s=t.x-i-o,l=t.y+f/2-a/2;break;case"right":s=t.x+u+o,l=t.y+f/2-a/2}return[s,l]}function $P(e){return e==="center"||e==="middle"}function aQ(e,t,r){var n=m0(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=oc(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=tt(u).tooltipConfig;if(f&&f.name===e.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function oQ(e){Ba(NP),e.registerComponentModel(VZ),e.registerComponentView(tQ),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},lr),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},lr)}function sQ(e,t){if(!e)return!1;for(var r=pe(e)?e:[e],n=0;n<r.length;n++)if(r[n]&&r[n][t])return!0;return!1}function $p(e){ih(e,"label",["show"])}var Gp=it(),jl=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.createdBySelf=!1,r.preventAutoZ=!0,r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._mergeOption(r,i,!1,!0)},t.prototype.isAnimationEnabled=function(){if(We.node)return!1;var r=this.__hostSeries;return this.getShallow("animation")&&r&&r.isAnimationEnabled()},t.prototype.mergeOption=function(r,n){this._mergeOption(r,n,!1,!1)},t.prototype._mergeOption=function(r,n,i,a){var o=this.mainType;i||n.eachSeries(function(s){var l=s.get(this.mainType,!0),u=Gp(s)[o];if(!l||!l.data){Gp(s)[o]=null;return}u?u._mergeOption(l,n,!0):(a&&$p(l),U(l.data,function(f){f instanceof Array?($p(f[0]),$p(f[1])):$p(f)}),u=this.createMarkerModelFromSeries(l,this,n),ce(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),Gp(s)[o]=u},this)},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return ns("section",{header:this.name,blocks:[ns("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(r){this._data=r},t.prototype.getDataParams=function(r,n){var i=Rx.prototype.getDataParams.call(this,r,n),a=this.__hostSeries;return a&&(i.seriesId=a.id,i.seriesName=a.name,i.seriesType=a.subType),i},t.getMarkerModelFromSeries=function(r,n){return Gp(r)[n]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t})(dt);Un(jl,Rx.prototype);function lQ(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function uQ(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function Wp(e,t,r,n,i,a,o){var s=[],l=Jo(t,i),u=l?t.getCalculationInfo("stackResultDimension"):i,f=Xp(t,u,e),d=t.hostModel,p=d.indicesOfNearest(r,u,f)[0];s[a]=t.get(n,p),s[o]=t.get(u,p);var v=t.get(i,p),g=Vi(t.get(i,p));return g=Math.min(g,20),g>=0&&(s[o]=+s[o].toFixed(g)),[s,v]}var Yp={min:yt(Wp,"min"),max:yt(Wp,"max"),average:yt(Wp,"average"),median:yt(Wp,"median")};function GP(e,t){if(t){var r=e.getData(),n=e.coordinateSystem,i=n&&n.dimensions;if(!uQ(t)&&!pe(t.coord)&&pe(i)){var a=WP(t,r,n,e);if(t=Ke(t),t.type&&Yp[t.type]&&a.baseAxis&&a.valueAxis){var o=Je(i,a.baseAxis.dim),s=Je(i,a.valueAxis.dim),l=Yp[t.type](r,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!pe(i)){t.coord=[];var u=e.getBaseAxis();if(u&&t.type&&Yp[t.type]){var f=n.getOtherAxis(u);f&&(t.value=Xp(r,r.mapDimension(f.dim),t.type))}}else for(var d=t.coord,p=0;p<2;p++)Yp[d[p]]&&(d[p]=Xp(r,r.mapDimension(i[p]),d[p]));return t}}function WP(e,t,r,n){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex!=null?t.getDimension(e.valueIndex):e.valueDim,i.valueAxis=r.getAxis(cQ(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function cQ(e,t){var r=e.getData().getDimensionInfo(t);return r&&r.coordDim}function YP(e,t){return e&&e.containData&&t.coord&&!lQ(t)?e.containData(t.coord):!0}function fQ(e,t){return e?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return ml(o,t[a])}:function(r,n,i,a){return ml(r.value,t[a])}}function Xp(e,t,r){if(r==="average"){var n=0,i=0;return e.each(t,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?e.getMedian(t):e.getDataExtent(t)[r==="max"?1:0]}var _b=it(),dQ=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this.markerGroupMap=Fe()},t.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){_b(s).keep=!1}),n.eachSeries(function(s){var l=jl.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!_b(s).keep&&a.group.remove(s.group)}),hQ(n,o,this.type)},t.prototype.markKeep=function(r){_b(r).keep=!0},t.prototype.toggleBlurSeries=function(r,n){var i=this;U(r,function(a){var o=jl.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?hA(l):A0(l))})}})},t.type="marker",t})(Jn);function hQ(e,t,r){e.eachSeries(function(n){var i=jl.getMarkerModelFromSeries(n,r),a=t.get(n.id);if(i&&a&&a.group){var o=Z0(i),s=o.z,l=o.zlevel;Q0(a.group,s,l)}})}var pQ=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,i){return new t(r,n,i)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t})(jl),qp=it(),vQ=function(e,t,r,n){var i=e.getData(),a;if(pe(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=t.getAxis(n.yAxis!=null?"y":"x"),l=Fu(n.yAxis,n.xAxis);else{var u=WP(n,i,t,e);s=u.valueAxis;var f=RE(i,u.valueDataDim);l=Xp(i,f,o)}var d=s.dim==="x"?0:1,p=1-d,v=Ke(n),g={coord:[]};v.type=null,v.coord=[],v.coord[p]=-1/0,g.coord[p]=1/0;var y=r.get("precision");y>=0&&ft(l)&&(l=+l.toFixed(Math.min(y,20))),v.coord[d]=g.coord[d]=l,a=[v,g,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var x=[GP(e,a[0]),GP(e,a[1]),ce({},a[2])];return x[2].type=x[2].type||null,st(x[2],x[0]),st(x[2],x[1]),x};function Kp(e){return!isNaN(e)&&!isFinite(e)}function XP(e,t,r,n){var i=1-e,a=n.dimensions[e];return Kp(t[i])&&Kp(r[i])&&t[e]===r[e]&&n.getAxis(a).containData(t[e])}function gQ(e,t){if(e.type==="cartesian2d"){var r=t[0].coord,n=t[1].coord;if(r&&n&&(XP(1,r,n,e)||XP(0,r,n,e)))return!0}return YP(e,t[0])&&YP(e,t[1])}function kb(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=xt(o.get("x"),i.getWidth()),u=xt(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(e.getValues(e.dimensions,t));else{var f=a.dimensions,d=e.get(f[0],t),p=e.get(f[1],t);s=a.dataToPoint([d,p])}if(Xx(a,"cartesian2d")){var v=a.getAxis("x"),g=a.getAxis("y"),f=a.dimensions;Kp(e.get(f[0],t))?s[0]=v.toGlobalCoord(v.getExtent()[r?0:1]):Kp(e.get(f[1],t))&&(s[1]=g.toGlobalCoord(g.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}e.setItemLayout(t,s)}var mQ=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=jl.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=qp(o).from,u=qp(o).to;l.each(function(f){kb(l,f,!0,a,i),kb(u,f,!1,a,i)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new dZ);this.group.add(f.group);var d=yQ(o,r,n),p=d.from,v=d.to,g=d.line;qp(n).from=p,qp(n).to=v,n.setData(g);var y=n.get("symbol"),x=n.get("symbolSize"),b=n.get("symbolRotate"),_=n.get("symbolOffset");pe(y)||(y=[y,y]),pe(x)||(x=[x,x]),pe(b)||(b=[b,b]),pe(_)||(_=[_,_]),d.from.each(function(T){S(p,T,!0),S(v,T,!1)}),g.each(function(T){var E=g.getItemModel(T),D=E.getModel("lineStyle").getLineStyle();g.setItemLayout(T,[p.getItemLayout(T),v.getItemLayout(T)]);var L=E.get("z2");D.stroke==null&&(D.stroke=p.getItemVisual(T,"style").fill),g.setItemVisual(T,{z2:Ae(L,0),fromSymbolKeepAspect:p.getItemVisual(T,"symbolKeepAspect"),fromSymbolOffset:p.getItemVisual(T,"symbolOffset"),fromSymbolRotate:p.getItemVisual(T,"symbolRotate"),fromSymbolSize:p.getItemVisual(T,"symbolSize"),fromSymbol:p.getItemVisual(T,"symbol"),toSymbolKeepAspect:v.getItemVisual(T,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(T,"symbolOffset"),toSymbolRotate:v.getItemVisual(T,"symbolRotate"),toSymbolSize:v.getItemVisual(T,"symbolSize"),toSymbol:v.getItemVisual(T,"symbol"),style:D})}),f.updateData(g),d.line.eachItemGraphicEl(function(T){tt(T).dataModel=n,T.traverse(function(E){tt(E).dataModel=n})});function S(T,E,D){var L=T.getItemModel(E);kb(T,E,D,r,a);var R=L.getModel("itemStyle").getItemStyle();R.fill==null&&(R.fill=tI(l,"color")),T.setItemVisual(E,{symbolKeepAspect:L.get("symbolKeepAspect"),symbolOffset:Ae(L.get("symbolOffset",!0),_[D?0:1]),symbolRotate:Ae(L.get("symbolRotate",!0),b[D?0:1]),symbolSize:Ae(L.get("symbolSize"),x[D?0:1]),symbol:Ae(L.get("symbol",!0),y[D?0:1]),style:R})}this.markKeep(f),f.group.silent=n.get("silent")||r.get("silent")},t.type="markLine",t})(dQ);function yQ(e,t,r){var n;e?n=De(e&&e.dimensions,function(u){var f=t.getData(),d=f.getDimensionInfo(f.mapDimension(u))||{};return ce(ce({},d),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Sc(n,r),a=new Sc(n,r),o=new Sc([],r),s=De(r.get("data"),yt(vQ,t,e,r));e&&(s=Zt(s,yt(gQ,e)));var l=fQ(!!e,n);return i.initData(De(s,function(u){return u[0]}),null,l),a.initData(De(s,function(u){return u[1]}),null,l),o.initData(De(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function xQ(e){e.registerComponentModel(pQ),e.registerComponentView(mQ),e.registerPreprocessor(function(t){sQ(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var bQ=function(e,t){if(t==="all")return{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}},Sb=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},t.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),pe(n)&&U(n,function(a,o){Me(a)&&(a={type:a}),n[o]=st(a,bQ(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<r.length;i++){var a=r[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(r[0].get("name"))}},t.prototype._updateData=function(r){var n=[],i=[];r.eachRawSeries(function(l){var u=l.name;i.push(u);var f;if(l.legendVisualProvider){var d=l.legendVisualProvider,p=d.getAllNames();r.isSeriesFiltered(l)||(i=i.concat(p)),p.length?n=n.concat(p):f=!0}else f=!0;f&&v0(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=Fe(),s=De(a,function(l){return(Me(l)||ft(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new Et(l,this,this.ecModel))},this);this._data=Zt(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(r){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;U(a,function(o){n[o.get("name")]=!1})}n[r]=!0},t.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},t.prototype.toggleSelected=function(r){var n=this.option.selected;n.hasOwnProperty(r)||(n[r]=!0),this[n[r]?"unSelect":"select"](r)},t.prototype.allSelect=function(){var r=this._data,n=this.option.selected;U(r,function(i){n[i.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;U(r,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},t.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&Je(this._availableNames,r)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:Ne.size.m,align:"auto",backgroundColor:Ne.color.transparent,borderColor:Ne.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:Ne.color.disabled,inactiveBorderColor:Ne.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:Ne.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:Ne.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:Ne.color.tertiary,borderWidth:1,borderColor:Ne.color.border},emphasis:{selectorLabel:{show:!0,color:Ne.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t})(dt),Hl=yt,Cb=U,Zp=Bt,qP=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new Zp),this.group.add(this._selectorGroup=new Zp),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var f=Px(r,i).refContainer,d=r.getBoxLayoutParams(),p=r.get("padding"),v=ts(d,f,p),g=this.layoutInner(r,o,v,a,l,u),y=ts(ct({width:g.width,height:g.height},d),f,p);this.group.x=y.x-g.x,this.group.y=y.y-g.y,this.group.markRedraw(),this.group.add(this._backgroundEl=HZ(g,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),f=Fe(),d=n.get("selectedMode"),p=n.get("triggerEvent"),v=[];i.eachRawSeries(function(g){!g.get("legendHoverLink")&&v.push(g.id)}),Cb(n.getData(),function(g,y){var x=this,b=g.get("name");if(!this.newlineDisabled&&(b===""||b===`
|
|
42
|
+
`)){var _=new Zp;_.newline=!0,u.add(_);return}var S=i.getSeriesByName(b)[0];if(!f.get(b))if(S){var T=S.getData(),E=T.getVisual("legendLineStyle")||{},D=T.getVisual("legendIcon"),L=T.getVisual("style"),R=this._createItem(S,b,y,g,n,r,E,L,D,d,a);R.on("click",Hl(KP,b,null,a,v)).on("mouseover",Hl(Tb,S.name,null,a,v)).on("mouseout",Hl(Ab,S.name,null,a,v)),i.ssr&&R.eachChild(function(O){var M=tt(O);M.seriesIndex=S.seriesIndex,M.dataIndex=y,M.ssrType="legend"}),p&&R.eachChild(function(O){x.packEventData(O,n,S,y,b)}),f.set(b,!0)}else i.eachRawSeries(function(O){var M=this;if(!f.get(b)&&O.legendVisualProvider){var P=O.legendVisualProvider;if(!P.containName(b))return;var j=P.indexOfName(b),B=P.getItemVisual(j,"style"),$=P.getItemVisual(j,"legendIcon"),K=vi(B.fill);K&&K[3]===0&&(K[3]=.2,B=ce(ce({},B),{fill:Xu(K,"rgba")}));var Z=this._createItem(O,b,y,g,n,r,{},B,$,d,a);Z.on("click",Hl(KP,null,b,a,v)).on("mouseover",Hl(Tb,null,b,a,v)).on("mouseout",Hl(Ab,null,b,a,v)),i.ssr&&Z.eachChild(function(re){var Y=tt(re);Y.seriesIndex=O.seriesIndex,Y.dataIndex=y,Y.ssrType="legend"}),p&&Z.eachChild(function(re){M.packEventData(re,n,O,y,b)}),f.set(b,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype.packEventData=function(r,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};tt(r).eventData=s},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();Cb(r,function(u){var f=u.type,d=new Sr({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(d);var p=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);hl(d,{normal:p,emphasis:v},{defaultText:u.title}),L0(d)})},t.prototype._createItem=function(r,n,i,a,o,s,l,u,f,d,p){var v=r.visualDrawType,g=o.get("itemWidth"),y=o.get("itemHeight"),x=o.isSelected(n),b=a.get("symbolRotate"),_=a.get("symbolKeepAspect"),S=a.get("icon");f=S||f||"roundRect";var T=wQ(f,a,l,u,v,x,p),E=new Zp,D=a.getModel("textStyle");if($e(r.getLegendIcon)&&(!S||S==="inherit"))E.add(r.getLegendIcon({itemWidth:g,itemHeight:y,icon:f,iconRotate:b,itemStyle:T.itemStyle,lineStyle:T.lineStyle,symbolKeepAspect:_}));else{var L=S==="inherit"&&r.getData().getVisual("symbol")?b==="inherit"?r.getData().getVisual("symbolRotate"):b:0;E.add(_Q({itemWidth:g,itemHeight:y,icon:f,iconRotate:L,itemStyle:T.itemStyle,symbolKeepAspect:_}))}var R=s==="left"?g+5:-5,O=s,M=o.get("formatter"),P=n;Me(M)&&M?P=M.replace("{name}",n??""):$e(M)&&(P=M(n));var j=x?D.getTextColor():a.get("inactiveColor");E.add(new Sr({style:pl(D,{text:P,x:R,y:y/2,fill:j,align:O,verticalAlign:"middle"},{inheritColor:j})}));var B=new Nt({shape:E.getBoundingRect(),style:{fill:"transparent"}}),$=a.getModel("tooltip");return $.get("show")&&Th({el:B,componentModel:o,itemName:n,itemTooltipOption:$.option}),E.add(B),E.eachChild(function(K){K.silent=!0}),B.silent=!d,this.getContentGroup().add(E),L0(E),E.__legendDataIndex=i,E},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Ac(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var f=l.getBoundingRect(),d=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){Ac("horizontal",u,r.get("selectorItemGap",!0));var p=u.getBoundingRect(),v=[-p.x,-p.y],g=r.get("selectorButtonGap",!0),y=r.getOrient().index,x=y===0?"width":"height",b=y===0?"height":"width",_=y===0?"y":"x";s==="end"?v[y]+=f[x]+g:d[y]+=p[x]+g,v[1-y]+=f[b]/2-p[b]/2,u.x=v[0],u.y=v[1],l.x=d[0],l.y=d[1];var S={x:0,y:0};return S[x]=f[x]+g+p[x],S[b]=Math.max(f[b],p[b]),S[_]=Math.min(0,p[_]+v[1-y]),S}else return l.x=d[0],l.y=d[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})(Jn);function wQ(e,t,r,n,i,a,o){function s(x,b){x.lineWidth==="auto"&&(x.lineWidth=b.lineWidth>0?2:0),Cb(x,function(_,S){x[S]==="inherit"&&(x[S]=b[S])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=e.lastIndexOf("empty",0)===0?"fill":"stroke",d=l.getShallow("decal");u.decal=!d||d==="inherit"?n.decal:V1(d,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[f]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var p=t.getModel("lineStyle"),v=p.getLineStyle();if(s(v,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!a){var g=t.get("inactiveBorderWidth"),y=u[f];u.lineWidth=g==="auto"?n.lineWidth>0&&y?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),v.stroke=p.get("inactiveColor"),v.lineWidth=p.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function _Q(e){var t=e.icon||"roundRect",r=is(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill=Ne.color.neutral00,r.style.lineWidth=2),r}function KP(e,t,r,n){Ab(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),Tb(e,t,r,n)}function Tb(e,t,r,n){r.usingTHL()||r.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:n})}function Ab(e,t,r,n){r.usingTHL()||r.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:n})}function Jc(e,t,r){var n=e==="allSelect"||e==="inverseSelect",i={},a=[];r.eachComponent({mainType:"legend",query:t},function(s){n?s[e]():s[e](t.name),ZP(s,i),a.push(s.componentIndex)});var o={};return r.eachComponent("legend",function(s){U(i,function(l,u){s[l?"select":"unSelect"](u)}),ZP(s,o)}),n?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function ZP(e,t){var r=t||{};return U(e.getData(),function(n){var i=n.get("name");if(!(i===`
|
|
43
|
+
`||i==="")){var a=e.isSelected(i);_r(r,i)?r[i]=r[i]&&a:r[i]=a}}),r}function kQ(e){e.registerAction("legendToggleSelect","legendselectchanged",yt(Jc,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",yt(Jc,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",yt(Jc,"inverseSelect")),e.registerAction("legendSelect","legendselected",yt(Jc,"select")),e.registerAction("legendUnSelect","legendunselected",yt(Jc,"unSelect"))}var SQ=b0(CQ);function CQ(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(r){for(var n=0;n<t.length;n++)if(!t[n].isSelected(r.name))return!1;return!0})}function QP(e){e.registerComponentModel(Sb),e.registerComponentView(qP),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,SQ),e.registerSubTypeDefaulter("legend",function(){return"plain"}),kQ(e)}var TQ=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},t.prototype.init=function(r,n,i){var a=Mc(r);e.prototype.init.call(this,r,n,i),JP(this,r,a)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),JP(this,this.option,r)},t.type="legend.scroll",t.defaultOption=OE(Sb.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:Ne.color.accent50,pageIconInactiveColor:Ne.color.accent10,pageIconSize:15,pageTextStyle:{color:Ne.color.tertiary},animationDurationUpdate:800}),t})(Sb);function JP(e,t,r){var n=e.getOrient(),i=[1,1];i[n.index]=0,Da(t,r,{type:"box",ignoreSize:!!i})}var eN=Bt,Eb=["width","height"],Db=["x","y"],AQ=(function(e){ve(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!0,r._currentIndex=0,r}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new eN),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new eN)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this;e.prototype.renderInner.call(this,r,n,i,a,o,s,l);var f=this._controllerGroup,d=n.get("pageIconSize",!0),p=pe(d)?d:[d,d];g("pagePrev",0);var v=n.getModel("pageTextStyle");f.add(new Sr({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),g("pageNext",1);function g(y,x){var b=y+"DataIndex",_=W0(n.get("pageIcons",!0)[n.getOrient().name][x],{onclick:pt(u._pageGo,u,b,n,a)},{x:-p[0]/2,y:-p[1]/2,width:p[0],height:p[1]});_.name=y,f.add(_)}},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getSelectorGroup(),u=r.getOrient().index,f=Eb[u],d=Db[u],p=Eb[1-u],v=Db[1-u];o&&Ac("horizontal",l,r.get("selectorItemGap",!0));var g=r.get("selectorButtonGap",!0),y=l.getBoundingRect(),x=[-y.x,-y.y],b=Ke(i);o&&(b[f]=i[f]-y[f]-g);var _=this._layoutContentAndController(r,a,b,u,f,p,v,d);if(o){if(s==="end")x[u]+=_[f]+g;else{var S=y[f]+g;x[u]-=S,_[d]-=S}_[f]+=y[f]+g,x[1-u]+=_[v]+_[p]/2-y[p]/2,_[p]=Math.max(_[p],y[p]),_[v]=Math.min(_[v],y[v]+x[1-u]),l.x=x[0],l.y=x[1],l.markRedraw()}return _},t.prototype._layoutContentAndController=function(r,n,i,a,o,s,l,u){var f=this.getContentGroup(),d=this._containerGroup,p=this._controllerGroup;Ac(r.get("orient"),f,r.get("itemGap"),a?i.width:null,a?null:i.height),Ac("horizontal",p,r.get("pageButtonItemGap",!0));var v=f.getBoundingRect(),g=p.getBoundingRect(),y=this._showController=v[o]>i[o],x=[-v.x,-v.y];n||(x[a]=f[u]);var b=[0,0],_=[-g.x,-g.y],S=Ae(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(y){var T=r.get("pageButtonPosition",!0);T==="end"?_[a]+=i[o]-g[o]:b[a]+=g[o]+S}_[1-a]+=v[s]/2-g[s]/2,f.setPosition(x),d.setPosition(b),p.setPosition(_);var E={x:0,y:0};if(E[o]=y?i[o]:v[o],E[s]=Math.max(v[s],g[s]),E[l]=Math.min(0,g[l]+_[1-a]),d.__rectSize=i[o],y){var D={x:0,y:0};D[o]=Math.max(i[o]-g[o]-S,0),D[s]=E[s],d.setClipPath(new Nt({shape:D})),d.__rectSize=D[o]}else p.eachChild(function(R){R.attr({invisible:!0,silent:!0})});var L=this._getPageInfo(r);return L.pageIndex!=null&&dr(f,{x:L.contentPosition[0],y:L.contentPosition[1]},y?r:null),this._updatePageInfoView(r,L),E},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;U(["pagePrev","pageNext"],function(f){var d=f+"DataIndex",p=n[d]!=null,v=i.childOfName(f);v&&(v.setStyle("fill",p?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),v.cursor=p?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",Me(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=Eb[o],l=Db[o],u=this._findTargetItemIndex(n),f=i.children(),d=f[u],p=f.length,v=p?1:0,g={contentPosition:[i.x,i.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!d)return g;var y=T(d);g.contentPosition[o]=-y.s;for(var x=u+1,b=y,_=y,S=null;x<=p;++x)S=T(f[x]),(!S&&_.e>b.s+a||S&&!E(S,b.s))&&(_.i>b.i?b=_:b=S,b&&(g.pageNextDataIndex==null&&(g.pageNextDataIndex=b.i),++g.pageCount)),_=S;for(var x=u-1,b=y,_=y,S=null;x>=-1;--x)S=T(f[x]),(!S||!E(_,S.s))&&b.i<_.i&&(_=b,g.pagePrevDataIndex==null&&(g.pagePrevDataIndex=b.i),++g.pageCount,++g.pageIndex),b=S;return g;function T(D){if(D){var L=D.getBoundingRect(),R=L[l]+D[l];return{s:R,e:R+L[s],i:D.__legendDataIndex}}}function E(D,L){return D.e>=L&&D.s<=L+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t})(qP);function EQ(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function DQ(e){Ba(QP),e.registerComponentModel(TQ),e.registerComponentView(AQ),EQ(e)}function MQ(e){Ba(QP),Ba(DQ)}function tN(e,t,r){var n=Zr.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",e)),n.width=i*r,n.height=a*r,n}function Mb(e){return!e.__cursors.get(OA)}function rN(e){var t=e.__cursors.get(OA);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var nN=(function(e){ve(t,e);function t(r,n,i){var a=e.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.zlevel=0,a.zlevel2=_h,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__prevIdx={startIdx:0,endIdx:0};var o;i=i||Gd,typeof r=="string"?o=tN(r,n,i):Ie(r)&&(o=r,r=o.id),a.id=r,a.dom=o;var s=o.style;return s&&(_C(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return t.prototype.afterBrush=function(){this.__prevIdx=rN(this)},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=tN("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},t.prototype.createRepaintRects=function(r,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new je(0,0,0,0);function f(T){if(!(!T.isFinite()||T.isZero()))if(o.length===0){var E=new je(0,0,0,0);E.copy(T),o.push(E)}else{for(var D=!1,L=1/0,R=0,O=0;O<o.length;++O){var M=o[O];if(M.intersect(T)){var P=new je(0,0,0,0);P.copy(M),P.union(T),o[O]=P,D=!0;break}else if(l){u.copy(T),u.union(M);var j=T.width*T.height,B=M.width*M.height,$=u.width*u.height,K=$-j-B;K<L&&(L=K,R=O)}}if(l&&(o[R].union(T),D=!0),!D){var E=new je(0,0,0,0);E.copy(T),o.push(E)}l||(l=o.length>=s)}}for(var d=rN(this),p=d.startIdx;p<d.endIdx;++p){var v=r[p];if(v){var g=v.shouldBePainted(i,a,!0,!0),y=v.__isRendered&&(v.__dirty&Or||!g)?v.getPrevPaintRect():null;y&&f(y);var x=g&&(v.__dirty&Or||!v.__isRendered)?v.getPaintRect():null;x&&f(x)}}for(var b=this.__prevIdx,p=b.startIdx;p<b.endIdx;++p){var v=n[p],g=v&&v.shouldBePainted(i,a,!0,!0);if(v&&(!g||!v.__zr)&&v.__isRendered){var y=v.getPrevPaintRect();y&&f(y)}}var _;do{_=!1;for(var p=0;p<o.length;){if(o[p].isZero()){o.splice(p,1);continue}for(var S=p+1;S<o.length;)o[p].intersect(o[S])?(_=!0,o[p].union(o[S]),o.splice(S,1)):S++;p++}}while(_);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(r,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=r+"px",o.height=n+"px"),a.width=r*i,a.height=n*i,s&&(s.width=r*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},t.prototype.clear=function(r,n,i){var a=this.dom,o=this.ctx,s=a.width,l=a.height;n=n||this.clearColor;var u=this.motionBlur&&!r,f=this.lastFrameAlpha,d=this.dpr,p=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/d,l/d));var v=this.domBack;function g(y,x,b,_){if(o.clearRect(y,x,b,_),n&&n!=="transparent"){var S=void 0;if(wd(n)){var T=n.global||n.__width===b&&n.__height===_;S=T&&n.__canvasGradient||B1(o,n,{x:0,y:0,width:b,height:_}),n.__canvasGradient=S,n.__width=b,n.__height=_}else Y8(n)&&(n.scaleX=n.scaleX||d,n.scaleY=n.scaleY||d,S=j1(o,n,{dirty:function(){p.setUnpainted(),p.painter.refresh()}}));o.save(),o.fillStyle=S||n,o.fillRect(y,x,b,_),o.restore()}u&&(o.save(),o.globalAlpha=f,o.drawImage(v,y,x,b,_),o.restore())}!i||u?g(0,0,s,l):i.length&&U(i,function(y){g(y.x*d,y.y*d,y.width*d,y.height*d)})},t})(gi),iN=1e5,hs=314159,Lb=void 0,LQ=1,Ib=2;function IQ(e){return e?e.__builtin__?!0:!(typeof e.resize!="function"||typeof e.refresh!="function"):!1}function PQ(e,t){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}function aN(e,t,r,n){var i=new nN(e,t,t.dpr);return i.zlevel=r,i.zlevel2=n,i.__builtin__=!0,oN(i),i}function oN(e){e.__cursorStack=[],e.__cursors=Fe()}function NQ(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function RQ(e,t){var r=e.__cursors,n=+t;return r.get(n)||(e.__cursorStack.push(n),r.set(n,NQ({key:n})))}function Qp(e,t){for(var r=e.__cursorStack,n=0;n<r.length;n++)t(e.__cursors.get(r[n]))}function Pb(e,t){var r=e.layers;return r[t]||(r[t]=new Array(3))}function pr(e,t,r){for(var n=e.layerStack,i=0;i<n.length;i++){var a=n[i].zl,o=n[i].zl2,s=e.layers[a][o];(!r||(!(r&ef)||s.__builtin__)&&(!(r&Nb)||!s.__builtin__)&&(!(r&sN)||s!==e.hoverlayer))&&t(s,a,o,i)}}var ef=1,Nb=2,sN=4,Jp=ef|sN,OQ=(function(){function e(t,r,n,i){this.type="canvas",this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas",this._i={layerStack:[],layers:[]};var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=n=ce({},n||{}),this.dpr=n.devicePixelRatio||Gd,this._singleCanvas=a,this.root=t;var o=t.style;if(o&&(_C(t),t.innerHTML=""),this.storage=r,this._prevDisplayList=[],a){var l=t,u=l.width,f=l.height;n.width!=null&&(u=n.width),n.height!=null&&(f=n.height),this.dpr=n.devicePixelRatio||1,l.width=u*this.dpr,l.height=f*this.dpr,this._width=u,this._height=f;var d=aN(l,this,hs,_h);d.initContext(),this._insertLayer(d,hs,_h,!0),this._domRoot=t}else{this._width=Ip(t,0,n),this._height=Ip(t,1,n);var s=this._domRoot=PQ(this._width,this._height);t.appendChild(s)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.refresh=function(t){var r;t&&!Ie(t)?r={paintAll:!!t}:r=t||{};var n=Ae(r.refresh,!0),i=Ae(r.refreshHover,!1);if(i&&(this._hoverLayerDirty=Ib),!n)return i&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var a=this.storage.getDisplayList(!0);this._updateLayerStatus(a,r.paintAll),this._redrawId=Math.random();var o=this._prevDisplayList;this._paintList(a,o,this._redrawId);var s=this._backgroundColor;return pr(this._i,function(l,u,f,d){l.refresh&&l.refresh(d===0?s:null)},Nb),this._opts.useDirtyRect&&(this._prevDisplayList=a.slice()),this},e.prototype._paintHoverList=function(t){var r=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=Lb,n!==Lb&&(!r&&n===Ib&&(r=this._i.hoverlayer=this._ensureLayer(iN)),!!r)){r.clear();for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},a,o=0,s=t.length;o<s;o++){var l=t[o];if(l.__inHover){a||(a=r.ctx,a.save());var u=l.__hoverStyle,f=void 0;u&&(f=l.style,l.style=u),us(a,l,i),u&&(l.style=f)}}a&&(Rl(a,i),a.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(iN)},e.prototype.paintOne=function(t,r){gI(t,r)},e.prototype._paintList=function(t,r,n){if(this._redrawId===n){var i=this._doPaintList(t,r);if(this._needsManuallyCompositing&&this._compositeManually(),i)pr(this._i,function(o){o.afterBrush&&o.afterBrush()},Jp),this._paintHoverList(t);else{var a=this;Cp(function(){a._paintList(t,r,n)})}}},e.prototype._compositeManually=function(){var t=this._ensureLayer(hs).ctx,r=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,r,n),pr(this._i,function(i){i.virtual&&t.drawImage(i.dom,0,0,r,n)},ef)},e.prototype._doPaintList=function(t,r){var n=this,i=!0;return pr(this._i,function(a){var o=!1;if(Qp(a,function(d){(d.drawIdx<d.endIdx||d.notClearIdx>=0)&&(o=!0)}),!(!o&&!a.__dirty)){var s=n._opts.useDirtyRect&&!Mb(a)?a.createRepaintRects(t,r,n._width,n._height):null,l=n._i.layerStack[0],u=!0;if(a.__dirty){u=!1,a.__dirty=!1;var f=a.zlevel===l.zl&&a.zlevel2===l.zl2?n._backgroundColor:null;a.clear(!1,f,s)}Qp(a,function(d){var p=n._paintPerCursor(a,d,t,s,u);i=i&&p})}},Jp),We.wxa&&pr(this._i,function(a){a&&a.ctx&&a.ctx.draw&&a.ctx.draw()}),i},e.prototype._paintPerCursor=function(t,r,n,i,a){var o=t.ctx;if(i)if(!i.length)r.drawIdx=r.endIdx;else for(var s=this.dpr,l=0;l<i.length;++l){var u=i[l];o.save(),o.beginPath(),o.rect(u.x*s,u.y*s,u.width*s,u.height*s),o.clip(),this._paintPerCursorInRect(t,r,n,u,a),o.restore()}else o.save(),this._paintPerCursorInRect(t,r,n,null,a),o.restore();return r.drawIdx>=r.endIdx},e.prototype._paintPerCursorInRect=function(t,r,n,i,a){for(var o={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:a}},s=t.ctx,l=Mb(t),u=l&&Zr.getTime(),f=r.drawIdx,d=r.notClearIdx,p=d>=0?Math.min(d,f):f;p<r.endIdx;p++){var v=n[p];if(!(p<f&&!v.notClear)){if(v.__inHover&&(this._hoverLayerDirty=Ib),i!=null){var g=v.getPaintRect();g&&g.intersect(i)&&(us(s,v,o),v.setPrevPaintRect(g))}else us(s,v,o);if(l){var y=Zr.getTime()-u;if(y>15){p++;break}}}}Rl(s,o),r.drawIdx=Math.max(p,f)},e.prototype.getLayer=function(t,r){return this._ensureLayer(t,0,r)},e.prototype._ensureLayer=function(t,r,n){r=r||0;var i=this._singleCanvas;i&&!this._needsManuallyCompositing&&(t=hs,r=0);var a=Pb(this._i,t)[r];return a||(a=aN("zr_"+t+"."+r,this,t,r),this._layerConfig[t]&&st(a,this._layerConfig[t],!0),(n||i&&t!==hs)&&(a.virtual=!0),this._insertLayer(a,t,r,!1),a.initContext()),a},e.prototype.insertLayer=function(t,r){this._insertLayer(r,t,0,!1)},e.prototype._insertLayer=function(t,r,n,i){var a=this._i,o=a.layers,s=a.layerStack,l=this._domRoot,u=null;if(!(o[r]&&o[r][n])&&IQ(t)){for(var f=s.length,d=0;d<f&&(s[d].zl<r||s[d].zl===r&&s[d].zl2<n);)d++;if(d>0&&(u=Pb(a,s[d-1].zl)[s[d-1].zl2]),s.splice(d,0,{zl:r,zl2:n}),Pb(a,r)[n]=t,!i&&!t.virtual)if(u){var p=u.dom;p.nextSibling?l.insertBefore(t.dom,p.nextSibling):l.appendChild(t.dom)}else l.firstChild?l.insertBefore(t.dom,l.firstChild):l.appendChild(t.dom);t.painter||(t.painter=this)}},e.prototype.eachLayer=function(t,r){return pr(this._i,function(n,i){t.call(r,n,i)})},e.prototype.eachBuiltinLayer=function(t,r){return pr(this._i,function(n,i){t.call(r,n,i)},ef)},e.prototype.eachOtherLayer=function(t,r){return pr(this._i,function(n,i){t.call(r,n,i)},Nb)},e.prototype.getLayers=function(){var t={};return pr(this._i,function(r,n,i){t[r.id]=r}),t},e.prototype._updateLayerStatus=function(t,r){var n=this;if(n._singleCanvas)for(var i=1;i<t.length;i++){var a=t[i];if(a.zlevel!==t[i-1].zlevel||a.incremental){n._needsManuallyCompositing=!0;break}}pr(n._i,function(x){x.__dirty=!1,Qp(x,function(b){b.used=!1,b.endIdxNew=0,b.notClearIdx=-1})},Jp);for(var o,s=null,l=null,u=!1,f=0,d=t.length;f<d;f++){var a=t[f],p=a.zlevel,v=a.incremental,g=void 0;if(o!==p&&(o=p,u=!1),v?(u=!0,g=gU):g=u?vU:_h,(!s||p!==s.zlevel||g!==s.zlevel2)&&(s=n._ensureLayer(p,g),l=null,!s.__builtin__)){ay("ZLevel "+p+" has been used by unknown layer "+s.id);continue}if((!l||v!==l.key)&&(l=RQ(s,v),!l.used))if(l.used=!0,!r&&l.first===a.id){var y=f-l.startIdx;l.startIdx=f,l.drawIdx+=y,l.endIdx+=y}else s.__dirty=!0,l.first=a.id,l.startIdx=l.drawIdx=f,l.endIdx=f+1;l.endIdxNew=f+1,a.__dirty&Or&&!a.__inHover&&((!v||!a.notClear&&f<l.drawIdx)&&(s.__dirty=!0),v&&a.notClear&&l.notClearIdx<0&&(l.notClearIdx=f))}pr(n._i,function(x){for(var b=x.__cursorStack,_=x.__cursors,S=b.length-1;S>=0;S--){var T=_.get(b[S]);if(!T.used)x.__dirty=!0,_.removeKey(b[S]),b.splice(S,1);else{var E=T.endIdxNew;(Mb(x)?E<T.drawIdx:E!==T.endIdx||!E||t[E-1].id!==T.last)&&(x.__dirty=!0),T.endIdx=T.endIdxNew,T.last=E?t[E-1].id:NaN}}x.__dirty&&(Qp(x,function(D){D.drawIdx=D.startIdx}),n._hoverLayerDirty===Lb&&(n._hoverLayerDirty=LQ))},Jp)},e.prototype.clear=function(){return pr(this._i,function(t){t.clear(),oN(t)},ef),this},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,pr(this._i,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?st(n[t],r,!0):n[t]=r,pr(this._i,function(i,a){st(i,n[a],!0)})}},e.prototype.delLayer=function(t){for(var r=this._i.layerStack,n=this._i.layers,i=r.length-1;i>=0;i--){var a=r[i];if(a.zl===t){var o=n[t][a.zl2];if(o.__builtin__)continue;if(r.splice(i,1),n[t][a.zl2]=void 0,!o.virtual){var s=o.dom.parentNode;s&&s.removeChild(o.dom)}}}},e.prototype.resize=function(t,r){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;t!=null&&(i.width=t),r!=null&&(i.height=r),t=Ip(a,0,i),r=Ip(a,1,i),n.style.display="",(this._width!==t||r!==this._height)&&(n.style.width=t+"px",n.style.height=r+"px",pr(this._i,function(o){o.resize(t,r)}),this.refresh({paintAll:!0})),this._width=t,this._height=r}else{if(t==null||r==null)return;this._width=t,this._height=r,this._ensureLayer(hs).resize(t,r)}return this},e.prototype.clearLayer=function(t){U(this._i.layers[t],function(r){r&&!r.__builtin__&&r.clear()})},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._i.layers[hs][0].dom;var r=new nN("image",this,t.pixelRatio||this.dpr);r.initContext(),r.clear(!1,t.backgroundColor||this._backgroundColor);var n=r.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=r.dom.width,a=r.dom.height;pr(this._i,function(d){d.__builtin__?n.drawImage(d.dom,0,0,i,a):d.renderToCanvas&&(n.save(),d.renderToCanvas(n),n.restore())})}else{for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var f=s[l];us(n,f,o)}Rl(n,o)}return r.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e})();function zQ(e){e.registerPainter("canvas",OQ)}Ba([JY,sW,bX,jZ,MQ,xQ,oQ,zQ]);const FQ=Object.freeze(Object.defineProperty({__proto__:null,init:bK},Symbol.toStringTag,{value:"Module"}));function Cle(){}function Tle(){}function BQ(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const jQ=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,HQ=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VQ={};function lN(e,t){return(VQ.jsx?HQ:jQ).test(e)}const UQ=/[ \t\n\f\r]/g;function $Q(e){return typeof e=="object"?e.type==="text"?uN(e.value):!1:uN(e)}function uN(e){return e.replace(UQ,"")===""}class tf{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}tf.prototype.normal={},tf.prototype.property={},tf.prototype.space=void 0;function cN(e,t){const r={},n={};for(const i of e)Object.assign(r,i.property),Object.assign(n,i.normal);return new tf(r,n,t)}function Rb(e){return e.toLowerCase()}class Hr{constructor(t,r){this.attribute=r,this.property=t}}Hr.prototype.attribute="",Hr.prototype.booleanish=!1,Hr.prototype.boolean=!1,Hr.prototype.commaOrSpaceSeparated=!1,Hr.prototype.commaSeparated=!1,Hr.prototype.defined=!1,Hr.prototype.mustUseProperty=!1,Hr.prototype.number=!1,Hr.prototype.overloadedBoolean=!1,Hr.prototype.property="",Hr.prototype.spaceSeparated=!1,Hr.prototype.space=void 0;let GQ=0;const Ge=vs(),Ht=vs(),Ob=vs(),ue=vs(),vt=vs(),ps=vs(),rn=vs();function vs(){return 2**++GQ}const zb=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:Ht,commaOrSpaceSeparated:rn,commaSeparated:ps,number:ue,overloadedBoolean:Ob,spaceSeparated:vt},Symbol.toStringTag,{value:"Module"})),Fb=Object.keys(zb);class Bb extends Hr{constructor(t,r,n,i){let a=-1;if(super(t,r),fN(this,"space",i),typeof n=="number")for(;++a<Fb.length;){const o=Fb[a];fN(this,Fb[a],(n&zb[o])===zb[o])}}}Bb.prototype.defined=!0;function fN(e,t,r){r&&(e[t]=r)}function Vl(e){const t={},r={};for(const[n,i]of Object.entries(e.properties)){const a=new Bb(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[Rb(n)]=n,r[Rb(a.attribute)]=n}return new tf(t,r,e.space)}const dN=Vl({properties:{ariaActiveDescendant:null,ariaAtomic:Ht,ariaAutoComplete:null,ariaBusy:Ht,ariaChecked:Ht,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:vt,ariaCurrent:null,ariaDescribedBy:vt,ariaDetails:null,ariaDisabled:Ht,ariaDropEffect:vt,ariaErrorMessage:null,ariaExpanded:Ht,ariaFlowTo:vt,ariaGrabbed:Ht,ariaHasPopup:null,ariaHidden:Ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:vt,ariaLevel:ue,ariaLive:null,ariaModal:Ht,ariaMultiLine:Ht,ariaMultiSelectable:Ht,ariaOrientation:null,ariaOwns:vt,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:Ht,ariaReadOnly:Ht,ariaRelevant:null,ariaRequired:Ht,ariaRoleDescription:vt,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:Ht,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function hN(e,t){return t in e?e[t]:t}function pN(e,t){return hN(e,t.toLowerCase())}const WQ=Vl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ps,acceptCharset:vt,accessKey:vt,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alpha:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:vt,autoFocus:Ge,autoPlay:Ge,blocking:vt,capture:null,charSet:null,checked:Ge,cite:null,className:vt,closedBy:null,colorSpace:null,cols:ue,colSpan:ue,command:null,commandFor:null,content:null,contentEditable:Ht,controls:Ge,controlsList:vt,coords:ue|ps,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Ob,draggable:Ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:vt,height:ue,hidden:Ob,high:ue,href:null,hrefLang:null,htmlFor:vt,httpEquiv:vt,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:vt,itemRef:vt,itemScope:Ge,itemType:vt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ge,optimum:ue,pattern:null,ping:vt,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:vt,required:Ge,reversed:Ge,rows:ue,rowSpan:ue,sandbox:vt,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootCustomElementRegistry:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shadowRootSerializable:Ge,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:Ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ue,step:null,style:null,tabIndex:ue,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:Ht,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:vt,axis:null,background:null,bgColor:null,border:ue,borderColor:null,bottomMargin:ue,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:Ht,standby:null,summary:null,text:null,topMargin:ue,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ue,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ge,disablePictureInPicture:Ge,disableRemotePlayback:Ge,exportParts:ps,part:vt,prefix:null,property:null,results:ue,security:null,unselectable:null},space:"html",transform:pN}),YQ=Vl({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:rn,accentHeight:ue,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ue,amplitude:ue,arabicForm:null,ascent:ue,attributeName:null,attributeType:null,azimuth:ue,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ue,by:null,calcMode:null,capHeight:ue,className:vt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ue,diffuseConstant:ue,direction:null,display:null,dur:null,divisor:ue,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:ue,enableBackground:null,end:null,event:null,exponent:ue,externalResourcesRequired:null,fill:null,fillOpacity:ue,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ps,g2:ps,glyphName:ps,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ue,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ue,horizOriginX:ue,horizOriginY:ue,id:null,ideographic:ue,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ue,k:ue,k1:ue,k2:ue,k3:ue,k4:ue,kernelMatrix:rn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ue,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ue,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ue,overlineThickness:ue,paintOrder:null,panose1:null,path:null,pathLength:ue,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:vt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:rn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:rn,rev:rn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:rn,requiredFeatures:rn,requiredFonts:rn,requiredFormats:rn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ue,specularExponent:ue,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ue,strikethroughThickness:ue,string:null,stroke:null,strokeDashArray:rn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ue,strokeOpacity:ue,strokeWidth:null,style:null,surfaceScale:ue,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:rn,tabIndex:ue,tableValues:null,target:null,targetX:ue,targetY:ue,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:rn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ue,underlineThickness:ue,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ue,values:null,vAlphabetic:ue,vMathematical:ue,vectorEffect:null,vHanging:ue,vIdeographic:ue,version:null,vertAdvY:ue,vertOriginX:ue,vertOriginY:ue,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ue,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hN}),vN=Vl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),gN=Vl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pN}),mN=Vl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),XQ={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},qQ=/[A-Z]/g,yN=/-[a-z]/g,KQ=/^data[-\w.:]+$/i;function ZQ(e,t){const r=Rb(t);let n=t,i=Hr;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&KQ.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(yN,JQ);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!yN.test(a)){let o=a.replace(qQ,QQ);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Bb}return new i(n,t)}function QQ(e){return"-"+e.toLowerCase()}function JQ(e){return e.charAt(1).toUpperCase()}const eJ=cN([dN,WQ,vN,gN,mN],"html"),jb=cN([dN,YQ,vN,gN,mN],"svg");function tJ(e){return e.join(" ").trim()}var xN=/\/\*(?:[^*]|\*(?!\/))*\*\//g,rJ=/\n/g,nJ=/^\s*/,iJ=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,aJ=/^:\s*/,oJ=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,sJ=/^[;\s]*/,lJ=`
|
|
44
|
+
`,bN="/",wN="*",rf="",uJ="comment",cJ="declaration";function fJ(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(g){var y=g.match(rJ);y&&(r+=y.length);var x=g.lastIndexOf(lJ);n=~x?g.length-x:n+g.length}function a(){var g={line:r,column:n};return function(y){return y.position=new o(g),u(),y}}function o(g){this.start=g,this.end={line:r,column:n},this.source=t.source}o.prototype.content=e;function s(g){var y=new Error(t.source+":"+r+":"+n+": "+g);if(y.reason=g,y.filename=t.source,y.line=r,y.column=n,y.source=e,!t.silent)throw y}function l(g){var y=g.exec(e);if(y){var x=y[0];return i(x),e=e.slice(x.length),y}}function u(){l(nJ)}function f(g){for(var y;y=d();)g.push(y);return g}function d(){var g=a();if(!(bN!=e.charAt(0)||wN!=e.charAt(1))){for(var y=2;rf!=e.charAt(y)&&(wN!=e.charAt(y)||bN!=e.charAt(y+1));)++y;if(y+=2,rf===e.charAt(y-1))return s("End of comment missing");var x=e.slice(2,y-2);return n+=2,i(x),e=e.slice(y),n+=2,g({type:uJ,comment:x})}}function p(){var g=a(),y=l(iJ);if(y){if(d(),!l(aJ))return s("property missing ':'");var x=l(oJ),b=g({type:cJ,property:y[0].replace(xN,rf).trim(),value:x?x[0].replace(xN,rf).trim():rf});return l(sJ),b}}function v(){var g=[];f(g);for(var y;y=p();)g.push(y),f(g);return g}return u(),v()}function dJ(e,t){let r=null;if(!e||typeof e!="string")return r;const n=fJ(e),i=typeof t=="function";return n.forEach(a=>{if(a.type!=="declaration")return;const{property:o,value:s}=a;i?t(o,s,a):s&&(r=r??{},r[o]=s)}),r}const _N=kN("end"),Hb=kN("start");function kN(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function hJ(e){const t=Hb(e),r=_N(e);if(t&&r)return{start:t,end:r}}function nf(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?SN(e.position):"start"in e||"end"in e?SN(e):"line"in e||"column"in e?Vb(e):""}function Vb(e){return CN(e&&e.line)+":"+CN(e&&e.column)}function SN(e){return Vb(e&&e.start)+"-"+Vb(e&&e.end)}function CN(e){return e&&typeof e=="number"?e:1}class vr extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",a={},o=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?a.ruleId=n:(a.source=n.slice(0,l),a.ruleId=n.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=nf(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}vr.prototype.file="",vr.prototype.name="",vr.prototype.reason="",vr.prototype.message="",vr.prototype.stack="",vr.prototype.column=void 0,vr.prototype.line=void 0,vr.prototype.ancestors=void 0,vr.prototype.cause=void 0,vr.prototype.fatal=void 0,vr.prototype.place=void 0,vr.prototype.ruleId=void 0,vr.prototype.source=void 0;const Ub={}.hasOwnProperty,pJ=new Map,vJ=/[A-Z]/g,gJ=/-([a-z])/g,mJ=new Set(["table","tbody","thead","tfoot","tr"]),yJ=new Set(["td","th"]),TN="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xJ(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=AJ(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=TJ(r,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?jb:eJ,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=AN(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function AN(e,t,r){if(t.type==="element")return bJ(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return wJ(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return kJ(e,t,r);if(t.type==="mdxjsEsm")return _J(e,t);if(t.type==="root")return SJ(e,t,r);if(t.type==="text")return CJ(e,t)}function bJ(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=jb,e.schema=i),e.ancestors.push(t);const a=DN(e,t.tagName,!1),o=EJ(e,t);let s=Gb(e,t);return mJ.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!$Q(l):!0})),EN(e,o,a,t),$b(o,s),e.ancestors.pop(),e.schema=n,e.create(t,a,o,r)}function wJ(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}af(e,t.position)}function _J(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);af(e,t.position)}function kJ(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=jb,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:DN(e,t.name,!0),o=DJ(e,t),s=Gb(e,t);return EN(e,o,a,t),$b(o,s),e.ancestors.pop(),e.schema=n,e.create(t,a,o,r)}function SJ(e,t,r){const n={};return $b(n,Gb(e,t)),e.create(t,e.Fragment,n,r)}function CJ(e,t){return t.value}function EN(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function $b(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function TJ(e,t,r){return n;function n(i,a,o,s){const u=Array.isArray(o.children)?r:t;return s?u(a,o,s):u(a,o)}}function AJ(e,t){return r;function r(n,i,a,o){const s=Array.isArray(a.children),l=Hb(n);return t(i,a,o,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function EJ(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&Ub.call(t.properties,i)){const a=MJ(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&yJ.has(t.tagName)?n=s:r[o]=s}}if(n){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function DJ(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const a=n.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else af(e,t.position);else{const{name:i}=n;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const s=n.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else af(e,t.position);else a=n.value===null?!0:n.value;r[i]=a}return r}function Gb(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:pJ;for(;++n<t.children.length;){const a=t.children[n];let o;if(e.passKeys){const l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){const u=i.get(l)||0;o=l+"-"+u,i.set(l,u+1)}}const s=AN(e,a,o);s!==void 0&&r.push(s)}return r}function MJ(e,t,r){if(r==null||typeof r=="number"&&Number.isNaN(r))return;const n=ZQ(e.schema,t);return Array.isArray(r)&&(r=n.commaSeparated?BQ(r):tJ(r)),n.property==="style"?["style",typeof r=="object"?e.stylePropertyNameCase==="dom"?r:IJ(r):LJ(e,String(r))]:[e.elementAttributeNameCase==="react"&&n.space?XQ[n.property]||n.property:n.attribute,r]}function LJ(e,t){const r={};try{dJ(t,function(n,i){if(n&&i){let a=n;a.slice(0,2)!=="--"&&(a=a.toLowerCase(),e.stylePropertyNameCase==="dom"&&(a.slice(0,4)==="-ms-"&&(a=a.slice(1)),a=a.replace(gJ,RJ))),r[a]=i}})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,a=new vr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=TN+"#cannot-parse-style-attribute",a}return r}function DN(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const s=lN(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}n=o}else n=lN(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const i=n.value;return Ub.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(n);af(e)}function af(e,t){const r=new vr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=TN+"#cannot-handle-mdx-estrees-without-createevaluater",r}function IJ(e){const t={};let r;for(r in e)Ub.call(e,r)&&(t[PJ(r)]=e[r]);return t}function PJ(e){if(e.slice(0,2)==="--")return e;let t=e.replace(vJ,NJ);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function NJ(e){return"-"+e.toLowerCase()}function RJ(e,t){return t.toUpperCase()}const Wb={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},OJ={};function Yb(e,t){const r=OJ,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return MN(e,n,i)}function MN(e,t,r){if(zJ(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return LN(e.children,t,r)}return Array.isArray(e)?LN(e,t,r):""}function LN(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=MN(e[i],t,r);return n.join("")}function zJ(e){return!!(e&&typeof e=="object")}const IN=document.createElement("i");function Xb(e){const t="&"+e+";";IN.innerHTML=t;const r=IN.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function ei(e,t,r,n){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)o=Array.from(n),o.unshift(t,r),e.splice(...o);else for(r&&e.splice(t,r);a<n.length;)o=n.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Pn(e,t){return e.length>0?(ei(e,e.length,0,t),e):t}const PN={}.hasOwnProperty;function NN(e){const t={};let r=-1;for(;++r<e.length;)FJ(t,e[r]);return t}function FJ(e,t){let r;for(r in t){const i=(PN.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r];let o;if(a)for(o in a){PN.call(i,o)||(i[o]=[]);const s=a[o];BJ(i[o],Array.isArray(s)?s:s?[s]:[])}}}function BJ(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);ei(e,0,0,n)}function RN(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function ti(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const tr=Ha(/[A-Za-z]/),rr=Ha(/[\dA-Za-z]/),jJ=Ha(/[#-'*+\--9=?A-Z^-~]/);function ev(e){return e!==null&&(e<32||e===127)}const qb=Ha(/\d/),HJ=Ha(/[\dA-Fa-f]/),ON=Ha(/[!-/:-@[-`{-~]/);function ze(e){return e!==null&&e<-2}function gt(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const tv=Ha(/\p{P}|\p{S}/u),gs=Ha(/\s/);function Ha(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Ul(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const a=e.charCodeAt(r);let o="";if(a===37&&rr(e.charCodeAt(r+1))&&rr(e.charCodeAt(r+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(r+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(n,r),encodeURIComponent(o)),n=r+i+1,o=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function at(e,t,r,n){const i=n?n-1:1/0;let a=0;return o;function o(l){return Ze(l)?(e.enter(r),s(l)):t(l)}function s(l){return Ze(l)&&a++<i?(e.consume(l),s):(e.exit(r),t(l))}}function zN(e,t,r,n,i,a){let o=0;return s;function s(f){return Ze(f)?(e.enter(n),l(f)):u(f)}function l(f){return Ze(f)&&o<a?(e.consume(f),o++,l):(e.exit(n),u(f))}function u(f){return o>=i?t(f):r(f)}}const VJ={tokenize:UJ};function UJ(e){const t=e.attempt(this.parser.constructs.contentInitial,n,i);let r;return t;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),at(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return ze(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),o)}}let rv=class{constructor(){this.index=new Map,this.map=[]}add(t,r,n){FN(this,t,r,n,!1)}addBefore(t,r,n){FN(this,t,r,n,!0)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let i=n.pop();for(;i;){for(const a of i)t.push(a);i=n.pop()}this.map.length=0,this.index.clear()}};function FN(e,t,r,n,i){if(r===0&&n.length===0)return;const a=e.index.get(t);if(a){a[1]+=r,i?(n.push(...a[2]),a[2]=n):a[2].push(...n);return}const o=[t,r,n];e.map.push(o),e.index.set(t,o)}const $J={tokenize:GJ},BN={tokenize:WJ};function GJ(e){const t=this,r=[];let n=0,i,a,o;return s;function s(S){if(n<r.length){const T=r[n];return t.containerState=T[1],e.attempt(T[0].continuation,l,u)(S)}return u(S)}function l(S){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&_();const T=t.events.length;let E=T,D;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){D=t.events[E][1].end;break}b(n);let L=T;for(;L<t.events.length;)t.events[L][1].end={...D},L++;const R=new rv;return R.add(E+1,0,t.events.slice(T)),R.add(T,L-T,[]),R.consume(t.events),u(S)}return s(S)}function u(S){if(n===r.length){if(!i)return p(S);if(i.currentConstruct&&i.currentConstruct.concrete)return g(S);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(BN,f,d)(S)}function f(S){return i&&_(),b(n),p(S)}function d(S){return t.parser.lazy[t.now().line]=n!==r.length,o=t.now().offset,g(S)}function p(S){return t.containerState={},e.attempt(BN,v,g)(S)}function v(S){return n++,r.push([t.currentConstruct,t.containerState]),p(S)}function g(S){if(S===null){i&&_(),b(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),y(S)}function y(S){if(S===null){x(e.exit("chunkFlow"),!0),b(0),e.consume(S);return}return ze(S)?(e.consume(S),x(e.exit("chunkFlow")),n=0,t.interrupt=void 0,s):(e.consume(S),y)}function x(S,T){const E=t.sliceStream(S);if(T&&E.push(null),S.previous=a,a&&(a.next=S),a=S,i.defineSkip(S.start),i.write(E),t.parser.lazy[S.start.line]){let D=i.events.length;for(;D--;)if(i.events[D][1].start.offset<o&&(!i.events[D][1].end||i.events[D][1].end.offset>o))return;const L=t.events.length;let R=L,O,M;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(O){M=t.events[R][1].end;break}O=!0}for(b(n),D=L;D<t.events.length;)t.events[D][1].end={...M},D++;const P=new rv;P.add(R+1,0,t.events.slice(L)),P.add(L,D-L,[]),P.consume(t.events)}}function b(S){let T=r.length;for(;T-- >S;){const E=r[T];t.containerState=E[1],E[0].exit.call(t,e)}r.length=S}function _(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function WJ(e,t,r){return at(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Va(e){if(e===null||gt(e)||gs(e))return 1;if(tv(e))return 2}function nv(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}const Kb={name:"attention",resolveAll:YJ,tokenize:XJ};function YJ(e,t){let r=-1,n;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){let i=r;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[i][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;const a=e[i][1].end.offset-e[i][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[r][1].start};jN(o,-a),jN(s,a);const l={type:a>1?"strongSequence":"emphasisSequence",start:o,end:{...e[i][1].end}},u={type:a>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:s},f={type:a>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[r][1].start}},d={type:a>1?"strong":"emphasis",start:{...l.start},end:{...u.end}};e[i][1].end={...l.start},e[r][1].start={...u.end},n=[],e[i][1].end.offset-e[i][1].start.offset&&(n=Pn(n,[["enter",e[i][1],t],["exit",e[i][1],t]])),n=Pn(n,[["enter",d,t],["enter",l,t],["exit",l,t],["enter",f,t]]),n=Pn(n,nv(t.parser.constructs.insideSpan.null,e.slice(i+1,r),t)),n=Pn(n,[["exit",f,t],["enter",u,t],["exit",u,t],["exit",d,t]]);let p=0;e[r][1].end.offset-e[r][1].start.offset&&(p=2,n=Pn(n,[["enter",e[r][1],t],["exit",e[r][1],t]])),ei(e,i-1,r-i+3,n),r=i+n.length-p-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function XJ(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Va(n);let a;return o;function o(l){return a=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===a)return e.consume(l),s;const u=e.exit("attentionSequence"),f=Va(l),d=!f||f===2&&i||r.includes(l)&&l!==42&&l!==95,p=!i||i===2&&f||r.includes(n)&&n!==42&&n!==95;return u._open=!!(a===42?d:d&&(i||!p)),u._close=!!(a===42?p:p&&(f||!d)),t(l)}}function jN(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const qJ={name:"autolink",tokenize:KJ};function KJ(e,t,r){let n=0;return i;function i(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(v){return tr(v)?(e.consume(v),o):v===64?r(v):u(v)}function o(v){return v===43||v===45||v===46||rr(v)?(n=1,s(v)):u(v)}function s(v){return v===58?(e.consume(v),n=0,l):(v===43||v===45||v===46||rr(v))&&n++<32?(e.consume(v),s):(n=0,u(v))}function l(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||ev(v)?r(v):(e.consume(v),l)}function u(v){return v===64?(e.consume(v),f):jJ(v)?(e.consume(v),u):r(v)}function f(v){return rr(v)?d(v):r(v)}function d(v){return v===46?(e.consume(v),n=0,f):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):p(v)}function p(v){if((v===45||rr(v))&&n++<63){const g=v===45?p:d;return e.consume(v),g}return r(v)}}const of={partial:!0,tokenize:ZJ};function ZJ(e,t,r){return n;function n(a){return Ze(a)?at(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||ze(a)?t(a):r(a)}}const HN={continuation:{tokenize:JJ},exit:eee,name:"blockQuote",tokenize:QJ};function QJ(e,t,r){const n=this;return i;function i(o){if(o===62){const s=n.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return r(o)}function a(o){return Ze(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function JJ(e,t,r){const n=this;return i;function i(o){return Ze(o)?at(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(HN,t,r)(o)}}function eee(e){e.exit("blockQuote")}const VN={name:"characterEscape",tokenize:tee};function tee(e,t,r){return n;function n(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return ON(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}const UN={name:"characterReference",tokenize:ree};function ree(e,t,r){const n=this;let i=0,a,o;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),a=31,o=rr,f(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=HJ,f):(e.enter("characterReferenceValue"),a=7,o=qb,f(d))}function f(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return o===rr&&!Xb(n.sliceSerialize(p))?r(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<a?(e.consume(d),f):r(d)}}const Zb={partial:!0,tokenize:nee};function nee(e,t,r){const n=this;return i;function i(o){return o===null?r(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}const $N={concrete:!0,name:"codeFenced",tokenize:iee};function iee(e,t,r){const n=this,i={partial:!0,tokenize:E};let a=0,o=0,s;return l;function l(D){return u(D)}function u(D){const L=n.events[n.events.length-1];return a=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,s=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(D)}function f(D){return D===s?(o++,e.consume(D),f):o<3?r(D):(e.exit("codeFencedFenceSequence"),Ze(D)?at(e,d,"whitespace")(D):d(D))}function d(D){return D===null||ze(D)?(e.exit("codeFencedFence"),n.interrupt?t(D):e.check(Zb,y,T)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(D))}function p(D){return D===null||ze(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(D)):Ze(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),at(e,v,"whitespace")(D)):D===96&&D===s?r(D):(e.consume(D),p)}function v(D){return D===null||ze(D)?d(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(D))}function g(D){return D===null||ze(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(D)):D===96&&D===s?r(D):(e.consume(D),g)}function y(D){return e.attempt(i,T,x)(D)}function x(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),b}function b(D){return a>0&&Ze(D)?at(e,_,"linePrefix",a+1)(D):_(D)}function _(D){return D===null||ze(D)?e.check(Zb,y,T)(D):(e.enter("codeFlowValue"),S(D))}function S(D){return D===null||ze(D)?(e.exit("codeFlowValue"),_(D)):(e.consume(D),S)}function T(D){return e.exit("codeFenced"),t(D)}function E(D,L,R){let O=0;return M;function M(K){return D.enter("lineEnding"),D.consume(K),D.exit("lineEnding"),P}function P(K){return D.enter("codeFencedFence"),Ze(K)?at(D,j,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):j(K)}function j(K){return K===s?(D.enter("codeFencedFenceSequence"),B(K)):R(K)}function B(K){return K===s?(O++,D.consume(K),B):O>=o?(D.exit("codeFencedFenceSequence"),Ze(K)?at(D,$,"whitespace")(K):$(K)):R(K)}function $(K){return K===null||ze(K)?(D.exit("codeFencedFence"),L(K)):R(K)}}}const Qb={name:"codeIndented",tokenize:oee},aee={partial:!0,tokenize:see};function oee(e,t,r){return n;function n(s){return e.enter("codeIndented"),zN(e,i,r,"linePrefix",4,4)(s)}function i(s){return s===null?o(s):ze(s)?e.attempt(aee,i,o)(s):(e.enter("codeFlowValue"),a(s))}function a(s){return s===null||ze(s)?(e.exit("codeFlowValue"),i(s)):(e.consume(s),a)}function o(s){return e.exit("codeIndented"),t(s)}}function see(e,t,r){const n=this;return i;function i(o){return n.parser.lazy[n.now().line]?r(o):ze(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):zN(e,t,a,"linePrefix",4,4)(o)}function a(o){return ze(o)?i(o):r(o)}}const lee={name:"codeText",previous:cee,resolve:uee,tokenize:fee};function uee(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="codeTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function cee(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function fee(e,t,r){let n=0,i,a;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),n++,s):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?r(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(a=e.enter("codeTextSequence"),i=0,f(d)):ze(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||ze(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),u)}function f(d){return d===96?(e.consume(d),i++,f):i===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",u(d))}}class dee{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const i=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&sf(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),sf(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),sf(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);sf(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);sf(this.left,r.reverse())}}}function sf(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function GN(e){const t={};let r=-1,n,i,a,o,s,l,u;const f=new dee(e);for(;++r<f.length;){for(;r in t;)r=t[r];if(n=f.get(r),r&&n[1].type==="chunkFlow"&&f.get(r-1)[1].type==="listItemPrefix"&&(l=n[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,hee(f,r)),r=t[r],u=!0);else if(n[1]._container){for(a=r,i=void 0;a--;)if(o=f.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(n[1].end={...f.get(i)[1].start},s=f.slice(i,r),s.unshift(n),f.splice(i,r-i+1,s))}}return ei(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function hee(e,t){const r=e.get(t)[1],n=e.get(t)[2];let i=t-1;const a=[];let o=r._tokenizer;o||(o=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,l=[],u={};let f,d,p=-1,v=r,g=0,y=0;const x=[y];for(;v;){for(;e.get(++i)[1]!==v;);a.push(i),v._tokenizer||(f=n.sliceStream(v),v.next||f.push(null),d&&o.defineSkip(v.start),v._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(f),v._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=v,v=v.next}for(v=r;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(y=p+1,x.push(y),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(o.events=[],v?(v._tokenizer=void 0,v.previous=void 0):x.pop(),p=x.length;p--;){const b=s.slice(x[p],x[p+1]),_=a.pop();l.push([_,_+b.length-1]),e.splice(_,2,b)}for(l.reverse(),p=-1;++p<l.length;)u[g+l[p][0]]=g+l[p][1],g+=l[p][1]-l[p][0]-1;return u}const pee={resolve:gee,tokenize:mee},vee={partial:!0,tokenize:yee};function gee(e){return GN(e),e}function mee(e,t){let r;return n;function n(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):ze(s)?e.check(vee,o,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function yee(e,t,r){const n=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),at(e,a,"linePrefix")}function a(o){if(o===null||ze(o))return r(o);const s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(n.parser.constructs.flow,r,t)(o)}}function WN(e,t,r,n,i,a,o,s,l){const u=l||Number.POSITIVE_INFINITY;let f=0;return d;function d(b){return b===60?(e.enter(n),e.enter(i),e.enter(a),e.consume(b),e.exit(a),p):b===null||b===32||b===41||ev(b)?r(b):(e.enter(n),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(b))}function p(b){return b===62?(e.enter(a),e.consume(b),e.exit(a),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),v(b))}function v(b){return b===62?(e.exit("chunkString"),e.exit(s),p(b)):b===null||b===60||ze(b)?r(b):(e.consume(b),b===92?g:v)}function g(b){return b===60||b===62||b===92?(e.consume(b),v):v(b)}function y(b){return!f&&(b===null||b===41||gt(b))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(n),t(b)):f<u&&b===40?(e.consume(b),f++,y):b===41?(e.consume(b),f--,y):b===null||b===32||b===40||ev(b)?r(b):(e.consume(b),b===92?x:y)}function x(b){return b===40||b===41||b===92?(e.consume(b),y):y(b)}}function YN(e,t,r,n,i,a){const o=this;let s=0,l;return u;function u(v){return e.enter(n),e.enter(i),e.consume(v),e.exit(i),e.enter(a),f}function f(v){return s>999||v===null||v===91||v===93&&!l||v===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?r(v):v===93?(e.exit(a),e.enter(i),e.consume(v),e.exit(i),e.exit(n),t):ze(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===null||v===91||v===93||ze(v)||s++>999?(e.exit("chunkString"),f(v)):(e.consume(v),l||(l=!Ze(v)),v===92?p:d)}function p(v){return v===91||v===92||v===93?(e.consume(v),s++,d):d(v)}}function XN(e,t,r,n,i,a){let o;return s;function s(p){return p===34||p===39||p===40?(e.enter(n),e.enter(i),e.consume(p),e.exit(i),o=p===40?41:p,l):r(p)}function l(p){return p===o?(e.enter(i),e.consume(p),e.exit(i),e.exit(n),t):(e.enter(a),u(p))}function u(p){return p===o?(e.exit(a),l(o)):p===null?r(p):ze(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),at(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===o||p===null||ze(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?d:f)}function d(p){return p===o||p===92?(e.consume(p),f):f(p)}}function lf(e,t){let r;return n;function n(i){return ze(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):Ze(i)?at(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}const xee={name:"definition",tokenize:wee},bee={partial:!0,tokenize:_ee};function wee(e,t,r){const n=this;let i;return a;function a(v){return e.enter("definition"),o(v)}function o(v){return YN.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function s(v){return i=ti(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),l):r(v)}function l(v){return gt(v)?lf(e,u)(v):u(v)}function u(v){return WN(e,f,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function f(v){return e.attempt(bee,d,d)(v)}function d(v){return Ze(v)?at(e,p,"whitespace")(v):p(v)}function p(v){return v===null||ze(v)?(e.exit("definition"),n.parser.defined.push(i),t(v)):r(v)}}function _ee(e,t,r){return n;function n(s){return gt(s)?lf(e,i)(s):r(s)}function i(s){return XN(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Ze(s)?at(e,o,"whitespace")(s):o(s)}function o(s){return s===null||ze(s)?t(s):r(s)}}const kee={name:"hardBreakEscape",tokenize:See};function See(e,t,r){return n;function n(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return ze(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const Cee={name:"headingAtx",resolve:Tee,tokenize:Aee};function Tee(e,t){let r=e.length-2,n=3;if(e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n){const i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},a={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"};ei(e,n,r-n+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])}return e}function Aee(e,t,r){let n=0;return i;function i(f){return e.enter("atxHeading"),a(f)}function a(f){return e.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&n++<6?(e.consume(f),o):f===null||gt(f)?(e.exit("atxHeadingSequence"),s(f)):r(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),l(f)):f===null||ze(f)?(e.exit("atxHeading"),t(f)):Ze(f)?at(e,s,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function l(f){return f===35?(e.consume(f),l):(e.exit("atxHeadingSequence"),s(f))}function u(f){return f===null||f===35||gt(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),u)}}const qN=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Jb=["pre","script","style","textarea"],Eee={concrete:!0,name:"htmlFlow",resolveTo:Mee,tokenize:Lee},Dee={partial:!0,tokenize:Iee};function Mee(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Lee(e,t,r){const n=this;let i,a,o,s,l;return u;function u(F){return f(F)}function f(F){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(F),d}function d(F){return F===33?(e.consume(F),p):F===47?(e.consume(F),a=!0,y):F===63?(e.consume(F),i=3,n.interrupt?t:I):tr(F)?(e.consume(F),o=String.fromCharCode(F),x):r(F)}function p(F){return F===45?(e.consume(F),i=2,v):F===91?(e.consume(F),i=5,s=0,g):tr(F)?(e.consume(F),i=4,n.interrupt?t:I):r(F)}function v(F){return F===45?(e.consume(F),n.interrupt?t:I):r(F)}function g(F){const ee="CDATA[";return F===ee.charCodeAt(s++)?(e.consume(F),s===ee.length?n.interrupt?t:j:g):r(F)}function y(F){return tr(F)?(e.consume(F),o=String.fromCharCode(F),x):r(F)}function x(F){if(F===null||F===47||F===62||gt(F)){const ee=F===47,ae=o.toLowerCase();return!ee&&!a&&Jb.includes(ae)?(i=1,n.interrupt?t(F):j(F)):qN.includes(o.toLowerCase())?(i=6,ee?(e.consume(F),b):n.interrupt?t(F):j(F)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(F):a?_(F):S(F))}return F===45||rr(F)?(e.consume(F),o+=String.fromCharCode(F),x):r(F)}function b(F){return F===62?(e.consume(F),n.interrupt?t:j):r(F)}function _(F){return Ze(F)?(e.consume(F),_):M(F)}function S(F){return F===47?(e.consume(F),M):F===58||F===95||tr(F)?(e.consume(F),T):Ze(F)?(e.consume(F),S):M(F)}function T(F){return F===45||F===46||F===58||F===95||rr(F)?(e.consume(F),T):E(F)}function E(F){return F===61?(e.consume(F),D):Ze(F)?(e.consume(F),E):S(F)}function D(F){return F===null||F===60||F===61||F===62||F===96?r(F):F===34||F===39?(e.consume(F),l=F,L):Ze(F)?(e.consume(F),D):R(F)}function L(F){return F===l?(e.consume(F),l=null,O):F===null||ze(F)?r(F):(e.consume(F),L)}function R(F){return F===null||F===34||F===39||F===47||F===60||F===61||F===62||F===96||gt(F)?E(F):(e.consume(F),R)}function O(F){return F===47||F===62||Ze(F)?S(F):r(F)}function M(F){return F===62?(e.consume(F),P):r(F)}function P(F){return F===null||ze(F)?j(F):Ze(F)?(e.consume(F),P):r(F)}function j(F){return F===45&&i===2?(e.consume(F),Z):F===60&&i===1?(e.consume(F),re):F===62&&i===4?(e.consume(F),z):F===63&&i===3?(e.consume(F),I):F===93&&i===5?(e.consume(F),G):ze(F)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Dee,W,B)(F)):F===null||ze(F)?(e.exit("htmlFlowData"),B(F)):(e.consume(F),j)}function B(F){return e.check(Zb,$,W)(F)}function $(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),K}function K(F){return F===null||ze(F)?B(F):(e.enter("htmlFlowData"),j(F))}function Z(F){return F===45?(e.consume(F),I):j(F)}function re(F){return F===47?(e.consume(F),o="",Y):j(F)}function Y(F){if(F===62){const ee=o.toLowerCase();return Jb.includes(ee)?(e.consume(F),z):j(F)}return tr(F)&&o.length<8?(e.consume(F),o+=String.fromCharCode(F),Y):j(F)}function G(F){return F===93?(e.consume(F),I):j(F)}function I(F){return F===62?(e.consume(F),z):F===45&&i===2?(e.consume(F),I):j(F)}function z(F){return F===null||ze(F)?(e.exit("htmlFlowData"),W(F)):(e.consume(F),z)}function W(F){return e.exit("htmlFlow"),t(F)}}function Iee(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(of,t,r)}}const Pee={name:"htmlText",tokenize:Nee};function Nee(e,t,r){const n=this;let i,a,o;return s;function s(I){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(I),l}function l(I){return I===33?(e.consume(I),u):I===47?(e.consume(I),E):I===63?(e.consume(I),S):tr(I)?(e.consume(I),R):r(I)}function u(I){return I===45?(e.consume(I),f):I===91?(e.consume(I),a=0,g):tr(I)?(e.consume(I),_):r(I)}function f(I){return I===45?(e.consume(I),v):r(I)}function d(I){return I===null?r(I):I===45?(e.consume(I),p):ze(I)?(o=d,re(I)):(e.consume(I),d)}function p(I){return I===45?(e.consume(I),v):d(I)}function v(I){return I===62?Z(I):I===45?p(I):d(I)}function g(I){const z="CDATA[";return I===z.charCodeAt(a++)?(e.consume(I),a===z.length?y:g):r(I)}function y(I){return I===null?r(I):I===93?(e.consume(I),x):ze(I)?(o=y,re(I)):(e.consume(I),y)}function x(I){return I===93?(e.consume(I),b):y(I)}function b(I){return I===62?Z(I):I===93?(e.consume(I),b):y(I)}function _(I){return I===null||I===62?Z(I):ze(I)?(o=_,re(I)):(e.consume(I),_)}function S(I){return I===null?r(I):I===63?(e.consume(I),T):ze(I)?(o=S,re(I)):(e.consume(I),S)}function T(I){return I===62?Z(I):S(I)}function E(I){return tr(I)?(e.consume(I),D):r(I)}function D(I){return I===45||rr(I)?(e.consume(I),D):L(I)}function L(I){return ze(I)?(o=L,re(I)):Ze(I)?(e.consume(I),L):Z(I)}function R(I){return I===45||rr(I)?(e.consume(I),R):I===47||I===62||gt(I)?O(I):r(I)}function O(I){return I===47?(e.consume(I),Z):I===58||I===95||tr(I)?(e.consume(I),M):ze(I)?(o=O,re(I)):Ze(I)?(e.consume(I),O):Z(I)}function M(I){return I===45||I===46||I===58||I===95||rr(I)?(e.consume(I),M):P(I)}function P(I){return I===61?(e.consume(I),j):ze(I)?(o=P,re(I)):Ze(I)?(e.consume(I),P):O(I)}function j(I){return I===null||I===60||I===61||I===62||I===96?r(I):I===34||I===39?(e.consume(I),i=I,B):ze(I)?(o=j,re(I)):Ze(I)?(e.consume(I),j):(e.consume(I),$)}function B(I){return I===i?(e.consume(I),i=void 0,K):I===null?r(I):ze(I)?(o=B,re(I)):(e.consume(I),B)}function $(I){return I===null||I===34||I===39||I===60||I===61||I===96?r(I):I===47||I===62||gt(I)?O(I):(e.consume(I),$)}function K(I){return I===47||I===62||gt(I)?O(I):r(I)}function Z(I){return I===62?(e.consume(I),e.exit("htmlTextData"),e.exit("htmlText"),t):r(I)}function re(I){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),Y}function Y(I){return Ze(I)?at(e,G,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):G(I)}function G(I){return e.enter("htmlTextData"),o(I)}}const ew={name:"labelEnd",resolveAll:Fee,resolveTo:Bee,tokenize:jee},Ree={tokenize:Hee},Oee={tokenize:Vee},zee={tokenize:Uee};function Fee(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const i=n.type==="labelImage"?4:2;n.type="data",t+=i}}return e.length!==r.length&&ei(e,0,e.length,r),e}function Bee(e,t){let r=e.length,n=0,i,a,o;for(;r--;){const f=e[r][1];if(i){if(f.type==="link"||f.type==="labelLink"&&f._inactive)break;e[r][0]==="enter"&&f.type==="labelLink"&&(f._inactive=!0)}else if(a){if(e[r][0]==="enter"&&(f.type==="labelImage"||f.type==="labelLink")&&!f._balanced&&(i=r,f.type!=="labelLink")){n=2;break}}else f.type==="labelEnd"&&(a=r)}const s={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[i][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[i+n+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",s,t],["enter",l,t]],o=Pn(o,e.slice(i+1,i+n+3)),o=Pn(o,[["enter",u,t]]),o=Pn(o,nv(t.parser.constructs.insideSpan.null,e.slice(i+n+4,a-3),t)),o=Pn(o,[["exit",u,t],e[a-2],e[a-1],["exit",l,t]]),o=Pn(o,e.slice(a+1)),o=Pn(o,[["exit",s,t]]),ei(e,i,e.length,o),e}function jee(e,t,r){const n=this,i=n._labelStarts;let a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(p){return a?a._inactive?d(p):(o=n.parser.defined.includes(ti(n.sliceSerialize({start:a.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):r(p)}function l(p){return p===40?e.attempt(Ree,f,o?f:d)(p):p===91?e.attempt(Oee,f,o?u:d)(p):o?f(p):d(p)}function u(p){return e.attempt(zee,f,d)(p)}function f(p){return i.pop(),t(p)}function d(p){return a._balanced=!0,r(p)}}function Hee(e,t,r){return n;function n(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return gt(d)?lf(e,a)(d):a(d)}function a(d){return d===41?f(d):WN(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return gt(d)?lf(e,l)(d):f(d)}function s(d){return r(d)}function l(d){return d===34||d===39||d===40?XN(e,u,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):f(d)}function u(d){return gt(d)?lf(e,f)(d):f(d)}function f(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):r(d)}}function Vee(e,t,r){const n=this;return i;function i(s){return YN.call(n,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return n.parser.defined.includes(ti(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function o(s){return r(s)}}function Uee(e,t,r){return n;function n(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}const $ee={name:"labelStartImage",resolveAll:ew.resolveAll,tokenize:Gee};function Gee(e,t,r){const n=this;let i;return a;function a(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o}function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),i=e.exit("labelImage"),s):r(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(l):(n._labelStarts=n._labelStarts||[],n._labelStarts.push(i),t(l))}}const Wee={name:"labelStartLink",resolveAll:ew.resolveAll,tokenize:Yee};function Yee(e,t,r){const n=this;let i;return a;function a(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),i=e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):(n._labelStarts=n._labelStarts||[],n._labelStarts.push(i),t(s))}}const tw={name:"lineEnding",tokenize:Xee};function Xee(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),at(e,t,"linePrefix")}}const iv={name:"thematicBreak",tokenize:qee};function qee(e,t,r){let n=0,i;return a;function a(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):n>=3&&(u===null||ze(u))?(e.exit("thematicBreak"),t(u)):r(u)}function l(u){return u===i?(e.consume(u),n++,l):(e.exit("thematicBreakSequence"),Ze(u)?at(e,s,"whitespace")(u):s(u))}}const Vr={continuation:{tokenize:Jee},exit:tte,name:"list",tokenize:Qee},Kee={partial:!0,tokenize:rte},Zee={partial:!0,tokenize:ete};function Qee(e,t,r){const n=this,i=n.events[n.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(v){const g=n.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!n.containerState.marker||v===n.containerState.marker:qb(v)){if(n.containerState.type||(n.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(iv,r,u)(v):u(v);if(!n.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(v)}return r(v)}function l(v){return qb(v)&&++o<10?(e.consume(v),l):(!n.interrupt||o<2)&&(n.containerState.marker?v===n.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),u(v)):r(v)}function u(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||v,e.check(of,n.interrupt?r:f,e.attempt(Kee,p,d))}function f(v){return n.containerState.initialBlankLine=!0,a++,p(v)}function d(v){return Ze(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),p):r(v)}function p(v){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function Jee(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(of,i,a);function i(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,at(e,t,"listItemIndent",n.containerState.size+1)(s)}function a(s){return n.containerState.furtherBlankLines||!Ze(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Zee,t,o)(s))}function o(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,at(e,e.attempt(Vr,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function ete(e,t,r){const n=this;return at(e,i,"listItemIndent",n.containerState.size+1);function i(a){const o=n.events[n.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===n.containerState.size?t(a):r(a)}}function tte(e){e.exit(this.containerState.type)}function rte(e,t,r){const n=this;return at(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=n.events[n.events.length-1];return!Ze(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const KN={name:"setextUnderline",resolveTo:nte,tokenize:ite};function nte(e,t){const r=new rv;let n=e.length,i,a,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&r.add(n,1,[]),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",o?(r.add(a,0,[["enter",s,t]]),r.add(o+1,0,[["exit",e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,r.add(e.length,0,[["exit",s,t]]),r.consume(e),e}function ite(e,t,r){const n=this;let i;return a;function a(u){let f=n.events.length,d;for(;f--;)if(n.events[f][1].type!=="lineEnding"&&n.events[f][1].type!=="linePrefix"&&n.events[f][1].type!=="content"){d=n.events[f][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||d)?(e.enter("setextHeadingLine"),i=u,o(u)):r(u)}function o(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),Ze(u)?at(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||ze(u)?(e.exit("setextHeadingLine"),t(u)):r(u)}}const ate={tokenize:ote};function ote(e){const t=this,r=e.attempt(of,n,e.attempt(this.parser.constructs.flowInitial,i,at(e,e.attempt(this.parser.constructs.flow,i,e.attempt(pee,i)),"linePrefix")));return r;function n(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const ste={resolveAll:QN()},lte=ZN("string"),ute=ZN("text");function ZN(e){return{resolveAll:QN(e==="text"?cte:void 0),tokenize:t};function t(r){const n=this,i=this.parser.constructs[e],a=r.attempt(i,o,s);return o;function o(f){return u(f)?a(f):s(f)}function s(f){if(f===null){r.consume(f);return}return r.enter("data"),r.consume(f),l}function l(f){return u(f)?(r.exit("data"),a(f)):(r.consume(f),l)}function u(f){if(f===null)return!0;const d=i[f];let p=-1;if(d)for(;++p<d.length;){const v=d[p];if(!v.previous||v.previous.call(n,n.previous))return!0}return!1}}}function QN(e){return t;function t(r,n){let i=-1,a;for(;++i<=r.length;)a===void 0?r[i]&&r[i][1].type==="data"&&(a=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==a+2&&(r[a][1].end=r[i-1][1].end,r.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(r,n):r}}function cte(e,t){const r=new rv;let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],a=t.sliceStream(i);let o=a.length,s=-1,l=0,u;for(;o--;){const f=a[o];if(typeof f=="string"){for(s=f.length;f.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(f===-2)u=!0,l++;else if(f!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const f={type:n===e.length||u||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-l,offset:i.end.offset-l},end:{...i.end}};i.end={...f.start},i.start.offset===i.end.offset?Object.assign(i,f):r.add(n,0,[["enter",f,t],["exit",f,t]])}n++}return r.consume(e),e}const fte=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:xee},disable:{null:[]},document:{42:Vr,43:Vr,45:Vr,48:Vr,49:Vr,50:Vr,51:Vr,52:Vr,53:Vr,54:Vr,55:Vr,56:Vr,57:Vr,62:HN},flow:{35:Cee,42:iv,45:[KN,iv],60:Eee,61:KN,95:iv,96:$N,126:$N},flowInitial:{[-2]:Qb,[-1]:Qb,32:Qb},insideSpan:{null:[Kb,ste]},string:{38:UN,92:VN},text:{[-5]:tw,[-4]:tw,[-3]:tw,33:$ee,38:UN,42:Kb,60:[qJ,Pee],91:Wee,92:[kee,VN],93:ew,95:Kb,96:lee}},Symbol.toStringTag,{value:"Module"}));function dte(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const i={},a=[];let o=[],s=[];const l={attempt:L(E),check:L(D),consume:_,enter:S,exit:T,interrupt:L(D,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:v,write:d};let f=t.tokenize.call(u,l);return t.resolveAll&&a.push(t),u;function d(P){return o=Pn(o,P),x(),o[o.length-1]!==null?[]:(R(t,0),u.events=nv(a,u.events,u),u.events)}function p(P,j){return pte(v(P),j)}function v(P){return hte(o,P)}function g(){const{_bufferIndex:P,_index:j,line:B,column:$,offset:K}=n;return{_bufferIndex:P,_index:j,line:B,column:$,offset:K}}function y(P){i[P.line]=P.column,M()}function x(){for(;n._index<o.length;){const P=o[n._index];if(typeof P=="string"){const j=n._index;for(n._bufferIndex<0&&(n._bufferIndex=0);n._index===j&&n._bufferIndex<P.length;)b(P.charCodeAt(n._bufferIndex))}else b(P)}}function b(P){f=f(P)}function _(P){ze(P)?(n.line++,n.column=1,n.offset+=P===-3?2:1,M()):P!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===o[n._index].length&&(n._bufferIndex=-1,n._index++)),u.previous=P}function S(P,j){const B=j||{};return B.type=P,B.start=g(),u.events.push(["enter",B,u]),s.push(B),B}function T(P){const j=s.pop();return j.end=g(),u.events.push(["exit",j,u]),j}function E(P,j){R(P,j.from)}function D(P,j){j.restore()}function L(P,j){return B;function B($,K,Z){let re,Y,G,I;return Array.isArray($)?W($):"tokenize"in $?W([$]):z($);function z(ie){return _e;function _e(be){const xe=be!==null&&ie[be],Se=be!==null&&ie.null,Le=[...Array.isArray(xe)?xe:xe?[xe]:[],...Array.isArray(Se)?Se:Se?[Se]:[]];return W(Le)(be)}}function W(ie){return re=ie,Y=0,ie.length===0?Z:F(ie[Y])}function F(ie){return _e;function _e(be){return I=O(),G=ie,ie.partial||(u.currentConstruct=ie),ie.name&&u.parser.constructs.disable.null.includes(ie.name)?ae():ie.tokenize.call(j?Object.assign(Object.create(u),j):u,l,ee,ae)(be)}}function ee(ie){return P(G,I),K}function ae(ie){return I.restore(),++Y<re.length?F(re[Y]):Z}}}function R(P,j){P.resolveAll&&!a.includes(P)&&a.push(P),P.resolve&&ei(u.events,j,u.events.length-j,P.resolve(u.events.slice(j),u)),P.resolveTo&&(u.events=P.resolveTo(u.events,u))}function O(){const P=g(),j=u.previous,B=u.currentConstruct,$=u.events.length,K=Array.from(s);return{from:$,restore:Z};function Z(){n=P,u.previous=j,u.currentConstruct=B,u.events.length=$,s=K,M()}}function M(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function hte(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(r===i)o=[e[r].slice(n,a)];else{if(o=e.slice(r,i),n>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(n):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function pte(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const a=e[r];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
|
|
45
|
+
`;break}case-3:{o=`\r
|
|
46
|
+
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,n.push(o)}return n.join("")}function vte(e){const n={constructs:NN([fte,...(e||{}).extensions||[]]),content:i(VJ),defined:[],document:i($J),flow:i(ate),lazy:{},string:i(lte),text:i(ute)};return n;function i(a){return o;function o(s){return dte(n,a,s)}}}function gte(e){for(;!GN(e););return e}const JN=/[\0\t\n\r]/g;function mte(){let e=1,t="",r=!0,n;return i;function i(a,o,s){a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a));const l=[];let u=0;for(t="",r&&(a.charCodeAt(0)===65279&&u++,r=void 0);u<a.length;){JN.lastIndex=u;const f=JN.exec(a),d=f&&f.index!==void 0?f.index:a.length,p=a.charCodeAt(d);if(!f){t=a.slice(u);break}if(p===10&&u===d&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),u<d&&(l.push(a.slice(u,d)),e+=d-u),p){case 0:{l.push(65533),e++;break}case 9:{const v=Math.ceil(e/4)*4;for(l.push(-2);e++<v;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:n=!0,e=1}u=d+1}return s&&(n&&l.push(-5),t&&l.push(t),l.push(null)),l}}const yte=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function xte(e){return e.replace(yte,bte)}function bte(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const i=r.charCodeAt(1),a=i===120||i===88;return RN(r.slice(a?2:1),a?16:10)}return Xb(r)||e}const eR={}.hasOwnProperty;function wte(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),_te(r)(gte(vte(r).document().write(mte()(e,t,!0))))}function _te(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ei),autolinkProtocol:M,autolinkEmail:M,atxHeading:o(Dr),blockQuote:o(Le),characterEscape:M,characterReference:M,codeFenced:o(Xe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(Xe,s),codeText:o(nr,s),codeTextData:M,data:M,codeFlowValue:M,definition:o(Tt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(nn),hardBreakEscape:o(Ur),hardBreakTrailing:o(Ur),htmlFlow:o(xs,s),htmlFlowData:M,htmlText:o(xs,s),htmlTextData:M,image:o(Nn),label:s,link:o(Ei),listItem:o(Ji),listItemValue:v,listOrdered:o(an,p),listUnordered:o(an),paragraph:o(xv),reference:ee,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Dr),strong:o(bv),thematicBreak:o(_v)},exit:{atxHeading:u(),atxHeadingSequence:D,autolink:u(),autolinkEmail:Se,autolinkProtocol:xe,blockQuote:u(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:_e,characterReference:be,codeFenced:u(b),codeFencedFence:x,codeFencedFenceInfo:g,codeFencedFenceMeta:y,codeFlowValue:P,codeIndented:u(_),codeText:u(Z),codeTextData:P,data:P,definition:u(),definitionDestinationString:E,definitionLabelString:S,definitionTitleString:T,emphasis:u(),hardBreakEscape:u(B),hardBreakTrailing:u(B),htmlFlow:u($),htmlFlowData:P,htmlText:u(K),htmlTextData:P,image:u(Y),label:I,labelText:G,lineEnding:j,link:u(re),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ae,resourceDestinationString:z,resourceTitleString:W,resource:F,setextHeading:u(O),setextHeadingLineSequence:R,setextHeadingText:L,strong:u(),thematicBreak:u()}};tR(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(ne){let de={type:"root",children:[],position:void 0};const He={stack:[de],tokenStack:[],config:t,enter:l,exit:f,buffer:s,resume:d,data:r},Ue=[],Vt=[];let mt=-1;for(;++mt<ne.length;)if(Vt.push(ne[mt]),ne[mt][1].type==="listOrdered"||ne[mt][1].type==="listUnordered")if(ne[mt][0]==="enter")Ue.push(Vt.length-1);else{const ir=Ue.pop();a(Vt,ir)}for(ne=Vt,mt=-1;++mt<ne.length;){const ir=t[ne[mt][0]];ne[mt][0]==="enter"&&t.beforeEnter.length>0&&i(t.beforeEnter,{...He,sliceSerialize:ne[mt][2].sliceSerialize},ne[mt][1]),eR.call(ir,ne[mt][1].type)&&ir[ne[mt][1].type].call({...He,sliceSerialize:ne[mt][2].sliceSerialize},ne[mt][1]),ne[mt][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...He,sliceSerialize:ne[mt][2].sliceSerialize},ne[mt][1])}if(He.tokenStack.length>0){const ir=He.tokenStack[He.tokenStack.length-1];(ir[1]||rR).call(He,void 0,ir[0])}for(de.position={start:Ua(ne.length>0?ne[0][1].start:{line:1,column:1,offset:0}),end:Ua(ne.length>0?ne[ne.length-2][1].end:{line:1,column:1,offset:0})},mt=-1;++mt<t.transforms.length;)de=t.transforms[mt](de)||de;return de}function i(ne,de,He){let Ue=-1;for(;++Ue<ne.length;)ne[Ue].call(de,He)}function a(ne,de){const He=ne.length-1;let Ue=de-1,Vt=-1,mt=!1,ir,on,bs,ea;const ta=[];for(;++Ue<=He;){const ar=ne[Ue];switch(ar[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ar[0]==="enter"?Vt++:Vt--,ea=void 0;break}case"lineEndingBlank":{ar[0]==="enter"&&(ir&&!ea&&!Vt&&!bs&&(bs=Ue),ea=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ea=void 0}if(!Vt&&ar[0]==="enter"&&ar[1].type==="listItemPrefix"||Vt===-1&&ar[0]==="exit"&&(ar[1].type==="listUnordered"||ar[1].type==="listOrdered")){if(ir){let sn=Ue;for(on=void 0;sn--;){const gr=ne[sn];if(gr[1].type==="lineEnding"||gr[1].type==="lineEndingBlank"){if(gr[0]==="exit")continue;on&&(ne[on][1].type="lineEndingBlank",mt=!0),gr[1].type="lineEnding",on=sn}else if(!(gr[1].type==="linePrefix"||gr[1].type==="blockQuotePrefix"||gr[1].type==="blockQuotePrefixWhitespace"||gr[1].type==="blockQuoteMarker"||gr[1].type==="listItemIndent"))break}bs&&(!on||bs<on)&&(ir._spread=!0),ir.end=Object.assign({},on?ne[on][1].start:ar[1].end),ta.push({at:on||Ue,event:["exit",ir,ar[2]]})}if(ar[1].type==="listItemPrefix"){const sn={type:"listItem",_spread:!1,start:Object.assign({},ar[1].start),end:void 0};ir=sn,ta.push({at:Ue,event:["enter",sn,ar[2]]}),bs=void 0,ea=!0}}}const Yl=ne.splice(de);let ws=0;for(Ue=-1;++Ue<Yl.length;){for(;ws<ta.length&&ta[ws].at===de+Ue;)ne.push(ta[ws++].event);ne.push(Yl[Ue])}ne[de][1]._spread=mt}function o(ne,de){return He;function He(Ue){l.call(this,ne(Ue),Ue),de&&de.call(this,Ue)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(ne,de,He){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([de,He||void 0]),ne.position={start:Ua(de.start),end:void 0}}function u(ne){return de;function de(He){ne&&ne.call(this,He),f.call(this,He)}}function f(ne,de){const He=this.stack.pop(),Ue=this.tokenStack.pop();if(!Ue)throw new Error("Cannot close `"+ne.type+"` ("+nf({start:ne.start,end:ne.end})+"): it’s not open");Ue[0].type!==ne.type&&(de?de.call(this,ne,Ue[0]):(Ue[1]||rR).call(this,ne,Ue[0])),He.position.end=Ua(ne.end)}function d(){return Yb(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function v(ne){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(ne),10),this.data.expectingFirstListItemValue=void 0}}function g(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.lang=ne}function y(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.meta=ne}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne.replace(/(\r?\n|\r)$/g,"")}function S(ne){const de=this.resume(),He=this.stack[this.stack.length-1];He.label=de,He.identifier=ti(this.sliceSerialize(ne)).toLowerCase()}function T(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.title=ne}function E(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.url=ne}function D(ne){const de=this.stack[this.stack.length-1];if(!de.depth){const He=this.sliceSerialize(ne).length;de.depth=He}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function R(ne){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function M(ne){const He=this.stack[this.stack.length-1].children;let Ue=He[He.length-1];(!Ue||Ue.type!=="text")&&(Ue=wv(),Ue.position={start:Ua(ne.start),end:void 0},He.push(Ue)),this.stack.push(Ue)}function P(ne){const de=this.stack.pop();de.value+=this.sliceSerialize(ne),de.position.end=Ua(ne.end)}function j(ne){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const He=de.children[de.children.length-1];He.position.end=Ua(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(de.type)&&(M.call(this,ne),P.call(this,ne))}function B(){this.data.atHardBreak=!0}function $(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne}function K(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne}function Z(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne}function re(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=de,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function Y(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=de,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function G(ne){const de=this.sliceSerialize(ne),He=this.stack[this.stack.length-2];He.label=xte(de),He.identifier=ti(de).toLowerCase()}function I(){const ne=this.stack[this.stack.length-1],de=this.resume(),He=this.stack[this.stack.length-1];if(this.data.inReference=!0,He.type==="link"){const Ue=ne.children;He.children=Ue}else He.alt=de}function z(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.url=ne}function W(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.title=ne}function F(){this.data.inReference=void 0}function ee(){this.data.referenceType="collapsed"}function ae(ne){const de=this.resume(),He=this.stack[this.stack.length-1];He.label=de,He.identifier=ti(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function ie(ne){this.data.characterReferenceType=ne.type}function _e(ne){const de=this.sliceSerialize(ne),He=this.data.characterReferenceType;let Ue;He?(Ue=RN(de,He==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ue=Xb(de);const Vt=this.stack[this.stack.length-1];Vt.value+=Ue}function be(ne){const de=this.stack.pop();de.position.end=Ua(ne.end)}function xe(ne){P.call(this,ne);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(ne)}function Se(ne){P.call(this,ne);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(ne)}function Le(){return{type:"blockquote",children:[],position:void 0}}function Xe(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function nr(){return{type:"inlineCode",value:"",position:void 0}}function Tt(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function nn(){return{type:"emphasis",children:[],position:void 0}}function Dr(){return{type:"heading",depth:0,children:[],position:void 0}}function Ur(){return{type:"break",position:void 0}}function xs(){return{type:"html",value:"",position:void 0}}function Nn(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function Ei(){return{type:"link",title:null,url:"",children:[],position:void 0}}function an(ne){return{type:"list",ordered:ne.type==="listOrdered",start:null,spread:ne._spread,children:[],position:void 0}}function Ji(ne){return{type:"listItem",spread:ne._spread,checked:null,children:[],position:void 0}}function xv(){return{type:"paragraph",children:[],position:void 0}}function bv(){return{type:"strong",children:[],position:void 0}}function wv(){return{type:"text",value:"",position:void 0}}function _v(){return{type:"thematicBreak",position:void 0}}}function Ua(e){return{line:e.line,column:e.column,offset:e.offset}}function tR(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?tR(e,n):kte(e,n)}}function kte(e,t){let r;for(r in t)if(eR.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"afterExit":case"beforeEnter":{const n=t[r];n&&e[r].push(n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function rR(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+nf({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+nf({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+nf({start:t.start,end:t.end})+") is still open")}function Ste(e){const t=this;t.parser=r;function r(n){return wte(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Cte(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function Tte(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
47
|
+
`}]}function Ate(e,t){const r=t.value?t.value+`
|
|
48
|
+
`:"",n={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(n.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function Ete(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Dte(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Mte(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=Ul(n.toLowerCase()),a=e.footnoteOrder.indexOf(n);let o,s=e.footnoteCounts.get(n);s===void 0?(s=0,e.footnoteOrder.push(n),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(n,s);const l={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function Lte(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ite(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function nR(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=n:i.push({type:"text",value:n}),i}function Pte(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return nR(e,t);const i={src:Ul(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Nte(e,t){const r={src:Ul(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function Rte(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function Ote(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return nR(e,t);const i={href:Ul(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function zte(e,t){const r={href:Ul(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fte(e,t,r){const n=e.all(t),i=r?Bte(r):iR(t),a={},o=[];if(typeof t.checked=="boolean"){const f=n[0];let d;f&&f.type==="element"&&f.tagName==="p"?d=f:(d={type:"element",tagName:"p",properties:{},children:[]},n.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<n.length;){const f=n[s];(i||s!==0||f.type!=="element"||f.tagName!=="p")&&o.push({type:"text",value:`
|
|
49
|
+
`}),f.type==="element"&&f.tagName==="p"&&!i?o.push(...f.children):o.push(f)}const l=n[n.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
|
|
50
|
+
`});const u={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,u),e.applyData(t,u)}function Bte(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=iR(r[n])}return t}function iR(e){const t=e.spread;return t??e.children.length>1}function jte(e,t){const r={},n=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++i<n.length;){const o=n[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,a),e.applyData(t,a)}function Hte(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Vte(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function Ute(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function $te(e,t){const r=e.all(t),n=r.shift(),i=[];if(n){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],o),i.push(o)}if(r.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},s=Hb(t.children[1]),l=_N(t.children[t.children.length-1]);s&&l&&(o.position={start:s,end:l}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Gte(e,t,r){const n=r?r.children:void 0,a=(n?n.indexOf(t):1)===0?"th":"td",o=r&&r.type==="table"?r.align:void 0,s=o?o.length:t.children.length;let l=-1;const u=[];for(;++l<s;){const d=t.children[l],p={},v=o?o[l]:void 0;v&&(p.align=v);let g={type:"element",tagName:a,properties:p,children:[]};d&&(g.children=e.all(d),e.patch(d,g),g=e.applyData(d,g)),u.push(g)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function Wte(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const aR=9,oR=32;function Yte(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const a=[];for(;n;)a.push(sR(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return a.push(sR(t.slice(i),i>0,!1)),a.join("")}function sR(e,t,r){let n=0,i=e.length;if(t){let a=e.codePointAt(n);for(;a===aR||a===oR;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(i-1);for(;a===aR||a===oR;)i--,a=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function Xte(e,t){const r={type:"text",value:Yte(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function qte(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const Kte={blockquote:Cte,break:Tte,code:Ate,delete:Ete,emphasis:Dte,footnoteReference:Mte,heading:Lte,html:Ite,imageReference:Pte,image:Nte,inlineCode:Rte,linkReference:Ote,link:zte,listItem:Fte,list:jte,paragraph:Hte,root:Vte,strong:Ute,table:$te,tableCell:Wte,tableRow:Gte,text:Xte,thematicBreak:qte,toml:av,yaml:av,definition:av,footnoteDefinition:av};function av(){}const lR=-1,ov=0,uf=1,sv=2,rw=3,nw=4,iw=5,aw=6,uR=7,cR=8,{defineProperty:Zte}=Object,fR=typeof self=="object"?self:globalThis,dR=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new fR[e](t)},Qte=(e,t)=>{const r=(i,a)=>(e.set(a,i),i),n=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case ov:case lR:return r(o,i);case uf:{const s=r([],i);for(const l of o)s.push(n(l));return s}case sv:{const s=r({},i);for(const[l,u]of o){const f=n(l),d=n(u);f==="__proto__"?Zte(s,f,{value:d,configurable:!0,enumerable:!0,writable:!0}):s[f]=d}return s}case rw:return r(new Date(o),i);case nw:{const{source:s,flags:l}=o;return r(new RegExp(s,l),i)}case iw:{const s=r(new Map,i);for(const[l,u]of o)s.set(n(l),n(u));return s}case aw:{const s=r(new Set,i);for(const l of o)s.add(n(l));return s}case uR:{const{name:s,message:l}=o;return r(typeof fR[s]=="function"?dR(s,l):new Error(l),i)}case cR:return r(BigInt(o),i);case"BigInt":return r(Object(BigInt(o)),i);case"ArrayBuffer":return r(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:s}=new Uint8Array(o);return r(new DataView(s),o)}case"-0":return-0}return r(dR(a,o),i)};return n},hR=e=>Qte(new Map,e)(0),ms="",{toString:Jte}={},{keys:ere,is:tre}=Object,cf=e=>{const t=typeof e;if(t!=="object"||!e)return[ov,t];const r=Jte.call(e).slice(8,-1);switch(r){case"Array":return[uf,ms];case"Object":return[sv,ms];case"Date":return[rw,ms];case"RegExp":return[nw,ms];case"Map":return[iw,ms];case"Set":return[aw,ms];case"DataView":return[uf,r]}return r.includes("Array")?[uf,r]:e instanceof Error?[uR,e.name||"Error"]:[sv,r]},lv=([e,t])=>e===ov&&(t==="function"||t==="symbol"),rre=(e,t,r,n)=>{const i=(o,s)=>{const l=n.push(o)-1;return r.set(s,l),l},a=o=>{if(r.has(o))return r.get(o);let[s,l]=cf(o);switch(s){case ov:{let f=o;switch(l){case"bigint":s=cR,f=o.toString();break;case"number":if(!o&&tre(o,-0))return n.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);f=null;break;case"undefined":return i([lR],o)}return i([s,f],o)}case uf:{if(l){let p=o;return l==="DataView"?p=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(p=new Uint8Array(o)),i([l,[...p]],o)}const f=[],d=i([s,f],o);for(const p of o)f.push(a(p));return d}case sv:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const f=[],d=i([s,f],o);for(const p of ere(o))(e||!lv(cf(o[p])))&&f.push([a(p),a(o[p])]);return d}case rw:return i([s,isNaN(o.getTime())?ms:o.toISOString()],o);case nw:{const{source:f,flags:d}=o;return i([s,{source:f,flags:d}],o)}case iw:{const f=[],d=i([s,f],o);for(const[p,v]of o)(e||!(lv(cf(p))||lv(cf(v))))&&f.push([a(p),a(v)]);return d}case aw:{const f=[],d=i([s,f],o);for(const p of o)(e||!lv(cf(p)))&&f.push(a(p));return d}}const{message:u}=o;return i([s,{name:l,message:u}],o)};return a},pR=(e,{json:t,lossy:r}={})=>{const n=[];return rre(!(t||r),!!t,new Map,n)(e),n},uv=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?hR(pR(e,t)):structuredClone(e):(e,t)=>hR(pR(e,t));function nre(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function ire(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function are(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||nre,n=e.options.footnoteBackLabel||ire,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const f=e.all(u),d=String(u.identifier).toUpperCase(),p=Ul(d.toLowerCase());let v=0;const g=[],y=e.footnoteCounts.get(d);for(;y!==void 0&&++v<=y;){g.length>0&&g.push({type:"text",value:" "});let _=typeof r=="string"?r:r(l,v);typeof _=="string"&&(_={type:"text",value:_}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,v),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const x=f[f.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const _=x.children[x.children.length-1];_&&_.type==="text"?_.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...g)}else f.push(...g);const b={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(u,b),s.push(b)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...uv(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
51
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
52
|
+
`}]}}const cv=(function(e){if(e==null)return ure;if(typeof e=="function")return fv(e);if(typeof e=="object")return Array.isArray(e)?ore(e):sre(e);if(typeof e=="string")return lre(e);throw new Error("Expected function, string, or object as test")});function ore(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=cv(e[r]);return fv(n);function n(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function sre(e){const t=e;return fv(r);function r(n){const i=n;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function lre(e){return fv(t);function t(r){return r&&r.type===e}}function fv(e){return t;function t(r,n,i){return!!(cre(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function ure(){return!0}function cre(e){return e!==null&&typeof e=="object"&&"type"in e}function Ole(e){return e}const vR=[],fre=!0,dv=!1,ow="skip";function sw(e,t,r,n){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,a,o,s,l;if(typeof r=="function"||r&&typeof r=="object"?(a=t,o=r,n&&(i=!1)):(o=t,r&&(i=!1)),typeof o=="function")s=o;else if(o&&typeof o=="object"){if(!(o.enter===null||o.enter===void 0))if(typeof o.enter=="function")s=o.enter;else throw new Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor");if(typeof o.exit=="function")l=o.exit;else throw new Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");const u=cv(a),f=i?1:-1;d(e,void 0,[])();function d(p,v,g){const y=p&&typeof p=="object"?p:{};if(typeof y.type=="string"){const b=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(p.type+(b?"<"+b+">":""))+")"})}return x;function x(){const b=!a||u(p,v,g[g.length-1]||void 0);let _=vR;if(s&&b&&(_=gR(s(p,g,v)),_[0]===dv))return _;if("children"in p&&p.children){const S=p;if(S.children&&_[0]!==ow){let T=(i?-1:S.children.length)+f;const E=[...g,S];for(;T>-1&&T<S.children.length;){const D=S.children[T],L=d(D,T,E)();if(L[0]===dv)return L;T=typeof L[1]=="number"?L[1]:T+f}}}if(l&&b){const S=gR(l(p,g,v));if(S[0]===ow)throw new Error("Unexpected value `"+S[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(S[0]===dv||typeof S[1]=="number")return S}return _}}}function gR(e){return Array.isArray(e)?e:typeof e=="number"?[fre,e]:e==null?vR:[e]}function lw(e,t,r,n){let i,a,o;a=t,o=r,typeof a=="function"?sw(e,i,uw(a),o):sw(e,i,dre(a),o)}function dre(e){return!e||typeof e!="object"?e:{enter:typeof e.enter=="function"?uw(e.enter):e.enter,exit:typeof e.exit=="function"?uw(e.exit):e.exit}}function uw(e){return t;function t(r,n,i){return e(r,i,n[n.length-1])}}const cw={}.hasOwnProperty,hre={};function pre(e,t){const r=t||hre,n=new Map,i=new Map,a=new Map,o={...Kte,...r.handlers},s={all:u,applyData:gre,definitionById:n,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:l,options:r,patch:vre,wrap:yre};return lw(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const d=f.type==="definition"?n:i,p=String(f.identifier).toUpperCase();d.has(p)||d.set(p,f)}}),s;function l(f,d){const p=f.type,v=s.handlers[p];if(cw.call(s.handlers,p)&&v)return v(s,f,d);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in f){const{children:y,...x}=f,b=uv(x);return b.children=s.all(f),b}return uv(f)}return(s.options.unknownHandler||mre)(s,f,d)}function u(f){const d=[];if("children"in f){const p=f.children;let v=-1;for(;++v<p.length;){const g=s.one(p[v],f);if(g){if(v&&p[v-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=mR(g.value)),!Array.isArray(g)&&g.type==="element")){const y=g.children[0];y&&y.type==="text"&&(y.value=mR(y.value))}Array.isArray(g)?d.push(...g):d.push(g)}}}return d}}function vre(e,t){e.position&&(t.position=hJ(e))}function gre(e,t){let r=t;if(e&&e.data){const n=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{const o="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:o}}r.type==="element"&&a&&Object.assign(r.properties,uv(a)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function mre(e,t){const r=t.data||{},n="value"in t&&!(cw.call(r,"hProperties")||cw.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yre(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:`
|
|
53
|
+
`});++n<e.length;)n&&r.push({type:"text",value:`
|
|
54
|
+
`}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
|
|
55
|
+
`}),r}function mR(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function yR(e,t){const r=pre(e,t),n=r.one(e,void 0),i=are(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
56
|
+
`},i),a}function xre(e,t){return e&&"run"in e?async function(r,n){const i=yR(r,{file:n,...t});await e.run(i,n)}:function(r,n){return yR(r,{file:n,...e||t})}}function xR(e){if(e)throw e}var fw,bR;function bre(){if(bR)return fw;bR=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},a=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),d=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!d)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},o=function(u,f){r&&f.name==="__proto__"?r(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},s=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(n)return n(u,f).value}else return;return u[f]};return fw=function l(){var u,f,d,p,v,g,y=arguments[0],x=1,b=arguments.length,_=!1;for(typeof y=="boolean"&&(_=y,y=arguments[1]||{},x=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});x<b;++x)if(u=arguments[x],u!=null)for(f in u)d=s(y,f),p=s(u,f),y!==p&&(_&&p&&(a(p)||(v=i(p)))?(v?(v=!1,g=d&&i(d)?d:[]):g=d&&a(d)?d:{},o(y,{name:f,newValue:l(_,g,p)})):typeof p<"u"&&o(y,{name:f,newValue:p}));return y},fw}var wre=bre();const dw=uo(wre);function hw(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function _re(){const e=[],t={run:r,use:n};return t;function r(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(l,...u){const f=e[++a];let d=-1;if(l){o(l);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,f?kre(f,s)(...u):o(null,...u)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function kre(e,t){let r;return n;function n(...o){const s=e.length>o.length;let l;s&&o.push(i);try{l=e.apply(this,o)}catch(u){const f=u;if(s&&r)throw f;return i(f)}s||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(o,...s){r||(r=!0,t(o,...s))}function a(o){i(null,o)}}const Ti={basename:Sre,dirname:Cre,extname:Tre,join:Are,sep:"/"};function Sre(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ff(e);let r=0,n=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(n=i):(s=-1,n=o));return r===n?n=o:n<0&&(n=e.length),e.slice(r,n)}function Cre(e){if(ff(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Tre(e){ff(e);let t=e.length,r=-1,n=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){n=t+1;break}continue}r<0&&(o=!0,r=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":e.slice(i,r)}function Are(...e){let t=-1,r;for(;++t<e.length;)ff(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":Ere(r)}function Ere(e){ff(e);const t=e.codePointAt(0)===47;let r=Dre(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function Dre(e,t){let r="",n=0,i=-1,a=0,o=-1,s,l;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),i=o,a=0;continue}}else if(r.length>0){r="",n=0,i=o,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,o):r=e.slice(i+1,o),n=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return r}function ff(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Mre={cwd:Lre};function Lre(){return"/"}function pw(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Ire(e){if(typeof e=="string")e=new URL(e);else if(!pw(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Pre(e)}function Pre(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const vw=["history","path","basename","stem","extname","dirname"];class wR{constructor(t){let r;t?pw(t)?r={path:t}:typeof t=="string"||Nre(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":Mre.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<vw.length;){const a=vw[n];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let i;for(i in r)vw.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?Ti.basename(this.path):void 0}set basename(t){mw(t,"basename"),gw(t,"basename"),this.path=Ti.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ti.dirname(this.path):void 0}set dirname(t){_R(this.basename,"dirname"),this.path=Ti.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ti.extname(this.path):void 0}set extname(t){if(gw(t,"extname"),_R(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ti.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){pw(t)&&(t=Ire(t)),mw(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ti.basename(this.path,this.extname):void 0}set stem(t){mw(t,"stem"),gw(t,"stem"),this.path=Ti.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const i=this.message(t,r,n);throw i.fatal=!0,i}info(t,r,n){const i=this.message(t,r,n);return i.fatal=void 0,i}message(t,r,n){const i=new vr(t,r,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function gw(e,t){if(e&&e.includes(Ti.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ti.sep+"`")}function mw(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function _R(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Nre(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Rre=(function(e){const n=this.constructor.prototype,i=n[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,n),a}),Ore={}.hasOwnProperty;class yw extends Rre{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=_re()}copy(){const t=new yw;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(dw(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(ww("data",this.frozen),this.namespace[t]=r,this):Ore.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ww("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=hv(t),n=this.parser||this.Parser;return xw("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),xw("process",this.parser||this.Parser),bw("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,o){const s=hv(t),l=n.parse(s);n.run(l,s,function(f,d,p){if(f||!d||!p)return u(f);const v=d,g=n.stringify(v,p);Bre(g)?p.value=g:p.result=g,u(f,p)});function u(f,d){f||!d?o(f):a?a(d):r(void 0,d)}}}processSync(t){let r=!1,n;return this.freeze(),xw("processSync",this.parser||this.Parser),bw("processSync",this.compiler||this.Compiler),this.process(t,i),SR("processSync","process",r),n;function i(a,o){r=!0,xR(a),n=o}}run(t,r,n){kR(t),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(o,s){const l=hv(r);i.run(t,l,u);function u(f,d,p){const v=d||t;f?s(f):o?o(v):n(void 0,v,p)}}}runSync(t,r){let n=!1,i;return this.run(t,r,a),SR("runSync","run",n),i;function a(o,s){xR(o),i=s,n=!0}}stringify(t,r){this.freeze();const n=hv(r),i=this.compiler||this.Compiler;return bw("stringify",i),kR(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(ww("use",this.frozen),t!=null)if(typeof t=="function")l(t,r);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...d]=u;l(f,d)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(i.settings=dw(!0,i.settings,u.settings))}function s(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const d=u[f];a(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,f){let d=-1,p=-1;for(;++d<n.length;)if(n[d][0]===u){p=d;break}if(p===-1)n.push([u,...f]);else if(f.length>0){let[v,...g]=f;const y=n[p][1];hw(y)&&hw(v)&&(v=dw(!0,y,v)),n[p]=[u,v,...g]}}}}const zre=new yw().freeze();function xw(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function bw(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ww(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function kR(e){if(!hw(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function SR(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function hv(e){return Fre(e)?e:new wR(e)}function Fre(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Bre(e){return typeof e=="string"||jre(e)}function jre(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Hre="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",CR=[],TR={allowDangerousHtml:!0},Vre=/^(https?|ircs?|mailto|xmpp)$/i,Ure=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function $re(e){const t=Gre(e),r=Wre(e);return Yre(t.runSync(t.parse(r),r),e)}function Gre(e){const t=e.rehypePlugins||CR,r=e.remarkPlugins||CR,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...TR}:TR;return zre().use(Ste).use(r).use(xre,n).use(t)}function Wre(e){const t=e.children||"",r=new wR;return typeof t=="string"&&(r.value=t),r}function Yre(e,t){const r=t.allowedElements,n=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||Xre;for(const f of Ure)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Hre+f.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),lw(e,u),xJ(e,{Fragment:k.Fragment,components:i,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0});function u(f,d,p){if(f.type==="raw"&&p&&typeof d=="number")return o?p.children.splice(d,1):p.children[d]={type:"text",value:f.value},d;if(f.type==="element"){let v;for(v in Wb)if(Object.hasOwn(Wb,v)&&Object.hasOwn(f.properties,v)){const g=f.properties[v],y=Wb[v];(y===null||y.includes(f.tagName))&&(f.properties[v]=l(String(g||""),v,f))}}if(f.type==="element"){let v=r?!r.includes(f.tagName):a?a.includes(f.tagName):!1;if(!v&&n&&typeof d=="number"&&(v=!n(f,d,p)),v&&p&&typeof d=="number")return s&&f.children?p.children.splice(d,1,...f.children):p.children.splice(d,1),d}}}function Xre(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||r!==-1&&t>r||n!==-1&&t>n||Vre.test(e.slice(0,t))?e:""}function qre(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function AR(e,t,r){const i=cv((r||{}).ignore||[]),a=Kre(t);let o=-1;for(;++o<a.length;)sw(e,s);function s(u,f,d){if(u.type==="text"&&typeof d=="number")return l(u,f,d);if(i(u,d,f[f.length-1]))return ow}function l(u,f,d){const p=f[f.length-1],v=a[o][0],g=a[o][1];let y=0,x=!1,b=[];v.lastIndex=0;let _=v.exec(u.value);for(;_;){const T=_.index,E={index:_.index,input:_.input,stack:[...f,u]};let D=g(..._,E);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1)v.lastIndex=T+1;else{if(y!==T&&S({type:"text",value:u.value.slice(y,T)}),Array.isArray(D))for(const L of D)S(L);else D&&S(D);y=T+_[0].length,x=!0}if(!v.global)break;_=v.exec(u.value)}return x?(y<u.value.length&&S({type:"text",value:u.value.slice(y)}),p.children.splice(d,1,...b)):b=[u],d+b.length;function S(T){const E=b[b.length-1];E&&E.type==="text"&&T.type==="text"?E.value+=T.value:b.push(T)}}}function Kre(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=[],r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const i=r[n];t.push([Zre(i[0]),Qre(i[1])])}return t}function Zre(e){return typeof e=="string"?new RegExp(qre(e),"g"):e}function Qre(e){return typeof e=="function"?e:function(){return e}}function Jre(e){AR(e,[/\r?\n|\r/g,ene])}function ene(){return{type:"break"}}function tne(){return function(e){Jre(e)}}function ER(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}const _w="phrasing",kw=["autolink","link","image","label"];function rne(){return{transforms:[une],enter:{literalAutolink:ine,literalAutolinkEmail:Sw,literalAutolinkHttp:Sw,literalAutolinkWww:Sw},exit:{literalAutolink:lne,literalAutolinkEmail:sne,literalAutolinkHttp:ane,literalAutolinkWww:one}}}function nne(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:_w,notInConstruct:kw},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:_w,notInConstruct:kw},{character:":",before:"[ps]",after:"\\/",inConstruct:_w,notInConstruct:kw}]}}function ine(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Sw(e){this.config.enter.autolinkProtocol.call(this,e)}function ane(e){this.config.exit.autolinkProtocol.call(this,e)}function one(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function sne(e){this.config.exit.autolinkEmail.call(this,e)}function lne(e){this.exit(e)}function une(e){AR(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,cne],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,fne]],{ignore:["link","linkReference"]})}function cne(e,t,r,n,i){let a="";if(!DR(i)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!dne(r)))return!1;const o=hne(r+n);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function fne(e,t,r,n){return!DR(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function dne(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function hne(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=ER(e,"(");let a=ER(e,")");for(;n!==-1&&i>a;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[e,r]}function DR(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||gs(r)||tv(r))&&(!t||r!==47)}MR.peek=_ne;function pne(){this.buffer()}function vne(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function gne(){this.buffer()}function mne(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function yne(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=ti(this.sliceSerialize(e)).toLowerCase(),r.label=t}function xne(e){this.exit(e)}function bne(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=ti(this.sliceSerialize(e)).toLowerCase(),r.label=t}function wne(e){this.exit(e)}function _ne(){return"["}function MR(e,t,r,n){const i=r.createTracker(n);let a=i.move("[^");const o=r.enter("footnoteReference"),s=r.enter("reference");return a+=i.move(r.safe(r.associationId(e),{after:"]",before:a})),s(),o(),a+=i.move("]"),a}function kne(){return{enter:{gfmFootnoteCallString:pne,gfmFootnoteCall:vne,gfmFootnoteDefinitionLabelString:gne,gfmFootnoteDefinition:mne},exit:{gfmFootnoteCallString:yne,gfmFootnoteCall:xne,gfmFootnoteDefinitionLabelString:bne,gfmFootnoteDefinition:wne}}}function Sne(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:MR},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,a,o){const s=a.createTracker(o);let l=s.move("[^");const u=a.enter("footnoteDefinition"),f=a.enter("label");return l+=s.move(a.safe(a.associationId(n),{before:l,after:"]"})),f(),l+=s.move("]:"),n.children&&n.children.length>0&&(s.shift(4),l+=s.move((t?`
|
|
57
|
+
`:" ")+a.indentLines(a.containerFlow(n,s.current()),t?LR:Cne))),u(),l}}function Cne(e,t,r){return t===0?e:LR(e,t,r)}function LR(e,t,r){return(r?"":" ")+e}const Tne=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Cw.attention=Lne,Cw.peek=Ine;function Ane(){return{canContainEols:["delete"],enter:{strikethrough:Dne},exit:{strikethrough:Mne}}}function Ene(){return{handlers:{delete:Cw},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Tne}]}}function Dne(e){this.enter({type:"delete",children:[],position:void 0},e)}function Mne(e){this.exit(e)}function Cw(e,t,r,n){const i=r.createTracker(n),a=r.stack.includes("strikethrough")?"~":"~~",o=r.enter("strikethrough");let s=i.move(a);return s+=r.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move(a),o(),s}function Lne(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function Ine(){return"~"}function Pne(e){return e.length}function Nne(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||Pne,a=[],o=[],s=[],l=[];let u=0,f=-1;for(;++f<e.length;){const y=[],x=[];let b=-1;for(e[f].length>u&&(u=e[f].length);++b<e[f].length;){const _=Rne(e[f][b]);if(r.alignDelimiters!==!1){const S=i(_);x[b]=S,(l[b]===void 0||S>l[b])&&(l[b]=S)}y.push(_)}o[f]=y,s[f]=x}let d=-1;if(typeof n=="object"&&"length"in n)for(;++d<u;)a[d]=IR(n[d]);else{const y=IR(n);for(;++d<u;)a[d]=y}d=-1;const p=[],v=[];for(;++d<u;){const y=a[d];let x="",b="";y===99?(x=":",b=":"):y===108?x=":":y===114&&(b=":");let _=r.alignDelimiters===!1?1:Math.max(1,l[d]-x.length-b.length);const S=x+"-".repeat(_)+b;r.alignDelimiters!==!1&&(_=x.length+_+b.length,_>l[d]&&(l[d]=_),v[d]=_),p[d]=S}o.splice(1,0,p),s.splice(1,0,v),f=-1;const g=[];for(;++f<o.length;){const y=o[f],x=s[f];d=-1;const b=[];for(;++d<u;){const _=y[d]||"";let S="",T="";if(r.alignDelimiters!==!1){const E=l[d]-(x[d]||0),D=a[d];D===114?S=" ".repeat(E):D===99?E%2?(S=" ".repeat(E/2+.5),T=" ".repeat(E/2-.5)):(S=" ".repeat(E/2),T=S):T=" ".repeat(E)}r.delimiterStart!==!1&&!d&&b.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&_==="")&&(r.delimiterStart!==!1||d)&&b.push(" "),r.alignDelimiters!==!1&&b.push(S),b.push(_),r.alignDelimiters!==!1&&b.push(T),r.padding!==!1&&b.push(" "),(r.delimiterEnd!==!1||d!==u-1)&&b.push("|")}g.push(r.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return g.join(`
|
|
58
|
+
`)}function Rne(e){return e==null?"":String(e)}function IR(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const One=cv(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function zne(e,t,r,n){const i=r.enter("blockquote"),a=r.createTracker(n);a.move("> "),a.shift(2);const o=r.indentLines(r.containerFlow(e,a.current()),Fne);return i(),o}function Fne(e,t,r){return">"+(r?"":" ")+e}function Bne(e,t){return PR(e,t.inConstruct,!0)&&!PR(e,t.notInConstruct,!1)}function PR(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function NR(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;){const a=r.unsafe[i];if(a.character===`
|
|
59
|
+
`&&!a.before&&!a.after&&Bne(r.stack,a))return/[\t ]/.test(n.before)?"":" "}return`\\
|
|
60
|
+
`}function jne(e,t){const r=String(e);let n=r.indexOf(t),i=n,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++a>o&&(o=a):a=1,i=n+t.length,n=r.indexOf(t,i);return o}function Hne(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function Vne(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Une(e,t,r,n){const i=Vne(r),a=e.value||"";if(Hne(e,r)){const d=r.enter("codeIndented"),p=r.indentLines(a,$ne);return d(),p}const o=r.createTracker(n),s=i.repeat(Math.max(jne(a,i)+1,3)),l=r.enter("codeFenced"),u=i==="`"?"GraveAccent":"Tilde";let f=o.move(s);if(e.lang){const d=r.enter(`codeFencedLang${u}`);f+=o.move(r.safe(e.lang,{before:f,after:" ",encode:["`"],...o.current()})),d()}if(e.lang&&e.meta){const d=r.enter(`codeFencedMeta${u}`);f+=o.move(" "),f+=o.move(r.safe(e.meta,{before:f,after:`
|
|
61
|
+
`,encode:["`"],...o.current()})),d()}return f+=o.move(`
|
|
62
|
+
`),a&&(f+=o.move(a+`
|
|
63
|
+
`)),f+=o.move(s),l(),f}function $ne(e,t,r){return(r?"":" ")+e}function Tw(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Gne(e,t,r,n){const i=Tw(r),a=i==='"'?"Quote":"Apostrophe",o=r.enter("definition");let s=r.enter("label");const l=r.createTracker(n);let u=l.move("[");return u+=l.move(r.safe(r.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(r.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=r.enter("destinationRaw"),u+=l.move(r.safe(e.url,{before:u,after:e.title?" ":`
|
|
64
|
+
`,...l.current()}))),s(),e.title&&(s=r.enter(`title${a}`),u+=l.move(" "+i),u+=l.move(r.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),o(),u}function Wne(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function pv(e){const t=e.codePointAt(0);return t===void 0?"":String.fromCodePoint(t)}function $l(e){const t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function RR(e){return"&#x"+e.toString(16).toUpperCase()+";"}function OR(e,t,r){const n=Va(e),i=Va(t);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function Yne(e){if(e.charCodeAt(0)!==60)return;const t=e.charCodeAt(1);if(t===33){const s=e.charCodeAt(2);return s===45?2:s===91?5:tr(s)?4:void 0}if(t===63)return 3;const r=t===47,n=r?2:1;let i=n,a=e.charCodeAt(i);if(!tr(a))return;for(;a===45||rr(a);)a=e.charCodeAt(++i);const o=e.slice(n,i).toLowerCase();return!r&&a!==47&&Jb.includes(o)?1:qN.includes(o)?6:7}const Xne=new Map([["*",!1],["_",!0]]);function qne(e,t,r){const n=new Set;for(const a of e){const o=r.get(a);if(o&&a.attention&&t.some(s=>s.attention===a.attention))for(const s of o.tokens)n.add(s.attention)}const i=[];for(const a of e)a.attention&&n.delete(a.attention)&&i.push(a.attention);return i.reverse(),i}function zR(e,t,r){const n=[],i=new Map,a=new Map;let o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}const s=e[o].value.charAt(0),l=Xne.get(s);let u=o+1;for(;u<e.length&&e[u].attention&&e[u].value.charAt(0)===s;)u++;const f=o?e[o-1].value:t,d=Va(f.charCodeAt(f.length-1)),p=Va((u<e.length?e[u].value:r).charCodeAt(0)),v=!p||p===2&&!!d,g=!d||d===2&&!!p,y={tokens:e.slice(o,u),markers:[],start:0,end:0,open:l?v&&(!!d||!g):v,close:l?g&&(!!p||!v):g,split:l!==void 0};for(const x of y.tokens){i.set(x,[...y.tokens]),a.set(x,y);let b=x.value.length;for(;b--;)y.markers.push(x)}y.end=y.markers.length,n.push(y),o=u}for(Zne(n,i),o=-1;++o<e.length;){const s=i.get(e[o]);if(s)return{attention:qne(e,s,a),index:o}}}function vv(e,t){const r=e[t?0:e.length-1];if(!r||r.attention)return;const n=t?pv(r.value):$l(r.value),i=RR(n.codePointAt(0));if(t)r.value=i+r.value.slice(n.length);else{let a=r.value.slice(0,r.value.length-n.length),o=0;for(;a.charCodeAt(a.length-1-o)===92;)o++;o%2&&(a+="\\"),r.value=a+i}}function Kne(e,t,r,n,i){for(const a of r.attention){const o=t.get(a)||a.sequences[0];for(const s of a.sequences){if(s===o)continue;const l=new Map(t);l.set(a,s);const u=Ew(e,l,n,i),f=zR(u,n,i);if(!f||f.index>r.index)return{chosen:l,mistake:f,tokens:u}}}}function Zne(e,t){const r=new Map;for(const n of e){const i=n.tokens[0].value.charAt(0);let a=r.get(i);a||(a=[],r.set(i,a));let o=n.close?a.length:0;for(;o--&&n.start<n.end;){const s=a[o],l=s.end-s.start,u=n.end-n.start;if(n.split?(s.close||n.open)&&u%3&&!((l+u)%3):l!==s.markers.length||l!==u)continue;const f=n.split?l>1&&u>1?2:1:u,d=s.markers.slice(s.end-f,s.end),p=n.markers.slice(n.start,n.start+f),v=d[0],g=p[0];if(v===d[f-1]&&v.value.length===f&&g===p[f-1]&&g.value.length===f&&v.attention===g.attention)t.delete(v),t.delete(g);else{const y=[...new Set([...d,...p])];for(const x of y){const b=t.get(x);b&&b.push(...y)}}s.end-=f,n.start+=f,s.start===s.end&&a.splice(o,1),o=a.length}n.open&&n.start<n.end&&a.push(n)}}function Qne(e,t,r){if(t.length===0)throw new Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(r.length===0)throw new Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(const i of r)if(!Number.isSafeInteger(i)||i<1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as size, expected positive integer");const n=[];for(const i of t){if(i.length!==1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!ON(i.charCodeAt(0)))throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(const a of r)n.push(i.repeat(a))}return n}function Jne(e,t,r){const n=t.indexStack,i=e.children||[],a=[];let o=-1,s=r.before;n.push(-1);let l=t.createTracker(r);for(;++o<i.length;){const u=i[o];let f;if(n[n.length-1]=o,o+1<i.length){let v=t.handle.handlers[i[o+1].type];v&&v.peek&&(v=v.peek),f=v?pv(v(i[o+1],e,t,{before:"",after:"",...l.current()})):""}else f=r.after;const d=a[a.length-1];typeof d=="string"&&(s==="\r"||s===`
|
|
65
|
+
`)&&u.type==="html"&&Yne(u.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/," "),s=" ",l=t.createTracker(r),l.move(gv(a,r.before,r.after)));const p=t.handle.handlers[u.type];if(p&&p.attention){const v=Aw(u,p.attention,t,l);a.push(v),s=$l(v.sequences[0])}else{const v=t.handle(u,e,t,{...l.current(),after:f,before:s});if(!v)continue;l.move(v),a.push(v),s=$l(v)}}return n.pop(),a}function Aw(e,t,r,n){const{construct:i,markers:a,sizes:o}=t(e,r),s=Qne(e.type,a,o),l=s[0],u=r.enter(i);n.move(l);const f=Jne(e,r,{...n.current(),before:l,after:l});return n.move(gv(f,l,l)),n.move(l),u(),{children:f,sequences:s}}function Ew(e,t,r,n){const i=[];let a,o=$l(r),s=-1;for(;++s<e.length;){const l=e[s];if(typeof l=="string"){const S={value:l,attention:void 0};a&&a===pv(l)&&vv([S],!0),a=void 0,i.push(S),S.value&&(o=$l(S.value));continue}const u=t.get(l)||l.sequences[0],f=u.charAt(0),d=e[s+1],p=o,v=pv(d===void 0?n:typeof d=="string"?d:t.get(d)||d.sequences[0]),g=Ew(l.children,t,u,u),y=g.length>0?g[0].value:"",x=OR(p.charCodeAt(p.length-1),y.charCodeAt(0),f);x.inside&&vv(g,!0);const b=g.length>0?$l(g[g.length-1].value):"",_=OR(v.charCodeAt(0),b.charCodeAt(b.length-1),f);_.inside&&vv(g,!1),x.outside&&p!==`
|
|
66
|
+
`&&p!=="\r"&&vv(i,!1),_.outside&&(a=v),i.push({value:u,attention:l},...g,{value:u,attention:l}),o=u.charAt(u.length-1)}return i}function gv(e,t,r){let n=new Map;const i=Ew(e,n,t,r);let a=i,o=zR(a,t,r);for(;o;){const l=Kne(e,n,o,t,r);if(!l){a=i;break}n=l.chosen,a=l.tokens,o=l.mistake}let s="";for(const l of a)s+=l.value;return s}Dw.attention=FR,Dw.peek=eie;function Dw(e,t,r,n){const i=r.enter("phrasing"),a=Aw(e,FR,r,r.createTracker(n)),o=gv([a],n.before,n.after);return i(),o}function FR(e,t){return{construct:"emphasis",markers:Wne(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function eie(e,t,r){return r.options.emphasis||"*"}function tie(e,t){let r=!1;return lw(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,dv}),!!((!e.depth||e.depth<3)&&Yb(e)&&(t.options.setext||r))}function rie(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(n);if(tie(e,r)){const d=r.enter("headingSetext"),p=r.enter("phrasing"),v=r.containerPhrasing(e,{...a.current(),before:`
|
|
67
|
+
`,after:`
|
|
68
|
+
`});return p(),d(),v+`
|
|
69
|
+
`+(i===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
|
|
70
|
+
`))+1))}const o="#".repeat(i),s=r.enter("headingAtx"),l=r.enter("phrasing");a.move(o+" ");let u=r.containerPhrasing(e,{before:"# ",after:`
|
|
71
|
+
`,...a.current()});const f=u.charCodeAt(0);return(f===9||f===32)&&(u=RR(f)+u.slice(1)),u=u?o+" "+u:o,r.options.closeAtx&&(u+=" "+o),l(),s(),u}BR.peek=nie;function BR(e){return e.value||""}function nie(){return"<"}jR.peek=iie;function jR(e,t,r,n){const i=Tw(r),a=i==='"'?"Quote":"Apostrophe",o=r.enter("image");let s=r.enter("label");const l=r.createTracker(n);let u=l.move("![");return u+=l.move(r.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(r.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=r.enter("destinationRaw"),u+=l.move(r.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=r.enter(`title${a}`),u+=l.move(" "+i),u+=l.move(r.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),o(),u}function iie(){return"!"}HR.peek=aie;function HR(e,t,r,n){const i=e.referenceType,a=r.enter("imageReference");let o=r.enter("label");const s=r.createTracker(n);let l=s.move("![");const u=r.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),o();const f=r.stack;r.stack=f.filter(function(p){return p!=="phrasing"}),o=r.enter("reference");const d=r.safe(r.associationId(e),{before:l,after:"]",...s.current()});return o(),r.stack=f,a(),i==="full"||!u||u!==d?l+=s.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function aie(){return"!"}VR.peek=oie;function VR(e,t,r){let n=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^\n\r ]/.test(n)&&(/^[\n\r ]/.test(n)&&/[\n\r ]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a<r.unsafe.length;){const o=r.unsafe[a],s=r.compilePattern(o);if(!o.atBreak)continue;let l;for(;l=s.exec(n);){let u=l.index;n.charCodeAt(u)===10&&n.charCodeAt(u-1)===13&&u--,n=n.slice(0,u)+" "+n.slice(l.index+1)}}return i+n+i}function oie(){return"`"}function UR(e,t){const r=Yb(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}$R.peek=sie;function $R(e,t,r,n){const i=Tw(r),a=i==='"'?"Quote":"Apostrophe",o=r.createTracker(n);if(UR(e,r)){const g=r.stack;r.stack=g.filter(function(b){return b!=="phrasing"});const y=r.enter("autolink");let x=o.move("<");return x+=o.move(r.containerPhrasing(e,{before:x,after:">",...o.current()})),x+=o.move(">"),y(),r.stack=g,x}const s=r.enter("link");let l=r.enter("label"),u=o.move("[");const f=r.containerPhrasing(e,{before:u,after:"](",...o.current()});u+=o.move(f),l(),u+=o.move("](");const d=/[\0- \u007F]/.test(e.url),p=n.before.charAt(n.before.length-1);let v=e.title||void 0;if(!v&&!d&&(p===`
|
|
72
|
+
`||p==="\r")){let g=0;for(;g<f.length&&f.charCodeAt(g)!==93;)g+=f.charCodeAt(g)===92?2:1;f.charCodeAt(g+1)===58&&(v="")}return!e.url&&typeof v=="string"||d?(l=r.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(r.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(l=r.enter("destinationRaw"),u+=o.move(r.safe(e.url,{before:u,after:typeof v=="string"?" ":")",...o.current()}))),l(),typeof v=="string"&&(l=r.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(r.safe(v,{before:u,after:i,...o.current()})),u+=o.move(i),l()),u+=o.move(")"),s(),u}function sie(e,t,r){return UR(e,r)?"<":"["}GR.peek=lie;function GR(e,t,r,n){const i=e.referenceType,a=r.enter("linkReference");let o=r.enter("label");const s=r.createTracker(n);let l=s.move("[");const u=r.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),o();const f=r.stack;r.stack=f.filter(function(p){return p!=="phrasing"}),o=r.enter("reference");const d=r.safe(r.associationId(e),{before:l,after:"]",...s.current()});return o(),r.stack=f,a(),i==="full"||!u||u!==d?l+=s.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function lie(){return"["}function Mw(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function uie(e){const t=Mw(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function cie(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function WR(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function fie(e,t,r,n){const i=r.enter("list"),a=r.bulletCurrent;let o=e.ordered?cie(r):Mw(r);const s=e.ordered?o==="."?")":".":uie(r);let l=t&&r.bulletLastUsed?o===r.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&f&&(!f.children||!f.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(l=!0),WR(r)===o&&f){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(o=s),r.bulletCurrent=o;const u=r.containerFlow(e,n);return r.bulletLastUsed=o,r.bulletCurrent=a,i(),u}function die(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function hie(e,t,r,n){const i=die(r);let a=r.bulletCurrent||Mw(r);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=r.createTracker(n);s.move(a+" ".repeat(o-a.length)),s.shift(o);const l=r.enter("listItem"),u=r.indentLines(r.containerFlow(e,s.current()),f);return l(),u;function f(d,p,v){return p?(v?"":" ".repeat(o))+d:(v?a:a+" ".repeat(o-a.length))+d}}function pie(e,t,r,n){const i=r.enter("paragraph"),a=r.enter("phrasing"),o=r.containerPhrasing(e,n);return a(),i(),o}function vie(e,t,r,n){if(!e.children.some(function(s){return One(s)}))return r.containerFlow(e,n);const a=r.enter("phrasing"),o=r.containerPhrasing(e,n);return a(),o}function gie(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Lw.attention=YR,Lw.peek=mie;function Lw(e,t,r,n){const i=r.enter("phrasing"),a=Aw(e,YR,r,r.createTracker(n)),o=gv([a],n.before,n.after);return i(),o}function YR(e,t){return{construct:"strong",markers:gie(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function mie(e,t,r){return r.options.strong||"*"}function yie(e,t,r,n){const i=t?t.children:[],a=r.indexStack[r.indexStack.length-1];return r.safe(e.value,{...n,afterNode:i[a+1],beforeNode:i[a-1]})}function xie(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function bie(e,t,r){const n=(WR(r)+(r.options.ruleSpaces?" ":"")).repeat(xie(r));return r.options.ruleSpaces?n.slice(0,-1):n}const XR={blockquote:zne,break:NR,code:Une,definition:Gne,emphasis:Dw,hardBreak:NR,heading:rie,html:BR,image:jR,imageReference:HR,inlineCode:VR,link:$R,linkReference:GR,list:fie,listItem:hie,paragraph:pie,root:vie,strong:Lw,text:yie,thematicBreak:bie};function wie(){return{enter:{table:_ie,tableData:qR,tableHeader:qR,tableRow:Sie},exit:{codeText:Cie,table:kie,tableData:Iw,tableHeader:Iw,tableRow:Iw}}}function _ie(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function kie(e){this.exit(e),this.data.inTable=void 0}function Sie(e){this.enter({type:"tableRow",children:[]},e)}function Iw(e){this.exit(e)}function qR(e){this.enter({type:"tableCell",children:[]},e)}function Cie(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Tie));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function Tie(e,t){return t==="|"?t:e}function Aie(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
73
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:l,tableRow:s}};function o(v,g,y,x){return u(f(v,y,x),v.align)}function s(v,g,y,x){const b=d(v,y,x),_=u([b]);return _.slice(0,_.indexOf(`
|
|
74
|
+
`))}function l(v,g,y,x){const b=y.enter("tableCell"),_=y.enter("phrasing"),S=y.containerPhrasing(v,{...x,before:a,after:a});return _(),b(),S}function u(v,g){return Nne(v,{align:g,alignDelimiters:n,padding:r,stringLength:i})}function f(v,g,y){const x=v.children;let b=-1;const _=[],S=g.enter("table");for(;++b<x.length;)_[b]=d(x[b],g,y);return S(),_}function d(v,g,y){const x=v.children;let b=-1;const _=[],S=g.enter("tableRow");for(;++b<x.length;)_[b]=l(x[b],v,g,y);return S(),_}function p(v,g,y){let x=XR.inlineCode(v,g,y);return y.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function Eie(){return{exit:{taskListCheckValueChecked:KR,taskListCheckValueUnchecked:KR,paragraph:Mie}}}function Die(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Lie}}}function KR(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Mie(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){o=s;break}}o===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Lie(e,t,r,n){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);a&&s.move(o);let l=XR.listItem(e,t,r,{...n,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(f){return f+o}}function Iie(){return[rne(),kne(),Ane(),wie(),Eie()]}function Pie(e){return{extensions:[nne(),Sne(e),Ene(),Aie(e),Die()]}}const Nie={tokenize:jie,partial:!0},ZR={tokenize:Hie,partial:!0},QR={tokenize:Vie,partial:!0},JR={tokenize:Uie,partial:!0},Rie={tokenize:$ie,partial:!0},e5={name:"wwwAutolink",tokenize:Fie,previous:r5},t5={name:"protocolAutolink",tokenize:Bie,previous:n5},Qi={name:"emailAutolink",tokenize:zie,previous:i5},Ai={};function Oie(){return{text:Ai}}let ys=48;for(;ys<123;)Ai[ys]=Qi,ys++,ys===58?ys=65:ys===91&&(ys=97);Ai[43]=Qi,Ai[45]=Qi,Ai[46]=Qi,Ai[95]=Qi,Ai[72]=[Qi,t5],Ai[104]=[Qi,t5],Ai[87]=[Qi,e5],Ai[119]=[Qi,e5];function zie(e,t,r){const n=this;let i,a;return o;function o(d){return!Pw(d)||!i5.call(n,n.previous)||Nw(n.events)?r(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return Pw(d)?(e.consume(d),s):d===64?(e.consume(d),l):r(d)}function l(d){return d===46?e.check(Rie,f,u)(d):d===45||d===95||rr(d)?(a=!0,e.consume(d),l):f(d)}function u(d){return e.consume(d),i=!0,l}function f(d){return a&&i&&tr(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):r(d)}}function Fie(e,t,r){const n=this;return i;function i(o){return o!==87&&o!==119||!r5.call(n,n.previous)||Nw(n.events)?r(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Nie,e.attempt(ZR,e.attempt(QR,a),r),r)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function Bie(e,t,r){const n=this;let i="",a=!1;return o;function o(d){return(d===72||d===104)&&n5.call(n,n.previous)&&!Nw(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),s):r(d)}function s(d){if(tr(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(d),l}return r(d)}function l(d){return d===47?(e.consume(d),a?u:(a=!0,l)):r(d)}function u(d){return d===null||ev(d)||gt(d)||gs(d)||tv(d)?r(d):e.attempt(ZR,e.attempt(QR,f),r)(d)}function f(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function jie(e,t,r){let n=0;return i;function i(o){return(o===87||o===119)&&n<3?(n++,e.consume(o),i):o===46&&n===3?(e.consume(o),a):r(o)}function a(o){return o===null?r(o):t(o)}}function Hie(e,t,r){let n,i,a;return o;function o(u){return u===46||u===95?e.check(JR,l,s)(u):u===null||gt(u)||gs(u)||u!==45&&tv(u)?l(u):(a=!0,e.consume(u),o)}function s(u){return u===95?n=!0:(i=n,n=void 0),e.consume(u),o}function l(u){return i||n||!a?r(u):t(u)}}function Vie(e,t){let r=0,n=0;return i;function i(o){return o===40?(r++,e.consume(o),i):o===41&&n<r?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(JR,t,a)(o):o===null||gt(o)||gs(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&n++,e.consume(o),i}}function Uie(e,t,r){return n;function n(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),n):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||gt(s)||gs(s)?t(s):r(s)}function i(s){return s===null||s===40||s===91||gt(s)||gs(s)?t(s):n(s)}function a(s){return tr(s)?o(s):r(s)}function o(s){return s===59?(e.consume(s),n):tr(s)?(e.consume(s),o):r(s)}}function $ie(e,t,r){return n;function n(a){return e.consume(a),i}function i(a){return rr(a)?r(a):t(a)}}function r5(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gt(e)}function n5(e){return!tr(e)}function i5(e){return!(e===47||Pw(e))}function Pw(e){return e===43||e===45||e===46||e===95||rr(e)}function Nw(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const Gie={tokenize:Jie,partial:!0};function Wie(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Kie,continuation:{tokenize:Zie},exit:Qie}},text:{91:{name:"gfmFootnoteCall",tokenize:qie},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Yie,resolveTo:Xie}}}}function Yie(e,t,r){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o;for(;i--;){const l=n.events[i][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!o||!o._balanced)return r(l);const u=ti(n.sliceSerialize({start:o.end,end:n.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?r(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Xie(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...s),e}function qie(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,o;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?r(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(a>999||d===93&&!o||d===null||d===91||gt(d))return r(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(ti(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(d)}return gt(d)||(o=!0),a++,e.consume(d),d===92?f:u}function f(d){return d===91||d===92||d===93?(e.consume(d),a++,u):u(d)}}function Kie(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,o=0,s;return l;function l(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):r(g)}function f(g){if(o>999||g===93&&!s||g===null||g===91||gt(g))return r(g);if(g===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return a=ti(n.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return gt(g)||(s=!0),o++,e.consume(g),g===92?d:f}function d(g){return g===91||g===92||g===93?(e.consume(g),o++,f):f(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(a)||i.push(a),at(e,v,"gfmFootnoteDefinitionWhitespace")):r(g)}function v(g){return t(g)}}function Zie(e,t,r){return e.check(of,t,e.attempt(Gie,t,r))}function Qie(e){e.exit("gfmFootnoteDefinition")}function Jie(e,t,r){const n=this;return at(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=n.events[n.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):r(a)}}function eae(e){let r=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:a,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(o,s){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let u=l;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[l][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[l][1].end)},d={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[l][1].start)},p=[["enter",f,s],["enter",o[u][1],s],["exit",o[u][1],s],["enter",d,s]],v=s.parser.constructs.insideSpan.null;v&&ei(p,p.length,0,nv(v,o.slice(u+1,l),s)),ei(p,p.length,0,[["exit",d,s],["enter",o[l][1],s],["exit",o[l][1],s],["exit",f,s]]),ei(o,u-1,l-u+3,p),l=u+p.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function a(o,s,l){const u=this.previous,f=this.events;let d=0;return p;function p(g){return u===126&&f[f.length-1][1].type!=="characterEscape"?l(g):(o.enter("strikethroughSequenceTemporary"),v(g))}function v(g){const y=Va(u);if(g===126)return d>1?l(g):(o.consume(g),d++,v);if(d<2&&!r)return l(g);const x=o.exit("strikethroughSequenceTemporary"),b=Va(g);return x._open=!b||b===2&&!!y,x._close=!y||y===2&&!!b,s(g)}}}class tae{constructor(){this.map=[],this.index=new Map}add(t,r,n){rae(this,t,r,n)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let i=n.pop();for(;i;){for(const a of i)t.push(a);i=n.pop()}this.map.length=0,this.index.clear()}}function rae(e,t,r,n){if(r===0&&n.length===0)return;const i=e.index.get(t);if(i){i[1]+=r,i[2].push(...n);return}const a=[t,r,n];e.map.push(a),e.index.set(t,a)}function nae(e,t){let r=!1;const n=[];for(;t<e.length;){const i=e[t];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=n.length-1;n[a]=n[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function iae(){return{flow:{null:{name:"table",tokenize:aae,resolveAll:oae}}}}function aae(e,t,r){const n=this;let i=0,a=0,o;return s;function s(M){let P=n.events.length-1;for(;P>-1;){const{type:$}=n.events[P][1];if($==="lineEnding"||$==="linePrefix")P--;else break}const j=P>-1?n.events[P][1].type:null,B=j==="tableHead"||j==="tableRow"?D:l;return B===D&&n.parser.lazy[n.now().line]?r(M):B(M)}function l(M){return e.enter("tableHead"),e.enter("tableRow"),u(M)}function u(M){return M===124||(o=!0,a+=1),f(M)}function f(M){return M===null?r(M):ze(M)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),v):r(M):Ze(M)?at(e,f,"whitespace")(M):(a+=1,o&&(o=!1,i+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),o=!0,f):(e.enter("data"),d(M)))}function d(M){return M===null||M===124||gt(M)?(e.exit("data"),f(M)):(e.consume(M),M===92?p:d)}function p(M){return M===92||M===124?(e.consume(M),d):d(M)}function v(M){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(M):(e.enter("tableDelimiterRow"),o=!1,Ze(M)?at(e,g,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):g(M))}function g(M){return M===45||M===58?x(M):M===124?(o=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),y):E(M)}function y(M){return Ze(M)?at(e,x,"whitespace")(M):x(M)}function x(M){return M===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),b):M===45?(a+=1,b(M)):M===null||ze(M)?T(M):E(M)}function b(M){return M===45?(e.enter("tableDelimiterFiller"),_(M)):E(M)}function _(M){return M===45?(e.consume(M),_):M===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(M))}function S(M){return Ze(M)?at(e,T,"whitespace")(M):T(M)}function T(M){return M===124?g(M):M===null||ze(M)?!o||i!==a?E(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):E(M)}function E(M){return r(M)}function D(M){return e.enter("tableRow"),L(M)}function L(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),L):M===null||ze(M)?(e.exit("tableRow"),t(M)):Ze(M)?at(e,L,"whitespace")(M):(e.enter("data"),R(M))}function R(M){return M===null||M===124||gt(M)?(e.exit("data"),L(M)):(e.consume(M),M===92?O:R)}function O(M){return M===92||M===124?(e.consume(M),R):R(M)}}function oae(e,t){let r=-1,n=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,u,f,d;const p=new tae;for(;++r<e.length;){const v=e[r],g=v[1];v[0]==="enter"?g.type==="tableHead"?(s=!1,l!==0&&(a5(p,t,l,u,f),f=void 0,l=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(r,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(n=!0,d=void 0,a=[0,0,0,0],o=[0,r+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(r,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(n=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=mv(p,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=r)):g.type==="tableCellDivider"&&(n?n=!1:(a[1]!==0&&(o[0]=o[1],d=mv(p,t,a,i,void 0,d)),a=o,o=[a[1],r,0,0])):g.type==="tableHead"?(s=!0,l=r):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=r,a[1]!==0?(o[0]=o[1],d=mv(p,t,a,i,r,d)):o[1]!==0&&(d=mv(p,t,o,i,r,d)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=r)}for(l!==0&&a5(p,t,l,u,f),p.consume(t.events),r=-1;++r<t.events.length;){const v=t.events[r];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=nae(t.events,r))}return e}function mv(e,t,r,n,i,a){const o=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(a.end=Object.assign({},Gl(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const l=Gl(t.events,r[1]);if(a={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(r[1],0,[["enter",a,t]]),r[2]!==0){const u=Gl(t.events,r[2]),f=Gl(t.events,r[3]),d={type:s,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(r[2],0,[["enter",d,t]]),n!==2){const p=t.events[r[2]],v=t.events[r[3]];if(p[1].end=Object.assign({},v[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){const g=r[2]+1,y=r[3]-r[2]-1;e.add(g,y,[])}}e.add(r[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},Gl(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function a5(e,t,r,n,i){const a=[],o=Gl(t.events,r);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),n.end=Object.assign({},o),a.push(["exit",n,t]),e.add(r+1,0,a)}function Gl(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const sae={name:"tasklistCheck",tokenize:uae};function lae(){return{text:{91:sae}}}function uae(e,t,r){const n=this;return i;function i(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),a)}function a(l){return gt(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):r(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):r(l)}function s(l){return ze(l)?t(l):Ze(l)?e.check({tokenize:cae},t,r)(l):r(l)}}function cae(e,t,r){return at(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function fae(e){return NN([Oie(),Wie(),eae(e),iae(),lae()])}const dae={};function hae(e){const t=this,r=e||dae,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(fae(r)),a.push(Iie()),o.push(Pie(r))}const pae=2e3,vae=[hae,tne],yv=e=>typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(yv).join(""):H.isValidElement(e)?yv(e.props.children):"",gae=({code:e})=>{const{t}=ye(),[r,n]=H.useState(!1),i=H.useRef(void 0);H.useEffect(()=>()=>{window.clearTimeout(i.current)},[]);const a=t(r?"copied":"copy");return k.jsxs("button",{type:"button","aria-label":a,onClick:()=>{gm(e).then(o=>{o&&(n(!0),window.clearTimeout(i.current),i.current=window.setTimeout(()=>{n(!1)},pae))})},className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-2xs text-muted-foreground hover:bg-background/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[r?k.jsx(da,{className:"size-3.5","aria-hidden":"true"}):k.jsx(lm,{className:"size-3.5","aria-hidden":"true"}),k.jsx("span",{children:a})]})},mae=({children:e})=>{const t=H.Children.toArray(e)[0],r=H.isValidElement(t)?t.props.className??"":"",n=/language-([\w+#-]+)/.exec(r)?.[1];return k.jsxs("div",{className:"mt-3 overflow-hidden rounded-lg border bg-muted/60 first:mt-0",children:[k.jsxs("div",{className:"flex h-8 items-center justify-between border-b bg-muted px-3",children:[k.jsx("span",{className:"font-mono text-2xs lowercase text-muted-foreground",children:n??"text"}),k.jsx(gae,{code:yv(e).replace(/\n$/,"")})]}),k.jsx("pre",{className:"overflow-x-auto p-3 font-mono text-[13px] leading-relaxed",children:e})]})},Rw="text-primary underline underline-offset-2 hover:text-primary/80",yae=({href:e,children:t})=>{const{api:r}=ye(),n=e??"";if(xu(n,r.apiUrl))return k.jsx(I2,{url:n,name:yv(t)||"file",className:`${Rw} inline p-0 text-left`,children:t});const i=go(n);return i?k.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:Rw,children:t}):k.jsx("span",{children:t})},xae=({src:e,alt:t})=>{const{api:r}=ye(),n=typeof e=="string"?e:"";if(xu(n,r.apiUrl))return k.jsx(Gj,{url:n,alt:t??""});const i=t===void 0||t===""?n:t,a=go(n);return a?k.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:Rw,children:i}):k.jsx("span",{children:i})},Wl="mt-3 first:mt-0",bae=({checked:e})=>k.jsx("span",{role:"img","aria-label":e?"☑":"☐",className:he("inline-flex size-4 shrink-0 items-center justify-center rounded border",e?"border-primary bg-primary text-primary-foreground":"bg-background"),children:e?k.jsx(da,{className:"size-3","aria-hidden":"true"}):null}),wae={p:({children:e})=>k.jsx("p",{className:Wl,children:e}),strong:({children:e})=>k.jsx("strong",{className:"font-semibold",children:e}),ul:({children:e,className:t})=>t?.includes("contains-task-list")?k.jsx("ul",{className:he(Wl,"list-none pl-0.5"),children:e}):k.jsx("ul",{className:he(Wl,"list-disc pl-[22px] [&_li+li]:mt-1 [&_ul]:mt-1"),children:e}),ol:({children:e})=>k.jsx("ol",{className:he(Wl,"list-decimal pl-[22px] [&_li+li]:mt-1"),children:e}),li:({children:e,className:t})=>t?.includes("task-list-item")?k.jsx("li",{className:"flex items-center gap-2",children:e}):k.jsx("li",{children:e}),input:({checked:e,type:t})=>t==="checkbox"?k.jsx(bae,{checked:e===!0}):null,h1:({children:e})=>k.jsx("h1",{className:"mt-5 text-3xl font-semibold leading-[1.3] first:mt-0",children:e}),h2:({children:e,className:t})=>k.jsx("h2",{className:he("mt-[18px] text-2xl font-semibold leading-[1.35] first:mt-0",t),children:e}),h3:({children:e})=>k.jsx("h3",{className:"mt-4 text-[17px] font-semibold first:mt-0",children:e}),h4:({children:e})=>k.jsx("h4",{className:"mt-3 text-[15px] font-semibold first:mt-0",children:e}),h5:({children:e})=>k.jsx("h5",{className:"mt-3 text-sm font-semibold first:mt-0",children:e}),h6:({children:e})=>k.jsx("h6",{className:"mt-3 text-[13px] font-semibold text-muted-foreground first:mt-0",children:e}),code:({children:e,className:t})=>t?.includes("language-")?k.jsx("code",{className:t,children:e}):k.jsx("code",{className:"rounded-[5px] border bg-muted px-[5px] py-px font-mono text-[13.5px]",children:e}),pre:({children:e})=>k.jsx(mae,{children:e}),blockquote:({children:e})=>k.jsx("blockquote",{className:he(Wl,"border-l-[3px] py-0.5 pl-3.5 text-muted-foreground"),children:e}),a:({href:e,children:t})=>k.jsx(yae,{href:e,children:t}),sup:({children:e})=>k.jsx("sup",{className:"text-[11px] [&_a]:no-underline",children:e}),section:({children:e,...t})=>"data-footnotes"in t?k.jsx("section",{className:"mt-3 border-t pt-2 text-[13px] text-muted-foreground",children:e}):k.jsx("section",{children:e}),img:({src:e,alt:t})=>k.jsx(xae,{src:e,alt:t}),table:({children:e})=>k.jsx("div",{className:he(Wl,"overflow-x-auto rounded-[10px] border"),children:k.jsx("table",{className:"min-w-full border-collapse text-[13.5px]",children:e})}),thead:({children:e})=>k.jsx("thead",{className:"bg-muted",children:e}),tr:({children:e})=>k.jsx("tr",{className:"border-b last:border-b-0",children:e}),th:({children:e})=>k.jsx("th",{className:"whitespace-nowrap px-3 py-[7px] text-left font-semibold",children:e}),td:({children:e})=>k.jsx("td",{className:"whitespace-nowrap px-3 py-[7px]",children:e}),hr:()=>k.jsx("hr",{className:"my-4 border-0 border-t"})},_ae=H.memo(function({children:t}){return k.jsx($re,{remarkPlugins:vae,components:wae,skipHtml:!0,children:t.replace(/\\r\\n/g,`
|
|
75
|
+
`).replace(/\\n/g,`
|
|
76
|
+
`)})}),kae=Object.freeze(Object.defineProperty({__proto__:null,MarkdownImpl:_ae},Symbol.toStringTag,{value:"Module"}));return dn.AiDanaChatElement=qm,dn.DEFAULT_API_URL=oC,dn.mount=lC,dn.mountLauncher=sC,Object.defineProperty(dn,Symbol.toStringTag,{value:"Module"}),dn})({});
|