@dsrcjs/ai-widget 0.0.0-stage → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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-B6eiFnZN.js +18 -0
- package/dist/i18n.d.ts +287 -0
- package/dist/index-D2Riqtpn.js +19 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.js +1 -0
- package/dist/markdown-impl-Cu_bBFxI.js +34 -0
- package/dist/stream-entry-CNdFWIwY.js +8 -0
- package/dist/theme.d.ts +82 -0
- package/package.json +36 -4
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var AiDanaChat=(function(Zr){"use strict";var pte=Object.defineProperty;var vte=(Zr,di,za)=>di in Zr?pte(Zr,di,{enumerable:!0,configurable:!0,writable:!0,value:za}):Zr[di]=za;var _l=(Zr,di,za)=>vte(Zr,typeof di!="symbol"?di+"":di,za);function di(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 za(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nv={exports:{}},kl={},iv={exports:{}},Xe={};var Jb;function iR(){if(Jb)return Xe;Jb=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"),c=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.iterator;function v(z){return z===null||typeof z!="object"?null:(z=h&&z[h]||z["@@iterator"],typeof z=="function"?z:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,y={};function x(z,Y,F){this.props=z,this.context=Y,this.refs=y,this.updater=F||p}x.prototype.isReactComponent={},x.prototype.setState=function(z,Y){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,Y,"setState")},x.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function b(){}b.prototype=x.prototype;function _(z,Y,F){this.props=z,this.context=Y,this.refs=y,this.updater=F||p}var C=_.prototype=new b;C.constructor=_,g(C,x.prototype),C.isPureReactComponent=!0;var A=Array.isArray,M=Object.prototype.hasOwnProperty,D={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function N(z,Y,F){var ne,oe={},le=null,Me=null;if(Y!=null)for(ne in Y.ref!==void 0&&(Me=Y.ref),Y.key!==void 0&&(le=""+Y.key),Y)M.call(Y,ne)&&!E.hasOwnProperty(ne)&&(oe[ne]=Y[ne]);var we=arguments.length-2;if(we===1)oe.children=F;else if(1<we){for(var De=Array(we),_e=0;_e<we;_e++)De[_e]=arguments[_e+2];oe.children=De}if(z&&z.defaultProps)for(ne in we=z.defaultProps,we)oe[ne]===void 0&&(oe[ne]=we[ne]);return{$$typeof:e,type:z,key:le,ref:Me,props:oe,_owner:D.current}}function O(z,Y){return{$$typeof:e,type:z.type,key:Y,ref:z.ref,props:z.props,_owner:z._owner}}function L(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function R(z){var Y={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(F){return Y[F]})}var j=/\/+/g;function H(z,Y){return typeof z=="object"&&z!==null&&z.key!=null?R(""+z.key):Y.toString(36)}function W(z,Y,F,ne,oe){var le=typeof z;(le==="undefined"||le==="boolean")&&(z=null);var Me=!1;if(z===null)Me=!0;else switch(le){case"string":case"number":Me=!0;break;case"object":switch(z.$$typeof){case e:case t:Me=!0}}if(Me)return Me=z,oe=oe(Me),z=ne===""?"."+H(Me,0):ne,A(oe)?(F="",z!=null&&(F=z.replace(j,"$&/")+"/"),W(oe,Y,F,"",function(_e){return _e})):oe!=null&&(L(oe)&&(oe=O(oe,F+(!oe.key||Me&&Me.key===oe.key?"":(""+oe.key).replace(j,"$&/")+"/")+z)),Y.push(oe)),1;if(Me=0,ne=ne===""?".":ne+":",A(z))for(var we=0;we<z.length;we++){le=z[we];var De=ne+H(le,we);Me+=W(le,Y,F,De,oe)}else if(De=v(z),typeof De=="function")for(z=De.call(z),we=0;!(le=z.next()).done;)le=le.value,De=ne+H(le,we++),Me+=W(le,Y,F,De,oe);else if(le==="object")throw Y=String(z),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return Me}function K(z,Y,F){if(z==null)return z;var ne=[],oe=0;return W(z,ne,"","",function(le){return Y.call(F,le,oe++)}),ne}function Q(z){if(z._status===-1){var Y=z._result;Y=Y(),Y.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=Y)}if(z._status===1)return z._result.default;throw z._result}var re={current:null},X={transition:null},$={ReactCurrentDispatcher:re,ReactCurrentBatchConfig:X,ReactCurrentOwner:D};function I(){throw Error("act(...) is not supported in production builds of React.")}return Xe.Children={map:K,forEach:function(z,Y,F){K(z,function(){Y.apply(this,arguments)},F)},count:function(z){var Y=0;return K(z,function(){Y++}),Y},toArray:function(z){return K(z,function(Y){return Y})||[]},only:function(z){if(!L(z))throw Error("React.Children.only expected to receive a single React element child.");return z}},Xe.Component=x,Xe.Fragment=r,Xe.Profiler=i,Xe.PureComponent=_,Xe.StrictMode=n,Xe.Suspense=l,Xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$,Xe.act=I,Xe.cloneElement=function(z,Y,F){if(z==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+z+".");var ne=g({},z.props),oe=z.key,le=z.ref,Me=z._owner;if(Y!=null){if(Y.ref!==void 0&&(le=Y.ref,Me=D.current),Y.key!==void 0&&(oe=""+Y.key),z.type&&z.type.defaultProps)var we=z.type.defaultProps;for(De in Y)M.call(Y,De)&&!E.hasOwnProperty(De)&&(ne[De]=Y[De]===void 0&&we!==void 0?we[De]:Y[De])}var De=arguments.length-2;if(De===1)ne.children=F;else if(1<De){we=Array(De);for(var _e=0;_e<De;_e++)we[_e]=arguments[_e+2];ne.children=we}return{$$typeof:e,type:z.type,key:oe,ref:le,props:ne,_owner:Me}},Xe.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},Xe.createElement=N,Xe.createFactory=function(z){var Y=N.bind(null,z);return Y.type=z,Y},Xe.createRef=function(){return{current:null}},Xe.forwardRef=function(z){return{$$typeof:s,render:z}},Xe.isValidElement=L,Xe.lazy=function(z){return{$$typeof:f,_payload:{_status:-1,_result:z},_init:Q}},Xe.memo=function(z,Y){return{$$typeof:c,type:z,compare:Y===void 0?null:Y}},Xe.startTransition=function(z){var Y=X.transition;X.transition={};try{z()}finally{X.transition=Y}},Xe.unstable_act=I,Xe.useCallback=function(z,Y){return re.current.useCallback(z,Y)},Xe.useContext=function(z){return re.current.useContext(z)},Xe.useDebugValue=function(){},Xe.useDeferredValue=function(z){return re.current.useDeferredValue(z)},Xe.useEffect=function(z,Y){return re.current.useEffect(z,Y)},Xe.useId=function(){return re.current.useId()},Xe.useImperativeHandle=function(z,Y,F){return re.current.useImperativeHandle(z,Y,F)},Xe.useInsertionEffect=function(z,Y){return re.current.useInsertionEffect(z,Y)},Xe.useLayoutEffect=function(z,Y){return re.current.useLayoutEffect(z,Y)},Xe.useMemo=function(z,Y){return re.current.useMemo(z,Y)},Xe.useReducer=function(z,Y,F){return re.current.useReducer(z,Y,F)},Xe.useRef=function(z){return re.current.useRef(z)},Xe.useState=function(z){return re.current.useState(z)},Xe.useSyncExternalStore=function(z,Y,F){return re.current.useSyncExternalStore(z,Y,F)},Xe.useTransition=function(){return re.current.useTransition()},Xe.version="18.3.1",Xe}var ew;function av(){return ew||(ew=1,iv.exports=iR()),iv.exports}var tw;function aR(){if(tw)return kl;tw=1;var e=av(),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,c){var f,h={},v=null,p=null;c!==void 0&&(v=""+c),l.key!==void 0&&(v=""+l.key),l.ref!==void 0&&(p=l.ref);for(f in l)n.call(l,f)&&!a.hasOwnProperty(f)&&(h[f]=l[f]);if(s&&s.defaultProps)for(f in l=s.defaultProps,l)h[f]===void 0&&(h[f]=l[f]);return{$$typeof:t,type:s,key:v,ref:p,props:h,_owner:i.current}}return kl.Fragment=r,kl.jsx=o,kl.jsxs=o,kl}var rw;function oR(){return rw||(rw=1,nv.exports=aR()),nv.exports}var k=oR(),B=av();const sR=di({__proto__:null,default:za(B)},[B]);var Gc={},ov={exports:{}},xr={},sv={exports:{}},lv={};var nw;function lR(){return nw||(nw=1,(function(e){function t(X,$){var I=X.length;X.push($);e:for(;0<I;){var z=I-1>>>1,Y=X[z];if(0<i(Y,$))X[z]=$,X[I]=Y,I=z;else break e}}function r(X){return X.length===0?null:X[0]}function n(X){if(X.length===0)return null;var $=X[0],I=X.pop();if(I!==$){X[0]=I;e:for(var z=0,Y=X.length,F=Y>>>1;z<F;){var ne=2*(z+1)-1,oe=X[ne],le=ne+1,Me=X[le];if(0>i(oe,I))le<Y&&0>i(Me,oe)?(X[z]=Me,X[le]=I,z=le):(X[z]=oe,X[ne]=I,z=ne);else if(le<Y&&0>i(Me,I))X[z]=Me,X[le]=I,z=le;else break e}}return $}function i(X,$){var I=X.sortIndex-$.sortIndex;return I!==0?I:X.id-$.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=[],c=[],f=1,h=null,v=3,p=!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 C(X){for(var $=r(c);$!==null;){if($.callback===null)n(c);else if($.startTime<=X)n(c),$.sortIndex=$.expirationTime,t(l,$);else break;$=r(c)}}function A(X){if(y=!1,C(X),!g)if(r(l)!==null)g=!0,Q(M);else{var $=r(c);$!==null&&re(A,$.startTime-X)}}function M(X,$){g=!1,y&&(y=!1,b(N),N=-1),p=!0;var I=v;try{for(C($),h=r(l);h!==null&&(!(h.expirationTime>$)||X&&!R());){var z=h.callback;if(typeof z=="function"){h.callback=null,v=h.priorityLevel;var Y=z(h.expirationTime<=$);$=e.unstable_now(),typeof Y=="function"?h.callback=Y:h===r(l)&&n(l),C($)}else n(l);h=r(l)}if(h!==null)var F=!0;else{var ne=r(c);ne!==null&&re(A,ne.startTime-$),F=!1}return F}finally{h=null,v=I,p=!1}}var D=!1,E=null,N=-1,O=5,L=-1;function R(){return!(e.unstable_now()-L<O)}function j(){if(E!==null){var X=e.unstable_now();L=X;var $=!0;try{$=E(!0,X)}finally{$?H():(D=!1,E=null)}}else D=!1}var H;if(typeof _=="function")H=function(){_(j)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,K=W.port2;W.port1.onmessage=j,H=function(){K.postMessage(null)}}else H=function(){x(j,0)};function Q(X){E=X,D||(D=!0,H())}function re(X,$){N=x(function(){X(e.unstable_now())},$)}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(X){X.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,Q(M))},e.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<X?Math.floor(1e3/X):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(X){switch(v){case 1:case 2:case 3:var $=3;break;default:$=v}var I=v;v=$;try{return X()}finally{v=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(X,$){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var I=v;v=X;try{return $()}finally{v=I}},e.unstable_scheduleCallback=function(X,$,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,X){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=I+Y,X={id:f++,callback:$,priorityLevel:X,startTime:I,expirationTime:Y,sortIndex:-1},I>z?(X.sortIndex=I,t(c,X),r(l)===null&&X===r(c)&&(y?(b(N),N=-1):y=!0,re(A,I-z))):(X.sortIndex=Y,t(l,X),g||p||(g=!0,Q(M))),X},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(X){var $=v;return function(){var I=v;v=$;try{return X.apply(this,arguments)}finally{v=I}}}})(lv)),lv}var iw;function uR(){return iw||(iw=1,sv.exports=lR()),sv.exports}var aw;function cR(){if(aw)return xr;aw=1;var e=av(),t=uR();function r(u){for(var d="https://reactjs.org/docs/error-decoder.html?invariant="+u,m=1;m<arguments.length;m++)d+="&args[]="+encodeURIComponent(arguments[m]);return"Minified React error #"+u+"; visit "+d+" 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(u,d){o(u,d),o(u+"Capture",d)}function o(u,d){for(i[u]=d,u=0;u<d.length;u++)n.add(d[u])}var s=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l=Object.prototype.hasOwnProperty,c=/^[: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={},h={};function v(u){return l.call(h,u)?!0:l.call(f,u)?!1:c.test(u)?h[u]=!0:(f[u]=!0,!1)}function p(u,d,m,w){if(m!==null&&m.type===0)return!1;switch(typeof d){case"function":case"symbol":return!0;case"boolean":return w?!1:m!==null?!m.acceptsBooleans:(u=u.toLowerCase().slice(0,5),u!=="data-"&&u!=="aria-");default:return!1}}function g(u,d,m,w){if(d===null||typeof d>"u"||p(u,d,m,w))return!0;if(w)return!1;if(m!==null)switch(m.type){case 3:return!d;case 4:return d===!1;case 5:return isNaN(d);case 6:return isNaN(d)||1>d}return!1}function y(u,d,m,w,S,T,P){this.acceptsBooleans=d===2||d===3||d===4,this.attributeName=w,this.attributeNamespace=S,this.mustUseProperty=m,this.propertyName=u,this.type=d,this.sanitizeURL=T,this.removeEmptyString=P}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(u){x[u]=new y(u,0,!1,u,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(u){var d=u[0];x[d]=new y(d,1,!1,u[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(u){x[u]=new y(u,2,!1,u.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(u){x[u]=new y(u,2,!1,u,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(u){x[u]=new y(u,3,!1,u.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(u){x[u]=new y(u,3,!0,u,null,!1,!1)}),["capture","download"].forEach(function(u){x[u]=new y(u,4,!1,u,null,!1,!1)}),["cols","rows","size","span"].forEach(function(u){x[u]=new y(u,6,!1,u,null,!1,!1)}),["rowSpan","start"].forEach(function(u){x[u]=new y(u,5,!1,u.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function _(u){return u[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(u){var d=u.replace(b,_);x[d]=new y(d,1,!1,u,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(u){var d=u.replace(b,_);x[d]=new y(d,1,!1,u,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(u){var d=u.replace(b,_);x[d]=new y(d,1,!1,u,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(u){x[u]=new y(u,1,!1,u.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(u){x[u]=new y(u,1,!1,u.toLowerCase(),null,!0,!0)});function C(u,d,m,w){var S=x.hasOwnProperty(d)?x[d]:null;(S!==null?S.type!==0:w||!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(g(d,m,S,w)&&(m=null),w||S===null?v(d)&&(m===null?u.removeAttribute(d):u.setAttribute(d,""+m)):S.mustUseProperty?u[S.propertyName]=m===null?S.type===3?!1:"":m:(d=S.attributeName,w=S.attributeNamespace,m===null?u.removeAttribute(d):(S=S.type,m=S===3||S===4&&m===!0?"":""+m,w?u.setAttributeNS(w,d,m):u.setAttribute(d,m))))}var A=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,M=Symbol.for("react.element"),D=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),L=Symbol.for("react.provider"),R=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),re=Symbol.for("react.offscreen"),X=Symbol.iterator;function $(u){return u===null||typeof u!="object"?null:(u=X&&u[X]||u["@@iterator"],typeof u=="function"?u:null)}var I=Object.assign,z;function Y(u){if(z===void 0)try{throw Error()}catch(m){var d=m.stack.trim().match(/\n( *(at )?)/);z=d&&d[1]||""}return`
|
|
2
|
+
`+z+u}var F=!1;function ne(u,d){if(!u||F)return"";F=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(d)if(d=function(){throw Error()},Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(ee){var w=ee}Reflect.construct(u,[],d)}else{try{d.call()}catch(ee){w=ee}u.call(d.prototype)}else{try{throw Error()}catch(ee){w=ee}u()}}catch(ee){if(ee&&w&&typeof ee.stack=="string"){for(var S=ee.stack.split(`
|
|
3
|
+
`),T=w.stack.split(`
|
|
4
|
+
`),P=S.length-1,V=T.length-1;1<=P&&0<=V&&S[P]!==T[V];)V--;for(;1<=P&&0<=V;P--,V--)if(S[P]!==T[V]){if(P!==1||V!==1)do if(P--,V--,0>V||S[P]!==T[V]){var G=`
|
|
5
|
+
`+S[P].replace(" at new "," at ");return u.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",u.displayName)),G}while(1<=P&&0<=V);break}}}finally{F=!1,Error.prepareStackTrace=m}return(u=u?u.displayName||u.name:"")?Y(u):""}function oe(u){switch(u.tag){case 5:return Y(u.type);case 16:return Y("Lazy");case 13:return Y("Suspense");case 19:return Y("SuspenseList");case 0:case 2:case 15:return u=ne(u.type,!1),u;case 11:return u=ne(u.type.render,!1),u;case 1:return u=ne(u.type,!0),u;default:return""}}function le(u){if(u==null)return null;if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case E:return"Fragment";case D:return"Portal";case O:return"Profiler";case N:return"StrictMode";case H:return"Suspense";case W:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case R:return(u.displayName||"Context")+".Consumer";case L:return(u._context.displayName||"Context")+".Provider";case j:var d=u.render;return u=u.displayName,u||(u=d.displayName||d.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case K:return d=u.displayName||null,d!==null?d:le(u.type)||"Memo";case Q:d=u._payload,u=u._init;try{return le(u(d))}catch{}}return null}function Me(u){var d=u.type;switch(u.tag){case 24:return"Cache";case 9:return(d.displayName||"Context")+".Consumer";case 10:return(d._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return u=d.render,u=u.displayName||u.name||"",d.displayName||(u!==""?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return d;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return le(d);case 8:return d===N?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d}return null}function we(u){switch(typeof u){case"boolean":case"number":case"string":case"undefined":return u;case"object":return u;default:return""}}function De(u){var d=u.type;return(u=u.nodeName)&&u.toLowerCase()==="input"&&(d==="checkbox"||d==="radio")}function _e(u){var d=De(u)?"checked":"value",m=Object.getOwnPropertyDescriptor(u.constructor.prototype,d),w=""+u[d];if(!u.hasOwnProperty(d)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var S=m.get,T=m.set;return Object.defineProperty(u,d,{configurable:!0,get:function(){return S.call(this)},set:function(P){w=""+P,T.call(this,P)}}),Object.defineProperty(u,d,{enumerable:m.enumerable}),{getValue:function(){return w},setValue:function(P){w=""+P},stopTracking:function(){u._valueTracker=null,delete u[d]}}}}function Ce(u){u._valueTracker||(u._valueTracker=_e(u))}function Ve(u){if(!u)return!1;var d=u._valueTracker;if(!d)return!0;var m=d.getValue(),w="";return u&&(w=De(u)?u.checked?"true":"false":u.value),u=w,u!==m?(d.setValue(u),!0):!1}function Xt(u){if(u=u||(typeof document<"u"?document:void 0),typeof u>"u")return null;try{return u.activeElement||u.body}catch{return u.body}}function wt(u,d){var m=d.checked;return I({},d,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:m??u._wrapperState.initialChecked})}function Ur(u,d){var m=d.defaultValue==null?"":d.defaultValue,w=d.checked!=null?d.checked:d.defaultChecked;m=we(d.value!=null?d.value:m),u._wrapperState={initialChecked:w,initialValue:m,controlled:d.type==="checkbox"||d.type==="radio"?d.checked!=null:d.value!=null}}function vr(u,d){d=d.checked,d!=null&&C(u,"checked",d,!1)}function vn(u,d){vr(u,d);var m=we(d.value),w=d.type;if(m!=null)w==="number"?(m===0&&u.value===""||u.value!=m)&&(u.value=""+m):u.value!==""+m&&(u.value=""+m);else if(w==="submit"||w==="reset"){u.removeAttribute("value");return}d.hasOwnProperty("value")?gn(u,d.type,m):d.hasOwnProperty("defaultValue")&&gn(u,d.type,we(d.defaultValue)),d.checked==null&&d.defaultChecked!=null&&(u.defaultChecked=!!d.defaultChecked)}function Oo(u,d,m){if(d.hasOwnProperty("value")||d.hasOwnProperty("defaultValue")){var w=d.type;if(!(w!=="submit"&&w!=="reset"||d.value!==void 0&&d.value!==null))return;d=""+u._wrapperState.initialValue,m||d===u.value||(u.value=d),u.defaultValue=d}m=u.name,m!==""&&(u.name=""),u.defaultChecked=!!u._wrapperState.initialChecked,m!==""&&(u.name=m)}function gn(u,d,m){(d!=="number"||Xt(u.ownerDocument)!==u)&&(m==null?u.defaultValue=""+u._wrapperState.initialValue:u.defaultValue!==""+m&&(u.defaultValue=""+m))}var oi=Array.isArray;function gr(u,d,m,w){if(u=u.options,d){d={};for(var S=0;S<m.length;S++)d["$"+m[S]]=!0;for(m=0;m<u.length;m++)S=d.hasOwnProperty("$"+u[m].value),u[m].selected!==S&&(u[m].selected=S),S&&w&&(u[m].defaultSelected=!0)}else{for(m=""+we(m),d=null,S=0;S<u.length;S++){if(u[S].value===m){u[S].selected=!0,w&&(u[S].defaultSelected=!0);return}d!==null||u[S].disabled||(d=u[S])}d!==null&&(d.selected=!0)}}function ga(u,d){if(d.dangerouslySetInnerHTML!=null)throw Error(r(91));return I({},d,{value:void 0,defaultValue:void 0,children:""+u._wrapperState.initialValue})}function ma(u,d){var m=d.value;if(m==null){if(m=d.children,d=d.defaultValue,m!=null){if(d!=null)throw Error(r(92));if(oi(m)){if(1<m.length)throw Error(r(93));m=m[0]}d=m}d==null&&(d=""),m=d}u._wrapperState={initialValue:we(m)}}function Yh(u,d){var m=we(d.value),w=we(d.defaultValue);m!=null&&(m=""+m,m!==u.value&&(u.value=m),d.defaultValue==null&&u.defaultValue!==m&&(u.defaultValue=m)),w!=null&&(u.defaultValue=""+w)}function Xh(u){var d=u.textContent;d===u._wrapperState.initialValue&&d!==""&&d!==null&&(u.value=d)}function qh(u){switch(u){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 te(u,d){return u==null||u==="http://www.w3.org/1999/xhtml"?qh(d):u==="http://www.w3.org/2000/svg"&&d==="foreignObject"?"http://www.w3.org/1999/xhtml":u}var de,Oe=(function(u){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(d,m,w,S){MSApp.execUnsafeLocalFunction(function(){return u(d,m,w,S)})}:u})(function(u,d){if(u.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in u)u.innerHTML=d;else{for(de=de||document.createElement("div"),de.innerHTML="<svg>"+d.valueOf().toString()+"</svg>",d=de.firstChild;u.firstChild;)u.removeChild(u.firstChild);for(;d.firstChild;)u.appendChild(d.firstChild)}});function Fe(u,d){if(d){var m=u.firstChild;if(m&&m===u.lastChild&&m.nodeType===3){m.nodeValue=d;return}}u.textContent=d}var Pt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},dt=["Webkit","ms","Moz","O"];Object.keys(Pt).forEach(function(u){dt.forEach(function(d){d=d+u.charAt(0).toUpperCase()+u.substring(1),Pt[d]=Pt[u]})});function qt(u,d,m){return d==null||typeof d=="boolean"||d===""?"":m||typeof d!="number"||d===0||Pt.hasOwnProperty(u)&&Pt[u]?(""+d).trim():d+"px"}function Wr(u,d){u=u.style;for(var m in d)if(d.hasOwnProperty(m)){var w=m.indexOf("--")===0,S=qt(m,d[m],w);m==="float"&&(m="cssFloat"),w?u.setProperty(m,S):u[m]=S}}var zo=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 Di(u,d){if(d){if(zo[u]&&(d.children!=null||d.dangerouslySetInnerHTML!=null))throw Error(r(137,u));if(d.dangerouslySetInnerHTML!=null){if(d.children!=null)throw Error(r(60));if(typeof d.dangerouslySetInnerHTML!="object"||!("__html"in d.dangerouslySetInnerHTML))throw Error(r(61))}if(d.style!=null&&typeof d.style!="object")throw Error(r(62))}}function Mi(u,d){if(u.indexOf("-")===-1)return typeof d.is=="string";switch(u){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 Js=null;function jo(u){return u=u.target||u.srcElement||window,u.correspondingUseElement&&(u=u.correspondingUseElement),u.nodeType===3?u.parentNode:u}var Kt=null,Gr=null,ar=null;function wI(u){if(u=Lc(u)){if(typeof Kt!="function")throw Error(r(280));var d=u.stateNode;d&&(d=yp(d),Kt(u.stateNode,u.type,d))}}function _I(u){Gr?ar?ar.push(u):ar=[u]:Gr=u}function kI(){if(Gr){var u=Gr,d=ar;if(ar=Gr=null,wI(u),d)for(u=0;u<d.length;u++)wI(d[u])}}function SI(u,d){return u(d)}function CI(){}var g1=!1;function TI(u,d,m){if(g1)return u(d,m);g1=!0;try{return SI(u,d,m)}finally{g1=!1,(Gr!==null||ar!==null)&&(CI(),kI())}}function cc(u,d){var m=u.stateNode;if(m===null)return null;var w=yp(m);if(w===null)return null;m=w[d];e:switch(d){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)||(u=u.type,w=!(u==="button"||u==="input"||u==="select"||u==="textarea")),u=!w;break e;default:u=!1}if(u)return null;if(m&&typeof m!="function")throw Error(r(231,d,typeof m));return m}var m1=!1;if(s)try{var fc={};Object.defineProperty(fc,"passive",{get:function(){m1=!0}}),window.addEventListener("test",fc,fc),window.removeEventListener("test",fc,fc)}catch{m1=!1}function bJ(u,d,m,w,S,T,P,V,G){var ee=Array.prototype.slice.call(arguments,3);try{d.apply(m,ee)}catch(ae){this.onError(ae)}}var dc=!1,Kh=null,Zh=!1,y1=null,wJ={onError:function(u){dc=!0,Kh=u}};function _J(u,d,m,w,S,T,P,V,G){dc=!1,Kh=null,bJ.apply(wJ,arguments)}function kJ(u,d,m,w,S,T,P,V,G){if(_J.apply(this,arguments),dc){if(dc){var ee=Kh;dc=!1,Kh=null}else throw Error(r(198));Zh||(Zh=!0,y1=ee)}}function Fo(u){var d=u,m=u;if(u.alternate)for(;d.return;)d=d.return;else{u=d;do d=u,(d.flags&4098)!==0&&(m=d.return),u=d.return;while(u)}return d.tag===3?m:null}function AI(u){if(u.tag===13){var d=u.memoizedState;if(d===null&&(u=u.alternate,u!==null&&(d=u.memoizedState)),d!==null)return d.dehydrated}return null}function DI(u){if(Fo(u)!==u)throw Error(r(188))}function SJ(u){var d=u.alternate;if(!d){if(d=Fo(u),d===null)throw Error(r(188));return d!==u?null:u}for(var m=u,w=d;;){var S=m.return;if(S===null)break;var T=S.alternate;if(T===null){if(w=S.return,w!==null){m=w;continue}break}if(S.child===T.child){for(T=S.child;T;){if(T===m)return DI(S),u;if(T===w)return DI(S),d;T=T.sibling}throw Error(r(188))}if(m.return!==w.return)m=S,w=T;else{for(var P=!1,V=S.child;V;){if(V===m){P=!0,m=S,w=T;break}if(V===w){P=!0,w=S,m=T;break}V=V.sibling}if(!P){for(V=T.child;V;){if(V===m){P=!0,m=T,w=S;break}if(V===w){P=!0,w=T,m=S;break}V=V.sibling}if(!P)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?u:d}function MI(u){return u=SJ(u),u!==null?EI(u):null}function EI(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){var d=EI(u);if(d!==null)return d;u=u.sibling}return null}var LI=t.unstable_scheduleCallback,II=t.unstable_cancelCallback,CJ=t.unstable_shouldYield,TJ=t.unstable_requestPaint,Et=t.unstable_now,AJ=t.unstable_getCurrentPriorityLevel,x1=t.unstable_ImmediatePriority,PI=t.unstable_UserBlockingPriority,Qh=t.unstable_NormalPriority,DJ=t.unstable_LowPriority,NI=t.unstable_IdlePriority,Jh=null,si=null;function MJ(u){if(si&&typeof si.onCommitFiberRoot=="function")try{si.onCommitFiberRoot(Jh,u,void 0,(u.current.flags&128)===128)}catch{}}var jn=Math.clz32?Math.clz32:IJ,EJ=Math.log,LJ=Math.LN2;function IJ(u){return u>>>=0,u===0?32:31-(EJ(u)/LJ|0)|0}var ep=64,tp=4194304;function hc(u){switch(u&-u){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 u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function rp(u,d){var m=u.pendingLanes;if(m===0)return 0;var w=0,S=u.suspendedLanes,T=u.pingedLanes,P=m&268435455;if(P!==0){var V=P&~S;V!==0?w=hc(V):(T&=P,T!==0&&(w=hc(T)))}else P=m&~S,P!==0?w=hc(P):T!==0&&(w=hc(T));if(w===0)return 0;if(d!==0&&d!==w&&(d&S)===0&&(S=w&-w,T=d&-d,S>=T||S===16&&(T&4194240)!==0))return d;if((w&4)!==0&&(w|=m&16),d=u.entangledLanes,d!==0)for(u=u.entanglements,d&=w;0<d;)m=31-jn(d),S=1<<m,w|=u[m],d&=~S;return w}function PJ(u,d){switch(u){case 1:case 2:case 4:return d+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 d+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 NJ(u,d){for(var m=u.suspendedLanes,w=u.pingedLanes,S=u.expirationTimes,T=u.pendingLanes;0<T;){var P=31-jn(T),V=1<<P,G=S[P];G===-1?((V&m)===0||(V&w)!==0)&&(S[P]=PJ(V,d)):G<=d&&(u.expiredLanes|=V),T&=~V}}function b1(u){return u=u.pendingLanes&-1073741825,u!==0?u:u&1073741824?1073741824:0}function RI(){var u=ep;return ep<<=1,(ep&4194240)===0&&(ep=64),u}function w1(u){for(var d=[],m=0;31>m;m++)d.push(u);return d}function pc(u,d,m){u.pendingLanes|=d,d!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,d=31-jn(d),u[d]=m}function RJ(u,d){var m=u.pendingLanes&~d;u.pendingLanes=d,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=d,u.mutableReadLanes&=d,u.entangledLanes&=d,d=u.entanglements;var w=u.eventTimes;for(u=u.expirationTimes;0<m;){var S=31-jn(m),T=1<<S;d[S]=0,w[S]=-1,u[S]=-1,m&=~T}}function _1(u,d){var m=u.entangledLanes|=d;for(u=u.entanglements;m;){var w=31-jn(m),S=1<<w;S&d|u[w]&d&&(u[w]|=d),m&=~S}}var st=0;function OI(u){return u&=-u,1<u?4<u?(u&268435455)!==0?16:536870912:4:1}var zI,k1,jI,FI,BI,S1=!1,np=[],ya=null,xa=null,ba=null,vc=new Map,gc=new Map,wa=[],OJ="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 HI(u,d){switch(u){case"focusin":case"focusout":ya=null;break;case"dragenter":case"dragleave":xa=null;break;case"mouseover":case"mouseout":ba=null;break;case"pointerover":case"pointerout":vc.delete(d.pointerId);break;case"gotpointercapture":case"lostpointercapture":gc.delete(d.pointerId)}}function mc(u,d,m,w,S,T){return u===null||u.nativeEvent!==T?(u={blockedOn:d,domEventName:m,eventSystemFlags:w,nativeEvent:T,targetContainers:[S]},d!==null&&(d=Lc(d),d!==null&&k1(d)),u):(u.eventSystemFlags|=w,d=u.targetContainers,S!==null&&d.indexOf(S)===-1&&d.push(S),u)}function zJ(u,d,m,w,S){switch(d){case"focusin":return ya=mc(ya,u,d,m,w,S),!0;case"dragenter":return xa=mc(xa,u,d,m,w,S),!0;case"mouseover":return ba=mc(ba,u,d,m,w,S),!0;case"pointerover":var T=S.pointerId;return vc.set(T,mc(vc.get(T)||null,u,d,m,w,S)),!0;case"gotpointercapture":return T=S.pointerId,gc.set(T,mc(gc.get(T)||null,u,d,m,w,S)),!0}return!1}function VI(u){var d=Bo(u.target);if(d!==null){var m=Fo(d);if(m!==null){if(d=m.tag,d===13){if(d=AI(m),d!==null){u.blockedOn=d,BI(u.priority,function(){jI(m)});return}}else if(d===3&&m.stateNode.current.memoizedState.isDehydrated){u.blockedOn=m.tag===3?m.stateNode.containerInfo:null;return}}}u.blockedOn=null}function ip(u){if(u.blockedOn!==null)return!1;for(var d=u.targetContainers;0<d.length;){var m=T1(u.domEventName,u.eventSystemFlags,d[0],u.nativeEvent);if(m===null){m=u.nativeEvent;var w=new m.constructor(m.type,m);Js=w,m.target.dispatchEvent(w),Js=null}else return d=Lc(m),d!==null&&k1(d),u.blockedOn=m,!1;d.shift()}return!0}function $I(u,d,m){ip(u)&&m.delete(d)}function jJ(){S1=!1,ya!==null&&ip(ya)&&(ya=null),xa!==null&&ip(xa)&&(xa=null),ba!==null&&ip(ba)&&(ba=null),vc.forEach($I),gc.forEach($I)}function yc(u,d){u.blockedOn===d&&(u.blockedOn=null,S1||(S1=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,jJ)))}function xc(u){function d(S){return yc(S,u)}if(0<np.length){yc(np[0],u);for(var m=1;m<np.length;m++){var w=np[m];w.blockedOn===u&&(w.blockedOn=null)}}for(ya!==null&&yc(ya,u),xa!==null&&yc(xa,u),ba!==null&&yc(ba,u),vc.forEach(d),gc.forEach(d),m=0;m<wa.length;m++)w=wa[m],w.blockedOn===u&&(w.blockedOn=null);for(;0<wa.length&&(m=wa[0],m.blockedOn===null);)VI(m),m.blockedOn===null&&wa.shift()}var el=A.ReactCurrentBatchConfig,ap=!0;function FJ(u,d,m,w){var S=st,T=el.transition;el.transition=null;try{st=1,C1(u,d,m,w)}finally{st=S,el.transition=T}}function BJ(u,d,m,w){var S=st,T=el.transition;el.transition=null;try{st=4,C1(u,d,m,w)}finally{st=S,el.transition=T}}function C1(u,d,m,w){if(ap){var S=T1(u,d,m,w);if(S===null)$1(u,d,w,op,m),HI(u,w);else if(zJ(S,u,d,m,w))w.stopPropagation();else if(HI(u,w),d&4&&-1<OJ.indexOf(u)){for(;S!==null;){var T=Lc(S);if(T!==null&&zI(T),T=T1(u,d,m,w),T===null&&$1(u,d,w,op,m),T===S)break;S=T}S!==null&&w.stopPropagation()}else $1(u,d,w,null,m)}}var op=null;function T1(u,d,m,w){if(op=null,u=jo(w),u=Bo(u),u!==null)if(d=Fo(u),d===null)u=null;else if(m=d.tag,m===13){if(u=AI(d),u!==null)return u;u=null}else if(m===3){if(d.stateNode.current.memoizedState.isDehydrated)return d.tag===3?d.stateNode.containerInfo:null;u=null}else d!==u&&(u=null);return op=u,null}function UI(u){switch(u){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(AJ()){case x1:return 1;case PI:return 4;case Qh:case DJ:return 16;case NI:return 536870912;default:return 16}default:return 16}}var _a=null,A1=null,sp=null;function WI(){if(sp)return sp;var u,d=A1,m=d.length,w,S="value"in _a?_a.value:_a.textContent,T=S.length;for(u=0;u<m&&d[u]===S[u];u++);var P=m-u;for(w=1;w<=P&&d[m-w]===S[T-w];w++);return sp=S.slice(u,1<w?1-w:void 0)}function lp(u){var d=u.keyCode;return"charCode"in u?(u=u.charCode,u===0&&d===13&&(u=13)):u=d,u===10&&(u=13),32<=u||u===13?u:0}function up(){return!0}function GI(){return!1}function Yr(u){function d(m,w,S,T,P){this._reactName=m,this._targetInst=S,this.type=w,this.nativeEvent=T,this.target=P,this.currentTarget=null;for(var V in u)u.hasOwnProperty(V)&&(m=u[V],this[V]=m?m(T):T[V]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?up:GI,this.isPropagationStopped=GI,this}return I(d.prototype,{preventDefault:function(){this.defaultPrevented=!0;var m=this.nativeEvent;m&&(m.preventDefault?m.preventDefault():typeof m.returnValue!="unknown"&&(m.returnValue=!1),this.isDefaultPrevented=up)},stopPropagation:function(){var m=this.nativeEvent;m&&(m.stopPropagation?m.stopPropagation():typeof m.cancelBubble!="unknown"&&(m.cancelBubble=!0),this.isPropagationStopped=up)},persist:function(){},isPersistent:up}),d}var tl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(u){return u.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},D1=Yr(tl),bc=I({},tl,{view:0,detail:0}),HJ=Yr(bc),M1,E1,wc,cp=I({},bc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:I1,button:0,buttons:0,relatedTarget:function(u){return u.relatedTarget===void 0?u.fromElement===u.srcElement?u.toElement:u.fromElement:u.relatedTarget},movementX:function(u){return"movementX"in u?u.movementX:(u!==wc&&(wc&&u.type==="mousemove"?(M1=u.screenX-wc.screenX,E1=u.screenY-wc.screenY):E1=M1=0,wc=u),M1)},movementY:function(u){return"movementY"in u?u.movementY:E1}}),YI=Yr(cp),VJ=I({},cp,{dataTransfer:0}),$J=Yr(VJ),UJ=I({},bc,{relatedTarget:0}),L1=Yr(UJ),WJ=I({},tl,{animationName:0,elapsedTime:0,pseudoElement:0}),GJ=Yr(WJ),YJ=I({},tl,{clipboardData:function(u){return"clipboardData"in u?u.clipboardData:window.clipboardData}}),XJ=Yr(YJ),qJ=I({},tl,{data:0}),XI=Yr(qJ),KJ={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ZJ={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"},QJ={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function JJ(u){var d=this.nativeEvent;return d.getModifierState?d.getModifierState(u):(u=QJ[u])?!!d[u]:!1}function I1(){return JJ}var eee=I({},bc,{key:function(u){if(u.key){var d=KJ[u.key]||u.key;if(d!=="Unidentified")return d}return u.type==="keypress"?(u=lp(u),u===13?"Enter":String.fromCharCode(u)):u.type==="keydown"||u.type==="keyup"?ZJ[u.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:I1,charCode:function(u){return u.type==="keypress"?lp(u):0},keyCode:function(u){return u.type==="keydown"||u.type==="keyup"?u.keyCode:0},which:function(u){return u.type==="keypress"?lp(u):u.type==="keydown"||u.type==="keyup"?u.keyCode:0}}),tee=Yr(eee),ree=I({},cp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qI=Yr(ree),nee=I({},bc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:I1}),iee=Yr(nee),aee=I({},tl,{propertyName:0,elapsedTime:0,pseudoElement:0}),oee=Yr(aee),see=I({},cp,{deltaX:function(u){return"deltaX"in u?u.deltaX:"wheelDeltaX"in u?-u.wheelDeltaX:0},deltaY:function(u){return"deltaY"in u?u.deltaY:"wheelDeltaY"in u?-u.wheelDeltaY:"wheelDelta"in u?-u.wheelDelta:0},deltaZ:0,deltaMode:0}),lee=Yr(see),uee=[9,13,27,32],P1=s&&"CompositionEvent"in window,_c=null;s&&"documentMode"in document&&(_c=document.documentMode);var cee=s&&"TextEvent"in window&&!_c,KI=s&&(!P1||_c&&8<_c&&11>=_c),ZI=" ",QI=!1;function JI(u,d){switch(u){case"keyup":return uee.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eP(u){return u=u.detail,typeof u=="object"&&"data"in u?u.data:null}var rl=!1;function fee(u,d){switch(u){case"compositionend":return eP(d);case"keypress":return d.which!==32?null:(QI=!0,ZI);case"textInput":return u=d.data,u===ZI&&QI?null:u;default:return null}}function dee(u,d){if(rl)return u==="compositionend"||!P1&&JI(u,d)?(u=WI(),sp=A1=_a=null,rl=!1,u):null;switch(u){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1<d.char.length)return d.char;if(d.which)return String.fromCharCode(d.which)}return null;case"compositionend":return KI&&d.locale!=="ko"?null:d.data;default:return null}}var hee={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 tP(u){var d=u&&u.nodeName&&u.nodeName.toLowerCase();return d==="input"?!!hee[u.type]:d==="textarea"}function rP(u,d,m,w){_I(w),d=vp(d,"onChange"),0<d.length&&(m=new D1("onChange","change",null,m,w),u.push({event:m,listeners:d}))}var kc=null,Sc=null;function pee(u){bP(u,0)}function fp(u){var d=sl(u);if(Ve(d))return u}function vee(u,d){if(u==="change")return d}var nP=!1;if(s){var N1;if(s){var R1="oninput"in document;if(!R1){var iP=document.createElement("div");iP.setAttribute("oninput","return;"),R1=typeof iP.oninput=="function"}N1=R1}else N1=!1;nP=N1&&(!document.documentMode||9<document.documentMode)}function aP(){kc&&(kc.detachEvent("onpropertychange",oP),Sc=kc=null)}function oP(u){if(u.propertyName==="value"&&fp(Sc)){var d=[];rP(d,Sc,u,jo(u)),TI(pee,d)}}function gee(u,d,m){u==="focusin"?(aP(),kc=d,Sc=m,kc.attachEvent("onpropertychange",oP)):u==="focusout"&&aP()}function mee(u){if(u==="selectionchange"||u==="keyup"||u==="keydown")return fp(Sc)}function yee(u,d){if(u==="click")return fp(d)}function xee(u,d){if(u==="input"||u==="change")return fp(d)}function bee(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var Fn=typeof Object.is=="function"?Object.is:bee;function Cc(u,d){if(Fn(u,d))return!0;if(typeof u!="object"||u===null||typeof d!="object"||d===null)return!1;var m=Object.keys(u),w=Object.keys(d);if(m.length!==w.length)return!1;for(w=0;w<m.length;w++){var S=m[w];if(!l.call(d,S)||!Fn(u[S],d[S]))return!1}return!0}function sP(u){for(;u&&u.firstChild;)u=u.firstChild;return u}function lP(u,d){var m=sP(u);u=0;for(var w;m;){if(m.nodeType===3){if(w=u+m.textContent.length,u<=d&&w>=d)return{node:m,offset:d-u};u=w}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=sP(m)}}function uP(u,d){return u&&d?u===d?!0:u&&u.nodeType===3?!1:d&&d.nodeType===3?uP(u,d.parentNode):"contains"in u?u.contains(d):u.compareDocumentPosition?!!(u.compareDocumentPosition(d)&16):!1:!1}function cP(){for(var u=window,d=Xt();d instanceof u.HTMLIFrameElement;){try{var m=typeof d.contentWindow.location.href=="string"}catch{m=!1}if(m)u=d.contentWindow;else break;d=Xt(u.document)}return d}function O1(u){var d=u&&u.nodeName&&u.nodeName.toLowerCase();return d&&(d==="input"&&(u.type==="text"||u.type==="search"||u.type==="tel"||u.type==="url"||u.type==="password")||d==="textarea"||u.contentEditable==="true")}function wee(u){var d=cP(),m=u.focusedElem,w=u.selectionRange;if(d!==m&&m&&m.ownerDocument&&uP(m.ownerDocument.documentElement,m)){if(w!==null&&O1(m)){if(d=w.start,u=w.end,u===void 0&&(u=d),"selectionStart"in m)m.selectionStart=d,m.selectionEnd=Math.min(u,m.value.length);else if(u=(d=m.ownerDocument||document)&&d.defaultView||window,u.getSelection){u=u.getSelection();var S=m.textContent.length,T=Math.min(w.start,S);w=w.end===void 0?T:Math.min(w.end,S),!u.extend&&T>w&&(S=w,w=T,T=S),S=lP(m,T);var P=lP(m,w);S&&P&&(u.rangeCount!==1||u.anchorNode!==S.node||u.anchorOffset!==S.offset||u.focusNode!==P.node||u.focusOffset!==P.offset)&&(d=d.createRange(),d.setStart(S.node,S.offset),u.removeAllRanges(),T>w?(u.addRange(d),u.extend(P.node,P.offset)):(d.setEnd(P.node,P.offset),u.addRange(d)))}}for(d=[],u=m;u=u.parentNode;)u.nodeType===1&&d.push({element:u,left:u.scrollLeft,top:u.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<d.length;m++)u=d[m],u.element.scrollLeft=u.left,u.element.scrollTop=u.top}}var _ee=s&&"documentMode"in document&&11>=document.documentMode,nl=null,z1=null,Tc=null,j1=!1;function fP(u,d,m){var w=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;j1||nl==null||nl!==Xt(w)||(w=nl,"selectionStart"in w&&O1(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}),Tc&&Cc(Tc,w)||(Tc=w,w=vp(z1,"onSelect"),0<w.length&&(d=new D1("onSelect","select",null,d,m),u.push({event:d,listeners:w}),d.target=nl)))}function dp(u,d){var m={};return m[u.toLowerCase()]=d.toLowerCase(),m["Webkit"+u]="webkit"+d,m["Moz"+u]="moz"+d,m}var il={animationend:dp("Animation","AnimationEnd"),animationiteration:dp("Animation","AnimationIteration"),animationstart:dp("Animation","AnimationStart"),transitionend:dp("Transition","TransitionEnd")},F1={},dP={};s&&(dP=document.createElement("div").style,"AnimationEvent"in window||(delete il.animationend.animation,delete il.animationiteration.animation,delete il.animationstart.animation),"TransitionEvent"in window||delete il.transitionend.transition);function hp(u){if(F1[u])return F1[u];if(!il[u])return u;var d=il[u],m;for(m in d)if(d.hasOwnProperty(m)&&m in dP)return F1[u]=d[m];return u}var hP=hp("animationend"),pP=hp("animationiteration"),vP=hp("animationstart"),gP=hp("transitionend"),mP=new Map,yP="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 ka(u,d){mP.set(u,d),a(d,[u])}for(var B1=0;B1<yP.length;B1++){var H1=yP[B1],kee=H1.toLowerCase(),See=H1[0].toUpperCase()+H1.slice(1);ka(kee,"on"+See)}ka(hP,"onAnimationEnd"),ka(pP,"onAnimationIteration"),ka(vP,"onAnimationStart"),ka("dblclick","onDoubleClick"),ka("focusin","onFocus"),ka("focusout","onBlur"),ka(gP,"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 Ac="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(" "),Cee=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ac));function xP(u,d,m){var w=u.type||"unknown-event";u.currentTarget=m,kJ(w,d,void 0,u),u.currentTarget=null}function bP(u,d){d=(d&4)!==0;for(var m=0;m<u.length;m++){var w=u[m],S=w.event;w=w.listeners;e:{var T=void 0;if(d)for(var P=w.length-1;0<=P;P--){var V=w[P],G=V.instance,ee=V.currentTarget;if(V=V.listener,G!==T&&S.isPropagationStopped())break e;xP(S,V,ee),T=G}else for(P=0;P<w.length;P++){if(V=w[P],G=V.instance,ee=V.currentTarget,V=V.listener,G!==T&&S.isPropagationStopped())break e;xP(S,V,ee),T=G}}}if(Zh)throw u=y1,Zh=!1,y1=null,u}function mt(u,d){var m=d[q1];m===void 0&&(m=d[q1]=new Set);var w=u+"__bubble";m.has(w)||(wP(d,u,2,!1),m.add(w))}function V1(u,d,m){var w=0;d&&(w|=4),wP(m,u,w,d)}var pp="_reactListening"+Math.random().toString(36).slice(2);function Dc(u){if(!u[pp]){u[pp]=!0,n.forEach(function(m){m!=="selectionchange"&&(Cee.has(m)||V1(m,!1,u),V1(m,!0,u))});var d=u.nodeType===9?u:u.ownerDocument;d===null||d[pp]||(d[pp]=!0,V1("selectionchange",!1,d))}}function wP(u,d,m,w){switch(UI(d)){case 1:var S=FJ;break;case 4:S=BJ;break;default:S=C1}m=S.bind(null,d,m,u),S=void 0,!m1||d!=="touchstart"&&d!=="touchmove"&&d!=="wheel"||(S=!0),w?S!==void 0?u.addEventListener(d,m,{capture:!0,passive:S}):u.addEventListener(d,m,!0):S!==void 0?u.addEventListener(d,m,{passive:S}):u.addEventListener(d,m,!1)}function $1(u,d,m,w,S){var T=w;if((d&1)===0&&(d&2)===0&&w!==null)e:for(;;){if(w===null)return;var P=w.tag;if(P===3||P===4){var V=w.stateNode.containerInfo;if(V===S||V.nodeType===8&&V.parentNode===S)break;if(P===4)for(P=w.return;P!==null;){var G=P.tag;if((G===3||G===4)&&(G=P.stateNode.containerInfo,G===S||G.nodeType===8&&G.parentNode===S))return;P=P.return}for(;V!==null;){if(P=Bo(V),P===null)return;if(G=P.tag,G===5||G===6){w=T=P;continue e}V=V.parentNode}}w=w.return}TI(function(){var ee=T,ae=jo(m),se=[];e:{var ie=mP.get(u);if(ie!==void 0){var ge=D1,xe=u;switch(u){case"keypress":if(lp(m)===0)break e;case"keydown":case"keyup":ge=tee;break;case"focusin":xe="focus",ge=L1;break;case"focusout":xe="blur",ge=L1;break;case"beforeblur":case"afterblur":ge=L1;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":ge=YI;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=$J;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=iee;break;case hP:case pP:case vP:ge=GJ;break;case gP:ge=oee;break;case"scroll":ge=HJ;break;case"wheel":ge=lee;break;case"copy":case"cut":case"paste":ge=XJ;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=qI}var be=(d&4)!==0,Lt=!be&&u==="scroll",Z=be?ie!==null?ie+"Capture":null:ie;be=[];for(var q=ee,J;q!==null;){J=q;var fe=J.stateNode;if(J.tag===5&&fe!==null&&(J=fe,Z!==null&&(fe=cc(q,Z),fe!=null&&be.push(Mc(q,fe,J)))),Lt)break;q=q.return}0<be.length&&(ie=new ge(ie,xe,null,m,ae),se.push({event:ie,listeners:be}))}}if((d&7)===0){e:{if(ie=u==="mouseover"||u==="pointerover",ge=u==="mouseout"||u==="pointerout",ie&&m!==Js&&(xe=m.relatedTarget||m.fromElement)&&(Bo(xe)||xe[Ei]))break e;if((ge||ie)&&(ie=ae.window===ae?ae:(ie=ae.ownerDocument)?ie.defaultView||ie.parentWindow:window,ge?(xe=m.relatedTarget||m.toElement,ge=ee,xe=xe?Bo(xe):null,xe!==null&&(Lt=Fo(xe),xe!==Lt||xe.tag!==5&&xe.tag!==6)&&(xe=null)):(ge=null,xe=ee),ge!==xe)){if(be=YI,fe="onMouseLeave",Z="onMouseEnter",q="mouse",(u==="pointerout"||u==="pointerover")&&(be=qI,fe="onPointerLeave",Z="onPointerEnter",q="pointer"),Lt=ge==null?ie:sl(ge),J=xe==null?ie:sl(xe),ie=new be(fe,q+"leave",ge,m,ae),ie.target=Lt,ie.relatedTarget=J,fe=null,Bo(ae)===ee&&(be=new be(Z,q+"enter",xe,m,ae),be.target=J,be.relatedTarget=Lt,fe=be),Lt=fe,ge&&xe)t:{for(be=ge,Z=xe,q=0,J=be;J;J=al(J))q++;for(J=0,fe=Z;fe;fe=al(fe))J++;for(;0<q-J;)be=al(be),q--;for(;0<J-q;)Z=al(Z),J--;for(;q--;){if(be===Z||Z!==null&&be===Z.alternate)break t;be=al(be),Z=al(Z)}be=null}else be=null;ge!==null&&_P(se,ie,ge,be,!1),xe!==null&&Lt!==null&&_P(se,Lt,xe,be,!0)}}e:{if(ie=ee?sl(ee):window,ge=ie.nodeName&&ie.nodeName.toLowerCase(),ge==="select"||ge==="input"&&ie.type==="file")var ke=vee;else if(tP(ie))if(nP)ke=xee;else{ke=mee;var Le=gee}else(ge=ie.nodeName)&&ge.toLowerCase()==="input"&&(ie.type==="checkbox"||ie.type==="radio")&&(ke=yee);if(ke&&(ke=ke(u,ee))){rP(se,ke,m,ae);break e}Le&&Le(u,ie,ee),u==="focusout"&&(Le=ie._wrapperState)&&Le.controlled&&ie.type==="number"&&gn(ie,"number",ie.value)}switch(Le=ee?sl(ee):window,u){case"focusin":(tP(Le)||Le.contentEditable==="true")&&(nl=Le,z1=ee,Tc=null);break;case"focusout":Tc=z1=nl=null;break;case"mousedown":j1=!0;break;case"contextmenu":case"mouseup":case"dragend":j1=!1,fP(se,m,ae);break;case"selectionchange":if(_ee)break;case"keydown":case"keyup":fP(se,m,ae)}var Ie;if(P1)e:{switch(u){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else rl?JI(u,m)&&(ze="onCompositionEnd"):u==="keydown"&&m.keyCode===229&&(ze="onCompositionStart");ze&&(KI&&m.locale!=="ko"&&(rl||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&rl&&(Ie=WI()):(_a=ae,A1="value"in _a?_a.value:_a.textContent,rl=!0)),Le=vp(ee,ze),0<Le.length&&(ze=new XI(ze,u,null,m,ae),se.push({event:ze,listeners:Le}),Ie?ze.data=Ie:(Ie=eP(m),Ie!==null&&(ze.data=Ie)))),(Ie=cee?fee(u,m):dee(u,m))&&(ee=vp(ee,"onBeforeInput"),0<ee.length&&(ae=new XI("onBeforeInput","beforeinput",null,m,ae),se.push({event:ae,listeners:ee}),ae.data=Ie))}bP(se,d)})}function Mc(u,d,m){return{instance:u,listener:d,currentTarget:m}}function vp(u,d){for(var m=d+"Capture",w=[];u!==null;){var S=u,T=S.stateNode;S.tag===5&&T!==null&&(S=T,T=cc(u,m),T!=null&&w.unshift(Mc(u,T,S)),T=cc(u,d),T!=null&&w.push(Mc(u,T,S))),u=u.return}return w}function al(u){if(u===null)return null;do u=u.return;while(u&&u.tag!==5);return u||null}function _P(u,d,m,w,S){for(var T=d._reactName,P=[];m!==null&&m!==w;){var V=m,G=V.alternate,ee=V.stateNode;if(G!==null&&G===w)break;V.tag===5&&ee!==null&&(V=ee,S?(G=cc(m,T),G!=null&&P.unshift(Mc(m,G,V))):S||(G=cc(m,T),G!=null&&P.push(Mc(m,G,V)))),m=m.return}P.length!==0&&u.push({event:d,listeners:P})}var Tee=/\r\n?/g,Aee=/\u0000|\uFFFD/g;function kP(u){return(typeof u=="string"?u:""+u).replace(Tee,`
|
|
6
|
+
`).replace(Aee,"")}function gp(u,d,m){if(d=kP(d),kP(u)!==d&&m)throw Error(r(425))}function mp(){}var U1=null,W1=null;function G1(u,d){return u==="textarea"||u==="noscript"||typeof d.children=="string"||typeof d.children=="number"||typeof d.dangerouslySetInnerHTML=="object"&&d.dangerouslySetInnerHTML!==null&&d.dangerouslySetInnerHTML.__html!=null}var Y1=typeof setTimeout=="function"?setTimeout:void 0,Dee=typeof clearTimeout=="function"?clearTimeout:void 0,SP=typeof Promise=="function"?Promise:void 0,Mee=typeof queueMicrotask=="function"?queueMicrotask:typeof SP<"u"?function(u){return SP.resolve(null).then(u).catch(Eee)}:Y1;function Eee(u){setTimeout(function(){throw u})}function X1(u,d){var m=d,w=0;do{var S=m.nextSibling;if(u.removeChild(m),S&&S.nodeType===8)if(m=S.data,m==="/$"){if(w===0){u.removeChild(S),xc(d);return}w--}else m!=="$"&&m!=="$?"&&m!=="$!"||w++;m=S}while(m);xc(d)}function Sa(u){for(;u!=null;u=u.nextSibling){var d=u.nodeType;if(d===1||d===3)break;if(d===8){if(d=u.data,d==="$"||d==="$!"||d==="$?")break;if(d==="/$")return null}}return u}function CP(u){u=u.previousSibling;for(var d=0;u;){if(u.nodeType===8){var m=u.data;if(m==="$"||m==="$!"||m==="$?"){if(d===0)return u;d--}else m==="/$"&&d++}u=u.previousSibling}return null}var ol=Math.random().toString(36).slice(2),li="__reactFiber$"+ol,Ec="__reactProps$"+ol,Ei="__reactContainer$"+ol,q1="__reactEvents$"+ol,Lee="__reactListeners$"+ol,Iee="__reactHandles$"+ol;function Bo(u){var d=u[li];if(d)return d;for(var m=u.parentNode;m;){if(d=m[Ei]||m[li]){if(m=d.alternate,d.child!==null||m!==null&&m.child!==null)for(u=CP(u);u!==null;){if(m=u[li])return m;u=CP(u)}return d}u=m,m=u.parentNode}return null}function Lc(u){return u=u[li]||u[Ei],!u||u.tag!==5&&u.tag!==6&&u.tag!==13&&u.tag!==3?null:u}function sl(u){if(u.tag===5||u.tag===6)return u.stateNode;throw Error(r(33))}function yp(u){return u[Ec]||null}var K1=[],ll=-1;function Ca(u){return{current:u}}function yt(u){0>ll||(u.current=K1[ll],K1[ll]=null,ll--)}function vt(u,d){ll++,K1[ll]=u.current,u.current=d}var Ta={},or=Ca(Ta),Pr=Ca(!1),Ho=Ta;function ul(u,d){var m=u.type.contextTypes;if(!m)return Ta;var w=u.stateNode;if(w&&w.__reactInternalMemoizedUnmaskedChildContext===d)return w.__reactInternalMemoizedMaskedChildContext;var S={},T;for(T in m)S[T]=d[T];return w&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=d,u.__reactInternalMemoizedMaskedChildContext=S),S}function Nr(u){return u=u.childContextTypes,u!=null}function xp(){yt(Pr),yt(or)}function TP(u,d,m){if(or.current!==Ta)throw Error(r(168));vt(or,d),vt(Pr,m)}function AP(u,d,m){var w=u.stateNode;if(d=d.childContextTypes,typeof w.getChildContext!="function")return m;w=w.getChildContext();for(var S in w)if(!(S in d))throw Error(r(108,Me(u)||"Unknown",S));return I({},m,w)}function bp(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||Ta,Ho=or.current,vt(or,u),vt(Pr,Pr.current),!0}function DP(u,d,m){var w=u.stateNode;if(!w)throw Error(r(169));m?(u=AP(u,d,Ho),w.__reactInternalMemoizedMergedChildContext=u,yt(Pr),yt(or),vt(or,u)):yt(Pr),vt(Pr,m)}var Li=null,wp=!1,Z1=!1;function MP(u){Li===null?Li=[u]:Li.push(u)}function Pee(u){wp=!0,MP(u)}function Aa(){if(!Z1&&Li!==null){Z1=!0;var u=0,d=st;try{var m=Li;for(st=1;u<m.length;u++){var w=m[u];do w=w(!0);while(w!==null)}Li=null,wp=!1}catch(S){throw Li!==null&&(Li=Li.slice(u+1)),LI(x1,Aa),S}finally{st=d,Z1=!1}}return null}var cl=[],fl=0,_p=null,kp=0,mn=[],yn=0,Vo=null,Ii=1,Pi="";function $o(u,d){cl[fl++]=kp,cl[fl++]=_p,_p=u,kp=d}function EP(u,d,m){mn[yn++]=Ii,mn[yn++]=Pi,mn[yn++]=Vo,Vo=u;var w=Ii;u=Pi;var S=32-jn(w)-1;w&=~(1<<S),m+=1;var T=32-jn(d)+S;if(30<T){var P=S-S%5;T=(w&(1<<P)-1).toString(32),w>>=P,S-=P,Ii=1<<32-jn(d)+S|m<<S|w,Pi=T+u}else Ii=1<<T|m<<S|w,Pi=u}function Q1(u){u.return!==null&&($o(u,1),EP(u,1,0))}function J1(u){for(;u===_p;)_p=cl[--fl],cl[fl]=null,kp=cl[--fl],cl[fl]=null;for(;u===Vo;)Vo=mn[--yn],mn[yn]=null,Pi=mn[--yn],mn[yn]=null,Ii=mn[--yn],mn[yn]=null}var Xr=null,qr=null,_t=!1,Bn=null;function LP(u,d){var m=_n(5,null,null,0);m.elementType="DELETED",m.stateNode=d,m.return=u,d=u.deletions,d===null?(u.deletions=[m],u.flags|=16):d.push(m)}function IP(u,d){switch(u.tag){case 5:var m=u.type;return d=d.nodeType!==1||m.toLowerCase()!==d.nodeName.toLowerCase()?null:d,d!==null?(u.stateNode=d,Xr=u,qr=Sa(d.firstChild),!0):!1;case 6:return d=u.pendingProps===""||d.nodeType!==3?null:d,d!==null?(u.stateNode=d,Xr=u,qr=null,!0):!1;case 13:return d=d.nodeType!==8?null:d,d!==null?(m=Vo!==null?{id:Ii,overflow:Pi}:null,u.memoizedState={dehydrated:d,treeContext:m,retryLane:1073741824},m=_n(18,null,null,0),m.stateNode=d,m.return=u,u.child=m,Xr=u,qr=null,!0):!1;default:return!1}}function eb(u){return(u.mode&1)!==0&&(u.flags&128)===0}function tb(u){if(_t){var d=qr;if(d){var m=d;if(!IP(u,d)){if(eb(u))throw Error(r(418));d=Sa(m.nextSibling);var w=Xr;d&&IP(u,d)?LP(w,m):(u.flags=u.flags&-4097|2,_t=!1,Xr=u)}}else{if(eb(u))throw Error(r(418));u.flags=u.flags&-4097|2,_t=!1,Xr=u}}}function PP(u){for(u=u.return;u!==null&&u.tag!==5&&u.tag!==3&&u.tag!==13;)u=u.return;Xr=u}function Sp(u){if(u!==Xr)return!1;if(!_t)return PP(u),_t=!0,!1;var d;if((d=u.tag!==3)&&!(d=u.tag!==5)&&(d=u.type,d=d!=="head"&&d!=="body"&&!G1(u.type,u.memoizedProps)),d&&(d=qr)){if(eb(u))throw NP(),Error(r(418));for(;d;)LP(u,d),d=Sa(d.nextSibling)}if(PP(u),u.tag===13){if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));e:{for(u=u.nextSibling,d=0;u;){if(u.nodeType===8){var m=u.data;if(m==="/$"){if(d===0){qr=Sa(u.nextSibling);break e}d--}else m!=="$"&&m!=="$!"&&m!=="$?"||d++}u=u.nextSibling}qr=null}}else qr=Xr?Sa(u.stateNode.nextSibling):null;return!0}function NP(){for(var u=qr;u;)u=Sa(u.nextSibling)}function dl(){qr=Xr=null,_t=!1}function rb(u){Bn===null?Bn=[u]:Bn.push(u)}var Nee=A.ReactCurrentBatchConfig;function Ic(u,d,m){if(u=m.ref,u!==null&&typeof u!="function"&&typeof u!="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,u));var S=w,T=""+u;return d!==null&&d.ref!==null&&typeof d.ref=="function"&&d.ref._stringRef===T?d.ref:(d=function(P){var V=S.refs;P===null?delete V[T]:V[T]=P},d._stringRef=T,d)}if(typeof u!="string")throw Error(r(284));if(!m._owner)throw Error(r(290,u))}return u}function Cp(u,d){throw u=Object.prototype.toString.call(d),Error(r(31,u==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":u))}function RP(u){var d=u._init;return d(u._payload)}function OP(u){function d(Z,q){if(u){var J=Z.deletions;J===null?(Z.deletions=[q],Z.flags|=16):J.push(q)}}function m(Z,q){if(!u)return null;for(;q!==null;)d(Z,q),q=q.sibling;return null}function w(Z,q){for(Z=new Map;q!==null;)q.key!==null?Z.set(q.key,q):Z.set(q.index,q),q=q.sibling;return Z}function S(Z,q){return Z=Ra(Z,q),Z.index=0,Z.sibling=null,Z}function T(Z,q,J){return Z.index=J,u?(J=Z.alternate,J!==null?(J=J.index,J<q?(Z.flags|=2,q):J):(Z.flags|=2,q)):(Z.flags|=1048576,q)}function P(Z){return u&&Z.alternate===null&&(Z.flags|=2),Z}function V(Z,q,J,fe){return q===null||q.tag!==6?(q=Yb(J,Z.mode,fe),q.return=Z,q):(q=S(q,J),q.return=Z,q)}function G(Z,q,J,fe){var ke=J.type;return ke===E?ae(Z,q,J.props.children,fe,J.key):q!==null&&(q.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===Q&&RP(ke)===q.type)?(fe=S(q,J.props),fe.ref=Ic(Z,q,J),fe.return=Z,fe):(fe=qp(J.type,J.key,J.props,null,Z.mode,fe),fe.ref=Ic(Z,q,J),fe.return=Z,fe)}function ee(Z,q,J,fe){return q===null||q.tag!==4||q.stateNode.containerInfo!==J.containerInfo||q.stateNode.implementation!==J.implementation?(q=Xb(J,Z.mode,fe),q.return=Z,q):(q=S(q,J.children||[]),q.return=Z,q)}function ae(Z,q,J,fe,ke){return q===null||q.tag!==7?(q=Zo(J,Z.mode,fe,ke),q.return=Z,q):(q=S(q,J),q.return=Z,q)}function se(Z,q,J){if(typeof q=="string"&&q!==""||typeof q=="number")return q=Yb(""+q,Z.mode,J),q.return=Z,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case M:return J=qp(q.type,q.key,q.props,null,Z.mode,J),J.ref=Ic(Z,null,q),J.return=Z,J;case D:return q=Xb(q,Z.mode,J),q.return=Z,q;case Q:var fe=q._init;return se(Z,fe(q._payload),J)}if(oi(q)||$(q))return q=Zo(q,Z.mode,J,null),q.return=Z,q;Cp(Z,q)}return null}function ie(Z,q,J,fe){var ke=q!==null?q.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return ke!==null?null:V(Z,q,""+J,fe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case M:return J.key===ke?G(Z,q,J,fe):null;case D:return J.key===ke?ee(Z,q,J,fe):null;case Q:return ke=J._init,ie(Z,q,ke(J._payload),fe)}if(oi(J)||$(J))return ke!==null?null:ae(Z,q,J,fe,null);Cp(Z,J)}return null}function ge(Z,q,J,fe,ke){if(typeof fe=="string"&&fe!==""||typeof fe=="number")return Z=Z.get(J)||null,V(q,Z,""+fe,ke);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case M:return Z=Z.get(fe.key===null?J:fe.key)||null,G(q,Z,fe,ke);case D:return Z=Z.get(fe.key===null?J:fe.key)||null,ee(q,Z,fe,ke);case Q:var Le=fe._init;return ge(Z,q,J,Le(fe._payload),ke)}if(oi(fe)||$(fe))return Z=Z.get(J)||null,ae(q,Z,fe,ke,null);Cp(q,fe)}return null}function xe(Z,q,J,fe){for(var ke=null,Le=null,Ie=q,ze=q=0,Vt=null;Ie!==null&&ze<J.length;ze++){Ie.index>ze?(Vt=Ie,Ie=null):Vt=Ie.sibling;var et=ie(Z,Ie,J[ze],fe);if(et===null){Ie===null&&(Ie=Vt);break}u&&Ie&&et.alternate===null&&d(Z,Ie),q=T(et,q,ze),Le===null?ke=et:Le.sibling=et,Le=et,Ie=Vt}if(ze===J.length)return m(Z,Ie),_t&&$o(Z,ze),ke;if(Ie===null){for(;ze<J.length;ze++)Ie=se(Z,J[ze],fe),Ie!==null&&(q=T(Ie,q,ze),Le===null?ke=Ie:Le.sibling=Ie,Le=Ie);return _t&&$o(Z,ze),ke}for(Ie=w(Z,Ie);ze<J.length;ze++)Vt=ge(Ie,Z,ze,J[ze],fe),Vt!==null&&(u&&Vt.alternate!==null&&Ie.delete(Vt.key===null?ze:Vt.key),q=T(Vt,q,ze),Le===null?ke=Vt:Le.sibling=Vt,Le=Vt);return u&&Ie.forEach(function(Oa){return d(Z,Oa)}),_t&&$o(Z,ze),ke}function be(Z,q,J,fe){var ke=$(J);if(typeof ke!="function")throw Error(r(150));if(J=ke.call(J),J==null)throw Error(r(151));for(var Le=ke=null,Ie=q,ze=q=0,Vt=null,et=J.next();Ie!==null&&!et.done;ze++,et=J.next()){Ie.index>ze?(Vt=Ie,Ie=null):Vt=Ie.sibling;var Oa=ie(Z,Ie,et.value,fe);if(Oa===null){Ie===null&&(Ie=Vt);break}u&&Ie&&Oa.alternate===null&&d(Z,Ie),q=T(Oa,q,ze),Le===null?ke=Oa:Le.sibling=Oa,Le=Oa,Ie=Vt}if(et.done)return m(Z,Ie),_t&&$o(Z,ze),ke;if(Ie===null){for(;!et.done;ze++,et=J.next())et=se(Z,et.value,fe),et!==null&&(q=T(et,q,ze),Le===null?ke=et:Le.sibling=et,Le=et);return _t&&$o(Z,ze),ke}for(Ie=w(Z,Ie);!et.done;ze++,et=J.next())et=ge(Ie,Z,ze,et.value,fe),et!==null&&(u&&et.alternate!==null&&Ie.delete(et.key===null?ze:et.key),q=T(et,q,ze),Le===null?ke=et:Le.sibling=et,Le=et);return u&&Ie.forEach(function(hte){return d(Z,hte)}),_t&&$o(Z,ze),ke}function Lt(Z,q,J,fe){if(typeof J=="object"&&J!==null&&J.type===E&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case M:e:{for(var ke=J.key,Le=q;Le!==null;){if(Le.key===ke){if(ke=J.type,ke===E){if(Le.tag===7){m(Z,Le.sibling),q=S(Le,J.props.children),q.return=Z,Z=q;break e}}else if(Le.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===Q&&RP(ke)===Le.type){m(Z,Le.sibling),q=S(Le,J.props),q.ref=Ic(Z,Le,J),q.return=Z,Z=q;break e}m(Z,Le);break}else d(Z,Le);Le=Le.sibling}J.type===E?(q=Zo(J.props.children,Z.mode,fe,J.key),q.return=Z,Z=q):(fe=qp(J.type,J.key,J.props,null,Z.mode,fe),fe.ref=Ic(Z,q,J),fe.return=Z,Z=fe)}return P(Z);case D:e:{for(Le=J.key;q!==null;){if(q.key===Le)if(q.tag===4&&q.stateNode.containerInfo===J.containerInfo&&q.stateNode.implementation===J.implementation){m(Z,q.sibling),q=S(q,J.children||[]),q.return=Z,Z=q;break e}else{m(Z,q);break}else d(Z,q);q=q.sibling}q=Xb(J,Z.mode,fe),q.return=Z,Z=q}return P(Z);case Q:return Le=J._init,Lt(Z,q,Le(J._payload),fe)}if(oi(J))return xe(Z,q,J,fe);if($(J))return be(Z,q,J,fe);Cp(Z,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,q!==null&&q.tag===6?(m(Z,q.sibling),q=S(q,J),q.return=Z,Z=q):(m(Z,q),q=Yb(J,Z.mode,fe),q.return=Z,Z=q),P(Z)):m(Z,q)}return Lt}var hl=OP(!0),zP=OP(!1),Tp=Ca(null),Ap=null,pl=null,nb=null;function ib(){nb=pl=Ap=null}function ab(u){var d=Tp.current;yt(Tp),u._currentValue=d}function ob(u,d,m){for(;u!==null;){var w=u.alternate;if((u.childLanes&d)!==d?(u.childLanes|=d,w!==null&&(w.childLanes|=d)):w!==null&&(w.childLanes&d)!==d&&(w.childLanes|=d),u===m)break;u=u.return}}function vl(u,d){Ap=u,nb=pl=null,u=u.dependencies,u!==null&&u.firstContext!==null&&((u.lanes&d)!==0&&(Rr=!0),u.firstContext=null)}function xn(u){var d=u._currentValue;if(nb!==u)if(u={context:u,memoizedValue:d,next:null},pl===null){if(Ap===null)throw Error(r(308));pl=u,Ap.dependencies={lanes:0,firstContext:u}}else pl=pl.next=u;return d}var Uo=null;function sb(u){Uo===null?Uo=[u]:Uo.push(u)}function jP(u,d,m,w){var S=d.interleaved;return S===null?(m.next=m,sb(d)):(m.next=S.next,S.next=m),d.interleaved=m,Ni(u,w)}function Ni(u,d){u.lanes|=d;var m=u.alternate;for(m!==null&&(m.lanes|=d),m=u,u=u.return;u!==null;)u.childLanes|=d,m=u.alternate,m!==null&&(m.childLanes|=d),m=u,u=u.return;return m.tag===3?m.stateNode:null}var Da=!1;function lb(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function FP(u,d){u=u.updateQueue,d.updateQueue===u&&(d.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,effects:u.effects})}function Ri(u,d){return{eventTime:u,lane:d,tag:0,payload:null,callback:null,next:null}}function Ma(u,d,m){var w=u.updateQueue;if(w===null)return null;if(w=w.shared,(Ke&2)!==0){var S=w.pending;return S===null?d.next=d:(d.next=S.next,S.next=d),w.pending=d,Ni(u,m)}return S=w.interleaved,S===null?(d.next=d,sb(w)):(d.next=S.next,S.next=d),w.interleaved=d,Ni(u,m)}function Dp(u,d,m){if(d=d.updateQueue,d!==null&&(d=d.shared,(m&4194240)!==0)){var w=d.lanes;w&=u.pendingLanes,m|=w,d.lanes=m,_1(u,m)}}function BP(u,d){var m=u.updateQueue,w=u.alternate;if(w!==null&&(w=w.updateQueue,m===w)){var S=null,T=null;if(m=m.firstBaseUpdate,m!==null){do{var P={eventTime:m.eventTime,lane:m.lane,tag:m.tag,payload:m.payload,callback:m.callback,next:null};T===null?S=T=P:T=T.next=P,m=m.next}while(m!==null);T===null?S=T=d:T=T.next=d}else S=T=d;m={baseState:w.baseState,firstBaseUpdate:S,lastBaseUpdate:T,shared:w.shared,effects:w.effects},u.updateQueue=m;return}u=m.lastBaseUpdate,u===null?m.firstBaseUpdate=d:u.next=d,m.lastBaseUpdate=d}function Mp(u,d,m,w){var S=u.updateQueue;Da=!1;var T=S.firstBaseUpdate,P=S.lastBaseUpdate,V=S.shared.pending;if(V!==null){S.shared.pending=null;var G=V,ee=G.next;G.next=null,P===null?T=ee:P.next=ee,P=G;var ae=u.alternate;ae!==null&&(ae=ae.updateQueue,V=ae.lastBaseUpdate,V!==P&&(V===null?ae.firstBaseUpdate=ee:V.next=ee,ae.lastBaseUpdate=G))}if(T!==null){var se=S.baseState;P=0,ae=ee=G=null,V=T;do{var ie=V.lane,ge=V.eventTime;if((w&ie)===ie){ae!==null&&(ae=ae.next={eventTime:ge,lane:0,tag:V.tag,payload:V.payload,callback:V.callback,next:null});e:{var xe=u,be=V;switch(ie=d,ge=m,be.tag){case 1:if(xe=be.payload,typeof xe=="function"){se=xe.call(ge,se,ie);break e}se=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=be.payload,ie=typeof xe=="function"?xe.call(ge,se,ie):xe,ie==null)break e;se=I({},se,ie);break e;case 2:Da=!0}}V.callback!==null&&V.lane!==0&&(u.flags|=64,ie=S.effects,ie===null?S.effects=[V]:ie.push(V))}else ge={eventTime:ge,lane:ie,tag:V.tag,payload:V.payload,callback:V.callback,next:null},ae===null?(ee=ae=ge,G=se):ae=ae.next=ge,P|=ie;if(V=V.next,V===null){if(V=S.shared.pending,V===null)break;ie=V,V=ie.next,ie.next=null,S.lastBaseUpdate=ie,S.shared.pending=null}}while(!0);if(ae===null&&(G=se),S.baseState=G,S.firstBaseUpdate=ee,S.lastBaseUpdate=ae,d=S.shared.interleaved,d!==null){S=d;do P|=S.lane,S=S.next;while(S!==d)}else T===null&&(S.shared.lanes=0);Yo|=P,u.lanes=P,u.memoizedState=se}}function HP(u,d,m){if(u=d.effects,d.effects=null,u!==null)for(d=0;d<u.length;d++){var w=u[d],S=w.callback;if(S!==null){if(w.callback=null,w=m,typeof S!="function")throw Error(r(191,S));S.call(w)}}}var Pc={},ui=Ca(Pc),Nc=Ca(Pc),Rc=Ca(Pc);function Wo(u){if(u===Pc)throw Error(r(174));return u}function ub(u,d){switch(vt(Rc,d),vt(Nc,u),vt(ui,Pc),u=d.nodeType,u){case 9:case 11:d=(d=d.documentElement)?d.namespaceURI:te(null,"");break;default:u=u===8?d.parentNode:d,d=u.namespaceURI||null,u=u.tagName,d=te(d,u)}yt(ui),vt(ui,d)}function gl(){yt(ui),yt(Nc),yt(Rc)}function VP(u){Wo(Rc.current);var d=Wo(ui.current),m=te(d,u.type);d!==m&&(vt(Nc,u),vt(ui,m))}function cb(u){Nc.current===u&&(yt(ui),yt(Nc))}var kt=Ca(0);function Ep(u){for(var d=u;d!==null;){if(d.tag===13){var m=d.memoizedState;if(m!==null&&(m=m.dehydrated,m===null||m.data==="$?"||m.data==="$!"))return d}else if(d.tag===19&&d.memoizedProps.revealOrder!==void 0){if((d.flags&128)!==0)return d}else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===u)break;for(;d.sibling===null;){if(d.return===null||d.return===u)return null;d=d.return}d.sibling.return=d.return,d=d.sibling}return null}var fb=[];function db(){for(var u=0;u<fb.length;u++)fb[u]._workInProgressVersionPrimary=null;fb.length=0}var Lp=A.ReactCurrentDispatcher,hb=A.ReactCurrentBatchConfig,Go=0,St=null,zt=null,Bt=null,Ip=!1,Oc=!1,zc=0,Ree=0;function sr(){throw Error(r(321))}function pb(u,d){if(d===null)return!1;for(var m=0;m<d.length&&m<u.length;m++)if(!Fn(u[m],d[m]))return!1;return!0}function vb(u,d,m,w,S,T){if(Go=T,St=d,d.memoizedState=null,d.updateQueue=null,d.lanes=0,Lp.current=u===null||u.memoizedState===null?Fee:Bee,u=m(w,S),Oc){T=0;do{if(Oc=!1,zc=0,25<=T)throw Error(r(301));T+=1,Bt=zt=null,d.updateQueue=null,Lp.current=Hee,u=m(w,S)}while(Oc)}if(Lp.current=Rp,d=zt!==null&&zt.next!==null,Go=0,Bt=zt=St=null,Ip=!1,d)throw Error(r(300));return u}function gb(){var u=zc!==0;return zc=0,u}function ci(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bt===null?St.memoizedState=Bt=u:Bt=Bt.next=u,Bt}function bn(){if(zt===null){var u=St.alternate;u=u!==null?u.memoizedState:null}else u=zt.next;var d=Bt===null?St.memoizedState:Bt.next;if(d!==null)Bt=d,zt=u;else{if(u===null)throw Error(r(310));zt=u,u={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},Bt===null?St.memoizedState=Bt=u:Bt=Bt.next=u}return Bt}function jc(u,d){return typeof d=="function"?d(u):d}function mb(u){var d=bn(),m=d.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=u;var w=zt,S=w.baseQueue,T=m.pending;if(T!==null){if(S!==null){var P=S.next;S.next=T.next,T.next=P}w.baseQueue=S=T,m.pending=null}if(S!==null){T=S.next,w=w.baseState;var V=P=null,G=null,ee=T;do{var ae=ee.lane;if((Go&ae)===ae)G!==null&&(G=G.next={lane:0,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),w=ee.hasEagerState?ee.eagerState:u(w,ee.action);else{var se={lane:ae,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null};G===null?(V=G=se,P=w):G=G.next=se,St.lanes|=ae,Yo|=ae}ee=ee.next}while(ee!==null&&ee!==T);G===null?P=w:G.next=V,Fn(w,d.memoizedState)||(Rr=!0),d.memoizedState=w,d.baseState=P,d.baseQueue=G,m.lastRenderedState=w}if(u=m.interleaved,u!==null){S=u;do T=S.lane,St.lanes|=T,Yo|=T,S=S.next;while(S!==u)}else S===null&&(m.lanes=0);return[d.memoizedState,m.dispatch]}function yb(u){var d=bn(),m=d.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=u;var w=m.dispatch,S=m.pending,T=d.memoizedState;if(S!==null){m.pending=null;var P=S=S.next;do T=u(T,P.action),P=P.next;while(P!==S);Fn(T,d.memoizedState)||(Rr=!0),d.memoizedState=T,d.baseQueue===null&&(d.baseState=T),m.lastRenderedState=T}return[T,w]}function $P(){}function UP(u,d){var m=St,w=bn(),S=d(),T=!Fn(w.memoizedState,S);if(T&&(w.memoizedState=S,Rr=!0),w=w.queue,xb(YP.bind(null,m,w,u),[u]),w.getSnapshot!==d||T||Bt!==null&&Bt.memoizedState.tag&1){if(m.flags|=2048,Fc(9,GP.bind(null,m,w,S,d),void 0,null),Ht===null)throw Error(r(349));(Go&30)!==0||WP(m,d,S)}return S}function WP(u,d,m){u.flags|=16384,u={getSnapshot:d,value:m},d=St.updateQueue,d===null?(d={lastEffect:null,stores:null},St.updateQueue=d,d.stores=[u]):(m=d.stores,m===null?d.stores=[u]:m.push(u))}function GP(u,d,m,w){d.value=m,d.getSnapshot=w,XP(d)&&qP(u)}function YP(u,d,m){return m(function(){XP(d)&&qP(u)})}function XP(u){var d=u.getSnapshot;u=u.value;try{var m=d();return!Fn(u,m)}catch{return!0}}function qP(u){var d=Ni(u,1);d!==null&&Un(d,u,1,-1)}function KP(u){var d=ci();return typeof u=="function"&&(u=u()),d.memoizedState=d.baseState=u,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:jc,lastRenderedState:u},d.queue=u,u=u.dispatch=jee.bind(null,St,u),[d.memoizedState,u]}function Fc(u,d,m,w){return u={tag:u,create:d,destroy:m,deps:w,next:null},d=St.updateQueue,d===null?(d={lastEffect:null,stores:null},St.updateQueue=d,d.lastEffect=u.next=u):(m=d.lastEffect,m===null?d.lastEffect=u.next=u:(w=m.next,m.next=u,u.next=w,d.lastEffect=u)),u}function ZP(){return bn().memoizedState}function Pp(u,d,m,w){var S=ci();St.flags|=u,S.memoizedState=Fc(1|d,m,void 0,w===void 0?null:w)}function Np(u,d,m,w){var S=bn();w=w===void 0?null:w;var T=void 0;if(zt!==null){var P=zt.memoizedState;if(T=P.destroy,w!==null&&pb(w,P.deps)){S.memoizedState=Fc(d,m,T,w);return}}St.flags|=u,S.memoizedState=Fc(1|d,m,T,w)}function QP(u,d){return Pp(8390656,8,u,d)}function xb(u,d){return Np(2048,8,u,d)}function JP(u,d){return Np(4,2,u,d)}function eN(u,d){return Np(4,4,u,d)}function tN(u,d){if(typeof d=="function")return u=u(),d(u),function(){d(null)};if(d!=null)return u=u(),d.current=u,function(){d.current=null}}function rN(u,d,m){return m=m!=null?m.concat([u]):null,Np(4,4,tN.bind(null,d,u),m)}function bb(){}function nN(u,d){var m=bn();d=d===void 0?null:d;var w=m.memoizedState;return w!==null&&d!==null&&pb(d,w[1])?w[0]:(m.memoizedState=[u,d],u)}function iN(u,d){var m=bn();d=d===void 0?null:d;var w=m.memoizedState;return w!==null&&d!==null&&pb(d,w[1])?w[0]:(u=u(),m.memoizedState=[u,d],u)}function aN(u,d,m){return(Go&21)===0?(u.baseState&&(u.baseState=!1,Rr=!0),u.memoizedState=m):(Fn(m,d)||(m=RI(),St.lanes|=m,Yo|=m,u.baseState=!0),d)}function Oee(u,d){var m=st;st=m!==0&&4>m?m:4,u(!0);var w=hb.transition;hb.transition={};try{u(!1),d()}finally{st=m,hb.transition=w}}function oN(){return bn().memoizedState}function zee(u,d,m){var w=Pa(u);if(m={lane:w,action:m,hasEagerState:!1,eagerState:null,next:null},sN(u))lN(d,m);else if(m=jP(u,d,m,w),m!==null){var S=yr();Un(m,u,w,S),uN(m,d,w)}}function jee(u,d,m){var w=Pa(u),S={lane:w,action:m,hasEagerState:!1,eagerState:null,next:null};if(sN(u))lN(d,S);else{var T=u.alternate;if(u.lanes===0&&(T===null||T.lanes===0)&&(T=d.lastRenderedReducer,T!==null))try{var P=d.lastRenderedState,V=T(P,m);if(S.hasEagerState=!0,S.eagerState=V,Fn(V,P)){var G=d.interleaved;G===null?(S.next=S,sb(d)):(S.next=G.next,G.next=S),d.interleaved=S;return}}catch{}m=jP(u,d,S,w),m!==null&&(S=yr(),Un(m,u,w,S),uN(m,d,w))}}function sN(u){var d=u.alternate;return u===St||d!==null&&d===St}function lN(u,d){Oc=Ip=!0;var m=u.pending;m===null?d.next=d:(d.next=m.next,m.next=d),u.pending=d}function uN(u,d,m){if((m&4194240)!==0){var w=d.lanes;w&=u.pendingLanes,m|=w,d.lanes=m,_1(u,m)}}var Rp={readContext:xn,useCallback:sr,useContext:sr,useEffect:sr,useImperativeHandle:sr,useInsertionEffect:sr,useLayoutEffect:sr,useMemo:sr,useReducer:sr,useRef:sr,useState:sr,useDebugValue:sr,useDeferredValue:sr,useTransition:sr,useMutableSource:sr,useSyncExternalStore:sr,useId:sr,unstable_isNewReconciler:!1},Fee={readContext:xn,useCallback:function(u,d){return ci().memoizedState=[u,d===void 0?null:d],u},useContext:xn,useEffect:QP,useImperativeHandle:function(u,d,m){return m=m!=null?m.concat([u]):null,Pp(4194308,4,tN.bind(null,d,u),m)},useLayoutEffect:function(u,d){return Pp(4194308,4,u,d)},useInsertionEffect:function(u,d){return Pp(4,2,u,d)},useMemo:function(u,d){var m=ci();return d=d===void 0?null:d,u=u(),m.memoizedState=[u,d],u},useReducer:function(u,d,m){var w=ci();return d=m!==void 0?m(d):d,w.memoizedState=w.baseState=d,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:d},w.queue=u,u=u.dispatch=zee.bind(null,St,u),[w.memoizedState,u]},useRef:function(u){var d=ci();return u={current:u},d.memoizedState=u},useState:KP,useDebugValue:bb,useDeferredValue:function(u){return ci().memoizedState=u},useTransition:function(){var u=KP(!1),d=u[0];return u=Oee.bind(null,u[1]),ci().memoizedState=u,[d,u]},useMutableSource:function(){},useSyncExternalStore:function(u,d,m){var w=St,S=ci();if(_t){if(m===void 0)throw Error(r(407));m=m()}else{if(m=d(),Ht===null)throw Error(r(349));(Go&30)!==0||WP(w,d,m)}S.memoizedState=m;var T={value:m,getSnapshot:d};return S.queue=T,QP(YP.bind(null,w,T,u),[u]),w.flags|=2048,Fc(9,GP.bind(null,w,T,m,d),void 0,null),m},useId:function(){var u=ci(),d=Ht.identifierPrefix;if(_t){var m=Pi,w=Ii;m=(w&~(1<<32-jn(w)-1)).toString(32)+m,d=":"+d+"R"+m,m=zc++,0<m&&(d+="H"+m.toString(32)),d+=":"}else m=Ree++,d=":"+d+"r"+m.toString(32)+":";return u.memoizedState=d},unstable_isNewReconciler:!1},Bee={readContext:xn,useCallback:nN,useContext:xn,useEffect:xb,useImperativeHandle:rN,useInsertionEffect:JP,useLayoutEffect:eN,useMemo:iN,useReducer:mb,useRef:ZP,useState:function(){return mb(jc)},useDebugValue:bb,useDeferredValue:function(u){var d=bn();return aN(d,zt.memoizedState,u)},useTransition:function(){var u=mb(jc)[0],d=bn().memoizedState;return[u,d]},useMutableSource:$P,useSyncExternalStore:UP,useId:oN,unstable_isNewReconciler:!1},Hee={readContext:xn,useCallback:nN,useContext:xn,useEffect:xb,useImperativeHandle:rN,useInsertionEffect:JP,useLayoutEffect:eN,useMemo:iN,useReducer:yb,useRef:ZP,useState:function(){return yb(jc)},useDebugValue:bb,useDeferredValue:function(u){var d=bn();return zt===null?d.memoizedState=u:aN(d,zt.memoizedState,u)},useTransition:function(){var u=yb(jc)[0],d=bn().memoizedState;return[u,d]},useMutableSource:$P,useSyncExternalStore:UP,useId:oN,unstable_isNewReconciler:!1};function Hn(u,d){if(u&&u.defaultProps){d=I({},d),u=u.defaultProps;for(var m in u)d[m]===void 0&&(d[m]=u[m]);return d}return d}function wb(u,d,m,w){d=u.memoizedState,m=m(w,d),m=m==null?d:I({},d,m),u.memoizedState=m,u.lanes===0&&(u.updateQueue.baseState=m)}var Op={isMounted:function(u){return(u=u._reactInternals)?Fo(u)===u:!1},enqueueSetState:function(u,d,m){u=u._reactInternals;var w=yr(),S=Pa(u),T=Ri(w,S);T.payload=d,m!=null&&(T.callback=m),d=Ma(u,T,S),d!==null&&(Un(d,u,S,w),Dp(d,u,S))},enqueueReplaceState:function(u,d,m){u=u._reactInternals;var w=yr(),S=Pa(u),T=Ri(w,S);T.tag=1,T.payload=d,m!=null&&(T.callback=m),d=Ma(u,T,S),d!==null&&(Un(d,u,S,w),Dp(d,u,S))},enqueueForceUpdate:function(u,d){u=u._reactInternals;var m=yr(),w=Pa(u),S=Ri(m,w);S.tag=2,d!=null&&(S.callback=d),d=Ma(u,S,w),d!==null&&(Un(d,u,w,m),Dp(d,u,w))}};function cN(u,d,m,w,S,T,P){return u=u.stateNode,typeof u.shouldComponentUpdate=="function"?u.shouldComponentUpdate(w,T,P):d.prototype&&d.prototype.isPureReactComponent?!Cc(m,w)||!Cc(S,T):!0}function fN(u,d,m){var w=!1,S=Ta,T=d.contextType;return typeof T=="object"&&T!==null?T=xn(T):(S=Nr(d)?Ho:or.current,w=d.contextTypes,T=(w=w!=null)?ul(u,S):Ta),d=new d(m,T),u.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Op,u.stateNode=d,d._reactInternals=u,w&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=S,u.__reactInternalMemoizedMaskedChildContext=T),d}function dN(u,d,m,w){u=d.state,typeof d.componentWillReceiveProps=="function"&&d.componentWillReceiveProps(m,w),typeof d.UNSAFE_componentWillReceiveProps=="function"&&d.UNSAFE_componentWillReceiveProps(m,w),d.state!==u&&Op.enqueueReplaceState(d,d.state,null)}function _b(u,d,m,w){var S=u.stateNode;S.props=m,S.state=u.memoizedState,S.refs={},lb(u);var T=d.contextType;typeof T=="object"&&T!==null?S.context=xn(T):(T=Nr(d)?Ho:or.current,S.context=ul(u,T)),S.state=u.memoizedState,T=d.getDerivedStateFromProps,typeof T=="function"&&(wb(u,d,T,m),S.state=u.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(d=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),d!==S.state&&Op.enqueueReplaceState(S,S.state,null),Mp(u,m,S,w),S.state=u.memoizedState),typeof S.componentDidMount=="function"&&(u.flags|=4194308)}function ml(u,d){try{var m="",w=d;do m+=oe(w),w=w.return;while(w);var S=m}catch(T){S=`
|
|
7
|
+
Error generating stack: `+T.message+`
|
|
8
|
+
`+T.stack}return{value:u,source:d,stack:S,digest:null}}function kb(u,d,m){return{value:u,source:null,stack:m??null,digest:d??null}}function Sb(u,d){try{console.error(d.value)}catch(m){setTimeout(function(){throw m})}}var Vee=typeof WeakMap=="function"?WeakMap:Map;function hN(u,d,m){m=Ri(-1,m),m.tag=3,m.payload={element:null};var w=d.value;return m.callback=function(){$p||($p=!0,Fb=w),Sb(u,d)},m}function pN(u,d,m){m=Ri(-1,m),m.tag=3;var w=u.type.getDerivedStateFromError;if(typeof w=="function"){var S=d.value;m.payload=function(){return w(S)},m.callback=function(){Sb(u,d)}}var T=u.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(m.callback=function(){Sb(u,d),typeof w!="function"&&(La===null?La=new Set([this]):La.add(this));var P=d.stack;this.componentDidCatch(d.value,{componentStack:P!==null?P:""})}),m}function vN(u,d,m){var w=u.pingCache;if(w===null){w=u.pingCache=new Vee;var S=new Set;w.set(d,S)}else S=w.get(d),S===void 0&&(S=new Set,w.set(d,S));S.has(m)||(S.add(m),u=rte.bind(null,u,d,m),d.then(u,u))}function gN(u){do{var d;if((d=u.tag===13)&&(d=u.memoizedState,d=d!==null?d.dehydrated!==null:!0),d)return u;u=u.return}while(u!==null);return null}function mN(u,d,m,w,S){return(u.mode&1)===0?(u===d?u.flags|=65536:(u.flags|=128,m.flags|=131072,m.flags&=-52805,m.tag===1&&(m.alternate===null?m.tag=17:(d=Ri(-1,1),d.tag=2,Ma(m,d,1))),m.lanes|=1),u):(u.flags|=65536,u.lanes=S,u)}var $ee=A.ReactCurrentOwner,Rr=!1;function mr(u,d,m,w){d.child=u===null?zP(d,null,m,w):hl(d,u.child,m,w)}function yN(u,d,m,w,S){m=m.render;var T=d.ref;return vl(d,S),w=vb(u,d,m,w,T,S),m=gb(),u!==null&&!Rr?(d.updateQueue=u.updateQueue,d.flags&=-2053,u.lanes&=~S,Oi(u,d,S)):(_t&&m&&Q1(d),d.flags|=1,mr(u,d,w,S),d.child)}function xN(u,d,m,w,S){if(u===null){var T=m.type;return typeof T=="function"&&!Gb(T)&&T.defaultProps===void 0&&m.compare===null&&m.defaultProps===void 0?(d.tag=15,d.type=T,bN(u,d,T,w,S)):(u=qp(m.type,null,w,d,d.mode,S),u.ref=d.ref,u.return=d,d.child=u)}if(T=u.child,(u.lanes&S)===0){var P=T.memoizedProps;if(m=m.compare,m=m!==null?m:Cc,m(P,w)&&u.ref===d.ref)return Oi(u,d,S)}return d.flags|=1,u=Ra(T,w),u.ref=d.ref,u.return=d,d.child=u}function bN(u,d,m,w,S){if(u!==null){var T=u.memoizedProps;if(Cc(T,w)&&u.ref===d.ref)if(Rr=!1,d.pendingProps=w=T,(u.lanes&S)!==0)(u.flags&131072)!==0&&(Rr=!0);else return d.lanes=u.lanes,Oi(u,d,S)}return Cb(u,d,m,w,S)}function wN(u,d,m){var w=d.pendingProps,S=w.children,T=u!==null?u.memoizedState:null;if(w.mode==="hidden")if((d.mode&1)===0)d.memoizedState={baseLanes:0,cachePool:null,transitions:null},vt(xl,Kr),Kr|=m;else{if((m&1073741824)===0)return u=T!==null?T.baseLanes|m:m,d.lanes=d.childLanes=1073741824,d.memoizedState={baseLanes:u,cachePool:null,transitions:null},d.updateQueue=null,vt(xl,Kr),Kr|=u,null;d.memoizedState={baseLanes:0,cachePool:null,transitions:null},w=T!==null?T.baseLanes:m,vt(xl,Kr),Kr|=w}else T!==null?(w=T.baseLanes|m,d.memoizedState=null):w=m,vt(xl,Kr),Kr|=w;return mr(u,d,S,m),d.child}function _N(u,d){var m=d.ref;(u===null&&m!==null||u!==null&&u.ref!==m)&&(d.flags|=512,d.flags|=2097152)}function Cb(u,d,m,w,S){var T=Nr(m)?Ho:or.current;return T=ul(d,T),vl(d,S),m=vb(u,d,m,w,T,S),w=gb(),u!==null&&!Rr?(d.updateQueue=u.updateQueue,d.flags&=-2053,u.lanes&=~S,Oi(u,d,S)):(_t&&w&&Q1(d),d.flags|=1,mr(u,d,m,S),d.child)}function kN(u,d,m,w,S){if(Nr(m)){var T=!0;bp(d)}else T=!1;if(vl(d,S),d.stateNode===null)jp(u,d),fN(d,m,w),_b(d,m,w,S),w=!0;else if(u===null){var P=d.stateNode,V=d.memoizedProps;P.props=V;var G=P.context,ee=m.contextType;typeof ee=="object"&&ee!==null?ee=xn(ee):(ee=Nr(m)?Ho:or.current,ee=ul(d,ee));var ae=m.getDerivedStateFromProps,se=typeof ae=="function"||typeof P.getSnapshotBeforeUpdate=="function";se||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(V!==w||G!==ee)&&dN(d,P,w,ee),Da=!1;var ie=d.memoizedState;P.state=ie,Mp(d,w,P,S),G=d.memoizedState,V!==w||ie!==G||Pr.current||Da?(typeof ae=="function"&&(wb(d,m,ae,w),G=d.memoizedState),(V=Da||cN(d,m,V,w,ie,G,ee))?(se||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount()),typeof P.componentDidMount=="function"&&(d.flags|=4194308)):(typeof P.componentDidMount=="function"&&(d.flags|=4194308),d.memoizedProps=w,d.memoizedState=G),P.props=w,P.state=G,P.context=ee,w=V):(typeof P.componentDidMount=="function"&&(d.flags|=4194308),w=!1)}else{P=d.stateNode,FP(u,d),V=d.memoizedProps,ee=d.type===d.elementType?V:Hn(d.type,V),P.props=ee,se=d.pendingProps,ie=P.context,G=m.contextType,typeof G=="object"&&G!==null?G=xn(G):(G=Nr(m)?Ho:or.current,G=ul(d,G));var ge=m.getDerivedStateFromProps;(ae=typeof ge=="function"||typeof P.getSnapshotBeforeUpdate=="function")||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(V!==se||ie!==G)&&dN(d,P,w,G),Da=!1,ie=d.memoizedState,P.state=ie,Mp(d,w,P,S);var xe=d.memoizedState;V!==se||ie!==xe||Pr.current||Da?(typeof ge=="function"&&(wb(d,m,ge,w),xe=d.memoizedState),(ee=Da||cN(d,m,ee,w,ie,xe,G)||!1)?(ae||typeof P.UNSAFE_componentWillUpdate!="function"&&typeof P.componentWillUpdate!="function"||(typeof P.componentWillUpdate=="function"&&P.componentWillUpdate(w,xe,G),typeof P.UNSAFE_componentWillUpdate=="function"&&P.UNSAFE_componentWillUpdate(w,xe,G)),typeof P.componentDidUpdate=="function"&&(d.flags|=4),typeof P.getSnapshotBeforeUpdate=="function"&&(d.flags|=1024)):(typeof P.componentDidUpdate!="function"||V===u.memoizedProps&&ie===u.memoizedState||(d.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||V===u.memoizedProps&&ie===u.memoizedState||(d.flags|=1024),d.memoizedProps=w,d.memoizedState=xe),P.props=w,P.state=xe,P.context=G,w=ee):(typeof P.componentDidUpdate!="function"||V===u.memoizedProps&&ie===u.memoizedState||(d.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||V===u.memoizedProps&&ie===u.memoizedState||(d.flags|=1024),w=!1)}return Tb(u,d,m,w,T,S)}function Tb(u,d,m,w,S,T){_N(u,d);var P=(d.flags&128)!==0;if(!w&&!P)return S&&DP(d,m,!1),Oi(u,d,T);w=d.stateNode,$ee.current=d;var V=P&&typeof m.getDerivedStateFromError!="function"?null:w.render();return d.flags|=1,u!==null&&P?(d.child=hl(d,u.child,null,T),d.child=hl(d,null,V,T)):mr(u,d,V,T),d.memoizedState=w.state,S&&DP(d,m,!0),d.child}function SN(u){var d=u.stateNode;d.pendingContext?TP(u,d.pendingContext,d.pendingContext!==d.context):d.context&&TP(u,d.context,!1),ub(u,d.containerInfo)}function CN(u,d,m,w,S){return dl(),rb(S),d.flags|=256,mr(u,d,m,w),d.child}var Ab={dehydrated:null,treeContext:null,retryLane:0};function Db(u){return{baseLanes:u,cachePool:null,transitions:null}}function TN(u,d,m){var w=d.pendingProps,S=kt.current,T=!1,P=(d.flags&128)!==0,V;if((V=P)||(V=u!==null&&u.memoizedState===null?!1:(S&2)!==0),V?(T=!0,d.flags&=-129):(u===null||u.memoizedState!==null)&&(S|=1),vt(kt,S&1),u===null)return tb(d),u=d.memoizedState,u!==null&&(u=u.dehydrated,u!==null)?((d.mode&1)===0?d.lanes=1:u.data==="$!"?d.lanes=8:d.lanes=1073741824,null):(P=w.children,u=w.fallback,T?(w=d.mode,T=d.child,P={mode:"hidden",children:P},(w&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=P):T=Kp(P,w,0,null),u=Zo(u,w,m,null),T.return=d,u.return=d,T.sibling=u,d.child=T,d.child.memoizedState=Db(m),d.memoizedState=Ab,u):Mb(d,P));if(S=u.memoizedState,S!==null&&(V=S.dehydrated,V!==null))return Uee(u,d,P,w,V,S,m);if(T){T=w.fallback,P=d.mode,S=u.child,V=S.sibling;var G={mode:"hidden",children:w.children};return(P&1)===0&&d.child!==S?(w=d.child,w.childLanes=0,w.pendingProps=G,d.deletions=null):(w=Ra(S,G),w.subtreeFlags=S.subtreeFlags&14680064),V!==null?T=Ra(V,T):(T=Zo(T,P,m,null),T.flags|=2),T.return=d,w.return=d,w.sibling=T,d.child=w,w=T,T=d.child,P=u.child.memoizedState,P=P===null?Db(m):{baseLanes:P.baseLanes|m,cachePool:null,transitions:P.transitions},T.memoizedState=P,T.childLanes=u.childLanes&~m,d.memoizedState=Ab,w}return T=u.child,u=T.sibling,w=Ra(T,{mode:"visible",children:w.children}),(d.mode&1)===0&&(w.lanes=m),w.return=d,w.sibling=null,u!==null&&(m=d.deletions,m===null?(d.deletions=[u],d.flags|=16):m.push(u)),d.child=w,d.memoizedState=null,w}function Mb(u,d){return d=Kp({mode:"visible",children:d},u.mode,0,null),d.return=u,u.child=d}function zp(u,d,m,w){return w!==null&&rb(w),hl(d,u.child,null,m),u=Mb(d,d.pendingProps.children),u.flags|=2,d.memoizedState=null,u}function Uee(u,d,m,w,S,T,P){if(m)return d.flags&256?(d.flags&=-257,w=kb(Error(r(422))),zp(u,d,P,w)):d.memoizedState!==null?(d.child=u.child,d.flags|=128,null):(T=w.fallback,S=d.mode,w=Kp({mode:"visible",children:w.children},S,0,null),T=Zo(T,S,P,null),T.flags|=2,w.return=d,T.return=d,w.sibling=T,d.child=w,(d.mode&1)!==0&&hl(d,u.child,null,P),d.child.memoizedState=Db(P),d.memoizedState=Ab,T);if((d.mode&1)===0)return zp(u,d,P,null);if(S.data==="$!"){if(w=S.nextSibling&&S.nextSibling.dataset,w)var V=w.dgst;return w=V,T=Error(r(419)),w=kb(T,w,void 0),zp(u,d,P,w)}if(V=(P&u.childLanes)!==0,Rr||V){if(w=Ht,w!==null){switch(P&-P){case 4:S=2;break;case 16:S=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:S=32;break;case 536870912:S=268435456;break;default:S=0}S=(S&(w.suspendedLanes|P))!==0?0:S,S!==0&&S!==T.retryLane&&(T.retryLane=S,Ni(u,S),Un(w,u,S,-1))}return Wb(),w=kb(Error(r(421))),zp(u,d,P,w)}return S.data==="$?"?(d.flags|=128,d.child=u.child,d=nte.bind(null,u),S._reactRetry=d,null):(u=T.treeContext,qr=Sa(S.nextSibling),Xr=d,_t=!0,Bn=null,u!==null&&(mn[yn++]=Ii,mn[yn++]=Pi,mn[yn++]=Vo,Ii=u.id,Pi=u.overflow,Vo=d),d=Mb(d,w.children),d.flags|=4096,d)}function AN(u,d,m){u.lanes|=d;var w=u.alternate;w!==null&&(w.lanes|=d),ob(u.return,d,m)}function Eb(u,d,m,w,S){var T=u.memoizedState;T===null?u.memoizedState={isBackwards:d,rendering:null,renderingStartTime:0,last:w,tail:m,tailMode:S}:(T.isBackwards=d,T.rendering=null,T.renderingStartTime=0,T.last=w,T.tail=m,T.tailMode=S)}function DN(u,d,m){var w=d.pendingProps,S=w.revealOrder,T=w.tail;if(mr(u,d,w.children,m),w=kt.current,(w&2)!==0)w=w&1|2,d.flags|=128;else{if(u!==null&&(u.flags&128)!==0)e:for(u=d.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&AN(u,m,d);else if(u.tag===19)AN(u,m,d);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===d)break e;for(;u.sibling===null;){if(u.return===null||u.return===d)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}w&=1}if(vt(kt,w),(d.mode&1)===0)d.memoizedState=null;else switch(S){case"forwards":for(m=d.child,S=null;m!==null;)u=m.alternate,u!==null&&Ep(u)===null&&(S=m),m=m.sibling;m=S,m===null?(S=d.child,d.child=null):(S=m.sibling,m.sibling=null),Eb(d,!1,S,m,T);break;case"backwards":for(m=null,S=d.child,d.child=null;S!==null;){if(u=S.alternate,u!==null&&Ep(u)===null){d.child=S;break}u=S.sibling,S.sibling=m,m=S,S=u}Eb(d,!0,m,null,T);break;case"together":Eb(d,!1,null,null,void 0);break;default:d.memoizedState=null}return d.child}function jp(u,d){(d.mode&1)===0&&u!==null&&(u.alternate=null,d.alternate=null,d.flags|=2)}function Oi(u,d,m){if(u!==null&&(d.dependencies=u.dependencies),Yo|=d.lanes,(m&d.childLanes)===0)return null;if(u!==null&&d.child!==u.child)throw Error(r(153));if(d.child!==null){for(u=d.child,m=Ra(u,u.pendingProps),d.child=m,m.return=d;u.sibling!==null;)u=u.sibling,m=m.sibling=Ra(u,u.pendingProps),m.return=d;m.sibling=null}return d.child}function Wee(u,d,m){switch(d.tag){case 3:SN(d),dl();break;case 5:VP(d);break;case 1:Nr(d.type)&&bp(d);break;case 4:ub(d,d.stateNode.containerInfo);break;case 10:var w=d.type._context,S=d.memoizedProps.value;vt(Tp,w._currentValue),w._currentValue=S;break;case 13:if(w=d.memoizedState,w!==null)return w.dehydrated!==null?(vt(kt,kt.current&1),d.flags|=128,null):(m&d.child.childLanes)!==0?TN(u,d,m):(vt(kt,kt.current&1),u=Oi(u,d,m),u!==null?u.sibling:null);vt(kt,kt.current&1);break;case 19:if(w=(m&d.childLanes)!==0,(u.flags&128)!==0){if(w)return DN(u,d,m);d.flags|=128}if(S=d.memoizedState,S!==null&&(S.rendering=null,S.tail=null,S.lastEffect=null),vt(kt,kt.current),w)break;return null;case 22:case 23:return d.lanes=0,wN(u,d,m)}return Oi(u,d,m)}var MN,Lb,EN,LN;MN=function(u,d){for(var m=d.child;m!==null;){if(m.tag===5||m.tag===6)u.appendChild(m.stateNode);else if(m.tag!==4&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===d)break;for(;m.sibling===null;){if(m.return===null||m.return===d)return;m=m.return}m.sibling.return=m.return,m=m.sibling}},Lb=function(){},EN=function(u,d,m,w){var S=u.memoizedProps;if(S!==w){u=d.stateNode,Wo(ui.current);var T=null;switch(m){case"input":S=wt(u,S),w=wt(u,w),T=[];break;case"select":S=I({},S,{value:void 0}),w=I({},w,{value:void 0}),T=[];break;case"textarea":S=ga(u,S),w=ga(u,w),T=[];break;default:typeof S.onClick!="function"&&typeof w.onClick=="function"&&(u.onclick=mp)}Di(m,w);var P;m=null;for(ee in S)if(!w.hasOwnProperty(ee)&&S.hasOwnProperty(ee)&&S[ee]!=null)if(ee==="style"){var V=S[ee];for(P in V)V.hasOwnProperty(P)&&(m||(m={}),m[P]="")}else ee!=="dangerouslySetInnerHTML"&&ee!=="children"&&ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&ee!=="autoFocus"&&(i.hasOwnProperty(ee)?T||(T=[]):(T=T||[]).push(ee,null));for(ee in w){var G=w[ee];if(V=S?.[ee],w.hasOwnProperty(ee)&&G!==V&&(G!=null||V!=null))if(ee==="style")if(V){for(P in V)!V.hasOwnProperty(P)||G&&G.hasOwnProperty(P)||(m||(m={}),m[P]="");for(P in G)G.hasOwnProperty(P)&&V[P]!==G[P]&&(m||(m={}),m[P]=G[P])}else m||(T||(T=[]),T.push(ee,m)),m=G;else ee==="dangerouslySetInnerHTML"?(G=G?G.__html:void 0,V=V?V.__html:void 0,G!=null&&V!==G&&(T=T||[]).push(ee,G)):ee==="children"?typeof G!="string"&&typeof G!="number"||(T=T||[]).push(ee,""+G):ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&(i.hasOwnProperty(ee)?(G!=null&&ee==="onScroll"&&mt("scroll",u),T||V===G||(T=[])):(T=T||[]).push(ee,G))}m&&(T=T||[]).push("style",m);var ee=T;(d.updateQueue=ee)&&(d.flags|=4)}},LN=function(u,d,m,w){m!==w&&(d.flags|=4)};function Bc(u,d){if(!_t)switch(u.tailMode){case"hidden":d=u.tail;for(var m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?u.tail=null:m.sibling=null;break;case"collapsed":m=u.tail;for(var w=null;m!==null;)m.alternate!==null&&(w=m),m=m.sibling;w===null?d||u.tail===null?u.tail=null:u.tail.sibling=null:w.sibling=null}}function lr(u){var d=u.alternate!==null&&u.alternate.child===u.child,m=0,w=0;if(d)for(var S=u.child;S!==null;)m|=S.lanes|S.childLanes,w|=S.subtreeFlags&14680064,w|=S.flags&14680064,S.return=u,S=S.sibling;else for(S=u.child;S!==null;)m|=S.lanes|S.childLanes,w|=S.subtreeFlags,w|=S.flags,S.return=u,S=S.sibling;return u.subtreeFlags|=w,u.childLanes=m,d}function Gee(u,d,m){var w=d.pendingProps;switch(J1(d),d.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lr(d),null;case 1:return Nr(d.type)&&xp(),lr(d),null;case 3:return w=d.stateNode,gl(),yt(Pr),yt(or),db(),w.pendingContext&&(w.context=w.pendingContext,w.pendingContext=null),(u===null||u.child===null)&&(Sp(d)?d.flags|=4:u===null||u.memoizedState.isDehydrated&&(d.flags&256)===0||(d.flags|=1024,Bn!==null&&(Vb(Bn),Bn=null))),Lb(u,d),lr(d),null;case 5:cb(d);var S=Wo(Rc.current);if(m=d.type,u!==null&&d.stateNode!=null)EN(u,d,m,w,S),u.ref!==d.ref&&(d.flags|=512,d.flags|=2097152);else{if(!w){if(d.stateNode===null)throw Error(r(166));return lr(d),null}if(u=Wo(ui.current),Sp(d)){w=d.stateNode,m=d.type;var T=d.memoizedProps;switch(w[li]=d,w[Ec]=T,u=(d.mode&1)!==0,m){case"dialog":mt("cancel",w),mt("close",w);break;case"iframe":case"object":case"embed":mt("load",w);break;case"video":case"audio":for(S=0;S<Ac.length;S++)mt(Ac[S],w);break;case"source":mt("error",w);break;case"img":case"image":case"link":mt("error",w),mt("load",w);break;case"details":mt("toggle",w);break;case"input":Ur(w,T),mt("invalid",w);break;case"select":w._wrapperState={wasMultiple:!!T.multiple},mt("invalid",w);break;case"textarea":ma(w,T),mt("invalid",w)}Di(m,T),S=null;for(var P in T)if(T.hasOwnProperty(P)){var V=T[P];P==="children"?typeof V=="string"?w.textContent!==V&&(T.suppressHydrationWarning!==!0&&gp(w.textContent,V,u),S=["children",V]):typeof V=="number"&&w.textContent!==""+V&&(T.suppressHydrationWarning!==!0&&gp(w.textContent,V,u),S=["children",""+V]):i.hasOwnProperty(P)&&V!=null&&P==="onScroll"&&mt("scroll",w)}switch(m){case"input":Ce(w),Oo(w,T,!0);break;case"textarea":Ce(w),Xh(w);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(w.onclick=mp)}w=S,d.updateQueue=w,w!==null&&(d.flags|=4)}else{P=S.nodeType===9?S:S.ownerDocument,u==="http://www.w3.org/1999/xhtml"&&(u=qh(m)),u==="http://www.w3.org/1999/xhtml"?m==="script"?(u=P.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild)):typeof w.is=="string"?u=P.createElement(m,{is:w.is}):(u=P.createElement(m),m==="select"&&(P=u,w.multiple?P.multiple=!0:w.size&&(P.size=w.size))):u=P.createElementNS(u,m),u[li]=d,u[Ec]=w,MN(u,d,!1,!1),d.stateNode=u;e:{switch(P=Mi(m,w),m){case"dialog":mt("cancel",u),mt("close",u),S=w;break;case"iframe":case"object":case"embed":mt("load",u),S=w;break;case"video":case"audio":for(S=0;S<Ac.length;S++)mt(Ac[S],u);S=w;break;case"source":mt("error",u),S=w;break;case"img":case"image":case"link":mt("error",u),mt("load",u),S=w;break;case"details":mt("toggle",u),S=w;break;case"input":Ur(u,w),S=wt(u,w),mt("invalid",u);break;case"option":S=w;break;case"select":u._wrapperState={wasMultiple:!!w.multiple},S=I({},w,{value:void 0}),mt("invalid",u);break;case"textarea":ma(u,w),S=ga(u,w),mt("invalid",u);break;default:S=w}Di(m,S),V=S;for(T in V)if(V.hasOwnProperty(T)){var G=V[T];T==="style"?Wr(u,G):T==="dangerouslySetInnerHTML"?(G=G?G.__html:void 0,G!=null&&Oe(u,G)):T==="children"?typeof G=="string"?(m!=="textarea"||G!=="")&&Fe(u,G):typeof G=="number"&&Fe(u,""+G):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(i.hasOwnProperty(T)?G!=null&&T==="onScroll"&&mt("scroll",u):G!=null&&C(u,T,G,P))}switch(m){case"input":Ce(u),Oo(u,w,!1);break;case"textarea":Ce(u),Xh(u);break;case"option":w.value!=null&&u.setAttribute("value",""+we(w.value));break;case"select":u.multiple=!!w.multiple,T=w.value,T!=null?gr(u,!!w.multiple,T,!1):w.defaultValue!=null&&gr(u,!!w.multiple,w.defaultValue,!0);break;default:typeof S.onClick=="function"&&(u.onclick=mp)}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&&(d.flags|=4)}d.ref!==null&&(d.flags|=512,d.flags|=2097152)}return lr(d),null;case 6:if(u&&d.stateNode!=null)LN(u,d,u.memoizedProps,w);else{if(typeof w!="string"&&d.stateNode===null)throw Error(r(166));if(m=Wo(Rc.current),Wo(ui.current),Sp(d)){if(w=d.stateNode,m=d.memoizedProps,w[li]=d,(T=w.nodeValue!==m)&&(u=Xr,u!==null))switch(u.tag){case 3:gp(w.nodeValue,m,(u.mode&1)!==0);break;case 5:u.memoizedProps.suppressHydrationWarning!==!0&&gp(w.nodeValue,m,(u.mode&1)!==0)}T&&(d.flags|=4)}else w=(m.nodeType===9?m:m.ownerDocument).createTextNode(w),w[li]=d,d.stateNode=w}return lr(d),null;case 13:if(yt(kt),w=d.memoizedState,u===null||u.memoizedState!==null&&u.memoizedState.dehydrated!==null){if(_t&&qr!==null&&(d.mode&1)!==0&&(d.flags&128)===0)NP(),dl(),d.flags|=98560,T=!1;else if(T=Sp(d),w!==null&&w.dehydrated!==null){if(u===null){if(!T)throw Error(r(318));if(T=d.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(r(317));T[li]=d}else dl(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;lr(d),T=!1}else Bn!==null&&(Vb(Bn),Bn=null),T=!0;if(!T)return d.flags&65536?d:null}return(d.flags&128)!==0?(d.lanes=m,d):(w=w!==null,w!==(u!==null&&u.memoizedState!==null)&&w&&(d.child.flags|=8192,(d.mode&1)!==0&&(u===null||(kt.current&1)!==0?jt===0&&(jt=3):Wb())),d.updateQueue!==null&&(d.flags|=4),lr(d),null);case 4:return gl(),Lb(u,d),u===null&&Dc(d.stateNode.containerInfo),lr(d),null;case 10:return ab(d.type._context),lr(d),null;case 17:return Nr(d.type)&&xp(),lr(d),null;case 19:if(yt(kt),T=d.memoizedState,T===null)return lr(d),null;if(w=(d.flags&128)!==0,P=T.rendering,P===null)if(w)Bc(T,!1);else{if(jt!==0||u!==null&&(u.flags&128)!==0)for(u=d.child;u!==null;){if(P=Ep(u),P!==null){for(d.flags|=128,Bc(T,!1),w=P.updateQueue,w!==null&&(d.updateQueue=w,d.flags|=4),d.subtreeFlags=0,w=m,m=d.child;m!==null;)T=m,u=w,T.flags&=14680066,P=T.alternate,P===null?(T.childLanes=0,T.lanes=u,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=P.childLanes,T.lanes=P.lanes,T.child=P.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=P.memoizedProps,T.memoizedState=P.memoizedState,T.updateQueue=P.updateQueue,T.type=P.type,u=P.dependencies,T.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),m=m.sibling;return vt(kt,kt.current&1|2),d.child}u=u.sibling}T.tail!==null&&Et()>bl&&(d.flags|=128,w=!0,Bc(T,!1),d.lanes=4194304)}else{if(!w)if(u=Ep(P),u!==null){if(d.flags|=128,w=!0,m=u.updateQueue,m!==null&&(d.updateQueue=m,d.flags|=4),Bc(T,!0),T.tail===null&&T.tailMode==="hidden"&&!P.alternate&&!_t)return lr(d),null}else 2*Et()-T.renderingStartTime>bl&&m!==1073741824&&(d.flags|=128,w=!0,Bc(T,!1),d.lanes=4194304);T.isBackwards?(P.sibling=d.child,d.child=P):(m=T.last,m!==null?m.sibling=P:d.child=P,T.last=P)}return T.tail!==null?(d=T.tail,T.rendering=d,T.tail=d.sibling,T.renderingStartTime=Et(),d.sibling=null,m=kt.current,vt(kt,w?m&1|2:m&1),d):(lr(d),null);case 22:case 23:return Ub(),w=d.memoizedState!==null,u!==null&&u.memoizedState!==null!==w&&(d.flags|=8192),w&&(d.mode&1)!==0?(Kr&1073741824)!==0&&(lr(d),d.subtreeFlags&6&&(d.flags|=8192)):lr(d),null;case 24:return null;case 25:return null}throw Error(r(156,d.tag))}function Yee(u,d){switch(J1(d),d.tag){case 1:return Nr(d.type)&&xp(),u=d.flags,u&65536?(d.flags=u&-65537|128,d):null;case 3:return gl(),yt(Pr),yt(or),db(),u=d.flags,(u&65536)!==0&&(u&128)===0?(d.flags=u&-65537|128,d):null;case 5:return cb(d),null;case 13:if(yt(kt),u=d.memoizedState,u!==null&&u.dehydrated!==null){if(d.alternate===null)throw Error(r(340));dl()}return u=d.flags,u&65536?(d.flags=u&-65537|128,d):null;case 19:return yt(kt),null;case 4:return gl(),null;case 10:return ab(d.type._context),null;case 22:case 23:return Ub(),null;case 24:return null;default:return null}}var Fp=!1,ur=!1,Xee=typeof WeakSet=="function"?WeakSet:Set,ye=null;function yl(u,d){var m=u.ref;if(m!==null)if(typeof m=="function")try{m(null)}catch(w){At(u,d,w)}else m.current=null}function Ib(u,d,m){try{m()}catch(w){At(u,d,w)}}var IN=!1;function qee(u,d){if(U1=ap,u=cP(),O1(u)){if("selectionStart"in u)var m={start:u.selectionStart,end:u.selectionEnd};else e:{m=(m=u.ownerDocument)&&m.defaultView||window;var w=m.getSelection&&m.getSelection();if(w&&w.rangeCount!==0){m=w.anchorNode;var S=w.anchorOffset,T=w.focusNode;w=w.focusOffset;try{m.nodeType,T.nodeType}catch{m=null;break e}var P=0,V=-1,G=-1,ee=0,ae=0,se=u,ie=null;t:for(;;){for(var ge;se!==m||S!==0&&se.nodeType!==3||(V=P+S),se!==T||w!==0&&se.nodeType!==3||(G=P+w),se.nodeType===3&&(P+=se.nodeValue.length),(ge=se.firstChild)!==null;)ie=se,se=ge;for(;;){if(se===u)break t;if(ie===m&&++ee===S&&(V=P),ie===T&&++ae===w&&(G=P),(ge=se.nextSibling)!==null)break;se=ie,ie=se.parentNode}se=ge}m=V===-1||G===-1?null:{start:V,end:G}}else m=null}m=m||{start:0,end:0}}else m=null;for(W1={focusedElem:u,selectionRange:m},ap=!1,ye=d;ye!==null;)if(d=ye,u=d.child,(d.subtreeFlags&1028)!==0&&u!==null)u.return=d,ye=u;else for(;ye!==null;){d=ye;try{var xe=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var be=xe.memoizedProps,Lt=xe.memoizedState,Z=d.stateNode,q=Z.getSnapshotBeforeUpdate(d.elementType===d.type?be:Hn(d.type,be),Lt);Z.__reactInternalSnapshotBeforeUpdate=q}break;case 3:var J=d.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){At(d,d.return,fe)}if(u=d.sibling,u!==null){u.return=d.return,ye=u;break}ye=d.return}return xe=IN,IN=!1,xe}function Hc(u,d,m){var w=d.updateQueue;if(w=w!==null?w.lastEffect:null,w!==null){var S=w=w.next;do{if((S.tag&u)===u){var T=S.destroy;S.destroy=void 0,T!==void 0&&Ib(d,m,T)}S=S.next}while(S!==w)}}function Bp(u,d){if(d=d.updateQueue,d=d!==null?d.lastEffect:null,d!==null){var m=d=d.next;do{if((m.tag&u)===u){var w=m.create;m.destroy=w()}m=m.next}while(m!==d)}}function Pb(u){var d=u.ref;if(d!==null){var m=u.stateNode;u.tag,u=m,typeof d=="function"?d(u):d.current=u}}function PN(u){var d=u.alternate;d!==null&&(u.alternate=null,PN(d)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(d=u.stateNode,d!==null&&(delete d[li],delete d[Ec],delete d[q1],delete d[Lee],delete d[Iee])),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function NN(u){return u.tag===5||u.tag===3||u.tag===4}function RN(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||NN(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function Nb(u,d,m){var w=u.tag;if(w===5||w===6)u=u.stateNode,d?m.nodeType===8?m.parentNode.insertBefore(u,d):m.insertBefore(u,d):(m.nodeType===8?(d=m.parentNode,d.insertBefore(u,m)):(d=m,d.appendChild(u)),m=m._reactRootContainer,m!=null||d.onclick!==null||(d.onclick=mp));else if(w!==4&&(u=u.child,u!==null))for(Nb(u,d,m),u=u.sibling;u!==null;)Nb(u,d,m),u=u.sibling}function Rb(u,d,m){var w=u.tag;if(w===5||w===6)u=u.stateNode,d?m.insertBefore(u,d):m.appendChild(u);else if(w!==4&&(u=u.child,u!==null))for(Rb(u,d,m),u=u.sibling;u!==null;)Rb(u,d,m),u=u.sibling}var Zt=null,Vn=!1;function Ea(u,d,m){for(m=m.child;m!==null;)ON(u,d,m),m=m.sibling}function ON(u,d,m){if(si&&typeof si.onCommitFiberUnmount=="function")try{si.onCommitFiberUnmount(Jh,m)}catch{}switch(m.tag){case 5:ur||yl(m,d);case 6:var w=Zt,S=Vn;Zt=null,Ea(u,d,m),Zt=w,Vn=S,Zt!==null&&(Vn?(u=Zt,m=m.stateNode,u.nodeType===8?u.parentNode.removeChild(m):u.removeChild(m)):Zt.removeChild(m.stateNode));break;case 18:Zt!==null&&(Vn?(u=Zt,m=m.stateNode,u.nodeType===8?X1(u.parentNode,m):u.nodeType===1&&X1(u,m),xc(u)):X1(Zt,m.stateNode));break;case 4:w=Zt,S=Vn,Zt=m.stateNode.containerInfo,Vn=!0,Ea(u,d,m),Zt=w,Vn=S;break;case 0:case 11:case 14:case 15:if(!ur&&(w=m.updateQueue,w!==null&&(w=w.lastEffect,w!==null))){S=w=w.next;do{var T=S,P=T.destroy;T=T.tag,P!==void 0&&((T&2)!==0||(T&4)!==0)&&Ib(m,d,P),S=S.next}while(S!==w)}Ea(u,d,m);break;case 1:if(!ur&&(yl(m,d),w=m.stateNode,typeof w.componentWillUnmount=="function"))try{w.props=m.memoizedProps,w.state=m.memoizedState,w.componentWillUnmount()}catch(V){At(m,d,V)}Ea(u,d,m);break;case 21:Ea(u,d,m);break;case 22:m.mode&1?(ur=(w=ur)||m.memoizedState!==null,Ea(u,d,m),ur=w):Ea(u,d,m);break;default:Ea(u,d,m)}}function zN(u){var d=u.updateQueue;if(d!==null){u.updateQueue=null;var m=u.stateNode;m===null&&(m=u.stateNode=new Xee),d.forEach(function(w){var S=ite.bind(null,u,w);m.has(w)||(m.add(w),w.then(S,S))})}}function $n(u,d){var m=d.deletions;if(m!==null)for(var w=0;w<m.length;w++){var S=m[w];try{var T=u,P=d,V=P;e:for(;V!==null;){switch(V.tag){case 5:Zt=V.stateNode,Vn=!1;break e;case 3:Zt=V.stateNode.containerInfo,Vn=!0;break e;case 4:Zt=V.stateNode.containerInfo,Vn=!0;break e}V=V.return}if(Zt===null)throw Error(r(160));ON(T,P,S),Zt=null,Vn=!1;var G=S.alternate;G!==null&&(G.return=null),S.return=null}catch(ee){At(S,d,ee)}}if(d.subtreeFlags&12854)for(d=d.child;d!==null;)jN(d,u),d=d.sibling}function jN(u,d){var m=u.alternate,w=u.flags;switch(u.tag){case 0:case 11:case 14:case 15:if($n(d,u),fi(u),w&4){try{Hc(3,u,u.return),Bp(3,u)}catch(be){At(u,u.return,be)}try{Hc(5,u,u.return)}catch(be){At(u,u.return,be)}}break;case 1:$n(d,u),fi(u),w&512&&m!==null&&yl(m,m.return);break;case 5:if($n(d,u),fi(u),w&512&&m!==null&&yl(m,m.return),u.flags&32){var S=u.stateNode;try{Fe(S,"")}catch(be){At(u,u.return,be)}}if(w&4&&(S=u.stateNode,S!=null)){var T=u.memoizedProps,P=m!==null?m.memoizedProps:T,V=u.type,G=u.updateQueue;if(u.updateQueue=null,G!==null)try{V==="input"&&T.type==="radio"&&T.name!=null&&vr(S,T),Mi(V,P);var ee=Mi(V,T);for(P=0;P<G.length;P+=2){var ae=G[P],se=G[P+1];ae==="style"?Wr(S,se):ae==="dangerouslySetInnerHTML"?Oe(S,se):ae==="children"?Fe(S,se):C(S,ae,se,ee)}switch(V){case"input":vn(S,T);break;case"textarea":Yh(S,T);break;case"select":var ie=S._wrapperState.wasMultiple;S._wrapperState.wasMultiple=!!T.multiple;var ge=T.value;ge!=null?gr(S,!!T.multiple,ge,!1):ie!==!!T.multiple&&(T.defaultValue!=null?gr(S,!!T.multiple,T.defaultValue,!0):gr(S,!!T.multiple,T.multiple?[]:"",!1))}S[Ec]=T}catch(be){At(u,u.return,be)}}break;case 6:if($n(d,u),fi(u),w&4){if(u.stateNode===null)throw Error(r(162));S=u.stateNode,T=u.memoizedProps;try{S.nodeValue=T}catch(be){At(u,u.return,be)}}break;case 3:if($n(d,u),fi(u),w&4&&m!==null&&m.memoizedState.isDehydrated)try{xc(d.containerInfo)}catch(be){At(u,u.return,be)}break;case 4:$n(d,u),fi(u);break;case 13:$n(d,u),fi(u),S=u.child,S.flags&8192&&(T=S.memoizedState!==null,S.stateNode.isHidden=T,!T||S.alternate!==null&&S.alternate.memoizedState!==null||(jb=Et())),w&4&&zN(u);break;case 22:if(ae=m!==null&&m.memoizedState!==null,u.mode&1?(ur=(ee=ur)||ae,$n(d,u),ur=ee):$n(d,u),fi(u),w&8192){if(ee=u.memoizedState!==null,(u.stateNode.isHidden=ee)&&!ae&&(u.mode&1)!==0)for(ye=u,ae=u.child;ae!==null;){for(se=ye=ae;ye!==null;){switch(ie=ye,ge=ie.child,ie.tag){case 0:case 11:case 14:case 15:Hc(4,ie,ie.return);break;case 1:yl(ie,ie.return);var xe=ie.stateNode;if(typeof xe.componentWillUnmount=="function"){w=ie,m=ie.return;try{d=w,xe.props=d.memoizedProps,xe.state=d.memoizedState,xe.componentWillUnmount()}catch(be){At(w,m,be)}}break;case 5:yl(ie,ie.return);break;case 22:if(ie.memoizedState!==null){HN(se);continue}}ge!==null?(ge.return=ie,ye=ge):HN(se)}ae=ae.sibling}e:for(ae=null,se=u;;){if(se.tag===5){if(ae===null){ae=se;try{S=se.stateNode,ee?(T=S.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(V=se.stateNode,G=se.memoizedProps.style,P=G!=null&&G.hasOwnProperty("display")?G.display:null,V.style.display=qt("display",P))}catch(be){At(u,u.return,be)}}}else if(se.tag===6){if(ae===null)try{se.stateNode.nodeValue=ee?"":se.memoizedProps}catch(be){At(u,u.return,be)}}else if((se.tag!==22&&se.tag!==23||se.memoizedState===null||se===u)&&se.child!==null){se.child.return=se,se=se.child;continue}if(se===u)break e;for(;se.sibling===null;){if(se.return===null||se.return===u)break e;ae===se&&(ae=null),se=se.return}ae===se&&(ae=null),se.sibling.return=se.return,se=se.sibling}}break;case 19:$n(d,u),fi(u),w&4&&zN(u);break;case 21:break;default:$n(d,u),fi(u)}}function fi(u){var d=u.flags;if(d&2){try{e:{for(var m=u.return;m!==null;){if(NN(m)){var w=m;break e}m=m.return}throw Error(r(160))}switch(w.tag){case 5:var S=w.stateNode;w.flags&32&&(Fe(S,""),w.flags&=-33);var T=RN(u);Rb(u,T,S);break;case 3:case 4:var P=w.stateNode.containerInfo,V=RN(u);Nb(u,V,P);break;default:throw Error(r(161))}}catch(G){At(u,u.return,G)}u.flags&=-3}d&4096&&(u.flags&=-4097)}function Kee(u,d,m){ye=u,FN(u)}function FN(u,d,m){for(var w=(u.mode&1)!==0;ye!==null;){var S=ye,T=S.child;if(S.tag===22&&w){var P=S.memoizedState!==null||Fp;if(!P){var V=S.alternate,G=V!==null&&V.memoizedState!==null||ur;V=Fp;var ee=ur;if(Fp=P,(ur=G)&&!ee)for(ye=S;ye!==null;)P=ye,G=P.child,P.tag===22&&P.memoizedState!==null?VN(S):G!==null?(G.return=P,ye=G):VN(S);for(;T!==null;)ye=T,FN(T),T=T.sibling;ye=S,Fp=V,ur=ee}BN(u)}else(S.subtreeFlags&8772)!==0&&T!==null?(T.return=S,ye=T):BN(u)}}function BN(u){for(;ye!==null;){var d=ye;if((d.flags&8772)!==0){var m=d.alternate;try{if((d.flags&8772)!==0)switch(d.tag){case 0:case 11:case 15:ur||Bp(5,d);break;case 1:var w=d.stateNode;if(d.flags&4&&!ur)if(m===null)w.componentDidMount();else{var S=d.elementType===d.type?m.memoizedProps:Hn(d.type,m.memoizedProps);w.componentDidUpdate(S,m.memoizedState,w.__reactInternalSnapshotBeforeUpdate)}var T=d.updateQueue;T!==null&&HP(d,T,w);break;case 3:var P=d.updateQueue;if(P!==null){if(m=null,d.child!==null)switch(d.child.tag){case 5:m=d.child.stateNode;break;case 1:m=d.child.stateNode}HP(d,P,m)}break;case 5:var V=d.stateNode;if(m===null&&d.flags&4){m=V;var G=d.memoizedProps;switch(d.type){case"button":case"input":case"select":case"textarea":G.autoFocus&&m.focus();break;case"img":G.src&&(m.src=G.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(d.memoizedState===null){var ee=d.alternate;if(ee!==null){var ae=ee.memoizedState;if(ae!==null){var se=ae.dehydrated;se!==null&&xc(se)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}ur||d.flags&512&&Pb(d)}catch(ie){At(d,d.return,ie)}}if(d===u){ye=null;break}if(m=d.sibling,m!==null){m.return=d.return,ye=m;break}ye=d.return}}function HN(u){for(;ye!==null;){var d=ye;if(d===u){ye=null;break}var m=d.sibling;if(m!==null){m.return=d.return,ye=m;break}ye=d.return}}function VN(u){for(;ye!==null;){var d=ye;try{switch(d.tag){case 0:case 11:case 15:var m=d.return;try{Bp(4,d)}catch(G){At(d,m,G)}break;case 1:var w=d.stateNode;if(typeof w.componentDidMount=="function"){var S=d.return;try{w.componentDidMount()}catch(G){At(d,S,G)}}var T=d.return;try{Pb(d)}catch(G){At(d,T,G)}break;case 5:var P=d.return;try{Pb(d)}catch(G){At(d,P,G)}}}catch(G){At(d,d.return,G)}if(d===u){ye=null;break}var V=d.sibling;if(V!==null){V.return=d.return,ye=V;break}ye=d.return}}var Zee=Math.ceil,Hp=A.ReactCurrentDispatcher,Ob=A.ReactCurrentOwner,wn=A.ReactCurrentBatchConfig,Ke=0,Ht=null,Nt=null,Qt=0,Kr=0,xl=Ca(0),jt=0,Vc=null,Yo=0,Vp=0,zb=0,$c=null,Or=null,jb=0,bl=1/0,zi=null,$p=!1,Fb=null,La=null,Up=!1,Ia=null,Wp=0,Uc=0,Bb=null,Gp=-1,Yp=0;function yr(){return(Ke&6)!==0?Et():Gp!==-1?Gp:Gp=Et()}function Pa(u){return(u.mode&1)===0?1:(Ke&2)!==0&&Qt!==0?Qt&-Qt:Nee.transition!==null?(Yp===0&&(Yp=RI()),Yp):(u=st,u!==0||(u=window.event,u=u===void 0?16:UI(u.type)),u)}function Un(u,d,m,w){if(50<Uc)throw Uc=0,Bb=null,Error(r(185));pc(u,m,w),((Ke&2)===0||u!==Ht)&&(u===Ht&&((Ke&2)===0&&(Vp|=m),jt===4&&Na(u,Qt)),zr(u,w),m===1&&Ke===0&&(d.mode&1)===0&&(bl=Et()+500,wp&&Aa()))}function zr(u,d){var m=u.callbackNode;NJ(u,d);var w=rp(u,u===Ht?Qt:0);if(w===0)m!==null&&II(m),u.callbackNode=null,u.callbackPriority=0;else if(d=w&-w,u.callbackPriority!==d){if(m!=null&&II(m),d===1)u.tag===0?Pee(UN.bind(null,u)):MP(UN.bind(null,u)),Mee(function(){(Ke&6)===0&&Aa()}),m=null;else{switch(OI(w)){case 1:m=x1;break;case 4:m=PI;break;case 16:m=Qh;break;case 536870912:m=NI;break;default:m=Qh}m=QN(m,$N.bind(null,u))}u.callbackPriority=d,u.callbackNode=m}}function $N(u,d){if(Gp=-1,Yp=0,(Ke&6)!==0)throw Error(r(327));var m=u.callbackNode;if(wl()&&u.callbackNode!==m)return null;var w=rp(u,u===Ht?Qt:0);if(w===0)return null;if((w&30)!==0||(w&u.expiredLanes)!==0||d)d=Xp(u,w);else{d=w;var S=Ke;Ke|=2;var T=GN();(Ht!==u||Qt!==d)&&(zi=null,bl=Et()+500,qo(u,d));do try{ete();break}catch(V){WN(u,V)}while(!0);ib(),Hp.current=T,Ke=S,Nt!==null?d=0:(Ht=null,Qt=0,d=jt)}if(d!==0){if(d===2&&(S=b1(u),S!==0&&(w=S,d=Hb(u,S))),d===1)throw m=Vc,qo(u,0),Na(u,w),zr(u,Et()),m;if(d===6)Na(u,w);else{if(S=u.current.alternate,(w&30)===0&&!Qee(S)&&(d=Xp(u,w),d===2&&(T=b1(u),T!==0&&(w=T,d=Hb(u,T))),d===1))throw m=Vc,qo(u,0),Na(u,w),zr(u,Et()),m;switch(u.finishedWork=S,u.finishedLanes=w,d){case 0:case 1:throw Error(r(345));case 2:Ko(u,Or,zi);break;case 3:if(Na(u,w),(w&130023424)===w&&(d=jb+500-Et(),10<d)){if(rp(u,0)!==0)break;if(S=u.suspendedLanes,(S&w)!==w){yr(),u.pingedLanes|=u.suspendedLanes&S;break}u.timeoutHandle=Y1(Ko.bind(null,u,Or,zi),d);break}Ko(u,Or,zi);break;case 4:if(Na(u,w),(w&4194240)===w)break;for(d=u.eventTimes,S=-1;0<w;){var P=31-jn(w);T=1<<P,P=d[P],P>S&&(S=P),w&=~T}if(w=S,w=Et()-w,w=(120>w?120:480>w?480:1080>w?1080:1920>w?1920:3e3>w?3e3:4320>w?4320:1960*Zee(w/1960))-w,10<w){u.timeoutHandle=Y1(Ko.bind(null,u,Or,zi),w);break}Ko(u,Or,zi);break;case 5:Ko(u,Or,zi);break;default:throw Error(r(329))}}}return zr(u,Et()),u.callbackNode===m?$N.bind(null,u):null}function Hb(u,d){var m=$c;return u.current.memoizedState.isDehydrated&&(qo(u,d).flags|=256),u=Xp(u,d),u!==2&&(d=Or,Or=m,d!==null&&Vb(d)),u}function Vb(u){Or===null?Or=u:Or.push.apply(Or,u)}function Qee(u){for(var d=u;;){if(d.flags&16384){var m=d.updateQueue;if(m!==null&&(m=m.stores,m!==null))for(var w=0;w<m.length;w++){var S=m[w],T=S.getSnapshot;S=S.value;try{if(!Fn(T(),S))return!1}catch{return!1}}}if(m=d.child,d.subtreeFlags&16384&&m!==null)m.return=d,d=m;else{if(d===u)break;for(;d.sibling===null;){if(d.return===null||d.return===u)return!0;d=d.return}d.sibling.return=d.return,d=d.sibling}}return!0}function Na(u,d){for(d&=~zb,d&=~Vp,u.suspendedLanes|=d,u.pingedLanes&=~d,u=u.expirationTimes;0<d;){var m=31-jn(d),w=1<<m;u[m]=-1,d&=~w}}function UN(u){if((Ke&6)!==0)throw Error(r(327));wl();var d=rp(u,0);if((d&1)===0)return zr(u,Et()),null;var m=Xp(u,d);if(u.tag!==0&&m===2){var w=b1(u);w!==0&&(d=w,m=Hb(u,w))}if(m===1)throw m=Vc,qo(u,0),Na(u,d),zr(u,Et()),m;if(m===6)throw Error(r(345));return u.finishedWork=u.current.alternate,u.finishedLanes=d,Ko(u,Or,zi),zr(u,Et()),null}function $b(u,d){var m=Ke;Ke|=1;try{return u(d)}finally{Ke=m,Ke===0&&(bl=Et()+500,wp&&Aa())}}function Xo(u){Ia!==null&&Ia.tag===0&&(Ke&6)===0&&wl();var d=Ke;Ke|=1;var m=wn.transition,w=st;try{if(wn.transition=null,st=1,u)return u()}finally{st=w,wn.transition=m,Ke=d,(Ke&6)===0&&Aa()}}function Ub(){Kr=xl.current,yt(xl)}function qo(u,d){u.finishedWork=null,u.finishedLanes=0;var m=u.timeoutHandle;if(m!==-1&&(u.timeoutHandle=-1,Dee(m)),Nt!==null)for(m=Nt.return;m!==null;){var w=m;switch(J1(w),w.tag){case 1:w=w.type.childContextTypes,w!=null&&xp();break;case 3:gl(),yt(Pr),yt(or),db();break;case 5:cb(w);break;case 4:gl();break;case 13:yt(kt);break;case 19:yt(kt);break;case 10:ab(w.type._context);break;case 22:case 23:Ub()}m=m.return}if(Ht=u,Nt=u=Ra(u.current,null),Qt=Kr=d,jt=0,Vc=null,zb=Vp=Yo=0,Or=$c=null,Uo!==null){for(d=0;d<Uo.length;d++)if(m=Uo[d],w=m.interleaved,w!==null){m.interleaved=null;var S=w.next,T=m.pending;if(T!==null){var P=T.next;T.next=S,w.next=P}m.pending=w}Uo=null}return u}function WN(u,d){do{var m=Nt;try{if(ib(),Lp.current=Rp,Ip){for(var w=St.memoizedState;w!==null;){var S=w.queue;S!==null&&(S.pending=null),w=w.next}Ip=!1}if(Go=0,Bt=zt=St=null,Oc=!1,zc=0,Ob.current=null,m===null||m.return===null){jt=1,Vc=d,Nt=null;break}e:{var T=u,P=m.return,V=m,G=d;if(d=Qt,V.flags|=32768,G!==null&&typeof G=="object"&&typeof G.then=="function"){var ee=G,ae=V,se=ae.tag;if((ae.mode&1)===0&&(se===0||se===11||se===15)){var ie=ae.alternate;ie?(ae.updateQueue=ie.updateQueue,ae.memoizedState=ie.memoizedState,ae.lanes=ie.lanes):(ae.updateQueue=null,ae.memoizedState=null)}var ge=gN(P);if(ge!==null){ge.flags&=-257,mN(ge,P,V,T,d),ge.mode&1&&vN(T,ee,d),d=ge,G=ee;var xe=d.updateQueue;if(xe===null){var be=new Set;be.add(G),d.updateQueue=be}else xe.add(G);break e}else{if((d&1)===0){vN(T,ee,d),Wb();break e}G=Error(r(426))}}else if(_t&&V.mode&1){var Lt=gN(P);if(Lt!==null){(Lt.flags&65536)===0&&(Lt.flags|=256),mN(Lt,P,V,T,d),rb(ml(G,V));break e}}T=G=ml(G,V),jt!==4&&(jt=2),$c===null?$c=[T]:$c.push(T),T=P;do{switch(T.tag){case 3:T.flags|=65536,d&=-d,T.lanes|=d;var Z=hN(T,G,d);BP(T,Z);break e;case 1:V=G;var q=T.type,J=T.stateNode;if((T.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(La===null||!La.has(J)))){T.flags|=65536,d&=-d,T.lanes|=d;var fe=pN(T,V,d);BP(T,fe);break e}}T=T.return}while(T!==null)}XN(m)}catch(ke){d=ke,Nt===m&&m!==null&&(Nt=m=m.return);continue}break}while(!0)}function GN(){var u=Hp.current;return Hp.current=Rp,u===null?Rp:u}function Wb(){(jt===0||jt===3||jt===2)&&(jt=4),Ht===null||(Yo&268435455)===0&&(Vp&268435455)===0||Na(Ht,Qt)}function Xp(u,d){var m=Ke;Ke|=2;var w=GN();(Ht!==u||Qt!==d)&&(zi=null,qo(u,d));do try{Jee();break}catch(S){WN(u,S)}while(!0);if(ib(),Ke=m,Hp.current=w,Nt!==null)throw Error(r(261));return Ht=null,Qt=0,jt}function Jee(){for(;Nt!==null;)YN(Nt)}function ete(){for(;Nt!==null&&!CJ();)YN(Nt)}function YN(u){var d=ZN(u.alternate,u,Kr);u.memoizedProps=u.pendingProps,d===null?XN(u):Nt=d,Ob.current=null}function XN(u){var d=u;do{var m=d.alternate;if(u=d.return,(d.flags&32768)===0){if(m=Gee(m,d,Kr),m!==null){Nt=m;return}}else{if(m=Yee(m,d),m!==null){m.flags&=32767,Nt=m;return}if(u!==null)u.flags|=32768,u.subtreeFlags=0,u.deletions=null;else{jt=6,Nt=null;return}}if(d=d.sibling,d!==null){Nt=d;return}Nt=d=u}while(d!==null);jt===0&&(jt=5)}function Ko(u,d,m){var w=st,S=wn.transition;try{wn.transition=null,st=1,tte(u,d,m,w)}finally{wn.transition=S,st=w}return null}function tte(u,d,m,w){do wl();while(Ia!==null);if((Ke&6)!==0)throw Error(r(327));m=u.finishedWork;var S=u.finishedLanes;if(m===null)return null;if(u.finishedWork=null,u.finishedLanes=0,m===u.current)throw Error(r(177));u.callbackNode=null,u.callbackPriority=0;var T=m.lanes|m.childLanes;if(RJ(u,T),u===Ht&&(Nt=Ht=null,Qt=0),(m.subtreeFlags&2064)===0&&(m.flags&2064)===0||Up||(Up=!0,QN(Qh,function(){return wl(),null})),T=(m.flags&15990)!==0,(m.subtreeFlags&15990)!==0||T){T=wn.transition,wn.transition=null;var P=st;st=1;var V=Ke;Ke|=4,Ob.current=null,qee(u,m),jN(m,u),wee(W1),ap=!!U1,W1=U1=null,u.current=m,Kee(m),TJ(),Ke=V,st=P,wn.transition=T}else u.current=m;if(Up&&(Up=!1,Ia=u,Wp=S),T=u.pendingLanes,T===0&&(La=null),MJ(m.stateNode),zr(u,Et()),d!==null)for(w=u.onRecoverableError,m=0;m<d.length;m++)S=d[m],w(S.value,{componentStack:S.stack,digest:S.digest});if($p)throw $p=!1,u=Fb,Fb=null,u;return(Wp&1)!==0&&u.tag!==0&&wl(),T=u.pendingLanes,(T&1)!==0?u===Bb?Uc++:(Uc=0,Bb=u):Uc=0,Aa(),null}function wl(){if(Ia!==null){var u=OI(Wp),d=wn.transition,m=st;try{if(wn.transition=null,st=16>u?16:u,Ia===null)var w=!1;else{if(u=Ia,Ia=null,Wp=0,(Ke&6)!==0)throw Error(r(331));var S=Ke;for(Ke|=4,ye=u.current;ye!==null;){var T=ye,P=T.child;if((ye.flags&16)!==0){var V=T.deletions;if(V!==null){for(var G=0;G<V.length;G++){var ee=V[G];for(ye=ee;ye!==null;){var ae=ye;switch(ae.tag){case 0:case 11:case 15:Hc(8,ae,T)}var se=ae.child;if(se!==null)se.return=ae,ye=se;else for(;ye!==null;){ae=ye;var ie=ae.sibling,ge=ae.return;if(PN(ae),ae===ee){ye=null;break}if(ie!==null){ie.return=ge,ye=ie;break}ye=ge}}}var xe=T.alternate;if(xe!==null){var be=xe.child;if(be!==null){xe.child=null;do{var Lt=be.sibling;be.sibling=null,be=Lt}while(be!==null)}}ye=T}}if((T.subtreeFlags&2064)!==0&&P!==null)P.return=T,ye=P;else e:for(;ye!==null;){if(T=ye,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:Hc(9,T,T.return)}var Z=T.sibling;if(Z!==null){Z.return=T.return,ye=Z;break e}ye=T.return}}var q=u.current;for(ye=q;ye!==null;){P=ye;var J=P.child;if((P.subtreeFlags&2064)!==0&&J!==null)J.return=P,ye=J;else e:for(P=q;ye!==null;){if(V=ye,(V.flags&2048)!==0)try{switch(V.tag){case 0:case 11:case 15:Bp(9,V)}}catch(ke){At(V,V.return,ke)}if(V===P){ye=null;break e}var fe=V.sibling;if(fe!==null){fe.return=V.return,ye=fe;break e}ye=V.return}}if(Ke=S,Aa(),si&&typeof si.onPostCommitFiberRoot=="function")try{si.onPostCommitFiberRoot(Jh,u)}catch{}w=!0}return w}finally{st=m,wn.transition=d}}return!1}function qN(u,d,m){d=ml(m,d),d=hN(u,d,1),u=Ma(u,d,1),d=yr(),u!==null&&(pc(u,1,d),zr(u,d))}function At(u,d,m){if(u.tag===3)qN(u,u,m);else for(;d!==null;){if(d.tag===3){qN(d,u,m);break}else if(d.tag===1){var w=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof w.componentDidCatch=="function"&&(La===null||!La.has(w))){u=ml(m,u),u=pN(d,u,1),d=Ma(d,u,1),u=yr(),d!==null&&(pc(d,1,u),zr(d,u));break}}d=d.return}}function rte(u,d,m){var w=u.pingCache;w!==null&&w.delete(d),d=yr(),u.pingedLanes|=u.suspendedLanes&m,Ht===u&&(Qt&m)===m&&(jt===4||jt===3&&(Qt&130023424)===Qt&&500>Et()-jb?qo(u,0):zb|=m),zr(u,d)}function KN(u,d){d===0&&((u.mode&1)===0?d=1:(d=tp,tp<<=1,(tp&130023424)===0&&(tp=4194304)));var m=yr();u=Ni(u,d),u!==null&&(pc(u,d,m),zr(u,m))}function nte(u){var d=u.memoizedState,m=0;d!==null&&(m=d.retryLane),KN(u,m)}function ite(u,d){var m=0;switch(u.tag){case 13:var w=u.stateNode,S=u.memoizedState;S!==null&&(m=S.retryLane);break;case 19:w=u.stateNode;break;default:throw Error(r(314))}w!==null&&w.delete(d),KN(u,m)}var ZN;ZN=function(u,d,m){if(u!==null)if(u.memoizedProps!==d.pendingProps||Pr.current)Rr=!0;else{if((u.lanes&m)===0&&(d.flags&128)===0)return Rr=!1,Wee(u,d,m);Rr=(u.flags&131072)!==0}else Rr=!1,_t&&(d.flags&1048576)!==0&&EP(d,kp,d.index);switch(d.lanes=0,d.tag){case 2:var w=d.type;jp(u,d),u=d.pendingProps;var S=ul(d,or.current);vl(d,m),S=vb(null,d,w,u,S,m);var T=gb();return d.flags|=1,typeof S=="object"&&S!==null&&typeof S.render=="function"&&S.$$typeof===void 0?(d.tag=1,d.memoizedState=null,d.updateQueue=null,Nr(w)?(T=!0,bp(d)):T=!1,d.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,lb(d),S.updater=Op,d.stateNode=S,S._reactInternals=d,_b(d,w,u,m),d=Tb(null,d,w,!0,T,m)):(d.tag=0,_t&&T&&Q1(d),mr(null,d,S,m),d=d.child),d;case 16:w=d.elementType;e:{switch(jp(u,d),u=d.pendingProps,S=w._init,w=S(w._payload),d.type=w,S=d.tag=ote(w),u=Hn(w,u),S){case 0:d=Cb(null,d,w,u,m);break e;case 1:d=kN(null,d,w,u,m);break e;case 11:d=yN(null,d,w,u,m);break e;case 14:d=xN(null,d,w,Hn(w.type,u),m);break e}throw Error(r(306,w,""))}return d;case 0:return w=d.type,S=d.pendingProps,S=d.elementType===w?S:Hn(w,S),Cb(u,d,w,S,m);case 1:return w=d.type,S=d.pendingProps,S=d.elementType===w?S:Hn(w,S),kN(u,d,w,S,m);case 3:e:{if(SN(d),u===null)throw Error(r(387));w=d.pendingProps,T=d.memoizedState,S=T.element,FP(u,d),Mp(d,w,null,m);var P=d.memoizedState;if(w=P.element,T.isDehydrated)if(T={element:w,isDehydrated:!1,cache:P.cache,pendingSuspenseBoundaries:P.pendingSuspenseBoundaries,transitions:P.transitions},d.updateQueue.baseState=T,d.memoizedState=T,d.flags&256){S=ml(Error(r(423)),d),d=CN(u,d,w,m,S);break e}else if(w!==S){S=ml(Error(r(424)),d),d=CN(u,d,w,m,S);break e}else for(qr=Sa(d.stateNode.containerInfo.firstChild),Xr=d,_t=!0,Bn=null,m=zP(d,null,w,m),d.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling;else{if(dl(),w===S){d=Oi(u,d,m);break e}mr(u,d,w,m)}d=d.child}return d;case 5:return VP(d),u===null&&tb(d),w=d.type,S=d.pendingProps,T=u!==null?u.memoizedProps:null,P=S.children,G1(w,S)?P=null:T!==null&&G1(w,T)&&(d.flags|=32),_N(u,d),mr(u,d,P,m),d.child;case 6:return u===null&&tb(d),null;case 13:return TN(u,d,m);case 4:return ub(d,d.stateNode.containerInfo),w=d.pendingProps,u===null?d.child=hl(d,null,w,m):mr(u,d,w,m),d.child;case 11:return w=d.type,S=d.pendingProps,S=d.elementType===w?S:Hn(w,S),yN(u,d,w,S,m);case 7:return mr(u,d,d.pendingProps,m),d.child;case 8:return mr(u,d,d.pendingProps.children,m),d.child;case 12:return mr(u,d,d.pendingProps.children,m),d.child;case 10:e:{if(w=d.type._context,S=d.pendingProps,T=d.memoizedProps,P=S.value,vt(Tp,w._currentValue),w._currentValue=P,T!==null)if(Fn(T.value,P)){if(T.children===S.children&&!Pr.current){d=Oi(u,d,m);break e}}else for(T=d.child,T!==null&&(T.return=d);T!==null;){var V=T.dependencies;if(V!==null){P=T.child;for(var G=V.firstContext;G!==null;){if(G.context===w){if(T.tag===1){G=Ri(-1,m&-m),G.tag=2;var ee=T.updateQueue;if(ee!==null){ee=ee.shared;var ae=ee.pending;ae===null?G.next=G:(G.next=ae.next,ae.next=G),ee.pending=G}}T.lanes|=m,G=T.alternate,G!==null&&(G.lanes|=m),ob(T.return,m,d),V.lanes|=m;break}G=G.next}}else if(T.tag===10)P=T.type===d.type?null:T.child;else if(T.tag===18){if(P=T.return,P===null)throw Error(r(341));P.lanes|=m,V=P.alternate,V!==null&&(V.lanes|=m),ob(P,m,d),P=T.sibling}else P=T.child;if(P!==null)P.return=T;else for(P=T;P!==null;){if(P===d){P=null;break}if(T=P.sibling,T!==null){T.return=P.return,P=T;break}P=P.return}T=P}mr(u,d,S.children,m),d=d.child}return d;case 9:return S=d.type,w=d.pendingProps.children,vl(d,m),S=xn(S),w=w(S),d.flags|=1,mr(u,d,w,m),d.child;case 14:return w=d.type,S=Hn(w,d.pendingProps),S=Hn(w.type,S),xN(u,d,w,S,m);case 15:return bN(u,d,d.type,d.pendingProps,m);case 17:return w=d.type,S=d.pendingProps,S=d.elementType===w?S:Hn(w,S),jp(u,d),d.tag=1,Nr(w)?(u=!0,bp(d)):u=!1,vl(d,m),fN(d,w,S),_b(d,w,S,m),Tb(null,d,w,!0,u,m);case 19:return DN(u,d,m);case 22:return wN(u,d,m)}throw Error(r(156,d.tag))};function QN(u,d){return LI(u,d)}function ate(u,d,m,w){this.tag=u,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=d,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 _n(u,d,m,w){return new ate(u,d,m,w)}function Gb(u){return u=u.prototype,!(!u||!u.isReactComponent)}function ote(u){if(typeof u=="function")return Gb(u)?1:0;if(u!=null){if(u=u.$$typeof,u===j)return 11;if(u===K)return 14}return 2}function Ra(u,d){var m=u.alternate;return m===null?(m=_n(u.tag,d,u.key,u.mode),m.elementType=u.elementType,m.type=u.type,m.stateNode=u.stateNode,m.alternate=u,u.alternate=m):(m.pendingProps=d,m.type=u.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=u.flags&14680064,m.childLanes=u.childLanes,m.lanes=u.lanes,m.child=u.child,m.memoizedProps=u.memoizedProps,m.memoizedState=u.memoizedState,m.updateQueue=u.updateQueue,d=u.dependencies,m.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},m.sibling=u.sibling,m.index=u.index,m.ref=u.ref,m}function qp(u,d,m,w,S,T){var P=2;if(w=u,typeof u=="function")Gb(u)&&(P=1);else if(typeof u=="string")P=5;else e:switch(u){case E:return Zo(m.children,S,T,d);case N:P=8,S|=8;break;case O:return u=_n(12,m,d,S|2),u.elementType=O,u.lanes=T,u;case H:return u=_n(13,m,d,S),u.elementType=H,u.lanes=T,u;case W:return u=_n(19,m,d,S),u.elementType=W,u.lanes=T,u;case re:return Kp(m,S,T,d);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case L:P=10;break e;case R:P=9;break e;case j:P=11;break e;case K:P=14;break e;case Q:P=16,w=null;break e}throw Error(r(130,u==null?u:typeof u,""))}return d=_n(P,m,d,S),d.elementType=u,d.type=w,d.lanes=T,d}function Zo(u,d,m,w){return u=_n(7,u,w,d),u.lanes=m,u}function Kp(u,d,m,w){return u=_n(22,u,w,d),u.elementType=re,u.lanes=m,u.stateNode={isHidden:!1},u}function Yb(u,d,m){return u=_n(6,u,null,d),u.lanes=m,u}function Xb(u,d,m){return d=_n(4,u.children!==null?u.children:[],u.key,d),d.lanes=m,d.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},d}function ste(u,d,m,w,S){this.tag=d,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=w1(0),this.expirationTimes=w1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=w1(0),this.identifierPrefix=w,this.onRecoverableError=S,this.mutableSourceEagerHydrationData=null}function qb(u,d,m,w,S,T,P,V,G){return u=new ste(u,d,m,V,G),d===1?(d=1,T===!0&&(d|=8)):d=0,T=_n(3,null,null,d),u.current=T,T.stateNode=u,T.memoizedState={element:w,isDehydrated:m,cache:null,transitions:null,pendingSuspenseBoundaries:null},lb(T),u}function lte(u,d,m){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:w==null?null:""+w,children:u,containerInfo:d,implementation:m}}function JN(u){if(!u)return Ta;u=u._reactInternals;e:{if(Fo(u)!==u||u.tag!==1)throw Error(r(170));var d=u;do{switch(d.tag){case 3:d=d.stateNode.context;break e;case 1:if(Nr(d.type)){d=d.stateNode.__reactInternalMemoizedMergedChildContext;break e}}d=d.return}while(d!==null);throw Error(r(171))}if(u.tag===1){var m=u.type;if(Nr(m))return AP(u,m,d)}return d}function eR(u,d,m,w,S,T,P,V,G){return u=qb(m,w,!0,u,S,T,P,V,G),u.context=JN(null),m=u.current,w=yr(),S=Pa(m),T=Ri(w,S),T.callback=d??null,Ma(m,T,S),u.current.lanes=S,pc(u,S,w),zr(u,w),u}function Zp(u,d,m,w){var S=d.current,T=yr(),P=Pa(S);return m=JN(m),d.context===null?d.context=m:d.pendingContext=m,d=Ri(T,P),d.payload={element:u},w=w===void 0?null:w,w!==null&&(d.callback=w),u=Ma(S,d,P),u!==null&&(Un(u,S,P,T),Dp(u,S,P)),P}function Qp(u){return u=u.current,u.child?(u.child.tag===5,u.child.stateNode):null}function tR(u,d){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var m=u.retryLane;u.retryLane=m!==0&&m<d?m:d}}function Kb(u,d){tR(u,d),(u=u.alternate)&&tR(u,d)}function ute(){return null}var rR=typeof reportError=="function"?reportError:function(u){console.error(u)};function Zb(u){this._internalRoot=u}Jp.prototype.render=Zb.prototype.render=function(u){var d=this._internalRoot;if(d===null)throw Error(r(409));Zp(u,d,null,null)},Jp.prototype.unmount=Zb.prototype.unmount=function(){var u=this._internalRoot;if(u!==null){this._internalRoot=null;var d=u.containerInfo;Xo(function(){Zp(null,u,null,null)}),d[Ei]=null}};function Jp(u){this._internalRoot=u}Jp.prototype.unstable_scheduleHydration=function(u){if(u){var d=FI();u={blockedOn:null,target:u,priority:d};for(var m=0;m<wa.length&&d!==0&&d<wa[m].priority;m++);wa.splice(m,0,u),m===0&&VI(u)}};function Qb(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)}function ev(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11&&(u.nodeType!==8||u.nodeValue!==" react-mount-point-unstable "))}function nR(){}function cte(u,d,m,w,S){if(S){if(typeof w=="function"){var T=w;w=function(){var ee=Qp(P);T.call(ee)}}var P=eR(d,w,u,0,null,!1,!1,"",nR);return u._reactRootContainer=P,u[Ei]=P.current,Dc(u.nodeType===8?u.parentNode:u),Xo(),P}for(;S=u.lastChild;)u.removeChild(S);if(typeof w=="function"){var V=w;w=function(){var ee=Qp(G);V.call(ee)}}var G=qb(u,0,!1,null,null,!1,!1,"",nR);return u._reactRootContainer=G,u[Ei]=G.current,Dc(u.nodeType===8?u.parentNode:u),Xo(function(){Zp(d,G,m,w)}),G}function tv(u,d,m,w,S){var T=m._reactRootContainer;if(T){var P=T;if(typeof S=="function"){var V=S;S=function(){var G=Qp(P);V.call(G)}}Zp(d,P,u,S)}else P=cte(m,d,u,S,w);return Qp(P)}zI=function(u){switch(u.tag){case 3:var d=u.stateNode;if(d.current.memoizedState.isDehydrated){var m=hc(d.pendingLanes);m!==0&&(_1(d,m|1),zr(d,Et()),(Ke&6)===0&&(bl=Et()+500,Aa()))}break;case 13:Xo(function(){var w=Ni(u,1);if(w!==null){var S=yr();Un(w,u,1,S)}}),Kb(u,1)}},k1=function(u){if(u.tag===13){var d=Ni(u,134217728);if(d!==null){var m=yr();Un(d,u,134217728,m)}Kb(u,134217728)}},jI=function(u){if(u.tag===13){var d=Pa(u),m=Ni(u,d);if(m!==null){var w=yr();Un(m,u,d,w)}Kb(u,d)}},FI=function(){return st},BI=function(u,d){var m=st;try{return st=u,d()}finally{st=m}},Kt=function(u,d,m){switch(d){case"input":if(vn(u,m),d=m.name,m.type==="radio"&&d!=null){for(m=u;m.parentNode;)m=m.parentNode;for(m=m.querySelectorAll("input[name="+JSON.stringify(""+d)+'][type="radio"]'),d=0;d<m.length;d++){var w=m[d];if(w!==u&&w.form===u.form){var S=yp(w);if(!S)throw Error(r(90));Ve(w),vn(w,S)}}}break;case"textarea":Yh(u,m);break;case"select":d=m.value,d!=null&&gr(u,!!m.multiple,d,!1)}},SI=$b,CI=Xo;var fte={usingClientEntryPoint:!1,Events:[Lc,sl,yp,_I,kI,$b]},Wc={findFiberByHostInstance:Bo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},dte={bundleType:Wc.bundleType,version:Wc.version,rendererPackageName:Wc.rendererPackageName,rendererConfig:Wc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(u){return u=MI(u),u===null?null:u.stateNode},findFiberByHostInstance:Wc.findFiberByHostInstance||ute,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 rv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rv.isDisabled&&rv.supportsFiber)try{Jh=rv.inject(dte),si=rv}catch{}}return xr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fte,xr.createPortal=function(u,d){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Qb(d))throw Error(r(200));return lte(u,d,null,m)},xr.createRoot=function(u,d){if(!Qb(u))throw Error(r(299));var m=!1,w="",S=rR;return d!=null&&(d.unstable_strictMode===!0&&(m=!0),d.identifierPrefix!==void 0&&(w=d.identifierPrefix),d.onRecoverableError!==void 0&&(S=d.onRecoverableError)),d=qb(u,1,!1,null,null,m,!1,w,S),u[Ei]=d.current,Dc(u.nodeType===8?u.parentNode:u),new Zb(d)},xr.findDOMNode=function(u){if(u==null)return null;if(u.nodeType===1)return u;var d=u._reactInternals;if(d===void 0)throw typeof u.render=="function"?Error(r(188)):(u=Object.keys(u).join(","),Error(r(268,u)));return u=MI(d),u=u===null?null:u.stateNode,u},xr.flushSync=function(u){return Xo(u)},xr.hydrate=function(u,d,m){if(!ev(d))throw Error(r(200));return tv(null,u,d,!0,m)},xr.hydrateRoot=function(u,d,m){if(!Qb(u))throw Error(r(405));var w=m!=null&&m.hydratedSources||null,S=!1,T="",P=rR;if(m!=null&&(m.unstable_strictMode===!0&&(S=!0),m.identifierPrefix!==void 0&&(T=m.identifierPrefix),m.onRecoverableError!==void 0&&(P=m.onRecoverableError)),d=eR(d,null,u,1,m??null,S,!1,T,P),u[Ei]=d.current,Dc(u),w)for(u=0;u<w.length;u++)m=w[u],S=m._getVersion,S=S(m._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[m,S]:d.mutableSourceEagerHydrationData.push(m,S);return new Jp(d)},xr.render=function(u,d,m){if(!ev(d))throw Error(r(200));return tv(null,u,d,!1,m)},xr.unmountComponentAtNode=function(u){if(!ev(u))throw Error(r(40));return u._reactRootContainer?(Xo(function(){tv(null,null,u,!1,function(){u._reactRootContainer=null,u[Ei]=null})}),!0):!1},xr.unstable_batchedUpdates=$b,xr.unstable_renderSubtreeIntoContainer=function(u,d,m,w){if(!ev(m))throw Error(r(200));if(u==null||u._reactInternals===void 0)throw Error(r(38));return tv(u,d,m,!1,w)},xr.version="18.3.1-next-f1338f8080-20240426",xr}var ow;function fR(){if(ow)return ov.exports;ow=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(),ov.exports=cR(),ov.exports}var sw;function dR(){if(sw)return Gc;sw=1;var e=fR();return Gc.createRoot=e.createRoot,Gc.hydrateRoot=e.hydrateRoot,Gc}var hR=dR();const pR=".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%}",uv=25,vR={ru:"ru-RU",kk:"kk-KZ",en:"en-US"};function kn(e,t,r){return e===null?"—":new Intl.NumberFormat(vR[t],{minimumFractionDigits:r,maximumFractionDigits:r}).format(e).replace(new RegExp("\\u202F","g")," ")}const cv=e=>typeof e=="number"&&Number.isFinite(e)?e:null;function gR(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?cv(l)===null:l==null)?o:a).push(s)}return a.sort((s,l)=>i?n*((cv(s[t.key])??0)-(cv(l[t.key])??0)):n*String(s[t.key]).localeCompare(String(l[t.key]))),[...a,...o]}function mR(e,t){let r=e.data;const n=t.query?.trim().toLowerCase();if(n){const f=e.columns.filter(h=>h.type==="string").map(h=>h.key);r=r.filter(h=>f.some(v=>String(h[v]??"").toLowerCase().includes(n)))}const i=e.columns.find(f=>f.key===t.sortKey);i&&(r=gR(r,i,t.dir??"asc"));const a=r.length,o=Math.max(1,Math.ceil(a/uv)),s=Math.min(Math.max(1,Math.trunc(t.page)||1),o),l=(s-1)*uv,c=r.slice(l,l+uv);return{rows:c,page:s,pages:o,from:a===0?0:l+1,to:l+c.length,total:a}}function yR(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 xR(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(yR(e.content)),t?.source&&r.push(`Источник: ${t.source.name}`),r.join(`
|
|
12
|
+
|
|
13
|
+
`)}function lw(e,t){return t.isLastInBranch?t.now.getTime()>Date.parse(e.expires_at)?"expired":"open":"answered"}function bR(e,t){const r=t.trim().toLowerCase();return r?e.filter(n=>n.label.toLowerCase().includes(r)):e}function Sl(e){return[...new Set(e.data.map(t=>t.period))].sort((t,r)=>t.localeCompare(r,void 0,{numeric:!0}))}const uw=e=>e.value_kind!=="level",cw=(e,t)=>{const r=Sl(e),n=r.indexOf(t);return n>0?r[n-1]:void 0},fw=(e,t)=>e.national?.period===t?e.national.value:null,wR=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},_R=e=>[e.territory_code??e.territory_name,e.item].filter(t=>!!t).join("|"),kR=e=>[e.territory_name??e.territory_code,e.item].filter(t=>!!t).join(", ");function fv(e,t){const r=new Map;for(const n of e.data)n.period===t&&r.set(_R(n),{name:kR(n),value:n.value});return r}function SR(e,t,r){return t===null||r===null||r===void 0?null:uw(e)?t-r:r<=0?null:(t/r-1)*100}const dw=e=>e!==null&&Number.isFinite(e)?e:null;function CR(e,t){const r=fv(e,t.period),n=cw(e,t.period),i=n?fv(e,n):void 0,a=[...r.values()].map(c=>c.value).filter(c=>c!==null),o=a.reduce((c,f)=>c+f,0),s=t.base==="national"?fw(e,t.period):wR(a);return[...r].map(([c,{name:f,value:h}])=>{const v=dw(i?SR(e,h,i.get(c)?.value):null);let p=h;t.mode==="deviation"?p=h===null||s===null?null:h-s:t.mode==="change"&&(p=v);const g=e.value_kind==="level"&&h!==null&&o!==0?h/o*100:null;return{key:c,name:f,value:h,display:dw(p),share:g,delta:v}}).sort((c,f)=>c.display===null||f.display===null?+(c.display===null)-+(f.display===null):f.display-c.display)}function TR(e,t){return{deviation:[...fv(e,t).values()].filter(n=>n.value!==null).length>=2,national:fw(e,t)!==null,change:cw(e,t)!==void 0}}function AR(e,t){return t==="value"?e.unit.label:uw(e)?"п.п.":t==="deviation"?e.unit.label:"%"}function DR(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 hw(e){switch(e){case"pdf":return"report";case"docx":return"document";case"pptx":return"presentation";case"xlsx":return"excel";case"csv":return"csv"}}const Qr=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Se=e=>typeof e=="string",hi=e=>typeof e=="number"&&Number.isFinite(e),dv=e=>e===null||Se(e),Jr=(e,t)=>Array.isArray(e)&&e.every(r=>Qr(r)&&t(r)),Yc=e=>Array.isArray(e)&&e.every(Se),MR=["self","regions","districts"],ER=["string","number","integer","period"],LR=["indicator","territory","topic","period","scope","plan_confirm"];function IR(e){const{period:t}=e;return Jr(e.indicators,r=>Se(r.id)&&Se(r.name)&&Se(r.unit))&&Jr(e.alternatives,r=>Se(r.id)&&Se(r.name))&&Jr(e.territories,r=>Se(r.code)&&Se(r.name))&&Se(e.scope)&&MR.includes(e.scope)&&Qr(t)&&Se(t.label)&&typeof t.substituted=="boolean"&&dv(t.reason)&&Se(e.breakdown)&&Yc(e.passport)&&(e.source===void 0||Qr(e.source)&&Se(e.source.name))&&(e.methodology===void 0||Qr(e.methodology)&&Se(e.methodology.title)&&Se(e.methodology.url))}function PR(e){return Se(e.section_id)&&Jr(e.columns,t=>Se(t.key)&&Se(t.title)&&Se(t.type)&&ER.includes(t.type))&&Jr(e.data,()=>!0)&&typeof e.truncated=="boolean"&&hi(e.total_rows)}function NR(e){return Se(e.topic)&&Jr(e.sections,t=>Se(t.id)&&Yc(t.path)&&hi(t.count))&&Jr(e.indicators,t=>Se(t.entity_id)&&Se(t.name)&&Se(t.unit)&&Se(t.years)&&Se(t.section))&&hi(e.total)&&Yc(e.examples)}function RR(e){return Se(e.id)&&Se(e.type)&&LR.includes(e.type)&&Se(e.slot)&&Se(e.question)&&Jr(e.options,t=>Se(t.value)&&Se(t.label)&&dv(t.hint))&&dv(e.default)&&typeof e.allow_free_text=="boolean"&&hi(e.round)&&Se(e.expires_at)}const OR=["regional","trend","breakdown","multi"],zR=["level","percent","index","rate"],jR=["pdf","docx","pptx","xlsx","csv"],FR=["queued","running","done","failed","expired"],pw=["territory_code","territory_name","item"],Cl=e=>e==null,Qo=e=>Cl(e)||Se(e),BR=e=>Se(e.period)&&(e.value===null||hi(e.value))&&pw.every(t=>Qo(e[t])),HR=e=>Qr(e)&&Se(e.title)&&Se(e.url);function VR(e){return Cl(e)?!0:!Qr(e)||!Qo(e.label)?!1:Cl(e.editions)?!0:Qr(e.editions)&&Object.values(e.editions).every(HR)}function $R(e){const{unit:t,national:r}=e;return Se(e.id)&&Se(e.title)&&Se(e.shape)&&OR.includes(e.shape)&&Qr(t)&&Se(t.code)&&Se(t.label)&&Se(e.value_kind)&&zR.includes(e.value_kind)&&hi(e.decimals)&&Se(e.freq)&&Se(e.period)&&Se(e.latest_period)&&Jr(e.data,BR)&&(Cl(r)||Qr(r)&&Se(r.period)&&hi(r.value))&&Jr(e.kpis,n=>Se(n.label)&&Se(n.value)&&Qo(n.sub)&&Qo(n.tone))&&Yc(e.findings)&&typeof e.truncated=="boolean"&&hi(e.total_rows)&&VR(e.methodology)&&Qo(e.source_url)&&Qo(e.source_name)}function UR(e){const t={...e};for(const r of pw)t[r]===null&&delete t[r];return t}function WR(e){if(!Se(e.title)||!Array.isArray(e.sections))return;const t=e.sections.filter(r=>Qr(r)&&$R(r)).map(r=>({...r,national:r.national??null,data:r.data.map(UR)}));if(t.length!==0)return{kind:"dashboard",title:e.title,auto_open:e.auto_open===!0,sections:t}}const vw=e=>Se(e.format)&&jR.includes(e.format)&&Se(e.filename)&&Se(e.title)&&Se(e.download_url)&&hi(e.size_bytes);function GR(e){const{error:t}=e;return Se(e.job_id)&&Se(e.status)&&FR.includes(e.status)&&Jr(e.files,vw)&&(Cl(t)||Qr(t)&&Se(t.code)&&Se(t.message))}function gw(e){if(Qr(e))switch(e.kind){case"plan":return IR(e)?e:void 0;case"table":return PR(e)?e:void 0;case"catalog":return NR(e)?e:void 0;case"clarification":return RR(e)?e:void 0;case"dashboard":return WR(e);case"export":return Jr(e.files,vw)?e:void 0;case"report":return GR(e)?e:void 0;default:return}}const hv="/chat/stream",YR=100;class cr extends Error{constructor(r,n,i=null){super(n);_l(this,"status");_l(this,"code");_l(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 XR(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 qR(e){const t=await e.text();if(!t)return null;try{return JSON.parse(t)}catch{return null}}async function pv(e){const t=await qR(e);return new cr(e.status,XR(t,e.status),t)}const KR=["О пользователе: ","Как отвечать: "],ZR="Предыдущий диалог:",mw=`
|
|
14
|
+
Новый вопрос: `;function QR(e){let t=e;if(KR.some(r=>t.startsWith(r))){const r=t.indexOf(`
|
|
15
|
+
|
|
16
|
+
`);r!==-1&&(t=t.slice(r+2))}if(t.startsWith(ZR)){const r=t.lastIndexOf(mw);r!==-1&&(t=t.slice(r+mw.length))}return t}const JR=["streaming","done","stopped","error"];function e5(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 yw(e){return{id:e.id,parentId:e.parent_id,role:e.role==="user"?"user":"assistant",content:e.role==="user"?QR(e.content):e.content,mode:e.mode,status:JR.find(t=>t===e.status)??"done",steps:e.steps.map(e5),durationMs:e.duration_ms,rating:e.rating,feedback:e.feedback,feedbackReason:e.feedback_reason??"",attachments:e.attachments??[],blocks:(e.blocks??[]).flatMap(t=>{const r=gw(t);return r!=null?[r]:[]}),createdAt:e.created_at}}const t5=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Xc=e=>t5.test(e);class Jo extends Error{constructor(t){super(t),this.name="StreamFailure"}}const r5=(e,t)=>Date.parse(e.createdAt)-Date.parse(t.createdAt)||(e.id<t.id?-1:e.id>t.id?1:0);function xw(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(r5);return{byId:t,children:r}}function n5(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 bw(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 i5(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 ww(e,t){if(t&&e.byId.has(t))return t;const r=e.children.get(null),n=r?.[r.length-1];return n?bw(e,n.id):null}let a5=0;const o5=e=>`temp-${e}-${Date.now().toString(36)}-${(a5++).toString(36)}`;function vv(e,t,r){return{id:o5(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 s5(e){return!e||e.messages.length===0?null:ww(xw(e.messages.map(yw)),e.current_leaf_id)}function l5(e,t){if(e.regenerateOf!=null){const i=t?.messages.find(a=>a.id===e.regenerateOf);return{assistant:vv("assistant",e.mode,i?.parent_id??null)}}const r=e.parentId===void 0?s5(t):e.parentId||null,n={...vv("user",e.mode,r),content:e.query,...e.file?{attachments:[{name:e.file.name,url:""}]}:{}};return{user:n,assistant:vv("assistant",e.mode,n.id)}}function u5(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 c5(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 f5(e,t,r,n){const i={...e,status:t,duration_ms:Date.now()-n};return t==="error"&&!e.content?{...i,content:r}:i}const d5=["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"],h5=e=>d5.includes(e);function p5(e){if(e instanceof cr)return e.code;if(e instanceof Jo)return e.message}function qc(e){const t=p5(e);return t!=null&&h5(t)?{kind:"code",code:t}:e instanceof cr?{kind:"status",status:e.status}:{kind:"generic"}}async function Kc(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 _w="text/event-stream";function v5({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 g5(e,t,r){return Kc(e,hv,{method:"POST",body:t,headers:{Accept:_w},signal:r})}function m5(e,t,r){return Kc(e,`${hv}/${t}`,{headers:{Accept:_w},signal:r})}async function y5(e,t){const r=await Kc(e,`${hv}/${t}/stop`,{method:"POST"});if(!r.ok)throw await pv(r)}async function x5(e){if(!e.ok)throw await pv(e);if(e.body==null)throw new Error("empty_stream");return e.body}const b5=45,w5=7,_5=.1,k5=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function S5(e,t){const r=e.charCodeAt(t-1);return r>=55296&&r<=56319?t+1:t}function C5(e,t){const[r,n]=B.useState(()=>e.length),i=B.useRef(r),a=B.useRef(e),o=B.useRef(null),s=B.useRef(null),[l]=B.useState(k5),c=t&&!l;return B.useLayoutEffect(()=>{a.current=e},[e]),B.useEffect(()=>{if(!c){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=h=>{const v=a.current,p=s.current;s.current=h;const g=p==null?1/60:Math.min((h-p)/1e3,_5),y=v.length-i.current;if(y<=0){o.current=null,s.current=null;return}const x=Math.max(1,Math.round(Math.max(b5*g,y*Math.min(1,w5*g)))),b=Math.min(v.length,S5(v,i.current+x));i.current=b,n(b),o.current=requestAnimationFrame(f)};o.current=requestAnimationFrame(f)},[e,c]),B.useEffect(()=>()=>{o.current!=null&&cancelAnimationFrame(o.current),o.current=null},[]),B.useEffect(()=>{c||o.current==null||(cancelAnimationFrame(o.current),o.current=null,s.current=null)},[c]),c?r>=e.length?e:e.slice(0,r):e}const gv="/api/v1/widget",kw="aid_visitor",Sw=4e3,mv=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,T5=()=>{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)}`},A5=(e,t)=>{if(e&&mv.test(e))return e;try{const n=t?.getItem(kw);if(n&&mv.test(n))return n}catch{}const r=T5();try{t?.setItem(kw,r)}catch{}return r},D5=/\/api\/v1\/attachments\/([0-9a-f-]{36})\/?(?:[?#].*)?$/i,Zc=(e,t)=>{const r=D5.exec(e);if(!r?.[1]){const n=/\/api\/v1\/widget\/attachments\/([0-9a-f-]{36})\/?$/i.exec(e);return n?.[1]?`${yv(t)}/attachments/${n[1]}`:null}return`${yv(t)}/attachments/${r[1]}`},yv=e=>`${e.replace(/\/+$/,"")}${gv}`,M5=e=>{const t={};if(!e||typeof e!="object")return t;const r=p=>{const g=e[p];return typeof g=="string"&&g?g:void 0},n=r("primary"),i=r("font"),a=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 c=r("launcherLabel");c&&(t.launcherLabel=c);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 p of["background","foreground","bubble","border"]){const g=r(p);g&&(t[p]=g)}const h=p=>{const g=e[p],y=typeof g=="number"?g:typeof g=="string"&&g?Number(g):NaN;return Number.isFinite(y)?y:void 0};for(const p of["windowWidth","windowHeight","offsetX","offsetY"]){const g=h(p);g!==void 0&&(t[p]=g)}const v=r("position");return(v==="bottom-right"||v==="bottom-left")&&(t.position=v),t},Cw=e=>{throw e instanceof cr||e instanceof Error&&e.name==="AbortError"?e:new cr(0,"network",null)},E5=({apiUrl:e,siteKey:t,visitorId:r,fetch:n})=>{const i={baseUrl:yv(e),headers:()=>({"X-Visitor-Id":r,...t?{"X-Widget-Key":t}:{}}),credentials:"omit",...n?{fetch:n}:{}},a=async(l,c={})=>{const f=await Kc(i,l,c).catch(Cw);if(!f.ok)throw await pv(f);return f},o=async(l,c)=>(await a(l,c)).json(),s=(l,c)=>({method:l,headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});return{transport:i,apiUrl:e,config:()=>o("/config"),health:()=>o("/modes/health"),threads:()=>o("/threads?limit=50"),thread:l=>o(`/threads/${l}`),setLeaf:async(l,c)=>{await a(`/threads/${l}`,s("PATCH",{current_leaf_id:c}))},deleteThread:async l=>{await a(`/threads/${l}`,{method:"DELETE"})},rate:async(l,c)=>{await a(`/messages/${l}/rating`,s("POST",{rating:c}))},feedback:async(l,c,f)=>{await a(`/messages/${l}/feedback`,s("POST",f?{feedback:c,reason:f}:{feedback:c}))},stop:l=>y5(i,l).catch(Cw),createReport:(l,c)=>o(`/messages/${l}/report`,s("POST",{language:c})),reportStatus:l=>mv.test(l)?o(`/report-jobs/${l}`):Promise.reject(new cr(0,"bad_job_id",null)),request:l=>a(l),attachment:async l=>{const c=Zc(l,e);if(!c)throw new cr(0,"not_attachment",null);const f=c.slice(i.baseUrl.length),h=await(await a(f)).blob();return URL.createObjectURL(h)}}},xv=["kk","ru","en"],L5=e=>xv.includes(e),Tw=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(L5(n))return n}return"ru"},Aw={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":"Нет связи с сервером. Проверьте подключение.","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":"Файл недоступен"},I5={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":"Сервермен байланыс жоқ. Қосылымды тексеріңіз.","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:Aw,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.","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"}},Sn=(e,t,r)=>{const n=I5[e][t];return r?n.replace(/\{(\w+)\}/g,(i,a)=>String(r[a]??i)):n},P5=e=>e in Aw,Tl=(e,t)=>{if(!e)return"";for(const r of[e[t],e.ru,...Object.values(e)])if(r)return r;return""},Dw="aid_prefs",N5=["light","dark","auto"],Mw=e=>{try{const t=JSON.parse(e?.getItem(Dw)??"{}"),r={};return xv.includes(t.lang)&&(r.lang=t.lang),N5.includes(t.scheme)&&(r.scheme=t.scheme),r}catch{return{}}},R5=(e,t)=>{try{e?.setItem(Dw,JSON.stringify(t))}catch{}},Ew=({scheme:e})=>e?{scheme:e}:{},O5=(e,t,r)=>t?!r||e.expanded?e:{expanded:!0,byDashboard:!0}:e.byDashboard?{expanded:!1,byDashboard:!1}:e,bv=B.createContext(null),wv=()=>{const e=B.useContext(bv);if(!e)throw new Error("usePrefs outside PrefsContext");return e},z5=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))}},j5='*,: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}}',Lw=3e3,_v=6*6e4,Iw={phase:"idle"},Pw={phase:"pending"},Al={phase:"failed"},Nw={phase:"expired"},F5=new Set(["pdf","docx","pptx","xlsx","csv"]),kv=e=>{switch(e.status){case"queued":case"running":return Pw;case"done":{const t=e.files.filter(r=>F5.has(r.format));return t.length>0?{phase:"done",files:t}:Al}case"expired":return Nw;default:return Al}},jr=new Map,Qc=new Set,B5=new Set(["done","failed","expired"]),Jc=new Set;let ja=0;const ji=(e,t)=>{const r=jr.get(e)??{view:Iw};jr.set(e,{...r,...t});for(const n of Jc)n()},H5=e=>{const t=jr.get(e);if(t?.jobId===void 0||t.deadline===void 0||t.api===void 0)return;if(clearTimeout(t.timer),Date.now()+Lw>t.deadline){ji(e,{view:Al,timer:void 0});return}const{jobId:r,api:n}=t,i=ja,a=setTimeout(()=>{n.reportStatus(r).then(o=>{i===ja&&jr.get(e)?.jobId===r&&Sv(e,o)},()=>{i===ja&&jr.get(e)?.jobId===r&&ji(e,{view:Al,timer:void 0})})},Lw);ji(e,{timer:a})},Sv=(e,t)=>{const r=kv(t),n=jr.get(e)?.jobId;n!==void 0&&n!==t.job_id&&Qc.add(n);const i=jr.get(e)?.deadline??Date.now()+_v;ji(e,{view:r,jobId:t.job_id,deadline:i,timer:void 0}),r.phase==="pending"&&H5(e)},Dl={subscribe:e=>(Jc.add(e),()=>{Jc.delete(e)}),view:e=>jr.get(e)?.view,adopt:(e,t,r)=>{if(Qc.has(t.job_id))return;const n=jr.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&&(!B5.has(t.status)||kv(t).phase===n.view.phase)||i&&n.view.phase==="expired")return}clearTimeout(n?.timer),ji(e,{deadline:Date.now()+_v,timer:void 0,api:r}),Sv(e,t)},start:(e,t,r)=>{const n=jr.get(e);if(n?.view.phase==="pending")return;clearTimeout(n?.timer),n?.jobId!==void 0&&Qc.add(n.jobId),ji(e,{view:Pw,jobId:void 0,deadline:Date.now()+_v,timer:void 0,api:t});const i=ja;t.createReport(e,r).then(a=>{i===ja&&Sv(e,a)},()=>{i===ja&&ji(e,{view:Al})})},expire:e=>{jr.get(e)?.view.phase==="done"&&ji(e,{view:Nw})}},V5=()=>{ja+=1;for(const e of jr.values())clearTimeout(e.timer);jr.clear(),Qc.clear();for(const e of Jc)e()},$5={calm:"idle",listen:"idle",think:"thinking",typing:"typing",eureka:"success",sorry:"fail"},U5={think:"bubble",eureka:"spark",sorry:"drop"},W5=(e,t)=>e==="error"?"sorry":e==="streaming"?t?"typing":"think":"calm",Rw=e=>`${e.replace(/\/+$/,"")}/static/avatars/dana`,G5={animated:!0,assetsBase:Rw("")},Cv=B.createContext(G5),Y5=()=>B.useContext(Cv),ef=({mood:e="calm",size:t=40,animated:r=!0,label:n,className:i,bare:a})=>{const{animated:o,assetsBase:s}=Y5(),l=U5[e],c=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:c($5[e]),alt:"",decoding:"async",draggable:!1}),l&&k.jsx("img",{className:`dana-av-${l}`,src:c(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))})]})},X5=2500,q5=(e,t)=>{const[r,n]=B.useState(!1),[i,a]=B.useState(e);return i!==e&&(a(e),i&&!e&&t==="done"&&n(!0)),B.useEffect(()=>{if(!r)return;const o=window.setTimeout(()=>{n(!1)},X5);return()=>{window.clearTimeout(o)}},[r]),r},K5=12e3,Z5=5e3,Ow="aid_mode",zw=B.createContext(null),me=()=>{const e=B.useContext(zw);if(!e)throw new Error("useChat outside ChatProvider");return e},Tv=(e,t)=>t.kind==="code"?Sn(e,`errors.${t.code}`):t.kind==="status"?t.status===0?Sn(e,"errors.network"):Sn(e,"errors.code",{code:t.status}):Sn(e,"errors.generic"),es="temp-thread",Q5=(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}),Av=(e,t,r)=>e&&{...e,messages:e.messages.map(n=>n.id===t?r(n):n)},J5=(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}))}},e3=(e,t)=>{const r=new Date(t).toISOString();return{id:es,title:e.query.slice(0,80),mode:e.mode,pinned:!1,created_at:r,updated_at:r,current_leaf_id:null,messages:[]}},t3=e=>({id:e.id,title:e.title,mode:e.mode,pinned:e.pinned,created_at:e.created_at,updated_at:e.updated_at}),r3=["widget_unauthorized","origin_not_allowed","origin_blocked"],n3=e=>e.configError?e.limit.overloaded?"overloaded":e.configErrorCode!==null&&r3.includes(e.configErrorCode)?"siteBlocked":"unavailable":e.config?null:"loading",i3=(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??e3(r,i),{user:o,assistant:s}=l5(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===es,o=u5(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?[t3(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=J5(n,t.snapshot,t.at);return{...e,thread:Av(e.thread,r.assistantId,a=>c5(a,i))}}case"turnEnd":{const{turn:r}=e;if(r?.token!==t.token)return e;const n=t.status==="detached"?e.thread:Av(e.thread,r.assistantId,i=>f5(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(h=>!i.has(h.id))??[],o=n&&(n.id!==es||a.length>0)?{...n,current_leaf_id:r.previousLeaf,messages:a}:null,{error:s}=t,l=s.status===429&&s.code==="daily_limit",c=s.status===503&&s.code==="anon_budget";let f=e.limit;return l?f={...f,remaining:0,blocked:!0,...s.resetAt?{resetAt:s.resetAt}:{}}:c&&(f={...f,blocked:!0,overloaded:!0}),{...e,thread:o,turn:null,notice:l||c?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:Av(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}}},Dv=e=>{const t=e?e.messages.map(yw):[],r=xw(t),n=ww(r,e?.current_leaf_id??null);return{index:r,path:n?n5(r,n):[]}},a3=e=>e.code==="ip_limit"?{kind:"code",code:"ip_limit"}:qc(e),jw=()=>{try{return window.localStorage}catch{return null}},o3=()=>{try{return jw()?.getItem(Ow)??null}catch{return null}},s3=e=>e instanceof TypeError,l3=({api:e,lang:t,open:r,onAdminTheme:n,children:i})=>{const[a,o]=B.useReducer(i3,null,()=>Q5(o3())),s=B.useRef(a),l=B.useRef(null),c=B.useRef(0),f=B.useRef(t),h=B.useRef(n);B.useLayoutEffect(()=>{s.current=a,f.current=t,h.current=n});const v=B.useCallback(()=>{e.config().then($=>{o({type:"config",config:$}),h.current(M5($.site.theme))},$=>{const I=$ instanceof cr&&$.status===503,z=$ instanceof cr?$.code:null;o({type:"configError",...I?{overloaded:I}:{},...z?{code:z}:{}})})},[e]),p=B.useCallback(()=>{e.threads().then($=>{o({type:"threads",threads:$})},()=>{o({type:"threadsError"})})},[e]),g=B.useCallback($=>{e.thread($).then(I=>{o({type:"thread",thread:I})},()=>{})},[e]);B.useEffect(()=>{v(),p()},[v,p]);const y=a.config!==null;B.useEffect(()=>{if(!r||!y)return;const $=()=>{typeof document<"u"&&document.visibilityState==="hidden"||e.health().then(z=>{o({type:"health",health:z})},()=>{})};$();const I=window.setInterval($,K5);return window.addEventListener("focus",$),()=>{window.clearInterval(I),window.removeEventListener("focus",$)}},[e,r,y]);const x=B.useCallback(()=>{l.current?.controller.abort(),l.current=null},[]);B.useEffect(()=>x,[x]);const b=$=>{const I={token:++c.current,controller:new AbortController,stopRequested:!1,...$?{assistantId:$}:{}};return l.current=I,I},_=($,I)=>$.stopRequested?"stopped":$.controller.signal.aborted?"detached":I?"error":"done",C=$=>{l.current===$&&(l.current=null)},A=($,I,z)=>{C($),p(),z&&I&&I!==es&&g(I)},M=B.useCallback(async $=>{const I=s.current;if(I.turn||l.current||I.limit.blocked)return"busy";const z=I.thread&&I.thread.id!==es?I.thread.id:void 0,Y=b(),{token:F}=Y;o({type:"turnStart",token:F,request:$,at:Date.now()});let ne=z;const oe=_e=>{_e.metadata&&Y.assistantId===void 0&&(Y.assistantId=_e.metadata.assistantMessageId,ne=_e.metadata.threadId,o({type:"adopt",token:F,metadata:_e.metadata})),o({type:"snapshot",token:F,snapshot:_e,at:Date.now()})};let le,Me=!1;try{const{streamChatAnswer:_e}=await Promise.resolve().then(()=>Gk);await _e({transport:e.transport,request:$,...z?{threadId:z}:{},signal:Y.controller.signal,onSnapshot:oe})}catch(_e){Me=!0,le=_e}if(!(Y.assistantId!==void 0)&&(le instanceof cr||s3(le))){const _e=le instanceof cr?le:new cr(0,"network",null);return o({type:"turnRejected",token:F,error:{status:_e.status,code:_e.code,resetAt:_e.resetAt,reason:a3(_e)}}),C(Y),_e.status===429&&v(),"rejected"}const De=_(Y,Me);return o({type:"turnEnd",token:F,status:De,errorText:De==="error"?Tv(f.current,qc(le)):""}),A(Y,ne,De==="done"||De==="stopped"),"sent"},[e,v,p,g]),D=B.useCallback(async($,I)=>{if(l.current)return;const z=b(I),{token:Y}=z;o({type:"resumeStart",token:Y,messageId:I,at:Date.now()});let F,ne=!1;try{const{resumeChatAnswer:le}=await Promise.resolve().then(()=>Gk);await le(e.transport,I,z.controller.signal,Me=>{o({type:"snapshot",token:Y,snapshot:Me,at:Date.now()})})}catch(le){ne=!0,F=le}if(F instanceof cr){o({type:"turnEnd",token:Y,status:"detached",errorText:""}),A(z,$.id,!0);return}const oe=_(z,ne);o({type:"turnEnd",token:Y,status:oe,errorText:oe==="error"?Tv(f.current,qc(F)):""}),A(z,$.id,oe==="done"||oe==="stopped")},[e,p,g]),E=B.useCallback(()=>{const $=l.current;if(!$)return;if($.stopRequested=!0,o({type:"turnStopping",token:$.token}),$.assistantId===void 0){$.controller.abort();return}const I=window.setTimeout(()=>{$.controller.abort()},Z5);$.controller.signal.addEventListener("abort",()=>{window.clearTimeout(I)},{once:!0}),e.stop($.assistantId).catch(()=>{$.controller.abort()})},[e]),N=B.useCallback($=>{s.current.thread?.id!==$&&(x(),o({type:"newChat"}),o({type:"threadLoading",id:$}),e.thread($).then(I=>{o({type:"thread",thread:I});const{path:z}=Dv(I),Y=z[z.length-1];Y?.role==="assistant"&&Y.status==="streaming"&&D(I,Y.id)},I=>{o({type:"threadFailed",id:$,reason:qc(I)})}))},[e,x,D]),O=B.useCallback(()=>{x(),o({type:"newChat"})},[x]),L=B.useCallback(async $=>{try{await e.deleteThread($),s.current.thread?.id===$&&x(),o({type:"threadDeleted",id:$})}catch{o({type:"notice",notice:{kind:"text",key:"deleteError"}})}},[e,x]),R=B.useMemo(()=>Dv(a.thread),[a.thread]),j=B.useCallback($=>{const{thread:I}=s.current;if(!I||s.current.turn)return;const z=bw(Dv(I).index,$),Y=I.current_leaf_id;!z||z===Y||(o({type:"leaf",leafId:z}),e.setLeaf(I.id,z).catch(()=>{o({type:"leaf",leafId:Y}),o({type:"notice",notice:{kind:"text",key:"branch.error"}})}))},[e]),H=B.useCallback(($,I)=>{const z=s.current.thread?.messages.find(ne=>ne.id===$);if(!z)return;const Y=z.rating,F=I===Y?null:I;o({type:"rating",messageId:$,rating:F}),e.rate($,F).catch(()=>{o({type:"rating",messageId:$,rating:Y}),o({type:"notice",notice:{kind:"text",key:"ratingError"}})})},[e]),W=B.useCallback(async($,I,z)=>{const Y=s.current.thread?.messages.find(F=>F.id===$);try{return await e.feedback($,I,z),o({type:"rating",messageId:$,rating:Y?.rating??null,feedback:I,feedbackReason:z??""}),!0}catch{return!1}},[e]),K=B.useCallback($=>{o({type:"mode",mode:$});try{jw()?.setItem(Ow,$)}catch{}},[]),Q=B.useCallback(()=>{o({type:"notice",notice:null})},[]),re=B.useCallback(($,I)=>Sn(t,$,I),[t]),X=B.useMemo(()=>({state:a,lang:t,api:e,t:re,path:R.path,index:R.index,send:M,stop:E,openThread:N,newChat:O,deleteThread:L,refreshThreads:p,switchBranch:j,rate:H,saveFeedback:W,selectMode:K,reload:()=>{v(),p()},dismissNotice:Q}),[a,t,e,re,R,M,E,N,O,L,p,j,H,W,K,v,Q]);return k.jsx(zw.Provider,{value:X,children:i})},Fw=e=>B.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),u3=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),c3=(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]")},Bw=e=>Array.from(e.querySelectorAll(u3)).filter(t=>c3(t,e)),Fa=(e,t)=>{B.useLayoutEffect(()=>{e.current?.toggleAttribute("inert",t)},[e,t])},Hw=e=>{const t=e.getRootNode();return t instanceof ShadowRoot||t instanceof Document?t.activeElement:null},tf=(e,t,r)=>{const n=B.useRef(r);B.useEffect(()=>{n.current=r}),B.useEffect(()=>{const i=e.current;if(!t||!i)return;const a=Hw(i);(i.querySelector("[data-autofocus]")??Bw(i)[0])?.focus({preventScroll:!0});const s=l=>{if(l.key!=="Tab")return;const c=Bw(i),f=c[0],h=c[c.length-1];if(!f||!h){l.preventDefault();return}const v=Hw(i);l.shiftKey&&(v===f||!i.contains(v))?(l.preventDefault(),h.focus()):!l.shiftKey&&(v===h||!i.contains(v))&&(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])},f3=8,d3=9,pi=(e,t)=>e.find(r=>r.kind===t),Vw=e=>e.filter(t=>t.kind==="report").at(-1),h3=e=>e.filter(t=>t.kind==="export").flatMap(t=>t.files),p3=(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:""}},v3=500,g3=(e,t,r)=>{const n=t.trim();if(n.length<1||n.length>v3)return;const i=e[e.length-1];if(i?.role!=="assistant")return;const a=pi(i.blocks,"clarification");if(a?.allow_free_text&&lw(a,{isLastInBranch:!0,now:r})==="open")return{clarification_id:a.id,slot:a.slot,value:null,free_text:n}},m3=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)},y3=e=>typeof e=="number"&&Number.isFinite(e)?e:null,Mv=e=>typeof e=="string"?e:typeof e=="number"&&Number.isFinite(e)?String(e):"",Ml={messageId:null,sectionId:null,fullscreen:!1,view:"chat"},Ev=(e,t=null)=>({messageId:e,sectionId:t,fullscreen:!1,view:"dashboard"}),$w=B.createContext(null),Ba=()=>{},x3={state:Ml,open:Ba,toggle:Ba,autoOpen:Ba,close:Ba,setSection:Ba,setFullscreen:Ba,setView:Ba},Fi=()=>B.useContext($w)??x3,b3=1200;function w3(e){const{state:t,setFullscreen:r,close:n}=Fi(),i=B.useRef({fullscreen:t.fullscreen,setFullscreen:r,close:n});B.useEffect(()=>{i.current={fullscreen:t.fullscreen,setFullscreen:r,close:n}}),B.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 _3=(e,t,r)=>e&&!t&&!r;const k3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),S3=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Uw=e=>{const t=S3(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ww=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),C3=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var T3={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 A3=B.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>B.createElement("svg",{ref:l,...T3,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Ww("lucide",i),...!a&&!C3(s)&&{"aria-hidden":"true"},...s},[...o.map(([c,f])=>B.createElement(c,f)),...Array.isArray(a)?a:[a]]));const Ee=(e,t)=>{const r=B.forwardRef(({className:n,...i},a)=>B.createElement(A3,{ref:a,iconNode:t,className:Ww(`lucide-${k3(Uw(e))}`,`lucide-${e}`,n),...i}));return r.displayName=Uw(e),r};const Gw=Ee("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);const D3=Ee("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);const M3=Ee("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 Yw=Ee("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);const rf=Ee("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 E3=Ee("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 L3=Ee("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 Bi=Ee("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const ts=Ee("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Xw=Ee("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const nf=Ee("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Ha=Ee("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 qw=Ee("circle-minus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]]);const Lv=Ee("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const Iv=Ee("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 I3=Ee("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 Kw=Ee("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 Zw=Ee("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 P3=Ee("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 N3=Ee("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 R3=Ee("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 O3=Ee("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 Qw=Ee("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 z3=Ee("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 Va=Ee("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const Jw=Ee("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 j3=Ee("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 e_=Ee("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 F3=Ee("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 B3=Ee("message-circle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);const t_=Ee("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 r_=Ee("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 n_=Ee("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 H3=Ee("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 V3=Ee("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);const $3=Ee("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 i_=Ee("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 U3=Ee("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 W3=Ee("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 a_=Ee("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 o_=Ee("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 G3=Ee("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 El=Ee("search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const Y3=Ee("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 Pv=Ee("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 s_=Ee("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const X3=Ee("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 q3=Ee("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 K3=Ee("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 af=Ee("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 Z3=Ee("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 Q3=Ee("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 Ll=Ee("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function l_(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=l_(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function J3(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=l_(e))&&(n&&(n+=" "),n+=t);return n}const Nv="-",eO=e=>{const t=rO(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(Nv);return s[0]===""&&s.length!==1&&s.shift(),u_(s,t)||tO(o)},getConflictingClassGroupIds:(o,s)=>{const l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},u_=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?u_(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(Nv);return t.validators.find(({validator:o})=>o(a))?.classGroupId},c_=/^\[(.+)\]$/,tO=e=>{if(c_.test(e)){const t=c_.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},rO=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return iO(Object.entries(e.classGroups),r).forEach(([a,o])=>{Rv(o,n,a,t)}),n},Rv=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:f_(t,i);a.classGroupId=r;return}if(typeof i=="function"){if(nO(i)){Rv(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([a,o])=>{Rv(o,f_(t,a),r,n)})})},f_=(e,t)=>{let r=e;return t.split(Nv).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},nO=e=>e.isThemeGetter,iO=(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,aO=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)}}},d_="!",oO=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],a=t.length,o=s=>{const l=[];let c=0,f=0,h;for(let x=0;x<s.length;x++){let b=s[x];if(c===0){if(b===i&&(n||s.slice(x,x+a)===t)){l.push(s.slice(f,x)),f=x+a;continue}if(b==="/"){h=x;continue}}b==="["?c++:b==="]"&&c--}const v=l.length===0?s:s.substring(f),p=v.startsWith(d_),g=p?v.substring(1):v,y=h&&h>f?h-f:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:y}};return r?s=>r({className:s,parseClassName:o}):o},sO=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},lO=e=>({cache:aO(e.cacheSize),parseClassName:oO(e),...eO(e)}),uO=/\s+/,cO=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(uO);let s="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:f,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:p}=r(c);let g=!!p,y=n(g?v.substring(0,p):v);if(!y){if(!g){s=c+(s.length>0?" "+s:s);continue}if(y=n(v),!y){s=c+(s.length>0?" "+s:s);continue}g=!1}const x=sO(f).join(":"),b=h?x+d_:x,_=b+y;if(a.includes(_))continue;a.push(_);const C=i(y,g);for(let A=0;A<C.length;++A){const M=C[A];a.push(b+M)}s=c+(s.length>0?" "+s:s)}return s};function fO(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=h_(t))&&(n&&(n+=" "),n+=r);return n}const h_=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=h_(e[n]))&&(r&&(r+=" "),r+=t);return r};function dO(e,...t){let r,n,i,a=o;function o(l){const c=t.reduce((f,h)=>h(f),e());return r=lO(c),n=r.cache.get,i=r.cache.set,a=s,s(l)}function s(l){const c=n(l);if(c)return c;const f=cO(l,r);return i(l,f),f}return function(){return a(fO.apply(null,arguments))}}const gt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},p_=/^\[(?:([a-z-]+):)?(.+)\]$/i,hO=/^\d+\/\d+$/,pO=new Set(["px","full","screen"]),vO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gO=/\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$/,mO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vi=e=>rs(e)||pO.has(e)||hO.test(e),Hi=e=>ns(e,"length",AO),rs=e=>!!e&&!Number.isNaN(Number(e)),Ov=e=>ns(e,"number",rs),Il=e=>!!e&&Number.isInteger(Number(e)),bO=e=>e.endsWith("%")&&rs(e.slice(0,-1)),We=e=>p_.test(e),Vi=e=>vO.test(e),wO=new Set(["length","size","percentage"]),_O=e=>ns(e,wO,v_),kO=e=>ns(e,"position",v_),SO=new Set(["image","url"]),CO=e=>ns(e,SO,MO),TO=e=>ns(e,"",DO),Pl=()=>!0,ns=(e,t,r)=>{const n=p_.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},AO=e=>gO.test(e)&&!mO.test(e),v_=()=>!1,DO=e=>yO.test(e),MO=e=>xO.test(e),EO=dO(()=>{const e=gt("colors"),t=gt("spacing"),r=gt("blur"),n=gt("brightness"),i=gt("borderColor"),a=gt("borderRadius"),o=gt("borderSpacing"),s=gt("borderWidth"),l=gt("contrast"),c=gt("grayscale"),f=gt("hueRotate"),h=gt("invert"),v=gt("gap"),p=gt("gradientColorStops"),g=gt("gradientColorStopPositions"),y=gt("inset"),x=gt("margin"),b=gt("opacity"),_=gt("padding"),C=gt("saturate"),A=gt("scale"),M=gt("sepia"),D=gt("skew"),E=gt("space"),N=gt("translate"),O=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto",We,t],j=()=>[We,t],H=()=>["",vi,Hi],W=()=>["auto",rs,We],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Q=()=>["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"],X=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",We],I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[rs,We];return{cacheSize:500,separator:":",theme:{colors:[Pl],spacing:[vi,Hi],blur:["none","",Vi,We],brightness:z(),borderColor:[e],borderRadius:["none","","full",Vi,We],borderSpacing:j(),borderWidth:H(),contrast:z(),grayscale:$(),hueRotate:z(),invert:$(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[bO,Hi],inset:R(),margin:R(),opacity:z(),padding:j(),saturate:z(),scale:z(),sepia:$(),skew:z(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",We]}],container:["container"],columns:[{columns:[Vi]}],"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(),We]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],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",Il,We]}],basis:[{basis:R()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",We]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",Il,We]}],"grid-cols":[{"grid-cols":[Pl]}],"col-start-end":[{col:["auto",{span:["full",Il,We]},We]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[Pl]}],"row-start-end":[{row:["auto",{span:[Il,We]},We]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",We]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",We]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"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":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",We,t]}],"min-w":[{"min-w":[We,t,"min","max","fit"]}],"max-w":[{"max-w":[We,t,"none","full","min","max","fit","prose",{screen:[Vi]},Vi]}],h:[{h:[We,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[We,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[We,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[We,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Vi,Hi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ov]}],"font-family":[{font:[Pl]}],"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",We]}],"line-clamp":[{"line-clamp":["none",rs,Ov]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",vi,We]}],"list-image":[{"list-image":["none",We]}],"list-style-type":[{list:["none","disc","decimal",We]}],"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:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",vi,Hi]}],"underline-offset":[{"underline-offset":["auto",vi,We]}],"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",We]}],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",We]}],"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(),kO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_O]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},CO]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],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:[...Q(),"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:Q()}],"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:["",...Q()]}],"outline-offset":[{"outline-offset":[vi,We]}],"outline-w":[{outline:[vi,Hi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[vi,Hi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Vi,TO]}],"shadow-color":[{shadow:[Pl]}],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",Vi,We]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[h]}],saturate:[{saturate:[C]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"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",We]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",We]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",We]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Il,We]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"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",We]}],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",We]}],"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",We]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[vi,Hi,Ov]}],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)=>EO(J3(e));B.createContext(!0),B.createContext(!1);const zv="opacity-0 transition-opacity motion-reduce:transition-none group-focus-within:opacity-100 group-hover:opacity-100 [@media(hover:none)]:opacity-100",g_=120,LO=200,m_=".xls,.xlsx,.csv,.txt,.md",jv=2e3,IO=4,Nl=["wrong_number","wrong_indicator","wrong_territory","wrong_period","not_answered","language","slow","other"],PO=[1,2,3,4,5],$a=e=>{if(!e)return null;try{const{protocol:t}=new URL(e,window.location.href);return t==="http:"||t==="https:"?e:null}catch{return null}},Fv=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{return NO(e)}},NO=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()}},RO=(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)},OO=["group.pinned","group.today","group.yesterday","group.week","group.earlier"],y_=864e5,zO=(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-y_?o="group.yesterday":a>=r-7*y_?o="group.week":o="group.earlier",n.set(o,[...n.get(o)??[],i])}return OO.flatMap(i=>{const a=n.get(i);return a?[[i,a]]:[]})},jO=()=>{const{t:e}=me(),{state:t,setView:r}=Fi(),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"))]})},FO=({wide:e,chat:t,panel:r,onPanelFocusChange:n})=>{const{state:i}=Fi(),{view:a,fullscreen:o}=i,s=r!=null,l=s&&!e&&a==="dashboard",c=s&&!e&&a==="chat"&&!o,f=B.useRef(null);return Fa(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:c,onFocus:()=>{n?.(!0)},onBlur:h=>{h.currentTarget.contains(h.relatedTarget)||n?.(!1)},className:he("min-h-0 min-w-0 flex-col bg-background",c?"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 BO=Object.defineProperty,Bv=(e,t)=>BO(e,"name",{value:t,configurable:!0});function Hv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Bv(Hv,"setRef");function x_(...e){return t=>{let r=!1;const n=e.map(i=>{const a=Hv(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():Hv(e[i],null)}}}}Bv(x_,"composeRefs");function b_(...e){return B.useCallback(x_(...e),e)}Bv(b_,"useComposedRefs");var HO=Object.defineProperty,Fr=(e,t)=>HO(e,"name",{value:t,configurable:!0});function w_(e){const t=B.forwardRef((r,n)=>{let{children:i,...a}=r,o=null,s=!1;const l=[];i=A_(i),B.Children.forEach(i,v=>{if(C_(v)){s=!0;const p=v;let g="child"in p.props?p.props.child:p.props.children;for(;Vv(g)&&typeof of=="function";)g=of(g._payload);o=UO(p,g),l.push(o?.props?.children)}else l.push(v)}),o?o=B.cloneElement(o,void 0,l):!s&&B.Children.count(i)===1&&B.isValidElement(i)&&(o=i);const c=o?S_(o):void 0,f=b_(n,c);if(!o){if(i||i===0)throw new Error(s?YO(e):GO(e));return i}const h=k_(a,o.props??{});return o.type!==B.Fragment&&(h.ref=n?f:c),B.cloneElement(o,h)});return t.displayName=`${e}.Slot`,t}Fr(w_,"createSlot");var VO=w_("Slot"),__=Symbol.for("radix.slottable");function $O(e){const t=Fr(r=>"child"in r?r.children(r.child):r.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=__,t}Fr($O,"createSlottable");var UO=Fr((e,t)=>"child"in e.props?B.isValidElement(t)?B.cloneElement(t,void 0,e.props.children(t.props.children)):null:B.isValidElement(t)?t:null,"getSlottableElementFromSlottable");function k_(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]=D_(a,i))}return{...e,...r}}Fr(k_,"mergeProps");function S_(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)}Fr(S_,"getElementRef");function C_(e){return B.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===__}Fr(C_,"isSlottable");var WO=Symbol.for("react.lazy");function Vv(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===WO&&"_payload"in e&&T_(e._payload)}Fr(Vv,"isLazyComponent");function T_(e){return typeof e=="object"&&e!==null&&"then"in e}Fr(T_,"isPromiseLike");function A_(e){let t=e;for(;Vv(t)&&typeof of=="function";)t=of(t._payload);return t}Fr(A_,"useUnwrappedLazy");function D_(...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}Fr(D_,"concatAriaDescribedby");var GO=Fr(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),YO=Fr(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),of=sR[" use ".trim().toString()];function M_(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=M_(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function XO(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=M_(e))&&(n&&(n+=" "),n+=t);return n}const E_=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,L_=XO,I_=((e,t)=>r=>{var n;if(t?.variants==null)return L_(e,r?.class,r?.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(c=>{const f=r?.[c],h=a?.[c];if(f===null)return null;const v=E_(f)||E_(h);return i[c][v]}),s=r&&Object.entries(r).reduce((c,f)=>{let[h,v]=f;return v===void 0||(c[h]=v),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,f)=>{let{class:h,className:v,...p}=f;return Object.entries(p).every(g=>{let[y,x]=g;return Array.isArray(x)?x.includes({...a,...s}[y]):{...a,...s}[y]===x})?[...c,h,v]:c},[]);return L_(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}}),Re=B.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,loading:i=!1,isMenu:a=!1,type:o,...s},l)=>{const c=n?{}:{type:o??"button"};return k.jsx(n?VO:"button",i?{className:he(I_({variant:t,size:r,className:e,isMenu:a})),ref:l,...c,...s,disabled:!0,children:k.jsx(Va,{className:"size-4 animate-spin min-w-16"})}:{className:he(I_({variant:t,size:r,className:e,isMenu:a})),ref:l,...c,...s})});Re.displayName="Button";function $v(e,t,r){if(e===null)return kn(null,t);const n=kn(e,t,r);return e>0?`+${n}`:n}function P_(e){return[e.territory_code??e.territory_name,e.item].filter(Boolean).join("|")}function N_(e,t){return e.national?.period===t?e.national.value:null}function qO(e,t,r){const n=Sl(e);return Rl(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=>P_(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 KO(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=>[P_(i),i.item??""]));return t.map(i=>({...i,name:n.get(i.key)??i.name}))}function Rl(e,t){return KO(e,CR(e,t))}function R_(e,t,r){const n=N_(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 ZO=["12 76% 61%","173 58% 39%","197 37% 24%","43 74% 66%","27 87% 67%"],Uv=e=>e.clientWidth>0&&e.clientWidth<QO,QO=360;function Wv(e){const t=document.createElement("span");e.appendChild(t);const r=i=>(t.style.color=i,getComputedStyle(t).color),n={series:ZO.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:Uv(e)};return t.remove(),n}function JO({option:e,signature:t,label:r,height:n}){const i=B.useRef(null),a=B.useRef(null),o=B.useRef(e);return B.useEffect(()=>{o.current=e}),B.useEffect(()=>{const s=i.current;if(!s)return;let l=!0,c;return Promise.resolve().then(()=>NG).then(({init:f})=>{if(!l)return;a.current=f(s),a.current.setOption(o.current(Wv(s)));let h=Uv(s);c=new ResizeObserver(()=>{Uv(s)!==h&&(h=!h,a.current?.setOption(o.current(Wv(s)),!0)),a.current?.resize()}),c.observe(s)}).catch(()=>{}),()=>{l=!1,c?.disconnect(),a.current?.dispose(),a.current=null}},[]),B.useEffect(()=>{const s=i.current;s&&a.current&&a.current.setOption(o.current(Wv(s)),!0)},[t]),k.jsx("div",{ref:i,role:"img","aria-label":r,style:{height:n},className:"w-full min-w-0"})}const e4=[[/товариществ[оа] с ограниченной ответственностью/giu,"ТОО"],[/республиканско(е|го) государственно(е|го) учреждени[ея]/giu,"РГУ"],[/республиканско(е|го) государственно(е|го) предприяти[ея]/giu,"РГП"],[/государственно(е|го) учреждени[ея]/giu,"ГУ"],[/акционерно(е|го) обществ[оа]/giu,"АО"],[/индивидуальный предприниматель/giu,"ИП"]],t4=e=>e4.reduce((t,[r,n])=>t.replace(r,n),e).replace(/\s+/g," ").trim();function r4(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 n4=.3;function i4(e,t,r,n){const{lang:i,decimals:a}=n,o=M=>typeof M=="number"?t.signed?$v(M,i,a):kn(M,i,a):"—",s=new Intl.NumberFormat(i,{notation:"compact",maximumFractionDigits:1}),l={color:r.muted,formatter:M=>s.format(M)},c={lineStyle:{color:r.border}},f=M=>D=>{const E=t4(D);return E.length>M?`${E.slice(0,M-1)}…`:E},h={color:r.muted,formatter:f(r.narrow?12:22)},v={animationDuration:400,color:r.series,textStyle:{fontFamily:r.font,color:r.text},tooltip:{trigger:e==="pie"?"item":"axis",confine:!0,valueFormatter:o}},p=t.rows.map(M=>M.value).filter(M=>M!==null),g=!t.signed&&p.every(M=>M>0)&&!DR(p);if(e==="pie")return{...v,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(M=>M.value!==null).map(M=>({name:M.name,value:M.value}))}]};if(t.trend||e==="line"||e==="area")return{...v,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:c},series:t.series.map(M=>({type:e==="column"?"bar":"line",name:M.name,data:t.periods.map(D=>M.points.find(E=>E.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(M=>M.name),_=t.national??null,C={type:"value",scale:g,axisLabel:l,splitLine:c,...r.narrow?{splitNumber:2}:{}},A={type:"category",data:b,axisTick:{show:!1},axisLabel:y?h:{...h,formatter:f(14),rotate:30,interval:0}};return{...v,tooltip:{...v.tooltip,axisPointer:{type:"shadow"}},grid:{left:8,right:y?56:16,top:_===null?12:24,bottom:8,containLabel:!0},xAxis:y?C:A,yAxis:y?A:C,series:[{type:"bar",barMaxWidth:28,data:x.map(M=>({value:M.value,itemStyle:{color:M.value!==null&&M.value<0?r.negative:r.series[0],opacity:t.highlightKey!==void 0&&M.key!==t.highlightKey?n4:1,borderRadius:y?[0,4,4,0]:[4,4,0,0]}})),label:{show:y,position:"right",color:r.text,formatter:M=>o(M.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 a4=5,O_=({section:e,period:t,rows:r,national:n=null,signed:i=!1,highlightKey:a,compact:o=!1,label:s})=>{const{lang:l,t:c}=me(),f={rows:r,series:qO(e,t,a4),periods:Sl(e),trend:e.shape==="trend",national:n,signed:i,highlightKey:a},h=r4(f),[v,p]=B.useState(h[0]),g=h.includes(v)?v:h[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:[h.length>1?k.jsx("div",{role:"group","aria-label":c("chart.kinds"),className:"inline-flex flex-wrap gap-0.5 self-start rounded-md border bg-background p-0.5",children:h.map(b=>k.jsx("button",{type:"button","aria-pressed":b===g,onClick:()=>{p(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:c(`chart.kind.${b}`)},b))}):null,k.jsx(JO,{label:s,height:x,signature:JSON.stringify([g,l,f]),option:b=>i4(g,f,b,{lang:l,decimals:e.decimals,nationalLabel:_=>c("chart.national",{value:_})})})]})},z_=(e,t)=>{const{api:r,lang:n}=me(),a=B.useSyncExternalStore(Dl.subscribe,()=>Dl.view(e))??(t?kv(t):Iw);B.useEffect(()=>{t&&Dl.adopt(e,t,r)},[e,t,r]);const o=B.useCallback(()=>{Dl.start(e,r,n)},[e,r,n]),s=B.useCallback(()=>{Dl.expire(e)},[e]);return{view:a,start:o,expire:s}},j_=({messageId:e,block:t,disabled:r=!1,className:n})=>{const{t:i}=me(),{view:a,start:o}=z_(e,t);return a.phase!=="idle"?null:k.jsxs(Re,{part:"report",variant:"input",size:"sm",className:he("gap-1.5 text-[13px]",n),disabled:r,onClick:o,children:[k.jsx(N3,{"aria-hidden":"true"}),i("report.create")]})},F_={pdf:"pdf",doc:"doc",docx:"doc",ppt:"ppt",pptx:"ppt",xls:"xls",xlsx:"xls",csv:"csv"},Gv=e=>{const t=e.lastIndexOf(".");return t<0?"":e.slice(t+1).toLowerCase()},B_=e=>Object.hasOwn(F_,e)?F_[e]??"other":"other",o4={pdf:"bg-file-pdf",doc:"bg-file-doc",ppt:"bg-file-ppt",xls:"bg-file-xls",csv:"bg-file-csv",other:"bg-file-other"},Yv=({ext:e,className:t})=>k.jsx("span",{part:"file-type","data-kind":B_(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",o4[B_(e)],t),children:e?e.slice(0,4).toUpperCase():"FILE"}),H_=["byte","kilobyte","megabyte","gigabyte"];function Xv(e,t){let r=e,n=0;for(;r>=1024&&n<H_.length-1;)r/=1024,n+=1;return new Intl.NumberFormat(t,{style:"unit",unit:H_[n]??"byte",unitDisplay:"short",maximumFractionDigits:n===0?0:1}).format(r)}const s4=/^\/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,V_=e=>{const t=s4.exec(e);return t?.[1]?`${gv}/${t[1]}`:null},l4=1e3,u4=async(e,t,r,n)=>{const i=V_(t);if(!i)return"unavailable";let a;try{a=await(await e.request(i.slice(gv.length))).blob()}catch(l){return l instanceof cr&&l.status===410?"expired":l instanceof cr&&l.status===404?"notFound":"unavailable"}const o=URL.createObjectURL(a),s=document.createElement("a");s.href=o,s.download=r,s.hidden=!0,n.appendChild(s);try{s.click()}finally{s.remove(),window.setTimeout(()=>{URL.revokeObjectURL(o)},l4)}return"ok"},c4=["pdf","docx","pptx","xlsx","csv"],f4=e=>{const t=e.getRootNode();return t instanceof ShadowRoot?t:e.parentElement??e},$_=({files:e,onExpired:t,className:r})=>{const{api:n,lang:i,t:a}=me(),[o,s]=B.useState(null),[l,c]=B.useState({}),f=B.useRef(l);B.useEffect(()=>{f.current=l});const h=e.filter(p=>c4.includes(p.format)&&V_(p.download_url)!==null);if(h.length===0)return null;const v=(p,g)=>{o===null&&(s(p.download_url),c(y=>Object.fromEntries(Object.entries(y).filter(([x])=>x!==p.download_url))),u4(n,p.download_url,p.filename,f4(g.currentTarget)).then(y=>{if(s(null),y==="ok")return;const x={...f.current,[p.download_url]:y};c(x),h.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:h.map(p=>{const g=o===p.download_url,y=l[p.download_url];return k.jsxs("li",{"data-state":l[p.download_url]??void 0,className:he("flex min-w-0 items-center gap-3 rounded-xl border bg-card p-2",l[p.download_url]&&"border-error/35 bg-error-background"),children:[k.jsx(Yv,{ext:p.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:p.filename,children:a(`files.${hw(p.format)}`)}),k.jsxs("span",{className:"text-2xs leading-tight text-muted-foreground",children:[p.format.toUpperCase(),p.size_bytes>0?` · ${Xv(p.size_bytes,i)}`:null]})]}),y?k.jsxs("span",{role:"alert",className:"flex shrink-0 items-center gap-1.5 text-[13px]",children:[k.jsx(Ha,{className:"text-destructive","aria-hidden":"true"}),a(`files.${y}`)]}):k.jsxs(Re,{variant:"ghost",size:"sm",className:"gap-1.5",title:p.filename,"aria-busy":g,disabled:o!==null,"aria-label":`${a("download")}: ${a(`files.${hw(p.format)}`)}`,onClick:x=>{v(p,x)},children:[g?k.jsx(Va,{className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}):k.jsx(Kw,{"aria-hidden":"true"}),a("download")]})]},`${p.format}-${p.download_url}`)})})]})},qv="flex items-center gap-2.5 rounded-xl border px-3 py-2.5 text-sm",U_=({messageId:e,block:t,className:r})=>{const{t:n}=me(),{view:i,start:a,expire:o}=z_(e,t);switch(i.phase){case"idle":return null;case"pending":return k.jsxs("div",{part:"report",role:"status","data-state":"pending",className:he(qv,"border-processing/25 bg-processing-background",r),children:[k.jsx(Va,{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($_,{files:i.files,onExpired:o,className:r});case"expired":return k.jsxs("div",{part:"report",role:"status","data-state":"expired",className:he(qv,"bg-card",r),children:[k.jsx(Lv,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 flex-1",children:n("report.expired")}),k.jsx(Re,{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(qv,"border-error/30 bg-error-background",r),children:[k.jsx(Ha,{className:"shrink-0 text-destructive","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 flex-1",children:n("report.failed")}),k.jsx(Re,{variant:"input",size:"sm",className:"gap-1.5 text-[13px]",onClick:a,children:n("report.retry")})]})}},d4=4;function sf(e,t,r){const n=AR(e,t);return n==="п.п."?r("dashboard.points"):n}function W_(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 is(e){const t=new Set;return e.filter(r=>!t.has(r.label)&&t.add(r.label)).slice(0,d4)}function h4(e,{period:t,region:r,lang:n,t:i}){if(r===void 0&&t===e.latest_period&&e.kpis.length>0)return is(e.kpis.map(g=>({label:g.label,value:g.value,sub:g.sub??null})));const a=g=>`${kn(g,n,e.decimals)} ${e.unit.label}`,o=(g,y)=>g===null?kn(null,n):`${$v(g,n,e.decimals)} ${y}`,s=Rl(e,{period:t,mode:"value",base:"median"}).filter(g=>g.value!==null),l=s.map(g=>g.value??0),c=s[0],f=s[s.length-1];if(c===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=W_(l);return is([{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,sf(e,"deviation",i))},{label:i("dashboard.kpi.previous"),value:o(y.delta,sf(e,"change",i))}])}if(e.shape==="trend"){const g=Sl(e).filter(A=>A<=t),y=A=>e.data.find(M=>M.period===A&&M.value!==null)?.value??null,x=g[0],b=y(t),_=x===void 0?null:y(x);let C=null;return b!==null&&_!==null&&x!==t&&(C=e.value_kind==="level"?_>0?(b/_-1)*100:null:b-_),is([{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(C,sf(e,"change",i))}]:[]])}if(e.shape==="breakdown")return is([...s.slice(0,3).map(g=>({label:g.name,value:a(g.value),sub:g.share===null?t:`${kn(g.share,n,1)} %`})),...s.length>1?[{label:i("dashboard.kpi.gap"),value:a((c.value??0)-(f.value??0)),sub:`${c.name} − ${f.name}`}]:[]]);const h=N_(e,t),v=W_(l),p=[{label:i("dashboard.kpi.max"),value:a(c.value),sub:c.name},{label:i("dashboard.kpi.min"),value:a(f.value),sub:f.name},{label:i("dashboard.kpi.median"),value:a(v),sub:t}];return is(h!==null?[{label:i("dashboard.kpi.national"),value:a(h),sub:t},...p]:[...p,{label:i("dashboard.kpi.spread"),value:a((c.value??0)-(f.value??0)),sub:`${c.name} − ${f.name}`}])}const p4=({kpis:e})=>{const{t}=me();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 G_({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 Ol="whitespace-nowrap px-3 py-[7px] text-[13px] font-semibold text-foreground",as="whitespace-nowrap text-right tabular-nums",v4=({section:e,rows:t,mode:r,lang:n,highlightKey:i})=>{const{t:a}=me(),o=e.value_kind==="level",s=r==="value"?null:a(r==="change"?"dashboard.table.change":"dashboard.table.deviation",{unit:sf(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(Ol,"w-10 text-right"),children:a("dashboard.table.rank")}),k.jsx("th",{scope:"col",className:he(Ol,"text-left"),children:a("dashboard.table.position")}),k.jsx("th",{scope:"col",className:he(Ol,as),children:a("dashboard.table.value",{unit:e.unit.label})}),s!==null?k.jsx("th",{scope:"col",className:he(Ol,as),children:s}):null,o?k.jsx("th",{scope:"col",className:he(Ol,as),children:a("dashboard.table.share")}):null]})}),k.jsx("tbody",{children:t.map((l,c)=>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:c+1}),k.jsx("td",{className:"px-3",children:l.name}),k.jsx("td",{className:he("px-3",as),children:kn(l.value,n,e.decimals)}),s!==null?k.jsx("td",{className:he("px-3",as),children:$v(l.display,n,e.decimals)}):null,o?k.jsx("td",{className:he("px-3",as),children:kn(l.share,n,1)}):null]},l.key))})]})})},Kv="__all__",Zv="size-8 text-muted-foreground hover:text-foreground",g4=({message:e})=>{const{t}=me(),{state:r,setSection:n}=Fi(),i=pi(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(m4,{section:a,message:e,tabs:o},a.id)})},Y_=({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(ts,{className:"pointer-events-none absolute right-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"})]})]}),X_=({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]}),m4=({section:e,message:t,tabs:r})=>{const{lang:n,t:i}=me(),{state:a,setFullscreen:o,close:s}=Fi(),{fullscreen:l}=a,c=Sl(e),[f,h]=B.useState(()=>c.includes(e.latest_period)?e.latest_period:c.at(-1)??e.latest_period),[v,p]=B.useState(),[g,y]=B.useState("value"),[x,b]=B.useState("median"),_=TR(e,f),C=e.shape==="trend",A=C||g==="change"&&!_.change||g==="deviation"&&!_.deviation?"value":g,M=x==="national"&&_.national?"national":"median",D=Rl(e,{period:f,mode:A,base:M}),E=A==="value"?D:Rl(e,{period:f,mode:"value",base:M}),N=[...E].sort((z,Y)=>z.name.localeCompare(Y.name,n)),O=v!==void 0&&N.some(z=>z.key===v)?v:void 0,L=h4(e,{period:f,region:O,lang:n,t:i}),R=f===e.latest_period&&O===void 0?e.findings:[],j=e.shape==="regional",H=E.filter(z=>z.value!==null).length,W=[f,e.unit.label,i(j?"dashboard.regions":"dashboard.items",{n:H})].join(" · "),K=$a(e.source_url),Q=e.methodology?.editions,re=Q?.[n]??Q?.ru,X=$a(re?.url),$=`${i(C?"dashboard.trend":"dashboard.ranking")}: ${e.title}, ${f}`,I=Vw(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")}),X!==null?k.jsx(Re,{variant:"ghost",size:"icon",className:Zv,asChild:!0,children:k.jsx("a",{href:X,target:"_blank",rel:"noopener noreferrer","aria-label":i("dashboard.methodology"),title:re?.title??i("dashboard.methodology"),children:k.jsx(rf,{"aria-hidden":"true"})})}):null,K!==null?k.jsx(Re,{variant:"ghost",size:"icon",className:Zv,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(Zw,{"aria-hidden":"true"})})}):null,k.jsxs(Re,{variant:"ghost",size:"sm",className:"gap-1.5 text-muted-foreground hover:text-foreground","aria-pressed":l,onClick:()=>{o(!l)},children:[l?k.jsx(n_,{"aria-hidden":"true"}):k.jsx(e_,{"aria-hidden":"true"}),i(l?"dashboard.collapse":"dashboard.fullscreen")]}),k.jsx(Re,{variant:"ghost",size:"icon",className:Zv,"aria-label":i("dashboard.close"),title:i("dashboard.close"),onClick:s,children:k.jsx(Ll,{"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:W})]}),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&&N.length>1?k.jsxs(Y_,{label:i("dashboard.region"),value:O??Kv,onChange:z=>{p(z===Kv?void 0:z)},className:"min-w-40 max-w-60",children:[k.jsx("option",{value:Kv,children:i("dashboard.allRegions")}),N.map(z=>k.jsx("option",{value:z.key,children:z.name},z.key))]}):null,c.length>1?k.jsx(Y_,{label:i("dashboard.period"),value:f,onChange:h,className:"min-w-24",children:[...c].reverse().map(z=>k.jsx("option",{value:z,children:z},z))}):null,C?null:k.jsx(X_,{label:i("dashboard.mode.label"),children:k.jsx(G_,{label:i("dashboard.mode.label"),value:A,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")}]})}),A==="deviation"?k.jsx(X_,{label:i("dashboard.base.label"),children:k.jsx(G_,{label:i("dashboard.base.label"),value:M,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(p4,{kpis:L}),k.jsx(Qv,{title:i(C?"dashboard.trend":"dashboard.ranking"),card:!0,children:k.jsx(O_,{section:e,period:f,label:$,rows:D.map(z=>({key:z.key,name:z.name,value:z.display})),national:A==="value"?R_(e,f,D.map(z=>z.value)):null,signed:A!=="value",highlightKey:O})}),R.length>0?k.jsx(Qv,{title:i("dashboard.findings"),children:k.jsx("ul",{className:"flex list-disc flex-col gap-1 pl-5 text-sm",children:R.map((z,Y)=>k.jsx("li",{children:z},Y))})}):null,k.jsx(Qv,{title:i("dashboard.data"),children:k.jsx(v4,{section:e,rows:D,mode:A,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(j_,{messageId:t.id,block:I})}),k.jsx(U_,{messageId:t.id,block:I})]})]})]})},Qv=({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]}),y4=({threadId:e,children:t})=>{const[r,n]=B.useState(Ml),[i,a]=B.useState(e);i!==e&&(a(e),i!==void 0&&n(Ml));const o=B.useRef(new Set),s=B.useCallback((y,x)=>{n(Ev(y,x??null))},[]),l=B.useCallback(y=>{n(x=>x.messageId===y?Ml:Ev(y))},[]),c=B.useCallback(y=>{o.current.has(y)||(o.current.add(y),n(Ev(y)))},[]),f=B.useCallback(()=>{n(Ml)},[]),h=B.useCallback(y=>{n(x=>({...x,sectionId:y}))},[]),v=B.useCallback(y=>{n(x=>({...x,fullscreen:y}))},[]),p=B.useCallback(y=>{n(x=>({...x,view:y}))},[]),g=B.useMemo(()=>({state:r,open:s,toggle:l,autoOpen:c,close:f,setSection:h,setFullscreen:v,setView:p}),[r,s,l,c,f,h,v,p]);return k.jsx($w.Provider,{value:g,children:t})};function x4(e,t,r){const{autoOpen:n}=Fi(),[i,a]=B.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=>!Xc(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(c=>c.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"&&Xc(o.id)&&pi(o.blocks,"dashboard")?.auto_open===!0;B.useEffect(()=>{l&&s!=null&&n(s)},[l,s,n])}const q_="aid_intro_ack",b4=()=>{try{return window.localStorage.getItem(q_)!==null}catch{return!1}},w4=({active:e=!0})=>{const{state:t,lang:r,t:n}=me(),i=Tl(t.config?.intro_notice??void 0,r).trim(),[a,o]=B.useState(b4),s=e&&i!==""&&!a,l=B.useId(),c=i.split(`
|
|
17
|
+
`).filter(v=>v.trim()!==""),f=B.useRef(null);Fa(f,!s),tf(f,s,()=>{const v=f.current?.getRootNode();return v instanceof ShadowRoot||v instanceof Document?v.querySelector('[part="input"]'):null});const h=B.useCallback(()=>{o(!0);try{window.localStorage.setItem(q_,"1")}catch{}},[]);return B.useEffect(()=>{if(!s)return;const v=p=>{p.key==="Escape"&&(p.preventDefault(),h())};return window.addEventListener("keydown",v,!0),()=>{window.removeEventListener("keydown",v,!0)}},[s,h]),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:c.map((v,p)=>k.jsx("p",{className:"text-[13px] leading-[1.55]",children:v},`${p}-${v}`))}),k.jsx("footer",{className:"flex shrink-0 justify-end px-[18px] pb-[18px] pt-3.5",children:k.jsx(Re,{"data-autofocus":!0,size:"md",onClick:h,children:n("intro.continue")})})]})]})},zl=e=>e?!e.available||e.status==="down"||e.status==="overloaded"?"unavailable":e.status==="idle"?"idle":e.status==="busy"||e.status==="degraded"?"busy":"unknown":"unknown",_4={idle:"text-mode-idle",busy:"text-mode-busy",unavailable:"text-mode-down",unknown:"text-muted-foreground"},k4={idle:"health.idle",busy:"health.busy",unavailable:"health.unavailable"},K_=e=>k4[e],S4={bot:E3,"book-open":rf,database:I3,"file-text":R3,globe:O3,lock:Jw,"message-circle":B3,"message-square":r_,search:El,sparkles:Pv},Jv=({name:e,className:t})=>{const r=S4[e]??Pv;return k.jsx(r,{className:he("size-4 shrink-0",t),"aria-hidden":"true"})},eg=({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",_4[e]),children:[k.jsx("span",{"aria-hidden":"true",className:"size-2 shrink-0 rounded-full bg-current"}),Sn(t,K_(e))]}),Z_="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",Q_=(e,t)=>Tl(e.title,t)||e.slug,J_=({modes:e,health:t,value:r,onChange:n,lang:i,label:a,variant:o="field",placement:s="top"})=>{const l=o==="pill",[c,f]=B.useState(!1),h=Math.max(0,e.findIndex(L=>L.slug===r)),[v,p]=B.useState(h),g=B.useId(),y=B.useRef(null),x=B.useRef(null),b=e[h],_=zl(b?t[b.slug]:void 0),C=B.useRef(null);B.useEffect(()=>{c&&x.current?.focus()},[c]),B.useEffect(()=>{if(!c)return;const L=j=>{j.key==="Escape"&&(j.preventDefault(),j.stopPropagation(),f(!1),y.current?.focus())},R=j=>{C.current&&!j.composedPath().includes(C.current)&&f(!1)};return window.addEventListener("keydown",L,!0),window.addEventListener("pointerdown",R,!0),()=>{window.removeEventListener("keydown",L,!0),window.removeEventListener("pointerdown",R,!0)}},[c]);const A=L=>{f(!1),L&&y.current?.focus()},M=()=>{p(h),f(!0)},D=L=>{const R=e[L];R&&n(R.slug),A(!0)},E=L=>{switch(L.key){case"ArrowDown":L.preventDefault(),p(R=>Math.min(e.length-1,R+1));break;case"ArrowUp":L.preventDefault(),p(R=>Math.max(0,R-1));break;case"Home":L.preventDefault(),p(0);break;case"End":L.preventDefault(),p(e.length-1);break;case"Enter":case" ":L.preventDefault(),D(v);break;case"Tab":A(!1);break}},N=b?Q_(b,i):"",O=_==="unknown"?"":Sn(i,K_(_));return k.jsxs("div",{ref:C,className:he(l?"min-w-0":"flex flex-col gap-1.5"),onBlur:L=>{c&&L.relatedTarget instanceof Node&&!L.currentTarget.contains(L.relatedTarget)&&f(!1)},children:[k.jsxs("button",{ref:y,part:l?"mode-select":void 0,type:"button","aria-haspopup":"listbox","aria-expanded":c,"aria-controls":c?`${g}-list`:void 0,"aria-label":`${a}: ${N}${l&&O?`, ${O}`:""}`,onClick:()=>{c?A(!1):M()},onKeyDown:L=>{L.key==="ArrowDown"&&!c&&(L.preventDefault(),M())},className:he(l?he(Z_,"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",c&&"border-primary shadow-[0_0_0_3px_var(--aid-c-secondary)]"),children:[l&&b?k.jsx(Jv,{name:b.icon}):null,k.jsx("span",{className:he("truncate",l&&"min-w-0"),children:N}),l?k.jsx(eg,{level:_,lang:i}):null,k.jsx(ts,{className:he("size-3.5 shrink-0 text-muted-foreground transition-transform motion-reduce:transition-none",(l?s==="top"!==c:c)&&"rotate-180"),"aria-hidden":"true"})]}),c?k.jsxs("ul",{ref:x,id:`${g}-list`,part:l?"mode-list":void 0,role:"listbox",tabIndex:-1,"aria-label":a,"aria-activedescendant":`${g}-${v}`,onKeyDown:E,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((L,R)=>{const j=zl(t[L.slug]),H=Tl(L.description,i);return k.jsxs("li",{id:`${g}-${R}`,part:l?"mode-option":void 0,role:"option","aria-selected":R===h,onMouseDown:W=>{W.preventDefault()},onMouseEnter:()=>{p(R)},onClick:()=>{D(R)},className:he("flex cursor-pointer items-start gap-2.5 rounded-lg px-2.5 py-2",R===v&&"bg-accent",R===h&&"bg-secondary"),children:[k.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-lg bg-muted",children:k.jsx(Jv,{name:L.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:Q_(L,i)}),H?k.jsx("span",{className:"line-clamp-2 text-2xs leading-[1.35] text-muted-foreground",children:H}):null,k.jsx(eg,{level:j,lang:i})]}),k.jsx(Bi,{className:he("mt-1 size-4 shrink-0 text-primary",R!==h&&"invisible"),"aria-hidden":"true"})]},L.slug)})]}):null]})},tg=(e,t)=>e===(t>=0?t:0)?0:-1,C4={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"start",End:"end"},rg=(e,t=!1)=>{const r=C4[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()},T4=({label:e,className:t,children:r})=>k.jsx("div",{role:"radiogroup","aria-label":e,className:t,onKeyDown:n=>{rg(n,!0)},children:r}),A4=()=>typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgent),D4=["search","newChat","sidebar","close"],M4=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"]}},E4={kk:"Қазақша",ru:"Русский",en:"English"},lf=({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]}),ek=({value:e,options:t,onChange:r,label:n})=>{const i=t.findIndex(a=>a.value===e);return k.jsx(T4,{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:tg(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)})})},L4=({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}),I4=({open:e,onClose:t})=>{const{state:r,lang:n,t:i,selectMode:a}=me(),o=wv(),s=B.useRef(null);Fa(s,!e),tf(s,e),B.useEffect(()=>{if(!e)return;const v=p=>{p.key==="Escape"&&(s.current?.querySelector('[aria-haspopup="listbox"][aria-expanded="true"]')||(p.preventDefault(),t()))};return window.addEventListener("keydown",v,!0),()=>{window.removeEventListener("keydown",v,!0)}},[e,t]);const l=r.config?.modes??[],c=[{value:"light",label:i("settings.themeLight")},{value:"dark",label:i("settings.themeDark")},{value:"auto",label:i("settings.themeAuto")}],f=M4(A4()),h={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(Re,{"data-autofocus":!0,variant:"ghost",size:"icon","aria-label":i("close"),onClick:t,children:k.jsx(Ll,{"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(lf,{title:i("settings.language"),children:k.jsx(ek,{label:i("settings.language"),value:n,options:xv.map(v=>({value:v,label:E4[v],lang:v})),onChange:v=>{o.update({lang:v})}})}),k.jsx(lf,{title:i("settings.theme"),children:k.jsx(ek,{label:i("settings.theme"),value:o.scheme,options:c,onChange:v=>{o.update({scheme:v})}})}),l.length>0?k.jsx(lf,{title:i("settings.model"),hint:i("settings.modelHint"),children:k.jsx(J_,{modes:l,health:r.health,value:r.mode,onChange:a,lang:n,label:i("settings.model")})}):null,k.jsx(lf,{title:i("settings.shortcuts"),children:k.jsx("div",{className:"flex flex-col",children:D4.map(v=>k.jsxs("div",{className:"flex items-center justify-between py-1 text-xs",children:[k.jsx("span",{children:h[v]}),k.jsx("span",{className:"flex gap-[3px]",children:f[v].map(p=>k.jsx(L4,{children:p},p))})]},v))})})]})]})]})},P4={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"},uf=({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",P4[e]),children:[k.jsx("span",{className:"flex shrink-0",children:t}),k.jsx("span",{className:"min-w-0 flex-1",children:r})]}),tk=({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(Ha,{className:"shrink-0 text-destructive","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 flex-1",children:e}),k.jsx(Re,{variant:"ghost",size:"xs",onClick:t,children:r})]}),N4=e=>new Intl.DateTimeFormat(e,{hour:"2-digit",minute:"2-digit"}),R4=()=>{const{state:e,lang:t,t:r}=me(),{remaining:n,daily:i,blocked:a,resetAt:o,overloaded:s}=e.limit;if(s&&e.config)return k.jsx(uf,{tone:"overloaded",part:"limit-banner",state:"overloaded",icon:k.jsx(af,{"aria-hidden":"true"}),children:r("overloaded")});if(a){const l=o?new Date(o):null,c=l&&!Number.isNaN(l.getTime())?r("limit.until",{time:N4(t).format(l)}):r("limit.exhausted");return k.jsx(uf,{tone:"blocked",part:"limit-banner",state:"blocked",icon:k.jsx(Lv,{"aria-hidden":"true"}),children:c})}return n===null||i===null||n>3?null:k.jsx(uf,{tone:"muted",part:"limit-banner",state:"low",icon:k.jsx(Qw,{"aria-hidden":"true"}),children:r("limit.remaining",{count:n,limit:i})})},O4=()=>{const{state:e,lang:t,t:r,dismissNotice:n}=me(),{notice:i}=e;if(!i)return null;const a=i.kind==="error"?Tv(t,i.reason):r(i.key);return k.jsx(tk,{part:"notice",onDismiss:n,dismissLabel:r("dismiss"),children:a})},ng=({value:e,onChange:t,onSubmit:r,maxHeight:n=LO,className:i,onKeyDown:a,...o})=>{const s=B.useRef(null),l=B.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]);B.useLayoutEffect(l,[e,l]),B.useEffect(()=>{const f=s.current;if(!f||typeof ResizeObserver>"u")return;let h=f.clientWidth;const v=new ResizeObserver(()=>{f.clientWidth!==h&&(h=f.clientWidth,l())});return v.observe(f),()=>{v.disconnect()}},[l]);const c=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:c,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})},z4=({file:e,onRemove:t})=>{const{lang:r,t:n}=me();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(Yv,{ext:Gv(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:Xv(e.size,r)})]}),k.jsx(Re,{variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":n("removeFile"),onClick:t,children:k.jsx(Ll,{"aria-hidden":"true"})})]})},j4=({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})]}),F4=({message:e,onDismiss:t})=>{const{t:r}=me();return e===null?null:k.jsx(tk,{part:"notice",dismissLabel:r("dismiss"),onDismiss:t,children:e})},B4=.9,H4=(e,t)=>e>t?"over":e===t?"limit":e>=t*B4?"near":"hidden",rk=({count:e,max:t,id:r,part:n,className:i})=>{const{t:a}=me(),o=H4(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"):""})]})},V4=()=>{const{state:e,t}=me(),{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&&zl(e.health[n.slug])==="unavailable"?t("modeUnavailable"):null;return i===null?null:k.jsx(uf,{tone:"hint",part:"composer-hint",icon:k.jsx(af,{"aria-hidden":"true"}),children:i})},$4=()=>me().t("placeholder"),U4=({placement:e="top"})=>{const{state:t,lang:r,t:n,selectMode:i}=me(),a=t.config?.modes??[],o=a.find(s=>s.slug===t.mode);if(!o)return null;if(a.length<2){const s=zl(t.health[o.slug]),l=Tl(o.title,r)||o.slug,c=s==="unknown"?"":n(`health.${s}`),f=`${n("modeLabel")}: ${l}${c?`, ${c}`:""}`;return k.jsxs("div",{part:"mode-select",role:"group","aria-label":f,className:Z_,children:[k.jsx(Jv,{name:o.icon}),k.jsx("span",{className:"min-w-0 truncate",children:l}),k.jsx(eg,{level:s,lang:r})]})}return k.jsx(J_,{variant:"pill",placement:e,modes:a,health:t.health,value:t.mode,onChange:i,lang:r,label:n("modeLabel")})},nk="{name}",W4=(e,t)=>{const[r="",n=""]=e.split(nk);return k.jsxs(k.Fragment,{children:[r,t,n]})},ik=B.forwardRef(({onDraftChange:e},t)=>{const{state:r,lang:n,path:i,t:a,send:o,stop:s}=me(),l=$4(),[c,f]=B.useState(""),h=B.useRef(null),v=B.useId(),p=B.useRef(!1),g=B.useId();B.useImperativeHandle(t,()=>({setText:ne=>{f(ne),setTimeout(()=>h.current?.querySelector("textarea")?.focus(),0)}}));const y=c.trim()!=="";B.useEffect(()=>{e?.(y)},[y,e]);const[x,b]=B.useState(null),[_,C]=B.useState(null),A=B.useRef(null),{config:M,turn:D,limit:E}=r,N=M?.modes.find(ne=>ne.slug===r.mode),O=M?.max_query_chars??Sw,L=N?zl(r.health[N.slug])==="unavailable":!1,R=!!(M?.site.allow_files&&N?.allow_files),j=D!==null,H=D?.stopping===!0,W=!M||E.blocked||r.loadingThread!==null,K=c.trim(),Q=c.length>O,re=!W&&!j&&!L&&!!N&&K.length>0&&!Q;B.useEffect(()=>{if(j)return;const ne=h.current?.getRootNode(),oe=ne instanceof ShadowRoot||ne instanceof Document?ne.activeElement:null,le=oe===null||oe===document.body;(p.current||le)&&h.current?.querySelector("textarea")?.focus({preventScroll:!0}),p.current=!1},[j]);const X=()=>{if(!re||!N)return;const ne=K,oe=x,le=g3(i,ne,new Date);f(""),b(null),o({query:ne,mode:N.slug,...oe?{file:oe}:{},...le?{clarification:le}:{}}).then(Me=>{Me==="rejected"&&(f(we=>we||ne),b(we=>we??oe))})},$=ne=>{if(C(null),!(!ne||!N)){if(!m_.split(",").includes(`.${Gv(ne.name)}`)){C(a("fileType",{name:ne.name}));return}if(ne.size>N.max_file_mb*1024*1024){C(a("fileTooLarge",{name:ne.name,size:N.max_file_mb}));return}b(ne)}},I=M?.answer_source,z=I?.[n]??I?.ru??Object.values(I??{})[0],Y=$a(z?.url),F=Y?k.jsxs("a",{href:Y,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-primary-text hover:underline",children:[z?.name,k.jsx(Zw,{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(V4,{}),k.jsx(F4,{message:_,onDismiss:()=>{C(null)}}),k.jsxs("div",{ref:h,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",Q&&"border-destructive focus-within:border-destructive",W&&"bg-muted"),children:[x?k.jsx(z4,{file:x,onRemove:()=>{b(null)}}):null,k.jsx(ng,{part:"input","data-autofocus":!0,value:c,onChange:f,onSubmit:X,disabled:W,placeholder:l,"aria-label":a("inputLabel"),"aria-invalid":Q||void 0,"aria-describedby":v,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(U4,{placement:"top"}),R?k.jsxs(k.Fragment,{children:[k.jsx(j4,{id:g,text:x?a("attachOne"):a("attachHint",{size:N?.max_file_mb??0}),children:k.jsx(Re,{part:"attach",variant:"ghost",size:"icon",className:"size-8 rounded-full text-muted-foreground","aria-label":a(x?"attachOne":"attach"),"aria-describedby":g,disabled:W||j||x!==null,onClick:()=>A.current?.click(),children:k.jsx($3,{"aria-hidden":"true"})})}),k.jsx("input",{ref:A,type:"file",hidden:!0,accept:m_,onChange:ne=>{$(ne.target.files?.[0]),ne.target.value=""}})]}):null,k.jsx("span",{className:"flex-1"}),k.jsx(rk,{id:v,part:"counter",count:c.length,max:O}),j?k.jsx(Re,{part:"stop",size:"icon",className:"size-9 rounded-full aria-disabled:pointer-events-none aria-disabled:opacity-50","aria-label":a(H?"agent.stopping":"stop"),title:a(H?"agent.stopping":"stop"),"aria-disabled":H||void 0,onFocus:()=>{p.current=!0},onBlur:ne=>{ne.relatedTarget&&(p.current=!1)},onClick:()=>{H||s()},children:k.jsx(s_,{className:"size-3.5 fill-current","aria-hidden":"true"})}):k.jsx(Re,{part:"send",size:"icon",className:"size-9 rounded-full","aria-label":a("send"),title:a("send"),disabled:!re,onClick:X,children:k.jsx(Yw,{"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:W4(a("source",{name:nk}),F)}):null]})]})});ik.displayName="Composer";const G4=({composerRef:e,onDraftChange:t})=>{const{state:r}=me();return k.jsxs("div",{className:"mx-auto w-full max-w-[844px] shrink-0 px-3 pb-2.5",children:[k.jsx(R4,{}),k.jsx(O4,{}),r.config&&!r.configError?k.jsx(ik,{ref:e,onDraftChange:t}):null]})},ak={receipt:W3,landmark:z3,map:j3,"trending-up":Z3,scale:G3,users:Q3,"file-chart":P3,"alert-triangle":af},Y4=({name:e})=>{const t=(Object.hasOwn(ak,e)?ak[e]:void 0)??Pv;return k.jsx(t,{className:"size-4 shrink-0 text-primary","aria-hidden":"true"})},X4=4,q4=6,K4=10,ok=(e,t)=>e?.[t]??e?.ru??Object.values(e??{})[0],ig=({children:e,id:t})=>k.jsx("h2",{id:t,className:"m-0 px-0.5 text-2xs font-semibold text-muted-foreground",children:e}),ag=({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(D3,{className:"text-muted-foreground","aria-hidden":"true"})]})}),og=e=>`${e.title}-${e.prompt}`,Z4=({onPick:e})=>{const{state:t,lang:r,t:n}=me(),i=B.useId(),[a,o]=B.useState(null),s=ok(t.config?.prompt_examples,r)??[],l=(ok(t.config?.prompt_categories,r)??[]).filter(h=>s.some(v=>v.category===h.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(ig,{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,X4).map(h=>k.jsx(ag,{example:h,onPick:e,sub:!1},og(h)))})]});const c=l.find(h=>h.key===a),f=c?s.filter(h=>h.category===c.key).slice(0,K4):[];return k.jsxs("div",{className:"flex flex-col gap-5",children:[k.jsxs("section",{className:"flex flex-col gap-1.5",children:[k.jsx(ig,{id:i,children:n("examples.whatCanDo")}),k.jsx("div",{role:"group","aria-labelledby":i,className:"flex flex-col gap-1.5",children:l.map(h=>{const v=h.key===c?.key,p=v?ts:nf;return k.jsxs(B.Fragment,{children:[k.jsxs("button",{part:"category",type:"button","aria-expanded":v,onClick:()=>{o(v?null:h.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",v&&"border-primary"),children:[k.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-lg bg-secondary",children:k.jsx(Y4,{name:h.icon})}),k.jsx("span",{className:"min-w-0 flex-1 truncate",children:h.title}),k.jsx(p,{className:"text-muted-foreground","aria-hidden":"true"})]}),v&&f.length>0?k.jsx("ul",{"aria-label":h.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(ag,{example:g,onPick:e,sub:!0},og(g)))}):null]},h.key)})})]}),c?null:k.jsxs("section",{className:"flex flex-col gap-1.5",children:[k.jsx(ig,{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,q4).map(h=>k.jsx(ag,{example:h,onPick:e,sub:!1},og(h)))})]})]})},Q4=({listening:e,wide:t,onPick:r})=>{const{state:n,lang:i,t:a}=me(),o=Tl(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(ef,{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,c)=>k.jsx("p",{className:he(c===0&&"text-xl font-semibold"),children:l},`${c}-${l}`))}):k.jsx("h2",{className:"m-0 text-2xl font-semibold tracking-tight",children:a("greeting")})]}),k.jsx(Z4,{onPick:r})]})},sk=()=>{const{t:e}=me();return t=>{const r=`steps.${t.node}`;return e(P5(r)?r:"steps.unknown")}},lk=({step:e,position:t})=>{const{t:r}=me(),n=sk();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]})},uk=()=>k.jsx(Va,{className:"size-3 shrink-0 animate-spin text-primary motion-reduce:animate-none","aria-hidden":"true","data-testid":"step-spinner"}),J4=({steps:e,status:t,stopping:r})=>{const{t:n}=me(),i=e.find(a=>a.status==="running");return t==="streaming"?k.jsxs(k.Fragment,{children:[k.jsx(uk,{}),k.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:r?n("agent.stopping"):i?k.jsx(lk,{step:i,position:e.indexOf(i)+1}):n("agent.thinking")})]}):t==="stopped"?k.jsxs(k.Fragment,{children:[k.jsx(s_,{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(qw,{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(Bi,{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")})]})},ez=({steps:e,status:t,stopping:r})=>{const{t:n}=me(),i=sk();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")},ck="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",tz=B.memo(function(t){const{t:r}=me(),[n,i]=B.useState(!1),{steps:a,status:o}=t,s=o==="streaming",l=ez(t),c=k.jsx(k.Fragment,{children:k.jsx(J4,{...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(ck,"hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",s&&"border-primary-35"),children:[c,n?k.jsx(ts,{className:"size-3.5 shrink-0 rotate-180","aria-hidden":"true"}):k.jsx(ts,{className:"size-3.5 shrink-0","aria-hidden":"true"})]}):k.jsx("div",{className:he(ck,s&&"border-primary-35"),role:"status",children:c}),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,h)=>{const v=f.status==="running",p=v&&!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:v&&s?k.jsx(uk,{}):p?k.jsx(qw,{className:"size-3.5","aria-hidden":"true"}):k.jsx(Bi,{className:"size-3.5 text-mode-idle","aria-hidden":"true"})}),k.jsx("span",{className:he("min-w-0 flex-1 truncate",p?"text-muted-foreground":"text-foreground"),children:k.jsx(lk,{step:f})}),p?k.jsx("span",{className:"shrink-0 whitespace-nowrap",children:r("agent.unfinished")}):null]},f.id??`${f.node}-${h}`)})}):null]})}),rz=(e,t)=>{const r=(e.split(/[?#]/)[0]??"").split("/").filter(Boolean).pop();return r&&!/^[0-9a-f-]{36}$/i.test(r)?decodeURIComponent(r):t},fk=({url:e,name:t,className:r,children:n})=>{const{api:i}=me(),[a,o]=B.useState(!1);if(!(Zc(e,i.apiUrl)!==null)){const l=$a(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=>{RO(l,t)}).catch(()=>{}).finally(()=>{o(!1)})},children:n})},dk=({attachment:e})=>{const{lang:t,t:r}=me(),n=e.name||rz(e.url,"file"),i="inline-flex max-w-full items-center gap-2.5 rounded-xl border bg-muted p-1.5 text-left text-foreground",a=k.jsxs(k.Fragment,{children:[k.jsx(Yv,{ext:Gv(n)}),k.jsxs("span",{className:"flex min-w-0 flex-col",children:[k.jsx("span",{className:"truncate text-[13px] font-medium leading-tight",children:n}),k.jsxs("span",{className:"flex items-center gap-1.5 text-2xs leading-tight text-muted-foreground",children:[e.size?Xv(e.size,t):null,e.url?null:k.jsxs(k.Fragment,{children:[e.size?k.jsx("span",{"aria-hidden":"true",children:"·"}):null,k.jsx("span",{children:r("attachment.sending")}),k.jsx(Va,{className:"size-3 animate-spin motion-reduce:animate-none","aria-hidden":"true"})]})]})]}),e.url?k.jsx(Kw,{className:"mr-1 size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}):null]});return e.url?k.jsxs(fk,{url:e.url,name:n,className:he(i,"transition-colors hover:bg-accent"),children:[k.jsxs("span",{className:"sr-only",children:[r("download"),": "]}),a]}):k.jsx("span",{className:i,children:a})},nz=({url:e,alt:t})=>{const{api:r}=me(),[n,i]=B.useState(null),[a,o]=B.useState(!1);return B.useEffect(()=>{let s=null,l=!1;return r.attachment(e).then(c=>{l?URL.revokeObjectURL(c):(s=c,i(c))},()=>{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(Va,{className:"size-4 animate-spin text-muted-foreground","aria-label":t})},iz=8,sg=({children:e})=>k.jsx("div",{className:"text-2xs text-muted-foreground",children:e}),az=({block:e,onAsk:t})=>{const{lang:r,t:n}=me(),i=Array.isArray(e.sections)?e.sections:[],o=(Array.isArray(e.indicators)?e.indicators:[]).slice(0,iz),s=Math.max(0,e.total-o.length),l=Array.isArray(e.examples)?e.examples.filter(c=>typeof c=="string"&&c):[];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(rf,{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(sg,{children:n("blocks.catalogSections")}),k.jsx("ul",{className:"m-0 list-none p-0",children:i.map(c=>k.jsxs("li",{className:"flex items-center gap-2 border-b py-[7px] text-[13px] last:border-b-0",children:[k.jsx(nf,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 flex-1 leading-snug",children:c.path.join(" › ")}),k.jsx("span",{className:"whitespace-nowrap tabular-nums text-muted-foreground",children:kn(c.count,r)})]},c.id))})]}):null,o.length>0?k.jsxs("div",{children:[k.jsx(sg,{children:n("blocks.catalogIndicators")}),k.jsx("ul",{className:"m-0 list-none p-0",children:o.map(c=>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:c.name}),c.unit||c.years?k.jsx("span",{className:"text-2xs text-muted-foreground",children:[Mv(c.unit),Mv(c.years)].filter(Boolean).join(" · ")}):null]},c.entity_id))}),s>0?k.jsx("p",{className:"m-0 pt-1 text-[13px] text-muted-foreground",children:n("blocks.catalogMore",{count:kn(s,r)})}):null]}):null,l.length>0?k.jsxs("div",{className:"flex flex-col gap-1.5",children:[k.jsx(sg,{children:n("blocks.catalogExamples")}),l.map(c=>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(c)},children:[k.jsx(F3,{className:"shrink-0 text-primary","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 flex-1",children:c})]},c)),k.jsx("div",{className:"text-2xs text-muted-foreground",children:n("blocks.catalogSendHint")})]}):null]})]})},cf=({rootRef:e,question:t,tone:r,children:n})=>{const{t:i}=me();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(t_,{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]})},hk=({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}),lg=({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}),oz=2**31-1,sz=(e,t)=>{const[r,n]=B.useState(()=>new Date);return B.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,oz));return()=>{window.clearTimeout(a)}},[e,t]),r},lz=({block:e,isLastInBranch:t,question:r,reply:n,disabled:i,onAsk:a})=>{const{t:o}=me(),s=B.useRef(null),l=sz(e.expires_at,t),c=lw(e,{isLastInBranch:t,now:l}),[f,h]=B.useState(""),v=B.useRef(!1),[p,g]=B.useState(!1),y=e.options,x=i||p,b=(H,W=H.label)=>{if(v.current||i)return;v.current=!0,g(!0);const K=a(W,{clarification_id:e.id,slot:e.slot,value:H.value,free_text:null});Promise.resolve(K).then(Q=>{Q===!1&&(v.current=!1,g(!1))})},_=B.useRef(b);B.useEffect(()=>{_.current=b});const C=e.type==="plan_confirm",A=y.find(H=>H.value===e.default)??y[0],M=y.find(H=>H!==A),D=C?[...A?[{option:A,text:o("blocks.continue")}]:[],...M?[{option:M,text:o("blocks.cancelPlan")}]:[]]:y.slice(0,d3).map(H=>({option:H,text:H.label})),E=B.useRef(D);B.useEffect(()=>{E.current=D});const N=c==="open"&&!x,O=D.length;B.useEffect(()=>{if(!N||O===0)return;const H=s.current?.getRootNode();if(!H)return;const W=K=>{const Q=K;if(Q.defaultPrevented||Q.ctrlKey||Q.metaKey||Q.altKey||Q.repeat||m3(Q.composedPath()[0]))return;const re=Number(Q.key),X=Number.isInteger(re)&&re>=1?E.current[re-1]:void 0;X&&(Q.preventDefault(),_.current(X.option,X.text))};return H.addEventListener("keydown",W),()=>{H.removeEventListener("keydown",W)}},[N,O]);const L=c==="answered"&&r!==""&&n===r;if(c==="answered"&&!L)return k.jsx(cf,{rootRef:s,question:e.question,tone:"done",children:n?k.jsxs(lg,{children:[k.jsx(Bi,{className:"shrink-0","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 flex-1",children:o("blocks.chosen",{label:n})})]}):null});if(c==="expired"||L)return k.jsx(cf,{rootRef:s,question:e.question,tone:"expired",children:k.jsxs(lg,{children:[k.jsx(Lv,{className:"shrink-0","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 flex-1",children:o("blocks.expired")}),r&&!L?k.jsxs(Re,{variant:"input",size:"sm",className:"gap-1.5",disabled:i,onClick:()=>{a(r)},children:[k.jsx(o_,{"aria-hidden":"true"}),o("blocks.askAgain")]}):null]})});if(C){const[H,W]=D;return k.jsx(cf,{rootRef:s,question:e.question,tone:"open",children:k.jsxs("div",{className:"flex flex-wrap gap-2 px-2.5 pb-2.5",children:[H?k.jsxs(Re,{size:"sm",disabled:x,onClick:()=>{b(H.option,H.text)},children:[k.jsx(hk,{children:"1"}),H.text]}):null,W?k.jsxs(Re,{variant:"input",size:"sm",disabled:x,onClick:()=>{b(W.option,W.text)},children:[k.jsx(hk,{children:"2"}),W.text]}):null]})})}const R=y.length>=f3,j=R?bR(y,f):y;return k.jsxs(cf,{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:[R?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(El,{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:H=>{h(H.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(H=>{const W=y.indexOf(H)+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(H)},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:W}),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:[H.label,H.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]}),H.hint?k.jsx("span",{className:"text-[13px] leading-snug text-muted-foreground",children:H.hint}):null]})]})},H.value)})}):k.jsx("p",{className:"px-1 py-2 text-sm text-muted-foreground",children:o("searchEmpty")})]}),e.allow_free_text?k.jsxs(lg,{children:[k.jsx(t_,{className:"shrink-0","aria-hidden":"true"}),k.jsx("span",{className:"min-w-0 flex-1",children:o("blocks.freeTextHint")})]}):null]})},uz=10,cz=({section:e})=>{const{t}=me(),r=e.latest_period,n=e.shape==="trend",i=n?[]:Rl(e,{period:r,mode:"value",base:"median"}),a=i.slice(0,uz);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(O_,{compact:!0,section:e,period:r,label:t("chart.label",{title:e.title,period:r}),rows:a,national:R_(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]})},ff=e=>e.type==="number"||e.type==="integer",fz=(e,t,r)=>ff(e)?kn(y3(t),r,e.type==="integer"?0:void 0):Mv(t)||"—",dz={asc:Yw,desc:Gw},hz=({block:e})=>{const{lang:t,t:r}=me(),[n,i]=B.useState(),[a,o]=B.useState("asc"),[s,l]=B.useState(1),[c,f]=B.useState(""),h=Array.isArray(e.columns)?e.columns:[],v=mR({...e,columns:h,data:Array.isArray(e.data)?e.data:[]},{...n?{sortKey:n,dir:a}:{},page:s,query:c}),p=h.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:[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(El,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),k.jsx("input",{type:"search",value:c,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:h.map(y=>{const x=y.key===n,b=x?dz[a]:M3;return k.jsx("th",{scope:"col","aria-sort":x?a==="asc"?"ascending":"descending":"none",className:he("p-0 font-semibold",ff(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",ff(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:v.rows.map((y,x)=>k.jsx("tr",{className:"border-b last:border-b-0",children:h.map(b=>k.jsx("td",{className:he("px-3 py-[7px] align-top",ff(b)?"whitespace-nowrap text-right tabular-nums":"min-w-32"),children:fz(b,y[b.key],t)},b.key))},v.from+x))})]}),v.total===0?k.jsx("p",{className:"px-3 py-3 text-center text-sm text-muted-foreground",children:r(c?"searchEmpty":"blocks.tableEmpty")}):null]}),v.pages>1?k.jsxs("div",{className:"flex items-center justify-end gap-1 text-2xs tabular-nums text-muted-foreground",children:[k.jsx(Re,{variant:"ghost",size:"icon",className:"size-7",disabled:v.page<=1,"aria-label":r("blocks.prevPage"),onClick:()=>{l(v.page-1)},children:k.jsx(Xw,{"aria-hidden":"true"})}),k.jsx("span",{"aria-live":"polite",children:r("blocks.page",{a:v.page,b:v.pages})}),k.jsx(Re,{variant:"ghost",size:"icon",className:"size-7",disabled:v.page>=v.pages,"aria-label":r("blocks.nextPage"),onClick:()=>{l(v.page+1)},children:k.jsx(nf,{"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]})},ug="inline-flex min-h-[30px] max-w-full items-center gap-1.5 rounded-lg bg-muted px-2.5 py-1 text-[13px]",pz=["sex","age","urban_rural","activity","item"],vz=e=>pz.includes(e),cg=({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})]}),fg=({label:e,children:t,className:r})=>k.jsx("li",{className:he(ug,r),title:e,children:k.jsx(cg,{label:e,children:t})}),gz=({block:e,question:t,onAsk:r})=>{const{t:n}=me(),[i,a]=B.useState(!1),o=B.useId(),s=e.indicators.map(h=>h.name).join(", "),l=e.territories.map(h=>h.name).join(", "),c=e.breakdown&&vz(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(ug,"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(h=>!h)},children:[k.jsx(cg,{label:n("blocks.indicator"),children:s}),k.jsx(ts,{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(h=>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} — ${h.name}`)},children:h.name},h.id))]}):null]}):k.jsx(fg,{label:n("blocks.indicator"),children:s}):null,l?k.jsx(fg,{label:n("blocks.territory"),children:l}):null,e.period.label?k.jsxs("li",{className:he(ug,e.period.substituted&&"border border-warning/40"),title:e.period.reason??n("blocks.period"),children:[k.jsx(cg,{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,c?k.jsx(fg,{label:n("blocks.breakdown"),children:c}):null]})]})},pk="gap-1.5 text-[13px]",vk="gap-1.5 text-[13px] text-muted-foreground hover:text-foreground",mz=({text:e})=>{const{t}=me(),[r,n]=B.useState(!1),i=B.useRef(void 0);return B.useEffect(()=>()=>{window.clearTimeout(i.current)},[]),k.jsxs(Re,{part:"copy",variant:"ghost",size:"sm",className:vk,onClick:()=>{Fv(e).then(a=>{a&&(n(!0),window.clearTimeout(i.current),i.current=window.setTimeout(()=>{n(!1)},2e3))})},children:[r?k.jsx(Bi,{"aria-hidden":"true"}):k.jsx(Iv,{"aria-hidden":"true"}),t(r?"copied":"copy")]})},yz=({message:e,isLastInBranch:t,onAsk:r,children:n,dashboardOpen:i=!1,onToggleDashboard:a})=>{const{path:o,t:s}=me(),[l,c]=B.useState(!1),{blocks:f}=e,h=pi(f,"plan"),v=pi(f,"table"),p=pi(f,"catalog"),g=pi(f,"clarification"),{question:y,reply:x}=p3(o,e.id),b=e.status==="streaming",_=h?.methodology?$a(h.methodology.url):null,C=f.length>0&&!b?xR(e):"",A=!b&&e.status!=="error"&&Xc(e.id),M=pi(f,"dashboard"),D=M?.sections[0],E=A&&M!==void 0,N=E?a:void 0,O=Vw(f),L=b?[]:h3(f);return k.jsxs(k.Fragment,{children:[h?k.jsx(gz,{block:h,question:y,onAsk:r}):null,n,p?k.jsx(az,{block:p,onAsk:r}):null,g?k.jsx(lz,{block:g,isLastInBranch:t,question:y,reply:x,disabled:b,onAsk:r}):null,D?k.jsx(cz,{section:D}):null,v&&l?k.jsx(hz,{block:v}):null,L.length>0?k.jsx($_,{files:L}):null,A?k.jsx(U_,{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:[v?k.jsxs(Re,{part:"data-toggle",variant:"input",size:"sm",className:pk,"aria-expanded":l,onClick:()=>{c(R=>!R)},children:[k.jsx(q3,{"aria-hidden":"true"}),s(l?"blocks.hideData":"blocks.data")]}):null,N?k.jsxs(Re,{part:"dashboard-toggle","data-message-id":e.id,variant:"input",size:"sm",className:he(pk,i&&"border-primary bg-secondary text-secondary-foreground"),"aria-expanded":i,onClick:()=>{N(e.id)},children:[k.jsx(L3,{"aria-hidden":"true"}),s(i?"blocks.hideDashboard":"blocks.dashboard")]}):null,E?k.jsx(j_,{messageId:e.id,block:O}):null,h?.methodology&&_?k.jsx(Re,{part:"methodology",variant:"ghost",size:"sm",className:vk,asChild:!0,children:k.jsxs("a",{href:_,target:"_blank",rel:"noopener noreferrer",title:h.methodology.title,children:[k.jsx(rf,{"aria-hidden":"true"}),s("blocks.methodology")]})}):null,C?k.jsx(mz,{text:C}):null]}):null]})},xz=B.lazy(()=>Promise.resolve().then(()=>xJ).then(e=>({default:e.MarkdownImpl}))),bz=B.memo(function({children:t,streaming:r=!1,className:n}){return k.jsxs("div",{part:"markdown",className:he("min-w-0 break-words text-[15px] leading-[1.65] text-foreground",n),children:[k.jsx(B.Suspense,{fallback:k.jsx("span",{className:"whitespace-pre-wrap",children:t}),children:k.jsx(xz,{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]})}),jl="size-7 shrink-0 text-muted-foreground hover:text-foreground",gk=({messageId:e,disabled:t})=>{const{index:r,switchBranch:n,t:i}=me(),{list:a,position:o}=i5(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(Re,{variant:"ghost",size:"icon",className:jl,disabled:t||!s,"aria-label":i("branch.prev"),onClick:()=>{s&&n(s.id)},children:k.jsx(Xw,{"aria-hidden":"true"})}),k.jsxs("span",{"aria-live":"polite",className:"min-w-[30px] text-center",children:[o+1,"/",a.length]}),k.jsx(Re,{variant:"ghost",size:"icon",className:jl,disabled:t||!l,"aria-label":i("branch.next"),onClick:()=>{l&&n(l.id)},children:k.jsx(nf,{"aria-hidden":"true"})})]})},wz=({text:e})=>{const{t}=me(),[r,n]=B.useState(!1),i=B.useRef(void 0);B.useEffect(()=>()=>{window.clearTimeout(i.current)},[]);const a=t(r?"copied":"copy");return k.jsx(Re,{part:"copy",variant:"ghost",size:"icon",className:jl,"aria-label":a,title:a,onClick:()=>{Fv(e).then(o=>{o&&(n(!0),window.clearTimeout(i.current),i.current=window.setTimeout(()=>{n(!1)},2e3))})},children:r?k.jsx(Bi,{"aria-hidden":"true"}):k.jsx(Iv,{"aria-hidden":"true"})})},_z=({message:e})=>{const{rate:t,t:r}=me(),[n,i]=B.useState(),a=e.rating??0;return k.jsx("span",{part:"rating",role:"radiogroup","aria-label":r("rateGroup"),className:"inline-flex items-center",onKeyDown:rg,onMouseLeave:()=>{i(void 0)},children:PO.map((o,s)=>{const l=o<=a,c=!l&&a===0&&n!==void 0&&o<=n;return k.jsx("button",{type:"button",role:"radio",tabIndex:tg(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||c)&&"text-warning"),onMouseEnter:()=>{i(o)},onClick:()=>{t(e.id,o)},children:k.jsx(X3,{className:he("size-4",l&&"fill-current"),"aria-hidden":"true"})},o)})})},kz=({message:e,isLast:t,busy:r,ready:n,persisted:i,canFeedback:a,feedbackOpen:o,onOpenFeedback:s})=>{const{send:l,state:c,t:f}=me(),h=e.status==="error",v=t&&n&&!r&&!c.limit.blocked;if(h&&!v)return null;const p=Nl.find(x=>x===e.feedbackReason),g=e.blocks.length>0,y=()=>{l({query:"",mode:c.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",!h&&e.rating==null&&zv),children:[n&&!h&&e.content&&!g?k.jsx(wz,{text:e.content}):null,v?h?k.jsxs(Re,{part:"regenerate",variant:"input",size:"sm",className:"gap-1.5",onClick:y,children:[k.jsx(a_,{"aria-hidden":"true"}),f("regenerate")]}):k.jsxs(Re,{part:"regenerate",variant:"ghost",size:"icon",className:he(jl,"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(a_,{"aria-hidden":"true"}),k.jsx("span",{className:"hidden max-sm:inline",children:f("regenerate")})]}):null,n&&!h?k.jsxs(k.Fragment,{children:[k.jsx("span",{className:"mx-1.5 h-[18px] w-px bg-border","aria-hidden":"true"}),k.jsx(_z,{message:e})]}):null,k.jsx(gk,{messageId:e.id,disabled:r||!i}),a&&!o?k.jsx(Re,{variant:"link",size:"sm",onClick:s,children:e.feedback||p?f("feedbackEdit"):f("feedbackOpen")}):null]})},Sz=({message:e,onClose:t})=>{const{saveFeedback:r,t:n}=me(),[i,a]=B.useState(e.feedback),[o,s]=B.useState(!1),[l,c]=B.useState(!1),[f,h]=B.useState(()=>Nl.find(p=>p===e.feedbackReason)),v=()=>{s(!0),c(!1),r(e.id,i.trim(),f).then(p=>{s(!1),p?t():c(!0)})};return k.jsxs("form",{part:"feedback","aria-label":n("feedbackLabel"),onSubmit:p=>{p.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:rg,children:Nl.map((p,g)=>{const y=p===f;return k.jsx("button",{type:"button",role:"radio",tabIndex:tg(g,f?Nl.indexOf(f):-1),"aria-checked":y,disabled:o,onClick:()=>{h(y?void 0:p)},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.${p}`)},p)})}),k.jsx(ng,{autoFocus:!0,value:i,onChange:a,placeholder:n("feedbackPlaceholder"),"aria-label":n("feedbackLabel"),maxLength:jv,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(Ha,{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>=jv&&"font-semibold text-warn-text"),children:[i.length,"/",jv]}),k.jsx(Re,{variant:"ghost",size:"sm",onClick:t,disabled:o,children:n("cancel")}),k.jsxs(Re,{size:"sm",disabled:o,onClick:v,children:[o?k.jsx(Va,{className:"size-3 animate-spin motion-reduce:animate-none","aria-hidden":"true"}):null,n("save")]})]})]})},Cz=({message:e})=>{const{t}=me(),r=Nl.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]})},Tz=({message:e,isLast:t,busy:r,persisted:n,dashboardOpen:i,onToggleDashboard:a})=>{const{send:o,state:s,t:l}=me(),[c,f]=B.useState(!1),h=e.status==="streaming",v=e.status==="error",p=C5(e.content,h),g=q5(h,e.status),y=!h&&n,x=y&&!v&&e.rating!=null&&e.rating<IO,b=!v&&(h||e.steps.length>0),_=Date.parse(e.createdAt)||0,C=g?"eureka":W5(e.status,e.content.length>0),A=(M,D)=>o({query:M,mode:s.mode??e.mode,...D?{clarification:D}:{}}).then(E=>E==="sent");return k.jsxs("article",{part:"message","data-role":"assistant","data-status":e.status,"aria-busy":h,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(ef,{mood:C,size:32,animated:h||g}),v?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:v?"bubble assistant-bubble error-bubble":"bubble assistant-bubble",className:"flex min-w-0 flex-1 flex-col gap-3",children:[b?k.jsx(tz,{steps:e.steps,status:e.status,startedAt:_,durationMs:e.durationMs,stopping:s.turn?.stopping===!0&&s.turn.assistantId===e.id}):null,v?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(Ha,{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(yz,{message:e,isLastInBranch:t,onAsk:A,dashboardOpen:i,onToggleDashboard:a,children:e.content&&!v?k.jsx(bz,{streaming:h,children:p}):null}),e.attachments.length>0?k.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.attachments.map((M,D)=>k.jsx(dk,{attachment:M},M.id??`${M.name}-${D}`))}):null,e.status==="stopped"?k.jsxs("div",{className:"flex items-center gap-2 text-[13px] text-muted-foreground",children:[k.jsx(Qw,{className:"size-4 shrink-0","aria-hidden":"true"}),k.jsx("span",{children:l("agent.answerStopped")})]}):null,h?null:k.jsx(kz,{message:e,isLast:t,busy:r,ready:y,persisted:n,canFeedback:x,feedbackOpen:c,onOpenFeedback:()=>{f(!0)}}),x&&c?k.jsx(Sz,{message:e,onClose:()=>{f(!1)}}):null,x&&!c?k.jsx(Cz,{message:e}):null]})]})},Az=({message:e,onClose:t})=>{const{send:r,state:n,t:i}=me(),a=B.useId(),[o,s]=B.useState(e.content),l=n.mode??e.mode,c=n.config?.max_query_chars??Sw,f=o.trim(),h=f!==e.content.trim(),v=o.length>c,p=f.length>0&&h&&!v&&!n.turn&&!n.limit.blocked,g=()=>{p&&(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(ng,{autoFocus:!0,value:o,onChange:s,"aria-label":i("editLabel"),"aria-invalid":v||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(rk,{id:a,count:o.length,max:c,className:"mr-auto px-0"}),k.jsx(Re,{variant:"ghost",size:"sm",onClick:t,children:i("cancel")}),k.jsx(Re,{size:"sm",disabled:!p,onClick:g,children:i("send")})]})]})},Dz=({message:e,busy:t,persisted:r})=>{const{t:n}=me(),[i,a]=B.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(Az,{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(dk,{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(Re,{part:"edit-button",variant:"ghost",size:"icon",className:he(jl,zv),disabled:t,"aria-label":n("edit"),title:n("edit"),onClick:()=>{a(!0)},children:k.jsx(U3,{"aria-hidden":"true"})}):null,k.jsx(gk,{messageId:e.id,disabled:t||!r})]})]})})},Mz=B.memo(function({message:t,isLast:r,busy:n,dashboardOpen:i,onToggleDashboard:a}){const o=Xc(t.id);return t.role==="user"?k.jsx(Dz,{message:t,busy:n,persisted:o}):k.jsx(Tz,{message:t,isLast:r,busy:n,persisted:o,dashboardOpen:i,onToggleDashboard:a})}),mk=e=>e.scrollHeight-e.scrollTop-e.clientHeight,Ez=({resetKey:e,followKey:t})=>{const r=B.useRef(null),n=B.useRef(null),i=B.useRef(!0),a=B.useRef(0),[o,s]=B.useState(!0),l=B.useCallback(()=>{const h=r.current;h&&(h.scrollTop=h.scrollHeight)},[]),c=B.useCallback(()=>{const h=r.current;if(!h)return;i.current=!0;const v=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;h.scrollTo({top:h.scrollHeight,behavior:v?"auto":"smooth"})},[]),f=B.useCallback(()=>{const h=r.current;if(!h)return;const v=mk(h)<g_;v?i.current=!0:h.scrollTop<a.current-1&&(i.current=!1),a.current=h.scrollTop,s(v)},[]);return B.useLayoutEffect(()=>{i.current=!0,l()},[e,t,l]),B.useEffect(()=>{const h=n.current,v=r.current;if(!h||!v||typeof ResizeObserver>"u")return;const p=new ResizeObserver(()=>{i.current&&l(),s(mk(v)<g_)});return p.observe(h),()=>{p.disconnect()}},[l]),{scrollRef:r,contentRef:n,onScroll:f,atBottom:o,scrollToBottom:c}},Lz=()=>{const{state:e,path:t,t:r}=me(),{state:n,toggle:i}=Fi(),a=t.filter(p=>p.role==="user").length,{scrollRef:o,contentRef:s,onScroll:l,atBottom:c,scrollToBottom:f}=Ez({resetKey:e.thread?.id??null,followKey:a}),h=e.turn!==null,v=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":h,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(p=>k.jsx(Mz,{message:p,isLast:p===v,busy:h,dashboardOpen:p.id===n.messageId,onToggleDashboard:i},p.id))})}),c?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(Gw,{"aria-hidden":"true"}),r("scrollDown")]})]})},Iz={error:"bg-error-background text-destructive",warning:"bg-warning-background text-warn-text",lock:"bg-muted text-muted-foreground"},yk=({tone:e,children:t})=>k.jsx("span",{className:he("flex size-[52px] items-center justify-center rounded-full",Iz[e]),children:t}),Pz=({kind:e,onRetry:t})=>{const{t:r}=me();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(yk,{tone:"lock",children:k.jsx(Jw,{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(yk,{tone:n?"warning":"error",children:n?k.jsx(af,{className:"size-6","aria-hidden":"true"}):k.jsx(Ha,{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(Re,{variant:"input",size:"sm",onClick:t,children:[k.jsx(o_,{"aria-hidden":"true"}),r("retry")]}):null]})},Nz=()=>{const{state:e,reload:t}=me(),r=n3(e);return r===null?null:k.jsx(Pz,{kind:r,onRetry:r==="siteBlocked"?void 0:t})},Rz="h-3 rounded-md bg-muted animate-pulse motion-reduce:animate-none",Oz=()=>{const{t:e}=me();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:Rz,style:{width:`${t}%`}},t))})]}),k.jsx("span",{role:"status",className:"sr-only",children:e("loading")})]})},zz=({composerRef:e,wide:t})=>{const{state:r,path:n}=me(),[i,a]=B.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 c;return o?s?c=k.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain",children:k.jsx(Q4,{listening:i,wide:t,onPick:l})}):c=k.jsx(Lz,{}):c=r.loadingThread&&r.config&&!r.configError?k.jsx(Oz,{}):k.jsx(Nz,{}),k.jsxs(k.Fragment,{children:[c,k.jsx(G4,{composerRef:e,onDraftChange:a})]})},Fl="size-8 shrink-0 text-muted-foreground hover:text-foreground",jz=({historyHidden:e,onShowHistory:t,onOpenSettings:r,title:n,logoUrl:i,threadTitle:a,tabs:o,inert:s=!1})=>{const{t:l,newChat:c}=me(),f=wv(),h=B.useRef(null);Fa(h,s);const v=a!==void 0&&a!==""?a:e?n:"";return k.jsxs("div",{ref:h,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(Re,{part:"history-toggle",variant:"ghost",size:"icon",className:Fl,"aria-expanded":!1,"aria-label":l("history"),title:l("history"),onClick:t,children:k.jsx(V3,{"aria-hidden":"true"})}):null,e&&i?k.jsx("img",{part:"logo",src:i,alt:"",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:v}),o,k.jsx(Re,{variant:"ghost",size:"icon",className:Fl,"aria-label":l("newChat"),title:l("newChat"),onClick:c,children:k.jsx(i_,{"aria-hidden":"true"})}),f.canExpand?k.jsx(Re,{part:"expand",variant:"ghost",size:"icon",className:Fl,"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(n_,{"aria-hidden":"true"}):k.jsx(e_,{"aria-hidden":"true"})}):null,k.jsx(Re,{part:"settings-button",variant:"ghost",size:"icon",className:Fl,"aria-label":l("settings"),title:l("settings"),onClick:r,children:k.jsx(Y3,{"aria-hidden":"true"})}),f.close?k.jsx(Re,{part:"close",variant:"ghost",size:"icon",className:Fl,"aria-label":l("close"),title:l("close"),onClick:f.close,children:k.jsx(Ll,{"aria-hidden":"true"})}):null]})},Fz="flex shrink-0 flex-col border-r duration-200 animate-in fade-in slide-in-from-left-2 motion-reduce:animate-none",Bz="w-side bg-muted",Hz="absolute inset-y-0 left-0 z-30 w-side-over max-w-full bg-muted shadow-side",Vz=({title:e,logoUrl:t,onHide:r})=>{const{t:n}=me();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:"",className:"size-7 shrink-0 rounded-lg object-cover"}):k.jsx(ef,{size:28,animated:!1}),k.jsx("span",{part:"title",className:"min-w-0 flex-1 truncate text-[15px] font-bold",children:e}),k.jsx(Re,{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(H3,{"aria-hidden":"true"})})]})},$z=({onClick:e})=>{const{t}=me();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(i_,{className:"size-4","aria-hidden":"true"}),t("newChat")]})},Uz=({name:e,onConfirm:t,onCancel:r})=>{const{t:n}=me(),i=B.useRef(null);return B.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(Re,{variant:"destructive",size:"xs",onClick:t,children:n("deleteYes")}),k.jsx(Re,{variant:"ghost",size:"xs","data-cancel":!0,onClick:r,children:n("deleteNo")})]})]})},Wz=(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]},Gz=({text:e,query:t})=>{const r=t.trim().toLowerCase(),n=r?Wz(e,r):null;if(!n)return k.jsx(k.Fragment,{children:e});const[i,a]=n;return k.jsxs(B.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)]})},Yz=({groups:e,query:t,activeId:r,confirmId:n,onOpen:i,onAskDelete:a,onCancelDelete:o,onDelete:s})=>{const{t:l}=me();return k.jsx(k.Fragment,{children:e.map(([c,f])=>k.jsxs("section",{className:"pb-1","aria-label":l(c),children:[k.jsx("h3",{className:"px-2 pb-1 pt-3.5 text-2xs font-medium text-muted-foreground",children:l(c)}),k.jsx("ul",{className:"flex flex-col gap-px",children:f.map(h=>{const v=h.id===r,p=h.title||l("untitled");return n===h.id?k.jsx("li",{children:k.jsx(Uz,{name:p,onConfirm:()=>{s(h.id)},onCancel:o})},h.id):k.jsxs("li",{className:"group relative",children:[k.jsx("button",{part:"thread-item",type:"button","aria-current":v?"page":void 0,title:p,onClick:()=>{i(h.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",v&&"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(Gz,{text:p,query:t})})}),k.jsx(Re,{variant:"ghost",size:"icon",className:he("absolute right-1 top-1/2 size-7 -translate-y-1/2 text-muted-foreground",!v&&zv),"aria-label":`${l("delete")}: ${p}`,onClick:()=>{a(h.id)},children:k.jsx(K3,{"aria-hidden":"true"})})]},h.id)})})]},c))})},dg=({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]}),Xz=[82,64,90,58,76,70],qz=({query:e})=>{const{state:t,t:r,refreshThreads:n}=me();return t.threadsLoaded?e.trim()!==""?k.jsx(dg,{icon:k.jsx(El,{"aria-hidden":"true"}),children:k.jsx("span",{children:r("searchEmpty")})}):t.threadsError?k.jsxs(dg,{icon:k.jsx(Ha,{"aria-hidden":"true"}),children:[k.jsx("span",{children:r("historyError")}),k.jsx(Re,{variant:"input",size:"xs",onClick:n,children:r("retry")})]}):k.jsx(dg,{icon:k.jsx(r_,{"aria-hidden":"true"}),children:k.jsx("span",{children:r("historyEmpty")})}):k.jsxs("div",{"aria-busy":"true",className:"flex flex-col",children:[Xz.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")})]})},Kz=(e,t,r)=>{tf(e,t);const n=B.useRef(r);B.useEffect(()=>{n.current=r}),B.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(c=>c instanceof HTMLElement&&c.getAttribute("role")==="alertdialog")||(o.preventDefault(),o.stopPropagation(),n.current())};return window.addEventListener("keydown",a,!0),()=>{window.removeEventListener("keydown",a,!0)}},[t]);const i=B.useRef(!1);B.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])},Zz=({query:e,onQuery:t,inputRef:r,autoFocus:n})=>{const{t:i}=me();return k.jsxs("label",{className:"relative flex items-center",children:[k.jsx(El,{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(Ll,{className:"size-3.5","aria-hidden":"true"})}):null]})},Qz=({collapsed:e,onCollapsedChange:t,searchRef:r,searchSignal:n,overlay:i=!1,title:a,logoUrl:o,inert:s=!1})=>{const l=B.useRef(null);Fa(l,s);const{state:c,t:f,openThread:h,newChat:v,deleteThread:p}=me(),[g,y]=B.useState(""),[x,b]=B.useState(null),_=i&&!e;Kz(l,_,()=>{t(!0)});const C=B.useMemo(()=>{const M=g.trim().toLowerCase(),D=M?c.threads.filter(E=>(E.title||f("untitled")).toLowerCase().includes(M)):c.threads;return zO(D)},[c.threads,g,f]);B.useEffect(()=>{n>0&&!e&&r.current?.focus()},[n,e,r]);const A=M=>()=>{M(),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(Fz,i?Hz:Bz),children:[k.jsx(Vz,{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($z,{onClick:A(v)}),k.jsx(Zz,{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:[C.length===0?k.jsx(qz,{query:g}):null,k.jsx(Yz,{groups:C,query:g,activeId:c.thread?.id,confirmId:x,onOpen:M=>{A(()=>{h(M)})()},onAskDelete:b,onCancelDelete:()=>{b(null)},onDelete:M=>{b(null),p(M)}})]})]})};function Jz(e){const t=B.useRef(null),[r,n]=B.useState(e);return B.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 xk="aid_sidebar",ej=720,tj=e=>{try{const t=window.localStorage.getItem(xk);return t===null?e:t==="collapsed"}catch{return e}},rj=e=>{const{state:t}=me(),r=t.thread?.id,n=r!==void 0&&r!==es?r:void 0;return k.jsx(y4,{threadId:n,children:k.jsx(nj,{...e,threadId:n})})},nj=({open:e,title:t,logoUrl:r,compact:n,threadId:i})=>{const{state:a,path:o,newChat:s}=me(),l=wv(),{expandForDashboard:c}=l,[f,h]=Jz(0),p=(l.canExpand&&l.expanded?Math.max(h,window.innerWidth):h)>=b3,g=Fi(),y=n||h>0&&h<ej,[x,b]=B.useState(()=>y||tj(!1)),[_,C]=B.useState(y);y!==_&&(C(y),y&&b(!0));const[A,M]=B.useState(!1),D=B.useRef(null),[E,N]=B.useState(0),O=()=>{R(!1),N(oe=>oe+1)},L=B.useRef(null),R=oe=>{if(b(oe),!y)try{window.localStorage.setItem(xk,oe?"collapsed":"expanded")}catch{}},j=B.useRef({collapsed:x,newChat:s,setCollapsed:R,focusSearch:O});B.useEffect(()=>{j.current={collapsed:x,newChat:s,setCollapsed:R,focusSearch:O}}),B.useEffect(()=>{if(!e)return;const oe=le=>{if(!(le.metaKey||le.ctrlKey)||le.altKey)return;const{collapsed:Me,newChat:we,setCollapsed:De,focusSearch:_e}=j.current,Ce=le.key.toLowerCase();if(Ce==="k"&&!le.shiftKey)_e();else if(Ce==="o"&&le.shiftKey)we(),setTimeout(()=>L.current?.setText(""),0);else if(Ce==="s"&&le.shiftKey)De(!Me);else return;le.preventDefault()};return window.addEventListener("keydown",oe),()=>{window.removeEventListener("keydown",oe)}},[e]),x4(o,i,{loaded:i===void 0||a.thread!==null&&a.loadingThread===null,streaming:(a.turn?.optimisticIds.length??0)>0});const H=o.find(oe=>oe.id===g.state.messageId&&pi(oe.blocks,"dashboard")!==void 0),W=H!==void 0;B.useEffect(()=>{if(W)return c(!0),()=>{c(!1)}},[W,c]);const K=B.useRef(null),Q=B.useRef(!1),re=H?.id??null,X=B.useRef(null);B.useEffect(()=>{const oe=X.current;if(X.current=re,oe===null||re!==null||!Q.current)return;Q.current=!1;const le=K.current;(Array.from(le?.querySelectorAll('[part="dashboard-toggle"]')??[]).find(we=>we.dataset.messageId===oe)??le?.querySelector('[part="composer"] textarea'))?.focus()},[re]);const $=W&&g.state.fullscreen;Fa(K,y&&!x);const[I,z]=B.useState(e);e!==I&&(z(e),!e&&y&&b(!0));const Y=_3(W,p,g.state.fullscreen);w3(e&&W&&(!Y||g.state.view==="dashboard"));const F=a.thread?a.threads.find(oe=>oe.id===a.thread?.id)?.title:void 0,ne=a.config&&!a.loadingThread&&!a.configError;return k.jsxs("div",{ref:f,className:"relative flex min-h-0 flex-1",children:[k.jsx(Qz,{collapsed:x,onCollapsedChange:R,overlay:y,searchRef:D,searchSignal:E,title:t,logoUrl:r,inert:$}),k.jsxs("div",{ref:K,className:"flex min-w-0 flex-1 flex-col",children:[k.jsx(jz,{historyHidden:x,onShowHistory:()=>{R(!1)},onOpenSettings:()=>{M(!0)},title:t,logoUrl:r,threadTitle:F,tabs:Y?k.jsx(jO,{}):null,inert:$}),k.jsx(FO,{wide:p,onPanelFocusChange:oe=>{Q.current=oe},panel:H?k.jsx(g4,{message:H}):null,chat:k.jsx(zz,{composerRef:L,wide:h>=720})})]}),y&&!x?k.jsx("button",{type:"button",tabIndex:-1,"aria-hidden":"true",className:"absolute inset-0 z-20 bg-scrim",onClick:()=>{R(!0)}}):null,k.jsx(w4,{active:e&&!!ne}),k.jsx(I4,{open:A,onClose:()=>{M(!1)}})]})},bk=({open:e,title:t,logoUrl:r,fullscreen:n,expanded:i=!1,style:a,onClose:o})=>{const s=B.useRef(null);return Fa(s,!e),tf(s,e),B.useEffect(()=>{if(!e)return;const l=c=>{c.key==="Escape"&&!c.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(rj,{open:e,title:t,logoUrl:r,compact:n})})},hg=60,ij=6,aj=8,wk={x:20,y:20},oj=639,_k="aid_pos",sj=(e,t,r=ij)=>e*e+t*t>=r*r,df=(e,t,r=hg,n=aj)=>{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)}},kk=(e,t,r,n)=>({x:n==="bottom-right"?e.x-t:e.x+t,y:e.y-r}),lj=e=>{try{const t=e?.getItem(_k);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},uj=(e,t)=>{try{e?.setItem(_k,JSON.stringify(t))}catch{}},cj={width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},fj=({size:e=24})=>k.jsx("svg",{...cj,width:e,height:e,children:k.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),Sk=()=>({width:window.innerWidth,height:window.innerHeight}),pg=e=>({width:e.offsetWidth,height:e.offsetHeight}),dj=()=>{try{return window.localStorage}catch{return null}},Ck=B.forwardRef(({open:e,lang:t,corner:r,offset:n,draggable:i,unread:a=0,variant:o,label:s,shape:l,onOffsetChange:c,onToggle:f},h)=>{const v=B.useRef(null),p=B.useRef(!1),[g,y]=B.useState(null),x=g!==null,b=E=>{!i||E.button!==0||(v.current={pointerX:E.clientX,pointerY:E.clientY,offset:n,moved:!1},E.currentTarget.setPointerCapture(E.pointerId))},_=E=>{const N=v.current;if(!N)return;const O=E.clientX-N.pointerX,L=E.clientY-N.pointerY;!N.moved&&!sj(O,L)||(N.moved||(N.moved=!0,y({offset:N.offset,...pg(E.currentTarget)})),c(df(kk(N.offset,O,L,r),Sk(),pg(E.currentTarget))))},C=E=>{const N=v.current;if(v.current=null,E.currentTarget.hasPointerCapture(E.pointerId)&&E.currentTarget.releasePointerCapture(E.pointerId),!N?.moved)return;y(null),p.current=!0;const O=E.clientX-N.pointerX,L=E.clientY-N.pointerY;uj(dj(),df(kk(N.offset,O,L,r),Sk(),pg(E.currentTarget)))},A=()=>{if(p.current){p.current=!1;return}f()},M=r==="bottom-right"?"right":"left",D=o==="label"&&!e?s??Sn(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:{[M]:g.offset.x,bottom:g.offset.y,width:g.width,height:g.height}}):null,k.jsxs("button",{ref:h,part:"launcher",type:"button","aria-label":`${D??Sn(t,e?"close":"open")}${a>0&&!e?`, ${Sn(t,"unreadAnswers",{count:a})}`:""}`,"aria-expanded":e,"data-dragging":x,"data-variant":D?"label":"icon","data-shape":l??"circle",className:"aid-launcher",style:{[M]:n.x,bottom:n.y},onPointerDown:b,onPointerMove:_,onPointerUp:C,onPointerCancel:C,onClick:A,children:[e?k.jsx(fj,{}):k.jsx(ef,{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]})]})});Ck.displayName="Launcher";const hj=e=>{const{state:t}=me(),{turn:r,thread:n}=t,[i,a]=B.useState({turn:r,open:e}),[o,s]=B.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},Tk=B.forwardRef((e,t)=>{const r=hj(e.open);return k.jsx(Ck,{ref:t,...e,unread:r})});Tk.displayName="UnreadLauncher";const Bl=(e,t,r)=>Math.min(r,Math.max(t,e)),pj={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#008000",blue:"#0000ff",orange:"#ffa500",purple:"#800080",teal:"#008080",navy:"#000080",gray:"#808080",grey:"#808080"},Ak=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}},Dk=e=>{const t=e.replace(/\//g," ").replace(/,/g," ").trim().split(/\s+/).filter(Boolean);return t.length===3||t.length===4?t:null},hf=e=>{const t=Number(e);return e!==""&&Number.isFinite(t)?t:null},vj=e=>{if(e===void 0)return 1;const t=hf(e.endsWith("%")?e.slice(0,-1):e);return t===null?null:Bl(e.endsWith("%")?t/100:t,0,1)},vg=e=>{const t=hf(e.endsWith("%")?e.slice(0,-1):e);return t===null?null:Bl(e.endsWith("%")?t/100*255:t,0,255)},Mk=e=>{const t=/^(-?[\d.]+)(deg|turn|rad|grad)?$/.exec(e);if(!t?.[1])return null;const r=hf(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},pf=e=>{const t=hf(e.endsWith("%")?e.slice(0,-1):e);return t===null?null:Bl(t,0,100)},vf=({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}},gj=({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),c=(s+l)/2,f=s-l;if(f===0)return{h:0,s:0,l:c*100,a:n};const h=f/(1-Math.abs(2*c-1));let v;return s===i?v=(a-o)/f%6:s===a?v=(o-i)/f+2:v=(i-a)/f+4,{h:(v*60+360)%360,s:h*100,l:c*100,a:n}},Ek=e=>{const t=mj(e);if(!t)return null;const r=/^hsla?\((.*)\)$/.exec(e.trim().toLowerCase()),n=r?.[1]!==void 0?Dk(r[1]):null;if(n){const[i,a,o]=[Mk(n[0]??""),pf(n[1]??""),pf(n[2]??"")];if(i!==null&&a!==null&&o!==null)return{h:i,s:a,l:o,a:t.a}}return gj(t)},mj=e=>{const t=e.trim().toLowerCase(),r=pj[t];if(r)return Ak(r.slice(1));if(t.startsWith("#"))return Ak(t.slice(1));const n=/^(rgba?|hsla?)\((.*)\)$/.exec(t);if(!n?.[1]||n[2]===void 0)return null;const i=Dk(n[2]);if(!i)return null;const[a="",o="",s="",l]=i,c=vj(l);if(c===null)return null;if(n[1].startsWith("rgb")){const[p,g,y]=[vg(a),vg(o),vg(s)];return p===null||g===null||y===null?null:{r:Math.round(p),g:Math.round(g),b:Math.round(y),a:c}}const[f,h,v]=[Mk(a),pf(o),pf(s)];return f===null||h===null||v===null?null:vf({h:f,s:h,l:v,a:c})},Lk=({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)},Ik=(e,t)=>{const[r,n]=[Lk(e),Lk(t)].sort((i,a)=>a-i);return(r+.05)/(n+.05)},gf=e=>Math.round(e*10)/10,Ua=({h:e,s:t,l:r,a:n})=>`${gf(e)}, ${gf(t)}%, ${gf(r)}%${n<1?`, ${gf(n*100)/100}`:""}`,Pk={h:210,s:40,l:98,a:1},Nk={h:222.2,s:47.4,l:11.2,a:1},yj=e=>{const t=Ek(e);if(!t)return null;const r={...t,a:1},n={...r,l:Bl(r.l>70?r.l-6:r.l+8,0,100)},i={...r,l:Bl(r.l-10,0,100)},a=vf(r),o=Ik(a,vf(Pk)),s=o>=4.5||o>=Ik(a,vf(Nk))?Pk:Nk;return{primary:Ua(r),primaryHovered:Ua(n),primaryPressed:Ua(i),primaryForeground:Ua(s),secondary:Ua({...r,a:.1}),ring:Ua({...r,a:.5})}},xj=(...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},bj=e=>{const t={},r=e.primary?yj(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=c=>{const f=c?Ek(c):null;return f?Ua(f):null},i=n(e.background);if(i)for(const c of["--background","--card","--popover"])t[c]=i;const a=n(e.foreground);if(a)for(const c of["--foreground","--card-foreground","--popover-foreground","--secondary-foreground"])t[c]=a;const o=n(e.bubble);if(o)for(const c of["--secondary","--muted","--accent"])t[c]=o;const s=n(e.border);if(s)for(const c of["--border","--input"])t[c]=s;const l=(c,f)=>{typeof f=="number"&&Number.isFinite(f)&&(t[c]=`${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},wj=(e,t)=>e==="dark"||e==="auto"&&t?"dark":"light",_j=(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)},kj=(e,t)=>{e.classList.toggle("dark",t==="dark"),e.dataset.scheme=t},Rk=(e,t)=>{const r=parseFloat(e);return Number.isFinite(r)?r:t},gg=()=>{try{return window.localStorage}catch{return null}},Ok=(e,t,r)=>Rk(e.getPropertyValue(`--aid-${t}`),Rk(e.getPropertyValue(`--aid-t-${t}`),r)),Sj=e=>{const t=getComputedStyle(e);return{x:Ok(t,"offset-x",wk.x),y:Ok(t,"offset-y",wk.y)}},zk=()=>({width:window.innerWidth,height:window.innerHeight}),Cj={scheme:"auto"},Tj=(e,t)=>{const r=B.useSyncExternalStore(e.subscribe,()=>e.get().theme),n=B.useSyncExternalStore(e.subscribe,()=>e.get().adminTheme),i=Fw("(prefers-color-scheme: dark)"),a=xj(Cj,n,r),o=wj(a.scheme,i),s=B.useRef({}),l=JSON.stringify(bj(a));return B.useLayoutEffect(()=>{const c=JSON.parse(l);_j(t,c,s.current),s.current=c},[t,l]),B.useLayoutEffect(()=>{kj(t,o)},[t,o]),a},Aj=e=>{const{store:t,api:r}=e,n=B.useSyncExternalStore(t.subscribe,()=>t.get().open),i=B.useSyncExternalStore(t.subscribe,()=>t.get().lang),a=B.useCallback(o=>{t.set({adminTheme:o})},[t]);return k.jsx(l3,{api:r,lang:i,open:n,onAdminTheme:a,children:k.jsx(Dj,{...e})})},Dj=({store:e,root:t,mode:r,corner:n,draggable:i,api:a})=>{const o=B.useSyncExternalStore(e.subscribe,()=>e.get().open),s=B.useSyncExternalStore(e.subscribe,()=>e.get().lang),l=Tj(e,t),c=n??l.position??"bottom-right",f=Fw(`(max-width: ${oj}px)`),h=B.useRef(null),[v,p]=B.useState(()=>df(lj(gg())??Sj(t),zk(),hg));B.useEffect(()=>{if(r!=="launcher")return;const j=()=>{const H=h.current,W=H?{width:H.offsetWidth,height:H.offsetHeight}:hg;p(K=>df(K,zk(),W))};return window.addEventListener("resize",j),()=>{window.removeEventListener("resize",j)}},[r]);const g=B.useCallback(()=>{e.set({open:!1})},[e]),y=B.useCallback(()=>{e.set({open:!e.get().open})},[e]),x=B.useRef(o);B.useEffect(()=>{x.current&&!o&&h.current?.focus({preventScroll:!0}),x.current=o},[o]);const b=l.title??Sn(s,"title"),_=Rw(a.apiUrl),C=B.useMemo(()=>({animated:o,assetsBase:_}),[o,_]),[A,M]=B.useState({expanded:!1,byDashboard:!1}),{expanded:D}=A,E=r==="launcher"&&!f,N=B.useCallback(j=>{M({expanded:j,byDashboard:!1})},[]),O=B.useCallback(j=>{M(H=>O5(H,j,E))},[E]),L=l.scheme??"auto",R=B.useMemo(()=>({lang:s,scheme:L,expanded:D,canExpand:E,setExpanded:N,expandForDashboard:O,close:r==="launcher"?g:void 0,update:j=>{const H={...Mw(gg()),...j};R5(gg(),H),e.set({...j.lang?{lang:j.lang}:{},theme:{...e.get().theme,...Ew(j)}})}}),[s,L,D,E,N,O,r,g,e]);return r==="window"?k.jsx(bv.Provider,{value:R,children:k.jsx(Cv.Provider,{value:C,children:k.jsx(bk,{open:o,title:b,logoUrl:l.logoUrl,fullscreen:!1,onClose:g})})}):k.jsx(bv.Provider,{value:R,children:k.jsxs(Cv.Provider,{value:C,children:[k.jsx("div",{part:"overlay",className:"aid-overlay","data-state":o?"open":"closed","aria-hidden":!0,onClick:g}),k.jsx(bk,{open:o,title:b,logoUrl:l.logoUrl,fullscreen:f,expanded:D&&!f,onClose:g}),o?null:k.jsx(Tk,{ref:h,open:o,lang:s,corner:c,offset:v,draggable:i&&!f,variant:l.launcher,label:l.launcherLabel,shape:l.launcherShape,onOffsetChange:p,onToggle:y})]})})},jk="",Mj=`${pR}
|
|
19
|
+
${j5}`,mg=(e,t,r,n)=>{const i=e.shadowRoot??e.attachShadow({mode:"open"});i.replaceChildren();const a=document.createElement("style");a.textContent=Mj;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=Mw(s),c=z5({open:t.defaultOpen??r==="window",lang:l.lang??Tw(t.lang),theme:{...t.theme,...Ew(l)},adminTheme:null});let f=c.get().open;const h=c.subscribe(()=>{const{open:x}=c.get();x!==f&&(f=x,t.onOpenChange?.(x))}),v=E5({apiUrl:t.apiUrl??jk,siteKey:t.siteKey,visitorId:A5(t.visitorId,s)}),p=hR.createRoot(o);p.render(k.jsx(B.StrictMode,{children:k.jsx(Aj,{store:c,root:o,mode:r,corner:t.position,draggable:t.draggable??!0,api:v})}));let g=!0;return{open:()=>{c.set({open:!0})},close:()=>{c.set({open:!1})},setTheme:x=>{c.set({theme:{...c.get().theme,...x}})},setLang:x=>{c.set({lang:Tw(x)})},unmount:()=>{g&&(g=!1,h(),p.unmount(),V5(),i.replaceChildren(),n?.())}}};function Fk(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 mg(e,r,"launcher");const n=document.createElement("div");return n.setAttribute("data-ai-dana-chat",""),n.style.setProperty("all","initial"),document.body.append(n),mg(n,r,"launcher",()=>{n.remove()})}const Bk=(e,t)=>mg(e,t,"window"),Hk=["light","dark","auto"];class yg extends HTMLElement{constructor(){super(...arguments);_l(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&&Hk.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")?Fk(this,o):Bk(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&&Hk.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)}}_l(yg,"observedAttributes",["lang","theme"]),typeof customElements<"u"&&!customElements.get("ai-dana-chat")&&customElements.define("ai-dana-chat",yg);const Ej=()=>({parts:[]}),Vk=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),os=e=>typeof e=="string";function Lj(e,t){Vk(t)&&(e.metadata={...e.metadata,...t})}function $k(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 Ij(e,t,r){if(r.transient===!0)return;const n=os(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 Pj(e,t){if(!Vk(t)||!os(t.type))throw new Jo("stream_error");switch(t.type){case"start":case"finish":case"message-metadata":Lj(e,t.messageMetadata);return;case"text-start":os(t.id)&&$k(e,t.id);return;case"text-delta":os(t.id)&&os(t.delta)&&($k(e,t.id).text+=t.delta);return;case"data-step":case"data-attachment":case"data-block":Ij(e,t.type,t);return;case"error":throw new Jo(os(t.errorText)&&t.errorText!==""?t.errorText:"stream_error");default:return}}const Nj="[DONE]";function Uk(){const e=new Error("The operation was aborted.");return e.name="AbortError",e}function Rj(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*Oj(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 Uk();for(;;){const{done:o,value:s}=await r.read();if(t?.aborted)throw Uk();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 c=a.indexOf(`
|
|
23
|
+
|
|
24
|
+
`);c!==-1;c=a.indexOf(`
|
|
25
|
+
|
|
26
|
+
`)){const f=Rj(a.slice(0,c));if(a=a.slice(c+2),f===Nj)return;f!==void 0&&(yield f)}a+=l}}finally{t?.removeEventListener("abort",n),n()}}const xg=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),bg=e=>typeof e=="string"&&e!=="";function wg(e){return bg(e)?e:typeof e=="number"&&Number.isInteger(e)?String(e):void 0}function zj(e){if(!xg(e))return;const t=wg(e.threadId),r=wg(e.userMessageId),n=wg(e.assistantMessageId);if(!(t==null||r==null||n==null||typeof e.mode!="string"))return{threadId:t,userMessageId:r,assistantMessageId:n,mode:e.mode}}function jj(e,t){if(!xg(t)||!bg(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 Fj(e){if(!xg(e)||!bg(e.url))return;const{name:t}=e;if(!(t!=null&&typeof t!="string"))return{name:t?.trim()?t:Bj(e.url),url:e.url}}function Bj(e){const t=e.split("?")[0]??e,r=t.slice(t.lastIndexOf("/")+1);try{return decodeURIComponent(r)}catch{return r}}function Wk(e){const t={text:"",steps:[],attachments:[],blocks:[],metadata:zj(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?jj(r.id,r.data):void 0;n!=null&&t.steps.push(n)}else if(r.type==="data-block"){const n=gw(r.data);n!=null&&t.blocks.push(n)}else{const n=Fj(r.data);n!=null&&t.attachments.push(n)}return t}async function _g(e,t,r){const n=await x5(e),i=Ej();let a=!1,o=0;const s=()=>{o=Date.now(),a=!1,t(Wk(i))};try{for await(const l of Oj(n,r))Pj(i,Hj(l)),a=!0,Date.now()-o>=YR&&s()}catch(l){throw a&&s(),l instanceof Error&&l.name==="AbortError"||l instanceof Jo?l:new Jo(l instanceof Error?l.message:"stream_error")}a&&s()}function Hj(e){try{return JSON.parse(e)}catch{throw new Jo("stream_error")}}async function Vj({transport:e,request:t,threadId:r,signal:n,onSnapshot:i}){const a=await g5(e,v5(t,r),n);await _g(a,i,n)}async function $j(e,t,r,n){const i=await m5(e,t,r);await _g(i,n,r)}const Gk=Object.freeze(Object.defineProperty({__proto__:null,readUiMessageStream:_g,resumeChatAnswer:$j,streamChatAnswer:Vj,toSnapshot:Wk},Symbol.toStringTag,{value:"Module"}));var kg=function(e,t){return kg=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])},kg(e,t)};function pe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");kg(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Sg=12,Uj="sans-serif",Wa=Sg+"px "+Uj,Wj=20,Gj=100,Yj="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Xj(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)-Wj)/Gj;t[n]=i}return t}var qj=Xj(Yj),ss={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var e,t;return function(r,n){if(!e){var i=ss.createCanvas();e=i&&i.getContext("2d")}if(e)return t!==n&&(t=e.font=n||Wa),e.measureText(r);r=r||"",n=n||Wa;var a=/((?:\d+)?\.?\d*)px/.exec(n),o=a&&+a[1]||Sg,s=0;if(n.indexOf("mono")>=0)s=o*r.length;else for(var l=0;l<r.length;l++){var c=qj[r[l]];s+=c==null?o:c*o}return{width:s}}})(),loadImage:function(e,t,r){var n=new Image;return n.onload=t,n.onerror=r,n.src=e,n}},Yk=$i(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),Xk=$i(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),Hl=Object.prototype.toString,mf=Array.prototype,Kj=mf.forEach,Zj=mf.filter,Cg=mf.slice,Qj=mf.map,qk=function(){}.constructor,yf=qk?qk.prototype:null,Tg="__proto__",Jj=2311;function Kk(){return Jj++}function Ag(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<"u"&&console.error.apply(console,e)}function qe(e){if(e==null||typeof e!="object")return e;var t=e,r=Hl.call(e);if(r==="[object Array]"){if(!Ul(e)){t=[];for(var n=0,i=e.length;n<i;n++)t[n]=qe(e[n])}}else if(Xk[r]){if(!Ul(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(!Yk[r]&&!Ul(e)&&!Vl(e)){t={};for(var o in e)e.hasOwnProperty(o)&&o!==Tg&&(t[o]=qe(e[o]))}return t}function Ze(e,t,r){if(!Pe(t)||!Pe(e))return r?qe(t):e;for(var n in t)if(t.hasOwnProperty(n)&&n!==Tg){var i=e[n],a=t[n];Pe(a)&&Pe(i)&&!ve(a)&&!ve(i)&&!Vl(a)&&!Vl(i)&&!Zk(a)&&!Zk(i)&&!Ul(a)&&!Ul(i)?Ze(i,a,r):(r||!(n in e))&&(e[n]=qe(t[n]))}return e}function ue(e,t){if(Object.assign)Object.assign(e,t);else for(var r in t)t.hasOwnProperty(r)&&r!==Tg&&(e[r]=t[r]);return e}function tt(e,t,r){for(var n=xt(t),i=0,a=n.length;i<a;i++){var o=n[i];e[o]==null&&(e[o]=t[o])}return e}function rt(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 eF(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 Cn(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 tt(e,t)}function br(e){return!e||typeof e=="string"?!1:typeof e.length=="number"}function U(e,t,r){if(e&&t)if(e.forEach&&e.forEach===Kj)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 Te(e,t,r){if(!e)return[];if(!t)return Mg(e);if(e.map&&e.map===Qj)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 $i(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 Ft(e,t,r){if(!e)return[];if(!t)return Mg(e);if(e.filter&&e.filter===Zj)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 xt(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 tF(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return function(){return e.apply(t,r.concat(Cg.call(arguments)))}}var ht=yf&&$e(yf.bind)?yf.call.bind(yf.bind):tF;function ut(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return function(){return e.apply(this,t.concat(Cg.call(arguments)))}}function ve(e){return Array.isArray?Array.isArray(e):Hl.call(e)==="[object Array]"}function $e(e){return typeof e=="function"}function Ae(e){return typeof e=="string"}function Dg(e){return Hl.call(e)==="[object String]"}function lt(e){return typeof e=="number"}function Pe(e){var t=typeof e;return t==="function"||!!e&&t==="object"}function Zk(e){return!!Yk[Hl.call(e)]}function wr(e){return!!Xk[Hl.call(e)]}function Vl(e){return typeof e=="object"&&typeof e.nodeType=="number"&&typeof e.ownerDocument=="object"}function xf(e){return e.colorStops!=null}function rF(e){return e.image!=null}function bf(e){return e!==e}function ls(){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 Ue(e,t){return e??t}function $l(e,t,r){return e??t??r}function Mg(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return Cg.apply(e,t)}function Qk(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 gi(e,t){if(!e)throw new Error(t)}function Wn(e){return e==null?null:typeof e.trim=="function"?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Jk="__ec_primitive__";function Eg(e){e[Jk]=!0}function Ul(e){return e[Jk]}var nF=(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 xt(this.data)},e.prototype.forEach=function(t){var r=this.data;for(var n in r)r.hasOwnProperty(n)&&t(r[n],n)},e})(),eS=typeof Map=="function";function iF(){return eS?new Map:new nF}var aF=(function(){function e(t){var r=ve(t);this.data=iF();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 eS?Array.from(t):t},e.prototype.removeKey=function(t){this.data.delete(t)},e})();function Ge(e){return new aF(e)}function oF(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 wf(e,t){var r;if(Object.create)r=Object.create(e);else{var n=function(){};n.prototype=e,r=new n}return t&&ue(r,t),r}function tS(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function Ga(e,t){return e.hasOwnProperty(t)}function _r(){}var sF=180/Math.PI,lF=(function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e})(),uF=(function(){function e(){this.browser=new lF,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})(),je=new uF;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(je.wxa=!0,je.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?je.worker=!0:!je.hasGlobalWindow||"Deno"in window?(je.node=!0,je.svgSupported=!0):cF(navigator.userAgent,je);function cF(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),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}var fF=".",Ya="___EC__COMPONENT__CONTAINER___",rS="___EC__EXTENDED_CLASS___";function Gn(e){var t={main:"",sub:""};if(e){var r=e.split(fF);t.main=r[0]||"",t.sub=r[1]||""}return t}function dF(e){gi(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}function hF(e){return!!(e&&e[rS])}function Lg(e,t){e.$constructor=e,e.extend=function(r){var n=this,i;return pF(n)?i=(function(a){pe(o,a);function o(){return a.apply(this,arguments)||this}return o})(n):(i=function(){(r.$constructor||n).apply(this,arguments)},eF(i,this)),ue(i.prototype,r),i[rS]=!0,i.extend=this.extend,i.superCall=mF,i.superApply=yF,i.superClass=n,i}}function pF(e){return $e(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function nS(e,t){e.extend=t.extend}var vF=Math.round(Math.random()*10);function gF(e){var t=["__\0is_clz",vF++].join("_");e.prototype[t]=!0,e.isInstance=function(r){return!!(r&&r[t])}}function mF(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 yF(e,t,r){return this.superClass.prototype[t].apply(e,r)}function _f(e){var t={};e.registerClass=function(n){var i=n.type||n.prototype.type;if(i){dF(i),n.prototype.type=i;var a=Gn(i);if(!a.sub)t[a.main]=n;else if(a.sub!==Ya){var o=r(a);o[a.sub]=n}}return n},e.getClass=function(n,i,a){var o=t[n];if(o&&o[Ya]&&(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=Gn(n),a=[],o=t[i.main];return o&&o[Ya]?U(o,function(s,l){l!==Ya&&a.push(s)}):a.push(o),a},e.hasClass=function(n){var i=Gn(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=Gn(n),a=t[i.main];return a&&a[Ya]};function r(n){var i=t[n.main];return(!i||!i[Ya])&&(i=t[n.main]={},i[Ya]=!0),i}}function Wl(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&&rt(i,l)>=0||a&&rt(a,l)<0)){var c=n.getShallow(l,t);c!=null&&(o[e[s][0]]=c)}}return o}}var xF=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],bF=Wl(xF),wF=(function(){function e(){}return e.prototype.getAreaStyle=function(t,r){return bF(this,t,r)},e})(),iS=(function(){function e(t){this.value=t}return e})(),_F=(function(){function e(){this._len=0}return e.prototype.insert=function(t){var r=new iS(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})(),Gl=(function(){function e(t){this._list=new _F,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 iS(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})(),Ig=new Gl(50);function kF(e){if(typeof e=="string"){var t=Ig.get(e);return t&&t.image}else return e}function aS(e,t,r,n,i){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!r)return t;var a=Ig.get(e),o={hostEl:r,cb:n,cbPayload:i};return a?(t=a.image,!kf(t)&&a.pending.push(o)):(t=ss.loadImage(e,oS,oS),t.__zrImageSrc=e,Ig.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function oS(){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 kf(e){return e&&e.width&&e.height}function us(){return[1,0,0,1,0,0]}function Pg(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function SF(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 cs(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 Ng(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 Rg(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],c=t[5],f=Math.sin(r),h=Math.cos(r);return e[0]=i*h+s*f,e[1]=-i*f+s*h,e[2]=a*h+l*f,e[3]=-a*f+h*l,e[4]=h*(o-n[0])+f*(c-n[1])+n[0],e[5]=h*(c-n[1])-f*(o-n[0])+n[1],e}function CF(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 Og(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}var He=(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})(),Sf=Math.min,Cf=Math.max,Xa=new He,qa=new He,Ka=new He,Za=new He,Yl=new He,Xl=new He,nt=(function(){function e(t,r,n,i){n<0&&(t=t+n,n=-n),i<0&&(r=r+i,i=-i),this.x=t,this.y=r,this.width=n,this.height=i}return e.prototype.union=function(t){var r=Sf(t.x,this.x),n=Sf(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Cf(t.x+t.width,this.x+this.width)-r:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Cf(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){var r=this,n=t.width/r.width,i=t.height/r.height,a=us();return Ng(a,a,[-r.x,-r.y]),CF(a,a,[n,i]),Ng(a,a,[t.x,t.y]),a},e.prototype.intersect=function(t,r){if(!t)return!1;t instanceof e||(t=e.create(t));var n=this,i=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,l=t.x,c=t.x+t.width,f=t.y,h=t.y+t.height,v=!(a<l||c<i||s<f||h<o);if(r){var p=1/0,g=0,y=Math.abs(a-l),x=Math.abs(c-i),b=Math.abs(s-f),_=Math.abs(h-o),C=Math.min(y,x),A=Math.min(b,_);a<l||c<i?C>g&&(g=C,y<x?He.set(Xl,-y,0):He.set(Xl,x,0)):C<p&&(p=C,y<x?He.set(Yl,y,0):He.set(Yl,-x,0)),s<f||h<o?A>g&&(g=A,b<_?He.set(Xl,0,-b):He.set(Xl,0,_)):C<p&&(p=C,b<_?He.set(Yl,0,b):He.set(Yl,0,-_))}return r&&He.copy(r,v?Yl:Xl),v},e.prototype.contain=function(t,r){var n=this;return t>=n.x&&t<=n.x+n.width&&r>=n.y&&r<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(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.x,t.y,t.width,t.height)},e.copy=function(t,r){t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height},e.applyTransform=function(t,r,n){if(!n){t!==r&&e.copy(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}Xa.x=Ka.x=r.x,Xa.y=Za.y=r.y,qa.x=Za.x=r.x+r.width,qa.y=Ka.y=r.y+r.height,Xa.transform(n),Za.transform(n),qa.transform(n),Ka.transform(n),t.x=Sf(Xa.x,qa.x,Ka.x,Za.x),t.y=Sf(Xa.y,qa.y,Ka.y,Za.y);var l=Cf(Xa.x,qa.x,Ka.x,Za.x),c=Cf(Xa.y,qa.y,Ka.y,Za.y);t.width=l-t.x,t.height=c-t.y},e})(),sS={};function Br(e,t){t=t||Wa;var r=sS[t];r||(r=sS[t]=new Gl(500));var n=r.get(e);return n==null&&(n=ss.measureText(e,t).width,r.put(e,n)),n}function lS(e,t,r,n){var i=Br(e,t),a=jg(t),o=ql(0,i,r),s=fs(0,a,n),l=new nt(o,s,i,a);return l}function zg(e,t,r,n){var i=((e||"")+"").split(`
|
|
27
|
+
`),a=i.length;if(a===1)return lS(i[0],t,r,n);for(var o=new nt(0,0,0,0),s=0;s<i.length;s++){var l=lS(i[s],t,r,n);s===0?o.copy(l):o.union(l)}return o}function ql(e,t,r){return r==="right"?e-=t:r==="center"&&(e-=t/2),e}function fs(e,t,r){return r==="middle"?e-=t/2:r==="bottom"&&(e-=t),e}function jg(e){return Br("国",e)}function Ui(e,t){return typeof e=="string"?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function Tf(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,c=r.y,f="left",h="top";if(n instanceof Array)l+=Ui(n[0],r.width),c+=Ui(n[1],r.height),f=null,h=null;else switch(n){case"left":l-=i,c+=s,f="right",h="middle";break;case"right":l+=i+o,c+=s,h="middle";break;case"top":l+=o/2,c-=i,f="center",h="bottom";break;case"bottom":l+=o/2,c+=a+i,f="center";break;case"inside":l+=o/2,c+=s,f="center",h="middle";break;case"insideLeft":l+=i,c+=s,h="middle";break;case"insideRight":l+=o-i,c+=s,f="right",h="middle";break;case"insideTop":l+=o/2,c+=i,f="center";break;case"insideBottom":l+=o/2,c+=a-i,f="center",h="bottom";break;case"insideTopLeft":l+=i,c+=i;break;case"insideTopRight":l+=o-i,c+=i,f="right";break;case"insideBottomLeft":l+=i,c+=a-i,h="bottom";break;case"insideBottomRight":l+=o-i,c+=a-i,f="right",h="bottom";break}return e=e||{},e.x=l,e.y=c,e.align=f,e.verticalAlign=h,e}var Fg=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function TF(e,t,r,n,i,a){if(!r){e.text="",e.isTruncated=!1;return}var o=(t+"").split(`
|
|
28
|
+
`);a=uS(r,n,i,a);for(var s=!1,l={},c=0,f=o.length;c<f;c++)cS(l,o[c],a),o[c]=l.textLine,s=s||l.isTruncated;e.text=o.join(`
|
|
29
|
+
`),e.isTruncated=s}function uS(e,t,r,n){n=n||{};var i=ue({},n);i.font=t,r=Ue(r,"..."),i.maxIterations=Ue(n.maxIterations,2);var a=i.minChar=Ue(n.minChar,0);i.cnCharWidth=Br("国",t);var o=i.ascCharWidth=Br("a",t);i.placeholder=Ue(n.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<a&&s>=o;l++)s-=o;var c=Br(r,t);return c>s&&(r="",c=0),s=e-c,i.ellipsis=r,i.ellipsisWidth=c,i.contentWidth=s,i.containerWidth=e,i}function cS(e,t,r){var n=r.containerWidth,i=r.font,a=r.contentWidth;if(!n){e.textLine="",e.isTruncated=!1;return}var o=Br(t,i);if(o<=n){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=r.maxIterations){t+=r.ellipsis;break}var l=s===0?AF(t,a,r.ascCharWidth,r.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,l),o=Br(t,i)}t===""&&(t=r.placeholder),e.textLine=t,e.isTruncated=!0}function AF(e,t,r,n){for(var i=0,a=0,o=e.length;a<o&&i<t;a++){var s=e.charCodeAt(a);i+=0<=s&&s<=127?r:n}return a}function DF(e,t){e!=null&&(e+="");var r=t.overflow,n=t.padding,i=t.font,a=r==="truncate",o=jg(i),s=Ue(t.lineHeight,o),l=!!t.backgroundColor,c=t.lineOverflow==="truncate",f=!1,h=t.width,v;h!=null&&(r==="break"||r==="breakAll")?v=e?dS(e,t.font,h,r==="breakAll",0).lines:[]:v=e?e.split(`
|
|
30
|
+
`):[];var p=v.length*s,g=Ue(t.height,p);if(p>g&&c){var y=Math.floor(g/s);f=f||v.length>y,v=v.slice(0,y)}if(e&&a&&h!=null)for(var x=uS(h,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),b={},_=0;_<v.length;_++)cS(b,v[_],x),v[_]=b.textLine,f=f||b.isTruncated;for(var C=g,A=0,_=0;_<v.length;_++)A=Math.max(Br(v[_],i),A);h==null&&(h=A);var M=A;return n&&(C+=n[0]+n[2],M+=n[1]+n[3],h+=n[1]+n[3]),l&&(M=h),{lines:v,height:g,outerWidth:M,outerHeight:C,lineHeight:s,calculatedLineHeight:o,contentWidth:A,contentHeight:p,width:h,isTruncated:f}}var MF=(function(){function e(){}return e})(),fS=(function(){function e(t){this.tokens=[],t&&(this.tokens=t)}return e})(),EF=(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 LF(e,t){var r=new EF;if(e!=null&&(e+=""),!e)return r;for(var n=t.width,i=t.height,a=t.overflow,o=(a==="break"||a==="breakAll")&&n!=null?{width:n,accumWidth:0,breakAll:a==="breakAll"}:null,s=Fg.lastIndex=0,l;(l=Fg.exec(e))!=null;){var c=l.index;c>s&&Bg(r,e.substring(s,c),t,o),Bg(r,l[2],t,o,l[1]),s=Fg.lastIndex}s<e.length&&Bg(r,e.substring(s,e.length),t,o);var f=[],h=0,v=0,p=t.padding,g=a==="truncate",y=t.lineOverflow==="truncate",x={};function b(I,z,Y){I.width=z,I.lineHeight=Y,h+=Y,v=Math.max(v,z)}e:for(var _=0;_<r.lines.length;_++){for(var C=r.lines[_],A=0,M=0,D=0;D<C.tokens.length;D++){var E=C.tokens[D],N=E.styleName&&t.rich[E.styleName]||{},O=E.textPadding=N.padding,L=O?O[1]+O[3]:0,R=E.font=N.font||t.font;E.contentHeight=jg(R);var j=Ue(N.height,E.contentHeight);if(E.innerHeight=j,O&&(j+=O[0]+O[2]),E.height=j,E.lineHeight=$l(N.lineHeight,t.lineHeight,j),E.align=N&&N.align||t.align,E.verticalAlign=N&&N.verticalAlign||"middle",y&&i!=null&&h+E.lineHeight>i){var H=r.lines.length;D>0?(C.tokens=C.tokens.slice(0,D),b(C,M,A),r.lines=r.lines.slice(0,_+1)):r.lines=r.lines.slice(0,_),r.isTruncated=r.isTruncated||r.lines.length<H;break e}var W=N.width,K=W==null||W==="auto";if(typeof W=="string"&&W.charAt(W.length-1)==="%")E.percentWidth=W,f.push(E),E.contentWidth=Br(E.text,R);else{if(K){var Q=N.backgroundColor,re=Q&&Q.image;re&&(re=kF(re),kf(re)&&(E.width=Math.max(E.width,re.width*j/re.height)))}var X=g&&n!=null?n-M:null;X!=null&&X<E.width?!K||X<L?(E.text="",E.width=E.contentWidth=0):(TF(x,E.text,X-L,R,t.ellipsis,{minChar:t.truncateMinChar}),E.text=x.text,r.isTruncated=r.isTruncated||x.isTruncated,E.width=E.contentWidth=Br(E.text,R)):E.contentWidth=Br(E.text,R)}E.width+=L,M+=E.width,N&&(A=Math.max(A,E.lineHeight))}b(C,M,A)}r.outerWidth=r.width=Ue(n,v),r.outerHeight=r.height=Ue(i,h),r.contentHeight=h,r.contentWidth=v,p&&(r.outerWidth+=p[1]+p[3],r.outerHeight+=p[0]+p[2]);for(var _=0;_<f.length;_++){var E=f[_],$=E.percentWidth;E.width=parseInt($,10)/100*r.width}return r}function Bg(e,t,r,n,i){var a=t==="",o=i&&r.rich[i]||{},s=e.lines,l=o.font||r.font,c=!1,f,h;if(n){var v=o.padding,p=v?v[1]+v[3]:0;if(o.width!=null&&o.width!=="auto"){var g=Ui(o.width,n.width)+p;s.length>0&&g+n.accumWidth>n.width&&(f=t.split(`
|
|
31
|
+
`),c=!0),n.accumWidth=g}else{var y=dS(t,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=y.accumWidth+p,h=y.linesWidths,f=y.lines}}else f=t.split(`
|
|
32
|
+
`);for(var x=0;x<f.length;x++){var b=f[x],_=new MF;if(_.styleName=i,_.text=b,_.isLineHolder=!b&&!a,typeof o.width=="number"?_.width=o.width:_.width=h?h[x]:Br(b,l),!x&&!c){var C=(s[s.length-1]||(s[0]=new fS)).tokens,A=C.length;A===1&&C[0].isLineHolder?C[0]=_:(b||!A||a)&&C.push(_)}else s.push(new fS([_]))}}function IF(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var PF=$i(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function NF(e){return IF(e)?!!PF[e]:!0}function dS(e,t,r,n,i){for(var a=[],o=[],s="",l="",c=0,f=0,h=0;h<e.length;h++){var v=e.charAt(h);if(v===`
|
|
33
|
+
`){l&&(s+=l,f+=c),a.push(s),o.push(f),s="",l="",c=0,f=0;continue}var p=Br(v,t),g=n?!1:!NF(v);if(a.length?f+p>r:i+f+p>r){f?(s||l)&&(g?(s||(s=l,l="",c=0,f=c),a.push(s),o.push(f-c),l+=v,c+=p,s="",f=c):(l&&(s+=l,l="",c=0),a.push(s),o.push(f),s=v,f=p)):g?(a.push(l),o.push(c),l=v,c=p):(a.push(v),o.push(p));continue}f+=p,g?(l+=v,c+=p):(l&&(s+=l,l="",c=0),s+=v)}return!a.length&&!s&&(s=e,l="",c=0),l&&(s+=l),s&&(a.push(s),o.push(f)),a.length===1&&(f+=i),{accumWidth:f,lines:a,linesWidths:o}}function ds(e,t){return e==null&&(e=0),t==null&&(t=0),[e,t]}function RF(e){return[e[0],e[1]]}function hS(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function pS(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function OF(e){return Math.sqrt(zF(e))}function zF(e){return e[0]*e[0]+e[1]*e[1]}function Hg(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function Vg(e,t){var r=OF(t);return r===0?(e[0]=0,e[1]=0):(e[0]=t[0]/r,e[1]=t[1]/r),e}function $g(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Ug=$g;function jF(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var hs=jF;function Wg(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 en(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 ps(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function vs(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}var vS=Pg,gS=5e-5;function Qa(e){return e>gS||e<-gS}var Ja=[],gs=[],Gg=us(),Yg=Math.abs,Xg=(function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(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 Qa(this.rotation)||Qa(this.x)||Qa(this.y)||Qa(this.scaleX-1)||Qa(this.scaleY-1)||Qa(this.skewX)||Qa(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||t)){n&&(vS(n),this.invTransform=null);return}n=n||us(),r?this.getLocalTransform(n):vS(n),t&&(r?cs(n,t,n):SF(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(t){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Ja);var n=Ja[0]<0?-1:1,i=Ja[1]<0?-1:1,a=((Ja[0]-n)*r+n)/Ja[0]||0,o=((Ja[1]-i)*r+i)/Ja[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||us(),Og(this.invTransform,t)},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||us(),cs(gs,t.invTransform,r),r=gs);var n=this.originX,i=this.originY;(n||i)&&(Gg[4]=n,Gg[5]=i,cs(gs,r,Gg),gs[4]-=n,gs[5]-=i,r=gs),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&&en(n,n,i),n},e.prototype.transformCoordToGlobal=function(t,r){var n=[t,r],i=this.transform;return i&&en(n,n,i),n},e.prototype.getLineScale=function(){var t=this.transform;return t&&Yg(t[0]-1)>1e-10&&Yg(t[3]-1)>1e-10?Math.sqrt(Yg(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){FF(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,c=t.rotation||0,f=t.x,h=t.y,v=t.skewX?Math.tan(t.skewX):0,p=t.skewY?Math.tan(-t.skewY):0;if(n||i||s||l){var g=n+s,y=i+l;r[4]=-g*a-v*y*o,r[5]=-y*o-p*g*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=p*a,r[2]=v*o,c&&Rg(r,r,c),r[4]+=n+f,r[5]+=i+h,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})(),Kl=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function FF(e,t){for(var r=0;r<Kl.length;r++){var n=Kl[r];e[n]=t[n]}}var Zl={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-Zl.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?Zl.bounceIn(e*2)*.5:Zl.bounceOut(e*2-1)*.5+.5}},Af=Math.pow,Wi=Math.sqrt,Df=1e-8,mS=1e-4,yS=Wi(3),Mf=1/3,Yn=ds(),tn=ds(),ms=ds();function Gi(e){return e>-Df&&e<Df}function xS(e){return e>Df||e<-Df}function $t(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 bS(e,t,r,n,i){var a=1-i;return 3*(((t-e)*a+2*(r-t)*i)*a+(n-r)*i*i)}function Ef(e,t,r,n,i,a){var o=n+3*(t-r)-e,s=3*(r-t*2+e),l=3*(t-e),c=e-i,f=s*s-3*o*l,h=s*l-9*o*c,v=l*l-3*s*c,p=0;if(Gi(f)&&Gi(h))if(Gi(s))a[0]=0;else{var g=-l/s;g>=0&&g<=1&&(a[p++]=g)}else{var y=h*h-4*f*v;if(Gi(y)){var x=h/f,g=-s/o+x,b=-x/2;g>=0&&g<=1&&(a[p++]=g),b>=0&&b<=1&&(a[p++]=b)}else if(y>0){var _=Wi(y),C=f*s+1.5*o*(-h+_),A=f*s+1.5*o*(-h-_);C<0?C=-Af(-C,Mf):C=Af(C,Mf),A<0?A=-Af(-A,Mf):A=Af(A,Mf);var g=(-s-(C+A))/(3*o);g>=0&&g<=1&&(a[p++]=g)}else{var M=(2*f*s-3*o*h)/(2*Wi(f*f*f)),D=Math.acos(M)/3,E=Wi(f),N=Math.cos(D),g=(-s-2*E*N)/(3*o),b=(-s+E*(N+yS*Math.sin(D)))/(3*o),O=(-s+E*(N-yS*Math.sin(D)))/(3*o);g>=0&&g<=1&&(a[p++]=g),b>=0&&b<=1&&(a[p++]=b),O>=0&&O<=1&&(a[p++]=O)}}return p}function wS(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(Gi(o)){if(xS(a)){var c=-s/a;c>=0&&c<=1&&(i[l++]=c)}}else{var f=a*a-4*o*s;if(Gi(f))i[0]=-a/(2*o);else if(f>0){var h=Wi(f),c=(-a+h)/(2*o),v=(-a-h)/(2*o);c>=0&&c<=1&&(i[l++]=c),v>=0&&v<=1&&(i[l++]=v)}}return l}function Lf(e,t,r,n,i,a){var o=(t-e)*i+e,s=(r-t)*i+t,l=(n-r)*i+r,c=(s-o)*i+o,f=(l-s)*i+s,h=(f-c)*i+c;a[0]=e,a[1]=o,a[2]=c,a[3]=h,a[4]=h,a[5]=f,a[6]=l,a[7]=n}function BF(e,t,r,n,i,a,o,s,l,c,f){var h,v=.005,p=1/0,g,y,x,b;Yn[0]=l,Yn[1]=c;for(var _=0;_<1;_+=.05)tn[0]=$t(e,r,i,o,_),tn[1]=$t(t,n,a,s,_),x=hs(Yn,tn),x<p&&(h=_,p=x);p=1/0;for(var C=0;C<32&&!(v<mS);C++)g=h-v,y=h+v,tn[0]=$t(e,r,i,o,g),tn[1]=$t(t,n,a,s,g),x=hs(tn,Yn),g>=0&&x<p?(h=g,p=x):(ms[0]=$t(e,r,i,o,y),ms[1]=$t(t,n,a,s,y),b=hs(ms,Yn),y<=1&&b<p?(h=y,p=b):v*=.5);return Wi(p)}function HF(e,t,r,n,i,a,o,s,l){for(var c=e,f=t,h=0,v=1/l,p=1;p<=l;p++){var g=p*v,y=$t(e,r,i,o,g),x=$t(t,n,a,s,g),b=y-c,_=x-f;h+=Math.sqrt(b*b+_*_),c=y,f=x}return h}function kr(e,t,r,n){var i=1-n;return i*(i*e+2*n*t)+n*n*r}function _S(e,t,r,n){return 2*((1-n)*(t-e)+n*(r-t))}function VF(e,t,r,n,i){var a=e-2*t+r,o=2*(t-e),s=e-n,l=0;if(Gi(a)){if(xS(o)){var c=-s/o;c>=0&&c<=1&&(i[l++]=c)}}else{var f=o*o-4*a*s;if(Gi(f)){var c=-o/(2*a);c>=0&&c<=1&&(i[l++]=c)}else if(f>0){var h=Wi(f),c=(-o+h)/(2*a),v=(-o-h)/(2*a);c>=0&&c<=1&&(i[l++]=c),v>=0&&v<=1&&(i[l++]=v)}}return l}function kS(e,t,r){var n=e+r-2*t;return n===0?.5:(e-t)/n}function If(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 $F(e,t,r,n,i,a,o,s,l){var c,f=.005,h=1/0;Yn[0]=o,Yn[1]=s;for(var v=0;v<1;v+=.05){tn[0]=kr(e,r,i,v),tn[1]=kr(t,n,a,v);var p=hs(Yn,tn);p<h&&(c=v,h=p)}h=1/0;for(var g=0;g<32&&!(f<mS);g++){var y=c-f,x=c+f;tn[0]=kr(e,r,i,y),tn[1]=kr(t,n,a,y);var p=hs(tn,Yn);if(y>=0&&p<h)c=y,h=p;else{ms[0]=kr(e,r,i,x),ms[1]=kr(t,n,a,x);var b=hs(ms,Yn);x<=1&&b<h?(c=x,h=b):f*=.5}}return Wi(h)}function UF(e,t,r,n,i,a,o){for(var s=e,l=t,c=0,f=1/o,h=1;h<=o;h++){var v=h*f,p=kr(e,r,i,v),g=kr(t,n,a,v),y=p-s,x=g-l;c+=Math.sqrt(y*y+x*x),s=p,l=g}return c}var WF=/cubic-bezier\(([0-9,\.e ]+)\)/;function SS(e){var t=e&&WF.exec(e);if(t){var r=t[1].split(","),n=+Wn(r[0]),i=+Wn(r[1]),a=+Wn(r[2]),o=+Wn(r[3]);if(isNaN(n+i+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:Ef(0,n,a,1,l,s)&&$t(0,i,o,1,s[0])}}}var GF=(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||_r,this.ondestroy=t.ondestroy||_r,this.onrestart=t.onrestart||_r,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:Zl[t]||SS(t)},e})(),CS={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 Yi(e){return e=Math.round(e),e<0?0:e>255?255:e}function qg(e){return e<0?0:e>1?1:e}function Kg(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Yi(parseFloat(t)/100*255):Yi(parseInt(t,10))}function Ql(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?qg(parseFloat(t)/100):qg(parseFloat(t))}function Zg(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 Pf(e,t,r){return e+(t-e)*r}function rn(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function Qg(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var TS=new Gl(20),Nf=null;function ys(e,t){Nf&&Qg(Nf,t),Nf=TS.put(e,Nf||t.slice())}function mi(e,t){if(e){t=t||[];var r=TS.get(e);if(r)return Qg(t,r);e=e+"";var n=e.replace(/ /g,"").toLowerCase();if(n in CS)return Qg(t,CS[n]),ys(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)){rn(t,0,0,0,1);return}return rn(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),ys(e,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){rn(t,0,0,0,1);return}return rn(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),ys(e,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),c=n.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(c.length!==4)return c.length===3?rn(t,+c[0],+c[1],+c[2],1):rn(t,0,0,0,1);f=Ql(c.pop());case"rgb":if(c.length>=3)return rn(t,Kg(c[0]),Kg(c[1]),Kg(c[2]),c.length===3?f:Ql(c[3])),ys(e,t),t;rn(t,0,0,0,1);return;case"hsla":if(c.length!==4){rn(t,0,0,0,1);return}return c[3]=Ql(c[3]),AS(c,t),ys(e,t),t;case"hsl":if(c.length!==3){rn(t,0,0,0,1);return}return AS(c,t),ys(e,t),t;default:return}}rn(t,0,0,0,1)}}function AS(e,t){var r=(parseFloat(e[0])%360+360)%360/360,n=Ql(e[1]),i=Ql(e[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],rn(t,Yi(Zg(o,a,r+.3333333333333333)*255),Yi(Zg(o,a,r)*255),Yi(Zg(o,a,r-.3333333333333333)*255),1),e.length===4&&(t[3]=e[3]),t}function DS(e,t){var r=mi(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 Rf(r,r.length===4?"rgba":"rgb")}}function YF(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=mi(t[i]),s=mi(t[a]),l=n-i,c=Rf([Yi(Pf(o[0],s[0],l)),Yi(Pf(o[1],s[1],l)),Yi(Pf(o[2],s[2],l)),qg(Pf(o[3],s[3],l))],"rgba");return r?{color:c,leftIndex:i,rightIndex:a,value:n}:c}}function Rf(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 Of(e,t){var r=mi(e);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*t:0}var MS=new Gl(100);function ES(e){if(Ae(e)){var t=MS.get(e);return t||(t=DS(e,-.1),MS.put(e,t)),t}else if(xf(e)){var r=ue({},e);return r.colorStops=Te(e.colorStops,function(n){return{offset:n.offset,color:DS(n.color,-.1)}}),r}return e}function XF(e){return e.type==="linear"}function qF(e){return e.type==="radial"}(function(){return je.hasGlobalWindow&&$e(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<"u"?function(e){return Buffer.from(e).toString("base64")}:function(e){return null}})();var Jg=Array.prototype.slice;function yi(e,t,r){return(t-e)*r+e}function em(e,t,r,n){for(var i=t.length,a=0;a<i;a++)e[a]=yi(t[a],r[a],n);return e}function KF(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]=yi(t[o][s],r[o][s],n)}return e}function zf(e,t,r,n){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+r[a]*n;return e}function LS(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 ZF(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 QF(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]:Jg.call(i[l]))}for(var c=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<c;f++)isNaN(n[l][f])&&(n[l][f]=i[l][f])}}function jf(e){if(br(e)){var t=e.length;if(br(e[0])){for(var r=[],n=0;n<t;n++)r.push(Jg.call(e[n]));return r}return Jg.call(e)}return e}function Ff(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 JF(e){return br(e&&e[0])?2:1}var Bf=0,Hf=1,IS=2,Jl=3,tm=4,rm=5,PS=6;function NS(e){return e===tm||e===rm}function Vf(e){return e===Hf||e===IS}var eu=[0,0,0,0],eB=(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=PS,l=r;if(br(r)){var c=JF(r);s=c,(c===1&&!lt(r[0])||c===2&&!lt(r[0][0]))&&(o=!0)}else if(lt(r)&&!bf(r))s=Bf;else if(Ae(r))if(!isNaN(+r))s=Bf;else{var f=mi(r);f&&(l=f,s=Jl)}else if(xf(r)){var h=ue({},l);h.colorStops=Te(r.colorStops,function(p){return{offset:p.offset,color:mi(p.color)}}),XF(r)?s=tm:qF(r)&&(s=rm),l=h}a===0?this.valType=s:(s!==this.valType||s===PS)&&(o=!0),this.discrete=this.discrete||o;var v={time:t,value:l,rawValue:r,percent:0};return n&&(v.easing=n,v.easingFunc=$e(n)?n:Zl[n]||SS(n)),i.push(v),v},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=Vf(i),c=NS(i),f=0;f<a;f++){var h=n[f],v=h.value,p=o.value;h.percent=h.time/t,s||(l&&f!==a-1?QF(v,p,i):c&&ZF(v.colorStops,p.colorStops))}if(!s&&i!==rm&&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===Bf?n[f].additiveValue=n[f].value-g:i===Jl?n[f].additiveValue=zf([],n[f].value,g,-1):Vf(i)&&(n[f].additiveValue=i===Hf?zf([],n[f].value,g,-1):LS([],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,c=a===Jl,f,h=this._lastFr,v=Math.min,p,g;if(s===1)p=g=o[0];else{if(r<0)f=0;else if(r<this._lastFrP){var y=v(h+1,s-1);for(f=y;f>=0&&!(o[f].percent<=r);f--);f=v(f,s-2)}else{for(f=h;f<s&&!(o[f].percent>r);f++);f=v(f-1,s-2)}g=o[f+1],p=o[f]}if(p&&g){this._lastFr=f,this._lastFrP=r;var x=g.percent-p.percent,b=x===0?1:v((r-p.percent)/x,1);g.easingFunc&&(b=g.easingFunc(b));var _=n?this._additiveValue:c?eu:t[l];if((Vf(a)||c)&&!_&&(_=this._additiveValue=[]),this.discrete)t[l]=b<1?p.rawValue:g.rawValue;else if(Vf(a))a===Hf?em(_,p[i],g[i],b):KF(_,p[i],g[i],b);else if(NS(a)){var C=p[i],A=g[i],M=a===tm;t[l]={type:M?"linear":"radial",x:yi(C.x,A.x,b),y:yi(C.y,A.y,b),colorStops:Te(C.colorStops,function(E,N){var O=A.colorStops[N];return{offset:yi(E.offset,O.offset,b),color:Ff(em([],E.color,O.color,b))}}),global:A.global},M?(t[l].x2=yi(C.x2,A.x2,b),t[l].y2=yi(C.y2,A.y2,b)):t[l].r=yi(C.r,A.r,b)}else if(c)em(_,p[i],g[i],b),n||(t[l]=Ff(_));else{var D=yi(p[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===Bf?t[n]=t[n]+i:r===Jl?(mi(t[n],eu),zf(eu,eu,i,1),t[n]=Ff(eu)):r===Hf?zf(t[n],t[n],i,1):r===IS&&LS(t[n],t[n],i,1)},e})(),nm=(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){Ag("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,xt(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 eB(s);var c=void 0,f=this._getAdditiveTrack(s);if(f){var h=f.keyframes,v=h[h.length-1];c=v&&v.value,f.valType===Jl&&c&&(c=Ff(c))}else c=this._target[s];if(c==null)continue;t>0&&l.addKeyframe(0,jf(c),i),this._trackKeys.push(s)}l.addKeyframe(t,jf(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),c=s.keyframes,f=c.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var h=c[f-1];h&&(r._target[s.propName]=h.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var v=new GF({life:i,loop:this._loop,delay:this._delay||0,onframe:function(p){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,p);var b=r._onframeCbs;if(b)for(var x=0;x<b.length;x++)b[x](r._target,p)},ondestroy:function(){r._doneCallback()}});this._clip=v,this.animation&&this.animation.addClip(v),t&&v.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 Te(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]=jf(l.rawValue))}}}},e.prototype.__changeFinalValue=function(t,r){r=r||xt(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})(),Xn=(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},c=a[t].length-1,f=a[t][c];return f&&f.callAtLast?a[t].splice(c,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 c=i[l];if(!(a&&a.filter&&c.query!=null&&!a.filter(t,c.query)))switch(o){case 0:c.h.call(c.ctx);break;case 1:c.h.call(c.ctx,r[0]);break;case 2:c.h.call(c.ctx,r[0],r[1]);break;default:c.h.apply(c.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,c=0;c<l;c++){var f=i[c];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})(),RS=1;je.hasGlobalWindow&&(RS=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var $f=RS,im=.4,am="#333",om="#ccc",tB="#eee",Hr=1,tu=2,xs=4,sm="__zr_normal__",lm=Kl.concat(["ignore"]),rB=$i(Kl,function(e,t){return e[t]=!0,e},{ignore:!1}),bs={},nB=new nt(0,0,0,0),Uf=(function(){function e(t){this.id=Kk(),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 c=!1;if(a.copyTransform(r),n.position!=null){var f=nB;n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),i||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(bs,n,f):Tf(bs,n,f),a.x=bs.x,a.y=bs.y,o=bs.align,s=bs.verticalAlign;var h=n.origin;if(h&&n.rotation!=null){var v=void 0,p=void 0;h==="center"?(v=f.width*.5,p=f.height*.5):(v=Ui(h[0],f.width),p=Ui(h[1],f.height)),c=!0,a.originX=-a.x+v+(i?0:f.x),a.originY=-a.y+p+(i?0:f.y)}}n.rotation!=null&&(a.rotation=n.rotation);var g=n.offset;g&&(a.x+=g[0],a.y+=g[1],c||(a.originX=-g[0],a.originY=-g[1]));var y=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,x=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),b=void 0,_=void 0,C=void 0;y&&this.canBeInsideText()?(b=n.insideFill,_=n.insideStroke,(b==null||b==="auto")&&(b=this.getInsideTextFill()),(_==null||_==="auto")&&(_=this.getInsideTextStroke(b),C=!0)):(b=n.outsideFill,_=n.outsideStroke,(b==null||b==="auto")&&(b=this.getOutsideFill()),(_==null||_==="auto")&&(_=this.getOutsideStroke(b),C=!0)),b=b||"#000",(b!==x.fill||_!==x.stroke||C!==x.autoStroke||o!==x.align||s!==x.verticalAlign)&&(l=!0,x.fill=b,x.stroke=_,x.autoStroke=C,x.align=o,x.verticalAlign=s,r.setDefaultTextStyle(x)),r.__dirty|=Hr,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()?om:am},e.prototype.getOutsideStroke=function(t){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&mi(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,Rf(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||{},ue(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(Pe(t))for(var n=t,i=xt(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!==sm)){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,lm)},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(sm,!1,t)},e.prototype.useState=function(t,r,n,i){var a=t===sm,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(rt(s,t)>=0&&(r||s.length===1))){var c;if(this.stateProxy&&!a&&(c=this.stateProxy(t)),c||(c=this.states&&this.states[t]),!c&&!a){Ag("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(c);var f=!!(c&&c.hoverLayer||i);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,c,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,v=this._textGuide;return h&&h.useState(t,r,n,f),v&&v.useState(t,r,n,f),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Hr),c}}},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 c=t[l],f=void 0;this.stateProxy&&(f=this.stateProxy(c,t)),f||(f=this.states[c]),f&&i.push(f)}var h=i[o-1],v=!!(h&&h.hoverLayer||n);v&&this._toggleHoverLayerFlag(!0);var p=this._mergeStates(i),g=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(t.join(","),p,this._normalState,!1,!r&&!this.__inHover&&g&&g.duration>0,g);var y=this._textContent,x=this._textGuide;y&&y.useStates(t,r,v),x&&x.useStates(t,r,v),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!v&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Hr)}},e.prototype.isSilent=function(){for(var t=this.silent,r=this.parent;!t&&r;){if(r.silent){t=!0;break}r=r.parent}return t},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=rt(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=rt(i,t),o=rt(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];ue(r,a),a.textConfig&&(n=n||{},ue(n,a.textConfig))}return n&&(r.textConfig=n),r},e.prototype._applyStateObj=function(t,r,n,i,a,o){var s=!(r&&i);r&&r.textConfig?(this.textConfig=ue({},i?this.textConfig:n.textConfig),ue(this.textConfig,r.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},c=!1,f=0;f<lm.length;f++){var h=lm[f],v=a&&rB[h];r&&r[h]!=null?v?(c=!0,l[h]=r[h]):this[h]=r[h]:s&&n[h]!=null&&(v?(c=!0,l[h]=n[h]):this[h]=n[h])}if(!a)for(var f=0;f<this.animators.length;f++){var p=this.animators[f],g=p.targetName;p.getLoop()||p.__changeFinalValue(g?(r||n)[g]:r||n)}c&&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 Xg,this._attachComponent(t),this._textContent=t,this.markRedraw())},e.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),ue(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|=Hr;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var r=this._textContent,n=this._textGuide;r&&(r.__inHover=t),n&&(n.__inHover=t)},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 nm(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=rt(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){um(this,t,r,n)},e.prototype.animateFrom=function(t,r,n){um(this,t,r,n,!0)},e.prototype._transitionState=function(t,r,n,i){for(var a=um(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.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=Hr;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,c){Object.defineProperty(c,0,{get:function(){return l[a]},set:function(f){l[a]=f}}),Object.defineProperty(c,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})();Cn(Uf,Xn),Cn(Uf,Xg);function um(e,t,r,n,i){r=r||{};var a=[];OS(e,"",e,t,r,n,a,i);var o=a.length,s=!1,l=r.done,c=r.aborted,f=function(){s=!0,o--,o<=0&&(s?l&&l():c&&c())},h=function(){o--,o<=0&&(s?l&&l():c&&c())};o||l&&l(),a.length>0&&r.during&&a[0].during(function(g,y){r.during(y)});for(var v=0;v<a.length;v++){var p=a[v];f&&p.done(f),h&&p.aborted(h),r.force&&p.duration(r.duration),p.start(r.easing)}return a}function cm(e,t,r){for(var n=0;n<r;n++)e[n]=t[n]}function iB(e){return br(e[0])}function aB(e,t,r){if(br(t[r]))if(br(e[r])||(e[r]=[]),wr(t[r])){var n=t[r].length;e[r].length!==n&&(e[r]=new t[r].constructor(n),cm(e[r],t[r],n))}else{var i=t[r],a=e[r],o=i.length;if(iB(i))for(var s=i[0].length,l=0;l<o;l++)a[l]?cm(a[l],i[l],s):a[l]=Array.prototype.slice.call(i[l]);else cm(a,i,o);a.length=i.length}else e[r]=t[r]}function oB(e,t){return e===t||br(e)&&br(t)&&sB(e,t)}function sB(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 OS(e,t,r,n,i,a,o,s){for(var l=xt(n),c=i.duration,f=i.delay,h=i.additive,v=i.setToFinal,p=!Pe(a),g=e.animators,y=[],x=0;x<l.length;x++){var b=l[x],_=n[b];if(_!=null&&r[b]!=null&&(p||a[b]))if(Pe(_)&&!br(_)&&!xf(_)){if(t){s||(r[b]=_,e.updateDuringAnimation(t));continue}OS(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 C=y.length;if(!h&&C)for(var A=0;A<g.length;A++){var M=g[A];if(M.targetName===t){var D=M.stopTracks(y);if(D){var E=rt(g,M);g.splice(E,1)}}}if(i.force||(y=Ft(y,function(R){return!oB(n[R],r[R])}),C=y.length),C>0||i.force&&!o.length){var N=void 0,O=void 0,L=void 0;if(s){O={},v&&(N={});for(var A=0;A<C;A++){var b=y[A];O[b]=r[b],v?N[b]=n[b]:r[b]=n[b]}}else if(v){L={};for(var A=0;A<C;A++){var b=y[A];L[b]=jf(r[b]),aB(r,n,b)}}var M=new nm(r,!1,!1,h?Ft(g,function(j){return j.targetName===t}):null);M.targetName=t,i.scope&&(M.scope=i.scope),v&&N&&M.whenWithKeys(0,N,y),L&&M.whenWithKeys(0,L,y),M.whenWithKeys(c??500,s?O:n,y).delay(f||0),e.addAnimator(M,t),o.push(M)}}var fm="__zr_style_"+Math.round(Math.random()*10),eo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Wf={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};eo[fm]=!0;var zS=["z","z2","invisible"],lB=["invisible"],ru=(function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var n=xt(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(){},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&&uB(this,r,n)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths){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 nt(0,0,0,0)),n?nt.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 c=this.dirtyRectTolerance;r.isZero()||(r.x=Math.floor(r.x-c),r.y=Math.floor(r.y-c),r.width=Math.ceil(r.width+1+c*2),r.height=Math.ceil(r.height+1+c*2))}return r},t.prototype.setPrevPaintRect=function(r){r?(this._prevPaintRect=this._prevPaintRect||new nt(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:ue(this.style,r),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(r){r||this.markRedraw(),this.__dirty|=tu,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&tu)},t.prototype.styleUpdated=function(){this.__dirty&=~tu},t.prototype.createStyle=function(r){return wf(eo,r)},t.prototype.useStyle=function(r){r[fm]||(r=this.createStyle(r)),this.__inHover?this.__hoverStyle=r:this.style=r,this.dirtyStyle()},t.prototype.isStyleObject=function(r){return r[fm]},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,zS)},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),c;if(n&&n.style?o?a?c=n.style:(c=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(c,n.style)):(c=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(c,n.style)):l&&(c=i.style),c)if(o){var f=this.style;if(this.style=this.createStyle(l?{}:f),l)for(var h=xt(f),v=0;v<h.length;v++){var p=h[v];p in c&&(c[p]=c[p],this.style[p]=f[p])}for(var g=xt(c),v=0;v<g.length;v++){var p=g[v];this.style[p]=this.style[p]}this._transitionState(r,{style:c},s,this.getAnimationStyleProps())}else this.useStyle(c);for(var y=this.__inHover?lB:zS,v=0;v<y.length;v++){var p=y[v];n&&n[p]!=null?this[p]=n[p]:l&&i[p]!=null&&(this[p]=i[p])}},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 ue(r,n),r},t.prototype.getAnimationStyleProps=function(){return Wf},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=!1,r._rect=null,r.dirtyRectTolerance=0,r.__dirty=Hr|tu})(),t})(Uf),dm=new nt(0,0,0,0),hm=new nt(0,0,0,0);function uB(e,t,r){return dm.copy(e.getBoundingRect()),e.transform&&dm.applyTransform(e.transform),hm.width=t,hm.height=r,!dm.intersect(hm)}var nn=Math.min,an=Math.max,pm=Math.sin,vm=Math.cos,to=Math.PI*2,Gf=ds(),Yf=ds(),Xf=ds();function jS(e,t,r,n,i,a){i[0]=nn(e,r),i[1]=nn(t,n),a[0]=an(e,r),a[1]=an(t,n)}var FS=[],BS=[];function cB(e,t,r,n,i,a,o,s,l,c){var f=wS,h=$t,v=f(e,r,i,o,FS);l[0]=1/0,l[1]=1/0,c[0]=-1/0,c[1]=-1/0;for(var p=0;p<v;p++){var g=h(e,r,i,o,FS[p]);l[0]=nn(g,l[0]),c[0]=an(g,c[0])}v=f(t,n,a,s,BS);for(var p=0;p<v;p++){var y=h(t,n,a,s,BS[p]);l[1]=nn(y,l[1]),c[1]=an(y,c[1])}l[0]=nn(e,l[0]),c[0]=an(e,c[0]),l[0]=nn(o,l[0]),c[0]=an(o,c[0]),l[1]=nn(t,l[1]),c[1]=an(t,c[1]),l[1]=nn(s,l[1]),c[1]=an(s,c[1])}function fB(e,t,r,n,i,a,o,s){var l=kS,c=kr,f=an(nn(l(e,r,i),1),0),h=an(nn(l(t,n,a),1),0),v=c(e,r,i,f),p=c(t,n,a,h);o[0]=nn(e,i,v),o[1]=nn(t,a,p),s[0]=an(e,i,v),s[1]=an(t,a,p)}function dB(e,t,r,n,i,a,o,s,l){var c=ps,f=vs,h=Math.abs(i-a);if(h%to<1e-4&&h>1e-4){s[0]=e-r,s[1]=t-n,l[0]=e+r,l[1]=t+n;return}if(Gf[0]=vm(i)*r+e,Gf[1]=pm(i)*n+t,Yf[0]=vm(a)*r+e,Yf[1]=pm(a)*n+t,c(s,Gf,Yf),f(l,Gf,Yf),i=i%to,i<0&&(i=i+to),a=a%to,a<0&&(a=a+to),i>a&&!o?a+=to:i<a&&o&&(i+=to),o){var v=a;a=i,i=v}for(var p=0;p<a;p+=Math.PI/2)p>i&&(Xf[0]=vm(p)*r+e,Xf[1]=pm(p)*n+t,c(s,Xf,s),f(l,Xf,l))}var it={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ro=[],no=[],qn=[],Xi=[],Kn=[],Zn=[],gm=Math.min,mm=Math.max,io=Math.cos,ao=Math.sin,xi=Math.abs,ym=Math.PI,qi=ym*2,xm=typeof Float32Array<"u",nu=[];function bm(e){var t=Math.round(e/ym*1e8)/1e8;return t%2*ym}function HS(e,t){var r=bm(e[0]);r<0&&(r+=qi);var n=r-e[0],i=e[1];i+=n,!t&&i-r>=qi?i=r+qi:t&&r-i>=qi?i=r-qi:!t&&r>i?i=r+(qi-bm(r-i)):t&&r<i&&(i=r-(qi-bm(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=xi(n/$f/t)||0,this._uy=xi(n/$f/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(it.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=xi(t-this._xi),i=xi(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(it.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(it.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(it.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(),nu[0]=i,nu[1]=a,HS(nu,o),i=nu[0],a=nu[1];var s=a-i;return this.addData(it.A,t,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,r,n,i,a,o),this._xi=io(a)*n+t,this._yi=ao(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(it.R,t,r,n,i),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(it.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){var r=t.length;!(this.data&&this.data.length===r)&&xm&&(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){t instanceof Array||(t=[t]);for(var r=t.length,n=0,i=this._len,a=0;a<r;a++)n+=t[a].len();xm&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(var a=0;a<r;a++)for(var o=t[a].data,s=0;s<o.length;s++)this.data[i++]=o[s];this._len=i},e.prototype.addData=function(t,r,n,i,a,o,s,l,c){if(this._saveData){var f=this.data;this._len+arguments.length>f.length&&(this._expandData(),f=this.data);for(var h=0;h<arguments.length;h++)f[this._len++]=arguments[h]}},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,xm&&this._len>11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){qn[0]=qn[1]=Kn[0]=Kn[1]=Number.MAX_VALUE,Xi[0]=Xi[1]=Zn[0]=Zn[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 it.M:r=i=t[o++],n=a=t[o++],Kn[0]=i,Kn[1]=a,Zn[0]=i,Zn[1]=a;break;case it.L:jS(r,n,t[o],t[o+1],Kn,Zn),r=t[o++],n=t[o++];break;case it.C:cB(r,n,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],Kn,Zn),r=t[o++],n=t[o++];break;case it.Q:fB(r,n,t[o++],t[o++],t[o],t[o+1],Kn,Zn),r=t[o++],n=t[o++];break;case it.A:var c=t[o++],f=t[o++],h=t[o++],v=t[o++],p=t[o++],g=t[o++]+p;o+=1;var y=!t[o++];l&&(i=io(p)*h+c,a=ao(p)*v+f),dB(c,f,h,v,p,g,y,Kn,Zn),r=io(g)*h+c,n=ao(g)*v+f;break;case it.R:i=r=t[o++],a=n=t[o++];var x=t[o++],b=t[o++];jS(i,a,i+x,a+b,Kn,Zn);break;case it.Z:r=i,n=a;break}ps(qn,qn,Kn),vs(Xi,Xi,Zn)}return o===0&&(qn[0]=qn[1]=Xi[0]=Xi[1]=0),new nt(qn[0],qn[1],Xi[0]-qn[0],Xi[1]-qn[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 c=this._pathSegLen,f=0,h=0,v=0;v<r;){var p=t[v++],g=v===1;g&&(a=t[v],o=t[v+1],s=a,l=o);var y=-1;switch(p){case it.M:a=s=t[v++],o=l=t[v++];break;case it.L:{var x=t[v++],b=t[v++],_=x-a,C=b-o;(xi(_)>n||xi(C)>i||v===r-1)&&(y=Math.sqrt(_*_+C*C),a=x,o=b);break}case it.C:{var A=t[v++],M=t[v++],x=t[v++],b=t[v++],D=t[v++],E=t[v++];y=HF(a,o,A,M,x,b,D,E,10),a=D,o=E;break}case it.Q:{var A=t[v++],M=t[v++],x=t[v++],b=t[v++];y=UF(a,o,A,M,x,b,10),a=x,o=b;break}case it.A:var N=t[v++],O=t[v++],L=t[v++],R=t[v++],j=t[v++],H=t[v++],W=H+j;v+=1,g&&(s=io(j)*L+N,l=ao(j)*R+O),y=mm(L,R)*gm(qi,Math.abs(H)),a=io(W)*L+N,o=ao(W)*R+O;break;case it.R:{s=a=t[v++],l=o=t[v++];var K=t[v++],Q=t[v++];y=K*2+Q*2;break}case it.Z:{var _=s-a,C=l-o;y=Math.sqrt(_*_+C*C),a=s,o=l;break}}y>=0&&(c[h++]=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,c,f,h,v,p=r<1,g,y,x=0,b=0,_,C=0,A,M;if(!(p&&(this._pathSegLen||this._calculateLength(),g=this._pathSegLen,y=this._pathLen,_=r*y,!_)))e:for(var D=0;D<o;){var E=n[D++],N=D===1;switch(N&&(c=n[D],f=n[D+1],s=c,l=f),E!==it.L&&C>0&&(t.lineTo(A,M),C=0),E){case it.M:s=c=n[D++],l=f=n[D++],t.moveTo(c,f);break;case it.L:{h=n[D++],v=n[D++];var O=xi(h-c),L=xi(v-f);if(O>i||L>a){if(p){var R=g[b++];if(x+R>_){var j=(_-x)/R;t.lineTo(c*(1-j)+h*j,f*(1-j)+v*j);break e}x+=R}t.lineTo(h,v),c=h,f=v,C=0}else{var H=O*O+L*L;H>C&&(A=h,M=v,C=H)}break}case it.C:{var W=n[D++],K=n[D++],Q=n[D++],re=n[D++],X=n[D++],$=n[D++];if(p){var R=g[b++];if(x+R>_){var j=(_-x)/R;Lf(c,W,Q,X,j,ro),Lf(f,K,re,$,j,no),t.bezierCurveTo(ro[1],no[1],ro[2],no[2],ro[3],no[3]);break e}x+=R}t.bezierCurveTo(W,K,Q,re,X,$),c=X,f=$;break}case it.Q:{var W=n[D++],K=n[D++],Q=n[D++],re=n[D++];if(p){var R=g[b++];if(x+R>_){var j=(_-x)/R;If(c,W,Q,j,ro),If(f,K,re,j,no),t.quadraticCurveTo(ro[1],no[1],ro[2],no[2]);break e}x+=R}t.quadraticCurveTo(W,K,Q,re),c=Q,f=re;break}case it.A:var I=n[D++],z=n[D++],Y=n[D++],F=n[D++],ne=n[D++],oe=n[D++],le=n[D++],Me=!n[D++],we=Y>F?Y:F,De=xi(Y-F)>.001,_e=ne+oe,Ce=!1;if(p){var R=g[b++];x+R>_&&(_e=ne+oe*(_-x)/R,Ce=!0),x+=R}if(De&&t.ellipse?t.ellipse(I,z,Y,F,le,ne,_e,Me):t.arc(I,z,we,ne,_e,Me),Ce)break e;N&&(s=io(ne)*Y+I,l=ao(ne)*F+z),c=io(_e)*Y+I,f=ao(_e)*F+z;break;case it.R:s=c=n[D],l=f=n[D+1],h=n[D++],v=n[D++];var Ve=n[D++],Xt=n[D++];if(p){var R=g[b++];if(x+R>_){var wt=_-x;t.moveTo(h,v),t.lineTo(h+gm(wt,Ve),v),wt-=Ve,wt>0&&t.lineTo(h+Ve,v+gm(wt,Xt)),wt-=Xt,wt>0&&t.lineTo(h+mm(Ve-wt,0),v+Xt),wt-=Ve,wt>0&&t.lineTo(h,v+mm(Xt-wt,0));break e}x+=R}t.rect(h,v,Ve,Xt);break;case it.Z:if(p){var R=g[b++];if(x+R>_){var j=(_-x)/R;t.lineTo(c*(1-j)+s*j,f*(1-j)+l*j);break e}x+=R}t.closePath(),c=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.CMD=it,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e})();function ws(e,t,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,c=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),c=(e*n-r*t)/(e-r);else return Math.abs(a-e)<=s/2;var f=l*a-o+c,h=f*f/(l*l+1);return h<=s/2*s/2}function hB(e,t,r,n,i,a,o,s,l,c,f){if(l===0)return!1;var h=l;if(f>t+h&&f>n+h&&f>a+h&&f>s+h||f<t-h&&f<n-h&&f<a-h&&f<s-h||c>e+h&&c>r+h&&c>i+h&&c>o+h||c<e-h&&c<r-h&&c<i-h&&c<o-h)return!1;var v=BF(e,t,r,n,i,a,o,s,c,f);return v<=h/2}function pB(e,t,r,n,i,a,o,s,l){if(o===0)return!1;var c=o;if(l>t+c&&l>n+c&&l>a+c||l<t-c&&l<n-c&&l<a-c||s>e+c&&s>r+c&&s>i+c||s<e-c&&s<r-c&&s<i-c)return!1;var f=$F(e,t,r,n,i,a,s,l);return f<=c/2}var VS=Math.PI*2;function qf(e){return e%=VS,e<0&&(e+=VS),e}var iu=Math.PI*2;function vB(e,t,r,n,i,a,o,s,l){if(o===0)return!1;var c=o;s-=e,l-=t;var f=Math.sqrt(s*s+l*l);if(f-c>r||f+c<r)return!1;if(Math.abs(n-i)%iu<1e-4)return!0;if(a){var h=n;n=qf(i),i=qf(h)}else n=qf(n),i=qf(i);n>i&&(i+=iu);var v=Math.atan2(l,s);return v<0&&(v+=iu),v>=n&&v<=i||v+iu>=n&&v+iu<=i}function so(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 Ki=oo.CMD,lo=Math.PI*2,gB=1e-4;function mB(e,t){return Math.abs(e-t)<gB}var fr=[-1,-1,-1],on=[-1,-1];function yB(){var e=on[0];on[0]=on[1],on[1]=e}function xB(e,t,r,n,i,a,o,s,l,c){if(c>t&&c>n&&c>a&&c>s||c<t&&c<n&&c<a&&c<s)return 0;var f=Ef(t,n,a,s,c,fr);if(f===0)return 0;for(var h=0,v=-1,p=void 0,g=void 0,y=0;y<f;y++){var x=fr[y],b=x===0||x===1?.5:1,_=$t(e,r,i,o,x);_<l||(v<0&&(v=wS(t,n,a,s,on),on[1]<on[0]&&v>1&&yB(),p=$t(t,n,a,s,on[0]),v>1&&(g=$t(t,n,a,s,on[1]))),v===2?x<on[0]?h+=p<t?b:-b:x<on[1]?h+=g<p?b:-b:h+=s<g?b:-b:x<on[0]?h+=p<t?b:-b:h+=s<p?b:-b)}return h}function bB(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=VF(t,n,a,s,fr);if(l===0)return 0;var c=kS(t,n,a);if(c>=0&&c<=1){for(var f=0,h=kr(t,n,a,c),v=0;v<l;v++){var p=fr[v]===0||fr[v]===1?.5:1,g=kr(e,r,i,fr[v]);g<o||(fr[v]<c?f+=h<t?p:-p:f+=a<h?p:-p)}return f}else{var p=fr[0]===0||fr[0]===1?.5:1,g=kr(e,r,i,fr[0]);return g<o?0:a<t?p:-p}}function wB(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);fr[0]=-l,fr[1]=l;var c=Math.abs(n-i);if(c<1e-4)return 0;if(c>=lo-1e-4){n=0,i=lo;var f=a?1:-1;return o>=fr[0]+e&&o<=fr[1]+e?f:0}if(n>i){var h=n;n=i,i=h}n<0&&(n+=lo,i+=lo);for(var v=0,p=0;p<2;p++){var g=fr[p];if(g+e>o){var y=Math.atan2(s,g),f=a?1:-1;y<0&&(y=lo+y),(y>=n&&y<=i||y+lo>=n&&y+lo<=i)&&(y>Math.PI/2&&y<Math.PI*1.5&&(f=-f),v+=f)}}return v}function $S(e,t,r,n,i){for(var a=e.data,o=e.len(),s=0,l=0,c=0,f=0,h=0,v,p,g=0;g<o;){var y=a[g++],x=g===1;switch(y===Ki.M&&g>1&&(r||(s+=so(l,c,f,h,n,i))),x&&(l=a[g],c=a[g+1],f=l,h=c),y){case Ki.M:f=a[g++],h=a[g++],l=f,c=h;break;case Ki.L:if(r){if(ws(l,c,a[g],a[g+1],t,n,i))return!0}else s+=so(l,c,a[g],a[g+1],n,i)||0;l=a[g++],c=a[g++];break;case Ki.C:if(r){if(hB(l,c,a[g++],a[g++],a[g++],a[g++],a[g],a[g+1],t,n,i))return!0}else s+=xB(l,c,a[g++],a[g++],a[g++],a[g++],a[g],a[g+1],n,i)||0;l=a[g++],c=a[g++];break;case Ki.Q:if(r){if(pB(l,c,a[g++],a[g++],a[g],a[g+1],t,n,i))return!0}else s+=bB(l,c,a[g++],a[g++],a[g],a[g+1],n,i)||0;l=a[g++],c=a[g++];break;case Ki.A:var b=a[g++],_=a[g++],C=a[g++],A=a[g++],M=a[g++],D=a[g++];g+=1;var E=!!(1-a[g++]);v=Math.cos(M)*C+b,p=Math.sin(M)*A+_,x?(f=v,h=p):s+=so(l,c,v,p,n,i);var N=(n-b)*A/C+b;if(r){if(vB(b,_,A,M,M+D,E,t,N,i))return!0}else s+=wB(b,_,A,M,M+D,E,N,i);l=Math.cos(M+D)*C+b,c=Math.sin(M+D)*A+_;break;case Ki.R:f=l=a[g++],h=c=a[g++];var O=a[g++],L=a[g++];if(v=f+O,p=h+L,r){if(ws(f,h,v,h,t,n,i)||ws(v,h,v,p,t,n,i)||ws(v,p,f,p,t,n,i)||ws(f,p,f,h,t,n,i))return!0}else s+=so(v,h,v,p,n,i),s+=so(f,p,f,h,n,i);break;case Ki.Z:if(r){if(ws(l,c,f,h,t,n,i))return!0}else s+=so(l,c,f,h,n,i);l=f,c=h;break}}return!r&&!mB(c,h)&&(s+=so(l,c,f,h,n,i)||0),s!==0}function _B(e,t,r){return $S(e,0,!1,t,r)}function kB(e,t,r,n){return $S(e,t,!0,r,n)}var US=tt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},eo),SB={style:tt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Wf.style)},wm=Kl.concat(["invisible","culling","z","z2","zlevel","parent"]),at=(function(e){pe(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<wm.length;++s)i[wm[s]]=this[wm[s]];i.__dirty|=Hr}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(r){var n=xt(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?ue(this.style,s):this.useStyle(s):o==="shape"?ue(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(Ae(r)){var n=Of(r,0);return n>.5?am:n>.2?tB:om}else if(r)return om}return am},t.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(Ae(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Of(r,0)<im;if(a===o)return n}},t.prototype.buildPath=function(r,n,i){},t.prototype.pathUpdated=function(){this.__dirty&=~xs},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&xs)&&(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,c=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;c=Math.max(c,f??4)}l>1e-10&&(s.width+=c/l,s.height+=c/l,s.x-=c/l/2,s.y-=c/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,c=o.strokeNoScale?this.getLineScale():1;if(c>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),kB(s,l/c,r,n)))return!0}if(this.hasFill())return _B(s,r,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=xs,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:ue(i,r),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&xs)},t.prototype.createStyle=function(r){return wf(US,r)},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=ue({},this.shape))},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),c;if(n&&n.shape?o?a?c=n.shape:(c=ue({},i.shape),ue(c,n.shape)):(c=ue({},a?this.shape:i.shape),ue(c,n.shape)):l&&(c=i.shape),c)if(o){this.shape=ue({},this.shape);for(var f={},h=xt(c),v=0;v<h.length;v++){var p=h[v];typeof c[p]=="object"?this.shape[p]=c[p]:f[p]=c[p]}this._transitionState(r,{shape:f},s)}else this.shape=c,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 SB},t.prototype.isZeroArea=function(){return!1},t.extend=function(r){var n=(function(a){pe(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 qe(r.style)},o.prototype.getDefaultShape=function(){return qe(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=Hr|tu|xs})(),t})(ru),CB=tt({strokeFirst:!0,font:Wa,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},US),Kf=(function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return 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.createStyle=function(r){return wf(CB,r)},t.prototype.setBoundingRect=function(r){this._rect=r},t.prototype.getBoundingRect=function(){var r=this.style;if(!this._rect){var n=r.text;n!=null?n+="":n="";var i=zg(n,r.font,r.textAlign,r.textBaseline);if(i.x+=r.x||0,i.y+=r.y||0,this.hasStroke()){var a=r.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},t.initDefaultProps=(function(){var r=t.prototype;r.dirtyRectTolerance=10})(),t})(ru);Kf.prototype.type="tspan";var TB=tt({x:0,y:0},eo),AB={style:tt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Wf.style)};function DB(e){return!!(e&&typeof e!="string"&&e.width&&e.height)}var Zi=(function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(r){return wf(TB,r)},t.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=DB(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 AB},t.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new nt(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},t})(ru);Zi.prototype.type="image";function MB(e,t){var r=t.x,n=t.y,i=t.width,a=t.height,o=t.r,s,l,c,f;i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=c=f=o:o instanceof Array?o.length===1?s=l=c=f=o[0]:o.length===2?(s=c=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],c=o[2]):(s=o[0],l=o[1],c=o[2],f=o[3]):s=l=c=f=0;var h;s+l>i&&(h=s+l,s*=i/h,l*=i/h),c+f>i&&(h=c+f,c*=i/h,f*=i/h),l+c>a&&(h=l+c,l*=a/h,c*=a/h),s+f>a&&(h=s+f,s*=a/h,f*=a/h),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-c),c!==0&&e.arc(r+i-c,n+a-c,c,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)}var _s=Math.round;function WS(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&&(_s(n*2)===_s(i*2)&&(e.x1=e.x2=uo(n,s,!0)),_s(a*2)===_s(o*2)&&(e.y1=e.y2=uo(a,s,!0))),e}}function GS(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=uo(n,s,!0),e.y=uo(i,s,!0),e.width=Math.max(uo(n+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(uo(i+o,s,!1)-e.y,o===0?0:1)),e}}function uo(e,t,r){if(!t)return e;var n=_s(e*2);return(n+_s(t))%2===0?n/2:(n+(r?1:-1))/2}var EB=(function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e})(),LB={},Rt=(function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new EB},t.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=GS(LB,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?MB(r,n):r.rect(i,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t})(at);Rt.prototype.type="rect";var YS={fill:"#000"},XS=2,IB={style:tt({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},Wf.style)},dr=(function(e){pe(t,e);function t(r){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=YS,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,zB(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 nt(0,0,0,0),n=this._children,i=[],a=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),c=s.getLocalTransform(i);c?(r.copy(l),r.applyTransform(c),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||YS},t.prototype.setTextContent=function(r){},t.prototype._mergeStyle=function(r,n){if(!n)return r;var i=n.rich,a=r.rich||i&&{};return ue(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=xt(n),a=0;a<i.length;a++){var o=i[a];r[o]=r[o]||{},ue(r[o],n[o])}},t.prototype.getAnimationStyleProps=function(){return IB},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||Wa,i=r.padding,a=t2(r),o=DF(a,r),s=_m(r),l=!!r.backgroundColor,c=o.outerHeight,f=o.outerWidth,h=o.contentWidth,v=o.lines,p=o.lineHeight,g=this._defaultStyle;this.isTruncated=!!o.isTruncated;var y=r.x||0,x=r.y||0,b=r.align||g.align||"left",_=r.verticalAlign||g.verticalAlign||"top",C=y,A=fs(x,o.contentHeight,_);if(s||i){var M=ql(y,f,b),D=fs(x,c,_);s&&this._renderBackground(r,r,M,D,f,c)}A+=p/2,i&&(C=e2(y,b,i),_==="top"?A+=i[0]:_==="bottom"&&(A-=i[2]));for(var E=0,N=!1,O=JS("fill"in r?r.fill:(N=!0,g.fill)),L=QS("stroke"in r?r.stroke:!l&&(!g.autoStroke||N)?(E=XS,g.stroke):null),R=r.textShadowBlur>0,j=r.width!=null&&(r.overflow==="truncate"||r.overflow==="break"||r.overflow==="breakAll"),H=o.calculatedLineHeight,W=0;W<v.length;W++){var K=this._getOrCreateChild(Kf),Q=K.createStyle();K.useStyle(Q),Q.text=v[W],Q.x=C,Q.y=A,Q.textAlign=b,Q.textBaseline="middle",Q.opacity=r.opacity,Q.strokeFirst=!0,R&&(Q.shadowBlur=r.textShadowBlur||0,Q.shadowColor=r.textShadowColor||"transparent",Q.shadowOffsetX=r.textShadowOffsetX||0,Q.shadowOffsetY=r.textShadowOffsetY||0),Q.stroke=L,Q.fill=O,L&&(Q.lineWidth=r.lineWidth||E,Q.lineDash=r.lineDash,Q.lineDashOffset=r.lineDashOffset||0),Q.font=n,KS(Q,r),A+=p,j&&K.setBoundingRect(new nt(ql(Q.x,h,Q.textAlign),fs(Q.y,H,Q.textBaseline),h,H))}},t.prototype._updateRichTexts=function(){var r=this.style,n=t2(r),i=LF(n,r),a=i.width,o=i.outerWidth,s=i.outerHeight,l=r.padding,c=r.x||0,f=r.y||0,h=this._defaultStyle,v=r.align||h.align,p=r.verticalAlign||h.verticalAlign;this.isTruncated=!!i.isTruncated;var g=ql(c,o,v),y=fs(f,s,p),x=g,b=y;l&&(x+=l[3],b+=l[0]);var _=x+a;_m(r)&&this._renderBackground(r,r,g,y,o,s);for(var C=!!r.backgroundColor,A=0;A<i.lines.length;A++){for(var M=i.lines[A],D=M.tokens,E=D.length,N=M.lineHeight,O=M.width,L=0,R=x,j=_,H=E-1,W=void 0;L<E&&(W=D[L],!W.align||W.align==="left");)this._placeToken(W,r,N,b,R,"left",C),O-=W.width,R+=W.width,L++;for(;H>=0&&(W=D[H],W.align==="right");)this._placeToken(W,r,N,b,j,"right",C),O-=W.width,j-=W.width,H--;for(R+=(a-(R-x)-(_-j)-O)/2;L<=H;)W=D[L],this._placeToken(W,r,N,b,R+W.width/2,"center",C),R+=W.width,L++;b+=N}},t.prototype._placeToken=function(r,n,i,a,o,s,l){var c=n.rich[r.styleName]||{};c.text=r.text;var f=r.verticalAlign,h=a+i/2;f==="top"?h=a+r.height/2:f==="bottom"&&(h=a+i-r.height/2);var v=!r.isLineHolder&&_m(c);v&&this._renderBackground(c,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,h-r.height/2,r.width,r.height);var p=!!c.backgroundColor,g=r.textPadding;g&&(o=e2(o,s,g),h-=r.height/2-g[0]-r.innerHeight/2);var y=this._getOrCreateChild(Kf),x=y.createStyle();y.useStyle(x);var b=this._defaultStyle,_=!1,C=0,A=JS("fill"in c?c.fill:"fill"in n?n.fill:(_=!0,b.fill)),M=QS("stroke"in c?c.stroke:"stroke"in n?n.stroke:!p&&!l&&(!b.autoStroke||_)?(C=XS,b.stroke):null),D=c.textShadowBlur>0||n.textShadowBlur>0;x.text=r.text,x.x=o,x.y=h,D&&(x.shadowBlur=c.textShadowBlur||n.textShadowBlur||0,x.shadowColor=c.textShadowColor||n.textShadowColor||"transparent",x.shadowOffsetX=c.textShadowOffsetX||n.textShadowOffsetX||0,x.shadowOffsetY=c.textShadowOffsetY||n.textShadowOffsetY||0),x.textAlign=s,x.textBaseline="middle",x.font=r.font||Wa,x.opacity=$l(c.opacity,n.opacity,1),KS(x,c),M&&(x.lineWidth=$l(c.lineWidth,n.lineWidth,C),x.lineDash=Ue(c.lineDash,n.lineDash),x.lineDashOffset=n.lineDashOffset||0,x.stroke=M),A&&(x.fill=A);var E=r.contentWidth,N=r.contentHeight;y.setBoundingRect(new nt(ql(x.x,E,x.textAlign),fs(x.y,N,x.textBaseline),E,N))},t.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,c=r.borderWidth,f=r.borderColor,h=l&&l.image,v=l&&!h,p=r.borderRadius,g=this,y,x;if(v||r.lineHeight||c&&f){y=this._getOrCreateChild(Rt),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=p,y.dirtyShape()}if(v){var _=y.style;_.fill=l||null,_.fillOpacity=Ue(r.fillOpacity,1)}else if(h){x=this._getOrCreateChild(Zi),x.onload=function(){g.dirtyStyle()};var C=x.style;C.image=l.image,C.x=i,C.y=a,C.width=o,C.height=s}if(c&&f){var _=y.style;_.lineWidth=c,_.stroke=f,_.strokeOpacity=Ue(r.strokeOpacity,1),_.lineDash=r.borderDash,_.lineDashOffset=r.borderDashOffset||0,y.strokeContainThreshold=0,y.hasFill()&&y.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var A=(y||x).style;A.shadowBlur=r.shadowBlur||0,A.shadowColor=r.shadowColor||"transparent",A.shadowOffsetX=r.shadowOffsetX||0,A.shadowOffsetY=r.shadowOffsetY||0,A.opacity=$l(r.opacity,n.opacity,1)},t.makeFont=function(r){var n="";return OB(r)&&(n=[r.fontStyle,r.fontWeight,RB(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Wn(n)||r.textFont||r.font},t})(ru),PB={left:!0,right:1,center:1},NB={top:1,bottom:1,middle:1},qS=["fontStyle","fontWeight","fontSize","fontFamily"];function RB(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?Sg+"px":e+"px"}function KS(e,t){for(var r=0;r<qS.length;r++){var n=qS[r],i=t[n];i!=null&&(e[n]=i)}}function OB(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function zB(e){return ZS(e),U(e.rich,ZS),e}function ZS(e){if(e){e.font=dr.makeFont(e);var t=e.align;t==="middle"&&(t="center"),e.align=t==null||PB[t]?t:"left";var r=e.verticalAlign;r==="center"&&(r="middle"),e.verticalAlign=r==null||NB[r]?r:"top";var n=e.padding;n&&(e.padding=Qk(e.padding))}}function QS(e,t){return e==null||t<=0||e==="transparent"||e==="none"?null:e.image||e.colorStops?"#000":e}function JS(e){return e==null||e==="none"?null:e.image||e.colorStops?"#000":e}function e2(e,t,r){return t==="right"?e-r[1]:t==="center"?e+r[3]/2-r[1]/2:e+r[3]}function t2(e){var t=e.text;return t!=null&&(t+=""),t}function _m(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var r2=1e-4,n2=20;function jB(e){return e.replace(/^\s+|\s+$/g,"")}function km(e,t,r,n){var i=t[0],a=t[1],o=r[0],s=r[1],l=a-i,c=s-o;if(l===0)return c===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*c+o}function pt(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return Ae(e)?jB(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):e==null?NaN:+e}function Dt(e,t,r){return t==null&&(t=10),t=Math.min(Math.max(0,t),n2),e=(+e).toFixed(t),r?e:+e}function Qn(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,r=0;r<15;r++,t*=10)if(Math.round(e*t)/t===e)return r}return FB(e)}function FB(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 Math.max(0,o-n)}function BB(e,t){var r=Math.log,n=Math.LN10,i=Math.floor(r(e[1]-e[0])/n),a=Math.round(r(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function HB(e,t){var r=$i(e,function(p,g){return p+(isNaN(g)?0:g)},0);if(r===0)return[];for(var n=Math.pow(10,t),i=Te(e,function(p){return(isNaN(p)?0:p)/r*n*100}),a=n*100,o=Te(i,function(p){return Math.floor(p)}),s=$i(o,function(p,g){return p+g},0),l=Te(i,function(p,g){return p-o[g]});s<a;){for(var c=Number.NEGATIVE_INFINITY,f=null,h=0,v=l.length;h<v;++h)l[h]>c&&(c=l[h],f=h);++o[f],l[f]=0,++s}return Te(o,function(p){return p/n})}function VB(e,t){var r=Math.max(Qn(e),Qn(t)),n=e+t;return r>n2?n:Dt(n,r)}function i2(e){var t=Math.PI*2;return(e%t+t)%t}function Zf(e){return e>-r2&&e<r2}var $B=/^(?:(\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 bi(e){if(e instanceof Date)return e;if(Ae(e)){var t=$B.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(Math.round(e))}function UB(e){return Math.pow(10,Sm(e))}function Sm(e){if(e===0)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function a2(e,t){var r=Sm(e),n=Math.pow(10,r),i=e/n,a;return i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10,e=a*n,r>=-20?+e.toFixed(r<0?-r:0):e}function Qf(e){var t=parseFloat(e);return t==e&&(t!==0||!Ae(e)||e.indexOf("x")<=0)?t:NaN}function WB(e){return!isNaN(Qf(e))}function o2(){return Math.round(Math.random()*9)}function s2(e,t){return t===0?e:s2(t,e%t)}function l2(e,t){return e==null?t:t==null?e:e*t/s2(e,t)}function Sr(e){throw new Error(e)}function u2(e,t,r){return(t-e)*r+e}var c2="series\0",GB="\0_ec_\0";function hr(e){return e instanceof Array?e:e==null?[]:[e]}function Jf(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 f2=["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 au(e){return Pe(e)&&!ve(e)&&!(e instanceof Date)?e.value:e}function YB(e){return Pe(e)&&!(e instanceof Array)}function XB(e,t,r){var n=r==="normalMerge",i=r==="replaceMerge",a=r==="replaceAll";e=e||[],t=(t||[]).slice();var o=Ge();U(t,function(l,c){if(!Pe(l)){t[c]=null;return}});var s=qB(e,o,r);return(n||i)&&KB(s,e,o,t),n&&ZB(s,t),n||i?QB(s,t,i):a&&JB(s,t),e6(s),s}function qB(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"||su(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return n}function KB(e,t,r,n){U(n,function(i,a){if(!(!i||i.id==null)){var o=ou(i.id),s=r.get(o);if(s!=null){var l=e[s];gi(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=t[s],n[a]=null}}})}function ZB(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)&&!su(r)&&!su(a)&&d2("name",a,r)){e[i].newOption=r,t[n]=null;return}}})}function QB(e,t,r){U(t,function(n){if(n){for(var i,a=0;(i=e[a])&&(i.newOption||su(i.existing)||i.existing&&n.id!=null&&!d2("id",n,i.existing));)a++;i?(i.newOption=n,i.brandNew=r):e.push({newOption:n,brandNew:r,existing:null,keyInfo:null}),a++}})}function JB(e,t){U(t,function(r){e.push({newOption:r,brandNew:!0,existing:null,keyInfo:null})})}function e6(e){var t=Ge();U(e,function(r){var n=r.existing;n&&t.set(n.id,r)}),U(e,function(r){var n=r.newOption;gi(!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(Pe(a)){if(o.name=a.name!=null?ou(a.name):i?i.name:c2+n,i)o.id=ou(i.id);else if(a.id!=null)o.id=ou(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 d2(e,t,r){var n=Jn(t[e],null),i=Jn(r[e],null);return n!=null&&i!=null&&n===i}function ou(e){return Jn(e,"")}function Jn(e,t){return e==null?t:Ae(e)?e:lt(e)||Dg(e)?e+"":t}function Cm(e){var t=e.name;return!!(t&&t.indexOf(c2))}function su(e){return e&&e.id!=null&&ou(e.id).indexOf(GB)===0}function t6(e,t,r){U(e,function(n){var i=n.newOption;Pe(i)&&(n.keyInfo.mainType=t,n.keyInfo.subType=r6(t,i,n.existing,r))})}function r6(e,t,r,n){var i=t.type?t.type:r?r.subType:n.determineSubType(e,t);return i}function co(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return ve(t.dataIndex)?Te(t.dataIndex,function(r){return e.indexOfRawIndex(r)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return ve(t.name)?Te(t.name,function(r){return e.indexOfName(r)}):e.indexOfName(t.name)}function bt(){var e="__ec_inner_"+n6++;return function(t){return t[e]||(t[e]={})}}var n6=o2();function Tm(e,t,r){var n=Am(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(c,f){var h=lu(e,f,c,{useDefault:l===f,enableAll:r&&r.enableAll!=null?r.enableAll:!0,enableNone:r&&r.enableNone!=null?r.enableNone:!0});s[f+"Models"]=h.models,s[f+"Model"]=h.models[0]}),s}function Am(e,t){var r;if(Ae(e)){var n={};n[e+"Index"]=0,r=n}else r=e;var i=Ge(),a={},o=!1;return U(r,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var c=l.match(/^(\w+)(Index|Id|Name)$/)||[],f=c[1],h=(c[2]||"").toLowerCase();if(!(!f||!h||t&&t.includeMainTypes&&rt(t.includeMainTypes,f)<0)){o=o||!!f;var v=i.get(f)||i.set(f,{});v[h]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var Tn={useDefault:!0,enableAll:!1,enableNone:!1};function lu(e,t,r,n){n=n||Tn;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}return i==="none"||i===!1?(gi(n.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(i==="all"&&(gi(n.enableAll,'`"all"` is not a valid value on index option.'),i=a=o=null),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s)}function h2(e,t,r){e.setAttribute?e.setAttribute(t,r):e[t]=r}function i6(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function a6(e){return e==="auto"?je.domSupported?"html":"richText":e||"html"}function o6(e,t,r,n,i){var a=t==null||t==="auto";if(n==null)return n;if(lt(n)){var o=u2(r||0,n,i);return Dt(o,a?Math.max(Qn(r||0),Qn(n)):t)}else{if(Ae(n))return i<1?r:n;for(var s=[],l=r,c=n,f=Math.max(l?l.length:0,c.length),h=0;h<f;++h){var v=e.getDimensionInfo(h);if(v&&v.type==="ordinal")s[h]=(i<1&&l?l:c)[h];else{var p=l&&l[h]?l[h]:0,g=c[h],o=u2(p,g,i);s[h]=Dt(o,a?Math.max(Qn(p),Qn(g)):t)}}return s}}var Qe=bt(),s6=function(e,t,r,n){if(n){var i=Qe(n);i.dataIndex=r,i.dataType=t,i.seriesIndex=e,i.ssrType="chart",n.type==="group"&&n.traverse(function(a){var o=Qe(a);o.seriesIndex=e,o.dataIndex=r,o.dataType=t,o.ssrType="chart"})}},p2=1,v2={},g2=bt(),Dm=bt(),Mm=0,ed=1,td=2,Cr=["emphasis","blur","select"],rd=["normal","emphasis","blur","select"],l6=10,u6=9,fo="highlight",nd="downplay",uu="select",id="unselect",cu="toggleSelect";function ks(e){return e!=null&&e!=="none"}function ad(e,t,r){e.onHoverStateChange&&(e.hoverState||0)!==r&&e.onHoverStateChange(t),e.hoverState=r}function m2(e){ad(e,"emphasis",td)}function y2(e){e.hoverState===td&&ad(e,"normal",Mm)}function Em(e){ad(e,"blur",ed)}function x2(e){e.hoverState===ed&&ad(e,"normal",Mm)}function c6(e){e.selected=!0}function f6(e){e.selected=!1}function b2(e,t,r){t(e,r)}function wi(e,t,r){b2(e,t,r),e.isGroup&&e.traverse(function(n){b2(n,t,r)})}function w2(e,t){switch(t){case"emphasis":e.hoverState=td;break;case"normal":e.hoverState=Mm;break;case"blur":e.hoverState=ed;break;case"select":e.selected=!0}}function d6(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 c=e.animators[o];c.__fromStateTransition&&c.__fromStateTransition.indexOf(r)<0&&c.targetName==="style"&&c.saveTo(a,t)}return a}function h6(e,t,r,n){var i=r&&rt(r,"select")>=0,a=!1;if(e instanceof at){var o=g2(e),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(ks(s)||ks(l)){n=n||{};var c=n.style||{};c.fill==="inherit"?(a=!0,n=ue({},n),c=ue({},c),c.fill=s):!ks(c.fill)&&ks(s)?(a=!0,n=ue({},n),c=ue({},c),c.fill=ES(s)):!ks(c.stroke)&&ks(l)&&(a||(n=ue({},n),c=ue({},c)),c.stroke=ES(l)),n.style=c}}if(n&&n.z2==null){a||(n=ue({},n));var f=e.z2EmphasisLift;n.z2=e.z2+(f??l6)}return n}function p6(e,t,r){if(r&&r.z2==null){r=ue({},r);var n=e.z2SelectLift;r.z2=e.z2+(n??u6)}return r}function v6(e,t,r){var n=rt(e.currentStates,t)>=0,i=e.style.opacity,a=n?null:d6(e,["opacity"],t,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=ue({},r),o=ue({opacity:n?i:a.opacity*.1},o),r.style=o),r}function Lm(e,t){var r=this.states[e];if(this.style){if(e==="emphasis")return h6(this,e,t,r);if(e==="blur")return v6(this,e,r);if(e==="select")return p6(this,e,r)}return r}function g6(e){e.stateProxy=Lm;var t=e.getTextContent(),r=e.getTextGuideLine();t&&(t.stateProxy=Lm),r&&(r.stateProxy=Lm)}function _2(e,t){!A2(e,t)&&!e.__highByOuter&&wi(e,m2)}function k2(e,t){!A2(e,t)&&!e.__highByOuter&&wi(e,y2)}function fu(e,t){e.__highByOuter|=1<<(t||0),wi(e,m2)}function du(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&wi(e,y2)}function S2(e){wi(e,Em)}function Im(e){wi(e,x2)}function C2(e){wi(e,c6)}function T2(e){wi(e,f6)}function A2(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function D2(e){var t=e.getModel(),r=[],n=[];t.eachComponent(function(i,a){var o=Dm(a),s=i==="series",l=s?e.getViewOfSeriesModel(a):e.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(c){x2(c)}),s&&r.push(a)),o.isBlured=!1}),U(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,t)})}function Pm(e,t,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(c,f){for(var h=0;h<f.length;h++){var v=c.getItemGraphicEl(f[h]);v&&Im(v)}}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(c){var f=o===c,h=c.coordinateSystem;h&&h.master&&(h=h.master);var v=h&&s?h===s:f;if(!(r==="series"&&!f||r==="coordinateSystem"&&!v||t==="series"&&f)){var p=n.getViewOfSeriesModel(c);if(p.group.traverse(function(x){x.__highByOuter&&f&&t==="self"||Em(x)}),br(t))a(c.getData(),t);else if(Pe(t))for(var g=xt(t),y=0;y<g.length;y++)a(c.getData(g[y]),t[g[y]]);l.push(c),Dm(c).isBlured=!0}}),i.eachComponent(function(c,f){if(c!=="series"){var h=n.getViewOfComponentModel(f);h&&h.toggleBlurSeries&&h.toggleBlurSeries(l,!0,i)}})}}function Nm(e,t,r){if(!(e==null||t==null)){var n=r.getModel().getComponent(e,t);if(n){Dm(n).isBlured=!0;var i=r.getViewOfComponentModel(n);!i||!i.focusBlurEnabled||i.group.traverse(function(a){Em(a)})}}}function m6(e,t,r){var n=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=co(i,t);a=(ve(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 c=Qe(o);Pm(n,c.focus,c.blurScope,r)}else{var f=e.get(["emphasis","focus"]),h=e.get(["emphasis","blurScope"]);f!=null&&Pm(n,f,h,r)}}}function Rm(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,c=0;c<s.length;c++)if(Qe(s[c]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function y6(e,t,r){var n=Qe(e),i=Rm(n.componentMainType,n.componentIndex,n.componentHighDownName,r),a=i.dispatchers,o=i.focusSelf;a?(o&&Nm(n.componentMainType,n.componentIndex,r),U(a,function(s){return _2(s,t)})):(Pm(n.seriesIndex,n.focus,n.blurScope,r),n.focus==="self"&&Nm(n.componentMainType,n.componentIndex,r),_2(e,t))}function x6(e,t,r){D2(r);var n=Qe(e),i=Rm(n.componentMainType,n.componentIndex,n.componentHighDownName,r).dispatchers;i?U(i,function(a){return k2(a,t)}):k2(e,t)}function b6(e,t,r){if(jm(t)){var n=t.dataType,i=e.getData(n),a=co(i,t);ve(a)||(a=[a]),e[t.type===cu?"toggleSelect":t.type===uu?"select":"unselect"](a,n)}}function M2(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)?C2(a):T2(a)})})}function w6(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 Om(e,t,r){L2(e,!0),wi(e,g6),k6(e,t,r)}function _6(e){L2(e,!1)}function Ss(e,t,r,n){n?_6(e):Om(e,t,r)}function k6(e,t,r){var n=Qe(e);t!=null?(n.focus=t,n.blurScope=r):n.focus&&(n.focus=null)}var E2=["emphasis","blur","select"],S6={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function od(e,t,r,n){r=r||"itemStyle";for(var i=0;i<E2.length;i++){var a=E2[i],o=t.getModel([a,r]),s=e.ensureState(a);s.style=o[S6[r]]()}}function L2(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 zm(e){return!!(e&&e.__highDownDispatcher)}function C6(e){var t=v2[e];return t==null&&p2<=32&&(t=v2[e]=p2++),t}function jm(e){var t=e.type;return t===uu||t===id||t===cu}function I2(e){var t=e.type;return t===fo||t===nd}function T6(e){var t=g2(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 Cs=oo.CMD,A6=[[],[],[]],P2=Math.sqrt,D6=Math.atan2;function M6(e,t){if(t){var r=e.data,n=e.len(),i,a,o,s,l,c,f=Cs.M,h=Cs.C,v=Cs.L,p=Cs.R,g=Cs.A,y=Cs.Q;for(o=0,s=0;o<n;){switch(i=r[o++],s=o,a=0,i){case f:a=1;break;case v:a=1;break;case h:a=3;break;case y:a=2;break;case g:var x=t[4],b=t[5],_=P2(t[0]*t[0]+t[1]*t[1]),C=P2(t[2]*t[2]+t[3]*t[3]),A=D6(-t[1]/C,t[0]/_);r[o]*=_,r[o++]+=x,r[o]*=C,r[o++]+=b,r[o++]*=_,r[o++]*=C,r[o++]+=A,r[o++]+=A,o+=2,s=o;break;case p:c[0]=r[o++],c[1]=r[o++],en(c,c,t),r[s++]=c[0],r[s++]=c[1],c[0]+=r[o++],c[1]+=r[o++],en(c,c,t),r[s++]=c[0],r[s++]=c[1]}for(l=0;l<a;l++){var M=A6[l];M[0]=r[o++],M[1]=r[o++],en(M,M,t),r[s++]=M[0],r[s++]=M[1]}}e.increaseVersion()}}var Fm=Math.sqrt,sd=Math.sin,ld=Math.cos,hu=Math.PI;function N2(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Bm(e,t){return(e[0]*t[0]+e[1]*t[1])/(N2(e)*N2(t))}function R2(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(Bm(e,t))}function O2(e,t,r,n,i,a,o,s,l,c,f){var h=l*(hu/180),v=ld(h)*(e-r)/2+sd(h)*(t-n)/2,p=-1*sd(h)*(e-r)/2+ld(h)*(t-n)/2,g=v*v/(o*o)+p*p/(s*s);g>1&&(o*=Fm(g),s*=Fm(g));var y=(i===a?-1:1)*Fm((o*o*(s*s)-o*o*(p*p)-s*s*(v*v))/(o*o*(p*p)+s*s*(v*v)))||0,x=y*o*p/s,b=y*-s*v/o,_=(e+r)/2+ld(h)*x-sd(h)*b,C=(t+n)/2+sd(h)*x+ld(h)*b,A=R2([1,0],[(v-x)/o,(p-b)/s]),M=[(v-x)/o,(p-b)/s],D=[(-1*v-x)/o,(-1*p-b)/s],E=R2(M,D);if(Bm(M,D)<=-1&&(E=hu),Bm(M,D)>=1&&(E=0),E<0){var N=Math.round(E/hu*1e6)/1e6;E=hu*2+N%2*hu}f.addData(c,_,C,o,s,A,E,h,a)}var E6=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,L6=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function I6(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(E6);if(!l)return t;for(var c=0;c<l.length;c++){for(var f=l[c],h=f.charAt(0),v=void 0,p=f.match(L6)||[],g=p.length,y=0;y<g;y++)p[y]=parseFloat(p[y]);for(var x=0;x<g;){var b=void 0,_=void 0,C=void 0,A=void 0,M=void 0,D=void 0,E=void 0,N=r,O=n,L=void 0,R=void 0;switch(h){case"l":r+=p[x++],n+=p[x++],v=s.L,t.addData(v,r,n);break;case"L":r=p[x++],n=p[x++],v=s.L,t.addData(v,r,n);break;case"m":r+=p[x++],n+=p[x++],v=s.M,t.addData(v,r,n),i=r,a=n,h="l";break;case"M":r=p[x++],n=p[x++],v=s.M,t.addData(v,r,n),i=r,a=n,h="L";break;case"h":r+=p[x++],v=s.L,t.addData(v,r,n);break;case"H":r=p[x++],v=s.L,t.addData(v,r,n);break;case"v":n+=p[x++],v=s.L,t.addData(v,r,n);break;case"V":n=p[x++],v=s.L,t.addData(v,r,n);break;case"C":v=s.C,t.addData(v,p[x++],p[x++],p[x++],p[x++],p[x++],p[x++]),r=p[x-2],n=p[x-1];break;case"c":v=s.C,t.addData(v,p[x++]+r,p[x++]+n,p[x++]+r,p[x++]+n,p[x++]+r,p[x++]+n),r+=p[x-2],n+=p[x-1];break;case"S":b=r,_=n,L=t.len(),R=t.data,o===s.C&&(b+=r-R[L-4],_+=n-R[L-3]),v=s.C,N=p[x++],O=p[x++],r=p[x++],n=p[x++],t.addData(v,b,_,N,O,r,n);break;case"s":b=r,_=n,L=t.len(),R=t.data,o===s.C&&(b+=r-R[L-4],_+=n-R[L-3]),v=s.C,N=r+p[x++],O=n+p[x++],r+=p[x++],n+=p[x++],t.addData(v,b,_,N,O,r,n);break;case"Q":N=p[x++],O=p[x++],r=p[x++],n=p[x++],v=s.Q,t.addData(v,N,O,r,n);break;case"q":N=p[x++]+r,O=p[x++]+n,r+=p[x++],n+=p[x++],v=s.Q,t.addData(v,N,O,r,n);break;case"T":b=r,_=n,L=t.len(),R=t.data,o===s.Q&&(b+=r-R[L-4],_+=n-R[L-3]),r=p[x++],n=p[x++],v=s.Q,t.addData(v,b,_,r,n);break;case"t":b=r,_=n,L=t.len(),R=t.data,o===s.Q&&(b+=r-R[L-4],_+=n-R[L-3]),r+=p[x++],n+=p[x++],v=s.Q,t.addData(v,b,_,r,n);break;case"A":C=p[x++],A=p[x++],M=p[x++],D=p[x++],E=p[x++],N=r,O=n,r=p[x++],n=p[x++],v=s.A,O2(N,O,r,n,D,E,C,A,M,v,t);break;case"a":C=p[x++],A=p[x++],M=p[x++],D=p[x++],E=p[x++],N=r,O=n,r+=p[x++],n+=p[x++],v=s.A,O2(N,O,r,n,D,E,C,A,M,v,t);break}}(h==="z"||h==="Z")&&(v=s.Z,t.addData(v),r=i,n=a),o=v}return t.toStatic(),t}var z2=(function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(r){},t})(at);function j2(e){return e.setData!=null}function F2(e,t){var r=I6(e),n=ue({},t);return n.buildPath=function(i){if(j2(i)){i.setData(r.data);var a=i.getContext();a&&i.rebuildPath(a,1)}else{var a=i;r.rebuildPath(a,1)}},n.applyTransform=function(i){M6(r,i),this.dirtyShape()},n}function P6(e,t){return new z2(F2(e,t))}function N6(e,t){var r=F2(e,t),n=(function(i){pe(a,i);function a(o){var s=i.call(this,o)||this;return s.applyTransform=r.applyTransform,s.buildPath=r.buildPath,s}return a})(z2);return n}function R6(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 at(t);return o.createPathProxy(),o.buildPath=function(s){if(j2(s)){s.appendPath(r);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}var Ot=(function(e){pe(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=rt(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=rt(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 nt(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 c=l.getBoundingRect(),f=l.getLocalTransform(a);f?(nt.applyTransform(n,c,f),o=o||n.clone(),o.union(n)):(o=o||c.clone(),o.union(c))}}return o||n},t})(Uf);Ot.prototype.type="group";var O6=(function(){function e(){this.cx=0,this.cy=0,this.r=0}return e})(),ud=(function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new O6},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})(at);ud.prototype.type="circle";var z6=(function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e})(),Hm=(function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new z6},t.prototype.buildPath=function(r,n){var i=.5522848,a=n.cx,o=n.cy,s=n.rx,l=n.ry,c=s*i,f=l*i;r.moveTo(a-s,o),r.bezierCurveTo(a-s,o-f,a-c,o-l,a,o-l),r.bezierCurveTo(a+c,o-l,a+s,o-f,a+s,o),r.bezierCurveTo(a+s,o+f,a+c,o+l,a,o+l),r.bezierCurveTo(a-c,o+l,a-s,o+f,a-s,o),r.closePath()},t})(at);Hm.prototype.type="ellipse";var B2=Math.PI,Vm=B2*2,ho=Math.sin,Ts=Math.cos,j6=Math.acos,Jt=Math.atan2,H2=Math.abs,pu=Math.sqrt,vu=Math.max,ei=Math.min,An=1e-4;function F6(e,t,r,n,i,a,o,s){var l=r-e,c=n-t,f=o-i,h=s-a,v=h*l-f*c;if(!(v*v<An))return v=(f*(t-a)-h*(e-i))/v,[e+v*l,t+v*c]}function cd(e,t,r,n,i,a,o){var s=e-r,l=t-n,c=(o?a:-a)/pu(s*s+l*l),f=c*l,h=-c*s,v=e+f,p=t+h,g=r+f,y=n+h,x=(v+g)/2,b=(p+y)/2,_=g-v,C=y-p,A=_*_+C*C,M=i-a,D=v*y-g*p,E=(C<0?-1:1)*pu(vu(0,M*M*A-D*D)),N=(D*C-_*E)/A,O=(-D*_-C*E)/A,L=(D*C+_*E)/A,R=(-D*_+C*E)/A,j=N-x,H=O-b,W=L-x,K=R-b;return j*j+H*H>W*W+K*K&&(N=L,O=R),{cx:N,cy:O,x0:-f,y0:-h,x1:N*(i/M-1),y1:O*(i/M-1)}}function B6(e){var t;if(ve(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 H6(e,t){var r,n=vu(t.r,0),i=vu(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,c=t.endAngle;if(!(isNaN(l)||isNaN(c))){var f=t.cx,h=t.cy,v=!!t.clockwise,p=H2(c-l),g=p>Vm&&p%Vm;if(g>An&&(p=g),!(n>An))e.moveTo(f,h);else if(p>Vm-An)e.moveTo(f+n*Ts(l),h+n*ho(l)),e.arc(f,h,n,l,c,!v),i>An&&(e.moveTo(f+i*Ts(c),h+i*ho(c)),e.arc(f,h,i,c,l,v));else{var y=void 0,x=void 0,b=void 0,_=void 0,C=void 0,A=void 0,M=void 0,D=void 0,E=void 0,N=void 0,O=void 0,L=void 0,R=void 0,j=void 0,H=void 0,W=void 0,K=n*Ts(l),Q=n*ho(l),re=i*Ts(c),X=i*ho(c),$=p>An;if($){var I=t.cornerRadius;I&&(r=B6(I),y=r[0],x=r[1],b=r[2],_=r[3]);var z=H2(n-i)/2;if(C=ei(z,b),A=ei(z,_),M=ei(z,y),D=ei(z,x),O=E=vu(C,A),L=N=vu(M,D),(E>An||N>An)&&(R=n*Ts(c),j=n*ho(c),H=i*Ts(l),W=i*ho(l),p<B2)){var Y=F6(K,Q,H,W,R,j,re,X);if(Y){var F=K-Y[0],ne=Q-Y[1],oe=R-Y[0],le=j-Y[1],Me=1/ho(j6((F*oe+ne*le)/(pu(F*F+ne*ne)*pu(oe*oe+le*le)))/2),we=pu(Y[0]*Y[0]+Y[1]*Y[1]);O=ei(E,(n-we)/(Me+1)),L=ei(N,(i-we)/(Me-1))}}}if(!$)e.moveTo(f+K,h+Q);else if(O>An){var De=ei(b,O),_e=ei(_,O),Ce=cd(H,W,K,Q,n,De,v),Ve=cd(R,j,re,X,n,_e,v);e.moveTo(f+Ce.cx+Ce.x0,h+Ce.cy+Ce.y0),O<E&&De===_e?e.arc(f+Ce.cx,h+Ce.cy,O,Jt(Ce.y0,Ce.x0),Jt(Ve.y0,Ve.x0),!v):(De>0&&e.arc(f+Ce.cx,h+Ce.cy,De,Jt(Ce.y0,Ce.x0),Jt(Ce.y1,Ce.x1),!v),e.arc(f,h,n,Jt(Ce.cy+Ce.y1,Ce.cx+Ce.x1),Jt(Ve.cy+Ve.y1,Ve.cx+Ve.x1),!v),_e>0&&e.arc(f+Ve.cx,h+Ve.cy,_e,Jt(Ve.y1,Ve.x1),Jt(Ve.y0,Ve.x0),!v))}else e.moveTo(f+K,h+Q),e.arc(f,h,n,l,c,!v);if(!(i>An)||!$)e.lineTo(f+re,h+X);else if(L>An){var De=ei(y,L),_e=ei(x,L),Ce=cd(re,X,R,j,i,-_e,v),Ve=cd(K,Q,H,W,i,-De,v);e.lineTo(f+Ce.cx+Ce.x0,h+Ce.cy+Ce.y0),L<N&&De===_e?e.arc(f+Ce.cx,h+Ce.cy,L,Jt(Ce.y0,Ce.x0),Jt(Ve.y0,Ve.x0),!v):(_e>0&&e.arc(f+Ce.cx,h+Ce.cy,_e,Jt(Ce.y0,Ce.x0),Jt(Ce.y1,Ce.x1),!v),e.arc(f,h,i,Jt(Ce.cy+Ce.y1,Ce.cx+Ce.x1),Jt(Ve.cy+Ve.y1,Ve.cx+Ve.x1),v),De>0&&e.arc(f+Ve.cx,h+Ve.cy,De,Jt(Ve.y1,Ve.x1),Jt(Ve.y0,Ve.x0),!v))}else e.lineTo(f+re,h+X),e.arc(f,h,i,c,l,v)}e.closePath()}}}var V6=(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})(),Qi=(function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new V6},t.prototype.buildPath=function(r,n){H6(r,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t})(at);Qi.prototype.type="sector";var $6=(function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e})(),$m=(function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new $6},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})(at);$m.prototype.type="ring";function U6(e,t,r,n){var i=[],a=[],o=[],s=[],l,c,f,h;if(n){f=[1/0,1/0],h=[-1/0,-1/0];for(var v=0,p=e.length;v<p;v++)ps(f,f,e[v]),vs(h,h,e[v]);ps(f,f,n[0]),vs(h,h,n[1])}for(var v=0,p=e.length;v<p;v++){var g=e[v];if(r)l=e[v?v-1:p-1],c=e[(v+1)%p];else if(v===0||v===p-1){i.push(RF(e[v]));continue}else l=e[v-1],c=e[v+1];pS(a,c,l),Hg(a,a,t);var y=$g(g,l),x=$g(g,c),b=y+x;b!==0&&(y/=b,x/=b),Hg(o,a,-y),Hg(s,a,x);var _=hS([],g,o),C=hS([],g,s);n&&(vs(_,_,f),ps(_,_,h),vs(C,C,f),ps(C,C,h)),i.push(_),i.push(C)}return r&&i.push(i.shift()),i}function V2(e,t,r){var n=t.smooth,i=t.points;if(i&&i.length>=2){if(n){var a=U6(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],c=a[s*2+1],f=i[(s+1)%o];e.bezierCurveTo(l[0],l[1],c[0],c[1],f[0],f[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,h=i.length;s<h;s++)e.lineTo(i[s][0],i[s][1])}r&&e.closePath()}}var W6=(function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e})(),Um=(function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new W6},t.prototype.buildPath=function(r,n){V2(r,n,!0)},t})(at);Um.prototype.type="polygon";var G6=(function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e})(),gu=(function(e){pe(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 G6},t.prototype.buildPath=function(r,n){V2(r,n,!1)},t})(at);gu.prototype.type="polyline";var Y6={},X6=(function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e})(),_i=(function(e){pe(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 X6},t.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=WS(Y6,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 c=n.percent;c!==0&&(r.moveTo(i,a),c<1&&(o=i*(1-c)+o*c,s=a*(1-c)+s*c),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})(at);_i.prototype.type="line";var Tr=[],q6=(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 $2(e,t,r){var n=e.cpx2,i=e.cpy2;return n!=null||i!=null?[(r?bS:$t)(e.x1,e.cpx1,e.cpx2,e.x2,t),(r?bS:$t)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(r?_S:kr)(e.x1,e.cpx1,e.x2,t),(r?_S:kr)(e.y1,e.cpy1,e.y2,t)]}var fd=(function(e){pe(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 q6},t.prototype.buildPath=function(r,n){var i=n.x1,a=n.y1,o=n.x2,s=n.y2,l=n.cpx1,c=n.cpy1,f=n.cpx2,h=n.cpy2,v=n.percent;v!==0&&(r.moveTo(i,a),f==null||h==null?(v<1&&(If(i,l,o,v,Tr),l=Tr[1],o=Tr[2],If(a,c,s,v,Tr),c=Tr[1],s=Tr[2]),r.quadraticCurveTo(l,c,o,s)):(v<1&&(Lf(i,l,f,o,v,Tr),l=Tr[1],f=Tr[2],o=Tr[3],Lf(a,c,h,s,v,Tr),c=Tr[1],h=Tr[2],s=Tr[3]),r.bezierCurveTo(l,c,f,h,o,s)))},t.prototype.pointAt=function(r){return $2(this.shape,r,!1)},t.prototype.tangentAt=function(r){var n=$2(this.shape,r,!0);return Vg(n,n)},t})(at);fd.prototype.type="bezier-curve";var K6=(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})(),dd=(function(e){pe(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 K6},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,c=n.clockwise,f=Math.cos(s),h=Math.sin(s);r.moveTo(f*o+i,h*o+a),r.arc(i,a,o,s,l,!c)},t})(at);dd.prototype.type="arc";var Z6=(function(e){pe(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),at.prototype.getBoundingRect.call(this)},t})(at),U2=(function(){function e(t){this.colorStops=t||[]}return e.prototype.addColorStop=function(t,r){this.colorStops.push({offset:t,color:r})},e})(),W2=(function(e){pe(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})(U2),Q6=(function(e){pe(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})(U2),po=[0,0],vo=[0,0],hd=new He,pd=new He,vd=(function(){function e(t,r){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new He;for(var n=0;n<2;n++)this._axes[n]=new He;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 c=0;c<4;c++)n[c].transform(r);He.sub(i[0],n[1],n[0]),He.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var c=0;c<2;c++)this._origin[c]=i[c].dot(n[0])},e.prototype.intersect=function(t,r){var n=!0,i=!r;return hd.set(1/0,1/0),pd.set(0,0),!this._intersectCheckOneSide(this,t,hd,pd,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(t,this,hd,pd,i,-1)&&(n=!1,i)||i||He.copy(r,n?hd:pd),n},e.prototype._intersectCheckOneSide=function(t,r,n,i,a,o){for(var s=!0,l=0;l<2;l++){var c=this._axes[l];if(this._getProjMinMaxOnAxis(l,t._corners,po),this._getProjMinMaxOnAxis(l,r._corners,vo),po[1]<vo[0]||po[0]>vo[1]){if(s=!1,a)return s;var f=Math.abs(vo[0]-po[1]),h=Math.abs(po[0]-vo[1]);Math.min(f,h)>i.len()&&(f<h?He.scale(i,c,-f*o):He.scale(i,c,h*o))}else if(n){var f=Math.abs(vo[0]-po[1]),h=Math.abs(po[0]-vo[1]);Math.min(f,h)<n.len()&&(f<h?He.scale(n,c,f*o):He.scale(n,c,-h*o))}}return s},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,c=1;c<r.length;c++){var f=r[c].dot(i)+a[t];s=Math.min(f,s),l=Math.max(f,l)}n[0]=s,n[1]=l},e})(),J6=[],e8=(function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.notClear=!0,r.incremental=!0,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.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 nt(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(J6)),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})(ru),t8=bt();function r8(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 c=void 0,f=void 0,h=void 0;n?(c=Ue(n.duration,200),f=Ue(n.easing,"cubicOut"),h=0):(c=t.getShallow(l?"animationDurationUpdate":"animationDuration"),f=t.getShallow(l?"animationEasingUpdate":"animationEasing"),h=t.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(c=a.duration),a.easing!=null&&(f=a.easing),a.delay!=null&&(h=a.delay)),$e(h)&&(h=h(r,i)),$e(c)&&(c=c(r));var v={duration:c||0,delay:h,easing:f};return v}else return null}function Wm(e,t,r,n,i,a,o){var s=!1,l;$e(i)?(o=a,a=i,i=null):Pe(i)&&(a=i.cb,o=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var c=e==="leave";c||t.stopAnimation("leave");var f=r8(e,n,i,c?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(t,i):null);if(f&&f.duration>0){var h=f.duration,v=f.delay,p=f.easing,g={duration:h,delay:v||0,easing:p,done:a,force:!!a||!!o,setToFinal:!c,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 er(e,t,r,n,i,a){Wm("update",e,t,r,n,i,a)}function Vr(e,t,r,n,i,a){Wm("enter",e,t,r,n,i,a)}function mu(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 gd(e,t,r,n,i,a){mu(e)||Wm("leave",e,t,r,n,i,a)}function G2(e,t,r,n){e.removeTextContent(),e.removeTextGuideLine(),gd(e,{style:{opacity:0}},t,r,n)}function md(e,t,r){function n(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(i){i.isGroup||G2(i,t,r,n)}):G2(e,t,r,n)}function Gm(e){t8(e).oldStyle=e.style}var yd=Math.max,xd=Math.min,Ym={};function n8(e){return at.extend(e)}var i8=N6;function a8(e,t){return i8(e,t)}function Dn(e,t){Ym[e]=t}function o8(e){if(Ym.hasOwnProperty(e))return Ym[e]}function Xm(e,t,r,n){var i=P6(e,t);return r&&(n==="center"&&(r=X2(r,i.getBoundingRect())),q2(i,r)),i}function Y2(e,t,r){var n=new Zi({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(X2(t,a))}}});return n}function X2(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 s8=R6;function q2(e,t){if(e.applyTransform){var r=e.getBoundingRect(),n=r.calculateTransform(t);e.applyTransform(n)}}function yu(e,t){return WS(e,e,{lineWidth:t}),e}function l8(e){return GS(e.shape,e.shape,e.style),e}var u8=uo;function c8(e,t){for(var r=Pg([]);e&&e!==t;)cs(r,e.getLocalTransform(),r),e=e.parent;return r}function qm(e,t,r){return t&&!br(t)&&(t=Xg.getLocalTransform(t)),r&&(t=Og([],t)),en([],e,t)}function f8(e,t,r){var n=t[4]===0||t[5]===0||t[0]===0?1:Math.abs(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:Math.abs(2*t[4]/t[2]),a=[e==="left"?-n:e==="right"?n:0,e==="top"?-i:e==="bottom"?i:0];return a=qm(a,t,r),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function K2(e){return!e.isGroup}function d8(e){return e.shape!=null}function Z2(e,t,r){if(!e||!t)return;function n(o){var s={};return o.traverse(function(l){K2(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return d8(o)&&(s.shape=ue({},o.shape)),s}var a=n(e);t.traverse(function(o){if(K2(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),er(o,l,r,Qe(o).dataIndex)}}})}function h8(e,t){return Te(e,function(r){var n=r[0];n=yd(n,t.x),n=xd(n,t.x+t.width);var i=r[1];return i=yd(i,t.y),i=xd(i,t.y+t.height),[n,i]})}function p8(e,t){var r=yd(e.x,t.x),n=xd(e.x+e.width,t.x+t.width),i=yd(e.y,t.y),a=xd(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 Km(e,t,r){var n=ue({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),tt(i,r),new Zi(n)):Xm(e.replace("path://",""),n,r,"center")}function v8(e,t,r,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(Q2(e,t,r,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function Q2(e,t,r,n,i,a,o,s){var l=r-e,c=n-t,f=o-i,h=s-a,v=Zm(f,h,l,c);if(g8(v))return!1;var p=e-i,g=t-a,y=Zm(p,g,l,c)/v;if(y<0||y>1)return!1;var x=Zm(p,g,f,h)/v;return!(x<0||x>1)}function Zm(e,t,r,n){return e*n-r*t}function g8(e){return e<=1e-6&&e>=-1e-6}function bd(e){var t=e.itemTooltipOption,r=e.componentModel,n=e.itemName,i=Ae(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(xt(l),function(f){Ga(s,f)||(s[f]=l[f],s.$vars.push(f))});var c=Qe(e.el);c.componentMainType=a,c.componentIndex=o,c.tooltipConfig={name:n,option:tt({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function J2(e,t){var r;e.isGroup&&(r=t(e)),r||e.traverse(t)}function xu(e,t){if(e)if(ve(e))for(var r=0;r<e.length;r++)J2(e[r],t);else J2(e,t)}Dn("circle",ud),Dn("ellipse",Hm),Dn("sector",Qi),Dn("ring",$m),Dn("polygon",Um),Dn("polyline",gu),Dn("rect",Rt),Dn("line",_i),Dn("bezierCurve",fd),Dn("arc",dd);const m8=Object.freeze(Object.defineProperty({__proto__:null,Arc:dd,BezierCurve:fd,BoundingRect:nt,Circle:ud,CompoundPath:Z6,Ellipse:Hm,Group:Ot,Image:Zi,IncrementalDisplayable:e8,Line:_i,LinearGradient:W2,OrientedBoundingRect:vd,Path:at,Point:He,Polygon:Um,Polyline:gu,RadialGradient:Q6,Rect:Rt,Ring:$m,Sector:Qi,Text:dr,applyTransform:qm,clipPointsByRect:h8,clipRectByRect:p8,createIcon:Km,extendPath:a8,extendShape:n8,getShapeClass:o8,getTransform:c8,groupTransition:Z2,initProps:Vr,isElementRemoved:mu,lineLineIntersect:Q2,linePolygonIntersect:v8,makeImage:Y2,makePath:Xm,mergePath:s8,registerShape:Dn,removeElement:gd,removeElementWithFadeOut:md,resizePath:q2,setTooltipConfig:bd,subPixelOptimize:u8,subPixelOptimizeLine:yu,subPixelOptimizeRect:l8,transformDirection:f8,traverseElements:xu,updateProps:er},Symbol.toStringTag,{value:"Module"}));var wd={};function y8(e,t){for(var r=0;r<Cr.length;r++){var n=Cr[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 eC(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},c=0;c<Cr.length;c++){var f=Cr[c],h=t[f];l[f]=Ue(n?n.getFormattedLabel(i,f,null,a,h&&h.get("formatter")):null,s)}return l}function As(e,t,r,n){r=r||wd;for(var i=e instanceof dr,a=!1,o=0;o<rd.length;o++){var s=t[rd[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=i?e:e.getTextContent();if(a){i||(l||(l=new dr,e.setTextContent(l)),e.stateProxy&&(l.stateProxy=e.stateProxy));var c=eC(r,t),f=t.normal,h=!!f.getShallow("show"),v=Ds(f,n&&n.normal,r,!1,!i);v.text=c.normal,i||e.setTextConfig(tC(f,r,!1));for(var o=0;o<Cr.length;o++){var p=Cr[o],s=t[p];if(s){var g=l.ensureState(p),y=!!Ue(s.getShallow("show"),h);if(y!==h&&(g.ignore=!y),g.style=Ds(s,n&&n[p],r,!0,!i),g.style.text=c[p],!i){var x=e.ensureState(p);x.textConfig=tC(s,r,!0)}}}l.silent=!!f.getShallow("silent"),l.style.x!=null&&(v.x=l.style.x),l.style.y!=null&&(v.y=l.style.y),l.ignore=!h,l.useStyle(v),l.dirty(),r.enableTextSetter&&(_d(l).setLabelText=function(b){var _=eC(r,t,b);y8(l,_)})}else l&&(l.ignore=!0);e.dirty()}function go(e,t){t=t||"label";for(var r={normal:e.getModel(t)},n=0;n<Cr.length;n++){var i=Cr[n];r[i]=e.getModel([i,t])}return r}function Ds(e,t,r,n,i){var a={};return x8(a,e,r,n,i),t&&ue(a,t),a}function tC(e,t,r){t=t||{};var n={},i,a=e.getShallow("rotate"),o=Ue(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",n}function x8(e,t,r,n,i){r=r||wd;var a=t.ecModel,o=a&&a.option.textStyle,s=b8(t),l;if(s){l={};for(var c in s)if(s.hasOwnProperty(c)){var f=t.getModel(["rich",c]);aC(l[c]={},f,o,r,n,i,!1,!0)}}l&&(e.rich=l);var h=t.get("overflow");h&&(e.overflow=h);var v=t.get("minMargin");v!=null&&(e.margin=v),aC(e,t,o,r,n,i,!0,!1)}function b8(e){for(var t;e&&e!==e.ecModel;){var r=(e.option||wd).rich;if(r){t=t||{};for(var n=xt(r),i=0;i<n.length;i++){var a=n[i];t[a]=1}}e=e.parentModel}return t}var rC=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],nC=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],iC=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function aC(e,t,r,n,i,a,o,s){r=!i&&r||wd;var l=n&&n.inheritColor,c=t.getShallow("color"),f=t.getShallow("textBorderColor"),h=Ue(t.getShallow("opacity"),r.opacity);(c==="inherit"||c==="auto")&&(l?c=l:c=null),(f==="inherit"||f==="auto")&&(l?f=l:f=null),a||(c=c||r.color,f=f||r.textBorderColor),c!=null&&(e.fill=c),f!=null&&(e.stroke=f);var v=Ue(t.getShallow("textBorderWidth"),r.textBorderWidth);v!=null&&(e.lineWidth=v);var p=Ue(t.getShallow("textBorderType"),r.textBorderType);p!=null&&(e.lineDash=p);var g=Ue(t.getShallow("textBorderDashOffset"),r.textBorderDashOffset);g!=null&&(e.lineDashOffset=g),!i&&h==null&&!s&&(h=n&&n.defaultOpacity),h!=null&&(e.opacity=h),!i&&!a&&e.fill==null&&n.inheritColor&&(e.fill=n.inheritColor);for(var y=0;y<rC.length;y++){var x=rC[y],b=Ue(t.getShallow(x),r[x]);b!=null&&(e[x]=b)}for(var y=0;y<nC.length;y++){var x=nC[y],b=t.getShallow(x);b!=null&&(e[x]=b)}if(e.verticalAlign==null){var _=t.getShallow("baseline");_!=null&&(e.verticalAlign=_)}if(!o||!n.disableBox){for(var y=0;y<iC.length;y++){var x=iC[y],b=t.getShallow(x);b!=null&&(e[x]=b)}var C=t.getShallow("borderType");C!=null&&(e.borderDash=C),(e.backgroundColor==="auto"||e.backgroundColor==="inherit")&&l&&(e.backgroundColor=l),(e.borderColor==="auto"||e.borderColor==="inherit")&&l&&(e.borderColor=l)}}function w8(e,t){var r=t&&t.getModel("textStyle");return Wn([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 _d=bt();function _8(e,t,r,n){if(e){var i=_d(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 k8=["textStyle","color"],Qm=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Jm=new dr,S8=(function(){function e(){}return e.prototype.getTextColor=function(t){var r=this.ecModel;return this.getShallow("color")||(!t&&r?r.get(k8):null)},e.prototype.getFont=function(){return w8({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<Qm.length;n++)r[Qm[n]]=this.getShallow(Qm[n]);return Jm.useStyle(r),Jm.update(),Jm.getBoundingRect()},e})(),oC=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],C8=Wl(oC),T8=(function(){function e(){}return e.prototype.getLineStyle=function(t){return C8(this,t)},e})(),sC=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],A8=Wl(sC),D8=(function(){function e(){}return e.prototype.getItemStyle=function(t,r){return A8(this,t,r)},e})(),Ct=(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){Ze(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(qe(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(!je.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})();Lg(Ct),gF(Ct),Cn(Ct,T8),Cn(Ct,D8),Cn(Ct,wF),Cn(Ct,S8);function bu(e){return e==null?0:e.length||1}function lC(e){return e}var M8=(function(){function e(t,r,n,i,a,o){this._old=t,this._new=r,this._oldKeyGetter=n||lC,this._newKeyGetter=i||lC,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],c=bu(l);if(c>1){var f=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(f,o)}else c===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],c=n[l],f=i[l],h=bu(c),v=bu(f);if(h>1&&v===1)this._updateManyToOne&&this._updateManyToOne(f,c),i[l]=null;else if(h===1&&v>1)this._updateOneToMany&&this._updateOneToMany(f,c),i[l]=null;else if(h===1&&v===1)this._update&&this._update(f,c),i[l]=null;else if(h>1&&v>1)this._updateManyToMany&&this._updateManyToMany(f,c),i[l]=null;else if(h>1)for(var p=0;p<h;p++)this._remove&&this._remove(c[p]);else this._remove&&this._remove(c)}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=bu(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],c=bu(l);c===0?(r[s]=o,a&&n.push(s)):c===1?r[s]=[l,o]:l.push(o)}}},e})(),uC=Ge(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),sn="original",Ar="arrayRows",Mn="objectRows",ti="keyedColumns",Ji="typedArray",cC="unknown",ki="column",Ms="row",Ut={Must:1,Might:2,Not:3},fC=bt();function E8(e){fC(e).datasetMap=Ge()}function L8(e,t,r){var n={},i=ey(t);if(!i||!e)return n;var a=[],o=[],s=t.ecModel,l=fC(s).datasetMap,c=i.uid+"_"+r.seriesLayoutBy,f,h;e=e.slice(),U(e,function(y,x){var b=Pe(y)?y:e[x]={name:y};b.type==="ordinal"&&f==null&&(f=x,h=g(b)),n[b.name]=[]});var v=l.get(c)||l.set(c,{categoryWayDim:h,valueWayDim:0});U(e,function(y,x){var b=y.name,_=g(y);if(f==null){var C=v.valueWayDim;p(n[b],C,_),p(o,C,_),v.valueWayDim+=_}else if(f===x)p(n[b],0,_),p(a,0,_);else{var C=v.categoryWayDim;p(n[b],C,_),p(o,C,_),v.categoryWayDim+=_}});function p(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 I8(e,t,r){var n={},i=ey(e);if(!i)return n;var a=t.sourceFormat,o=t.dimensionsDefine,s;(a===Mn||a===ti)&&U(o,function(f,h){(Pe(f)?f.name:f)==="name"&&(s=h)});var l=(function(){for(var f={},h={},v=[],p=0,g=Math.min(5,r);p<g;p++){var y=hC(t.data,a,t.seriesLayoutBy,o,t.startIndex,p);v.push(y);var x=y===Ut.Not;if(x&&f.v==null&&p!==s&&(f.v=p),(f.n==null||f.n===f.v||!x&&v[f.n]===Ut.Not)&&(f.n=p),b(f)&&v[f.n]!==Ut.Not)return f;x||(y===Ut.Might&&h.v==null&&p!==s&&(h.v=p),(h.n==null||h.n===h.v)&&(h.n=p))}function b(_){return _.v!=null&&_.n!=null}return b(f)?f:b(h)?h:null})();if(l){n.value=[l.v];var c=s??l.n;n.itemName=[c],n.seriesName=[c]}return n}function ey(e){var t=e.get("data",!0);if(!t)return lu(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},Tn).models[0]}function P8(e){return!e.get("transform",!0)&&!e.get("fromTransformResult",!0)?[]:lu(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},Tn).models}function dC(e,t){return hC(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function hC(e,t,r,n,i,a){var o,s=5;if(wr(e))return Ut.Not;var l,c;if(n){var f=n[a];Pe(f)?(l=f.name,c=f.type):Ae(f)&&(l=f)}if(c!=null)return c==="ordinal"?Ut.Must:Ut.Not;if(t===Ar){var h=e;if(r===Ms){for(var v=h[a],p=0;p<(v||[]).length&&p<s;p++)if((o=A(v[i+p]))!=null)return o}else for(var p=0;p<h.length&&p<s;p++){var g=h[i+p];if(g&&(o=A(g[a]))!=null)return o}}else if(t===Mn){var y=e;if(!l)return Ut.Not;for(var p=0;p<y.length&&p<s;p++){var x=y[p];if(x&&(o=A(x[l]))!=null)return o}}else if(t===ti){var b=e;if(!l)return Ut.Not;var v=b[l];if(!v||wr(v))return Ut.Not;for(var p=0;p<v.length&&p<s;p++)if((o=A(v[p]))!=null)return o}else if(t===sn)for(var _=e,p=0;p<_.length&&p<s;p++){var x=_[p],C=au(x);if(!ve(C))return Ut.Not;if((o=A(C[a]))!=null)return o}function A(M){var D=Ae(M);if(M!=null&&Number.isFinite(Number(M))&&M!=="")return D?Ut.Might:Ut.Not;if(D&&M!=="-")return Ut.Must}return Ut.Not}var kd=(function(){function e(t){this.data=t.data||(t.sourceFormat===ti?{}:[]),this.sourceFormat=t.sourceFormat||cC,this.seriesLayoutBy=t.seriesLayoutBy||ki,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&&dC(this,n)===Ut.Must&&(i.type="ordinal")}}return e})();function ty(e){return e instanceof kd}function ry(e,t,r){r=r||vC(e);var n=t.seriesLayoutBy,i=R8(e,r,n,t.sourceHeader,t.dimensions),a=new kd({data:e,sourceFormat:r,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:qe(t)});return a}function pC(e){return new kd({data:e,sourceFormat:wr(e)?Ji:sn})}function N8(e){return new kd({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:qe(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function vC(e){var t=cC;if(wr(e))t=Ji;else if(ve(e)){e.length===0&&(t=Ar);for(var r=0,n=e.length;r<n;r++){var i=e[r];if(i!=null){if(ve(i)||wr(i)){t=Ar;break}else if(Pe(i)){t=Mn;break}}}}else if(Pe(e)){for(var a in e)if(Ga(e,a)&&br(e[a])){t=ti;break}}return t}function R8(e,t,r,n,i){var a,o;if(!e)return{dimensionsDefine:gC(i),startIndex:o,dimensionsDetectedCount:a};if(t===Ar){var s=e;n==="auto"||n==null?mC(function(c){c!=null&&c!=="-"&&(Ae(c)?o==null&&(o=1):o=0)},r,s,10):o=lt(n)?n:n?1:0,!i&&o===1&&(i=[],mC(function(c,f){i[f]=c!=null?c+"":""},r,s,1/0)),a=i?i.length:r===Ms?s.length:s[0]?s[0].length:null}else if(t===Mn)i||(i=O8(e));else if(t===ti)i||(i=[],U(e,function(c,f){i.push(f)}));else if(t===sn){var l=au(e[0]);a=ve(l)&&l.length||1}return{startIndex:o,dimensionsDefine:gC(i),dimensionsDetectedCount:a}}function O8(e){for(var t=0,r;t<e.length&&!(r=e[t++]););if(r)return xt(r)}function gC(e){if(e){var t=Ge();return Te(e,function(r,n){r=Pe(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 mC(e,t,r,n){if(t===Ms)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 yC(e){var t=e.sourceFormat;return t===Mn||t===ti}var mo,yo,xo,xC,bC,wC=(function(){function e(t,r){var n=ty(t)?t:pC(t);this._source=n;var i=this._data=n.data;n.sourceFormat===Ji&&(this._offset=0,this._dimSize=r,this._data=i),bC(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;bC=function(o,s,l){var c=l.sourceFormat,f=l.seriesLayoutBy,h=l.startIndex,v=l.dimensionsDefine,p=xC[iy(c,f)];if(ue(o,p),c===Ji)o.getItem=r,o.count=i,o.fillStorage=n;else{var g=kC(c,f);o.getItem=ht(g,null,s,h,v);var y=CC(c,f);o.count=ht(y,null,s,h,v)}};var r=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,c=this._dimSize,f=c*o,h=0;h<c;h++)s[h]=l[f+h];return s},n=function(o,s,l,c){for(var f=this._data,h=this._dimSize,v=0;v<h;v++){for(var p=c[v],g=p[0]==null?1/0:p[0],y=p[1]==null?-1/0:p[1],x=s-o,b=l[v],_=0;_<x;_++){var C=f[_*h+v];b[o+_]=C,C<g&&(g=C),C>y&&(y=C)}p[0]=g,p[1]=y}},i=function(){return this._data?this._data.length/this._dimSize:0};xC=(t={},t[Ar+"_"+ki]={pure:!0,appendData:a},t[Ar+"_"+Ms]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Mn]={pure:!0,appendData:a},t[ti]={pure:!0,appendData:function(o){var s=this._data;U(o,function(l,c){for(var f=s[c]||(s[c]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},t[sn]={appendData:a},t[Ji]={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})(),_C=function(e,t,r,n){return e[n]},z8=(mo={},mo[Ar+"_"+ki]=function(e,t,r,n){return e[n+t]},mo[Ar+"_"+Ms]=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},mo[Mn]=_C,mo[ti]=function(e,t,r,n,i){for(var a=i||[],o=0;o<r.length;o++){var s=r[o].name,l=e[s];a[o]=l?l[n]:null}return a},mo[sn]=_C,mo);function kC(e,t){var r=z8[iy(e,t)];return r}var SC=function(e,t,r){return e.length},j8=(yo={},yo[Ar+"_"+ki]=function(e,t,r){return Math.max(0,e.length-t)},yo[Ar+"_"+Ms]=function(e,t,r){var n=e[0];return n?Math.max(0,n.length-t):0},yo[Mn]=SC,yo[ti]=function(e,t,r){var n=r[0].name,i=e[n];return i?i.length:0},yo[sn]=SC,yo);function CC(e,t){var r=j8[iy(e,t)];return r}var ny=function(e,t,r){return e[t]},F8=(xo={},xo[Ar]=ny,xo[Mn]=function(e,t,r){return e[r]},xo[ti]=ny,xo[sn]=function(e,t,r){var n=au(e);return n instanceof Array?n[t]:n},xo[Ji]=ny,xo);function TC(e){var t=F8[e];return t}function iy(e,t){return e===Ar?e+"_"+t:e}function Es(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 TC(a)(n,o,s)}else{var l=n;return a===sn&&(l=au(n)),l}}}}var B8=(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 H8(e,t){var r={},n=r.encode={},i=Ge(),a=[],o=[],s={};U(e.dimensions,function(v){var p=e.getDimensionInfo(v),g=p.coordDim;if(g){var y=p.coordDimIndex;ay(n,g)[y]=v,p.isExtraCoord||(i.set(g,1),$8(p.type)&&(a[0]=v),ay(s,g)[y]=e.getDimensionIndex(p.name)),p.defaultTooltip&&o.push(v)}uC.each(function(x,b){var _=ay(n,b),C=p.otherDims[b];C!=null&&C!==!1&&(_[C]=p.name)})});var l=[],c={};i.each(function(v,p){var g=n[p];c[p]=g[0],l=l.concat(g)}),r.dataDimsOnCoord=l,r.dataDimIndicesOnCoord=Te(l,function(v){return e.getDimensionInfo(v).storeDimIndex}),r.encodeFirstDimNotExtra=c;var f=n.label;f&&f.length&&(a=f.slice());var h=n.tooltip;return h&&h.length?o=h.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,r.userOutput=new B8(s,t),r}function ay(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function V8(e){return e==="category"?"ordinal":e==="time"?"time":"float"}function $8(e){return!(e==="ordinal"||e==="time")}var Sd=(function(){function e(t){this.otherDims={},t!=null&&ue(this,t)}return e})();function Ls(e,t){var r=t&&t.type;return r==="ordinal"?e:(r==="time"&&!lt(e)&&e!=null&&e!=="-"&&(e=+bi(e)),e==null||e===""?NaN:Number(e))}Ge({number:function(e){return parseFloat(e)},time:function(e){return+bi(e)},trim:function(e){return Ae(e)?Wn(e):e}});var U8=(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=lt(t)?t:Qf(t),i=lt(r)?r:Qf(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=Ae(t),l=Ae(r);s&&(n=l?t:0),l&&(i=s?r:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},e})(),Cd="undefined",W8=typeof Uint32Array===Cd?Array:Uint32Array,G8=typeof Uint16Array===Cd?Array:Uint16Array,AC=typeof Int32Array===Cd?Array:Int32Array,DC=typeof Float64Array===Cd?Array:Float64Array,MC={float:DC,int:AC,ordinal:Array,number:Array,time:DC},oy;function Is(e){return e>65535?W8:G8}function Ps(){return[1/0,-1/0]}function Y8(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function EC(e,t,r,n,i){var a=MC[r||"float"];if(i){var o=e[t],s=o&&o.length;if(s!==n){for(var l=new a(n),c=0;c<s;c++)l[c]=o[c];e[t]=l}}else e[t]=new a(n)}var sy=(function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Ge()}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=oy[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[],yC(i),this._dimensions=Te(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 MC[r||"float"](this._rawCount),this._rawExtent[a]=Ps(),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]=Ps());for(var l=a[t],c=o;c<s;c++){var f=n[c]=r.parseAndCollect(n[c]);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),c=0;c<a;c++){var f=i[c];EC(n,c,f.type,l,!0)}for(var h=[],v=s;v<l;v++)for(var p=v-s,g=0;g<a;g++){var f=i[g],y=oy.arrayRows.call(this,t[p]||h,f.property,p,g);n[g][v]=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,c=Te(o,function(_){return _.property}),f=0;f<s;f++){var h=o[f];l[f]||(l[f]=Ps()),EC(a,f,h.type,r,n)}if(i.fillStorage)i.fillStorage(t,r,a,l);else for(var v=[],p=t;p<r;p++){v=i.getItem(p,v);for(var g=0;g<s;g++){var y=a[g],x=this._dimValueGetter(v,c[g],p,g);y[p]=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(a){isNaN(a)||r.push(a)});var n=r.sort(function(a,o){return a-o}),i=this.count();return i===0?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/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.indicesOfNearest=function(t,r,n){var i=this._chunks,a=i[t],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,c=0,f=0,h=this.count();f<h;f++){var v=this.getRawIndex(f),p=r-a[v],g=Math.abs(p);g<=n&&((g<s||g===s&&p>=0&&l<0)&&(s=g,l=p,c=0),p===l&&(o[c++]=f))}return o.length=c,o},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=Is(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=Is(n._rawCount),o=new a(i),s=[],l=t.length,c=0,f=t[0],h=n._chunks,v=0;v<i;v++){var p=void 0,g=n.getRawIndex(v);if(l===0)p=r(v);else if(l===1){var y=h[f][g];p=r(y,v)}else{for(var x=0;x<l;x++)s[x]=h[t[x]][g];s[x]=v,p=r.apply(null,s)}p&&(o[c++]=g)}return c<i&&(n._indices=o),n._count=c,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(t){var r=this.clone(),n=r._count;if(!n)return this;var i=xt(t),a=i.length;if(!a)return this;var o=r.count(),s=Is(r._rawCount),l=new s(o),c=0,f=i[0],h=t[f][0],v=t[f][1],p=r._chunks,g=!1;if(!r._indices){var y=0;if(a===1){for(var x=p[i[0]],b=0;b<n;b++){var _=x[b];(_>=h&&_<=v||isNaN(_))&&(l[c++]=y),y++}g=!0}else if(a===2){for(var x=p[i[0]],C=p[i[1]],A=t[i[1]][0],M=t[i[1]][1],b=0;b<n;b++){var _=x[b],D=C[b];(_>=h&&_<=v||isNaN(_))&&(D>=A&&D<=M||isNaN(D))&&(l[c++]=y),y++}g=!0}}if(!g)if(a===1)for(var b=0;b<o;b++){var E=r.getRawIndex(b),_=p[i[0]][E];(_>=h&&_<=v||isNaN(_))&&(l[c++]=E)}else for(var b=0;b<o;b++){for(var N=!0,E=r.getRawIndex(b),O=0;O<a;O++){var L=i[O],_=p[L][E];(_<t[L][0]||_>t[L][1])&&(N=!1)}N&&(l[c++]=r.getRawIndex(b))}return c<o&&(r._indices=l),r._count=c,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=[],c=t._rawExtent,f=0;f<r.length;f++)c[r[f]]=Ps();for(var h=0;h<s;h++){for(var v=t.getRawIndex(h),p=0;p<o;p++)l[p]=i[r[p]][v];l[o]=h;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=c[y],_=i[y];_&&(_[v]=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),c=this.getRawIndex(0),f,h,v,p=new(Is(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));p[s++]=c;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,C=y;C<x;C++){var A=this.getRawIndex(C),M=a[A];isNaN(M)||(_+=M)}_/=x-y;var D=g,E=Math.min(g+l,o),N=g-1,O=a[c];f=-1,v=D;for(var L=-1,R=0,C=D;C<E;C++){var A=this.getRawIndex(C),M=a[A];if(isNaN(M)){R++,L<0&&(L=A);continue}h=Math.abs((N-b)*(M-O)-(N-C)*(_-O)),h>f&&(f=h,v=A)}R>0&&R<E-D&&(p[s++]=Math.min(L,v),v=Math.max(L,v)),p[s++]=v,c=v}return p[s++]=this.getRawIndex(o-1),n._count=s,n._indices=p,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(Is(this._rawCount))(Math.ceil(s/a)*2),c=0,f=0;f<s;f+=a){var h=f,v=o[this.getRawIndex(h)],p=f,g=o[this.getRawIndex(p)],y=a;f+a>s&&(y=s-f);for(var x=0;x<y;x++){var b=this.getRawIndex(f+x),_=o[b];_<v&&(v=_,h=f+x),_>g&&(g=_,p=f+x)}var C=this.getRawIndex(h),A=this.getRawIndex(p);h<p?(l[c++]=C,l[c++]=A):(l[c++]=A,l[c++]=C)}return n._count=c,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),c=o[t],f=this.count(),h=a._rawExtent[t]=Ps(),v=new(Is(this._rawCount))(Math.ceil(f/l)),p=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]=c[x]}var b=n(s),_=this.getRawIndex(Math.min(g+i(s,b)||0,f-1));c[_]=b,b<h[0]&&(h[0]=b),b>h[1]&&(h[1]=b),v[p++]=_}return a._count=p,a._indices=v,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,c=[];l<n;l++)c[l]=i[t[l]][s];c[l]=a,r.apply(null,c)}}},e.prototype.getDataExtent=function(t){var r=this._chunks[t],n=Ps();if(!r)return n;var i=this.count(),a=!this._indices,o;if(a)return this._rawExtent[t].slice();if(o=this._extent[t],o)return o.slice();o=n;for(var s=o[0],l=o[1],c=0;c<i;c++){var f=this.getRawIndex(c),h=r[f];h<s&&(s=h),h>l&&(l=h)}return o=[s,l],this._extent[t]=o,o},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&&$i(t,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?Y8(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=qe(this._extent),t._rawExtent=qe(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 Ls(r[a],this._dimensions[a])}oy={arrayRows:t,objectRows:function(r,n,i,a){return Ls(r[n],this._dimensions[a])},keyedColumns:t,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return Ls(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}})(),e})(),X8=bt(),q8={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},LC=(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=NC(this.source)))},e.prototype.getSourceDimensionIndex=function(t){return Ue(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=yC(this.source),n=!RC(t),i="",a=[],o=0,s=0;o<t;o++){var l=void 0,c=void 0,f=void 0,h=this.dimensions[s];if(h&&h.storeDimIndex===o)l=r?h.name:null,c=h.type,f=h.ordinalMeta,s++;else{var v=this.getSourceDimension(o);v&&(l=r?v.name:null,c=v.type)}a.push({property:l,type:c,ordinalMeta:f}),r&&l!=null&&(!h||!h.isCalculationCoord)&&(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=q8[c]||"f",f&&(i+=f.uid),i+="$"}var p=this.source,g=[p.seriesLayoutBy,p.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 IC(e){return e instanceof LC}function PC(e){for(var t=Ge(),r=0;r<(e||[]).length;r++){var n=e[r],i=Pe(n)?n.name:n;i!=null&&t.get(i)==null&&t.set(i,r)}return t}function NC(e){var t=X8(e);return t.dimNameMap||(t.dimNameMap=PC(e.dimensionsDefine))}function RC(e){return e>30}var wu=Pe,ea=Te,K8=typeof Int32Array>"u"?Array:Int32Array,Z8="e\0\0",OC=-1,Q8=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],J8=["_approximateExtent"],zC,Td,_u,ku,ly,Su,uy,Cu=(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;IC(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,c={},f=0;f<n.length;f++){var h=n[f],v=Ae(h)?new Sd({name:h}):h instanceof Sd?h:new Sd(h),p=v.name;v.type=v.type||"float",v.coordDim||(v.coordDim=p,v.coordDimIndex=0);var g=v.otherDims=v.otherDims||{};o.push(p),a[p]=v,c[p]!=null&&(l=!0),v.createInvertedIndices&&(s[p]=[]),g.itemName===0&&(this._nameDimIdx=f),g.itemId===0&&(this._idDimIdx=f),i&&(v.storeDimIndex=f)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=r,this._invertedIndicesMap=s,this._dimOmitted){var y=this._dimIdxToName=Ge();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(lt(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 sy&&(a=t),!a){var o=this.dimensions,s=ty(t)||br(t)?new wC(t,o.length):t;a=new sy;var l=ea(o,function(c){return{type:i._dimInfos[c].type,property:c}});a.initData(s,l,n)}this._store=a,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=H8(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&&uy(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!==Ji&&!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===sn;if(l&&!i.pure)for(var c=[],f=t;f<r;f++){var h=i.getItem(f,c);if(!this.hasItemOption&&YB(h)&&(this.hasItemOption=!0),h){var v=h.name;a[f]==null&&v!=null&&(a[f]=Jn(v,null));var p=h.id;o[f]==null&&p!=null&&(o[f]=Jn(p,null))}}if(this._shouldMakeIdFromName())for(var f=t;f<r;f++)uy(this,f);zC(this)}},e.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},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){wu(t)?ue(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=_u(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 Td(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))},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 ve(t)?i.getValues(ea(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)?OC:i},e.prototype.indicesOfNearest=function(t,r,n){return this._store.indicesOfNearest(this._getStoreDimIndex(t),r,n)},e.prototype.each=function(t,r,n){$e(t)&&(n=r,r=t,t=[]);var i=n||this,a=ea(ku(t),this._getStoreDimIndex,this);this._store.each(a,i?ht(r,i):r)},e.prototype.filterSelf=function(t,r,n){$e(t)&&(n=r,r=t,t=[]);var i=n||this,a=ea(ku(t),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?ht(r,i):r),this},e.prototype.selectRange=function(t){var r=this,n={},i=xt(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=ea(ku(t),this._getStoreDimIndex,this),s=Su(this);return s._store=this._store.map(o,a?ht(r,a):r),s},e.prototype.modify=function(t,r,n,i){var a=n||i||this,o=ea(ku(t),this._getStoreDimIndex,this);this._store.modify(o,a?ht(r,a):r)},e.prototype.downSample=function(t,r,n,i){var a=Su(this);return a._store=this._store.downSample(this._getStoreDimIndex(t),r,n,i),a},e.prototype.minmaxDownSample=function(t,r){var n=Su(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),r),n},e.prototype.lttbDownSample=function(t,r){var n=Su(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 Ct(n,r,r&&r.ecModel)},e.prototype.diff=function(t){var r=this;return new M8(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(n){return Td(t,n)},function(n){return Td(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||{},wu(t)?ue(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),ve(a)?a=a.slice():wu(a)&&(a=ue({},a)),i[r]=a),a},e.prototype.setItemVisual=function(t,r,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,wu(r)?ue(i,r):i[r]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,r){wu(t)?ue(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?ue(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;s6(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:ea(this.dimensions,this._getDimInfo,this),this.hostModel)),ly(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(Mg(arguments)))})},e.internalField=(function(){zC=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 K8(o.categories.length);for(var l=0;l<n.length;l++)n[l]=OC;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},_u=function(t,r,n){return Jn(t._getCategory(r,n),null)},Td=function(t,r){var n=t._idList[r];return n==null&&t._idDimIdx!=null&&(n=_u(t,t._idDimIdx,r)),n==null&&(n=Z8+r),n},ku=function(t){return ve(t)||(t=t!=null?[t]:[]),t},Su=function(t){var r=new e(t._schema?t._schema:ea(t.dimensions,t._getDimInfo,t),t.hostModel);return ly(r,t),r},ly=function(t,r){U(Q8.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(t[n]=r[n])}),t.__wrappedMethods=r.__wrappedMethods,U(J8,function(n){t[n]=qe(r[n])}),t._calculationInfo=ue({},r._calculationInfo)},uy=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=_u(t,a,r)),l==null&&o!=null&&(i[r]=l=_u(t,o,r)),l==null&&s!=null){var c=t._nameRepeatCount,f=c[s]=(c[s]||0)+1;l=s,f>1&&(l+="__ec__"+f),i[r]=l}}})(),e})();function jC(e,t){ty(e)||(e=pC(e)),t=t||{};var r=t.coordDimensions||[],n=t.dimensionsDefine||e.dimensionsDefine||[],i=Ge(),a=[],o=t9(e,r,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&RC(o),l=n===e.dimensionsDefine,c=l?NC(e):PC(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(e,o));for(var h=Ge(f),v=new AC(o),p=0;p<v.length;p++)v[p]=-1;function g(O){var L=v[O];if(L<0){var R=n[O],j=Pe(R)?R:{name:R},H=new Sd,W=j.name;W!=null&&c.get(W)!=null&&(H.name=H.displayName=W),j.type!=null&&(H.type=j.type),j.displayName!=null&&(H.displayName=j.displayName);var K=a.length;return v[O]=K,H.storeDimIndex=O,a.push(H),H}return a[L]}if(!s)for(var p=0;p<o;p++)g(p);h.each(function(O,L){var R=hr(O).slice();if(R.length===1&&!Ae(R[0])&&R[0]<0){h.set(L,!1);return}var j=h.set(L,[]);U(R,function(H,W){var K=Ae(H)?c.get(H):H;K!=null&&K<o&&(j[W]=K,x(g(K),L,W))})});var y=0;U(r,function(O){var L,R,j,H;if(Ae(O))L=O,H={};else{H=O,L=H.name;var W=H.ordinalMeta;H.ordinalMeta=null,H=ue({},H),H.ordinalMeta=W,R=H.dimsDef,j=H.otherDims,H.name=H.coordDim=H.coordDimIndex=H.dimsDef=H.otherDims=null}var K=h.get(L);if(K!==!1){if(K=hr(K),!K.length)for(var Q=0;Q<(R&&R.length||1);Q++){for(;y<o&&g(y).coordDim!=null;)y++;y<o&&K.push(y++)}U(K,function(re,X){var $=g(re);if(l&&H.type!=null&&($.type=H.type),x(tt($,H),L,X),$.name==null&&R){var I=R[X];!Pe(I)&&(I={name:I}),$.name=$.displayName=I.name,$.defaultTooltip=I.defaultTooltip}j&&tt($.otherDims,j)})}});function x(O,L,R){uC.get(L)!=null?O.otherDims[L]=R:(O.coordDim=L,O.coordDimIndex=R,i.set(L,!0))}var b=t.generateCoord,_=t.generateCoordCount,C=_!=null;_=b?_||1:0;var A=b||"value";function M(O){O.name==null&&(O.name=O.coordDim)}if(s)U(a,function(O){M(O)}),a.sort(function(O,L){return O.storeDimIndex-L.storeDimIndex});else for(var D=0;D<o;D++){var E=g(D),N=E.coordDim;N==null&&(E.coordDim=r9(A,i,C),E.coordDimIndex=0,(!b||_<=0)&&(E.isExtraCoord=!0),_--),M(E),E.type==null&&(dC(e,D)===Ut.Must||E.isExtraCoord&&(E.otherDims.itemName!=null||E.otherDims.seriesName!=null))&&(E.type="ordinal")}return e9(a),new LC({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function e9(e){for(var t=Ge(),r=0;r<e.length;r++){var n=e[r],i=n.name,a=t.get(i)||0;a>0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function t9(e,t,r,n){var i=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,n||0);return U(t,function(a){var o;Pe(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function r9(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 cy={},fy=(function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(t,r){var n=[];U(cy,function(i,a){var o=i.create(t,r);n=n.concat(o||[])}),this._coordinateSystems=n},e.prototype.update=function(t,r){U(this._coordinateSystems,function(n){n.update&&n.update(t,r)})},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(t,r){cy[t]=r},e.get=function(t){return cy[t]},e})(),n9=(function(){function e(t){this.coordSysDims=[],this.axisMap=Ge(),this.categoryAxisMap=Ge(),this.coordSysName=t}return e})();function i9(e){var t=e.get("coordinateSystem"),r=new n9(t),n=a9[t];if(n)return n(e,r,r.axisMap,r.categoryAxisMap),r}var a9={cartesian2d:function(e,t,r,n){var i=e.getReferringComponents("xAxis",Tn).models[0],a=e.getReferringComponents("yAxis",Tn).models[0];t.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),Ns(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),Ns(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,n){var i=e.getReferringComponents("singleAxis",Tn).models[0];t.coordSysDims=["single"],r.set("single",i),Ns(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,r,n){var i=e.getReferringComponents("polar",Tn).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),Ns(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),Ns(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 c=i.getComponent("parallelAxis",s),f=o[l];r.set(f,c),Ns(c)&&(n.set(f,c),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function Ns(e){return e.get("type")==="category"}function o9(e,t,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;s9(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(e&&e.get("stack")),c,f,h,v;if(U(a,function(_,C){Ae(_)&&(a[C]=_={name:_}),l&&!_.isExtraCoord&&(!n&&!c&&_.ordinalMeta&&(c=_),!f&&_.type!=="ordinal"&&_.type!=="time"&&(!i||i===_.coordDim)&&(f=_))}),f&&!n&&!c&&(n=!0),f){h="__\0ecstackresult_"+e.id,v="__\0ecstackedover_"+e.id,c&&(c.createInvertedIndices=!0);var p=f.coordDim,g=f.type,y=0;U(a,function(_){_.coordDim===p&&y++});var x={name:h,coordDim:p,coordDimIndex:y,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},b={name:v,coordDim:v,coordDimIndex:y+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(x.storeDimIndex=s.ensureCalculationDimension(v,g),b.storeDimIndex=s.ensureCalculationDimension(h,g)),o.appendCalculationDimension(x),o.appendCalculationDimension(b)):(a.push(x),a.push(b))}return{stackedDimension:f&&f.name,stackedByDimension:c&&c.name,isStackedByIndex:n,stackedOverDimension:v,stackResultDimension:h}}function s9(e){return!IC(e.schema)}function bo(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function FC(e,t){return bo(e,t)?e.getCalculationInfo("stackResultDimension"):t}function l9(e,t){var r=e.get("coordinateSystem"),n=fy.get(r),i;return t&&t.coordSysDims&&(i=Te(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=V8(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function u9(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 dy(e,t,r){r=r||{};var n=t.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===sn;var o=i9(t),s=l9(t,o),l=r.useEncodeDefaulter,c=$e(l)?l:l?ut(L8,s,t):null,f={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:c,canOmitUnusedDimensions:!a},h=jC(i,f),v=u9(h.dimensions,r.createInvertedIndices,o),p=a?null:n.getSharedDataStore(h),g=o9(t,{schema:h,store:p}),y=new Cu(h,t);y.setCalculationInfo(g);var x=v!=null&&c9(i)?function(b,_,C,A){return A===v?C:this.defaultDimValueGetter(b,_,C,A)}:null;return y.hasItemOption=!1,y.initData(a?i:p,null,x),y}function c9(e){if(e.sourceFormat===sn){var t=f9(e.data||[]);return!ve(au(t))}}function f9(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}var d9=Math.round(Math.random()*10);function Ad(e){return[e||"",d9++].join("_")}function h9(e){var t={};e.registerSubTypeDefaulter=function(r,n){var i=Gn(r);t[i.main]=n},e.determineSubType=function(r,n){var i=n.type;if(!i){var a=Gn(r).main;e.hasSubTypes(r)&&t[a]&&(i=t[a](n))}return i}}function p9(e,t){e.topologicalTravel=function(a,o,s,l){if(!a.length)return;var c=r(o),f=c.graph,h=c.noEntryList,v={};for(U(a,function(_){v[_]=!0});h.length;){var p=h.pop(),g=f[p],y=!!v[p];y&&(s.call(l,p,g.originalDeps.slice()),delete v[p]),U(g.successor,y?b:x)}U(v,function(){var _="";throw new Error(_)});function x(_){f[_].entryCount--,f[_].entryCount===0&&h.push(_)}function b(_){v[_]=!0,x(_)}};function r(a){var o={},s=[];return U(a,function(l){var c=n(o,l),f=c.originalDeps=t(l),h=i(f,a);c.entryCount=h.length,c.entryCount===0&&s.push(l),U(h,function(v){rt(c.predecessor,v)<0&&c.predecessor.push(v);var p=n(o,v);rt(p.successor,v)<0&&p.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){rt(o,l)>=0&&s.push(l)}),s}}function BC(e,t){return Ze(Ze({},e,!0),t,!0)}var v9=Math.log(2);function hy(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)/v9);return e[r][l]}for(var c=n|1<<r,f=r+1;n&1<<f;)f++;for(var h=0,v=0,p=0;v<s;v++){var g=1<<v;g&i||(h+=(p%2?-1:1)*e[r][v]*hy(e,t-1,f,c,i|g,a),p++)}return a[o]=h,h}function HC(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=hy(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)*hy(r,7,o===0?1:0,1<<o,1<<s,n)/i*t[o];return function(l,c,f){var h=c*a[6]+f*a[7]+1;l[0]=(c*a[0]+f*a[1]+a[2])/h,l[1]=(c*a[3]+f*a[4]+a[5])/h}}}var VC="___zrEVENTSAVED",py=[];function g9(e,t,r,n,i){return vy(py,t,n,i,!0)&&vy(e,r,py[0],py[1])}function vy(e,t,r,n,i){if(t.getBoundingClientRect&&je.domSupported&&!$C(t)){var a=t[VC]||(t[VC]={}),o=m9(t,a),s=y9(o,a,i);if(s)return s(e,r,n),!0}return!1}function m9(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,c=(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[c]+":0",n[1-l]+":auto",i[1-c]+":auto",""].join("!important;"),e.appendChild(o),r.push(o)}return r}function y9(e,t,r){for(var n=r?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],l=!0,c=0;c<4;c++){var f=e[c].getBoundingClientRect(),h=2*c,v=f.left,p=f.top;o.push(v,p),l=l&&a&&v===a[h]&&p===a[h+1],s.push(e[c].offsetLeft,e[c].offsetTop)}return l&&i?i:(t.srcCoords=o,t[n]=r?HC(s,o):HC(o,s))}function $C(e){return e.nodeName.toUpperCase()==="CANVAS"}var x9=/([&<>"'])/g,b9={"&":"&","<":"<",">":">",'"':""","'":"'"};function Dr(e){return e==null?"":(e+"").replace(x9,function(t,r){return b9[r]})}const w9={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:". "}}}},_9={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 Dd="ZH",gy="EN",Rs=gy,Md={},my={},UC=je.domSupported?(function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Rs).toUpperCase();return e.indexOf(Dd)>-1?Dd:Rs})():Rs;function WC(e,t){e=e.toUpperCase(),my[e]=new Ct(t),Md[e]=t}function k9(e){if(Ae(e)){var t=Md[e.toUpperCase()]||{};return e===Dd||e===gy?qe(t):Ze(qe(t),qe(Md[Rs]),!1)}else return Ze(qe(e),qe(Md[Rs]),!1)}function S9(e){return my[e]}function C9(){return my[Rs]}WC(gy,w9),WC(Dd,_9);var yy=1e3,xy=yy*60,Tu=xy*60,ln=Tu*24,GC=ln*365,Au={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Ed="{yyyy}-{MM}-{dd}",YC={year:"{yyyy}",month:"{yyyy}-{MM}",day:Ed,hour:Ed+" "+Au.hour,minute:Ed+" "+Au.minute,second:Ed+" "+Au.second,millisecond:Au.none},by=["year","month","day","hour","minute","second","millisecond"],XC=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function ta(e,t){return e+="","0000".substr(0,t-e.length)+e}function Os(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 T9(e){return e===Os(e)}function A9(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Ld(e,t,r,n){var i=bi(e),a=i[wy(r)](),o=i[zs(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[Id(r)](),c=i["get"+(r?"UTC":"")+"Day"](),f=i[Du(r)](),h=(f-1)%12+1,v=i[Pd(r)](),p=i[Nd(r)](),g=i[Rd(r)](),y=f>=12?"pm":"am",x=y.toUpperCase(),b=n instanceof Ct?n:S9(n||UC)||C9(),_=b.getModel("time"),C=_.get("month"),A=_.get("monthAbbr"),M=_.get("dayOfWeek"),D=_.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,y+"").replace(/{A}/g,x+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,ta(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,C[o-1]).replace(/{MMM}/g,A[o-1]).replace(/{MM}/g,ta(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,ta(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,M[c]).replace(/{ee}/g,D[c]).replace(/{e}/g,c+"").replace(/{HH}/g,ta(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,ta(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,ta(v,2)).replace(/{m}/g,v+"").replace(/{ss}/g,ta(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,ta(g,3)).replace(/{S}/g,g+"")}function D9(e,t,r,n,i){var a=null;if(Ae(r))a=r;else if($e(r))a=r(e.value,t,{level:e.level});else{var o=ue({},Au);if(e.level>0)for(var s=0;s<by.length;++s)o[by[s]]="{primary|"+o[by[s]]+"}";var l=r?r.inherit===!1?r:tt(r,o):o,c=qC(e.value,i);if(l[c])a=l[c];else if(l.inherit){for(var f=XC.indexOf(c),s=f-1;s>=0;--s)if(l[c]){a=l[c];break}a=a||o.none}if(ve(a)){var h=e.level==null?0:e.level>=0?e.level:a.length+e.level;h=Math.min(h,a.length-1),a=a[h]}}return Ld(new Date(e.value),a,i,n)}function qC(e,t){var r=bi(e),n=r[zs(t)]()+1,i=r[Id(t)](),a=r[Du(t)](),o=r[Pd(t)](),s=r[Nd(t)](),l=r[Rd(t)](),c=l===0,f=c&&s===0,h=f&&o===0,v=h&&a===0,p=v&&i===1,g=p&&n===1;return g?"year":p?"month":v?"day":h?"hour":f?"minute":c?"second":"millisecond"}function KC(e,t,r){var n=lt(e)?bi(e):e;switch(t=t||qC(e,r),t){case"year":return n[wy(r)]();case"half-year":return n[zs(r)]()>=6?1:0;case"quarter":return Math.floor((n[zs(r)]()+1)/4);case"month":return n[zs(r)]();case"day":return n[Id(r)]();case"half-day":return n[Du(r)]()/24;case"hour":return n[Du(r)]();case"minute":return n[Pd(r)]();case"second":return n[Nd(r)]();case"millisecond":return n[Rd(r)]()}}function wy(e){return e?"getUTCFullYear":"getFullYear"}function zs(e){return e?"getUTCMonth":"getMonth"}function Id(e){return e?"getUTCDate":"getDate"}function Du(e){return e?"getUTCHours":"getHours"}function Pd(e){return e?"getUTCMinutes":"getMinutes"}function Nd(e){return e?"getUTCSeconds":"getSeconds"}function Rd(e){return e?"getUTCMilliseconds":"getMilliseconds"}function M9(e){return e?"setUTCFullYear":"setFullYear"}function ZC(e){return e?"setUTCMonth":"setMonth"}function QC(e){return e?"setUTCDate":"setDate"}function JC(e){return e?"setUTCHours":"setHours"}function eT(e){return e?"setUTCMinutes":"setMinutes"}function tT(e){return e?"setUTCSeconds":"setSeconds"}function rT(e){return e?"setUTCMilliseconds":"setMilliseconds"}function nT(e){if(!WB(e))return Ae(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function iT(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 Od=Qk;function _y(e,t,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(f){return f&&Wn(f)?f:"-"}function a(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=e instanceof Date;if(o||s){var l=o?bi(e):e;if(isNaN(+l)){if(s)return"-"}else return Ld(l,n,r)}if(t==="ordinal")return Dg(e)?i(e):lt(e)&&a(e)?e+"":"-";var c=Qf(e);return a(c)?nT(c):Dg(e)?i(e):typeof e=="boolean"?e+"":"-"}var aT=["a","b","c","d","e","f","g"],ky=function(e,t){return"{"+e+(t??"")+"}"};function oT(e,t,r){ve(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=aT[a];e=e.replace(ky(o),ky(o,0))}for(var s=0;s<n;s++)for(var l=0;l<i.length;l++){var c=t[s][i[l]];e=e.replace(ky(aT[l],s),r?Dr(c):c)}return e}function E9(e,t){var r=Ae(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:'+Dr(n)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Dr(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 wo(e,t){return t=t||"transparent",Ae(e)?e:Pe(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var zd=U,L9=["left","right","top","bottom","width","height"],jd=[["width","left","right"],["height","top","bottom"]];function Sy(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,c){var f=l.getBoundingRect(),h=t.childAt(c+1),v=h&&h.getBoundingRect(),p,g;if(e==="horizontal"){var y=f.width+(v?-v.x+f.x:0);p=a+y,p>n||l.newline?(a=0,p=y,o+=s+r,s=f.height):s=Math.max(s,f.height)}else{var x=f.height+(v?-v.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=p+r:o=g+r)})}var Mu=Sy;ut(Sy,"vertical"),ut(Sy,"horizontal");function Eu(e,t,r){r=Od(r||0);var n=t.width,i=t.height,a=pt(e.left,n),o=pt(e.top,i),s=pt(e.right,n),l=pt(e.bottom,i),c=pt(e.width,n),f=pt(e.height,i),h=r[2]+r[0],v=r[1]+r[3],p=e.aspect;switch(isNaN(c)&&(c=n-s-v-a),isNaN(f)&&(f=i-l-h-o),p!=null&&(isNaN(c)&&isNaN(f)&&(p>n/i?c=n*.8:f=i*.8),isNaN(c)&&(c=p*f),isNaN(f)&&(f=c/p)),isNaN(a)&&(a=n-s-c-v),isNaN(o)&&(o=i-l-f-h),e.left||e.right){case"center":a=n/2-c/2-r[3];break;case"right":a=n-c-v;break}switch(e.top||e.bottom){case"middle":case"center":o=i/2-f/2-r[0];break;case"bottom":o=i-f-h;break}a=a||0,o=o||0,isNaN(c)&&(c=n-v-a-(s||0)),isNaN(f)&&(f=i-h-o-(l||0));var g=new nt(a+r[3],o+r[0],c,f);return g.margin=r,g}function Lu(e){var t=e.layoutMode||e.constructor.layoutMode;return Pe(t)?t:t?{type:t}:null}function js(e,t,r){var n=r&&r.ignoreSize;!ve(n)&&(n=[n,n]);var i=o(jd[0],0),a=o(jd[1],1);c(jd[0],e,i),c(jd[1],e,a);function o(f,h){var v={},p=0,g={},y=0,x=2;if(zd(f,function(C){g[C]=e[C]}),zd(f,function(C){s(t,C)&&(v[C]=g[C]=t[C]),l(v,C)&&p++,l(g,C)&&y++}),n[h])return l(t,f[1])?g[f[2]]=null:l(t,f[2])&&(g[f[1]]=null),g;if(y===x||!p)return g;if(p>=x)return v;for(var b=0;b<f.length;b++){var _=f[b];if(!s(v,_)&&s(e,_)){v[_]=e[_];break}}return v}function s(f,h){return f.hasOwnProperty(h)}function l(f,h){return f[h]!=null&&f[h]!=="auto"}function c(f,h,v){zd(f,function(p){h[p]=v[p]})}}function Fd(e){return I9({},e)}function I9(e,t){return t&&e&&zd(L9,function(r){t.hasOwnProperty(r)&&(e[r]=t[r])}),e}var P9=bt(),ot=(function(e){pe(t,e);function t(r,n,i){var a=e.call(this,r,n,i)||this;return a.uid=Ad("ec_cpt_model"),a}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=Lu(this),a=i?Fd(r):{},o=n.getTheme();Ze(r,o.get(this.mainType)),Ze(r,this.getDefaultOption()),i&&js(r,a,i)},t.prototype.mergeOption=function(r,n){Ze(this.option,r,!0);var i=Lu(this);i&&js(this.option,r,i)},t.prototype.optionUpdated=function(r,n){},t.prototype.getDefaultOption=function(){var r=this.constructor;if(!hF(r))return r.defaultOption;var n=P9(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=Ze(s,i[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return lu(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},t.prototype.getBoxLayoutParams=function(){var r=this;return{left:r.get("left"),top:r.get("top"),right:r.get("right"),bottom:r.get("bottom"),width:r.get("width"),height:r.get("height")}},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})(Ct);nS(ot,Ct),_f(ot),h9(ot),p9(ot,N9);function N9(e){var t=[];return U(ot.getClassesByMainType(e),function(r){t=t.concat(r.dependencies||r.prototype.dependencies||[])}),t=Te(t,function(r){return Gn(r).main}),e!=="dataset"&&rt(t,"dataset")<=0&&t.unshift("dataset"),t}var sT=bt();bt();var Cy=(function(){function e(){}return e.prototype.getColorFromPalette=function(t,r,n){var i=hr(this.get("color",!0)),a=this.get("colorLayer",!0);return O9(this,sT,i,a,t,r,n)},e.prototype.clearColorPalette=function(){z9(this,sT)},e})();function R9(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 O9(e,t,r,n,i,a,o){a=a||e;var s=t(a),l=s.paletteIdx||0,c=s.paletteNameMap=s.paletteNameMap||{};if(c.hasOwnProperty(i))return c[i];var f=o==null||!n?r:R9(n,o);if(f=f||r,!(!f||!f.length)){var h=f[l];return i&&(c[i]=h),s.paletteIdx=(l+1)%f.length,h}}function z9(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var j9=/\{@(.+?)\}/g,Ty=(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"),c=l&&l[n.getItemVisual(t,"drawType")||"fill"],f=l&&l.stroke,h=this.mainType,v=h==="series",p=n.userOutput&&n.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:v?this.subType:null,seriesIndex:this.seriesIndex,seriesId:v?this.id:null,seriesName:v?this.name:null,name:o,dataIndex:a,data:s,dataType:r,value:i,color:c,borderColor:f,dimensionNames:p?p.fullDimensions:null,encode:p?p.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&&ve(l.value)&&(l.value=l.value[i]),!a){var c=s.getItemModel(t);a=c.get(r==="normal"?["label","formatter"]:[r,"label","formatter"])}if($e(a))return l.status=r,l.dimensionIndex=i,a(l);if(Ae(a)){var f=oT(a,l);return f.replace(j9,function(h,v){var p=v.length,g=v;g.charAt(0)==="["&&g.charAt(p-1)==="]"&&(g=+g.slice(1,p-1));var y=Es(s,t,g);if(o&&ve(o.interpolatedValue)){var x=s.getDimensionIndex(g);x>=0&&(y=o.interpolatedValue[x])}return y!=null?y+"":""})}},e.prototype.getRawValue=function(t,r){return Es(this.getData(r),t)},e.prototype.formatTooltip=function(t,r,n){},e})();function lT(e){var t,r;return Pe(e)?e.type&&(r=e):t=e,{text:t,frag:r}}function Iu(e){return new F9(e)}var F9=(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),c=t&&t.modDataCount||0;(o!==l||s!==c)&&(a="reset");function f(_){return!(_>=1)&&(_=1),_}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(n)),this._modBy=l,this._modDataCount=c;var v=t&&t.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,g=Math.min(v!=null?this._dueIndex+v:1/0,this._dueEnd);if(!n&&(h||p<g)){var y=this._progress;if(ve(y))for(var x=0;x<y.length;x++)this._doProgress(y[x],p,g,l,c);else this._doProgress(y,p,g,l,c)}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){uT.reset(r,n,i,a),this._callingProgress=t,this._callingProgress({start:r,end:n,count:n-r,next:uT.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),ve(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})(),uT=(function(){var e,t,r,n,i,a={reset:function(l,c,f,h){t=l,e=c,r=f,n=h,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),c=t>=e?null:l<n?l:t;return t++,c}})(),B9=(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 Ls(t,r)},e})();function H9(e,t){var r=new B9,n=e.data,i=r.sourceFormat=e.sourceFormat,a=e.startIndex,o="";e.seriesLayoutBy!==ki&&Sr(o);var s=[],l={},c=e.dimensionsDefine;if(c)U(c,function(y,x){var b=y.name,_={index:x,name:b,displayName:y.displayName};if(s.push(_),b!=null){var C="";Ga(l,b)&&Sr(C),l[b]=_}});else for(var f=0;f<e.dimensionsDetectedCount;f++)s.push({index:f});var h=kC(i,ki);t.__isBuiltIn&&(r.getRawDataItem=function(y){return h(n,a,s,y)},r.getRawData=ht(V9,null,e)),r.cloneRawData=ht($9,null,e);var v=CC(i,ki);r.count=ht(v,null,n,a,s);var p=TC(i);r.retrieveValue=function(y,x){var b=h(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 p(y,x,b.name)}};return r.getDimensionInfo=ht(U9,null,s,l),r.cloneAllDimensionInfo=ht(W9,null,s),r}function V9(e){var t=e.sourceFormat;if(!Ay(t)){var r="";Sr(r)}return e.data}function $9(e){var t=e.sourceFormat,r=e.data;if(!Ay(t)){var n="";Sr(n)}if(t===Ar){for(var i=[],a=0,o=r.length;a<o;a++)i.push(r[a].slice());return i}else if(t===Mn){for(var i=[],a=0,o=r.length;a<o;a++)i.push(ue({},r[a]));return i}}function U9(e,t,r){if(r!=null){if(lt(r)||!isNaN(r)&&!Ga(t,r))return e[r];if(Ga(t,r))return t[r]}}function W9(e){return qe(e)}var cT=Ge();function G9(e){e=qe(e);var t=e.type,r="";t||Sr(r);var n=t.split(":");n.length!==2&&Sr(r);var i=!1;n[0]==="echarts"&&(t=n[1],i=!0),e.__isBuiltIn=i,cT.set(t,e)}function Y9(e,t,r){var n=hr(e),i=n.length,a="";i||Sr(a);for(var o=0,s=i;o<s;o++){var l=n[o];t=X9(l,t),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function X9(e,t,r,n){var i="";t.length||Sr(i),Pe(e)||Sr(i);var a=e.type,o=cT.get(a);o||Sr(i);var s=Te(t,function(c){return H9(c,o)}),l=hr(o.transform({upstream:s[0],upstreamList:s,config:qe(e.config)}));return Te(l,function(c,f){var h="";Pe(c)||Sr(h),c.data||Sr(h);var v=vC(c.data);Ay(v)||Sr(h);var p,g=t[0];if(g&&f===0&&!c.dimensions){var y=g.startIndex;y&&(c.data=g.data.slice(0,y).concat(c.data)),p={seriesLayoutBy:ki,sourceHeader:y,dimensions:g.metaRawOption.dimensions}}else p={seriesLayoutBy:ki,sourceHeader:0,dimensions:c.dimensions};return ry(c.data,p,null)})}function Ay(e){return e===Ar||e===Mn}var q9=(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(Bd(t)){var o=t,s=void 0,l=void 0,c=void 0;if(n){var f=r[0];f.prepareSource(),c=f.getSource(),s=c.data,l=c.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),l=wr(s)?Ji:sn,a=[];var h=this._getSourceMetaRawOption()||{},v=c&&c.metaRawOption||{},p=Ue(h.seriesLayoutBy,v.seriesLayoutBy)||null,g=Ue(h.sourceHeader,v.sourceHeader),y=Ue(h.dimensions,v.dimensions),x=p!==v.seriesLayoutBy||!!g!=!!v.sourceHeader||y;i=x?[ry(s,{seriesLayoutBy:p,sourceHeader:g,dimensions:y},l)]:[]}else{var b=t;if(n){var _=this._applyTransform(r);i=_.sourceList,a=_.upstreamSignList}else{var C=b.get("source",!0);i=[ry(C,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&&fT(a)}var o,s=[],l=[];return U(t,function(c){c.prepareSource();var f=c.getSource(i||0),h="";i!=null&&!f&&fT(h),s.push(f),l.push(c._getVersionSign())}),n?o=Y9(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[N8(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];Bd(this._sourceHost)&&l?s=l._innerGetDataStore(t,r,n):(s=new sy,s.initData(new wC(r,t.length),t)),o[n]=s}return s},e.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(Bd(t)){var r=ey(t);return r?[r.getSourceManager()]:[]}else return Te(P8(t),function(n){return n.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,r,n,i;if(Bd(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 Bd(e){return e.mainType==="series"}function fT(e){throw new Error(e)}var K9="line-height:1";function dT(e){var t=e.lineHeight;return t==null?K9:"line-height:"+Dr(t+"")+"px"}function hT(e,t){var r=e.color||"#6e7079",n=e.fontSize||12,i=e.fontWeight||"400",a=e.color||"#464646",o=e.fontSize||14,s=e.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+Dr(n+"")+"px;color:"+Dr(r)+";font-weight:"+Dr(i+""),valueStyle:"font-size:"+Dr(o+"")+"px;color:"+Dr(a)+";font-weight:"+Dr(s+"")}:{nameStyle:{fontSize:n,fill:r,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var Z9=[0,10,20,30],Q9=["",`
|
|
34
|
+
`,`
|
|
35
|
+
|
|
36
|
+
`,`
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
`];function _o(e,t){return t.type=e,t}function Dy(e){return e.type==="section"}function pT(e){return Dy(e)?J9:eH}function vT(e){if(Dy(e)){var t=0,r=e.blocks.length,n=r>1||r>0&&!e.noHeader;return U(e.blocks,function(i){var a=vT(i);a>=t&&(t=a+ +(n&&(!a||Dy(i)&&!i.noHeader)))}),t}return 0}function J9(e,t,r,n){var i=t.noHeader,a=tH(vT(t)),o=[],s=t.blocks||[];gi(!s||ve(s)),s=s||[];var l=e.orderMode;if(t.sortBlocks&&l){s=s.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(Ga(c,l)){var f=new U8(c[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,_=pT(y)(b?ue(ue({},e),{valueFormatter:b}):e,y,x>0?a.html:0,n);_!=null&&o.push(_)});var h=e.renderMode==="richText"?o.join(a.richText):My(n,o.join(""),i?r:a.html);if(i)return h;var v=_y(t.header,"ordinal",e.useUTC),p=hT(n,e.renderMode).nameStyle,g=dT(n);return e.renderMode==="richText"?mT(e,v,p)+a.richText+h:My(n,'<div style="'+p+";"+g+';">'+Dr(v)+"</div>"+h,r)}function eH(e,t,r,n){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,c=e.useUTC,f=t.valueFormatter||e.valueFormatter||function(A){return A=ve(A)?A:[A],Te(A,function(M,D){return _y(M,ve(p)?p[D]:p,c)})};if(!(a&&o)){var h=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),v=a?"":_y(l,"ordinal",c),p=t.valueType,g=o?[]:f(t.value,t.dataIndex),y=!s||!a,x=!s&&a,b=hT(n,i),_=b.nameStyle,C=b.valueStyle;return i==="richText"?(s?"":h)+(a?"":mT(e,v,_))+(o?"":iH(e,g,y,x,C)):My(n,(s?"":h)+(a?"":rH(v,!s,_))+(o?"":nH(g,y,x,C)),r)}}function gT(e,t,r,n,i,a){if(e){var o=pT(e),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,a)}}function tH(e){return{html:Z9[e],richText:Q9[e]}}function My(e,t,r){var n='<div style="clear:both"></div>',i="margin: "+r+"px 0 0",a=dT(e);return'<div style="'+i+";"+a+';">'+t+n+"</div>"}function rH(e,t,r){var n=t?"margin-left:2px":"";return'<span style="'+r+";"+n+'">'+Dr(e)+"</span>"}function nH(e,t,r,n){var i=r?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return e=ve(e)?e:[e],'<span style="'+a+";"+n+'">'+Te(e,function(o){return Dr(o)}).join(" ")+"</span>"}function mT(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function iH(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(ve(t)?t.join(" "):t,a)}function aH(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return wo(n)}function yT(e,t){var r=e.get("padding");return r??(t==="richText"?[8,10]:10)}var Ey=(function(){function e(){this.richTextStyles={},this._nextStyleNameId=o2()}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=E9({color:r,type:t,renderMode:n,markerId:i});return Ae(a)?a:(this.richTextStyles[i]=a.style,a.content)},e.prototype.wrapRichTextStyle=function(t,r){var n={};ve(r)?U(r,function(a){return ue(n,a)}):ue(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},e})();function oH(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=ve(s),c=aH(t,r),f,h,v,p;if(o>1||l&&!o){var g=sH(s,t,r,a,c);f=g.inlineValues,h=g.inlineValueTypes,v=g.blocks,p=g.inlineValues[0]}else if(o){var y=i.getDimensionInfo(a[0]);p=f=Es(i,r,a[0]),h=y.type}else p=f=l?s[0]:s;var x=Cm(t),b=x&&t.name||"",_=i.getName(r),C=n?b:_;return _o("section",{header:b,noHeader:n||!x,sortParam:p,blocks:[_o("nameValue",{markerType:"item",markerColor:c,name:C,noName:!Wn(C),value:f,valueType:h,dataIndex:r})].concat(v||[])})}function sH(e,t,r,n,i){var a=t.getData(),o=$i(e,function(h,v,p){var g=a.getDimensionInfo(p);return h=h||g&&g.tooltip!==!1&&g.displayName!=null},!1),s=[],l=[],c=[];n.length?U(n,function(h){f(Es(a,r,h),h)}):U(e,f);function f(h,v){var p=a.getDimensionInfo(v);!p||p.otherDims.tooltip===!1||(o?c.push(_o("nameValue",{markerType:"subItem",markerColor:i,name:p.displayName,value:h,valueType:p.type})):(s.push(h),l.push(p.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:c}}var ra=bt();function Hd(e,t){return e.getName(t)||e.getId(t)}var lH="__universalTransitionEnabled",En=(function(e){pe(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=Iu({count:cH,reset:fH}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=ra(this).sourceManager=new q9(this);a.prepareSource();var o=this.getInitialData(r,i);bT(o,this),this.dataTask.context.data=o,ra(this).dataBeforeProcessed=o,xT(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=Lu(this),a=i?Fd(r):{},o=this.subType;ot.hasClass(o)&&(o+="Series"),Ze(r,n.getTheme().get(this.subType)),Ze(r,this.getDefaultOption()),Jf(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&js(r,a,i)},t.prototype.mergeOption=function(r,n){r=Ze(this.option,r,!0),this.fillDataTextStyle(r.data);var i=Lu(this);i&&js(this.option,r,i);var a=ra(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);bT(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,ra(this).dataBeforeProcessed=o,xT(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(r){if(r&&!wr(r))for(var n=["show"],i=0;i<r.length;i++)r[i]&&r[i].label&&Jf(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=Ly(this);if(n){var i=n.context.data;return r==null||!i.getLinkedData?i:i.getLinkedData(r)}else return ra(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=Ly(this);if(n){var i=n.context;i.outputData=r,n!==this.dataTask&&(i.data=r)}ra(this).data=r},t.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return Ge(r)},t.prototype.getSourceManager=function(){return ra(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return ra(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.formatTooltip=function(r,n,i){return oH({series:this,dataIndex:r,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(je.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=Cy.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],c=Hd(o,l);i[c]=!1,this._selectedDataIndicesMap[c]=-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=xt(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[Hd(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[lH])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"){Pe(o.selectedMap)||(o.selectedMap={});for(var c=o.selectedMap,f=0;f<l;f++){var h=n[f],v=Hd(r,h);c[v]=!0,this._selectedDataIndicesMap[v]=r.getRawIndex(h)}}else if(s==="single"||s===!0){var p=n[l-1],v=Hd(r,p);o.selectedMap=(i={},i[v]=!0,i),this._selectedDataIndicesMap=(a={},a[v]=r.getRawIndex(p),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 ot.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})(ot);Cn(En,Ty),Cn(En,Cy),nS(En,ot);function xT(e){var t=e.name;Cm(e)||(e.name=uH(e)||t)}function uH(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 cH(e){return e.model.getRawData().count()}function fH(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),dH}function dH(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function bT(e,t){U(oF(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(r){e.wrapMethod(r,ut(hH,t))})}function hH(e,t){var r=Ly(e);return r&&r.setOutputEnd((t||this).count()),t}function Ly(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 pH=at.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()}}),vH=at.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()}}),gH=at.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,c=Math.asin(s/o),f=Math.cos(c)*o,h=Math.sin(c),v=Math.cos(c),p=o*.6,g=o*.7;e.moveTo(r-f,l+s),e.arc(r,l,o,Math.PI-c,Math.PI*2+c),e.bezierCurveTo(r+f-h*p,l+s+v*p,r,n-g,r,n),e.bezierCurveTo(r,n-g,r-f+h*p,l+s+v*p,r-f,l+s),e.closePath()}}),mH=at.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()}}),yH={line:_i,rect:Rt,roundRect:Rt,square:Rt,circle:ud,diamond:vH,pin:gH,arrow:mH,triangle:pH},xH={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}},Iy={};U(yH,function(e,t){Iy[t]=new e});var bH=at.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,r){var n=Tf(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=Iy[n];i||(n="rect",i=Iy[n]),xH[n](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,r)}}});function wH(e,t){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=e,r.fill=t||"#fff",r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=e:r.fill=e,this.markRedraw()}}function ko(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=Y2(e.slice(8),new nt(t,r,n,i),o?"center":"cover"):e.indexOf("path://")===0?l=Xm(e.slice(7),{},new nt(t,r,n,i),o?"center":"cover"):l=new bH({shape:{symbolType:e,x:t,y:r,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=wH,a&&l.setColor(a),l}function Py(e){return ve(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Vd(e,t){if(e!=null)return ve(e)||(e=[e,e]),[pt(e[0],t[0])||0,pt(Ue(e[1],e[0]),t[1])||0]}var _H=(function(e){pe(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 dy(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(r){var n=new Ot,i=ko("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,c=ko(s,(r.itemWidth-l)/2,(r.itemHeight-l)/2,l,l,r.itemStyle.fill);n.add(c),c.setStyle(r.itemStyle);var f=r.iconRotate==="inherit"?o:r.iconRotate||0;return c.rotation=f*Math.PI/180,c.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(c.style.stroke=c.style.fill,c.style.fill="#fff",c.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:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t})(En);function Ny(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=Es(e,t,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<r.length;o++)a.push(Es(e,t,r[o]));return a.join(" ")}}function wT(e,t){var r=e.mapDimensionsAll("defaultedLabel");if(!ve(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 Ry=(function(e){pe(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){this.removeAll();var s=ko(r,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=kH,this._symbolType=r,this.add(s)},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(){fu(this.childAt(0))},t.prototype.downplay=function(){du(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),c=o!==this._symbolType,f=a&&a.disableAnimation;if(c){var h=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,h)}else{var v=this.childAt(0);v.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};f?v.attr(p):er(v,p,s,n),Gm(v)}if(this._updateCommon(r,n,l,i,a),c){var v=this.childAt(0);if(!f){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,Vr(v,p,s,n)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,c,f,h,v,p,g,y,x,b;if(a&&(c=a.emphasisItemStyle,f=a.blurItemStyle,h=a.selectItemStyle,v=a.focus,p=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),C=_.getModel("emphasis");c=C.getModel("itemStyle").getItemStyle(),h=_.getModel(["select","itemStyle"]).getItemStyle(),f=_.getModel(["blur","itemStyle"]).getItemStyle(),v=C.get("focus"),p=C.get("blurScope"),g=C.get("disabled"),y=go(_),x=C.getShallow("scale"),b=_.getShallow("cursor")}var A=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(A||0)*Math.PI/180||0);var M=Vd(r.getItemVisual(n,"symbolOffset"),i);M&&(s.x=M[0],s.y=M[1]),b&&s.attr("cursor",b);var D=r.getItemVisual(n,"style"),E=D.fill;if(s instanceof Zi){var N=s.style;s.useStyle(ue({image:N.image,x:N.x,y:N.y,width:N.width,height:N.height},D))}else s.__isEmptyBrush?s.useStyle(ue({},D)):s.useStyle(D),s.style.decal=null,s.setColor(E,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var O=r.getItemVisual(n,"liftZ"),L=this._z2;O!=null?L==null&&(this._z2=s.z2,s.z2+=O):L!=null&&(s.z2=L,this._z2=null);var R=o&&o.useNameLabel;As(s,y,{labelFetcher:l,labelDataIndex:n,defaultText:j,inheritColor:E,defaultOpacity:D.opacity});function j(K){return R?r.getName(K):Ny(r,K)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var H=s.ensureState("emphasis");H.style=c,s.ensureState("select").style=h,s.ensureState("blur").style=f;var W=x==null||x===!0?Math.max(1.1,3/this._sizeY):isFinite(x)&&x>0?+x:1;H.scaleX=this._sizeX*W,H.scaleY=this._sizeY*W,this.setSymbolScale(1),Ss(this,v,p,g)},t.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},t.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=Qe(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&gd(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();gd(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},t.getSymbolSize=function(r,n){return Py(r.getItemVisual(n,"symbolSize"))},t})(Ot);function kH(e,t){this.parent.drift(e,t)}function Oy(e,t,r,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&e.getItemVisual(r,"symbol")!=="none"}function _T(e){return e!=null&&!Pe(e)&&(e={isIgnore:e}),e||{}}function kT(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:go(t),cursorStyle:t.get("cursor")}}var SH=(function(){function e(t){this.group=new Ot,this._SymbolCtor=t||Ry}return e.prototype.updateData=function(t,r){this._progressiveEls=null,r=_T(r);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=kT(t),c={disableAnimation:s},f=r.getSymbolPoint||function(h){return t.getItemLayout(h)};a||n.removeAll(),t.diff(a).add(function(h){var v=f(h);if(Oy(t,v,h,r)){var p=new o(t,h,l,c);p.setPosition(v),t.setItemGraphicEl(h,p),n.add(p)}}).update(function(h,v){var p=a.getItemGraphicEl(v),g=f(h);if(!Oy(t,g,h,r)){n.remove(p);return}var y=t.getItemVisual(h,"symbol")||"circle",x=p&&p.getSymbolType&&p.getSymbolType();if(!p||x&&x!==y)n.remove(p),p=new o(t,h,l,c),p.setPosition(g);else{p.updateData(t,h,l,c);var b={x:g[0],y:g[1]};s?p.attr(b):er(p,b,i)}n.add(p),t.setItemGraphicEl(h,p)}).remove(function(h){var v=a.getItemGraphicEl(h);v&&v.fadeOut(function(){n.remove(v)},i)}).execute(),this._getSymbolPoint=f,this._data=t},e.prototype.updateLayout=function(){var t=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=kT(t),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r,n){this._progressiveEls=[],n=_T(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var o=r.getItemLayout(a);if(Oy(r,o,a,n)){var s=new this._SymbolCtor(r,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),r.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(t){xu(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 ST(e,t,r){var n=e.getBaseAxis(),i=e.getOtherAxis(n),a=CH(i,r),o=n.dim,s=i.dim,l=t.mapDimension(s),c=t.mapDimension(o),f=s==="x"||s==="radius"?1:0,h=Te(e.dimensions,function(g){return t.mapDimension(g)}),v=!1,p=t.getCalculationInfo("stackResultDimension");return bo(t,h[0])&&(v=!0,h[0]=p),bo(t,h[1])&&(v=!0,h[1]=p),{dataDimsForPoint:h,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!v,valueDim:l,baseDim:c,baseDataOffset:f,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function CH(e,t){var r=0,n=e.scale.getExtent();return t==="start"?r=n[0]:t==="end"?r=n[1]:lt(t)&&!isNaN(t)?r=t:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function CT(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)}var TT=typeof Float32Array<"u",TH=TT?Float32Array:Array;function Si(e){return ve(e)?TT?new Float32Array(e):e:new TH(e)}function AH(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 DH(e,t,r,n,i,a,o,s){for(var l=AH(e,t),c=[],f=[],h=[],v=[],p=[],g=[],y=[],x=ST(i,t,o),b=e.getLayout("points")||[],_=t.getLayout("points")||[],C=0;C<l.length;C++){var A=l[C],M=!0,D=void 0,E=void 0;switch(A.cmd){case"=":D=A.idx*2,E=A.idx1*2;var N=b[D],O=b[D+1],L=_[E],R=_[E+1];(isNaN(N)||isNaN(O))&&(N=L,O=R),c.push(N,O),f.push(L,R),h.push(r[D],r[D+1]),v.push(n[E],n[E+1]),y.push(t.getRawIndex(A.idx1));break;case"+":var j=A.idx,H=x.dataDimsForPoint,W=i.dataToPoint([t.get(H[0],j),t.get(H[1],j)]);E=j*2,c.push(W[0],W[1]),f.push(_[E],_[E+1]);var K=CT(x,i,t,j);h.push(K[0],K[1]),v.push(n[E],n[E+1]),y.push(t.getRawIndex(j));break;case"-":M=!1}M&&(p.push(A),g.push(g.length))}g.sort(function(oe,le){return y[oe]-y[le]});for(var Q=c.length,re=Si(Q),X=Si(Q),$=Si(Q),I=Si(Q),z=[],C=0;C<g.length;C++){var Y=g[C],F=C*2,ne=Y*2;re[F]=c[ne],re[F+1]=c[ne+1],X[F]=f[ne],X[F+1]=f[ne+1],$[F]=h[ne],$[F+1]=h[ne+1],I[F]=v[ne],I[F+1]=v[ne+1],z[C]=p[Y]}return{current:re,next:X,stackedOnCurrent:$,stackedOnNext:I,status:z}}var na=Math.min,ia=Math.max;function So(e,t){return isNaN(e)||isNaN(t)}function zy(e,t,r,n,i,a,o,s,l){for(var c,f,h,v,p,g,y=r,x=0;x<n;x++){var b=t[y*2],_=t[y*2+1];if(y>=i||y<0)break;if(So(b,_)){if(l){y+=a;continue}break}if(y===r)e[a>0?"moveTo":"lineTo"](b,_),h=b,v=_;else{var C=b-c,A=_-f;if(C*C+A*A<.5){y+=a;continue}if(o>0){for(var M=y+a,D=t[M*2],E=t[M*2+1];D===b&&E===_&&x<n;)x++,M+=a,y+=a,D=t[M*2],E=t[M*2+1],b=t[y*2],_=t[y*2+1],C=b-c,A=_-f;var N=x+1;if(l)for(;So(D,E)&&N<n;)N++,M+=a,D=t[M*2],E=t[M*2+1];var O=.5,L=0,R=0,j=void 0,H=void 0;if(N>=n||So(D,E))p=b,g=_;else{L=D-c,R=E-f;var W=b-c,K=D-b,Q=_-f,re=E-_,X=void 0,$=void 0;if(s==="x"){X=Math.abs(W),$=Math.abs(K);var I=L>0?1:-1;p=b-I*X*o,g=_,j=b+I*$*o,H=_}else if(s==="y"){X=Math.abs(Q),$=Math.abs(re);var z=R>0?1:-1;p=b,g=_-z*X*o,j=b,H=_+z*$*o}else X=Math.sqrt(W*W+Q*Q),$=Math.sqrt(K*K+re*re),O=$/($+X),p=b-L*o*(1-O),g=_-R*o*(1-O),j=b+L*o*O,H=_+R*o*O,j=na(j,ia(D,b)),H=na(H,ia(E,_)),j=ia(j,na(D,b)),H=ia(H,na(E,_)),L=j-b,R=H-_,p=b-L*X/$,g=_-R*X/$,p=na(p,ia(c,b)),g=na(g,ia(f,_)),p=ia(p,na(c,b)),g=ia(g,na(f,_)),L=b-p,R=_-g,j=b+L*$/X,H=_+R*$/X}e.bezierCurveTo(h,v,p,g,b,_),h=j,v=H}else e.lineTo(b,_)}c=b,f=_,y+=a}return x}var AT=(function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e})(),MH=(function(e){pe(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:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new AT},t.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&So(i[o*2-2],i[o*2-1]);o--);for(;a<o&&So(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=zy(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,c=n==="x",f=[],h=0;h<a.length;){var v=a[h++],p=void 0,g=void 0,y=void 0,x=void 0,b=void 0,_=void 0,C=void 0;switch(v){case o.M:s=a[h++],l=a[h++];break;case o.L:if(p=a[h++],g=a[h++],C=c?(r-s)/(p-s):(r-l)/(g-l),C<=1&&C>=0){var A=c?(g-l)*C+l:(p-s)*C+s;return c?[r,A]:[A,r]}s=p,l=g;break;case o.C:p=a[h++],g=a[h++],y=a[h++],x=a[h++],b=a[h++],_=a[h++];var M=c?Ef(s,p,y,b,r,f):Ef(l,g,x,_,r,f);if(M>0)for(var D=0;D<M;D++){var E=f[D];if(E<=1&&E>=0){var A=c?$t(l,g,x,_,E):$t(s,p,y,b,E);return c?[r,A]:[A,r]}}s=b,l=_;break}}},t})(at),EH=(function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(AT),LH=(function(e){pe(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 EH},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&&So(i[s*2-2],i[s*2-1]);s--);for(;o<s&&So(i[o*2],i[o*2+1]);o++);}for(;o<s;){var c=zy(r,i,o,s,s,1,n.smooth,l,n.connectNulls);zy(r,a,o+c-1,c,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=c+1,r.closePath()}},t})(at);function jy(){var e=bt();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 DT=bt(),IH=jy(),un=(function(){function e(){this.group=new Ot,this.uid=Ad("viewChart"),this.renderTask=Iu({plan:PH,reset:NH}),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&&ET(a,i,"emphasis")},e.prototype.downplay=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&ET(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.updateLayout=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){xu(this.group,t)},e.markUpdateMethod=function(t,r){DT(t).updateMethod=r},e.protoInitialize=(function(){var t=e.prototype;t.type="chart"})(),e})();function MT(e,t,r){e&&zm(e)&&(t==="emphasis"?fu:du)(e,r)}function ET(e,t,r){var n=co(e,t),i=t&&t.highlightKey!=null?C6(t.highlightKey):null;n!=null?U(hr(n),function(a){MT(e.getItemGraphicEl(a),r,i)}):e.eachItemGraphicEl(function(a){MT(a,r,i)})}Lg(un),_f(un);function PH(e){return IH(e.model)}function NH(e){var t=e.model,r=e.ecModel,n=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&DT(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,r,n,i),RH[l]}var RH={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 LT(e,t,r,n,i){var a=e.getArea(),o=a.x,s=a.y,l=a.width,c=a.height,f=r.get(["lineStyle","width"])||0;o-=f/2,s-=f/2,l+=f,c+=f,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var h=new Rt({shape:{x:o,y:s,width:l,height:c}});if(t){var v=e.getBaseAxis(),p=v.isHorizontal(),g=v.inverse;p?(g&&(h.shape.x+=l),h.shape.width=0):(g||(h.shape.y+=c),h.shape.height=0);var y=$e(i)?function(x){i(x,h)}:null;Vr(h,{shape:{width:l,height:c,x:o,y:s}},r,null,n,y)}return h}function IT(e,t,r){var n=e.getArea(),i=Dt(n.r0,1),a=Dt(n.r,1),o=new Qi({shape:{cx:Dt(e.cx,1),cy:Dt(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,Vr(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function OH(e,t,r,n,i){if(e){if(e.type==="polar")return IT(e,t,r);if(e.type==="cartesian2d")return LT(e,t,r,n,i)}else return null;return null}function $d(e,t){return e.type===t}function PT(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function NT(e){for(var t=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a<e.length;){var o=e[a++],s=e[a++];isNaN(o)||(t=Math.min(o,t),n=Math.max(o,n)),isNaN(s)||(r=Math.min(s,r),i=Math.max(s,i))}return[[t,r],[n,i]]}function RT(e,t){var r=NT(e),n=r[0],i=r[1],a=NT(t),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function OT(e){return lt(e)?e:e?.5:0}function zH(e,t,r){if(!r.valueDim)return[];for(var n=t.count(),i=Si(n*2),a=0;a<n;a++){var o=CT(r,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function aa(e,t,r,n,i){var a=r.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,c=[],f=[],h=[],v=[];if(i){for(l=0;l<e.length;l+=2){var p=t||e;!isNaN(p[l])&&!isNaN(p[l+1])&&v.push(e[l],e[l+1])}e=v}for(l=0;l<e.length-2;l+=2)switch(h[0]=e[l+2],h[1]=e[l+3],f[0]=e[l],f[1]=e[l+1],s.push(f[0],f[1]),n){case"end":c[o]=h[o],c[1-o]=f[1-o],s.push(c[0],c[1]);break;case"middle":var g=(f[o]+h[o])/2,y=[];c[o]=y[o]=g,c[1-o]=f[1-o],y[1-o]=h[1-o],s.push(c[0],c[1]),s.push(y[0],y[1]);break;default:c[o]=f[o],c[1-o]=h[1-o],s.push(c[0],c[1])}return s.push(e[l++],e[l++]),s}function jH(e,t){var r=[],n=e.length,i,a;function o(f,h,v){var p=f.coord,g=(v-p)/(h.coord-p),y=YF(g,[f.color,h.color]);return{coord:v,color:y}}for(var s=0;s<n;s++){var l=e[s],c=l.coord;if(c<0)i=l;else if(c>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 FH(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),c=Te(a.stops,function(C){return{coord:l.toGlobalCoord(l.dataToCoord(C.value)),color:C.color}}),f=c.length,h=a.outerColors.slice();f&&c[0].coord>c[f-1].coord&&(c.reverse(),h.reverse());var v=jH(c,i==="x"?r.getWidth():r.getHeight()),p=v.length;if(!p&&f)return c[0].coord<0?h[1]?h[1]:c[f-1].color:h[0]?h[0]:c[0].color;var g=10,y=v[0].coord-g,x=v[p-1].coord+g,b=x-y;if(b<.001)return"transparent";U(v,function(C){C.offset=(C.coord-y)/b}),v.push({offset:p?v[p-1].offset:.5,color:h[1]||"transparent"}),v.unshift({offset:p?v[0].offset:.5,color:h[0]||"transparent"});var _=new W2(0,0,0,0,v,!0);return _[i]=y,_[i+"2"]=x,_}}}function BH(e,t,r){var n=e.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&HH(a,t))){var o=t.mapDimension(a.dim),s={};return U(a.getViewLabels(),function(l){var c=a.scale.getRawOrdinalNumber(l.tickValue);s[c]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function HH(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(Ry.getSymbolSize(t,o)[e.isHorizontal()?1:0]*1.5>n)return!1;return!0}function VH(e,t){return isNaN(e)||isNaN(t)}function $H(e){for(var t=e.length/2;t>0&&VH(e[t*2-2],e[t*2-1]);t--);return t-1}function zT(e,t){return[e[t*2],e[t*2+1]]}function UH(e,t,r){for(var n=e.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,c=0;c<n;c++)if(o=e[c*2+i],!(isNaN(o)||isNaN(e[c*2+1-i]))){if(c===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){l=c;break}s=c,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function jT(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<Cr.length;t++)if(e.get([Cr[t],"endLabel","show"]))return!0;return!1}function Fy(e,t,r,n){if($d(t,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=jT(n)?function(p,g){e._endLabelOnDuring(p,g,o,s,a,i,t)}:null,c=t.getBaseAxis().isHorizontal(),f=LT(t,r,n,function(){var p=e._endLabel;p&&r&&s.originalX!=null&&p.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var h=f.shape,v=Math.max(h.width,h.height);c?(h.y-=v,h.height+=v*2):(h.x-=v,h.width+=v*2)}return l&&l(1,f),f}else return IT(t,r,n)}function WH(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 GH=(function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var r=new Ot,n=new SH;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r,this._changePolyState=ht(this._changePolyState,this)},t.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=r.getModel("lineStyle"),c=r.getModel("areaStyle"),f=s.getLayout("points")||[],h=a.type==="polar",v=this._coordSys,p=this._symbolDraw,g=this._polyline,y=this._polygon,x=this._lineGroup,b=!n.ssr&&r.get("animation"),_=!c.isEmpty(),C=c.get("origin"),A=ST(a,s,C),M=_&&zH(a,s,A),D=r.get("showSymbol"),E=r.get("connectNulls"),N=D&&!h&&BH(r,s,a),O=this._data;O&&O.eachItemGraphicEl(function(oe,le){oe.__temp&&(o.remove(oe),O.setItemGraphicEl(le,null))}),D||p.remove(),o.add(x);var L=h?!1:r.get("step"),R;a&&a.getArea&&r.get("clip",!0)&&(R=a.getArea(),R.width!=null?(R.x-=.1,R.y-=.1,R.width+=.2,R.height+=.2):R.r0&&(R.r0-=.5,R.r+=.5)),this._clipShapeForSymbol=R;var j=FH(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(g&&v.type===a.type&&L===this._step))D&&p.updateData(s,{isIgnore:N,clipShape:R,disableAnimation:!0,getSymbolPoint:function(oe){return[f[oe*2],f[oe*2+1]]}}),b&&this._initSymbolLabelAnimation(s,a,R),L&&(M&&(M=aa(M,f,a,L,E)),f=aa(f,null,a,L,E)),g=this._newPolyline(f),_?y=this._newPolygon(f,M):y&&(x.remove(y),y=this._polygon=null),h||this._initOrUpdateEndLabel(r,a,wo(j)),x.setClipPath(Fy(this,a,!0,r));else{_&&!y?y=this._newPolygon(f,M):y&&!_&&(x.remove(y),y=this._polygon=null),h||this._initOrUpdateEndLabel(r,a,wo(j));var H=x.getClipPath();if(H){var W=Fy(this,a,!1,r);Vr(H,{shape:W.shape},r)}else x.setClipPath(Fy(this,a,!0,r));D&&p.updateData(s,{isIgnore:N,clipShape:R,disableAnimation:!0,getSymbolPoint:function(oe){return[f[oe*2],f[oe*2+1]]}}),(!PT(this._stackedOnPoints,M)||!PT(this._points,f))&&(b?this._doUpdateAnimation(s,M,a,i,L,C,E):(L&&(M&&(M=aa(M,f,a,L,E)),f=aa(f,null,a,L,E)),g.setShape({points:f}),y&&y.setShape({points:f,stackedOnPoints:M})))}var K=r.getModel("emphasis"),Q=K.get("focus"),re=K.get("blurScope"),X=K.get("disabled");if(g.useStyle(tt(l.getLineStyle(),{fill:"none",stroke:j,lineJoin:"bevel"})),od(g,r,"lineStyle"),g.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var $=g.getState("emphasis").style;$.lineWidth=+g.style.lineWidth+1}Qe(g).seriesIndex=r.seriesIndex,Ss(g,Q,re,X);var I=OT(r.get("smooth")),z=r.get("smoothMonotone");if(g.setShape({smooth:I,smoothMonotone:z,connectNulls:E}),y){var Y=s.getCalculationInfo("stackedOnSeries"),F=0;y.useStyle(tt(c.getAreaStyle(),{fill:j,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),Y&&(F=OT(Y.get("smooth"))),y.setShape({smooth:I,stackedOnSmooth:F,smoothMonotone:z,connectNulls:E}),od(y,r,"areaStyle"),Qe(y).seriesIndex=r.seriesIndex,Ss(y,Q,re,X)}var ne=this._changePolyState;s.eachItemGraphicEl(function(oe){oe&&(oe.onHoverStateChange=ne)}),this._polyline.onHoverStateChange=ne,this._data=s,this._coordSys=a,this._stackedOnPoints=M,this._points=f,this._step=L,this._valueOrigin=C,r.get("triggerLineEvent")&&(this.packEventData(r,g),y&&this.packEventData(r,y))},t.prototype.packEventData=function(r,n){Qe(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},t.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=co(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),c=o.getItemGraphicEl(s);if(!c){var f=l[s*2],h=l[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var v=r.get("zlevel")||0,p=r.get("z")||0;c=new Ry(o,s),c.x=f,c.y=h,c.setZ(v,p);var g=c.getSymbolPath().getTextContent();g&&(g.zlevel=v,g.z=p,g.z2=this._polyline.z2+1),c.__temp=!0,o.setItemGraphicEl(s,c),c.stopSymbolAnimation(!0),this.group.add(c)}c.highlight()}else un.prototype.highlight.call(this,r,n,i,a)},t.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=co(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 un.prototype.downplay.call(this,r,n,i,a)},t.prototype._changePolyState=function(r){var n=this._polygon;w2(this._polyline,r),n&&w2(n,r)},t.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new MH({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 LH({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 c=r.hostModel,f=c.get("animationDuration");$e(f)&&(f=f(null));var h=c.get("animationDelay")||0,v=$e(h)?h(null):h;r.eachItemGraphicEl(function(p,g){var y=p;if(y){var x=[p.x,p.y],b=void 0,_=void 0,C=void 0;if(i)if(o){var A=i,M=n.pointToCoord(x);a?(b=A.startAngle,_=A.endAngle,C=-M[1]/180*Math.PI):(b=A.r0,_=A.r,C=M[0])}else{var D=i;a?(b=D.x,_=D.x+D.width,C=p.x):(b=D.y+D.height,_=D.y,C=p.y)}var E=_===b?0:(C-b)/(_-b);l&&(E=1-E);var N=$e(h)?h(g):f*E+v,O=y.getSymbolPath(),L=O.getTextContent();y.attr({scaleX:0,scaleY:0}),y.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:N}),L&&L.animateFrom({style:{opacity:0}},{duration:300,delay:N}),O.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(jT(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var c=this._endLabel;c||(c=this._endLabel=new dr({z2:200}),c.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=$H(l);f>=0&&(As(s,go(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:f,defaultText:function(h,v,p){return p!=null?wT(o,p):Ny(o,h)},enableTextSetter:!0},WH(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 c=this._endLabel,f=this._polyline;if(c){r<1&&a.originalX==null&&(a.originalX=c.x,a.originalY=c.y);var h=i.getLayout("points"),v=i.hostModel,p=v.get("connectNulls"),g=s.get("precision"),y=s.get("distance")||0,x=l.getBaseAxis(),b=x.isHorizontal(),_=x.inverse,C=n.shape,A=_?b?C.x:C.y+C.height:b?C.x+C.width:C.y,M=(b?y:0)*(_?-1:1),D=(b?0:-y)*(_?-1:1),E=b?"x":"y",N=UH(h,A,E),O=N.range,L=O[1]-O[0],R=void 0;if(L>=1){if(L>1&&!p){var j=zT(h,O[0]);c.attr({x:j[0]+M,y:j[1]+D}),o&&(R=v.getRawValue(O[0]))}else{var j=f.getPointOn(A,E);j&&c.attr({x:j[0]+M,y:j[1]+D});var H=v.getRawValue(O[0]),W=v.getRawValue(O[1]);o&&(R=o6(i,g,H,W,N.t))}a.lastFrameIndex=O[0]}else{var K=r===1||a.lastFrameIndex>0?O[0]:0,j=zT(h,K);o&&(R=v.getRawValue(K)),c.attr({x:j[0]+M,y:j[1]+D})}if(o){var Q=_d(c);typeof Q.setLabelText=="function"&&Q.setLabelText(R)}}},t.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var c=this._polyline,f=this._polygon,h=r.hostModel,v=DH(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),p=v.current,g=v.stackedOnCurrent,y=v.next,x=v.stackedOnNext;if(o&&(g=aa(v.stackedOnCurrent,v.current,i,o,l),p=aa(v.current,null,i,o,l),x=aa(v.stackedOnNext,v.next,i,o,l),y=aa(v.next,null,i,o,l)),RT(p,y)>3e3||f&&RT(g,x)>3e3){c.stopAnimation(),c.setShape({points:y}),f&&(f.stopAnimation(),f.setShape({points:y,stackedOnPoints:x}));return}c.shape.__points=v.current,c.shape.points=p;var b={shape:{points:y}};v.current!==p&&(b.shape.__points=v.next),c.stopAnimation(),er(c,b,h),f&&(f.setShape({points:p,stackedOnPoints:g}),f.stopAnimation(),er(f,{shape:{stackedOnPoints:x}},h),c.shape.points!==f.shape.points&&(f.shape.points=c.shape.points));for(var _=[],C=v.status,A=0;A<C.length;A++){var M=C[A].cmd;if(M==="="){var D=r.getItemGraphicEl(C[A].idx1);D&&_.push({el:D,ptIdx:A})}}c.animators&&c.animators.length&&c.animators[0].during(function(){f&&f.dirtyShape();for(var E=c.shape.__points,N=0;N<_.length;N++){var O=_[N].el,L=_[N].ptIdx*2;O.x=E[L],O.y=E[L+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})(un);function YH(e,t){return{seriesType:e,plan:jy(),reset:function(r){var n=r.getData(),i=r.coordinateSystem;if(r.pipelineContext,!!i){var a=Te(i.dimensions,function(h){return n.mapDimension(h)}).slice(0,2),o=a.length,s=n.getCalculationInfo("stackResultDimension");bo(n,a[0])&&(a[0]=s),bo(n,a[1])&&(a[1]=s);var l=n.getStore(),c=n.getDimensionIndex(a[0]),f=n.getDimensionIndex(a[1]);return o&&{progress:function(h,v){for(var p=h.end-h.start,g=Si(p*o),y=[],x=[],b=h.start,_=0;b<h.end;b++){var C=void 0;if(o===1){var A=l.get(c,b);C=i.dataToPoint(A,null,x)}else y[0]=l.get(c,b),y[1]=l.get(f,b),C=i.dataToPoint(y,null,x);g[_++]=C[0],g[_++]=C[1]}v.setLayout("points",g)}}}}}}var XH={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]}},qH=function(e){return Math.round(e.length/2)};function FT(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(),c=o.getOtherAxis(l),f=l.getExtent(),h=n.getDevicePixelRatio(),v=Math.abs(f[1]-f[0])*(h||1),p=Math.round(s/v);if(isFinite(p)&&p>1){a==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(c.dim),1/p)):a==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(c.dim),1/p));var g=void 0;Ae(a)?g=XH[a]:$e(a)&&(g=a),g&&t.setData(i.downSample(i.mapDimension(c.dim),1/p,g,qH))}}}}}function KH(e){e.registerChartView(GH),e.registerSeriesModel(_H),e.registerLayout(YH("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,FT("line"))}var ZH="__ec_stack_";function BT(e){return e.get("stack")||ZH+e.seriesIndex}function By(e){return e.dim+e.index}function HT(e,t){var r=[];return t.eachSeriesByType(e,function(n){$T(n)&&r.push(n)}),r}function QH(e){var t={};U(e,function(l){var c=l.coordinateSystem,f=c.getBaseAxis();if(!(f.type!=="time"&&f.type!=="value"))for(var h=l.getData(),v=f.dim+"_"+f.index,p=h.getDimensionIndex(h.mapDimension(f.dim)),g=h.getStore(),y=0,x=g.count();y<x;++y){var b=g.get(p,y);t[v]?t[v].push(b):t[v]=[b]}});var r={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(i){i.sort(function(l,c){return l-c});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function VT(e){var t=QH(e),r=[];return U(e,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,c=t[l],f=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),v=Math.abs(h[1]-h[0]);s=c?f/v*c:f}else{var p=n.getData();s=Math.abs(o[1]-o[0])/p.count()}var g=pt(n.get("barWidth"),s),y=pt(n.get("barMaxWidth"),s),x=pt(n.get("barMinWidth")||(UT(n)?.5:1),s),b=n.get("barGap"),_=n.get("barCategoryGap");r.push({bandWidth:s,barWidth:g,barMaxWidth:y,barMinWidth:x,barGap:b,barCategoryGap:_,axisKey:By(a),stackId:BT(n)})}),JH(r)}function JH(e){var t={};U(e,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[a]=s;var c=n.stackId;l[c]||s.autoWidthCount++,l[c]=l[c]||{width:0,maxWidth:0};var f=n.barWidth;f&&!l[c].width&&(l[c].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=n.barMaxWidth;h&&(l[c].maxWidth=h);var v=n.barMinWidth;v&&(l[c].minWidth=v);var p=n.barGap;p!=null&&(s.gap=p);var g=n.barCategoryGap;g!=null&&(s.categoryGap=g)});var r={};return U(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=xt(a).length;s=Math.max(35-l*4,15)+"%"}var c=pt(s,o),f=pt(n.gap,1),h=n.remainedWidth,v=n.autoWidthCount,p=(h-c)/(v+(v-1)*f);p=Math.max(p,0),U(a,function(b){var _=b.maxWidth,C=b.minWidth;if(b.width){var A=b.width;_&&(A=Math.min(A,_)),C&&(A=Math.max(A,C)),b.width=A,h-=A+f*A,v--}else{var A=p;_&&_<A&&(A=Math.min(_,h)),C&&C>A&&(A=C),A!==p&&(b.width=A,h-=A+f*A,v--)}}),p=(h-c)/(v+(v-1)*f),p=Math.max(p,0);var g=0,y;U(a,function(b,_){b.width||(b.width=p),y=b,g+=b.width*(1+f)}),y&&(g-=y.width*f);var x=-g/2;U(a,function(b,_){r[i][_]=r[i][_]||{bandWidth:o,offset:x,width:b.width},x+=b.width*(1+f)})}),r}function e7(e,t,r){if(e&&t){var n=e[By(t)];return n}}function t7(e,t){var r=HT(e,t),n=VT(r);U(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=BT(i),c=n[By(s)][l],f=c.offset,h=c.width;a.setLayout({bandWidth:c.bandWidth,offset:f,size:h})})}function r7(e){return{seriesType:e,plan:jy(),reset:function(t){if($T(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),c=r.mapDimension(a.dim),f=r.getCalculationInfo("stackResultDimension"),h=bo(r,c)&&!!r.getCalculationInfo("stackedOnSeries"),v=a.isHorizontal(),p=n7(i,a),g=UT(t),y=t.get("barMinHeight")||0,x=f&&r.getDimensionIndex(f),b=r.getLayout("size"),_=r.getLayout("offset");return{progress:function(C,A){for(var M=C.count,D=g&&Si(M*3),E=g&&l&&Si(M*3),N=g&&Si(M),O=n.master.getRect(),L=v?O.width:O.height,R,j=A.getStore(),H=0;(R=C.next())!=null;){var W=j.get(h?x:o,R),K=j.get(s,R),Q=p,re=void 0;h&&(re=+W-j.get(o,R));var X=void 0,$=void 0,I=void 0,z=void 0;if(v){var Y=n.dataToPoint([W,K]);if(h){var F=n.dataToPoint([re,K]);Q=F[0]}X=Q,$=Y[1]+_,I=Y[0]-Q,z=b,Math.abs(I)<y&&(I=(I<0?-1:1)*y)}else{var Y=n.dataToPoint([K,W]);if(h){var F=n.dataToPoint([K,re]);Q=F[1]}X=Y[0]+_,$=Q,I=b,z=Y[1]-Q,Math.abs(z)<y&&(z=(z<=0?-1:1)*y)}g?(D[H]=X,D[H+1]=$,D[H+2]=v?I:z,E&&(E[H]=v?O.x:X,E[H+1]=v?$:O.y,E[H+2]=L),N[R]=R):A.setItemLayout(R,{x:X,y:$,width:I,height:z}),H+=3}g&&A.setLayout({largePoints:D,largeDataIndices:N,largeBackgroundPoints:E,valueAxisHorizontal:v})}}}}}}function $T(e){return e.coordinateSystem&&e.coordinateSystem.type==="cartesian2d"}function UT(e){return e.pipelineContext&&e.pipelineContext.large}function n7(e,t){var r=t.model.get("startValue");return r||(r=0),t.toGlobalCoord(t.dataToCoord(t.type==="log"?r>0?r:1:r))}var Hy=(function(e){pe(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 dy(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(v,p){if(v.type==="category"&&n!=null){var g=v.getTicksCoords(),y=v.getTickModel().get("alignWithLabel"),x=o[p],b=n[p]==="x1"||n[p]==="y1";if(b&&!y&&(x+=1),g.length<2)return;if(g.length===2){s[p]=v.toGlobalCoord(v.getExtent()[b?1:0]);return}for(var _=void 0,C=void 0,A=1,M=0;M<g.length;M++){var D=g[M].coord,E=M===g.length-1?g[M-1].tickValue+A:g[M].tickValue;if(E===x){C=D;break}else if(E<x)_=D;else if(_!=null&&E>x){C=(D+_)/2;break}M===1&&(A=E-g[0].tickValue)}C==null&&(_?_&&(C=g[g.length-1].coord):C=g[0].coord),s[p]=v.toGlobalCoord(C)}});else{var l=this.getData(),c=l.getLayout("offset"),f=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=c+f/2}return s}return[NaN,NaN]},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"},t})(En);En.registerClass(Hy);var i7=(function(e){pe(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 dy(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},t.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=BC(Hy.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:"#212121"}},realtimeSort:!1}),t})(Hy),Ud="\0__throttleOriginMethod",WT="\0__throttleRate",GT="\0__throttleType";function Vy(e,t,r){var n,i=0,a=0,o=null,s,l,c,f;t=t||0;function h(){a=new Date().getTime(),o=null,e.apply(l,c||[])}var v=function(){for(var p=[],g=0;g<arguments.length;g++)p[g]=arguments[g];n=new Date().getTime(),l=this,c=p;var y=f||t,x=f||r;f=null,s=n-(x?i:a)-y,clearTimeout(o),x?o=setTimeout(h,y):s>=0?h():o=setTimeout(h,-s),i=n};return v.clear=function(){o&&(clearTimeout(o),o=null)},v.debounceNextCall=function(p){f=p},v}function YT(e,t,r,n){var i=e[t];if(i){var a=i[Ud]||i,o=i[GT],s=i[WT];if(s!==r||o!==n){if(r==null||!n)return e[t]=a;i=e[t]=Vy(a,r,n==="debounce"),i[Ud]=a,i[GT]=n,i[WT]=r}return i}}function $y(e,t){var r=e[t];r&&r[Ud]&&(r.clear&&r.clear(),e[t]=r[Ud])}var a7=(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})(),XT=(function(e){pe(t,e);function t(r){var n=e.call(this,r)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new a7},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,c=o+l,f=n.startAngle,h=n.endAngle,v=n.clockwise,p=Math.PI*2,g=v?h-f<p:f-h<p;g||(f=h-(v?p:-p));var y=Math.cos(f),x=Math.sin(f),b=Math.cos(h),_=Math.sin(h);g?(r.moveTo(y*o+i,x*o+a),r.arc(y*c+i,x*c+a,l,-Math.PI+f,f,!v)):r.moveTo(y*s+i,x*s+a),r.arc(i,a,s,f,h,!v),r.arc(b*c+i,_*c+a,l,h-Math.PI*2,h-Math.PI,!v),o!==0&&r.arc(i,a,o,h,f,v)},t})(at);function o7(e,t){t=t||{};var r=t.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return Tf(n,i,a);var s=e(o),l=i.distance!=null?i.distance:5,c=this.shape,f=c.cx,h=c.cy,v=c.r,p=c.r0,g=(v+p)/2,y=c.startAngle,x=c.endAngle,b=(y+x)/2,_=r?Math.abs(v-p)/2:0,C=Math.cos,A=Math.sin,M=f+v*C(y),D=h+v*A(y),E="left",N="top";switch(s){case"startArc":M=f+(p-l)*C(b),D=h+(p-l)*A(b),E="center",N="top";break;case"insideStartArc":M=f+(p+l)*C(b),D=h+(p+l)*A(b),E="center",N="bottom";break;case"startAngle":M=f+g*C(y)+Wd(y,l+_,!1),D=h+g*A(y)+Gd(y,l+_,!1),E="right",N="middle";break;case"insideStartAngle":M=f+g*C(y)+Wd(y,-l+_,!1),D=h+g*A(y)+Gd(y,-l+_,!1),E="left",N="middle";break;case"middle":M=f+g*C(b),D=h+g*A(b),E="center",N="middle";break;case"endArc":M=f+(v+l)*C(b),D=h+(v+l)*A(b),E="center",N="bottom";break;case"insideEndArc":M=f+(v-l)*C(b),D=h+(v-l)*A(b),E="center",N="top";break;case"endAngle":M=f+g*C(x)+Wd(x,l+_,!0),D=h+g*A(x)+Gd(x,l+_,!0),E="left",N="middle";break;case"insideEndAngle":M=f+g*C(x)+Wd(x,-l+_,!0),D=h+g*A(x)+Gd(x,-l+_,!0),E="right",N="middle";break;default:return Tf(n,i,a)}return n=n||{},n.x=M,n.y=D,n.align=E,n.verticalAlign=N,n}}function s7(e,t,r,n){if(lt(n)){e.setTextConfig({rotation:n});return}else if(ve(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,c=r(t);switch(c){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;c==="middle"&&f>Math.PI/2&&f<Math.PI*1.5&&(f-=Math.PI),e.setTextConfig({rotation:f})}function Wd(e,t,r){return t*Math.sin(e)*(r?-1:1)}function Gd(e,t,r){return t*Math.cos(e)*(r?1:-1)}function Pu(e,t,r){var n=e.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;ve(n)||(n=[n,n,n,n]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:Te(n,function(a){return Ui(a,i)})}}var Uy=Math.max,Wy=Math.min;function l7(e,t){var r=e.getArea&&e.getArea();if($d(e,"cartesian2d")){var n=e.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=t.getLayout("bandWidth");n.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}var u7=(function(e){pe(t,e);function t(){var r=e.call(this)||this;return r.type=t.type,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){xu(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,c=r.coordinateSystem,f=c.getBaseAxis(),h;c.type==="cartesian2d"?h=f.isHorizontal():c.type==="polar"&&(h=f.dim==="angle");var v=r.isAnimationEnabled()?r:null,p=c7(r,c);p&&this._enableRealtimeSort(p,s,i);var g=r.get("clip",!0)||p,y=l7(c,s);o.removeClipPath();var x=r.get("roundCap",!0),b=r.get("showBackground",!0),_=r.getModel("backgroundStyle"),C=_.get("borderRadius")||0,A=[],M=this._backgroundEls,D=a&&a.isInitSort,E=a&&a.type==="changeAxisOrder";function N(R){var j=Yd[c.type](s,R),H=m7(c,h,j);return H.useStyle(_.getItemStyle()),c.type==="cartesian2d"?H.setShape("r",C):H.setShape("cornerRadius",C),A[R]=H,H}s.diff(l).add(function(R){var j=s.getItemModel(R),H=Yd[c.type](s,R,j);if(b&&N(R),!(!s.hasValue(R)||!JT[c.type](H))){var W=!1;g&&(W=qT[c.type](y,H));var K=KT[c.type](r,s,R,H,h,v,f.model,!1,x);p&&(K.forceLabelAnimation=!0),tA(K,s,R,j,H,r,h,c.type==="polar"),D?K.attr({shape:H}):p?ZT(p,v,K,H,R,h,!1,!1):Vr(K,{shape:H},r,R),s.setItemGraphicEl(R,K),o.add(K),K.ignore=W}}).update(function(R,j){var H=s.getItemModel(R),W=Yd[c.type](s,R,H);if(b){var K=void 0;M.length===0?K=N(j):(K=M[j],K.useStyle(_.getItemStyle()),c.type==="cartesian2d"?K.setShape("r",C):K.setShape("cornerRadius",C),A[R]=K);var Q=Yd[c.type](s,R),re=aA(h,Q,c);er(K,{shape:re},v,R)}var X=l.getItemGraphicEl(j);if(!s.hasValue(R)||!JT[c.type](W)){o.remove(X);return}var $=!1;if(g&&($=qT[c.type](y,W),$&&o.remove(X)),X?Gm(X):X=KT[c.type](r,s,R,W,h,v,f.model,!!X,x),p&&(X.forceLabelAnimation=!0),E){var I=X.getTextContent();if(I){var z=_d(I);z.prevValue!=null&&(z.prevValue=z.value)}}else tA(X,s,R,H,W,r,h,c.type==="polar");D?X.attr({shape:W}):p?ZT(p,v,X,W,R,h,!0,E):er(X,{shape:W},r,R,null),s.setItemGraphicEl(R,X),X.ignore=$,o.add(X)}).remove(function(R){var j=l.getItemGraphicEl(R);j&&md(j,r,R)}).execute();var O=this._backgroundGroup||(this._backgroundGroup=new Ot);O.removeAll();for(var L=0;L<A.length;++L)O.add(A[L]);o.add(O),this._backgroundEls=A,this._data=s},t.prototype._renderLarge=function(r,n,i){this._clear(),nA(r,this.group),this._updateLargeClip(r)},t.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),nA(n,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&OH(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 c=n.getItemGraphicEl(l),f=c&&c.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:Te(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,c=a.getOrdinalMeta().categories.length;l<c;++l){var f=r.rawIndexOf(o,a.getRawOrdinalNumber(l)),h=f<0?Number.MIN_VALUE:n(r.indexOfRawIndex(f));if(h>s)return!0;s=h}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){md(a,r,Qe(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t})(un),qT={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=Uy(t.x,e.x),s=Wy(t.x+t.width,i),l=Uy(t.y,e.y),c=Wy(t.y+t.height,a),f=s<o,h=c<l;return t.x=f&&o>i?s:o,t.y=h&&l>a?c:l,t.width=f?0:s-o,t.height=h?0:c-l,r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),f||h},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=Wy(t.r,e.r),a=Uy(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}},KT={cartesian2d:function(e,t,r,n,i,a,o,s,l){var c=new Rt({shape:ue({},n),z2:1});if(c.__dataIndex=r,c.name="item",a){var f=c.shape,h=i?"height":"width";f[h]=0}return c},polar:function(e,t,r,n,i,a,o,s,l){var c=!i&&l?XT:Qi,f=new c({shape:n,z2:1});f.name="item";var h=eA(i);if(f.calculateTextPosition=o7(h,{isRoundCap:c===XT}),a){var v=f.shape,p=i?"r":"endAngle",g={};v[p]=i?n.r0:n.startAngle,g[p]=n[p],(s?er:Vr)(f,{shape:g},a)}return f}};function c7(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 ZT(e,t,r,n,i,a,o,s){var l,c;a?(c={x:n.x,width:n.width},l={y:n.y,height:n.height}):(c={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?er:Vr)(r,{shape:l},t,i,null);var f=t?e.baseAxis.model:null;(o?er:Vr)(r,{shape:c},f,i)}function QT(e,t){for(var r=0;r<t.length;r++)if(!isFinite(e[t[r]]))return!0;return!1}var f7=["x","y","width","height"],d7=["cx","cy","r","startAngle","endAngle"],JT={cartesian2d:function(e){return!QT(e,f7)},polar:function(e){return!QT(e,d7)}},Yd={cartesian2d:function(e,t,r){var n=e.getItemLayout(t),i=r?p7(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 h7(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function eA(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 tA(e,t,r,n,i,a,o,s){var l=t.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var f=e.shape,h=Pu(n.getModel("itemStyle"),f,!0);ue(f,h),e.setShape(f)}}else{var c=n.get(["itemStyle","borderRadius"])||0;e.setShape("r",c)}e.useStyle(l);var v=n.getShallow("cursor");v&&e.attr("cursor",v);var p=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",g=go(n);As(e,g,{labelFetcher:a,labelDataIndex:r,defaultText:Ny(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var y=e.getTextContent();if(s&&y){var x=n.get(["label","position"]);e.textConfig.inside=x==="middle"?!0:null,s7(e,x==="outside"?p:x,eA(o),n.get(["label","rotate"]))}_8(y,g,a.getRawValue(r),function(_){return wT(t,_)});var b=n.getModel(["emphasis"]);Ss(e,b.get("focus"),b.get("blurScope"),b.get("disabled")),od(e,n),h7(i)&&(e.style.fill="none",e.style.stroke="none",U(e.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function p7(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 v7=(function(){function e(){}return e})(),rA=(function(e){pe(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new v7},t.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],c=this.barWidth,f=0;f<i.length;f+=3)l[a]=c,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})(at);function nA(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"),c=i.getLayout("largeBackgroundPoints");if(c){var f=new rA({shape:{points:c},incremental:!!n,silent:!0,z2:0});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,f.useStyle(l.getItemStyle()),t.add(f),r&&r.push(f)}var h=new rA({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=a,h.largeDataIndices=o,h.barWidth=s,t.add(h),h.useStyle(i.getVisual("style")),h.style.stroke=null,Qe(h).seriesIndex=e.seriesIndex,e.get("silent")||(h.on("mousedown",iA),h.on("mousemove",iA)),r&&r.push(h)}var iA=Vy(function(e){var t=this,r=g7(t,e.offsetX,e.offsetY);Qe(t).dataIndex=r>=0?r:null},30,!1);function g7(e,t,r){for(var n=e.baseDimIdx,i=1-n,a=e.shape.points,o=e.largeDataIndices,s=[],l=[],c=e.barWidth,f=0,h=a.length/3;f<h;f++){var v=f*3;if(l[n]=c,l[i]=a[v+2],s[n]=a[v+n],s[i]=a[v+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 aA(e,t,r){if($d(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 m7(e,t,r){var n=e.type==="polar"?Qi:Rt;return new n({shape:aA(t,r,e),silent:!0,z2:0})}function y7(e){e.registerChartView(u7),e.registerSeriesModel(i7),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,ut(t7,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,r7("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,FT("bar")),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)})})}function x7(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=ue({},i),o.dispatchAction(ue(i,{type:n[1],seriesIndex:r(a,i)}))})})}function Fs(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,c=i.selected,f=0;f<c.length;f++)if(c[f].seriesIndex===s){var h=o.getData(),v=co(h,i.fromActionPayload);r.trigger(a,{type:a,seriesId:o.id,name:ve(v)?h.getName(v[0]):h.getName(v),selected:Ae(l)?l:ue({},l)})}})}function b7(e,t,r){e.on("selectchanged",function(n){var i=r.getModel();n.isFromClick?(Fs("map","selectchanged",t,i,n),Fs("pie","selectchanged",t,i,n)):n.fromAction==="select"?(Fs("map","selected",t,i,n),Fs("pie","selected",t,i,n)):n.fromAction==="unselect"&&(Fs("map","unselected",t,i,n),Fs("pie","unselected",t,i,n))})}var oA=Math.PI*2,Xd=Math.PI/180;function sA(e,t){return Eu(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function lA(e,t){var r=sA(e,t),n=e.get("center"),i=e.get("radius");ve(i)||(i=[0,i]);var a=pt(r.width,t.getWidth()),o=pt(r.height,t.getHeight()),s=Math.min(a,o),l=pt(i[0],s/2),c=pt(i[1],s/2),f,h,v=e.coordinateSystem;if(v){var p=v.dataToPoint(n);f=p[0]||0,h=p[1]||0}else ve(n)||(n=[n,n]),f=pt(n[0],a)+r.x,h=pt(n[1],o)+r.y;return{cx:f,cy:h,r0:l,r:c}}function w7(e,t,r){t.eachSeriesByType(e,function(n){var i=n.getData(),a=i.mapDimension("value"),o=sA(n,r),s=lA(n,r),l=s.cx,c=s.cy,f=s.r,h=s.r0,v=-n.get("startAngle")*Xd,p=n.get("endAngle"),g=n.get("padAngle")*Xd;p=p==="auto"?v-oA:-p*Xd;var y=n.get("minAngle")*Xd,x=y+g,b=0;i.each(a,function(re){!isNaN(re)&&b++});var _=i.getSum(a),C=Math.PI/(_||b)*2,A=n.get("clockwise"),M=n.get("roseType"),D=n.get("stillShowZeroSum"),E=i.getDataExtent(a);E[0]=0;var N=A?1:-1,O=[v,p],L=N*g/2;HS(O,!A),v=O[0],p=O[1];var R=uA(n);R.startAngle=v,R.endAngle=p,R.clockwise=A;var j=Math.abs(p-v),H=j,W=0,K=v;if(i.setLayout({viewRect:o,r:f}),i.each(a,function(re,X){var $;if(isNaN(re)){i.setItemLayout(X,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:A,cx:l,cy:c,r0:h,r:M?NaN:f});return}M!=="area"?$=_===0&&D?C:re*C:$=j/b,$<x?($=x,H-=x):W+=re;var I=K+N*$,z=0,Y=0;g>$?(z=K+N*$/2,Y=z):(z=K+L,Y=I-L),i.setItemLayout(X,{angle:$,startAngle:z,endAngle:Y,clockwise:A,cx:l,cy:c,r0:h,r:M?km(re,E,[h,f]):f}),K=I}),H<oA&&b)if(H<=.001){var Q=j/b;i.each(a,function(re,X){if(!isNaN(re)){var $=i.getItemLayout(X);$.angle=Q;var I=0,z=0;Q<g?(I=v+N*(X+.5)*Q,z=I):(I=v+N*X*Q+L,z=v+N*(X+1)*Q-L),$.startAngle=I,$.endAngle=z}})}else C=H/W,K=v,i.each(a,function(re,X){if(!isNaN(re)){var $=i.getItemLayout(X),I=$.angle===x?x:re*C,z=0,Y=0;I<g?(z=K+N*I/2,Y=z):(z=K+L,Y=K+N*I-L),$.startAngle=z,$.endAngle=Y,K+=N*I}})})}var uA=bt();function _7(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 cA(e,t,r,n,i,a,o,s){var l=i-e,c=a-t,f=r-e,h=n-t,v=Math.sqrt(f*f+h*h);f/=v,h/=v;var p=l*f+c*h,g=p/v;g*=v;var y=o[0]=e+g*f,x=o[1]=t+g*h;return Math.sqrt((y-i)*(y-i)+(x-a)*(x-a))}var oa=new He,Tt=new He,Wt=new He,sa=new He,ri=new He,qd=[],pr=new He;function k7(e,t){if(t<=180&&t>0){t=t/180*Math.PI,oa.fromArray(e[0]),Tt.fromArray(e[1]),Wt.fromArray(e[2]),He.sub(sa,oa,Tt),He.sub(ri,Wt,Tt);var r=sa.len(),n=ri.len();if(!(r<.001||n<.001)){sa.scale(1/r),ri.scale(1/n);var i=sa.dot(ri),a=Math.cos(t);if(a<i){var o=cA(Tt.x,Tt.y,Wt.x,Wt.y,oa.x,oa.y,qd);pr.fromArray(qd),pr.scaleAndAdd(ri,o/Math.tan(Math.PI-t));var s=Wt.x!==Tt.x?(pr.x-Tt.x)/(Wt.x-Tt.x):(pr.y-Tt.y)/(Wt.y-Tt.y);if(isNaN(s))return;s<0?He.copy(pr,Tt):s>1&&He.copy(pr,Wt),pr.toArray(e[1])}}}}function S7(e,t,r){if(r<=180&&r>0){r=r/180*Math.PI,oa.fromArray(e[0]),Tt.fromArray(e[1]),Wt.fromArray(e[2]),He.sub(sa,Tt,oa),He.sub(ri,Wt,Tt);var n=sa.len(),i=ri.len();if(!(n<.001||i<.001)){sa.scale(1/n),ri.scale(1/i);var a=sa.dot(t),o=Math.cos(r);if(a<o){var s=cA(Tt.x,Tt.y,Wt.x,Wt.y,oa.x,oa.y,qd);pr.fromArray(qd);var l=Math.PI/2,c=Math.acos(ri.dot(t)),f=l+c-r;if(f>=l)He.copy(pr,Wt);else{pr.scaleAndAdd(ri,s/Math.tan(Math.PI/2-f));var h=Wt.x!==Tt.x?(pr.x-Tt.x)/(Wt.x-Tt.x):(pr.y-Tt.y)/(Wt.y-Tt.y);if(isNaN(h))return;h<0?He.copy(pr,Tt):h>1&&He.copy(pr,Wt)}pr.toArray(e[1])}}}}function Gy(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&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?e.useStyle(s):a.style=s}function C7(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=Ug(n[0],n[1]),a=Ug(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=Wg([],n[1],n[0],o/i),l=Wg([],n[1],n[2],o/a),c=Wg([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],c[0],c[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 T7(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<rd.length;l++){var c=rd[l],f=t[c],h=c==="normal";if(f){var v=f.get("show"),p=h?s:Ue(i.states[c]&&i.states[c].ignore,s);if(p||!Ue(v,o)){var g=h?n:n&&n.states[c];g&&(g.ignore=!0),n&&Gy(n,!0,c,f);continue}n||(n=new gu,e.setTextGuideLine(n),!h&&(s||!o)&&Gy(n,!0,"normal",t.normal),e.stateProxy&&(n.stateProxy=e.stateProxy)),Gy(n,!1,c,f)}}if(n){tt(n.style,r),n.style.fill=null;var y=a.get("showAbove"),x=e.textGuideLineConfig=e.textGuideLineConfig||{};x.showAbove=y||!1,n.buildPath=C7}}function A7(e,t){t=t||"labelLine";for(var r={normal:e.getModel(t)},n=0;n<Cr.length;n++){var i=Cr[n];r[i]=e.getModel([i,t])}return r}function D7(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];if(!n.defaultAttr.ignore){var i=n.label,a=i.getComputedTransform(),o=i.getBoundingRect(),s=!a||a[1]<1e-5&&a[2]<1e-5,l=i.style.margin||0,c=o.clone();c.applyTransform(a),c.x-=l/2,c.y-=l/2,c.width+=l,c.height+=l;var f=s?new vd(o,a):null;t.push({label:i,labelLine:n.labelLine,rect:c,localRect:o,obb:f,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:s,transform:a})}}return t}function M7(e,t,r,n,i,a){var o=e.length;if(o<2)return;e.sort(function(D,E){return D.rect[t]-E.rect[t]});for(var s=0,l,c=!1,f=0;f<o;f++){var h=e[f],v=h.rect;l=v[t]-s,l<0&&(v[t]-=l,h.label[t]-=l,c=!0),s=v[t]+v[r]}var p=e[0],g=e[o-1],y,x;b(),y<0&&A(-y,.8),x<0&&A(x,.8),b(),_(y,x,1),_(x,y,-1),b(),y<0&&M(-y),x<0&&M(x);function b(){y=p.rect[t]-n,x=i-g.rect[t]-g.rect[r]}function _(D,E,N){if(D<0){var O=Math.min(E,-D);if(O>0){C(O*N,0,o);var L=O+D;L<0&&A(-L*N,1)}else A(-D*N,1)}}function C(D,E,N){D!==0&&(c=!0);for(var O=E;O<N;O++){var L=e[O],R=L.rect;R[t]+=D,L.label[t]+=D}}function A(D,E){for(var N=[],O=0,L=1;L<o;L++){var R=e[L-1].rect,j=Math.max(e[L].rect[t]-R[t]-R[r],0);N.push(j),O+=j}if(O){var H=Math.min(Math.abs(D)/O,E);if(D>0)for(var L=0;L<o-1;L++){var W=N[L]*H;C(W,0,L+1)}else for(var L=o-1;L>0;L--){var W=N[L-1]*H;C(-W,L,o)}}}function M(D){var E=D<0?-1:1;D=Math.abs(D);for(var N=Math.ceil(D/(o-1)),O=0;O<o-1;O++)if(E>0?C(N,0,O+1):C(-N,o-O-1,o),D-=N,D<=0)return}return c}function E7(e,t,r,n){return M7(e,"y","height",t,r)}function L7(e){var t=[];e.sort(function(y,x){return x.priority-y.priority});var r=new nt(0,0,0,0);function n(y){if(!y.ignore){var x=y.ensureState("emphasis");x.ignore==null&&(x.ignore=!1)}y.ignore=!0}for(var i=0;i<e.length;i++){var a=e[i],o=a.axisAligned,s=a.localRect,l=a.transform,c=a.label,f=a.labelLine;r.copy(a.rect),r.width-=.1,r.height-=.1,r.x+=.05,r.y+=.05;for(var h=a.obb,v=!1,p=0;p<t.length;p++){var g=t[p];if(r.intersect(g.rect)){if(o&&g.axisAligned){v=!0;break}if(g.obb||(g.obb=new vd(g.localRect,g.transform)),h||(h=new vd(s,l)),h.intersect(g.obb)){v=!0;break}}}v?(n(c),f&&n(f)):(c.attr("ignore",a.defaultAttr.ignore),f&&f.attr("ignore",a.defaultAttr.labelGuideIgnore),t.push(a))}}var I7=Math.PI/180;function fA(e,t,r,n,i,a,o,s,l,c){if(e.length<2)return;function f(y){for(var x=y.rB,b=x*x,_=0;_<y.list.length;_++){var C=y.list[_],A=Math.abs(C.label.y-r),M=n+C.len,D=M*M,E=Math.sqrt(Math.abs((1-A*A/b)*D)),N=t+(E+C.len2)*i,O=N-C.label.x,L=C.targetTextWidth-O*i;dA(C,L,!0),C.label.x=N}}function h(y){for(var x={list:[],maxY:0},b={list:[],maxY:0},_=0;_<y.length;_++)if(y[_].labelAlignTo==="none"){var C=y[_],A=C.label.y>r?b:x,M=Math.abs(C.label.y-r);if(M>=A.maxY){var D=C.label.x-t-C.len2*i,E=n+C.len,N=Math.abs(D)<E?Math.sqrt(M*M/(1-D*D/E/E)):E;A.rB=N,A.maxY=M}A.list.push(C)}f(x),f(b)}for(var v=e.length,p=0;p<v;p++)if(e[p].position==="outer"&&e[p].labelAlignTo==="labelLine"){var g=e[p].label.x-c;e[p].linePoints[1][0]+=g,e[p].label.x=c}E7(e,l,l+o)&&h(e)}function P7(e,t,r,n,i,a,o,s){for(var l=[],c=[],f=Number.MAX_VALUE,h=-Number.MAX_VALUE,v=0;v<e.length;v++){var p=e[v].label;Yy(e[v])||(p.x<t?(f=Math.min(f,p.x),l.push(e[v])):(h=Math.max(h,p.x),c.push(e[v])))}for(var v=0;v<e.length;v++){var g=e[v];if(!Yy(g)&&g.linePoints){if(g.labelStyleWidth!=null)continue;var p=g.label,y=g.linePoints,x=void 0;g.labelAlignTo==="edge"?p.x<t?x=y[2][0]-g.labelDistance-o-g.edgeDistance:x=o+i-g.edgeDistance-y[2][0]-g.labelDistance:g.labelAlignTo==="labelLine"?p.x<t?x=f-o-g.bleedMargin:x=o+i-h-g.bleedMargin:p.x<t?x=p.x-o-g.bleedMargin:x=o+i-p.x-g.bleedMargin,g.targetTextWidth=x,dA(g,x)}}fA(c,t,r,n,1,i,a,o,s,h),fA(l,t,r,n,-1,i,a,o,s,f);for(var v=0;v<e.length;v++){var g=e[v];if(!Yy(g)&&g.linePoints){var p=g.label,y=g.linePoints,b=g.labelAlignTo==="edge",_=p.style.padding,C=_?_[1]+_[3]:0,A=p.style.backgroundColor?0:C,M=g.rect.width+A,D=y[1][0]-y[2][0];b?p.x<t?y[2][0]=o+g.edgeDistance+M+g.labelDistance:y[2][0]=o+i-g.edgeDistance-M-g.labelDistance:(p.x<t?y[2][0]=p.x+g.labelDistance:y[2][0]=p.x-g.labelDistance,y[1][0]=y[2][0]+D),y[1][1]=y[2][1]=p.y}}}function dA(e,t,r){if(r===void 0&&(r=!1),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,c=i.overflow,f=a.width+(o?0:l);if(t<f||r){var h=a.height;if(c&&c.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",t-l);var v=n.getBoundingRect();n.setStyle("width",Math.ceil(v.width)),n.setStyle("backgroundColor",o)}else{var p=t-l,g=t<f?p:r?p>e.unconstrainedWidth?null:p:null;n.setStyle("width",g)}var y=n.getBoundingRect();a.width=y.width;var x=(n.style.margin||0)+2.1;a.height=y.height+x,a.y-=(a.height-h)/2}}}function Yy(e){return e.position==="center"}function N7(e){var t=e.getData(),r=[],n,i,a=!1,o=(e.get("minShowLabelAngle")||0)*I7,s=t.getLayout("viewRect"),l=t.getLayout("r"),c=s.width,f=s.x,h=s.y,v=s.height;function p(D){D.ignore=!0}function g(D){if(!D.ignore)return!0;for(var E in D.states)if(D.states[E].ignore===!1)return!0;return!1}t.each(function(D){var E=t.getItemGraphicEl(D),N=E.shape,O=E.getTextContent(),L=E.getTextGuideLine(),R=t.getItemModel(D),j=R.getModel("label"),H=j.get("position")||R.get(["emphasis","label","position"]),W=j.get("distanceToLabelLine"),K=j.get("alignTo"),Q=pt(j.get("edgeDistance"),c),re=j.get("bleedMargin"),X=R.getModel("labelLine"),$=X.get("length");$=pt($,c);var I=X.get("length2");if(I=pt(I,c),Math.abs(N.endAngle-N.startAngle)<o){U(O.states,p),O.ignore=!0,L&&(U(L.states,p),L.ignore=!0);return}if(g(O)){var z=(N.startAngle+N.endAngle)/2,Y=Math.cos(z),F=Math.sin(z),ne,oe,le,Me;n=N.cx,i=N.cy;var we=H==="inside"||H==="inner";if(H==="center")ne=N.cx,oe=N.cy,Me="center";else{var De=(we?(N.r+N.r0)/2*Y:N.r*Y)+n,_e=(we?(N.r+N.r0)/2*F:N.r*F)+i;if(ne=De+Y*3,oe=_e+F*3,!we){var Ce=De+Y*($+l-N.r),Ve=_e+F*($+l-N.r),Xt=Ce+(Y<0?-1:1)*I,wt=Ve;K==="edge"?ne=Y<0?f+Q:f+c-Q:ne=Xt+(Y<0?-W:W),oe=wt,le=[[De,_e],[Ce,Ve],[Xt,wt]]}Me=we?"center":K==="edge"?Y>0?"right":"left":Y>0?"left":"right"}var Ur=Math.PI,vr=0,vn=j.get("rotate");if(lt(vn))vr=vn*(Ur/180);else if(H==="center")vr=0;else if(vn==="radial"||vn===!0){var Oo=Y<0?-z+Ur:-z;vr=Oo}else if(vn==="tangential"&&H!=="outside"&&H!=="outer"){var gn=Math.atan2(Y,F);gn<0&&(gn=Ur*2+gn);var oi=F>0;oi&&(gn=Ur+gn),vr=gn-Ur}if(a=!!vr,O.x=ne,O.y=oe,O.rotation=vr,O.setStyle({verticalAlign:"middle"}),we){O.setStyle({align:Me});var ma=O.states.select;ma&&(ma.x+=O.x,ma.y+=O.y)}else{var gr=O.getBoundingRect().clone();gr.applyTransform(O.getComputedTransform());var ga=(O.style.margin||0)+2.1;gr.y-=ga/2,gr.height+=ga,r.push({label:O,labelLine:L,position:H,len:$,len2:I,minTurnAngle:X.get("minTurnAngle"),maxSurfaceAngle:X.get("maxSurfaceAngle"),surfaceNormal:new He(Y,F),linePoints:le,textAlign:Me,labelDistance:W,labelAlignTo:K,edgeDistance:Q,bleedMargin:re,rect:gr,unconstrainedWidth:gr.width,labelStyleWidth:O.style.width})}E.setTextConfig({inside:we})}}),!a&&e.get("avoidLabelOverlap")&&P7(r,n,i,l,c,v,f,h);for(var y=0;y<r.length;y++){var x=r[y],b=x.label,_=x.labelLine,C=isNaN(b.x)||isNaN(b.y);if(b){b.setStyle({align:x.textAlign}),C&&(U(b.states,p),b.ignore=!0);var A=b.states.select;A&&(A.x+=b.x,A.y+=b.y)}if(_){var M=x.linePoints;C||!M?(U(_.states,p),_.ignore=!0):(k7(M,x.minTurnAngle),S7(M,x.surfaceNormal,x.maxSurfaceAngle),_.setShape({points:M}),b.__hostTarget.textGuideLineConfig={anchor:new He(M[0][0],M[0][1])})}}}var R7=(function(e){pe(t,e);function t(r,n,i){var a=e.call(this)||this;a.z2=2;var o=new dr;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),c=l.getModel("emphasis"),f=r.getItemLayout(n),h=ue(Pu(l.getModel("itemStyle"),f,!0),f);if(isNaN(h.startAngle)){o.setShape(h);return}if(a){o.setShape(h);var v=s.getShallow("animationType");s.ecModel.ssr?(Vr(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=h.cx,o.originY=h.cy):v==="scale"?(o.shape.r=f.r0,Vr(o,{shape:{r:f.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),Vr(o,{shape:{startAngle:f.startAngle,endAngle:f.endAngle}},s,n)):(o.shape.endAngle=f.startAngle,er(o,{shape:{endAngle:f.endAngle}},s,n))}else Gm(o),er(o,{shape:h},s,n);o.useStyle(r.getItemVisual(n,"style")),od(o,l);var p=(f.startAngle+f.endAngle)/2,g=s.get("selectedOffset"),y=Math.cos(p)*g,x=Math.sin(p)*g,b=l.getShallow("cursor");b&&o.attr("cursor",b),this._updateLabel(s,r,n),o.ensureState("emphasis").shape=ue({r:f.r+(c.get("scale")&&c.get("scaleSize")||0)},Pu(c.getModel("itemStyle"),f)),ue(o.ensureState("select"),{x:y,y:x,shape:Pu(l.getModel(["select","itemStyle"]),f)}),ue(o.ensureState("blur"),{shape:Pu(l.getModel(["blur","itemStyle"]),f)});var _=o.getTextGuideLine(),C=o.getTextContent();_&&ue(_.ensureState("select"),{x:y,y:x}),ue(C.ensureState("select"),{x:y,y:x}),Ss(this,c.get("focus"),c.get("blurScope"),c.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"),c=l&&l.fill,f=l&&l.opacity;As(a,go(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:c,defaultOpacity:f,defaultText:r.getFormattedLabel(i,"normal")||n.getName(i)});var h=a.getTextContent();a.setTextConfig({position:null,rotation:null}),h.attr({z2:10});var v=r.get(["label","position"]);if(v!=="outside"&&v!=="outer")a.removeTextGuideLine();else{var p=this.getTextGuideLine();p||(p=new gu,this.setTextGuideLine(p)),T7(this,A7(o),{stroke:c,opacity:$l(s.get(["lineStyle","opacity"]),f,1)})}},t})(Qi),O7=(function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,i,a){var o=r.getData(),s=this._data,l=this.group,c;if(!s&&o.count()>0){for(var f=o.getItemLayout(0),h=1;isNaN(f&&f.startAngle)&&h<o.count();++h)f=o.getItemLayout(h);f&&(c=f.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&r.get("showEmptyCircle")){var v=uA(r),p=new Qi({shape:ue(lA(r,i),v)});p.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=p,l.add(p)}o.diff(s).add(function(g){var y=new R7(o,g,c);o.setItemGraphicEl(g,y),l.add(y)}).update(function(g,y){var x=s.getItemGraphicEl(y);x.updateData(o,g,c),x.off("click"),l.add(x),o.setItemGraphicEl(g,x)}).remove(function(g){var y=s.getItemGraphicEl(g);md(y,r,g)}).execute(),N7(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="pie",t})(un);function z7(e,t,r){t=ve(t)&&{coordDimensions:t}||ue({encodeDefine:e.getEncode()},t);var n=e.getSource(),i=jC(n,t).dimensions,a=new Cu(i,e);return a.initData(n,r),a}var j7=(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})(),F7=bt(),B7=(function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new j7(ht(this.getData,this),ht(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return z7(this,{coordDimensions:["value"],encodeDefaulter:ut(I8,this)})},t.prototype.getDataParams=function(r){var n=this.getData(),i=F7(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=HB(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){Jf(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.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,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%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,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})(En);function H7(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!(lt(o)&&!isNaN(o)&&o<0)})}}}function V7(e){e.registerChartView(O7),e.registerSeriesModel(B7),x7("pie",e.registerAction),e.registerLayout(ut(w7,"pie")),e.registerProcessor(_7("pie")),e.registerProcessor(H7("pie"))}var Bs=(function(){function e(t,r){this.target=t,this.topTarget=r&&r.topTarget}return e})(),$7=(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 Bs(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 Bs(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 Bs(l,t),"dragleave",t.event),s&&s!==l&&this.handler.dispatchToElement(new Bs(s,t),"dragenter",t.event))}},e.prototype._dragEnd=function(t){var r=this._draggingTarget;r&&(r.dragging=!1),this.handler.dispatchToElement(new Bs(r,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Bs(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},e})(),U7=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Xy=[],W7=je.browser.firefox&&+je.browser.version.split(".")[0]<39;function qy(e,t,r,n){return r=r||{},n?hA(e,t,r):W7&&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):hA(e,t,r),r}function hA(e,t,r){if(je.domSupported&&e.getBoundingClientRect){var n=t.clientX,i=t.clientY;if($C(e)){var a=e.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(vy(Xy,e,n,i)){r.zrX=Xy[0],r.zrY=Xy[1];return}}r.zrX=r.zrY=0}function Ky(e){return e||window.event}function cn(e,t,r){if(t=Ky(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&&qy(e,o,t,r)}else{qy(e,t,t,r);var a=G7(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&U7.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function G7(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 Y7(e,t,r,n){e.addEventListener(t,r,n)}function X7(e,t,r,n){e.removeEventListener(t,r,n)}var pA=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},q7=(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],c=qy(n,l,{});a.points.push([c.zrX,c.zrY]),a.touches.push(l)}this._track.push(a)}},e.prototype._recognize=function(t){for(var r in Zy)if(Zy.hasOwnProperty(r)){var n=Zy[r](this._track,t);if(n)return n}},e})();function vA(e){var t=e[1][0]-e[0][0],r=e[1][1]-e[0][1];return Math.sqrt(t*t+r*r)}function K7(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var Zy={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=vA(n)/vA(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=K7(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}},gA="silent";function Z7(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:Q7}}function Q7(){pA(this.event)}var J7=(function(e){pe(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})(Xn),Nu=(function(){function e(t,r){this.x=t,this.y=r}return e})(),eV=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Qy=new nt(0,0,0,0),mA=(function(e){pe(t,e);function t(r,n,i,a,o){var s=e.call(this)||this;return s._hovered=new Nu(0,0),s.storage=r,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new J7,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new $7(s),s}return t.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(U(eV,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=xA(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 Nu(n,i):this.findHover(n,i),c=l.target,f=this.proxy;f.setCursor&&f.setCursor(c?c.cursor:"default"),s&&c!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(l,"mousemove",r),c&&c!==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 Nu(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=Z7(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 Nu(r,n);if(yA(a,o,r,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,c=l/2,f=new nt(r-c,n-c,l,l),h=a.length-1;h>=0;h--){var v=a[h];v!==i&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(Qy.copy(v.getBoundingRect()),v.transform&&Qy.applyTransform(v.transform),Qy.intersect(f)&&s.push(v))}if(s.length)for(var p=4,g=Math.PI/12,y=Math.PI*2,x=0;x<c;x+=p)for(var b=0;b<y;b+=g){var _=r+x*Math.cos(b),C=n+x*Math.sin(b);if(yA(s,o,_,C,i),o.target)return o}}return o},t.prototype.processGesture=function(r,n){this._gestureMgr||(this._gestureMgr=new q7);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 Nu;s.target=a.target,this.dispatchToElement(s,o,a.event)}},t})(Xn);U(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){mA.prototype[e]=function(t){var r=t.zrX,n=t.zrY,i=xA(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||Ug(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function tV(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.parent}return i?gA:!0}return!1}function yA(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=tV(o,r,n))&&(!t.topTarget&&(t.topTarget=o),s!==gA)){t.target=o;break}}}function xA(e,t,r){var n=e.painter;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}var bA=32,Ru=7;function rV(e){for(var t=0;e>=bA;)t|=e&1,e>>=1;return e+t}function wA(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++;nV(e,t,i)}else for(;i<r&&n(e[i],e[i-1])>=0;)i++;return i-t}function nV(e,t,r){for(r--;t<r;){var n=e[t];e[t++]=e[r],e[r--]=n}}function _A(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 c=n-o;switch(c){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(;c>0;)e[o+c]=e[o+c-1],c--}e[o]=a}}function Jy(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 c=o;o=i-l,l=i-c}for(o++;o<l;){var f=o+(l-o>>>1);a(e,t[r+f])>0?o=f+1:l=f}return l}function e0(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 c=o;o=i-l,l=i-c}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 iV(e,t){var r=Ru,n,i,a=0,o=[];n=[],i=[];function s(p,g){n[a]=p,i[a]=g,a+=1}function l(){for(;a>1;){var p=a-2;if(p>=1&&i[p-1]<=i[p]+i[p+1]||p>=2&&i[p-2]<=i[p]+i[p-1])i[p-1]<i[p+1]&&p--;else if(i[p]>i[p+1])break;f(p)}}function c(){for(;a>1;){var p=a-2;p>0&&i[p-1]<i[p+1]&&p--,f(p)}}function f(p){var g=n[p],y=i[p],x=n[p+1],b=i[p+1];i[p]=y+b,p===a-3&&(n[p+1]=n[p+2],i[p+1]=i[p+2]),a--;var _=e0(e[x],e,g,y,0,t);g+=_,y-=_,y!==0&&(b=Jy(e[g+y-1],e,x,b,b-1,t),b!==0&&(y<=b?h(g,y,x,b):v(g,y,x,b)))}function h(p,g,y,x){var b=0;for(b=0;b<g;b++)o[b]=e[p+b];var _=0,C=y,A=p;if(e[A++]=e[C++],--x===0){for(b=0;b<g;b++)e[A+b]=o[_+b];return}if(g===1){for(b=0;b<x;b++)e[A+b]=e[C+b];e[A+x]=o[_];return}for(var M=r,D,E,N;;){D=0,E=0,N=!1;do if(t(e[C],o[_])<0){if(e[A++]=e[C++],E++,D=0,--x===0){N=!0;break}}else if(e[A++]=o[_++],D++,E=0,--g===1){N=!0;break}while((D|E)<M);if(N)break;do{if(D=e0(e[C],o,_,g,0,t),D!==0){for(b=0;b<D;b++)e[A+b]=o[_+b];if(A+=D,_+=D,g-=D,g<=1){N=!0;break}}if(e[A++]=e[C++],--x===0){N=!0;break}if(E=Jy(o[_],e,C,x,0,t),E!==0){for(b=0;b<E;b++)e[A+b]=e[C+b];if(A+=E,C+=E,x-=E,x===0){N=!0;break}}if(e[A++]=o[_++],--g===1){N=!0;break}M--}while(D>=Ru||E>=Ru);if(N)break;M<0&&(M=0),M+=2}if(r=M,r<1&&(r=1),g===1){for(b=0;b<x;b++)e[A+b]=e[C+b];e[A+x]=o[_]}else{if(g===0)throw new Error;for(b=0;b<g;b++)e[A+b]=o[_+b]}}function v(p,g,y,x){var b=0;for(b=0;b<x;b++)o[b]=e[y+b];var _=p+g-1,C=x-1,A=y+x-1,M=0,D=0;if(e[A--]=e[_--],--g===0){for(M=A-(x-1),b=0;b<x;b++)e[M+b]=o[b];return}if(x===1){for(A-=g,_-=g,D=A+1,M=_+1,b=g-1;b>=0;b--)e[D+b]=e[M+b];e[A]=o[C];return}for(var E=r;;){var N=0,O=0,L=!1;do if(t(o[C],e[_])<0){if(e[A--]=e[_--],N++,O=0,--g===0){L=!0;break}}else if(e[A--]=o[C--],O++,N=0,--x===1){L=!0;break}while((N|O)<E);if(L)break;do{if(N=g-e0(o[C],e,p,g,g-1,t),N!==0){for(A-=N,_-=N,g-=N,D=A+1,M=_+1,b=N-1;b>=0;b--)e[D+b]=e[M+b];if(g===0){L=!0;break}}if(e[A--]=o[C--],--x===1){L=!0;break}if(O=x-Jy(e[_],o,0,x,x-1,t),O!==0){for(A-=O,C-=O,x-=O,D=A+1,M=C+1,b=0;b<O;b++)e[D+b]=o[M+b];if(x<=1){L=!0;break}}if(e[A--]=e[_--],--g===0){L=!0;break}E--}while(N>=Ru||O>=Ru);if(L)break;E<0&&(E=0),E+=2}if(r=E,r<1&&(r=1),x===1){for(A-=g,_-=g,D=A+1,M=_+1,b=g-1;b>=0;b--)e[D+b]=e[M+b];e[A]=o[C]}else{if(x===0)throw new Error;for(M=A-(x-1),b=0;b<x;b++)e[M+b]=o[b]}}return{mergeRuns:l,forceMergeRuns:c,pushRun:s}}function Kd(e,t,r,n){r||(r=0),n||(n=e.length);var i=n-r;if(!(i<2)){var a=0;if(i<bA){a=wA(e,r,n,t),_A(e,r,n,r+a,t);return}var o=iV(e,t),s=rV(i);do{if(a=wA(e,r,n,t),a<s){var l=i;l>s&&(l=s),_A(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 kA=!1;function t0(){kA||(kA=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function SA(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var aV=(function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=SA}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,Kd(n,SA)},e.prototype._updateAndAddDisplayable=function(t,r,n){if(!(t.ignore&&!n)){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath();if(t.ignoreClip)r=null;else if(i){r?r=r.slice():r=[];for(var a=i,o=t;a;)a.parent=o,a.updateTransform(),r.push(a),o=a,a=a.getClipPath()}if(t.childrenRef){for(var s=t.childrenRef(),l=0;l<s.length;l++){var c=s[l];t.__dirty&&(c.__dirty|=Hr),this._updateAndAddDisplayable(c,r,n)}t.__dirty=0}else{var f=t;r&&r.length?f.__clipPaths=r:f.__clipPaths&&f.__clipPaths.length>0&&(f.__clipPaths=[]),isNaN(f.z)&&(t0(),f.z=0),isNaN(f.z2)&&(t0(),f.z2=0),isNaN(f.zlevel)&&(t0(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,r,n);var v=t.getTextGuideLine();v&&this._updateAndAddDisplayable(v,r,n);var p=t.getTextContent();p&&this._updateAndAddDisplayable(p,r,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=rt(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})(),Zd;Zd=je.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function Hs(){return new Date().getTime()}var oV=(function(e){pe(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=Hs()-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&&(Zd(n),!r._paused&&r.update())}Zd(n)},t.prototype.start=function(){this._running||(this._time=Hs(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Hs(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Hs()-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 nm(r,n.loop);return this.addAnimator(i),i},t})(Xn),sV=300,r0=je.domSupported,n0=(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=Te(e,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:e,touch:t,pointer:n}})(),CA={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},TA=!1;function i0(e){var t=e.pointerType;return t==="pen"||t==="touch"}function lV(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 a0(e){e&&(e.zrByTouch=!0)}function uV(e,t){return cn(e.dom,new cV(e,t),!0)}function AA(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 cV=(function(){function e(t,r){this.stopPropagation=_r,this.stopImmediatePropagation=_r,this.preventDefault=_r,this.type=r.type,this.target=this.currentTarget=t.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return e})(),Ln={mousedown:function(e){e=cn(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=cn(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=cn(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=cn(this.dom,e);var t=e.toElement||e.relatedTarget;AA(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){TA=!0,e=cn(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){TA||(e=cn(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=cn(this.dom,e),a0(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Ln.mousemove.call(this,e),Ln.mousedown.call(this,e)},touchmove:function(e){e=cn(this.dom,e),a0(e),this.handler.processGesture(e,"change"),Ln.mousemove.call(this,e)},touchend:function(e){e=cn(this.dom,e),a0(e),this.handler.processGesture(e,"end"),Ln.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<sV&&Ln.click.call(this,e)},pointerdown:function(e){Ln.mousedown.call(this,e)},pointermove:function(e){i0(e)||Ln.mousemove.call(this,e)},pointerup:function(e){Ln.mouseup.call(this,e)},pointerout:function(e){i0(e)||Ln.mouseout.call(this,e)}};U(["click","dblclick","contextmenu"],function(e){Ln[e]=function(t){t=cn(this.dom,t),this.trigger(e,t)}});var o0={pointermove:function(e){i0(e)||o0.mousemove.call(this,e)},pointerup:function(e){o0.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 fV(e,t){var r=t.domHandlers;je.pointerEventsSupported?U(n0.pointer,function(n){Qd(t,n,function(i){r[n].call(e,i)})}):(je.touchEventsSupported&&U(n0.touch,function(n){Qd(t,n,function(i){r[n].call(e,i),lV(t)})}),U(n0.mouse,function(n){Qd(t,n,function(i){i=Ky(i),t.touching||r[n].call(e,i)})}))}function dV(e,t){je.pointerEventsSupported?U(CA.pointer,r):je.touchEventsSupported||U(CA.mouse,r);function r(n){function i(a){a=Ky(a),AA(e,a.target)||(a=uV(e,a),t.domHandlers[n].call(e,a))}Qd(t,n,i,{capture:!0})}}function Qd(e,t,r,n){e.mounted[t]=r,e.listenerOpts[t]=n,Y7(e.domTarget,t,r,n)}function s0(e){var t=e.mounted;for(var r in t)t.hasOwnProperty(r)&&X7(e.domTarget,r,t[r],e.listenerOpts[r]);e.mounted={}}var DA=(function(){function e(t,r){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=r}return e})(),hV=(function(e){pe(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 DA(r,Ln),r0&&(i._globalHandlerScope=new DA(document,o0)),fV(i,i._localHandlerScope),i}return t.prototype.dispose=function(){s0(this._localHandlerScope),r0&&s0(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,r0&&+this.__pointerCapturing^+r){this.__pointerCapturing=r;var n=this._globalHandlerScope;r?dV(this,n):s0(n)}},t})(Xn);var Jd={},MA={};function pV(e){delete MA[e]}function vV(e){if(!e)return!1;if(typeof e=="string")return Of(e,1)<im;if(e.colorStops){for(var t=e.colorStops,r=0,n=t.length,i=0;i<n;i++)r+=Of(t[i].color,1);return r/=n,r<im}return!1}var gV=(function(){function e(t,r,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=r,this.id=t;var a=new aV,o=n.renderer||"canvas";Jd[o]||(o=xt(Jd)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new Jd[o](r,a,n,t),l=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var c=!je.node&&!je.worker&&!l?new hV(s.getViewportRoot(),s.root):null,f=n.useCoarsePointer,h=f==null||f==="auto"?je.touchEventsSupported:!!f,v=44,p;h&&(p=Ue(n.pointerSize,v)),this.handler=new mA(a,s,c,s.root,p),this.animation=new oV({stage:{update:l?null:function(){return i._flush(!0)}}}),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=vV(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||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(t){var r,n=Hs();this._needsRefresh&&(r=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(r=!0,this.refreshHoverImmediately());var i=Hs();r?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-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._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},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 Ot&&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,pV(this.id))},e})();function EA(e,t){var r=new gV(Kk(),e,t);return MA[r.id]=r,r}function mV(e,t){Jd[e]=t}var LA="";typeof navigator<"u"&&(LA=navigator.platform||"");var Vs="rgba(0, 0, 0, 0.2)";const yV={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Vs,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Vs,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Vs,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Vs,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Vs,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Vs,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:LA.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 xV=Ge();function bV(e,t,r){var n=xV.get(t);if(!n)return r;var i=n(e);return i?r.concat(i):r}var eh,Ou,IA,PA="\0_ec_inner",wV=1,l0=(function(e){pe(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 Ct(a),this._locale=new Ct(o),this._optionManager=s},t.prototype.setOption=function(r,n,i){var a=OA(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},t.prototype.resetOption=function(r,n){return this._resetOption(r,OA(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"?IA(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(c){i=!0,this._mergeOption(c,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=Ge(),c=n&&n.replaceMergeMainTypeMap;E8(this),U(r,function(h,v){h!=null&&(ot.hasClass(v)?v&&(s.push(v),l.set(v,!0)):i[v]=i[v]==null?qe(h):Ze(i[v],h,!0))}),c&&c.each(function(h,v){ot.hasClass(v)&&!l.get(v)&&(s.push(v),l.set(v,!0))}),ot.topologicalTravel(s,ot.getAllClassMainTypes(),f,this);function f(h){var v=bV(this,h,hr(r[h])),p=a.get(h),g=p?c&&c.get(h)?"replaceMerge":"normalMerge":"replaceAll",y=XB(p,v,g);t6(y,h,ot),i[h]=null,a.set(h,null),o.set(h,0);var x=[],b=[],_=0,C;U(y,function(A,M){var D=A.existing,E=A.newOption;if(!E)D&&(D.mergeOption({},this),D.optionUpdated({},!1));else{var N=h==="series",O=ot.getClass(h,A.keyInfo.subType,!N);if(!O)return;if(h==="tooltip"){if(C)return;C=!0}if(D&&D.constructor===O)D.name=A.keyInfo.name,D.mergeOption(E,this),D.optionUpdated(E,!1);else{var L=ue({componentIndex:M},A.keyInfo);D=new O(E,this,this,L),ue(D,L),A.brandNew&&(D.__requireNewView=!0),D.init(E,this,this),D.optionUpdated(null,!0)}}D?(x.push(D.option),b.push(D),_++):(x.push(void 0),b.push(void 0))},this),i[h]=x,a.set(h,b),o.set(h,_),h==="series"&&eh(this)}this._seriesIndices||eh(this)},t.prototype.getOption=function(){var r=qe(this.option);return U(r,function(n,i){if(ot.hasClass(i)){for(var a=hr(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!su(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[PA],r},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(hr(i),function(c){s[c]&&l.push(s[c])})):a!=null?l=NA("id",a,s):o!=null?l=NA("name",o,s):l=Ft(s,function(c){return!!c}),RA(l,r)},t.prototype.findComponents=function(r){var n=r.query,i=r.mainType,a=s(n),o=a?this.queryComponents(a):Ft(this._componentsMap.get(i),function(c){return!!c});return l(RA(o,r));function s(c){var f=i+"Index",h=i+"Id",v=i+"Name";return c&&(c[f]!=null||c[h]!=null||c[v]!=null)?{mainType:i,index:c[f],id:c[h],name:c[v]}:null}function l(c){return r.filter?Ft(c,r.filter):c}},t.prototype.eachComponent=function(r,n,i){var a=this._componentsMap;if($e(r)){var o=n,s=r;a.each(function(h,v){for(var p=0;h&&p<h.length;p++){var g=h[p];g&&s.call(o,v,g,g.componentIndex)}})}else for(var l=Ae(r)?a.get(r):Pe(r)?this.findComponents(r):null,c=0;l&&c<l.length;c++){var f=l[c];f&&n.call(i,f,f.componentIndex)}},t.prototype.getSeriesByName=function(r){var n=Jn(r,null);return Ft(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 Ft(this._componentsMap.get("series"),function(n){return!!n&&n.subType===r})},t.prototype.getSeries=function(){return Ft(this._componentsMap.get("series"),function(r){return!!r})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(r,n){Ou(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){Ou(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 Ou(this),this._seriesIndicesMap.get(r.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(r,n){Ou(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=Ge(i)},t.prototype.restoreData=function(r){eh(this);var n=this._componentsMap,i=[];n.each(function(a,o){ot.hasClass(o)&&i.push(o)}),ot.topologicalTravel(i,ot.getAllClassMainTypes(),function(a){U(n.get(a),function(o){o&&(a!=="series"||!_V(o,r))&&o.restoreData()})})},t.internalField=(function(){eh=function(r){var n=r._seriesIndices=[];U(r._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),r._seriesIndicesMap=Ge(n)},Ou=function(r){},IA=function(r,n){r.option={},r.option[PA]=wV,r._componentsMap=Ge({series:[]}),r._componentsCount=Ge();var i=n.aria;Pe(i)&&i.enabled==null&&(i.enabled=!0),kV(n,r._theme.option),Ze(n,yV,!1),r._mergeOption(n,null)}})(),t})(Ct);function _V(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 kV(e,t){var r=e.color&&!e.colorLayer;U(t,function(n,i){i==="colorLayer"&&r||ot.hasClass(i)||(typeof n=="object"?e[i]=e[i]?Ze(e[i],n,!1):qe(n):e[i]==null&&(e[i]=n))})}function NA(e,t,r){if(ve(t)){var n=Ge();return U(t,function(a){if(a!=null){var o=Jn(a,null);o!=null&&n.set(a,!0)}}),Ft(r,function(a){return a&&n.get(a[e])})}else{var i=Jn(t,null);return Ft(r,function(a){return a&&i!=null&&a[e]===i})}}function RA(e,t){return t.hasOwnProperty("subType")?Ft(e,function(r){return r&&r.subType===t.subType}):e}function OA(e){var t=Ge();return e&&U(hr(e.replaceMerge),function(r){t.set(r,!0)}),{replaceMergeMainTypeMap:t}}Cn(l0,Cy);var SV=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],zA=(function(){function e(t){U(SV,function(r){this[r]=ht(t[r],t)},this)}return e})(),CV=/^(min|max)?(.+)$/,TV=(function(){function e(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return e.prototype.setOption=function(t,r,n){t&&(U(hr(t.series),function(o){o&&o.data&&wr(o.data)&&Eg(o.data)}),U(hr(t.dataset),function(o){o&&o.source&&wr(o.source)&&Eg(o.source)})),t=qe(t);var i=this._optionBackup,a=AV(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=[],qe(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=qe(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,c=i.length;l<c;l++)DV(i[l].query,r,n)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!EV(o,this._currentMediaIndices)&&(s=Te(o,function(f){return qe(f===-1?a.option:i[f].option)})),this._currentMediaIndices=o,s},e})();function AV(e,t,r){var n=[],i,a,o=e.baseOption,s=e.timeline,l=e.options,c=e.media,f=!!e.media,h=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((h||f)&&(e.options=e.media=null),a=e),f&&ve(c)&&U(c,function(p){p&&p.option&&(p.query?n.push(p):i||(i=p))}),v(a),U(l,function(p){return v(p)}),U(n,function(p){return v(p.option)});function v(p){U(t,function(g){g(p,r)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:i,mediaList:n}}function DV(e,t,r){var n={width:t,height:r,aspectratio:t/r},i=!0;return U(e,function(a,o){var s=o.match(CV);if(!(!s||!s[1]||!s[2])){var l=s[1],c=s[2].toLowerCase();MV(n[c],a,l)||(i=!1)}}),i}function MV(e,t,r){return r==="min"?e>=t:r==="max"?e<=t:e===t}function EV(e,t){return e.join(",")===t.join(",")}var In=U,zu=Pe,jA=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function u0(e){var t=e&&e.itemStyle;if(t)for(var r=0,n=jA.length;r<n;r++){var i=jA[r],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?Ze(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?Ze(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function tr(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,tt(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 ju(e){tr(e,"itemStyle"),tr(e,"lineStyle"),tr(e,"areaStyle"),tr(e,"label"),tr(e,"labelLine"),tr(e,"upperLabel"),tr(e,"edgeLabel")}function Mt(e,t){var r=zu(e)&&e[t],n=zu(r)&&r.textStyle;if(n)for(var i=0,a=f2.length;i<a;i++){var o=f2[i];n.hasOwnProperty(o)&&(r[o]=n[o])}}function fn(e){e&&(ju(e),Mt(e,"label"),e.emphasis&&Mt(e.emphasis,"label"))}function LV(e){if(zu(e)){u0(e),ju(e),Mt(e,"label"),Mt(e,"upperLabel"),Mt(e,"edgeLabel"),e.emphasis&&(Mt(e.emphasis,"label"),Mt(e.emphasis,"upperLabel"),Mt(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(u0(t),fn(t));var r=e.markLine;r&&(u0(r),fn(r));var n=e.markArea;n&&fn(n);var i=e.data;if(e.type==="graph"){i=i||e.nodes;var a=e.links||e.edges;if(a&&!wr(a))for(var o=0;o<a.length;o++)fn(a[o]);U(e.categories,function(c){ju(c)})}if(i&&!wr(i))for(var o=0;o<i.length;o++)fn(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)fn(s[o]);if(r=e.markLine,r&&r.data)for(var l=r.data,o=0;o<l.length;o++)ve(l[o])?(fn(l[o][0]),fn(l[o][1])):fn(l[o]);e.type==="gauge"?(Mt(e,"axisLabel"),Mt(e,"title"),Mt(e,"detail")):e.type==="treemap"?(tr(e.breadcrumb,"itemStyle"),U(e.levels,function(c){ju(c)})):e.type==="tree"&&ju(e.leaves)}}function Ci(e){return ve(e)?e:e?[e]:[]}function FA(e){return(ve(e)?e[0]:e)||{}}function IV(e,t){In(Ci(e.series),function(n){zu(n)&&LV(n)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),In(r,function(n){In(Ci(e[n]),function(i){i&&(Mt(i,"axisLabel"),Mt(i.axisPointer,"label"))})}),In(Ci(e.parallel),function(n){var i=n&&n.parallelAxisDefault;Mt(i,"axisLabel"),Mt(i&&i.axisPointer,"label")}),In(Ci(e.calendar),function(n){tr(n,"itemStyle"),Mt(n,"dayLabel"),Mt(n,"monthLabel"),Mt(n,"yearLabel")}),In(Ci(e.radar),function(n){Mt(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)}),In(Ci(e.geo),function(n){zu(n)&&(fn(n),In(Ci(n.regions),function(i){fn(i)}))}),In(Ci(e.timeline),function(n){fn(n),tr(n,"label"),tr(n,"itemStyle"),tr(n,"controlStyle",!0);var i=n.data;ve(i)&&U(i,function(a){Pe(a)&&(tr(a,"label"),tr(a,"itemStyle"))})}),In(Ci(e.toolbox),function(n){tr(n,"iconStyle"),In(n.feature,function(i){tr(i,"iconStyle")})}),Mt(FA(e.axisPointer),"label"),Mt(FA(e.tooltip).axisPointer,"label")}function PV(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 NV(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 BA(e){e&&U(RV,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var RV=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],OV=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],c0=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Fu(e){var t=e&&e.itemStyle;if(t)for(var r=0;r<c0.length;r++){var n=c0[r][1],i=c0[r][0];t[n]!=null&&(t[i]=t[n])}}function HA(e){e&&e.alignTo==="edge"&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function VA(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function zV(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus==null&&(e.emphasis.focus="adjacency"))}function $A(e,t){if(e)for(var r=0;r<e.length;r++)t(e[r]),e[r]&&$A(e[r].children,t)}function UA(e,t){IV(e,t),e.series=hr(e.series),U(e.series,function(r){if(Pe(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),HA(r.label);var i=r.data;if(i&&!wr(i))for(var a=0;a<i.length;a++)HA(i[a]);r.hoverOffset!=null&&(r.emphasis=r.emphasis||{},(r.emphasis.scaleSize=null)&&(r.emphasis.scaleSize=r.hoverOffset))}else if(n==="gauge"){var o=PV(r,"pointer.color");o!=null&&NV(r,"itemStyle.color",o)}else if(n==="bar"){Fu(r),Fu(r.backgroundStyle),Fu(r.emphasis);var i=r.data;if(i&&!wr(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(Fu(i[a]),Fu(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)),VA(r),$A(r.data,VA)}else n==="graph"||n==="sankey"?zV(r):n==="map"&&(r.mapType&&!r.map&&(r.map=r.mapType),r.mapLocation&&tt(r,r.mapLocation));r.hoverAnimation!=null&&(r.emphasis=r.emphasis||{},r.emphasis&&r.emphasis.scale==null&&(r.emphasis.scale=r.hoverAnimation)),BA(r)}}),e.dataRange&&(e.visualMap=e.dataRange),U(OV,function(r){var n=e[r];n&&(ve(n)||(n=[n]),U(n,function(i){BA(i)}))})}function jV(e){var t=Ge();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.length&&a.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),t.each(FV)}function FV(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(c,f,h){var v=o.get(t.stackedDimension,h);if(isNaN(v))return i;var p,g;s?g=o.getRawIndex(h):p=o.get(t.stackedByDimension,h);for(var y=NaN,x=r-1;x>=0;x--){var b=e[x];if(s||(g=b.data.rawIndexOf(b.stackedByDimension,p)),g>=0){var _=b.data.getByRawIndex(b.stackResultDimension,g);if(l==="all"||l==="positive"&&_>0||l==="negative"&&_<0||l==="samesign"&&v>=0&&_>0||l==="samesign"&&v<=0&&_<0){v=VB(v,_),y=_;break}}}return n[0]=v,n[1]=y,n})})}var Pn=(function(){function e(){this.group=new Ot,this.uid=Ad("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})();Lg(Pn),_f(Pn);var WA=bt(),GA={itemStyle:Wl(sC,!0),lineStyle:Wl(oC,!0)},BV={lineStyle:"stroke",itemStyle:"fill"};function YA(e,t){var r=e.visualStyleMapper||GA[t];return r||(console.warn("Unknown style type '"+t+"'."),GA.itemStyle)}function XA(e,t){var r=e.visualDrawType||BV[t];return r||(console.warn("Unknown style type '"+t+"'."),"fill")}var HV={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=e.getModel(n),a=YA(e,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=XA(e,n),c=o[l],f=$e(c)?c:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||h){var v=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[l]||(o[l]=v,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||$e(o.fill)?v:o.fill,o.stroke=o.stroke==="auto"||$e(o.stroke)?v:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!t.isSeriesFiltered(e)&&f)return r.setVisual("colorFromPalette",!1),{dataEach:function(p,g){var y=e.getDataParams(g),x=ue({},o);x[l]=f(y),p.setItemVisual(g,"style",x)}}}},Bu=new Ct,VV={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=YA(e,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Bu.option=l[n];var c=i(Bu),f=o.ensureUniqueItemVisual(s,"style");ue(f,c),Bu.option.decal&&(o.setItemVisual(s,"decal",Bu.option.decal),Bu.option.decal.dirty=!0),a in c&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},$V={performRawSeries:!0,overallReset:function(e){var t=Ge();e.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),WA(r).scope=a}}),e.eachSeries(function(r){if(!(r.isColorBySeries()||e.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=WA(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=XA(r,s);a.each(function(c){var f=a.getRawIndex(c);i[f]=c}),n.each(function(c){var f=i[c],h=a.getItemVisual(f,"colorFromPalette");if(h){var v=a.ensureUniqueItemVisual(f,"style"),p=n.getName(c)||c+"",g=n.count();v[l]=r.getColorFromPalette(p,o,g)}})}})}},th=Math.PI;function UV(e,t){t=t||{},tt(t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new Ot,n=new Rt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(n);var i=new dr({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 Rt({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 dd({shape:{startAngle:-th/2,endAngle:-th/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:th*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:th*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,c=(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:c,cy:f}),a.setShape({x:c-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 qA=(function(){function e(t,r,n,i){this._stageTaskMap=Ge(),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.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},e.prototype.restorePipelines=function(t){var r=this,n=r._pipelineMap=Ge();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.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="";gi(!(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,c){if(!(i.visualType&&i.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),h=f.seriesTaskMap,v=f.overallTask;if(v){var p,g=v.agentStubMap;g.each(function(x){s(i,x)&&(x.dirty(),p=!0)}),p&&v.dirty(),o.updatePayload(v,n);var y=o.getPerformArgs(v,i.block);g.each(function(x){x.perform(y)}),v.perform(y)&&(a=!0)}else h&&h.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,c){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(c.__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=Ge(),l=t.seriesType,c=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(f):l?n.eachRawSeriesByType(l,f):c&&c(n,i).each(f);function f(h){var v=h.uid,p=s.set(v,o&&o.get(v)||Iu({plan:qV,reset:KV,count:QV}));p.context={model:h,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(h,p)}},e.prototype._createOverallStageTask=function(t,r,n,i){var a=this,o=r.overallTask=r.overallTask||Iu({reset:WV});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=Ge(),c=t.seriesType,f=t.getTargetSeries,h=!0,v=!1,p="";gi(!t.createOnAllSeries,p),c?n.eachRawSeriesByType(c,g):f?f(n,i).each(g):(h=!1,U(n.getSeries(),g));function g(y){var x=y.uid,b=l.set(x,s&&s.get(x)||(v=!0,Iu({reset:GV,onDirty:XV})));b.context={model:y,overallProgress:h},b.agent=o,b.__block=h,a._pipe(y,b)}v&&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:JV(t)}),t.uid=Ad("stageHandler"),r&&(t.visualType=r),t},e})();function WV(e){e.overallReset(e.ecModel,e.api,e.payload)}function GV(e){return e.overallProgress&&YV}function YV(){this.agent.dirty(),this.getDownstream().dirty()}function XV(){this.agent&&this.agent.dirty()}function qV(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function KV(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=hr(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?Te(t,function(r,n){return KA(n)}):ZV}var ZV=KA(0);function KA(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 QV(e){return e.data.count()}function JV(e){rh=null;try{e(Hu,ZA)}catch{}return rh}var Hu={},ZA={},rh;QA(Hu,l0),QA(ZA,zA),Hu.eachSeriesByType=Hu.eachRawSeriesByType=function(e){rh=e},Hu.eachComponent=function(e){e.mainType==="series"&&e.subType&&(rh=e.subType)};function QA(e,t){for(var r in t.prototype)e[r]=_r}var JA=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const e$={color:JA,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],JA]};var rr="#B9B8CE",eD="#100C2A",nh=function(){return{axisLine:{lineStyle:{color:rr}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},tD=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],rD={darkMode:!0,color:tD,backgroundColor:eD,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:rr},pageTextStyle:{color:rr}},textStyle:{color:rr},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:rr}},dataZoom:{borderColor:"#71708A",textStyle:{color:rr},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:rr}},timeline:{lineStyle:{color:rr},label:{color:rr},controlStyle:{color:rr,borderColor:rr}},calendar:{itemStyle:{color:eD},dayLabel:{color:rr},monthLabel:{color:rr},yearLabel:{color:rr}},timeAxis:nh(),logAxis:nh(),valueAxis:nh(),categoryAxis:nh(),line:{symbol:"circle"},graph:{color:tD},gauge:{title:{color:rr},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:rr},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};rD.categoryAxis.splitLine.show=!1;var t$=(function(){function e(){}return e.prototype.normalizeQuery=function(t){var r={},n={},i={};if(Ae(t)){var a=Gn(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,c){for(var f=!1,h=0;h<o.length;h++){var v=o[h],p=c.lastIndexOf(v);if(p>0&&p===c.length-v.length){var g=c.slice(0,p);g!=="data"&&(r.mainType=g,r[v.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(c)&&(n[c]=l,f=!0),f||(i[c]=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,c=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(c,a,"name")&&f(c,a,"dataIndex")&&f(c,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,r.otherQuery,i,a));function f(h,v,p,g){return h[p]==null||v[g||p]===h[p]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e})(),f0=["symbol","symbolSize","symbolRotate","symbolOffset"],nD=f0.concat(["symbolKeepAspect"]),r$={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<f0.length;o++){var s=f0[o],l=e.get(s);$e(l)?(a=!0,i[s]=l):n[s]=l}if(n.symbol=n.symbol||e.defaultSymbol,r.setVisual(ue({legendIcon:e.legendIcon||n.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},n)),t.isSeriesFiltered(e))return;var c=xt(i);function f(h,v){for(var p=e.getRawValue(v),g=e.getDataParams(v),y=0;y<c.length;y++){var x=c[y];h.setItemVisual(v,x,i[x](p,g))}}return{dataEach:a?f:null}}},n$={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<nD.length;s++){var l=nD[s],c=o.getShallow(l,!0);c!=null&&i.setItemVisual(a,l,c)}}return{dataEach:r.hasItemOption?n:null}}};function i$(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 iD(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 Vu(e,t,r){for(var n;e&&!(t(e)&&(n=e,r));)e=e.__hostTarget||e.parent;return n}var a$=Math.round(Math.random()*9),o$=typeof Object.defineProperty=="function",s$=(function(){function e(){this._id="__ec_inner_"+a$++}return e.prototype.get=function(t){return this._guard(t)[this._id]},e.prototype.set=function(t,r){var n=this._guard(t);return o$?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 Co(e){return isFinite(e)}function l$(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=Co(n)?n:0,i=Co(i)?i:1,a=Co(a)?a:0,o=Co(o)?o:0;var s=e.createLinearGradient(n,a,i,o);return s}function u$(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=Co(o)?o:.5,s=Co(s)?s:.5,l=l>=0&&Co(l)?l:.5;var c=e.createRadialGradient(o,s,0,o,s,l);return c}function d0(e,t,r){for(var n=t.type==="radial"?u$(e,t,r):l$(e,t,r),i=t.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function c$(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 ih(e){return parseInt(e,10)}function ah(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]||ih(s[n])||ih(e.style[n]))-(ih(s[a])||0)-(ih(s[o])||0)|0}function f$(e,t){return!e||e==="solid"||!(t>0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:lt(e)?[e]:ve(e)?e:null}function aD(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&f$(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(r){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(r=Te(r,function(a){return a/i}),n/=i)}return[r,n]}var d$=new oo(!0);function oh(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function oD(e){return typeof e=="string"&&e!=="none"}function sh(e){var t=e.fill;return t!=null&&t!=="none"}function sD(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 lD(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 h0(e,t,r){var n=aS(t.image,t.__image,r);if(kf(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)*sF),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function h$(e,t,r,n){var i,a=oh(r),o=sh(r),s=r.strokePercent,l=s<1,c=!t.path;(!t.silent||l)&&c&&t.createPathProxy();var f=t.path||d$,h=t.__dirty;if(!n){var v=r.fill,p=r.stroke,g=o&&!!v.colorStops,y=a&&!!p.colorStops,x=o&&!!v.image,b=a&&!!p.image,_=void 0,C=void 0,A=void 0,M=void 0,D=void 0;(g||y)&&(D=t.getBoundingRect()),g&&(_=h?d0(e,v,D):t.__canvasFillGradient,t.__canvasFillGradient=_),y&&(C=h?d0(e,p,D):t.__canvasStrokeGradient,t.__canvasStrokeGradient=C),x&&(A=h||!t.__canvasFillPattern?h0(e,v,t):t.__canvasFillPattern,t.__canvasFillPattern=A),b&&(M=h||!t.__canvasStrokePattern?h0(e,p,t):t.__canvasStrokePattern,t.__canvasStrokePattern=A),g?e.fillStyle=_:x&&(A?e.fillStyle=A:o=!1),y?e.strokeStyle=C:b&&(M?e.strokeStyle=M:a=!1)}var E=t.getGlobalScale();f.setScale(E[0],E[1],t.segmentIgnoreThreshold);var N,O;e.setLineDash&&r.lineDash&&(i=aD(t),N=i[0],O=i[1]);var L=!0;(c||h&xs)&&(f.setDPR(e.dpr),l?f.setContext(null):(f.setContext(e),L=!1),f.reset(),t.buildPath(f,t.shape,n),f.toStatic(),t.pathUpdated()),L&&f.rebuildPath(e,l?s:1),N&&(e.setLineDash(N),e.lineDashOffset=O),n||(r.strokeFirst?(a&&lD(e,r),o&&sD(e,r)):(o&&sD(e,r),a&&lD(e,r))),N&&e.setLineDash([])}function p$(e,t,r){var n=t.__image=aS(r.image,t.__image,t,t.onload);if(!(!n||!kf(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 c=r.sx||0,f=r.sy||0;e.drawImage(n,c,f,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var c=r.sx,f=r.sy,h=o-c,v=s-f;e.drawImage(n,c,f,h,v,i,a,o,s)}else e.drawImage(n,i,a,o,s)}}function v$(e,t,r){var n,i=r.text;if(i!=null&&(i+=""),i){e.font=r.font||Wa,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var a=void 0,o=void 0;e.setLineDash&&r.lineDash&&(n=aD(t),a=n[0],o=n[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),r.strokeFirst?(oh(r)&&e.strokeText(i,r.x,r.y),sh(r)&&e.fillText(i,r.x,r.y)):(sh(r)&&e.fillText(i,r.x,r.y),oh(r)&&e.strokeText(i,r.x,r.y)),a&&e.setLineDash([])}}var uD=["shadowBlur","shadowOffsetX","shadowOffsetY"],cD=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function fD(e,t,r,n,i){var a=!1;if(!n&&(r=r||{},t===r))return!1;if(n||t.opacity!==r.opacity){Mr(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?eo.opacity:o}(n||t.blend!==r.blend)&&(a||(Mr(e,i),a=!0),e.globalCompositeOperation=t.blend||eo.blend);for(var s=0;s<uD.length;s++){var l=uD[s];(n||t[l]!==r[l])&&(a||(Mr(e,i),a=!0),e[l]=e.dpr*(t[l]||0))}return(n||t.shadowColor!==r.shadowColor)&&(a||(Mr(e,i),a=!0),e.shadowColor=t.shadowColor||eo.shadowColor),a}function dD(e,t,r,n,i){var a=$u(t,i.inHover),o=n?null:r&&$u(r,i.inHover)||{};if(a===o)return!1;var s=fD(e,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(Mr(e,i),s=!0),oD(a.fill)&&(e.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(Mr(e,i),s=!0),oD(a.stroke)&&(e.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(Mr(e,i),s=!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var l=a.lineWidth,c=l/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==c&&(s||(Mr(e,i),s=!0),e.lineWidth=c)}for(var f=0;f<cD.length;f++){var h=cD[f],v=h[0];(n||a[v]!==o[v])&&(s||(Mr(e,i),s=!0),e[v]=a[v]||h[1])}return s}function g$(e,t,r,n,i){return fD(e,$u(t,i.inHover),r&&$u(r,i.inHover),n,i)}function hD(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 m$(e,t,r){for(var n=!1,i=0;i<e.length;i++){var a=e[i];n=n||a.isZeroArea(),hD(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}r.allClipped=n}function y$(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 pD=1,vD=2,gD=3,mD=4;function x$(e){var t=sh(e),r=oh(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 Mr(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function $u(e,t){return t&&e.__hoverStyle||e.style}function yD(e,t){To(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function To(e,t,r,n){var i=t.transform;if(!t.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){t.__dirty&=~Hr,t.__isRendered=!1;return}var a=t.__clipPaths,o=r.prevElClipPaths,s=!1,l=!1;if((!o||c$(a,o))&&(o&&o.length&&(Mr(e,r),e.restore(),l=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),a&&a.length&&(Mr(e,r),e.save(),m$(a,e,r),s=!0),r.prevElClipPaths=a),r.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var c=r.prevEl;c||(l=s=!0);var f=t instanceof at&&t.autoBatch&&x$(t.style);s||y$(i,c.transform)?(Mr(e,r),hD(e,t)):f||Mr(e,r);var h=$u(t,r.inHover);t instanceof at?(r.lastDrawType!==pD&&(l=!0,r.lastDrawType=pD),dD(e,t,c,l,r),(!f||!r.batchFill&&!r.batchStroke)&&e.beginPath(),h$(e,t,h,f),f&&(r.batchFill=h.fill||"",r.batchStroke=h.stroke||"")):t instanceof Kf?(r.lastDrawType!==gD&&(l=!0,r.lastDrawType=gD),dD(e,t,c,l,r),v$(e,t,h)):t instanceof Zi?(r.lastDrawType!==vD&&(l=!0,r.lastDrawType=vD),g$(e,t,c,l,r),p$(e,t,h)):t.getTemporalDisplayables&&(r.lastDrawType!==mD&&(l=!0,r.lastDrawType=mD),b$(e,t,r)),f&&n&&Mr(e,r),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),r.prevEl=t,t.__dirty=0,t.__isRendered=!0}function b$(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},o,s;for(o=t.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),To(e,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var c=0,f=i.length;c<f;c++){var l=i[c];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),To(e,l,a,c===f-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var p0=new s$,xD=new Gl(100),bD=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function v0(e,t){if(e==="none")return null;var r=t.getDevicePixelRatio(),n=t.getZr(),i=n.painter.type==="svg";e.dirty&&p0.delete(e);var a=p0.get(e);if(a)return a;var o=tt(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,p0.set(e,s),e.dirty=!1,s;function l(c){for(var f=[r],h=!0,v=0;v<bD.length;++v){var p=o[bD[v]];if(p!=null&&!ve(p)&&!Ae(p)&&!lt(p)&&typeof p!="boolean"){h=!1;break}f.push(p)}var g;if(h){g=f.join(",")+(i?"-svg":"");var y=xD.get(g);y&&(i?c.svgElement=y:c.image=y)}var x=_D(o.dashArrayX),b=w$(o.dashArrayY),_=wD(o.symbol),C=_$(x),A=kD(b),M=!i&&ss.createCanvas(),D=i&&{tag:"g",attrs:{},key:"dcl",children:[]},E=O(),N;M&&(M.width=E.width*r,M.height=E.height*r,N=M.getContext("2d")),L(),h&&xD.put(g,M||D),c.image=M,c.svgElement=D,c.svgWidth=E.width,c.svgHeight=E.height;function O(){for(var R=1,j=0,H=C.length;j<H;++j)R=l2(R,C[j]);for(var W=1,j=0,H=_.length;j<H;++j)W=l2(W,_[j].length);R*=W;var K=A*C.length*_.length;return{width:Math.max(1,Math.min(R,o.maxTileWidth)),height:Math.max(1,Math.min(K,o.maxTileHeight))}}function L(){N&&(N.clearRect(0,0,M.width,M.height),o.backgroundColor&&(N.fillStyle=o.backgroundColor,N.fillRect(0,0,M.width,M.height)));for(var R=0,j=0;j<b.length;++j)R+=b[j];if(R<=0)return;for(var H=-A,W=0,K=0,Q=0;H<E.height;){if(W%2===0){for(var re=K/2%_.length,X=0,$=0,I=0;X<E.width*2;){for(var z=0,j=0;j<x[Q].length;++j)z+=x[Q][j];if(z<=0)break;if($%2===0){var Y=(1-o.symbolSize)*.5,F=X+x[Q][$]*Y,ne=H+b[W]*Y,oe=x[Q][$]*o.symbolSize,le=b[W]*o.symbolSize,Me=I/2%_[re].length;we(F,ne,oe,le,_[re][Me])}X+=x[Q][$],++I,++$,$===x[Q].length&&($=0)}++Q,Q===x.length&&(Q=0)}H+=b[W],++K,++W,W===b.length&&(W=0)}function we(De,_e,Ce,Ve,Xt){var wt=i?1:r,Ur=ko(Xt,De*wt,_e*wt,Ce*wt,Ve*wt,o.color,o.symbolKeepAspect);if(i){var vr=n.painter.renderOneToVNode(Ur);vr&&D.children.push(vr)}else yD(N,Ur)}}}}function wD(e){if(!e||e.length===0)return[["rect"]];if(Ae(e))return[[e]];for(var t=!0,r=0;r<e.length;++r)if(!Ae(e[r])){t=!1;break}if(t)return wD([e]);for(var n=[],r=0;r<e.length;++r)Ae(e[r])?n.push([e[r]]):n.push(e[r]);return n}function _D(e){if(!e||e.length===0)return[[0,0]];if(lt(e)){var t=Math.ceil(e);return[[t,t]]}for(var r=!0,n=0;n<e.length;++n)if(!lt(e[n])){r=!1;break}if(r)return _D([e]);for(var i=[],n=0;n<e.length;++n)if(lt(e[n])){var t=Math.ceil(e[n]);i.push([t,t])}else{var t=Te(e[n],function(s){return Math.ceil(s)});t.length%2===1?i.push(t.concat(t)):i.push(t)}return i}function w$(e){if(!e||typeof e=="object"&&e.length===0)return[0,0];if(lt(e)){var t=Math.ceil(e);return[t,t]}var r=Te(e,function(n){return Math.ceil(n)});return e.length%2?r.concat(r):r}function _$(e){return Te(e,function(t){return kD(t)})}function kD(e){for(var t=0,r=0;r<e.length;++r)t+=e[r];return e.length%2===1?t*2:t}function k$(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=v0(s,t)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=v0(i,t)}}})}var Nn=new Xn,SD={};function S$(e,t){SD[e]=t}function C$(e){return SD[e]}var T$=1,A$=800,D$=900,M$=1e3,E$=2e3,L$=5e3,CD=1e3,I$=1100,g0=2e3,TD=3e3,P$=4e3,lh=4500,N$=4600,R$=5e3,O$=6e3,AD=7e3,z$={PROCESSOR:{FILTER:M$,SERIES_FILTER:A$,STATISTIC:L$},VISUAL:{LAYOUT:CD,PROGRESSIVE_LAYOUT:I$,GLOBAL:g0,CHART:TD,POST_CHART_LAYOUT:N$,COMPONENT:P$,BRUSH:R$,CHART_ITEM:lh,ARIA:O$,DECAL:AD}},nr="__flagInMainProcess",Er="__pendingUpdate",m0="__needsUpdateStatus",DD=/^[a-zA-Z0-9_]+$/,y0="__connectUpdateStatus",MD=0,j$=1,F$=2;function ED(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(this.isDisposed()){this.id;return}return ID(this,e,t)}}function LD(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ID(this,e,t)}}function ID(e,t,r){return r[0]=r[0]&&r[0].toLowerCase(),Xn.prototype[t].apply(e,r)}var PD=(function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(Xn),ND=PD.prototype;ND.on=LD("on"),ND.off=LD("off");var $s,x0,uh,la,b0,w0,_0,Uu,Wu,RD,OD,k0,zD,ch,jD,FD,dn,BD,HD=(function(e){pe(t,e);function t(r,n,i){var a=e.call(this,new t$)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},Ae(n)&&(n=VD[n]),a._dom=r;var o="canvas",s="auto",l=!1;i.ssr;var c=a._zr=EA(r,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:Ue(i.useDirtyRect,l),useCoarsePointer:Ue(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=Vy(ht(c.flush,c),17),n=qe(n),n&&UA(n,!0),a._theme=n,a._locale=k9(i.locale||UC),a._coordSysMgr=new fy;var f=a._api=jD(a);function h(v,p){return v.__prio-p.__prio}return Kd(dh,h),Kd(C0,h),a._scheduler=new qA(a,f,C0,dh),a._messageCenter=new PD,a._initEvents(),a.resize=ht(a.resize,a),c.animation.on("frame",a._onframe,a),RD(c,a),OD(c,a),Eg(a),a}return t.prototype._onframe=function(){if(!this._disposed){BD(this);var r=this._scheduler;if(this[Er]){var n=this[Er].silent;this[nr]=!0;try{$s(this),la.update.call(this,null,this[Er].updateParams)}catch(l){throw this[nr]=!1,this[Er]=null,l}this._zr.flush(),this[nr]=!1,this[Er]=null,Uu.call(this,n),Wu.call(this,n)}else if(r.unfinished){var i=T$,a=this._model,o=this._api;r.unfinished=!1;do{var s=+new Date;r.performSeriesTasks(a),r.performDataProcessorTasks(a),w0(this,a),r.performVisualTasks(a),ch(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>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[nr]){if(this._disposed){this.id;return}var a,o,s;if(Pe(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[nr]=!0,!this._model||n){var l=new TV(this._api),c=this._theme,f=this._model=new l0;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,c,this._locale,l)}this._model.setOption(r,{replaceMerge:o},T0);var h={seriesTransition:s,optionChanged:!0};if(i)this[Er]={silent:a,updateParams:h},this[nr]=!1,this.getZr().wakeUp();else{try{$s(this),la.update.call(this,null,h)}catch(v){throw this[Er]=null,this[nr]=!1,v}this._ssr||this._zr.flush(),this[Er]=null,this[nr]=!1,Uu.call(this,a),Wu.call(this,a)}}},t.prototype.setTheme=function(){},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||je.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(){if(je.svgSupported){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(c){var f=o._componentsMap[c.__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($D[i]){var l=s,c=s,f=-s,h=-s,v=[],p=r&&r.pixelRatio||this.getDevicePixelRatio();U(Yu,function(C,A){if(C.group===i){var M=n?C.getZr().painter.getSvgDom().innerHTML:C.renderToCanvas(qe(r)),D=C.getDom().getBoundingClientRect();l=a(D.left,l),c=a(D.top,c),f=o(D.right,f),h=o(D.bottom,h),v.push({dom:M,left:D.left,top:D.top})}}),l*=p,c*=p,f*=p,h*=p;var g=f-l,y=h-c,x=ss.createCanvas(),b=EA(x,{renderer:n?"svg":"canvas"});if(b.resize({width:g,height:y}),n){var _="";return U(v,function(C){var A=C.left-l,M=C.top-c;_+='<g transform="translate('+A+","+M+')">'+C.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 Rt({shape:{x:0,y:0,width:g,height:y},style:{fill:r.connectedBackgroundColor}})),U(v,function(C){var A=new Zi({style:{x:C.left*p-l,y:C.top*p-c,image:C.dom}});b.add(A)}),b.refreshImmediately(),x.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},t.prototype.convertToPixel=function(r,n){return b0(this,"convertToPixel",r,n)},t.prototype.convertFromPixel=function(r,n){return b0(this,"convertFromPixel",r,n)},t.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=Tm(i,r);return U(o,function(s,l){l.indexOf("Models")>=0&&U(s,function(c){var f=c.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(n);else if(l==="seriesModels"){var h=this._chartsMap[c.__viewId];h&&h.containPoint&&(a=a||h.containPoint(n,c))}},this)},this),!!a},t.prototype.getVisual=function(r,n){var i=this._model,a=Tm(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?i$(s,l,n):iD(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(B$,function(n){var i=function(a){var o=r.getModel(),s=a.target,l,c=n==="globalout";if(c?l={}:s&&Vu(s,function(g){var y=Qe(g);if(y&&y.dataIndex!=null){var x=y.dataModel||o.getSeriesByIndex(y.seriesIndex);return l=x&&x.getDataParams(y.dataIndex,y.dataType,s)||{},!0}else if(y.eventData)return l=ue({},y.eventData),!0},!0),l){var f=l.componentType,h=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=l.seriesIndex);var v=f&&h!=null&&o.getComponent(f,h),p=v&&r[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];l.event=a,l.type=n,r._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:v,view:p},r.trigger(n,l)}};i.zrEventfulCallAtLast=!0,r._zr.on(n,i,r)}),U(Gu,function(n,i){r._messageCenter.on(i,function(a){this.trigger(i,a)},r)}),U(["selectchanged"],function(n){r._messageCenter.on(n,function(i){this.trigger(n,i)},r)}),b7(this._messageCenter,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&&h2(this.getDom(),D0,"");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 Yu[n.id]},t.prototype.resize=function(r){if(!this[nr]){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[Er]&&(a==null&&(a=this[Er].silent),i=!0,this[Er]=null),this[nr]=!0;try{i&&$s(this),la.update.call(this,{type:"resize",animation:ue({duration:0},r&&r.animation)})}catch(o){throw this[nr]=!1,o}this[nr]=!1,Uu.call(this,a),Wu.call(this,a)}}},t.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(Pe(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!A0[r]){var i=A0[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=ue({},r);return n.type=Gu[r.type],n},t.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(Pe(n)||(n={silent:!!n}),!!fh[r.type]&&this._model){if(this[nr]){this._pendingActions.push(r);return}var i=n.silent;_0.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&je.browser.weChat&&this._throttledZrFlush(),Uu.call(this,i),Wu.call(this,i)}},t.prototype.updateLabelLayout=function(){Nn.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(){$s=function(h){var v=h._scheduler;v.restorePipelines(h._model),v.prepareStageTasks(),x0(h,!0),x0(h,!1),v.plan()},x0=function(h,v){for(var p=h._model,g=h._scheduler,y=v?h._componentsViews:h._chartsViews,x=v?h._componentsMap:h._chartsMap,b=h._zr,_=h._api,C=0;C<y.length;C++)y[C].__alive=!1;v?p.eachComponent(function(D,E){D!=="series"&&A(E)}):p.eachSeries(A);function A(D){var E=D.__requireNewView;D.__requireNewView=!1;var N="_ec_"+D.id+"_"+D.type,O=!E&&x[N];if(!O){var L=Gn(D.type),R=v?Pn.getClass(L.main,L.sub):un.getClass(L.sub);O=new R,O.init(p,_),x[N]=O,y.push(O),b.add(O.group)}D.__viewId=O.__id=N,O.__alive=!0,O.__model=D,O.group.__ecComponentInfo={mainType:D.mainType,index:D.componentIndex},!v&&g.prepareView(O,D,p,_)}for(var C=0;C<y.length;){var M=y[C];M.__alive?C++:(!v&&M.renderTask.dispose(),b.remove(M.group),M.dispose(p,_),y.splice(C,1),x[M.__id]===M&&delete x[M.__id],M.__id=M.group.__ecComponentInfo=null)}},uh=function(h,v,p,g,y){var x=h._model;if(x.setUpdatePayload(p),!g){U([].concat(h._componentsViews).concat(h._chartsViews),M);return}var b={};b[g+"Id"]=p[g+"Id"],b[g+"Index"]=p[g+"Index"],b[g+"Name"]=p[g+"Name"];var _={mainType:g,query:b};y&&(_.subType=y);var C=p.excludeSeriesId,A;C!=null&&(A=Ge(),U(hr(C),function(D){var E=Jn(D,null);E!=null&&A.set(E,!0)})),x&&x.eachComponent(_,function(D){var E=A&&A.get(D.id)!=null;if(!E)if(I2(p))if(D instanceof En)p.type===fo&&!p.notBlur&&!D.get(["emphasis","disabled"])&&m6(D,p,h._api);else{var N=Rm(D.mainType,D.componentIndex,p.name,h._api),O=N.focusSelf,L=N.dispatchers;p.type===fo&&O&&!p.notBlur&&Nm(D.mainType,D.componentIndex,h._api),L&&U(L,function(R){p.type===fo?fu(R):du(R)})}else jm(p)&&D instanceof En&&(b6(D,p,h._api),M2(D),dn(h))},h),x&&x.eachComponent(_,function(D){var E=A&&A.get(D.id)!=null;E||M(h[g==="series"?"_chartsMap":"_componentsMap"][D.__viewId])},h);function M(D){D&&D.__alive&&D[v]&&D[v](D.__model,x,h._api,p)}},la={prepareAndUpdate:function(h){$s(this),la.update.call(this,h,{optionChanged:h.newOption!=null})},update:function(h,v){var p=this._model,g=this._api,y=this._zr,x=this._coordSysMgr,b=this._scheduler;if(p){p.setUpdatePayload(h),b.restoreData(p,h),b.performSeriesTasks(p),x.create(p,g),b.performDataProcessorTasks(p,h),w0(this,p),x.update(p,g),r(p),b.performVisualTasks(p,h),k0(this,p,g,h,v);var _=p.get("backgroundColor")||"transparent",C=p.get("darkMode");y.setBackgroundColor(_),C!=null&&C!=="auto"&&y.setDarkMode(C),Nn.trigger("afterupdate",p,g)}},updateTransform:function(h){var v=this,p=this._model,g=this._api;if(p){p.setUpdatePayload(h);var y=[];p.eachComponent(function(b,_){if(b!=="series"){var C=v.getViewOfComponentModel(_);if(C&&C.__alive)if(C.updateTransform){var A=C.updateTransform(_,p,g,h);A&&A.update&&y.push(C)}else y.push(C)}});var x=Ge();p.eachSeries(function(b){var _=v._chartsMap[b.__viewId];if(_.updateTransform){var C=_.updateTransform(b,p,g,h);C&&C.update&&x.set(b.uid,1)}else x.set(b.uid,1)}),r(p),this._scheduler.performVisualTasks(p,h,{setDirty:!0,dirtyMap:x}),ch(this,p,g,h,{},x),Nn.trigger("afterupdate",p,g)}},updateView:function(h){var v=this._model;v&&(v.setUpdatePayload(h),un.markUpdateMethod(h,"updateView"),r(v),this._scheduler.performVisualTasks(v,h,{setDirty:!0}),k0(this,v,this._api,h,{}),Nn.trigger("afterupdate",v,this._api))},updateVisual:function(h){var v=this,p=this._model;p&&(p.setUpdatePayload(h),p.eachSeries(function(g){g.getData().clearAllVisual()}),un.markUpdateMethod(h,"updateVisual"),r(p),this._scheduler.performVisualTasks(p,h,{visualType:"visual",setDirty:!0}),p.eachComponent(function(g,y){if(g!=="series"){var x=v.getViewOfComponentModel(y);x&&x.__alive&&x.updateVisual(y,p,v._api,h)}}),p.eachSeries(function(g){var y=v._chartsMap[g.__viewId];y.updateVisual(g,p,v._api,h)}),Nn.trigger("afterupdate",p,this._api))},updateLayout:function(h){la.update.call(this,h)}},b0=function(h,v,p,g){if(h._disposed){h.id;return}for(var y=h._model,x=h._coordSysMgr.getCoordinateSystems(),b,_=Tm(y,p),C=0;C<x.length;C++){var A=x[C];if(A[v]&&(b=A[v](y,_,g))!=null)return b}},w0=function(h,v){var p=h._chartsMap,g=h._scheduler;v.eachSeries(function(y){g.updateStreamModes(y,p[y.__viewId])})},_0=function(h,v){var p=this,g=this.getModel(),y=h.type,x=h.escapeConnect,b=fh[y],_=b.actionInfo,C=(_.update||"update").split(":"),A=C.pop(),M=C[0]!=null&&Gn(C[0]);this[nr]=!0;var D=[h],E=!1;h.batch&&(E=!0,D=Te(h.batch,function(W){return W=tt(ue({},W),h),W.batch=null,W}));var N=[],O,L=jm(h),R=I2(h);if(R&&D2(this._api),U(D,function(W){if(O=b.action(W,p._model,p._api),O=O||ue({},W),O.type=_.event||O.type,N.push(O),R){var K=Am(h),Q=K.queryOptionMap,re=K.mainTypeSpecified,X=re?Q.keys()[0]:"series";uh(p,A,W,X),dn(p)}else L?(uh(p,A,W,"series"),dn(p)):M&&uh(p,A,W,M.main,M.sub)}),A!=="none"&&!R&&!L&&!M)try{this[Er]?($s(this),la.update.call(this,h),this[Er]=null):la[A].call(this,h)}catch(W){throw this[nr]=!1,W}if(E?O={type:_.event||y,escapeConnect:x,batch:N}:O=N[0],this[nr]=!1,!v){var j=this._messageCenter;if(j.trigger(O.type,O),L){var H={type:"selectchanged",escapeConnect:x,selected:w6(g),isFromClick:h.isFromClick||!1,fromAction:h.type,fromActionPayload:h};j.trigger(H.type,H)}}},Uu=function(h){for(var v=this._pendingActions;v.length;){var p=v.shift();_0.call(this,p,h)}},Wu=function(h){!h&&this.trigger("updated")},RD=function(h,v){h.on("rendered",function(p){v.trigger("rendered",p),h.animation.isFinished()&&!v[Er]&&!v._scheduler.unfinished&&!v._pendingActions.length&&v.trigger("finished")})},OD=function(h,v){h.on("mouseover",function(p){var g=p.target,y=Vu(g,zm);y&&(y6(y,p,v._api),dn(v))}).on("mouseout",function(p){var g=p.target,y=Vu(g,zm);y&&(x6(y,p,v._api),dn(v))}).on("click",function(p){var g=p.target,y=Vu(g,function(_){return Qe(_).dataIndex!=null},!0);if(y){var x=y.selected?"unselect":"select",b=Qe(y);v._api.dispatchAction({type:x,dataType:b.dataType,dataIndexInside:b.dataIndex,seriesIndex:b.seriesIndex,isFromClick:!0})}})};function r(h){h.clearColorPalette(),h.eachSeries(function(v){v.clearColorPalette()})}function n(h){var v=[],p=[],g=!1;if(h.eachComponent(function(_,C){var A=C.get("zlevel")||0,M=C.get("z")||0,D=C.getZLevelKey();g=g||!!D,(_==="series"?p:v).push({zlevel:A,z:M,idx:C.componentIndex,type:_,key:D})}),g){var y=v.concat(p),x,b;Kd(y,function(_,C){return _.zlevel===C.zlevel?_.z-C.z:_.zlevel-C.zlevel}),U(y,function(_){var C=h.getComponent(_.type,_.idx),A=_.zlevel,M=_.key;x!=null&&(A=Math.max(x,A)),M?(A===x&&M!==b&&A++,b=M):b&&(A===x&&A++,b=""),x=A,C.setZLevel(A)})}}k0=function(h,v,p,g,y){n(v),zD(h,v,p,g,y),U(h._chartsViews,function(x){x.__alive=!1}),ch(h,v,p,g,y),U(h._chartsViews,function(x){x.__alive||x.remove(v,p)})},zD=function(h,v,p,g,y,x){U(x||h._componentsViews,function(b){var _=b.__model;c(_,b),b.render(_,v,p,g),s(_,b),f(_,b)})},ch=function(h,v,p,g,y,x){var b=h._scheduler;y=ue(y||{},{updatedSeries:v.getSeries()}),Nn.trigger("series:beforeupdate",v,p,y);var _=!1;v.eachSeries(function(C){var A=h._chartsMap[C.__viewId];A.__alive=!0;var M=A.renderTask;b.updatePayload(M,g),c(C,A),x&&x.get(C.uid)&&M.dirty(),M.perform(b.getPerformArgs(M))&&(_=!0),A.group.silent=!!C.get("silent"),o(C,A),M2(C)}),b.unfinished=_||b.unfinished,Nn.trigger("series:layoutlabels",v,p,y),Nn.trigger("series:transition",v,p,y),v.eachSeries(function(C){var A=h._chartsMap[C.__viewId];s(C,A),f(C,A)}),a(h,v),Nn.trigger("series:afterupdate",v,p,y)},dn=function(h){h[m0]=!0,h.getZr().wakeUp()},BD=function(h){h[m0]&&(h.getZr().storage.traverse(function(v){mu(v)||i(v)}),h[m0]=!1)};function i(h){for(var v=[],p=h.currentStates,g=0;g<p.length;g++){var y=p[g];y==="emphasis"||y==="blur"||y==="select"||v.push(y)}h.selected&&h.states.select&&v.push("select"),h.hoverState===td&&h.states.emphasis?v.push("emphasis"):h.hoverState===ed&&h.states.blur&&v.push("blur"),h.useStates(v)}function a(h,v){var p=h._zr,g=p.storage,y=0;g.traverse(function(x){x.isGroup||y++}),y>v.get("hoverLayerThreshold")&&!je.node&&!je.worker&&v.eachSeries(function(x){if(!x.preventUsingHoverLayer){var b=h._chartsMap[x.__viewId];b.__alive&&b.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function o(h,v){var p=h.get("blendMode")||null;v.eachRendered(function(g){g.isGroup||(g.style.blend=p)})}function s(h,v){if(!h.preventAutoZ){var p=h.get("z")||0,g=h.get("zlevel")||0;v.eachRendered(function(y){return l(y,p,g,-1/0),!0})}}function l(h,v,p,g){var y=h.getTextContent(),x=h.getTextGuideLine(),b=h.isGroup;if(b)for(var _=h.childrenRef(),C=0;C<_.length;C++)g=Math.max(l(_[C],v,p,g),g);else h.z=v,h.zlevel=p,g=Math.max(h.z2,g);if(y&&(y.z=v,y.zlevel=p,isFinite(g)&&(y.z2=g+2)),x){var A=h.textGuideLineConfig;x.z=v,x.zlevel=p,isFinite(g)&&(x.z2=g+(A&&A.showAbove?1:-1))}return g}function c(h,v){v.eachRendered(function(p){if(!mu(p)){var g=p.getTextContent(),y=p.getTextGuideLine();p.stateTransition&&(p.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),y&&y.stateTransition&&(y.stateTransition=null),p.hasState()?(p.prevStates=p.currentStates,p.clearStates()):p.prevStates&&(p.prevStates=null)}})}function f(h,v){var p=h.getModel("stateAnimation"),g=h.isAnimationEnabled(),y=p.get("duration"),x=y>0?{duration:y,delay:p.get("delay"),easing:p.get("easing")}:null;v.eachRendered(function(b){if(b.states&&b.states.emphasis){if(mu(b))return;if(b instanceof at&&T6(b),b.__dirty){var _=b.prevStates;_&&b.useStates(_)}if(g){b.stateTransition=x;var C=b.getTextContent(),A=b.getTextGuideLine();C&&(C.stateTransition=x),A&&(A.stateTransition=x)}b.__dirty&&i(b)}})}jD=function(h){return new((function(v){pe(p,v);function p(){return v!==null&&v.apply(this,arguments)||this}return p.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},p.prototype.getComponentByElement=function(g){for(;g;){var y=g.__ecComponentInfo;if(y!=null)return h._model.getComponent(y.mainType,y.index);g=g.parent}},p.prototype.enterEmphasis=function(g,y){fu(g,y),dn(h)},p.prototype.leaveEmphasis=function(g,y){du(g,y),dn(h)},p.prototype.enterBlur=function(g){S2(g),dn(h)},p.prototype.leaveBlur=function(g){Im(g),dn(h)},p.prototype.enterSelect=function(g){C2(g),dn(h)},p.prototype.leaveSelect=function(g){T2(g),dn(h)},p.prototype.getModel=function(){return h.getModel()},p.prototype.getViewOfComponentModel=function(g){return h.getViewOfComponentModel(g)},p.prototype.getViewOfSeriesModel=function(g){return h.getViewOfSeriesModel(g)},p})(zA))(h)},FD=function(h){function v(p,g){for(var y=0;y<p.length;y++){var x=p[y];x[y0]=g}}U(Gu,function(p,g){h._messageCenter.on(g,function(y){if($D[h.group]&&h[y0]!==MD){if(y&&y.escapeConnect)return;var x=h.makeActionFromEvent(y),b=[];U(Yu,function(_){_!==h&&_.group===h.group&&b.push(_)}),v(b,MD),U(b,function(_){_[y0]!==j$&&_.dispatchAction(x)}),v(b,F$)}})})}})(),t})(Xn),S0=HD.prototype;S0.on=ED("on"),S0.off=ED("off"),S0.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 B$=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function bre(e){}var fh={},Gu={},C0=[],T0=[],dh=[],VD={},A0={},Yu={},$D={},H$=+new Date-0,D0="_echarts_instance_";function V$(e,t,r){var n=!(r&&r.ssr);if(n){var i=$$(e);if(i)return i}var a=new HD(e,t,r);return a.id="ec_"+H$++,Yu[a.id]=a,n&&h2(e,D0,a.id),FD(a),Nn.trigger("afterinit",a),a}function $$(e){return Yu[i6(e,D0)]}function UD(e,t){VD[e]=t}function WD(e){rt(T0,e)<0&&T0.push(e)}function GD(e,t){E0(C0,e,t,E$)}function U$(e){M0("afterinit",e)}function W$(e){M0("afterupdate",e)}function M0(e,t){Nn.on(e,t)}function Us(e,t,r){$e(t)&&(r=t,t="");var n=Pe(e)?e.type:[e,e={event:t}][0];e.event=(e.event||n).toLowerCase(),t=e.event,!Gu[t]&&(gi(DD.test(n)&&DD.test(t)),fh[n]||(fh[n]={action:r,actionInfo:e}),Gu[t]=n)}function G$(e,t){fy.register(e,t)}function Y$(e,t){E0(dh,e,t,CD,"layout")}function Ao(e,t){E0(dh,e,t,TD,"visual")}var YD=[];function E0(e,t,r,n,i){if(($e(t)||Pe(t))&&(r=t,t=n),!(rt(YD,r)>=0)){YD.push(r);var a=qA.wrapStageHandler(r,i);a.__prio=t,a.__raw=r,e.push(a)}}function XD(e,t){A0[e]=t}function X$(e,t,r){var n=C$("registerMap");n&&n(e,t,r)}var q$=G9;Ao(g0,HV),Ao(lh,VV),Ao(lh,$V),Ao(g0,r$),Ao(lh,n$),Ao(AD,k$),WD(UA),GD(D$,jV),XD("default",UV),Us({type:fo,event:fo,update:fo},_r),Us({type:nd,event:nd,update:nd},_r),Us({type:uu,event:uu,update:uu},_r),Us({type:id,event:id,update:id},_r),Us({type:cu,event:cu,update:cu},_r),UD("light",e$),UD("dark",rD);var qD=[],K$={registerPreprocessor:WD,registerProcessor:GD,registerPostInit:U$,registerPostUpdate:W$,registerUpdateLifecycle:M0,registerAction:Us,registerCoordinateSystem:G$,registerLayout:Y$,registerVisual:Ao,registerTransform:q$,registerLoading:XD,registerMap:X$,registerImpl:S$,PRIORITY:z$,ComponentModel:ot,ComponentView:Pn,SeriesModel:En,ChartView:un,registerComponentModel:function(e){ot.registerClass(e)},registerComponentView:function(e){Pn.registerClass(e)},registerSeriesModel:function(e){En.registerClass(e)},registerChartView:function(e){un.registerClass(e)},registerSubTypeDefaulter:function(e,t){ot.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){mV(e,t)}};function ua(e){if(ve(e)){U(e,function(t){ua(t)});return}rt(qD,e)>=0||(qD.push(e),$e(e)&&(e={install:e}),e.install(K$))}var Z$=(function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t})(ot),Q$=(function(){function e(){}return e.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},e.prototype.getCoordSysModel=function(){},e})(),L0=(function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Tn).models[0]},t.type="cartesian2dAxis",t})(ot);Cn(L0,Q$);var KD={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:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},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},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},J$=Ze({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},KD),I0=Ze({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},KD),eU=Ze({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},I0),tU=tt({logBase:10},I0);const rU={category:J$,value:I0,time:eU,log:tU};var nU=0,P0=(function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++nU}return e.createByAxisModel=function(t){var r=t.option,n=r.data,i=n&&Te(n,iU);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(!Ae(t)&&!n)return t;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=t,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)):r=NaN),r},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Ge(this.categories))},e})();function iU(e){return Pe(e)&&e.value!=null?e.value:e+""}var aU={value:1,category:1,time:1,log:1};function ZD(e,t,r,n){U(aU,function(i,a){var o=Ze(Ze({},rU[a],!0),n,!0),s=(function(l){pe(c,l);function c(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+a,f}return c.prototype.mergeDefaultAndTheme=function(f,h){var v=Lu(this),p=v?Fd(f):{},g=h.getTheme();Ze(f,g.get(a+"Axis")),Ze(f,this.getDefaultOption()),f.type=QD(f),v&&js(f,p,v)},c.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=P0.createByAxisModel(this))},c.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},c.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},c.type=t+"Axis."+a,c.defaultOption=o,c})(r);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",QD)}function QD(e){return e.type||(e.data?"category":"value")}var ni=(function(){function e(t){this._setting=t||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(t){return this._setting[t]},e.prototype.unionExtent=function(t){var r=this._extent;t[0]<r[0]&&(r[0]=t[0]),t[1]>r[1]&&(r[1]=t[1])},e.prototype.unionExtentFromData=function(t,r){this.unionExtent(t.getApproximateExtent(r))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,r){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(r)||(n[1]=r)},e.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e})();_f(ni);function N0(e){return e.type==="interval"||e.type==="log"}function oU(e,t,r,n){var i={},a=e[1]-e[0],o=i.interval=a2(a/t);r!=null&&o<r&&(o=i.interval=r),n!=null&&o>n&&(o=i.interval=n);var s=i.intervalPrecision=JD(o),l=i.niceTickExtent=[Dt(Math.ceil(e[0]/o)*o,s),Dt(Math.floor(e[1]/o)*o,s)];return sU(l,e),i}function R0(e){var t=Math.pow(10,Sm(e)),r=e/t;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Dt(r*t)}function JD(e){return Qn(e)+2}function eM(e,t,r){e[t]=Math.max(Math.min(e[t],r[1]),r[0])}function sU(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),eM(e,0,t),eM(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function hh(e,t){return e>=t[0]&&e<=t[1]}function ph(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function vh(e,t){return e*(t[1]-t[0])+t[0]}var O0=(function(e){pe(t,e);function t(r){var n=e.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new P0({})),ve(i)&&(i=new P0({categories:Te(i,function(a){return Pe(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(r){return r==null?NaN:Ae(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},t.prototype.contain=function(r){return r=this.parse(r),hh(r,this._extent)&&this._ordinalMeta.categories[r]!=null},t.prototype.normalize=function(r){return r=this._getTickNumber(this.parse(r)),ph(r,this._extent)},t.prototype.scale=function(r){return r=Math.round(vh(r,this._extent)),this.getRawOrdinalNumber(r)},t.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return 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=Math.min(s,n.length);o<l;++o){var c=n[o];i[o]=c,a[c]=o}for(var f=0;o<s;++o){for(;a[f]!=null;)f++;i.push(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(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(r,n){this.unionExtent(r.getApproximateExtent(n))},t.prototype.isInExtentRange=function(r){return r=this._getTickNumber(r),this._extent[0]<=r&&this._extent[1]>=r},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t})(ni);ni.registerClass(O0);var Do=Dt,Ws=(function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return t.prototype.parse=function(r){return r},t.prototype.contain=function(r){return hh(r,this._extent)},t.prototype.normalize=function(r){return ph(r,this._extent)},t.prototype.scale=function(r){return vh(r,this._extent)},t.prototype.setExtent=function(r,n){var i=this._extent;isNaN(r)||(i[0]=parseFloat(r)),isNaN(n)||(i[1]=parseFloat(n))},t.prototype.unionExtent=function(r){var n=this._extent;r[0]<n[0]&&(n[0]=r[0]),r[1]>n[1]&&(n[1]=r[1]),this.setExtent(n[0],n[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=JD(r)},t.prototype.getTicks=function(r){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;i[0]<a[0]&&(r?s.push({value:Do(a[0]-n,o)}):s.push({value:i[0]}));for(var c=a[0];c<=a[1]&&(s.push({value:c}),c=Do(c+n,o),c!==s[s.length-1].value);)if(s.length>l)return[];var f=s.length?s[s.length-1].value:a[1];return i[1]>f&&(r?s.push({value:Do(f+n,o)}):s.push({value:i[1]})),s},t.prototype.getMinorTicks=function(r){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;o<n.length;o++){for(var s=n[o],l=n[o-1],c=0,f=[],h=s.value-l.value,v=h/r;c<r-1;){var p=Do(l.value+(c+1)*v);p>a[0]&&p<a[1]&&f.push(p),c++}i.push(f)}return i},t.prototype.getLabel=function(r,n){if(r==null)return"";var i=n&&n.precision;i==null?i=Qn(r.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=Do(r.value,i,!0);return nT(a)},t.prototype.calcNiceTicks=function(r,n,i){r=r||5;var a=this._extent,o=a[1]-a[0];if(isFinite(o)){o<0&&(o=-o,a.reverse());var s=oU(a,r,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(r){var n=this._extent;if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);r.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval);var o=this._interval;r.fixMin||(n[0]=Do(Math.floor(n[0]/o)*o)),r.fixMax||(n[1]=Do(Math.ceil(n[1]/o)*o))},t.prototype.setNiceExtent=function(r,n){this._niceExtent=[r,n]},t.type="interval",t})(ni);ni.registerClass(Ws);var lU=function(e,t,r,n){for(;r<n;){var i=r+n>>>1;e[i][1]<t?r=i+1:n=i}return r},tM=(function(e){pe(t,e);function t(r){var n=e.call(this,r)||this;return n.type="time",n}return t.prototype.getLabel=function(r){var n=this.getSetting("useUTC");return Ld(r.value,YC[A9(Os(this._minLevelUnit))]||YC.second,n,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(r,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return D9(r,n,i,o,a)},t.prototype.getTicks=function(){var r=this._interval,n=this._extent,i=[];if(!r)return i;i.push({value:n[0],level:0});var a=this.getSetting("useUTC"),o=vU(this._minLevelUnit,this._approxInterval,a,n);return i=i.concat(o),i.push({value:n[1],level:0}),i},t.prototype.calcNiceExtent=function(r){var n=this._extent;if(n[0]===n[1]&&(n[0]-=ln,n[1]+=ln),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-ln}this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval)},t.prototype.calcNiceTicks=function(r,n,i){r=r||10;var a=this._extent,o=a[1]-a[0];this._approxInterval=o/r,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var s=gh.length,l=Math.min(lU(gh,this._approxInterval,0,s),s-1);this._interval=gh[l][1],this._minLevelUnit=gh[Math.max(l-1,0)][0]},t.prototype.parse=function(r){return lt(r)?r:+bi(r)},t.prototype.contain=function(r){return hh(this.parse(r),this._extent)},t.prototype.normalize=function(r){return ph(this.parse(r),this._extent)},t.prototype.scale=function(r){return vh(r,this._extent)},t.type="time",t})(Ws),gh=[["second",yy],["minute",xy],["hour",Tu],["quarter-day",Tu*6],["half-day",Tu*12],["day",ln*1.2],["half-week",ln*3.5],["week",ln*7],["month",ln*31],["quarter",ln*95],["half-year",GC/2],["year",GC]];function uU(e,t,r,n){var i=bi(t),a=bi(r),o=function(g){return KC(i,g,n)===KC(a,g,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},c=function(){return l()&&o("day")},f=function(){return c()&&o("hour")},h=function(){return f()&&o("minute")},v=function(){return h()&&o("second")},p=function(){return v()&&o("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return c();case"hour":return f();case"minute":return h();case"second":return v();case"millisecond":return p()}}function cU(e,t){return e/=ln,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function fU(e){var t=30*ln;return e/=t,e>6?6:e>3?3:e>2?2:1}function dU(e){return e/=Tu,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function rM(e,t){return e/=t?xy:yy,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function hU(e){return a2(e)}function pU(e,t,r){var n=new Date(e);switch(Os(t)){case"year":case"month":n[ZC(r)](0);case"day":n[QC(r)](1);case"hour":n[JC(r)](0);case"minute":n[eT(r)](0);case"second":n[tT(r)](0),n[rT(r)](0)}return n.getTime()}function vU(e,t,r,n){var i=1e4,a=XC,o=0;function s(L,R,j,H,W,K,Q){for(var re=new Date(R),X=R,$=re[H]();X<j&&X<=n[1];)Q.push({value:X}),$+=L,re[W]($),X=re.getTime();Q.push({value:X,notAdd:!0})}function l(L,R,j){var H=[],W=!R.length;if(!uU(Os(L),n[0],n[1],r)){W&&(R=[{value:pU(new Date(n[0]),L,r)},{value:n[1]}]);for(var K=0;K<R.length-1;K++){var Q=R[K].value,re=R[K+1].value;if(Q!==re){var X=void 0,$=void 0,I=void 0,z=!1;switch(L){case"year":X=Math.max(1,Math.round(t/ln/365)),$=wy(r),I=M9(r);break;case"half-year":case"quarter":case"month":X=fU(t),$=zs(r),I=ZC(r);break;case"week":case"half-week":case"day":X=cU(t),$=Id(r),I=QC(r),z=!0;break;case"half-day":case"quarter-day":case"hour":X=dU(t),$=Du(r),I=JC(r);break;case"minute":X=rM(t,!0),$=Pd(r),I=eT(r);break;case"second":X=rM(t,!1),$=Nd(r),I=tT(r);break;case"millisecond":X=hU(t),$=Rd(r),I=rT(r);break}s(X,Q,re,$,I,z,H),L==="year"&&j.length>1&&K===0&&j.unshift({value:j[0].value-X})}}for(var K=0;K<H.length;K++)j.push(H[K]);return H}}for(var c=[],f=[],h=0,v=0,p=0;p<a.length&&o++<i;++p){var g=Os(a[p]);if(T9(a[p])){l(a[p],c[c.length-1]||[],f);var y=a[p+1]?Os(a[p+1]):null;if(g!==y){if(f.length){v=h,f.sort(function(L,R){return L.value-R.value});for(var x=[],b=0;b<f.length;++b){var _=f[b].value;(b===0||f[b-1].value!==_)&&(x.push(f[b]),_>=n[0]&&_<=n[1]&&h++)}var C=(n[1]-n[0])/t;if(h>C*1.5&&v>C/1.5||(c.push(x),h>C||e===a[p]))break}f=[]}}}for(var A=Ft(Te(c,function(L){return Ft(L,function(R){return R.value>=n[0]&&R.value<=n[1]&&!R.notAdd})}),function(L){return L.length>0}),M=[],D=A.length-1,p=0;p<A.length;++p)for(var E=A[p],N=0;N<E.length;++N)M.push({value:E[N].value,level:D-p});M.sort(function(L,R){return L.value-R.value});for(var O=[],p=0;p<M.length;++p)(p===0||M[p].value!==M[p-1].value)&&O.push(M[p]);return O}ni.registerClass(tM);var nM=ni.prototype,Xu=Ws.prototype,gU=Dt,mU=Math.floor,yU=Math.ceil,mh=Math.pow,Rn=Math.log,z0=(function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="log",r.base=10,r._originalScale=new Ws,r._interval=0,r}return t.prototype.getTicks=function(r){var n=this._originalScale,i=this._extent,a=n.getExtent(),o=Xu.getTicks.call(this,r);return Te(o,function(s){var l=s.value,c=Dt(mh(this.base,l));return c=l===i[0]&&this._fixMin?yh(c,a[0]):c,c=l===i[1]&&this._fixMax?yh(c,a[1]):c,{value:c}},this)},t.prototype.setExtent=function(r,n){var i=Rn(this.base);r=Rn(Math.max(0,r))/i,n=Rn(Math.max(0,n))/i,Xu.setExtent.call(this,r,n)},t.prototype.getExtent=function(){var r=this.base,n=nM.getExtent.call(this);n[0]=mh(r,n[0]),n[1]=mh(r,n[1]);var i=this._originalScale,a=i.getExtent();return this._fixMin&&(n[0]=yh(n[0],a[0])),this._fixMax&&(n[1]=yh(n[1],a[1])),n},t.prototype.unionExtent=function(r){this._originalScale.unionExtent(r);var n=this.base;r[0]=Rn(r[0])/Rn(n),r[1]=Rn(r[1])/Rn(n),nM.unionExtent.call(this,r)},t.prototype.unionExtentFromData=function(r,n){this.unionExtent(r.getApproximateExtent(n))},t.prototype.calcNiceTicks=function(r){r=r||10;var n=this._extent,i=n[1]-n[0];if(!(i===1/0||i<=0)){var a=UB(i),o=r/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[Dt(yU(n[0]/a)*a),Dt(mU(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},t.prototype.calcNiceExtent=function(r){Xu.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},t.prototype.parse=function(r){return r},t.prototype.contain=function(r){return r=Rn(r)/Rn(this.base),hh(r,this._extent)},t.prototype.normalize=function(r){return r=Rn(r)/Rn(this.base),ph(r,this._extent)},t.prototype.scale=function(r){return r=vh(r,this._extent),mh(this.base,r)},t.type="log",t})(ni),iM=z0.prototype;iM.getMinorTicks=Xu.getMinorTicks,iM.getLabel=Xu.getLabel;function yh(e,t){return gU(e,Qn(t))}ni.registerClass(z0);var xU=(function(){function e(t,r,n){this._prepareParams(t,r,n)}return e.prototype._prepareParams=function(t,r,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&r.getNeedCrossZero&&r.getNeedCrossZero();var a=r.get("min",!0);a==null&&(a=r.get("startValue",!0));var o=this._modelMinRaw=a;$e(o)?this._modelMinNum=xh(t,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=xh(t,o));var s=this._modelMaxRaw=r.get("max",!0);if($e(s)?this._modelMaxNum=xh(t,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=xh(t,s)),i)this._axisDataLen=r.getCategories().length;else{var l=r.get("boundaryGap"),c=ve(l)?l:[l||0,l||0];typeof c[0]=="boolean"||typeof c[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Ui(c[0],1),Ui(c[1],1)]}},e.prototype.calculate=function(){var t=this._isOrdinal,r=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=t?null:n-r||Math.abs(r),s=this._modelMinRaw==="dataMin"?r:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,c=s!=null,f=l!=null;s==null&&(s=t?i?0:NaN:r-a[0]*o),l==null&&(l=t?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var h=bf(s)||bf(l)||t&&!i;this._needCrossZero&&(s>0&&l>0&&!c&&(s=0),s<0&&l<0&&!f&&(l=0));var v=this._determinedMin,p=this._determinedMax;return v!=null&&(s=v,c=!0),p!=null&&(l=p,f=!0),{min:s,max:l,minFixed:c,maxFixed:f,isBlank:h}},e.prototype.modifyDataMinMax=function(t,r){this[wU[t]]=r},e.prototype.setDeterminedMinMax=function(t,r){var n=bU[t];this[n]=r},e.prototype.freeze=function(){this.frozen=!0},e})(),bU={min:"_determinedMin",max:"_determinedMax"},wU={min:"_dataMin",max:"_dataMax"};function _U(e,t,r){var n=e.rawExtentInfo;return n||(n=new xU(e,t,r),e.rawExtentInfo=n,n)}function xh(e,t){return t==null?null:bf(t)?NaN:e.parse(t)}function aM(e,t){var r=e.type,n=_U(e,t,e.getExtent()).calculate();e.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&r==="time"){var s=HT("bar",o),l=!1;if(U(s,function(h){l=l||h.getBaseAxis()===t.axis}),l){var c=VT(s),f=kU(i,a,t,c);i=f.min,a=f.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function kU(e,t,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=e7(n,r.axis);if(o===void 0)return{min:e,max:t};var s=1/0;U(o,function(p){s=Math.min(p.offset,s)});var l=-1/0;U(o,function(p){l=Math.max(p.offset+p.width,l)}),s=Math.abs(s),l=Math.abs(l);var c=s+l,f=t-e,h=1-(s+l)/a,v=f/h-f;return t+=v*(l/c),e-=v*(s/c),{min:e,max:t}}function oM(e,t){var r=t,n=aM(e,r),i=n.extent,a=r.get("splitNumber");e instanceof z0&&(e.base=r.get("logBase"));var o=e.type,s=r.get("interval"),l=o==="interval"||o==="time";e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&e.setInterval&&e.setInterval(s)}function SU(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new O0({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new tM({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(ni.getClass(t)||Ws)}}function CU(e){var t=e.scale.getExtent(),r=t[0],n=t[1];return!(r>0&&n>0||r<0&&n<0)}function Gs(e){var t=e.getLabelModel().get("formatter"),r=e.type==="category"?e.scale.getExtent()[0]:null;return e.scale.type==="time"?(function(n){return function(i,a){return e.scale.getFormattedLabel(i,a,n)}})(t):Ae(t)?(function(n){return function(i){var a=e.scale.getLabel(i),o=n.replace("{value}",a??"");return o}})(t):$e(t)?(function(n){return function(i,a){return r!=null&&(a=i.value-r),n(j0(e,i),a,i.level!=null?{level:i.level}:null)}})(t):function(n){return e.scale.getLabel(n)}}function j0(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function TU(e){var t=e.model,r=e.scale;if(!(!t.get(["axisLabel","show"])||r.isBlank())){var n,i,a=r.getExtent();r instanceof O0?i=r.count():(n=r.getTicks(),i=n.length);var o=e.getLabelModel(),s=Gs(e),l,c=1;i>40&&(c=Math.ceil(i/40));for(var f=0;f<i;f+=c){var h=n?n[f]:{value:a[0]+f},v=s(h,f),p=o.getTextRect(v),g=AU(p,o.get("rotate")||0);l?l.union(g):l=g}return l}}function AU(e,t){var r=t*Math.PI/180,n=e.width,i=e.height,a=n*Math.abs(Math.cos(r))+Math.abs(i*Math.sin(r)),o=n*Math.abs(Math.sin(r))+Math.abs(i*Math.cos(r)),s=new nt(e.x,e.y,a,o);return s}function F0(e){var t=e.get("interval");return t??"auto"}function sM(e){return e.type==="category"&&F0(e.getLabelModel())===0}function DU(e,t){var r={};return U(e.mapDimensionsAll(t),function(n){r[FC(e,n)]=!0}),xt(r)}var MU=(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 Te(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Ft(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})(),B0=["x","y"];function lM(e){return e.type==="interval"||e.type==="time"}var EU=(function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=B0,r}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!lM(r)||!lM(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],c=a[1]-a[0];if(!(!l||!c)){var f=(s[0]-o[0])/l,h=(s[1]-o[1])/c,v=o[0]-i[0]*f,p=o[1]-a[0]*h,g=this._transform=[f,0,0,h,v,p];this._invTransform=Og([],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 nt(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 en(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]),c=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]),c),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(r,n){var i=[];if(this._invTransform)return en(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 nt(a,o,s,l)},t})(MU),qu=bt();function uM(e,t){var r=Te(t,function(n){return e.scale.parse(n)});return e.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function LU(e){var t=e.getLabelModel().get("customValues");if(t){var r=Gs(e),n=e.scale.getExtent(),i=uM(e,t),a=Ft(i,function(o){return o>=n[0]&&o<=n[1]});return{labels:Te(a,function(o){var s={value:o};return{formattedLabel:r(s),rawLabel:e.scale.getLabel(s),tickValue:o}})}}return e.type==="category"?PU(e):RU(e)}function IU(e,t){var r=e.getTickModel().get("customValues");if(r){var n=e.scale.getExtent(),i=uM(e,r);return{ticks:Ft(i,function(a){return a>=n[0]&&a<=n[1]})}}return e.type==="category"?NU(e,t):{ticks:Te(e.scale.getTicks(),function(a){return a.value})}}function PU(e){var t=e.getLabelModel(),r=cM(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function cM(e,t){var r=fM(e,"labels"),n=F0(t),i=dM(r,n);if(i)return i;var a,o;return $e(n)?a=vM(e,n):(o=n==="auto"?OU(e):n,a=pM(e,o)),hM(r,n,{labels:a,labelCategoryInterval:o})}function NU(e,t){var r=fM(e,"ticks"),n=F0(t),i=dM(r,n);if(i)return i;var a,o;if((!t.get("show")||e.scale.isBlank())&&(a=[]),$e(n))a=vM(e,n,!0);else if(n==="auto"){var s=cM(e,e.getLabelModel());o=s.labelCategoryInterval,a=Te(s.labels,function(l){return l.tickValue})}else o=n,a=pM(e,o,!0);return hM(r,n,{ticks:a,tickCategoryInterval:o})}function RU(e){var t=e.scale.getTicks(),r=Gs(e);return{labels:Te(t,function(n,i){return{level:n.level,formattedLabel:r(n,i),rawLabel:e.scale.getLabel(n),tickValue:n.value}})}}function fM(e,t){return qu(e)[t]||(qu(e)[t]=[])}function dM(e,t){for(var r=0;r<e.length;r++)if(e[r].key===t)return e[r].value}function hM(e,t,r){return e.push({key:t,value:r}),r}function OU(e){var t=qu(e).autoInterval;return t??(qu(e).autoInterval=e.calculateCategoryInterval())}function zU(e){var t=jU(e),r=Gs(e),n=(t.axisRotate-t.labelRotate)/180*Math.PI,i=e.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],c=e.dataToCoord(l+1)-e.dataToCoord(l),f=Math.abs(c*Math.cos(n)),h=Math.abs(c*Math.sin(n)),v=0,p=0;l<=a[1];l+=s){var g=0,y=0,x=zg(r({value:l}),t.font,"center","top");g=x.width*1.3,y=x.height*1.3,v=Math.max(v,g,7),p=Math.max(p,y,7)}var b=v/f,_=p/h;isNaN(b)&&(b=1/0),isNaN(_)&&(_=1/0);var C=Math.max(0,Math.floor(Math.min(b,_))),A=qu(e.model),M=e.getExtent(),D=A.lastAutoInterval,E=A.lastTickCount;return D!=null&&E!=null&&Math.abs(D-C)<=1&&Math.abs(E-o)<=1&&D>C&&A.axisExtent0===M[0]&&A.axisExtent1===M[1]?C=D:(A.lastTickCount=o,A.lastAutoInterval=C,A.axisExtent0=M[0],A.axisExtent1=M[1]),C}function jU(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 pM(e,t,r){var n=Gs(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),c=a[0],f=i.count();c!==0&&l>1&&f/l>2&&(c=Math.round(Math.ceil(c/l)*l));var h=sM(e),v=o.get("showMinLabel")||h,p=o.get("showMaxLabel")||h;v&&c!==a[0]&&y(a[0]);for(var g=c;g<=a[1];g+=l)y(g);p&&g-l!==a[1]&&y(a[1]);function y(x){var b={value:x};s.push(r?x:{formattedLabel:n(b),rawLabel:i.getLabel(b),tickValue:x})}return s}function vM(e,t,r){var n=e.scale,i=Gs(e),a=[];return U(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var gM=[0,1],FU=(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(t)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(t){return BB(t||this.scale.getExtent(),this._extent)},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._extent,i=this.scale;return t=i.normalize(t),this.onBand&&i.type==="ordinal"&&(n=n.slice(),mM(n,i.count())),km(t,gM,n,r)},e.prototype.coordToData=function(t,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),mM(n,i.count()));var a=km(t,n,gM,r);return this.scale.scale(a)},e.prototype.pointToData=function(t,r){},e.prototype.getTicksCoords=function(t){t=t||{};var r=t.tickModel||this.getTickModel(),n=IU(this,r),i=n.ticks,a=Te(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return BU(this,a,o,t.clamp),a},e.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),r=t.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=Te(n,function(a){return Te(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},e.prototype.getViewLabels=function(){return LU(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var t=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},e.prototype.calculateCategoryInterval=function(){return zU(this)},e})();function mM(e,t){var r=e[1]-e[0],n=t,i=r/n/2;e[0]+=i,e[1]-=i}function BU(e,t,r,n){var i=t.length;if(!e.onBand||r||!i)return;var a=e.getExtent(),o,s;if(i===1)t[0].coord=a[0],o=t[1]={coord:a[1],tickValue:t[0].tickValue};else{var l=t[i-1].tickValue-t[0].tickValue,c=(t[i-1].coord-t[0].coord)/l;U(t,function(p){p.coord-=c/2});var f=e.scale.getExtent();s=1+f[1]-t[i-1].tickValue,o={coord:t[i-1].coord+c*s,tickValue:f[1]+1},t.push(o)}var h=a[0]>a[1];v(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&v(a[0],t[0].coord)&&t.unshift({coord:a[0]}),v(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&v(o.coord,a[1])&&t.push({coord:a[1]});function v(p,g){return p=Dt(p),g=Dt(g),h?p>g:p<g}}var HU=(function(e){pe(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})(FU);function H0(e,t,r){r=r||{};var n=e.coordinateSystem,i=t.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,c=i.dim,f=n.getRect(),h=[f.x,f.x+f.width,f.y,f.y+f.height],v={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get("offset")||0,g=c==="x"?[h[2]-p,h[3]+p]:[h[0]-p,h[1]+p];if(o){var y=o.toGlobalCoord(o.dataToCoord(0));g[v.onZero]=Math.max(Math.min(y,g[1]),g[0])}a.position=[c==="y"?g[v[l]]:h[0],c==="x"?g[v[l]]:h[3]],a.rotation=Math.PI/2*(c==="x"?0:1);var x={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=x[s],a.labelOffset=o?g[v[s]]-g[v.onZero]:0,t.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),ls(r.labelInside,t.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var b=t.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-b:b,a.z2=1,a}function yM(e){return e.get("coordinateSystem")==="cartesian2d"}function xM(e){var t={xAxisModel:null,yAxisModel:null};return U(t,function(r,n){var i=n.replace(/Model$/,""),a=e.getReferringComponents(i,Tn).models[0];t[n]=a}),t}var V0=Math.log;function VU(e,t,r){var n=Ws.prototype,i=n.getTicks.call(r),a=n.getTicks.call(r,!0),o=i.length-1,s=n.getInterval.call(r),l=aM(e,t),c=l.extent,f=l.fixMin,h=l.fixMax;if(e.type==="log"){var v=V0(e.base);c=[V0(c[0])/v,V0(c[1])/v]}e.setExtent(c[0],c[1]),e.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var p=n.getExtent.call(e);f&&(c[0]=p[0]),h&&(c[1]=p[1]);var g=n.getInterval.call(e),y=c[0],x=c[1];if(f&&h)g=(x-y)/o;else if(f)for(x=c[0]+g*o;x<c[1]&&isFinite(x)&&isFinite(c[1]);)g=R0(g),x=c[0]+g*o;else if(h)for(y=c[1]-g*o;y>c[0]&&isFinite(y)&&isFinite(c[0]);)g=R0(g),y=c[1]-g*o;else{var b=e.getTicks().length-1;b>o&&(g=R0(g));var _=g*o;x=Math.ceil(c[1]/g)*g,y=Dt(x-_),y<0&&c[0]>=0?(y=0,x=Dt(_)):x>0&&c[1]<=0&&(x=0,y=-Dt(_))}var C=(i[0].value-a[0].value)/s,A=(i[o].value-a[o].value)/s;n.setExtent.call(e,y+g*C,x+g*A),n.setInterval.call(e,g),(C||A)&&n.setNiceExtent.call(e,y+g,x-g)}var $U=(function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=B0,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;this._updateScale(t,this.model);function i(o){var s,l=xt(o),c=l.length;if(c){for(var f=[],h=c-1;h>=0;h--){var v=+l[h],p=o[v],g=p.model,y=p.scale;N0(y)&&g.get("alignTicks")&&g.get("interval")==null?f.push(p):(oM(y,g),N0(y)&&(s=p))}f.length&&(s||(s=f.pop(),oM(s.scale,s.model)),U(f,function(x){VU(x.scale,x.model,s.scale)}))}}i(n.x),i(n.y);var a={};U(n.x,function(o){bM(n,"y",o,a)}),U(n.y,function(o){bM(n,"x",o,a)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var i=t.getBoxLayoutParams(),a=!n&&t.get("containLabel"),o=Eu(i,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(U(s,function(c){if(!c.model.get(["axisLabel","inside"])){var f=TU(c);if(f){var h=c.isHorizontal()?"height":"width",v=c.model.get(["axisLabel","margin"]);o[h]-=f[h]+v,c.position==="top"?o.y+=f.height+v:c.position==="left"&&(o.x+=f.width+v)}}}),l()),U(this._coordsList,function(c){c.calcAffineTransform()});function l(){U(s,function(c){var f=c.isHorizontal(),h=f?[0,o.width]:[0,o.height],v=c.inverse?1:0;c.setExtent(h[v],h[1-v]),UU(c,f?o.x:o.y)})}},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]}Pe(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",Tn).models[0],i=t.yAxisModel||r&&r.getReferringComponents("yAxis",Tn).models[0],a=t.gridModel,o=this._coordsList,s,l;if(r)s=r.coordinateSystem,rt(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 c=a.coordinateSystem;c===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",c("x"),this),r.eachComponent("yAxis",c("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,U(s.x,function(f,h){U(s.y,function(v,p){var g="x"+h+"y"+p,y=new EU(g);y.master=i,y.model=t,i._coordsMap[g]=y,i._coordsList.push(y),y.addAxis(f),y.addAxis(v)})});function c(f){return function(h,v){if($0(h,t)){var p=h.get("position");f==="x"?p!=="top"&&p!=="bottom"&&(p=o.bottom?"top":"bottom"):p!=="left"&&p!=="right"&&(p=o.left?"right":"left"),o[p]=!0;var g=new HU(f,SU(h),[0,0],h.get("type"),p),y=g.type==="category";g.onBand=y&&h.get("boundaryGap"),g.inverse=h.get("inverse"),h.axis=g,g.model=h,g.grid=a,g.index=v,a._axesList.push(g),s[f][v]=g,l[f]++}}}},e.prototype._updateScale=function(t,r){U(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),t.eachSeries(function(i){if(yM(i)){var a=xM(i),o=a.xAxisModel,s=a.yAxisModel;if(!$0(o,r)||!$0(s,r))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),c=i.getData(),f=l.getAxis("x"),h=l.getAxis("y");n(c,f),n(c,h)}},this);function n(i,a){U(DU(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},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);rt(r,a)<0&&r.push(a),rt(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)}),t.eachSeries(function(i){if(yM(i)){var a=xM(i),o=a.xAxisModel,s=a.yAxisModel,l=o.getCoordSysModel(),c=l.coordinateSystem;i.coordinateSystem=c.getCartesian(o.componentIndex,s.componentIndex)}}),n},e.dimensions=B0,e})();function $0(e,t){return e.getCoordSysModel()===t}function bM(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)wM(i[l])&&(a=i[l]);else for(var c in i)if(i.hasOwnProperty(c)&&wM(i[c])&&!n[f(i[c])]){a=i[c];break}a&&(n[f(a)]=!0);function f(h){return h.dim+"_"+h.index}}function wM(e){return e&&e.type!=="category"&&e.type!=="time"&&CU(e)}function UU(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}}var ca=Math.PI,fa=(function(){function e(t,r){this.group=new Ot,this.opt=r,this.axisModel=t,tt(r,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Ot({x:r.position[0],y:r.position[1],rotation:r.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(t){return!!_M[t]},e.prototype.add=function(t){_M[t](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(t,r,n){var i=i2(r-t),a,o;return Zf(i)?(o=n>0?"top":"bottom",a="center"):Zf(i-ca)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<ca?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})(),_M={axisLine:function(e,t,r,n){var i=t.get(["axisLine","show"]);if(i==="auto"&&e.handleAutoShown&&(i=e.handleAutoShown("axisLine")),!!i){var a=t.axis.getExtent(),o=n.transform,s=[a[0],0],l=[a[1],0],c=s[0]>l[0];o&&(en(s,s,o),en(l,l,o));var f=ue({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new _i({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});yu(h.shape,h.style.lineWidth),h.anid="line",r.add(h);var v=t.get(["axisLine","symbol"]);if(v!=null){var p=t.get(["axisLine","symbolSize"]);Ae(v)&&(v=[v,v]),(Ae(p)||lt(p))&&(p=[p,p]);var g=Vd(t.get(["axisLine","symbolOffset"])||0,p),y=p[0],x=p[1];U([{rotate:e.rotation+Math.PI/2,offset:g[0],r:0},{rotate:e.rotation-Math.PI/2,offset:g[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(b,_){if(v[_]!=="none"&&v[_]!=null){var C=ko(v[_],-y/2,-x/2,y,x,f.stroke,!0),A=b.r+b.offset,M=c?l:s;C.attr({rotation:b.rotate,x:M[0]+A*Math.cos(e.rotation),y:M[1]-A*Math.sin(e.rotation),silent:!0,z2:11}),r.add(C)}})}}},axisTickLabel:function(e,t,r,n){var i=YU(r,n,t,e),a=qU(r,n,t,e);if(GU(t,a,i),XU(r,n,t,e.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=D7(Te(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));L7(o)}},axisName:function(e,t,r,n){var i=ls(e.axisName,t.get("name"));if(i){var a=t.get("nameLocation"),o=e.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,c=t.axis.getExtent(),f=c[0]>c[1]?-1:1,h=[a==="start"?c[0]-f*l:a==="end"?c[1]+f*l:(c[0]+c[1])/2,SM(a)?e.labelOffset+o*l:0],v,p=t.get("nameRotate");p!=null&&(p=p*ca/180);var g;SM(a)?v=fa.innerTextLayout(e.rotation,p??e.rotation,o):(v=WU(e.rotation,a,p||0,c),g=e.axisNameAvailableWidth,g!=null&&(g=Math.abs(g/Math.sin(v.rotation)),!isFinite(g)&&(g=null)));var y=s.getFont(),x=t.get("nameTruncate",!0)||{},b=x.ellipsis,_=ls(e.nameTruncateMaxWidth,x.maxWidth,g),C=new dr({x:h[0],y:h[1],rotation:v.rotation,silent:fa.isLabelSilent(t),style:Ds(s,{text:i,font:y,overflow:"truncate",width:_,ellipsis:b,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||v.textAlign,verticalAlign:s.get("verticalAlign")||v.textVerticalAlign}),z2:1});if(bd({el:C,componentModel:t,itemName:i}),C.__fullText=i,C.anid="name",t.get("triggerEvent")){var A=fa.makeAxisEventDataBase(t);A.targetType="axisName",A.name=i,Qe(C).eventData=A}n.add(C),C.updateTransform(),r.add(C),C.decomposeTransform()}}};function WU(e,t,r,n){var i=i2(r-e),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return Zf(i-ca/2)?(o=l?"bottom":"top",a="center"):Zf(i-ca*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<ca*1.5&&i>ca/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function GU(e,t,r){if(!sM(e.axis)){var n=e.get(["axisLabel","showMinLabel"]),i=e.get(["axisLabel","showMaxLabel"]);t=t||[],r=r||[];var a=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],c=r[0],f=r[1],h=r[r.length-1],v=r[r.length-2];n===!1?(hn(a),hn(c)):kM(a,o)&&(n?(hn(o),hn(f)):(hn(a),hn(c))),i===!1?(hn(s),hn(h)):kM(l,s)&&(i?(hn(l),hn(v)):(hn(s),hn(h)))}}function hn(e){e&&(e.ignore=!0)}function kM(e,t){var r=e&&e.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(!(!r||!n)){var i=Pg([]);return Rg(i,i,-e.rotation),r.applyTransform(cs([],i,e.getLocalTransform())),n.applyTransform(cs([],i,t.getLocalTransform())),r.intersect(n)}}function SM(e){return e==="middle"||e==="center"}function CM(e,t,r,n,i){for(var a=[],o=[],s=[],l=0;l<e.length;l++){var c=e[l].coord;o[0]=c,o[1]=0,s[0]=c,s[1]=r,t&&(en(o,o,t),en(s,s,t));var f=new _i({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});yu(f.shape,f.style.lineWidth),f.anid=i+"_"+e[l].tickValue,a.push(f)}return a}function YU(e,t,r,n){var i=r.axis,a=r.getModel("axisTick"),o=a.get("show");if(o==="auto"&&n.handleAutoShown&&(o=n.handleAutoShown("axisTick")),!(!o||i.scale.isBlank())){for(var s=a.getModel("lineStyle"),l=n.tickDirection*a.get("length"),c=i.getTicksCoords(),f=CM(c,t.transform,l,tt(s.getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<f.length;h++)e.add(f[h]);return f}}function XU(e,t,r,n){var i=r.axis,a=r.getModel("minorTick");if(!(!a.get("show")||i.scale.isBlank())){var o=i.getMinorTicksCoords();if(o.length)for(var s=a.getModel("lineStyle"),l=n*a.get("length"),c=tt(s.getLineStyle(),tt(r.getModel("axisTick").getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])})),f=0;f<o.length;f++)for(var h=CM(o[f],t.transform,l,c,"minorticks_"+f),v=0;v<h.length;v++)e.add(h[v])}}function qU(e,t,r,n){var i=r.axis,a=ls(n.axisLabelShow,r.get(["axisLabel","show"]));if(!(!a||i.scale.isBlank())){var o=r.getModel("axisLabel"),s=o.get("margin"),l=i.getViewLabels(),c=(ls(n.labelRotate,o.get("rotate"))||0)*ca/180,f=fa.innerTextLayout(n.rotation,c,n.labelDirection),h=r.getCategories&&r.getCategories(!0),v=[],p=fa.isLabelSilent(r),g=r.get("triggerEvent");return U(l,function(y,x){var b=i.scale.type==="ordinal"?i.scale.getRawOrdinalNumber(y.tickValue):y.tickValue,_=y.formattedLabel,C=y.rawLabel,A=o;if(h&&h[b]){var M=h[b];Pe(M)&&M.textStyle&&(A=new Ct(M.textStyle,o,r.ecModel))}var D=A.getTextColor()||r.get(["axisLine","lineStyle","color"]),E=i.dataToCoord(b),N=A.getShallow("align",!0)||f.textAlign,O=Ue(A.getShallow("alignMinLabel",!0),N),L=Ue(A.getShallow("alignMaxLabel",!0),N),R=A.getShallow("verticalAlign",!0)||A.getShallow("baseline",!0)||f.textVerticalAlign,j=Ue(A.getShallow("verticalAlignMinLabel",!0),R),H=Ue(A.getShallow("verticalAlignMaxLabel",!0),R),W=new dr({x:E,y:n.labelOffset+n.labelDirection*s,rotation:f.rotation,silent:p,z2:10+(y.level||0),style:Ds(A,{text:_,align:x===0?O:x===l.length-1?L:N,verticalAlign:x===0?j:x===l.length-1?H:R,fill:$e(D)?D(i.type==="category"?C:i.type==="value"?b+"":b,x):D})});if(W.anid="label_"+b,bd({el:W,componentModel:r,itemName:_,formatterParamsExtra:{isTruncated:function(){return W.isTruncated},value:C,tickIndex:x}}),g){var K=fa.makeAxisEventDataBase(r);K.targetType="axisLabel",K.value=C,K.tickIndex=x,i.type==="category"&&(K.dataIndex=b),Qe(W).eventData=K}t.add(W),W.updateTransform(),v.push(W),e.add(W),W.decomposeTransform()}),v}}function KU(e,t){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return ZU(r,e,t),r.seriesInvolved&&JU(r,e),r}function ZU(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=Ku(s.model),c=e.coordSysAxesInfo[l]={};e.coordSysMap[l]=s;var f=s.model,h=f.getModel("tooltip",n);if(U(s.getAxes(),ut(y,!1,null)),s.getTooltipAxes&&n&&h.get("show")){var v=h.get("trigger")==="axis",p=h.get(["axisPointer","type"])==="cross",g=s.getTooltipAxes(h.get(["axisPointer","axis"]));(v||p)&&U(g.baseAxes,ut(y,p?"cross":!0,v)),p&&U(g.otherAxes,ut(y,"cross",!1))}function y(x,b,_){var C=_.model.getModel("axisPointer",i),A=C.get("show");if(!(!A||A==="auto"&&!x&&!G0(C))){b==null&&(b=C.get("triggerTooltip")),C=x?QU(_,h,i,t,x,b):C;var M=C.get("snap"),D=C.get("triggerEmphasis"),E=Ku(_.model),N=b||M||_.type==="category",O=e.axesInfo[E]={key:E,axis:_,coordSys:s,axisPointerModel:C,triggerTooltip:b,triggerEmphasis:D,involveSeries:N,snap:M,useHandle:G0(C),seriesModels:[],linkGroup:null};c[E]=O,e.seriesInvolved=e.seriesInvolved||N;var L=eW(a,_);if(L!=null){var R=o[L]||(o[L]={axesInfo:{}});R.axesInfo[E]=O,R.mapper=a[L].mapper,O.linkGroup=R}}}})}function QU(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(v){l[v]=qe(o.get(v))}),l.snap=e.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var c=l.label||(l.label={});if(c.show==null&&(c.show=!1),i==="cross"){var f=o.get(["label","show"]);if(c.show=f??!0,!a){var h=l.lineStyle=o.get("crossStyle");h&&tt(c,h.textStyle)}}return e.model.getModel("axisPointer",new Ct(l,r,n))}function JU(e,t){t.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||U(e.coordSysAxesInfo[Ku(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 eW(e,t){for(var r=t.model,n=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(U0(a[n+"AxisId"],r.id)||U0(a[n+"AxisIndex"],r.componentIndex)||U0(a[n+"AxisName"],r.name))return i}}function U0(e,t){return e==="all"||ve(e)&&rt(e,t)>=0||e===t}function tW(e){var t=W0(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=G0(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(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 W0(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Ku(e)]}function rW(e){var t=W0(e);return t&&t.axisPointerModel}function G0(e){return!!e.get(["handle","show"])}function Ku(e){return e.type+"||"+e.id}var TM={},AM=(function(e){pe(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&&tW(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=rW(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){TM[r]=n},t.getAxisPointerClass=function(r){return r&&TM[r]},t.type="axis",t})(Pn),Y0=bt();function nW(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(),c=i.getTicksCoords({tickModel:a,clamp:!0});if(c.length){var f=s.length,h=Y0(e).splitAreaColors,v=Ge(),p=0;if(h)for(var g=0;g<c.length;g++){var y=h.get(c[g].tickValue);if(y!=null){p=(y+(f-1)*g)%f;break}}var x=i.toGlobalCoord(c[0].coord),b=o.getAreaStyle();s=ve(s)?s:[s];for(var g=1;g<c.length;g++){var _=i.toGlobalCoord(c[g].coord),C=void 0,A=void 0,M=void 0,D=void 0;i.isHorizontal()?(C=x,A=l.y,M=_-C,D=l.height,x=C+M):(C=l.x,A=x,M=l.width,D=_-A,x=A+D);var E=c[g-1].tickValue;E!=null&&v.set(E,p),t.add(new Rt({anid:E!=null?"area_"+E:null,shape:{x:C,y:A,width:M,height:D},style:tt({fill:s[p]},b),autoBatch:!0,silent:!0})),p=(p+1)%f}Y0(e).splitAreaColors=v}}}function iW(e){Y0(e).splitAreaColors=null}var aW=["axisLine","axisTickLabel","axisName"],oW=["splitArea","splitLine","minorSplitLine"],DM=(function(e){pe(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 Ot,this.group.add(this._axisGroup),!!r.get("show")){var s=r.getCoordSysModel(),l=H0(s,r),c=new fa(r,ue({handleAutoShown:function(h){for(var v=s.coordinateSystem.getCartesians(),p=0;p<v.length;p++)if(N0(v[p].getOtherAxis(r.axis).scale))return!0;return!1}},l));U(aW,c.add,c),this._axisGroup.add(c.getGroup()),U(oW,function(h){r.get([h,"show"])&&sW[h](this,this._axisGroup,r,s)},this);var f=a&&a.type==="changeAxisOrder"&&a.isInitSort;f||Z2(o,this._axisGroup,r),e.prototype.render.call(this,r,n,i,a)}},t.prototype.remove=function(){iW(this)},t.type="cartesianAxis",t})(AM),sW={splitLine:function(e,t,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color"),l=a.get("showMinLine")!==!1,c=a.get("showMaxLine")!==!1;s=ve(s)?s:[s];for(var f=n.coordinateSystem.getRect(),h=i.isHorizontal(),v=0,p=i.getTicksCoords({tickModel:a}),g=[],y=[],x=o.getLineStyle(),b=0;b<p.length;b++){var _=i.toGlobalCoord(p[b].coord);if(!(b===0&&!l||b===p.length-1&&!c)){var C=p[b].tickValue;h?(g[0]=_,g[1]=f.y,y[0]=_,y[1]=f.y+f.height):(g[0]=f.x,g[1]=_,y[0]=f.x+f.width,y[1]=_);var A=v++%s.length,M=new _i({anid:C!=null?"line_"+C:null,autoBatch:!0,shape:{x1:g[0],y1:g[1],x2:y[0],y2:y[1]},style:tt({stroke:s[A]},x),silent:!0});yu(M.shape,x.lineWidth),t.add(M)}}}},minorSplitLine:function(e,t,r,n){var i=r.axis,a=r.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=n.coordinateSystem.getRect(),l=i.isHorizontal(),c=i.getMinorTicksCoords();if(c.length)for(var f=[],h=[],v=o.getLineStyle(),p=0;p<c.length;p++)for(var g=0;g<c[p].length;g++){var y=i.toGlobalCoord(c[p][g].coord);l?(f[0]=y,f[1]=s.y,h[0]=y,h[1]=s.y+s.height):(f[0]=s.x,f[1]=y,h[0]=s.x+s.width,h[1]=y);var x=new _i({anid:"minor_line_"+c[p][g].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]},style:v,silent:!0});yu(x.shape,v.lineWidth),t.add(x)}},splitArea:function(e,t,r,n){nW(e,t,r,n)}},MM=(function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="xAxis",t})(DM),lW=(function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=MM.type,r}return t.type="yAxis",t})(DM),uW=(function(e){pe(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 Rt({shape:r.coordinateSystem.getRect(),style:tt({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t})(Pn),EM={offset:0};function cW(e){e.registerComponentView(uW),e.registerComponentModel(Z$),e.registerCoordinateSystem("cartesian2d",$U),ZD(e,"x",L0,EM),ZD(e,"y",L0,EM),e.registerComponentView(MM),e.registerComponentView(lW),e.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}var LM=_i.prototype,X0=fd.prototype,IM=(function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e})();(function(e){pe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(IM);function q0(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var fW=(function(e){pe(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:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new IM},t.prototype.buildPath=function(r,n){q0(n)?LM.buildPath.call(this,r,n):X0.buildPath.call(this,r,n)},t.prototype.pointAt=function(r){return q0(this.shape)?LM.pointAt.call(this,r):X0.pointAt.call(this,r)},t.prototype.tangentAt=function(r){var n=this.shape,i=q0(n)?[n.x2-n.x1,n.y2-n.y1]:X0.tangentAt.call(this,r);return Vg(i,i)},t})(at),K0=["fromSymbol","toSymbol"];function PM(e){return"_"+e+"Type"}function NM(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=Py(i),c=Vd(o||0,l);return n+l+c+(a||"")+(s||"")}function RM(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=Py(i),c=Vd(o||0,l),f=ko(n,-l[0]/2+c[0],-l[1]/2+c[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 dW(e){var t=new fW({name:"line",subPixelOptimize:!0});return Z0(t.shape,e),t}function Z0(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 hW=(function(e){pe(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=dW(o);s.shape.percent=0,Vr(s,{shape:{percent:1}},a,n),this.add(s),U(K0,function(l){var c=RM(l,r,n);this.add(c),this[PM(l)]=NM(l,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:{}};Z0(l.shape,s),er(o,l,a,n),U(K0,function(c){var f=NM(c,r,n),h=PM(c);if(this[h]!==f){this.remove(this.childOfName(c));var v=RM(c,r,n);this.add(v)}this[h]=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,c=i&&i.selectLineStyle,f=i&&i.labelStatesModels,h=i&&i.emphasisDisabled,v=i&&i.focus,p=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(),c=g.getModel(["select","lineStyle"]).getLineStyle(),h=y.get("disabled"),v=y.get("focus"),p=y.get("blurScope"),f=go(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=c,U(K0,function(D){var E=this.childOfName(D);if(E){E.setColor(b),E.style.opacity=x.opacity;for(var N=0;N<Cr.length;N++){var O=Cr[N],L=o.getState(O);if(L){var R=L.style||{},j=E.ensureState(O),H=j.style||(j.style={});R.stroke!=null&&(H[E.__isEmptyBrush?"stroke":"fill"]=R.stroke),R.opacity!=null&&(H.opacity=R.opacity)}}E.markRedraw()}},this);var _=a.getRawValue(n);As(this,f,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(D,E){return a.getFormattedLabel(D,E,r.dataType)}},inheritColor:b||"#000",defaultOpacity:x.opacity,defaultText:(_==null?r.getName(n):isFinite(_)?Dt(_):_)+""});var C=this.getTextContent();if(C){var A=f.normal;C.__align=C.style.align,C.__verticalAlign=C.style.verticalAlign,C.__position=A.get("position")||"middle";var M=A.get("distance");ve(M)||(M=[M,M]),C.__labelDistance=M}this.setTextConfig({position:null,local:!0,inside:!1}),Ss(this,v,p,h)},t.prototype.highlight=function(){fu(this)},t.prototype.downplay=function(){du(this)},t.prototype.updateLayout=function(r,n){this.setLinePoints(r.getItemLayout(n))},t.prototype.setLinePoints=function(r){var n=this.childOfName("line");Z0(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 c=l.shape.percent,f=l.pointAt(0),h=l.pointAt(c),v=pS([],h,f);Vg(v,v);function p(L,R){var j=L.__specifiedRotation;if(j==null){var H=l.tangentAt(R);L.attr("rotation",(R===1?-1:1)*Math.PI/2-Math.atan2(H[1],H[0]))}else L.attr("rotation",j)}if(n&&(n.setPosition(f),p(n,0),n.scaleX=n.scaleY=o*c,n.markRedraw()),i&&(i.setPosition(h),p(i,1),i.scaleX=i.scaleY=o*c,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,C=c/2,A=l.tangentAt(C),M=[A[1],-A[0]],D=l.pointAt(C);M[1]>0&&(M[0]=-M[0],M[1]=-M[1]);var E=A[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var N=-Math.atan2(A[1],A[0]);h[0]<f[0]&&(N=Math.PI+N),a.rotation=N}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=v[0]*b+h[0],a.y=v[1]*_+h[1],g=v[0]>.8?"left":v[0]<-.8?"right":"center",y=v[1]>.8?"top":v[1]<-.8?"bottom":"middle";break;case"start":a.x=-v[0]*b+f[0],a.y=-v[1]*_+f[1],g=v[0]>.8?"right":v[0]<-.8?"left":"center",y=v[1]>.8?"bottom":v[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=b*E+f[0],a.y=f[1]+O,g=A[0]<0?"right":"left",a.originX=-b*E,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*E+h[0],a.y=h[1]+O,g=A[0]>=0?"right":"left",a.originX=b*E,a.originY=-O;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||y,align:a.__align||g})}},t})(Ot),pW=(function(){function e(t){this.group=new Ot,this._LineCtor=t||hW}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=OM(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=OM(t),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r){this._progressiveEls=[];function n(s){!s.isGroup&&!vW(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i<t.end;i++){var a=r.getItemLayout(i);if(Q0(a)){var o=new this._LineCtor(r,i,this._seriesScope);o.traverse(n),this.group.add(o),r.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(t){xu(this._progressiveEls||this.group,t)},e.prototype._doAdd=function(t,r,n){var i=t.getItemLayout(r);if(Q0(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(!Q0(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 vW(e){return e.animators&&e.animators.length>0}function OM(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:go(t)}}function zM(e){return isNaN(e[0])||isNaN(e[1])}function Q0(e){return e&&!zM(e[0])&&!zM(e[1])}var Mo=bt(),jM=qe,J0=ht,gW=(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 c={};this.makeElOption(c,a,t,r,n);var f=c.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var h=this._moveAnimation=this.determineAnimation(t,r);if(!s)s=this._group=new Ot,this.createPointerEl(s,c,t,r),this.createLabelEl(s,c,t,r),n.getZr().add(s);else{var v=ut(FM,r,h);this.updatePointerEl(s,c,v),this.updateLabelEl(s,c,v,r)}VM(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&&i.getBandWidth()>s)return!0;if(o){var l=W0(t).seriesDataCount,c=i.getExtent();return Math.abs(c[0]-c[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=Mo(t).pointerEl=new m8[a.type](jM(r.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,r,n,i){if(r.label){var a=Mo(t).labelEl=new dr(jM(r.label));t.add(a),HM(a,i)}},e.prototype.updatePointerEl=function(t,r,n){var i=Mo(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=Mo(t).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),HM(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=Km(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(c){pA(c.event)},onmousedown:J0(this._onHandleDragMove,this,0,0),drift:J0(this._onHandleDragMove,this),ondragend:J0(this._onHandleDragEnd,this)}),n.add(i)),VM(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");ve(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,YT(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},e.prototype._moveHandleToValue=function(t,r){FM(this._axisPointerModel,!r&&this._moveAnimation,this._handle,ex(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(ex(n),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(ex(i)),Mo(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),$y(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 FM(e,t,r,n){BM(Mo(r).lastProp,n)||(Mo(r).lastProp=n,t?er(r,n,e):(r.stopAnimation(),r.attr(n)))}function BM(e,t){if(Pe(e)&&Pe(t)){var r=!0;return U(t,function(n,i){r=r&&BM(e[i],n)}),!!r}else return e===t}function HM(e,t){e[t.get(["label","show"])?"show":"hide"]()}function ex(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function VM(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 mW(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 yW(e,t,r,n,i){var a=r.get("value"),o=$M(a,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=Od(s.get("padding")||0),c=s.getFont(),f=zg(o,c),h=i.position,v=f.width+l[1]+l[3],p=f.height+l[0]+l[2],g=i.align;g==="right"&&(h[0]-=v),g==="center"&&(h[0]-=v/2);var y=i.verticalAlign;y==="bottom"&&(h[1]-=p),y==="middle"&&(h[1]-=p/2),xW(h,v,p,n);var x=s.get("backgroundColor");(!x||x==="auto")&&(x=t.get(["axisLine","lineStyle","color"])),e.label={x:h[0],y:h[1],style:Ds(s,{text:o,font:c,fill:s.getTextColor(),padding:l,backgroundColor:x}),z2:10}}function xW(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 $M(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:j0(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};U(n,function(l){var c=r.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=c&&c.getDataParams(f);h&&s.seriesData.push(h)}),Ae(o)?a=o.replace("{value}",a):$e(o)&&(a=o(s))}return a}function UM(e,t,r){var n=us();return Rg(n,n,r.rotation),Ng(n,n,r.position),qm([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function bW(e,t,r,n,i,a){var o=fa.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),yW(t,n,i,a,{position:UM(n.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function wW(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function _W(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}var kW=(function(e){pe(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,c=a.get("type"),f=WM(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(c&&c!=="none"){var v=mW(a),p=SW[c](s,h,f);p.style=v,r.graphicKey=p.type,r.pointer=p}var g=H0(l.model,i);bW(n,r,g,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=H0(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=UM(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),c=WM(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[r.x,r.y];h[f]+=n[f],h[f]=Math.min(l[1],h[f]),h[f]=Math.max(l[0],h[f]);var v=(c[1]+c[0])/2,p=[v,v];p[f]=h[f];var g=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:r.rotation,cursorPoint:p,tooltipOption:g[f]}},t})(gW);function WM(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var SW={line:function(e,t,r){var n=wW([t,r[0]],[t,r[1]],GM(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=Math.max(1,e.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:_W([t-n/2,r[0]],[n,i],GM(e))}}};function GM(e){return e.dim==="x"?0:1}var CW=(function(e){pe(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:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",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:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t})(ot),Ti=bt(),TW=U;function YM(e,t,r){if(!je.node){var n=t.getZr();Ti(n).records||(Ti(n).records={}),AW(n,t);var i=Ti(n).records[e]||(Ti(n).records[e]={});i.handler=r}}function AW(e,t){if(Ti(e).initialized)return;Ti(e).initialized=!0,r("click",ut(XM,"click")),r("mousemove",ut(XM,"mousemove")),r("globalout",MW);function r(n,i){e.on(n,function(a){var o=EW(t);TW(Ti(e).records,function(s){s&&i(s,a,o.dispatchAction)}),DW(o.pendings,t)})}}function DW(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 MW(e,t,r){e.handler("leave",null,r)}function XM(e,t,r,n){t.handler(e,r,n)}function EW(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 tx(e,t){if(!je.node){var r=t.getZr(),n=(Ti(r).records||{})[e];n&&(Ti(r).records[e]=null)}}var LW=(function(e){pe(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";YM("axisPointer",i,function(s,l,c){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&c({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(r,n){tx("axisPointer",n)},t.prototype.dispose=function(r,n){tx("axisPointer",n)},t.type="axisPointer",t})(Pn);function qM(e,t){var r=[],n=e.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=co(a,e);if(o==null||o<0||ve(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 c=l.getBaseAxis(),f=l.getOtherAxis(c),h=f.dim,v=c.dim,p=h==="x"||h==="radius"?1:0,g=a.mapDimension(v),y=[];y[p]=a.get(g,o),y[1-p]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(y)||[]}else r=l.dataToPoint(a.getValues(Te(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 KM=bt();function IW(e,t,r){var n=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||ht(r.dispatchAction,r),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){bh(i)&&(i=qM({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=bh(i),c=a.axesInfo,f=s.axesInfo,h=n==="leave"||bh(i),v={},p={},g={list:[],map:{}},y={showPointer:ut(NW,p),showTooltip:ut(RW,g)};U(s.coordSysMap,function(b,_){var C=l||b.containPoint(i);U(s.coordSysAxesInfo[_],function(A,M){var D=A.axis,E=FW(c,A);if(!h&&C&&(!c||E)){var N=E&&E.value;N==null&&!l&&(N=D.pointToData(i)),N!=null&&ZM(A,N,y,!1,v)}})});var x={};return U(f,function(b,_){var C=b.linkGroup;C&&!p[_]&&U(C.axesInfo,function(A,M){var D=p[M];if(A!==b&&D){var E=D.value;C.mapper&&(E=b.axis.scale.parse(C.mapper(E,QM(A),QM(b)))),x[b.key]=E}})}),U(x,function(b,_){ZM(f[_],b,y,!0,v)}),OW(p,f,v),zW(g,i,e,o),jW(f,o,r),v}}function ZM(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=PW(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&ue(i,s[0]),!n&&e.snap&&a.containData(l)&&l!=null&&(t=l),r.showPointer(e,t,s),r.showTooltip(e,o,l)}}function PW(e,t){var r=t.axis,n=r.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return U(t.seriesModels,function(l,c){var f=l.getData().mapDimensionsAll(n),h,v;if(l.getAxisTooltipData){var p=l.getAxisTooltipData(f,e,r);v=p.dataIndices,h=p.nestestValue}else{if(v=l.getData().indicesOfNearest(f[0],e,r.type==="category"?.5:null),!v.length)return;h=l.getData().get(f[0],v[0])}if(!(h==null||!isFinite(h))){var g=e-h,y=Math.abs(g);y<=o&&((y<o||g>=0&&s<0)&&(o=y,s=g,i=h,a.length=0),U(v,function(x){a.push({seriesIndex:l.seriesIndex,dataIndexInside:x,dataIndex:l.getData().getRawIndex(x)})}))}}),{payloadBatch:a,snapToValue:i}}function NW(e,t,r,n){e[t.key]={value:r,payloadBatch:n}}function RW(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,c=Ku(l),f=e.map[c];f||(f=e.map[c]={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 OW(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 zW(e,t,r,n){if(bh(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 jW(e,t,r){var n=r.getZr(),i="axisPointerLastHighlights",a=KM(n)[i]||{},o=KM(n)[i]={};U(e,function(c,f){var h=c.axisPointerModel.option;h.status==="show"&&c.triggerEmphasis&&U(h.seriesDataIndices,function(v){var p=v.seriesIndex+" | "+v.dataIndex;o[p]=v})});var s=[],l=[];U(a,function(c,f){!o[f]&&l.push(c)}),U(o,function(c,f){!a[f]&&s.push(c)}),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 FW(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 QM(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 bh(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function JM(e){AM.registerAxisPointerClass("CartesianAxisPointer",kW),e.registerComponentModel(CW),e.registerComponentView(LW),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var r=t.axisPointer.link;r&&!ve(r)&&(t.axisPointer.link=[r])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=KU(t,r)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},IW)}function BW(e){ua(cW),ua(JM)}function HW(e,t){var r=Od(t.get("padding")),n=t.getItemStyle(["color","opacity"]);return n.fill=t.get("backgroundColor"),e=new Rt({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}),e}var VW=(function(e){pe(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",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t})(ot);function eE(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function tE(e){if(je.domSupported){for(var t=document.documentElement.style,r=0,n=e.length;r<n;r++)if(e[r]in t)return e[r]}}var rE=tE(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),$W=tE(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function nE(e,t){if(!e)return t;t=iT(t,!0);var r=e.indexOf(t);return e=r===-1?t:"-"+e.slice(0,r)+"-"+t,e.toLowerCase()}function UW(e,t){var r=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return r?r[t]:null}var WW=nE($W,"transition"),rx=nE(rE,"transform"),GW="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(je.transform3dSupported?"will-change:transform;":"");function YW(e){return e=e==="left"?"right":e==="right"?"left":e==="top"?"bottom":"top",e}function XW(e,t,r){if(!Ae(r)||r==="inside")return"";var n=e.get("backgroundColor"),i=e.get("borderWidth");t=wo(t);var a=YW(r),o=Math.max(Math.round(i)*1.5,6),s="",l=rx+":",c;rt(["left","right"],a)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(c=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(c=a==="top"?225:45)+"deg)");var f=c*Math.PI/180,h=o+i,v=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),p=Math.round(((v-Math.SQRT2*i)/2+Math.SQRT2*i-(v-h)/2)*100)/100;s+=";"+a+":-"+p+"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 qW(e,t){var r="cubic-bezier(0.23,1,0.32,1)",n=" "+e/2+"s "+r,i="opacity"+n+",visibility"+n;return t||(n=" "+e+"s "+r,i+=je.transformSupported?","+rx+n:",left"+n+",top"+n),WW+":"+i}function iE(e,t,r){var n=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!je.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=je.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+rx+":"+o+";":[["top",0],["left",0],[rE,o]]}function KW(e){var t=[],r=e.get("fontSize"),n=e.getTextColor();n&&t.push("color:"+n),t.push("font:"+e.getFont());var i=Ue(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(c){var f=e.get(c);f&&t.push("text-"+c+":"+f)}),t.join(";")}function ZW(e,t,r){var n=[],i=e.get("transitionDuration"),a=e.get("backgroundColor"),o=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),c=e.get("shadowOffsetY"),f=e.getModel("textStyle"),h=yT(e,"html"),v=l+"px "+c+"px "+o+"px "+s;return n.push("box-shadow:"+v),t&&i&&n.push(qW(i,r)),a&&n.push("background-color:"+a),U(["width","color","radius"],function(p){var g="border-"+p,y=iT(g),x=e.get(y);x!=null&&n.push(g+":"+x+(p==="color"?"":"px"))}),n.push(KW(f)),h!=null&&n.push("padding:"+Od(h).join("px ")+"px"),n.join(";")+";"}function aE(e,t,r,n,i){var a=t&&t.painter;if(r){var o=a&&a.getViewportRoot();o&&g9(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 QW=(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,je.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&&(Ae(a)?document.querySelector(a):Vl(a)?a:$e(a)&&a(t.getDom()));aE(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 c=i.handler,f=i.painter.getViewportRoot();cn(f,l,!0),c.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=UW(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.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=GW+ZW(t,!this._firstShow,this._longHide)+iE(a[0],a[1],!0)+("border-color:"+wo(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(Ae(a)&&n.get("trigger")==="item"&&!eE(n)&&(s=XW(n,i,a)),Ae(t))o.innerHTML=t+s;else if(t){o.innerHTML="",ve(t)||(t=[t]);for(var l=0;l<t.length;l++)Vl(t[l])&&t[l].parentNode!==o&&o.appendChild(t[l]);if(s&&o.childNodes.length){var c=document.createElement("div");c.innerHTML=s,o.appendChild(c)}}},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(aE(n,this._zr,this._container,t,r),n[0]!=null&&n[1]!=null){var i=this.el.style,a=iE(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;r.visibility="hidden",r.opacity="0",je.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(ht(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.el.parentNode;t&&t.removeChild(this.el),this.el=this._container=null},e})(),JW=(function(){function e(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),sE(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;Pe(t)&&Sr(""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new dr({style:{rich:r.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:yT(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),U(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(c){o.el.style[c]=n.get(c)}),U(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(c){o.el.style[c]=s.get(c)||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=oE(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;sE(i,this._zr,t,r),t=i[0],r=i[1];var a=n.style,o=da(a.borderWidth||0),s=oE(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(ht(this.hide,this),t)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e})();function da(e){return Math.max(0,e)}function oE(e){var t=da(e.shadowBlur||0),r=da(e.shadowOffsetX||0),n=da(e.shadowOffsetY||0);return{left:da(t-r),right:da(t+r),top:da(t-n),bottom:da(t+n)}}function sE(e,t,r,n){e[0]=r,e[1]=n,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var eG=new Rt({shape:{x:-1,y:-1,width:2,height:2}}),tG=(function(e){pe(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(!(je.node||!n.getDom())){var i=r.getComponent("tooltip"),a=this._renderMode=a6(i.get("renderMode"));this._tooltipContent=a==="richText"?new JW(n):new QW(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},t.prototype.render=function(r,n,i){if(!(je.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")?YT(this,"_updatePosition",50,"fixRate"):$y(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var r=this._tooltipModel,n=r.get("triggerOn");YM("itemTooltip",this._api,ht(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(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||je.node||!i.getDom())){var o=lE(a,i);this._ticket="";var s=a.dataByCoordSys,l=aG(a,n,i);if(l){var c=l.el.getBoundingRect().clone();c.applyTransform(l.el.transform),this._tryShow({offsetX:c.x+c.width/2,offsetY:c.y+c.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=eG;f.x=a.x,f.y=a.y,f.update(),Qe(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 h=qM(a,n),v=h.point[0],p=h.point[1];v!=null&&p!=null&&this._tryShow({offsetX:v,offsetY:p,target:h.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,a.from!==this.uid&&this._hide(lE(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 c=n.getSeriesByIndex(o);if(c){var f=c.getData(),h=Zu([f.getItemModel(s),c,(c.coordinateSystem||{}).model],this._tooltipModel);if(h.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=Qe(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,c;Vu(i,function(f){if(Qe(f).dataIndex!=null)return l=f,!0;if(Qe(f).tooltipConfig!=null)return c=f,!0},!0),l?this._showSeriesItemTooltip(r,l,n):c?this._showComponentItemTooltip(r,c,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=ht(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=Zu([n.tooltipOption],a),l=this._renderMode,c=[],f=_o("section",{blocks:[],noHeader:!0}),h=[],v=new Ey;U(r,function(_){U(_.dataByAxis,function(C){var A=i.getComponent(C.axisDim+"Axis",C.axisIndex),M=C.value;if(!(!A||M==null)){var D=$M(M,A.axis,i,C.seriesDataIndices,C.valueLabelOpt),E=_o("section",{header:D,noHeader:!Wn(D),sortBlocks:!0,blocks:[]});f.blocks.push(E),U(C.seriesDataIndices,function(N){var O=i.getSeriesByIndex(N.seriesIndex),L=N.dataIndexInside,R=O.getDataParams(L);if(!(R.dataIndex<0)){R.axisDim=C.axisDim,R.axisIndex=C.axisIndex,R.axisType=C.axisType,R.axisId=C.axisId,R.axisValue=j0(A.axis,{value:M}),R.axisValueLabel=D,R.marker=v.makeTooltipMarker("item",wo(R.color),l);var j=lT(O.formatTooltip(L,!0,null)),H=j.frag;if(H){var W=Zu([O],a).get("valueFormatter");E.blocks.push(W?ue({valueFormatter:W},H):H)}j.text&&h.push(j.text),c.push(R)}})}})}),f.blocks.reverse(),h.reverse();var p=n.position,g=s.get("order"),y=gT(f,v,l,g,i.get("useUTC"),s.get("textStyle"));y&&h.unshift(y);var x=l==="richText"?`
|
|
40
|
+
|
|
41
|
+
`:"<br/>",b=h.join(x);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,c)?this._updatePosition(s,p,o[0],o[1],this._tooltipContent,c):this._showTooltipContent(s,b,c,Math.random()+"",o[0],o[1],p,null,v)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=Qe(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),c=o.dataModel||l,f=o.dataIndex,h=o.dataType,v=c.getData(h),p=this._renderMode,g=r.positionDefault,y=Zu([v.getItemModel(f),c,l&&(l.coordinateSystem||{}).model],this._tooltipModel,g?{position:g}:null),x=y.get("trigger");if(!(x!=null&&x!=="item")){var b=c.getDataParams(f,h),_=new Ey;b.marker=_.makeTooltipMarker("item",wo(b.color),p);var C=lT(c.formatTooltip(f,!1,h)),A=y.get("order"),M=y.get("valueFormatter"),D=C.frag,E=D?gT(M?ue({valueFormatter:M},D):D,_,p,A,a.get("useUTC"),y.get("textStyle")):C.text,N="item_"+c.name+"_"+f;this._showOrMove(y,function(){this._showTooltipContent(y,E,b,N,r.offsetX,r.offsetY,r.position,r.target,_)}),i({type:"showTip",dataIndexInside:f,dataIndex:v.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=Qe(n),s=o.tooltipConfig,l=s.option||{},c=l.encodeHTMLContent;if(Ae(l)){var f=l;l={content:f,formatter:f},c=!0}c&&a&&l.content&&(l=qe(l),l.content=Dr(l.content));var h=[l],v=this._ecModel.getComponent(o.componentMainType,o.componentIndex);v&&h.push(v),h.push({formatter:l.content});var p=r.positionDefault,g=Zu(h,this._tooltipModel,p?{position:p}:null),y=g.get("content"),x=Math.random()+"",b=new Ey;this._showOrMove(g,function(){var _=qe(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,c,f){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var h=this._tooltipContent;h.setEnterable(r.get("enterable"));var v=r.get("formatter");l=l||r.get("position");var p=n,g=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),y=g.color;if(v)if(Ae(v)){var x=r.ecModel.get("useUTC"),b=ve(i)?i[0]:i,_=b&&b.axisType&&b.axisType.indexOf("time")>=0;p=v,_&&(p=Ld(b.axisValue,p,x)),p=oT(p,i,!0)}else if($e(v)){var C=ht(function(A,M){A===this._ticket&&(h.setContent(M,f,r,y,l),this._updatePosition(r,l,o,s,h,i,c))},this);this._ticket=a,p=v(i,a,C)}else p=v;h.setContent(p,f,r,y,l),h.show(r,y),this._updatePosition(r,l,o,s,h,i,c)}},t.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||ve(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!ve(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,o,s,l){var c=this._api.getWidth(),f=this._api.getHeight();n=n||r.get("position");var h=o.getSize(),v=r.get("align"),p=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:[c,f],contentSize:h.slice()})),ve(n))i=pt(n[0],c),a=pt(n[1],f);else if(Pe(n)){var y=n;y.width=h[0],y.height=h[1];var x=Eu(y,{width:c,height:f});i=x.x,a=x.y,v=null,p=null}else if(Ae(n)&&l){var b=iG(n,g,h,r.get("borderWidth"));i=b[0],a=b[1]}else{var b=rG(i,a,o,c,f,v?null:20,p?null:20);i=b[0],a=b[1]}if(v&&(i-=uE(v)?h[0]/2:v==="right"?h[0]:0),p&&(a-=uE(p)?h[1]/2:p==="bottom"?h[1]:0),eE(r)){var b=nG(i,a,o,c,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 c=s.dataByAxis||[],f=r[l]||{},h=f.dataByAxis||[];o=o&&c.length===h.length,o&&U(c,function(v,p){var g=h[p]||{},y=v.seriesDataIndices||[],x=g.seriesDataIndices||[];o=o&&v.value===g.value&&v.axisType===g.axisType&&v.axisId===g.axisId&&y.length===x.length,o&&U(y,function(b,_){var C=x[_];o=o&&b.seriesIndex===C.seriesIndex&&b.dataIndex===C.dataIndex}),a&&U(v.seriesDataIndices,function(b){var _=b.seriesIndex,C=n[_],A=a[_];C&&A&&A.data!==C.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){je.node||!n.getDom()||($y(this,"_updatePosition"),this._tooltipContent.dispose(),tx("itemTooltip",n))},t.type="tooltip",t})(Pn);function Zu(e,t,r){var n=t.ecModel,i;r?(i=new Ct(r,n,n),i=new Ct(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof Ct&&(o=o.get("tooltip",!0)),Ae(o)&&(o={formatter:o}),o&&(i=new Ct(o,i,n)))}return i}function lE(e,t){return e.dispatchAction||ht(t.dispatchAction,t)}function rG(e,t,r,n,i,a,o){var s=r.getSize(),l=s[0],c=s[1];return a!=null&&(e+l+a+2>n?e-=l+a:e+=a),o!=null&&(t+c+o>i?t-=c+o:t+=o),[e,t]}function nG(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 iG(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,c=t.width,f=t.height;switch(e){case"inside":s=t.x+c/2-i/2,l=t.y+f/2-a/2;break;case"top":s=t.x+c/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+c/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+c+o,l=t.y+f/2-a/2}return[s,l]}function uE(e){return e==="center"||e==="middle"}function aG(e,t,r){var n=Am(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=lu(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(c){var f=Qe(c).tooltipConfig;if(f&&f.name===e.name)return l=c,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function oG(e){ua(JM),e.registerComponentModel(VW),e.registerComponentView(tG),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},_r),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},_r)}function sG(e,t){if(!e)return!1;for(var r=ve(e)?e:[e],n=0;n<r.length;n++)if(r[n]&&r[n][t])return!0;return!1}function wh(e){Jf(e,"label",["show"])}var _h=bt(),Qu=(function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.createdBySelf=!1,r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._mergeOption(r,i,!1,!0)},t.prototype.isAnimationEnabled=function(){if(je.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),c=_h(s)[o];if(!l||!l.data){_h(s)[o]=null;return}c?c._mergeOption(l,n,!0):(a&&wh(l),U(l.data,function(f){f instanceof Array?(wh(f[0]),wh(f[1])):wh(f)}),c=this.createMarkerModelFromSeries(l,this,n),ue(c,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),c.__hostSeries=s),_h(s)[o]=c},this)},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return _o("section",{header:this.name,blocks:[_o("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=Ty.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 _h(r)[n]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t})(ot);Cn(Qu,Ty.prototype);function lG(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function uG(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function kh(e,t,r,n,i,a){var o=[],s=bo(t,n),l=s?t.getCalculationInfo("stackResultDimension"):n,c=ix(t,l,e),f=t.indicesOfNearest(l,c)[0];o[i]=t.get(r,f),o[a]=t.get(l,f);var h=t.get(n,f),v=Qn(t.get(n,f));return v=Math.min(v,20),v>=0&&(o[a]=+o[a].toFixed(v)),[o,h]}var nx={min:ut(kh,"min"),max:ut(kh,"max"),average:ut(kh,"average"),median:ut(kh,"median")};function cE(e,t){if(t){var r=e.getData(),n=e.coordinateSystem,i=n&&n.dimensions;if(!uG(t)&&!ve(t.coord)&&ve(i)){var a=fE(t,r,n,e);if(t=qe(t),t.type&&nx[t.type]&&a.baseAxis&&a.valueAxis){var o=rt(i,a.baseAxis.dim),s=rt(i,a.valueAxis.dim),l=nx[t.type](r,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||!ve(i))t.coord=[];else for(var c=t.coord,f=0;f<2;f++)nx[c[f]]&&(c[f]=ix(r,r.mapDimension(i[f]),c[f]));return t}}function fE(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(cG(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 cG(e,t){var r=e.getData().getDimensionInfo(t);return r&&r.coordDim}function dE(e,t){return e&&e.containData&&t.coord&&!lG(t)?e.containData(t.coord):!0}function fG(e,t){return e?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return Ls(o,t[a])}:function(r,n,i,a){return Ls(r.value,t[a])}}function ix(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 ax=bt(),dG=(function(e){pe(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=Ge()},t.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){ax(s).keep=!1}),n.eachSeries(function(s){var l=Qu.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!ax(s).keep&&a.group.remove(s.group)})},t.prototype.markKeep=function(r){ax(r).keep=!0},t.prototype.toggleBlurSeries=function(r,n){var i=this;U(r,function(a){var o=Qu.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?S2(l):Im(l))})}})},t.type="marker",t})(Pn),hG=(function(e){pe(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})(Qu),Sh=bt(),pG=function(e,t,r,n){var i=e.getData(),a;if(ve(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=ls(n.yAxis,n.xAxis);else{var c=fE(n,i,t,e);s=c.valueAxis;var f=FC(i,c.valueDataDim);l=ix(i,f,o)}var h=s.dim==="x"?0:1,v=1-h,p=qe(n),g={coord:[]};p.type=null,p.coord=[],p.coord[v]=-1/0,g.coord[v]=1/0;var y=r.get("precision");y>=0&<(l)&&(l=+l.toFixed(Math.min(y,20))),p.coord[h]=g.coord[h]=l,a=[p,g,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var x=[cE(e,a[0]),cE(e,a[1]),ue({},a[2])];return x[2].type=x[2].type||null,Ze(x[2],x[0]),Ze(x[2],x[1]),x};function Ch(e){return!isNaN(e)&&!isFinite(e)}function hE(e,t,r,n){var i=1-e,a=n.dimensions[e];return Ch(t[i])&&Ch(r[i])&&t[e]===r[e]&&n.getAxis(a).containData(t[e])}function vG(e,t){if(e.type==="cartesian2d"){var r=t[0].coord,n=t[1].coord;if(r&&n&&(hE(1,r,n,e)||hE(0,r,n,e)))return!0}return dE(e,t[0])&&dE(e,t[1])}function ox(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=pt(o.get("x"),i.getWidth()),c=pt(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(c))s=[l,c];else{if(n.getMarkerPosition)s=n.getMarkerPosition(e.getValues(e.dimensions,t));else{var f=a.dimensions,h=e.get(f[0],t),v=e.get(f[1],t);s=a.dataToPoint([h,v])}if($d(a,"cartesian2d")){var p=a.getAxis("x"),g=a.getAxis("y"),f=a.dimensions;Ch(e.get(f[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[r?0:1]):Ch(e.get(f[1],t))&&(s[1]=g.toGlobalCoord(g.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(c)||(s[1]=c)}e.setItemLayout(t,s)}var gG=(function(e){pe(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=Qu.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=Sh(o).from,c=Sh(o).to;l.each(function(f){ox(l,f,!0,a,i),ox(c,f,!1,a,i)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),c.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(),c=this.markerGroupMap,f=c.get(s)||c.set(s,new pW);this.group.add(f.group);var h=mG(o,r,n),v=h.from,p=h.to,g=h.line;Sh(n).from=v,Sh(n).to=p,n.setData(g);var y=n.get("symbol"),x=n.get("symbolSize"),b=n.get("symbolRotate"),_=n.get("symbolOffset");ve(y)||(y=[y,y]),ve(x)||(x=[x,x]),ve(b)||(b=[b,b]),ve(_)||(_=[_,_]),h.from.each(function(A){C(v,A,!0),C(p,A,!1)}),g.each(function(A){var M=g.getItemModel(A).getModel("lineStyle").getLineStyle();g.setItemLayout(A,[v.getItemLayout(A),p.getItemLayout(A)]),M.stroke==null&&(M.stroke=v.getItemVisual(A,"style").fill),g.setItemVisual(A,{fromSymbolKeepAspect:v.getItemVisual(A,"symbolKeepAspect"),fromSymbolOffset:v.getItemVisual(A,"symbolOffset"),fromSymbolRotate:v.getItemVisual(A,"symbolRotate"),fromSymbolSize:v.getItemVisual(A,"symbolSize"),fromSymbol:v.getItemVisual(A,"symbol"),toSymbolKeepAspect:p.getItemVisual(A,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(A,"symbolOffset"),toSymbolRotate:p.getItemVisual(A,"symbolRotate"),toSymbolSize:p.getItemVisual(A,"symbolSize"),toSymbol:p.getItemVisual(A,"symbol"),style:M})}),f.updateData(g),h.line.eachItemGraphicEl(function(A){Qe(A).dataModel=n,A.traverse(function(M){Qe(M).dataModel=n})});function C(A,M,D){var E=A.getItemModel(M);ox(A,M,D,r,a);var N=E.getModel("itemStyle").getItemStyle();N.fill==null&&(N.fill=iD(l,"color")),A.setItemVisual(M,{symbolKeepAspect:E.get("symbolKeepAspect"),symbolOffset:Ue(E.get("symbolOffset",!0),_[D?0:1]),symbolRotate:Ue(E.get("symbolRotate",!0),b[D?0:1]),symbolSize:Ue(E.get("symbolSize"),x[D?0:1]),symbol:Ue(E.get("symbol",!0),y[D?0:1]),style:N})}this.markKeep(f),f.group.silent=n.get("silent")||r.get("silent")},t.type="markLine",t})(dG);function mG(e,t,r){var n;e?n=Te(e&&e.dimensions,function(c){var f=t.getData().getDimensionInfo(t.getData().mapDimension(c))||{};return ue(ue({},f),{name:c,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Cu(n,r),a=new Cu(n,r),o=new Cu([],r),s=Te(r.get("data"),ut(pG,t,e,r));e&&(s=Ft(s,ut(vG,e)));var l=fG(!!e,n);return i.initData(Te(s,function(c){return c[0]}),null,l),a.initData(Te(s,function(c){return c[1]}),null,l),o.initData(Te(s,function(c){return c[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function yG(e){e.registerComponentModel(hG),e.registerComponentView(gG),e.registerPreprocessor(function(t){sG(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var xG=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"])}},sx=(function(e){pe(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"]),ve(n)&&U(n,function(a,o){Ae(a)&&(a={type:a}),n[o]=Ze(a,xG(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 c=l.name;i.push(c);var f;if(l.legendVisualProvider){var h=l.legendVisualProvider,v=h.getAllNames();r.isSeriesFiltered(l)||(i=i.concat(v)),v.length?n=n.concat(v):f=!0}else f=!0;f&&Cm(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=Ge(),s=Te(a,function(l){return(Ae(l)||lt(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new Ct(l,this,this.ecModel))},this);this._data=Ft(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])&&rt(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",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",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:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t})(ot),Ys=ut,lx=U,Th=Ot,pE=(function(e){pe(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 Th),this.group.add(this._selectorGroup=new Th),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),c=r.get("selectorPosition",!0);l&&(!c||c==="auto")&&(c=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,c);var f=r.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},v=r.get("padding"),p=Eu(f,h,v),g=this.layoutInner(r,o,p,a,l,c),y=Eu(tt({width:g.width,height:g.height},f),h,v);this.group.x=y.x-g.x,this.group.y=y.y-g.y,this.group.markRedraw(),this.group.add(this._backgroundEl=HW(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 c=this.getContentGroup(),f=Ge(),h=n.get("selectedMode"),v=[];i.eachRawSeries(function(p){!p.get("legendHoverLink")&&v.push(p.id)}),lx(n.getData(),function(p,g){var y=p.get("name");if(!this.newlineDisabled&&(y===""||y===`
|
|
42
|
+
`)){var x=new Th;x.newline=!0,c.add(x);return}var b=i.getSeriesByName(y)[0];if(!f.get(y))if(b){var _=b.getData(),C=_.getVisual("legendLineStyle")||{},A=_.getVisual("legendIcon"),M=_.getVisual("style"),D=this._createItem(b,y,g,p,n,r,C,M,A,h,a);D.on("click",Ys(vE,y,null,a,v)).on("mouseover",Ys(ux,b.name,null,a,v)).on("mouseout",Ys(cx,b.name,null,a,v)),i.ssr&&D.eachChild(function(E){var N=Qe(E);N.seriesIndex=b.seriesIndex,N.dataIndex=g,N.ssrType="legend"}),f.set(y,!0)}else i.eachRawSeries(function(E){if(!f.get(y)&&E.legendVisualProvider){var N=E.legendVisualProvider;if(!N.containName(y))return;var O=N.indexOfName(y),L=N.getItemVisual(O,"style"),R=N.getItemVisual(O,"legendIcon"),j=mi(L.fill);j&&j[3]===0&&(j[3]=.2,L=ue(ue({},L),{fill:Rf(j,"rgba")}));var H=this._createItem(E,y,g,p,n,r,{},L,R,h,a);H.on("click",Ys(vE,null,y,a,v)).on("mouseover",Ys(ux,null,y,a,v)).on("mouseout",Ys(cx,null,y,a,v)),i.ssr&&H.eachChild(function(W){var K=Qe(W);K.seriesIndex=E.seriesIndex,K.dataIndex=g,K.ssrType="legend"}),f.set(y,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();lx(r,function(c){var f=c.type,h=new dr({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(h);var v=n.getModel("selectorLabel"),p=n.getModel(["emphasis","selectorLabel"]);As(h,{normal:v,emphasis:p},{defaultText:c.title}),Om(h)})},t.prototype._createItem=function(r,n,i,a,o,s,l,c,f,h,v){var p=r.visualDrawType,g=o.get("itemWidth"),y=o.get("itemHeight"),x=o.isSelected(n),b=a.get("symbolRotate"),_=a.get("symbolKeepAspect"),C=a.get("icon");f=C||f||"roundRect";var A=bG(f,a,l,c,p,x,v),M=new Th,D=a.getModel("textStyle");if($e(r.getLegendIcon)&&(!C||C==="inherit"))M.add(r.getLegendIcon({itemWidth:g,itemHeight:y,icon:f,iconRotate:b,itemStyle:A.itemStyle,lineStyle:A.lineStyle,symbolKeepAspect:_}));else{var E=C==="inherit"&&r.getData().getVisual("symbol")?b==="inherit"?r.getData().getVisual("symbolRotate"):b:0;M.add(wG({itemWidth:g,itemHeight:y,icon:f,iconRotate:E,itemStyle:A.itemStyle,symbolKeepAspect:_}))}var N=s==="left"?g+5:-5,O=s,L=o.get("formatter"),R=n;Ae(L)&&L?R=L.replace("{name}",n??""):$e(L)&&(R=L(n));var j=x?D.getTextColor():a.get("inactiveColor");M.add(new dr({style:Ds(D,{text:R,x:N,y:y/2,fill:j,align:O,verticalAlign:"middle"},{inheritColor:j})}));var H=new Rt({shape:M.getBoundingRect(),style:{fill:"transparent"}}),W=a.getModel("tooltip");return W.get("show")&&bd({el:H,componentModel:o,itemName:n,itemTooltipOption:W.option}),M.add(H),M.eachChild(function(K){K.silent=!0}),H.silent=!h,this.getContentGroup().add(M),Om(M),M.__legendDataIndex=i,M},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),c=this.getSelectorGroup();Mu(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(c.markRedraw(),l.markRedraw(),o){Mu("horizontal",c,r.get("selectorItemGap",!0));var v=c.getBoundingRect(),p=[-v.x,-v.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"?p[y]+=f[x]+g:h[y]+=v[x]+g,p[1-y]+=f[b]/2-v[b]/2,c.x=p[0],c.y=p[1],l.x=h[0],l.y=h[1];var C={x:0,y:0};return C[x]=f[x]+g+v[x],C[b]=Math.max(f[b],v[b]),C[_]=Math.min(0,v[_]+p[1-y]),C}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})(Pn);function bG(e,t,r,n,i,a,o){function s(x,b){x.lineWidth==="auto"&&(x.lineWidth=b.lineWidth>0?2:0),lx(x,function(_,C){x[C]==="inherit"&&(x[C]=b[C])})}var l=t.getModel("itemStyle"),c=l.getItemStyle(),f=e.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");c.decal=!h||h==="inherit"?n.decal:v0(h,o),c.fill==="inherit"&&(c.fill=n[i]),c.stroke==="inherit"&&(c.stroke=n[f]),c.opacity==="inherit"&&(c.opacity=(i==="fill"?n:r).opacity),s(c,n);var v=t.getModel("lineStyle"),p=v.getLineStyle();if(s(p,r),c.fill==="auto"&&(c.fill=n.fill),c.stroke==="auto"&&(c.stroke=n.fill),p.stroke==="auto"&&(p.stroke=n.fill),!a){var g=t.get("inactiveBorderWidth"),y=c[f];c.lineWidth=g==="auto"?n.lineWidth>0&&y?2:0:c.lineWidth,c.fill=t.get("inactiveColor"),c.stroke=t.get("inactiveBorderColor"),p.stroke=v.get("inactiveColor"),p.lineWidth=v.get("inactiveWidth")}return{itemStyle:c,lineStyle:p}}function wG(e){var t=e.icon||"roundRect",r=ko(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="#fff",r.style.lineWidth=2),r}function vE(e,t,r,n){cx(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),ux(e,t,r,n)}function gE(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;n<i&&!(r=t[n].states.emphasis);)n++;return r&&r.hoverLayer}function ux(e,t,r,n){gE(r)||r.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:n})}function cx(e,t,r,n){gE(r)||r.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:n})}function _G(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 Ju(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),mE(s,i),a.push(s.componentIndex)});var o={};return r.eachComponent("legend",function(s){U(i,function(l,c){s[l?"select":"unSelect"](c)}),mE(s,o)}),n?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function mE(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);Ga(r,i)?r[i]=r[i]&&a:r[i]=a}}),r}function kG(e){e.registerAction("legendToggleSelect","legendselectchanged",ut(Ju,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",ut(Ju,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",ut(Ju,"inverseSelect")),e.registerAction("legendSelect","legendselected",ut(Ju,"select")),e.registerAction("legendUnSelect","legendunselected",ut(Ju,"unSelect"))}function yE(e){e.registerComponentModel(sx),e.registerComponentView(pE),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,_G),e.registerSubTypeDefaulter("legend",function(){return"plain"}),kG(e)}var SG=(function(e){pe(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=Fd(r);e.prototype.init.call(this,r,n,i),xE(this,r,a)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),xE(this,this.option,r)},t.type="legend.scroll",t.defaultOption=BC(sx.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:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t})(sx);function xE(e,t,r){var n=e.getOrient(),i=[1,1];i[n.index]=0,js(t,r,{type:"box",ignoreSize:!!i})}var bE=Ot,fx=["width","height"],dx=["x","y"],CG=(function(e){pe(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 bE),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new bE)},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 c=this;e.prototype.renderInner.call(this,r,n,i,a,o,s,l);var f=this._controllerGroup,h=n.get("pageIconSize",!0),v=ve(h)?h:[h,h];g("pagePrev",0);var p=n.getModel("pageTextStyle");f.add(new dr({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),g("pageNext",1);function g(y,x){var b=y+"DataIndex",_=Km(n.get("pageIcons",!0)[n.getOrient().name][x],{onclick:ht(c._pageGo,c,b,n,a)},{x:-v[0]/2,y:-v[1]/2,width:v[0],height:v[1]});_.name=y,f.add(_)}},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getSelectorGroup(),c=r.getOrient().index,f=fx[c],h=dx[c],v=fx[1-c],p=dx[1-c];o&&Mu("horizontal",l,r.get("selectorItemGap",!0));var g=r.get("selectorButtonGap",!0),y=l.getBoundingRect(),x=[-y.x,-y.y],b=qe(i);o&&(b[f]=i[f]-y[f]-g);var _=this._layoutContentAndController(r,a,b,c,f,v,p,h);if(o){if(s==="end")x[c]+=_[f]+g;else{var C=y[f]+g;x[c]-=C,_[h]-=C}_[f]+=y[f]+g,x[1-c]+=_[p]+_[v]/2-y[v]/2,_[v]=Math.max(_[v],y[v]),_[p]=Math.min(_[p],y[p]+x[1-c]),l.x=x[0],l.y=x[1],l.markRedraw()}return _},t.prototype._layoutContentAndController=function(r,n,i,a,o,s,l,c){var f=this.getContentGroup(),h=this._containerGroup,v=this._controllerGroup;Mu(r.get("orient"),f,r.get("itemGap"),a?i.width:null,a?null:i.height),Mu("horizontal",v,r.get("pageButtonItemGap",!0));var p=f.getBoundingRect(),g=v.getBoundingRect(),y=this._showController=p[o]>i[o],x=[-p.x,-p.y];n||(x[a]=f[c]);var b=[0,0],_=[-g.x,-g.y],C=Ue(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(y){var A=r.get("pageButtonPosition",!0);A==="end"?_[a]+=i[o]-g[o]:b[a]+=g[o]+C}_[1-a]+=p[s]/2-g[s]/2,f.setPosition(x),h.setPosition(b),v.setPosition(_);var M={x:0,y:0};if(M[o]=y?i[o]:p[o],M[s]=Math.max(p[s],g[s]),M[l]=Math.min(0,g[l]+_[1-a]),h.__rectSize=i[o],y){var D={x:0,y:0};D[o]=Math.max(i[o]-g[o]-C,0),D[s]=M[s],h.setClipPath(new Rt({shape:D})),h.__rectSize=D[o]}else v.eachChild(function(N){N.attr({invisible:!0,silent:!0})});var E=this._getPageInfo(r);return E.pageIndex!=null&&er(f,{x:E.contentPosition[0],y:E.contentPosition[1]},y?r:null),this._updatePageInfoView(r,E),M},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 h=f+"DataIndex",v=n[h]!=null,p=i.childOfName(f);p&&(p.setStyle("fill",v?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),p.cursor=v?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,c=n.pageCount;a&&o&&a.setStyle("text",Ae(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",c==null?"":c+""):o({current:l,total:c}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=fx[o],l=dx[o],c=this._findTargetItemIndex(n),f=i.children(),h=f[c],v=f.length,p=v?1:0,g={contentPosition:[i.x,i.y],pageCount:p,pageIndex:p-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return g;var y=A(h);g.contentPosition[o]=-y.s;for(var x=c+1,b=y,_=y,C=null;x<=v;++x)C=A(f[x]),(!C&&_.e>b.s+a||C&&!M(C,b.s))&&(_.i>b.i?b=_:b=C,b&&(g.pageNextDataIndex==null&&(g.pageNextDataIndex=b.i),++g.pageCount)),_=C;for(var x=c-1,b=y,_=y,C=null;x>=-1;--x)C=A(f[x]),(!C||!M(_,C.s))&&b.i<_.i&&(_=b,g.pagePrevDataIndex==null&&(g.pagePrevDataIndex=b.i),++g.pageCount,++g.pageIndex),b=C;return g;function A(D){if(D){var E=D.getBoundingRect(),N=E[l]+D[l];return{s:N,e:N+E[s],i:D.__legendDataIndex}}}function M(D,E){return D.e>=E&&D.s<=E+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})(pE);function TG(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 AG(e){ua(yE),e.registerComponentModel(SG),e.registerComponentView(CG),TG(e)}function DG(e){ua(yE),ua(AG)}function wE(e,t,r){var n=ss.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}var hx=(function(e){pe(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.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||$f,typeof r=="string"?o=wE(r,n,i):Pe(r)&&(o=r,r=o.id),a.id=r,a.dom=o;var s=o.style;return s&&(tS(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.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},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=wE("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,c=new nt(0,0,0,0);function f(_){if(!(!_.isFinite()||_.isZero()))if(o.length===0){var C=new nt(0,0,0,0);C.copy(_),o.push(C)}else{for(var A=!1,M=1/0,D=0,E=0;E<o.length;++E){var N=o[E];if(N.intersect(_)){var O=new nt(0,0,0,0);O.copy(N),O.union(_),o[E]=O,A=!0;break}else if(l){c.copy(_),c.union(N);var L=_.width*_.height,R=N.width*N.height,j=c.width*c.height,H=j-L-R;H<M&&(M=H,D=E)}}if(l&&(o[D].union(_),A=!0),!A){var C=new nt(0,0,0,0);C.copy(_),o.push(C)}l||(l=o.length>=s)}}for(var h=this.__startIndex;h<this.__endIndex;++h){var v=r[h];if(v){var p=v.shouldBePainted(i,a,!0,!0),g=v.__isRendered&&(v.__dirty&Hr||!p)?v.getPrevPaintRect():null;g&&f(g);var y=p&&(v.__dirty&Hr||!v.__isRendered)?v.getPaintRect():null;y&&f(y)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var v=n[h],p=v&&v.shouldBePainted(i,a,!0,!0);if(v&&(!p||!v.__zr)&&v.__isRendered){var g=v.getPrevPaintRect();g&&f(g)}}var x;do{x=!1;for(var h=0;h<o.length;){if(o[h].isZero()){o.splice(h,1);continue}for(var b=h+1;b<o.length;)o[h].intersect(o[b])?(x=!0,o[h].union(o[b]),o.splice(b,1)):b++;h++}}while(x);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 c=this.motionBlur&&!r,f=this.lastFrameAlpha,h=this.dpr,v=this;c&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/h,l/h));var p=this.domBack;function g(y,x,b,_){if(o.clearRect(y,x,b,_),n&&n!=="transparent"){var C=void 0;if(xf(n)){var A=n.global||n.__width===b&&n.__height===_;C=A&&n.__canvasGradient||d0(o,n,{x:0,y:0,width:b,height:_}),n.__canvasGradient=C,n.__width=b,n.__height=_}else rF(n)&&(n.scaleX=n.scaleX||h,n.scaleY=n.scaleY||h,C=h0(o,n,{dirty:function(){v.setUnpainted(),v.painter.refresh()}}));o.save(),o.fillStyle=C||n,o.fillRect(y,x,b,_),o.restore()}c&&(o.save(),o.globalAlpha=f,o.drawImage(p,y,x,b,_),o.restore())}!i||c?g(0,0,s,l):i.length&&U(i,function(y){g(y.x*h,y.y*h,y.width*h,y.height*h)})},t})(Xn),_E=1e5,Eo=314159,Ah=.01,MG=.001;function EG(e){return e?e.__builtin__?!0:!(typeof e.resize!="function"||typeof e.refresh!="function"):!1}function LG(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}var IG=(function(){function e(t,r,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=n=ue({},n||{}),this.dpr=n.devicePixelRatio||$f,this._singleCanvas=a,this.root=t;var o=t.style;o&&(tS(t),t.innerHTML=""),this.storage=r;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var f=t,h=f.width,v=f.height;n.width!=null&&(h=n.width),n.height!=null&&(v=n.height),this.dpr=n.devicePixelRatio||1,f.width=h*this.dpr,f.height=v*this.dpr,this._width=h,this._height=v;var p=new hx(f,this,this.dpr);p.__builtin__=!0,p.initContext(),l[Eo]=p,p.zlevel=Eo,s.push(Eo),this._domRoot=t}else{this._width=ah(t,0,n),this._height=ah(t,1,n);var c=this._domRoot=LG(this._width,this._height);t.appendChild(c)}}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=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(r,n,t,this._redrawId);for(var a=0;a<i.length;a++){var o=i[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=a===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=r.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(t){var r=t.length,n=this._hoverlayer;if(n&&n.clear(),!!r){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<r;o++){var s=t[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(_E)),a||(a=n.ctx,a.save()),To(a,s,i,o===r-1))}a&&a.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(_E)},e.prototype.paintOne=function(t,r){yD(t,r)},e.prototype._paintList=function(t,r,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,r,n),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(t),o)this.eachLayer(function(c){c.afterBrush&&c.afterBrush()});else{var l=this;Zd(function(){l._paintList(t,r,n,i)})}}},e.prototype._compositeManually=function(){var t=this.getLayer(Eo).ctx,r=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,r,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,r,n)})},e.prototype._doPaintList=function(t,r,n){for(var i=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],c=this._layers[l];c.__builtin__&&c!==this._hoverlayer&&(c.__dirty||n)&&a.push(c)}for(var f=!0,h=!1,v=function(y){var x=a[y],b=x.ctx,_=o&&x.createRepaintRects(t,r,p._width,p._height),C=n?x.__startIndex:x.__drawIndex,A=!n&&x.incremental&&Date.now,M=A&&Date.now(),D=x.zlevel===p._zlevelList[0]?p._backgroundColor:null;if(x.__startIndex===x.__endIndex)x.clear(!1,D,_);else if(C===x.__startIndex){var E=t[C];(!E.incremental||!E.notClear||n)&&x.clear(!1,D,_)}C===-1&&(console.error("For some unknown reason. drawIndex is -1"),C=x.__startIndex);var N,O=function(H){var W={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(N=C;N<x.__endIndex;N++){var K=t[N];if(K.__inHover&&(h=!0),i._doPaintEl(K,x,o,H,W,N===x.__endIndex-1),A){var Q=Date.now()-M;if(Q>15)break}}W.prevElClipPaths&&b.restore()};if(_)if(_.length===0)N=x.__endIndex;else for(var L=p.dpr,R=0;R<_.length;++R){var j=_[R];b.save(),b.beginPath(),b.rect(j.x*L,j.y*L,j.width*L,j.height*L),b.clip(),O(j),b.restore()}else b.save(),O(),b.restore();x.__drawIndex=N,x.__drawIndex<x.__endIndex&&(f=!1)},p=this,g=0;g<a.length;g++)v(g);return je.wxa&&U(this._layers,function(y){y&&y.ctx&&y.ctx.draw&&y.ctx.draw()}),{finished:f,needsRefreshHover:h}},e.prototype._doPaintEl=function(t,r,n,i,a,o){var s=r.ctx;if(n){var l=t.getPaintRect();(!i||l&&l.intersect(i))&&(To(s,t,a,o),t.setPrevPaintRect(l))}else To(s,t,a,o)},e.prototype.getLayer=function(t,r){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Eo);var n=this._layers[t];return n||(n=new hx("zr_"+t,this,this.dpr),n.zlevel=t,n.__builtin__=!0,this._layerConfig[t]?Ze(n,this._layerConfig[t],!0):this._layerConfig[t-Ah]&&Ze(n,this._layerConfig[t-Ah],!0),r&&(n.virtual=r),this.insertLayer(t,n),n.initContext()),n},e.prototype.insertLayer=function(t,r){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,l=-1;if(!n[t]&&EG(r)){if(a>0&&t>i[0]){for(l=0;l<a-1&&!(i[l]<t&&i[l+1]>t);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=r,!r.virtual)if(s){var c=s.dom;c.nextSibling?o.insertBefore(r.dom,c.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)}},e.prototype.eachLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];t.call(r,this._layers[a],a)}},e.prototype.eachBuiltinLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&t.call(r,o,a)}},e.prototype.eachOtherLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||t.call(r,o,a)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(h,v){h.__dirty=h.__used=!1});function r(h){a&&(a.__endIndex!==h&&(a.__dirty=!0),a.__endIndex=h)}if(this._singleCanvas)for(var n=1;n<t.length;n++){var i=t[n];if(i.zlevel!==t[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,l;for(l=0;l<t.length;l++){var i=t[l],c=i.zlevel,f=void 0;s!==c&&(s=c,o=0),i.incremental?(f=this.getLayer(c+MG,this._needsManuallyCompositing),f.incremental=!0,o=1):f=this.getLayer(c+(o>0?Ah:0),this._needsManuallyCompositing),f.__builtin__||Ag("ZLevel "+c+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,r(l),a=f),i.__dirty&Hr&&!i.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(h,v){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,U(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?Ze(n[t],r,!0):n[t]=r;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===t||a===t+Ah){var o=this._layers[a];Ze(o,n[t],!0)}}}},e.prototype.delLayer=function(t){var r=this._layers,n=this._zlevelList,i=r[t];i&&(i.dom.parentNode.removeChild(i.dom),delete r[t],n.splice(rt(n,t),1))},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;if(t!=null&&(i.width=t),r!=null&&(i.height=r),t=ah(a,0,i),r=ah(a,1,i),n.style.display="",this._width!==t||r!==this._height){n.style.width=t+"px",n.style.height=r+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,r);this.refresh(!0)}this._width=t,this._height=r}else{if(t==null||r==null)return;this._width=t,this._height=r,this.getLayer(Eo).resize(t,r)}return this},e.prototype.clearLayer=function(t){var r=this._layers[t];r&&r.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[Eo].dom;var r=new hx("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;this.eachLayer(function(h){h.__builtin__?n.drawImage(h.dom,0,0,i,a):h.renderToCanvas&&(n.save(),h.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,c=s.length;l<c;l++){var f=s[l];To(n,f,o,l===c-1)}return r.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e})();function PG(e){e.registerPainter("canvas",IG)}ua([y7,KH,V7,BW,DG,yG,oG,PG]);const NG=Object.freeze(Object.defineProperty({__proto__:null,init:V$},Symbol.toStringTag,{value:"Module"}));function wre(){}function _re(){}function RG(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const OG=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zG=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,jG={};function kE(e,t){return(jG.jsx?zG:OG).test(e)}const FG=/[ \t\n\f\r]/g;function BG(e){return typeof e=="object"?e.type==="text"?SE(e.value):!1:SE(e)}function SE(e){return e.replace(FG,"")===""}class ec{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}ec.prototype.normal={},ec.prototype.property={},ec.prototype.space=void 0;function CE(e,t){const r={},n={};for(const i of e)Object.assign(r,i.property),Object.assign(n,i.normal);return new ec(r,n,t)}function px(e){return e.toLowerCase()}class Lr{constructor(t,r){this.attribute=r,this.property=t}}Lr.prototype.attribute="",Lr.prototype.booleanish=!1,Lr.prototype.boolean=!1,Lr.prototype.commaOrSpaceSeparated=!1,Lr.prototype.commaSeparated=!1,Lr.prototype.defined=!1,Lr.prototype.mustUseProperty=!1,Lr.prototype.number=!1,Lr.prototype.overloadedBoolean=!1,Lr.prototype.property="",Lr.prototype.spaceSeparated=!1,Lr.prototype.space=void 0;let HG=0;const Be=Io(),It=Io(),vx=Io(),ce=Io(),ct=Io(),Lo=Io(),$r=Io();function Io(){return 2**++HG}const gx=Object.freeze(Object.defineProperty({__proto__:null,boolean:Be,booleanish:It,commaOrSpaceSeparated:$r,commaSeparated:Lo,number:ce,overloadedBoolean:vx,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),mx=Object.keys(gx);class yx extends Lr{constructor(t,r,n,i){let a=-1;if(super(t,r),TE(this,"space",i),typeof n=="number")for(;++a<mx.length;){const o=mx[a];TE(this,mx[a],(n&gx[o])===gx[o])}}}yx.prototype.defined=!0;function TE(e,t,r){r&&(e[t]=r)}function Xs(e){const t={},r={};for(const[n,i]of Object.entries(e.properties)){const a=new yx(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[px(n)]=n,r[px(a.attribute)]=n}return new ec(t,r,e.space)}const AE=Xs({properties:{ariaActiveDescendant:null,ariaAtomic:It,ariaAutoComplete:null,ariaBusy:It,ariaChecked:It,ariaColCount:ce,ariaColIndex:ce,ariaColSpan:ce,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:It,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:It,ariaFlowTo:ct,ariaGrabbed:It,ariaHasPopup:null,ariaHidden:It,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:ce,ariaLive:null,ariaModal:It,ariaMultiLine:It,ariaMultiSelectable:It,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:ce,ariaPressed:It,ariaReadOnly:It,ariaRelevant:null,ariaRequired:It,ariaRoleDescription:ct,ariaRowCount:ce,ariaRowIndex:ce,ariaRowSpan:ce,ariaSelected:It,ariaSetSize:ce,ariaSort:null,ariaValueMax:ce,ariaValueMin:ce,ariaValueNow:ce,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function DE(e,t){return t in e?e[t]:t}function ME(e,t){return DE(e,t.toLowerCase())}const VG=Xs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Lo,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:Be,allowPaymentRequest:Be,allowUserMedia:Be,alpha:Be,alt:null,as:null,async:Be,autoCapitalize:null,autoComplete:ct,autoFocus:Be,autoPlay:Be,blocking:ct,capture:null,charSet:null,checked:Be,cite:null,className:ct,closedBy:null,colorSpace:null,cols:ce,colSpan:ce,command:null,commandFor:null,content:null,contentEditable:It,controls:Be,controlsList:ct,coords:ce|Lo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Be,defer:Be,dir:null,dirName:null,disabled:Be,download:vx,draggable:It,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Be,formTarget:null,headers:ct,height:ce,hidden:vx,high:ce,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:Be,inputMode:null,integrity:null,is:null,isMap:Be,itemId:null,itemProp:ct,itemRef:ct,itemScope:Be,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Be,low:ce,manifest:null,max:null,maxLength:ce,media:null,method:null,min:null,minLength:ce,multiple:Be,muted:Be,name:null,nonce:null,noModule:Be,noValidate:Be,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:Be,optimum:ce,pattern:null,ping:ct,placeholder:null,playsInline:Be,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Be,referrerPolicy:null,rel:ct,required:Be,reversed:Be,rows:ce,rowSpan:ce,sandbox:ct,scope:null,scoped:Be,seamless:Be,selected:Be,shadowRootClonable:Be,shadowRootCustomElementRegistry:Be,shadowRootDelegatesFocus:Be,shadowRootMode:null,shadowRootSerializable:Be,shape:null,size:ce,sizes:null,slot:null,span:ce,spellCheck:It,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ce,step:null,style:null,tabIndex:ce,target:null,title:null,translate:null,type:null,typeMustMatch:Be,useMap:null,value:It,width:ce,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,axis:null,background:null,bgColor:null,border:ce,borderColor:null,bottomMargin:ce,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Be,declare:Be,event:null,face:null,frame:null,frameBorder:null,hSpace:ce,leftMargin:ce,link:null,longDesc:null,lowSrc:null,marginHeight:ce,marginWidth:ce,noResize:Be,noHref:Be,noShade:Be,noWrap:Be,object:null,profile:null,prompt:null,rev:null,rightMargin:ce,rules:null,scheme:null,scrolling:It,standby:null,summary:null,text:null,topMargin:ce,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ce,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Be,disablePictureInPicture:Be,disableRemotePlayback:Be,exportParts:Lo,part:ct,prefix:null,property:null,results:ce,security:null,unselectable:null},space:"html",transform:ME}),$G=Xs({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:$r,accentHeight:ce,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ce,amplitude:ce,arabicForm:null,ascent:ce,attributeName:null,attributeType:null,azimuth:ce,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ce,by:null,calcMode:null,capHeight:ce,className:ct,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:ce,diffuseConstant:ce,direction:null,display:null,dur:null,divisor:ce,dominantBaseline:null,download:Be,dx:null,dy:null,edgeMode:null,editable:null,elevation:ce,enableBackground:null,end:null,event:null,exponent:ce,externalResourcesRequired:null,fill:null,fillOpacity:ce,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:Lo,g2:Lo,glyphName:Lo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ce,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ce,horizOriginX:ce,horizOriginY:ce,id:null,ideographic:ce,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ce,k:ce,k1:ce,k2:ce,k3:ce,k4:ce,kernelMatrix:$r,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ce,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:ce,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:ce,overlineThickness:ce,paintOrder:null,panose1:null,path:null,pathLength:ce,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ce,pointsAtY:ce,pointsAtZ:ce,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$r,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$r,rev:$r,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$r,requiredFeatures:$r,requiredFonts:$r,requiredFormats:$r,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:ce,specularExponent:ce,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ce,strikethroughThickness:ce,string:null,stroke:null,strokeDashArray:$r,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ce,strokeOpacity:ce,strokeWidth:null,style:null,surfaceScale:ce,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$r,tabIndex:ce,tableValues:null,target:null,targetX:ce,targetY:ce,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$r,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ce,underlineThickness:ce,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ce,values:null,vAlphabetic:ce,vMathematical:ce,vectorEffect:null,vHanging:ce,vIdeographic:ce,version:null,vertAdvY:ce,vertOriginX:ce,vertOriginY:ce,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ce,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:DE}),EE=Xs({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()}}),LE=Xs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ME}),IE=Xs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),UG={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"},WG=/[A-Z]/g,PE=/-[a-z]/g,GG=/^data[-\w.:]+$/i;function YG(e,t){const r=px(t);let n=t,i=Lr;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&GG.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(PE,qG);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!PE.test(a)){let o=a.replace(WG,XG);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=yx}return new i(n,t)}function XG(e){return"-"+e.toLowerCase()}function qG(e){return e.charAt(1).toUpperCase()}const KG=CE([AE,VG,EE,LE,IE],"html"),xx=CE([AE,$G,EE,LE,IE],"svg");function ZG(e){return e.join(" ").trim()}var NE=/\/\*(?:[^*]|\*(?!\/))*\*\//g,QG=/\n/g,JG=/^\s*/,eY=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,tY=/^:\s*/,rY=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,nY=/^[;\s]*/,iY=`
|
|
44
|
+
`,RE="/",OE="*",tc="",aY="comment",oY="declaration";function sY(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(QG);y&&(r+=y.length);var x=g.lastIndexOf(iY);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),c(),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 c(){l(JG)}function f(g){for(var y;y=h();)g.push(y);return g}function h(){var g=a();if(!(RE!=e.charAt(0)||OE!=e.charAt(1))){for(var y=2;tc!=e.charAt(y)&&(OE!=e.charAt(y)||RE!=e.charAt(y+1));)++y;if(y+=2,tc===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:aY,comment:x})}}function v(){var g=a(),y=l(eY);if(y){if(h(),!l(tY))return s("property missing ':'");var x=l(rY),b=g({type:oY,property:y[0].replace(NE,tc).trim(),value:x?x[0].replace(NE,tc).trim():tc});return l(nY),b}}function p(){var g=[];f(g);for(var y;y=v();)g.push(y),f(g);return g}return c(),p()}function lY(e,t){let r=null;if(!e||typeof e!="string")return r;const n=sY(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 zE=jE("end"),bx=jE("start");function jE(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 uY(e){const t=bx(e),r=zE(e);if(t&&r)return{start:t,end:r}}function rc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?FE(e.position):"start"in e||"end"in e?FE(e):"line"in e||"column"in e?_x(e):""}function _x(e){return BE(e&&e.line)+":"+BE(e&&e.column)}function FE(e){return _x(e&&e.start)+"-"+_x(e&&e.end)}function BE(e){return e&&typeof e=="number"?e:1}class ir 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=rc(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}}ir.prototype.file="",ir.prototype.name="",ir.prototype.reason="",ir.prototype.message="",ir.prototype.stack="",ir.prototype.column=void 0,ir.prototype.line=void 0,ir.prototype.ancestors=void 0,ir.prototype.cause=void 0,ir.prototype.fatal=void 0,ir.prototype.place=void 0,ir.prototype.ruleId=void 0,ir.prototype.source=void 0;const kx={}.hasOwnProperty,cY=new Map,fY=/[A-Z]/g,dY=/-([a-z])/g,hY=new Set(["table","tbody","thead","tfoot","tr"]),pY=new Set(["td","th"]),HE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function vY(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=kY(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=_Y(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"?xx:KG,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=VE(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function VE(e,t,r){if(t.type==="element")return gY(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return mY(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return xY(e,t,r);if(t.type==="mdxjsEsm")return yY(e,t);if(t.type==="root")return bY(e,t,r);if(t.type==="text")return wY(e,t)}function gY(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=xx,e.schema=i),e.ancestors.push(t);const a=UE(e,t.tagName,!1),o=SY(e,t);let s=Cx(e,t);return hY.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!BG(l):!0})),$E(e,o,a,t),Sx(o,s),e.ancestors.pop(),e.schema=n,e.create(t,a,o,r)}function mY(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)}nc(e,t.position)}function yY(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);nc(e,t.position)}function xY(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=xx,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:UE(e,t.name,!0),o=CY(e,t),s=Cx(e,t);return $E(e,o,a,t),Sx(o,s),e.ancestors.pop(),e.schema=n,e.create(t,a,o,r)}function bY(e,t,r){const n={};return Sx(n,Cx(e,t)),e.create(t,e.Fragment,n,r)}function wY(e,t){return t.value}function $E(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function Sx(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function _Y(e,t,r){return n;function n(i,a,o,s){const c=Array.isArray(o.children)?r:t;return s?c(a,o,s):c(a,o)}}function kY(e,t){return r;function r(n,i,a,o){const s=Array.isArray(a.children),l=bx(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 SY(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&kx.call(t.properties,i)){const a=TY(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&pY.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 CY(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 nc(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 nc(e,t.position);else a=n.value===null?!0:n.value;r[i]=a}return r}function Cx(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:cY;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 c=i.get(l)||0;o=l+"-"+c,i.set(l,c+1)}}const s=VE(e,a,o);s!==void 0&&r.push(s)}return r}function TY(e,t,r){if(r==null||typeof r=="number"&&Number.isNaN(r))return;const n=YG(e.schema,t);return Array.isArray(r)&&(r=n.commaSeparated?RG(r):ZG(r)),n.property==="style"?["style",typeof r=="object"?e.stylePropertyNameCase==="dom"?r:DY(r):AY(e,String(r))]:[e.elementAttributeNameCase==="react"&&n.space?UG[n.property]||n.property:n.attribute,r]}function AY(e,t){const r={};try{lY(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(dY,LY))),r[a]=i}})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,a=new ir("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=HE+"#cannot-parse-style-attribute",a}return r}function UE(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=kE(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=kE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const i=n.value;return kx.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(n);nc(e)}function nc(e,t){const r=new ir("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=HE+"#cannot-handle-mdx-estrees-without-createevaluater",r}function DY(e){const t={};let r;for(r in e)kx.call(e,r)&&(t[MY(r)]=e[r]);return t}function MY(e){if(e.slice(0,2)==="--")return e;let t=e.replace(fY,EY);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function EY(e){return"-"+e.toLowerCase()}function LY(e,t){return t.toUpperCase()}const Tx={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"]},IY={};function Ax(e,t){const r=IY,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return WE(e,n,i)}function WE(e,t,r){if(PY(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 GE(e.children,t,r)}return Array.isArray(e)?GE(e,t,r):""}function GE(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=WE(e[i],t,r);return n.join("")}function PY(e){return!!(e&&typeof e=="object")}const YE=document.createElement("i");function Dx(e){const t="&"+e+";";YE.innerHTML=t;const r=YE.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function On(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?(On(e,e.length,0,t),e):t}const XE={}.hasOwnProperty;function qE(e){const t={};let r=-1;for(;++r<e.length;)NY(t,e[r]);return t}function NY(e,t){let r;for(r in t){const i=(XE.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r];let o;if(a)for(o in a){XE.call(i,o)||(i[o]=[]);const s=a[o];RY(i[o],Array.isArray(s)?s:s?[s]:[])}}}function RY(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);On(e,0,0,n)}function KE(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 zn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Gt=ha(/[A-Za-z]/),Yt=ha(/[\dA-Za-z]/),OY=ha(/[#-'*+\--9=?A-Z^-~]/);function Dh(e){return e!==null&&(e<32||e===127)}const Mx=ha(/\d/),zY=ha(/[\dA-Fa-f]/),ZE=ha(/[!-/:-@[-`{-~]/);function Ne(e){return e!==null&&e<-2}function ft(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const Mh=ha(/\p{P}|\p{S}/u),Po=ha(/\s/);function ha(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function qs(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const a=e.charCodeAt(r);let o="";if(a===37&&Yt(e.charCodeAt(r+1))&&Yt(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 Je(e,t,r,n){const i=n?n-1:1/0;let a=0;return o;function o(l){return Ye(l)?(e.enter(r),s(l)):t(l)}function s(l){return Ye(l)&&a++<i?(e.consume(l),s):(e.exit(r),t(l))}}function QE(e,t,r,n,i,a){let o=0;return s;function s(f){return Ye(f)?(e.enter(n),l(f)):c(f)}function l(f){return Ye(f)&&o<a?(e.consume(f),o++,l):(e.exit(n),c(f))}function c(f){return o>=i?t(f):r(f)}}const jY={tokenize:FY};function FY(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"),Je(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 Ne(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),o)}}let Eh=class{constructor(){this.index=new Map,this.map=[]}add(t,r,n){JE(this,t,r,n,!1)}addBefore(t,r,n){JE(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 JE(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 BY={tokenize:HY},eL={tokenize:VY};function HY(e){const t=this,r=[];let n=0,i,a,o;return s;function s(C){if(n<r.length){const A=r[n];return t.containerState=A[1],e.attempt(A[0].continuation,l,c)(C)}return c(C)}function l(C){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&_();const A=t.events.length;let M=A,D;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){D=t.events[M][1].end;break}b(n);let E=A;for(;E<t.events.length;)t.events[E][1].end={...D},E++;const N=new Eh;return N.add(M+1,0,t.events.slice(A)),N.add(A,E-A,[]),N.consume(t.events),c(C)}return s(C)}function c(C){if(n===r.length){if(!i)return v(C);if(i.currentConstruct&&i.currentConstruct.concrete)return g(C);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(eL,f,h)(C)}function f(C){return i&&_(),b(n),v(C)}function h(C){return t.parser.lazy[t.now().line]=n!==r.length,o=t.now().offset,g(C)}function v(C){return t.containerState={},e.attempt(eL,p,g)(C)}function p(C){return n++,r.push([t.currentConstruct,t.containerState]),v(C)}function g(C){if(C===null){i&&_(),b(0),e.consume(C);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),y(C)}function y(C){if(C===null){x(e.exit("chunkFlow"),!0),b(0),e.consume(C);return}return Ne(C)?(e.consume(C),x(e.exit("chunkFlow")),n=0,t.interrupt=void 0,s):(e.consume(C),y)}function x(C,A){const M=t.sliceStream(C);if(A&&M.push(null),C.previous=a,a&&(a.next=C),a=C,i.defineSkip(C.start),i.write(M),t.parser.lazy[C.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 E=t.events.length;let N=E,O,L;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(O){L=t.events[N][1].end;break}O=!0}for(b(n),D=E;D<t.events.length;)t.events[D][1].end={...L},D++;const R=new Eh;R.add(N+1,0,t.events.slice(E)),R.add(E,D-E,[]),R.consume(t.events)}}function b(C){let A=r.length;for(;A-- >C;){const M=r[A];t.containerState=M[1],M[0].exit.call(t,e)}r.length=C}function _(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function VY(e,t,r){return Je(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function pa(e){if(e===null||ft(e)||Po(e))return 1;if(Mh(e))return 2}function Lh(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 Ex={name:"attention",resolveAll:$Y,tokenize:UY};function $Y(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};tL(o,-a),tL(s,a);const l={type:a>1?"strongSequence":"emphasisSequence",start:o,end:{...e[i][1].end}},c={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}},h={type:a>1?"strong":"emphasis",start:{...l.start},end:{...c.end}};e[i][1].end={...l.start},e[r][1].start={...c.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",h,t],["enter",l,t],["exit",l,t],["enter",f,t]]),n=pn(n,Lh(t.parser.constructs.insideSpan.null,e.slice(i+1,r),t)),n=pn(n,[["exit",f,t],["enter",c,t],["exit",c,t],["exit",h,t]]);let v=0;e[r][1].end.offset-e[r][1].start.offset&&(v=2,n=pn(n,[["enter",e[r][1],t],["exit",e[r][1],t]])),On(e,i-1,r-i+3,n),r=i+n.length-v-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function UY(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=pa(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 c=e.exit("attentionSequence"),f=pa(l),h=!f||f===2&&i||r.includes(l)&&l!==42&&l!==95,v=!i||i===2&&f||r.includes(n)&&n!==42&&n!==95;return c._open=!!(a===42?h:h&&(i||!v)),c._close=!!(a===42?v:v&&(f||!h)),t(l)}}function tL(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const WY={name:"autolink",tokenize:GY};function GY(e,t,r){let n=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return Gt(p)?(e.consume(p),o):p===64?r(p):c(p)}function o(p){return p===43||p===45||p===46||Yt(p)?(n=1,s(p)):c(p)}function s(p){return p===58?(e.consume(p),n=0,l):(p===43||p===45||p===46||Yt(p))&&n++<32?(e.consume(p),s):(n=0,c(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Dh(p)?r(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),f):OY(p)?(e.consume(p),c):r(p)}function f(p){return Yt(p)?h(p):r(p)}function h(p){return p===46?(e.consume(p),n=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):v(p)}function v(p){if((p===45||Yt(p))&&n++<63){const g=p===45?v:h;return e.consume(p),g}return r(p)}}const ic={partial:!0,tokenize:YY};function YY(e,t,r){return n;function n(a){return Ye(a)?Je(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Ne(a)?t(a):r(a)}}const rL={continuation:{tokenize:qY},exit:KY,name:"blockQuote",tokenize:XY};function XY(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 Ye(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function qY(e,t,r){const n=this;return i;function i(o){return Ye(o)?Je(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(rL,t,r)(o)}}function KY(e){e.exit("blockQuote")}const nL={name:"characterEscape",tokenize:ZY};function ZY(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 ZE(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}const iL={name:"characterReference",tokenize:QY};function QY(e,t,r){const n=this;let i=0,a,o;return s;function s(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),l}function l(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,o=Yt,f(h))}function c(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=zY,f):(e.enter("characterReferenceValue"),a=7,o=Mx,f(h))}function f(h){if(h===59&&i){const v=e.exit("characterReferenceValue");return o===Yt&&!Dx(n.sliceSerialize(v))?r(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(h)&&i++<a?(e.consume(h),f):r(h)}}const Lx={partial:!0,tokenize:JY};function JY(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 aL={concrete:!0,name:"codeFenced",tokenize:eX};function eX(e,t,r){const n=this,i={partial:!0,tokenize:M};let a=0,o=0,s;return l;function l(D){return c(D)}function c(D){const E=n.events[n.events.length-1];return a=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[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"),Ye(D)?Je(e,h,"whitespace")(D):h(D))}function h(D){return D===null||Ne(D)?(e.exit("codeFencedFence"),n.interrupt?t(D):e.check(Lx,y,A)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(D))}function v(D){return D===null||Ne(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(D)):Ye(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,p,"whitespace")(D)):D===96&&D===s?r(D):(e.consume(D),v)}function p(D){return D===null||Ne(D)?h(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(D))}function g(D){return D===null||Ne(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(D)):D===96&&D===s?r(D):(e.consume(D),g)}function y(D){return e.attempt(i,A,x)(D)}function x(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),b}function b(D){return a>0&&Ye(D)?Je(e,_,"linePrefix",a+1)(D):_(D)}function _(D){return D===null||Ne(D)?e.check(Lx,y,A)(D):(e.enter("codeFlowValue"),C(D))}function C(D){return D===null||Ne(D)?(e.exit("codeFlowValue"),_(D)):(e.consume(D),C)}function A(D){return e.exit("codeFenced"),t(D)}function M(D,E,N){let O=0;return L;function L(K){return D.enter("lineEnding"),D.consume(K),D.exit("lineEnding"),R}function R(K){return D.enter("codeFencedFence"),Ye(K)?Je(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"),H(K)):N(K)}function H(K){return K===s?(O++,D.consume(K),H):O>=o?(D.exit("codeFencedFenceSequence"),Ye(K)?Je(D,W,"whitespace")(K):W(K)):N(K)}function W(K){return K===null||Ne(K)?(D.exit("codeFencedFence"),E(K)):N(K)}}}const Ix={name:"codeIndented",tokenize:rX},tX={partial:!0,tokenize:nX};function rX(e,t,r){return n;function n(s){return e.enter("codeIndented"),QE(e,i,r,"linePrefix",4,4)(s)}function i(s){return s===null?o(s):Ne(s)?e.attempt(tX,i,o)(s):(e.enter("codeFlowValue"),a(s))}function a(s){return s===null||Ne(s)?(e.exit("codeFlowValue"),i(s)):(e.consume(s),a)}function o(s){return e.exit("codeIndented"),t(s)}}function nX(e,t,r){const n=this;return i;function i(o){return n.parser.lazy[n.now().line]?r(o):Ne(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):QE(e,t,a,"linePrefix",4,4)(o)}function a(o){return Ne(o)?i(o):r(o)}}const iX={name:"codeText",previous:oX,resolve:aX,tokenize:sX};function aX(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 oX(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function sX(e,t,r){let n=0,i,a;return o;function o(h){return e.enter("codeText"),e.enter("codeTextSequence"),s(h)}function s(h){return h===96?(e.consume(h),n++,s):(e.exit("codeTextSequence"),l(h))}function l(h){return h===null?r(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),l):h===96?(a=e.enter("codeTextSequence"),i=0,f(h)):Ne(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(h))}function c(h){return h===null||h===32||h===96||Ne(h)?(e.exit("codeTextData"),l(h)):(e.consume(h),c)}function f(h){return h===96?(e.consume(h),i++,f):i===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(a.type="codeTextData",c(h))}}class lX{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&&ac(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),ac(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ac(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);ac(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ac(this.left,r.reverse())}}}function ac(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 oL(e){const t={};let r=-1,n,i,a,o,s,l,c;const f=new lX(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,uX(f,r)),r=t[r],c=!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 On(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function uX(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=[],c={};let f,h,v=-1,p=r,g=0,y=0;const x=[y];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(f=n.sliceStream(p),p.next||f.push(null),h&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(f),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),h=p,p=p.next}for(p=r;++v<s.length;)s[v][0]==="exit"&&s[v-1][0]==="enter"&&s[v][1].type===s[v-1][1].type&&s[v][1].start.line!==s[v][1].end.line&&(y=v+1,x.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):x.pop(),v=x.length;v--;){const b=s.slice(x[v],x[v+1]),_=a.pop();l.push([_,_+b.length-1]),e.splice(_,2,b)}for(l.reverse(),v=-1;++v<l.length;)c[g+l[v][0]]=g+l[v][1],g+=l[v][1]-l[v][0]-1;return c}const cX={resolve:dX,tokenize:hX},fX={partial:!0,tokenize:pX};function dX(e){return oL(e),e}function hX(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):Ne(s)?e.check(fX,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 pX(e,t,r){const n=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Je(e,a,"linePrefix")}function a(o){if(o===null||Ne(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 sL(e,t,r,n,i,a,o,s,l){const c=l||Number.POSITIVE_INFINITY;let f=0;return h;function h(b){return b===60?(e.enter(n),e.enter(i),e.enter(a),e.consume(b),e.exit(a),v):b===null||b===32||b===41||Dh(b)?r(b):(e.enter(n),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(b))}function v(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"}),p(b))}function p(b){return b===62?(e.exit("chunkString"),e.exit(s),v(b)):b===null||b===60||Ne(b)?r(b):(e.consume(b),b===92?g:p)}function g(b){return b===60||b===62||b===92?(e.consume(b),p):p(b)}function y(b){return!f&&(b===null||b===41||ft(b))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(n),t(b)):f<c&&b===40?(e.consume(b),f++,y):b===41?(e.consume(b),f--,y):b===null||b===32||b===40||Dh(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 lL(e,t,r,n,i,a){const o=this;let s=0,l;return c;function c(p){return e.enter(n),e.enter(i),e.consume(p),e.exit(i),e.enter(a),f}function f(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?r(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(n),t):Ne(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||Ne(p)||s++>999?(e.exit("chunkString"),f(p)):(e.consume(p),l||(l=!Ye(p)),p===92?v:h)}function v(p){return p===91||p===92||p===93?(e.consume(p),s++,h):h(p)}}function uL(e,t,r,n,i,a){let o;return s;function s(v){return v===34||v===39||v===40?(e.enter(n),e.enter(i),e.consume(v),e.exit(i),o=v===40?41:v,l):r(v)}function l(v){return v===o?(e.enter(i),e.consume(v),e.exit(i),e.exit(n),t):(e.enter(a),c(v))}function c(v){return v===o?(e.exit(a),l(o)):v===null?r(v):Ne(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Je(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(v))}function f(v){return v===o||v===null||Ne(v)?(e.exit("chunkString"),c(v)):(e.consume(v),v===92?h:f)}function h(v){return v===o||v===92?(e.consume(v),f):f(v)}}function oc(e,t){let r;return n;function n(i){return Ne(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):Ye(i)?Je(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}const vX={name:"definition",tokenize:mX},gX={partial:!0,tokenize:yX};function mX(e,t,r){const n=this;let i;return a;function a(p){return e.enter("definition"),o(p)}function o(p){return lL.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=zn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):r(p)}function l(p){return ft(p)?oc(e,c)(p):c(p)}function c(p){return sL(e,f,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(gX,h,h)(p)}function h(p){return Ye(p)?Je(e,v,"whitespace")(p):v(p)}function v(p){return p===null||Ne(p)?(e.exit("definition"),n.parser.defined.push(i),t(p)):r(p)}}function yX(e,t,r){return n;function n(s){return ft(s)?oc(e,i)(s):r(s)}function i(s){return uL(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Ye(s)?Je(e,o,"whitespace")(s):o(s)}function o(s){return s===null||Ne(s)?t(s):r(s)}}const xX={name:"hardBreakEscape",tokenize:bX};function bX(e,t,r){return n;function n(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Ne(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const wX={name:"headingAtx",resolve:_X,tokenize:kX};function _X(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"};On(e,n,r-n+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])}return e}function kX(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||ft(f)?(e.exit("atxHeadingSequence"),s(f)):r(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),l(f)):f===null||Ne(f)?(e.exit("atxHeading"),t(f)):Ye(f)?Je(e,s,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function l(f){return f===35?(e.consume(f),l):(e.exit("atxHeadingSequence"),s(f))}function c(f){return f===null||f===35||ft(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),c)}}const cL=["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"],Px=["pre","script","style","textarea"],SX={concrete:!0,name:"htmlFlow",resolveTo:TX,tokenize:AX},CX={partial:!0,tokenize:DX};function TX(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 AX(e,t,r){const n=this;let i,a,o,s,l;return c;function c(F){return f(F)}function f(F){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(F),h}function h(F){return F===33?(e.consume(F),v):F===47?(e.consume(F),a=!0,y):F===63?(e.consume(F),i=3,n.interrupt?t:I):Gt(F)?(e.consume(F),o=String.fromCharCode(F),x):r(F)}function v(F){return F===45?(e.consume(F),i=2,p):F===91?(e.consume(F),i=5,s=0,g):Gt(F)?(e.consume(F),i=4,n.interrupt?t:I):r(F)}function p(F){return F===45?(e.consume(F),n.interrupt?t:I):r(F)}function g(F){const ne="CDATA[";return F===ne.charCodeAt(s++)?(e.consume(F),s===ne.length?n.interrupt?t:j:g):r(F)}function y(F){return Gt(F)?(e.consume(F),o=String.fromCharCode(F),x):r(F)}function x(F){if(F===null||F===47||F===62||ft(F)){const ne=F===47,oe=o.toLowerCase();return!ne&&!a&&Px.includes(oe)?(i=1,n.interrupt?t(F):j(F)):cL.includes(o.toLowerCase())?(i=6,ne?(e.consume(F),b):n.interrupt?t(F):j(F)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(F):a?_(F):C(F))}return F===45||Yt(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 Ye(F)?(e.consume(F),_):L(F)}function C(F){return F===47?(e.consume(F),L):F===58||F===95||Gt(F)?(e.consume(F),A):Ye(F)?(e.consume(F),C):L(F)}function A(F){return F===45||F===46||F===58||F===95||Yt(F)?(e.consume(F),A):M(F)}function M(F){return F===61?(e.consume(F),D):Ye(F)?(e.consume(F),M):C(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,E):Ye(F)?(e.consume(F),D):N(F)}function E(F){return F===l?(e.consume(F),l=null,O):F===null||Ne(F)?r(F):(e.consume(F),E)}function N(F){return F===null||F===34||F===39||F===47||F===60||F===61||F===62||F===96||ft(F)?M(F):(e.consume(F),N)}function O(F){return F===47||F===62||Ye(F)?C(F):r(F)}function L(F){return F===62?(e.consume(F),R):r(F)}function R(F){return F===null||Ne(F)?j(F):Ye(F)?(e.consume(F),R):r(F)}function j(F){return F===45&&i===2?(e.consume(F),Q):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),$):Ne(F)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(CX,Y,H)(F)):F===null||Ne(F)?(e.exit("htmlFlowData"),H(F)):(e.consume(F),j)}function H(F){return e.check(Lx,W,Y)(F)}function W(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),K}function K(F){return F===null||Ne(F)?H(F):(e.enter("htmlFlowData"),j(F))}function Q(F){return F===45?(e.consume(F),I):j(F)}function re(F){return F===47?(e.consume(F),o="",X):j(F)}function X(F){if(F===62){const ne=o.toLowerCase();return Px.includes(ne)?(e.consume(F),z):j(F)}return Gt(F)&&o.length<8?(e.consume(F),o+=String.fromCharCode(F),X):j(F)}function $(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||Ne(F)?(e.exit("htmlFlowData"),Y(F)):(e.consume(F),z)}function Y(F){return e.exit("htmlFlow"),t(F)}}function DX(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ic,t,r)}}const MX={name:"htmlText",tokenize:EX};function EX(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),c):I===47?(e.consume(I),M):I===63?(e.consume(I),C):Gt(I)?(e.consume(I),N):r(I)}function c(I){return I===45?(e.consume(I),f):I===91?(e.consume(I),a=0,g):Gt(I)?(e.consume(I),_):r(I)}function f(I){return I===45?(e.consume(I),p):r(I)}function h(I){return I===null?r(I):I===45?(e.consume(I),v):Ne(I)?(o=h,re(I)):(e.consume(I),h)}function v(I){return I===45?(e.consume(I),p):h(I)}function p(I){return I===62?Q(I):I===45?v(I):h(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):Ne(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?Q(I):I===93?(e.consume(I),b):y(I)}function _(I){return I===null||I===62?Q(I):Ne(I)?(o=_,re(I)):(e.consume(I),_)}function C(I){return I===null?r(I):I===63?(e.consume(I),A):Ne(I)?(o=C,re(I)):(e.consume(I),C)}function A(I){return I===62?Q(I):C(I)}function M(I){return Gt(I)?(e.consume(I),D):r(I)}function D(I){return I===45||Yt(I)?(e.consume(I),D):E(I)}function E(I){return Ne(I)?(o=E,re(I)):Ye(I)?(e.consume(I),E):Q(I)}function N(I){return I===45||Yt(I)?(e.consume(I),N):I===47||I===62||ft(I)?O(I):r(I)}function O(I){return I===47?(e.consume(I),Q):I===58||I===95||Gt(I)?(e.consume(I),L):Ne(I)?(o=O,re(I)):Ye(I)?(e.consume(I),O):Q(I)}function L(I){return I===45||I===46||I===58||I===95||Yt(I)?(e.consume(I),L):R(I)}function R(I){return I===61?(e.consume(I),j):Ne(I)?(o=R,re(I)):Ye(I)?(e.consume(I),R):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,H):Ne(I)?(o=j,re(I)):Ye(I)?(e.consume(I),j):(e.consume(I),W)}function H(I){return I===i?(e.consume(I),i=void 0,K):I===null?r(I):Ne(I)?(o=H,re(I)):(e.consume(I),H)}function W(I){return I===null||I===34||I===39||I===60||I===61||I===96?r(I):I===47||I===62||ft(I)?O(I):(e.consume(I),W)}function K(I){return I===47||I===62||ft(I)?O(I):r(I)}function Q(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"),X}function X(I){return Ye(I)?Je(e,$,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):$(I)}function $(I){return e.enter("htmlTextData"),o(I)}}const Nx={name:"labelEnd",resolveAll:NX,resolveTo:RX,tokenize:OX},LX={tokenize:zX},IX={tokenize:jX},PX={tokenize:FX};function NX(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&&On(e,0,e.length,r),e}function RX(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}},c={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",c,t]]),o=pn(o,Lh(t.parser.constructs.insideSpan.null,e.slice(i+n+4,a-3),t)),o=pn(o,[["exit",c,t],e[a-2],e[a-1],["exit",l,t]]),o=pn(o,e.slice(a+1)),o=pn(o,[["exit",s,t]]),On(e,i,e.length,o),e}function OX(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(v){return a?a._inactive?h(v):(o=n.parser.defined.includes(zn(n.sliceSerialize({start:a.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),l):r(v)}function l(v){return v===40?e.attempt(LX,f,o?f:h)(v):v===91?e.attempt(IX,f,o?c:h)(v):o?f(v):h(v)}function c(v){return e.attempt(PX,f,h)(v)}function f(v){return i.pop(),t(v)}function h(v){return a._balanced=!0,r(v)}}function zX(e,t,r){return n;function n(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return ft(h)?oc(e,a)(h):a(h)}function a(h){return h===41?f(h):sL(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function o(h){return ft(h)?oc(e,l)(h):f(h)}function s(h){return r(h)}function l(h){return h===34||h===39||h===40?uL(e,c,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):f(h)}function c(h){return ft(h)?oc(e,f)(h):f(h)}function f(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):r(h)}}function jX(e,t,r){const n=this;return i;function i(s){return lL.call(n,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return n.parser.defined.includes(zn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function o(s){return r(s)}}function FX(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 BX={name:"labelStartImage",resolveAll:Nx.resolveAll,tokenize:HX};function HX(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 VX={name:"labelStartLink",resolveAll:Nx.resolveAll,tokenize:$X};function $X(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 Rx={name:"lineEnding",tokenize:UX};function UX(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Je(e,t,"linePrefix")}}const Ih={name:"thematicBreak",tokenize:WX};function WX(e,t,r){let n=0,i;return a;function a(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,s(c)}function s(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):n>=3&&(c===null||Ne(c))?(e.exit("thematicBreak"),t(c)):r(c)}function l(c){return c===i?(e.consume(c),n++,l):(e.exit("thematicBreakSequence"),Ye(c)?Je(e,s,"whitespace")(c):s(c))}}const Ir={continuation:{tokenize:qX},exit:ZX,name:"list",tokenize:XX},GX={partial:!0,tokenize:QX},YX={partial:!0,tokenize:KX};function XX(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(p){const g=n.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!n.containerState.marker||p===n.containerState.marker:Mx(p)){if(n.containerState.type||(n.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Ih,r,c)(p):c(p);if(!n.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return r(p)}function l(p){return Mx(p)&&++o<10?(e.consume(p),l):(!n.interrupt||o<2)&&(n.containerState.marker?p===n.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):r(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||p,e.check(ic,n.interrupt?r:f,e.attempt(GX,v,h))}function f(p){return n.containerState.initialBlankLine=!0,a++,v(p)}function h(p){return Ye(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),v):r(p)}function v(p){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function qX(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(ic,i,a);function i(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Je(e,t,"listItemIndent",n.containerState.size+1)(s)}function a(s){return n.containerState.furtherBlankLines||!Ye(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(YX,t,o)(s))}function o(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,Je(e,e.attempt(Ir,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function KX(e,t,r){const n=this;return Je(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 ZX(e){e.exit(this.containerState.type)}function QX(e,t,r){const n=this;return Je(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!Ye(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const fL={name:"setextUnderline",resolveTo:JX,tokenize:eq};function JX(e,t){const r=new Eh;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 eq(e,t,r){const n=this;let i;return a;function a(c){let f=n.events.length,h;for(;f--;)if(n.events[f][1].type!=="lineEnding"&&n.events[f][1].type!=="linePrefix"&&n.events[f][1].type!=="content"){h=n.events[f][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||h)?(e.enter("setextHeadingLine"),i=c,o(c)):r(c)}function o(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),Ye(c)?Je(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Ne(c)?(e.exit("setextHeadingLine"),t(c)):r(c)}}const tq={tokenize:rq};function rq(e){const t=this,r=e.attempt(ic,n,e.attempt(this.parser.constructs.flowInitial,i,Je(e,e.attempt(this.parser.constructs.flow,i,e.attempt(cX,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 nq={resolveAll:hL()},iq=dL("string"),aq=dL("text");function dL(e){return{resolveAll:hL(e==="text"?oq: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 c(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 c(f)?(r.exit("data"),a(f)):(r.consume(f),l)}function c(f){if(f===null)return!0;const h=i[f];let v=-1;if(h)for(;++v<h.length;){const p=h[v];if(!p.previous||p.previous.call(n,n.previous))return!0}return!1}}}function hL(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 oq(e,t){const r=new Eh;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,c;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)c=!0,l++;else if(f!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const f={type:n===e.length||c||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 sq=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:vX},disable:{null:[]},document:{42:Ir,43:Ir,45:Ir,48:Ir,49:Ir,50:Ir,51:Ir,52:Ir,53:Ir,54:Ir,55:Ir,56:Ir,57:Ir,62:rL},flow:{35:wX,42:Ih,45:[fL,Ih],60:SX,61:fL,95:Ih,96:aL,126:aL},flowInitial:{[-2]:Ix,[-1]:Ix,32:Ix},insideSpan:{null:[Ex,nq]},string:{38:iL,92:nL},text:{[-5]:Rx,[-4]:Rx,[-3]:Rx,33:BX,38:iL,42:Ex,60:[WY,MX],91:VX,92:[xX,nL],93:Nx,95:Ex,96:iX}},Symbol.toStringTag,{value:"Module"}));function lq(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:E(M),check:E(D),consume:_,enter:C,exit:A,interrupt:E(D,{interrupt:!0})},c={code:null,containerState:{},defineSkip:y,events:[],now:g,parser:e,previous:null,sliceSerialize:v,sliceStream:p,write:h};let f=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function h(R){return o=pn(o,R),x(),o[o.length-1]!==null?[]:(N(t,0),c.events=Lh(a,c.events,c),c.events)}function v(R,j){return cq(p(R),j)}function p(R){return uq(o,R)}function g(){const{_bufferIndex:R,_index:j,line:H,column:W,offset:K}=n;return{_bufferIndex:R,_index:j,line:H,column:W,offset:K}}function y(R){i[R.line]=R.column,L()}function x(){for(;n._index<o.length;){const R=o[n._index];if(typeof R=="string"){const j=n._index;for(n._bufferIndex<0&&(n._bufferIndex=0);n._index===j&&n._bufferIndex<R.length;)b(R.charCodeAt(n._bufferIndex))}else b(R)}}function b(R){f=f(R)}function _(R){Ne(R)?(n.line++,n.column=1,n.offset+=R===-3?2:1,L()):R!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===o[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=R}function C(R,j){const H=j||{};return H.type=R,H.start=g(),c.events.push(["enter",H,c]),s.push(H),H}function A(R){const j=s.pop();return j.end=g(),c.events.push(["exit",j,c]),j}function M(R,j){N(R,j.from)}function D(R,j){j.restore()}function E(R,j){return H;function H(W,K,Q){let re,X,$,I;return Array.isArray(W)?Y(W):"tokenize"in W?Y([W]):z(W);function z(le){return Me;function Me(we){const De=we!==null&&le[we],_e=we!==null&&le.null,Ce=[...Array.isArray(De)?De:De?[De]:[],...Array.isArray(_e)?_e:_e?[_e]:[]];return Y(Ce)(we)}}function Y(le){return re=le,X=0,le.length===0?Q:F(le[X])}function F(le){return Me;function Me(we){return I=O(),$=le,le.partial||(c.currentConstruct=le),le.name&&c.parser.constructs.disable.null.includes(le.name)?oe():le.tokenize.call(j?Object.assign(Object.create(c),j):c,l,ne,oe)(we)}}function ne(le){return R($,I),K}function oe(le){return I.restore(),++X<re.length?F(re[X]):Q}}}function N(R,j){R.resolveAll&&!a.includes(R)&&a.push(R),R.resolve&&On(c.events,j,c.events.length-j,R.resolve(c.events.slice(j),c)),R.resolveTo&&(c.events=R.resolveTo(c.events,c))}function O(){const R=g(),j=c.previous,H=c.currentConstruct,W=c.events.length,K=Array.from(s);return{from:W,restore:Q};function Q(){n=R,c.previous=j,c.currentConstruct=H,c.events.length=W,s=K,L()}}function L(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function uq(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 cq(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 fq(e){const n={constructs:qE([sq,...(e||{}).extensions||[]]),content:i(jY),defined:[],document:i(BY),flow:i(tq),lazy:{},string:i(iq),text:i(aq)};return n;function i(a){return o;function o(s){return lq(n,a,s)}}}function dq(e){for(;!oL(e););return e}const pL=/[\0\t\n\r]/g;function hq(){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 c=0;for(t="",r&&(a.charCodeAt(0)===65279&&c++,r=void 0);c<a.length;){pL.lastIndex=c;const f=pL.exec(a),h=f&&f.index!==void 0?f.index:a.length,v=a.charCodeAt(h);if(!f){t=a.slice(c);break}if(v===10&&c===h&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),c<h&&(l.push(a.slice(c,h)),e+=h-c),v){case 0:{l.push(65533),e++;break}case 9:{const p=Math.ceil(e/4)*4;for(l.push(-2);e++<p;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:n=!0,e=1}c=h+1}return s&&(n&&l.push(-5),t&&l.push(t),l.push(null)),l}}const pq=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function vq(e){return e.replace(pq,gq)}function gq(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const i=r.charCodeAt(1),a=i===120||i===88;return KE(r.slice(a?2:1),a?16:10)}return Dx(r)||e}const vL={}.hasOwnProperty;function mq(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),yq(r)(dq(fq(r).document().write(hq()(e,t,!0))))}function yq(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(oi),autolinkProtocol:L,autolinkEmail:L,atxHeading:o(vr),blockQuote:o(Ce),characterEscape:L,characterReference:L,codeFenced:o(Ve),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(Ve,s),codeText:o(Xt,s),codeTextData:L,data:L,codeFlowValue:L,definition:o(wt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Ur),hardBreakEscape:o(vn),hardBreakTrailing:o(vn),htmlFlow:o(Oo,s),htmlFlowData:L,htmlText:o(Oo,s),htmlTextData:L,image:o(gn),label:s,link:o(oi),listItem:o(ga),listItemValue:p,listOrdered:o(gr,v),listUnordered:o(gr),paragraph:o(ma),reference:ne,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(vr),strong:o(Yh),thematicBreak:o(qh)},exit:{atxHeading:c(),atxHeadingSequence:D,autolink:c(),autolinkEmail:_e,autolinkProtocol:De,blockQuote:c(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:Me,characterReference:we,codeFenced:c(b),codeFencedFence:x,codeFencedFenceInfo:g,codeFencedFenceMeta:y,codeFlowValue:R,codeIndented:c(_),codeText:c(Q),codeTextData:R,data:R,definition:c(),definitionDestinationString:M,definitionLabelString:C,definitionTitleString:A,emphasis:c(),hardBreakEscape:c(H),hardBreakTrailing:c(H),htmlFlow:c(W),htmlFlowData:R,htmlText:c(K),htmlTextData:R,image:c(X),label:I,labelText:$,lineEnding:j,link:c(re),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:oe,resourceDestinationString:z,resourceTitleString:Y,resource:F,setextHeading:c(O),setextHeadingLineSequence:N,setextHeadingText:E,strong:c(),thematicBreak:c()}};gL(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(te){let de={type:"root",children:[],position:void 0};const Oe={stack:[de],tokenStack:[],config:t,enter:l,exit:f,buffer:s,resume:h,data:r},Fe=[],Pt=[];let dt=-1;for(;++dt<te.length;)if(Pt.push(te[dt]),te[dt][1].type==="listOrdered"||te[dt][1].type==="listUnordered")if(te[dt][0]==="enter")Fe.push(Pt.length-1);else{const qt=Fe.pop();a(Pt,qt)}for(te=Pt,dt=-1;++dt<te.length;){const qt=t[te[dt][0]];te[dt][0]==="enter"&&t.beforeEnter.length>0&&i(t.beforeEnter,{...Oe,sliceSerialize:te[dt][2].sliceSerialize},te[dt][1]),vL.call(qt,te[dt][1].type)&&qt[te[dt][1].type].call({...Oe,sliceSerialize:te[dt][2].sliceSerialize},te[dt][1]),te[dt][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...Oe,sliceSerialize:te[dt][2].sliceSerialize},te[dt][1])}if(Oe.tokenStack.length>0){const qt=Oe.tokenStack[Oe.tokenStack.length-1];(qt[1]||mL).call(Oe,void 0,qt[0])}for(de.position={start:va(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:va(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},dt=-1;++dt<t.transforms.length;)de=t.transforms[dt](de)||de;return de}function i(te,de,Oe){let Fe=-1;for(;++Fe<te.length;)te[Fe].call(de,Oe)}function a(te,de){const Oe=te.length-1;let Fe=de-1,Pt=-1,dt=!1,qt,Wr,zo,Di;const Mi=[];for(;++Fe<=Oe;){const Kt=te[Fe];switch(Kt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Kt[0]==="enter"?Pt++:Pt--,Di=void 0;break}case"lineEndingBlank":{Kt[0]==="enter"&&(qt&&!Di&&!Pt&&!zo&&(zo=Fe),Di=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Di=void 0}if(!Pt&&Kt[0]==="enter"&&Kt[1].type==="listItemPrefix"||Pt===-1&&Kt[0]==="exit"&&(Kt[1].type==="listUnordered"||Kt[1].type==="listOrdered")){if(qt){let Gr=Fe;for(Wr=void 0;Gr--;){const ar=te[Gr];if(ar[1].type==="lineEnding"||ar[1].type==="lineEndingBlank"){if(ar[0]==="exit")continue;Wr&&(te[Wr][1].type="lineEndingBlank",dt=!0),ar[1].type="lineEnding",Wr=Gr}else if(!(ar[1].type==="linePrefix"||ar[1].type==="blockQuotePrefix"||ar[1].type==="blockQuotePrefixWhitespace"||ar[1].type==="blockQuoteMarker"||ar[1].type==="listItemIndent"))break}zo&&(!Wr||zo<Wr)&&(qt._spread=!0),qt.end=Object.assign({},Wr?te[Wr][1].start:Kt[1].end),Mi.push({at:Wr||Fe,event:["exit",qt,Kt[2]]})}if(Kt[1].type==="listItemPrefix"){const Gr={type:"listItem",_spread:!1,start:Object.assign({},Kt[1].start),end:void 0};qt=Gr,Mi.push({at:Fe,event:["enter",Gr,Kt[2]]}),zo=void 0,Di=!0}}}const Js=te.splice(de);let jo=0;for(Fe=-1;++Fe<Js.length;){for(;jo<Mi.length&&Mi[jo].at===de+Fe;)te.push(Mi[jo++].event);te.push(Js[Fe])}te[de][1]._spread=dt}function o(te,de){return Oe;function Oe(Fe){l.call(this,te(Fe),Fe),de&&de.call(this,Fe)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(te,de,Oe){this.stack[this.stack.length-1].children.push(te),this.stack.push(te),this.tokenStack.push([de,Oe||void 0]),te.position={start:va(de.start),end:void 0}}function c(te){return de;function de(Oe){te&&te.call(this,Oe),f.call(this,Oe)}}function f(te,de){const Oe=this.stack.pop(),Fe=this.tokenStack.pop();if(!Fe)throw new Error("Cannot close `"+te.type+"` ("+rc({start:te.start,end:te.end})+"): it’s not open");Fe[0].type!==te.type&&(de?de.call(this,te,Fe[0]):(Fe[1]||mL).call(this,te,Fe[0])),Oe.position.end=va(te.end)}function h(){return Ax(this.stack.pop())}function v(){this.data.expectingFirstListItemValue=!0}function p(te){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(te),10),this.data.expectingFirstListItemValue=void 0}}function g(){const te=this.resume(),de=this.stack[this.stack.length-1];de.lang=te}function y(){const te=this.resume(),de=this.stack[this.stack.length-1];de.meta=te}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te.replace(/(\r?\n|\r)$/g,"")}function C(te){const de=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=de,Oe.identifier=zn(this.sliceSerialize(te)).toLowerCase()}function A(){const te=this.resume(),de=this.stack[this.stack.length-1];de.title=te}function M(){const te=this.resume(),de=this.stack[this.stack.length-1];de.url=te}function D(te){const de=this.stack[this.stack.length-1];if(!de.depth){const Oe=this.sliceSerialize(te).length;de.depth=Oe}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function N(te){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(te).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function L(te){const Oe=this.stack[this.stack.length-1].children;let Fe=Oe[Oe.length-1];(!Fe||Fe.type!=="text")&&(Fe=Xh(),Fe.position={start:va(te.start),end:void 0},Oe.push(Fe)),this.stack.push(Fe)}function R(te){const de=this.stack.pop();de.value+=this.sliceSerialize(te),de.position.end=va(te.end)}function j(te){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=de.children[de.children.length-1];Oe.position.end=va(te.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(de.type)&&(L.call(this,te),R.call(this,te))}function H(){this.data.atHardBreak=!0}function W(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te}function K(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te}function Q(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te}function re(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=de,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function X(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=de,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function $(te){const de=this.sliceSerialize(te),Oe=this.stack[this.stack.length-2];Oe.label=vq(de),Oe.identifier=zn(de).toLowerCase()}function I(){const te=this.stack[this.stack.length-1],de=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){const Fe=te.children;Oe.children=Fe}else Oe.alt=de}function z(){const te=this.resume(),de=this.stack[this.stack.length-1];de.url=te}function Y(){const te=this.resume(),de=this.stack[this.stack.length-1];de.title=te}function F(){this.data.inReference=void 0}function ne(){this.data.referenceType="collapsed"}function oe(te){const de=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=de,Oe.identifier=zn(this.sliceSerialize(te)).toLowerCase(),this.data.referenceType="full"}function le(te){this.data.characterReferenceType=te.type}function Me(te){const de=this.sliceSerialize(te),Oe=this.data.characterReferenceType;let Fe;Oe?(Fe=KE(de,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Fe=Dx(de);const Pt=this.stack[this.stack.length-1];Pt.value+=Fe}function we(te){const de=this.stack.pop();de.position.end=va(te.end)}function De(te){R.call(this,te);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(te)}function _e(te){R.call(this,te);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(te)}function Ce(){return{type:"blockquote",children:[],position:void 0}}function Ve(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function Xt(){return{type:"inlineCode",value:"",position:void 0}}function wt(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function Ur(){return{type:"emphasis",children:[],position:void 0}}function vr(){return{type:"heading",depth:0,children:[],position:void 0}}function vn(){return{type:"break",position:void 0}}function Oo(){return{type:"html",value:"",position:void 0}}function gn(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function oi(){return{type:"link",title:null,url:"",children:[],position:void 0}}function gr(te){return{type:"list",ordered:te.type==="listOrdered",start:null,spread:te._spread,children:[],position:void 0}}function ga(te){return{type:"listItem",spread:te._spread,checked:null,children:[],position:void 0}}function ma(){return{type:"paragraph",children:[],position:void 0}}function Yh(){return{type:"strong",children:[],position:void 0}}function Xh(){return{type:"text",value:"",position:void 0}}function qh(){return{type:"thematicBreak",position:void 0}}}function va(e){return{line:e.line,column:e.column,offset:e.offset}}function gL(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?gL(e,n):xq(e,n)}}function xq(e,t){let r;for(r in t)if(vL.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 mL(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+rc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+rc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+rc({start:t.start,end:t.end})+") is still open")}function bq(e){const t=this;t.parser=r;function r(n){return mq(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function wq(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 _q(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
47
|
+
`}]}function kq(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 Sq(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Cq(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Tq(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=qs(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 c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function Aq(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 Dq(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function yL(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 Mq(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return yL(e,t);const i={src:qs(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 Eq(e,t){const r={src:qs(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 Lq(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 Iq(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return yL(e,t);const i={href:qs(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 Pq(e,t){const r={href:qs(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 Nq(e,t,r){const n=e.all(t),i=r?Rq(r):xL(t),a={},o=[];if(typeof t.checked=="boolean"){const f=n[0];let h;f&&f.type==="element"&&f.tagName==="p"?h=f:(h={type:"element",tagName:"p",properties:{},children:[]},n.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.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 c={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,c),e.applyData(t,c)}function Rq(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=xL(r[n])}return t}function xL(e){const t=e.spread;return t??e.children.length>1}function Oq(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 zq(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function jq(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function Fq(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Bq(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=bx(t.children[1]),l=zE(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 Hq(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 c=[];for(;++l<s;){const h=t.children[l],v={},p=o?o[l]:void 0;p&&(v.align=p);let g={type:"element",tagName:a,properties:v,children:[]};h&&(g.children=e.all(h),e.patch(h,g),g=e.applyData(h,g)),c.push(g)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function Vq(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const bL=9,wL=32;function $q(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const a=[];for(;n;)a.push(_L(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return a.push(_L(t.slice(i),i>0,!1)),a.join("")}function _L(e,t,r){let n=0,i=e.length;if(t){let a=e.codePointAt(n);for(;a===bL||a===wL;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(i-1);for(;a===bL||a===wL;)i--,a=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function Uq(e,t){const r={type:"text",value:$q(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function Wq(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const Gq={blockquote:wq,break:_q,code:kq,delete:Sq,emphasis:Cq,footnoteReference:Tq,heading:Aq,html:Dq,imageReference:Mq,image:Eq,inlineCode:Lq,linkReference:Iq,link:Pq,listItem:Nq,list:Oq,paragraph:zq,root:jq,strong:Fq,table:Bq,tableCell:Vq,tableRow:Hq,text:Uq,thematicBreak:Wq,toml:Ph,yaml:Ph,definition:Ph,footnoteDefinition:Ph};function Ph(){}const kL=-1,Nh=0,sc=1,Rh=2,Ox=3,zx=4,jx=5,Fx=6,SL=7,CL=8,{defineProperty:Yq}=Object,TL=typeof self=="object"?self:globalThis,AL=(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 TL[e](t)},Xq=(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 Nh:case kL:return r(o,i);case sc:{const s=r([],i);for(const l of o)s.push(n(l));return s}case Rh:{const s=r({},i);for(const[l,c]of o){const f=n(l),h=n(c);f==="__proto__"?Yq(s,f,{value:h,configurable:!0,enumerable:!0,writable:!0}):s[f]=h}return s}case Ox:return r(new Date(o),i);case zx:{const{source:s,flags:l}=o;return r(new RegExp(s,l),i)}case jx:{const s=r(new Map,i);for(const[l,c]of o)s.set(n(l),n(c));return s}case Fx:{const s=r(new Set,i);for(const l of o)s.add(n(l));return s}case SL:{const{name:s,message:l}=o;return r(typeof TL[s]=="function"?AL(s,l):new Error(l),i)}case CL: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(AL(a,o),i)};return n},DL=e=>Xq(new Map,e)(0),No="",{toString:qq}={},{keys:Kq,is:Zq}=Object,lc=e=>{const t=typeof e;if(t!=="object"||!e)return[Nh,t];const r=qq.call(e).slice(8,-1);switch(r){case"Array":return[sc,No];case"Object":return[Rh,No];case"Date":return[Ox,No];case"RegExp":return[zx,No];case"Map":return[jx,No];case"Set":return[Fx,No];case"DataView":return[sc,r]}return r.includes("Array")?[sc,r]:e instanceof Error?[SL,e.name||"Error"]:[Rh,r]},Oh=([e,t])=>e===Nh&&(t==="function"||t==="symbol"),Qq=(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]=lc(o);switch(s){case Nh:{let f=o;switch(l){case"bigint":s=CL,f=o.toString();break;case"number":if(!o&&Zq(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([kL],o)}return i([s,f],o)}case sc:{if(l){let v=o;return l==="DataView"?v=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(v=new Uint8Array(o)),i([l,[...v]],o)}const f=[],h=i([s,f],o);for(const v of o)f.push(a(v));return h}case Rh:{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=[],h=i([s,f],o);for(const v of Kq(o))(e||!Oh(lc(o[v])))&&f.push([a(v),a(o[v])]);return h}case Ox:return i([s,isNaN(o.getTime())?No:o.toISOString()],o);case zx:{const{source:f,flags:h}=o;return i([s,{source:f,flags:h}],o)}case jx:{const f=[],h=i([s,f],o);for(const[v,p]of o)(e||!(Oh(lc(v))||Oh(lc(p))))&&f.push([a(v),a(p)]);return h}case Fx:{const f=[],h=i([s,f],o);for(const v of o)(e||!Oh(lc(v)))&&f.push(a(v));return h}}const{message:c}=o;return i([s,{name:l,message:c}],o)};return a},ML=(e,{json:t,lossy:r}={})=>{const n=[];return Qq(!(t||r),!!t,new Map,n)(e),n},zh=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?DL(ML(e,t)):structuredClone(e):(e,t)=>DL(ML(e,t));function Jq(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 eK(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function tK(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||Jq,n=e.options.footnoteBackLabel||eK,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 c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const f=e.all(c),h=String(c.identifier).toUpperCase(),v=qs(h.toLowerCase());let p=0;const g=[],y=e.footnoteCounts.get(h);for(;y!==void 0&&++p<=y;){g.length>0&&g.push({type:"text",value:" "});let _=typeof r=="string"?r:r(l,p);typeof _=="string"&&(_={type:"text",value:_}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,p),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-"+v},children:e.wrap(f,!0)};e.patch(c,b),s.push(b)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...zh(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 jh=(function(e){if(e==null)return aK;if(typeof e=="function")return Fh(e);if(typeof e=="object")return Array.isArray(e)?rK(e):nK(e);if(typeof e=="string")return iK(e);throw new Error("Expected function, string, or object as test")});function rK(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=jh(e[r]);return Fh(n);function n(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function nK(e){const t=e;return Fh(r);function r(n){const i=n;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function iK(e){return Fh(t);function t(r){return r&&r.type===e}}function Fh(e){return t;function t(r,n,i){return!!(oK(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function aK(){return!0}function oK(e){return e!==null&&typeof e=="object"&&"type"in e}function Ire(e){return e}const EL=[],sK=!0,Bh=!1,Bx="skip";function Hx(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 c=jh(a),f=i?1:-1;h(e,void 0,[])();function h(v,p,g){const y=v&&typeof v=="object"?v:{};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 ("+(v.type+(b?"<"+b+">":""))+")"})}return x;function x(){const b=!a||c(v,p,g[g.length-1]||void 0);let _=EL;if(s&&b&&(_=LL(s(v,g,p)),_[0]===Bh))return _;if("children"in v&&v.children){const C=v;if(C.children&&_[0]!==Bx){let A=(i?-1:C.children.length)+f;const M=[...g,C];for(;A>-1&&A<C.children.length;){const D=C.children[A],E=h(D,A,M)();if(E[0]===Bh)return E;A=typeof E[1]=="number"?E[1]:A+f}}}if(l&&b){const C=LL(l(v,g,p));if(C[0]===Bx)throw new Error("Unexpected value `"+C[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(C[0]===Bh||typeof C[1]=="number")return C}return _}}}function LL(e){return Array.isArray(e)?e:typeof e=="number"?[sK,e]:e==null?EL:[e]}function Vx(e,t,r,n){let i,a,o;a=t,o=r,typeof a=="function"?Hx(e,i,$x(a),o):Hx(e,i,lK(a),o)}function lK(e){return!e||typeof e!="object"?e:{enter:typeof e.enter=="function"?$x(e.enter):e.enter,exit:typeof e.exit=="function"?$x(e.exit):e.exit}}function $x(e){return t;function t(r,n,i){return e(r,i,n[n.length-1])}}const Ux={}.hasOwnProperty,uK={};function cK(e,t){const r=t||uK,n=new Map,i=new Map,a=new Map,o={...Gq,...r.handlers},s={all:c,applyData:dK,definitionById:n,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:l,options:r,patch:fK,wrap:pK};return Vx(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const h=f.type==="definition"?n:i,v=String(f.identifier).toUpperCase();h.has(v)||h.set(v,f)}}),s;function l(f,h){const v=f.type,p=s.handlers[v];if(Ux.call(s.handlers,v)&&p)return p(s,f,h);if(s.options.passThrough&&s.options.passThrough.includes(v)){if("children"in f){const{children:y,...x}=f,b=zh(x);return b.children=s.all(f),b}return zh(f)}return(s.options.unknownHandler||hK)(s,f,h)}function c(f){const h=[];if("children"in f){const v=f.children;let p=-1;for(;++p<v.length;){const g=s.one(v[p],f);if(g){if(p&&v[p-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=IL(g.value)),!Array.isArray(g)&&g.type==="element")){const y=g.children[0];y&&y.type==="text"&&(y.value=IL(y.value))}Array.isArray(g)?h.push(...g):h.push(g)}}}return h}}function fK(e,t){e.position&&(t.position=uY(e))}function dK(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,zh(a)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function hK(e,t){const r=t.data||{},n="value"in t&&!(Ux.call(r,"hProperties")||Ux.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 pK(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 IL(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function PL(e,t){const r=cK(e,t),n=r.one(e,void 0),i=tK(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 vK(e,t){return e&&"run"in e?async function(r,n){const i=PL(r,{file:n,...t});await e.run(i,n)}:function(r,n){return PL(r,{file:n,...e||t})}}function NL(e){if(e)throw e}var Wx,RL;function gK(){if(RL)return Wx;RL=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var f=e.call(c,"constructor"),h=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!f&&!h)return!1;var v;for(v in c);return typeof v>"u"||e.call(c,v)},o=function(c,f){r&&f.name==="__proto__"?r(c,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):c[f.name]=f.newValue},s=function(c,f){if(f==="__proto__")if(e.call(c,f)){if(n)return n(c,f).value}else return;return c[f]};return Wx=function l(){var c,f,h,v,p,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(c=arguments[x],c!=null)for(f in c)h=s(y,f),v=s(c,f),y!==v&&(_&&v&&(a(v)||(p=i(v)))?(p?(p=!1,g=h&&i(h)?h:[]):g=h&&a(h)?h:{},o(y,{name:f,newValue:l(_,g,v)})):typeof v<"u"&&o(y,{name:f,newValue:v}));return y},Wx}var mK=gK();const Gx=za(mK);function Yx(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 yK(){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,...c){const f=e[++a];let h=-1;if(l){o(l);return}for(;++h<i.length;)(c[h]===null||c[h]===void 0)&&(c[h]=i[h]);i=c,f?xK(f,s)(...c):o(null,...c)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function xK(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(c){const f=c;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 ii={basename:bK,dirname:wK,extname:_K,join:kK,sep:"/"};function bK(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');uc(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 wK(e){if(uc(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 _K(e){uc(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 kK(...e){let t=-1,r;for(;++t<e.length;)uc(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":SK(r)}function SK(e){uc(e);const t=e.codePointAt(0)===47;let r=CK(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function CK(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 uc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const TK={cwd:AK};function AK(){return"/"}function Xx(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function DK(e){if(typeof e=="string")e=new URL(e);else if(!Xx(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 MK(e)}function MK(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 qx=["history","path","basename","stem","extname","dirname"];class OL{constructor(t){let r;t?Xx(t)?r={path:t}:typeof t=="string"||EK(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":TK.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<qx.length;){const a=qx[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)qx.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?ii.basename(this.path):void 0}set basename(t){Zx(t,"basename"),Kx(t,"basename"),this.path=ii.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ii.dirname(this.path):void 0}set dirname(t){zL(this.basename,"dirname"),this.path=ii.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ii.extname(this.path):void 0}set extname(t){if(Kx(t,"extname"),zL(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=ii.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Xx(t)&&(t=DK(t)),Zx(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ii.basename(this.path,this.extname):void 0}set stem(t){Zx(t,"stem"),Kx(t,"stem"),this.path=ii.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 ir(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 Kx(e,t){if(e&&e.includes(ii.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ii.sep+"`")}function Zx(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function zL(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function EK(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const LK=(function(e){const n=this.constructor.prototype,i=n[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,n),a}),IK={}.hasOwnProperty;class Qx extends LK{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=yK()}copy(){const t=new Qx;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(Gx(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(t1("data",this.frozen),this.namespace[t]=r,this):IK.call(this.namespace,t)&&this.namespace[t]||void 0:t?(t1("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=Hh(t),n=this.parser||this.Parser;return Jx("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),Jx("process",this.parser||this.Parser),e1("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,o){const s=Hh(t),l=n.parse(s);n.run(l,s,function(f,h,v){if(f||!h||!v)return c(f);const p=h,g=n.stringify(p,v);RK(g)?v.value=g:v.result=g,c(f,v)});function c(f,h){f||!h?o(f):a?a(h):r(void 0,h)}}}processSync(t){let r=!1,n;return this.freeze(),Jx("processSync",this.parser||this.Parser),e1("processSync",this.compiler||this.Compiler),this.process(t,i),FL("processSync","process",r),n;function i(a,o){r=!0,NL(a),n=o}}run(t,r,n){jL(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=Hh(r);i.run(t,l,c);function c(f,h,v){const p=h||t;f?s(f):o?o(p):n(void 0,p,v)}}}runSync(t,r){let n=!1,i;return this.run(t,r,a),FL("runSync","run",n),i;function a(o,s){NL(o),i=s,n=!0}}stringify(t,r){this.freeze();const n=Hh(r),i=this.compiler||this.Compiler;return e1("stringify",i),jL(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(t1("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(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...h]=c;l(f,h)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))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(c.plugins),c.settings&&(i.settings=Gx(!0,i.settings,c.settings))}function s(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const h=c[f];a(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,f){let h=-1,v=-1;for(;++h<n.length;)if(n[h][0]===c){v=h;break}if(v===-1)n.push([c,...f]);else if(f.length>0){let[p,...g]=f;const y=n[v][1];Yx(y)&&Yx(p)&&(p=Gx(!0,y,p)),n[v]=[c,p,...g]}}}}const PK=new Qx().freeze();function Jx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function e1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function t1(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 jL(e){if(!Yx(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function FL(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Hh(e){return NK(e)?e:new OL(e)}function NK(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function RK(e){return typeof e=="string"||OK(e)}function OK(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const zK="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",BL=[],HL={allowDangerousHtml:!0},jK=/^(https?|ircs?|mailto|xmpp)$/i,FK=[{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 BK(e){const t=HK(e),r=VK(e);return $K(t.runSync(t.parse(r),r),e)}function HK(e){const t=e.rehypePlugins||BL,r=e.remarkPlugins||BL,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...HL}:HL;return PK().use(bq).use(r).use(vK,n).use(t)}function VK(e){const t=e.children||"",r=new OL;return typeof t=="string"&&(r.value=t),r}function $K(e,t){const r=t.allowedElements,n=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||UK;for(const f of FK)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+zK+f.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Vx(e,c),vY(e,{Fragment:k.Fragment,components:i,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0});function c(f,h,v){if(f.type==="raw"&&v&&typeof h=="number")return o?v.children.splice(h,1):v.children[h]={type:"text",value:f.value},h;if(f.type==="element"){let p;for(p in Tx)if(Object.hasOwn(Tx,p)&&Object.hasOwn(f.properties,p)){const g=f.properties[p],y=Tx[p];(y===null||y.includes(f.tagName))&&(f.properties[p]=l(String(g||""),p,f))}}if(f.type==="element"){let p=r?!r.includes(f.tagName):a?a.includes(f.tagName):!1;if(!p&&n&&typeof h=="number"&&(p=!n(f,h,v)),p&&v&&typeof h=="number")return s&&f.children?v.children.splice(h,1,...f.children):v.children.splice(h,1),h}}}function UK(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||jK.test(e.slice(0,t))?e:""}function WK(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function VL(e,t,r){const i=jh((r||{}).ignore||[]),a=GK(t);let o=-1;for(;++o<a.length;)Hx(e,s);function s(c,f,h){if(c.type==="text"&&typeof h=="number")return l(c,f,h);if(i(c,h,f[f.length-1]))return Bx}function l(c,f,h){const v=f[f.length-1],p=a[o][0],g=a[o][1];let y=0,x=!1,b=[];p.lastIndex=0;let _=p.exec(c.value);for(;_;){const A=_.index,M={index:_.index,input:_.input,stack:[...f,c]};let D=g(..._,M);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1)p.lastIndex=A+1;else{if(y!==A&&C({type:"text",value:c.value.slice(y,A)}),Array.isArray(D))for(const E of D)C(E);else D&&C(D);y=A+_[0].length,x=!0}if(!p.global)break;_=p.exec(c.value)}return x?(y<c.value.length&&C({type:"text",value:c.value.slice(y)}),v.children.splice(h,1,...b)):b=[c],h+b.length;function C(A){const M=b[b.length-1];M&&M.type==="text"&&A.type==="text"?M.value+=A.value:b.push(A)}}}function GK(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([YK(i[0]),XK(i[1])])}return t}function YK(e){return typeof e=="string"?new RegExp(WK(e),"g"):e}function XK(e){return typeof e=="function"?e:function(){return e}}function qK(e){VL(e,[/\r?\n|\r/g,KK])}function KK(){return{type:"break"}}function ZK(){return function(e){qK(e)}}function $L(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 r1="phrasing",n1=["autolink","link","image","label"];function QK(){return{transforms:[aZ],enter:{literalAutolink:eZ,literalAutolinkEmail:i1,literalAutolinkHttp:i1,literalAutolinkWww:i1},exit:{literalAutolink:iZ,literalAutolinkEmail:nZ,literalAutolinkHttp:tZ,literalAutolinkWww:rZ}}}function JK(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:r1,notInConstruct:n1},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:r1,notInConstruct:n1},{character:":",before:"[ps]",after:"\\/",inConstruct:r1,notInConstruct:n1}]}}function eZ(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function i1(e){this.config.enter.autolinkProtocol.call(this,e)}function tZ(e){this.config.exit.autolinkProtocol.call(this,e)}function rZ(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 nZ(e){this.config.exit.autolinkEmail.call(this,e)}function iZ(e){this.exit(e)}function aZ(e){VL(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,oZ],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,sZ]],{ignore:["link","linkReference"]})}function oZ(e,t,r,n,i){let a="";if(!UL(i)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!lZ(r)))return!1;const o=uZ(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 sZ(e,t,r,n){return!UL(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function lZ(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 uZ(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=$L(e,"(");let a=$L(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 UL(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Po(r)||Mh(r))&&(!t||r!==47)}WL.peek=yZ;function cZ(){this.buffer()}function fZ(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function dZ(){this.buffer()}function hZ(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function pZ(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=zn(this.sliceSerialize(e)).toLowerCase(),r.label=t}function vZ(e){this.exit(e)}function gZ(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=zn(this.sliceSerialize(e)).toLowerCase(),r.label=t}function mZ(e){this.exit(e)}function yZ(){return"["}function WL(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 xZ(){return{enter:{gfmFootnoteCallString:cZ,gfmFootnoteCall:fZ,gfmFootnoteDefinitionLabelString:dZ,gfmFootnoteDefinition:hZ},exit:{gfmFootnoteCallString:pZ,gfmFootnoteCall:vZ,gfmFootnoteDefinitionLabelString:gZ,gfmFootnoteDefinition:mZ}}}function bZ(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:WL},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,a,o){const s=a.createTracker(o);let l=s.move("[^");const c=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?GL:wZ))),c(),l}}function wZ(e,t,r){return t===0?e:GL(e,t,r)}function GL(e,t,r){return(r?"":" ")+e}const _Z=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];a1.attention=AZ,a1.peek=DZ;function kZ(){return{canContainEols:["delete"],enter:{strikethrough:CZ},exit:{strikethrough:TZ}}}function SZ(){return{handlers:{delete:a1},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:_Z}]}}function CZ(e){this.enter({type:"delete",children:[],position:void 0},e)}function TZ(e){this.exit(e)}function a1(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 AZ(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function DZ(){return"~"}function MZ(e){return e.length}function EZ(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||MZ,a=[],o=[],s=[],l=[];let c=0,f=-1;for(;++f<e.length;){const y=[],x=[];let b=-1;for(e[f].length>c&&(c=e[f].length);++b<e[f].length;){const _=LZ(e[f][b]);if(r.alignDelimiters!==!1){const C=i(_);x[b]=C,(l[b]===void 0||C>l[b])&&(l[b]=C)}y.push(_)}o[f]=y,s[f]=x}let h=-1;if(typeof n=="object"&&"length"in n)for(;++h<c;)a[h]=YL(n[h]);else{const y=YL(n);for(;++h<c;)a[h]=y}h=-1;const v=[],p=[];for(;++h<c;){const y=a[h];let x="",b="";y===99?(x=":",b=":"):y===108?x=":":y===114&&(b=":");let _=r.alignDelimiters===!1?1:Math.max(1,l[h]-x.length-b.length);const C=x+"-".repeat(_)+b;r.alignDelimiters!==!1&&(_=x.length+_+b.length,_>l[h]&&(l[h]=_),p[h]=_),v[h]=C}o.splice(1,0,v),s.splice(1,0,p),f=-1;const g=[];for(;++f<o.length;){const y=o[f],x=s[f];h=-1;const b=[];for(;++h<c;){const _=y[h]||"";let C="",A="";if(r.alignDelimiters!==!1){const M=l[h]-(x[h]||0),D=a[h];D===114?C=" ".repeat(M):D===99?M%2?(C=" ".repeat(M/2+.5),A=" ".repeat(M/2-.5)):(C=" ".repeat(M/2),A=C):A=" ".repeat(M)}r.delimiterStart!==!1&&!h&&b.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&_==="")&&(r.delimiterStart!==!1||h)&&b.push(" "),r.alignDelimiters!==!1&&b.push(C),b.push(_),r.alignDelimiters!==!1&&b.push(A),r.padding!==!1&&b.push(" "),(r.delimiterEnd!==!1||h!==c-1)&&b.push("|")}g.push(r.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return g.join(`
|
|
58
|
+
`)}function LZ(e){return e==null?"":String(e)}function YL(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 IZ=jh(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function PZ(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()),NZ);return i(),o}function NZ(e,t,r){return">"+(r?"":" ")+e}function RZ(e,t){return XL(e,t.inConstruct,!0)&&!XL(e,t.notInConstruct,!1)}function XL(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 qL(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&&RZ(r.stack,a))return/[\t ]/.test(n.before)?"":" "}return`\\
|
|
60
|
+
`}function OZ(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 zZ(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 jZ(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 FZ(e,t,r,n){const i=jZ(r),a=e.value||"";if(zZ(e,r)){const h=r.enter("codeIndented"),v=r.indentLines(a,BZ);return h(),v}const o=r.createTracker(n),s=i.repeat(Math.max(OZ(a,i)+1,3)),l=r.enter("codeFenced"),c=i==="`"?"GraveAccent":"Tilde";let f=o.move(s);if(e.lang){const h=r.enter(`codeFencedLang${c}`);f+=o.move(r.safe(e.lang,{before:f,after:" ",encode:["`"],...o.current()})),h()}if(e.lang&&e.meta){const h=r.enter(`codeFencedMeta${c}`);f+=o.move(" "),f+=o.move(r.safe(e.meta,{before:f,after:`
|
|
61
|
+
`,encode:["`"],...o.current()})),h()}return f+=o.move(`
|
|
62
|
+
`),a&&(f+=o.move(a+`
|
|
63
|
+
`)),f+=o.move(s),l(),f}function BZ(e,t,r){return(r?"":" ")+e}function o1(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 HZ(e,t,r,n){const i=o1(r),a=i==='"'?"Quote":"Apostrophe",o=r.enter("definition");let s=r.enter("label");const l=r.createTracker(n);let c=l.move("[");return c+=l.move(r.safe(r.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=r.enter("destinationRaw"),c+=l.move(r.safe(e.url,{before:c,after:e.title?" ":`
|
|
64
|
+
`,...l.current()}))),s(),e.title&&(s=r.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(r.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),o(),c}function VZ(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 Vh(e){const t=e.codePointAt(0);return t===void 0?"":String.fromCodePoint(t)}function Ks(e){const t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function KL(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ZL(e,t,r){const n=pa(e),i=pa(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 $Z(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:Gt(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(!Gt(a))return;for(;a===45||Yt(a);)a=e.charCodeAt(++i);const o=e.slice(n,i).toLowerCase();return!r&&a!==47&&Px.includes(o)?1:cL.includes(o)?6:7}const UZ=new Map([["*",!1],["_",!0]]);function WZ(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 QL(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=UZ.get(s);let c=o+1;for(;c<e.length&&e[c].attention&&e[c].value.charAt(0)===s;)c++;const f=o?e[o-1].value:t,h=pa(f.charCodeAt(f.length-1)),v=pa((c<e.length?e[c].value:r).charCodeAt(0)),p=!v||v===2&&!!h,g=!h||h===2&&!!v,y={tokens:e.slice(o,c),markers:[],start:0,end:0,open:l?p&&(!!h||!g):p,close:l?g&&(!!v||!p):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=c}for(YZ(n,i),o=-1;++o<e.length;){const s=i.get(e[o]);if(s)return{attention:WZ(e,s,a),index:o}}}function $h(e,t){const r=e[t?0:e.length-1];if(!r||r.attention)return;const n=t?Vh(r.value):Ks(r.value),i=KL(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 GZ(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 c=l1(e,l,n,i),f=QL(c,n,i);if(!f||f.index>r.index)return{chosen:l,mistake:f,tokens:c}}}}function YZ(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,c=n.end-n.start;if(n.split?(s.close||n.open)&&c%3&&!((l+c)%3):l!==s.markers.length||l!==c)continue;const f=n.split?l>1&&c>1?2:1:c,h=s.markers.slice(s.end-f,s.end),v=n.markers.slice(n.start,n.start+f),p=h[0],g=v[0];if(p===h[f-1]&&p.value.length===f&&g===v[f-1]&&g.value.length===f&&p.attention===g.attention)t.delete(p),t.delete(g);else{const y=[...new Set([...h,...v])];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 XZ(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(!ZE(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 qZ(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 c=i[o];let f;if(n[n.length-1]=o,o+1<i.length){let p=t.handle.handlers[i[o+1].type];p&&p.peek&&(p=p.peek),f=p?Vh(p(i[o+1],e,t,{before:"",after:"",...l.current()})):""}else f=r.after;const h=a[a.length-1];typeof h=="string"&&(s==="\r"||s===`
|
|
65
|
+
`)&&c.type==="html"&&$Z(c.value)!==7&&(a[a.length-1]=h.replace(/(\r?\n|\r)$/," "),s=" ",l=t.createTracker(r),l.move(Uh(a,r.before,r.after)));const v=t.handle.handlers[c.type];if(v&&v.attention){const p=s1(c,v.attention,t,l);a.push(p),s=Ks(p.sequences[0])}else{const p=t.handle(c,e,t,{...l.current(),after:f,before:s});if(!p)continue;l.move(p),a.push(p),s=Ks(p)}}return n.pop(),a}function s1(e,t,r,n){const{construct:i,markers:a,sizes:o}=t(e,r),s=XZ(e.type,a,o),l=s[0],c=r.enter(i);n.move(l);const f=qZ(e,r,{...n.current(),before:l,after:l});return n.move(Uh(f,l,l)),n.move(l),c(),{children:f,sequences:s}}function l1(e,t,r,n){const i=[];let a,o=Ks(r),s=-1;for(;++s<e.length;){const l=e[s];if(typeof l=="string"){const C={value:l,attention:void 0};a&&a===Vh(l)&&$h([C],!0),a=void 0,i.push(C),C.value&&(o=Ks(C.value));continue}const c=t.get(l)||l.sequences[0],f=c.charAt(0),h=e[s+1],v=o,p=Vh(h===void 0?n:typeof h=="string"?h:t.get(h)||h.sequences[0]),g=l1(l.children,t,c,c),y=g.length>0?g[0].value:"",x=ZL(v.charCodeAt(v.length-1),y.charCodeAt(0),f);x.inside&&$h(g,!0);const b=g.length>0?Ks(g[g.length-1].value):"",_=ZL(p.charCodeAt(0),b.charCodeAt(b.length-1),f);_.inside&&$h(g,!1),x.outside&&v!==`
|
|
66
|
+
`&&v!=="\r"&&$h(i,!1),_.outside&&(a=p),i.push({value:c,attention:l},...g,{value:c,attention:l}),o=c.charAt(c.length-1)}return i}function Uh(e,t,r){let n=new Map;const i=l1(e,n,t,r);let a=i,o=QL(a,t,r);for(;o;){const l=GZ(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}u1.attention=JL,u1.peek=KZ;function u1(e,t,r,n){const i=r.enter("phrasing"),a=s1(e,JL,r,r.createTracker(n)),o=Uh([a],n.before,n.after);return i(),o}function JL(e,t){return{construct:"emphasis",markers:VZ(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function KZ(e,t,r){return r.options.emphasis||"*"}function ZZ(e,t){let r=!1;return Vx(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,Bh}),!!((!e.depth||e.depth<3)&&Ax(e)&&(t.options.setext||r))}function QZ(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(n);if(ZZ(e,r)){const h=r.enter("headingSetext"),v=r.enter("phrasing"),p=r.containerPhrasing(e,{...a.current(),before:`
|
|
67
|
+
`,after:`
|
|
68
|
+
`});return v(),h(),p+`
|
|
69
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
70
|
+
`))+1))}const o="#".repeat(i),s=r.enter("headingAtx"),l=r.enter("phrasing");a.move(o+" ");let c=r.containerPhrasing(e,{before:"# ",after:`
|
|
71
|
+
`,...a.current()});const f=c.charCodeAt(0);return(f===9||f===32)&&(c=KL(f)+c.slice(1)),c=c?o+" "+c:o,r.options.closeAtx&&(c+=" "+o),l(),s(),c}eI.peek=JZ;function eI(e){return e.value||""}function JZ(){return"<"}tI.peek=eQ;function tI(e,t,r,n){const i=o1(r),a=i==='"'?"Quote":"Apostrophe",o=r.enter("image");let s=r.enter("label");const l=r.createTracker(n);let c=l.move("![");return c+=l.move(r.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=r.enter("destinationRaw"),c+=l.move(r.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=r.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(r.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),c+=l.move(")"),o(),c}function eQ(){return"!"}rI.peek=tQ;function rI(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 c=r.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),o();const f=r.stack;r.stack=f.filter(function(v){return v!=="phrasing"}),o=r.enter("reference");const h=r.safe(r.associationId(e),{before:l,after:"]",...s.current()});return o(),r.stack=f,a(),i==="full"||!c||c!==h?l+=s.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function tQ(){return"!"}nI.peek=rQ;function nI(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 c=l.index;n.charCodeAt(c)===10&&n.charCodeAt(c-1)===13&&c--,n=n.slice(0,c)+" "+n.slice(l.index+1)}}return i+n+i}function rQ(){return"`"}function iI(e,t){const r=Ax(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))}aI.peek=nQ;function aI(e,t,r,n){const i=o1(r),a=i==='"'?"Quote":"Apostrophe",o=r.createTracker(n);if(iI(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"),c=o.move("[");const f=r.containerPhrasing(e,{before:c,after:"](",...o.current()});c+=o.move(f),l(),c+=o.move("](");const h=/[\0- \u007F]/.test(e.url),v=n.before.charAt(n.before.length-1);let p=e.title||void 0;if(!p&&!h&&(v===`
|
|
72
|
+
`||v==="\r")){let g=0;for(;g<f.length&&f.charCodeAt(g)!==93;)g+=f.charCodeAt(g)===92?2:1;f.charCodeAt(g+1)===58&&(p="")}return!e.url&&typeof p=="string"||h?(l=r.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(r.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(l=r.enter("destinationRaw"),c+=o.move(r.safe(e.url,{before:c,after:typeof p=="string"?" ":")",...o.current()}))),l(),typeof p=="string"&&(l=r.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(r.safe(p,{before:c,after:i,...o.current()})),c+=o.move(i),l()),c+=o.move(")"),s(),c}function nQ(e,t,r){return iI(e,r)?"<":"["}oI.peek=iQ;function oI(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 c=r.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),o();const f=r.stack;r.stack=f.filter(function(v){return v!=="phrasing"}),o=r.enter("reference");const h=r.safe(r.associationId(e),{before:l,after:"]",...s.current()});return o(),r.stack=f,a(),i==="full"||!c||c!==h?l+=s.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function iQ(){return"["}function c1(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 aQ(e){const t=c1(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 oQ(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 sI(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 sQ(e,t,r,n){const i=r.enter("list"),a=r.bulletCurrent;let o=e.ordered?oQ(r):c1(r);const s=e.ordered?o==="."?")":".":aQ(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),sI(r)===o&&f){let h=-1;for(;++h<e.children.length;){const v=e.children[h];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(o=s),r.bulletCurrent=o;const c=r.containerFlow(e,n);return r.bulletLastUsed=o,r.bulletCurrent=a,i(),c}function lQ(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 uQ(e,t,r,n){const i=lQ(r);let a=r.bulletCurrent||c1(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"),c=r.indentLines(r.containerFlow(e,s.current()),f);return l(),c;function f(h,v,p){return v?(p?"":" ".repeat(o))+h:(p?a:a+" ".repeat(o-a.length))+h}}function cQ(e,t,r,n){const i=r.enter("paragraph"),a=r.enter("phrasing"),o=r.containerPhrasing(e,n);return a(),i(),o}function fQ(e,t,r,n){if(!e.children.some(function(s){return IZ(s)}))return r.containerFlow(e,n);const a=r.enter("phrasing"),o=r.containerPhrasing(e,n);return a(),o}function dQ(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}f1.attention=lI,f1.peek=hQ;function f1(e,t,r,n){const i=r.enter("phrasing"),a=s1(e,lI,r,r.createTracker(n)),o=Uh([a],n.before,n.after);return i(),o}function lI(e,t){return{construct:"strong",markers:dQ(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function hQ(e,t,r){return r.options.strong||"*"}function pQ(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 vQ(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 gQ(e,t,r){const n=(sI(r)+(r.options.ruleSpaces?" ":"")).repeat(vQ(r));return r.options.ruleSpaces?n.slice(0,-1):n}const uI={blockquote:PZ,break:qL,code:FZ,definition:HZ,emphasis:u1,hardBreak:qL,heading:QZ,html:eI,image:tI,imageReference:rI,inlineCode:nI,link:aI,linkReference:oI,list:sQ,listItem:uQ,paragraph:cQ,root:fQ,strong:f1,text:pQ,thematicBreak:gQ};function mQ(){return{enter:{table:yQ,tableData:cI,tableHeader:cI,tableRow:bQ},exit:{codeText:wQ,table:xQ,tableData:d1,tableHeader:d1,tableRow:d1}}}function yQ(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 xQ(e){this.exit(e),this.data.inTable=void 0}function bQ(e){this.enter({type:"tableRow",children:[]},e)}function d1(e){this.exit(e)}function cI(e){this.enter({type:"tableCell",children:[]},e)}function wQ(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,_Q));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function _Q(e,t){return t==="|"?t:e}function kQ(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:v,table:o,tableCell:l,tableRow:s}};function o(p,g,y,x){return c(f(p,y,x),p.align)}function s(p,g,y,x){const b=h(p,y,x),_=c([b]);return _.slice(0,_.indexOf(`
|
|
74
|
+
`))}function l(p,g,y,x){const b=y.enter("tableCell"),_=y.enter("phrasing"),C=y.containerPhrasing(p,{...x,before:a,after:a});return _(),b(),C}function c(p,g){return EZ(p,{align:g,alignDelimiters:n,padding:r,stringLength:i})}function f(p,g,y){const x=p.children;let b=-1;const _=[],C=g.enter("table");for(;++b<x.length;)_[b]=h(x[b],g,y);return C(),_}function h(p,g,y){const x=p.children;let b=-1;const _=[],C=g.enter("tableRow");for(;++b<x.length;)_[b]=l(x[b],p,g,y);return C(),_}function v(p,g,y){let x=uI.inlineCode(p,g,y);return y.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function SQ(){return{exit:{taskListCheckValueChecked:fI,taskListCheckValueUnchecked:fI,paragraph:TQ}}}function CQ(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:AQ}}}function fI(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function TQ(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 AQ(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=uI.listItem(e,t,r,{...n,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(f){return f+o}}function DQ(){return[QK(),xZ(),kZ(),mQ(),SQ()]}function MQ(e){return{extensions:[JK(),bZ(e),SZ(),kQ(e),CQ()]}}const EQ={tokenize:OQ,partial:!0},dI={tokenize:zQ,partial:!0},hI={tokenize:jQ,partial:!0},pI={tokenize:FQ,partial:!0},LQ={tokenize:BQ,partial:!0},vI={name:"wwwAutolink",tokenize:NQ,previous:mI},gI={name:"protocolAutolink",tokenize:RQ,previous:yI},Ai={name:"emailAutolink",tokenize:PQ,previous:xI},ai={};function IQ(){return{text:ai}}let Ro=48;for(;Ro<123;)ai[Ro]=Ai,Ro++,Ro===58?Ro=65:Ro===91&&(Ro=97);ai[43]=Ai,ai[45]=Ai,ai[46]=Ai,ai[95]=Ai,ai[72]=[Ai,gI],ai[104]=[Ai,gI],ai[87]=[Ai,vI],ai[119]=[Ai,vI];function PQ(e,t,r){const n=this;let i,a;return o;function o(h){return!h1(h)||!xI.call(n,n.previous)||p1(n.events)?r(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(h))}function s(h){return h1(h)?(e.consume(h),s):h===64?(e.consume(h),l):r(h)}function l(h){return h===46?e.check(LQ,f,c)(h):h===45||h===95||Yt(h)?(a=!0,e.consume(h),l):f(h)}function c(h){return e.consume(h),i=!0,l}function f(h){return a&&i&&Gt(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):r(h)}}function NQ(e,t,r){const n=this;return i;function i(o){return o!==87&&o!==119||!mI.call(n,n.previous)||p1(n.events)?r(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(EQ,e.attempt(dI,e.attempt(hI,a),r),r)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function RQ(e,t,r){const n=this;let i="",a=!1;return o;function o(h){return(h===72||h===104)&&yI.call(n,n.previous)&&!p1(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),s):r(h)}function s(h){if(Gt(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),s;if(h===58){const v=i.toLowerCase();if(v==="http"||v==="https")return e.consume(h),l}return r(h)}function l(h){return h===47?(e.consume(h),a?c:(a=!0,l)):r(h)}function c(h){return h===null||Dh(h)||ft(h)||Po(h)||Mh(h)?r(h):e.attempt(dI,e.attempt(hI,f),r)(h)}function f(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function OQ(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 zQ(e,t,r){let n,i,a;return o;function o(c){return c===46||c===95?e.check(pI,l,s)(c):c===null||ft(c)||Po(c)||c!==45&&Mh(c)?l(c):(a=!0,e.consume(c),o)}function s(c){return c===95?n=!0:(i=n,n=void 0),e.consume(c),o}function l(c){return i||n||!a?r(c):t(c)}}function jQ(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(pI,t,a)(o):o===null||ft(o)||Po(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&n++,e.consume(o),i}}function FQ(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||ft(s)||Po(s)?t(s):r(s)}function i(s){return s===null||s===40||s===91||ft(s)||Po(s)?t(s):n(s)}function a(s){return Gt(s)?o(s):r(s)}function o(s){return s===59?(e.consume(s),n):Gt(s)?(e.consume(s),o):r(s)}}function BQ(e,t,r){return n;function n(a){return e.consume(a),i}function i(a){return Yt(a)?r(a):t(a)}}function mI(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ft(e)}function yI(e){return!Gt(e)}function xI(e){return!(e===47||h1(e))}function h1(e){return e===43||e===45||e===46||e===95||Yt(e)}function p1(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 HQ={tokenize:qQ,partial:!0};function VQ(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:GQ,continuation:{tokenize:YQ},exit:XQ}},text:{91:{name:"gfmFootnoteCall",tokenize:WQ},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$Q,resolveTo:UQ}}}}function $Q(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 c=zn(n.sliceSerialize({start:o.end,end:n.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?r(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function UQ(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 WQ(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,o;return s;function s(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?r(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(h){if(a>999||h===93&&!o||h===null||h===91||ft(h))return r(h);if(h===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return i.includes(zn(n.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(h)}return ft(h)||(o=!0),a++,e.consume(h),h===92?f:c}function f(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function GQ(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"),c}function c(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||ft(g))return r(g);if(g===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return a=zn(n.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return ft(g)||(s=!0),o++,e.consume(g),g===92?h:f}function h(g){return g===91||g===92||g===93?(e.consume(g),o++,f):f(g)}function v(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(a)||i.push(a),Je(e,p,"gfmFootnoteDefinitionWhitespace")):r(g)}function p(g){return t(g)}}function YQ(e,t,r){return e.check(ic,t,e.attempt(HQ,t,r))}function XQ(e){e.exit("gfmFootnoteDefinition")}function qQ(e,t,r){const n=this;return Je(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 KQ(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 c=l;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[l][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[l][1].end)},h={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[l][1].start)},v=[["enter",f,s],["enter",o[c][1],s],["exit",o[c][1],s],["enter",h,s]],p=s.parser.constructs.insideSpan.null;p&&On(v,v.length,0,Lh(p,o.slice(c+1,l),s)),On(v,v.length,0,[["exit",h,s],["enter",o[l][1],s],["exit",o[l][1],s],["exit",f,s]]),On(o,c-1,l-c+3,v),l=c+v.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 c=this.previous,f=this.events;let h=0;return v;function v(g){return c===126&&f[f.length-1][1].type!=="characterEscape"?l(g):(o.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const y=pa(c);if(g===126)return h>1?l(g):(o.consume(g),h++,p);if(h<2&&!r)return l(g);const x=o.exit("strikethroughSequenceTemporary"),b=pa(g);return x._open=!b||b===2&&!!y,x._close=!y||y===2&&!!b,s(g)}}}class ZQ{constructor(){this.map=[],this.index=new Map}add(t,r,n){QQ(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 QQ(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 JQ(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 eJ(){return{flow:{null:{name:"table",tokenize:tJ,resolveAll:rJ}}}}function tJ(e,t,r){const n=this;let i=0,a=0,o;return s;function s(L){let R=n.events.length-1;for(;R>-1;){const{type:W}=n.events[R][1];if(W==="lineEnding"||W==="linePrefix")R--;else break}const j=R>-1?n.events[R][1].type:null,H=j==="tableHead"||j==="tableRow"?D:l;return H===D&&n.parser.lazy[n.now().line]?r(L):H(L)}function l(L){return e.enter("tableHead"),e.enter("tableRow"),c(L)}function c(L){return L===124||(o=!0,a+=1),f(L)}function f(L){return L===null?r(L):Ne(L)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),p):r(L):Ye(L)?Je(e,f,"whitespace")(L):(a+=1,o&&(o=!1,i+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),o=!0,f):(e.enter("data"),h(L)))}function h(L){return L===null||L===124||ft(L)?(e.exit("data"),f(L)):(e.consume(L),L===92?v:h)}function v(L){return L===92||L===124?(e.consume(L),h):h(L)}function p(L){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(L):(e.enter("tableDelimiterRow"),o=!1,Ye(L)?Je(e,g,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):g(L))}function g(L){return L===45||L===58?x(L):L===124?(o=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),y):M(L)}function y(L){return Ye(L)?Je(e,x,"whitespace")(L):x(L)}function x(L){return L===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),b):L===45?(a+=1,b(L)):L===null||Ne(L)?A(L):M(L)}function b(L){return L===45?(e.enter("tableDelimiterFiller"),_(L)):M(L)}function _(L){return L===45?(e.consume(L),_):L===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(L))}function C(L){return Ye(L)?Je(e,A,"whitespace")(L):A(L)}function A(L){return L===124?g(L):L===null||Ne(L)?!o||i!==a?M(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):M(L)}function M(L){return r(L)}function D(L){return e.enter("tableRow"),E(L)}function E(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),E):L===null||Ne(L)?(e.exit("tableRow"),t(L)):Ye(L)?Je(e,E,"whitespace")(L):(e.enter("data"),N(L))}function N(L){return L===null||L===124||ft(L)?(e.exit("data"),E(L)):(e.consume(L),L===92?O:N)}function O(L){return L===92||L===124?(e.consume(L),N):N(L)}}function rJ(e,t){let r=-1,n=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,c,f,h;const v=new ZQ;for(;++r<e.length;){const p=e[r],g=p[1];p[0]==="enter"?g.type==="tableHead"?(s=!1,l!==0&&(bI(v,t,l,c,f),f=void 0,l=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},v.add(r,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(n=!0,h=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)},v.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],h=Wh(v,t,a,i,void 0,h),a=[0,0,0,0]),o[2]=r)):g.type==="tableCellDivider"&&(n?n=!1:(a[1]!==0&&(o[0]=o[1],h=Wh(v,t,a,i,void 0,h)),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],h=Wh(v,t,a,i,r,h)):o[1]!==0&&(h=Wh(v,t,o,i,r,h)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=r)}for(l!==0&&bI(v,t,l,c,f),v.consume(t.events),r=-1;++r<t.events.length;){const p=t.events[r];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=JQ(t.events,r))}return e}function Wh(e,t,r,n,i,a){const o=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(a.end=Object.assign({},Zs(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const l=Zs(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 c=Zs(t.events,r[2]),f=Zs(t.events,r[3]),h={type:s,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(r[2],0,[["enter",h,t]]),n!==2){const v=t.events[r[2]],p=t.events[r[3]];if(v[1].end=Object.assign({},p[1].end),v[1].type="chunkText",v[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",h,t]])}return i!==void 0&&(a.end=Object.assign({},Zs(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function bI(e,t,r,n,i){const a=[],o=Zs(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 Zs(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const nJ={name:"tasklistCheck",tokenize:aJ};function iJ(){return{text:{91:nJ}}}function aJ(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 ft(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 Ne(l)?t(l):Ye(l)?e.check({tokenize:oJ},t,r)(l):r(l)}}function oJ(e,t,r){return Je(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function sJ(e){return qE([IQ(),VQ(),KQ(e),eJ(),iJ()])}const lJ={};function uJ(e){const t=this,r=e||lJ,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(sJ(r)),a.push(DQ()),o.push(MQ(r))}const cJ=2e3,fJ=[uJ,ZK],Gh=e=>typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(Gh).join(""):B.isValidElement(e)?Gh(e.props.children):"",dJ=({code:e})=>{const{t}=me(),[r,n]=B.useState(!1),i=B.useRef(void 0);B.useEffect(()=>()=>{window.clearTimeout(i.current)},[]);const a=t(r?"copied":"copy");return k.jsxs("button",{type:"button","aria-label":a,onClick:()=>{Fv(e).then(o=>{o&&(n(!0),window.clearTimeout(i.current),i.current=window.setTimeout(()=>{n(!1)},cJ))})},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(Bi,{className:"size-3.5","aria-hidden":"true"}):k.jsx(Iv,{className:"size-3.5","aria-hidden":"true"}),k.jsx("span",{children:a})]})},hJ=({children:e})=>{const t=B.Children.toArray(e)[0],r=B.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(dJ,{code:Gh(e).replace(/\n$/,"")})]}),k.jsx("pre",{className:"overflow-x-auto p-3 font-mono text-[13px] leading-relaxed",children:e})]})},v1="text-primary underline underline-offset-2 hover:text-primary/80",pJ=({href:e,children:t})=>{const{api:r}=me(),n=e??"";if(Zc(n,r.apiUrl))return k.jsx(fk,{url:n,name:Gh(t)||"file",className:`${v1} inline p-0 text-left`,children:t});const i=$a(n);return i?k.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:v1,children:t}):k.jsx("span",{children:t})},vJ=({src:e,alt:t})=>{const{api:r}=me(),n=typeof e=="string"?e:"";if(Zc(n,r.apiUrl))return k.jsx(nz,{url:n,alt:t??""});const i=t===void 0||t===""?n:t,a=$a(n);return a?k.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:v1,children:i}):k.jsx("span",{children:i})},Qs="mt-3 first:mt-0",gJ=({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(Bi,{className:"size-3","aria-hidden":"true"}):null}),mJ={p:({children:e})=>k.jsx("p",{className:Qs,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(Qs,"list-none pl-0.5"),children:e}):k.jsx("ul",{className:he(Qs,"list-disc pl-[22px] [&_li+li]:mt-1 [&_ul]:mt-1"),children:e}),ol:({children:e})=>k.jsx("ol",{className:he(Qs,"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(gJ,{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(hJ,{children:e}),blockquote:({children:e})=>k.jsx("blockquote",{className:he(Qs,"border-l-[3px] py-0.5 pl-3.5 text-muted-foreground"),children:e}),a:({href:e,children:t})=>k.jsx(pJ,{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(vJ,{src:e,alt:t}),table:({children:e})=>k.jsx("div",{className:he(Qs,"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"})},yJ=B.memo(function({children:t}){return k.jsx(BK,{remarkPlugins:fJ,components:mJ,skipHtml:!0,children:t.replace(/\\r\\n/g,`
|
|
75
|
+
`).replace(/\\n/g,`
|
|
76
|
+
`)})}),xJ=Object.freeze(Object.defineProperty({__proto__:null,MarkdownImpl:yJ},Symbol.toStringTag,{value:"Module"}));return Zr.AiDanaChatElement=yg,Zr.DEFAULT_API_URL=jk,Zr.mount=Bk,Zr.mountLauncher=Fk,Object.defineProperty(Zr,Symbol.toStringTag,{value:"Module"}),Zr})({});
|