149 lines
1.8 MiB
149 lines
1.8 MiB
var mH=Object.defineProperty;var gH=(r,e,t)=>e in r?mH(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Rt=(r,e,t)=>gH(r,typeof e!="symbol"?e+"":e,t);import{g as yH,c as bH}from"./_commonjsHelpers-NT8qMgGI.js";import{A as so,a3 as rr,bv as Ke,a as ae,g as Y,b as Z,Q as Sa,av as _H,au as $x,af as oi,aa as zl,bw as lo,bx as Nr,by as BS,bz as zS,m as Nt,bA as Ta,bB as p3,bC as v3,ad as xH,bD as xu,r as te,c as de,o as zi,e as H,ac as Ca,bE as wH,B as m3,E as ag,b4 as Ss,aF as SH,bF as FS,bG as g3,aN as TH,p as Je,i as $e,w as _e,aX as wu,d as Ie,j as ct,bi as VS,bH as r0,bI as n0,bJ as y3,bK as Vu,bL as CH,bg as i0,k as Di,t as qt,h as At,aW as Bh,bM as AH,n as kt,v as MH,aV as b3,aw as vt,bN as _3,f as kH,aQ as cp,_ as DH,ae as og,ai as EH,bO as MM,aU as Hx,bP as bm,aA as x3,bQ as w3,b5 as Ac,bR as LH,aS as kM}from"./index-BUdRbiwj.js";var Mn="top",di="bottom",pi="right",kn="left",$S="auto",fp=[Mn,di,pi,kn],$c="start",md="end",IH="clippingParents",S3="viewport",Rf="popper",PH="reference",DM=fp.reduce(function(r,e){return r.concat([e+"-"+$c,e+"-"+md])},[]),T3=[].concat(fp,[$S]).reduce(function(r,e){return r.concat([e,e+"-"+$c,e+"-"+md])},[]),RH="beforeRead",OH="read",jH="afterRead",NH="beforeMain",BH="main",zH="afterMain",FH="beforeWrite",VH="write",$H="afterWrite",HH=[RH,OH,jH,NH,BH,zH,FH,VH,$H];function Aa(r){return r?(r.nodeName||"").toLowerCase():null}function $n(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var e=r.ownerDocument;return e&&e.defaultView||window}return r}function su(r){var e=$n(r).Element;return r instanceof e||r instanceof Element}function fi(r){var e=$n(r).HTMLElement;return r instanceof e||r instanceof HTMLElement}function HS(r){if(typeof ShadowRoot>"u")return!1;var e=$n(r).ShadowRoot;return r instanceof e||r instanceof ShadowRoot}function GH(r){var e=r.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},a=e.elements[t];!fi(a)||!Aa(a)||(Object.assign(a.style,n),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function WH(r){var e=r.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(n){var i=e.elements[n],a=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:t[n]),s=o.reduce(function(l,u){return l[u]="",l},{});!fi(i)||!Aa(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(l){i.removeAttribute(l)}))})}}const C3={name:"applyStyles",enabled:!0,phase:"write",fn:GH,effect:WH,requires:["computeStyles"]};function ya(r){return r.split("-")[0]}var Fl=Math.max,sg=Math.min,Hc=Math.round;function Gx(){var r=navigator.userAgentData;return r!=null&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function A3(){return!/^((?!chrome|android).)*safari/i.test(Gx())}function Gc(r,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var n=r.getBoundingClientRect(),i=1,a=1;e&&fi(r)&&(i=r.offsetWidth>0&&Hc(n.width)/r.offsetWidth||1,a=r.offsetHeight>0&&Hc(n.height)/r.offsetHeight||1);var o=su(r)?$n(r):window,s=o.visualViewport,l=!A3()&&t,u=(n.left+(l&&s?s.offsetLeft:0))/i,c=(n.top+(l&&s?s.offsetTop:0))/a,f=n.width/i,h=n.height/a;return{width:f,height:h,top:c,right:u+f,bottom:c+h,left:u,x:u,y:c}}function GS(r){var e=Gc(r),t=r.offsetWidth,n=r.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:r.offsetLeft,y:r.offsetTop,width:t,height:n}}function M3(r,e){var t=e.getRootNode&&e.getRootNode();if(r.contains(e))return!0;if(t&&HS(t)){var n=e;do{if(n&&r.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function mo(r){return $n(r).getComputedStyle(r)}function UH(r){return["table","td","th"].indexOf(Aa(r))>=0}function Os(r){return((su(r)?r.ownerDocument:r.document)||window.document).documentElement}function a0(r){return Aa(r)==="html"?r:r.assignedSlot||r.parentNode||(HS(r)?r.host:null)||Os(r)}function EM(r){return!fi(r)||mo(r).position==="fixed"?null:r.offsetParent}function YH(r){var e=/firefox/i.test(Gx()),t=/Trident/i.test(Gx());if(t&&fi(r)){var n=mo(r);if(n.position==="fixed")return null}var i=a0(r);for(HS(i)&&(i=i.host);fi(i)&&["html","body"].indexOf(Aa(i))<0;){var a=mo(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||e&&a.willChange==="filter"||e&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function hp(r){for(var e=$n(r),t=EM(r);t&&UH(t)&&mo(t).position==="static";)t=EM(t);return t&&(Aa(t)==="html"||Aa(t)==="body"&&mo(t).position==="static")?e:t||YH(r)||e}function WS(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function zh(r,e,t){return Fl(r,sg(e,t))}function qH(r,e,t){var n=zh(r,e,t);return n>t?t:n}function k3(){return{top:0,right:0,bottom:0,left:0}}function D3(r){return Object.assign({},k3(),r)}function E3(r,e){return e.reduce(function(t,n){return t[n]=r,t},{})}var XH=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,D3(typeof e!="number"?e:E3(e,fp))};function KH(r){var e,t=r.state,n=r.name,i=r.options,a=t.elements.arrow,o=t.modifiersData.popperOffsets,s=ya(t.placement),l=WS(s),u=[kn,pi].indexOf(s)>=0,c=u?"height":"width";if(!(!a||!o)){var f=XH(i.padding,t),h=GS(a),d=l==="y"?Mn:kn,p=l==="y"?di:pi,v=t.rects.reference[c]+t.rects.reference[l]-o[l]-t.rects.popper[c],m=o[l]-t.rects.reference[l],g=hp(a),y=g?l==="y"?g.clientHeight||0:g.clientWidth||0:0,b=v/2-m/2,_=f[d],x=y-h[c]-f[p],w=y/2-h[c]/2+b,S=zh(_,w,x),T=l;t.modifiersData[n]=(e={},e[T]=S,e.centerOffset=S-w,e)}}function ZH(r){var e=r.state,t=r.options,n=t.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||M3(e.elements.popper,i)&&(e.elements.arrow=i))}const JH={name:"arrow",enabled:!0,phase:"main",fn:KH,effect:ZH,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Wc(r){return r.split("-")[1]}var QH={top:"auto",right:"auto",bottom:"auto",left:"auto"};function e7(r,e){var t=r.x,n=r.y,i=e.devicePixelRatio||1;return{x:Hc(t*i)/i||0,y:Hc(n*i)/i||0}}function LM(r){var e,t=r.popper,n=r.popperRect,i=r.placement,a=r.variation,o=r.offsets,s=r.position,l=r.gpuAcceleration,u=r.adaptive,c=r.roundOffsets,f=r.isFixed,h=o.x,d=h===void 0?0:h,p=o.y,v=p===void 0?0:p,m=typeof c=="function"?c({x:d,y:v}):{x:d,y:v};d=m.x,v=m.y;var g=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),b=kn,_=Mn,x=window;if(u){var w=hp(t),S="clientHeight",T="clientWidth";if(w===$n(t)&&(w=Os(t),mo(w).position!=="static"&&s==="absolute"&&(S="scrollHeight",T="scrollWidth")),w=w,i===Mn||(i===kn||i===pi)&&a===md){_=di;var C=f&&w===x&&x.visualViewport?x.visualViewport.height:w[S];v-=C-n.height,v*=l?1:-1}if(i===kn||(i===Mn||i===di)&&a===md){b=pi;var A=f&&w===x&&x.visualViewport?x.visualViewport.width:w[T];d-=A-n.width,d*=l?1:-1}}var M=Object.assign({position:s},u&&QH),D=c===!0?e7({x:d,y:v},$n(t)):{x:d,y:v};if(d=D.x,v=D.y,l){var E;return Object.assign({},M,(E={},E[_]=y?"0":"",E[b]=g?"0":"",E.transform=(x.devicePixelRatio||1)<=1?"translate("+d+"px, "+v+"px)":"translate3d("+d+"px, "+v+"px, 0)",E))}return Object.assign({},M,(e={},e[_]=y?v+"px":"",e[b]=g?d+"px":"",e.transform="",e))}function t7(r){var e=r.state,t=r.options,n=t.gpuAcceleration,i=n===void 0?!0:n,a=t.adaptive,o=a===void 0?!0:a,s=t.roundOffsets,l=s===void 0?!0:s,u={placement:ya(e.placement),variation:Wc(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,LM(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,LM(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const r7={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:t7,data:{}};var Hp={passive:!0};function n7(r){var e=r.state,t=r.instance,n=r.options,i=n.scroll,a=i===void 0?!0:i,o=n.resize,s=o===void 0?!0:o,l=$n(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&u.forEach(function(c){c.addEventListener("scroll",t.update,Hp)}),s&&l.addEventListener("resize",t.update,Hp),function(){a&&u.forEach(function(c){c.removeEventListener("scroll",t.update,Hp)}),s&&l.removeEventListener("resize",t.update,Hp)}}const i7={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:n7,data:{}};var a7={left:"right",right:"left",bottom:"top",top:"bottom"};function _m(r){return r.replace(/left|right|bottom|top/g,function(e){return a7[e]})}var o7={start:"end",end:"start"};function IM(r){return r.replace(/start|end/g,function(e){return o7[e]})}function US(r){var e=$n(r),t=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:t,scrollTop:n}}function YS(r){return Gc(Os(r)).left+US(r).scrollLeft}function s7(r,e){var t=$n(r),n=Os(r),i=t.visualViewport,a=n.clientWidth,o=n.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;var u=A3();(u||!u&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s+YS(r),y:l}}function l7(r){var e,t=Os(r),n=US(r),i=(e=r.ownerDocument)==null?void 0:e.body,a=Fl(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Fl(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+YS(r),l=-n.scrollTop;return mo(i||t).direction==="rtl"&&(s+=Fl(t.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:l}}function qS(r){var e=mo(r),t=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+i+n)}function L3(r){return["html","body","#document"].indexOf(Aa(r))>=0?r.ownerDocument.body:fi(r)&&qS(r)?r:L3(a0(r))}function Fh(r,e){var t;e===void 0&&(e=[]);var n=L3(r),i=n===((t=r.ownerDocument)==null?void 0:t.body),a=$n(n),o=i?[a].concat(a.visualViewport||[],qS(n)?n:[]):n,s=e.concat(o);return i?s:s.concat(Fh(a0(o)))}function Wx(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function u7(r,e){var t=Gc(r,!1,e==="fixed");return t.top=t.top+r.clientTop,t.left=t.left+r.clientLeft,t.bottom=t.top+r.clientHeight,t.right=t.left+r.clientWidth,t.width=r.clientWidth,t.height=r.clientHeight,t.x=t.left,t.y=t.top,t}function PM(r,e,t){return e===S3?Wx(s7(r,t)):su(e)?u7(e,t):Wx(l7(Os(r)))}function c7(r){var e=Fh(a0(r)),t=["absolute","fixed"].indexOf(mo(r).position)>=0,n=t&&fi(r)?hp(r):r;return su(n)?e.filter(function(i){return su(i)&&M3(i,n)&&Aa(i)!=="body"}):[]}function f7(r,e,t,n){var i=e==="clippingParents"?c7(r):[].concat(e),a=[].concat(i,[t]),o=a[0],s=a.reduce(function(l,u){var c=PM(r,u,n);return l.top=Fl(c.top,l.top),l.right=sg(c.right,l.right),l.bottom=sg(c.bottom,l.bottom),l.left=Fl(c.left,l.left),l},PM(r,o,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function I3(r){var e=r.reference,t=r.element,n=r.placement,i=n?ya(n):null,a=n?Wc(n):null,o=e.x+e.width/2-t.width/2,s=e.y+e.height/2-t.height/2,l;switch(i){case Mn:l={x:o,y:e.y-t.height};break;case di:l={x:o,y:e.y+e.height};break;case pi:l={x:e.x+e.width,y:s};break;case kn:l={x:e.x-t.width,y:s};break;default:l={x:e.x,y:e.y}}var u=i?WS(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(a){case $c:l[u]=l[u]-(e[c]/2-t[c]/2);break;case md:l[u]=l[u]+(e[c]/2-t[c]/2);break}}return l}function gd(r,e){e===void 0&&(e={});var t=e,n=t.placement,i=n===void 0?r.placement:n,a=t.strategy,o=a===void 0?r.strategy:a,s=t.boundary,l=s===void 0?IH:s,u=t.rootBoundary,c=u===void 0?S3:u,f=t.elementContext,h=f===void 0?Rf:f,d=t.altBoundary,p=d===void 0?!1:d,v=t.padding,m=v===void 0?0:v,g=D3(typeof m!="number"?m:E3(m,fp)),y=h===Rf?PH:Rf,b=r.rects.popper,_=r.elements[p?y:h],x=f7(su(_)?_:_.contextElement||Os(r.elements.popper),l,c,o),w=Gc(r.elements.reference),S=I3({reference:w,element:b,placement:i}),T=Wx(Object.assign({},b,S)),C=h===Rf?T:w,A={top:x.top-C.top+g.top,bottom:C.bottom-x.bottom+g.bottom,left:x.left-C.left+g.left,right:C.right-x.right+g.right},M=r.modifiersData.offset;if(h===Rf&&M){var D=M[i];Object.keys(A).forEach(function(E){var L=[pi,di].indexOf(E)>=0?1:-1,I=[Mn,di].indexOf(E)>=0?"y":"x";A[E]+=D[I]*L})}return A}function h7(r,e){e===void 0&&(e={});var t=e,n=t.placement,i=t.boundary,a=t.rootBoundary,o=t.padding,s=t.flipVariations,l=t.allowedAutoPlacements,u=l===void 0?T3:l,c=Wc(n),f=c?s?DM:DM.filter(function(p){return Wc(p)===c}):fp,h=f.filter(function(p){return u.indexOf(p)>=0});h.length===0&&(h=f);var d=h.reduce(function(p,v){return p[v]=gd(r,{placement:v,boundary:i,rootBoundary:a,padding:o})[ya(v)],p},{});return Object.keys(d).sort(function(p,v){return d[p]-d[v]})}function d7(r){if(ya(r)===$S)return[];var e=_m(r);return[IM(r),e,IM(e)]}function p7(r){var e=r.state,t=r.options,n=r.name;if(!e.modifiersData[n]._skip){for(var i=t.mainAxis,a=i===void 0?!0:i,o=t.altAxis,s=o===void 0?!0:o,l=t.fallbackPlacements,u=t.padding,c=t.boundary,f=t.rootBoundary,h=t.altBoundary,d=t.flipVariations,p=d===void 0?!0:d,v=t.allowedAutoPlacements,m=e.options.placement,g=ya(m),y=g===m,b=l||(y||!p?[_m(m)]:d7(m)),_=[m].concat(b).reduce(function(J,U){return J.concat(ya(U)===$S?h7(e,{placement:U,boundary:c,rootBoundary:f,padding:u,flipVariations:p,allowedAutoPlacements:v}):U)},[]),x=e.rects.reference,w=e.rects.popper,S=new Map,T=!0,C=_[0],A=0;A<_.length;A++){var M=_[A],D=ya(M),E=Wc(M)===$c,L=[Mn,di].indexOf(D)>=0,I=L?"width":"height",R=gd(e,{placement:M,boundary:c,rootBoundary:f,altBoundary:h,padding:u}),P=L?E?pi:kn:E?di:Mn;x[I]>w[I]&&(P=_m(P));var O=_m(P),j=[];if(a&&j.push(R[D]<=0),s&&j.push(R[P]<=0,R[O]<=0),j.every(function(J){return J})){C=M,T=!1;break}S.set(M,j)}if(T)for(var F=p?3:1,N=function(U){var we=_.find(function(Ye){var ge=S.get(Ye);if(ge)return ge.slice(0,U).every(function(le){return le})});if(we)return C=we,"break"},B=F;B>0;B--){var $=N(B);if($==="break")break}e.placement!==C&&(e.modifiersData[n]._skip=!0,e.placement=C,e.reset=!0)}}const v7={name:"flip",enabled:!0,phase:"main",fn:p7,requiresIfExists:["offset"],data:{_skip:!1}};function RM(r,e,t){return t===void 0&&(t={x:0,y:0}),{top:r.top-e.height-t.y,right:r.right-e.width+t.x,bottom:r.bottom-e.height+t.y,left:r.left-e.width-t.x}}function OM(r){return[Mn,pi,di,kn].some(function(e){return r[e]>=0})}function m7(r){var e=r.state,t=r.name,n=e.rects.reference,i=e.rects.popper,a=e.modifiersData.preventOverflow,o=gd(e,{elementContext:"reference"}),s=gd(e,{altBoundary:!0}),l=RM(o,n),u=RM(s,i,a),c=OM(l),f=OM(u);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}const g7={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:m7};function y7(r,e,t){var n=ya(r),i=[kn,Mn].indexOf(n)>=0?-1:1,a=typeof t=="function"?t(Object.assign({},e,{placement:r})):t,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[kn,pi].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function b7(r){var e=r.state,t=r.options,n=r.name,i=t.offset,a=i===void 0?[0,0]:i,o=T3.reduce(function(c,f){return c[f]=y7(f,e.rects,a),c},{}),s=o[e.placement],l=s.x,u=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[n]=o}const _7={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:b7};function x7(r){var e=r.state,t=r.name;e.modifiersData[t]=I3({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const w7={name:"popperOffsets",enabled:!0,phase:"read",fn:x7,data:{}};function S7(r){return r==="x"?"y":"x"}function T7(r){var e=r.state,t=r.options,n=r.name,i=t.mainAxis,a=i===void 0?!0:i,o=t.altAxis,s=o===void 0?!1:o,l=t.boundary,u=t.rootBoundary,c=t.altBoundary,f=t.padding,h=t.tether,d=h===void 0?!0:h,p=t.tetherOffset,v=p===void 0?0:p,m=gd(e,{boundary:l,rootBoundary:u,padding:f,altBoundary:c}),g=ya(e.placement),y=Wc(e.placement),b=!y,_=WS(g),x=S7(_),w=e.modifiersData.popperOffsets,S=e.rects.reference,T=e.rects.popper,C=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,A=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),M=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,D={x:0,y:0};if(w){if(a){var E,L=_==="y"?Mn:kn,I=_==="y"?di:pi,R=_==="y"?"height":"width",P=w[_],O=P+m[L],j=P-m[I],F=d?-T[R]/2:0,N=y===$c?S[R]:T[R],B=y===$c?-T[R]:-S[R],$=e.elements.arrow,J=d&&$?GS($):{width:0,height:0},U=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:k3(),we=U[L],Ye=U[I],ge=zh(0,S[R],J[R]),le=b?S[R]/2-F-ge-we-A.mainAxis:N-ge-we-A.mainAxis,be=b?-S[R]/2+F+ge+Ye+A.mainAxis:B+ge+Ye+A.mainAxis,re=e.elements.arrow&&hp(e.elements.arrow),G=re?_==="y"?re.clientTop||0:re.clientLeft||0:0,ee=(E=M==null?void 0:M[_])!=null?E:0,Q=P+le-ee-G,me=P+be-ee,he=zh(d?sg(O,Q):O,P,d?Fl(j,me):j);w[_]=he,D[_]=he-P}if(s){var Se,Fe=_==="x"?Mn:kn,xe=_==="x"?di:pi,rt=w[x],at=x==="y"?"height":"width",ht=rt+m[Fe],fr=rt-m[xe],yr=[Mn,kn].indexOf(g)!==-1,en=(Se=M==null?void 0:M[x])!=null?Se:0,tn=yr?ht:rt-S[at]-T[at]-en+A.altAxis,pe=yr?rt+S[at]+T[at]-en-A.altAxis:fr,De=d&&yr?qH(tn,rt,pe):zh(d?tn:ht,rt,d?pe:fr);w[x]=De,D[x]=De-rt}e.modifiersData[n]=D}}const C7={name:"preventOverflow",enabled:!0,phase:"main",fn:T7,requiresIfExists:["offset"]};function A7(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function M7(r){return r===$n(r)||!fi(r)?US(r):A7(r)}function k7(r){var e=r.getBoundingClientRect(),t=Hc(e.width)/r.offsetWidth||1,n=Hc(e.height)/r.offsetHeight||1;return t!==1||n!==1}function D7(r,e,t){t===void 0&&(t=!1);var n=fi(e),i=fi(e)&&k7(e),a=Os(e),o=Gc(r,i,t),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!t)&&((Aa(e)!=="body"||qS(a))&&(s=M7(e)),fi(e)?(l=Gc(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):a&&(l.x=YS(a))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function E7(r){var e=new Map,t=new Set,n=[];r.forEach(function(a){e.set(a.name,a)});function i(a){t.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!t.has(s)){var l=e.get(s);l&&i(l)}}),n.push(a)}return r.forEach(function(a){t.has(a.name)||i(a)}),n}function L7(r){var e=E7(r);return HH.reduce(function(t,n){return t.concat(e.filter(function(i){return i.phase===n}))},[])}function I7(r){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(r())})})),e}}function P7(r){var e=r.reduce(function(t,n){var i=t[n.name];return t[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,t},{});return Object.keys(e).map(function(t){return e[t]})}var jM={placement:"bottom",modifiers:[],strategy:"absolute"};function NM(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function R7(r){r===void 0&&(r={});var e=r,t=e.defaultModifiers,n=t===void 0?[]:t,i=e.defaultOptions,a=i===void 0?jM:i;return function(s,l,u){u===void 0&&(u=a);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},jM,a),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},f=[],h=!1,d={state:c,setOptions:function(g){var y=typeof g=="function"?g(c.options):g;v(),c.options=Object.assign({},a,c.options,y),c.scrollParents={reference:su(s)?Fh(s):s.contextElement?Fh(s.contextElement):[],popper:Fh(l)};var b=L7(P7([].concat(n,c.options.modifiers)));return c.orderedModifiers=b.filter(function(_){return _.enabled}),p(),d.update()},forceUpdate:function(){if(!h){var g=c.elements,y=g.reference,b=g.popper;if(NM(y,b)){c.rects={reference:D7(y,hp(b),c.options.strategy==="fixed"),popper:GS(b)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(A){return c.modifiersData[A.name]=Object.assign({},A.data)});for(var _=0;_<c.orderedModifiers.length;_++){if(c.reset===!0){c.reset=!1,_=-1;continue}var x=c.orderedModifiers[_],w=x.fn,S=x.options,T=S===void 0?{}:S,C=x.name;typeof w=="function"&&(c=w({state:c,options:T,name:C,instance:d})||c)}}}},update:I7(function(){return new Promise(function(m){d.forceUpdate(),m(c)})}),destroy:function(){v(),h=!0}};if(!NM(s,l))return d;d.setOptions(u).then(function(m){!h&&u.onFirstUpdate&&u.onFirstUpdate(m)});function p(){c.orderedModifiers.forEach(function(m){var g=m.name,y=m.options,b=y===void 0?{}:y,_=m.effect;if(typeof _=="function"){var x=_({state:c,name:g,instance:d,options:b}),w=function(){};f.push(x||w)}})}function v(){f.forEach(function(m){return m()}),f=[]}return d}}var O7=[i7,w7,r7,C3,_7,v7,C7,JH,g7],j7=R7({defaultModifiers:O7}),P3={exports:{}};(function(r,e){(function(n,i){r.exports=i()})(typeof self<"u"?self:bH,function(){return function(t){var n={};function i(a){if(n[a])return n[a].exports;var o=n[a]={i:a,l:!1,exports:{}};return t[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=n,i.d=function(a,o,s){i.o(a,o)||Object.defineProperty(a,o,{configurable:!1,enumerable:!0,get:s})},i.r=function(a){Object.defineProperty(a,"__esModule",{value:!0})},i.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(o,"a",o),o},i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)},i.p="",i(i.s=0)}({"./dist/icons.json":function(t){t.exports={activity:'<polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>',airplay:'<path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon>',"alert-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line>',"alert-octagon":'<polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line>',"alert-triangle":'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line>',"align-center":'<line x1="18" y1="10" x2="6" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="18" y1="18" x2="6" y2="18"></line>',"align-justify":'<line x1="21" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="3" y2="18"></line>',"align-left":'<line x1="17" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="17" y1="18" x2="3" y2="18"></line>',"align-right":'<line x1="21" y1="10" x2="7" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="7" y2="18"></line>',anchor:'<circle cx="12" cy="5" r="3"></circle><line x1="12" y1="22" x2="12" y2="8"></line><path d="M5 12H2a10 10 0 0 0 20 0h-3"></path>',aperture:'<circle cx="12" cy="12" r="10"></circle><line x1="14.31" y1="8" x2="20.05" y2="17.94"></line><line x1="9.69" y1="8" x2="21.17" y2="8"></line><line x1="7.38" y1="12" x2="13.12" y2="2.06"></line><line x1="9.69" y1="16" x2="3.95" y2="6.06"></line><line x1="14.31" y1="16" x2="2.83" y2="16"></line><line x1="16.62" y1="12" x2="10.88" y2="21.94"></line>',archive:'<polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line>',"arrow-down-circle":'<circle cx="12" cy="12" r="10"></circle><polyline points="8 12 12 16 16 12"></polyline><line x1="12" y1="8" x2="12" y2="16"></line>',"arrow-down-left":'<line x1="17" y1="7" x2="7" y2="17"></line><polyline points="17 17 7 17 7 7"></polyline>',"arrow-down-right":'<line x1="7" y1="7" x2="17" y2="17"></line><polyline points="17 7 17 17 7 17"></polyline>',"arrow-down":'<line x1="12" y1="5" x2="12" y2="19"></line><polyline points="19 12 12 19 5 12"></polyline>',"arrow-left-circle":'<circle cx="12" cy="12" r="10"></circle><polyline points="12 8 8 12 12 16"></polyline><line x1="16" y1="12" x2="8" y2="12"></line>',"arrow-left":'<line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline>',"arrow-right-circle":'<circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line>',"arrow-right":'<line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline>',"arrow-up-circle":'<circle cx="12" cy="12" r="10"></circle><polyline points="16 12 12 8 8 12"></polyline><line x1="12" y1="16" x2="12" y2="8"></line>',"arrow-up-left":'<line x1="17" y1="17" x2="7" y2="7"></line><polyline points="7 17 7 7 17 7"></polyline>',"arrow-up-right":'<line x1="7" y1="17" x2="17" y2="7"></line><polyline points="7 7 17 7 17 17"></polyline>',"arrow-up":'<line x1="12" y1="19" x2="12" y2="5"></line><polyline points="5 12 12 5 19 12"></polyline>',"at-sign":'<circle cx="12" cy="12" r="4"></circle><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94"></path>',award:'<circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline>',"bar-chart-2":'<line x1="18" y1="20" x2="18" y2="10"></line><line x1="12" y1="20" x2="12" y2="4"></line><line x1="6" y1="20" x2="6" y2="14"></line>',"bar-chart":'<line x1="12" y1="20" x2="12" y2="10"></line><line x1="18" y1="20" x2="18" y2="4"></line><line x1="6" y1="20" x2="6" y2="16"></line>',"battery-charging":'<path d="M5 18H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3.19M15 6h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-3.19"></path><line x1="23" y1="13" x2="23" y2="11"></line><polyline points="11 6 7 12 13 12 9 18"></polyline>',battery:'<rect x="1" y="6" width="18" height="12" rx="2" ry="2"></rect><line x1="23" y1="13" x2="23" y2="11"></line>',"bell-off":'<path d="M13.73 21a2 2 0 0 1-3.46 0"></path><path d="M18.63 13A17.89 17.89 0 0 1 18 8"></path><path d="M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14"></path><path d="M18 8a6 6 0 0 0-9.33-5"></path><line x1="1" y1="1" x2="23" y2="23"></line>',bell:'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path>',bluetooth:'<polyline points="6.5 6.5 17.5 17.5 12 23 12 1 17.5 6.5 6.5 17.5"></polyline>',bold:'<path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path><path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path>',"book-open":'<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path>',book:'<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path>',bookmark:'<path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path>',box:'<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line>',briefcase:'<rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path>',calendar:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line>',"camera-off":'<line x1="1" y1="1" x2="23" y2="23"></line><path d="M21 21H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3m3-3h6l2 3h4a2 2 0 0 1 2 2v9.34m-7.72-2.06a4 4 0 1 1-5.56-5.56"></path>',camera:'<path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path><circle cx="12" cy="13" r="4"></circle>',cast:'<path d="M2 16.1A5 5 0 0 1 5.9 20M2 12.05A9 9 0 0 1 9.95 20M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6"></path><line x1="2" y1="20" x2="2.01" y2="20"></line>',"check-circle":'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline>',"check-square":'<polyline points="9 11 12 14 22 4"></polyline><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path>',check:'<polyline points="20 6 9 17 4 12"></polyline>',"chevron-down":'<polyline points="6 9 12 15 18 9"></polyline>',"chevron-left":'<polyline points="15 18 9 12 15 6"></polyline>',"chevron-right":'<polyline points="9 18 15 12 9 6"></polyline>',"chevron-up":'<polyline points="18 15 12 9 6 15"></polyline>',"chevrons-down":'<polyline points="7 13 12 18 17 13"></polyline><polyline points="7 6 12 11 17 6"></polyline>',"chevrons-left":'<polyline points="11 17 6 12 11 7"></polyline><polyline points="18 17 13 12 18 7"></polyline>',"chevrons-right":'<polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline>',"chevrons-up":'<polyline points="17 11 12 6 7 11"></polyline><polyline points="17 18 12 13 7 18"></polyline>',chrome:'<circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="21.17" y1="8" x2="12" y2="8"></line><line x1="3.95" y1="6.06" x2="8.54" y2="14"></line><line x1="10.88" y1="21.94" x2="15.46" y2="14"></line>',circle:'<circle cx="12" cy="12" r="10"></circle>',clipboard:'<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect>',clock:'<circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline>',"cloud-drizzle":'<line x1="8" y1="19" x2="8" y2="21"></line><line x1="8" y1="13" x2="8" y2="15"></line><line x1="16" y1="19" x2="16" y2="21"></line><line x1="16" y1="13" x2="16" y2="15"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="12" y1="15" x2="12" y2="17"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path>',"cloud-lightning":'<path d="M19 16.9A5 5 0 0 0 18 7h-1.26a8 8 0 1 0-11.62 9"></path><polyline points="13 11 9 17 15 17 11 23"></polyline>',"cloud-off":'<path d="M22.61 16.95A5 5 0 0 0 18 10h-1.26a8 8 0 0 0-7.05-6M5 5a8 8 0 0 0 4 15h9a5 5 0 0 0 1.7-.3"></path><line x1="1" y1="1" x2="23" y2="23"></line>',"cloud-rain":'<line x1="16" y1="13" x2="16" y2="21"></line><line x1="8" y1="13" x2="8" y2="21"></line><line x1="12" y1="15" x2="12" y2="23"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path>',"cloud-snow":'<path d="M20 17.58A5 5 0 0 0 18 8h-1.26A8 8 0 1 0 4 16.25"></path><line x1="8" y1="16" x2="8.01" y2="16"></line><line x1="8" y1="20" x2="8.01" y2="20"></line><line x1="12" y1="18" x2="12.01" y2="18"></line><line x1="12" y1="22" x2="12.01" y2="22"></line><line x1="16" y1="16" x2="16.01" y2="16"></line><line x1="16" y1="20" x2="16.01" y2="20"></line>',cloud:'<path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"></path>',code:'<polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline>',codepen:'<polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2"></polygon><line x1="12" y1="22" x2="12" y2="15.5"></line><polyline points="22 8.5 12 15.5 2 8.5"></polyline><polyline points="2 15.5 12 8.5 22 15.5"></polyline><line x1="12" y1="2" x2="12" y2="8.5"></line>',codesandbox:'<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="7.5 4.21 12 6.81 16.5 4.21"></polyline><polyline points="7.5 19.79 7.5 14.6 3 12"></polyline><polyline points="21 12 16.5 14.6 16.5 19.79"></polyline><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line>',coffee:'<path d="M18 8h1a4 4 0 0 1 0 8h-1"></path><path d="M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z"></path><line x1="6" y1="1" x2="6" y2="4"></line><line x1="10" y1="1" x2="10" y2="4"></line><line x1="14" y1="1" x2="14" y2="4"></line>',columns:'<path d="M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18"></path>',command:'<path d="M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"></path>',compass:'<circle cx="12" cy="12" r="10"></circle><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"></polygon>',copy:'<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>',"corner-down-left":'<polyline points="9 10 4 15 9 20"></polyline><path d="M20 4v7a4 4 0 0 1-4 4H4"></path>',"corner-down-right":'<polyline points="15 10 20 15 15 20"></polyline><path d="M4 4v7a4 4 0 0 0 4 4h12"></path>',"corner-left-down":'<polyline points="14 15 9 20 4 15"></polyline><path d="M20 4h-7a4 4 0 0 0-4 4v12"></path>',"corner-left-up":'<polyline points="14 9 9 4 4 9"></polyline><path d="M20 20h-7a4 4 0 0 1-4-4V4"></path>',"corner-right-down":'<polyline points="10 15 15 20 20 15"></polyline><path d="M4 4h7a4 4 0 0 1 4 4v12"></path>',"corner-right-up":'<polyline points="10 9 15 4 20 9"></polyline><path d="M4 20h7a4 4 0 0 0 4-4V4"></path>',"corner-up-left":'<polyline points="9 14 4 9 9 4"></polyline><path d="M20 20v-7a4 4 0 0 0-4-4H4"></path>',"corner-up-right":'<polyline points="15 14 20 9 15 4"></polyline><path d="M4 20v-7a4 4 0 0 1 4-4h12"></path>',cpu:'<rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect><rect x="9" y="9" width="6" height="6"></rect><line x1="9" y1="1" x2="9" y2="4"></line><line x1="15" y1="1" x2="15" y2="4"></line><line x1="9" y1="20" x2="9" y2="23"></line><line x1="15" y1="20" x2="15" y2="23"></line><line x1="20" y1="9" x2="23" y2="9"></line><line x1="20" y1="14" x2="23" y2="14"></line><line x1="1" y1="9" x2="4" y2="9"></line><line x1="1" y1="14" x2="4" y2="14"></line>',"credit-card":'<rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect><line x1="1" y1="10" x2="23" y2="10"></line>',crop:'<path d="M6.13 1L6 16a2 2 0 0 0 2 2h15"></path><path d="M1 6.13L16 6a2 2 0 0 1 2 2v15"></path>',crosshair:'<circle cx="12" cy="12" r="10"></circle><line x1="22" y1="12" x2="18" y2="12"></line><line x1="6" y1="12" x2="2" y2="12"></line><line x1="12" y1="6" x2="12" y2="2"></line><line x1="12" y1="22" x2="12" y2="18"></line>',database:'<ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path>',delete:'<path d="M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"></path><line x1="18" y1="9" x2="12" y2="15"></line><line x1="12" y1="9" x2="18" y2="15"></line>',disc:'<circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="3"></circle>',"divide-circle":'<line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line><circle cx="12" cy="12" r="10"></circle>',"divide-square":'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line>',divide:'<circle cx="12" cy="6" r="2"></circle><line x1="5" y1="12" x2="19" y2="12"></line><circle cx="12" cy="18" r="2"></circle>',"dollar-sign":'<line x1="12" y1="1" x2="12" y2="23"></line><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path>',"download-cloud":'<polyline points="8 17 12 21 16 17"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.88 18.09A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.29"></path>',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line>',dribbble:'<circle cx="12" cy="12" r="10"></circle><path d="M8.56 2.75c4.37 6.03 6.02 9.42 8.03 17.72m2.54-15.38c-3.72 4.35-8.94 5.66-16.88 5.85m19.5 1.9c-3.5-.93-6.63-.82-8.94 0-2.58.92-5.01 2.86-7.44 6.32"></path>',droplet:'<path d="M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"></path>',"edit-2":'<path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path>',"edit-3":'<path d="M12 20h9"></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>',edit:'<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path>',"external-link":'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>',"eye-off":'<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path><line x1="1" y1="1" x2="23" y2="23"></line>',eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle>',facebook:'<path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path>',"fast-forward":'<polygon points="13 19 22 12 13 5 13 19"></polygon><polygon points="2 19 11 12 2 5 2 19"></polygon>',feather:'<path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17.5" y1="15" x2="9" y2="15"></line>',figma:'<path d="M5 5.5A3.5 3.5 0 0 1 8.5 2H12v7H8.5A3.5 3.5 0 0 1 5 5.5z"></path><path d="M12 2h3.5a3.5 3.5 0 1 1 0 7H12V2z"></path><path d="M12 12.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 1 1-7 0z"></path><path d="M5 19.5A3.5 3.5 0 0 1 8.5 16H12v3.5a3.5 3.5 0 1 1-7 0z"></path><path d="M5 12.5A3.5 3.5 0 0 1 8.5 9H12v7H8.5A3.5 3.5 0 0 1 5 12.5z"></path>',"file-minus":'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="9" y1="15" x2="15" y2="15"></line>',"file-plus":'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="12" y1="18" x2="12" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line>',"file-text":'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline>',file:'<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>',film:'<rect x="2" y="2" width="20" height="20" rx="2.18" ry="2.18"></rect><line x1="7" y1="2" x2="7" y2="22"></line><line x1="17" y1="2" x2="17" y2="22"></line><line x1="2" y1="12" x2="22" y2="12"></line><line x1="2" y1="7" x2="7" y2="7"></line><line x1="2" y1="17" x2="7" y2="17"></line><line x1="17" y1="17" x2="22" y2="17"></line><line x1="17" y1="7" x2="22" y2="7"></line>',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon>',flag:'<path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"></path><line x1="4" y1="22" x2="4" y2="15"></line>',"folder-minus":'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="9" y1="14" x2="15" y2="14"></line>',"folder-plus":'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="12" y1="11" x2="12" y2="17"></line><line x1="9" y1="14" x2="15" y2="14"></line>',folder:'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path>',framer:'<path d="M5 16V9h14V2H5l14 14h-7m-7 0l7 7v-7m-7 0h7"></path>',frown:'<circle cx="12" cy="12" r="10"></circle><path d="M16 16s-1.5-2-4-2-4 2-4 2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line>',gift:'<polyline points="20 12 20 22 4 22 4 12"></polyline><rect x="2" y="7" width="20" height="5"></rect><line x1="12" y1="22" x2="12" y2="7"></line><path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path><path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path>',"git-branch":'<line x1="6" y1="3" x2="6" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path>',"git-commit":'<circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line>',"git-merge":'<circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M6 21V9a9 9 0 0 0 9 9"></path>',"git-pull-request":'<circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M13 6h3a2 2 0 0 1 2 2v7"></path><line x1="6" y1="9" x2="6" y2="21"></line>',github:'<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path>',gitlab:'<path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"></path>',globe:'<circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path>',grid:'<rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect>',"hard-drive":'<line x1="22" y1="12" x2="2" y2="12"></line><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><line x1="6" y1="16" x2="6.01" y2="16"></line><line x1="10" y1="16" x2="10.01" y2="16"></line>',hash:'<line x1="4" y1="9" x2="20" y2="9"></line><line x1="4" y1="15" x2="20" y2="15"></line><line x1="10" y1="3" x2="8" y2="21"></line><line x1="16" y1="3" x2="14" y2="21"></line>',headphones:'<path d="M3 18v-6a9 9 0 0 1 18 0v6"></path><path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"></path>',heart:'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path>',"help-circle":'<circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line>',hexagon:'<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path>',home:'<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline>',image:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline>',inbox:'<polyline points="22 12 16 12 14 15 10 15 8 12 2 12"></polyline><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path>',info:'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line>',instagram:'<rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line>',italic:'<line x1="19" y1="4" x2="10" y2="4"></line><line x1="14" y1="20" x2="5" y2="20"></line><line x1="15" y1="4" x2="9" y2="20"></line>',key:'<path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"></path>',layers:'<polygon points="12 2 2 7 12 12 22 7 12 2"></polygon><polyline points="2 17 12 22 22 17"></polyline><polyline points="2 12 12 17 22 12"></polyline>',layout:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="3" y1="9" x2="21" y2="9"></line><line x1="9" y1="21" x2="9" y2="9"></line>',"life-buoy":'<circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="4.93" y1="4.93" x2="9.17" y2="9.17"></line><line x1="14.83" y1="14.83" x2="19.07" y2="19.07"></line><line x1="14.83" y1="9.17" x2="19.07" y2="4.93"></line><line x1="14.83" y1="9.17" x2="18.36" y2="5.64"></line><line x1="4.93" y1="19.07" x2="9.17" y2="14.83"></line>',"link-2":'<path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line>',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>',linkedin:'<path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle>',list:'<line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line>',loader:'<line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line>',lock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path>',"log-in":'<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line>',"log-out":'<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line>',mail:'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline>',"map-pin":'<path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle>',map:'<polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"></polygon><line x1="8" y1="2" x2="8" y2="18"></line><line x1="16" y1="6" x2="16" y2="22"></line>',"maximize-2":'<polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line>',maximize:'<path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path>',meh:'<circle cx="12" cy="12" r="10"></circle><line x1="8" y1="15" x2="16" y2="15"></line><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line>',menu:'<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>',"message-circle":'<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path>',"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"></path>',"mic-off":'<line x1="1" y1="1" x2="23" y2="23"></line><path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"></path><path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line>',mic:'<path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line>',"minimize-2":'<polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line>',minimize:'<path d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"></path>',"minus-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="8" y1="12" x2="16" y2="12"></line>',"minus-square":'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line>',minus:'<line x1="5" y1="12" x2="19" y2="12"></line>',monitor:'<rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line>',moon:'<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>',"more-horizontal":'<circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle>',"more-vertical":'<circle cx="12" cy="12" r="1"></circle><circle cx="12" cy="5" r="1"></circle><circle cx="12" cy="19" r="1"></circle>',"mouse-pointer":'<path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path>',move:'<polyline points="5 9 2 12 5 15"></polyline><polyline points="9 5 12 2 15 5"></polyline><polyline points="15 19 12 22 9 19"></polyline><polyline points="19 9 22 12 19 15"></polyline><line x1="2" y1="12" x2="22" y2="12"></line><line x1="12" y1="2" x2="12" y2="22"></line>',music:'<path d="M9 18V5l12-2v13"></path><circle cx="6" cy="18" r="3"></circle><circle cx="18" cy="16" r="3"></circle>',"navigation-2":'<polygon points="12 2 19 21 12 17 5 21 12 2"></polygon>',navigation:'<polygon points="3 11 22 2 13 21 11 13 3 11"></polygon>',octagon:'<polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon>',package:'<line x1="16.5" y1="9.4" x2="7.5" y2="4.21"></line><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line>',paperclip:'<path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"></path>',"pause-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="10" y1="15" x2="10" y2="9"></line><line x1="14" y1="15" x2="14" y2="9"></line>',pause:'<rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect>',"pen-tool":'<path d="M12 19l7-7 3 3-7 7-3-3z"></path><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"></path><path d="M2 2l7.586 7.586"></path><circle cx="11" cy="11" r="2"></circle>',percent:'<line x1="19" y1="5" x2="5" y2="19"></line><circle cx="6.5" cy="6.5" r="2.5"></circle><circle cx="17.5" cy="17.5" r="2.5"></circle>',"phone-call":'<path d="M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',"phone-forwarded":'<polyline points="19 1 23 5 19 9"></polyline><line x1="15" y1="5" x2="23" y2="5"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',"phone-incoming":'<polyline points="16 2 16 8 22 8"></polyline><line x1="23" y1="1" x2="16" y2="8"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',"phone-missed":'<line x1="23" y1="1" x2="17" y2="7"></line><line x1="17" y1="1" x2="23" y2="7"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',"phone-off":'<path d="M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"></path><line x1="23" y1="1" x2="1" y2="23"></line>',"phone-outgoing":'<polyline points="23 7 23 1 17 1"></polyline><line x1="16" y1="8" x2="23" y2="1"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',phone:'<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',"pie-chart":'<path d="M21.21 15.89A10 10 0 1 1 8 2.83"></path><path d="M22 12A10 10 0 0 0 12 2v10z"></path>',"play-circle":'<circle cx="12" cy="12" r="10"></circle><polygon points="10 8 16 12 10 16 10 8"></polygon>',play:'<polygon points="5 3 19 12 5 21 5 3"></polygon>',"plus-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line>',"plus-square":'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line>',plus:'<line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line>',pocket:'<path d="M4 3h16a2 2 0 0 1 2 2v6a10 10 0 0 1-10 10A10 10 0 0 1 2 11V5a2 2 0 0 1 2-2z"></path><polyline points="8 10 12 14 16 10"></polyline>',power:'<path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line>',printer:'<polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect>',radio:'<circle cx="12" cy="12" r="2"></circle><path d="M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14"></path>',"refresh-ccw":'<polyline points="1 4 1 10 7 10"></polyline><polyline points="23 20 23 14 17 14"></polyline><path d="M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"></path>',"refresh-cw":'<polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path>',repeat:'<polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path>',rewind:'<polygon points="11 19 2 12 11 5 11 19"></polygon><polygon points="22 19 13 12 22 5 22 19"></polygon>',"rotate-ccw":'<polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path>',"rotate-cw":'<polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path>',rss:'<path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle>',save:'<path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline>',scissors:'<circle cx="6" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><line x1="20" y1="4" x2="8.12" y2="15.88"></line><line x1="14.47" y1="14.48" x2="20" y2="20"></line><line x1="8.12" y1="8.12" x2="12" y2="12"></line>',search:'<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>',send:'<line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>',server:'<rect x="2" y="2" width="20" height="8" rx="2" ry="2"></rect><rect x="2" y="14" width="20" height="8" rx="2" ry="2"></rect><line x1="6" y1="6" x2="6.01" y2="6"></line><line x1="6" y1="18" x2="6.01" y2="18"></line>',settings:'<circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>',"share-2":'<circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line>',share:'<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path><polyline points="16 6 12 2 8 6"></polyline><line x1="12" y1="2" x2="12" y2="15"></line>',"shield-off":'<path d="M19.69 14a6.9 6.9 0 0 0 .31-2V5l-8-3-3.16 1.18"></path><path d="M4.73 4.73L4 5v7c0 6 8 10 8 10a20.29 20.29 0 0 0 5.62-4.38"></path><line x1="1" y1="1" x2="23" y2="23"></line>',shield:'<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path>',"shopping-bag":'<path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path><line x1="3" y1="6" x2="21" y2="6"></line><path d="M16 10a4 4 0 0 1-8 0"></path>',"shopping-cart":'<circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path>',shuffle:'<polyline points="16 3 21 3 21 8"></polyline><line x1="4" y1="20" x2="21" y2="3"></line><polyline points="21 16 21 21 16 21"></polyline><line x1="15" y1="15" x2="21" y2="21"></line><line x1="4" y1="4" x2="9" y2="9"></line>',sidebar:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="3" x2="9" y2="21"></line>',"skip-back":'<polygon points="19 20 9 12 19 4 19 20"></polygon><line x1="5" y1="19" x2="5" y2="5"></line>',"skip-forward":'<polygon points="5 4 15 12 5 20 5 4"></polygon><line x1="19" y1="5" x2="19" y2="19"></line>',slack:'<path d="M14.5 10c-.83 0-1.5-.67-1.5-1.5v-5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5z"></path><path d="M20.5 10H19V8.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path><path d="M9.5 14c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5S8 21.33 8 20.5v-5c0-.83.67-1.5 1.5-1.5z"></path><path d="M3.5 14H5v1.5c0 .83-.67 1.5-1.5 1.5S2 16.33 2 15.5 2.67 14 3.5 14z"></path><path d="M14 14.5c0-.83.67-1.5 1.5-1.5h5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-5c-.83 0-1.5-.67-1.5-1.5z"></path><path d="M15.5 19H14v1.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path><path d="M10 9.5C10 8.67 9.33 8 8.5 8h-5C2.67 8 2 8.67 2 9.5S2.67 11 3.5 11h5c.83 0 1.5-.67 1.5-1.5z"></path><path d="M8.5 5H10V3.5C10 2.67 9.33 2 8.5 2S7 2.67 7 3.5 7.67 5 8.5 5z"></path>',slash:'<circle cx="12" cy="12" r="10"></circle><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line>',sliders:'<line x1="4" y1="21" x2="4" y2="14"></line><line x1="4" y1="10" x2="4" y2="3"></line><line x1="12" y1="21" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="3"></line><line x1="20" y1="21" x2="20" y2="16"></line><line x1="20" y1="12" x2="20" y2="3"></line><line x1="1" y1="14" x2="7" y2="14"></line><line x1="9" y1="8" x2="15" y2="8"></line><line x1="17" y1="16" x2="23" y2="16"></line>',smartphone:'<rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line>',smile:'<circle cx="12" cy="12" r="10"></circle><path d="M8 14s1.5 2 4 2 4-2 4-2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line>',speaker:'<rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><circle cx="12" cy="14" r="4"></circle><line x1="12" y1="6" x2="12.01" y2="6"></line>',square:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>',star:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>',"stop-circle":'<circle cx="12" cy="12" r="10"></circle><rect x="9" y="9" width="6" height="6"></rect>',sun:'<circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>',sunrise:'<path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="2" x2="12" y2="9"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="8 6 12 2 16 6"></polyline>',sunset:'<path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="9" x2="12" y2="2"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="16 5 12 9 8 5"></polyline>',table:'<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"></path>',tablet:'<rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line>',tag:'<path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7.01" y2="7"></line>',target:'<circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="6"></circle><circle cx="12" cy="12" r="2"></circle>',terminal:'<polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line>',thermometer:'<path d="M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z"></path>',"thumbs-down":'<path d="M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17"></path>',"thumbs-up":'<path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path>',"toggle-left":'<rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="8" cy="12" r="3"></circle>',"toggle-right":'<rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="16" cy="12" r="3"></circle>',tool:'<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path>',"trash-2":'<polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line>',trash:'<polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>',trello:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><rect x="7" y="7" width="3" height="9"></rect><rect x="14" y="7" width="3" height="5"></rect>',"trending-down":'<polyline points="23 18 13.5 8.5 8.5 13.5 1 6"></polyline><polyline points="17 18 23 18 23 12"></polyline>',"trending-up":'<polyline points="23 6 13.5 15.5 8.5 10.5 1 18"></polyline><polyline points="17 6 23 6 23 12"></polyline>',triangle:'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path>',truck:'<rect x="1" y="3" width="15" height="13"></rect><polygon points="16 8 20 8 23 11 23 16 16 16 16 8"></polygon><circle cx="5.5" cy="18.5" r="2.5"></circle><circle cx="18.5" cy="18.5" r="2.5"></circle>',tv:'<rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect><polyline points="17 2 12 7 7 2"></polyline>',twitch:'<path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path>',twitter:'<path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path>',type:'<polyline points="4 7 4 4 20 4 20 7"></polyline><line x1="9" y1="20" x2="15" y2="20"></line><line x1="12" y1="4" x2="12" y2="20"></line>',umbrella:'<path d="M23 12a11.05 11.05 0 0 0-22 0zm-5 7a3 3 0 0 1-6 0v-7"></path>',underline:'<path d="M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3"></path><line x1="4" y1="21" x2="20" y2="21"></line>',unlock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 9.9-1"></path>',"upload-cloud":'<polyline points="16 16 12 12 8 16"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16"></polyline>',upload:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line>',"user-check":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><polyline points="17 11 19 13 23 9"></polyline>',"user-minus":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="23" y1="11" x2="17" y2="11"></line>',"user-plus":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="20" y1="8" x2="20" y2="14"></line><line x1="23" y1="11" x2="17" y2="11"></line>',"user-x":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="18" y1="8" x2="23" y2="13"></line><line x1="23" y1="8" x2="18" y2="13"></line>',user:'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle>',users:'<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path>',"video-off":'<path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line>',video:'<polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect>',voicemail:'<circle cx="5.5" cy="11.5" r="4.5"></circle><circle cx="18.5" cy="11.5" r="4.5"></circle><line x1="5.5" y1="16" x2="18.5" y2="16"></line>',"volume-1":'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path>',"volume-2":'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path>',"volume-x":'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><line x1="23" y1="9" x2="17" y2="15"></line><line x1="17" y1="9" x2="23" y2="15"></line>',volume:'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon>',watch:'<circle cx="12" cy="12" r="7"></circle><polyline points="12 9 12 12 13.5 13.5"></polyline><path d="M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83"></path>',"wifi-off":'<line x1="1" y1="1" x2="23" y2="23"></line><path d="M16.72 11.06A10.94 10.94 0 0 1 19 12.55"></path><path d="M5 12.55a10.94 10.94 0 0 1 5.17-2.39"></path><path d="M10.71 5.05A16 16 0 0 1 22.58 9"></path><path d="M1.42 9a15.91 15.91 0 0 1 4.7-2.88"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line>',wifi:'<path d="M5 12.55a11 11 0 0 1 14.08 0"></path><path d="M1.42 9a16 16 0 0 1 21.16 0"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line>',wind:'<path d="M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2"></path>',"x-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line>',"x-octagon":'<polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line>',"x-square":'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="9" x2="15" y2="15"></line><line x1="15" y1="9" x2="9" y2="15"></line>',x:'<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>',youtube:'<path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon>',"zap-off":'<polyline points="12.41 6.75 13 2 10.57 4.92"></polyline><polyline points="18.57 12.91 21 10 15.66 10"></polyline><polyline points="8 8 3 14 12 14 11 22 16 16"></polyline><line x1="1" y1="1" x2="23" y2="23"></line>',zap:'<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon>',"zoom-in":'<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line>',"zoom-out":'<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line>'}},"./node_modules/classnames/dedupe.js":function(t,n,i){var a,o;/*!
|
||
Copyright (c) 2016 Jed Watson.
|
||
Licensed under the MIT License (MIT), see
|
||
http://jedwatson.github.io/classnames
|
||
*/(function(){var s=function(){function l(){}l.prototype=Object.create(null);function u(g,y){for(var b=y.length,_=0;_<b;++_)v(g,y[_])}var c={}.hasOwnProperty;function f(g,y){g[y]=!0}function h(g,y){for(var b in y)c.call(y,b)&&(g[b]=!!y[b])}var d=/\s+/;function p(g,y){for(var b=y.split(d),_=b.length,x=0;x<_;++x)g[b[x]]=!0}function v(g,y){if(y){var b=typeof y;b==="string"?p(g,y):Array.isArray(y)?u(g,y):b==="object"?h(g,y):b==="number"&&f(g,y)}}function m(){for(var g=arguments.length,y=Array(g),b=0;b<g;b++)y[b]=arguments[b];var _=new l;u(_,y);var x=[];for(var w in _)_[w]&&x.push(w);return x.join(" ")}return m}();typeof t<"u"&&t.exports?t.exports=s:(a=[],o=(function(){return s}).apply(n,a),o!==void 0&&(t.exports=o))})()},"./node_modules/core-js/es/array/from.js":function(t,n,i){i("./node_modules/core-js/modules/es.string.iterator.js"),i("./node_modules/core-js/modules/es.array.from.js");var a=i("./node_modules/core-js/internals/path.js");t.exports=a.Array.from},"./node_modules/core-js/internals/a-function.js":function(t,n){t.exports=function(i){if(typeof i!="function")throw TypeError(String(i)+" is not a function");return i}},"./node_modules/core-js/internals/an-object.js":function(t,n,i){var a=i("./node_modules/core-js/internals/is-object.js");t.exports=function(o){if(!a(o))throw TypeError(String(o)+" is not an object");return o}},"./node_modules/core-js/internals/array-from.js":function(t,n,i){var a=i("./node_modules/core-js/internals/bind-context.js"),o=i("./node_modules/core-js/internals/to-object.js"),s=i("./node_modules/core-js/internals/call-with-safe-iteration-closing.js"),l=i("./node_modules/core-js/internals/is-array-iterator-method.js"),u=i("./node_modules/core-js/internals/to-length.js"),c=i("./node_modules/core-js/internals/create-property.js"),f=i("./node_modules/core-js/internals/get-iterator-method.js");t.exports=function(d){var p=o(d),v=typeof this=="function"?this:Array,m=arguments.length,g=m>1?arguments[1]:void 0,y=g!==void 0,b=0,_=f(p),x,w,S,T;if(y&&(g=a(g,m>2?arguments[2]:void 0,2)),_!=null&&!(v==Array&&l(_)))for(T=_.call(p),w=new v;!(S=T.next()).done;b++)c(w,b,y?s(T,g,[S.value,b],!0):S.value);else for(x=u(p.length),w=new v(x);x>b;b++)c(w,b,y?g(p[b],b):p[b]);return w.length=b,w}},"./node_modules/core-js/internals/array-includes.js":function(t,n,i){var a=i("./node_modules/core-js/internals/to-indexed-object.js"),o=i("./node_modules/core-js/internals/to-length.js"),s=i("./node_modules/core-js/internals/to-absolute-index.js");t.exports=function(l){return function(u,c,f){var h=a(u),d=o(h.length),p=s(f,d),v;if(l&&c!=c){for(;d>p;)if(v=h[p++],v!=v)return!0}else for(;d>p;p++)if((l||p in h)&&h[p]===c)return l||p||0;return!l&&-1}}},"./node_modules/core-js/internals/bind-context.js":function(t,n,i){var a=i("./node_modules/core-js/internals/a-function.js");t.exports=function(o,s,l){if(a(o),s===void 0)return o;switch(l){case 0:return function(){return o.call(s)};case 1:return function(u){return o.call(s,u)};case 2:return function(u,c){return o.call(s,u,c)};case 3:return function(u,c,f){return o.call(s,u,c,f)}}return function(){return o.apply(s,arguments)}}},"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":function(t,n,i){var a=i("./node_modules/core-js/internals/an-object.js");t.exports=function(o,s,l,u){try{return u?s(a(l)[0],l[1]):s(l)}catch(f){var c=o.return;throw c!==void 0&&a(c.call(o)),f}}},"./node_modules/core-js/internals/check-correctness-of-iteration.js":function(t,n,i){var a=i("./node_modules/core-js/internals/well-known-symbol.js"),o=a("iterator"),s=!1;try{var l=0,u={next:function(){return{done:!!l++}},return:function(){s=!0}};u[o]=function(){return this},Array.from(u,function(){throw 2})}catch{}t.exports=function(c,f){if(!f&&!s)return!1;var h=!1;try{var d={};d[o]=function(){return{next:function(){return{done:h=!0}}}},c(d)}catch{}return h}},"./node_modules/core-js/internals/classof-raw.js":function(t,n){var i={}.toString;t.exports=function(a){return i.call(a).slice(8,-1)}},"./node_modules/core-js/internals/classof.js":function(t,n,i){var a=i("./node_modules/core-js/internals/classof-raw.js"),o=i("./node_modules/core-js/internals/well-known-symbol.js"),s=o("toStringTag"),l=a(function(){return arguments}())=="Arguments",u=function(c,f){try{return c[f]}catch{}};t.exports=function(c){var f,h,d;return c===void 0?"Undefined":c===null?"Null":typeof(h=u(f=Object(c),s))=="string"?h:l?a(f):(d=a(f))=="Object"&&typeof f.callee=="function"?"Arguments":d}},"./node_modules/core-js/internals/copy-constructor-properties.js":function(t,n,i){var a=i("./node_modules/core-js/internals/has.js"),o=i("./node_modules/core-js/internals/own-keys.js"),s=i("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),l=i("./node_modules/core-js/internals/object-define-property.js");t.exports=function(u,c){for(var f=o(c),h=l.f,d=s.f,p=0;p<f.length;p++){var v=f[p];a(u,v)||h(u,v,d(c,v))}}},"./node_modules/core-js/internals/correct-prototype-getter.js":function(t,n,i){var a=i("./node_modules/core-js/internals/fails.js");t.exports=!a(function(){function o(){}return o.prototype.constructor=null,Object.getPrototypeOf(new o)!==o.prototype})},"./node_modules/core-js/internals/create-iterator-constructor.js":function(t,n,i){var a=i("./node_modules/core-js/internals/iterators-core.js").IteratorPrototype,o=i("./node_modules/core-js/internals/object-create.js"),s=i("./node_modules/core-js/internals/create-property-descriptor.js"),l=i("./node_modules/core-js/internals/set-to-string-tag.js"),u=i("./node_modules/core-js/internals/iterators.js"),c=function(){return this};t.exports=function(f,h,d){var p=h+" Iterator";return f.prototype=o(a,{next:s(1,d)}),l(f,p,!1,!0),u[p]=c,f}},"./node_modules/core-js/internals/create-property-descriptor.js":function(t,n){t.exports=function(i,a){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:a}}},"./node_modules/core-js/internals/create-property.js":function(t,n,i){var a=i("./node_modules/core-js/internals/to-primitive.js"),o=i("./node_modules/core-js/internals/object-define-property.js"),s=i("./node_modules/core-js/internals/create-property-descriptor.js");t.exports=function(l,u,c){var f=a(u);f in l?o.f(l,f,s(0,c)):l[f]=c}},"./node_modules/core-js/internals/define-iterator.js":function(t,n,i){var a=i("./node_modules/core-js/internals/export.js"),o=i("./node_modules/core-js/internals/create-iterator-constructor.js"),s=i("./node_modules/core-js/internals/object-get-prototype-of.js"),l=i("./node_modules/core-js/internals/object-set-prototype-of.js"),u=i("./node_modules/core-js/internals/set-to-string-tag.js"),c=i("./node_modules/core-js/internals/hide.js"),f=i("./node_modules/core-js/internals/redefine.js"),h=i("./node_modules/core-js/internals/well-known-symbol.js"),d=i("./node_modules/core-js/internals/is-pure.js"),p=i("./node_modules/core-js/internals/iterators.js"),v=i("./node_modules/core-js/internals/iterators-core.js"),m=v.IteratorPrototype,g=v.BUGGY_SAFARI_ITERATORS,y=h("iterator"),b="keys",_="values",x="entries",w=function(){return this};t.exports=function(S,T,C,A,M,D,E){o(C,T,A);var L=function(J){if(J===M&&j)return j;if(!g&&J in P)return P[J];switch(J){case b:return function(){return new C(this,J)};case _:return function(){return new C(this,J)};case x:return function(){return new C(this,J)}}return function(){return new C(this)}},I=T+" Iterator",R=!1,P=S.prototype,O=P[y]||P["@@iterator"]||M&&P[M],j=!g&&O||L(M),F=T=="Array"&&P.entries||O,N,B,$;if(F&&(N=s(F.call(new S)),m!==Object.prototype&&N.next&&(!d&&s(N)!==m&&(l?l(N,m):typeof N[y]!="function"&&c(N,y,w)),u(N,I,!0,!0),d&&(p[I]=w))),M==_&&O&&O.name!==_&&(R=!0,j=function(){return O.call(this)}),(!d||E)&&P[y]!==j&&c(P,y,j),p[T]=j,M)if(B={values:L(_),keys:D?j:L(b),entries:L(x)},E)for($ in B)(g||R||!($ in P))&&f(P,$,B[$]);else a({target:T,proto:!0,forced:g||R},B);return B}},"./node_modules/core-js/internals/descriptors.js":function(t,n,i){var a=i("./node_modules/core-js/internals/fails.js");t.exports=!a(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},"./node_modules/core-js/internals/document-create-element.js":function(t,n,i){var a=i("./node_modules/core-js/internals/global.js"),o=i("./node_modules/core-js/internals/is-object.js"),s=a.document,l=o(s)&&o(s.createElement);t.exports=function(u){return l?s.createElement(u):{}}},"./node_modules/core-js/internals/enum-bug-keys.js":function(t,n){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"./node_modules/core-js/internals/export.js":function(t,n,i){var a=i("./node_modules/core-js/internals/global.js"),o=i("./node_modules/core-js/internals/object-get-own-property-descriptor.js").f,s=i("./node_modules/core-js/internals/hide.js"),l=i("./node_modules/core-js/internals/redefine.js"),u=i("./node_modules/core-js/internals/set-global.js"),c=i("./node_modules/core-js/internals/copy-constructor-properties.js"),f=i("./node_modules/core-js/internals/is-forced.js");t.exports=function(h,d){var p=h.target,v=h.global,m=h.stat,g,y,b,_,x,w;if(v?y=a:m?y=a[p]||u(p,{}):y=(a[p]||{}).prototype,y)for(b in d){if(x=d[b],h.noTargetGet?(w=o(y,b),_=w&&w.value):_=y[b],g=f(v?b:p+(m?".":"#")+b,h.forced),!g&&_!==void 0){if(typeof x==typeof _)continue;c(x,_)}(h.sham||_&&_.sham)&&s(x,"sham",!0),l(y,b,x,h)}}},"./node_modules/core-js/internals/fails.js":function(t,n){t.exports=function(i){try{return!!i()}catch{return!0}}},"./node_modules/core-js/internals/function-to-string.js":function(t,n,i){var a=i("./node_modules/core-js/internals/shared.js");t.exports=a("native-function-to-string",Function.toString)},"./node_modules/core-js/internals/get-iterator-method.js":function(t,n,i){var a=i("./node_modules/core-js/internals/classof.js"),o=i("./node_modules/core-js/internals/iterators.js"),s=i("./node_modules/core-js/internals/well-known-symbol.js"),l=s("iterator");t.exports=function(u){if(u!=null)return u[l]||u["@@iterator"]||o[a(u)]}},"./node_modules/core-js/internals/global.js":function(t,n,i){(function(a){var o="object",s=function(l){return l&&l.Math==Math&&l};t.exports=s(typeof globalThis==o&&globalThis)||s(typeof window==o&&window)||s(typeof self==o&&self)||s(typeof a==o&&a)||Function("return this")()}).call(this,i("./node_modules/webpack/buildin/global.js"))},"./node_modules/core-js/internals/has.js":function(t,n){var i={}.hasOwnProperty;t.exports=function(a,o){return i.call(a,o)}},"./node_modules/core-js/internals/hidden-keys.js":function(t,n){t.exports={}},"./node_modules/core-js/internals/hide.js":function(t,n,i){var a=i("./node_modules/core-js/internals/descriptors.js"),o=i("./node_modules/core-js/internals/object-define-property.js"),s=i("./node_modules/core-js/internals/create-property-descriptor.js");t.exports=a?function(l,u,c){return o.f(l,u,s(1,c))}:function(l,u,c){return l[u]=c,l}},"./node_modules/core-js/internals/html.js":function(t,n,i){var a=i("./node_modules/core-js/internals/global.js"),o=a.document;t.exports=o&&o.documentElement},"./node_modules/core-js/internals/ie8-dom-define.js":function(t,n,i){var a=i("./node_modules/core-js/internals/descriptors.js"),o=i("./node_modules/core-js/internals/fails.js"),s=i("./node_modules/core-js/internals/document-create-element.js");t.exports=!a&&!o(function(){return Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a!=7})},"./node_modules/core-js/internals/indexed-object.js":function(t,n,i){var a=i("./node_modules/core-js/internals/fails.js"),o=i("./node_modules/core-js/internals/classof-raw.js"),s="".split;t.exports=a(function(){return!Object("z").propertyIsEnumerable(0)})?function(l){return o(l)=="String"?s.call(l,""):Object(l)}:Object},"./node_modules/core-js/internals/internal-state.js":function(t,n,i){var a=i("./node_modules/core-js/internals/native-weak-map.js"),o=i("./node_modules/core-js/internals/global.js"),s=i("./node_modules/core-js/internals/is-object.js"),l=i("./node_modules/core-js/internals/hide.js"),u=i("./node_modules/core-js/internals/has.js"),c=i("./node_modules/core-js/internals/shared-key.js"),f=i("./node_modules/core-js/internals/hidden-keys.js"),h=o.WeakMap,d,p,v,m=function(S){return v(S)?p(S):d(S,{})},g=function(S){return function(T){var C;if(!s(T)||(C=p(T)).type!==S)throw TypeError("Incompatible receiver, "+S+" required");return C}};if(a){var y=new h,b=y.get,_=y.has,x=y.set;d=function(S,T){return x.call(y,S,T),T},p=function(S){return b.call(y,S)||{}},v=function(S){return _.call(y,S)}}else{var w=c("state");f[w]=!0,d=function(S,T){return l(S,w,T),T},p=function(S){return u(S,w)?S[w]:{}},v=function(S){return u(S,w)}}t.exports={set:d,get:p,has:v,enforce:m,getterFor:g}},"./node_modules/core-js/internals/is-array-iterator-method.js":function(t,n,i){var a=i("./node_modules/core-js/internals/well-known-symbol.js"),o=i("./node_modules/core-js/internals/iterators.js"),s=a("iterator"),l=Array.prototype;t.exports=function(u){return u!==void 0&&(o.Array===u||l[s]===u)}},"./node_modules/core-js/internals/is-forced.js":function(t,n,i){var a=i("./node_modules/core-js/internals/fails.js"),o=/#|\.prototype\./,s=function(h,d){var p=u[l(h)];return p==f?!0:p==c?!1:typeof d=="function"?a(d):!!d},l=s.normalize=function(h){return String(h).replace(o,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",f=s.POLYFILL="P";t.exports=s},"./node_modules/core-js/internals/is-object.js":function(t,n){t.exports=function(i){return typeof i=="object"?i!==null:typeof i=="function"}},"./node_modules/core-js/internals/is-pure.js":function(t,n){t.exports=!1},"./node_modules/core-js/internals/iterators-core.js":function(t,n,i){var a=i("./node_modules/core-js/internals/object-get-prototype-of.js"),o=i("./node_modules/core-js/internals/hide.js"),s=i("./node_modules/core-js/internals/has.js"),l=i("./node_modules/core-js/internals/well-known-symbol.js"),u=i("./node_modules/core-js/internals/is-pure.js"),c=l("iterator"),f=!1,h=function(){return this},d,p,v;[].keys&&(v=[].keys(),"next"in v?(p=a(a(v)),p!==Object.prototype&&(d=p)):f=!0),d==null&&(d={}),!u&&!s(d,c)&&o(d,c,h),t.exports={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:f}},"./node_modules/core-js/internals/iterators.js":function(t,n){t.exports={}},"./node_modules/core-js/internals/native-symbol.js":function(t,n,i){var a=i("./node_modules/core-js/internals/fails.js");t.exports=!!Object.getOwnPropertySymbols&&!a(function(){return!String(Symbol())})},"./node_modules/core-js/internals/native-weak-map.js":function(t,n,i){var a=i("./node_modules/core-js/internals/global.js"),o=i("./node_modules/core-js/internals/function-to-string.js"),s=a.WeakMap;t.exports=typeof s=="function"&&/native code/.test(o.call(s))},"./node_modules/core-js/internals/object-create.js":function(t,n,i){var a=i("./node_modules/core-js/internals/an-object.js"),o=i("./node_modules/core-js/internals/object-define-properties.js"),s=i("./node_modules/core-js/internals/enum-bug-keys.js"),l=i("./node_modules/core-js/internals/hidden-keys.js"),u=i("./node_modules/core-js/internals/html.js"),c=i("./node_modules/core-js/internals/document-create-element.js"),f=i("./node_modules/core-js/internals/shared-key.js"),h=f("IE_PROTO"),d="prototype",p=function(){},v=function(){var m=c("iframe"),g=s.length,y="<",b="script",_=">",x="java"+b+":",w;for(m.style.display="none",u.appendChild(m),m.src=String(x),w=m.contentWindow.document,w.open(),w.write(y+b+_+"document.F=Object"+y+"/"+b+_),w.close(),v=w.F;g--;)delete v[d][s[g]];return v()};t.exports=Object.create||function(g,y){var b;return g!==null?(p[d]=a(g),b=new p,p[d]=null,b[h]=g):b=v(),y===void 0?b:o(b,y)},l[h]=!0},"./node_modules/core-js/internals/object-define-properties.js":function(t,n,i){var a=i("./node_modules/core-js/internals/descriptors.js"),o=i("./node_modules/core-js/internals/object-define-property.js"),s=i("./node_modules/core-js/internals/an-object.js"),l=i("./node_modules/core-js/internals/object-keys.js");t.exports=a?Object.defineProperties:function(c,f){s(c);for(var h=l(f),d=h.length,p=0,v;d>p;)o.f(c,v=h[p++],f[v]);return c}},"./node_modules/core-js/internals/object-define-property.js":function(t,n,i){var a=i("./node_modules/core-js/internals/descriptors.js"),o=i("./node_modules/core-js/internals/ie8-dom-define.js"),s=i("./node_modules/core-js/internals/an-object.js"),l=i("./node_modules/core-js/internals/to-primitive.js"),u=Object.defineProperty;n.f=a?u:function(f,h,d){if(s(f),h=l(h,!0),s(d),o)try{return u(f,h,d)}catch{}if("get"in d||"set"in d)throw TypeError("Accessors not supported");return"value"in d&&(f[h]=d.value),f}},"./node_modules/core-js/internals/object-get-own-property-descriptor.js":function(t,n,i){var a=i("./node_modules/core-js/internals/descriptors.js"),o=i("./node_modules/core-js/internals/object-property-is-enumerable.js"),s=i("./node_modules/core-js/internals/create-property-descriptor.js"),l=i("./node_modules/core-js/internals/to-indexed-object.js"),u=i("./node_modules/core-js/internals/to-primitive.js"),c=i("./node_modules/core-js/internals/has.js"),f=i("./node_modules/core-js/internals/ie8-dom-define.js"),h=Object.getOwnPropertyDescriptor;n.f=a?h:function(p,v){if(p=l(p),v=u(v,!0),f)try{return h(p,v)}catch{}if(c(p,v))return s(!o.f.call(p,v),p[v])}},"./node_modules/core-js/internals/object-get-own-property-names.js":function(t,n,i){var a=i("./node_modules/core-js/internals/object-keys-internal.js"),o=i("./node_modules/core-js/internals/enum-bug-keys.js"),s=o.concat("length","prototype");n.f=Object.getOwnPropertyNames||function(u){return a(u,s)}},"./node_modules/core-js/internals/object-get-own-property-symbols.js":function(t,n){n.f=Object.getOwnPropertySymbols},"./node_modules/core-js/internals/object-get-prototype-of.js":function(t,n,i){var a=i("./node_modules/core-js/internals/has.js"),o=i("./node_modules/core-js/internals/to-object.js"),s=i("./node_modules/core-js/internals/shared-key.js"),l=i("./node_modules/core-js/internals/correct-prototype-getter.js"),u=s("IE_PROTO"),c=Object.prototype;t.exports=l?Object.getPrototypeOf:function(f){return f=o(f),a(f,u)?f[u]:typeof f.constructor=="function"&&f instanceof f.constructor?f.constructor.prototype:f instanceof Object?c:null}},"./node_modules/core-js/internals/object-keys-internal.js":function(t,n,i){var a=i("./node_modules/core-js/internals/has.js"),o=i("./node_modules/core-js/internals/to-indexed-object.js"),s=i("./node_modules/core-js/internals/array-includes.js"),l=i("./node_modules/core-js/internals/hidden-keys.js"),u=s(!1);t.exports=function(c,f){var h=o(c),d=0,p=[],v;for(v in h)!a(l,v)&&a(h,v)&&p.push(v);for(;f.length>d;)a(h,v=f[d++])&&(~u(p,v)||p.push(v));return p}},"./node_modules/core-js/internals/object-keys.js":function(t,n,i){var a=i("./node_modules/core-js/internals/object-keys-internal.js"),o=i("./node_modules/core-js/internals/enum-bug-keys.js");t.exports=Object.keys||function(l){return a(l,o)}},"./node_modules/core-js/internals/object-property-is-enumerable.js":function(t,n,i){var a={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,s=o&&!a.call({1:2},1);n.f=s?function(u){var c=o(this,u);return!!c&&c.enumerable}:a},"./node_modules/core-js/internals/object-set-prototype-of.js":function(t,n,i){var a=i("./node_modules/core-js/internals/validate-set-prototype-of-arguments.js");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var o=!1,s={},l;try{l=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,l.call(s,[]),o=s instanceof Array}catch{}return function(c,f){return a(c,f),o?l.call(c,f):c.__proto__=f,c}}():void 0)},"./node_modules/core-js/internals/own-keys.js":function(t,n,i){var a=i("./node_modules/core-js/internals/global.js"),o=i("./node_modules/core-js/internals/object-get-own-property-names.js"),s=i("./node_modules/core-js/internals/object-get-own-property-symbols.js"),l=i("./node_modules/core-js/internals/an-object.js"),u=a.Reflect;t.exports=u&&u.ownKeys||function(f){var h=o.f(l(f)),d=s.f;return d?h.concat(d(f)):h}},"./node_modules/core-js/internals/path.js":function(t,n,i){t.exports=i("./node_modules/core-js/internals/global.js")},"./node_modules/core-js/internals/redefine.js":function(t,n,i){var a=i("./node_modules/core-js/internals/global.js"),o=i("./node_modules/core-js/internals/shared.js"),s=i("./node_modules/core-js/internals/hide.js"),l=i("./node_modules/core-js/internals/has.js"),u=i("./node_modules/core-js/internals/set-global.js"),c=i("./node_modules/core-js/internals/function-to-string.js"),f=i("./node_modules/core-js/internals/internal-state.js"),h=f.get,d=f.enforce,p=String(c).split("toString");o("inspectSource",function(v){return c.call(v)}),(t.exports=function(v,m,g,y){var b=y?!!y.unsafe:!1,_=y?!!y.enumerable:!1,x=y?!!y.noTargetGet:!1;if(typeof g=="function"&&(typeof m=="string"&&!l(g,"name")&&s(g,"name",m),d(g).source=p.join(typeof m=="string"?m:"")),v===a){_?v[m]=g:u(m,g);return}else b?!x&&v[m]&&(_=!0):delete v[m];_?v[m]=g:s(v,m,g)})(Function.prototype,"toString",function(){return typeof this=="function"&&h(this).source||c.call(this)})},"./node_modules/core-js/internals/require-object-coercible.js":function(t,n){t.exports=function(i){if(i==null)throw TypeError("Can't call method on "+i);return i}},"./node_modules/core-js/internals/set-global.js":function(t,n,i){var a=i("./node_modules/core-js/internals/global.js"),o=i("./node_modules/core-js/internals/hide.js");t.exports=function(s,l){try{o(a,s,l)}catch{a[s]=l}return l}},"./node_modules/core-js/internals/set-to-string-tag.js":function(t,n,i){var a=i("./node_modules/core-js/internals/object-define-property.js").f,o=i("./node_modules/core-js/internals/has.js"),s=i("./node_modules/core-js/internals/well-known-symbol.js"),l=s("toStringTag");t.exports=function(u,c,f){u&&!o(u=f?u:u.prototype,l)&&a(u,l,{configurable:!0,value:c})}},"./node_modules/core-js/internals/shared-key.js":function(t,n,i){var a=i("./node_modules/core-js/internals/shared.js"),o=i("./node_modules/core-js/internals/uid.js"),s=a("keys");t.exports=function(l){return s[l]||(s[l]=o(l))}},"./node_modules/core-js/internals/shared.js":function(t,n,i){var a=i("./node_modules/core-js/internals/global.js"),o=i("./node_modules/core-js/internals/set-global.js"),s=i("./node_modules/core-js/internals/is-pure.js"),l="__core-js_shared__",u=a[l]||o(l,{});(t.exports=function(c,f){return u[c]||(u[c]=f!==void 0?f:{})})("versions",[]).push({version:"3.1.3",mode:s?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"./node_modules/core-js/internals/string-at.js":function(t,n,i){var a=i("./node_modules/core-js/internals/to-integer.js"),o=i("./node_modules/core-js/internals/require-object-coercible.js");t.exports=function(s,l,u){var c=String(o(s)),f=a(l),h=c.length,d,p;return f<0||f>=h?u?"":void 0:(d=c.charCodeAt(f),d<55296||d>56319||f+1===h||(p=c.charCodeAt(f+1))<56320||p>57343?u?c.charAt(f):d:u?c.slice(f,f+2):(d-55296<<10)+(p-56320)+65536)}},"./node_modules/core-js/internals/to-absolute-index.js":function(t,n,i){var a=i("./node_modules/core-js/internals/to-integer.js"),o=Math.max,s=Math.min;t.exports=function(l,u){var c=a(l);return c<0?o(c+u,0):s(c,u)}},"./node_modules/core-js/internals/to-indexed-object.js":function(t,n,i){var a=i("./node_modules/core-js/internals/indexed-object.js"),o=i("./node_modules/core-js/internals/require-object-coercible.js");t.exports=function(s){return a(o(s))}},"./node_modules/core-js/internals/to-integer.js":function(t,n){var i=Math.ceil,a=Math.floor;t.exports=function(o){return isNaN(o=+o)?0:(o>0?a:i)(o)}},"./node_modules/core-js/internals/to-length.js":function(t,n,i){var a=i("./node_modules/core-js/internals/to-integer.js"),o=Math.min;t.exports=function(s){return s>0?o(a(s),9007199254740991):0}},"./node_modules/core-js/internals/to-object.js":function(t,n,i){var a=i("./node_modules/core-js/internals/require-object-coercible.js");t.exports=function(o){return Object(a(o))}},"./node_modules/core-js/internals/to-primitive.js":function(t,n,i){var a=i("./node_modules/core-js/internals/is-object.js");t.exports=function(o,s){if(!a(o))return o;var l,u;if(s&&typeof(l=o.toString)=="function"&&!a(u=l.call(o))||typeof(l=o.valueOf)=="function"&&!a(u=l.call(o))||!s&&typeof(l=o.toString)=="function"&&!a(u=l.call(o)))return u;throw TypeError("Can't convert object to primitive value")}},"./node_modules/core-js/internals/uid.js":function(t,n){var i=0,a=Math.random();t.exports=function(o){return"Symbol(".concat(o===void 0?"":o,")_",(++i+a).toString(36))}},"./node_modules/core-js/internals/validate-set-prototype-of-arguments.js":function(t,n,i){var a=i("./node_modules/core-js/internals/is-object.js"),o=i("./node_modules/core-js/internals/an-object.js");t.exports=function(s,l){if(o(s),!a(l)&&l!==null)throw TypeError("Can't set "+String(l)+" as a prototype")}},"./node_modules/core-js/internals/well-known-symbol.js":function(t,n,i){var a=i("./node_modules/core-js/internals/global.js"),o=i("./node_modules/core-js/internals/shared.js"),s=i("./node_modules/core-js/internals/uid.js"),l=i("./node_modules/core-js/internals/native-symbol.js"),u=a.Symbol,c=o("wks");t.exports=function(f){return c[f]||(c[f]=l&&u[f]||(l?u:s)("Symbol."+f))}},"./node_modules/core-js/modules/es.array.from.js":function(t,n,i){var a=i("./node_modules/core-js/internals/export.js"),o=i("./node_modules/core-js/internals/array-from.js"),s=i("./node_modules/core-js/internals/check-correctness-of-iteration.js"),l=!s(function(u){Array.from(u)});a({target:"Array",stat:!0,forced:l},{from:o})},"./node_modules/core-js/modules/es.string.iterator.js":function(t,n,i){var a=i("./node_modules/core-js/internals/string-at.js"),o=i("./node_modules/core-js/internals/internal-state.js"),s=i("./node_modules/core-js/internals/define-iterator.js"),l="String Iterator",u=o.set,c=o.getterFor(l);s(String,"String",function(f){u(this,{type:l,string:String(f),index:0})},function(){var h=c(this),d=h.string,p=h.index,v;return p>=d.length?{value:void 0,done:!0}:(v=a(d,p,!0),h.index+=v.length,{value:v,done:!1})})},"./node_modules/webpack/buildin/global.js":function(t,n){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(i=window)}t.exports=i},"./src/default-attrs.json":function(t){t.exports={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}},"./src/icon.js":function(t,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=Object.assign||function(v){for(var m=1;m<arguments.length;m++){var g=arguments[m];for(var y in g)Object.prototype.hasOwnProperty.call(g,y)&&(v[y]=g[y])}return v},o=function(){function v(m,g){for(var y=0;y<g.length;y++){var b=g[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(m,b.key,b)}}return function(m,g,y){return g&&v(m.prototype,g),y&&v(m,y),m}}(),s=i("./node_modules/classnames/dedupe.js"),l=f(s),u=i("./src/default-attrs.json"),c=f(u);function f(v){return v&&v.__esModule?v:{default:v}}function h(v,m){if(!(v instanceof m))throw new TypeError("Cannot call a class as a function")}var d=function(){function v(m,g){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];h(this,v),this.name=m,this.contents=g,this.tags=y,this.attrs=a({},c.default,{class:"feather feather-"+m})}return o(v,[{key:"toSvg",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y=a({},this.attrs,g,{class:(0,l.default)(this.attrs.class,g.class)});return"<svg "+p(y)+">"+this.contents+"</svg>"}},{key:"toString",value:function(){return this.contents}}]),v}();function p(v){return Object.keys(v).map(function(m){return m+'="'+v[m]+'"'}).join(" ")}n.default=d},"./src/icons.js":function(t,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i("./src/icon.js"),o=f(a),s=i("./dist/icons.json"),l=f(s),u=i("./src/tags.json"),c=f(u);function f(h){return h&&h.__esModule?h:{default:h}}n.default=Object.keys(l.default).map(function(h){return new o.default(h,l.default[h],c.default[h])}).reduce(function(h,d){return h[d.name]=d,h},{})},"./src/index.js":function(t,n,i){var a=i("./src/icons.js"),o=f(a),s=i("./src/to-svg.js"),l=f(s),u=i("./src/replace.js"),c=f(u);function f(h){return h&&h.__esModule?h:{default:h}}t.exports={icons:o.default,toSvg:l.default,replace:c.default}},"./src/replace.js":function(t,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=Object.assign||function(p){for(var v=1;v<arguments.length;v++){var m=arguments[v];for(var g in m)Object.prototype.hasOwnProperty.call(m,g)&&(p[g]=m[g])}return p},o=i("./node_modules/classnames/dedupe.js"),s=c(o),l=i("./src/icons.js"),u=c(l);function c(p){return p&&p.__esModule?p:{default:p}}function f(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(typeof document>"u")throw new Error("`feather.replace()` only works in a browser environment.");var v=document.querySelectorAll("[data-feather]");Array.from(v).forEach(function(m){return h(m,p)})}function h(p){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=d(p),g=m["data-feather"];if(delete m["data-feather"],u.default[g]===void 0){console.warn("feather: '"+g+"' is not a valid icon");return}var y=u.default[g].toSvg(a({},v,m,{class:(0,s.default)(v.class,m.class)})),b=new DOMParser().parseFromString(y,"image/svg+xml"),_=b.querySelector("svg");p.parentNode.replaceChild(_,p)}function d(p){return Array.from(p.attributes).reduce(function(v,m){return v[m.name]=m.value,v},{})}n.default=f},"./src/tags.json":function(t){t.exports={activity:["pulse","health","action","motion"],airplay:["stream","cast","mirroring"],"alert-circle":["warning","alert","danger"],"alert-octagon":["warning","alert","danger"],"alert-triangle":["warning","alert","danger"],"align-center":["text alignment","center"],"align-justify":["text alignment","justified"],"align-left":["text alignment","left"],"align-right":["text alignment","right"],anchor:[],archive:["index","box"],"at-sign":["mention","at","email","message"],award:["achievement","badge"],aperture:["camera","photo"],"bar-chart":["statistics","diagram","graph"],"bar-chart-2":["statistics","diagram","graph"],battery:["power","electricity"],"battery-charging":["power","electricity"],bell:["alarm","notification","sound"],"bell-off":["alarm","notification","silent"],bluetooth:["wireless"],"book-open":["read","library"],book:["read","dictionary","booklet","magazine","library"],bookmark:["read","clip","marker","tag"],box:["cube"],briefcase:["work","bag","baggage","folder"],calendar:["date"],camera:["photo"],cast:["chromecast","airplay"],"chevron-down":["expand"],"chevron-up":["collapse"],circle:["off","zero","record"],clipboard:["copy"],clock:["time","watch","alarm"],"cloud-drizzle":["weather","shower"],"cloud-lightning":["weather","bolt"],"cloud-rain":["weather"],"cloud-snow":["weather","blizzard"],cloud:["weather"],codepen:["logo"],codesandbox:["logo"],code:["source","programming"],coffee:["drink","cup","mug","tea","cafe","hot","beverage"],columns:["layout"],command:["keyboard","cmd","terminal","prompt"],compass:["navigation","safari","travel","direction"],copy:["clone","duplicate"],"corner-down-left":["arrow","return"],"corner-down-right":["arrow"],"corner-left-down":["arrow"],"corner-left-up":["arrow"],"corner-right-down":["arrow"],"corner-right-up":["arrow"],"corner-up-left":["arrow"],"corner-up-right":["arrow"],cpu:["processor","technology"],"credit-card":["purchase","payment","cc"],crop:["photo","image"],crosshair:["aim","target"],database:["storage","memory"],delete:["remove"],disc:["album","cd","dvd","music"],"dollar-sign":["currency","money","payment"],droplet:["water"],edit:["pencil","change"],"edit-2":["pencil","change"],"edit-3":["pencil","change"],eye:["view","watch"],"eye-off":["view","watch","hide","hidden"],"external-link":["outbound"],facebook:["logo","social"],"fast-forward":["music"],figma:["logo","design","tool"],"file-minus":["delete","remove","erase"],"file-plus":["add","create","new"],"file-text":["data","txt","pdf"],film:["movie","video"],filter:["funnel","hopper"],flag:["report"],"folder-minus":["directory"],"folder-plus":["directory"],folder:["directory"],framer:["logo","design","tool"],frown:["emoji","face","bad","sad","emotion"],gift:["present","box","birthday","party"],"git-branch":["code","version control"],"git-commit":["code","version control"],"git-merge":["code","version control"],"git-pull-request":["code","version control"],github:["logo","version control"],gitlab:["logo","version control"],globe:["world","browser","language","translate"],"hard-drive":["computer","server","memory","data"],hash:["hashtag","number","pound"],headphones:["music","audio","sound"],heart:["like","love","emotion"],"help-circle":["question mark"],hexagon:["shape","node.js","logo"],home:["house","living"],image:["picture"],inbox:["email"],instagram:["logo","camera"],key:["password","login","authentication","secure"],layers:["stack"],layout:["window","webpage"],"life-buoy":["help","life ring","support"],link:["chain","url"],"link-2":["chain","url"],linkedin:["logo","social media"],list:["options"],lock:["security","password","secure"],"log-in":["sign in","arrow","enter"],"log-out":["sign out","arrow","exit"],mail:["email","message"],"map-pin":["location","navigation","travel","marker"],map:["location","navigation","travel"],maximize:["fullscreen"],"maximize-2":["fullscreen","arrows","expand"],meh:["emoji","face","neutral","emotion"],menu:["bars","navigation","hamburger"],"message-circle":["comment","chat"],"message-square":["comment","chat"],"mic-off":["record","sound","mute"],mic:["record","sound","listen"],minimize:["exit fullscreen","close"],"minimize-2":["exit fullscreen","arrows","close"],minus:["subtract"],monitor:["tv","screen","display"],moon:["dark","night"],"more-horizontal":["ellipsis"],"more-vertical":["ellipsis"],"mouse-pointer":["arrow","cursor"],move:["arrows"],music:["note"],navigation:["location","travel"],"navigation-2":["location","travel"],octagon:["stop"],package:["box","container"],paperclip:["attachment"],pause:["music","stop"],"pause-circle":["music","audio","stop"],"pen-tool":["vector","drawing"],percent:["discount"],"phone-call":["ring"],"phone-forwarded":["call"],"phone-incoming":["call"],"phone-missed":["call"],"phone-off":["call","mute"],"phone-outgoing":["call"],phone:["call"],play:["music","start"],"pie-chart":["statistics","diagram"],"play-circle":["music","start"],plus:["add","new"],"plus-circle":["add","new"],"plus-square":["add","new"],pocket:["logo","save"],power:["on","off"],printer:["fax","office","device"],radio:["signal"],"refresh-cw":["synchronise","arrows"],"refresh-ccw":["arrows"],repeat:["loop","arrows"],rewind:["music"],"rotate-ccw":["arrow"],"rotate-cw":["arrow"],rss:["feed","subscribe"],save:["floppy disk"],scissors:["cut"],search:["find","magnifier","magnifying glass"],send:["message","mail","email","paper airplane","paper aeroplane"],settings:["cog","edit","gear","preferences"],"share-2":["network","connections"],shield:["security","secure"],"shield-off":["security","insecure"],"shopping-bag":["ecommerce","cart","purchase","store"],"shopping-cart":["ecommerce","cart","purchase","store"],shuffle:["music"],"skip-back":["music"],"skip-forward":["music"],slack:["logo"],slash:["ban","no"],sliders:["settings","controls"],smartphone:["cellphone","device"],smile:["emoji","face","happy","good","emotion"],speaker:["audio","music"],star:["bookmark","favorite","like"],"stop-circle":["media","music"],sun:["brightness","weather","light"],sunrise:["weather","time","morning","day"],sunset:["weather","time","evening","night"],tablet:["device"],tag:["label"],target:["logo","bullseye"],terminal:["code","command line","prompt"],thermometer:["temperature","celsius","fahrenheit","weather"],"thumbs-down":["dislike","bad","emotion"],"thumbs-up":["like","good","emotion"],"toggle-left":["on","off","switch"],"toggle-right":["on","off","switch"],tool:["settings","spanner"],trash:["garbage","delete","remove","bin"],"trash-2":["garbage","delete","remove","bin"],triangle:["delta"],truck:["delivery","van","shipping","transport","lorry"],tv:["television","stream"],twitch:["logo"],twitter:["logo","social"],type:["text"],umbrella:["rain","weather"],unlock:["security"],"user-check":["followed","subscribed"],"user-minus":["delete","remove","unfollow","unsubscribe"],"user-plus":["new","add","create","follow","subscribe"],"user-x":["delete","remove","unfollow","unsubscribe","unavailable"],user:["person","account"],users:["group"],"video-off":["camera","movie","film"],video:["camera","movie","film"],voicemail:["phone"],volume:["music","sound","mute"],"volume-1":["music","sound"],"volume-2":["music","sound"],"volume-x":["music","sound","mute"],watch:["clock","time"],"wifi-off":["disabled"],wifi:["connection","signal","wireless"],wind:["weather","air"],"x-circle":["cancel","close","delete","remove","times","clear"],"x-octagon":["delete","stop","alert","warning","times","clear"],"x-square":["cancel","close","delete","remove","times","clear"],x:["cancel","close","delete","remove","times","clear"],youtube:["logo","video","play"],"zap-off":["flash","camera","lightning"],zap:["flash","camera","lightning"],"zoom-in":["magnifying glass"],"zoom-out":["magnifying glass"]}},"./src/to-svg.js":function(t,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i("./src/icons.js"),o=s(a);function s(u){return u&&u.__esModule?u:{default:u}}function l(u){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(console.warn("feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead."),!u)throw new Error("The required `key` (icon name) parameter is missing.");if(!o.default[u])throw new Error("No icon matching '"+u+"'. See the complete list of icons at https://feathericons.com");return o.default[u].toSvg(c)}n.default=l},0:function(t,n,i){i("./node_modules/core-js/es/array/from.js"),t.exports=i("./src/index.js")}})})})(P3);var N7=P3.exports;const Ux=yH(N7),BM=Object.keys(Ux.icons),xm={props:{name:{type:String,required:!0,validator(r){const e=BM.includes(r);return e||(console.groupCollapsed("[frappe-ui] name property for feather-icon must be one of "),console.dir(BM),console.groupEnd()),e}},color:{type:String,default:null},strokeWidth:{type:Number,default:1.5}},render(){let r=Ux.icons[this.name];return r||(r=Ux.icons.circle),so("svg",rr(r.attrs,{fill:"none",stroke:"currentColor",color:this.color,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":this.strokeWidth,width:null,height:null,class:[r.attrs.class,"shrink-0"],innerHTML:r.contents},this.$attrs))}},R3=Ke({__name:"LoadingIndicator",props:{scale:{required:!1,default:100}},setup(r){return(e,t)=>(Y(),ae("svg",{class:"max-w-xs animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",style:Sa(`scale: ${r.scale}%;`),viewBox:"0 0 24 24"},t[0]||(t[0]=[Z("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),Z("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)]),4))}});function cf(r,e){const t=typeof r=="string"&&!e?`${r}Context`:e,n=Symbol(t);return[o=>{const s=_H(n,o);if(s||s===null)return s;throw new Error(`Injection \`${n.toString()}\` not found. Component must be used within ${Array.isArray(r)?`one of the following components: ${r.join(", ")}`:`\`${r}\``}`)},o=>($x(n,o),o)]}function ms(){let r=document.activeElement;if(r==null)return null;for(;r!=null&&r.shadowRoot!=null&&r.shadowRoot.activeElement!=null;)r=r.shadowRoot.activeElement;return r}function O3(r,e,t){const n=t.originalEvent.target,i=new CustomEvent(r,{bubbles:!1,cancelable:!0,detail:t});e&&n.addEventListener(r,e,{once:!0}),n.dispatchEvent(i)}function XS(r){return r?r.flatMap(e=>e.type===oi?XS(e.children):[e]):[]}const[B7,sAe]=cf("ConfigProvider");function z7(r,e){var t;const n=zl();return Ta(()=>{n.value=r()},{...e,flush:(t=void 0)!=null?t:"sync"}),lo(n)}function dp(r){return BS()?(zS(r),!0):!1}function F7(){const r=new Set,e=a=>{r.delete(a)};return{on:a=>{r.add(a);const o=()=>e(a);return dp(o),{off:o}},off:e,trigger:(...a)=>Promise.all(Array.from(r).map(o=>o(...a))),clear:()=>{r.clear()}}}function V7(r){let e=!1,t;const n=v3(!0);return(...i)=>(e||(t=n.run(()=>r(...i)),e=!0),t)}function $7(r){let e=0,t,n;const i=()=>{e-=1,n&&e<=0&&(n.stop(),t=void 0,n=void 0)};return(...a)=>(e+=1,n||(n=v3(!0),t=n.run(()=>r(...a))),dp(i),t)}const js=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const H7=r=>typeof r<"u",G7=Object.prototype.toString,W7=r=>G7.call(r)==="[object Object]",zM=U7();function U7(){var r,e;return js&&((r=window==null?void 0:window.navigator)==null?void 0:r.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Y7(r){return xu()}function T1(r){return Array.isArray(r)?r:[r]}function q7(r,e=1e4){return p3((t,n)=>{let i=Nr(r),a;const o=()=>setTimeout(()=>{i=Nr(r),n()},Nr(e));return dp(()=>{clearTimeout(a)}),{get(){return t(),i},set(s){i=s,n(),clearTimeout(a),a=o()}}})}function X7(r,e){Y7()&&xH(r,e)}function j3(r,e,t={}){const{immediate:n=!0,immediateCallback:i=!1}=t,a=zl(!1);let o=null;function s(){o&&(clearTimeout(o),o=null)}function l(){a.value=!1,s()}function u(...c){i&&r(),s(),a.value=!0,o=setTimeout(()=>{a.value=!1,o=null,r(...c)},Nr(e))}return n&&(a.value=!0,js&&u()),dp(l),{isPending:lo(a),start:u,stop:l}}function K7(r,e,t){return Nt(r,e,{...t,immediate:!0})}const KS=js?window:void 0;function pp(r){var e;const t=Nr(r);return(e=t==null?void 0:t.$el)!=null?e:t}function lg(...r){const e=[],t=()=>{e.forEach(s=>s()),e.length=0},n=(s,l,u,c)=>(s.addEventListener(l,u,c),()=>s.removeEventListener(l,u,c)),i=de(()=>{const s=T1(Nr(r[0])).filter(l=>l!=null);return s.every(l=>typeof l!="string")?s:void 0}),a=K7(()=>{var s,l;return[(l=(s=i.value)==null?void 0:s.map(u=>pp(u)))!=null?l:[KS].filter(u=>u!=null),T1(Nr(i.value?r[1]:r[0])),T1(H(i.value?r[2]:r[1])),Nr(i.value?r[3]:r[2])]},([s,l,u,c])=>{if(t(),!(s!=null&&s.length)||!(l!=null&&l.length)||!(u!=null&&u.length))return;const f=W7(c)?{...c}:c;e.push(...s.flatMap(h=>l.flatMap(d=>u.map(p=>n(h,d,p,f)))))},{flush:"post"}),o=()=>{a(),t()};return dp(t),o}function Z7(){const r=zl(!1),e=xu();return e&&zi(()=>{r.value=!0},e),r}function J7(r){return typeof r=="function"?r:typeof r=="string"?e=>e.key===r:Array.isArray(r)?e=>r.includes(e.key):()=>!0}function Q7(...r){let e,t,n={};r.length===3?(e=r[0],t=r[1],n=r[2]):r.length===2?typeof r[1]=="object"?(e=!0,t=r[0],n=r[1]):(e=r[0],t=r[1]):(e=!0,t=r[0]);const{target:i=KS,eventName:a="keydown",passive:o=!1,dedupe:s=!1}=n,l=J7(e);return lg(i,a,c=>{c.repeat&&Nr(s)||l(c)&&t(c)},o)}function e9(r){return JSON.parse(JSON.stringify(r))}function N3(r,e,t,n={}){var i,a,o;const{clone:s=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:f,shouldEmit:h}=n,d=xu(),p=t||(d==null?void 0:d.emit)||((i=d==null?void 0:d.$emit)==null?void 0:i.bind(d))||((o=(a=d==null?void 0:d.proxy)==null?void 0:a.$emit)==null?void 0:o.bind(d==null?void 0:d.proxy));let v=u;v=v||`update:${e.toString()}`;const m=b=>s?typeof s=="function"?s(b):e9(b):b,g=()=>H7(r[e])?m(r[e]):f,y=b=>{h?h(b)&&p(v,b):p(v,b)};if(l){const b=g(),_=te(b);let x=!1;return Nt(()=>r[e],w=>{x||(x=!0,_.value=m(w),Ca(()=>x=!1))}),Nt(_,w=>{!x&&(w!==r[e]||c)&&y(w)},{deep:c}),_}else return de({get(){return g()},set(b){y(b)}})}function C1(r){if(r===null||typeof r!="object")return!1;const e=Object.getPrototypeOf(r);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in r?!1:Symbol.toStringTag in r?Object.prototype.toString.call(r)==="[object Module]":!0}function Yx(r,e,t=".",n){if(!C1(e))return Yx(r,{},t,n);const i=Object.assign({},e);for(const a in r){if(a==="__proto__"||a==="constructor")continue;const o=r[a];o!=null&&(n&&n(i,a,o,t)||(Array.isArray(o)&&Array.isArray(i[a])?i[a]=[...o,...i[a]]:C1(o)&&C1(i[a])?i[a]=Yx(o,i[a],(t?`${t}.`:"")+a.toString(),n):i[a]=o))}return i}function t9(r){return(...e)=>e.reduce((t,n)=>Yx(t,n,"",r),{})}const r9=t9(),n9=$7(()=>{const r=te(new Map),e=te(),t=de(()=>{for(const o of r.value.values())if(o)return!0;return!1}),n=B7({scrollBody:te(!0)});let i=null;const a=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",zM&&(i==null||i()),e.value=void 0};return Nt(t,(o,s)=>{var f;if(!js)return;if(!o){s&&a();return}e.value===void 0&&(e.value=document.body.style.overflow);const l=window.innerWidth-document.documentElement.clientWidth,u={padding:l,margin:0},c=(f=n.scrollBody)!=null&&f.value?typeof n.scrollBody.value=="object"?r9({padding:n.scrollBody.value.padding===!0?l:n.scrollBody.value.padding,margin:n.scrollBody.value.margin===!0?l:n.scrollBody.value.margin},u):u:{padding:0,margin:0};l>0&&(document.body.style.paddingRight=typeof c.padding=="number"?`${c.padding}px`:String(c.padding),document.body.style.marginRight=typeof c.margin=="number"?`${c.margin}px`:String(c.margin),document.documentElement.style.setProperty("--scrollbar-width",`${l}px`),document.body.style.overflow="hidden"),zM&&(i=lg(document,"touchmove",h=>a9(h),{passive:!1})),Ca(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),r});function i9(r){const e=Math.random().toString(36).substring(2,7),t=n9();t.value.set(e,r);const n=de({get:()=>t.value.get(e)??!1,set:i=>t.value.set(e,i)});return X7(()=>{t.value.delete(e)}),n}function B3(r){const e=window.getComputedStyle(r);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&r.clientWidth<r.scrollWidth||e.overflowY==="auto"&&r.clientHeight<r.scrollHeight)return!0;{const t=r.parentNode;return!(t instanceof Element)||t.tagName==="BODY"?!1:B3(t)}}function a9(r){const e=r||window.event,t=e.target;return t instanceof Element&&B3(t)?!1:e.touches.length>1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}function o0(r){const e=xu(),t=e==null?void 0:e.type.emits,n={};return t!=null&&t.length||console.warn(`No emitted event found. Please check component: ${e==null?void 0:e.type.__name}`),t==null||t.forEach(i=>{n[wH(m3(i))]=(...a)=>r(i,...a)}),n}function nr(){const r=xu(),e=te(),t=de(()=>{var o,s;return["#text","#comment"].includes((o=e.value)==null?void 0:o.$el.nodeName)?(s=e.value)==null?void 0:s.$el.nextElementSibling:pp(e)}),n=Object.assign({},r.exposed),i={};for(const o in r.props)Object.defineProperty(i,o,{enumerable:!0,configurable:!0,get:()=>r.props[o]});if(Object.keys(n).length>0)for(const o in n)Object.defineProperty(i,o,{enumerable:!0,configurable:!0,get:()=>n[o]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>r.vnode.el}),r.exposed=i;function a(o){e.value=o,o&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>o instanceof Element?o:o.$el}),r.exposed=i)}return{forwardRef:a,currentRef:e,currentElement:t}}function z3(r){const e=xu(),t=Object.keys((e==null?void 0:e.type.props)??{}).reduce((i,a)=>{const o=(e==null?void 0:e.type.props[a]).default;return o!==void 0&&(i[a]=o),i},{}),n=ag(r);return de(()=>{const i={},a=(e==null?void 0:e.vnode.props)??{};return Object.keys(a).forEach(o=>{i[m3(o)]=a[o]}),Object.keys({...t,...i}).reduce((o,s)=>(n.value[s]!==void 0&&(o[s]=n.value[s]),o),{})})}function o9(r,e){const t=z3(r),n=e?o0(e):{};return de(()=>({...t.value,...n}))}function s9(r,e){const t=q7(!1,300),n=te(null),i=F7();function a(){n.value=null,t.value=!1}function o(s,l){const u=s.currentTarget,c={x:s.clientX,y:s.clientY},f=l9(c,u.getBoundingClientRect()),h=u9(c,f),d=c9(l.getBoundingClientRect()),p=h9([...h,...d]);n.value=p,t.value=!0}return Ta(s=>{if(r.value&&e.value){const l=c=>o(c,e.value),u=c=>o(c,r.value);r.value.addEventListener("pointerleave",l),e.value.addEventListener("pointerleave",u),s(()=>{var c,f;(c=r.value)==null||c.removeEventListener("pointerleave",l),(f=e.value)==null||f.removeEventListener("pointerleave",u)})}}),Ta(s=>{var l;if(n.value){const u=c=>{var m,g;if(!n.value||!(c.target instanceof HTMLElement))return;const f=c.target,h={x:c.clientX,y:c.clientY},d=((m=r.value)==null?void 0:m.contains(f))||((g=e.value)==null?void 0:g.contains(f)),p=!f9(h,n.value),v=!!f.closest("[data-grace-area-trigger]");d?a():(p||v)&&(a(),i.trigger())};(l=r.value)==null||l.ownerDocument.addEventListener("pointermove",u),s(()=>{var c;return(c=r.value)==null?void 0:c.ownerDocument.removeEventListener("pointermove",u)})}}),{isPointerInTransit:t,onPointerExit:i.on}}function l9(r,e){const t=Math.abs(e.top-r.y),n=Math.abs(e.bottom-r.y),i=Math.abs(e.right-r.x),a=Math.abs(e.left-r.x);switch(Math.min(t,n,i,a)){case a:return"left";case i:return"right";case t:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function u9(r,e,t=5){const n=[];switch(e){case"top":n.push({x:r.x-t,y:r.y+t},{x:r.x+t,y:r.y+t});break;case"bottom":n.push({x:r.x-t,y:r.y-t},{x:r.x+t,y:r.y-t});break;case"left":n.push({x:r.x+t,y:r.y-t},{x:r.x+t,y:r.y+t});break;case"right":n.push({x:r.x-t,y:r.y-t},{x:r.x-t,y:r.y+t});break}return n}function c9(r){const{top:e,right:t,bottom:n,left:i}=r;return[{x:i,y:e},{x:t,y:e},{x:t,y:n},{x:i,y:n}]}function f9(r,e){const{x:t,y:n}=r;let i=!1;for(let a=0,o=e.length-1;a<e.length;o=a++){const s=e[a].x,l=e[a].y,u=e[o].x,c=e[o].y;l>n!=c>n&&t<(u-s)*(n-l)/(c-l)+s&&(i=!i)}return i}function h9(r){const e=r.slice();return e.sort((t,n)=>t.x<n.x?-1:t.x>n.x?1:t.y<n.y?-1:t.y>n.y?1:0),d9(e)}function d9(r){if(r.length<=1)return r.slice();const e=[];for(let n=0;n<r.length;n++){const i=r[n];for(;e.length>=2;){const a=e[e.length-1],o=e[e.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))e.pop();else break}e.push(i)}e.pop();const t=[];for(let n=r.length-1;n>=0;n--){const i=r[n];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var p9=function(r){if(typeof document>"u")return null;var e=Array.isArray(r)?r[0]:r;return e.ownerDocument.body},$u=new WeakMap,Gp=new WeakMap,Wp={},A1=0,F3=function(r){return r&&(r.host||F3(r.parentNode))},v9=function(r,e){return e.map(function(t){if(r.contains(t))return t;var n=F3(t);return n&&r.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",r,". Doing nothing"),null)}).filter(function(t){return!!t})},m9=function(r,e,t,n){var i=v9(e,Array.isArray(r)?r:[r]);Wp[t]||(Wp[t]=new WeakMap);var a=Wp[t],o=[],s=new Set,l=new Set(i),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};i.forEach(u);var c=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(s.has(h))c(h);else try{var d=h.getAttribute(n),p=d!==null&&d!=="false",v=($u.get(h)||0)+1,m=(a.get(h)||0)+1;$u.set(h,v),a.set(h,m),o.push(h),v===1&&p&&Gp.set(h,!0),m===1&&h.setAttribute(t,"true"),p||h.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",h,g)}})};return c(e),s.clear(),A1++,function(){o.forEach(function(f){var h=$u.get(f)-1,d=a.get(f)-1;$u.set(f,h),a.set(f,d),h||(Gp.has(f)||f.removeAttribute(n),Gp.delete(f)),d||f.removeAttribute(t)}),A1--,A1||($u=new WeakMap,$u=new WeakMap,Gp=new WeakMap,Wp={})}},g9=function(r,e,t){t===void 0&&(t="data-aria-hidden");var n=Array.from(Array.isArray(r)?r:[r]),i=p9(r);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),m9(n,i,t,"aria-hidden")):function(){return null}};function y9(r){let e;Nt(()=>pp(r),t=>{t?e=g9(t):e&&e()}),Ss(()=>{e&&e()})}function qx(r,e="reka"){var t;return`${e}-${(t=SH)==null?void 0:t()}`}function b9(r){const e=te(),t=de(()=>{var i;return((i=e.value)==null?void 0:i.width)??0}),n=de(()=>{var i;return((i=e.value)==null?void 0:i.height)??0});return zi(()=>{const i=pp(r);if(i){e.value={width:i.offsetWidth,height:i.offsetHeight};const a=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let l,u;if("borderBoxSize"in s){const c=s.borderBoxSize,f=Array.isArray(c)?c[0]:c;l=f.inlineSize,u=f.blockSize}else l=i.offsetWidth,u=i.offsetHeight;e.value={width:l,height:u}});return a.observe(i,{box:"border-box"}),()=>a.unobserve(i)}else e.value=void 0}),{width:t,height:n}}function _9(r,e){const t=te(r);function n(a){return e[t.value][a]??t.value}return{state:t,dispatch:a=>{t.value=n(a)}}}function x9(r,e){var m;const t=te({}),n=te("none"),i=te(r),a=r.value?"mounted":"unmounted";let o;const s=((m=e.value)==null?void 0:m.ownerDocument.defaultView)??KS,{state:l,dispatch:u}=_9(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),c=g=>{var y;if(js){const b=new CustomEvent(g,{bubbles:!1,cancelable:!1});(y=e.value)==null||y.dispatchEvent(b)}};Nt(r,async(g,y)=>{var _;const b=y!==g;if(await Ca(),b){const x=n.value,w=Up(e.value);g?(u("MOUNT"),c("enter"),w==="none"&&c("after-enter")):w==="none"||w==="undefined"||((_=t.value)==null?void 0:_.display)==="none"?(u("UNMOUNT"),c("leave"),c("after-leave")):y&&x!==w?(u("ANIMATION_OUT"),c("leave")):(u("UNMOUNT"),c("after-leave"))}},{immediate:!0});const f=g=>{const y=Up(e.value),b=y.includes(g.animationName),_=l.value==="mounted"?"enter":"leave";if(g.target===e.value&&b&&(c(`after-${_}`),u("ANIMATION_END"),!i.value)){const x=e.value.style.animationFillMode;e.value.style.animationFillMode="forwards",o=s==null?void 0:s.setTimeout(()=>{var w;((w=e.value)==null?void 0:w.style.animationFillMode)==="forwards"&&(e.value.style.animationFillMode=x)})}g.target===e.value&&y==="none"&&u("ANIMATION_END")},h=g=>{g.target===e.value&&(n.value=Up(e.value))},d=Nt(e,(g,y)=>{g?(t.value=getComputedStyle(g),g.addEventListener("animationstart",h),g.addEventListener("animationcancel",f),g.addEventListener("animationend",f)):(u("ANIMATION_END"),o!==void 0&&(s==null||s.clearTimeout(o)),y==null||y.removeEventListener("animationstart",h),y==null||y.removeEventListener("animationcancel",f),y==null||y.removeEventListener("animationend",f))},{immediate:!0}),p=Nt(l,()=>{const g=Up(e.value);n.value=l.value==="mounted"?g:"none"});return Ss(()=>{d(),p()}),{isPresent:de(()=>["mounted","unmountSuspended"].includes(l.value))}}function Up(r){return r&&getComputedStyle(r).animationName||"none"}var ZS=Ke({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(r,{slots:e,expose:t}){var u;const{present:n,forceMount:i}=FS(r),a=te(),{isPresent:o}=x9(n,a);t({present:o});let s=e.default({present:o.value});s=XS(s||[]);const l=xu();if(s&&(s==null?void 0:s.length)>1){const c=(u=l==null?void 0:l.parent)!=null&&u.type.name?`<${l.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${c}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(f=>` - ${f}`).join(`
|
||
`)].join(`
|
||
`))}return()=>i.value||n.value||o.value?so(e.default({present:o.value})[0],{ref:c=>{const f=pp(c);return typeof(f==null?void 0:f.hasAttribute)>"u"||(f!=null&&f.hasAttribute("data-reka-popper-content-wrapper")?a.value=f.firstElementChild:a.value=f),f}}):null}});const w9=Ke({name:"PrimitiveSlot",inheritAttrs:!1,setup(r,{attrs:e,slots:t}){return()=>{var l;if(!t.default)return null;const n=XS(t.default()),i=n.findIndex(u=>u.type!==g3);if(i===-1)return n;const a=n[i];(l=a.props)==null||delete l.ref;const o=a.props?rr(e,a.props):e,s=TH({...a,props:{}},o);return n.length===1?s:(n[i]=s,n)}}}),S9=["area","img","input"],Fi=Ke({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(r,{attrs:e,slots:t}){const n=r.asChild?"template":r.as;return typeof n=="string"&&S9.includes(n)?()=>so(n,e):n!=="template"?()=>so(r.as,e,{default:t.default}):()=>so(w9,e,{default:t.default})}}),[ko,T9]=cf("DialogRoot");var C9=Ke({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(r,{emit:e}){const t=r,i=N3(t,"open",e,{defaultValue:t.defaultOpen,passive:t.open===void 0}),a=te(),o=te(),{modal:s}=FS(t);return T9({open:i,modal:s,openModal:()=>{i.value=!0},onOpenChange:l=>{i.value=l},onOpenToggle:()=>{i.value=!i.value},contentId:"",titleId:"",descriptionId:"",triggerElement:a,contentElement:o}),(l,u)=>Je(l.$slots,"default",{open:H(i),close:()=>i.value=!1})}}),A9=C9,M9=Ke({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r;nr();const t=ko();return(n,i)=>(Y(),$e(H(Fi),rr(e,{type:n.as==="button"?"button":void 0,onClick:i[0]||(i[0]=a=>H(t).onOpenChange(!1))}),{default:_e(()=>[Je(n.$slots,"default")]),_:3},16,["type"]))}}),k9=M9;const D9="dismissableLayer.pointerDownOutside",E9="dismissableLayer.focusOutside";function V3(r,e){const t=e.closest("[data-dismissable-layer]"),n=r.dataset.dismissableLayer===""?r:r.querySelector("[data-dismissable-layer]"),i=Array.from(r.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(t&&(n===t||i.indexOf(n)<i.indexOf(t)))}function L9(r,e,t=!0){var o;const n=((o=e==null?void 0:e.value)==null?void 0:o.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=te(!1),a=te(()=>{});return Ta(s=>{if(!js||!Nr(t))return;const l=async c=>{const f=c.target;if(!(!(e!=null&&e.value)||!f)){if(V3(e.value,f)){i.value=!1;return}if(c.target&&!i.value){let h=function(){O3(D9,r,d)};const d={originalEvent:c};c.pointerType==="touch"?(n.removeEventListener("click",a.value),a.value=h,n.addEventListener("click",a.value,{once:!0})):h()}else n.removeEventListener("click",a.value);i.value=!1}},u=window.setTimeout(()=>{n.addEventListener("pointerdown",l)},0);s(()=>{window.clearTimeout(u),n.removeEventListener("pointerdown",l),n.removeEventListener("click",a.value)})}),{onPointerDownCapture:()=>{Nr(t)&&(i.value=!0)}}}function I9(r,e,t=!0){var a;const n=((a=e==null?void 0:e.value)==null?void 0:a.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=te(!1);return Ta(o=>{if(!js||!Nr(t))return;const s=async l=>{if(!(e!=null&&e.value))return;await Ca(),await Ca();const u=l.target;!e.value||!u||V3(e.value,u)||l.target&&!i.value&&O3(E9,r,{originalEvent:l})};n.addEventListener("focusin",s),o(()=>n.removeEventListener("focusin",s))}),{onFocusCapture:()=>{Nr(t)&&(i.value=!0)},onBlurCapture:()=>{Nr(t)&&(i.value=!1)}}}const Ga=wu({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set});var P9=Ke({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(r,{emit:e}){const t=r,n=e,{forwardRef:i,currentElement:a}=nr(),o=de(()=>{var p;return((p=a.value)==null?void 0:p.ownerDocument)??globalThis.document}),s=de(()=>Ga.layersRoot),l=de(()=>a.value?Array.from(s.value).indexOf(a.value):-1),u=de(()=>Ga.layersWithOutsidePointerEventsDisabled.size>0),c=de(()=>{const p=Array.from(s.value),[v]=[...Ga.layersWithOutsidePointerEventsDisabled].slice(-1),m=p.indexOf(v);return l.value>=m}),f=L9(async p=>{const v=[...Ga.branches].some(m=>m==null?void 0:m.contains(p.target));!c.value||v||(n("pointerDownOutside",p),n("interactOutside",p),await Ca(),p.defaultPrevented||n("dismiss"))},a),h=I9(p=>{[...Ga.branches].some(m=>m==null?void 0:m.contains(p.target))||(n("focusOutside",p),n("interactOutside",p),p.defaultPrevented||n("dismiss"))},a);Q7("Escape",p=>{l.value===s.value.size-1&&(n("escapeKeyDown",p),p.defaultPrevented||n("dismiss"))});let d;return Ta(p=>{a.value&&(t.disableOutsidePointerEvents&&(Ga.layersWithOutsidePointerEventsDisabled.size===0&&(d=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),Ga.layersWithOutsidePointerEventsDisabled.add(a.value)),s.value.add(a.value),p(()=>{t.disableOutsidePointerEvents&&Ga.layersWithOutsidePointerEventsDisabled.size===1&&(o.value.body.style.pointerEvents=d)}))}),Ta(p=>{p(()=>{a.value&&(s.value.delete(a.value),Ga.layersWithOutsidePointerEventsDisabled.delete(a.value))})}),(p,v)=>(Y(),$e(H(Fi),{ref:H(i),"as-child":p.asChild,as:p.as,"data-dismissable-layer":"",style:Sa({pointerEvents:u.value?c.value?"auto":"none":void 0}),onFocusCapture:H(h).onFocusCapture,onBlurCapture:H(h).onBlurCapture,onPointerdownCapture:H(f).onPointerDownCapture},{default:_e(()=>[Je(p.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),$3=P9;const R9=V7(()=>te([]));function O9(){const r=R9();return{add(e){const t=r.value[0];e!==t&&(t==null||t.pause()),r.value=FM(r.value,e),r.value.unshift(e)},remove(e){var t;r.value=FM(r.value,e),(t=r.value[0])==null||t.resume()}}}function FM(r,e){const t=[...r],n=t.indexOf(e);return n!==-1&&t.splice(n,1),t}function j9(r){return r.filter(e=>e.tagName!=="A")}const M1="focusScope.autoFocusOnMount",k1="focusScope.autoFocusOnUnmount",VM={bubbles:!1,cancelable:!0};function N9(r,{select:e=!1}={}){const t=ms();for(const n of r)if(Uo(n,{select:e}),ms()!==t)return!0}function B9(r){const e=H3(r),t=$M(e,r),n=$M(e.reverse(),r);return[t,n]}function H3(r){const e=[],t=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)e.push(t.currentNode);return e}function $M(r,e){for(const t of r)if(!z9(t,{upTo:e}))return t}function z9(r,{upTo:e}){if(getComputedStyle(r).visibility==="hidden")return!0;for(;r;){if(e!==void 0&&r===e)return!1;if(getComputedStyle(r).display==="none")return!0;r=r.parentElement}return!1}function F9(r){return r instanceof HTMLInputElement&&"select"in r}function Uo(r,{select:e=!1}={}){if(r&&r.focus){const t=ms();r.focus({preventScroll:!0}),r!==t&&F9(r)&&e&&r.select()}}var V9=Ke({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(r,{emit:e}){const t=r,n=e,{currentRef:i,currentElement:a}=nr(),o=te(null),s=O9(),l=wu({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});Ta(c=>{if(!js)return;const f=a.value;if(!t.trapped)return;function h(m){if(l.paused||!f)return;const g=m.target;f.contains(g)?o.value=g:Uo(o.value,{select:!0})}function d(m){if(l.paused||!f)return;const g=m.relatedTarget;g!==null&&(f.contains(g)||Uo(o.value,{select:!0}))}function p(m){f.contains(o.value)||Uo(f)}document.addEventListener("focusin",h),document.addEventListener("focusout",d);const v=new MutationObserver(p);f&&v.observe(f,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",d),v.disconnect()})}),Ta(async c=>{const f=a.value;if(await Ca(),!f)return;s.add(l);const h=ms();if(!f.contains(h)){const p=new CustomEvent(M1,VM);f.addEventListener(M1,v=>n("mountAutoFocus",v)),f.dispatchEvent(p),p.defaultPrevented||(N9(j9(H3(f)),{select:!0}),ms()===h&&Uo(f))}c(()=>{f.removeEventListener(M1,m=>n("mountAutoFocus",m));const p=new CustomEvent(k1,VM),v=m=>{n("unmountAutoFocus",m)};f.addEventListener(k1,v),f.dispatchEvent(p),setTimeout(()=>{p.defaultPrevented||Uo(h??document.body,{select:!0}),f.removeEventListener(k1,v),s.remove(l)},0)})});function u(c){if(!t.loop&&!t.trapped||l.paused)return;const f=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,h=ms();if(f&&h){const d=c.currentTarget,[p,v]=B9(d);p&&v?!c.shiftKey&&h===v?(c.preventDefault(),t.loop&&Uo(p,{select:!0})):c.shiftKey&&h===p&&(c.preventDefault(),t.loop&&Uo(v,{select:!0})):h===d&&c.preventDefault()}}return(c,f)=>(Y(),$e(H(Fi),{ref_key:"currentRef",ref:i,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:u},{default:_e(()=>[Je(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),$9=V9;function H9(r){return r?"open":"closed"}var G9=Ke({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:e}){const t=r,n=e,i=ko(),{forwardRef:a,currentElement:o}=nr();return i.titleId||(i.titleId=qx(void 0,"reka-dialog-title")),i.descriptionId||(i.descriptionId=qx(void 0,"reka-dialog-description")),zi(()=>{i.contentElement=o,ms()!==document.body&&(i.triggerElement.value=ms())}),(s,l)=>(Y(),$e(H($9),{"as-child":"",loop:"",trapped:t.trapFocus,onMountAutoFocus:l[5]||(l[5]=u=>n("openAutoFocus",u)),onUnmountAutoFocus:l[6]||(l[6]=u=>n("closeAutoFocus",u))},{default:_e(()=>[Ie(H($3),rr({id:H(i).contentId,ref:H(a),as:s.as,"as-child":s.asChild,"disable-outside-pointer-events":s.disableOutsidePointerEvents,role:"dialog","aria-describedby":H(i).descriptionId,"aria-labelledby":H(i).titleId,"data-state":H(H9)(H(i).open.value)},s.$attrs,{onDismiss:l[0]||(l[0]=u=>H(i).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=u=>n("escapeKeyDown",u)),onFocusOutside:l[2]||(l[2]=u=>n("focusOutside",u)),onInteractOutside:l[3]||(l[3]=u=>n("interactOutside",u)),onPointerDownOutside:l[4]||(l[4]=u=>n("pointerDownOutside",u))}),{default:_e(()=>[Je(s.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),G3=G9,W9=Ke({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:e}){const t=r,n=e,i=ko(),a=o0(n),{forwardRef:o,currentElement:s}=nr();return y9(s),(l,u)=>(Y(),$e(G3,rr({...t,...H(a)},{ref:H(o),"trap-focus":H(i).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:u[0]||(u[0]=c=>{var f;c.defaultPrevented||(c.preventDefault(),(f=H(i).triggerElement.value)==null||f.focus())}),onPointerDownOutside:u[1]||(u[1]=c=>{const f=c.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0;(f.button===2||h)&&c.preventDefault()}),onFocusOutside:u[2]||(u[2]=c=>{c.preventDefault()})}),{default:_e(()=>[Je(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),U9=W9,Y9=Ke({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:e}){const t=r,i=o0(e);nr();const a=ko(),o=te(!1),s=te(!1);return(l,u)=>(Y(),$e(G3,rr({...t,...H(i)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:u[0]||(u[0]=c=>{var f;c.defaultPrevented||(o.value||(f=H(a).triggerElement.value)==null||f.focus(),c.preventDefault()),o.value=!1,s.value=!1}),onInteractOutside:u[1]||(u[1]=c=>{var d;c.defaultPrevented||(o.value=!0,c.detail.originalEvent.type==="pointerdown"&&(s.value=!0));const f=c.target;((d=H(a).triggerElement.value)==null?void 0:d.contains(f))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&s.value&&c.preventDefault()})}),{default:_e(()=>[Je(l.$slots,"default")]),_:3},16))}}),q9=Y9,X9=Ke({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(r,{emit:e}){const t=r,n=e,i=ko(),a=o0(n),{forwardRef:o}=nr();return(s,l)=>(Y(),$e(H(ZS),{present:s.forceMount||H(i).open.value},{default:_e(()=>[H(i).modal.value?(Y(),$e(U9,rr({key:0,ref:H(o)},{...t,...H(a),...s.$attrs}),{default:_e(()=>[Je(s.$slots,"default")]),_:3},16)):(Y(),$e(q9,rr({key:1,ref:H(o)},{...t,...H(a),...s.$attrs}),{default:_e(()=>[Je(s.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),K9=X9,Z9=Ke({__name:"DialogDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"p"}},setup(r){const e=r;nr();const t=ko();return(n,i)=>(Y(),$e(H(Fi),rr(e,{id:H(t).descriptionId}),{default:_e(()=>[Je(n.$slots,"default")]),_:3},16,["id"]))}}),W3=Z9,J9=Ke({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=ko();return i9(!0),nr(),(t,n)=>(Y(),$e(H(Fi),{as:t.as,"as-child":t.asChild,"data-state":H(e).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:_e(()=>[Je(t.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),Q9=J9,eG=Ke({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=ko(),{forwardRef:t}=nr();return(n,i)=>{var a;return(a=H(e))!=null&&a.modal.value?(Y(),$e(H(ZS),{key:0,present:n.forceMount||H(e).open.value},{default:_e(()=>[Ie(Q9,rr(n.$attrs,{ref:H(t),as:n.as,"as-child":n.asChild}),{default:_e(()=>[Je(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):ct("v-if",!0)}}}),tG=eG,rG=Ke({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(r){const e=Z7();return(t,n)=>H(e)||t.forceMount?(Y(),$e(VS,{key:0,to:t.to,disabled:t.disabled,defer:t.defer},[Je(t.$slots,"default")],8,["to","disabled","defer"])):ct("v-if",!0)}}),U3=rG,nG=Ke({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(r){const e=r;return(t,n)=>(Y(),$e(H(U3),r0(n0(e)),{default:_e(()=>[Je(t.$slots,"default")]),_:3},16))}}),iG=nG,aG=Ke({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(r){const e=r,t=ko();return nr(),(n,i)=>(Y(),$e(H(Fi),rr(e,{id:H(t).titleId}),{default:_e(()=>[Je(n.$slots,"default")]),_:3},16,["id"]))}}),Y3=aG,oG=Ke({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(r){return(e,t)=>(Y(),$e(H(Fi),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:_e(()=>[Je(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),sG=oG;const[q3,lG]=cf("PopperRoot");var uG=Ke({inheritAttrs:!1,__name:"PopperRoot",setup(r){const e=te();return lG({anchor:e,onAnchorChange:t=>e.value=t}),(t,n)=>Je(t.$slots,"default")}}),cG=uG,fG=Ke({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const e=r,{forwardRef:t,currentElement:n}=nr(),i=q3();return y3(()=>{i.onAnchorChange(e.reference??n.value)}),(a,o)=>(Y(),$e(H(Fi),{ref:H(t),as:a.as,"as-child":a.asChild},{default:_e(()=>[Je(a.$slots,"default")]),_:3},8,["as","as-child"]))}}),hG=fG;const dG={key:0,d:"M0 0L6 6L12 0"},pG={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"};var vG=Ke({__name:"Arrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(r){const e=r;return nr(),(t,n)=>(Y(),$e(H(Fi),rr(e,{width:t.width,height:t.height,viewBox:t.asChild?void 0:"0 0 12 6",preserveAspectRatio:t.asChild?void 0:"none"}),{default:_e(()=>[Je(t.$slots,"default",{},()=>[t.rounded?(Y(),ae("path",pG)):(Y(),ae("path",dG))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),mG=vG;function gG(r){return r!==null}function yG(r){return{name:"transformOrigin",options:r,fn(e){var m,g,y;const{placement:t,rects:n,middlewareData:i}=e,o=((m=i.arrow)==null?void 0:m.centerOffset)!==0,s=o?0:r.arrowWidth,l=o?0:r.arrowHeight,[u,c]=Xx(t),f={start:"0%",center:"50%",end:"100%"}[c],h=(((g=i.arrow)==null?void 0:g.x)??0)+s/2,d=(((y=i.arrow)==null?void 0:y.y)??0)+l/2;let p="",v="";return u==="bottom"?(p=o?f:`${h}px`,v=`${-l}px`):u==="top"?(p=o?f:`${h}px`,v=`${n.floating.height+l}px`):u==="right"?(p=`${-l}px`,v=o?f:`${d}px`):u==="left"&&(p=`${n.floating.width+l}px`,v=o?f:`${d}px`),{data:{x:p,y:v}}}}}function Xx(r){const[e,t="center"]=r.split("-");return[e,t]}const bG=["top","right","bottom","left"],Ts=Math.min,In=Math.max,ug=Math.round,Yp=Math.floor,ba=r=>({x:r,y:r}),_G={left:"right",right:"left",bottom:"top",top:"bottom"},xG={start:"end",end:"start"};function Kx(r,e,t){return In(r,Ts(e,t))}function go(r,e){return typeof r=="function"?r(e):r}function yo(r){return r.split("-")[0]}function ff(r){return r.split("-")[1]}function JS(r){return r==="x"?"y":"x"}function QS(r){return r==="y"?"height":"width"}const wG=new Set(["top","bottom"]);function fa(r){return wG.has(yo(r))?"y":"x"}function eT(r){return JS(fa(r))}function SG(r,e,t){t===void 0&&(t=!1);const n=ff(r),i=eT(r),a=QS(i);let o=i==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(o=cg(o)),[o,cg(o)]}function TG(r){const e=cg(r);return[Zx(r),e,Zx(e)]}function Zx(r){return r.replace(/start|end/g,e=>xG[e])}const HM=["left","right"],GM=["right","left"],CG=["top","bottom"],AG=["bottom","top"];function MG(r,e,t){switch(r){case"top":case"bottom":return t?e?GM:HM:e?HM:GM;case"left":case"right":return e?CG:AG;default:return[]}}function kG(r,e,t,n){const i=ff(r);let a=MG(yo(r),t==="start",n);return i&&(a=a.map(o=>o+"-"+i),e&&(a=a.concat(a.map(Zx)))),a}function cg(r){return r.replace(/left|right|bottom|top/g,e=>_G[e])}function DG(r){return{top:0,right:0,bottom:0,left:0,...r}}function X3(r){return typeof r!="number"?DG(r):{top:r,right:r,bottom:r,left:r}}function fg(r){const{x:e,y:t,width:n,height:i}=r;return{width:n,height:i,top:t,left:e,right:e+n,bottom:t+i,x:e,y:t}}function WM(r,e,t){let{reference:n,floating:i}=r;const a=fa(e),o=eT(e),s=QS(o),l=yo(e),u=a==="y",c=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,h=n[s]/2-i[s]/2;let d;switch(l){case"top":d={x:c,y:n.y-i.height};break;case"bottom":d={x:c,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:f};break;case"left":d={x:n.x-i.width,y:f};break;default:d={x:n.x,y:n.y}}switch(ff(e)){case"start":d[o]-=h*(t&&u?-1:1);break;case"end":d[o]+=h*(t&&u?-1:1);break}return d}const EG=async(r,e,t)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:o}=t,s=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let u=await o.getElementRects({reference:r,floating:e,strategy:i}),{x:c,y:f}=WM(u,n,l),h=n,d={},p=0;for(let v=0;v<s.length;v++){const{name:m,fn:g}=s[v],{x:y,y:b,data:_,reset:x}=await g({x:c,y:f,initialPlacement:n,placement:h,strategy:i,middlewareData:d,rects:u,platform:o,elements:{reference:r,floating:e}});c=y??c,f=b??f,d={...d,[m]:{...d[m],..._}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(u=x.rects===!0?await o.getElementRects({reference:r,floating:e,strategy:i}):x.rects),{x:c,y:f}=WM(u,h,l)),v=-1)}return{x:c,y:f,placement:h,strategy:i,middlewareData:d}};async function yd(r,e){var t;e===void 0&&(e={});const{x:n,y:i,platform:a,rects:o,elements:s,strategy:l}=r,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=go(e,r),p=X3(d),m=s[h?f==="floating"?"reference":"floating":f],g=fg(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(m)))==null||t?m:m.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),y=f==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),_=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},x=fg(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-x.top+p.top)/_.y,bottom:(x.bottom-g.bottom+p.bottom)/_.y,left:(g.left-x.left+p.left)/_.x,right:(x.right-g.right+p.right)/_.x}}const LG=r=>({name:"arrow",options:r,async fn(e){const{x:t,y:n,placement:i,rects:a,platform:o,elements:s,middlewareData:l}=e,{element:u,padding:c=0}=go(r,e)||{};if(u==null)return{};const f=X3(c),h={x:t,y:n},d=eT(i),p=QS(d),v=await o.getDimensions(u),m=d==="y",g=m?"top":"left",y=m?"bottom":"right",b=m?"clientHeight":"clientWidth",_=a.reference[p]+a.reference[d]-h[d]-a.floating[p],x=h[d]-a.reference[d],w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let S=w?w[b]:0;(!S||!await(o.isElement==null?void 0:o.isElement(w)))&&(S=s.floating[b]||a.floating[p]);const T=_/2-x/2,C=S/2-v[p]/2-1,A=Ts(f[g],C),M=Ts(f[y],C),D=A,E=S-v[p]-M,L=S/2-v[p]/2+T,I=Kx(D,L,E),R=!l.arrow&&ff(i)!=null&&L!==I&&a.reference[p]/2-(L<D?A:M)-v[p]/2<0,P=R?L<D?L-D:L-E:0;return{[d]:h[d]+P,data:{[d]:I,centerOffset:L-I-P,...R&&{alignmentOffset:P}},reset:R}}}),IG=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(e){var t,n;const{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...m}=go(r,e);if((t=a.arrow)!=null&&t.alignmentOffset)return{};const g=yo(i),y=fa(s),b=yo(s)===s,_=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=h||(b||!v?[cg(s)]:TG(s)),w=p!=="none";!h&&w&&x.push(...kG(s,v,p,_));const S=[s,...x],T=await yd(e,m),C=[];let A=((n=a.flip)==null?void 0:n.overflows)||[];if(c&&C.push(T[g]),f){const L=SG(i,o,_);C.push(T[L[0]],T[L[1]])}if(A=[...A,{placement:i,overflows:C}],!C.every(L=>L<=0)){var M,D;const L=(((M=a.flip)==null?void 0:M.index)||0)+1,I=S[L];if(I&&(!(f==="alignment"?y!==fa(I):!1)||A.every(O=>fa(O.placement)===y?O.overflows[0]>0:!0)))return{data:{index:L,overflows:A},reset:{placement:I}};let R=(D=A.filter(P=>P.overflows[0]<=0).sort((P,O)=>P.overflows[1]-O.overflows[1])[0])==null?void 0:D.placement;if(!R)switch(d){case"bestFit":{var E;const P=(E=A.filter(O=>{if(w){const j=fa(O.placement);return j===y||j==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(j=>j>0).reduce((j,F)=>j+F,0)]).sort((O,j)=>O[1]-j[1])[0])==null?void 0:E[0];P&&(R=P);break}case"initialPlacement":R=s;break}if(i!==R)return{reset:{placement:R}}}return{}}}};function UM(r,e){return{top:r.top-e.height,right:r.right-e.width,bottom:r.bottom-e.height,left:r.left-e.width}}function YM(r){return bG.some(e=>r[e]>=0)}const PG=function(r){return r===void 0&&(r={}),{name:"hide",options:r,async fn(e){const{rects:t}=e,{strategy:n="referenceHidden",...i}=go(r,e);switch(n){case"referenceHidden":{const a=await yd(e,{...i,elementContext:"reference"}),o=UM(a,t.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:YM(o)}}}case"escaped":{const a=await yd(e,{...i,altBoundary:!0}),o=UM(a,t.floating);return{data:{escapedOffsets:o,escaped:YM(o)}}}default:return{}}}}},K3=new Set(["left","top"]);async function RG(r,e){const{placement:t,platform:n,elements:i}=r,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=yo(t),s=ff(t),l=fa(t)==="y",u=K3.has(o)?-1:1,c=a&&l?-1:1,f=go(e,r);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof p=="number"&&(d=s==="end"?p*-1:p),l?{x:d*c,y:h*u}:{x:h*u,y:d*c}}const OG=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(e){var t,n;const{x:i,y:a,placement:o,middlewareData:s}=e,l=await RG(e,r);return o===((t=s.offset)==null?void 0:t.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:o}}}}},jG=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(e){const{x:t,y:n,placement:i}=e,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:m=>{let{x:g,y}=m;return{x:g,y}}},...l}=go(r,e),u={x:t,y:n},c=await yd(e,l),f=fa(yo(i)),h=JS(f);let d=u[h],p=u[f];if(a){const m=h==="y"?"top":"left",g=h==="y"?"bottom":"right",y=d+c[m],b=d-c[g];d=Kx(y,d,b)}if(o){const m=f==="y"?"top":"left",g=f==="y"?"bottom":"right",y=p+c[m],b=p-c[g];p=Kx(y,p,b)}const v=s.fn({...e,[h]:d,[f]:p});return{...v,data:{x:v.x-t,y:v.y-n,enabled:{[h]:a,[f]:o}}}}}},NG=function(r){return r===void 0&&(r={}),{options:r,fn(e){const{x:t,y:n,placement:i,rects:a,middlewareData:o}=e,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=go(r,e),c={x:t,y:n},f=fa(i),h=JS(f);let d=c[h],p=c[f];const v=go(s,e),m=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const b=h==="y"?"height":"width",_=a.reference[h]-a.floating[b]+m.mainAxis,x=a.reference[h]+a.reference[b]-m.mainAxis;d<_?d=_:d>x&&(d=x)}if(u){var g,y;const b=h==="y"?"width":"height",_=K3.has(yo(i)),x=a.reference[f]-a.floating[b]+(_&&((g=o.offset)==null?void 0:g[f])||0)+(_?0:m.crossAxis),w=a.reference[f]+a.reference[b]+(_?0:((y=o.offset)==null?void 0:y[f])||0)-(_?m.crossAxis:0);p<x?p=x:p>w&&(p=w)}return{[h]:d,[f]:p}}}},BG=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(e){var t,n;const{placement:i,rects:a,platform:o,elements:s}=e,{apply:l=()=>{},...u}=go(r,e),c=await yd(e,u),f=yo(i),h=ff(i),d=fa(i)==="y",{width:p,height:v}=a.floating;let m,g;f==="top"||f==="bottom"?(m=f,g=h===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(g=f,m=h==="end"?"top":"bottom");const y=v-c.top-c.bottom,b=p-c.left-c.right,_=Ts(v-c[m],y),x=Ts(p-c[g],b),w=!e.middlewareData.shift;let S=_,T=x;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(T=b),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(S=y),w&&!h){const A=In(c.left,0),M=In(c.right,0),D=In(c.top,0),E=In(c.bottom,0);d?T=p-2*(A!==0||M!==0?A+M:In(c.left,c.right)):S=v-2*(D!==0||E!==0?D+E:In(c.top,c.bottom))}await l({...e,availableWidth:T,availableHeight:S});const C=await o.getDimensions(s.floating);return p!==C.width||v!==C.height?{reset:{rects:!0}}:{}}}};function s0(){return typeof window<"u"}function Su(r){return tT(r)?(r.nodeName||"").toLowerCase():"#document"}function Nn(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function ja(r){var e;return(e=(tT(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function tT(r){return s0()?r instanceof Node||r instanceof Nn(r).Node:!1}function Oi(r){return s0()?r instanceof Element||r instanceof Nn(r).Element:!1}function Ma(r){return s0()?r instanceof HTMLElement||r instanceof Nn(r).HTMLElement:!1}function qM(r){return!s0()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof Nn(r).ShadowRoot}const zG=new Set(["inline","contents"]);function vp(r){const{overflow:e,overflowX:t,overflowY:n,display:i}=ji(r);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!zG.has(i)}const FG=new Set(["table","td","th"]);function VG(r){return FG.has(Su(r))}const $G=[":popover-open",":modal"];function l0(r){return $G.some(e=>{try{return r.matches(e)}catch{return!1}})}const HG=["transform","translate","scale","rotate","perspective"],GG=["transform","translate","scale","rotate","perspective","filter"],WG=["paint","layout","strict","content"];function rT(r){const e=nT(),t=Oi(r)?ji(r):r;return HG.some(n=>t[n]?t[n]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||GG.some(n=>(t.willChange||"").includes(n))||WG.some(n=>(t.contain||"").includes(n))}function UG(r){let e=Cs(r);for(;Ma(e)&&!Uc(e);){if(rT(e))return e;if(l0(e))return null;e=Cs(e)}return null}function nT(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const YG=new Set(["html","body","#document"]);function Uc(r){return YG.has(Su(r))}function ji(r){return Nn(r).getComputedStyle(r)}function u0(r){return Oi(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function Cs(r){if(Su(r)==="html")return r;const e=r.assignedSlot||r.parentNode||qM(r)&&r.host||ja(r);return qM(e)?e.host:e}function Z3(r){const e=Cs(r);return Uc(e)?r.ownerDocument?r.ownerDocument.body:r.body:Ma(e)&&vp(e)?e:Z3(e)}function bd(r,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);const i=Z3(r),a=i===((n=r.ownerDocument)==null?void 0:n.body),o=Nn(i);if(a){const s=Jx(o);return e.concat(o,o.visualViewport||[],vp(i)?i:[],s&&t?bd(s):[])}return e.concat(i,bd(i,[],t))}function Jx(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function J3(r){const e=ji(r);let t=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=Ma(r),a=i?r.offsetWidth:t,o=i?r.offsetHeight:n,s=ug(t)!==a||ug(n)!==o;return s&&(t=a,n=o),{width:t,height:n,$:s}}function iT(r){return Oi(r)?r:r.contextElement}function Ic(r){const e=iT(r);if(!Ma(e))return ba(1);const t=e.getBoundingClientRect(),{width:n,height:i,$:a}=J3(e);let o=(a?ug(t.width):t.width)/n,s=(a?ug(t.height):t.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const qG=ba(0);function Q3(r){const e=Nn(r);return!nT()||!e.visualViewport?qG:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function XG(r,e,t){return e===void 0&&(e=!1),!t||e&&t!==Nn(r)?!1:e}function lu(r,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);const i=r.getBoundingClientRect(),a=iT(r);let o=ba(1);e&&(n?Oi(n)&&(o=Ic(n)):o=Ic(r));const s=XG(a,t,n)?Q3(a):ba(0);let l=(i.left+s.x)/o.x,u=(i.top+s.y)/o.y,c=i.width/o.x,f=i.height/o.y;if(a){const h=Nn(a),d=n&&Oi(n)?Nn(n):n;let p=h,v=Jx(p);for(;v&&n&&d!==p;){const m=Ic(v),g=v.getBoundingClientRect(),y=ji(v),b=g.left+(v.clientLeft+parseFloat(y.paddingLeft))*m.x,_=g.top+(v.clientTop+parseFloat(y.paddingTop))*m.y;l*=m.x,u*=m.y,c*=m.x,f*=m.y,l+=b,u+=_,p=Nn(v),v=Jx(p)}}return fg({width:c,height:f,x:l,y:u})}function aT(r,e){const t=u0(r).scrollLeft;return e?e.left+t:lu(ja(r)).left+t}function eN(r,e,t){t===void 0&&(t=!1);const n=r.getBoundingClientRect(),i=n.left+e.scrollLeft-(t?0:aT(r,n)),a=n.top+e.scrollTop;return{x:i,y:a}}function KG(r){let{elements:e,rect:t,offsetParent:n,strategy:i}=r;const a=i==="fixed",o=ja(n),s=e?l0(e.floating):!1;if(n===o||s&&a)return t;let l={scrollLeft:0,scrollTop:0},u=ba(1);const c=ba(0),f=Ma(n);if((f||!f&&!a)&&((Su(n)!=="body"||vp(o))&&(l=u0(n)),Ma(n))){const d=lu(n);u=Ic(n),c.x=d.x+n.clientLeft,c.y=d.y+n.clientTop}const h=o&&!f&&!a?eN(o,l,!0):ba(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:t.y*u.y-l.scrollTop*u.y+c.y+h.y}}function ZG(r){return Array.from(r.getClientRects())}function JG(r){const e=ja(r),t=u0(r),n=r.ownerDocument.body,i=In(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=In(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-t.scrollLeft+aT(r);const s=-t.scrollTop;return ji(n).direction==="rtl"&&(o+=In(e.clientWidth,n.clientWidth)-i),{width:i,height:a,x:o,y:s}}function QG(r,e){const t=Nn(r),n=ja(r),i=t.visualViewport;let a=n.clientWidth,o=n.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;const u=nT();(!u||u&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s,y:l}}const eW=new Set(["absolute","fixed"]);function tW(r,e){const t=lu(r,!0,e==="fixed"),n=t.top+r.clientTop,i=t.left+r.clientLeft,a=Ma(r)?Ic(r):ba(1),o=r.clientWidth*a.x,s=r.clientHeight*a.y,l=i*a.x,u=n*a.y;return{width:o,height:s,x:l,y:u}}function XM(r,e,t){let n;if(e==="viewport")n=QG(r,t);else if(e==="document")n=JG(ja(r));else if(Oi(e))n=tW(e,t);else{const i=Q3(r);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return fg(n)}function tN(r,e){const t=Cs(r);return t===e||!Oi(t)||Uc(t)?!1:ji(t).position==="fixed"||tN(t,e)}function rW(r,e){const t=e.get(r);if(t)return t;let n=bd(r,[],!1).filter(s=>Oi(s)&&Su(s)!=="body"),i=null;const a=ji(r).position==="fixed";let o=a?Cs(r):r;for(;Oi(o)&&!Uc(o);){const s=ji(o),l=rT(o);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&!!i&&eW.has(i.position)||vp(o)&&!l&&tN(r,o))?n=n.filter(c=>c!==o):i=s,o=Cs(o)}return e.set(r,n),n}function nW(r){let{element:e,boundary:t,rootBoundary:n,strategy:i}=r;const o=[...t==="clippingAncestors"?l0(e)?[]:rW(e,this._c):[].concat(t),n],s=o[0],l=o.reduce((u,c)=>{const f=XM(e,c,i);return u.top=In(f.top,u.top),u.right=Ts(f.right,u.right),u.bottom=Ts(f.bottom,u.bottom),u.left=In(f.left,u.left),u},XM(e,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function iW(r){const{width:e,height:t}=J3(r);return{width:e,height:t}}function aW(r,e,t){const n=Ma(e),i=ja(e),a=t==="fixed",o=lu(r,!0,a,e);let s={scrollLeft:0,scrollTop:0};const l=ba(0);function u(){l.x=aT(i)}if(n||!n&&!a)if((Su(e)!=="body"||vp(i))&&(s=u0(e)),n){const d=lu(e,!0,a,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else i&&u();a&&!n&&i&&u();const c=i&&!n&&!a?eN(i,s):ba(0),f=o.left+s.scrollLeft-l.x-c.x,h=o.top+s.scrollTop-l.y-c.y;return{x:f,y:h,width:o.width,height:o.height}}function D1(r){return ji(r).position==="static"}function KM(r,e){if(!Ma(r)||ji(r).position==="fixed")return null;if(e)return e(r);let t=r.offsetParent;return ja(r)===t&&(t=t.ownerDocument.body),t}function rN(r,e){const t=Nn(r);if(l0(r))return t;if(!Ma(r)){let i=Cs(r);for(;i&&!Uc(i);){if(Oi(i)&&!D1(i))return i;i=Cs(i)}return t}let n=KM(r,e);for(;n&&VG(n)&&D1(n);)n=KM(n,e);return n&&Uc(n)&&D1(n)&&!rT(n)?t:n||UG(r)||t}const oW=async function(r){const e=this.getOffsetParent||rN,t=this.getDimensions,n=await t(r.floating);return{reference:aW(r.reference,await e(r.floating),r.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function sW(r){return ji(r).direction==="rtl"}const lW={convertOffsetParentRelativeRectToViewportRelativeRect:KG,getDocumentElement:ja,getClippingRect:nW,getOffsetParent:rN,getElementRects:oW,getClientRects:ZG,getDimensions:iW,getScale:Ic,isElement:Oi,isRTL:sW};function nN(r,e){return r.x===e.x&&r.y===e.y&&r.width===e.width&&r.height===e.height}function uW(r,e){let t=null,n;const i=ja(r);function a(){var s;clearTimeout(n),(s=t)==null||s.disconnect(),t=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const u=r.getBoundingClientRect(),{left:c,top:f,width:h,height:d}=u;if(s||e(),!h||!d)return;const p=Yp(f),v=Yp(i.clientWidth-(c+h)),m=Yp(i.clientHeight-(f+d)),g=Yp(c),b={rootMargin:-p+"px "+-v+"px "+-m+"px "+-g+"px",threshold:In(0,Ts(1,l))||1};let _=!0;function x(w){const S=w[0].intersectionRatio;if(S!==l){if(!_)return o();S?o(!1,S):n=setTimeout(()=>{o(!1,1e-7)},1e3)}S===1&&!nN(u,r.getBoundingClientRect())&&o(),_=!1}try{t=new IntersectionObserver(x,{...b,root:i.ownerDocument})}catch{t=new IntersectionObserver(x,b)}t.observe(r)}return o(!0),a}function cW(r,e,t,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=iT(r),c=i||a?[...u?bd(u):[],...bd(e)]:[];c.forEach(g=>{i&&g.addEventListener("scroll",t,{passive:!0}),a&&g.addEventListener("resize",t)});const f=u&&s?uW(u,t):null;let h=-1,d=null;o&&(d=new ResizeObserver(g=>{let[y]=g;y&&y.target===u&&d&&(d.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=d)==null||b.observe(e)})),t()}),u&&!l&&d.observe(u),d.observe(e));let p,v=l?lu(r):null;l&&m();function m(){const g=lu(r);v&&!nN(v,g)&&t(),v=g,p=requestAnimationFrame(m)}return t(),()=>{var g;c.forEach(y=>{i&&y.removeEventListener("scroll",t),a&&y.removeEventListener("resize",t)}),f==null||f(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(p)}}const fW=OG,hW=jG,ZM=IG,dW=BG,pW=PG,vW=LG,mW=NG,gW=(r,e,t)=>{const n=new Map,i={platform:lW,...t},a={...i.platform,_c:n};return EG(r,e,{...i,platform:a})};function yW(r){return r!=null&&typeof r=="object"&&"$el"in r}function Qx(r){if(yW(r)){const e=r.$el;return tT(e)&&Su(e)==="#comment"?null:e}return r}function mc(r){return typeof r=="function"?r():H(r)}function bW(r){return{name:"arrow",options:r,fn(e){const t=Qx(mc(r.element));return t==null?{}:vW({element:t,padding:r.padding}).fn(e)}}}function iN(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function JM(r,e){const t=iN(r);return Math.round(e*t)/t}function _W(r,e,t){t===void 0&&(t={});const n=t.whileElementsMounted,i=de(()=>{var S;return(S=mc(t.open))!=null?S:!0}),a=de(()=>mc(t.middleware)),o=de(()=>{var S;return(S=mc(t.placement))!=null?S:"bottom"}),s=de(()=>{var S;return(S=mc(t.strategy))!=null?S:"absolute"}),l=de(()=>{var S;return(S=mc(t.transform))!=null?S:!0}),u=de(()=>Qx(r.value)),c=de(()=>Qx(e.value)),f=te(0),h=te(0),d=te(s.value),p=te(o.value),v=zl({}),m=te(!1),g=de(()=>{const S={position:d.value,left:"0",top:"0"};if(!c.value)return S;const T=JM(c.value,f.value),C=JM(c.value,h.value);return l.value?{...S,transform:"translate("+T+"px, "+C+"px)",...iN(c.value)>=1.5&&{willChange:"transform"}}:{position:d.value,left:T+"px",top:C+"px"}});let y;function b(){if(u.value==null||c.value==null)return;const S=i.value;gW(u.value,c.value,{middleware:a.value,placement:o.value,strategy:s.value}).then(T=>{f.value=T.x,h.value=T.y,d.value=T.strategy,p.value=T.placement,v.value=T.middlewareData,m.value=S!==!1})}function _(){typeof y=="function"&&(y(),y=void 0)}function x(){if(_(),n===void 0){b();return}if(u.value!=null&&c.value!=null){y=n(u.value,c.value,b);return}}function w(){i.value||(m.value=!1)}return Nt([a,o,s,i],b,{flush:"sync"}),Nt([u,c],x,{flush:"sync"}),Nt(i,w,{flush:"sync"}),BS()&&zS(_),{x:Vu(f),y:Vu(h),strategy:Vu(d),placement:Vu(p),middlewareData:Vu(v),isPositioned:Vu(m),floatingStyles:g,update:b}}const xW={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[wW,SW]=cf("PopperContent");var TW=Ke({inheritAttrs:!1,__name:"PopperContent",props:CH({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...xW}),emits:["placed"],setup(r,{emit:e}){const t=r,n=e,i=q3(),{forwardRef:a,currentElement:o}=nr(),s=te(),l=te(),{width:u,height:c}=b9(l),f=de(()=>t.side+(t.align!=="center"?`-${t.align}`:"")),h=de(()=>typeof t.collisionPadding=="number"?t.collisionPadding:{top:0,right:0,bottom:0,left:0,...t.collisionPadding}),d=de(()=>Array.isArray(t.collisionBoundary)?t.collisionBoundary:[t.collisionBoundary]),p=de(()=>({padding:h.value,boundary:d.value.filter(gG),altBoundary:d.value.length>0})),v=de(()=>({mainAxis:t.sideFlip,crossAxis:t.alignFlip})),m=z7(()=>[fW({mainAxis:t.sideOffset+c.value,alignmentAxis:t.alignOffset}),t.prioritizePosition&&t.avoidCollisions&&ZM({...p.value,...v.value}),t.avoidCollisions&&hW({mainAxis:!0,crossAxis:!!t.prioritizePosition,limiter:t.sticky==="partial"?mW():void 0,...p.value}),!t.prioritizePosition&&t.avoidCollisions&&ZM({...p.value,...v.value}),dW({...p.value,apply:({elements:D,rects:E,availableWidth:L,availableHeight:I})=>{const{width:R,height:P}=E.reference,O=D.floating.style;O.setProperty("--reka-popper-available-width",`${L}px`),O.setProperty("--reka-popper-available-height",`${I}px`),O.setProperty("--reka-popper-anchor-width",`${R}px`),O.setProperty("--reka-popper-anchor-height",`${P}px`)}}),l.value&&bW({element:l.value,padding:t.arrowPadding}),yG({arrowWidth:u.value,arrowHeight:c.value}),t.hideWhenDetached&&pW({strategy:"referenceHidden",...p.value})]),g=de(()=>t.reference??i.anchor.value),{floatingStyles:y,placement:b,isPositioned:_,middlewareData:x}=_W(g,s,{strategy:t.positionStrategy,placement:f,whileElementsMounted:(...D)=>cW(...D,{layoutShift:!t.disableUpdateOnLayoutShift,animationFrame:t.updatePositionStrategy==="always"}),middleware:m}),w=de(()=>Xx(b.value)[0]),S=de(()=>Xx(b.value)[1]);y3(()=>{_.value&&n("placed")});const T=de(()=>{var D;return((D=x.value.arrow)==null?void 0:D.centerOffset)!==0}),C=te("");Ta(()=>{o.value&&(C.value=window.getComputedStyle(o.value).zIndex)});const A=de(()=>{var D;return((D=x.value.arrow)==null?void 0:D.x)??0}),M=de(()=>{var D;return((D=x.value.arrow)==null?void 0:D.y)??0});return SW({placedSide:w,onArrowChange:D=>l.value=D,arrowX:A,arrowY:M,shouldHideArrow:T}),(D,E)=>{var L,I,R;return Y(),ae("div",{ref_key:"floatingRef",ref:s,"data-reka-popper-content-wrapper":"",style:Sa({...H(y),transform:H(_)?H(y).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:C.value,"--reka-popper-transform-origin":[(L=H(x).transformOrigin)==null?void 0:L.x,(I=H(x).transformOrigin)==null?void 0:I.y].join(" "),...((R=H(x).hide)==null?void 0:R.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[Ie(H(Fi),rr({ref:H(a)},D.$attrs,{"as-child":t.asChild,as:D.as,"data-side":w.value,"data-align":S.value,style:{animation:H(_)?void 0:"none"}}),{default:_e(()=>[Je(D.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),CW=TW;const AW={top:"bottom",right:"left",bottom:"top",left:"right"};var MW=Ke({inheritAttrs:!1,__name:"PopperArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(r){const{forwardRef:e}=nr(),t=wW(),n=de(()=>AW[t.placedSide.value]);return(i,a)=>{var o,s,l,u;return Y(),ae("span",{ref:c=>{H(t).onArrowChange(c)},style:Sa({position:"absolute",left:(o=H(t).arrowX)!=null&&o.value?`${(s=H(t).arrowX)==null?void 0:s.value}px`:void 0,top:(l=H(t).arrowY)!=null&&l.value?`${(u=H(t).arrowY)==null?void 0:u.value}px`:void 0,[n.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[H(t).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[H(t).placedSide.value],visibility:H(t).shouldHideArrow.value?"hidden":void 0})},[Ie(mG,rr(i.$attrs,{ref:H(e),style:{display:"block"},as:i.as,"as-child":i.asChild,rounded:i.rounded,width:i.width,height:i.height}),{default:_e(()=>[Je(i.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4)}}}),kW=MW,DW=Ke({__name:"TooltipArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(r){const e=r;return nr(),(t,n)=>(Y(),$e(H(kW),r0(n0(e)),{default:_e(()=>[Je(t.$slots,"default")]),_:3},16))}}),EW=DW;const[oT,LW]=cf("TooltipProvider");var IW=Ke({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{type:Number,required:!1,default:700},skipDelayDuration:{type:Number,required:!1,default:300},disableHoverableContent:{type:Boolean,required:!1,default:!1},disableClosingTrigger:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:!1}},setup(r){const e=r,{delayDuration:t,skipDelayDuration:n,disableHoverableContent:i,disableClosingTrigger:a,ignoreNonKeyboardFocus:o,disabled:s}=FS(e);nr();const l=te(!0),u=te(!1),{start:c,stop:f}=j3(()=>{l.value=!0},n,{immediate:!1});return LW({isOpenDelayed:l,delayDuration:t,onOpen(){f(),l.value=!1},onClose(){c()},isPointerInTransitRef:u,disableHoverableContent:i,disableClosingTrigger:a,disabled:s,ignoreNonKeyboardFocus:o}),(h,d)=>Je(h.$slots,"default")}}),PW=IW;const aN="tooltip.open",[c0,RW]=cf("TooltipRoot");var OW=Ke({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},delayDuration:{type:Number,required:!1,default:void 0},disableHoverableContent:{type:Boolean,required:!1,default:void 0},disableClosingTrigger:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(r,{emit:e}){const t=r,n=e;nr();const i=oT(),a=de(()=>t.disableHoverableContent??i.disableHoverableContent.value),o=de(()=>t.disableClosingTrigger??i.disableClosingTrigger.value),s=de(()=>t.disabled??i.disabled.value),l=de(()=>t.delayDuration??i.delayDuration.value),u=de(()=>t.ignoreNonKeyboardFocus??i.ignoreNonKeyboardFocus.value),c=N3(t,"open",n,{defaultValue:t.defaultOpen,passive:t.open===void 0});Nt(c,b=>{i.onClose&&(b?(i.onOpen(),document.dispatchEvent(new CustomEvent(aN))):i.onClose())});const f=te(!1),h=te(),d=de(()=>c.value?f.value?"delayed-open":"instant-open":"closed"),{start:p,stop:v}=j3(()=>{f.value=!0,c.value=!0},l,{immediate:!1});function m(){v(),f.value=!1,c.value=!0}function g(){v(),c.value=!1}function y(){p()}return RW({contentId:"",open:c,stateAttribute:d,trigger:h,onTriggerChange(b){h.value=b},onTriggerEnter(){i.isOpenDelayed.value?y():m()},onTriggerLeave(){a.value?g():v()},onOpen:m,onClose:g,disableHoverableContent:a,disableClosingTrigger:o,disabled:s,ignoreNonKeyboardFocus:u}),(b,_)=>(Y(),$e(H(cG),null,{default:_e(()=>[Je(b.$slots,"default",{open:H(c)})]),_:3}))}}),jW=OW,NW=Ke({__name:"TooltipContentImpl",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1,default:"top"},sideOffset:{type:Number,required:!1,default:0},align:{type:null,required:!1,default:"center"},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1,default:!0},collisionBoundary:{type:null,required:!1,default:()=>[]},collisionPadding:{type:[Number,Object],required:!1,default:0},arrowPadding:{type:Number,required:!1,default:0},sticky:{type:String,required:!1,default:"partial"},hideWhenDetached:{type:Boolean,required:!1,default:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(r,{emit:e}){const t=r,n=e,i=c0(),{forwardRef:a}=nr(),o=i0(),s=de(()=>{var c;return(c=o.default)==null?void 0:c.call(o,{})}),l=de(()=>{var h;if(t.ariaLabel)return t.ariaLabel;let c="";function f(d){typeof d.children=="string"&&d.type!==g3?c+=d.children:Array.isArray(d.children)&&d.children.forEach(p=>f(p))}return(h=s.value)==null||h.forEach(d=>f(d)),c}),u=de(()=>{const{ariaLabel:c,...f}=t;return f});return zi(()=>{lg(window,"scroll",c=>{const f=c.target;f!=null&&f.contains(i.trigger.value)&&i.onClose()}),lg(window,aN,i.onClose)}),(c,f)=>(Y(),$e(H($3),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:f[0]||(f[0]=h=>n("escapeKeyDown",h)),onPointerDownOutside:f[1]||(f[1]=h=>{var d;H(i).disableClosingTrigger.value&&((d=H(i).trigger.value)!=null&&d.contains(h.target))&&h.preventDefault(),n("pointerDownOutside",h)}),onFocusOutside:f[2]||(f[2]=At(()=>{},["prevent"])),onDismiss:f[3]||(f[3]=h=>H(i).onClose())},{default:_e(()=>[Ie(H(CW),rr({ref:H(a),"data-state":H(i).stateAttribute.value},{...c.$attrs,...u.value},{style:{"--reka-tooltip-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-tooltip-content-available-width":"var(--reka-popper-available-width)","--reka-tooltip-content-available-height":"var(--reka-popper-available-height)","--reka-tooltip-trigger-width":"var(--reka-popper-anchor-width)","--reka-tooltip-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:_e(()=>[Je(c.$slots,"default"),Ie(H(sG),{id:H(i).contentId,role:"tooltip"},{default:_e(()=>[Di(qt(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),oN=NW,BW=Ke({__name:"TooltipContentHoverable",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},setup(r){const t=z3(r),{forwardRef:n,currentElement:i}=nr(),{trigger:a,onClose:o}=c0(),s=oT(),{isPointerInTransit:l,onPointerExit:u}=s9(a,i);return s.isPointerInTransitRef=l,u(()=>{o()}),(c,f)=>(Y(),$e(oN,rr({ref:H(n)},H(t)),{default:_e(()=>[Je(c.$slots,"default")]),_:3},16))}}),zW=BW,FW=Ke({__name:"TooltipContent",props:{forceMount:{type:Boolean,required:!1},ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1,default:"top"},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(r,{emit:e}){const t=r,n=e,i=c0(),a=o9(t,n),{forwardRef:o}=nr();return(s,l)=>(Y(),$e(H(ZS),{present:s.forceMount||H(i).open.value},{default:_e(()=>[(Y(),$e(Bh(H(i).disableHoverableContent.value?oN:zW),rr({ref:H(o)},H(a)),{default:_e(()=>[Je(s.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),VW=FW,$W=Ke({__name:"TooltipPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(r){const e=r;return(t,n)=>(Y(),$e(H(U3),r0(n0(e)),{default:_e(()=>[Je(t.$slots,"default")]),_:3},16))}}),HW=$W,GW=Ke({__name:"TooltipTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const e=r,t=c0(),n=oT();t.contentId||(t.contentId=qx(void 0,"reka-tooltip-content"));const{forwardRef:i,currentElement:a}=nr(),o=te(!1),s=te(!1),l=de(()=>t.disabled.value?{}:{click:v,focus:d,pointermove:f,pointerleave:h,pointerdown:c,blur:p});zi(()=>{t.onTriggerChange(a.value)});function u(){setTimeout(()=>{o.value=!1},1)}function c(){t.open&&!t.disableClosingTrigger.value&&t.onClose(),o.value=!0,document.addEventListener("pointerup",u,{once:!0})}function f(m){m.pointerType!=="touch"&&!s.value&&!n.isPointerInTransitRef.value&&(t.onTriggerEnter(),s.value=!0)}function h(){t.onTriggerLeave(),s.value=!1}function d(m){var g,y;o.value||t.ignoreNonKeyboardFocus.value&&!((y=(g=m.target).matches)!=null&&y.call(g,":focus-visible"))||t.onOpen()}function p(){t.onClose()}function v(){t.disableClosingTrigger.value||t.onClose()}return(m,g)=>(Y(),$e(H(hG),{"as-child":"",reference:m.reference},{default:_e(()=>[Ie(H(Fi),rr({ref:H(i),"aria-describedby":H(t).open.value?H(t).contentId:void 0,"data-state":H(t).stateAttribute.value,as:m.as,"as-child":e.asChild,"data-grace-area-trigger":""},AH(l.value)),{default:_e(()=>[Je(m.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),WW=GW;const UW={class:"rounded bg-surface-gray-7 px-2 py-1 text-xs text-ink-white shadow-xl"},Ci=Ke({inheritAttrs:!1,__name:"Tooltip",props:{text:{default:""},hoverDelay:{default:.5},placement:{default:"top"},arrowClass:{default:"fill-surface-gray-7"},disabled:{type:Boolean,default:!1}},setup(r){const e=r,t=de(()=>e.hoverDelay*1e3);return(n,i)=>n.disabled?Je(n.$slots,"default",{key:0}):(Y(),$e(H(PW),{key:1,delayDuration:t.value},{default:_e(()=>[Ie(H(jW),null,{default:_e(()=>[Ie(H(WW),{"as-child":""},{default:_e(()=>[Je(n.$slots,"default")]),_:3}),Ie(H(HW),null,{default:_e(()=>[e.text||n.$slots.body?(Y(),$e(H(VW),{key:0,side:e.placement,"side-offset":4,class:"z-[100]"},{default:_e(()=>[Je(n.$slots,"body",{},()=>[Z("div",UW,[Z("div",null,qt(e.text),1)])]),Ie(H(EW),{class:kt(e.arrowClass),width:8,height:4},null,8,["class"])]),_:3},8,["side"])):ct("",!0)]),_:3})]),_:3})]),_:3},8,["delayDuration"]))}}),YW=["disabled","ariaLabel"],ui=Ke({__name:"Button",props:{theme:{default:"gray"},size:{default:"sm"},variant:{default:"subtle"},label:{},icon:{},iconLeft:{},iconRight:{},tooltip:{},loading:{type:Boolean,default:!1},loadingText:{},disabled:{type:Boolean,default:!1},route:{},link:{}},setup(r){const e=r,t=i0(),n=MH(),i=de(()=>{let c={gray:"text-ink-white bg-surface-gray-7 hover:bg-surface-gray-6 active:bg-surface-gray-5",blue:"text-ink-white bg-blue-500 hover:bg-surface-blue-3 active:bg-blue-700",green:"text-ink-white bg-surface-green-3 hover:bg-green-700 active:bg-green-800",red:"text-ink-white bg-surface-red-5 hover:bg-surface-red-6 active:bg-surface-red-7"}[e.theme],f={gray:"text-ink-gray-8 bg-surface-gray-2 hover:bg-surface-gray-3 active:bg-surface-gray-4",blue:"text-ink-blue-3 bg-surface-blue-2 hover:bg-blue-200 active:bg-blue-300",green:"text-green-800 bg-surface-green-2 hover:bg-green-200 active:bg-green-300",red:"text-red-700 bg-surface-red-2 hover:bg-surface-red-3 active:bg-surface-red-4"}[e.theme],h={gray:"text-ink-gray-8 bg-surface-white bg-surface-white border border-outline-gray-2 hover:border-outline-gray-3 active:border-outline-gray-3 active:bg-surface-gray-4",blue:"text-ink-blue-3 bg-surface-white border border-outline-blue-1 hover:border-blue-400 active:border-blue-400 active:bg-blue-300",green:"text-green-800 bg-surface-white border border-outline-green-2 hover:border-green-500 active:border-green-500 active:bg-green-300",red:"text-red-700 bg-surface-white border border-outline-red-1 hover:border-outline-red-2 active:border-outline-red-2 active:bg-surface-red-3"}[e.theme],d={gray:"text-ink-gray-8 bg-transparent hover:bg-surface-gray-3 active:bg-surface-gray-4",blue:"text-ink-blue-3 bg-transparent hover:bg-blue-200 active:bg-blue-300",green:"text-green-800 bg-transparent hover:bg-green-200 active:bg-green-300",red:"text-red-700 bg-transparent hover:bg-surface-red-3 active:bg-surface-red-4"}[e.theme],p={gray:"focus-visible:ring focus-visible:ring-outline-gray-3",blue:"focus-visible:ring focus-visible:ring-blue-400",green:"focus-visible:ring focus-visible:ring-outline-green-2",red:"focus-visible:ring focus-visible:ring-outline-red-2"}[e.theme],v={subtle:f,solid:c,outline:h,ghost:d}[e.variant],m=`${e.theme}-${e.variant}`,y={"gray-solid":"bg-surface-gray-2 text-ink-gray-4","gray-subtle":"bg-surface-gray-2 text-ink-gray-4","gray-outline":"bg-surface-gray-2 text-ink-gray-4 border border-outline-gray-2","gray-ghost":"text-ink-gray-4","blue-solid":"bg-blue-300 text-ink-white","blue-subtle":"bg-surface-blue-2 text-ink-blue-link","blue-outline":"bg-surface-blue-2 text-ink-blue-link border border-outline-blue-1","blue-ghost":"text-ink-blue-link","green-solid":"bg-surface-green-2 text-ink-green-2","green-subtle":"bg-surface-green-2 text-ink-green-2","green-outline":"bg-surface-green-2 text-ink-green-2 border border-outline-green-2","green-ghost":"text-ink-green-2","red-solid":"bg-surface-red-2 text-ink-red-2","red-subtle":"bg-surface-red-2 text-ink-red-2","red-outline":"bg-surface-red-2 text-ink-red-2 border border-outline-red-1","red-ghost":"text-ink-red-2"}[m],b={sm:"h-7 text-base px-2 rounded",md:"h-8 text-base font-medium px-2.5 rounded",lg:"h-10 text-lg font-medium px-3 rounded-md",xl:"h-11.5 text-xl font-medium px-3.5 rounded-lg","2xl":"h-13 text-2xl font-medium px-3.5 rounded-xl"}[e.size];return l.value&&(b={sm:"h-7 w-7 rounded",md:"h-8 w-8 rounded",lg:"h-10 w-10 rounded-md",xl:"h-11.5 w-11.5 rounded-lg","2xl":"h-13 w-13 rounded-xl"}[e.size]),["inline-flex items-center justify-center gap-2 transition-colors focus:outline-none",o.value?y:v,p,b]}),a=de(()=>({sm:"h-4",md:"h-4.5",lg:"h-5",xl:"h-6","2xl":"h-6"})[e.size]),o=de(()=>e.disabled||e.loading),s=de(()=>l.value?e.label:null),l=de(()=>e.icon||t.icon),u=()=>{if(e.route)return n.push(e.route);if(e.link)return window.open(e.link,"_blank")};return(c,f)=>{var h;return Y(),$e(Ci,{text:c.tooltip,disabled:!((h=c.tooltip)!=null&&h.length)},{default:_e(()=>[Z("button",rr(c.$attrs,{class:i.value,onClick:u,disabled:o.value,ariaLabel:s.value}),[c.loading?(Y(),$e(R3,{key:0,class:kt({"h-3 w-3":c.size=="sm","h-[13.5px] w-[13.5px]":c.size=="md","h-[15px] w-[15px]":c.size=="lg","h-4.5 w-4.5":c.size=="xl"||c.size=="2xl"})},null,8,["class"])):c.$slots.prefix||c.iconLeft?Je(c.$slots,"prefix",{key:1},()=>[c.iconLeft&&typeof c.iconLeft=="string"?(Y(),$e(xm,{key:0,name:c.iconLeft,class:kt(a.value),"aria-hidden":"true"},null,8,["name","class"])):c.iconLeft?(Y(),$e(Bh(c.iconLeft),{key:1,class:kt(a.value)},null,8,["class"])):ct("",!0)]):ct("",!0),c.loading&&c.loadingText?(Y(),ae(oi,{key:2},[Di(qt(c.loadingText),1)],64)):l.value&&!c.loading?(Y(),ae(oi,{key:3},[c.icon&&typeof c.icon=="string"?(Y(),$e(xm,{key:0,name:c.icon,class:kt(a.value),"aria-label":c.label},null,8,["name","class","aria-label"])):c.icon?(Y(),$e(Bh(c.icon),{key:1,class:kt(a.value)},null,8,["class"])):c.$slots.icon?Je(c.$slots,"icon",{key:2}):ct("",!0)],64)):(Y(),ae("span",{key:4,class:kt([{"sr-only":l.value},"truncate"])},[Je(c.$slots,"default",{},()=>[Di(qt(c.label),1)])],2)),Je(c.$slots,"suffix",{},()=>[c.iconRight&&typeof c.iconRight=="string"?(Y(),$e(xm,{key:0,name:c.iconRight,class:kt(a.value),"aria-hidden":"true"},null,8,["name","class"])):c.iconRight?(Y(),$e(Bh(c.iconRight),{key:1,class:kt(a.value)},null,8,["class"])):ct("",!0)])],16,YW)]),_:3},8,["text","disabled"])}}});function sN(r){return BS()?(zS(r),!0):!1}function E1(){const r=new Set,e=i=>{r.delete(i)};return{on:i=>{r.add(i);const a=()=>e(i);return sN(a),{off:a}},off:e,trigger:(...i)=>Promise.all(Array.from(r).map(a=>a(...i)))}}function la(r){return typeof r=="function"?r():H(r)}const lN=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const qW=()=>{};function QM(r,e=!1,t="Timeout"){return new Promise((n,i)=>{setTimeout(e?()=>i(t):n,r)})}function XW(r,...e){return e.some(t=>t in r)}function L1(...r){if(r.length!==1)return ag(...r);const e=r[0];return typeof e=="function"?lo(p3(()=>({get:e,set:qW}))):te(e)}function ew(r,e=!1){function t(f,{flush:h="sync",deep:d=!1,timeout:p,throwOnTimeout:v}={}){let m=null;const y=[new Promise(b=>{m=Nt(r,_=>{f(_)!==e&&(m==null||m(),b(_))},{flush:h,deep:d,immediate:!0})})];return p!=null&&y.push(QM(p,v).then(()=>la(r)).finally(()=>m==null?void 0:m())),Promise.race(y)}function n(f,h){if(!b3(f))return t(_=>_===f,h);const{flush:d="sync",deep:p=!1,timeout:v,throwOnTimeout:m}=h??{};let g=null;const b=[new Promise(_=>{g=Nt([r,f],([x,w])=>{e!==(x===w)&&(g==null||g(),_(x))},{flush:d,deep:p,immediate:!0})})];return v!=null&&b.push(QM(v,m).then(()=>la(r)).finally(()=>(g==null||g(),la(r)))),Promise.race(b)}function i(f){return t(h=>!!h,f)}function a(f){return n(null,f)}function o(f){return n(void 0,f)}function s(f){return t(Number.isNaN,f)}function l(f,h){return t(d=>{const p=Array.from(d);return p.includes(f)||p.includes(la(f))},h)}function u(f){return c(1,f)}function c(f=1,h){let d=-1;return t(()=>(d+=1,d>=f),h)}return Array.isArray(la(r))?{toMatch:t,toContains:l,changed:u,changedTimes:c,get not(){return ew(r,!e)}}:{toMatch:t,toBe:n,toBeTruthy:i,toBeNull:a,toBeNaN:s,toBeUndefined:o,changed:u,changedTimes:c,get not(){return ew(r,!e)}}}function KW(r){return ew(r)}function ZW(r,e,t={}){const{immediate:n=!0}=t,i=te(!1);let a=null;function o(){a&&(clearTimeout(a),a=null)}function s(){i.value=!1,o()}function l(...u){o(),i.value=!0,a=setTimeout(()=>{i.value=!1,a=null,r(...u)},la(e))}return n&&(i.value=!0,lN&&l()),sN(s),{isPending:lo(i),start:l,stop:s}}const JW=lN?window:void 0,QW={json:"application/json",text:"text/plain"};function hg(r){return r&&XW(r,"immediate","refetch","initialData","timeout","beforeFetch","afterFetch","onFetchError","fetch","updateDataOnError")}const eU=/^(?:[a-z][a-z\d+\-.]*:)?\/\//i;function tU(r){return eU.test(r)}function Vh(r){return typeof Headers<"u"&&r instanceof Headers?Object.fromEntries(r.entries()):r}function Hu(r,...e){return r==="overwrite"?async t=>{const n=e[e.length-1];return n?{...t,...await n(t)}:t}:async t=>{for(const n of e)n&&(t={...t,...await n(t)});return t}}function rU(r={}){const e=r.combination||"chain",t=r.options||{},n=r.fetchOptions||{};function i(a,...o){const s=de(()=>{const c=la(r.baseUrl),f=la(a);return c&&!tU(f)?iU(c,f):f});let l=t,u=n;return o.length>0&&(hg(o[0])?l={...l,...o[0],beforeFetch:Hu(e,t.beforeFetch,o[0].beforeFetch),afterFetch:Hu(e,t.afterFetch,o[0].afterFetch),onFetchError:Hu(e,t.onFetchError,o[0].onFetchError)}:u={...u,...o[0],headers:{...Vh(u.headers)||{},...Vh(o[0].headers)||{}}}),o.length>1&&hg(o[1])&&(l={...l,...o[1],beforeFetch:Hu(e,t.beforeFetch,o[1].beforeFetch),afterFetch:Hu(e,t.afterFetch,o[1].afterFetch),onFetchError:Hu(e,t.onFetchError,o[1].onFetchError)}),nU(s,u,l)}return i}function nU(r,...e){var t;const n=typeof AbortController=="function";let i={},a={immediate:!0,refetch:!1,timeout:0,updateDataOnError:!1};const o={method:"GET",type:"text",payload:void 0};e.length>0&&(hg(e[0])?a={...a,...e[0]}:i=e[0]),e.length>1&&hg(e[1])&&(a={...a,...e[1]});const{fetch:s=(t=JW)==null?void 0:t.fetch,initialData:l,timeout:u}=a,c=E1(),f=E1(),h=E1(),d=te(!1),p=te(!1),v=te(!1),m=te(null),g=zl(null),y=zl(null),b=zl(l||null),_=de(()=>n&&p.value);let x,w;const S=()=>{n&&(x==null||x.abort(),x=new AbortController,x.signal.onabort=()=>v.value=!0,i={...i,signal:x.signal})},T=R=>{p.value=R,d.value=!R};u&&(w=ZW(S,u,{immediate:!1}));let C=0;const A=async(R=!1)=>{var P,O;S(),T(!0),y.value=null,m.value=null,v.value=!1,C+=1;const j=C,F={method:o.method,headers:{}};if(o.payload){const J=Vh(F.headers),U=la(o.payload);!o.payloadType&&U&&Object.getPrototypeOf(U)===Object.prototype&&!(U instanceof FormData)&&(o.payloadType="json"),o.payloadType&&(J["Content-Type"]=(P=QW[o.payloadType])!=null?P:o.payloadType),F.body=o.payloadType==="json"?JSON.stringify(U):U}let N=!1;const B={url:la(r),options:{...F,...i},cancel:()=>{N=!0}};if(a.beforeFetch&&Object.assign(B,await a.beforeFetch(B)),N||!s)return T(!1),Promise.resolve(null);let $=null;return w&&w.start(),s(B.url,{...F,...B.options,headers:{...Vh(F.headers),...Vh((O=B.options)==null?void 0:O.headers)}}).then(async J=>{if(g.value=J,m.value=J.status,$=await J.clone()[o.type](),!J.ok)throw b.value=l||null,new Error(J.statusText);return a.afterFetch&&({data:$}=await a.afterFetch({data:$,response:J})),b.value=$,c.trigger(J),J}).catch(async J=>{let U=J.message||J.name;if(a.onFetchError&&({error:U,data:$}=await a.onFetchError({data:$,error:J,response:g.value})),y.value=U,a.updateDataOnError&&(b.value=$),f.trigger(J),R)throw J;return null}).finally(()=>{j===C&&T(!1),w&&w.stop(),h.trigger(null)})},M=L1(a.refetch);Nt([M,L1(r)],([R])=>R&&A(),{deep:!0});const D={isFinished:lo(d),isFetching:lo(p),statusCode:m,response:g,error:y,data:b,canAbort:_,aborted:v,abort:S,execute:A,onFetchResponse:c.on,onFetchError:f.on,onFetchFinally:h.on,get:E("GET"),put:E("PUT"),post:E("POST"),delete:E("DELETE"),patch:E("PATCH"),head:E("HEAD"),options:E("OPTIONS"),json:I("json"),text:I("text"),blob:I("blob"),arrayBuffer:I("arrayBuffer"),formData:I("formData")};function E(R){return(P,O)=>{if(!p.value)return o.method=R,o.payload=P,o.payloadType=O,b3(o.payload)&&Nt([M,L1(o.payload)],([j])=>j&&A(),{deep:!0}),{...D,then(j,F){return L().then(j,F)}}}}function L(){return new Promise((R,P)=>{KW(d).toBe(!0).then(()=>R(D)).catch(O=>P(O))})}function I(R){return()=>{if(!p.value)return o.type=R,{...D,then(P,O){return L().then(P,O)}}}}return a.immediate&&Promise.resolve().then(()=>A()),{...D,then(R,P){return L().then(R,P)}}}function iU(r,e){return!r.endsWith("/")&&!e.startsWith("/")?`${r}/${e}`:`${r}${e}`}const aU={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function oU(r,e){return Y(),ae("svg",aU,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)]))}const sU=vt({name:"lucide-check",render:oU}),lU={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function uU(r,e){return Y(),ae("svg",lU,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m6 9l6 6l6-6"},null,-1)]))}vt({name:"lucide-chevron-down",render:uU});function cU(r,e,t){var n;return function(){var i=this,a=arguments,o=function(){n=void 0,r.apply(i,a)};clearTimeout(n),n=window.setTimeout(o,e)}}const fU=["type","placeholder","disabled","id","value","required"],hU=Ke({inheritAttrs:!1,__name:"TextInput",props:{type:{default:"text"},size:{default:"sm"},variant:{default:"subtle"},placeholder:{},disabled:{type:Boolean},id:{},modelValue:{},debounce:{},required:{type:Boolean}},emits:["update:modelValue"],setup(r,{expose:e,emit:t}){const n=r,i=t,a=i0(),o=_3(),s=de(()=>Object.fromEntries(Object.entries(o).filter(([v])=>v!=="class"&&v!=="style"))),l=te(null);e({el:l});const u=de(()=>n.disabled?"text-ink-gray-5":"text-ink-gray-8"),c=de(()=>{let v={sm:"text-base rounded h-7",md:"text-base rounded h-8",lg:"text-lg rounded-md h-10",xl:"text-xl rounded-md h-10"}[n.size],m={sm:["py-1.5",a.prefix?"pl-8":"pl-2",a.suffix?"pr-8":"pr-2"],md:["py-1.5",a.prefix?"pl-9":"pl-2.5",a.suffix?"pr-9":"pr-2.5"],lg:["py-1.5",a.prefix?"pl-10":"pl-3",a.suffix?"pr-10":"pr-3"],xl:["py-1.5",a.prefix?"pl-10":"pl-3",a.suffix?"pr-10":"pr-3"]}[n.size],g=n.disabled?"disabled":n.variant,y={subtle:"border border-[--surface-gray-2] bg-surface-gray-2 placeholder-ink-gray-4 hover:border-outline-gray-modals hover:bg-surface-gray-3 focus:bg-surface-white focus:border-outline-gray-4 focus:shadow-sm focus:ring-0 focus-visible:ring-2 focus-visible:ring-outline-gray-3",outline:"border border-outline-gray-2 bg-surface-white placeholder-ink-gray-4 hover:border-outline-gray-3 hover:shadow-sm focus:bg-surface-white focus:border-outline-gray-4 focus:shadow-sm focus:ring-0 focus-visible:ring-2 focus-visible:ring-outline-gray-3",disabled:["border bg-surface-gray-1 placeholder-ink-gray-3",n.variant==="outline"?"border-outline-gray-2":"border-transparent"]}[g];return[v,m,y,u.value,"transition-colors w-full dark:[color-scheme:dark]"]});let f=de(()=>({sm:"pl-2",md:"pl-2.5",lg:"pl-3",xl:"pl-3"})[n.size]),h=de(()=>({sm:"pr-2",md:"pr-2.5",lg:"pr-3",xl:"pr-3"})[n.size]),d=v=>{i("update:modelValue",v)};n.debounce&&(d=cU(d,n.debounce));let p=v=>{d(v.target.value)};return(v,m)=>(Y(),ae("div",{class:kt(["relative flex items-center",H(o).class]),style:Sa(H(o).style)},[v.$slots.prefix?(Y(),ae("div",{key:0,class:kt(["absolute inset-y-0 left-0 flex items-center",u.value,H(f)])},[Je(v.$slots,"prefix")],2)):ct("",!0),Z("input",rr({ref_key:"inputRef",ref:l,type:v.type,placeholder:v.placeholder,class:c.value,disabled:v.disabled,id:v.id,value:v.modelValue,required:v.required,onInput:m[0]||(m[0]=(...g)=>H(p)&&H(p)(...g)),onChange:m[1]||(m[1]=(...g)=>H(p)&&H(p)(...g))},s.value),null,16,fU),v.$slots.suffix?(Y(),ae("div",{key:1,class:kt(["absolute inset-y-0 right-0 flex items-center",u.value,H(h)])},[Je(v.$slots,"suffix")],2)):ct("",!0)],6))}});var uN=60,cN=uN*60,fN=cN*24,dU=fN*7,bo=1e3,Vl=uN*bo,_d=cN*bo,xd=fN*bo,hN=dU*bo,f0="millisecond",Ml="second",ha="minute",kl="hour",to="day",wm="week",ti="month",dN="quarter",ro="year",Mc="date",sT="YYYY-MM-DDTHH:mm:ssZ",ek="Invalid Date",pU=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,pN=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;const vU={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}};var tw=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},mU=function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),a=n%60;return(t<=0?"+":"-")+tw(i,2,"0")+":"+tw(a,2,"0")},gU=function r(e,t){if(e.date()<t.date())return-r(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),i=e.clone().add(n,ti),a=t-i<0,o=e.clone().add(n+(a?-1:1),ti);return+(-(n+(t-i)/(a?i-o:o-i))||0)},yU=function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},bU=function(e){var t={M:ti,y:ro,w:wm,d:to,D:Mc,h:kl,m:ha,s:Ml,ms:f0,Q:dN};return t[e]||String(e||"").toLowerCase().replace(/s$/,"")},_U=function(e){return e===void 0};const xU={s:tw,z:mU,m:gU,a:yU,p:bU,u:_U};var $h="en",$l={};$l[$h]=vU;var vN="$isDayjsObject",lT=function(e){return e instanceof h0||!!(e&&e[vN])},dg=function r(e,t,n){var i;if(!e)return $h;if(typeof e=="string"){var a=e.toLowerCase();$l[a]&&(i=a),t&&($l[a]=t,i=a);var o=e.split("-");if(!i&&o.length>1)return r(o[0])}else{var s=e.name;$l[s]=e,i=s}return!n&&i&&($h=i),i||!n&&$h},Vt=function(e,t){if(lT(e))return e.clone();var n=typeof t=="object"?t:{};return n.date=e,n.args=arguments,new h0(n)},wU=function(e,t){return Vt(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})},Pt=xU;Pt.l=dg;Pt.i=lT;Pt.w=wU;var SU=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(Pt.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t=="string"&&!/Z$/i.test(t)){var i=t.match(pU);if(i){var a=i[2]-1||0,o=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)):new Date(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)}}return new Date(t)},h0=function(){function r(t){this.$L=dg(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[vN]=!0}var e=r.prototype;return e.parse=function(n){this.$d=SU(n),this.init()},e.init=function(){var n=this.$d;this.$y=n.getFullYear(),this.$M=n.getMonth(),this.$D=n.getDate(),this.$W=n.getDay(),this.$H=n.getHours(),this.$m=n.getMinutes(),this.$s=n.getSeconds(),this.$ms=n.getMilliseconds()},e.$utils=function(){return Pt},e.isValid=function(){return this.$d.toString()!==ek},e.isSame=function(n,i){var a=Vt(n);return this.startOf(i)<=a&&a<=this.endOf(i)},e.isAfter=function(n,i){return Vt(n)<this.startOf(i)},e.isBefore=function(n,i){return this.endOf(i)<Vt(n)},e.$g=function(n,i,a){return Pt.u(n)?this[i]:this.set(a,n)},e.unix=function(){return Math.floor(this.valueOf()/1e3)},e.valueOf=function(){return this.$d.getTime()},e.startOf=function(n,i){var a=this,o=Pt.u(i)?!0:i,s=Pt.p(n),l=function(g,y){var b=Pt.w(a.$u?Date.UTC(a.$y,y,g):new Date(a.$y,y,g),a);return o?b:b.endOf(to)},u=function(g,y){var b=[0,0,0,0],_=[23,59,59,999];return Pt.w(a.toDate()[g].apply(a.toDate("s"),(o?b:_).slice(y)),a)},c=this.$W,f=this.$M,h=this.$D,d="set"+(this.$u?"UTC":"");switch(s){case ro:return o?l(1,0):l(31,11);case ti:return o?l(1,f):l(0,f+1);case wm:{var p=this.$locale().weekStart||0,v=(c<p?c+7:c)-p;return l(o?h-v:h+(6-v),f)}case to:case Mc:return u(d+"Hours",0);case kl:return u(d+"Minutes",1);case ha:return u(d+"Seconds",2);case Ml:return u(d+"Milliseconds",3);default:return this.clone()}},e.endOf=function(n){return this.startOf(n,!1)},e.$set=function(n,i){var a,o=Pt.p(n),s="set"+(this.$u?"UTC":""),l=(a={},a[to]=s+"Date",a[Mc]=s+"Date",a[ti]=s+"Month",a[ro]=s+"FullYear",a[kl]=s+"Hours",a[ha]=s+"Minutes",a[Ml]=s+"Seconds",a[f0]=s+"Milliseconds",a)[o],u=o===to?this.$D+(i-this.$W):i;if(o===ti||o===ro){var c=this.clone().set(Mc,1);c.$d[l](u),c.init(),this.$d=c.set(Mc,Math.min(this.$D,c.daysInMonth())).$d}else l&&this.$d[l](u);return this.init(),this},e.set=function(n,i){return this.clone().$set(n,i)},e.get=function(n){return this[Pt.p(n)]()},e.add=function(n,i){var a=this,o;n=Number(n);var s=Pt.p(i),l=function(h){var d=Vt(a);return Pt.w(d.date(d.date()+Math.round(h*n)),a)};if(s===ti)return this.set(ti,this.$M+n);if(s===ro)return this.set(ro,this.$y+n);if(s===to)return l(1);if(s===wm)return l(7);var u=(o={},o[ha]=Vl,o[kl]=_d,o[Ml]=bo,o)[s]||1,c=this.$d.getTime()+n*u;return Pt.w(c,this)},e.subtract=function(n,i){return this.add(n*-1,i)},e.format=function(n){var i=this,a=this.$locale();if(!this.isValid())return a.invalidDate||ek;var o=n||sT,s=Pt.z(this),l=this.$H,u=this.$m,c=this.$M,f=a.weekdays,h=a.months,d=a.meridiem,p=function(b,_,x,w){return b&&(b[_]||b(i,o))||x[_].slice(0,w)},v=function(b){return Pt.s(l%12||12,b,"0")},m=d||function(y,b,_){var x=y<12?"AM":"PM";return _?x.toLowerCase():x},g=function(b){switch(b){case"YY":return String(i.$y).slice(-2);case"YYYY":return Pt.s(i.$y,4,"0");case"M":return c+1;case"MM":return Pt.s(c+1,2,"0");case"MMM":return p(a.monthsShort,c,h,3);case"MMMM":return p(h,c);case"D":return i.$D;case"DD":return Pt.s(i.$D,2,"0");case"d":return String(i.$W);case"dd":return p(a.weekdaysMin,i.$W,f,2);case"ddd":return p(a.weekdaysShort,i.$W,f,3);case"dddd":return f[i.$W];case"H":return String(l);case"HH":return Pt.s(l,2,"0");case"h":return v(1);case"hh":return v(2);case"a":return m(l,u,!0);case"A":return m(l,u,!1);case"m":return String(u);case"mm":return Pt.s(u,2,"0");case"s":return String(i.$s);case"ss":return Pt.s(i.$s,2,"0");case"SSS":return Pt.s(i.$ms,3,"0");case"Z":return s}return null};return o.replace(pN,function(y,b){return b||g(y)||s.replace(":","")})},e.utcOffset=function(){return-Math.round(this.$d.getTimezoneOffset()/15)*15},e.diff=function(n,i,a){var o=this,s=Pt.p(i),l=Vt(n),u=(l.utcOffset()-this.utcOffset())*Vl,c=this-l,f=function(){return Pt.m(o,l)},h;switch(s){case ro:h=f()/12;break;case ti:h=f();break;case dN:h=f()/3;break;case wm:h=(c-u)/hN;break;case to:h=(c-u)/xd;break;case kl:h=c/_d;break;case ha:h=c/Vl;break;case Ml:h=c/bo;break;default:h=c;break}return a?h:Pt.a(h)},e.daysInMonth=function(){return this.endOf(ti).$D},e.$locale=function(){return $l[this.$L]},e.locale=function(n,i){if(!n)return this.$L;var a=this.clone(),o=dg(n,i,!0);return o&&(a.$L=o),a},e.clone=function(){return Pt.w(this.$d,this)},e.toDate=function(){return new Date(this.valueOf())},e.toJSON=function(){return this.isValid()?this.toISOString():null},e.toISOString=function(){return this.$d.toISOString()},e.toString=function(){return this.$d.toUTCString()},r}(),mN=h0.prototype;Vt.prototype=mN;[["$ms",f0],["$s",Ml],["$m",ha],["$H",kl],["$W",to],["$M",ti],["$y",ro],["$D",Mc]].forEach(function(r){mN[r[1]]=function(e){return this.$g(e,r[0],r[1])}});Vt.extend=function(r,e){return r.$i||(r(e,h0,Vt),r.$i=!0),Vt};Vt.locale=dg;Vt.isDayjs=lT;Vt.unix=function(r){return Vt(r*1e3)};Vt.en=$l[$h];Vt.Ls=$l;Vt.p={};const TU=function(r,e,t){r=r||{};var n=e.prototype,i={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};t.en.relativeTime=i,n.fromToBase=function(s,l,u,c,f){for(var h=u.$locale().relativeTime||i,d=r.thresholds||[{l:"s",r:44,d:Ml},{l:"m",r:89},{l:"mm",r:44,d:ha},{l:"h",r:89},{l:"hh",r:21,d:kl},{l:"d",r:35},{l:"dd",r:25,d:to},{l:"M",r:45},{l:"MM",r:10,d:ti},{l:"y",r:17},{l:"yy",d:ro}],p=d.length,v,m,g,y=0;y<p;y+=1){var b=d[y];b.d&&(v=c?t(s).diff(u,b.d,!0):u.diff(s,b.d,!0));var _=(r.rounding||Math.round)(Math.abs(v));if(g=v>0,_<=b.r||!b.r){_<=1&&y>0&&(b=d[y-1]);var x=h[b.l];f&&(_=f(""+_)),typeof x=="string"?m=x.replace("%d",_):m=x(_,l,b.l,g);break}}if(l)return m;var w=g?h.future:h.past;return typeof w=="function"?w(m):w.replace("%s",m)};function a(s,l,u,c){return n.fromToBase(s,l,u,c)}n.to=function(s,l){return a(s,l,this,!0)},n.from=function(s,l){return a(s,l,this)};var o=function(l){return l.$u?t.utc():t()};n.toNow=function(s){return this.to(o(this),s)},n.fromNow=function(s){return this.from(o(this),s)}};var CU=function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(t,n,i){return n||i.slice(1)})},gN={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},AU=function(e,t){return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(n,i,a){var o=a&&a.toUpperCase();return i||t[a]||gN[a]||CU(t[o])})};const MU=function(r,e,t){var n=e.prototype,i=n.format;t.en.formats=gN,n.format=function(a){a===void 0&&(a=sT);var o=this.$locale(),s=o.formats,l=s===void 0?{}:s,u=AU(a,l);return i.call(this,u)}},kU=function(r,e,t){t.updateLocale=function(n,i){var a=t.Ls,o=a[n];if(o){var s=i?Object.keys(i):[];return s.forEach(function(l){o[l]=i[l]}),o}}},DU=function(r,e,t){var n=e.prototype;n.isToday=function(){var i="YYYY-MM-DD",a=t();return this.format(i)===a.format(i)}};var pg=xd*365,rw=pg/12,EU=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,Of={years:pg,months:rw,days:xd,hours:_d,minutes:Vl,seconds:bo,milliseconds:1,weeks:hN},Sm=function(e){return e instanceof _N},yN,ra,xh=function(e,t,n){return new _N(e,n,t.$l)},jf=function(e){return ra.p(e)+"s"},bN=function(e){return e<0},Hs=function(e){return bN(e)?Math.ceil(e):Math.floor(e)},LU=function(e){return Math.abs(e)},Gu=function(e,t){return e?bN(e)?{negative:!0,format:""+LU(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},_N=function(){function r(t,n,i){var a=this;if(this.$d={},this.$l=i,t===void 0&&(this.$ms=0,this.parseFromMilliseconds()),n)return xh(t*Of[jf(n)],this);if(typeof t=="number")return this.$ms=t,this.parseFromMilliseconds(),this;if(typeof t=="object")return Object.keys(t).forEach(function(u){a.$d[jf(u)]=t[u]}),this.calMilliseconds(),this;if(typeof t=="string"){var o=t.match(EU);if(o){var s=o.slice(2),l=s.map(function(u){return u!=null?Number(u):0});return this.$d.years=l[0],this.$d.months=l[1],this.$d.weeks=l[2],this.$d.days=l[3],this.$d.hours=l[4],this.$d.minutes=l[5],this.$d.seconds=l[6],this.calMilliseconds(),this}}return this}var e=r.prototype;return e.calMilliseconds=function(){var n=this;this.$ms=Object.keys(this.$d).reduce(function(i,a){return i+(n.$d[a]||0)*Of[a]},0)},e.parseFromMilliseconds=function(){var n=this.$ms;this.$d.years=Hs(n/pg),n%=pg,this.$d.months=Hs(n/rw),n%=rw,this.$d.days=Hs(n/xd),n%=xd,this.$d.hours=Hs(n/_d),n%=_d,this.$d.minutes=Hs(n/Vl),n%=Vl,this.$d.seconds=Hs(n/bo),n%=bo,this.$d.milliseconds=n},e.toISOString=function(){var n=Gu(this.$d.years,"Y"),i=Gu(this.$d.months,"M"),a=+this.$d.days||0;this.$d.weeks&&(a+=this.$d.weeks*7);var o=Gu(a,"D"),s=Gu(this.$d.hours,"H"),l=Gu(this.$d.minutes,"M"),u=this.$d.seconds||0;this.$d.milliseconds&&(u+=this.$d.milliseconds/1e3,u=Math.round(u*1e3)/1e3);var c=Gu(u,"S"),f=n.negative||i.negative||o.negative||s.negative||l.negative||c.negative,h=s.format||l.format||c.format?"T":"",d=f?"-":"",p=d+"P"+n.format+i.format+o.format+h+s.format+l.format+c.format;return p==="P"||p==="-P"?"P0D":p},e.toJSON=function(){return this.toISOString()},e.format=function(n){var i=n||"YYYY-MM-DDTHH:mm:ss",a={Y:this.$d.years,YY:ra.s(this.$d.years,2,"0"),YYYY:ra.s(this.$d.years,4,"0"),M:this.$d.months,MM:ra.s(this.$d.months,2,"0"),D:this.$d.days,DD:ra.s(this.$d.days,2,"0"),H:this.$d.hours,HH:ra.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:ra.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:ra.s(this.$d.seconds,2,"0"),SSS:ra.s(this.$d.milliseconds,3,"0")};return i.replace(pN,function(o,s){return s||String(a[o])})},e.as=function(n){return this.$ms/Of[jf(n)]},e.get=function(n){var i=this.$ms,a=jf(n);return a==="milliseconds"?i%=1e3:a==="weeks"?i=Hs(i/Of[a]):i=this.$d[a],i||0},e.add=function(n,i,a){var o;return i?o=n*Of[jf(i)]:Sm(n)?o=n.$ms:o=xh(n,this).$ms,xh(this.$ms+o*(a?-1:1),this)},e.subtract=function(n,i){return this.add(n,i,!0)},e.locale=function(n){var i=this.clone();return i.$l=n,i},e.clone=function(){return xh(this.$ms,this)},e.humanize=function(n){return yN().add(this.$ms,"ms").locale(this.$l).fromNow(!n)},e.valueOf=function(){return this.asMilliseconds()},e.milliseconds=function(){return this.get("milliseconds")},e.asMilliseconds=function(){return this.as("milliseconds")},e.seconds=function(){return this.get("seconds")},e.asSeconds=function(){return this.as("seconds")},e.minutes=function(){return this.get("minutes")},e.asMinutes=function(){return this.as("minutes")},e.hours=function(){return this.get("hours")},e.asHours=function(){return this.as("hours")},e.days=function(){return this.get("days")},e.asDays=function(){return this.as("days")},e.weeks=function(){return this.get("weeks")},e.asWeeks=function(){return this.as("weeks")},e.months=function(){return this.get("months")},e.asMonths=function(){return this.as("months")},e.years=function(){return this.get("years")},e.asYears=function(){return this.as("years")},r}(),tk=function(e,t,n){return e.add(t.years()*n,"y").add(t.months()*n,"M").add(t.days()*n,"d").add(t.hours()*n,"h").add(t.minutes()*n,"m").add(t.seconds()*n,"s").add(t.milliseconds()*n,"ms")};const IU=function(r,e,t){yN=t,ra=t().$utils(),t.duration=function(a,o){var s=t.locale();return xh(a,{$l:s},o)},t.isDuration=Sm;var n=e.prototype.add,i=e.prototype.subtract;e.prototype.add=function(a,o){return Sm(a)?tk(this,a,1):n.bind(this)(a,o)},e.prototype.subtract=function(a,o){return Sm(a)?tk(this,a,-1):i.bind(this)(a,o)}};var PU=/[+-]\d\d(?::?\d\d)?/g,RU=/([+-]|\d\d)/g;function OU(r){r===void 0&&(r="");var e=r.match(PU);if(!e)return null;var t=(""+e[0]).match(RU)||["-",0,0],n=t[0],i=t[1],a=t[2],o=+i*60+ +a;return o===0?0:n==="+"?o:-o}const jU=function(r,e,t){var n=e.prototype;t.utc=function(f){var h={date:f,utc:!0,args:arguments};return new e(h)},n.utc=function(f){var h=t(this.toDate(),{locale:this.$L,utc:!0});return f?h.add(this.utcOffset(),ha):h},n.local=function(){return t(this.toDate(),{locale:this.$L,utc:!1})};var i=n.parse;n.parse=function(f){f.utc&&(this.$u=!0),this.$utils().u(f.$offset)||(this.$offset=f.$offset),i.call(this,f)};var a=n.init;n.init=function(){if(this.$u){var f=this.$d;this.$y=f.getUTCFullYear(),this.$M=f.getUTCMonth(),this.$D=f.getUTCDate(),this.$W=f.getUTCDay(),this.$H=f.getUTCHours(),this.$m=f.getUTCMinutes(),this.$s=f.getUTCSeconds(),this.$ms=f.getUTCMilliseconds()}else a.call(this)};var o=n.utcOffset;n.utcOffset=function(f,h){var d=this.$utils(),p=d.u;if(p(f))return this.$u?0:p(this.$offset)?o.call(this):this.$offset;if(typeof f=="string"&&(f=OU(f),f===null))return this;var v=Math.abs(f)<=16?f*60:f,m=this;if(h)return m.$offset=v,m.$u=f===0,m;if(f!==0){var g=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();m=this.local().add(v+g,ha),m.$offset=v,m.$x.$localOffset=g}else m=this.utc();return m};var s=n.format,l="YYYY-MM-DDTHH:mm:ss[Z]";n.format=function(f){var h=f||(this.$u?l:"");return s.call(this,h)},n.valueOf=function(){var f=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-f*Vl},n.isUTC=function(){return!!this.$u},n.toISOString=function(){return this.toDate().toISOString()},n.toString=function(){return this.toDate().toUTCString()};var u=n.toDate;n.toDate=function(f){return f==="s"&&this.$offset?t(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():u.call(this)};var c=n.diff;n.diff=function(f,h,d){if(f&&this.$u===f.$u)return c.call(this,f,h,d);var p=this.local(),v=t(f).local();return c.call(p,v,h,d)}};var NU={year:0,month:1,day:2,hour:3,minute:4,second:5},rk={},BU=function(e,t){t===void 0&&(t={});var n=t.timeZoneName||"short",i=e+"|"+n,a=rk[i];return a||(a=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:n}),rk[i]=a),a};const zU=function(r,e,t){var n,i=function(c,f,h){h===void 0&&(h={});var d=new Date(c),p=BU(f,h);return p.formatToParts(d)},a=function(c,f){for(var h=i(c,f),d=[],p=0;p<h.length;p+=1){var v=h[p],m=v.type,g=v.value,y=NU[m];y>=0&&(d[y]=parseInt(g,10))}var b=d[3],_=b===24?0:b,x=d[0]+"-"+d[1]+"-"+d[2]+" "+_+":"+d[4]+":"+d[5]+":000",w=t.utc(x).valueOf(),S=+c,T=S%1e3;return S-=T,(w-S)/6e4},o=function(c,f,h){var d=c-f*60*1e3,p=a(d,h);if(f===p)return[d,f];d-=(p-f)*60*1e3;var v=a(d,h);return p===v?[d,p]:[c-Math.min(p,v)*60*1e3,Math.max(p,v)]},s=e.prototype;s.tz=function(u,c){u===void 0&&(u=n);var f=this.utcOffset(),h=this.toDate(),d=h.toLocaleString("en-US",{timeZone:u}),p=Math.round((h-new Date(d))/1e3/60),v=-Math.round(h.getTimezoneOffset()/15)*15-p,m=!Number(v),g;if(m)g=this.utcOffset(0,c);else if(g=t(d,{locale:this.$L}).$set(f0,this.$ms).utcOffset(v,!0),c){var y=g.utcOffset();g=g.add(f-y,ha)}return g.$x.$timezone=u,g},s.offsetName=function(u){var c=this.$x.$timezone||t.tz.guess(),f=i(this.valueOf(),c,{timeZoneName:u}).find(function(h){return h.type.toLowerCase()==="timezonename"});return f&&f.value};var l=s.startOf;s.startOf=function(u,c){if(!this.$x||!this.$x.$timezone)return l.call(this,u,c);var f=t(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L}),h=l.call(f,u,c);return h.tz(this.$x.$timezone,!0)},t.tz=function(u,c,f){var h=f&&c,d=f||c||n,p=a(+t(),d);if(typeof u!="string")return t(u).tz(d);var v=t.utc(u,h).valueOf(),m=o(v,p,d),g=m[0],y=m[1],b=t(g).utcOffset(y);return b.$x.$timezone=d,b},t.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},t.tz.setDefault=function(u){n=u}},FU=function(r,e){var t=e.prototype,n=t.format;t.format=function(i){var a=this,o=this.$locale();if(!this.isValid())return n.bind(this)(i);var s=this.$utils(),l=i||sT,u=l.replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(c){switch(c){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return o.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return o.ordinal(a.week(),"W");case"w":case"ww":return s.s(a.week(),c==="w"?1:2,"0");case"W":case"WW":return s.s(a.isoWeek(),c==="W"?1:2,"0");case"k":case"kk":return s.s(String(a.$H===0?24:a.$H),c==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return c}});return n.bind(this)(u)}};Vt.extend(kU);Vt.extend(TU);Vt.extend(MU);Vt.extend(DU);Vt.extend(IU);Vt.extend(jU);Vt.extend(zU);Vt.extend(FU);const VU={class:"bg-surface-modal px-4 pb-6 pt-5 sm:px-6"},$U={class:"flex"},HU={class:"w-full flex-1"},GU={class:"mb-6 flex items-center justify-between"},WU={class:"flex items-center space-x-2"},UU={class:"text-2xl font-semibold leading-6 text-ink-gray-9"},YU={class:"text-p-base text-ink-gray-7"},qU={key:0,class:"px-4 pb-7 pt-4 sm:px-6"},XU={class:"space-y-2"},KU=Ke({__name:"Dialog",props:{modelValue:{type:Boolean},options:{default:()=>({})},disableOutsideClickToClose:{type:Boolean,default:!1}},emits:["update:modelValue","close","after-leave"],setup(r,{emit:e}){const t=r,n=e,i=de(()=>{let h=t.options.actions;return h!=null&&h.length?h.map(d=>{let p=wu({...d,loading:!1,onClick:d.onClick?async()=>{p.loading=!0;try{if(d.onClick){let v=()=>{console.warn("Value passed to onClick is a context object. Please use context.close() instead of context() to close the dialog."),s()};v.close=s,await d.onClick(v)}}finally{p.loading=!1}}:s});return p}):[]}),a=de({get(){return t.modelValue},set(h){n("update:modelValue",h),h||n("close")}});function o(h){a.value=h}function s(){a.value=!1}const l=de(()=>{var d;if(!((d=t.options)!=null&&d.icon))return null;let h=t.options.icon;return typeof h=="string"&&(h={name:h}),h}),u=de(()=>{var p;const h=((p=t.options)==null?void 0:p.position)||"center";return{center:"justify-center",top:"pt-[20vh]"}[h]}),c=de(()=>{var p;const h=(p=l.value)==null?void 0:p.appearance;return h?{warning:"bg-surface-amber-2",info:"bg-surface-blue-2",danger:"bg-surface-red-2",success:"bg-surface-green-2"}[h]:"bg-surface-gray-2"}),f=de(()=>{var p;const h=(p=l.value)==null?void 0:p.appearance;return h?{warning:"text-ink-amber-3",info:"text-ink-blue-3",danger:"text-ink-red-4",success:"text-ink-green-3"}[h]:"text-ink-gray-5"});return(h,d)=>{const p=kH("LucideX");return Y(),$e(H(A9),{open:a.value,"onUpdate:open":[d[3]||(d[3]=v=>a.value=v),o]},{default:_e(()=>[Ie(H(iG),null,{default:_e(()=>[Ie(H(tG),{class:"fixed inset-0 bg-black-overlay-200 backdrop-filter backdrop-blur-[12px] overflow-y-auto dialog-overlay","data-dialog":h.options.title,onAfterLeave:d[2]||(d[2]=v=>h.$emit("after-leave"))},{default:_e(()=>[Z("div",{class:kt(["flex min-h-screen flex-col items-center px-4 py-4 text-center",u.value])},[Ie(H(K9),{class:kt(["my-8 inline-block w-full transform overflow-hidden rounded-xl bg-surface-modal text-left align-middle shadow-xl dialog-content",{"max-w-7xl":h.options.size==="7xl","max-w-6xl":h.options.size==="6xl","max-w-5xl":h.options.size==="5xl","max-w-4xl":h.options.size==="4xl","max-w-3xl":h.options.size==="3xl","max-w-2xl":h.options.size==="2xl","max-w-xl":h.options.size==="xl","max-w-lg":h.options.size==="lg"||!h.options.size,"max-w-md":h.options.size==="md","max-w-sm":h.options.size==="sm","max-w-xs":h.options.size==="xs"}]),onEscapeKeyDown:d[0]||(d[0]=v=>s()),onInteractOutside:d[1]||(d[1]=v=>{t.disableOutsideClickToClose&&v.preventDefault()})},{default:_e(()=>[Je(h.$slots,"body",{},()=>[Je(h.$slots,"body-main",{},()=>[Z("div",VU,[Z("div",$U,[Z("div",HU,[Je(h.$slots,"body-header",{},()=>[Z("div",GU,[Z("div",WU,[l.value?(Y(),ae("div",{key:0,class:kt(["flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full",c.value])},[Ie(xm,{name:l.value.name,class:kt(["h-4 w-4",f.value]),"aria-hidden":"true"},null,8,["name","class"])],2)):ct("",!0),Ie(H(Y3),{as:"header"},{default:_e(()=>[Je(h.$slots,"body-title",{},()=>[Z("h3",UU,qt(h.options.title||"Untitled"),1)],!0)]),_:3})]),Ie(H(k9),{"as-child":""},{default:_e(()=>[Ie(H(ui),{variant:"ghost",onClick:s},{icon:_e(()=>[Ie(p,{class:"h-4 w-4 text-ink-gray-9"})]),_:1})]),_:1})])],!0),Je(h.$slots,"body-content",{},()=>[h.options.message?(Y(),$e(H(W3),{key:0,"as-child":""},{default:_e(()=>[Z("p",YU,qt(h.options.message),1)]),_:1})):ct("",!0)],!0)])])])],!0),i.value.length||h.$slots.actions?(Y(),ae("div",qU,[Je(h.$slots,"actions",r0(n0({close:s})),()=>[Z("div",XU,[(Y(!0),ae(oi,null,cp(i.value,v=>(Y(),$e(H(ui),rr({class:"w-full",key:v.label,disabled:v.disabled},{ref_for:!0},v),{default:_e(()=>[Di(qt(v.label),1)]),_:2},1040,["disabled"]))),128))])],!0)])):ct("",!0)],!0)]),_:3},8,["class"])],2)]),_:3},8,["data-dialog"])]),_:3})]),_:3},8,["open"])}}}),xN=DH(KU,[["__scopeId","data-v-7e147ead"]]),wN=xN;wN.Title=Y3;wN.Description=W3;te([]);const ZU=["innerHTML"],JU=Ke({__name:"ErrorMessage",props:{message:{}},setup(r){const e=r,t=de(()=>e.message?e.message instanceof Error?e.message.messages||e.message.message:e.message:"");return(n,i)=>n.message?(Y(),ae("div",{key:0,class:"whitespace-pre-line text-sm text-ink-red-4",role:"alert",innerHTML:t.value},null,8,ZU)):ct("",!0)}}),QU={class:"relative flex items-center"},eY=["disabled","id","value"],tY=["value","disabled","selected"],SN=Ke({inheritAttrs:!1,__name:"Select",props:{size:{default:"sm"},variant:{default:"subtle"},placeholder:{},disabled:{type:Boolean},id:{},modelValue:{},options:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e;i0();const i=_3();function a(h){n("update:modelValue",h.target.value)}const o=de(()=>{var h;return((h=t.options)==null?void 0:h.map(d=>typeof d=="string"?{label:d,value:d}:d).filter(Boolean))||[]}),s=de(()=>t.disabled?"text-ink-gray-4":"text-ink-gray-8"),l=de(()=>({sm:"text-base",md:"text-base",lg:"text-lg",xl:"text-xl"})[t.size]),u=de(()=>({sm:"pl-2 pr-5",md:"pl-2.5 pr-5.5",lg:"pl-3 pr-6",xl:"pl-3 pr-6"})[t.size]),c=de(()=>{let h={sm:"rounded h-7",md:"rounded h-8",lg:"rounded-md h-10",xl:"rounded-md h-10"}[t.size],d=t.disabled?"disabled":t.variant,p={subtle:"border border-[--surface-gray-2] bg-surface-gray-2 hover:border-outline-gray-modals hover:bg-surface-gray-3 focus:border-outline-gray-4 focus:ring-0 focus-visible:ring-2 focus-visible:ring-outline-gray-3",outline:"border border-outline-gray-2 bg-surface-white hover:border-outline-gray-3 focus:border-outline-gray-4 focus:ring-0 focus-visible:ring-2 focus-visible:ring-outline-gray-3",ghost:"bg-transparent border-transparent hover:bg-surface-gray-3 focus:bg-surface-gray-3 focus:border-outline-gray-4 focus:ring-0 focus-visible:ring-2 focus-visible:ring-outline-gray-3",disabled:["border",t.variant!=="ghost"?"bg-surface-gray-1":"",t.variant==="outline"?"border-outline-gray-2":"border-transparent"]}[d];return[h,l.value,u.value,p,s.value,"transition-colors w-full py-0 truncate"]});let f=de(()=>({sm:"pl-2",md:"pl-2.5",lg:"pl-3",xl:"pl-3"})[t.size]);return(h,d)=>(Y(),ae("div",QU,[h.$slots.prefix?(Y(),ae("div",{key:0,class:kt(["absolute inset-y-0 left-0 flex items-center",s.value,H(f)])},[Je(h.$slots,"prefix")],2)):ct("",!0),h.placeholder?og((Y(),ae("div",{key:1,class:kt(["pointer-events-none absolute text-ink-gray-4 truncate w-full",[l.value,u.value]])},qt(h.placeholder),3)),[[EH,!h.modelValue]]):ct("",!0),Z("select",rr({class:c.value,disabled:h.disabled,id:h.id,value:h.modelValue,onChange:a},H(i)),[(Y(!0),ae(oi,null,cp(o.value,p=>(Y(),ae("option",{key:p.value,value:p.value,disabled:p.disabled||!1,selected:h.modelValue===p.value},qt(p.label),9,tY))),128))],16,eY)]))}}),rY={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function nY(r,e){return Y(),ae("svg",rY,e[0]||(e[0]=[Z("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[Z("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),Z("circle",{cx:"12",cy:"12",r:"3"})],-1)]))}vt({name:"lucide-eye",render:nY});const iY={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function aY(r,e){return Y(),ae("svg",iY,e[0]||(e[0]=[Z("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[Z("path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575a1 1 0 0 1 0 .696a10.8 10.8 0 0 1-1.444 2.49m-6.41-.679a3 3 0 0 1-4.242-4.242"}),Z("path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 4.446-5.143M2 2l20 20"})],-1)]))}vt({name:"lucide-eye-off",render:aY});const oY={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function sY(r,e){return Y(),ae("svg",oY,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3"},null,-1)]))}vt({name:"lucide-command",render:sY});const lY={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function uY(r,e){return Y(),ae("svg",lY,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 13a1 1 0 0 0-1-1H5.061a1 1 0 0 1-.75-1.811l6.836-6.835a1.207 1.207 0 0 1 1.707 0l6.835 6.835a1 1 0 0 1-.75 1.811H16a1 1 0 0 0-1 1v6a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1z"},null,-1)]))}vt({name:"lucide-arrow-big-up",render:uY});const cY={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function fY(r,e){return Y(),ae("svg",cY,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 3h6l6 18h6M14 3h7"},null,-1)]))}vt({name:"lucide-option",render:fY});function Pr(r){this.content=r}Pr.prototype={constructor:Pr,find:function(r){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===r)return e;return-1},get:function(r){var e=this.find(r);return e==-1?void 0:this.content[e+1]},update:function(r,e,t){var n=t&&t!=r?this.remove(t):this,i=n.find(r),a=n.content.slice();return i==-1?a.push(t||r,e):(a[i+1]=e,t&&(a[i]=t)),new Pr(a)},remove:function(r){var e=this.find(r);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Pr(t)},addToStart:function(r,e){return new Pr([r,e].concat(this.remove(r).content))},addToEnd:function(r,e){var t=this.remove(r).content.slice();return t.push(r,e),new Pr(t)},addBefore:function(r,e,t){var n=this.remove(e),i=n.content.slice(),a=n.find(r);return i.splice(a==-1?i.length:a,0,e,t),new Pr(i)},forEach:function(r){for(var e=0;e<this.content.length;e+=2)r(this.content[e],this.content[e+1])},prepend:function(r){return r=Pr.from(r),r.size?new Pr(r.content.concat(this.subtract(r).content)):this},append:function(r){return r=Pr.from(r),r.size?new Pr(this.subtract(r).content.concat(r.content)):this},subtract:function(r){var e=this;r=Pr.from(r);for(var t=0;t<r.content.length;t+=2)e=e.remove(r.content[t]);return e},toObject:function(){var r={};return this.forEach(function(e,t){r[e]=t}),r},get size(){return this.content.length>>1}};Pr.from=function(r){if(r instanceof Pr)return r;var e=[];if(r)for(var t in r)e.push(t,r[t]);return new Pr(e)};function TN(r,e,t){for(let n=0;;n++){if(n==r.childCount||n==e.childCount)return r.childCount==e.childCount?null:t;let i=r.child(n),a=e.child(n);if(i==a){t+=i.nodeSize;continue}if(!i.sameMarkup(a))return t;if(i.isText&&i.text!=a.text){for(let o=0;i.text[o]==a.text[o];o++)t++;return t}if(i.content.size||a.content.size){let o=TN(i.content,a.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function CN(r,e,t,n){for(let i=r.childCount,a=e.childCount;;){if(i==0||a==0)return i==a?null:{a:t,b:n};let o=r.child(--i),s=e.child(--a),l=o.nodeSize;if(o==s){t-=l,n-=l;continue}if(!o.sameMarkup(s))return{a:t,b:n};if(o.isText&&o.text!=s.text){let u=0,c=Math.min(o.text.length,s.text.length);for(;u<c&&o.text[o.text.length-u-1]==s.text[s.text.length-u-1];)u++,t--,n--;return{a:t,b:n}}if(o.content.size||s.content.size){let u=CN(o.content,s.content,t-1,n-1);if(u)return u}t-=l,n-=l}}class ne{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,t,n,i=0,a){for(let o=0,s=0;s<t;o++){let l=this.content[o],u=s+l.nodeSize;if(u>e&&n(l,i+s,a||null,o)!==!1&&l.content.size){let c=s+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,t-c),n,i+c)}s=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,i){let a="",o=!0;return this.nodesBetween(e,t,(s,l)=>{let u=s.isText?s.text.slice(Math.max(e,l)-l,t-l):s.isLeaf?i?typeof i=="function"?i(s):i:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&u||s.isTextblock)&&n&&(o?o=!1:a+=n),a+=u},0),a}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,i=this.content.slice(),a=0;for(t.isText&&t.sameMarkup(n)&&(i[i.length-1]=t.withText(t.text+n.text),a=1);a<e.content.length;a++)i.push(e.content[a]);return new ne(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let n=[],i=0;if(t>e)for(let a=0,o=0;o<t;a++){let s=this.content[a],l=o+s.nodeSize;l>e&&((o<e||l>t)&&(s.isText?s=s.cut(Math.max(0,e-o),Math.min(s.text.length,t-o)):s=s.cut(Math.max(0,e-o-1),Math.min(s.content.size,t-o-1))),n.push(s),i+=s.nodeSize),o=l}return new ne(n,i)}cutByIndex(e,t){return e==t?ne.empty:e==0&&t==this.content.length?this:new ne(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let i=this.content.slice(),a=this.size+t.nodeSize-n.nodeSize;return i[e]=t,new ne(i,a)}addToStart(e){return new ne([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new ne(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let i=this.content[t];e(i,n,t),n+=i.nodeSize}}findDiffStart(e,t=0){return TN(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return CN(this,e,t,n)}findIndex(e){if(e==0)return qp(0,e);if(e==this.size)return qp(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let i=this.child(t),a=n+i.nodeSize;if(a>=e)return a==e?qp(t+1,a):qp(t,n);n=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return ne.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new ne(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return ne.empty;let t,n=0;for(let i=0;i<e.length;i++){let a=e[i];n+=a.nodeSize,i&&a.isText&&e[i-1].sameMarkup(a)?(t||(t=e.slice(0,i)),t[t.length-1]=a.withText(t[t.length-1].text+a.text)):t&&t.push(a)}return new ne(t||e,n)}static from(e){if(!e)return ne.empty;if(e instanceof ne)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new ne([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}ne.empty=new ne([],0);const I1={index:0,offset:0};function qp(r,e){return I1.index=r,I1.offset=e,I1}function vg(r,e){if(r===e)return!0;if(!(r&&typeof r=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(r);if(Array.isArray(e)!=t)return!1;if(t){if(r.length!=e.length)return!1;for(let n=0;n<r.length;n++)if(!vg(r[n],e[n]))return!1}else{for(let n in r)if(!(n in e)||!vg(r[n],e[n]))return!1;for(let n in e)if(!(n in r))return!1}return!0}let Wt=class nw{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let i=0;i<e.length;i++){let a=e[i];if(this.eq(a))return e;if(this.type.excludes(a.type))t||(t=e.slice(0,i));else{if(a.type.excludes(this.type))return e;!n&&a.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),n=!0),t&&t.push(a)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&vg(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);let i=n.create(t.attrs);return n.checkAttrs(i.attrs),i}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return nw.none;if(e instanceof nw)return[e];let t=e.slice();return t.sort((n,i)=>n.type.rank-i.type.rank),t}};Wt.none=[];class mg extends Error{}class ye{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=MN(this.content,e+this.openStart,t);return n&&new ye(n,this.openStart,this.openEnd)}removeBetween(e,t){return new ye(AN(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return ye.empty;let n=t.openStart||0,i=t.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ye(ne.fromJSON(e,t.content),n,i)}static maxOpen(e,t=!0){let n=0,i=0;for(let a=e.firstChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.firstChild)n++;for(let a=e.lastChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.lastChild)i++;return new ye(e,n,i)}}ye.empty=new ye(ne.empty,0,0);function AN(r,e,t){let{index:n,offset:i}=r.findIndex(e),a=r.maybeChild(n),{index:o,offset:s}=r.findIndex(t);if(i==e||a.isText){if(s!=t&&!r.child(o).isText)throw new RangeError("Removing non-flat range");return r.cut(0,e).append(r.cut(t))}if(n!=o)throw new RangeError("Removing non-flat range");return r.replaceChild(n,a.copy(AN(a.content,e-i-1,t-i-1)))}function MN(r,e,t,n){let{index:i,offset:a}=r.findIndex(e),o=r.maybeChild(i);if(a==e||o.isText)return r.cut(0,e).append(t).append(r.cut(e));let s=MN(o.content,e-a-1,t);return s&&r.replaceChild(i,o.copy(s))}function hY(r,e,t){if(t.openStart>r.depth)throw new mg("Inserted content deeper than insertion position");if(r.depth-t.openStart!=e.depth-t.openEnd)throw new mg("Inconsistent open depths");return kN(r,e,t,0)}function kN(r,e,t,n){let i=r.index(n),a=r.node(n);if(i==e.index(n)&&n<r.depth-t.openStart){let o=kN(r,e,t,n+1);return a.copy(a.content.replaceChild(i,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&r.depth==n&&e.depth==n){let o=r.parent,s=o.content;return Gl(o,s.cut(0,r.parentOffset).append(t.content).append(s.cut(e.parentOffset)))}else{let{start:o,end:s}=dY(t,r);return Gl(a,EN(r,o,s,e,n))}else return Gl(a,gg(r,e,n))}function DN(r,e){if(!e.type.compatibleContent(r.type))throw new mg("Cannot join "+e.type.name+" onto "+r.type.name)}function iw(r,e,t){let n=r.node(t);return DN(n,e.node(t)),n}function Hl(r,e){let t=e.length-1;t>=0&&r.isText&&r.sameMarkup(e[t])?e[t]=r.withText(e[t].text+r.text):e.push(r)}function Hh(r,e,t,n){let i=(e||r).node(t),a=0,o=e?e.index(t):i.childCount;r&&(a=r.index(t),r.depth>t?a++:r.textOffset&&(Hl(r.nodeAfter,n),a++));for(let s=a;s<o;s++)Hl(i.child(s),n);e&&e.depth==t&&e.textOffset&&Hl(e.nodeBefore,n)}function Gl(r,e){return r.type.checkContent(e),r.copy(e)}function EN(r,e,t,n,i){let a=r.depth>i&&iw(r,e,i+1),o=n.depth>i&&iw(t,n,i+1),s=[];return Hh(null,r,i,s),a&&o&&e.index(i)==t.index(i)?(DN(a,o),Hl(Gl(a,EN(r,e,t,n,i+1)),s)):(a&&Hl(Gl(a,gg(r,e,i+1)),s),Hh(e,t,i,s),o&&Hl(Gl(o,gg(t,n,i+1)),s)),Hh(n,null,i,s),new ne(s)}function gg(r,e,t){let n=[];if(Hh(null,r,t,n),r.depth>t){let i=iw(r,e,t+1);Hl(Gl(i,gg(r,e,t+1)),n)}return Hh(e,null,t,n),new ne(n)}function dY(r,e){let t=e.depth-r.openStart,i=e.node(t).copy(r.content);for(let a=t-1;a>=0;a--)i=e.node(a).copy(ne.from(i));return{start:i.resolveNoCache(r.openStart+t),end:i.resolveNoCache(i.content.size-r.openEnd-t)}}class wd{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=e.child(t);return n?e.child(t).cut(n):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let a=0;a<e;a++)i+=n.child(a).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Wt.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),i=e.maybeChild(t);if(!n){let s=n;n=i,i=s}let a=n.marks;for(var o=0;o<a.length;o++)a[o].type.spec.inclusive===!1&&(!i||!a[o].isInSet(i.marks))&&(a=a[o--].removeFromSet(a));return a}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,i=e.parent.maybeChild(e.index());for(var a=0;a<n.length;a++)n[a].type.spec.inclusive===!1&&(!i||!n[a].isInSet(i.marks))&&(n=n[a--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new yg(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],i=0,a=t;for(let o=e;;){let{index:s,offset:l}=o.content.findIndex(a),u=a-l;if(n.push(o,s,i+l),!u||(o=o.child(s),o.isText))break;a=u-1,i+=l+1}return new wd(t,n,a)}static resolveCached(e,t){let n=nk.get(e);if(n)for(let a=0;a<n.elts.length;a++){let o=n.elts[a];if(o.pos==t)return o}else nk.set(e,n=new pY);let i=n.elts[n.i]=wd.resolve(e,t);return n.i=(n.i+1)%vY,i}}class pY{constructor(){this.elts=[],this.i=0}}const vY=12,nk=new WeakMap;class yg{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const mY=Object.create(null);let Wl=class aw{constructor(e,t,n,i=Wt.none){this.type=e,this.attrs=t,this.marks=i,this.content=n||ne.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,i=0){this.content.nodesBetween(e,t,n,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,i){return this.content.textBetween(e,t,n,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&vg(this.attrs,t||e.defaultAttrs||mY)&&Wt.sameSet(this.marks,n||Wt.none)}copy(e=null){return e==this.content?this:new aw(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new aw(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return ye.empty;let i=this.resolve(e),a=this.resolve(t),o=n?0:i.sharedDepth(t),s=i.start(o),u=i.node(o).content.cut(i.pos-s,a.pos-s);return new ye(u,i.depth-o,a.depth-o)}replace(e,t,n){return hY(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let i=this.content.child(t-1);return{node:i,index:t-1,offset:n-i.nodeSize}}resolve(e){return wd.resolveCached(this,e)}resolveNoCache(e){return wd.resolve(this,e)}rangeHasMark(e,t,n){let i=!1;return t>e&&this.nodesBetween(e,t,a=>(n.isInSet(a.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),LN(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=ne.empty,i=0,a=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,i,a),s=o&&o.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let l=i;l<a;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0}canReplaceWith(e,t,n,i){if(i&&!this.type.allowsMarks(i))return!1;let a=this.contentMatchAt(e).matchType(n),o=a&&a.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Wt.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!Wt.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let i=ne.fromJSON(e,t.content),a=e.nodeType(t.type).create(t.attrs,i,n);return a.type.checkAttrs(a.attrs),a}};Wl.prototype.text=void 0;class bg extends Wl{constructor(e,t,n,i){if(super(e,t,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):LN(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new bg(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new bg(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function LN(r,e){for(let t=r.length-1;t>=0;t--)e=r[t].type.name+"("+e+")";return e}class uu{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new gY(e,t);if(n.next==null)return uu.empty;let i=IN(n);n.next&&n.err("Unexpected trailing text");let a=TY(SY(i));return CY(a,n),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let i=this;for(let a=t;i&&a<n;a++)i=i.matchType(e.child(a).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let i=[this];function a(o,s){let l=o.matchFragment(e,n);if(l&&(!t||l.validEnd))return ne.from(s.map(u=>u.createAndFill()));for(let u=0;u<o.next.length;u++){let{type:c,next:f}=o.next[u];if(!(c.isText||c.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let h=a(f,s.concat(c));if(h)return h}}return null}return a(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let i=n.shift(),a=i.match;if(a.matchType(e)){let o=[];for(let s=i;s.type;s=s.via)o.push(s.type);return o.reverse()}for(let o=0;o<a.next.length;o++){let{type:s,next:l}=a.next[o];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in t)&&(!i.type||l.validEnd)&&(n.push({match:s.contentMatch,type:s,via:i}),t[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let i=0;i<n.next.length;i++)e.indexOf(n.next[i].next)==-1&&t(n.next[i].next)}return t(this),e.map((n,i)=>{let a=i+(n.validEnd?"*":" ")+" ";for(let o=0;o<n.next.length;o++)a+=(o?", ":"")+n.next[o].type.name+"->"+e.indexOf(n.next[o].next);return a}).join(`
|
||
`)}}uu.empty=new uu(!0);class gY{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function IN(r){let e=[];do e.push(yY(r));while(r.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function yY(r){let e=[];do e.push(bY(r));while(r.next&&r.next!=")"&&r.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function bY(r){let e=wY(r);for(;;)if(r.eat("+"))e={type:"plus",expr:e};else if(r.eat("*"))e={type:"star",expr:e};else if(r.eat("?"))e={type:"opt",expr:e};else if(r.eat("{"))e=_Y(r,e);else break;return e}function ik(r){/\D/.test(r.next)&&r.err("Expected number, got '"+r.next+"'");let e=Number(r.next);return r.pos++,e}function _Y(r,e){let t=ik(r),n=t;return r.eat(",")&&(r.next!="}"?n=ik(r):n=-1),r.eat("}")||r.err("Unclosed braced range"),{type:"range",min:t,max:n,expr:e}}function xY(r,e){let t=r.nodeTypes,n=t[e];if(n)return[n];let i=[];for(let a in t){let o=t[a];o.isInGroup(e)&&i.push(o)}return i.length==0&&r.err("No node type or group '"+e+"' found"),i}function wY(r){if(r.eat("(")){let e=IN(r);return r.eat(")")||r.err("Missing closing paren"),e}else if(/\W/.test(r.next))r.err("Unexpected token '"+r.next+"'");else{let e=xY(r,r.next).map(t=>(r.inline==null?r.inline=t.isInline:r.inline!=t.isInline&&r.err("Mixing inline and block content"),{type:"name",value:t}));return r.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function SY(r){let e=[[]];return i(a(r,0),t()),e;function t(){return e.push([])-1}function n(o,s,l){let u={term:l,to:s};return e[o].push(u),u}function i(o,s){o.forEach(l=>l.to=s)}function a(o,s){if(o.type=="choice")return o.exprs.reduce((l,u)=>l.concat(a(u,s)),[]);if(o.type=="seq")for(let l=0;;l++){let u=a(o.exprs[l],s);if(l==o.exprs.length-1)return u;i(u,s=t())}else if(o.type=="star"){let l=t();return n(s,l),i(a(o.expr,l),l),[n(l)]}else if(o.type=="plus"){let l=t();return i(a(o.expr,s),l),i(a(o.expr,l),l),[n(l)]}else{if(o.type=="opt")return[n(s)].concat(a(o.expr,s));if(o.type=="range"){let l=s;for(let u=0;u<o.min;u++){let c=t();i(a(o.expr,l),c),l=c}if(o.max==-1)i(a(o.expr,l),l);else for(let u=o.min;u<o.max;u++){let c=t();n(l,c),i(a(o.expr,l),c),l=c}return[n(l)]}else{if(o.type=="name")return[n(s,void 0,o.value)];throw new Error("Unknown expr type")}}}}function PN(r,e){return e-r}function ak(r,e){let t=[];return n(e),t.sort(PN);function n(i){let a=r[i];if(a.length==1&&!a[0].term)return n(a[0].to);t.push(i);for(let o=0;o<a.length;o++){let{term:s,to:l}=a[o];!s&&t.indexOf(l)==-1&&n(l)}}}function TY(r){let e=Object.create(null);return t(ak(r,0));function t(n){let i=[];n.forEach(o=>{r[o].forEach(({term:s,to:l})=>{if(!s)return;let u;for(let c=0;c<i.length;c++)i[c][0]==s&&(u=i[c][1]);ak(r,l).forEach(c=>{u||i.push([s,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let a=e[n.join(",")]=new uu(n.indexOf(r.length-1)>-1);for(let o=0;o<i.length;o++){let s=i[o][1].sort(PN);a.next.push({type:i[o][0],next:e[s.join(",")]||t(s)})}return a}}function CY(r,e){for(let t=0,n=[r];t<n.length;t++){let i=n[t],a=!i.validEnd,o=[];for(let s=0;s<i.next.length;s++){let{type:l,next:u}=i.next[s];o.push(l.name),a&&!(l.isText||l.hasRequiredAttrs())&&(a=!1),n.indexOf(u)==-1&&n.push(u)}a&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function RN(r){let e=Object.create(null);for(let t in r){let n=r[t];if(!n.hasDefault)return null;e[t]=n.default}return e}function ON(r,e){let t=Object.create(null);for(let n in r){let i=e&&e[n];if(i===void 0){let a=r[n];if(a.hasDefault)i=a.default;else throw new RangeError("No value supplied for attribute "+n)}t[n]=i}return t}function jN(r,e,t,n){for(let i in e)if(!(i in r))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${i}`);for(let i in r){let a=r[i];a.validate&&a.validate(e[i])}}function NN(r,e){let t=Object.create(null);if(e)for(let n in e)t[n]=new MY(r,n,e[n]);return t}let ok=class BN{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=NN(e,n.attrs),this.defaultAttrs=RN(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==uu.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:ON(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Wl(this,this.computeAttrs(e),ne.from(t),Wt.setFrom(n))}createChecked(e=null,t,n){return t=ne.from(t),this.checkContent(t),new Wl(this,this.computeAttrs(e),t,Wt.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=ne.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let i=this.contentMatch.matchFragment(t),a=i&&i.fillBefore(ne.empty,!0);return a?new Wl(this,e,t.append(a),Wt.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){jN(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:Wt.none:e}static compile(e,t){let n=Object.create(null);e.forEach((a,o)=>n[a]=new BN(a,t,o));let i=t.spec.topNode||"doc";if(!n[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let a in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};function AY(r,e,t){let n=t.split("|");return i=>{let a=i===null?"null":typeof i;if(n.indexOf(a)<0)throw new RangeError(`Expected value of type ${n} for attribute ${e} on type ${r}, got ${a}`)}}class MY{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?AY(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class d0{constructor(e,t,n,i){this.name=e,this.rank=t,this.schema=n,this.spec=i,this.attrs=NN(e,i.attrs),this.excluded=null;let a=RN(this.attrs);this.instance=a?new Wt(this,a):null}create(e=null){return!e&&this.instance?this.instance:new Wt(this,ON(this.attrs,e))}static compile(e,t){let n=Object.create(null),i=0;return e.forEach((a,o)=>n[a]=new d0(a,i++,t,o)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){jN(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class kY{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=Pr.from(e.nodes),t.marks=Pr.from(e.marks||{}),this.nodes=ok.compile(this.spec.nodes,this),this.marks=d0.compile(this.spec.marks,this);let n=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let a=this.nodes[i],o=a.spec.content||"",s=a.spec.marks;if(a.contentMatch=n[o]||(n[o]=uu.parse(o,this.nodes)),a.inlineContent=a.contentMatch.inlineContent,a.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!a.isInline||!a.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=a}a.markSet=s=="_"?null:s?sk(this,s.split(" ")):s==""||!a.inlineContent?[]:null}for(let i in this.marks){let a=this.marks[i],o=a.spec.excludes;a.excluded=o==null?[a]:o==""?[]:sk(this,o.split(" "))}this.nodeFromJSON=i=>Wl.fromJSON(this,i),this.markFromJSON=i=>Wt.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof ok){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,n,i)}text(e,t){let n=this.nodes.text;return new bg(n,n.defaultAttrs,e,Wt.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function sk(r,e){let t=[];for(let n=0;n<e.length;n++){let i=e[n],a=r.marks[i],o=a;if(a)t.push(a);else for(let s in r.marks){let l=r.marks[s];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&t.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[n]+"'")}return t}function DY(r){return r.tag!=null}function EY(r){return r.style!=null}let Gh=class ow{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(i=>{if(DY(i))this.tags.push(i);else if(EY(i)){let a=/[^=]*/.exec(i.style)[0];n.indexOf(a)<0&&n.push(a),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let a=e.nodes[i.node];return a.contentMatch.matchType(a)})}parse(e,t={}){let n=new uk(this,t,!1);return n.addAll(e,Wt.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new uk(this,t,!0);return n.addAll(e,Wt.none,t.from,t.to),ye.maxOpen(n.finish())}matchTag(e,t,n){for(let i=n?this.tags.indexOf(n)+1:0;i<this.tags.length;i++){let a=this.tags[i];if(PY(e,a.tag)&&(a.namespace===void 0||e.namespaceURI==a.namespace)&&(!a.context||t.matchesContext(a.context))){if(a.getAttrs){let o=a.getAttrs(e);if(o===!1)continue;a.attrs=o||void 0}return a}}}matchStyle(e,t,n,i){for(let a=i?this.styles.indexOf(i)+1:0;a<this.styles.length;a++){let o=this.styles[a],s=o.style;if(!(s.indexOf(e)!=0||o.context&&!n.matchesContext(o.context)||s.length>e.length&&(s.charCodeAt(e.length)!=61||s.slice(e.length+1)!=t))){if(o.getAttrs){let l=o.getAttrs(t);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let t=[];function n(i){let a=i.priority==null?50:i.priority,o=0;for(;o<t.length;o++){let s=t[o];if((s.priority==null?50:s.priority)<a)break}t.splice(o,0,i)}for(let i in e.marks){let a=e.marks[i].spec.parseDOM;a&&a.forEach(o=>{n(o=ck(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let a=e.nodes[i].spec.parseDOM;a&&a.forEach(o=>{n(o=ck(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new ow(e,ow.schemaRules(e)))}};const zN={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},LY={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},FN={ol:!0,ul:!0},Sd=1,sw=2,Wh=4;function lk(r,e,t){return e!=null?(e?Sd:0)|(e==="full"?sw:0):r&&r.whitespace=="pre"?Sd|sw:t&~Wh}class Xp{constructor(e,t,n,i,a,o){this.type=e,this.attrs=t,this.marks=n,this.solid=i,this.options=o,this.content=[],this.activeMarks=Wt.none,this.match=a||(o&Wh?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(ne.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let n=this.type.contentMatch,i;return(i=n.findWrapping(e.type))?(this.match=n,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Sd)){let n=this.content[this.content.length-1],i;if(n&&n.isText&&(i=/[ \t\r\n\u000c]+$/.exec(n.text))){let a=n;n.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=a.withText(a.text.slice(0,a.text.length-i[0].length))}}let t=ne.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(ne.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!zN.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class uk{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let i=t.topNode,a,o=lk(null,t.preserveWhitespace,0)|(n?Wh:0);i?a=new Xp(i.type,i.attrs,Wt.none,!0,t.topMatch||i.type.contentMatch,o):n?a=new Xp(null,null,Wt.none,!0,null,o):a=new Xp(e.schema.topNodeType,null,Wt.none,!0,null,o),this.nodes=[a],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,i=this.top,a=i.options&sw?"full":this.localPreserveWS||(i.options&Sd)>0;if(a==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(a)a!=="full"?n=n.replace(/\r?\n|\r/g," "):n=n.replace(/\r\n?/g,`
|
||
`);else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let o=i.content[i.content.length-1],s=e.previousSibling;(!o||s&&s.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let i=this.localPreserveWS,a=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),s;FN.hasOwnProperty(o)&&this.parser.normalizeLists&&IY(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,n));e:if(l?l.ignore:LY.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let u,c=this.needsBlock;if(zN.hasOwnProperty(o))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),u=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let f=l&&l.skip?t:this.readStyles(e,t);f&&this.addAll(e,f),u&&this.sync(a),this.needsBlock=c}else{let u=this.readStyles(e,t);u&&this.addElementByRule(e,l,u,l.consuming===!1?s:void 0)}this.localPreserveWS=i}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
||
`),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let a=this.parser.matchedStyles[i],o=n.getPropertyValue(a);if(o)for(let s=void 0;;){let l=this.parser.matchStyle(a,o,this,s);if(!l)break;if(l.ignore)return null;if(l.clearMark?t=t.filter(u=>!l.clearMark(u)):t=t.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)s=l;else break}}return t}addElementByRule(e,t,n,i){let a,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),n,e.nodeName=="BR")||this.leafFallback(e,n);else{let l=this.enter(o,t.attrs||null,n,t.preserveWhitespace);l&&(a=!0,n=l)}else{let l=this.parser.schema.marks[t.mark];n=n.concat(l.create(t.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,n,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,n,!1));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l,n),this.findAround(e,l,!1)}a&&this.sync(s)&&this.open--}addAll(e,t,n,i){let a=n||0;for(let o=n?e.childNodes[n]:e.firstChild,s=i==null?null:e.childNodes[i];o!=s;o=o.nextSibling,++a)this.findAtPoint(e,a),this.addDOM(o,t);this.findAtPoint(e,a)}findPlace(e,t,n){let i,a;for(let o=this.open,s=0;o>=0;o--){let l=this.nodes[o],u=l.findWrapping(e);if(u&&(!i||i.length>u.length+s)&&(i=u,a=l,!u.length))break;if(l.solid){if(n)break;s+=2}}if(!i)return null;this.sync(a);for(let o=0;o<i.length;o++)t=this.enterInner(i[o],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let a=this.textblockFromContext();a&&(t=this.enterInner(a,null,t))}let i=this.findPlace(e,t,n);if(i){this.closeExtra();let a=this.top;a.match&&(a.match=a.match.matchType(e.type));let o=Wt.none;for(let s of i.concat(e.marks))(a.type?a.type.allowsMarkType(s.type):fk(s.type,e.type))&&(o=s.addToSet(o));return a.content.push(e.mark(o)),!0}return!1}enter(e,t,n,i){let a=this.findPlace(e.create(t),n,!1);return a&&(a=this.enterInner(e,t,n,!0,i)),a}enterInner(e,t,n,i=!1,a){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let s=lk(e,a,o.options);o.options&Wh&&o.content.length==0&&(s|=Wh);let l=Wt.none;return n=n.filter(u=>(o.type?o.type.allowsMarkType(u.type):fk(u.type,e))?(l=u.addToSet(l),!1):!0),this.nodes.push(new Xp(e,t,l,i,null,s)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Sd)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let i=n.length-1;i>=0;i--)e+=n[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&t.compareDocumentPosition(this.find[i].node)&(n?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,i=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),a=-(n?n.depth+1:0)+(i?0:1),o=(s,l)=>{for(;s>=0;s--){let u=t[s];if(u==""){if(s==t.length-1||s==0)continue;for(;l>=a;l--)if(o(s-1,l))return!0;return!1}else{let c=l>0||l==0&&i?this.nodes[l].type:n&&l>=a?n.node(l-a).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let n=this.parser.schema.nodes[t];if(n.isTextblock&&n.defaultAttrs)return n}}}function IY(r){for(let e=r.firstChild,t=null;e;e=e.nextSibling){let n=e.nodeType==1?e.nodeName.toLowerCase():null;n&&FN.hasOwnProperty(n)&&t?(t.appendChild(e),e=t):n=="li"?t=e:n&&(t=null)}}function PY(r,e){return(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,e)}function ck(r){let e={};for(let t in r)e[t]=r[t];return e}function fk(r,e){let t=e.schema.nodes;for(let n in t){let i=t[n];if(!i.allowsMarkType(r))continue;let a=[],o=s=>{a.push(s);for(let l=0;l<s.edgeCount;l++){let{type:u,next:c}=s.edge(l);if(u==e||a.indexOf(c)<0&&o(c))return!0}};if(o(i.contentMatch))return!0}}class p0{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=P1(t).createDocumentFragment());let i=n,a=[];return e.forEach(o=>{if(a.length||o.marks.length){let s=0,l=0;for(;s<a.length&&l<o.marks.length;){let u=o.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(a[s][0])||u.type.spec.spanning===!1)break;s++,l++}for(;s<a.length;)i=a.pop()[1];for(;l<o.marks.length;){let u=o.marks[l++],c=this.serializeMark(u,o.isInline,t);c&&(a.push([u,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(o,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:i}=Tm(P1(t),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,i)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let i=e.marks.length-1;i>=0;i--){let a=this.serializeMark(e.marks[i],e.isInline,t);a&&((a.contentDOM||a.dom).appendChild(n),n=a.dom)}return n}serializeMark(e,t,n={}){let i=this.marks[e.type.name];return i&&Tm(P1(n),i(e,t),null,e.attrs)}static renderSpec(e,t,n=null,i){return Tm(e,t,n,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new p0(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=hk(e.nodes);return t.text||(t.text=n=>n.text),t}static marksFromSchema(e){return hk(e.marks)}}function hk(r){let e={};for(let t in r){let n=r[t].spec.toDOM;n&&(e[t]=n)}return e}function P1(r){return r.document||window.document}const dk=new WeakMap;function RY(r){let e=dk.get(r);return e===void 0&&dk.set(r,e=OY(r)),e}function OY(r){let e=null;function t(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")e||(e=[]),e.push(n);else for(let i=0;i<n.length;i++)t(n[i]);else for(let i in n)t(n[i])}return t(r),e}function Tm(r,e,t,n){if(typeof e=="string")return{dom:r.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],a;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(n&&(a=RY(n))&&a.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(t=i.slice(0,o),i=i.slice(o+1));let s,l=t?r.createElementNS(t,i):r.createElement(i),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let f in u)if(u[f]!=null){let h=f.indexOf(" ");h>0?l.setAttributeNS(f.slice(0,h),f.slice(h+1),u[f]):f=="style"&&l.style?l.style.cssText=u[f]:l.setAttribute(f,u[f])}}for(let f=c;f<e.length;f++){let h=e[f];if(h===0){if(f<e.length-1||f>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:d,contentDOM:p}=Tm(r,h,t,n);if(l.appendChild(d),p){if(s)throw new RangeError("Multiple content holes");s=p}}}return{dom:l,contentDOM:s}}const VN=65535,$N=Math.pow(2,16);function jY(r,e){return r+e*$N}function pk(r){return r&VN}function NY(r){return(r-(r&VN))/$N}const HN=1,GN=2,Cm=4,WN=8;class lw{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&WN)>0}get deletedBefore(){return(this.delInfo&(HN|Cm))>0}get deletedAfter(){return(this.delInfo&(GN|Cm))>0}get deletedAcross(){return(this.delInfo&Cm)>0}}class Pn{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Pn.empty)return Pn.empty}recover(e){let t=0,n=pk(e);if(!this.inverted)for(let i=0;i<n;i++)t+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[n*3]+t+NY(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let i=0,a=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?i:0);if(l>e)break;let u=this.ranges[s+a],c=this.ranges[s+o],f=l+u;if(e<=f){let h=u?e==l?-1:e==f?1:t:t,d=l+i+(h<0?0:c);if(n)return d;let p=e==(t<0?l:f)?null:jY(s/3,e-l),v=e==l?GN:e==f?HN:Cm;return(t<0?e!=l:e!=f)&&(v|=WN),new lw(d,v,p)}i+=c-u}return n?e+i:new lw(e+i,0,null)}touches(e,t){let n=0,i=pk(t),a=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?n:0);if(l>e)break;let u=this.ranges[s+a],c=l+u;if(e<=c&&s==i*3)return!0;n+=this.ranges[s+o]-u}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let i=0,a=0;i<this.ranges.length;i+=3){let o=this.ranges[i],s=o-(this.inverted?a:0),l=o+(this.inverted?0:a),u=this.ranges[i+t],c=this.ranges[i+n];e(s,s+u,l,l+c),a+=c-u}}invert(){return new Pn(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Pn.empty:new Pn(e<0?[0,-e,0]:[0,0,e])}}Pn.empty=new Pn([]);class Td{constructor(e,t,n=0,i=e?e.length:0){this.mirror=t,this.from=n,this.to=i,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new Td(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let i=e.getMirror(t);this.appendMap(e._maps[t],i!=null&&i<t?n+i:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?n-i-1:void 0)}}invert(){let e=new Td;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let i=0;for(let a=this.from;a<this.to;a++){let o=this._maps[a],s=o.mapResult(e,t);if(s.recover!=null){let l=this.getMirror(a);if(l!=null&&l>a&&l<this.to){a=l,e=this._maps[l].recover(s.recover);continue}}i|=s.delInfo,e=s.pos}return n?e:new lw(e,i,null)}}const R1=Object.create(null);class Qr{getMap(){return Pn.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=R1[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in R1)throw new RangeError("Duplicate use of step JSON ID "+e);return R1[e]=t,t.prototype.jsonID=e,t}}class dr{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new dr(e,null)}static fail(e){return new dr(null,e)}static fromReplace(e,t,n,i){try{return dr.ok(e.replace(t,n,i))}catch(a){if(a instanceof mg)return dr.fail(a.message);throw a}}}function uT(r,e,t){let n=[];for(let i=0;i<r.childCount;i++){let a=r.child(i);a.content.size&&(a=a.copy(uT(a.content,e,a))),a.isInline&&(a=e(a,t,i)),n.push(a)}return ne.fromArray(n)}class rs extends Qr{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),i=n.node(n.sharedDepth(this.to)),a=new ye(uT(t.content,(o,s)=>!o.isAtom||!s.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),t.openStart,t.openEnd);return dr.fromReplace(e,this.from,this.to,a)}invert(){return new da(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new rs(t.pos,n.pos,this.mark)}merge(e){return e instanceof rs&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new rs(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new rs(t.from,t.to,e.markFromJSON(t.mark))}}Qr.jsonID("addMark",rs);class da extends Qr{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new ye(uT(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return dr.fromReplace(e,this.from,this.to,n)}invert(){return new rs(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new da(t.pos,n.pos,this.mark)}merge(e){return e instanceof da&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new da(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new da(t.from,t.to,e.markFromJSON(t.mark))}}Qr.jsonID("removeMark",da);class ns extends Qr{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return dr.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return dr.fromReplace(e,this.pos,this.pos+1,new ye(ne.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let n=this.mark.addToSet(t.marks);if(n.length==t.marks.length){for(let i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(n))return new ns(this.pos,t.marks[i]);return new ns(this.pos,this.mark)}}return new cu(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ns(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ns(t.pos,e.markFromJSON(t.mark))}}Qr.jsonID("addNodeMark",ns);class cu extends Qr{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return dr.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return dr.fromReplace(e,this.pos,this.pos+1,new ye(ne.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new ns(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new cu(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new cu(t.pos,e.markFromJSON(t.mark))}}Qr.jsonID("removeNodeMark",cu);class Mr extends Qr{constructor(e,t,n,i=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=i}apply(e){return this.structure&&uw(e,this.from,this.to)?dr.fail("Structure replace would overwrite content"):dr.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Pn([this.from,this.to-this.from,this.slice.size])}invert(e){return new Mr(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new Mr(t.pos,Math.max(t.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Mr)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?ye.empty:new ye(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Mr(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?ye.empty:new ye(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Mr(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Mr(t.from,t.to,ye.fromJSON(e,t.slice),!!t.structure)}}Qr.jsonID("replace",Mr);class Dr extends Qr{constructor(e,t,n,i,a,o,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=i,this.slice=a,this.insert=o,this.structure=s}apply(e){if(this.structure&&(uw(e,this.from,this.gapFrom)||uw(e,this.gapTo,this.to)))return dr.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return dr.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?dr.fromReplace(e,this.from,this.to,n):dr.fail("Content does not fit in gap")}getMap(){return new Pn([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Dr(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),i=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),a=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||i<t.pos||a>n.pos?null:new Dr(t.pos,n.pos,i,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Dr(t.from,t.to,t.gapFrom,t.gapTo,ye.fromJSON(e,t.slice),t.insert,!!t.structure)}}Qr.jsonID("replaceAround",Dr);function uw(r,e,t){let n=r.resolve(e),i=t-e,a=n.depth;for(;i>0&&a>0&&n.indexAfter(a)==n.node(a).childCount;)a--,i--;if(i>0){let o=n.node(a).maybeChild(n.indexAfter(a));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function BY(r,e,t,n){let i=[],a=[],o,s;r.doc.nodesBetween(e,t,(l,u,c)=>{if(!l.isInline)return;let f=l.marks;if(!n.isInSet(f)&&c.type.allowsMarkType(n.type)){let h=Math.max(u,e),d=Math.min(u+l.nodeSize,t),p=n.addToSet(f);for(let v=0;v<f.length;v++)f[v].isInSet(p)||(o&&o.to==h&&o.mark.eq(f[v])?o.to=d:i.push(o=new da(h,d,f[v])));s&&s.to==h?s.to=d:a.push(s=new rs(h,d,n))}}),i.forEach(l=>r.step(l)),a.forEach(l=>r.step(l))}function zY(r,e,t,n){let i=[],a=0;r.doc.nodesBetween(e,t,(o,s)=>{if(!o.isInline)return;a++;let l=null;if(n instanceof d0){let u=o.marks,c;for(;c=n.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else n?n.isInSet(o.marks)&&(l=[n]):l=o.marks;if(l&&l.length){let u=Math.min(s+o.nodeSize,t);for(let c=0;c<l.length;c++){let f=l[c],h;for(let d=0;d<i.length;d++){let p=i[d];p.step==a-1&&f.eq(i[d].style)&&(h=p)}h?(h.to=u,h.step=a):i.push({style:f,from:Math.max(s,e),to:u,step:a})}}}),i.forEach(o=>r.step(new da(o.from,o.to,o.style)))}function cT(r,e,t,n=t.contentMatch,i=!0){let a=r.doc.nodeAt(e),o=[],s=e+1;for(let l=0;l<a.childCount;l++){let u=a.child(l),c=s+u.nodeSize,f=n.matchType(u.type);if(!f)o.push(new Mr(s,c,ye.empty));else{n=f;for(let h=0;h<u.marks.length;h++)t.allowsMarkType(u.marks[h].type)||r.step(new da(s,c,u.marks[h]));if(i&&u.isText&&t.whitespace!="pre"){let h,d=/\r?\n|\r/g,p;for(;h=d.exec(u.text);)p||(p=new ye(ne.from(t.schema.text(" ",t.allowedMarks(u.marks))),0,0)),o.push(new Mr(s+h.index,s+h.index+h[0].length,p))}}s=c}if(!n.validEnd){let l=n.fillBefore(ne.empty,!0);r.replace(s,s,new ye(l,0,0))}for(let l=o.length-1;l>=0;l--)r.step(o[l])}function FY(r,e,t){return(e==0||r.canReplace(e,r.childCount))&&(t==r.childCount||r.canReplace(0,t))}function hf(r){let t=r.parent.content.cutByIndex(r.startIndex,r.endIndex);for(let n=r.depth;;--n){let i=r.$from.node(n),a=r.$from.index(n),o=r.$to.indexAfter(n);if(n<r.depth&&i.canReplace(a,o,t))return n;if(n==0||i.type.spec.isolating||!FY(i,a,o))break}return null}function VY(r,e,t){let{$from:n,$to:i,depth:a}=e,o=n.before(a+1),s=i.after(a+1),l=o,u=s,c=ne.empty,f=0;for(let p=a,v=!1;p>t;p--)v||n.index(p)>0?(v=!0,c=ne.from(n.node(p).copy(c)),f++):l--;let h=ne.empty,d=0;for(let p=a,v=!1;p>t;p--)v||i.after(p+1)<i.end(p)?(v=!0,h=ne.from(i.node(p).copy(h)),d++):u++;r.step(new Dr(l,u,o,s,new ye(c.append(h),f,d),c.size-f,!0))}function fT(r,e,t=null,n=r){let i=$Y(r,e),a=i&&HY(n,e);return a?i.map(vk).concat({type:e,attrs:t}).concat(a.map(vk)):null}function vk(r){return{type:r,attrs:null}}function $Y(r,e){let{parent:t,startIndex:n,endIndex:i}=r,a=t.contentMatchAt(n).findWrapping(e);if(!a)return null;let o=a.length?a[0]:e;return t.canReplaceWith(n,i,o)?a:null}function HY(r,e){let{parent:t,startIndex:n,endIndex:i}=r,a=t.child(n),o=e.contentMatch.findWrapping(a.type);if(!o)return null;let l=(o.length?o[o.length-1]:e).contentMatch;for(let u=n;l&&u<i;u++)l=l.matchType(t.child(u).type);return!l||!l.validEnd?null:o}function GY(r,e,t){let n=ne.empty;for(let o=t.length-1;o>=0;o--){if(n.size){let s=t[o].type.contentMatch.matchFragment(n);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=ne.from(t[o].type.create(t[o].attrs,n))}let i=e.start,a=e.end;r.step(new Dr(i,a,i,a,new ye(n,0,0),t.length,!0))}function WY(r,e,t,n,i){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let a=r.steps.length;r.doc.nodesBetween(e,t,(o,s)=>{let l=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(n,l)&&UY(r.doc,r.mapping.slice(a).map(s),n)){let u=null;if(n.schema.linebreakReplacement){let d=n.whitespace=="pre",p=!!n.contentMatch.matchType(n.schema.linebreakReplacement);d&&!p?u=!1:!d&&p&&(u=!0)}u===!1&&YN(r,o,s,a),cT(r,r.mapping.slice(a).map(s,1),n,void 0,u===null);let c=r.mapping.slice(a),f=c.map(s,1),h=c.map(s+o.nodeSize,1);return r.step(new Dr(f,h,f+1,h-1,new ye(ne.from(n.create(l,null,o.marks)),0,0),1,!0)),u===!0&&UN(r,o,s,a),!1}})}function UN(r,e,t,n){e.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let l=r.mapping.slice(n).map(t+1+a+o.index);r.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function YN(r,e,t,n){e.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let o=r.mapping.slice(n).map(t+1+a);r.replaceWith(o,o+1,e.type.schema.text(`
|
||
`))}})}function UY(r,e,t){let n=r.resolve(e),i=n.index();return n.parent.canReplaceWith(i,i+1,t)}function YY(r,e,t,n,i){let a=r.doc.nodeAt(e);if(!a)throw new RangeError("No node at given position");t||(t=a.type);let o=t.create(n,null,i||a.marks);if(a.isLeaf)return r.replaceWith(e,e+a.nodeSize,o);if(!t.validContent(a.content))throw new RangeError("Invalid content for node type "+t.name);r.step(new Dr(e,e+a.nodeSize,e+1,e+a.nodeSize-1,new ye(ne.from(o),0,0),1,!0))}function uo(r,e,t=1,n){let i=r.resolve(e),a=i.depth-t,o=n&&n[n.length-1]||i.parent;if(a<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,c=t-2;u>a;u--,c--){let f=i.node(u),h=i.index(u);if(f.type.spec.isolating)return!1;let d=f.content.cutByIndex(h,f.childCount),p=n&&n[c+1];p&&(d=d.replaceChild(0,p.type.create(p.attrs)));let v=n&&n[c]||f;if(!f.canReplace(h+1,f.childCount)||!v.type.validContent(d))return!1}let s=i.indexAfter(a),l=n&&n[0];return i.node(a).canReplaceWith(s,s,l?l.type:i.node(a+1).type)}function qY(r,e,t=1,n){let i=r.doc.resolve(e),a=ne.empty,o=ne.empty;for(let s=i.depth,l=i.depth-t,u=t-1;s>l;s--,u--){a=ne.from(i.node(s).copy(a));let c=n&&n[u];o=ne.from(c?c.type.create(c.attrs,o):i.node(s).copy(o))}r.step(new Mr(e,e,new ye(a.append(o),t,t),!0))}function Ns(r,e){let t=r.resolve(e),n=t.index();return qN(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(n,n+1)}function XY(r,e){e.content.size||r.type.compatibleContent(e.type);let t=r.contentMatchAt(r.childCount),{linebreakReplacement:n}=r.type.schema;for(let i=0;i<e.childCount;i++){let a=e.child(i),o=a.type==n?r.type.schema.nodes.text:a.type;if(t=t.matchType(o),!t||!r.type.allowsMarks(a.marks))return!1}return t.validEnd}function qN(r,e){return!!(r&&e&&!r.isLeaf&&XY(r,e))}function v0(r,e,t=-1){let n=r.resolve(e);for(let i=n.depth;;i--){let a,o,s=n.index(i);if(i==n.depth?(a=n.nodeBefore,o=n.nodeAfter):t>0?(a=n.node(i+1),s++,o=n.node(i).maybeChild(s)):(a=n.node(i).maybeChild(s-1),o=n.node(i+1)),a&&!a.isTextblock&&qN(a,o)&&n.node(i).canReplace(s,s+1))return e;if(i==0)break;e=t<0?n.before(i):n.after(i)}}function KY(r,e,t){let n=null,{linebreakReplacement:i}=r.doc.type.schema,a=r.doc.resolve(e-t),o=a.node().type;if(i&&o.inlineContent){let c=o.whitespace=="pre",f=!!o.contentMatch.matchType(i);c&&!f?n=!1:!c&&f&&(n=!0)}let s=r.steps.length;if(n===!1){let c=r.doc.resolve(e+t);YN(r,c.node(),c.before(),s)}o.inlineContent&&cT(r,e+t-1,o,a.node().contentMatchAt(a.index()),n==null);let l=r.mapping.slice(s),u=l.map(e-t);if(r.step(new Mr(u,l.map(e+t,-1),ye.empty,!0)),n===!0){let c=r.doc.resolve(u);UN(r,c.node(),c.before(),r.steps.length)}return r}function ZY(r,e,t){let n=r.resolve(e);if(n.parent.canReplaceWith(n.index(),n.index(),t))return e;if(n.parentOffset==0)for(let i=n.depth-1;i>=0;i--){let a=n.index(i);if(n.node(i).canReplaceWith(a,a,t))return n.before(i+1);if(a>0)return null}if(n.parentOffset==n.parent.content.size)for(let i=n.depth-1;i>=0;i--){let a=n.indexAfter(i);if(n.node(i).canReplaceWith(a,a,t))return n.after(i+1);if(a<n.node(i).childCount)return null}return null}function XN(r,e,t){let n=r.resolve(e);if(!t.content.size)return e;let i=t.content;for(let a=0;a<t.openStart;a++)i=i.firstChild.content;for(let a=1;a<=(t.openStart==0&&t.size?2:1);a++)for(let o=n.depth;o>=0;o--){let s=o==n.depth?0:n.pos<=(n.start(o+1)+n.end(o+1))/2?-1:1,l=n.index(o)+(s>0?1:0),u=n.node(o),c=!1;if(a==1)c=u.canReplace(l,l,i);else{let f=u.contentMatchAt(l).findWrapping(i.firstChild.type);c=f&&u.canReplaceWith(l,l,f[0])}if(c)return s==0?n.pos:s<0?n.before(o+1):n.after(o+1)}return null}function m0(r,e,t=e,n=ye.empty){if(e==t&&!n.size)return null;let i=r.resolve(e),a=r.resolve(t);return KN(i,a,n)?new Mr(e,t,n):new JY(i,a,n).fit()}function KN(r,e,t){return!t.openStart&&!t.openEnd&&r.start()==e.start()&&r.parent.canReplace(r.index(),e.index(),t.content)}class JY{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=ne.empty;for(let i=0;i<=e.depth;i++){let a=e.node(i);this.frontier.push({type:a.type,match:a.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=ne.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let a=this.placed,o=n.depth,s=i.depth;for(;o&&s&&a.childCount==1;)a=a.firstChild.content,o--,s--;let l=new ye(a,o,s);return e>-1?new Dr(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new Mr(n.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,i=this.unplaced.openEnd;n<e;n++){let a=t.firstChild;if(t.childCount>1&&(i=0),a.type.spec.isolating&&i<=n){e=n;break}t=a.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let i,a=null;n?(a=O1(this.unplaced.content,n-1).firstChild,i=a.content):i=this.unplaced.content;let o=i.firstChild;for(let s=this.depth;s>=0;s--){let{type:l,match:u}=this.frontier[s],c,f=null;if(t==1&&(o?u.matchType(o.type)||(f=u.fillBefore(ne.from(o),!1)):a&&l.compatibleContent(a.type)))return{sliceDepth:n,frontierDepth:s,parent:a,inject:f};if(t==2&&o&&(c=u.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:s,parent:a,wrap:c};if(a&&u.matchType(a.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=O1(e,t);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new ye(e,t+1,Math.max(n,i.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=O1(e,t);if(i.childCount<=1&&t>0){let a=e.size-t<=t+i.size;this.unplaced=new ye(wh(e,t-1,1),t-1,a?t-1:n)}else this.unplaced=new ye(wh(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:i,wrap:a}){for(;this.depth>t;)this.closeFrontierNode();if(a)for(let v=0;v<a.length;v++)this.openFrontierNode(a[v]);let o=this.unplaced,s=n?n.content:o.content,l=o.openStart-e,u=0,c=[],{match:f,type:h}=this.frontier[t];if(i){for(let v=0;v<i.childCount;v++)c.push(i.child(v));f=f.matchFragment(i)}let d=s.size+e-(o.content.size-o.openEnd);for(;u<s.childCount;){let v=s.child(u),m=f.matchType(v.type);if(!m)break;u++,(u>1||l==0||v.content.size)&&(f=m,c.push(ZN(v.mark(h.allowedMarks(v.marks)),u==1?l:0,u==s.childCount?d:-1)))}let p=u==s.childCount;p||(d=-1),this.placed=Sh(this.placed,t,ne.from(c)),this.frontier[t].match=f,p&&d<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let v=0,m=s;v<d;v++){let g=m.lastChild;this.frontier.push({type:g.type,match:g.contentMatchAt(g.childCount)}),m=g.content}this.unplaced=p?e==0?ye.empty:new ye(wh(o.content,e-1,1),e-1,d<0?o.openEnd:e-1):new ye(wh(o.content,e,u),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!j1(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,i=this.$to.after(n);for(;n>1&&i==this.$to.end(--n);)++i;return i}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:i}=this.frontier[t],a=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=j1(e,t,i,n,a);if(o){for(let s=t-1;s>=0;s--){let{match:l,type:u}=this.frontier[s],c=j1(e,s,u,l,!0);if(!c||c.childCount)continue e}return{depth:t,fit:o,move:a?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Sh(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let i=e.node(n),a=i.type.contentMatch.fillBefore(i.content,!0,e.index(n));this.openFrontierNode(i.type,i.attrs,a)}return e}openFrontierNode(e,t=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Sh(this.placed,this.depth,ne.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(ne.empty,!0);t.childCount&&(this.placed=Sh(this.placed,this.frontier.length,t))}}function wh(r,e,t){return e==0?r.cutByIndex(t,r.childCount):r.replaceChild(0,r.firstChild.copy(wh(r.firstChild.content,e-1,t)))}function Sh(r,e,t){return e==0?r.append(t):r.replaceChild(r.childCount-1,r.lastChild.copy(Sh(r.lastChild.content,e-1,t)))}function O1(r,e){for(let t=0;t<e;t++)r=r.firstChild.content;return r}function ZN(r,e,t){if(e<=0)return r;let n=r.content;return e>1&&(n=n.replaceChild(0,ZN(n.firstChild,e-1,n.childCount==1?t-1:0))),e>0&&(n=r.type.contentMatch.fillBefore(n).append(n),t<=0&&(n=n.append(r.type.contentMatch.matchFragment(n).fillBefore(ne.empty,!0)))),r.copy(n)}function j1(r,e,t,n,i){let a=r.node(e),o=i?r.indexAfter(e):r.index(e);if(o==a.childCount&&!t.compatibleContent(a.type))return null;let s=n.fillBefore(a.content,!0,o);return s&&!QY(t,a.content,o)?s:null}function QY(r,e,t){for(let n=t;n<e.childCount;n++)if(!r.allowsMarks(e.child(n).marks))return!0;return!1}function eq(r){return r.spec.defining||r.spec.definingForContent}function tq(r,e,t,n){if(!n.size)return r.deleteRange(e,t);let i=r.doc.resolve(e),a=r.doc.resolve(t);if(KN(i,a,n))return r.step(new Mr(e,t,n));let o=QN(i,r.doc.resolve(t));o[o.length-1]==0&&o.pop();let s=-(i.depth+1);o.unshift(s);for(let h=i.depth,d=i.pos-1;h>0;h--,d--){let p=i.node(h).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(h)>-1?s=h:i.before(h)==d&&o.splice(1,0,-h)}let l=o.indexOf(s),u=[],c=n.openStart;for(let h=n.content,d=0;;d++){let p=h.firstChild;if(u.push(p),d==n.openStart)break;h=p.content}for(let h=c-1;h>=0;h--){let d=u[h],p=eq(d.type);if(p&&!d.sameMarkup(i.node(Math.abs(s)-1)))c=h;else if(p||!d.type.isTextblock)break}for(let h=n.openStart;h>=0;h--){let d=(h+c+1)%(n.openStart+1),p=u[d];if(p)for(let v=0;v<o.length;v++){let m=o[(v+l)%o.length],g=!0;m<0&&(g=!1,m=-m);let y=i.node(m-1),b=i.index(m-1);if(y.canReplaceWith(b,b,p.type,p.marks))return r.replace(i.before(m),g?a.after(m):t,new ye(JN(n.content,0,n.openStart,d),d,n.openEnd))}}let f=r.steps.length;for(let h=o.length-1;h>=0&&(r.replace(e,t,n),!(r.steps.length>f));h--){let d=o[h];d<0||(e=i.before(d),t=a.after(d))}}function JN(r,e,t,n,i){if(e<t){let a=r.firstChild;r=r.replaceChild(0,a.copy(JN(a.content,e+1,t,n,a)))}if(e>n){let a=i.contentMatchAt(0),o=a.fillBefore(r).append(r);r=o.append(a.matchFragment(o).fillBefore(ne.empty,!0))}return r}function rq(r,e,t,n){if(!n.isInline&&e==t&&r.doc.resolve(e).parent.content.size){let i=ZY(r.doc,e,n.type);i!=null&&(e=t=i)}r.replaceRange(e,t,new ye(ne.from(n),0,0))}function nq(r,e,t){let n=r.doc.resolve(e),i=r.doc.resolve(t),a=QN(n,i);for(let o=0;o<a.length;o++){let s=a[o],l=o==a.length-1;if(l&&s==0||n.node(s).type.contentMatch.validEnd)return r.delete(n.start(s),i.end(s));if(s>0&&(l||n.node(s-1).canReplace(n.index(s-1),i.indexAfter(s-1))))return r.delete(n.before(s),i.after(s))}for(let o=1;o<=n.depth&&o<=i.depth;o++)if(e-n.start(o)==n.depth-o&&t>n.end(o)&&i.end(o)-t!=i.depth-o&&n.start(o-1)==i.start(o-1)&&n.node(o-1).canReplace(n.index(o-1),i.index(o-1)))return r.delete(n.before(o),t);r.delete(e,t)}function QN(r,e){let t=[],n=Math.min(r.depth,e.depth);for(let i=n;i>=0;i--){let a=r.start(i);if(a<r.pos-(r.depth-i)||e.end(i)>e.pos+(e.depth-i)||r.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(a==e.start(i)||i==r.depth&&i==e.depth&&r.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==a-1)&&t.push(i)}return t}class Pc extends Qr{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return dr.fail("No node at attribute step's position");let n=Object.create(null);for(let a in t.attrs)n[a]=t.attrs[a];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return dr.fromReplace(e,this.pos,this.pos+1,new ye(ne.from(i),0,t.isLeaf?0:1))}getMap(){return Pn.empty}invert(e){return new Pc(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Pc(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Pc(t.pos,t.attr,t.value)}}Qr.jsonID("attr",Pc);class Cd extends Qr{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return dr.ok(n)}getMap(){return Pn.empty}invert(e){return new Cd(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Cd(t.attr,t.value)}}Qr.jsonID("docAttr",Cd);let Yc=class extends Error{};Yc=function r(e){let t=Error.call(this,e);return t.__proto__=r.prototype,t};Yc.prototype=Object.create(Error.prototype);Yc.prototype.constructor=Yc;Yc.prototype.name="TransformError";class e5{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Td}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Yc(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=ye.empty){let i=m0(this.doc,e,t,n);return i&&this.step(i),this}replaceWith(e,t,n){return this.replace(e,t,new ye(ne.from(n),0,0))}delete(e,t){return this.replace(e,t,ye.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return tq(this,e,t,n),this}replaceRangeWith(e,t,n){return rq(this,e,t,n),this}deleteRange(e,t){return nq(this,e,t),this}lift(e,t){return VY(this,e,t),this}join(e,t=1){return KY(this,e,t),this}wrap(e,t){return GY(this,e,t),this}setBlockType(e,t=e,n,i=null){return WY(this,e,t,n,i),this}setNodeMarkup(e,t,n=null,i){return YY(this,e,t,n,i),this}setNodeAttribute(e,t,n){return this.step(new Pc(e,t,n)),this}setDocAttribute(e,t){return this.step(new Cd(e,t)),this}addNodeMark(e,t){return this.step(new ns(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(t instanceof Wt)t.isInSet(n.marks)&&this.step(new cu(e,t));else{let i=n.marks,a,o=[];for(;a=t.isInSet(i);)o.push(new cu(e,a)),i=a.removeFromSet(i);for(let s=o.length-1;s>=0;s--)this.step(o[s])}return this}split(e,t=1,n){return qY(this,e,t,n),this}addMark(e,t,n){return BY(this,e,t,n),this}removeMark(e,t,n){return zY(this,e,t,n),this}clearIncompatible(e,t,n){return cT(this,e,t,n),this}}const N1=Object.create(null);class qe{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new t5(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=ye.empty){let n=t.content.lastChild,i=null;for(let s=0;s<t.openEnd;s++)i=n,n=n.lastChild;let a=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:l,$to:u}=o[s],c=e.mapping.slice(a);e.replaceRange(c.map(l.pos),c.map(u.pos),s?ye.empty:t),s==0&&yk(e,a,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,i=this.ranges;for(let a=0;a<i.length;a++){let{$from:o,$to:s}=i[a],l=e.mapping.slice(n),u=l.map(o.pos),c=l.map(s.pos);a?e.deleteRange(u,c):(e.replaceRangeWith(u,c,t),yk(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let i=e.parent.inlineContent?new We(e):gc(e.node(0),e.parent,e.pos,e.index(),t,n);if(i)return i;for(let a=e.depth-1;a>=0;a--){let o=t<0?gc(e.node(0),e.node(a),e.before(a+1),e.index(a),t,n):gc(e.node(0),e.node(a),e.after(a+1),e.index(a)+1,t,n);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Bn(e.node(0))}static atStart(e){return gc(e,e,0,0,1)||new Bn(e)}static atEnd(e){return gc(e,e,e.content.size,e.childCount,-1)||new Bn(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=N1[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in N1)throw new RangeError("Duplicate use of selection JSON ID "+e);return N1[e]=t,t.prototype.jsonID=e,t}getBookmark(){return We.between(this.$anchor,this.$head).getBookmark()}}qe.prototype.visible=!0;class t5{constructor(e,t){this.$from=e,this.$to=t}}let mk=!1;function gk(r){!mk&&!r.parent.inlineContent&&(mk=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+r.parent.type.name+")"))}class We extends qe{constructor(e,t=e){gk(e),gk(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return qe.near(n);let i=e.resolve(t.map(this.anchor));return new We(i.parent.inlineContent?i:n,n)}replace(e,t=ye.empty){if(super.replace(e,t),t==ye.empty){let n=this.$from.marksAcross(this.$to);n&&e.ensureMarks(n)}}eq(e){return e instanceof We&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new g0(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new We(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let i=e.resolve(t);return new this(i,n==t?i:e.resolve(n))}static between(e,t,n){let i=e.pos-t.pos;if((!n||i)&&(n=i>=0?1:-1),!t.parent.inlineContent){let a=qe.findFrom(t,n,!0)||qe.findFrom(t,-n,!0);if(a)t=a.$head;else return qe.near(t,n)}return e.parent.inlineContent||(i==0?e=t:(e=(qe.findFrom(e,-n,!0)||qe.findFrom(e,n,!0)).$anchor,e.pos<t.pos!=i<0&&(e=t))),new We(e,t)}}qe.jsonID("text",We);class g0{constructor(e,t){this.anchor=e,this.head=t}map(e){return new g0(e.map(this.anchor),e.map(this.head))}resolve(e){return We.between(e.resolve(this.anchor),e.resolve(this.head))}}class Ne extends qe{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:i}=t.mapResult(this.anchor),a=e.resolve(i);return n?qe.near(a):new Ne(a)}content(){return new ye(ne.from(this.node),0,0)}eq(e){return e instanceof Ne&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new hT(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Ne(e.resolve(t.anchor))}static create(e,t){return new Ne(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Ne.prototype.visible=!1;qe.jsonID("node",Ne);class hT{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new g0(n,n):new hT(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&Ne.isSelectable(n)?new Ne(t):qe.near(t)}}class Bn extends qe{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=ye.empty){if(t==ye.empty){e.delete(0,e.doc.content.size);let n=qe.atStart(e.doc);n.eq(e.selection)||e.setSelection(n)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Bn(e)}map(e){return new Bn(e)}eq(e){return e instanceof Bn}getBookmark(){return iq}}qe.jsonID("all",Bn);const iq={map(){return this},resolve(r){return new Bn(r)}};function gc(r,e,t,n,i,a=!1){if(e.inlineContent)return We.create(r,t);for(let o=n-(i>0?0:1);i>0?o<e.childCount:o>=0;o+=i){let s=e.child(o);if(s.isAtom){if(!a&&Ne.isSelectable(s))return Ne.create(r,t-(i<0?s.nodeSize:0))}else{let l=gc(r,s,t+i,i<0?s.childCount:0,i,a);if(l)return l}t+=s.nodeSize*i}return null}function yk(r,e,t){let n=r.steps.length-1;if(n<e)return;let i=r.steps[n];if(!(i instanceof Mr||i instanceof Dr))return;let a=r.mapping.maps[n],o;a.forEach((s,l,u,c)=>{o==null&&(o=c)}),r.setSelection(qe.near(r.doc.resolve(o),t))}function bk(r,e){return!e||!r?r:r.bind(e)}class Kp{constructor(e,t,n){this.name=e,this.init=bk(t.init,n),this.apply=bk(t.apply,n)}}new Kp("doc",{init(r){return r.doc||r.schema.topNodeType.createAndFill()},apply(r){return r.doc}}),new Kp("selection",{init(r,e){return r.selection||qe.atStart(e.doc)},apply(r){return r.selection}}),new Kp("storedMarks",{init(r){return r.storedMarks||null},apply(r,e,t,n){return n.selection.$cursor?r.storedMarks:null}}),new Kp("scrollToSelection",{init(){return 0},apply(r,e){return r.scrolledIntoView?e+1:e}});function r5(r,e,t){for(let n in r){let i=r[n];i instanceof Function?i=i.bind(e):n=="handleDOMEvents"&&(i=r5(i,e,{})),t[n]=i}return t}class Ut{constructor(e){this.spec=e,this.props={},e.props&&r5(e.props,this,this.props),this.key=e.key?e.key.key:n5("plugin")}getState(e){return e[this.key]}}const B1=Object.create(null);function n5(r){return r in B1?r+"$"+ ++B1[r]:(B1[r]=0,r+"$")}class jt{constructor(e="key"){this.key=n5(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Tu=function(r){for(var e=0;;e++)if(r=r.previousSibling,!r)return e},i5=function(r,e,t,n){return t&&(_k(r,e,t,n,-1)||_k(r,e,t,n,1))},aq=/^(img|br|input|textarea|hr)$/i;function _k(r,e,t,n,i){for(var a;;){if(r==t&&e==n)return!0;if(e==(i<0?0:_g(r))){let o=r.parentNode;if(!o||o.nodeType!=1||dT(r)||aq.test(r.nodeName)||r.contentEditable=="false")return!1;e=Tu(r)+(i<0?0:1),r=o}else if(r.nodeType==1){let o=r.childNodes[e+(i<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((a=o.pmViewDesc)===null||a===void 0)&&a.ignoreForSelection)e+=i;else return!1;else r=o,e=i<0?_g(r):0}else return!1}}function _g(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function oq(r,e,t){for(let n=e==0,i=e==_g(r);n||i;){if(r==t)return!0;let a=Tu(r);if(r=r.parentNode,!r)return!1;n=n&&a==0,i=i&&a==_g(r)}}function dT(r){let e;for(let t=r;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==r||e.contentDOM==r)}const a5=function(r){return r.focusNode&&i5(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)};function o5(r,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=r,t.key=t.code=e,t}const ka=typeof navigator<"u"?navigator:null,xk=typeof document<"u"?document:null,Bs=ka&&ka.userAgent||"",cw=/Edge\/(\d+)/.exec(Bs),s5=/MSIE \d/.exec(Bs),fw=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Bs),mp=!!(s5||fw||cw),l5=s5?document.documentMode:fw?+fw[1]:cw?+cw[1]:0,y0=!mp&&/gecko\/(\d+)/i.test(Bs);y0&&+(/Firefox\/(\d+)/.exec(Bs)||[0,0])[1];const hw=!mp&&/Chrome\/(\d+)/.exec(Bs),zs=!!hw,u5=hw?+hw[1]:0,Cu=!mp&&!!ka&&/Apple Computer/.test(ka.vendor),pT=Cu&&(/Mobile\/\w+/.test(Bs)||!!ka&&ka.maxTouchPoints>2),ri=pT||(ka?/Mac/.test(ka.platform):!1),sq=ka?/Win/.test(ka.platform):!1,gp=/Android \d/.test(Bs),vT=!!xk&&"webkitFontSmoothing"in xk.documentElement.style,lq=vT?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function uq(r,e=null){let t=r.domSelectionRange(),n=r.state.doc;if(!t.focusNode)return null;let i=r.docView.nearestDesc(t.focusNode),a=i&&i.size==0,o=r.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(o<0)return null;let s=n.resolve(o),l,u;if(a5(t)){for(l=o;i&&!i.node;)i=i.parent;let f=i.node;if(i&&f.isAtom&&Ne.isSelectable(f)&&i.parent&&!(f.isInline&&oq(t.focusNode,t.focusOffset,i.dom))){let h=i.posBefore;u=new Ne(o==h?s:n.resolve(h))}}else{if(t instanceof r.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let f=o,h=o;for(let d=0;d<t.rangeCount;d++){let p=t.getRangeAt(d);f=Math.min(f,r.docView.posFromDOM(p.startContainer,p.startOffset,1)),h=Math.max(h,r.docView.posFromDOM(p.endContainer,p.endOffset,-1))}if(f<0)return null;[l,o]=h==r.state.selection.anchor?[h,f]:[f,h],s=n.resolve(o)}else l=r.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(l<0)return null}let c=n.resolve(l);if(!u){let f=e=="pointer"||r.state.selection.head<s.pos&&!a?1:-1;u=f5(r,c,s,f)}return u}function c5(r){return r.editable?r.hasFocus():dq(r)&&document.activeElement&&document.activeElement.contains(r.dom)}function mT(r,e=!1){let t=r.state.selection;if(hq(r,t),!!c5(r)){if(!e&&r.input.mouseDown&&r.input.mouseDown.allowDefault&&zs){let n=r.domSelectionRange(),i=r.domObserver.currentSelection;if(n.anchorNode&&i.anchorNode&&i5(n.anchorNode,n.anchorOffset,i.anchorNode,i.anchorOffset)){r.input.mouseDown.delayedSelectionSync=!0,r.domObserver.setCurSelection();return}}if(r.domObserver.disconnectSelection(),r.cursorWrapper)fq(r);else{let{anchor:n,head:i}=t,a,o;wk&&!(t instanceof We)&&(t.$from.parent.inlineContent||(a=Sk(r,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(o=Sk(r,t.to))),r.docView.setSelection(n,i,r,e),wk&&(a&&Tk(a),o&&Tk(o)),t.visible?r.dom.classList.remove("ProseMirror-hideselection"):(r.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&cq(r))}r.domObserver.setCurSelection(),r.domObserver.connectSelection()}}const wk=Cu||zs&&u5<63;function Sk(r,e){let{node:t,offset:n}=r.docView.domFromPos(e,0),i=n<t.childNodes.length?t.childNodes[n]:null,a=n?t.childNodes[n-1]:null;if(Cu&&i&&i.contentEditable=="false")return z1(i);if((!i||i.contentEditable=="false")&&(!a||a.contentEditable=="false")){if(i)return z1(i);if(a)return z1(a)}}function z1(r){return r.contentEditable="true",Cu&&r.draggable&&(r.draggable=!1,r.wasDraggable=!0),r}function Tk(r){r.contentEditable="false",r.wasDraggable&&(r.draggable=!0,r.wasDraggable=null)}function cq(r){let e=r.dom.ownerDocument;e.removeEventListener("selectionchange",r.input.hideSelectionGuard);let t=r.domSelectionRange(),n=t.anchorNode,i=t.anchorOffset;e.addEventListener("selectionchange",r.input.hideSelectionGuard=()=>{(t.anchorNode!=n||t.anchorOffset!=i)&&(e.removeEventListener("selectionchange",r.input.hideSelectionGuard),setTimeout(()=>{(!c5(r)||r.state.selection.visible)&&r.dom.classList.remove("ProseMirror-hideselection")},20))})}function fq(r){let e=r.domSelection(),t=document.createRange();if(!e)return;let n=r.cursorWrapper.dom,i=n.nodeName=="IMG";i?t.setStart(n.parentNode,Tu(n)+1):t.setStart(n,0),t.collapse(!0),e.removeAllRanges(),e.addRange(t),!i&&!r.state.selection.visible&&mp&&l5<=11&&(n.disabled=!0,n.disabled=!1)}function hq(r,e){if(e instanceof Ne){let t=r.docView.descAt(e.from);t!=r.lastSelectedViewDesc&&(Ck(r),t&&t.selectNode(),r.lastSelectedViewDesc=t)}else Ck(r)}function Ck(r){r.lastSelectedViewDesc&&(r.lastSelectedViewDesc.parent&&r.lastSelectedViewDesc.deselectNode(),r.lastSelectedViewDesc=void 0)}function f5(r,e,t,n){return r.someProp("createSelectionBetween",i=>i(r,e,t))||We.between(e,t,n)}function dq(r){let e=r.domSelectionRange();if(!e.anchorNode)return!1;try{return r.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(r.editable||r.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function dw(r,e){let{$anchor:t,$head:n}=r.selection,i=e>0?t.max(n):t.min(n),a=i.parent.inlineContent?i.depth?r.doc.resolve(e>0?i.after():i.before()):null:i;return a&&qe.findFrom(a,e)}function Xo(r,e){return r.dispatch(r.state.tr.setSelection(e).scrollIntoView()),!0}function Ak(r,e,t){let n=r.state.selection;if(n instanceof We)if(t.indexOf("s")>-1){let{$head:i}=n,a=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!a||a.isText||!a.isLeaf)return!1;let o=r.state.doc.resolve(i.pos+a.nodeSize*(e<0?-1:1));return Xo(r,new We(n.$anchor,o))}else if(n.empty){if(r.endOfTextblock(e>0?"forward":"backward")){let i=dw(r.state,e);return i&&i instanceof Ne?Xo(r,i):!1}else if(!(ri&&t.indexOf("m")>-1)){let i=n.$head,a=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,o;if(!a||a.isText)return!1;let s=e<0?i.pos-a.nodeSize:i.pos;return a.isAtom||(o=r.docView.descAt(s))&&!o.contentDOM?Ne.isSelectable(a)?Xo(r,new Ne(e<0?r.state.doc.resolve(i.pos-a.nodeSize):i)):vT?Xo(r,new We(r.state.doc.resolve(e<0?s:s+a.nodeSize))):!1:!1}}else return!1;else{if(n instanceof Ne&&n.node.isInline)return Xo(r,new We(e>0?n.$to:n.$from));{let i=dw(r.state,e);return i?Xo(r,i):!1}}}function xg(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function Uh(r,e){let t=r.pmViewDesc;return t&&t.size==0&&(e<0||r.nextSibling||r.nodeName!="BR")}function Wu(r,e){return e<0?pq(r):vq(r)}function pq(r){let e=r.domSelectionRange(),t=e.focusNode,n=e.focusOffset;if(!t)return;let i,a,o=!1;for(y0&&t.nodeType==1&&n<xg(t)&&Uh(t.childNodes[n],-1)&&(o=!0);;)if(n>0){if(t.nodeType!=1)break;{let s=t.childNodes[n-1];if(Uh(s,-1))i=t,a=--n;else if(s.nodeType==3)t=s,n=t.nodeValue.length;else break}}else{if(h5(t))break;{let s=t.previousSibling;for(;s&&Uh(s,-1);)i=t.parentNode,a=Tu(s),s=s.previousSibling;if(s)t=s,n=xg(t);else{if(t=t.parentNode,t==r.dom)break;n=0}}}o?pw(r,t,n):i&&pw(r,i,a)}function vq(r){let e=r.domSelectionRange(),t=e.focusNode,n=e.focusOffset;if(!t)return;let i=xg(t),a,o;for(;;)if(n<i){if(t.nodeType!=1)break;let s=t.childNodes[n];if(Uh(s,1))a=t,o=++n;else break}else{if(h5(t))break;{let s=t.nextSibling;for(;s&&Uh(s,1);)a=s.parentNode,o=Tu(s)+1,s=s.nextSibling;if(s)t=s,n=0,i=xg(t);else{if(t=t.parentNode,t==r.dom)break;n=i=0}}}a&&pw(r,a,o)}function h5(r){let e=r.pmViewDesc;return e&&e.node&&e.node.isBlock}function mq(r,e){for(;r&&e==r.childNodes.length&&!dT(r);)e=Tu(r)+1,r=r.parentNode;for(;r&&e<r.childNodes.length;){let t=r.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;r=t,e=0}}function gq(r,e){for(;r&&!e&&!dT(r);)e=Tu(r),r=r.parentNode;for(;r&&e;){let t=r.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;r=t,e=r.childNodes.length}}function pw(r,e,t){if(e.nodeType!=3){let a,o;(o=mq(e,t))?(e=o,t=0):(a=gq(e,t))&&(e=a,t=a.nodeValue.length)}let n=r.domSelection();if(!n)return;if(a5(n)){let a=document.createRange();a.setEnd(e,t),a.setStart(e,t),n.removeAllRanges(),n.addRange(a)}else n.extend&&n.extend(e,t);r.domObserver.setCurSelection();let{state:i}=r;setTimeout(()=>{r.state==i&&mT(r)},50)}function Mk(r,e){let t=r.state.doc.resolve(e);if(!(zs||sq)&&t.parent.inlineContent){let i=r.coordsAtPos(e);if(e>t.start()){let a=r.coordsAtPos(e-1),o=(a.top+a.bottom)/2;if(o>i.top&&o<i.bottom&&Math.abs(a.left-i.left)>1)return a.left<i.left?"ltr":"rtl"}if(e<t.end()){let a=r.coordsAtPos(e+1),o=(a.top+a.bottom)/2;if(o>i.top&&o<i.bottom&&Math.abs(a.left-i.left)>1)return a.left>i.left?"ltr":"rtl"}}return getComputedStyle(r.dom).direction=="rtl"?"rtl":"ltr"}function kk(r,e,t){let n=r.state.selection;if(n instanceof We&&!n.empty||t.indexOf("s")>-1||ri&&t.indexOf("m")>-1)return!1;let{$from:i,$to:a}=n;if(!i.parent.inlineContent||r.endOfTextblock(e<0?"up":"down")){let o=dw(r.state,e);if(o&&o instanceof Ne)return Xo(r,o)}if(!i.parent.inlineContent){let o=e<0?i:a,s=n instanceof Bn?qe.near(o,e):qe.findFrom(o,e);return s?Xo(r,s):!1}return!1}function Dk(r,e){if(!(r.state.selection instanceof We))return!0;let{$head:t,$anchor:n,empty:i}=r.state.selection;if(!t.sameParent(n))return!0;if(!i)return!1;if(r.endOfTextblock(e>0?"forward":"backward"))return!0;let a=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(a&&!a.isText){let o=r.state.tr;return e<0?o.delete(t.pos-a.nodeSize,t.pos):o.delete(t.pos,t.pos+a.nodeSize),r.dispatch(o),!0}return!1}function Ek(r,e,t){r.domObserver.stop(),e.contentEditable=t,r.domObserver.start()}function yq(r){if(!Cu||r.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=r.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let n=e.firstChild;Ek(r,n,"true"),setTimeout(()=>Ek(r,n,"false"),20)}return!1}function bq(r){let e="";return r.ctrlKey&&(e+="c"),r.metaKey&&(e+="m"),r.altKey&&(e+="a"),r.shiftKey&&(e+="s"),e}function _q(r,e){let t=e.keyCode,n=bq(e);if(t==8||ri&&t==72&&n=="c")return Dk(r,-1)||Wu(r,-1);if(t==46&&!e.shiftKey||ri&&t==68&&n=="c")return Dk(r,1)||Wu(r,1);if(t==13||t==27)return!0;if(t==37||ri&&t==66&&n=="c"){let i=t==37?Mk(r,r.state.selection.from)=="ltr"?-1:1:-1;return Ak(r,i,n)||Wu(r,i)}else if(t==39||ri&&t==70&&n=="c"){let i=t==39?Mk(r,r.state.selection.from)=="ltr"?1:-1:1;return Ak(r,i,n)||Wu(r,i)}else{if(t==38||ri&&t==80&&n=="c")return kk(r,-1,n)||Wu(r,-1);if(t==40||ri&&t==78&&n=="c")return yq(r)||kk(r,1,n)||Wu(r,1);if(n==(ri?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function d5(r,e){r.someProp("transformCopied",d=>{e=d(e,r)});let t=[],{content:n,openStart:i,openEnd:a}=e;for(;i>1&&a>1&&n.childCount==1&&n.firstChild.childCount==1;){i--,a--;let d=n.firstChild;t.push(d.type.name,d.attrs!=d.type.defaultAttrs?d.attrs:null),n=d.content}let o=r.someProp("clipboardSerializer")||p0.fromSchema(r.state.schema),s=b5(),l=s.createElement("div");l.appendChild(o.serializeFragment(n,{document:s}));let u=l.firstChild,c,f=0;for(;u&&u.nodeType==1&&(c=y5[u.nodeName.toLowerCase()]);){for(let d=c.length-1;d>=0;d--){let p=s.createElement(c[d]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),f++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${i} ${a}${f?` -${f}`:""} ${JSON.stringify(t)}`);let h=r.someProp("clipboardTextSerializer",d=>d(e,r))||e.content.textBetween(0,e.content.size,`
|
||
|
||
`);return{dom:l,text:h,slice:e}}function p5(r,e,t,n,i){let a=i.parent.type.spec.code,o,s;if(!t&&!e)return null;let l=e&&(n||a||!t);if(l){if(r.someProp("transformPastedText",h=>{e=h(e,a||n,r)}),a)return e?new ye(ne.from(r.state.schema.text(e.replace(/\r\n?/g,`
|
||
`))),0,0):ye.empty;let f=r.someProp("clipboardTextParser",h=>h(e,i,n,r));if(f)s=f;else{let h=i.marks(),{schema:d}=r.state,p=p0.fromSchema(d);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(v=>{let m=o.appendChild(document.createElement("p"));v&&m.appendChild(p.serializeNode(d.text(v,h)))})}}else r.someProp("transformPastedHTML",f=>{t=f(t,r)}),o=Tq(t),vT&&Cq(o);let u=o&&o.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let f=+c[3];f>0;f--){let h=o.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;o=h}if(s||(s=(r.someProp("clipboardParser")||r.someProp("domParser")||Gh.fromSchema(r.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||c),context:i,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!xq.test(h.parentNode.nodeName)?{ignore:!0}:null}})),c)s=Aq(Lk(s,+c[1],+c[2]),c[4]);else if(s=ye.maxOpen(wq(s.content,i),!0),s.openStart||s.openEnd){let f=0,h=0;for(let d=s.content.firstChild;f<s.openStart&&!d.type.spec.isolating;f++,d=d.firstChild);for(let d=s.content.lastChild;h<s.openEnd&&!d.type.spec.isolating;h++,d=d.lastChild);s=Lk(s,f,h)}return r.someProp("transformPasted",f=>{s=f(s,r)}),s}const xq=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function wq(r,e){if(r.childCount<2)return r;for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.index(t)),a,o=[];if(r.forEach(s=>{if(!o)return;let l=i.findWrapping(s.type),u;if(!l)return o=null;if(u=o.length&&a.length&&m5(l,a,s,o[o.length-1],0))o[o.length-1]=u;else{o.length&&(o[o.length-1]=g5(o[o.length-1],a.length));let c=v5(s,l);o.push(c),i=i.matchType(c.type),a=l}}),o)return ne.from(o)}return r}function v5(r,e,t=0){for(let n=e.length-1;n>=t;n--)r=e[n].create(null,ne.from(r));return r}function m5(r,e,t,n,i){if(i<r.length&&i<e.length&&r[i]==e[i]){let a=m5(r,e,t,n.lastChild,i+1);if(a)return n.copy(n.content.replaceChild(n.childCount-1,a));if(n.contentMatchAt(n.childCount).matchType(i==r.length-1?t.type:r[i+1]))return n.copy(n.content.append(ne.from(v5(t,r,i+1))))}}function g5(r,e){if(e==0)return r;let t=r.content.replaceChild(r.childCount-1,g5(r.lastChild,e-1)),n=r.contentMatchAt(r.childCount).fillBefore(ne.empty,!0);return r.copy(t.append(n))}function vw(r,e,t,n,i,a){let o=e<0?r.firstChild:r.lastChild,s=o.content;return r.childCount>1&&(a=0),i<n-1&&(s=vw(s,e,t,n,i+1,a)),i>=t&&(s=e<0?o.contentMatchAt(0).fillBefore(s,a<=i).append(s):s.append(o.contentMatchAt(o.childCount).fillBefore(ne.empty,!0))),r.replaceChild(e<0?0:r.childCount-1,o.copy(s))}function Lk(r,e,t){return e<r.openStart&&(r=new ye(vw(r.content,-1,e,r.openStart,0,r.openEnd),e,r.openEnd)),t<r.openEnd&&(r=new ye(vw(r.content,1,t,r.openEnd,0,0),r.openStart,t)),r}const y5={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Ik=null;function b5(){return Ik||(Ik=document.implementation.createHTMLDocument("title"))}let F1=null;function Sq(r){let e=window.trustedTypes;return e?(F1||(F1=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t})),F1.createHTML(r)):r}function Tq(r){let e=/^(\s*<meta [^>]*>)*/.exec(r);e&&(r=r.slice(e[0].length));let t=b5().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(r),i;if((i=n&&y5[n[1].toLowerCase()])&&(r=i.map(a=>"<"+a+">").join("")+r+i.map(a=>"</"+a+">").reverse().join("")),t.innerHTML=Sq(r),i)for(let a=0;a<i.length;a++)t=t.querySelector(i[a])||t;return t}function Cq(r){let e=r.querySelectorAll(zs?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let n=e[t];n.childNodes.length==1&&n.textContent==" "&&n.parentNode&&n.parentNode.replaceChild(r.ownerDocument.createTextNode(" "),n)}}function Aq(r,e){if(!r.size)return r;let t=r.content.firstChild.type.schema,n;try{n=JSON.parse(e)}catch{return r}let{content:i,openStart:a,openEnd:o}=r;for(let s=n.length-2;s>=0;s-=2){let l=t.nodes[n[s]];if(!l||l.hasRequiredAttrs())break;i=ne.from(l.create(n[s+1],i)),a++,o++}return new ye(i,a,o)}const Vi={},Hn={};function is(r,e){r.input.lastSelectionOrigin=e,r.input.lastSelectionTime=Date.now()}Hn.keydown=(r,e)=>{let t=e;if(r.input.shiftKey=t.keyCode==16||t.shiftKey,!x5(r,t)&&(r.input.lastKeyCode=t.keyCode,r.input.lastKeyCodeTime=Date.now(),!(gp&&zs&&t.keyCode==13)))if(t.keyCode!=229&&r.domObserver.forceFlush(),pT&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let n=Date.now();r.input.lastIOSEnter=n,r.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{r.input.lastIOSEnter==n&&(r.someProp("handleKeyDown",i=>i(r,o5(13,"Enter"))),r.input.lastIOSEnter=0)},200)}else r.someProp("handleKeyDown",n=>n(r,t))||_q(r,t)?t.preventDefault():is(r,"key")};Hn.keyup=(r,e)=>{e.keyCode==16&&(r.input.shiftKey=!1)};Hn.keypress=(r,e)=>{let t=e;if(x5(r,t)||!t.charCode||t.ctrlKey&&!t.altKey||ri&&t.metaKey)return;if(r.someProp("handleKeyPress",i=>i(r,t))){t.preventDefault();return}let n=r.state.selection;if(!(n instanceof We)||!n.$from.sameParent(n.$to)){let i=String.fromCharCode(t.charCode),a=()=>r.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!r.someProp("handleTextInput",o=>o(r,n.$from.pos,n.$to.pos,i,a))&&r.dispatch(a()),t.preventDefault()}};function b0(r){return{left:r.clientX,top:r.clientY}}function Mq(r,e){let t=e.x-r.clientX,n=e.y-r.clientY;return t*t+n*n<100}function gT(r,e,t,n,i){if(n==-1)return!1;let a=r.state.doc.resolve(n);for(let o=a.depth+1;o>0;o--)if(r.someProp(e,s=>o>a.depth?s(r,t,a.nodeAfter,a.before(o),i,!0):s(r,t,a.node(o),a.before(o),i,!1)))return!0;return!1}function Rc(r,e,t){if(r.focused||r.focus(),r.state.selection.eq(e))return;let n=r.state.tr.setSelection(e);n.setMeta("pointer",!0),r.dispatch(n)}function kq(r,e){if(e==-1)return!1;let t=r.state.doc.resolve(e),n=t.nodeAfter;return n&&n.isAtom&&Ne.isSelectable(n)?(Rc(r,new Ne(t)),!0):!1}function Dq(r,e){if(e==-1)return!1;let t=r.state.selection,n,i;t instanceof Ne&&(n=t.node);let a=r.state.doc.resolve(e);for(let o=a.depth+1;o>0;o--){let s=o>a.depth?a.nodeAfter:a.node(o);if(Ne.isSelectable(s)){n&&t.$from.depth>0&&o>=t.$from.depth&&a.before(t.$from.depth+1)==t.$from.pos?i=a.before(t.$from.depth):i=a.before(o);break}}return i!=null?(Rc(r,Ne.create(r.state.doc,i)),!0):!1}function Eq(r,e,t,n,i){return gT(r,"handleClickOn",e,t,n)||r.someProp("handleClick",a=>a(r,e,n))||(i?Dq(r,t):kq(r,t))}function Lq(r,e,t,n){return gT(r,"handleDoubleClickOn",e,t,n)||r.someProp("handleDoubleClick",i=>i(r,e,n))}function Iq(r,e,t,n){return gT(r,"handleTripleClickOn",e,t,n)||r.someProp("handleTripleClick",i=>i(r,e,n))||Pq(r,t,n)}function Pq(r,e,t){if(t.button!=0)return!1;let n=r.state.doc;if(e==-1)return n.inlineContent?(Rc(r,We.create(n,0,n.content.size)),!0):!1;let i=n.resolve(e);for(let a=i.depth+1;a>0;a--){let o=a>i.depth?i.nodeAfter:i.node(a),s=i.before(a);if(o.inlineContent)Rc(r,We.create(n,s+1,s+1+o.content.size));else if(Ne.isSelectable(o))Rc(r,Ne.create(n,s));else continue;return!0}}function yT(r){return wg(r)}const _5=ri?"metaKey":"ctrlKey";Vi.mousedown=(r,e)=>{let t=e;r.input.shiftKey=t.shiftKey;let n=yT(r),i=Date.now(),a="singleClick";i-r.input.lastClick.time<500&&Mq(t,r.input.lastClick)&&!t[_5]&&r.input.lastClick.button==t.button&&(r.input.lastClick.type=="singleClick"?a="doubleClick":r.input.lastClick.type=="doubleClick"&&(a="tripleClick")),r.input.lastClick={time:i,x:t.clientX,y:t.clientY,type:a,button:t.button};let o=r.posAtCoords(b0(t));o&&(a=="singleClick"?(r.input.mouseDown&&r.input.mouseDown.done(),r.input.mouseDown=new Rq(r,o,t,!!n)):(a=="doubleClick"?Lq:Iq)(r,o.pos,o.inside,t)?t.preventDefault():is(r,"pointer"))};class Rq{constructor(e,t,n,i){this.view=e,this.pos=t,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[_5],this.allowDefault=n.shiftKey;let a,o;if(t.inside>-1)a=e.state.doc.nodeAt(t.inside),o=t.inside;else{let c=e.state.doc.resolve(t.pos);a=c.parent,o=c.depth?c.before():0}const s=i?null:n.target,l=s?e.docView.nearestDesc(s,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:u}=e.state;(n.button==0&&a.type.spec.draggable&&a.type.spec.selectable!==!1||u instanceof Ne&&u.from<=o&&u.to>o)&&(this.mightDrag={node:a,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&y0&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),is(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>mT(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(b0(e))),this.updateAllowDefault(e),this.allowDefault||!t?is(this.view,"pointer"):Eq(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Cu&&this.mightDrag&&!this.mightDrag.node.isAtom||zs&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Rc(this.view,qe.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):is(this.view,"pointer")}move(e){this.updateAllowDefault(e),is(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Vi.touchstart=r=>{r.input.lastTouch=Date.now(),yT(r),is(r,"pointer")};Vi.touchmove=r=>{r.input.lastTouch=Date.now(),is(r,"pointer")};Vi.contextmenu=r=>yT(r);function x5(r,e){return r.composing?!0:Cu&&Math.abs(e.timeStamp-r.input.compositionEndedAt)<500?(r.input.compositionEndedAt=-2e8,!0):!1}const Oq=gp?5e3:-1;Hn.compositionstart=Hn.compositionupdate=r=>{if(!r.composing){r.domObserver.flush();let{state:e}=r,t=e.selection.$to;if(e.selection instanceof We&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)))r.markCursor=r.state.storedMarks||t.marks(),wg(r,!0),r.markCursor=null;else if(wg(r,!e.selection.empty),y0&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let n=r.domSelectionRange();for(let i=n.focusNode,a=n.focusOffset;i&&i.nodeType==1&&a!=0;){let o=a<0?i.lastChild:i.childNodes[a-1];if(!o)break;if(o.nodeType==3){let s=r.domSelection();s&&s.collapse(o,o.nodeValue.length);break}else i=o,a=-1}}r.input.composing=!0}w5(r,Oq)};Hn.compositionend=(r,e)=>{r.composing&&(r.input.composing=!1,r.input.compositionEndedAt=e.timeStamp,r.input.compositionPendingChanges=r.domObserver.pendingRecords().length?r.input.compositionID:0,r.input.compositionNode=null,r.input.compositionPendingChanges&&Promise.resolve().then(()=>r.domObserver.flush()),r.input.compositionID++,w5(r,20))};function w5(r,e){clearTimeout(r.input.composingTimeout),e>-1&&(r.input.composingTimeout=setTimeout(()=>wg(r),e))}function jq(r){for(r.composing&&(r.input.composing=!1,r.input.compositionEndedAt=Nq());r.input.compositionNodes.length>0;)r.input.compositionNodes.pop().markParentsDirty()}function Nq(){let r=document.createEvent("Event");return r.initEvent("event",!0,!0),r.timeStamp}function wg(r,e=!1){if(!(gp&&r.domObserver.flushingSoon>=0)){if(r.domObserver.forceFlush(),jq(r),e||r.docView&&r.docView.dirty){let t=uq(r),n=r.state.selection;return t&&!t.eq(n)?r.dispatch(r.state.tr.setSelection(t)):(r.markCursor||e)&&!n.$from.node(n.$from.sharedDepth(n.to)).inlineContent?r.dispatch(r.state.tr.deleteSelection()):r.updateState(r.state),!0}return!1}}function Bq(r,e){if(!r.dom.parentNode)return;let t=r.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),i=document.createRange();i.selectNodeContents(e),r.dom.blur(),n.removeAllRanges(),n.addRange(i),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),r.focus()},50)}const Ad=mp&&l5<15||pT&&lq<604;Vi.copy=Hn.cut=(r,e)=>{let t=e,n=r.state.selection,i=t.type=="cut";if(n.empty)return;let a=Ad?null:t.clipboardData,o=n.content(),{dom:s,text:l}=d5(r,o);a?(t.preventDefault(),a.clearData(),a.setData("text/html",s.innerHTML),a.setData("text/plain",l)):Bq(r,s),i&&r.dispatch(r.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function zq(r){return r.openStart==0&&r.openEnd==0&&r.content.childCount==1?r.content.firstChild:null}function Fq(r,e){if(!r.dom.parentNode)return;let t=r.input.shiftKey||r.state.selection.$from.parent.type.spec.code,n=r.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let i=r.input.shiftKey&&r.input.lastKeyCode!=45;setTimeout(()=>{r.focus(),n.parentNode&&n.parentNode.removeChild(n),t?mw(r,n.value,null,i,e):mw(r,n.textContent,n.innerHTML,i,e)},50)}function mw(r,e,t,n,i){let a=p5(r,e,t,n,r.state.selection.$from);if(r.someProp("handlePaste",l=>l(r,i,a||ye.empty)))return!0;if(!a)return!1;let o=zq(a),s=o?r.state.tr.replaceSelectionWith(o,n):r.state.tr.replaceSelection(a);return r.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function S5(r){let e=r.getData("text/plain")||r.getData("Text");if(e)return e;let t=r.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}Hn.paste=(r,e)=>{let t=e;if(r.composing&&!gp)return;let n=Ad?null:t.clipboardData,i=r.input.shiftKey&&r.input.lastKeyCode!=45;n&&mw(r,S5(n),n.getData("text/html"),i,t)?t.preventDefault():Fq(r,t)};class Vq{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}const $q=ri?"altKey":"ctrlKey";function T5(r,e){let t=r.someProp("dragCopies",n=>!n(e));return t??!e[$q]}Vi.dragstart=(r,e)=>{let t=e,n=r.input.mouseDown;if(n&&n.done(),!t.dataTransfer)return;let i=r.state.selection,a=i.empty?null:r.posAtCoords(b0(t)),o;if(!(a&&a.pos>=i.from&&a.pos<=(i instanceof Ne?i.to-1:i.to))){if(n&&n.mightDrag)o=Ne.create(r.state.doc,n.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let f=r.docView.nearestDesc(t.target,!0);f&&f.node.type.spec.draggable&&f!=r.docView&&(o=Ne.create(r.state.doc,f.posBefore))}}let s=(o||r.state.selection).content(),{dom:l,text:u,slice:c}=d5(r,s);(!t.dataTransfer.files.length||!zs||u5>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(Ad?"Text":"text/html",l.innerHTML),t.dataTransfer.effectAllowed="copyMove",Ad||t.dataTransfer.setData("text/plain",u),r.dragging=new Vq(c,T5(r,t),o)};Vi.dragend=r=>{let e=r.dragging;window.setTimeout(()=>{r.dragging==e&&(r.dragging=null)},50)};Hn.dragover=Hn.dragenter=(r,e)=>e.preventDefault();Hn.drop=(r,e)=>{let t=e,n=r.dragging;if(r.dragging=null,!t.dataTransfer)return;let i=r.posAtCoords(b0(t));if(!i)return;let a=r.state.doc.resolve(i.pos),o=n&&n.slice;o?r.someProp("transformPasted",p=>{o=p(o,r)}):o=p5(r,S5(t.dataTransfer),Ad?null:t.dataTransfer.getData("text/html"),!1,a);let s=!!(n&&T5(r,t));if(r.someProp("handleDrop",p=>p(r,t,o||ye.empty,s))){t.preventDefault();return}if(!o)return;t.preventDefault();let l=o?XN(r.state.doc,a.pos,o):a.pos;l==null&&(l=a.pos);let u=r.state.tr;if(s){let{node:p}=n;p?p.replace(u):u.deleteSelection()}let c=u.mapping.map(l),f=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,h=u.doc;if(f?u.replaceRangeWith(c,c,o.content.firstChild):u.replaceRange(c,c,o),u.doc.eq(h))return;let d=u.doc.resolve(c);if(f&&Ne.isSelectable(o.content.firstChild)&&d.nodeAfter&&d.nodeAfter.sameMarkup(o.content.firstChild))u.setSelection(new Ne(d));else{let p=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((v,m,g,y)=>p=y),u.setSelection(f5(r,d,u.doc.resolve(p)))}r.focus(),r.dispatch(u.setMeta("uiEvent","drop"))};Vi.focus=r=>{r.input.lastFocus=Date.now(),r.focused||(r.domObserver.stop(),r.dom.classList.add("ProseMirror-focused"),r.domObserver.start(),r.focused=!0,setTimeout(()=>{r.docView&&r.hasFocus()&&!r.domObserver.currentSelection.eq(r.domSelectionRange())&&mT(r)},20))};Vi.blur=(r,e)=>{let t=e;r.focused&&(r.domObserver.stop(),r.dom.classList.remove("ProseMirror-focused"),r.domObserver.start(),t.relatedTarget&&r.dom.contains(t.relatedTarget)&&r.domObserver.currentSelection.clear(),r.focused=!1)};Vi.beforeinput=(r,e)=>{if(zs&&gp&&e.inputType=="deleteContentBackward"){r.domObserver.flushSoon();let{domChangeCount:n}=r.input;setTimeout(()=>{if(r.input.domChangeCount!=n||(r.dom.blur(),r.focus(),r.someProp("handleKeyDown",a=>a(r,o5(8,"Backspace")))))return;let{$cursor:i}=r.state.selection;i&&i.pos>0&&r.dispatch(r.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let r in Hn)Vi[r]=Hn[r];function Md(r,e){if(r==e)return!0;for(let t in r)if(r[t]!==e[t])return!1;for(let t in e)if(!(t in r))return!1;return!0}class Sg{constructor(e,t){this.toDOM=e,this.spec=t||Ul,this.side=this.spec.side||0}map(e,t,n,i){let{pos:a,deleted:o}=e.mapResult(t.from+i,this.side<0?-1:1);return o?null:new Xr(a-n,a-n,this)}valid(){return!0}eq(e){return this==e||e instanceof Sg&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Md(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class gs{constructor(e,t){this.attrs=e,this.spec=t||Ul}map(e,t,n,i){let a=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-n;return a>=o?null:new Xr(a,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof gs&&Md(this.attrs,e.attrs)&&Md(this.spec,e.spec)}static is(e){return e.type instanceof gs}destroy(){}}class bT{constructor(e,t){this.attrs=e,this.spec=t||Ul}map(e,t,n,i){let a=e.mapResult(t.from+i,1);if(a.deleted)return null;let o=e.mapResult(t.to+i,-1);return o.deleted||o.pos<=a.pos?null:new Xr(a.pos-n,o.pos-n,this)}valid(e,t){let{index:n,offset:i}=e.content.findIndex(t.from),a;return i==t.from&&!(a=e.child(n)).isText&&i+a.nodeSize==t.to}eq(e){return this==e||e instanceof bT&&Md(this.attrs,e.attrs)&&Md(this.spec,e.spec)}destroy(){}}class Xr{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new Xr(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new Xr(e,e,new Sg(t,n))}static inline(e,t,n,i){return new Xr(e,t,new gs(n,i))}static node(e,t,n,i){return new Xr(e,t,new bT(n,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof gs}get widget(){return this.type instanceof Sg}}const yc=[],Ul={};class Gt{constructor(e,t){this.local=e.length?e:yc,this.children=t.length?t:yc}static create(e,t){return t.length?Tg(t,e,0,Ul):an}find(e,t,n){let i=[];return this.findInner(e??0,t??1e9,i,0,n),i}findInner(e,t,n,i,a){for(let o=0;o<this.local.length;o++){let s=this.local[o];s.from<=t&&s.to>=e&&(!a||a(s.spec))&&n.push(s.copy(s.from+i,s.to+i))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<t&&this.children[o+1]>e){let s=this.children[o]+1;this.children[o+2].findInner(e-s,t-s,n,i+s,a)}}map(e,t,n){return this==an||e.maps.length==0?this:this.mapInner(e,t,0,0,n||Ul)}mapInner(e,t,n,i,a){let o;for(let s=0;s<this.local.length;s++){let l=this.local[s].map(e,n,i);l&&l.type.valid(t,l)?(o||(o=[])).push(l):a.onRemove&&a.onRemove(this.local[s].spec)}return this.children.length?Hq(this.children,o||[],e,t,n,i,a):o?new Gt(o.sort(Yl),yc):an}add(e,t){return t.length?this==an?Gt.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let i,a=0;e.forEach((s,l)=>{let u=l+n,c;if(c=A5(t,s,u)){for(i||(i=this.children.slice());a<i.length&&i[a]<l;)a+=3;i[a]==l?i[a+2]=i[a+2].addInner(s,c,u+1):i.splice(a,0,l,l+s.nodeSize,Tg(c,s,u+1,Ul)),a+=3}});let o=C5(a?M5(t):t,-n);for(let s=0;s<o.length;s++)o[s].type.valid(e,o[s])||o.splice(s--,1);return new Gt(o.length?this.local.concat(o).sort(Yl):this.local,i||this.children)}remove(e){return e.length==0||this==an?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,i=this.local;for(let a=0;a<n.length;a+=3){let o,s=n[a]+t,l=n[a+1]+t;for(let c=0,f;c<e.length;c++)(f=e[c])&&f.from>s&&f.to<l&&(e[c]=null,(o||(o=[])).push(f));if(!o)continue;n==this.children&&(n=this.children.slice());let u=n[a+2].removeInner(o,s+1);u!=an?n[a+2]=u:(n.splice(a,3),a-=3)}if(i.length){for(let a=0,o;a<e.length;a++)if(o=e[a])for(let s=0;s<i.length;s++)i[s].eq(o,t)&&(i==this.local&&(i=this.local.slice()),i.splice(s--,1))}return n==this.children&&i==this.local?this:i.length||n.length?new Gt(i,n):an}forChild(e,t){if(this==an)return this;if(t.isLeaf)return Gt.empty;let n,i;for(let s=0;s<this.children.length;s+=3)if(this.children[s]>=e){this.children[s]==e&&(n=this.children[s+2]);break}let a=e+1,o=a+t.content.size;for(let s=0;s<this.local.length;s++){let l=this.local[s];if(l.from<o&&l.to>a&&l.type instanceof gs){let u=Math.max(a,l.from)-a,c=Math.min(o,l.to)-a;u<c&&(i||(i=[])).push(l.copy(u,c))}}if(i){let s=new Gt(i.sort(Yl),yc);return n?new wl([s,n]):s}return n||an}eq(e){if(this==e)return!0;if(!(e instanceof Gt)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return _T(this.localsInner(e))}localsInner(e){if(this==an)return yc;if(e.inlineContent||!this.local.some(gs.is))return this.local;let t=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof gs||t.push(this.local[n]);return t}forEachSet(e){e(this)}}Gt.empty=new Gt([],[]);Gt.removeOverlap=_T;const an=Gt.empty;class wl{constructor(e){this.members=e}map(e,t){const n=this.members.map(i=>i.map(e,t,Ul));return wl.from(n)}forChild(e,t){if(t.isLeaf)return Gt.empty;let n=[];for(let i=0;i<this.members.length;i++){let a=this.members[i].forChild(e,t);a!=an&&(a instanceof wl?n=n.concat(a.members):n.push(a))}return wl.from(n)}eq(e){if(!(e instanceof wl)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let i=0;i<this.members.length;i++){let a=this.members[i].localsInner(e);if(a.length)if(!t)t=a;else{n&&(t=t.slice(),n=!1);for(let o=0;o<a.length;o++)t.push(a[o])}}return t?_T(n?t:t.sort(Yl)):yc}static from(e){switch(e.length){case 0:return an;case 1:return e[0];default:return new wl(e.every(t=>t instanceof Gt)?e:e.reduce((t,n)=>t.concat(n instanceof Gt?n:n.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function Hq(r,e,t,n,i,a,o){let s=r.slice();for(let u=0,c=a;u<t.maps.length;u++){let f=0;t.maps[u].forEach((h,d,p,v)=>{let m=v-p-(d-h);for(let g=0;g<s.length;g+=3){let y=s[g+1];if(y<0||h>y+c-f)continue;let b=s[g]+c-f;d>=b?s[g+1]=h<=b?-2:-1:h>=c&&m&&(s[g]+=m,s[g+1]+=m)}f+=m}),c=t.maps[u].map(c,-1)}let l=!1;for(let u=0;u<s.length;u+=3)if(s[u+1]<0){if(s[u+1]==-2){l=!0,s[u+1]=-1;continue}let c=t.map(r[u]+a),f=c-i;if(f<0||f>=n.content.size){l=!0;continue}let h=t.map(r[u+1]+a,-1),d=h-i,{index:p,offset:v}=n.content.findIndex(f),m=n.maybeChild(p);if(m&&v==f&&v+m.nodeSize==d){let g=s[u+2].mapInner(t,m,c+1,r[u]+a+1,o);g!=an?(s[u]=f,s[u+1]=d,s[u+2]=g):(s[u+1]=-2,l=!0)}else l=!0}if(l){let u=Gq(s,r,e,t,i,a,o),c=Tg(u,n,0,o);e=c.local;for(let f=0;f<s.length;f+=3)s[f+1]<0&&(s.splice(f,3),f-=3);for(let f=0,h=0;f<c.children.length;f+=3){let d=c.children[f];for(;h<s.length&&s[h]<d;)h+=3;s.splice(h,0,c.children[f],c.children[f+1],c.children[f+2])}}return new Gt(e.sort(Yl),s)}function C5(r,e){if(!e||!r.length)return r;let t=[];for(let n=0;n<r.length;n++){let i=r[n];t.push(new Xr(i.from+e,i.to+e,i.type))}return t}function Gq(r,e,t,n,i,a,o){function s(l,u){for(let c=0;c<l.local.length;c++){let f=l.local[c].map(n,i,u);f?t.push(f):o.onRemove&&o.onRemove(l.local[c].spec)}for(let c=0;c<l.children.length;c+=3)s(l.children[c+2],l.children[c]+u+1)}for(let l=0;l<r.length;l+=3)r[l+1]==-1&&s(r[l+2],e[l]+a+1);return t}function A5(r,e,t){if(e.isLeaf)return null;let n=t+e.nodeSize,i=null;for(let a=0,o;a<r.length;a++)(o=r[a])&&o.from>t&&o.to<n&&((i||(i=[])).push(o),r[a]=null);return i}function M5(r){let e=[];for(let t=0;t<r.length;t++)r[t]!=null&&e.push(r[t]);return e}function Tg(r,e,t,n){let i=[],a=!1;e.forEach((s,l)=>{let u=A5(r,s,l+t);if(u){a=!0;let c=Tg(u,s,t+l+1,n);c!=an&&i.push(l,l+s.nodeSize,c)}});let o=C5(a?M5(r):r,-t).sort(Yl);for(let s=0;s<o.length;s++)o[s].type.valid(e,o[s])||(n.onRemove&&n.onRemove(o[s].spec),o.splice(s--,1));return o.length||i.length?new Gt(o,i):an}function Yl(r,e){return r.from-e.from||r.to-e.to}function _T(r){let e=r;for(let t=0;t<e.length-1;t++){let n=e[t];if(n.from!=n.to)for(let i=t+1;i<e.length;i++){let a=e[i];if(a.from==n.from){a.to!=n.to&&(e==r&&(e=r.slice()),e[i]=a.copy(a.from,n.to),Pk(e,i+1,a.copy(n.to,a.to)));continue}else{a.from<n.to&&(e==r&&(e=r.slice()),e[t]=n.copy(n.from,a.from),Pk(e,i,n.copy(a.from,n.to)));break}}}return e}function Pk(r,e,t){for(;e<r.length&&Yl(t,r[e])>0;)e++;r.splice(e,0,t)}var As={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Cg={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Wq=typeof navigator<"u"&&/Mac/.test(navigator.platform),Uq=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Or=0;Or<10;Or++)As[48+Or]=As[96+Or]=String(Or);for(var Or=1;Or<=24;Or++)As[Or+111]="F"+Or;for(var Or=65;Or<=90;Or++)As[Or]=String.fromCharCode(Or+32),Cg[Or]=String.fromCharCode(Or);for(var V1 in As)Cg.hasOwnProperty(V1)||(Cg[V1]=As[V1]);function Yq(r){var e=Wq&&r.metaKey&&r.shiftKey&&!r.ctrlKey&&!r.altKey||Uq&&r.shiftKey&&r.key&&r.key.length==1||r.key=="Unidentified",t=!e&&r.key||(r.shiftKey?Cg:As)[r.keyCode]||r.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}const qq=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),Xq=typeof navigator<"u"&&/Win/.test(navigator.platform);function Kq(r){let e=r.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let n,i,a,o;for(let s=0;s<e.length-1;s++){let l=e[s];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))n=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))a=!0;else if(/^mod$/i.test(l))qq?o=!0:i=!0;else throw new Error("Unrecognized modifier name: "+l)}return n&&(t="Alt-"+t),i&&(t="Ctrl-"+t),o&&(t="Meta-"+t),a&&(t="Shift-"+t),t}function Zq(r){let e=Object.create(null);for(let t in r)e[Kq(t)]=r[t];return e}function $1(r,e,t=!0){return e.altKey&&(r="Alt-"+r),e.ctrlKey&&(r="Ctrl-"+r),e.metaKey&&(r="Meta-"+r),t&&e.shiftKey&&(r="Shift-"+r),r}function k5(r){let e=Zq(r);return function(t,n){let i=Yq(n),a,o=e[$1(i,n)];if(o&&o(t.state,t.dispatch,t))return!0;if(i.length==1&&i!=" "){if(n.shiftKey){let s=e[$1(i,n,!1)];if(s&&s(t.state,t.dispatch,t))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(Xq&&n.ctrlKey&&n.altKey)&&(a=As[n.keyCode])&&a!=i){let s=e[$1(a,n)];if(s&&s(t.state,t.dispatch,t))return!0}}return!1}}const xT=(r,e)=>r.selection.empty?!1:(e&&e(r.tr.deleteSelection().scrollIntoView()),!0);function D5(r,e){let{$cursor:t}=r.selection;return!t||(e?!e.endOfTextblock("backward",r):t.parentOffset>0)?null:t}const E5=(r,e,t)=>{let n=D5(r,t);if(!n)return!1;let i=wT(n);if(!i){let o=n.blockRange(),s=o&&hf(o);return s==null?!1:(e&&e(r.tr.lift(o,s).scrollIntoView()),!0)}let a=i.nodeBefore;if(z5(r,i,e,-1))return!0;if(n.parent.content.size==0&&(qc(a,"end")||Ne.isSelectable(a)))for(let o=n.depth;;o--){let s=m0(r.doc,n.before(o),n.after(o),ye.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=r.tr.step(s);l.setSelection(qc(a,"end")?qe.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):Ne.create(l.doc,i.pos-a.nodeSize)),e(l.scrollIntoView())}return!0}if(o==1||n.node(o-1).childCount>1)break}return a.isAtom&&i.depth==n.depth-1?(e&&e(r.tr.delete(i.pos-a.nodeSize,i.pos).scrollIntoView()),!0):!1},Jq=(r,e,t)=>{let n=D5(r,t);if(!n)return!1;let i=wT(n);return i?L5(r,i,e):!1},Qq=(r,e,t)=>{let n=P5(r,t);if(!n)return!1;let i=ST(n);return i?L5(r,i,e):!1};function L5(r,e,t){let n=e.nodeBefore,i=n,a=e.pos-1;for(;!i.isTextblock;a--){if(i.type.spec.isolating)return!1;let c=i.lastChild;if(!c)return!1;i=c}let o=e.nodeAfter,s=o,l=e.pos+1;for(;!s.isTextblock;l++){if(s.type.spec.isolating)return!1;let c=s.firstChild;if(!c)return!1;s=c}let u=m0(r.doc,a,l,ye.empty);if(!u||u.from!=a||u instanceof Mr&&u.slice.size>=l-a)return!1;if(t){let c=r.tr.step(u);c.setSelection(We.create(c.doc,a)),t(c.scrollIntoView())}return!0}function qc(r,e,t=!1){for(let n=r;n;n=e=="start"?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(t&&n.childCount!=1)return!1}return!1}const I5=(r,e,t)=>{let{$head:n,empty:i}=r.selection,a=n;if(!i)return!1;if(n.parent.isTextblock){if(t?!t.endOfTextblock("backward",r):n.parentOffset>0)return!1;a=wT(n)}let o=a&&a.nodeBefore;return!o||!Ne.isSelectable(o)?!1:(e&&e(r.tr.setSelection(Ne.create(r.doc,a.pos-o.nodeSize)).scrollIntoView()),!0)};function wT(r){if(!r.parent.type.spec.isolating)for(let e=r.depth-1;e>=0;e--){if(r.index(e)>0)return r.doc.resolve(r.before(e+1));if(r.node(e).type.spec.isolating)break}return null}function P5(r,e){let{$cursor:t}=r.selection;return!t||(e?!e.endOfTextblock("forward",r):t.parentOffset<t.parent.content.size)?null:t}const R5=(r,e,t)=>{let n=P5(r,t);if(!n)return!1;let i=ST(n);if(!i)return!1;let a=i.nodeAfter;if(z5(r,i,e,1))return!0;if(n.parent.content.size==0&&(qc(a,"start")||Ne.isSelectable(a))){let o=m0(r.doc,n.before(),n.after(),ye.empty);if(o&&o.slice.size<o.to-o.from){if(e){let s=r.tr.step(o);s.setSelection(qc(a,"start")?qe.findFrom(s.doc.resolve(s.mapping.map(i.pos)),1):Ne.create(s.doc,s.mapping.map(i.pos))),e(s.scrollIntoView())}return!0}}return a.isAtom&&i.depth==n.depth-1?(e&&e(r.tr.delete(i.pos,i.pos+a.nodeSize).scrollIntoView()),!0):!1},O5=(r,e,t)=>{let{$head:n,empty:i}=r.selection,a=n;if(!i)return!1;if(n.parent.isTextblock){if(t?!t.endOfTextblock("forward",r):n.parentOffset<n.parent.content.size)return!1;a=ST(n)}let o=a&&a.nodeAfter;return!o||!Ne.isSelectable(o)?!1:(e&&e(r.tr.setSelection(Ne.create(r.doc,a.pos)).scrollIntoView()),!0)};function ST(r){if(!r.parent.type.spec.isolating)for(let e=r.depth-1;e>=0;e--){let t=r.node(e);if(r.index(e)+1<t.childCount)return r.doc.resolve(r.after(e+1));if(t.type.spec.isolating)break}return null}const eX=(r,e)=>{let t=r.selection,n=t instanceof Ne,i;if(n){if(t.node.isTextblock||!Ns(r.doc,t.from))return!1;i=t.from}else if(i=v0(r.doc,t.from,-1),i==null)return!1;if(e){let a=r.tr.join(i);n&&a.setSelection(Ne.create(a.doc,i-r.doc.resolve(i).nodeBefore.nodeSize)),e(a.scrollIntoView())}return!0},tX=(r,e)=>{let t=r.selection,n;if(t instanceof Ne){if(t.node.isTextblock||!Ns(r.doc,t.to))return!1;n=t.to}else if(n=v0(r.doc,t.to,1),n==null)return!1;return e&&e(r.tr.join(n).scrollIntoView()),!0},rX=(r,e)=>{let{$from:t,$to:n}=r.selection,i=t.blockRange(n),a=i&&hf(i);return a==null?!1:(e&&e(r.tr.lift(i,a).scrollIntoView()),!0)},j5=(r,e)=>{let{$head:t,$anchor:n}=r.selection;return!t.parent.type.spec.code||!t.sameParent(n)?!1:(e&&e(r.tr.insertText(`
|
||
`).scrollIntoView()),!0)};function TT(r){for(let e=0;e<r.edgeCount;e++){let{type:t}=r.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const nX=(r,e)=>{let{$head:t,$anchor:n}=r.selection;if(!t.parent.type.spec.code||!t.sameParent(n))return!1;let i=t.node(-1),a=t.indexAfter(-1),o=TT(i.contentMatchAt(a));if(!o||!i.canReplaceWith(a,a,o))return!1;if(e){let s=t.after(),l=r.tr.replaceWith(s,s,o.createAndFill());l.setSelection(qe.near(l.doc.resolve(s),1)),e(l.scrollIntoView())}return!0},N5=(r,e)=>{let t=r.selection,{$from:n,$to:i}=t;if(t instanceof Bn||n.parent.inlineContent||i.parent.inlineContent)return!1;let a=TT(i.parent.contentMatchAt(i.indexAfter()));if(!a||!a.isTextblock)return!1;if(e){let o=(!n.parentOffset&&i.index()<i.parent.childCount?n:i).pos,s=r.tr.insert(o,a.createAndFill());s.setSelection(We.create(s.doc,o+1)),e(s.scrollIntoView())}return!0},B5=(r,e)=>{let{$cursor:t}=r.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let a=t.before();if(uo(r.doc,a))return e&&e(r.tr.split(a).scrollIntoView()),!0}let n=t.blockRange(),i=n&&hf(n);return i==null?!1:(e&&e(r.tr.lift(n,i).scrollIntoView()),!0)};function iX(r){return(e,t)=>{let{$from:n,$to:i}=e.selection;if(e.selection instanceof Ne&&e.selection.node.isBlock)return!n.parentOffset||!uo(e.doc,n.pos)?!1:(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let a=[],o,s,l=!1,u=!1;for(let d=n.depth;;d--)if(n.node(d).isBlock){l=n.end(d)==n.pos+(n.depth-d),u=n.start(d)==n.pos-(n.depth-d),s=TT(n.node(d-1).contentMatchAt(n.indexAfter(d-1))),a.unshift(l&&s?{type:s}:null),o=d;break}else{if(d==1)return!1;a.unshift(null)}let c=e.tr;(e.selection instanceof We||e.selection instanceof Bn)&&c.deleteSelection();let f=c.mapping.map(n.pos),h=uo(c.doc,f,a.length,a);if(h||(a[0]=s?{type:s}:null,h=uo(c.doc,f,a.length,a)),!h)return!1;if(c.split(f,a.length,a),!l&&u&&n.node(o).type!=s){let d=c.mapping.map(n.before(o)),p=c.doc.resolve(d);s&&n.node(o-1).canReplaceWith(p.index(),p.index()+1,s)&&c.setNodeMarkup(c.mapping.map(n.before(o)),s)}return t&&t(c.scrollIntoView()),!0}}const aX=iX(),oX=(r,e)=>{let{$from:t,to:n}=r.selection,i,a=t.sharedDepth(n);return a==0?!1:(i=t.before(a),e&&e(r.tr.setSelection(Ne.create(r.doc,i))),!0)};function sX(r,e,t){let n=e.nodeBefore,i=e.nodeAfter,a=e.index();return!n||!i||!n.type.compatibleContent(i.type)?!1:!n.content.size&&e.parent.canReplace(a-1,a)?(t&&t(r.tr.delete(e.pos-n.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(a,a+1)||!(i.isTextblock||Ns(r.doc,e.pos))?!1:(t&&t(r.tr.join(e.pos).scrollIntoView()),!0)}function z5(r,e,t,n){let i=e.nodeBefore,a=e.nodeAfter,o,s,l=i.type.spec.isolating||a.type.spec.isolating;if(!l&&sX(r,e,t))return!0;let u=!l&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&s.matchType(o[0]||a.type).validEnd){if(t){let d=e.pos+a.nodeSize,p=ne.empty;for(let g=o.length-1;g>=0;g--)p=ne.from(o[g].create(null,p));p=ne.from(i.copy(p));let v=r.tr.step(new Dr(e.pos-1,d,e.pos,d,new ye(p,1,0),o.length,!0)),m=v.doc.resolve(d+2*o.length);m.nodeAfter&&m.nodeAfter.type==i.type&&Ns(v.doc,m.pos)&&v.join(m.pos),t(v.scrollIntoView())}return!0}let c=a.type.spec.isolating||n>0&&l?null:qe.findFrom(e,1),f=c&&c.$from.blockRange(c.$to),h=f&&hf(f);if(h!=null&&h>=e.depth)return t&&t(r.tr.lift(f,h).scrollIntoView()),!0;if(u&&qc(a,"start",!0)&&qc(i,"end")){let d=i,p=[];for(;p.push(d),!d.isTextblock;)d=d.lastChild;let v=a,m=1;for(;!v.isTextblock;v=v.firstChild)m++;if(d.canReplace(d.childCount,d.childCount,v.content)){if(t){let g=ne.empty;for(let b=p.length-1;b>=0;b--)g=ne.from(p[b].copy(g));let y=r.tr.step(new Dr(e.pos-p.length,e.pos+a.nodeSize,e.pos+m,e.pos+a.nodeSize-m,new ye(g,p.length,0),0,!0));t(y.scrollIntoView())}return!0}}return!1}function F5(r){return function(e,t){let n=e.selection,i=r<0?n.$from:n.$to,a=i.depth;for(;i.node(a).isInline;){if(!a)return!1;a--}return i.node(a).isTextblock?(t&&t(e.tr.setSelection(We.create(e.doc,r<0?i.start(a):i.end(a)))),!0):!1}}const lX=F5(-1),uX=F5(1);function cX(r,e=null){return function(t,n){let{$from:i,$to:a}=t.selection,o=i.blockRange(a),s=o&&fT(o,r,e);return s?(n&&n(t.tr.wrap(o,s).scrollIntoView()),!0):!1}}function Rk(r,e=null){return function(t,n){let i=!1;for(let a=0;a<t.selection.ranges.length&&!i;a++){let{$from:{pos:o},$to:{pos:s}}=t.selection.ranges[a];t.doc.nodesBetween(o,s,(l,u)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(r,e)))if(l.type==r)i=!0;else{let c=t.doc.resolve(u),f=c.index();i=c.parent.canReplaceWith(f,f+1,r)}})}if(!i)return!1;if(n){let a=t.tr;for(let o=0;o<t.selection.ranges.length;o++){let{$from:{pos:s},$to:{pos:l}}=t.selection.ranges[o];a.setBlockType(s,l,r,e)}n(a.scrollIntoView())}return!0}}function CT(...r){return function(e,t,n){for(let i=0;i<r.length;i++)if(r[i](e,t,n))return!0;return!1}}CT(xT,E5,I5);CT(xT,R5,O5);CT(j5,N5,B5,aX);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function fX(r,e=null){return function(t,n){let{$from:i,$to:a}=t.selection,o=i.blockRange(a);if(!o)return!1;let s=n?t.tr:null;return hX(s,o,r,e)?(n&&n(s.scrollIntoView()),!0):!1}}function hX(r,e,t,n=null){let i=!1,a=e,o=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(t)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=o.resolve(e.start-2);a=new yg(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new yg(e.$from,o.resolve(e.$to.end(e.depth)),e.depth)),i=!0}let s=fT(a,t,n,e);return s?(r&&dX(r,e,s,i,t),!0):!1}function dX(r,e,t,n,i){let a=ne.empty;for(let c=t.length-1;c>=0;c--)a=ne.from(t[c].type.create(t[c].attrs,a));r.step(new Dr(e.start-(n?2:0),e.end,e.start,e.end,new ye(a,0,0),t.length,!0));let o=0;for(let c=0;c<t.length;c++)t[c].type==i&&(o=c+1);let s=t.length-o,l=e.start+t.length-(n?2:0),u=e.parent;for(let c=e.startIndex,f=e.endIndex,h=!0;c<f;c++,h=!1)!h&&uo(r.doc,l,s)&&(r.split(l,s),l+=2*s),l+=u.child(c).nodeSize;return r}function pX(r){return function(e,t){let{$from:n,$to:i}=e.selection,a=n.blockRange(i,o=>o.childCount>0&&o.firstChild.type==r);return a?t?n.node(a.depth-1).type==r?vX(e,t,r,a):mX(e,t,a):!0:!1}}function vX(r,e,t,n){let i=r.tr,a=n.end,o=n.$to.end(n.depth);a<o&&(i.step(new Dr(a-1,o,a,o,new ye(ne.from(t.create(null,n.parent.copy())),1,0),1,!0)),n=new yg(i.doc.resolve(n.$from.pos),i.doc.resolve(o),n.depth));const s=hf(n);if(s==null)return!1;i.lift(n,s);let l=i.doc.resolve(i.mapping.map(a,-1)-1);return Ns(i.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&i.join(l.pos),e(i.scrollIntoView()),!0}function mX(r,e,t){let n=r.tr,i=t.parent;for(let d=t.end,p=t.endIndex-1,v=t.startIndex;p>v;p--)d-=i.child(p).nodeSize,n.delete(d-1,d+1);let a=n.doc.resolve(t.start),o=a.nodeAfter;if(n.mapping.map(t.end)!=t.start+a.nodeAfter.nodeSize)return!1;let s=t.startIndex==0,l=t.endIndex==i.childCount,u=a.node(-1),c=a.index(-1);if(!u.canReplace(c+(s?0:1),c+1,o.content.append(l?ne.empty:ne.from(i))))return!1;let f=a.pos,h=f+o.nodeSize;return n.step(new Dr(f-(s?1:0),h+(l?1:0),f+1,h-1,new ye((s?ne.empty:ne.from(i.copy(ne.empty))).append(l?ne.empty:ne.from(i.copy(ne.empty))),s?0:1,l?0:1),s?0:1)),e(n.scrollIntoView()),!0}function gX(r){return function(e,t){let{$from:n,$to:i}=e.selection,a=n.blockRange(i,u=>u.childCount>0&&u.firstChild.type==r);if(!a)return!1;let o=a.startIndex;if(o==0)return!1;let s=a.parent,l=s.child(o-1);if(l.type!=r)return!1;if(t){let u=l.lastChild&&l.lastChild.type==s.type,c=ne.from(u?r.create():null),f=new ye(ne.from(r.create(null,ne.from(s.type.create(null,c)))),u?3:1,0),h=a.start,d=a.end;t(e.tr.step(new Dr(h-(u?3:1),d,h,d,f,1,!0)).scrollIntoView())}return!0}}function V5(r){const{state:e,transaction:t}=r;let{selection:n}=t,{doc:i}=t,{storedMarks:a}=t;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return a},get selection(){return n},get doc(){return i},get tr(){return n=t.selection,i=t.doc,a=t.storedMarks,t}}}class yX{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:n}=this,{view:i}=t,{tr:a}=n,o=this.buildProps(a);return Object.fromEntries(Object.entries(e).map(([s,l])=>[s,(...c)=>{const f=l(...c)(o);return!a.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(a),f}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:n,editor:i,state:a}=this,{view:o}=i,s=[],l=!!e,u=e||a.tr,c=()=>(!l&&t&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(u),s.every(h=>h===!0)),f={...Object.fromEntries(Object.entries(n).map(([h,d])=>[h,(...v)=>{const m=this.buildProps(u,t),g=d(...v)(m);return s.push(g),f}])),run:c};return f}createCan(e){const{rawCommands:t,state:n}=this,i=!1,a=e||n.tr,o=this.buildProps(a,i);return{...Object.fromEntries(Object.entries(t).map(([l,u])=>[l,(...c)=>u(...c)({...o,dispatch:void 0})])),chain:()=>this.createChain(a,i)}}buildProps(e,t=!0){const{rawCommands:n,editor:i,state:a}=this,{view:o}=i,s={tr:e,editor:i,view:o,state:V5({state:a,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([l,u])=>[l,(...c)=>u(...c)(s)]))}};return s}}function jr(r,e,t){return r.config[e]===void 0&&r.parent?jr(r.parent,e,t):typeof r.config[e]=="function"?r.config[e].bind({...t,parent:r.parent?jr(r.parent,e,t):null}):r.config[e]}function bX(r){const e=r.filter(i=>i.type==="extension"),t=r.filter(i=>i.type==="node"),n=r.filter(i=>i.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:n}}function zr(r,e){if(typeof r=="string"){if(!e.nodes[r])throw Error(`There is no node type named '${r}'. Maybe you forgot to add the extension?`);return e.nodes[r]}return r}function Lt(...r){return r.filter(e=>!!e).reduce((e,t)=>{const n={...e};return Object.entries(t).forEach(([i,a])=>{if(!n[i]){n[i]=a;return}if(i==="class"){const s=a?String(a).split(" "):[],l=n[i]?n[i].split(" "):[],u=s.filter(c=>!l.includes(c));n[i]=[...l,...u].join(" ")}else if(i==="style"){const s=a?a.split(";").map(c=>c.trim()).filter(Boolean):[],l=n[i]?n[i].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;l.forEach(c=>{const[f,h]=c.split(":").map(d=>d.trim());u.set(f,h)}),s.forEach(c=>{const[f,h]=c.split(":").map(d=>d.trim());u.set(f,h)}),n[i]=Array.from(u.entries()).map(([c,f])=>`${c}: ${f}`).join("; ")}else n[i]=a}),n},{})}function _X(r){return typeof r=="function"}function pr(r,e=void 0,...t){return _X(r)?e?r.bind(e)(...t):r(...t):r}function xX(r){return Object.prototype.toString.call(r)==="[object RegExp]"}class yp{constructor(e){this.find=e.find,this.handler=e.handler}}function wX(r){return Object.prototype.toString.call(r).slice(8,-1)}function Zp(r){return wX(r)!=="Object"?!1:r.constructor===Object&&Object.getPrototypeOf(r)===Object.prototype}function _0(r,e){const t={...r};return Zp(r)&&Zp(e)&&Object.keys(e).forEach(n=>{Zp(e[n])&&Zp(r[n])?t[n]=_0(r[n],e[n]):t[n]=e[n]}),t}class Da{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=pr(jr(this,"addOptions",{name:this.name}))),this.storage=pr(jr(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Da(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>_0(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new Da(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=pr(jr(t,"addOptions",{name:t.name})),t.storage=pr(jr(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:n}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){const o=i.marks();if(!!!o.find(u=>(u==null?void 0:u.type.name)===t.name))return!1;const l=o.find(u=>(u==null?void 0:u.type.name)===t.name);return l&&n.removeStoredMark(l),n.insertText(" ",i.pos),e.view.dispatch(n),!0}return!1}}class SX{constructor(e){this.find=e.find,this.handler=e.handler}}class Kt{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=pr(jr(this,"addOptions",{name:this.name}))),this.storage=pr(jr(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Kt(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>_0(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new Kt({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=pr(jr(t,"addOptions",{name:t.name})),t.storage=pr(jr(t,"addStorage",{name:t.name,options:t.options})),t}}function TX(r,e,t){const{from:n,to:i}=e,{blockSeparator:a=`
|
||
|
||
`,textSerializers:o={}}=t||{};let s="";return r.nodesBetween(n,i,(l,u,c,f)=>{var h;l.isBlock&&u>n&&(s+=a);const d=o==null?void 0:o[l.type.name];if(d)return c&&(s+=d({node:l,pos:u,parent:c,index:f,range:e})),!1;l.isText&&(s+=(h=l==null?void 0:l.text)===null||h===void 0?void 0:h.slice(Math.max(n,u)-u,i-u))}),s}function CX(r){return Object.fromEntries(Object.entries(r.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}Kt.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Ut({key:new jt("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:r}=this,{state:e,schema:t}=r,{doc:n,selection:i}=e,{ranges:a}=i,o=Math.min(...a.map(c=>c.$from.pos)),s=Math.max(...a.map(c=>c.$to.pos)),l=CX(t);return TX(n,{from:o,to:s},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}});const AX=()=>({editor:r,view:e})=>(requestAnimationFrame(()=>{var t;r.isDestroyed||(e.dom.blur(),(t=window==null?void 0:window.getSelection())===null||t===void 0||t.removeAllRanges())}),!0),MX=(r=!1)=>({commands:e})=>e.setContent("",r),kX=()=>({state:r,tr:e,dispatch:t})=>{const{selection:n}=e,{ranges:i}=n;return t&&i.forEach(({$from:a,$to:o})=>{r.doc.nodesBetween(a.pos,o.pos,(s,l)=>{if(s.type.isText)return;const{doc:u,mapping:c}=e,f=u.resolve(c.map(l)),h=u.resolve(c.map(l+s.nodeSize)),d=f.blockRange(h);if(!d)return;const p=hf(d);if(s.type.isTextblock){const{defaultType:v}=f.parent.contentMatchAt(f.index());e.setNodeMarkup(d.start,v)}(p||p===0)&&e.lift(d,p)})}),!0},DX=r=>e=>r(e),EX=()=>({state:r,dispatch:e})=>N5(r,e),LX=(r,e)=>({editor:t,tr:n})=>{const{state:i}=t,a=i.doc.slice(r.from,r.to);n.deleteRange(r.from,r.to);const o=n.mapping.map(e);return n.insert(o,a.content),n.setSelection(new We(n.doc.resolve(Math.max(o-1,0)))),!0},IX=()=>({tr:r,dispatch:e})=>{const{selection:t}=r,n=t.$anchor.node();if(n.content.size>0)return!1;const i=r.selection.$anchor;for(let a=i.depth;a>0;a-=1)if(i.node(a).type===n.type){if(e){const s=i.before(a),l=i.after(a);r.delete(s,l).scrollIntoView()}return!0}return!1},PX=r=>({tr:e,state:t,dispatch:n})=>{const i=zr(r,t.schema),a=e.selection.$anchor;for(let o=a.depth;o>0;o-=1)if(a.node(o).type===i){if(n){const l=a.before(o),u=a.after(o);e.delete(l,u).scrollIntoView()}return!0}return!1},RX=r=>({tr:e,dispatch:t})=>{const{from:n,to:i}=r;return t&&e.delete(n,i),!0},OX=()=>({state:r,dispatch:e})=>xT(r,e),jX=()=>({commands:r})=>r.keyboardShortcut("Enter"),NX=()=>({state:r,dispatch:e})=>nX(r,e);function Ag(r,e,t={strict:!0}){const n=Object.keys(e);return n.length?n.every(i=>t.strict?e[i]===r[i]:xX(e[i])?e[i].test(r[i]):e[i]===r[i]):!0}function $5(r,e,t={}){return r.find(n=>n.type===e&&Ag(Object.fromEntries(Object.keys(t).map(i=>[i,n.attrs[i]])),t))}function Ok(r,e,t={}){return!!$5(r,e,t)}function x0(r,e,t){var n;if(!r||!e)return;let i=r.parent.childAfter(r.parentOffset);if((!i.node||!i.node.marks.some(c=>c.type===e))&&(i=r.parent.childBefore(r.parentOffset)),!i.node||!i.node.marks.some(c=>c.type===e)||(t=t||((n=i.node.marks[0])===null||n===void 0?void 0:n.attrs),!$5([...i.node.marks],e,t)))return;let o=i.index,s=r.start()+i.offset,l=o+1,u=s+i.node.nodeSize;for(;o>0&&Ok([...r.parent.child(o-1).marks],e,t);)o-=1,s-=r.parent.child(o).nodeSize;for(;l<r.parent.childCount&&Ok([...r.parent.child(l).marks],e,t);)u+=r.parent.child(l).nodeSize,l+=1;return{from:s,to:u}}function Fs(r,e){if(typeof r=="string"){if(!e.marks[r])throw Error(`There is no mark type named '${r}'. Maybe you forgot to add the extension?`);return e.marks[r]}return r}const BX=(r,e={})=>({tr:t,state:n,dispatch:i})=>{const a=Fs(r,n.schema),{doc:o,selection:s}=t,{$from:l,from:u,to:c}=s;if(i){const f=x0(l,a,e);if(f&&f.from<=u&&f.to>=c){const h=We.create(o,f.from,f.to);t.setSelection(h)}}return!0},zX=r=>e=>{const t=typeof r=="function"?r(e):r;for(let n=0;n<t.length;n+=1)if(t[n](e))return!0;return!1};function H5(r){return r instanceof We}function Dl(r=0,e=0,t=0){return Math.min(Math.max(r,e),t)}function FX(r,e=null){if(!e)return null;const t=qe.atStart(r),n=qe.atEnd(r);if(e==="start"||e===!0)return t;if(e==="end")return n;const i=t.from,a=n.to;return e==="all"?We.create(r,Dl(0,i,a),Dl(r.content.size,i,a)):We.create(r,Dl(e,i,a),Dl(e,i,a))}function G5(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function w0(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const VX=(r=null,e={})=>({editor:t,view:n,tr:i,dispatch:a})=>{e={scrollIntoView:!0,...e};const o=()=>{(w0()||G5())&&n.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(n.focus(),e!=null&&e.scrollIntoView&&t.commands.scrollIntoView())})};if(n.hasFocus()&&r===null||r===!1)return!0;if(a&&r===null&&!H5(t.state.selection))return o(),!0;const s=FX(i.doc,r)||t.state.selection,l=t.state.selection.eq(s);return a&&(l||i.setSelection(s),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},$X=(r,e)=>t=>r.every((n,i)=>e(n,{...t,index:i})),HX=(r,e)=>({tr:t,commands:n})=>n.insertContentAt({from:t.selection.from,to:t.selection.to},r,e),W5=r=>{const e=r.childNodes;for(let t=e.length-1;t>=0;t-=1){const n=e[t];n.nodeType===3&&n.nodeValue&&/^(\n\s\s|\n)$/.test(n.nodeValue)?r.removeChild(n):n.nodeType===1&&W5(n)}return r};function Jp(r){const e=`<body>${r}</body>`,t=new window.DOMParser().parseFromString(e,"text/html").body;return W5(t)}function kd(r,e,t){if(r instanceof Wl||r instanceof ne)return r;t={slice:!0,parseOptions:{},...t};const n=typeof r=="object"&&r!==null,i=typeof r=="string";if(n)try{if(Array.isArray(r)&&r.length>0)return ne.fromArray(r.map(s=>e.nodeFromJSON(s)));const o=e.nodeFromJSON(r);return t.errorOnInvalidContent&&o.check(),o}catch(a){if(t.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:a});return console.warn("[tiptap warn]: Invalid content.","Passed value:",r,"Error:",a),kd("",e,t)}if(i){if(t.errorOnInvalidContent){let o=!1,s="";const l=new kY({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(o=!0,s=typeof u=="string"?u:u.outerHTML,null)}]}})});if(t.slice?Gh.fromSchema(l).parseSlice(Jp(r),t.parseOptions):Gh.fromSchema(l).parse(Jp(r),t.parseOptions),t.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${s}`)})}const a=Gh.fromSchema(e);return t.slice?a.parseSlice(Jp(r),t.parseOptions).content:a.parse(Jp(r),t.parseOptions)}return kd("",e,t)}function GX(r,e,t){const n=r.steps.length-1;if(n<e)return;const i=r.steps[n];if(!(i instanceof Mr||i instanceof Dr))return;const a=r.mapping.maps[n];let o=0;a.forEach((s,l,u,c)=>{o===0&&(o=c)}),r.setSelection(qe.near(r.doc.resolve(o),t))}const WX=r=>!("type"in r),UX=(r,e,t)=>({tr:n,dispatch:i,editor:a})=>{var o;if(i){t={parseOptions:a.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...t};let s;const l=m=>{a.emit("contentError",{editor:a,error:m,disableCollaboration:()=>{a.storage.collaboration&&(a.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...t.parseOptions};if(!t.errorOnInvalidContent&&!a.options.enableContentCheck&&a.options.emitContentError)try{kd(e,a.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(m){l(m)}try{s=kd(e,a.schema,{parseOptions:u,errorOnInvalidContent:(o=t.errorOnInvalidContent)!==null&&o!==void 0?o:a.options.enableContentCheck})}catch(m){return l(m),!1}let{from:c,to:f}=typeof r=="number"?{from:r,to:r}:{from:r.from,to:r.to},h=!0,d=!0;if((WX(s)?s:[s]).forEach(m=>{m.check(),h=h?m.isText&&m.marks.length===0:!1,d=d?m.isBlock:!1}),c===f&&d){const{parent:m}=n.doc.resolve(c);m.isTextblock&&!m.type.spec.code&&!m.childCount&&(c-=1,f+=1)}let v;if(h){if(Array.isArray(e))v=e.map(m=>m.text||"").join("");else if(e instanceof ne){let m="";e.forEach(g=>{g.text&&(m+=g.text)}),v=m}else typeof e=="object"&&e&&e.text?v=e.text:v=e;n.insertText(v,c,f)}else v=s,n.replaceWith(c,f,v);t.updateSelection&&GX(n,n.steps.length-1,-1),t.applyInputRules&&n.setMeta("applyInputRules",{from:c,text:v}),t.applyPasteRules&&n.setMeta("applyPasteRules",{from:c,text:v})}return!0},YX=()=>({state:r,dispatch:e})=>eX(r,e),qX=()=>({state:r,dispatch:e})=>tX(r,e),XX=()=>({state:r,dispatch:e})=>E5(r,e),KX=()=>({state:r,dispatch:e})=>R5(r,e),ZX=()=>({state:r,dispatch:e,tr:t})=>{try{const n=v0(r.doc,r.selection.$from.pos,-1);return n==null?!1:(t.join(n,2),e&&e(t),!0)}catch{return!1}},JX=()=>({state:r,dispatch:e,tr:t})=>{try{const n=v0(r.doc,r.selection.$from.pos,1);return n==null?!1:(t.join(n,2),e&&e(t),!0)}catch{return!1}},QX=()=>({state:r,dispatch:e})=>Jq(r,e),eK=()=>({state:r,dispatch:e})=>Qq(r,e);function U5(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function tK(r){const e=r.split(/-(?!$)/);let t=e[e.length-1];t==="Space"&&(t=" ");let n,i,a,o;for(let s=0;s<e.length-1;s+=1){const l=e[s];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))n=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))a=!0;else if(/^mod$/i.test(l))w0()||U5()?o=!0:i=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return n&&(t=`Alt-${t}`),i&&(t=`Ctrl-${t}`),o&&(t=`Meta-${t}`),a&&(t=`Shift-${t}`),t}const rK=r=>({editor:e,view:t,tr:n,dispatch:i})=>{const a=tK(r).split(/-(?!$)/),o=a.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),s=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:a.includes("Alt"),ctrlKey:a.includes("Ctrl"),metaKey:a.includes("Meta"),shiftKey:a.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{t.someProp("handleKeyDown",u=>u(t,s))});return l==null||l.steps.forEach(u=>{const c=u.map(n.mapping);c&&i&&n.maybeStep(c)}),!0};function AT(r,e,t={}){const{from:n,to:i,empty:a}=r.selection,o=e?zr(e,r.schema):null,s=[];r.doc.nodesBetween(n,i,(f,h)=>{if(f.isText)return;const d=Math.max(n,h),p=Math.min(i,h+f.nodeSize);s.push({node:f,from:d,to:p})});const l=i-n,u=s.filter(f=>o?o.name===f.node.type.name:!0).filter(f=>Ag(f.node.attrs,t,{strict:!1}));return a?!!u.length:u.reduce((f,h)=>f+h.to-h.from,0)>=l}const nK=(r,e={})=>({state:t,dispatch:n})=>{const i=zr(r,t.schema);return AT(t,i,e)?rX(t,n):!1},iK=()=>({state:r,dispatch:e})=>B5(r,e),aK=r=>({state:e,dispatch:t})=>{const n=zr(r,e.schema);return pX(n)(e,t)},oK=()=>({state:r,dispatch:e})=>j5(r,e);function MT(r,e){return e.nodes[r]?"node":e.marks[r]?"mark":null}function jk(r,e){const t=typeof e=="string"?[e]:e;return Object.keys(r).reduce((n,i)=>(t.includes(i)||(n[i]=r[i]),n),{})}const sK=(r,e)=>({tr:t,state:n,dispatch:i})=>{let a=null,o=null;const s=MT(typeof r=="string"?r:r.name,n.schema);return s?(s==="node"&&(a=zr(r,n.schema)),s==="mark"&&(o=Fs(r,n.schema)),i&&t.selection.ranges.forEach(l=>{n.doc.nodesBetween(l.$from.pos,l.$to.pos,(u,c)=>{a&&a===u.type&&t.setNodeMarkup(c,void 0,jk(u.attrs,e)),o&&u.marks.length&&u.marks.forEach(f=>{o===f.type&&t.addMark(c,c+u.nodeSize,o.create(jk(f.attrs,e)))})})}),!0):!1},lK=()=>({tr:r,dispatch:e})=>(e&&r.scrollIntoView(),!0),uK=()=>({tr:r,dispatch:e})=>{if(e){const t=new Bn(r.doc);r.setSelection(t)}return!0},cK=()=>({state:r,dispatch:e})=>I5(r,e),fK=()=>({state:r,dispatch:e})=>O5(r,e),hK=()=>({state:r,dispatch:e})=>oX(r,e),dK=()=>({state:r,dispatch:e})=>uX(r,e),pK=()=>({state:r,dispatch:e})=>lX(r,e);function vK(r,e,t={},n={}){return kd(r,e,{slice:!1,parseOptions:t,errorOnInvalidContent:n.errorOnInvalidContent})}const mK=(r,e=!1,t={},n={})=>({editor:i,tr:a,dispatch:o,commands:s})=>{var l,u;const{doc:c}=a;if(t.preserveWhitespace!=="full"){const f=vK(r,i.schema,t,{errorOnInvalidContent:(l=n.errorOnInvalidContent)!==null&&l!==void 0?l:i.options.enableContentCheck});return o&&a.replaceWith(0,c.content.size,f).setMeta("preventUpdate",!e),!0}return o&&a.setMeta("preventUpdate",!e),s.insertContentAt({from:0,to:c.content.size},r,{parseOptions:t,errorOnInvalidContent:(u=n.errorOnInvalidContent)!==null&&u!==void 0?u:i.options.enableContentCheck})};function Y5(r,e){const t=Fs(e,r.schema),{from:n,to:i,empty:a}=r.selection,o=[];a?(r.storedMarks&&o.push(...r.storedMarks),o.push(...r.selection.$head.marks())):r.doc.nodesBetween(n,i,l=>{o.push(...l.marks)});const s=o.find(l=>l.type.name===t.name);return s?{...s.attrs}:{}}function gK(r,e){const t=new e5(r);return e.forEach(n=>{n.steps.forEach(i=>{t.step(i)})}),t}function yK(r){for(let e=0;e<r.edgeCount;e+=1){const{type:t}=r.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}function gw(r,e){const t=[];return r.descendants((n,i)=>{e(n)&&t.push({node:n,pos:i})}),t}function bK(r,e,t){const n=[];return r.nodesBetween(e.from,e.to,(i,a)=>{t(i)&&n.push({node:i,pos:a})}),n}function q5(r,e){for(let t=r.depth;t>0;t-=1){const n=r.node(t);if(e(n))return{pos:t>0?r.before(t):0,start:r.start(t),depth:t,node:n}}}function kT(r){return e=>q5(e.$from,r)}function _K(r,e){const t=zr(e,r.schema),{from:n,to:i}=r.selection,a=[];r.doc.nodesBetween(n,i,s=>{a.push(s)});const o=a.reverse().find(s=>s.type.name===t.name);return o?{...o.attrs}:{}}function xK(r,e){const t=MT(typeof e=="string"?e:e.name,r.schema);return t==="node"?_K(r,e):t==="mark"?Y5(r,e):{}}function wK(r,e=JSON.stringify){const t={};return r.filter(n=>{const i=e(n);return Object.prototype.hasOwnProperty.call(t,i)?!1:t[i]=!0})}function SK(r){const e=wK(r);return e.length===1?e:e.filter((t,n)=>!e.filter((a,o)=>o!==n).some(a=>t.oldRange.from>=a.oldRange.from&&t.oldRange.to<=a.oldRange.to&&t.newRange.from>=a.newRange.from&&t.newRange.to<=a.newRange.to))}function TK(r){const{mapping:e,steps:t}=r,n=[];return e.maps.forEach((i,a)=>{const o=[];if(i.ranges.length)i.forEach((s,l)=>{o.push({from:s,to:l})});else{const{from:s,to:l}=t[a];if(s===void 0||l===void 0)return;o.push({from:s,to:l})}o.forEach(({from:s,to:l})=>{const u=e.slice(a).map(s,-1),c=e.slice(a).map(l),f=e.invert().map(u,-1),h=e.invert().map(c);n.push({oldRange:{from:f,to:h},newRange:{from:u,to:c}})})}),SK(n)}function DT(r,e,t){const n=[];return r===e?t.resolve(r).marks().forEach(i=>{const a=t.resolve(r),o=x0(a,i.type);o&&n.push({mark:i,...o})}):t.nodesBetween(r,e,(i,a)=>{!i||(i==null?void 0:i.nodeSize)===void 0||n.push(...i.marks.map(o=>({from:a,to:a+i.nodeSize,mark:o})))}),n}function Am(r,e,t){return Object.fromEntries(Object.entries(t).filter(([n])=>{const i=r.find(a=>a.type===e&&a.name===n);return i?i.attribute.keepOnSplit:!1}))}function CK(r,e,t={}){const{empty:n,ranges:i}=r.selection,a=e?Fs(e,r.schema):null;if(n)return!!(r.storedMarks||r.selection.$from.marks()).filter(f=>a?a.name===f.type.name:!0).find(f=>Ag(f.attrs,t,{strict:!1}));let o=0;const s=[];if(i.forEach(({$from:f,$to:h})=>{const d=f.pos,p=h.pos;r.doc.nodesBetween(d,p,(v,m)=>{if(!v.isText&&!v.marks.length)return;const g=Math.max(d,m),y=Math.min(p,m+v.nodeSize),b=y-g;o+=b,s.push(...v.marks.map(_=>({mark:_,from:g,to:y})))})}),o===0)return!1;const l=s.filter(f=>a?a.name===f.mark.type.name:!0).filter(f=>Ag(f.mark.attrs,t,{strict:!1})).reduce((f,h)=>f+h.to-h.from,0),u=s.filter(f=>a?f.mark.type!==a&&f.mark.type.excludes(a):!0).reduce((f,h)=>f+h.to-h.from,0);return(l>0?l+u:l)>=o}function Nk(r,e){const{nodeExtensions:t}=bX(e),n=t.find(o=>o.name===r);if(!n)return!1;const i={name:n.name,options:n.options,storage:n.storage},a=pr(jr(n,"group",i));return typeof a!="string"?!1:a.split(" ").includes("list")}function ET(r,{checkChildren:e=!0,ignoreWhitespace:t=!1}={}){var n;if(t){if(r.type.name==="hardBreak")return!0;if(r.isText)return/^\s*$/m.test((n=r.text)!==null&&n!==void 0?n:"")}if(r.isText)return!r.text;if(r.isAtom||r.isLeaf)return!1;if(r.content.childCount===0)return!0;if(e){let i=!0;return r.content.forEach(a=>{i!==!1&&(ET(a,{ignoreWhitespace:t,checkChildren:e})||(i=!1))}),i}return!1}function AK(r){return r instanceof Ne}function MK(r,e,t){var n;const{selection:i}=e;let a=null;if(H5(i)&&(a=i.$cursor),a){const s=(n=r.storedMarks)!==null&&n!==void 0?n:a.marks();return!!t.isInSet(s)||!s.some(l=>l.type.excludes(t))}const{ranges:o}=i;return o.some(({$from:s,$to:l})=>{let u=s.depth===0?r.doc.inlineContent&&r.doc.type.allowsMarkType(t):!1;return r.doc.nodesBetween(s.pos,l.pos,(c,f,h)=>{if(u)return!1;if(c.isInline){const d=!h||h.type.allowsMarkType(t),p=!!t.isInSet(c.marks)||!c.marks.some(v=>v.type.excludes(t));u=d&&p}return!u}),u})}const kK=(r,e={})=>({tr:t,state:n,dispatch:i})=>{const{selection:a}=t,{empty:o,ranges:s}=a,l=Fs(r,n.schema);if(i)if(o){const u=Y5(n,l);t.addStoredMark(l.create({...u,...e}))}else s.forEach(u=>{const c=u.$from.pos,f=u.$to.pos;n.doc.nodesBetween(c,f,(h,d)=>{const p=Math.max(d,c),v=Math.min(d+h.nodeSize,f);h.marks.find(g=>g.type===l)?h.marks.forEach(g=>{l===g.type&&t.addMark(p,v,l.create({...g.attrs,...e}))}):t.addMark(p,v,l.create(e))})});return MK(n,t,l)},DK=(r,e)=>({tr:t})=>(t.setMeta(r,e),!0),EK=(r,e={})=>({state:t,dispatch:n,chain:i})=>{const a=zr(r,t.schema);let o;return t.selection.$anchor.sameParent(t.selection.$head)&&(o=t.selection.$anchor.parent.attrs),a.isTextblock?i().command(({commands:s})=>Rk(a,{...o,...e})(t)?!0:s.clearNodes()).command(({state:s})=>Rk(a,{...o,...e})(s,n)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},LK=r=>({tr:e,dispatch:t})=>{if(t){const{doc:n}=e,i=Dl(r,0,n.content.size),a=Ne.create(n,i);e.setSelection(a)}return!0},IK=r=>({tr:e,dispatch:t})=>{if(t){const{doc:n}=e,{from:i,to:a}=typeof r=="number"?{from:r,to:r}:r,o=We.atStart(n).from,s=We.atEnd(n).to,l=Dl(i,o,s),u=Dl(a,o,s),c=We.create(n,l,u);e.setSelection(c)}return!0},PK=r=>({state:e,dispatch:t})=>{const n=zr(r,e.schema);return gX(n)(e,t)};function Bk(r,e){const t=r.storedMarks||r.selection.$to.parentOffset&&r.selection.$from.marks();if(t){const n=t.filter(i=>e==null?void 0:e.includes(i.type.name));r.tr.ensureMarks(n)}}const RK=({keepMarks:r=!0}={})=>({tr:e,state:t,dispatch:n,editor:i})=>{const{selection:a,doc:o}=e,{$from:s,$to:l}=a,u=i.extensionManager.attributes,c=Am(u,s.node().type.name,s.node().attrs);if(a instanceof Ne&&a.node.isBlock)return!s.parentOffset||!uo(o,s.pos)?!1:(n&&(r&&Bk(t,i.extensionManager.splittableMarks),e.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;const f=l.parentOffset===l.parent.content.size,h=s.depth===0?void 0:yK(s.node(-1).contentMatchAt(s.indexAfter(-1)));let d=f&&h?[{type:h,attrs:c}]:void 0,p=uo(e.doc,e.mapping.map(s.pos),1,d);if(!d&&!p&&uo(e.doc,e.mapping.map(s.pos),1,h?[{type:h}]:void 0)&&(p=!0,d=h?[{type:h,attrs:c}]:void 0),n){if(p&&(a instanceof We&&e.deleteSelection(),e.split(e.mapping.map(s.pos),1,d),h&&!f&&!s.parentOffset&&s.parent.type!==h)){const v=e.mapping.map(s.before()),m=e.doc.resolve(v);s.node(-1).canReplaceWith(m.index(),m.index()+1,h)&&e.setNodeMarkup(e.mapping.map(s.before()),h)}r&&Bk(t,i.extensionManager.splittableMarks),e.scrollIntoView()}return p},OK=(r,e={})=>({tr:t,state:n,dispatch:i,editor:a})=>{var o;const s=zr(r,n.schema),{$from:l,$to:u}=n.selection,c=n.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(u))return!1;const f=l.node(-1);if(f.type!==s)return!1;const h=a.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==s||l.index(-2)!==l.node(-2).childCount-1)return!1;if(i){let g=ne.empty;const y=l.index(-1)?1:l.index(-2)?2:3;for(let T=l.depth-y;T>=l.depth-3;T-=1)g=ne.from(l.node(T).copy(g));const b=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,_={...Am(h,l.node().type.name,l.node().attrs),...e},x=((o=s.contentMatch.defaultType)===null||o===void 0?void 0:o.createAndFill(_))||void 0;g=g.append(ne.from(s.createAndFill(null,x)||void 0));const w=l.before(l.depth-(y-1));t.replace(w,l.after(-b),new ye(g,4-y,0));let S=-1;t.doc.nodesBetween(w,t.doc.content.size,(T,C)=>{if(S>-1)return!1;T.isTextblock&&T.content.size===0&&(S=C+1)}),S>-1&&t.setSelection(We.near(t.doc.resolve(S))),t.scrollIntoView()}return!0}const d=u.pos===l.end()?f.contentMatchAt(0).defaultType:null,p={...Am(h,f.type.name,f.attrs),...e},v={...Am(h,l.node().type.name,l.node().attrs),...e};t.delete(l.pos,u.pos);const m=d?[{type:s,attrs:p},{type:d,attrs:v}]:[{type:s,attrs:p}];if(!uo(t.doc,l.pos,2))return!1;if(i){const{selection:g,storedMarks:y}=n,{splittableMarks:b}=a.extensionManager,_=y||g.$to.parentOffset&&g.$from.marks();if(t.split(l.pos,2,m).scrollIntoView(),!_||!i)return!0;const x=_.filter(w=>b.includes(w.type.name));t.ensureMarks(x)}return!0},H1=(r,e)=>{const t=kT(o=>o.type===e)(r.selection);if(!t)return!0;const n=r.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(n===void 0)return!0;const i=r.doc.nodeAt(n);return t.node.type===(i==null?void 0:i.type)&&Ns(r.doc,t.pos)&&r.join(t.pos),!0},G1=(r,e)=>{const t=kT(o=>o.type===e)(r.selection);if(!t)return!0;const n=r.doc.resolve(t.start).after(t.depth);if(n===void 0)return!0;const i=r.doc.nodeAt(n);return t.node.type===(i==null?void 0:i.type)&&Ns(r.doc,n)&&r.join(n),!0},jK=(r,e,t,n={})=>({editor:i,tr:a,state:o,dispatch:s,chain:l,commands:u,can:c})=>{const{extensions:f,splittableMarks:h}=i.extensionManager,d=zr(r,o.schema),p=zr(e,o.schema),{selection:v,storedMarks:m}=o,{$from:g,$to:y}=v,b=g.blockRange(y),_=m||v.$to.parentOffset&&v.$from.marks();if(!b)return!1;const x=kT(w=>Nk(w.type.name,f))(v);if(b.depth>=1&&x&&b.depth-x.depth<=1){if(x.node.type===d)return u.liftListItem(p);if(Nk(x.node.type.name,f)&&d.validContent(x.node.content)&&s)return l().command(()=>(a.setNodeMarkup(x.pos,d),!0)).command(()=>H1(a,d)).command(()=>G1(a,d)).run()}return!t||!_||!s?l().command(()=>c().wrapInList(d,n)?!0:u.clearNodes()).wrapInList(d,n).command(()=>H1(a,d)).command(()=>G1(a,d)).run():l().command(()=>{const w=c().wrapInList(d,n),S=_.filter(T=>h.includes(T.type.name));return a.ensureMarks(S),w?!0:u.clearNodes()}).wrapInList(d,n).command(()=>H1(a,d)).command(()=>G1(a,d)).run()},NK=(r,e={},t={})=>({state:n,commands:i})=>{const{extendEmptyMarkRange:a=!1}=t,o=Fs(r,n.schema);return CK(n,o,e)?i.unsetMark(o,{extendEmptyMarkRange:a}):i.setMark(o,e)},BK=(r,e,t={})=>({state:n,commands:i})=>{const a=zr(r,n.schema),o=zr(e,n.schema),s=AT(n,a,t);let l;return n.selection.$anchor.sameParent(n.selection.$head)&&(l=n.selection.$anchor.parent.attrs),s?i.setNode(o,l):i.setNode(a,{...l,...t})},zK=(r,e={})=>({state:t,commands:n})=>{const i=zr(r,t.schema);return AT(t,i,e)?n.lift(i):n.wrapIn(i,e)},FK=()=>({state:r,dispatch:e})=>{const t=r.plugins;for(let n=0;n<t.length;n+=1){const i=t[n];let a;if(i.spec.isInputRules&&(a=i.getState(r))){if(e){const o=r.tr,s=a.transform;for(let l=s.steps.length-1;l>=0;l-=1)o.step(s.steps[l].invert(s.docs[l]));if(a.text){const l=o.doc.resolve(a.from).marks();o.replaceWith(a.from,a.to,r.schema.text(a.text,l))}else o.delete(a.from,a.to)}return!0}}return!1},VK=()=>({tr:r,dispatch:e})=>{const{selection:t}=r,{empty:n,ranges:i}=t;return n||e&&i.forEach(a=>{r.removeMark(a.$from.pos,a.$to.pos)}),!0},$K=(r,e={})=>({tr:t,state:n,dispatch:i})=>{var a;const{extendEmptyMarkRange:o=!1}=e,{selection:s}=t,l=Fs(r,n.schema),{$from:u,empty:c,ranges:f}=s;if(!i)return!0;if(c&&o){let{from:h,to:d}=s;const p=(a=u.marks().find(m=>m.type===l))===null||a===void 0?void 0:a.attrs,v=x0(u,l,p);v&&(h=v.from,d=v.to),t.removeMark(h,d,l)}else f.forEach(h=>{t.removeMark(h.$from.pos,h.$to.pos,l)});return t.removeStoredMark(l),!0},HK=(r,e={})=>({tr:t,state:n,dispatch:i})=>{let a=null,o=null;const s=MT(typeof r=="string"?r:r.name,n.schema);return s?(s==="node"&&(a=zr(r,n.schema)),s==="mark"&&(o=Fs(r,n.schema)),i&&t.selection.ranges.forEach(l=>{const u=l.$from.pos,c=l.$to.pos;let f,h,d,p;t.selection.empty?n.doc.nodesBetween(u,c,(v,m)=>{a&&a===v.type&&(d=Math.max(m,u),p=Math.min(m+v.nodeSize,c),f=m,h=v)}):n.doc.nodesBetween(u,c,(v,m)=>{m<u&&a&&a===v.type&&(d=Math.max(m,u),p=Math.min(m+v.nodeSize,c),f=m,h=v),m>=u&&m<=c&&(a&&a===v.type&&t.setNodeMarkup(m,void 0,{...v.attrs,...e}),o&&v.marks.length&&v.marks.forEach(g=>{if(o===g.type){const y=Math.max(m,u),b=Math.min(m+v.nodeSize,c);t.addMark(y,b,o.create({...g.attrs,...e}))}}))}),h&&(f!==void 0&&t.setNodeMarkup(f,void 0,{...h.attrs,...e}),o&&h.marks.length&&h.marks.forEach(v=>{o===v.type&&t.addMark(d,p,o.create({...v.attrs,...e}))}))}),!0):!1},GK=(r,e={})=>({state:t,dispatch:n})=>{const i=zr(r,t.schema);return cX(i,e)(t,n)},WK=(r,e={})=>({state:t,dispatch:n})=>{const i=zr(r,t.schema);return fX(i,e)(t,n)};var UK=Object.freeze({__proto__:null,blur:AX,clearContent:MX,clearNodes:kX,command:DX,createParagraphNear:EX,cut:LX,deleteCurrentNode:IX,deleteNode:PX,deleteRange:RX,deleteSelection:OX,enter:jX,exitCode:NX,extendMarkRange:BX,first:zX,focus:VX,forEach:$X,insertContent:HX,insertContentAt:UX,joinBackward:XX,joinDown:qX,joinForward:KX,joinItemBackward:ZX,joinItemForward:JX,joinTextblockBackward:QX,joinTextblockForward:eK,joinUp:YX,keyboardShortcut:rK,lift:nK,liftEmptyBlock:iK,liftListItem:aK,newlineInCode:oK,resetAttributes:sK,scrollIntoView:lK,selectAll:uK,selectNodeBackward:cK,selectNodeForward:fK,selectParentNode:hK,selectTextblockEnd:dK,selectTextblockStart:pK,setContent:mK,setMark:kK,setMeta:DK,setNode:EK,setNodeSelection:LK,setTextSelection:IK,sinkListItem:PK,splitBlock:RK,splitListItem:OK,toggleList:jK,toggleMark:NK,toggleNode:BK,toggleWrap:zK,undoInputRule:FK,unsetAllMarks:VK,unsetMark:$K,updateAttributes:HK,wrapIn:GK,wrapInList:WK});Kt.create({name:"commands",addCommands(){return{...UK}}});Kt.create({name:"drop",addProseMirrorPlugins(){return[new Ut({key:new jt("tiptapDrop"),props:{handleDrop:(r,e,t,n)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:t,moved:n})}}})]}});Kt.create({name:"editable",addProseMirrorPlugins(){return[new Ut({key:new jt("editable"),props:{editable:()=>this.editor.options.editable}})]}});const YK=new jt("focusEvents");Kt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:r}=this;return[new Ut({key:YK,props:{handleDOMEvents:{focus:(e,t)=>{r.isFocused=!0;const n=r.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(n),!1},blur:(e,t)=>{r.isFocused=!1;const n=r.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(n),!1}}}})]}});Kt.create({name:"keymap",addKeyboardShortcuts(){const r=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:s})=>{const{selection:l,doc:u}=s,{empty:c,$anchor:f}=l,{pos:h,parent:d}=f,p=f.parent.isTextblock&&h>0?s.doc.resolve(h-1):f,v=p.parent.type.spec.isolating,m=f.pos-f.parentOffset,g=v&&p.parent.childCount===1?m===f.pos:qe.atStart(u).from===h;return!c||!d.type.isTextblock||d.textContent.length||!g||g&&f.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:r,"Mod-Backspace":r,"Shift-Backspace":r,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i={...n},a={...n,"Ctrl-h":r,"Alt-Backspace":r,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return w0()||U5()?a:i},addProseMirrorPlugins(){return[new Ut({key:new jt("clearDocument"),appendTransaction:(r,e,t)=>{if(r.some(v=>v.getMeta("composition")))return;const n=r.some(v=>v.docChanged)&&!e.doc.eq(t.doc),i=r.some(v=>v.getMeta("preventClearDocument"));if(!n||i)return;const{empty:a,from:o,to:s}=e.selection,l=qe.atStart(e.doc).from,u=qe.atEnd(e.doc).to;if(a||!(o===l&&s===u)||!ET(t.doc))return;const h=t.tr,d=V5({state:t,transaction:h}),{commands:p}=new yX({editor:this.editor,state:d});if(p.clearNodes(),!!h.steps.length)return h}})]}});Kt.create({name:"paste",addProseMirrorPlugins(){return[new Ut({key:new jt("tiptapPaste"),props:{handlePaste:(r,e,t)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:t})}}})]}});Kt.create({name:"tabindex",addProseMirrorPlugins(){return[new Ut({key:new jt("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});function Xc(r){return new yp({find:r.find,handler:({state:e,range:t,match:n})=>{const i=pr(r.getAttributes,void 0,n);if(i===!1||i===null)return null;const{tr:a}=e,o=n[n.length-1],s=n[0];if(o){const l=s.search(/\S/),u=t.from+s.indexOf(o),c=u+o.length;if(DT(t.from,t.to,e.doc).filter(d=>d.mark.type.excluded.find(v=>v===r.type&&v!==d.mark.type)).filter(d=>d.to>u).length)return null;c<t.to&&a.delete(c,t.to),u>t.from&&a.delete(t.from+l,u);const h=t.from+l+o.length;a.addMark(t.from+l,h,r.type.create(i||{})),a.removeStoredMark(r.type)}}})}function X5(r){return new yp({find:r.find,handler:({state:e,range:t,match:n})=>{const i=pr(r.getAttributes,void 0,n)||{},{tr:a}=e,o=t.from;let s=t.to;const l=r.type.create(i);if(n[1]){const u=n[0].lastIndexOf(n[1]);let c=o+u;c>s?c=s:s=c+n[1].length;const f=n[0][n[0].length-1];a.insertText(f,o+n[0].length-1),a.replaceWith(c,s,l)}else if(n[0]){const u=r.type.isInline?o:o-1;a.insert(u,r.type.create(i)).delete(a.mapping.map(o),a.mapping.map(s))}a.scrollIntoView()}})}function Mg(r){return new yp({find:r.find,handler:({state:e,range:t,match:n})=>{const i=e.doc.resolve(t.from),a=pr(r.getAttributes,void 0,n)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),r.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,r.type,a)}})}function ir(r){return new yp({find:r.find,handler:({state:e,range:t,match:n})=>{let i=r.replace,a=t.from;const o=t.to;if(n[1]){const s=n[0].lastIndexOf(n[1]);i+=n[0].slice(s+n[1].length),a+=s;const l=a-o;l>0&&(i=n[0].slice(s-l,s)+i,a=o)}e.tr.insertText(i,a,o)}})}function Kc(r){return new yp({find:r.find,handler:({state:e,range:t,match:n,chain:i})=>{const a=pr(r.getAttributes,void 0,n)||{},o=e.tr.delete(t.from,t.to),l=o.doc.resolve(t.from).blockRange(),u=l&&fT(l,r.type,a);if(!u)return null;if(o.wrap(l,u),r.keepMarks&&r.editor){const{selection:f,storedMarks:h}=e,{splittableMarks:d}=r.editor.extensionManager,p=h||f.$to.parentOffset&&f.$from.marks();if(p){const v=p.filter(m=>d.includes(m.type.name));o.ensureMarks(v)}}if(r.keepAttributes){const f=r.type.name==="bulletList"||r.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(f,a).run()}const c=o.doc.resolve(t.from-1).nodeBefore;c&&c.type===r.type&&Ns(o.doc,t.from-1)&&(!r.joinPredicate||r.joinPredicate(n,c))&&o.join(t.from-1)}})}let ar=class yw{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=pr(jr(this,"addOptions",{name:this.name}))),this.storage=pr(jr(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new yw(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>_0(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new yw(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=pr(jr(t,"addOptions",{name:t.name})),t.storage=pr(jr(t,"addStorage",{name:t.name,options:t.options})),t}};class qK{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,i,a,o,s,l;const{view:u}=this.editor,c=e.target,f=c.nodeType===3?(t=c.parentElement)===null||t===void 0?void 0:t.closest("[data-drag-handle]"):c.closest("[data-drag-handle]");if(!this.dom||!((n=this.contentDOM)===null||n===void 0)&&n.contains(c)||!f)return;let h=0,d=0;if(this.dom!==f){const y=this.dom.getBoundingClientRect(),b=f.getBoundingClientRect(),_=(i=e.offsetX)!==null&&i!==void 0?i:(a=e.nativeEvent)===null||a===void 0?void 0:a.offsetX,x=(o=e.offsetY)!==null&&o!==void 0?o:(s=e.nativeEvent)===null||s===void 0?void 0:s.offsetY;h=b.x-y.x+_,d=b.y-y.y+x}const p=this.dom.cloneNode(!0);(l=e.dataTransfer)===null||l===void 0||l.setDragImage(p,h,d);const v=this.getPos();if(typeof v!="number")return;const m=Ne.create(u.state.doc,v),g=u.state.tr.setSelection(m);u.dispatch(g)}stopEvent(e){var t;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});const n=e.target;if(!(this.dom.contains(n)&&!(!((t=this.contentDOM)===null||t===void 0)&&t.contains(n))))return!1;const a=e.type.startsWith("drag"),o=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o&&!a)return!0;const{isEditable:l}=this.editor,{isDragging:u}=this,c=!!this.node.type.spec.draggable,f=Ne.isSelectable(this.node),h=e.type==="copy",d=e.type==="paste",p=e.type==="cut",v=e.type==="mousedown";if(!c&&f&&a&&e.target===this.dom&&e.preventDefault(),c&&a&&!u&&e.target===this.dom)return e.preventDefault(),!1;if(c&&l&&!u&&v){const m=n.closest("[data-drag-handle]");m&&(this.dom===m||this.dom.contains(m))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(u||o||h||d||p||v&&f)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(w0()||G5())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{const n=this.getPos();return typeof n!="number"?!1:(t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){const e=this.getPos();if(typeof e!="number")return;const t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}}function fu(r){return new SX({find:r.find,handler:({state:e,range:t,match:n,pasteEvent:i})=>{const a=pr(r.getAttributes,void 0,n,i);if(a===!1||a===null)return null;const{tr:o}=e,s=n[n.length-1],l=n[0];let u=t.to;if(s){const c=l.search(/\S/),f=t.from+l.indexOf(s),h=f+s.length;if(DT(t.from,t.to,e.doc).filter(p=>p.mark.type.excluded.find(m=>m===r.type&&m!==p.mark.type)).filter(p=>p.to>f).length)return null;h<t.to&&o.delete(h,t.to),f>t.from&&o.delete(t.from+c,f),u=t.from+c+s.length,o.addMark(t.from+c,u,r.type.create(a||{})),o.removeStoredMark(r.type)}}})}function XK(r,e){const{selection:t}=r,{$from:n}=t;if(t instanceof Ne){const a=n.index();return n.parent.canReplaceWith(a,a+1,e)}let i=n.depth;for(;i>=0;){const a=n.index(i);if(n.node(i).contentMatchAt(a).matchType(e))return!0;i-=1}return!1}function KK(r){return r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var ZK="tippy-box",K5="tippy-content",JK="tippy-backdrop",Z5="tippy-arrow",J5="tippy-svg-arrow",vl={passive:!0,capture:!0},Q5=function(){return document.body};function W1(r,e,t){if(Array.isArray(r)){var n=r[e];return n??(Array.isArray(t)?t[e]:t)}return r}function LT(r,e){var t={}.toString.call(r);return t.indexOf("[object")===0&&t.indexOf(e+"]")>-1}function e4(r,e){return typeof r=="function"?r.apply(void 0,e):r}function zk(r,e){if(e===0)return r;var t;return function(n){clearTimeout(t),t=setTimeout(function(){r(n)},e)}}function QK(r){return r.split(/\s+/).filter(Boolean)}function bc(r){return[].concat(r)}function Fk(r,e){r.indexOf(e)===-1&&r.push(e)}function eZ(r){return r.filter(function(e,t){return r.indexOf(e)===t})}function tZ(r){return r.split("-")[0]}function kg(r){return[].slice.call(r)}function Vk(r){return Object.keys(r).reduce(function(e,t){return r[t]!==void 0&&(e[t]=r[t]),e},{})}function Yh(){return document.createElement("div")}function S0(r){return["Element","Fragment"].some(function(e){return LT(r,e)})}function rZ(r){return LT(r,"NodeList")}function nZ(r){return LT(r,"MouseEvent")}function iZ(r){return!!(r&&r._tippy&&r._tippy.reference===r)}function aZ(r){return S0(r)?[r]:rZ(r)?kg(r):Array.isArray(r)?r:kg(document.querySelectorAll(r))}function U1(r,e){r.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function $k(r,e){r.forEach(function(t){t&&t.setAttribute("data-state",e)})}function oZ(r){var e,t=bc(r),n=t[0];return n!=null&&(e=n.ownerDocument)!=null&&e.body?n.ownerDocument:document}function sZ(r,e){var t=e.clientX,n=e.clientY;return r.every(function(i){var a=i.popperRect,o=i.popperState,s=i.props,l=s.interactiveBorder,u=tZ(o.placement),c=o.modifiersData.offset;if(!c)return!0;var f=u==="bottom"?c.top.y:0,h=u==="top"?c.bottom.y:0,d=u==="right"?c.left.x:0,p=u==="left"?c.right.x:0,v=a.top-n+f>l,m=n-a.bottom-h>l,g=a.left-t+d>l,y=t-a.right-p>l;return v||m||g||y})}function Y1(r,e,t){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){r[n](i,t)})}function Hk(r,e){for(var t=e;t;){var n;if(r.contains(t))return!0;t=t.getRootNode==null||(n=t.getRootNode())==null?void 0:n.host}return!1}var sa={isTouch:!1},Gk=0;function lZ(){sa.isTouch||(sa.isTouch=!0,window.performance&&document.addEventListener("mousemove",t4))}function t4(){var r=performance.now();r-Gk<20&&(sa.isTouch=!1,document.removeEventListener("mousemove",t4)),Gk=r}function uZ(){var r=document.activeElement;if(iZ(r)){var e=r._tippy;r.blur&&!e.state.isVisible&&r.blur()}}function cZ(){document.addEventListener("touchstart",lZ,vl),window.addEventListener("blur",uZ)}var fZ=typeof window<"u"&&typeof document<"u",hZ=fZ?!!window.msCrypto:!1,dZ={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},pZ={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Ei=Object.assign({appendTo:Q5,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},dZ,pZ),vZ=Object.keys(Ei),mZ=function(e){var t=Object.keys(e);t.forEach(function(n){Ei[n]=e[n]})};function r4(r){var e=r.plugins||[],t=e.reduce(function(n,i){var a=i.name,o=i.defaultValue;if(a){var s;n[a]=r[a]!==void 0?r[a]:(s=Ei[a])!=null?s:o}return n},{});return Object.assign({},r,t)}function gZ(r,e){var t=e?Object.keys(r4(Object.assign({},Ei,{plugins:e}))):vZ,n=t.reduce(function(i,a){var o=(r.getAttribute("data-tippy-"+a)||"").trim();if(!o)return i;if(a==="content")i[a]=o;else try{i[a]=JSON.parse(o)}catch{i[a]=o}return i},{});return n}function Wk(r,e){var t=Object.assign({},e,{content:e4(e.content,[r])},e.ignoreAttributes?{}:gZ(r,e.plugins));return t.aria=Object.assign({},Ei.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}var yZ=function(){return"innerHTML"};function bw(r,e){r[yZ()]=e}function Uk(r){var e=Yh();return r===!0?e.className=Z5:(e.className=J5,S0(r)?e.appendChild(r):bw(e,r)),e}function Yk(r,e){S0(e.content)?(bw(r,""),r.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?bw(r,e.content):r.textContent=e.content)}function _w(r){var e=r.firstElementChild,t=kg(e.children);return{box:e,content:t.find(function(n){return n.classList.contains(K5)}),arrow:t.find(function(n){return n.classList.contains(Z5)||n.classList.contains(J5)}),backdrop:t.find(function(n){return n.classList.contains(JK)})}}function n4(r){var e=Yh(),t=Yh();t.className=ZK,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var n=Yh();n.className=K5,n.setAttribute("data-state","hidden"),Yk(n,r.props),e.appendChild(t),t.appendChild(n),i(r.props,r.props);function i(a,o){var s=_w(e),l=s.box,u=s.content,c=s.arrow;o.theme?l.setAttribute("data-theme",o.theme):l.removeAttribute("data-theme"),typeof o.animation=="string"?l.setAttribute("data-animation",o.animation):l.removeAttribute("data-animation"),o.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof o.maxWidth=="number"?o.maxWidth+"px":o.maxWidth,o.role?l.setAttribute("role",o.role):l.removeAttribute("role"),(a.content!==o.content||a.allowHTML!==o.allowHTML)&&Yk(u,r.props),o.arrow?c?a.arrow!==o.arrow&&(l.removeChild(c),l.appendChild(Uk(o.arrow))):l.appendChild(Uk(o.arrow)):c&&l.removeChild(c)}return{popper:e,onUpdate:i}}n4.$$tippy=!0;var bZ=1,Qp=[],q1=[];function _Z(r,e){var t=Wk(r,Object.assign({},Ei,r4(Vk(e)))),n,i,a,o=!1,s=!1,l=!1,u=!1,c,f,h,d=[],p=zk(Q,t.interactiveDebounce),v,m=bZ++,g=null,y=eZ(t.plugins),b={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},_={id:m,reference:r,popper:Yh(),popperInstance:g,props:t,state:b,plugins:y,clearDelayTimeouts:tn,setProps:pe,setContent:De,show:tt,hide:mt,hideWithInteractivity:or,enable:yr,disable:en,unmount:$r,destroy:Io};if(!t.render)return _;var x=t.render(_),w=x.popper,S=x.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+_.id,_.popper=w,r._tippy=_,w._tippy=_;var T=y.map(function(X){return X.fn(_)}),C=r.hasAttribute("aria-expanded");return re(),F(),P(),O("onCreate",[_]),t.showOnCreate&&ht(),w.addEventListener("mouseenter",function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()}),w.addEventListener("mouseleave",function(){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&L().addEventListener("mousemove",p)}),_;function A(){var X=_.props.touch;return Array.isArray(X)?X:[X,0]}function M(){return A()[0]==="hold"}function D(){var X;return!!((X=_.props.render)!=null&&X.$$tippy)}function E(){return v||r}function L(){var X=E().parentNode;return X?oZ(X):document}function I(){return _w(w)}function R(X){return _.state.isMounted&&!_.state.isVisible||sa.isTouch||c&&c.type==="focus"?0:W1(_.props.delay,X?0:1,Ei.delay)}function P(X){X===void 0&&(X=!1),w.style.pointerEvents=_.props.interactive&&!X?"":"none",w.style.zIndex=""+_.props.zIndex}function O(X,Ae,Ge){if(Ge===void 0&&(Ge=!0),T.forEach(function(gt){gt[X]&>[X].apply(gt,Ae)}),Ge){var xt;(xt=_.props)[X].apply(xt,Ae)}}function j(){var X=_.props.aria;if(X.content){var Ae="aria-"+X.content,Ge=w.id,xt=bc(_.props.triggerTarget||r);xt.forEach(function(gt){var hr=gt.getAttribute(Ae);if(_.state.isVisible)gt.setAttribute(Ae,hr?hr+" "+Ge:Ge);else{var Ir=hr&&hr.replace(Ge,"").trim();Ir?gt.setAttribute(Ae,Ir):gt.removeAttribute(Ae)}})}}function F(){if(!(C||!_.props.aria.expanded)){var X=bc(_.props.triggerTarget||r);X.forEach(function(Ae){_.props.interactive?Ae.setAttribute("aria-expanded",_.state.isVisible&&Ae===E()?"true":"false"):Ae.removeAttribute("aria-expanded")})}}function N(){L().removeEventListener("mousemove",p),Qp=Qp.filter(function(X){return X!==p})}function B(X){if(!(sa.isTouch&&(l||X.type==="mousedown"))){var Ae=X.composedPath&&X.composedPath()[0]||X.target;if(!(_.props.interactive&&Hk(w,Ae))){if(bc(_.props.triggerTarget||r).some(function(Ge){return Hk(Ge,Ae)})){if(sa.isTouch||_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else O("onClickOutside",[_,X]);_.props.hideOnClick===!0&&(_.clearDelayTimeouts(),_.hide(),s=!0,setTimeout(function(){s=!1}),_.state.isMounted||we())}}}function $(){l=!0}function J(){l=!1}function U(){var X=L();X.addEventListener("mousedown",B,!0),X.addEventListener("touchend",B,vl),X.addEventListener("touchstart",J,vl),X.addEventListener("touchmove",$,vl)}function we(){var X=L();X.removeEventListener("mousedown",B,!0),X.removeEventListener("touchend",B,vl),X.removeEventListener("touchstart",J,vl),X.removeEventListener("touchmove",$,vl)}function Ye(X,Ae){le(X,function(){!_.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&Ae()})}function ge(X,Ae){le(X,Ae)}function le(X,Ae){var Ge=I().box;function xt(gt){gt.target===Ge&&(Y1(Ge,"remove",xt),Ae())}if(X===0)return Ae();Y1(Ge,"remove",f),Y1(Ge,"add",xt),f=xt}function be(X,Ae,Ge){Ge===void 0&&(Ge=!1);var xt=bc(_.props.triggerTarget||r);xt.forEach(function(gt){gt.addEventListener(X,Ae,Ge),d.push({node:gt,eventType:X,handler:Ae,options:Ge})})}function re(){M()&&(be("touchstart",ee,{passive:!0}),be("touchend",me,{passive:!0})),QK(_.props.trigger).forEach(function(X){if(X!=="manual")switch(be(X,ee),X){case"mouseenter":be("mouseleave",me);break;case"focus":be(hZ?"focusout":"blur",he);break;case"focusin":be("focusout",he);break}})}function G(){d.forEach(function(X){var Ae=X.node,Ge=X.eventType,xt=X.handler,gt=X.options;Ae.removeEventListener(Ge,xt,gt)}),d=[]}function ee(X){var Ae,Ge=!1;if(!(!_.state.isEnabled||Se(X)||s)){var xt=((Ae=c)==null?void 0:Ae.type)==="focus";c=X,v=X.currentTarget,F(),!_.state.isVisible&&nZ(X)&&Qp.forEach(function(gt){return gt(X)}),X.type==="click"&&(_.props.trigger.indexOf("mouseenter")<0||o)&&_.props.hideOnClick!==!1&&_.state.isVisible?Ge=!0:ht(X),X.type==="click"&&(o=!Ge),Ge&&!xt&&fr(X)}}function Q(X){var Ae=X.target,Ge=E().contains(Ae)||w.contains(Ae);if(!(X.type==="mousemove"&&Ge)){var xt=at().concat(w).map(function(gt){var hr,Ir=gt._tippy,Po=(hr=Ir.popperInstance)==null?void 0:hr.state;return Po?{popperRect:gt.getBoundingClientRect(),popperState:Po,props:t}:null}).filter(Boolean);sZ(xt,X)&&(N(),fr(X))}}function me(X){var Ae=Se(X)||_.props.trigger.indexOf("click")>=0&&o;if(!Ae){if(_.props.interactive){_.hideWithInteractivity(X);return}fr(X)}}function he(X){_.props.trigger.indexOf("focusin")<0&&X.target!==E()||_.props.interactive&&X.relatedTarget&&w.contains(X.relatedTarget)||fr(X)}function Se(X){return sa.isTouch?M()!==X.type.indexOf("touch")>=0:!1}function Fe(){xe();var X=_.props,Ae=X.popperOptions,Ge=X.placement,xt=X.offset,gt=X.getReferenceClientRect,hr=X.moveTransition,Ir=D()?_w(w).arrow:null,Po=gt?{getBoundingClientRect:gt,contextElement:gt.contextElement||E()}:r,Ro={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Yt){var En=Yt.state;if(D()){var x1=I(),zu=x1.box;["placement","reference-hidden","escaped"].forEach(function(Oo){Oo==="placement"?zu.setAttribute("data-placement",En.placement):En.attributes.popper["data-popper-"+Oo]?zu.setAttribute("data-"+Oo,""):zu.removeAttribute("data-"+Oo)}),En.attributes.popper={}}}},Va=[{name:"offset",options:{offset:xt}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!hr}},Ro];D()&&Ir&&Va.push({name:"arrow",options:{element:Ir,padding:3}}),Va.push.apply(Va,(Ae==null?void 0:Ae.modifiers)||[]),_.popperInstance=j7(Po,w,Object.assign({},Ae,{placement:Ge,onFirstUpdate:h,modifiers:Va}))}function xe(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function rt(){var X=_.props.appendTo,Ae,Ge=E();_.props.interactive&&X===Q5||X==="parent"?Ae=Ge.parentNode:Ae=e4(X,[Ge]),Ae.contains(w)||Ae.appendChild(w),_.state.isMounted=!0,Fe()}function at(){return kg(w.querySelectorAll("[data-tippy-root]"))}function ht(X){_.clearDelayTimeouts(),X&&O("onTrigger",[_,X]),U();var Ae=R(!0),Ge=A(),xt=Ge[0],gt=Ge[1];sa.isTouch&&xt==="hold"&>&&(Ae=gt),Ae?n=setTimeout(function(){_.show()},Ae):_.show()}function fr(X){if(_.clearDelayTimeouts(),O("onUntrigger",[_,X]),!_.state.isVisible){we();return}if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(X.type)>=0&&o)){var Ae=R(!1);Ae?i=setTimeout(function(){_.state.isVisible&&_.hide()},Ae):a=requestAnimationFrame(function(){_.hide()})}}function yr(){_.state.isEnabled=!0}function en(){_.hide(),_.state.isEnabled=!1}function tn(){clearTimeout(n),clearTimeout(i),cancelAnimationFrame(a)}function pe(X){if(!_.state.isDestroyed){O("onBeforeUpdate",[_,X]),G();var Ae=_.props,Ge=Wk(r,Object.assign({},Ae,Vk(X),{ignoreAttributes:!0}));_.props=Ge,re(),Ae.interactiveDebounce!==Ge.interactiveDebounce&&(N(),p=zk(Q,Ge.interactiveDebounce)),Ae.triggerTarget&&!Ge.triggerTarget?bc(Ae.triggerTarget).forEach(function(xt){xt.removeAttribute("aria-expanded")}):Ge.triggerTarget&&r.removeAttribute("aria-expanded"),F(),P(),S&&S(Ae,Ge),_.popperInstance&&(Fe(),at().forEach(function(xt){requestAnimationFrame(xt._tippy.popperInstance.forceUpdate)})),O("onAfterUpdate",[_,X])}}function De(X){_.setProps({content:X})}function tt(){var X=_.state.isVisible,Ae=_.state.isDestroyed,Ge=!_.state.isEnabled,xt=sa.isTouch&&!_.props.touch,gt=W1(_.props.duration,0,Ei.duration);if(!(X||Ae||Ge||xt)&&!E().hasAttribute("disabled")&&(O("onShow",[_],!1),_.props.onShow(_)!==!1)){if(_.state.isVisible=!0,D()&&(w.style.visibility="visible"),P(),U(),_.state.isMounted||(w.style.transition="none"),D()){var hr=I(),Ir=hr.box,Po=hr.content;U1([Ir,Po],0)}h=function(){var Va;if(!(!_.state.isVisible||u)){if(u=!0,w.offsetHeight,w.style.transition=_.props.moveTransition,D()&&_.props.animation){var If=I(),Yt=If.box,En=If.content;U1([Yt,En],gt),$k([Yt,En],"visible")}j(),F(),Fk(q1,_),(Va=_.popperInstance)==null||Va.forceUpdate(),O("onMount",[_]),_.props.animation&&D()&&ge(gt,function(){_.state.isShown=!0,O("onShown",[_])})}},rt()}}function mt(){var X=!_.state.isVisible,Ae=_.state.isDestroyed,Ge=!_.state.isEnabled,xt=W1(_.props.duration,1,Ei.duration);if(!(X||Ae||Ge)&&(O("onHide",[_],!1),_.props.onHide(_)!==!1)){if(_.state.isVisible=!1,_.state.isShown=!1,u=!1,o=!1,D()&&(w.style.visibility="hidden"),N(),we(),P(!0),D()){var gt=I(),hr=gt.box,Ir=gt.content;_.props.animation&&(U1([hr,Ir],xt),$k([hr,Ir],"hidden"))}j(),F(),_.props.animation?D()&&Ye(xt,_.unmount):_.unmount()}}function or(X){L().addEventListener("mousemove",p),Fk(Qp,p),p(X)}function $r(){_.state.isVisible&&_.hide(),_.state.isMounted&&(xe(),at().forEach(function(X){X._tippy.unmount()}),w.parentNode&&w.parentNode.removeChild(w),q1=q1.filter(function(X){return X!==_}),_.state.isMounted=!1,O("onHidden",[_]))}function Io(){_.state.isDestroyed||(_.clearDelayTimeouts(),_.unmount(),G(),delete r._tippy,_.state.isDestroyed=!0,O("onDestroy",[_]))}}function df(r,e){e===void 0&&(e={});var t=Ei.plugins.concat(e.plugins||[]);cZ();var n=Object.assign({},e,{plugins:t}),i=aZ(r),a=i.reduce(function(o,s){var l=s&&_Z(s,n);return l&&o.push(l),o},[]);return S0(r)?a[0]:a}df.defaultProps=Ei;df.setDefaultProps=mZ;df.currentInput=sa;Object.assign({},C3,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});df.setDefaultProps({render:n4});const i4=Ke({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var r,e;return so(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(e=(r=this.$slots).default)===null||e===void 0?void 0:e.call(r))}});class a4{constructor(e,{props:t={},editor:n}){this.editor=n,this.component=vt(e),this.el=document.createElement("div"),this.props=wu(t),this.renderedComponent=this.renderComponent()}get element(){return this.renderedComponent.el}get ref(){var e,t,n,i;return!((t=(e=this.renderedComponent.vNode)===null||e===void 0?void 0:e.component)===null||t===void 0)&&t.exposed?this.renderedComponent.vNode.component.exposed:(i=(n=this.renderedComponent.vNode)===null||n===void 0?void 0:n.component)===null||i===void 0?void 0:i.proxy}renderComponent(){let e=so(this.component,this.props);return this.editor.appContext&&(e.appContext=this.editor.appContext),typeof document<"u"&&this.el&&MM(e,this.el),{vNode:e,destroy:()=>{this.el&&MM(null,this.el),this.el=null,e=null},el:this.el?this.el.firstElementChild:null}}updateProps(e={}){Object.entries(e).forEach(([t,n])=>{this.props[t]=n}),this.renderComponent()}destroy(){this.renderedComponent.destroy()}}const xZ={editor:{type:Object,required:!0},node:{type:Object,required:!0},decorations:{type:Object,required:!0},selected:{type:Boolean,required:!0},extension:{type:Object,required:!0},getPos:{type:Function,required:!0},updateAttributes:{type:Function,required:!0},deleteNode:{type:Function,required:!0},view:{type:Object,required:!0},innerDecorations:{type:Object,required:!0},HTMLAttributes:{type:Object,required:!0}};class wZ extends qK{mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(i={})=>this.updateAttributes(i),deleteNode:()=>this.deleteNode()},t=this.onDragStart.bind(this);this.decorationClasses=te(this.getDecorationClasses());const n=Ke({extends:{...this.component},props:Object.keys(e),template:this.component.template,setup:i=>{var a,o;return $x("onDragStart",t),$x("decorationClasses",this.decorationClasses),(o=(a=this.component).setup)===null||o===void 0?void 0:o.call(a,i,{expose:()=>{}})},__scopeId:this.component.__scopeId,__cssModules:this.component.__cssModules,__name:this.component.__name,__file:this.component.__file});this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new a4(n,{editor:this.editor,props:e})}get dom(){if(!this.renderer.element||!this.renderer.element.hasAttribute("data-node-view-wrapper"))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.dom.querySelector("[data-node-view-content]")}handleSelectionUpdate(){const{from:e,to:t}=this.editor.state.selection,n=this.getPos();if(typeof n=="number")if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(e,t,n){const i=a=>{this.decorationClasses.value=this.getDecorationClasses(),this.renderer.updateProps(a)};if(typeof this.options.update=="function"){const a=this.node,o=this.decorations,s=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.options.update({oldNode:a,oldDecorations:o,newNode:e,newDecorations:t,oldInnerDecorations:s,innerDecorations:n,updateProps:()=>i({node:e,decorations:t,innerDecorations:n})})}return e.type!==this.node.type?!1:(e===this.node&&this.decorations===t&&this.innerDecorations===n||(this.node=e,this.decorations=t,this.innerDecorations=n,i({node:e,decorations:t,innerDecorations:n})),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element&&this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element&&this.renderer.element.classList.remove("ProseMirror-selectednode")}getDecorationClasses(){return this.decorations.map(e=>e.type.attrs.class).flat().join(" ")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate)}}function IT(r,e){return t=>{if(!t.editor.contentComponent)return{};const n=typeof r=="function"&&"__vccOpts"in r?r.__vccOpts:r;return new wZ(n,t,e)}}const SZ=/^\s*>\s$/,TZ=ar.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:r}){return["blockquote",Lt(this.options.HTMLAttributes,r),0]},addCommands(){return{setBlockquote:()=>({commands:r})=>r.wrapIn(this.name),toggleBlockquote:()=>({commands:r})=>r.toggleWrap(this.name),unsetBlockquote:()=>({commands:r})=>r.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Kc({find:SZ,type:this.type})]}}),CZ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,AZ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,MZ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,kZ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,DZ=Da.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:r=>r.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:r=>r.type.name===this.name},{style:"font-weight",getAttrs:r=>/^(bold(er)?|[5-9]\d{2,})$/.test(r)&&null}]},renderHTML({HTMLAttributes:r}){return["strong",Lt(this.options.HTMLAttributes,r),0]},addCommands(){return{setBold:()=>({commands:r})=>r.setMark(this.name),toggleBold:()=>({commands:r})=>r.toggleMark(this.name),unsetBold:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Xc({find:CZ,type:this.type}),Xc({find:MZ,type:this.type})]},addPasteRules(){return[fu({find:AZ,type:this.type}),fu({find:kZ,type:this.type})]}}),EZ="listItem",qk="textStyle",Xk=/^\s*([-+*])\s$/,LZ=ar.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:r}){return["ul",Lt(this.options.HTMLAttributes,r),0]},addCommands(){return{toggleBulletList:()=>({commands:r,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(EZ,this.editor.getAttributes(qk)).run():r.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let r=Kc({find:Xk,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(r=Kc({find:Xk,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(qk),editor:this.editor})),[r]}}),IZ=/(^|[^`])`([^`]+)`(?!`)/,PZ=/(^|[^`])`([^`]+)`(?!`)/g,RZ=Da.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:r}){return["code",Lt(this.options.HTMLAttributes,r),0]},addCommands(){return{setCode:()=>({commands:r})=>r.setMark(this.name),toggleCode:()=>({commands:r})=>r.toggleMark(this.name),unsetCode:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Xc({find:IZ,type:this.type})]},addPasteRules(){return[fu({find:PZ,type:this.type})]}}),OZ=/^```([a-z]+)?[\s\n]$/,jZ=/^~~~([a-z]+)?[\s\n]$/,o4=ar.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:r=>{var e;const{languageClassPrefix:t}=this.options,a=[...((e=r.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(o=>o.startsWith(t)).map(o=>o.replace(t,""))[0];return a||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:r,HTMLAttributes:e}){return["pre",Lt(this.options.HTMLAttributes,e),["code",{class:r.attrs.language?this.options.languageClassPrefix+r.attrs.language:null},0]]},addCommands(){return{setCodeBlock:r=>({commands:e})=>e.setNode(this.name,r),toggleCodeBlock:r=>({commands:e})=>e.toggleNode(this.name,"paragraph",r)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:r,$anchor:e}=this.editor.state.selection,t=e.pos===1;return!r||e.parent.type.name!==this.name?!1:t||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:r})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=r,{selection:t}=e,{$from:n,empty:i}=t;if(!i||n.parent.type!==this.type)return!1;const a=n.parentOffset===n.parent.nodeSize-2,o=n.parent.textContent.endsWith(`
|
||
|
||
`);return!a||!o?!1:r.chain().command(({tr:s})=>(s.delete(n.pos-2,n.pos),!0)).exitCode().run()},ArrowDown:({editor:r})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=r,{selection:t,doc:n}=e,{$from:i,empty:a}=t;if(!a||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const s=i.after();return s===void 0?!1:n.nodeAt(s)?r.commands.command(({tr:u})=>(u.setSelection(qe.near(n.resolve(s))),!0)):r.commands.exitCode()}}},addInputRules(){return[Mg({find:OZ,type:this.type,getAttributes:r=>({language:r[1]})}),Mg({find:jZ,type:this.type,getAttributes:r=>({language:r[1]})})]},addProseMirrorPlugins(){return[new Ut({key:new jt("codeBlockVSCodeHandler"),props:{handlePaste:(r,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const t=e.clipboardData.getData("text/plain"),n=e.clipboardData.getData("vscode-editor-data"),i=n?JSON.parse(n):void 0,a=i==null?void 0:i.mode;if(!t||!a)return!1;const{tr:o,schema:s}=r.state,l=s.text(t.replace(/\r\n?/g,`
|
||
`));return o.replaceSelectionWith(this.type.create({language:a},l)),o.selection.$from.parent.type!==this.type&&o.setSelection(We.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),r.dispatch(o),!0}}})]}}),NZ=ar.create({name:"doc",topNode:!0,content:"block+"});function BZ(r={}){return new Ut({view(e){return new zZ(e,r)}})}class zZ{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(n=t.width)!==null&&n!==void 0?n:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let a=o=>{this[i](o)};return e.dom.addEventListener(i,a),{name:i,handler:a}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n,i=this.editorView.dom,a=i.getBoundingClientRect(),o=a.width/i.offsetWidth,s=a.height/i.offsetHeight;if(t){let f=e.nodeBefore,h=e.nodeAfter;if(f||h){let d=this.editorView.nodeDOM(this.cursorPos-(f?f.nodeSize:0));if(d){let p=d.getBoundingClientRect(),v=f?p.bottom:p.top;f&&h&&(v=(v+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let m=this.width/2*s;n={left:p.left,right:p.right,top:v-m,bottom:v+m}}}}if(!n){let f=this.editorView.coordsAtPos(this.cursorPos),h=this.width/2*o;n={left:f.left-h,right:f.left+h,top:f.top,bottom:f.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let u,c;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,c=-pageYOffset;else{let f=l.getBoundingClientRect(),h=f.width/l.offsetWidth,d=f.height/l.offsetHeight;u=f.left-l.scrollLeft*h,c=f.top-l.scrollTop*d}this.element.style.left=(n.left-u)/o+"px",this.element.style.top=(n.top-c)/s+"px",this.element.style.width=(n.right-n.left)/o+"px",this.element.style.height=(n.bottom-n.top)/s+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),i=n&&n.type.spec.disableDropCursor,a=typeof i=="function"?i(this.editorView,t,e):i;if(t&&!a){let o=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let s=XN(this.editorView.state.doc,o,this.editorView.dragging.slice);s!=null&&(o=s)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}const FZ=Kt.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[BZ(this.options)]}});class Qt extends qe{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return Qt.valid(n)?new Qt(n):qe.near(n)}content(){return ye.empty}eq(e){return e instanceof Qt&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Qt(e.resolve(t.pos))}getBookmark(){return new PT(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!VZ(e)||!$Z(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let i=t.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&Qt.valid(e))return e;let i=e.pos,a=null;for(let o=e.depth;;o--){let s=e.node(o);if(t>0?e.indexAfter(o)<s.childCount:e.index(o)>0){a=s.child(t>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;i+=t;let l=e.doc.resolve(i);if(Qt.valid(l))return l}for(;;){let o=t>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!Ne.isSelectable(a)){e=e.doc.resolve(i+a.nodeSize*t),n=!1;continue e}break}a=o,i+=t;let s=e.doc.resolve(i);if(Qt.valid(s))return s}return null}}}Qt.prototype.visible=!1;Qt.findFrom=Qt.findGapCursorFrom;qe.jsonID("gapcursor",Qt);class PT{constructor(e){this.pos=e}map(e){return new PT(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return Qt.valid(t)?new Qt(t):qe.near(t)}}function VZ(r){for(let e=r.depth;e>=0;e--){let t=r.index(e),n=r.node(e);if(t==0){if(n.type.spec.isolating)return!0;continue}for(let i=n.child(t-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function $Z(r){for(let e=r.depth;e>=0;e--){let t=r.indexAfter(e),n=r.node(e);if(t==n.childCount){if(n.type.spec.isolating)return!0;continue}for(let i=n.child(t);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function HZ(){return new Ut({props:{decorations:YZ,createSelectionBetween(r,e,t){return e.pos==t.pos&&Qt.valid(t)?new Qt(t):null},handleClick:WZ,handleKeyDown:GZ,handleDOMEvents:{beforeinput:UZ}}})}const GZ=k5({ArrowLeft:ev("horiz",-1),ArrowRight:ev("horiz",1),ArrowUp:ev("vert",-1),ArrowDown:ev("vert",1)});function ev(r,e){const t=r=="vert"?e>0?"down":"up":e>0?"right":"left";return function(n,i,a){let o=n.selection,s=e>0?o.$to:o.$from,l=o.empty;if(o instanceof We){if(!a.endOfTextblock(t)||s.depth==0)return!1;l=!1,s=n.doc.resolve(e>0?s.after():s.before())}let u=Qt.findGapCursorFrom(s,e,l);return u?(i&&i(n.tr.setSelection(new Qt(u))),!0):!1}}function WZ(r,e,t){if(!r||!r.editable)return!1;let n=r.state.doc.resolve(e);if(!Qt.valid(n))return!1;let i=r.posAtCoords({left:t.clientX,top:t.clientY});return i&&i.inside>-1&&Ne.isSelectable(r.state.doc.nodeAt(i.inside))?!1:(r.dispatch(r.state.tr.setSelection(new Qt(n))),!0)}function UZ(r,e){if(e.inputType!="insertCompositionText"||!(r.state.selection instanceof Qt))return!1;let{$from:t}=r.state.selection,n=t.parent.contentMatchAt(t.index()).findWrapping(r.state.schema.nodes.text);if(!n)return!1;let i=ne.empty;for(let o=n.length-1;o>=0;o--)i=ne.from(n[o].createAndFill(null,i));let a=r.state.tr.replace(t.pos,t.pos,new ye(i,0,0));return a.setSelection(We.near(a.doc.resolve(t.pos+1))),r.dispatch(a),!1}function YZ(r){if(!(r.selection instanceof Qt))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Gt.create(r.doc,[Xr.widget(r.selection.head,e,{key:"gapcursor"})])}const qZ=Kt.create({name:"gapCursor",addProseMirrorPlugins(){return[HZ()]},extendNodeSchema(r){var e;const t={name:r.name,options:r.options,storage:r.storage};return{allowGapCursor:(e=pr(jr(r,"allowGapCursor",t)))!==null&&e!==void 0?e:null}}}),XZ=ar.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:r}){return["br",Lt(this.options.HTMLAttributes,r)]},renderText(){return`
|
||
`},addCommands(){return{setHardBreak:()=>({commands:r,chain:e,state:t,editor:n})=>r.first([()=>r.exitCode(),()=>r.command(()=>{const{selection:i,storedMarks:a}=t;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:s}=n.extensionManager,l=a||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&l&&o){const f=l.filter(h=>s.includes(h.type.name));u.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),s4=ar.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(r=>({tag:`h${r}`,attrs:{level:r}}))},renderHTML({node:r,HTMLAttributes:e}){return[`h${this.options.levels.includes(r.attrs.level)?r.attrs.level:this.options.levels[0]}`,Lt(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:r=>({commands:e})=>this.options.levels.includes(r.level)?e.setNode(this.name,r):!1,toggleHeading:r=>({commands:e})=>this.options.levels.includes(r.level)?e.toggleNode(this.name,"paragraph",r):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((r,e)=>({...r,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(r=>Mg({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${r}})\\s$`),type:this.type,getAttributes:{level:r}}))}});var Dg=200,Er=function(){};Er.prototype.append=function(e){return e.length?(e=Er.from(e),!this.length&&e||e.length<Dg&&this.leafAppend(e)||this.length<Dg&&e.leafPrepend(this)||this.appendInner(e)):this};Er.prototype.prepend=function(e){return e.length?Er.from(e).append(this):this};Er.prototype.appendInner=function(e){return new KZ(this,e)};Er.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?Er.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};Er.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Er.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)};Er.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var i=[];return this.forEach(function(a,o){return i.push(e(a,o))},t,n),i};Er.from=function(e){return e instanceof Er?e:e&&e.length?new l4(e):Er.empty};var l4=function(r){function e(n){r.call(this),this.values=n}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,a){return i==0&&a==this.length?this:new e(this.values.slice(i,a))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,a,o,s){for(var l=a;l<o;l++)if(i(this.values[l],s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(i,a,o,s){for(var l=a-1;l>=o;l--)if(i(this.values[l],s+l)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=Dg)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=Dg)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(Er);Er.empty=new l4([]);var KZ=function(r){function e(t,n){r.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,i,a,o){var s=this.left.length;if(i<s&&this.left.forEachInner(n,i,Math.min(a,s),o)===!1||a>s&&this.right.forEachInner(n,Math.max(i-s,0),Math.min(this.length,a)-s,o+s)===!1)return!1},e.prototype.forEachInvertedInner=function(n,i,a,o){var s=this.left.length;if(i>s&&this.right.forEachInvertedInner(n,i-s,Math.max(a,s)-s,o+s)===!1||a<s&&this.left.forEachInvertedInner(n,Math.min(i,s),a,o)===!1)return!1},e.prototype.sliceInner=function(n,i){if(n==0&&i==this.length)return this;var a=this.left.length;return i<=a?this.left.slice(n,i):n>=a?this.right.slice(n-a,i-a):this.left.slice(n,a).append(this.right.slice(0,i-a))},e.prototype.leafAppend=function(n){var i=this.right.leafAppend(n);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(n){var i=this.left.leafPrepend(n);if(i)return new e(i,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e}(Er);const ZZ=500;class ki{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let i,a;t&&(i=this.remapping(n,this.items.length),a=i.maps.length);let o=e.tr,s,l,u=[],c=[];return this.items.forEach((f,h)=>{if(!f.step){i||(i=this.remapping(n,h+1),a=i.maps.length),a--,c.push(f);return}if(i){c.push(new na(f.map));let d=f.step.map(i.slice(a)),p;d&&o.maybeStep(d).doc&&(p=o.mapping.maps[o.mapping.maps.length-1],u.push(new na(p,void 0,void 0,u.length+c.length))),a--,p&&i.appendMap(p,a)}else o.maybeStep(f.step);if(f.selection)return s=i?f.selection.map(i.slice(a)):f.selection,l=new ki(this.items.slice(0,n).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:s}}addTransform(e,t,n,i){let a=[],o=this.eventCount,s=this.items,l=!i&&s.length?s.get(s.length-1):null;for(let c=0;c<e.steps.length;c++){let f=e.steps[c].invert(e.docs[c]),h=new na(e.mapping.maps[c],f,t),d;(d=l&&l.merge(h))&&(h=d,c?a.pop():s=s.slice(0,s.length-1)),a.push(h),t&&(o++,t=void 0),i||(l=h)}let u=o-n.depth;return u>QZ&&(s=JZ(s,u),o-=u),new ki(s.append(a),o)}remapping(e,t){let n=new Td;return this.items.forEach((i,a)=>{let o=i.mirrorOffset!=null&&a-i.mirrorOffset>=e?n.maps.length-i.mirrorOffset:void 0;n.appendMap(i.map,o)},e,t),n}addMaps(e){return this.eventCount==0?this:new ki(this.items.append(e.map(t=>new na(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-t),a=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach(h=>{h.selection&&s--},i);let l=t;this.items.forEach(h=>{let d=a.getMirror(--l);if(d==null)return;o=Math.min(o,d);let p=a.maps[d];if(h.step){let v=e.steps[d].invert(e.docs[d]),m=h.selection&&h.selection.map(a.slice(l+1,d));m&&s++,n.push(new na(p,v,m))}else n.push(new na(p))},i);let u=[];for(let h=t;h<o;h++)u.push(new na(a.maps[h]));let c=this.items.slice(0,i).append(u).append(n),f=new ki(c,s);return f.emptyItemCount()>ZZ&&(f=f.compress(this.items.length-n.length)),f}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,i=[],a=0;return this.items.forEach((o,s)=>{if(s>=e)i.push(o),o.selection&&a++;else if(o.step){let l=o.step.map(t.slice(n)),u=l&&l.getMap();if(n--,u&&t.appendMap(u,n),l){let c=o.selection&&o.selection.map(t.slice(n));c&&a++;let f=new na(u.invert(),l,c),h,d=i.length-1;(h=i.length&&i[d].merge(f))?i[d]=h:i.push(f)}}else o.map&&n--},this.items.length,0),new ki(Er.from(i.reverse()),a)}}ki.empty=new ki(Er.empty,0);function JZ(r,e){let t;return r.forEach((n,i)=>{if(n.selection&&e--==0)return t=i,!1}),r.slice(t)}class na{constructor(e,t,n,i){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new na(t.getMap().invert(),t,this.selection)}}}class Ko{constructor(e,t,n,i,a){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=i,this.prevComposition=a}}const QZ=20;function eJ(r,e,t,n){let i=t.getMeta(ql),a;if(i)return i.historyState;t.getMeta(nJ)&&(r=new Ko(r.done,r.undone,null,0,-1));let o=t.getMeta("appendedTransaction");if(t.steps.length==0)return r;if(o&&o.getMeta(ql))return o.getMeta(ql).redo?new Ko(r.done.addTransform(t,void 0,n,Mm(e)),r.undone,Kk(t.mapping.maps),r.prevTime,r.prevComposition):new Ko(r.done,r.undone.addTransform(t,void 0,n,Mm(e)),null,r.prevTime,r.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let s=t.getMeta("composition"),l=r.prevTime==0||!o&&r.prevComposition!=s&&(r.prevTime<(t.time||0)-n.newGroupDelay||!tJ(t,r.prevRanges)),u=o?X1(r.prevRanges,t.mapping):Kk(t.mapping.maps);return new Ko(r.done.addTransform(t,l?e.selection.getBookmark():void 0,n,Mm(e)),ki.empty,u,t.time,s??r.prevComposition)}else return(a=t.getMeta("rebased"))?new Ko(r.done.rebased(t,a),r.undone.rebased(t,a),X1(r.prevRanges,t.mapping),r.prevTime,r.prevComposition):new Ko(r.done.addMaps(t.mapping.maps),r.undone.addMaps(t.mapping.maps),X1(r.prevRanges,t.mapping),r.prevTime,r.prevComposition)}function tJ(r,e){if(!e)return!1;if(!r.docChanged)return!0;let t=!1;return r.mapping.maps[0].forEach((n,i)=>{for(let a=0;a<e.length;a+=2)n<=e[a+1]&&i>=e[a]&&(t=!0)}),t}function Kk(r){let e=[];for(let t=r.length-1;t>=0&&e.length==0;t--)r[t].forEach((n,i,a,o)=>e.push(a,o));return e}function X1(r,e){if(!r)return null;let t=[];for(let n=0;n<r.length;n+=2){let i=e.map(r[n],1),a=e.map(r[n+1],-1);i<=a&&t.push(i,a)}return t}function rJ(r,e,t){let n=Mm(e),i=ql.get(e).spec.config,a=(t?r.undone:r.done).popEvent(e,n);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(t?r.done:r.undone).addTransform(a.transform,e.selection.getBookmark(),i,n),l=new Ko(t?s:a.remaining,t?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(ql,{redo:t,historyState:l})}let K1=!1,Zk=null;function Mm(r){let e=r.plugins;if(Zk!=e){K1=!1,Zk=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){K1=!0;break}}return K1}const ql=new jt("history"),nJ=new jt("closeHistory");function iJ(r={}){return r={depth:r.depth||100,newGroupDelay:r.newGroupDelay||500},new Ut({key:ql,state:{init(){return new Ko(ki.empty,ki.empty,null,0,-1)},apply(e,t,n){return eJ(t,n,e,r)}},config:r,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,i=n=="historyUndo"?c4:n=="historyRedo"?f4:null;return i?(t.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function u4(r,e){return(t,n)=>{let i=ql.getState(t);if(!i||(r?i.undone:i.done).eventCount==0)return!1;if(n){let a=rJ(i,t,r);a&&n(e?a.scrollIntoView():a)}return!0}}const c4=u4(!1,!0),f4=u4(!0,!0),aJ=Kt.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:r,dispatch:e})=>c4(r,e),redo:()=>({state:r,dispatch:e})=>f4(r,e)}},addProseMirrorPlugins(){return[iJ(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),oJ=ar.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:r}){return["hr",Lt(this.options.HTMLAttributes,r)]},addCommands(){return{setHorizontalRule:()=>({chain:r,state:e})=>{if(!XK(e,e.schema.nodes[this.name]))return!1;const{selection:t}=e,{$from:n,$to:i}=t,a=r();return n.parentOffset===0?a.insertContentAt({from:Math.max(n.pos-1,0),to:i.pos},{type:this.name}):AK(t)?a.insertContentAt(i.pos,{type:this.name}):a.insertContent({type:this.name}),a.command(({tr:o,dispatch:s})=>{var l;if(s){const{$to:u}=o.selection,c=u.end();if(u.nodeAfter)u.nodeAfter.isTextblock?o.setSelection(We.create(o.doc,u.pos+1)):u.nodeAfter.isBlock?o.setSelection(Ne.create(o.doc,u.pos)):o.setSelection(We.create(o.doc,u.pos));else{const f=(l=u.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();f&&(o.insert(c,f),o.setSelection(We.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[X5({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),sJ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,lJ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,uJ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,cJ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,fJ=Da.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:r=>r.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:r=>r.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:r}){return["em",Lt(this.options.HTMLAttributes,r),0]},addCommands(){return{setItalic:()=>({commands:r})=>r.setMark(this.name),toggleItalic:()=>({commands:r})=>r.toggleMark(this.name),unsetItalic:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Xc({find:sJ,type:this.type}),Xc({find:uJ,type:this.type})]},addPasteRules(){return[fu({find:lJ,type:this.type}),fu({find:cJ,type:this.type})]}}),hJ=ar.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:r}){return["li",Lt(this.options.HTMLAttributes,r),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),dJ="listItem",Jk="textStyle",Qk=/^(\d+)\.\s$/,pJ=ar.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:r=>r.hasAttribute("start")?parseInt(r.getAttribute("start")||"",10):1},type:{default:null,parseHTML:r=>r.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:r}){const{start:e,...t}=r;return e===1?["ol",Lt(this.options.HTMLAttributes,t),0]:["ol",Lt(this.options.HTMLAttributes,r),0]},addCommands(){return{toggleOrderedList:()=>({commands:r,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(dJ,this.editor.getAttributes(Jk)).run():r.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let r=Kc({find:Qk,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(r=Kc({find:Qk,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Jk)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[r]}}),vJ=ar.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:r}){return["p",Lt(this.options.HTMLAttributes,r),0]},addCommands(){return{setParagraph:()=>({commands:r})=>r.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),mJ=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,gJ=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,yJ=Da.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:r=>r.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:r}){return["s",Lt(this.options.HTMLAttributes,r),0]},addCommands(){return{setStrike:()=>({commands:r})=>r.setMark(this.name),toggleStrike:()=>({commands:r})=>r.toggleMark(this.name),unsetStrike:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Xc({find:mJ,type:this.type})]},addPasteRules(){return[fu({find:gJ,type:this.type})]}}),bJ=ar.create({name:"text",group:"inline"});Kt.create({name:"starterKit",addExtensions(){const r=[];return this.options.bold!==!1&&r.push(DZ.configure(this.options.bold)),this.options.blockquote!==!1&&r.push(TZ.configure(this.options.blockquote)),this.options.bulletList!==!1&&r.push(LZ.configure(this.options.bulletList)),this.options.code!==!1&&r.push(RZ.configure(this.options.code)),this.options.codeBlock!==!1&&r.push(o4.configure(this.options.codeBlock)),this.options.document!==!1&&r.push(NZ.configure(this.options.document)),this.options.dropcursor!==!1&&r.push(FZ.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&r.push(qZ.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&r.push(XZ.configure(this.options.hardBreak)),this.options.heading!==!1&&r.push(s4.configure(this.options.heading)),this.options.history!==!1&&r.push(aJ.configure(this.options.history)),this.options.horizontalRule!==!1&&r.push(oJ.configure(this.options.horizontalRule)),this.options.italic!==!1&&r.push(fJ.configure(this.options.italic)),this.options.listItem!==!1&&r.push(hJ.configure(this.options.listItem)),this.options.orderedList!==!1&&r.push(pJ.configure(this.options.orderedList)),this.options.paragraph!==!1&&r.push(vJ.configure(this.options.paragraph)),this.options.strike!==!1&&r.push(yJ.configure(this.options.strike)),this.options.text!==!1&&r.push(bJ.configure(this.options.text)),r}});Kt.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new Ut({key:new jt("placeholder"),props:{decorations:({doc:r,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:n}=e,i=[];if(!t)return null;const a=this.editor.isEmpty;return r.descendants((o,s)=>{const l=n>=s&&n<=s+o.nodeSize,u=!o.isLeaf&&ET(o);if((l||!this.options.showOnlyCurrent)&&u){const c=[this.options.emptyNodeClass];a&&c.push(this.options.emptyEditorClass);const f=Xr.node(s,s+o.nodeSize,{class:c.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:s,hasAnchor:l}):this.options.placeholder});i.push(f)}return this.options.includeChildren}),Gt.create(r,i)}}})]}});Kt.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:r=>{const e=r.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:r=>r.textAlign?{style:`text-align: ${r.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:r=>({commands:e})=>this.options.alignments.includes(r)?this.options.types.map(t=>e.updateAttributes(t,{textAlign:r})).every(t=>t):!1,unsetTextAlign:()=>({commands:r})=>this.options.types.map(e=>r.resetAttributes(e,"textAlign")).every(e=>e),toggleTextAlign:r=>({editor:e,commands:t})=>this.options.alignments.includes(r)?e.isActive({textAlign:r})?t.unsetTextAlign():t.setTextAlign(r):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});var xw,ww;if(typeof WeakMap<"u"){let r=new WeakMap;xw=e=>r.get(e),ww=(e,t)=>(r.set(e,t),t)}else{const r=[];let t=0;xw=n=>{for(let i=0;i<r.length;i+=2)if(r[i]==n)return r[i+1]},ww=(n,i)=>(t==10&&(t=0),r[t++]=n,r[t++]=i)}var er=class{constructor(r,e,t,n){this.width=r,this.height=e,this.map=t,this.problems=n}findCell(r){for(let e=0;e<this.map.length;e++){const t=this.map[e];if(t!=r)continue;const n=e%this.width,i=e/this.width|0;let a=n+1,o=i+1;for(let s=1;a<this.width&&this.map[e+s]==t;s++)a++;for(let s=1;o<this.height&&this.map[e+this.width*s]==t;s++)o++;return{left:n,top:i,right:a,bottom:o}}throw new RangeError(`No cell with offset ${r} found`)}colCount(r){for(let e=0;e<this.map.length;e++)if(this.map[e]==r)return e%this.width;throw new RangeError(`No cell with offset ${r} found`)}nextCell(r,e,t){const{left:n,right:i,top:a,bottom:o}=this.findCell(r);return e=="horiz"?(t<0?n==0:i==this.width)?null:this.map[a*this.width+(t<0?n-1:i)]:(t<0?a==0:o==this.height)?null:this.map[n+this.width*(t<0?a-1:o)]}rectBetween(r,e){const{left:t,right:n,top:i,bottom:a}=this.findCell(r),{left:o,right:s,top:l,bottom:u}=this.findCell(e);return{left:Math.min(t,o),top:Math.min(i,l),right:Math.max(n,s),bottom:Math.max(a,u)}}cellsInRect(r){const e=[],t={};for(let n=r.top;n<r.bottom;n++)for(let i=r.left;i<r.right;i++){const a=n*this.width+i,o=this.map[a];t[o]||(t[o]=!0,!(i==r.left&&i&&this.map[a-1]==o||n==r.top&&n&&this.map[a-this.width]==o)&&e.push(o))}return e}positionAt(r,e,t){for(let n=0,i=0;;n++){const a=i+t.child(n).nodeSize;if(n==r){let o=e+r*this.width;const s=(r+1)*this.width;for(;o<s&&this.map[o]<i;)o++;return o==s?a-1:this.map[o]}i=a}}static get(r){return xw(r)||ww(r,_J(r))}};function _J(r){if(r.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+r.type.name);const e=xJ(r),t=r.childCount,n=[];let i=0,a=null;const o=[];for(let u=0,c=e*t;u<c;u++)n[u]=0;for(let u=0,c=0;u<t;u++){const f=r.child(u);c++;for(let p=0;;p++){for(;i<n.length&&n[i]!=0;)i++;if(p==f.childCount)break;const v=f.child(p),{colspan:m,rowspan:g,colwidth:y}=v.attrs;for(let b=0;b<g;b++){if(b+u>=t){(a||(a=[])).push({type:"overlong_rowspan",pos:c,n:g-b});break}const _=i+b*e;for(let x=0;x<m;x++){n[_+x]==0?n[_+x]=c:(a||(a=[])).push({type:"collision",row:u,pos:c,n:m-x});const w=y&&y[x];if(w){const S=(_+x)%e*2,T=o[S];T==null||T!=w&&o[S+1]==1?(o[S]=w,o[S+1]=1):T==w&&o[S+1]++}}}i+=m,c+=v.nodeSize}const h=(u+1)*e;let d=0;for(;i<h;)n[i++]==0&&d++;d&&(a||(a=[])).push({type:"missing",row:u,n:d}),c++}(e===0||t===0)&&(a||(a=[])).push({type:"zero_sized"});const s=new er(e,t,n,a);let l=!1;for(let u=0;!l&&u<o.length;u+=2)o[u]!=null&&o[u+1]<t&&(l=!0);return l&&wJ(s,o,r),s}function xJ(r){let e=-1,t=!1;for(let n=0;n<r.childCount;n++){const i=r.child(n);let a=0;if(t)for(let o=0;o<n;o++){const s=r.child(o);for(let l=0;l<s.childCount;l++){const u=s.child(l);o+u.attrs.rowspan>n&&(a+=u.attrs.colspan)}}for(let o=0;o<i.childCount;o++){const s=i.child(o);a+=s.attrs.colspan,s.attrs.rowspan>1&&(t=!0)}e==-1?e=a:e!=a&&(e=Math.max(e,a))}return e}function wJ(r,e,t){r.problems||(r.problems=[]);const n={};for(let i=0;i<r.map.length;i++){const a=r.map[i];if(n[a])continue;n[a]=!0;const o=t.nodeAt(a);if(!o)throw new RangeError(`No cell with offset ${a} found`);let s=null;const l=o.attrs;for(let u=0;u<l.colspan;u++){const c=(i+u)%r.width,f=e[c*2];f!=null&&(!l.colwidth||l.colwidth[u]!=f)&&((s||(s=SJ(l)))[u]=f)}s&&r.problems.unshift({type:"colwidth mismatch",pos:a,colwidth:s})}}function SJ(r){if(r.colwidth)return r.colwidth.slice();const e=[];for(let t=0;t<r.colspan;t++)e.push(0);return e}function Kr(r){let e=r.cached.tableNodeTypes;if(!e){e=r.cached.tableNodeTypes={};for(const t in r.nodes){const n=r.nodes[t],i=n.spec.tableRole;i&&(e[i]=n)}}return e}var es=new jt("selectingCells");function pf(r){for(let e=r.depth-1;e>0;e--)if(r.node(e).type.spec.tableRole=="row")return r.node(0).resolve(r.before(e+1));return null}function TJ(r){for(let e=r.depth;e>0;e--){const t=r.node(e).type.spec.tableRole;if(t==="cell"||t==="header_cell")return r.node(e)}return null}function $i(r){const e=r.selection.$head;for(let t=e.depth;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return!0;return!1}function T0(r){const e=r.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const t=pf(e.$head)||CJ(e.$head);if(t)return t;throw new RangeError(`No cell found around position ${e.head}`)}function CJ(r){for(let e=r.nodeAfter,t=r.pos;e;e=e.firstChild,t++){const n=e.type.spec.tableRole;if(n=="cell"||n=="header_cell")return r.doc.resolve(t)}for(let e=r.nodeBefore,t=r.pos;e;e=e.lastChild,t--){const n=e.type.spec.tableRole;if(n=="cell"||n=="header_cell")return r.doc.resolve(t-e.nodeSize)}}function Sw(r){return r.parent.type.spec.tableRole=="row"&&!!r.nodeAfter}function AJ(r){return r.node(0).resolve(r.pos+r.nodeAfter.nodeSize)}function RT(r,e){return r.depth==e.depth&&r.pos>=e.start(-1)&&r.pos<=e.end(-1)}function h4(r,e,t){const n=r.node(-1),i=er.get(n),a=r.start(-1),o=i.nextCell(r.pos-a,e,t);return o==null?null:r.node(0).resolve(a+o)}function hu(r,e,t=1){const n={...r,colspan:r.colspan-t};return n.colwidth&&(n.colwidth=n.colwidth.slice(),n.colwidth.splice(e,t),n.colwidth.some(i=>i>0)||(n.colwidth=null)),n}function d4(r,e,t=1){const n={...r,colspan:r.colspan+t};if(n.colwidth){n.colwidth=n.colwidth.slice();for(let i=0;i<t;i++)n.colwidth.splice(e,0,0)}return n}function MJ(r,e,t){const n=Kr(e.type.schema).header_cell;for(let i=0;i<r.height;i++)if(e.nodeAt(r.map[t+i*r.width]).type!=n)return!1;return!0}var Bt=class Ka extends qe{constructor(e,t=e){const n=e.node(-1),i=er.get(n),a=e.start(-1),o=i.rectBetween(e.pos-a,t.pos-a),s=e.node(0),l=i.cellsInRect(o).filter(c=>c!=t.pos-a);l.unshift(t.pos-a);const u=l.map(c=>{const f=n.nodeAt(c);if(!f)throw RangeError(`No cell with offset ${c} found`);const h=a+c+1;return new t5(s.resolve(h),s.resolve(h+f.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=e,this.$headCell=t}map(e,t){const n=e.resolve(t.map(this.$anchorCell.pos)),i=e.resolve(t.map(this.$headCell.pos));if(Sw(n)&&Sw(i)&&RT(n,i)){const a=this.$anchorCell.node(-1)!=n.node(-1);return a&&this.isRowSelection()?Ka.rowSelection(n,i):a&&this.isColSelection()?Ka.colSelection(n,i):new Ka(n,i)}return We.between(n,i)}content(){const e=this.$anchorCell.node(-1),t=er.get(e),n=this.$anchorCell.start(-1),i=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),a={},o=[];for(let l=i.top;l<i.bottom;l++){const u=[];for(let c=l*t.width+i.left,f=i.left;f<i.right;f++,c++){const h=t.map[c];if(a[h])continue;a[h]=!0;const d=t.findCell(h);let p=e.nodeAt(h);if(!p)throw RangeError(`No cell with offset ${h} found`);const v=i.left-d.left,m=d.right-i.right;if(v>0||m>0){let g=p.attrs;if(v>0&&(g=hu(g,0,v)),m>0&&(g=hu(g,g.colspan-m,m)),d.left<i.left){if(p=p.type.createAndFill(g),!p)throw RangeError(`Could not create cell with attrs ${JSON.stringify(g)}`)}else p=p.type.create(g,p.content)}if(d.top<i.top||d.bottom>i.bottom){const g={...p.attrs,rowspan:Math.min(d.bottom,i.bottom)-Math.max(d.top,i.top)};d.top<i.top?p=p.type.createAndFill(g):p=p.type.create(g,p.content)}u.push(p)}o.push(e.child(l).copy(ne.from(u)))}const s=this.isColSelection()&&this.isRowSelection()?e:o;return new ye(ne.from(s),1,1)}replace(e,t=ye.empty){const n=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){const{$from:s,$to:l}=i[o],u=e.mapping.slice(n);e.replace(u.map(s.pos),u.map(l.pos),o?ye.empty:t)}const a=qe.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);a&&e.setSelection(a)}replaceWith(e,t){this.replace(e,new ye(ne.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),n=er.get(t),i=this.$anchorCell.start(-1),a=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let o=0;o<a.length;o++)e(t.nodeAt(a[o]),i+a[o])}isColSelection(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const n=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,i)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const n=e.node(-1),i=er.get(n),a=e.start(-1),o=i.findCell(e.pos-a),s=i.findCell(t.pos-a),l=e.node(0);return o.top<=s.top?(o.top>0&&(e=l.resolve(a+i.map[o.left])),s.bottom<i.height&&(t=l.resolve(a+i.map[i.width*(i.height-1)+s.right-1]))):(s.top>0&&(t=l.resolve(a+i.map[s.left])),o.bottom<i.height&&(e=l.resolve(a+i.map[i.width*(i.height-1)+o.right-1]))),new Ka(e,t)}isRowSelection(){const e=this.$anchorCell.node(-1),t=er.get(e),n=this.$anchorCell.start(-1),i=t.colCount(this.$anchorCell.pos-n),a=t.colCount(this.$headCell.pos-n);if(Math.min(i,a)>0)return!1;const o=i+this.$anchorCell.nodeAfter.attrs.colspan,s=a+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,s)==t.width}eq(e){return e instanceof Ka&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const n=e.node(-1),i=er.get(n),a=e.start(-1),o=i.findCell(e.pos-a),s=i.findCell(t.pos-a),l=e.node(0);return o.left<=s.left?(o.left>0&&(e=l.resolve(a+i.map[o.top*i.width])),s.right<i.width&&(t=l.resolve(a+i.map[i.width*(s.top+1)-1]))):(s.left>0&&(t=l.resolve(a+i.map[s.top*i.width])),o.right<i.width&&(e=l.resolve(a+i.map[i.width*(o.top+1)-1]))),new Ka(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new Ka(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){return new Ka(e.resolve(t),e.resolve(n))}getBookmark(){return new kJ(this.$anchorCell.pos,this.$headCell.pos)}};Bt.prototype.visible=!1;qe.jsonID("cell",Bt);var kJ=class p4{constructor(e,t){this.anchor=e,this.head=t}map(e){return new p4(e.map(this.anchor),e.map(this.head))}resolve(e){const t=e.resolve(this.anchor),n=e.resolve(this.head);return t.parent.type.spec.tableRole=="row"&&n.parent.type.spec.tableRole=="row"&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&RT(t,n)?new Bt(t,n):qe.near(n,1)}};function DJ(r){if(!(r.selection instanceof Bt))return null;const e=[];return r.selection.forEachCell((t,n)=>{e.push(Xr.node(n,n+t.nodeSize,{class:"selectedCell"}))}),Gt.create(r.doc,e)}function EJ({$from:r,$to:e}){if(r.pos==e.pos||r.pos<e.pos-6)return!1;let t=r.pos,n=e.pos,i=r.depth;for(;i>=0&&!(r.after(i+1)<r.end(i));i--,t++);for(let a=e.depth;a>=0&&!(e.before(a+1)>e.start(a));a--,n--);return t==n&&/row|table/.test(r.node(i).type.spec.tableRole)}function LJ({$from:r,$to:e}){let t,n;for(let i=r.depth;i>0;i--){const a=r.node(i);if(a.type.spec.tableRole==="cell"||a.type.spec.tableRole==="header_cell"){t=a;break}}for(let i=e.depth;i>0;i--){const a=e.node(i);if(a.type.spec.tableRole==="cell"||a.type.spec.tableRole==="header_cell"){n=a;break}}return t!==n&&e.parentOffset===0}function IJ(r,e,t){const n=(e||r).selection,i=(e||r).doc;let a,o;if(n instanceof Ne&&(o=n.node.type.spec.tableRole)){if(o=="cell"||o=="header_cell")a=Bt.create(i,n.from);else if(o=="row"){const s=i.resolve(n.from+1);a=Bt.rowSelection(s,s)}else if(!t){const s=er.get(n.node),l=n.from+1,u=l+s.map[s.width*s.height-1];a=Bt.create(i,l+1,u)}}else n instanceof We&&EJ(n)?a=We.create(i,n.from):n instanceof We&&LJ(n)&&(a=We.create(i,n.$from.start(),n.$from.end()));return a&&(e||(e=r.tr)).setSelection(a),e}var PJ=new jt("fix-tables");function v4(r,e,t,n){const i=r.childCount,a=e.childCount;e:for(let o=0,s=0;o<a;o++){const l=e.child(o);for(let u=s,c=Math.min(i,o+3);u<c;u++)if(r.child(u)==l){s=u+1,t+=l.nodeSize;continue e}n(l,t),s<i&&r.child(s).sameMarkup(l)?v4(r.child(s),l,t+1,n):l.nodesBetween(0,l.content.size,n,t+1),t+=l.nodeSize}}function m4(r,e){let t;const n=(i,a)=>{i.type.spec.tableRole=="table"&&(t=RJ(r,i,a,t))};return e?e.doc!=r.doc&&v4(e.doc,r.doc,0,n):r.doc.descendants(n),t}function RJ(r,e,t,n){const i=er.get(e);if(!i.problems)return n;n||(n=r.tr);const a=[];for(let l=0;l<i.height;l++)a.push(0);for(let l=0;l<i.problems.length;l++){const u=i.problems[l];if(u.type=="collision"){const c=e.nodeAt(u.pos);if(!c)continue;const f=c.attrs;for(let h=0;h<f.rowspan;h++)a[u.row+h]+=u.n;n.setNodeMarkup(n.mapping.map(t+1+u.pos),null,hu(f,f.colspan-u.n,u.n))}else if(u.type=="missing")a[u.row]+=u.n;else if(u.type=="overlong_rowspan"){const c=e.nodeAt(u.pos);if(!c)continue;n.setNodeMarkup(n.mapping.map(t+1+u.pos),null,{...c.attrs,rowspan:c.attrs.rowspan-u.n})}else if(u.type=="colwidth mismatch"){const c=e.nodeAt(u.pos);if(!c)continue;n.setNodeMarkup(n.mapping.map(t+1+u.pos),null,{...c.attrs,colwidth:u.colwidth})}else if(u.type=="zero_sized"){const c=n.mapping.map(t);n.delete(c,c+e.nodeSize)}}let o,s;for(let l=0;l<a.length;l++)a[l]&&(o==null&&(o=l),s=l);for(let l=0,u=t+1;l<i.height;l++){const c=e.child(l),f=u+c.nodeSize,h=a[l];if(h>0){let d="cell";c.firstChild&&(d=c.firstChild.type.spec.tableRole);const p=[];for(let m=0;m<h;m++){const g=Kr(r.schema)[d].createAndFill();g&&p.push(g)}const v=(l==0||o==l-1)&&s==l?u+1:f-1;n.insert(n.mapping.map(v),p)}u=f}return n.setMeta(PJ,{fixTables:!0})}function Na(r){const e=r.selection,t=T0(r),n=t.node(-1),i=t.start(-1),a=er.get(n);return{...e instanceof Bt?a.rectBetween(e.$anchorCell.pos-i,e.$headCell.pos-i):a.findCell(t.pos-i),tableStart:i,map:a,table:n}}function g4(r,{map:e,tableStart:t,table:n},i){let a=i>0?-1:0;MJ(e,n,i+a)&&(a=i==0||i==e.width?null:0);for(let o=0;o<e.height;o++){const s=o*e.width+i;if(i>0&&i<e.width&&e.map[s-1]==e.map[s]){const l=e.map[s],u=n.nodeAt(l);r.setNodeMarkup(r.mapping.map(t+l),null,d4(u.attrs,i-e.colCount(l))),o+=u.attrs.rowspan-1}else{const l=a==null?Kr(n.type.schema).cell:n.nodeAt(e.map[s+a]).type,u=e.positionAt(o,i,n);r.insert(r.mapping.map(t+u),l.createAndFill())}}return r}function OJ(r,e){if(!$i(r))return!1;if(e){const t=Na(r);e(g4(r.tr,t,t.left))}return!0}function jJ(r,e){if(!$i(r))return!1;if(e){const t=Na(r);e(g4(r.tr,t,t.right))}return!0}function NJ(r,{map:e,table:t,tableStart:n},i){const a=r.mapping.maps.length;for(let o=0;o<e.height;){const s=o*e.width+i,l=e.map[s],u=t.nodeAt(l),c=u.attrs;if(i>0&&e.map[s-1]==l||i<e.width-1&&e.map[s+1]==l)r.setNodeMarkup(r.mapping.slice(a).map(n+l),null,hu(c,i-e.colCount(l)));else{const f=r.mapping.slice(a).map(n+l);r.delete(f,f+u.nodeSize)}o+=c.rowspan}}function BJ(r,e){if(!$i(r))return!1;if(e){const t=Na(r),n=r.tr;if(t.left==0&&t.right==t.map.width)return!1;for(let i=t.right-1;NJ(n,t,i),i!=t.left;i--){const a=t.tableStart?n.doc.nodeAt(t.tableStart-1):n.doc;if(!a)throw RangeError("No table found");t.table=a,t.map=er.get(a)}e(n)}return!0}function zJ(r,e,t){var n;const i=Kr(e.type.schema).header_cell;for(let a=0;a<r.width;a++)if(((n=e.nodeAt(r.map[a+t*r.width]))==null?void 0:n.type)!=i)return!1;return!0}function y4(r,{map:e,tableStart:t,table:n},i){var a;let o=t;for(let u=0;u<i;u++)o+=n.child(u).nodeSize;const s=[];let l=i>0?-1:0;zJ(e,n,i+l)&&(l=i==0||i==e.height?null:0);for(let u=0,c=e.width*i;u<e.width;u++,c++)if(i>0&&i<e.height&&e.map[c]==e.map[c-e.width]){const f=e.map[c],h=n.nodeAt(f).attrs;r.setNodeMarkup(t+f,null,{...h,rowspan:h.rowspan+1}),u+=h.colspan-1}else{const f=l==null?Kr(n.type.schema).cell:(a=n.nodeAt(e.map[c+l*e.width]))==null?void 0:a.type,h=f==null?void 0:f.createAndFill();h&&s.push(h)}return r.insert(o,Kr(n.type.schema).row.create(null,s)),r}function FJ(r,e){if(!$i(r))return!1;if(e){const t=Na(r);e(y4(r.tr,t,t.top))}return!0}function VJ(r,e){if(!$i(r))return!1;if(e){const t=Na(r);e(y4(r.tr,t,t.bottom))}return!0}function $J(r,{map:e,table:t,tableStart:n},i){let a=0;for(let u=0;u<i;u++)a+=t.child(u).nodeSize;const o=a+t.child(i).nodeSize,s=r.mapping.maps.length;r.delete(a+n,o+n);const l=new Set;for(let u=0,c=i*e.width;u<e.width;u++,c++){const f=e.map[c];if(!l.has(f)){if(l.add(f),i>0&&f==e.map[c-e.width]){const h=t.nodeAt(f).attrs;r.setNodeMarkup(r.mapping.slice(s).map(f+n),null,{...h,rowspan:h.rowspan-1}),u+=h.colspan-1}else if(i<e.height&&f==e.map[c+e.width]){const h=t.nodeAt(f),d=h.attrs,p=h.type.create({...d,rowspan:h.attrs.rowspan-1},h.content),v=e.positionAt(i+1,u,t);r.insert(r.mapping.slice(s).map(n+v),p),u+=d.colspan-1}}}}function HJ(r,e){if(!$i(r))return!1;if(e){const t=Na(r),n=r.tr;if(t.top==0&&t.bottom==t.map.height)return!1;for(let i=t.bottom-1;$J(n,t,i),i!=t.top;i--){const a=t.tableStart?n.doc.nodeAt(t.tableStart-1):n.doc;if(!a)throw RangeError("No table found");t.table=a,t.map=er.get(t.table)}e(n)}return!0}function eD(r){const e=r.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function GJ({width:r,height:e,map:t},n){let i=n.top*r+n.left,a=i,o=(n.bottom-1)*r+n.left,s=i+(n.right-n.left-1);for(let l=n.top;l<n.bottom;l++){if(n.left>0&&t[a]==t[a-1]||n.right<r&&t[s]==t[s+1])return!0;a+=r,s+=r}for(let l=n.left;l<n.right;l++){if(n.top>0&&t[i]==t[i-r]||n.bottom<e&&t[o]==t[o+r])return!0;i++,o++}return!1}function tD(r,e){const t=r.selection;if(!(t instanceof Bt)||t.$anchorCell.pos==t.$headCell.pos)return!1;const n=Na(r),{map:i}=n;if(GJ(i,n))return!1;if(e){const a=r.tr,o={};let s=ne.empty,l,u;for(let c=n.top;c<n.bottom;c++)for(let f=n.left;f<n.right;f++){const h=i.map[c*i.width+f],d=n.table.nodeAt(h);if(!(o[h]||!d))if(o[h]=!0,l==null)l=h,u=d;else{eD(d)||(s=s.append(d.content));const p=a.mapping.map(h+n.tableStart);a.delete(p,p+d.nodeSize)}}if(l==null||u==null)return!0;if(a.setNodeMarkup(l+n.tableStart,null,{...d4(u.attrs,u.attrs.colspan,n.right-n.left-u.attrs.colspan),rowspan:n.bottom-n.top}),s.size){const c=l+1+u.content.size,f=eD(u)?l+1:c;a.replaceWith(f+n.tableStart,c+n.tableStart,s)}a.setSelection(new Bt(a.doc.resolve(l+n.tableStart))),e(a)}return!0}function rD(r,e){const t=Kr(r.schema);return WJ(({node:n})=>t[n.type.spec.tableRole])(r,e)}function WJ(r){return(e,t)=>{var n;const i=e.selection;let a,o;if(i instanceof Bt){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;a=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{if(a=TJ(i.$from),!a)return!1;o=(n=pf(i.$from))==null?void 0:n.pos}if(a==null||o==null||a.attrs.colspan==1&&a.attrs.rowspan==1)return!1;if(t){let s=a.attrs;const l=[],u=s.colwidth;s.rowspan>1&&(s={...s,rowspan:1}),s.colspan>1&&(s={...s,colspan:1});const c=Na(e),f=e.tr;for(let d=0;d<c.right-c.left;d++)l.push(u?{...s,colwidth:u&&u[d]?[u[d]]:null}:s);let h;for(let d=c.top;d<c.bottom;d++){let p=c.map.positionAt(d,c.left,c.table);d==c.top&&(p+=a.nodeSize);for(let v=c.left,m=0;v<c.right;v++,m++)v==c.left&&d==c.top||f.insert(h=f.mapping.map(p+c.tableStart,1),r({node:a,row:d,col:v}).createAndFill(l[m]))}f.setNodeMarkup(o,r({node:a,row:c.top,col:c.left}),l[0]),i instanceof Bt&&f.setSelection(new Bt(f.doc.resolve(i.$anchorCell.pos),h?f.doc.resolve(h):void 0)),t(f)}return!0}}function UJ(r,e){return function(t,n){if(!$i(t))return!1;const i=T0(t);if(i.nodeAfter.attrs[r]===e)return!1;if(n){const a=t.tr;t.selection instanceof Bt?t.selection.forEachCell((o,s)=>{o.attrs[r]!==e&&a.setNodeMarkup(s,null,{...o.attrs,[r]:e})}):a.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[r]:e}),n(a)}return!0}}function YJ(r){return function(e,t){if(!$i(e))return!1;if(t){const n=Kr(e.schema),i=Na(e),a=e.tr,o=i.map.cellsInRect(r=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:r=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),s=o.map(l=>i.table.nodeAt(l));for(let l=0;l<o.length;l++)s[l].type==n.header_cell&&a.setNodeMarkup(i.tableStart+o[l],n.cell,s[l].attrs);if(a.steps.length==0)for(let l=0;l<o.length;l++)a.setNodeMarkup(i.tableStart+o[l],n.header_cell,s[l].attrs);t(a)}return!0}}function nD(r,e,t){const n=e.map.cellsInRect({left:0,top:0,right:r=="row"?e.map.width:1,bottom:r=="column"?e.map.height:1});for(let i=0;i<n.length;i++){const a=e.table.nodeAt(n[i]);if(a&&a.type!==t.header_cell)return!1}return!0}function Dd(r,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?YJ(r):function(t,n){if(!$i(t))return!1;if(n){const i=Kr(t.schema),a=Na(t),o=t.tr,s=nD("row",a,i),l=nD("column",a,i),c=(r==="column"?s:r==="row"?l:!1)?1:0,f=r=="column"?{left:0,top:c,right:1,bottom:a.map.height}:r=="row"?{left:c,top:0,right:a.map.width,bottom:1}:a,h=r=="column"?l?i.cell:i.header_cell:r=="row"?s?i.cell:i.header_cell:i.cell;a.map.cellsInRect(f).forEach(d=>{const p=d+a.tableStart,v=o.doc.nodeAt(p);v&&o.setNodeMarkup(p,h,v.attrs)}),n(o)}return!0}}Dd("row",{useDeprecatedLogic:!0});Dd("column",{useDeprecatedLogic:!0});var qJ=Dd("cell",{useDeprecatedLogic:!0});function XJ(r,e){if(e<0){const t=r.nodeBefore;if(t)return r.pos-t.nodeSize;for(let n=r.index(-1)-1,i=r.before();n>=0;n--){const a=r.node(-1).child(n),o=a.lastChild;if(o)return i-1-o.nodeSize;i-=a.nodeSize}}else{if(r.index()<r.parent.childCount-1)return r.pos+r.nodeAfter.nodeSize;const t=r.node(-1);for(let n=r.indexAfter(-1),i=r.after();n<t.childCount;n++){const a=t.child(n);if(a.childCount)return i+1;i+=a.nodeSize}}return null}function iD(r){return function(e,t){if(!$i(e))return!1;const n=XJ(T0(e),r);if(n==null)return!1;if(t){const i=e.doc.resolve(n);t(e.tr.setSelection(We.between(i,AJ(i))).scrollIntoView())}return!0}}function KJ(r,e){const t=r.selection.$anchor;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="table")return e&&e(r.tr.delete(t.before(n),t.after(n)).scrollIntoView()),!0;return!1}function tv(r,e){const t=r.selection;if(!(t instanceof Bt))return!1;if(e){const n=r.tr,i=Kr(r.schema).cell.createAndFill().content;t.forEachCell((a,o)=>{a.content.eq(i)||n.replace(n.mapping.map(o+1),n.mapping.map(o+a.nodeSize-1),new ye(i,0,0))}),n.docChanged&&e(n)}return!0}function ZJ(r){if(!r.size)return null;let{content:e,openStart:t,openEnd:n}=r;for(;e.childCount==1&&(t>0&&n>0||e.child(0).type.spec.tableRole=="table");)t--,n--,e=e.child(0).content;const i=e.child(0),a=i.type.spec.tableRole,o=i.type.schema,s=[];if(a=="row")for(let l=0;l<e.childCount;l++){let u=e.child(l).content;const c=l?0:Math.max(0,t-1),f=l<e.childCount-1?0:Math.max(0,n-1);(c||f)&&(u=Tw(Kr(o).row,new ye(u,c,f)).content),s.push(u)}else if(a=="cell"||a=="header_cell")s.push(t||n?Tw(Kr(o).row,new ye(e,t,n)).content:e);else return null;return JJ(o,s)}function JJ(r,e){const t=[];for(let i=0;i<e.length;i++){const a=e[i];for(let o=a.childCount-1;o>=0;o--){const{rowspan:s,colspan:l}=a.child(o).attrs;for(let u=i;u<i+s;u++)t[u]=(t[u]||0)+l}}let n=0;for(let i=0;i<t.length;i++)n=Math.max(n,t[i]);for(let i=0;i<t.length;i++)if(i>=e.length&&e.push(ne.empty),t[i]<n){const a=Kr(r).cell.createAndFill(),o=[];for(let s=t[i];s<n;s++)o.push(a);e[i]=e[i].append(ne.from(o))}return{height:e.length,width:n,rows:e}}function Tw(r,e){const t=r.createAndFill();return new e5(t).replace(0,t.content.size,e).doc}function QJ({width:r,height:e,rows:t},n,i){if(r!=n){const a=[],o=[];for(let s=0;s<t.length;s++){const l=t[s],u=[];for(let c=a[s]||0,f=0;c<n;f++){let h=l.child(f%l.childCount);c+h.attrs.colspan>n&&(h=h.type.createChecked(hu(h.attrs,h.attrs.colspan,c+h.attrs.colspan-n),h.content)),u.push(h),c+=h.attrs.colspan;for(let d=1;d<h.attrs.rowspan;d++)a[s+d]=(a[s+d]||0)+h.attrs.colspan}o.push(ne.from(u))}t=o,r=n}if(e!=i){const a=[];for(let o=0,s=0;o<i;o++,s++){const l=[],u=t[s%e];for(let c=0;c<u.childCount;c++){let f=u.child(c);o+f.attrs.rowspan>i&&(f=f.type.create({...f.attrs,rowspan:Math.max(1,i-f.attrs.rowspan)},f.content)),l.push(f)}a.push(ne.from(l))}t=a,e=i}return{width:r,height:e,rows:t}}function eQ(r,e,t,n,i,a,o){const s=r.doc.type.schema,l=Kr(s);let u,c;if(i>e.width)for(let f=0,h=0;f<e.height;f++){const d=t.child(f);h+=d.nodeSize;const p=[];let v;d.lastChild==null||d.lastChild.type==l.cell?v=u||(u=l.cell.createAndFill()):v=c||(c=l.header_cell.createAndFill());for(let m=e.width;m<i;m++)p.push(v);r.insert(r.mapping.slice(o).map(h-1+n),p)}if(a>e.height){const f=[];for(let p=0,v=(e.height-1)*e.width;p<Math.max(e.width,i);p++){const m=p>=e.width?!1:t.nodeAt(e.map[v+p]).type==l.header_cell;f.push(m?c||(c=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}const h=l.row.create(null,ne.from(f)),d=[];for(let p=e.height;p<a;p++)d.push(h);r.insert(r.mapping.slice(o).map(n+t.nodeSize-2),d)}return!!(u||c)}function aD(r,e,t,n,i,a,o,s){if(o==0||o==e.height)return!1;let l=!1;for(let u=i;u<a;u++){const c=o*e.width+u,f=e.map[c];if(e.map[c-e.width]==f){l=!0;const h=t.nodeAt(f),{top:d,left:p}=e.findCell(f);r.setNodeMarkup(r.mapping.slice(s).map(f+n),null,{...h.attrs,rowspan:o-d}),r.insert(r.mapping.slice(s).map(e.positionAt(o,p,t)),h.type.createAndFill({...h.attrs,rowspan:d+h.attrs.rowspan-o})),u+=h.attrs.colspan-1}}return l}function oD(r,e,t,n,i,a,o,s){if(o==0||o==e.width)return!1;let l=!1;for(let u=i;u<a;u++){const c=u*e.width+o,f=e.map[c];if(e.map[c-1]==f){l=!0;const h=t.nodeAt(f),d=e.colCount(f),p=r.mapping.slice(s).map(f+n);r.setNodeMarkup(p,null,hu(h.attrs,o-d,h.attrs.colspan-(o-d))),r.insert(p+h.nodeSize,h.type.createAndFill(hu(h.attrs,0,o-d))),u+=h.attrs.rowspan-1}}return l}function sD(r,e,t,n,i){let a=t?r.doc.nodeAt(t-1):r.doc;if(!a)throw new Error("No table found");let o=er.get(a);const{top:s,left:l}=n,u=l+i.width,c=s+i.height,f=r.tr;let h=0;function d(){if(a=t?f.doc.nodeAt(t-1):f.doc,!a)throw new Error("No table found");o=er.get(a),h=f.mapping.maps.length}eQ(f,o,a,t,u,c,h)&&d(),aD(f,o,a,t,l,u,s,h)&&d(),aD(f,o,a,t,l,u,c,h)&&d(),oD(f,o,a,t,s,c,l,h)&&d(),oD(f,o,a,t,s,c,u,h)&&d();for(let p=s;p<c;p++){const v=o.positionAt(p,l,a),m=o.positionAt(p,u,a);f.replace(f.mapping.slice(h).map(v+t),f.mapping.slice(h).map(m+t),new ye(i.rows[p-s],0,0))}d(),f.setSelection(new Bt(f.doc.resolve(t+o.positionAt(s,l,a)),f.doc.resolve(t+o.positionAt(c-1,u-1,a)))),e(f)}var tQ=k5({ArrowLeft:rv("horiz",-1),ArrowRight:rv("horiz",1),ArrowUp:rv("vert",-1),ArrowDown:rv("vert",1),"Shift-ArrowLeft":nv("horiz",-1),"Shift-ArrowRight":nv("horiz",1),"Shift-ArrowUp":nv("vert",-1),"Shift-ArrowDown":nv("vert",1),Backspace:tv,"Mod-Backspace":tv,Delete:tv,"Mod-Delete":tv});function km(r,e,t){return t.eq(r.selection)?!1:(e&&e(r.tr.setSelection(t).scrollIntoView()),!0)}function rv(r,e){return(t,n,i)=>{if(!i)return!1;const a=t.selection;if(a instanceof Bt)return km(t,n,qe.near(a.$headCell,e));if(r!="horiz"&&!a.empty)return!1;const o=b4(i,r,e);if(o==null)return!1;if(r=="horiz")return km(t,n,qe.near(t.doc.resolve(a.head+e),e));{const s=t.doc.resolve(o),l=h4(s,r,e);let u;return l?u=qe.near(l,1):e<0?u=qe.near(t.doc.resolve(s.before(-1)),-1):u=qe.near(t.doc.resolve(s.after(-1)),1),km(t,n,u)}}}function nv(r,e){return(t,n,i)=>{if(!i)return!1;const a=t.selection;let o;if(a instanceof Bt)o=a;else{const l=b4(i,r,e);if(l==null)return!1;o=new Bt(t.doc.resolve(l))}const s=h4(o.$headCell,r,e);return s?km(t,n,new Bt(o.$anchorCell,s)):!1}}function rQ(r,e){const t=r.state.doc,n=pf(t.resolve(e));return n?(r.dispatch(r.state.tr.setSelection(new Bt(n))),!0):!1}function nQ(r,e,t){if(!$i(r.state))return!1;let n=ZJ(t);const i=r.state.selection;if(i instanceof Bt){n||(n={width:1,height:1,rows:[ne.from(Tw(Kr(r.state.schema).cell,t))]});const a=i.$anchorCell.node(-1),o=i.$anchorCell.start(-1),s=er.get(a).rectBetween(i.$anchorCell.pos-o,i.$headCell.pos-o);return n=QJ(n,s.right-s.left,s.bottom-s.top),sD(r.state,r.dispatch,o,s,n),!0}else if(n){const a=T0(r.state),o=a.start(-1);return sD(r.state,r.dispatch,o,er.get(a.node(-1)).findCell(a.pos-o),n),!0}else return!1}function iQ(r,e){var t;if(e.ctrlKey||e.metaKey)return;const n=lD(r,e.target);let i;if(e.shiftKey&&r.state.selection instanceof Bt)a(r.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&n&&(i=pf(r.state.selection.$anchor))!=null&&((t=Z1(r,e))==null?void 0:t.pos)!=i.pos)a(i,e),e.preventDefault();else if(!n)return;function a(l,u){let c=Z1(r,u);const f=es.getState(r.state)==null;if(!c||!RT(l,c))if(f)c=l;else return;const h=new Bt(l,c);if(f||!r.state.selection.eq(h)){const d=r.state.tr.setSelection(h);f&&d.setMeta(es,l.pos),r.dispatch(d)}}function o(){r.root.removeEventListener("mouseup",o),r.root.removeEventListener("dragstart",o),r.root.removeEventListener("mousemove",s),es.getState(r.state)!=null&&r.dispatch(r.state.tr.setMeta(es,-1))}function s(l){const u=l,c=es.getState(r.state);let f;if(c!=null)f=r.state.doc.resolve(c);else if(lD(r,u.target)!=n&&(f=Z1(r,e),!f))return o();f&&a(f,u)}r.root.addEventListener("mouseup",o),r.root.addEventListener("dragstart",o),r.root.addEventListener("mousemove",s)}function b4(r,e,t){if(!(r.state.selection instanceof We))return null;const{$head:n}=r.state.selection;for(let i=n.depth-1;i>=0;i--){const a=n.node(i);if((t<0?n.index(i):n.indexAfter(i))!=(t<0?0:a.childCount))return null;if(a.type.spec.tableRole=="cell"||a.type.spec.tableRole=="header_cell"){const s=n.before(i),l=e=="vert"?t>0?"down":"up":t>0?"right":"left";return r.endOfTextblock(l)?s:null}}return null}function lD(r,e){for(;e&&e!=r.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Z1(r,e){const t=r.posAtCoords({left:e.clientX,top:e.clientY});return t&&t?pf(r.state.doc.resolve(t.pos)):null}var aQ=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Cw(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,Cw(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function Cw(r,e,t,n,i,a){var o;let s=0,l=!0,u=e.firstChild;const c=r.firstChild;if(c){for(let f=0,h=0;f<c.childCount;f++){const{colspan:d,colwidth:p}=c.child(f).attrs;for(let v=0;v<d;v++,h++){const m=i==h?a:p&&p[v],g=m?m+"px":"";if(s+=m||n,m||(l=!1),u)u.style.width!=g&&(u.style.width=g),u=u.nextSibling;else{const y=document.createElement("col");y.style.width=g,e.appendChild(y)}}}for(;u;){const f=u.nextSibling;(o=u.parentNode)==null||o.removeChild(u),u=f}l?(t.style.width=s+"px",t.style.minWidth=""):(t.style.width="",t.style.minWidth=s+"px")}}var Rn=new jt("tableColumnResizing");function oQ({handleWidth:r=5,cellMinWidth:e=25,defaultCellMinWidth:t=100,View:n=aQ,lastColumnResizable:i=!0}={}){const a=new Ut({key:Rn,state:{init(o,s){var l,u;const c=(u=(l=a.spec)==null?void 0:l.props)==null?void 0:u.nodeViews,f=Kr(s.schema).table.name;return n&&c&&(c[f]=(h,d)=>new n(h,t,d)),new sQ(-1,!1)},apply(o,s){return s.apply(o)}},props:{attributes:o=>{const s=Rn.getState(o);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,s)=>{lQ(o,s,r,i)},mouseleave:o=>{uQ(o)},mousedown:(o,s)=>{cQ(o,s,e,t)}},decorations:o=>{const s=Rn.getState(o);if(s&&s.activeHandle>-1)return vQ(o,s.activeHandle)},nodeViews:{}}});return a}var sQ=class Dm{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){const t=this,n=e.getMeta(Rn);if(n&&n.setHandle!=null)return new Dm(n.setHandle,!1);if(n&&n.setDragging!==void 0)return new Dm(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){let i=e.mapping.map(t.activeHandle,-1);return Sw(e.doc.resolve(i))||(i=-1),new Dm(i,t.dragging)}return t}};function lQ(r,e,t,n){if(!r.editable)return;const i=Rn.getState(r.state);if(i&&!i.dragging){const a=hQ(e.target);let o=-1;if(a){const{left:s,right:l}=a.getBoundingClientRect();e.clientX-s<=t?o=uD(r,e,"left",t):l-e.clientX<=t&&(o=uD(r,e,"right",t))}if(o!=i.activeHandle){if(!n&&o!==-1){const s=r.state.doc.resolve(o),l=s.node(-1),u=er.get(l),c=s.start(-1);if(u.colCount(s.pos-c)+s.nodeAfter.attrs.colspan-1==u.width-1)return}_4(r,o)}}}function uQ(r){if(!r.editable)return;const e=Rn.getState(r.state);e&&e.activeHandle>-1&&!e.dragging&&_4(r,-1)}function cQ(r,e,t,n){var i;if(!r.editable)return!1;const a=(i=r.dom.ownerDocument.defaultView)!=null?i:window,o=Rn.getState(r.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const s=r.state.doc.nodeAt(o.activeHandle),l=fQ(r,o.activeHandle,s.attrs);r.dispatch(r.state.tr.setMeta(Rn,{setDragging:{startX:e.clientX,startWidth:l}}));function u(f){a.removeEventListener("mouseup",u),a.removeEventListener("mousemove",c);const h=Rn.getState(r.state);h!=null&&h.dragging&&(dQ(r,h.activeHandle,cD(h.dragging,f,t)),r.dispatch(r.state.tr.setMeta(Rn,{setDragging:null})))}function c(f){if(!f.which)return u(f);const h=Rn.getState(r.state);if(h&&h.dragging){const d=cD(h.dragging,f,t);fD(r,h.activeHandle,d,n)}}return fD(r,o.activeHandle,l,n),a.addEventListener("mouseup",u),a.addEventListener("mousemove",c),e.preventDefault(),!0}function fQ(r,e,{colspan:t,colwidth:n}){const i=n&&n[n.length-1];if(i)return i;const a=r.domAtPos(e);let s=a.node.childNodes[a.offset].offsetWidth,l=t;if(n)for(let u=0;u<t;u++)n[u]&&(s-=n[u],l--);return s/l}function hQ(r){for(;r&&r.nodeName!="TD"&&r.nodeName!="TH";)r=r.classList&&r.classList.contains("ProseMirror")?null:r.parentNode;return r}function uD(r,e,t,n){const i=t=="right"?-n:n,a=r.posAtCoords({left:e.clientX+i,top:e.clientY});if(!a)return-1;const{pos:o}=a,s=pf(r.state.doc.resolve(o));if(!s)return-1;if(t=="right")return s.pos;const l=er.get(s.node(-1)),u=s.start(-1),c=l.map.indexOf(s.pos-u);return c%l.width==0?-1:u+l.map[c-1]}function cD(r,e,t){const n=e.clientX-r.startX;return Math.max(t,r.startWidth+n)}function _4(r,e){r.dispatch(r.state.tr.setMeta(Rn,{setHandle:e}))}function dQ(r,e,t){const n=r.state.doc.resolve(e),i=n.node(-1),a=er.get(i),o=n.start(-1),s=a.colCount(n.pos-o)+n.nodeAfter.attrs.colspan-1,l=r.state.tr;for(let u=0;u<a.height;u++){const c=u*a.width+s;if(u&&a.map[c]==a.map[c-a.width])continue;const f=a.map[c],h=i.nodeAt(f).attrs,d=h.colspan==1?0:s-a.colCount(f);if(h.colwidth&&h.colwidth[d]==t)continue;const p=h.colwidth?h.colwidth.slice():pQ(h.colspan);p[d]=t,l.setNodeMarkup(o+f,null,{...h,colwidth:p})}l.docChanged&&r.dispatch(l)}function fD(r,e,t,n){const i=r.state.doc.resolve(e),a=i.node(-1),o=i.start(-1),s=er.get(a).colCount(i.pos-o)+i.nodeAfter.attrs.colspan-1;let l=r.domAtPos(i.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&Cw(a,l.firstChild,l,n,s,t)}function pQ(r){return Array(r).fill(0)}function vQ(r,e){var t;const n=[],i=r.doc.resolve(e),a=i.node(-1);if(!a)return Gt.empty;const o=er.get(a),s=i.start(-1),l=o.colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1;for(let u=0;u<o.height;u++){const c=l+u*o.width;if((l==o.width-1||o.map[c]!=o.map[c+1])&&(u==0||o.map[c]!=o.map[c-o.width])){const f=o.map[c],h=s+f+a.nodeAt(f).nodeSize-1,d=document.createElement("div");d.className="column-resize-handle",(t=Rn.getState(r))!=null&&t.dragging&&n.push(Xr.node(s+f,s+f+a.nodeAt(f).nodeSize,{class:"column-resize-dragging"})),n.push(Xr.widget(h,d))}}return Gt.create(r.doc,n)}function mQ({allowTableNodeSelection:r=!1}={}){return new Ut({key:es,state:{init(){return null},apply(e,t){const n=e.getMeta(es);if(n!=null)return n==-1?null:n;if(t==null||!e.docChanged)return t;const{deleted:i,pos:a}=e.mapping.mapResult(t);return i?null:a}},props:{decorations:DJ,handleDOMEvents:{mousedown:iQ},createSelectionBetween(e){return es.getState(e.state)!=null?e.state.selection:null},handleTripleClick:rQ,handleKeyDown:tQ,handlePaste:nQ},appendTransaction(e,t,n){return IJ(n,m4(n,t),r)}})}function Aw(r,e){return e?["width",`${Math.max(e,r)}px`]:["min-width",`${r}px`]}function hD(r,e,t,n,i,a){var o;let s=0,l=!0,u=e.firstChild;const c=r.firstChild;if(c!==null)for(let f=0,h=0;f<c.childCount;f+=1){const{colspan:d,colwidth:p}=c.child(f).attrs;for(let v=0;v<d;v+=1,h+=1){const m=i===h?a:p&&p[v],g=m?`${m}px`:"";if(s+=m||n,m||(l=!1),u){if(u.style.width!==g){const[y,b]=Aw(n,m);u.style.setProperty(y,b)}u=u.nextSibling}else{const y=document.createElement("col"),[b,_]=Aw(n,m);y.style.setProperty(b,_),e.appendChild(y)}}}for(;u;){const f=u.nextSibling;(o=u.parentNode)===null||o===void 0||o.removeChild(u),u=f}l?(t.style.width=`${s}px`,t.style.minWidth=""):(t.style.width="",t.style.minWidth=`${s}px`)}class gQ{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),hD(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,hD(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function yQ(r,e,t,n){let i=0,a=!0;const o=[],s=r.firstChild;if(!s)return{};for(let f=0,h=0;f<s.childCount;f+=1){const{colspan:d,colwidth:p}=s.child(f).attrs;for(let v=0;v<d;v+=1,h+=1){const m=t===h?n:p&&p[v];i+=m||e,m||(a=!1);const[g,y]=Aw(e,m);o.push(["col",{style:`${g}: ${y}`}])}}const l=a?`${i}px`:"",u=a?"":`${i}px`;return{colgroup:["colgroup",{},...o],tableWidth:l,tableMinWidth:u}}function dD(r,e){return r.createAndFill()}function bQ(r){if(r.cached.tableNodeTypes)return r.cached.tableNodeTypes;const e={};return Object.keys(r.nodes).forEach(t=>{const n=r.nodes[t];n.spec.tableRole&&(e[n.spec.tableRole]=n)}),r.cached.tableNodeTypes=e,e}function _Q(r,e,t,n,i){const a=bQ(r),o=[],s=[];for(let u=0;u<t;u+=1){const c=dD(a.cell);if(c&&s.push(c),n){const f=dD(a.header_cell);f&&o.push(f)}}const l=[];for(let u=0;u<e;u+=1)l.push(a.row.createChecked(null,n&&u===0?o:s));return a.table.createChecked(null,l)}function xQ(r){return r instanceof Bt}const iv=({editor:r})=>{const{selection:e}=r.state;if(!xQ(e))return!1;let t=0;const n=q5(e.ranges[0].$from,a=>a.type.name==="table");return n==null||n.node.descendants(a=>{if(a.type.name==="table")return!1;["tableCell","tableHeader"].includes(a.type.name)&&(t+=1)}),t===e.ranges.length?(r.commands.deleteTable(),!0):!1};ar.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:gQ,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:r,HTMLAttributes:e}){const{colgroup:t,tableWidth:n,tableMinWidth:i}=yQ(r,this.options.cellMinWidth);return["table",Lt(this.options.HTMLAttributes,e,{style:n?`width: ${n}`:`min-width: ${i}`}),t,["tbody",0]]},addCommands(){return{insertTable:({rows:r=3,cols:e=3,withHeaderRow:t=!0}={})=>({tr:n,dispatch:i,editor:a})=>{const o=_Q(a.schema,r,e,t);if(i){const s=n.selection.from+1;n.replaceSelectionWith(o).scrollIntoView().setSelection(We.near(n.doc.resolve(s)))}return!0},addColumnBefore:()=>({state:r,dispatch:e})=>OJ(r,e),addColumnAfter:()=>({state:r,dispatch:e})=>jJ(r,e),deleteColumn:()=>({state:r,dispatch:e})=>BJ(r,e),addRowBefore:()=>({state:r,dispatch:e})=>FJ(r,e),addRowAfter:()=>({state:r,dispatch:e})=>VJ(r,e),deleteRow:()=>({state:r,dispatch:e})=>HJ(r,e),deleteTable:()=>({state:r,dispatch:e})=>KJ(r,e),mergeCells:()=>({state:r,dispatch:e})=>tD(r,e),splitCell:()=>({state:r,dispatch:e})=>rD(r,e),toggleHeaderColumn:()=>({state:r,dispatch:e})=>Dd("column")(r,e),toggleHeaderRow:()=>({state:r,dispatch:e})=>Dd("row")(r,e),toggleHeaderCell:()=>({state:r,dispatch:e})=>qJ(r,e),mergeOrSplit:()=>({state:r,dispatch:e})=>tD(r,e)?!0:rD(r,e),setCellAttribute:(r,e)=>({state:t,dispatch:n})=>UJ(r,e)(t,n),goToNextCell:()=>({state:r,dispatch:e})=>iD(1)(r,e),goToPreviousCell:()=>({state:r,dispatch:e})=>iD(-1)(r,e),fixTables:()=>({state:r,dispatch:e})=>(e&&m4(r),!0),setCellSelection:r=>({tr:e,dispatch:t})=>{if(t){const n=Bt.create(e.doc,r.anchorCell,r.headCell);e.setSelection(n)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:iv,"Mod-Backspace":iv,Delete:iv,"Mod-Delete":iv}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[oQ({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],mQ({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(r){const e={name:r.name,options:r.options,storage:r.storage};return{tableRole:pr(jr(r,"tableRole",e))}}});ar.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:r=>{const e=r.getAttribute("colwidth");return e?e.split(",").map(n=>parseInt(n,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:r}){return["td",Lt(this.options.HTMLAttributes,r),0]}});ar.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:r=>{const e=r.getAttribute("colwidth");return e?e.split(",").map(n=>parseInt(n,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:r}){return["th",Lt(this.options.HTMLAttributes,r),0]}});ar.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:r}){return["tr",Lt(this.options.HTMLAttributes,r),0]}});const wQ={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function SQ(r,e){return Y(),ae("svg",wQ,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 13v6h-6m-8-8V5h6M5 5l14 14"},null,-1)]))}const TQ=vt({name:"lucide-move-diagonal-2",render:SQ}),CQ={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function AQ(r,e){return Y(),ae("svg",CQ,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12H3m14 6H3M21 6H3"},null,-1)]))}const MQ=vt({name:"lucide-align-left",render:AQ}),kQ={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function DQ(r,e){return Y(),ae("svg",kQ,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 12H7m12 6H5M21 6H3"},null,-1)]))}const EQ=vt({name:"lucide-align-center",render:DQ}),LQ={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function IQ(r,e){return Y(),ae("svg",LQ,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12H9m12 6H7M21 6H3"},null,-1)]))}const PQ=vt({name:"lucide-align-right",render:IQ}),RQ={class:"relative"},OQ=["src","alt","width","height"],jQ={class:"absolute bottom-2 right-2 flex items-center gap-2"},NQ={key:0,class:"flex divide-x divide-outline-gray-5 rounded bg-black/65"},BQ={key:1,class:"inset-0 absolute flex items-center justify-center z-10"},zQ={class:"bg-gray-900/80 p-2 inset-0 leading-none rounded-sm flex flex-col items-center justify-center gap-2"},FQ={class:"flex items-center gap-2"},VQ=["disabled"],$Q={key:1,class:"w-full py-1.5"},HQ=Ke({__name:"ImageNodeView",props:xZ,setup(r){const e=r,t=te(null),n=te(null),i=te(!1),a=te(0),o=te(0),s=te(1);function l(){e.editor.commands.setNodeSelection(e.getPos())}const u=te(e.node.attrs.alt||""),c=te(!1);zi(()=>{if(c.value=e.editor.isEditable,t.value){const x=e.node.attrs.width||t.value.naturalWidth,w=e.node.attrs.height||t.value.naturalHeight;x&&w&&(s.value=w/x)}}),e.editor.on("update",()=>{c.value=e.editor.isEditable});function f(x){const w=x.target.value;u.value=w,e.updateAttributes({alt:w})}function h(x){x.key==="Enter"?(x.preventDefault(),p()):(x.key==="Escape"||x.key==="ArrowDown")&&(x.preventDefault(),v()),x.key==="ArrowUp"&&(x.preventDefault(),m())}function d(x){e.editor.commands.focus(),e.editor.chain().setTextSelection(x).scrollIntoView().run()}function p(){const x=e.getPos();e.editor.commands.focus(),e.editor.chain().setTextSelection(x+1).createParagraphNear().scrollIntoView().run()}function v(){const x=e.getPos();d(x+1)}function m(){const x=e.getPos();d(x-1)}function g(x){var T,C,A;if(!c.value)return;l(),i.value=!0,a.value=x.clientX,o.value=((T=t.value)==null?void 0:T.offsetWidth)||e.node.attrs.width||0;const w=e.node.attrs.width||((C=t.value)==null?void 0:C.naturalWidth),S=e.node.attrs.height||((A=t.value)==null?void 0:A.naturalHeight);w&&S?s.value=S/w:s.value=1,window.addEventListener("mousemove",y),window.addEventListener("mouseup",b),document.body.style.cursor="ew-resize"}function y(x){if(!i.value||!t.value||!n.value)return;const S=e.editor.view.dom.clientWidth,T=x.clientX-a.value;let C=o.value+T;C=Math.max(50,Math.min(C,S));const A=C*s.value;t.value.style.width=`${C}px`,t.value.style.height=`${A}px`,n.value.style.width=`${C}px`}function b(){if(i.value&&(i.value=!1,window.removeEventListener("mousemove",y),window.removeEventListener("mouseup",b),document.body.style.cursor="",t.value&&n.value)){const x=t.value.offsetWidth,w=t.value.offsetHeight;e.updateAttributes({width:x,height:w}),t.value.style.width="",t.value.style.height="",n.value.style.width=""}}function _(x){e.editor.commands.setImageAlign(x)}return(x,w)=>(Y(),$e(H(i4),null,{default:_e(()=>[Z("div",{ref_key:"containerRef",ref:n,class:kt(["relative overflow-hidden not-prose my-6 rounded-[2px] block max-w-full",[{"ring-2 ring-outline-gray-3 ring-offset-2":x.selected},x.node.attrs.align==="center"?"mx-auto":"",x.node.attrs.align==="right"?"ml-auto mr-0":"",x.node.attrs.align==="left"?"mr-auto ml-0":""]]),style:Sa({width:x.node.attrs.width?`${x.node.attrs.width}px`:"auto"})},[Z("div",RQ,[x.node.attrs.src?(Y(),ae("img",{key:0,ref_key:"imageRef",ref:t,class:"rounded-[2px]",src:x.node.attrs.src,alt:x.node.attrs.alt||"",width:x.node.attrs.width,height:x.node.attrs.height,onClick:At(l,["stop"])},null,8,OQ)):ct("",!0),Z("div",jQ,[x.selected&&c.value?(Y(),ae("div",NQ,[Z("button",{onClick:w[0]||(w[0]=At(S=>_("left"),["stop"])),class:kt(["px-1.5 py-1 hover:text-ink-white",x.node.attrs.align==="left"?"text-ink-white":"text-ink-gray-4"])},[Ie(H(MQ),{class:"size-4"})],2),Z("button",{onClick:w[1]||(w[1]=At(S=>_("center"),["stop"])),class:kt(["px-1.5 py-1 hover:text-ink-white",x.node.attrs.align==="center"?"text-ink-white":"text-ink-gray-4"])},[Ie(H(EQ),{class:"size-4"})],2),Z("button",{onClick:w[2]||(w[2]=At(S=>_("right"),["stop"])),class:kt(["px-1.5 py-1 hover:text-ink-white",x.node.attrs.align==="right"?"text-ink-white":"text-ink-gray-4"])},[Ie(H(PQ),{class:"size-4"})],2)])):ct("",!0),x.selected&&c.value?(Y(),ae("button",{key:1,class:"cursor-nw-resize bg-black/65 rounded p-1",onMousedown:At(g,["prevent"])},[Ie(H(TQ),{class:"text-white size-4"})],32)):ct("",!0)]),x.node.attrs.loading?(Y(),ae("div",BQ,[Z("div",zQ,[Z("div",FQ,[Ie(R3,{class:"text-gray-100 size-4"}),w[4]||(w[4]=Z("span",{class:"text-gray-100"},"Uploading...",-1))])])])):ct("",!0)]),(c.value||x.node.attrs.alt)&&!x.node.attrs.error?og((Y(),ae("input",{key:0,"onUpdate:modelValue":w[3]||(w[3]=S=>u.value=S),class:"w-full text-center bg-transparent text-sm text-ink-gray-6 h-7 border-none focus:ring-0 placeholder-ink-gray-4",placeholder:"Add caption",disabled:!c.value,onChange:f,onKeydown:h},null,40,VQ)),[[Hx,u.value]]):ct("",!0),x.node.attrs.error?(Y(),ae("div",$Q,[Ie(H(JU),{message:`Upload Failed: ${x.node.attrs.error}`},null,8,["message"])])):ct("",!0)],6)]),_:1}))}}),GQ=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/;ar.create({name:"image",group:"block",draggable:!0,selectable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null},loading:{default:!1,parseHTML:()=>!1},align:{default:"left",parseHTML:r=>{const e=(r.getAttribute("data-align")||r.getAttribute("align")||"left").toLowerCase();return["left","center","right"].includes(e)?e:"left"},renderHTML:r=>({"data-align":r.align||"left"})},uploadId:{default:null,parseHTML:()=>null},error:{default:null,parseHTML:()=>null}}},parseHTML(){return[{tag:"img[src]",getAttrs:r=>{if(typeof r=="string")return{};const e=r;return{src:e.getAttribute("src"),alt:e.getAttribute("alt"),title:e.getAttribute("title"),width:e.getAttribute("width"),height:e.getAttribute("height")}}}]},renderHTML({HTMLAttributes:r}){return["img",Lt(this.options.HTMLAttributes||{},r)]},addNodeView(){return IT(HQ)},addOptions(){return{uploadFunction:null,HTMLAttributes:{}}},addCommands(){return{setImageAlign:r=>({commands:e})=>e.updateAttributes(this.name,{align:r}),setImage:r=>({commands:e,editor:t})=>{const n=e.insertContent({type:this.name,attrs:r});return n&&r.src&&YQ(t.view,r.src,(i,a)=>{pD(r.src,t.view,a)}),n},uploadImage:r=>({editor:e})=>w4(r,e.view,null,this.options),selectAndUploadImage:()=>({editor:r})=>{const e=document.createElement("input");return e.type="file",e.accept="image/*",e.onchange=t=>{const n=t.target;if(n.files&&n.files.length){const i=n.files[0];r.commands.uploadImage(i)}},e.click(),!0}}},addInputRules(){return[X5({find:GQ,type:this.type,getAttributes:r=>{const[,,e,t,n]=r;return{src:t,alt:e,title:n}}})]},addProseMirrorPlugins(){const r=this;return[new Ut({props:{handleDOMEvents:{drop:(e,t)=>{var s,l;if(!((l=(s=t.dataTransfer)==null?void 0:s.files)==null?void 0:l.length)||!r.options.uploadFunction)return!1;const i=Array.from(t.dataTransfer.files).filter(u=>/image/i.test(u.type));if(i.length===0)return!1;t.preventDefault();const a=e.posAtCoords({left:t.clientX,top:t.clientY});let o=null;if(a){o=a.pos;const u=e.state.tr.setSelection(qe.near(e.state.doc.resolve(o)));e.dispatch(u)}return Mw(i,e,o,r.options),!0},handlePaste:(e,t)=>{var a;if(!r.options.uploadFunction)return!1;const n=(a=t.clipboardData)==null?void 0:a.items;if(!n||n.length===0)return!1;const i=[];for(let o=0;o<n.length;o++){const s=n[o];if(s.kind==="file"&&s.type.indexOf("image/")!==-1){const l=s.getAsFile();l&&i.push(l)}}return i.length===0?!1:(t.preventDefault(),Mw(i,e,null,r.options),!0)}}},appendTransaction(e,t,n){const i=[];return e.some(a=>a.docChanged)&&n.doc.descendants((a,o)=>{a.type.name==="image"&&a.attrs.src&&(!a.attrs.width||!a.attrs.height)&&!a.attrs.loading&&i.push({node:a,pos:o})}),i.length===0||i.forEach(({node:a,pos:o})=>{const s=r.editor;s&&pD(a.attrs.src,s.view,o)}),null}})]}});function WQ(r,e){if(!e)return null;let t=null;return r.state.doc.descendants((n,i)=>{if(n.type.name==="image"&&n.attrs.uploadId===e)return t=i+n.nodeSize,!1}),t}function x4(r,e,t,n,i,a,o=!1){if(!n.uploadFunction)return console.error("uploadFunction option is not provided"),!1;const s=`upload-${Date.now()}-${Math.random().toString(36).substring(2,9)}`;return qTe(r).then(l=>{const u=e.state.schema.nodes.image.create({loading:!0,uploadId:s,src:l}),c=e.state.tr;if(t!=null)c.insert(t,u);else if(i==="replace")c.replaceSelectionWith(u);else{const f=e.state.selection.from;c.insert(f,u)}if(e.dispatch(c),o){const f=u.nodeSize||1;setTimeout(()=>{try{let h=null;if(e.state.doc.descendants((d,p)=>{if(d.type.name==="image"&&d.attrs.uploadId===s)return h=p,!1}),h!==null){const d=h+f,p=e.state.tr.setSelection(qe.near(e.state.doc.resolve(d)));e.dispatch(p)}}catch(h){console.error("Error moving cursor:",h)}},10)}return n.uploadFunction(r)}).then(l=>S4(l.file_url).then(u=>({...l,width:u.width,height:u.height})).catch(()=>l)).then(l=>{const u=e.state.tr;e.state.doc.descendants((c,f)=>{if(c.type.name==="image"&&c.attrs.uploadId===s)return u.setNodeMarkup(f,void 0,{...c.attrs,src:l.file_url,width:l.width||c.attrs.width,height:l.height||c.attrs.height,loading:!1}),!1}),e.dispatch(u),a&&a(s)}).catch(l=>{console.error("Image upload failed:",l);try{const u=e.state.tr;e.state.doc.descendants((c,f)=>{if(c.type.name==="image"&&c.attrs.uploadId===s)return u.setNodeMarkup(f,void 0,{...c.attrs,loading:!1,error:l.message||"Failed to upload image"}),!1}),e.dispatch(u)}catch(u){console.error("Error updating failed node:",u)}a&&a(s)}),!0}function UQ(r,e,t,n,i){return x4(r,e,t,n,"insert",i,!0)}function w4(r,e,t,n){return x4(r,e,t,n,"replace")}function YQ(r,e,t){r.state.doc.descendants((n,i)=>{if(n.type.name==="image"&&n.attrs.src===e)return t(n,i),!1})}function pD(r,e,t){S4(r).then(n=>{const i=e.state.doc.nodeAt(t);if(!i||i.type.name!=="image")return;const a=i.attrs;if(a.width==null||a.height==null){const o=e.state.tr.setNodeMarkup(t,void 0,{...a,width:a.width??n.width,height:a.height??n.height});e.dispatch(o)}}).catch(n=>{})}function S4(r){return new Promise((e,t)=>{const n=new Image;n.onload=()=>e({width:n.naturalWidth,height:n.naturalHeight}),n.onerror=t,n.src=r})}function Mw(r,e,t,n){if(r.length===1){w4(r[0],e,t,n);return}let i=[...r],a=null;const o=()=>{if(i.length===0)return;const s=i.shift();if(!s)return;const l=a?WQ(e,a):t;UQ(s,e,l,n,u=>{a=u,setTimeout(o,100)})};o()}function qQ(r){const{targetRef:e,zoomLevel:t=te(100),onSwipeLeft:n,onSwipeRight:i,onDoubleTap:a,onTap:o,onPanStart:s,onPanMove:l,onPanAnimate:u,onPanEnd:c,onPinchStart:f,onPinchMove:h,onPinchEnd:d,doubleTapDelay:p=300,minSwipeDistance:v=50,maxVerticalSwipeDistance:m=75,maxTapDuration:g=200,maxTapMovement:y=10,panThreshold:b=5,inertiaDamping:_=.94,inertiaVelocityThreshold:x=.5}=r,w=te(!1),S=te(!1),T=te(!1),C=te({x:0,y:0}),A=te(0),M=te(0),D=te(0),E=te(null),L=te(0),I=te({x:0,y:0}),R=te({x:0,y:0}),P=te(null),O=()=>{P.value!==null&&(cancelAnimationFrame(P.value),P.value=null),T.value=!1,R.value={x:0,y:0}},j=B=>{O(),B.preventDefault(),w.value=!1,S.value=!1,E.value=B.touches;const $=performance.now(),J=$-A.value;if(J<p&&J>0&&B.touches.length===1&&a){a(B),A.value=0,M.value=0;return}if(M.value=$,B.touches.length===1){A.value=$;const U=B.touches[0];C.value={x:U.clientX,y:U.clientY},L.value=$,I.value={...C.value},R.value={x:0,y:0},s&&s(B)}else if(B.touches.length===2){A.value=0;const U=B.touches[0],we=B.touches[1];D.value=Math.hypot(we.clientX-U.clientX,we.clientY-U.clientY),S.value=!0,f&&f(B)}else A.value=0,M.value=0},F=B=>{if(!E.value)return;B.preventDefault();const $=performance.now(),J=$-L.value;if(B.touches.length===2&&E.value.length===2){w.value=!1,S.value=!0;const U=B.touches[0],we=B.touches[1],Ye=Math.hypot(we.clientX-U.clientX,we.clientY-U.clientY);if(D.value>0&&h){const ge=Ye/D.value;h(ge,B)}R.value={x:0,y:0}}else if(B.touches.length===1&&E.value.length===1&&!S.value){const U=B.touches[0].clientX,we=B.touches[0].clientY,Ye=U-I.value.x,ge=we-I.value.y;J>1?R.value={x:Ye/J,y:ge/J}:R.value={x:0,y:0},L.value=$,I.value={x:U,y:we};const le=U-C.value.x,be=we-C.value.y;if(!w.value&&t.value>100&&(Math.abs(le)>b||Math.abs(be)>b)&&(w.value=!0,C.value={x:U,y:we}),w.value&&l){const re=t.value/100,G=le/re,ee=be/re;l(G,ee,B)}}},N=B=>{var ge;const $=B.touches.length,J=performance.now(),U=w.value,we=S.value,Ye={...R.value};if(U&&E.value&&$<E.value.length)if(w.value=!1,c&&c(B),Math.hypot(Ye.x,Ye.y)>x&&u&&t.value>100){T.value=!0;let be=performance.now(),re={...Ye};const G=ee=>{if(!T.value)return;const Q=Math.max(1,ee-be);be=ee;const me=t.value/100,he=re.x*Q/me,Se=re.y*Q/me;u(he,Se);const Fe=Math.pow(Math.min(.999,_),Q/16.67);re.x*=Fe,re.y*=Fe,Math.hypot(re.x,re.y)<.01||t.value<=100?O():P.value=requestAnimationFrame(G)};P.value=requestAnimationFrame(G)}else R.value={x:0,y:0};else U||(R.value={x:0,y:0});if(we&&$<2&&(S.value=!1,D.value=0,d&&d(B)),$===0&&B.changedTouches.length===1&&M.value>0&&((ge=E.value)==null?void 0:ge.length)===1){const le=B.changedTouches[0],be=le.clientX-C.value.x,re=le.clientY-C.value.y,G=J-M.value;!U&&t.value<=100&&Math.abs(be)>v&&Math.abs(re)<m?be<0&&n?n():be>0&&i&&i():!U&&G<g&&Math.abs(be)<y&&Math.abs(re)<y&&o&&o(B)}$===0?(M.value=0,C.value={x:0,y:0},E.value=null,S.value=!1,T.value||(R.value={x:0,y:0})):$===1&&!w.value&&!S.value&&(C.value={x:B.touches[0].clientX,y:B.touches[0].clientY},M.value=performance.now(),E.value=B.touches)};return Nt(e,(B,$)=>{$&&($.removeEventListener("touchstart",j),$.removeEventListener("touchmove",F),$.removeEventListener("touchend",N),$.removeEventListener("touchcancel",N),O()),B&&(B.addEventListener("touchstart",j,{passive:!1}),B.addEventListener("touchmove",F,{passive:!1}),B.addEventListener("touchend",N,{passive:!0}),B.addEventListener("touchcancel",N,{passive:!0}))},{immediate:!0}),{isPanning:lo(w),isPinching:lo(S),isAnimatingPan:lo(T)}}function XQ({initialIndex:r,imageCount:e,onNavigate:t}){const n=te(r.value);Nt(r,o=>{n.value=o,t==null||t()});function i(){e.value>0&&(n.value=(n.value+1)%e.value,t==null||t())}function a(){e.value>0&&(n.value=(n.value-1+e.value)%e.value,t==null||t())}return{currentIndex:n,nextImage:i,previousImage:a}}function KQ({containerRef:r,isEnabled:e}){const t=te(100),n=te({x:0,y:0}),i=te(!1),a=te({x:0,y:0}),o=te({x:0,y:0}),s=90,l=110;Nt(t,(p,v)=>{p<=100&&v>100&&(n.value={x:0,y:0})});function u(){t.value=Math.min(t.value+25,300)}function c(){const p=Math.max(t.value-25,25);t.value>100&&p<100?t.value=100:t.value=p}function f(){t.value=100,n.value={x:0,y:0},i.value=!1,o.value={x:0,y:0}}function h(p){if(t.value<=100)return;p.preventDefault(),i.value=!0,a.value={x:p.clientX,y:p.clientY},o.value={...n.value};const v=g=>{if(!i.value)return;const y=g.clientX-a.value.x,b=g.clientY-a.value.y,_=t.value/100;n.value={x:o.value.x+y/_,y:o.value.y+b/_}},m=()=>{i.value&&(i.value=!1,document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",m))};document.addEventListener("mousemove",v),document.addEventListener("mouseup",m)}function d(p){var v;if(e.value&&(v=r.value)!=null&&v.contains(p.target)){p.preventDefault();let m=p.ctrlKey?.5:.2;const g=-p.deltaY*m,y=t.value,b=Math.round(y+g);let _=Math.max(25,Math.min(300,b));(y>100&&_<100||y<100&&_>100)&&Math.abs(100-_)<Math.abs(g)*1.5&&(_=100),t.value=_}}return zi(()=>{const p=r.value;p&&p.addEventListener("wheel",d,{passive:!1,capture:!0})}),Ss(()=>{const p=r.value;p&&p.removeEventListener("wheel",d,{capture:!0}),i.value&&(i.value=!1)}),{zoomLevel:t,panPosition:n,isMousePanning:i,initialPanPositionOnGestureStart:o,zoomIn:u,zoomOut:c,resetZoom:f,handlePanStart:h,snapThresholdLower:s,snapThresholdUpper:l}}const ZQ={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function JQ(r,e){return Y(),ae("svg",ZQ,e[0]||(e[0]=[Z("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[Z("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),Z("path",{d:"m7 10l5 5l5-5"})],-1)]))}const QQ=vt({name:"lucide-download",render:JQ}),eee={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function tee(r,e){return Y(),ae("svg",eee,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3m8 0h3a2 2 0 0 0 2-2v-3"},null,-1)]))}const ree=vt({name:"lucide-maximize",render:tee}),nee={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function iee(r,e){return Y(),ae("svg",nee,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3M3 16h3a2 2 0 0 1 2 2v3m8 0v-3a2 2 0 0 1 2-2h3"},null,-1)]))}const aee=vt({name:"lucide-minimize",render:iee}),oee={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function see(r,e){return Y(),ae("svg",oee,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m15 18l-6-6l6-6"},null,-1)]))}const lee=vt({name:"lucide-chevron-left",render:see}),uee={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function cee(r,e){return Y(),ae("svg",uee,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)]))}const fee=vt({name:"lucide-chevron-right",render:cee}),hee={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function dee(r,e){return Y(),ae("svg",hee,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"},null,-1)]))}const pee=vt({name:"lucide-plus",render:dee}),vee={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function mee(r,e){return Y(),ae("svg",vee,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"},null,-1)]))}const T4=vt({name:"lucide-minus",render:mee}),gee={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function yee(r,e){return Y(),ae("svg",gee,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"},null,-1)]))}const C0=vt({name:"lucide-x",render:yee}),bee={class:"relative z-10 flex flex-col items-center"},_ee=["src","alt"],xee={class:"bg-black/65 rounded flex items-center"},wee={class:"px-2 text-sm tabular-nums text-gray-400 select-none"},See={class:"bg-black/65 rounded flex items-center"},Tee={class:"bg-black/65 rounded flex items-center"},Cee={class:"bg-black/65 rounded flex items-center"},Aee=3e3,C4=Ke({__name:"ImageViewerModal",props:{show:{type:Boolean},images:{},initialIndex:{}},emits:["update:show"],setup(r,{emit:e}){const t=r,n=e,i=bm("imageContainer"),a=bm("backdropElement"),o=bm("controlsBar"),s=te(0),l=te(!1),u=te(100),c=te(!0),f=te(null),{zoomLevel:h,panPosition:d,isMousePanning:p,initialPanPositionOnGestureStart:v,zoomIn:m,zoomOut:g,resetZoom:y,handlePanStart:b,snapThresholdLower:_,snapThresholdUpper:x}=KQ({containerRef:i,isEnabled:ag(t,"show")}),{currentIndex:w,nextImage:S,previousImage:T}=XQ({initialIndex:ag(t,"initialIndex"),imageCount:de(()=>t.images.length),onNavigate:y}),C=de(()=>t.images[w.value]),{isPanning:A,isPinching:M,isAnimatingPan:D}=qQ({targetRef:i,zoomLevel:h,panThreshold:10,onSwipeLeft:()=>{h.value<=100&&S()},onSwipeRight:()=>{h.value<=100&&T()},onDoubleTap:N=>{var B;(B=o.value)!=null&&B.contains(N.target)||(h.value>100?y():(h.value=200,d.value={x:0,y:0}))},onTap:N=>{N.target===a.value&&R()},onPanStart:()=>{h.value<=100||(v.value={...d.value})},onPanMove:(N,B)=>{h.value<=100||(d.value={x:v.value.x+N,y:v.value.y+B})},onPanAnimate:(N,B)=>{d.value={x:d.value.x+N,y:d.value.y+B}},onPinchStart:()=>{u.value=h.value,v.value={...d.value}},onPinchMove:N=>{const B=u.value*N;let $=Math.max(25,Math.min(300,Math.round(B)));$>_&&$<x&&($=100),h.value=$},onPinchEnd:()=>{h.value<100&&y(),v.value={x:0,y:0}}}),E=de(()=>p.value||A.value);function L(){c.value=!0,f.value&&clearTimeout(f.value),f.value=setTimeout(()=>{!E.value&&!M.value?c.value=!1:L()},Aee)}function I(){(!M.value||!c.value)&&L()}function R(){n("update:show",!1),y(),f.value&&(clearTimeout(f.value),f.value=null)}function P(){var J;const N=C.value,B=document.createElement("a");B.href=N.src;const $=((J=N.alt)==null?void 0:J.replace(/[^a-z0-9]/gi,"_").toLowerCase())||N.src.split("/").pop()||"download";B.download=$.includes(".")?$:`${$}.jpg`,document.body.appendChild(B),B.click(),document.body.removeChild(B)}function O(){const N=i.value;l.value?document.exitFullscreen&&(document.exitFullscreen(),l.value=!1):N!=null&&N.requestFullscreen&&(N.requestFullscreen(),l.value=!0)}function j(){l.value=!!document.fullscreenElement}function F(N){if(t.show)switch(I(),N.key){case"ArrowLeft":E.value||T(),N.preventDefault();break;case"ArrowRight":E.value||S(),N.preventDefault();break;case"+":case"=":m(),N.preventDefault();break;case"-":g(),N.preventDefault();break;case"Escape":R(),N.preventDefault();break;case"f":case"F":O(),N.preventDefault();break}}return Nt(()=>t.show,N=>{N?(c.value=!0,y(),L()):(f.value&&(clearTimeout(f.value),f.value=null),l.value&&document.exitFullscreen&&document.exitFullscreen())}),Nt(o,N=>{if(N){const B=()=>{s.value=N.offsetHeight},$=new ResizeObserver(B);$.observe(N),B(),Ss(()=>$.disconnect())}else s.value=0}),zi(()=>{document.addEventListener("fullscreenchange",j),document.addEventListener("keydown",F)}),Ss(()=>{document.removeEventListener("fullscreenchange",j),document.removeEventListener("keydown",F),f.value&&clearTimeout(f.value),l.value&&document.exitFullscreen&&document.exitFullscreen()}),(N,B)=>(Y(),$e(VS,{to:"body"},[Ie(x3,{"enter-active-class":"transition-opacity duration-150 ease-in-out","leave-active-class":"transition-opacity duration-150 ease-in-out","enter-from-class":"opacity-0","leave-to-class":"opacity-0",appear:""},{default:_e(()=>[t.show?(Y(),ae("div",{key:0,class:"fixed top-0 left-0 w-full h-full bg-black sm:bg-black/90 z-[50] flex flex-col justify-center items-center overflow-hidden touch-none",ref_key:"imageContainer",ref:i,onMousemove:I,onTouchstart:I,onTouchmove:I},[Z("div",{class:"absolute inset-0 z-0",ref_key:"backdropElement",ref:a,onClick:R},null,512),Z("div",bee,[Z("img",{src:C.value.src,alt:C.value.alt||"Image preview",class:"max-w-screen max-h-screen object-contain block",style:Sa({transform:`scale(${H(h)/100}) translate(${H(d).x}px, ${H(d).y}px)`,cursor:H(h)>100?H(p)?"grabbing":"grab":"default",transition:E.value||H(M)||H(D)?"none":"transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)"}),onMousedown:B[0]||(B[0]=(...$)=>H(b)&&H(b)(...$)),draggable:"false"},null,44,_ee)]),C.value.alt?(Y(),ae("div",{key:0,class:kt(["absolute bottom-4 p-2 text-center rounded-sm text-white text-sm bg-black/65 z-10 transition-opacity duration-300 ease-in-out",{"opacity-0 pointer-events-none":!c.value}])},qt(C.value.alt),3)):ct("",!0),Z("div",{ref_key:"controlsBar",ref:o,class:kt(["absolute top-4 flex items-center space-x-3 p-2 text-white z-20 transition-opacity duration-300 ease-in-out",{"opacity-0 pointer-events-none":!c.value}]),onTouchstart:B[6]||(B[6]=At(()=>{},["stop"])),onTouchmove:B[7]||(B[7]=At(()=>{},["stop"])),onTouchend:B[8]||(B[8]=At(()=>{},["stop"])),onMousedown:B[9]||(B[9]=At(()=>{},["stop"])),onWheel:B[10]||(B[10]=At(()=>{},["stop"]))},[Z("div",xee,[Ie(Ci,{text:"Previous image"},{default:_e(()=>[Z("button",{class:"p-2 hover:bg-gray-900 rounded-l focus:outline-none",onClick:B[1]||(B[1]=At((...$)=>H(T)&&H(T)(...$),["stop"]))},[Ie(H(lee),{class:"size-4"})])]),_:1}),Z("span",wee,qt(H(w)+1)+"/"+qt(t.images.length),1),Ie(Ci,{text:"Next image"},{default:_e(()=>[Z("button",{class:"p-2 hover:bg-gray-900 rounded-r focus:outline-none",onClick:B[2]||(B[2]=At((...$)=>H(S)&&H(S)(...$),["stop"]))},[Ie(H(fee),{class:"size-4"})])]),_:1})]),Z("div",See,[Ie(Ci,{text:"Zoom out"},{default:_e(()=>[Z("button",{class:"p-2 hover:bg-gray-900 rounded-l focus:outline-none",onClick:B[3]||(B[3]=At((...$)=>H(g)&&H(g)(...$),["stop"]))},[Ie(H(T4),{class:"size-4"})])]),_:1}),Ie(Ci,{text:"Reset zoom"},{default:_e(()=>[Z("button",{class:"p-2 hover:bg-gray-900 text-sm text-gray-400 focus:outline-none",onClick:B[4]||(B[4]=At((...$)=>H(y)&&H(y)(...$),["stop"]))},qt(H(h))+"% ",1)]),_:1}),Ie(Ci,{text:"Zoom in"},{default:_e(()=>[Z("button",{class:"p-2 hover:bg-gray-900 rounded-r focus:outline-none",onClick:B[5]||(B[5]=At((...$)=>H(m)&&H(m)(...$),["stop"]))},[Ie(H(pee),{class:"size-4"})])]),_:1})]),Z("div",Tee,[Ie(Ci,{text:"Download image"},{default:_e(()=>[Z("button",{class:"p-2 hover:bg-gray-900 rounded-l focus:outline-none",onClick:At(P,["stop"])},[Ie(H(QQ),{class:"size-4"})])]),_:1}),Ie(Ci,{text:l.value?"Exit fullscreen":"Enter fullscreen"},{default:_e(()=>[Z("button",{class:"p-2 hover:bg-gray-900 rounded-r focus:outline-none hidden sm:block",onClick:At(O,["stop"])},[l.value?(Y(),$e(H(aee),{key:1,class:"size-4"})):(Y(),$e(H(ree),{key:0,class:"size-4"}))])]),_:1},8,["text"])]),Z("div",Cee,[Ie(Ci,{text:"Close"},{default:_e(()=>[Z("button",{class:"p-2 hover:bg-gray-900 rounded focus:outline-none",onClick:At(R,["stop"])},[Ie(H(C0),{class:"size-4"})])]),_:1})])],34)],544)):ct("",!0)]),_:1})]))}});Kt.create({name:"imageViewer",onBeforeCreate(){if(!document.querySelector("style[data-image-viewer-style]")){const r=document.createElement("style");r.textContent=`
|
||
.ProseMirror:not(.ProseMirror-focused) img {
|
||
cursor: pointer;
|
||
}
|
||
`,r.setAttribute("data-image-viewer-style","true"),document.head.appendChild(r)}},onDestroy(){const r=document.querySelector("style[data-image-viewer-style]");r&&document.head.removeChild(r)},addCommands(){return{openImageViewer:r=>({editor:e})=>{const t=[];e.state.doc.descendants(i=>(i.type.name==="image"&&t.push({src:i.attrs.src,alt:i.attrs.alt||null}),!0));const n=t.findIndex(i=>i.src===r);return Mee(t,n),!0}}},addProseMirrorPlugins(){const r=this;return[new Ut({key:new jt("imageViewer"),props:{handleClick(e,t,n){if(r.editor.isEditable)return!1;const{state:i}=e,a=i.doc.nodeAt(t);if((a==null?void 0:a.type.name)==="image"){n.preventDefault();const o=a.attrs.src;return r.editor.commands.openImageViewer(o),!0}if(n.target instanceof HTMLImageElement){let o=!1;if(i.doc.descendants((s,l)=>{if(s.type.name==="image"&&!o){const u=e.nodeDOM(l);if(u&&(u===n.target||u.contains(n.target)))return n.preventDefault(),r.editor.commands.openImageViewer(s.attrs.src),o=!0,!1}return!0}),o)return!0}return!1}}})]}});function Mee(r,e){const t=document.createElement("div");document.body.appendChild(t);const n=w3({render(){return so(C4,{show:!0,images:r,initialIndex:e,"onUpdate:show":i=>{i||setTimeout(()=>{n.unmount(),t.remove()},0)}})}});n.mount(t)}ar.create({name:"video",group:"block",selectable:!0,draggable:!0,atom:!0,addOptions(){return{uploadFunction:null,HTMLAttributes:{}}},addAttributes(){return{src:{default:null}}},parseHTML(){return[{tag:"video"}]},renderHTML({HTMLAttributes:r}){return["video",Lt(this.options.HTMLAttributes,r,{controls:""})]},addCommands(){return{setVideo:r=>({commands:e})=>e.insertContent({type:this.name,attrs:r}),uploadVideo:r=>({editor:e})=>{const t=e.state.selection.from;return kee(r,e.view,t,this.options)},selectAndUploadVideo:()=>({editor:r})=>{if(!this.options.uploadFunction)return console.error("uploadFunction option is not provided for videos."),!1;const e=document.createElement("input");return e.type="file",e.accept="video/*",e.onchange=t=>{const n=t.target;if(n.files&&n.files.length){const i=n.files[0];r.commands.uploadVideo(i)}},e.click(),!0}}},addNodeView(){return({editor:r,node:e})=>{const t=document.createElement("div");t.className="relative aspect-w-16 aspect-h-9"+(r.isEditable?" cursor-pointer":"");const n=document.createElement("video");if(n.src=e.attrs.src,n.setAttribute("controls",""),r.isEditable){let i=document.createElement("div");i.className="absolute top-0 right-0 text-xs m-2 bg-surface-gray-6 text-ink-white px-2 py-1 rounded-md",i.innerHTML="Video",t.append(i)}return t.append(n),{dom:t}}}});function kee(r,e,t,n){return n.uploadFunction?(n.uploadFunction(r).then(i=>{const{schema:a}=e.state,o=a.nodes.video.create({src:i.file_url}),s=e.state.tr;t!=null?s.insert(t,o):s.replaceSelectionWith(o),e.dispatch(s)}).catch(i=>{console.error("Video upload failed:",i)}),!0):(console.error("uploadFunction option is not provided for videos."),!1)}const Dee="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Eee="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",kw="numeric",Dw="ascii",Ew="alpha",qh="asciinumeric",Th="alphanumeric",Lw="domain",A4="emoji",Lee="scheme",Iee="slashscheme",J1="whitespace";function Pee(r,e){return r in e||(e[r]=[]),e[r]}function El(r,e,t){e[kw]&&(e[qh]=!0,e[Th]=!0),e[Dw]&&(e[qh]=!0,e[Ew]=!0),e[qh]&&(e[Th]=!0),e[Ew]&&(e[Th]=!0),e[Th]&&(e[Lw]=!0),e[A4]&&(e[Lw]=!0);for(const n in e){const i=Pee(n,t);i.indexOf(r)<0&&i.push(r)}}function Ree(r,e){const t={};for(const n in e)e[n].indexOf(r)>=0&&(t[n]=!0);return t}function Sn(r=null){this.j={},this.jr=[],this.jd=null,this.t=r}Sn.groups={};Sn.prototype={accepts(){return!!this.t},go(r){const e=this,t=e.j[r];if(t)return t;for(let n=0;n<e.jr.length;n++){const i=e.jr[n][0],a=e.jr[n][1];if(a&&i.test(r))return a}return e.jd},has(r,e=!1){return e?r in this.j:!!this.go(r)},ta(r,e,t,n){for(let i=0;i<r.length;i++)this.tt(r[i],e,t,n)},tr(r,e,t,n){n=n||Sn.groups;let i;return e&&e.j?i=e:(i=new Sn(e),t&&n&&El(e,t,n)),this.jr.push([r,i]),i},ts(r,e,t,n){let i=this;const a=r.length;if(!a)return i;for(let o=0;o<a-1;o++)i=i.tt(r[o]);return i.tt(r[a-1],e,t,n)},tt(r,e,t,n){n=n||Sn.groups;const i=this;if(e&&e.j)return i.j[r]=e,e;const a=e;let o,s=i.go(r);if(s?(o=new Sn,Object.assign(o.j,s.j),o.jr.push.apply(o.jr,s.jr),o.jd=s.jd,o.t=s.t):o=new Sn,a){if(n)if(o.t&&typeof o.t=="string"){const l=Object.assign(Ree(o.t,n),t);El(a,l,n)}else t&&El(a,t,n);o.t=a}return i.j[r]=o,o}};const st=(r,e,t,n,i)=>r.ta(e,t,n,i),Zt=(r,e,t,n,i)=>r.tr(e,t,n,i),vD=(r,e,t,n,i)=>r.ts(e,t,n,i),oe=(r,e,t,n,i)=>r.tt(e,t,n,i),Za="WORD",Iw="UWORD",M4="ASCIINUMERICAL",k4="ALPHANUMERICAL",Ed="LOCALHOST",Pw="TLD",Rw="UTLD",Em="SCHEME",_c="SLASH_SCHEME",OT="NUM",Ow="WS",jT="NL",Xh="OPENBRACE",Kh="CLOSEBRACE",Eg="OPENBRACKET",Lg="CLOSEBRACKET",Ig="OPENPAREN",Pg="CLOSEPAREN",Rg="OPENANGLEBRACKET",Og="CLOSEANGLEBRACKET",jg="FULLWIDTHLEFTPAREN",Ng="FULLWIDTHRIGHTPAREN",Bg="LEFTCORNERBRACKET",zg="RIGHTCORNERBRACKET",Fg="LEFTWHITECORNERBRACKET",Vg="RIGHTWHITECORNERBRACKET",$g="FULLWIDTHLESSTHAN",Hg="FULLWIDTHGREATERTHAN",Gg="AMPERSAND",Wg="APOSTROPHE",Ug="ASTERISK",Zo="AT",Yg="BACKSLASH",qg="BACKTICK",Xg="CARET",ts="COLON",NT="COMMA",Kg="DOLLAR",ia="DOT",Zg="EQUALS",BT="EXCLAMATION",Kn="HYPHEN",Zh="PERCENT",Jg="PIPE",Qg="PLUS",ey="POUND",Jh="QUERY",zT="QUOTE",D4="FULLWIDTHMIDDLEDOT",FT="SEMI",aa="SLASH",Qh="TILDE",ty="UNDERSCORE",E4="EMOJI",ry="SYM";var L4=Object.freeze({__proto__:null,ALPHANUMERICAL:k4,AMPERSAND:Gg,APOSTROPHE:Wg,ASCIINUMERICAL:M4,ASTERISK:Ug,AT:Zo,BACKSLASH:Yg,BACKTICK:qg,CARET:Xg,CLOSEANGLEBRACKET:Og,CLOSEBRACE:Kh,CLOSEBRACKET:Lg,CLOSEPAREN:Pg,COLON:ts,COMMA:NT,DOLLAR:Kg,DOT:ia,EMOJI:E4,EQUALS:Zg,EXCLAMATION:BT,FULLWIDTHGREATERTHAN:Hg,FULLWIDTHLEFTPAREN:jg,FULLWIDTHLESSTHAN:$g,FULLWIDTHMIDDLEDOT:D4,FULLWIDTHRIGHTPAREN:Ng,HYPHEN:Kn,LEFTCORNERBRACKET:Bg,LEFTWHITECORNERBRACKET:Fg,LOCALHOST:Ed,NL:jT,NUM:OT,OPENANGLEBRACKET:Rg,OPENBRACE:Xh,OPENBRACKET:Eg,OPENPAREN:Ig,PERCENT:Zh,PIPE:Jg,PLUS:Qg,POUND:ey,QUERY:Jh,QUOTE:zT,RIGHTCORNERBRACKET:zg,RIGHTWHITECORNERBRACKET:Vg,SCHEME:Em,SEMI:FT,SLASH:aa,SLASH_SCHEME:_c,SYM:ry,TILDE:Qh,TLD:Pw,UNDERSCORE:ty,UTLD:Rw,UWORD:Iw,WORD:Za,WS:Ow});const Wa=/[a-z]/,Nf=new RegExp("\\p{L}","u"),Q1=new RegExp("\\p{Emoji}","u"),Ua=/\d/,eb=/\s/,mD="\r",tb=`
|
||
`,Oee="️",jee="",rb="";let av=null,ov=null;function Nee(r=[]){const e={};Sn.groups=e;const t=new Sn;av==null&&(av=gD(Dee)),ov==null&&(ov=gD(Eee)),oe(t,"'",Wg),oe(t,"{",Xh),oe(t,"}",Kh),oe(t,"[",Eg),oe(t,"]",Lg),oe(t,"(",Ig),oe(t,")",Pg),oe(t,"<",Rg),oe(t,">",Og),oe(t,"(",jg),oe(t,")",Ng),oe(t,"「",Bg),oe(t,"」",zg),oe(t,"『",Fg),oe(t,"』",Vg),oe(t,"<",$g),oe(t,">",Hg),oe(t,"&",Gg),oe(t,"*",Ug),oe(t,"@",Zo),oe(t,"`",qg),oe(t,"^",Xg),oe(t,":",ts),oe(t,",",NT),oe(t,"$",Kg),oe(t,".",ia),oe(t,"=",Zg),oe(t,"!",BT),oe(t,"-",Kn),oe(t,"%",Zh),oe(t,"|",Jg),oe(t,"+",Qg),oe(t,"#",ey),oe(t,"?",Jh),oe(t,'"',zT),oe(t,"/",aa),oe(t,";",FT),oe(t,"~",Qh),oe(t,"_",ty),oe(t,"\\",Yg),oe(t,"・",D4);const n=Zt(t,Ua,OT,{[kw]:!0});Zt(n,Ua,n);const i=Zt(n,Wa,M4,{[qh]:!0}),a=Zt(n,Nf,k4,{[Th]:!0}),o=Zt(t,Wa,Za,{[Dw]:!0});Zt(o,Ua,i),Zt(o,Wa,o),Zt(i,Ua,i),Zt(i,Wa,i);const s=Zt(t,Nf,Iw,{[Ew]:!0});Zt(s,Wa),Zt(s,Ua,a),Zt(s,Nf,s),Zt(a,Ua,a),Zt(a,Wa),Zt(a,Nf,a);const l=oe(t,tb,jT,{[J1]:!0}),u=oe(t,mD,Ow,{[J1]:!0}),c=Zt(t,eb,Ow,{[J1]:!0});oe(t,rb,c),oe(u,tb,l),oe(u,rb,c),Zt(u,eb,c),oe(c,mD),oe(c,tb),Zt(c,eb,c),oe(c,rb,c);const f=Zt(t,Q1,E4,{[A4]:!0});oe(f,"#"),Zt(f,Q1,f),oe(f,Oee,f);const h=oe(f,jee);oe(h,"#"),Zt(h,Q1,f);const d=[[Wa,o],[Ua,i]],p=[[Wa,null],[Nf,s],[Ua,a]];for(let v=0;v<av.length;v++)jo(t,av[v],Pw,Za,d);for(let v=0;v<ov.length;v++)jo(t,ov[v],Rw,Iw,p);El(Pw,{tld:!0,ascii:!0},e),El(Rw,{utld:!0,alpha:!0},e),jo(t,"file",Em,Za,d),jo(t,"mailto",Em,Za,d),jo(t,"http",_c,Za,d),jo(t,"https",_c,Za,d),jo(t,"ftp",_c,Za,d),jo(t,"ftps",_c,Za,d),El(Em,{scheme:!0,ascii:!0},e),El(_c,{slashscheme:!0,ascii:!0},e),r=r.sort((v,m)=>v[0]>m[0]?1:-1);for(let v=0;v<r.length;v++){const m=r[v][0],y=r[v][1]?{[Lee]:!0}:{[Iee]:!0};m.indexOf("-")>=0?y[Lw]=!0:Wa.test(m)?Ua.test(m)?y[qh]=!0:y[Dw]=!0:y[kw]=!0,vD(t,m,m,y)}return vD(t,"localhost",Ed,{ascii:!0}),t.jd=new Sn(ry),{start:t,tokens:Object.assign({groups:e},L4)}}function I4(r,e){const t=Bee(e.replace(/[A-Z]/g,s=>s.toLowerCase())),n=t.length,i=[];let a=0,o=0;for(;o<n;){let s=r,l=null,u=0,c=null,f=-1,h=-1;for(;o<n&&(l=s.go(t[o]));)s=l,s.accepts()?(f=0,h=0,c=s):f>=0&&(f+=t[o].length,h++),u+=t[o].length,a+=t[o].length,o++;a-=f,o-=h,u-=f,i.push({t:c.t,v:e.slice(a-u,a),s:a-u,e:a})}return i}function Bee(r){const e=[],t=r.length;let n=0;for(;n<t;){let i=r.charCodeAt(n),a,o=i<55296||i>56319||n+1===t||(a=r.charCodeAt(n+1))<56320||a>57343?r[n]:r.slice(n,n+2);e.push(o),n+=o.length}return e}function jo(r,e,t,n,i){let a;const o=e.length;for(let s=0;s<o-1;s++){const l=e[s];r.j[l]?a=r.j[l]:(a=new Sn(n),a.jr=i.slice(),r.j[l]=a),r=a}return a=new Sn(t),a.jr=i.slice(),r.j[e[o-1]]=a,a}function gD(r){const e=[],t=[];let n=0,i="0123456789";for(;n<r.length;){let a=0;for(;i.indexOf(r[n+a])>=0;)a++;if(a>0){e.push(t.join(""));for(let o=parseInt(r.substring(n,n+a),10);o>0;o--)t.pop();n+=a}else t.push(r[n]),n++}return e}const Ld={defaultProtocol:"http",events:null,format:yD,formatHref:yD,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function VT(r,e=null){let t=Object.assign({},Ld);r&&(t=Object.assign(t,r instanceof VT?r.o:r));const n=t.ignoreTags,i=[];for(let a=0;a<n.length;a++)i.push(n[a].toUpperCase());this.o=t,e&&(this.defaultRender=e),this.ignoreTags=i}VT.prototype={o:Ld,ignoreTags:[],defaultRender(r){return r},check(r){return this.get("validate",r.toString(),r)},get(r,e,t){const n=e!=null;let i=this.o[r];return i&&(typeof i=="object"?(i=t.t in i?i[t.t]:Ld[r],typeof i=="function"&&n&&(i=i(e,t))):typeof i=="function"&&n&&(i=i(e,t.t,t)),i)},getObj(r,e,t){let n=this.o[r];return typeof n=="function"&&e!=null&&(n=n(e,t.t,t)),n},render(r){const e=r.render(this);return(this.get("render",null,r)||this.defaultRender)(e,r.t,r)}};function yD(r){return r}function P4(r,e){this.t="token",this.v=r,this.tk=e}P4.prototype={isLink:!1,toString(){return this.v},toHref(r){return this.toString()},toFormattedString(r){const e=this.toString(),t=r.get("truncate",e,this),n=r.get("format",e,this);return t&&n.length>t?n.substring(0,t)+"…":n},toFormattedHref(r){return r.get("formatHref",this.toHref(r.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(r=Ld.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(r),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(r){return{type:this.t,value:this.toFormattedString(r),isLink:this.isLink,href:this.toFormattedHref(r),start:this.startIndex(),end:this.endIndex()}},validate(r){return r.get("validate",this.toString(),this)},render(r){const e=this,t=this.toHref(r.get("defaultProtocol")),n=r.get("formatHref",t,this),i=r.get("tagName",t,e),a=this.toFormattedString(r),o={},s=r.get("className",t,e),l=r.get("target",t,e),u=r.get("rel",t,e),c=r.getObj("attributes",t,e),f=r.getObj("events",t,e);return o.href=n,s&&(o.class=s),l&&(o.target=l),u&&(o.rel=u),c&&Object.assign(o,c),{tagName:i,attributes:o,content:a,eventListeners:f}}};function A0(r,e){class t extends P4{constructor(i,a){super(i,a),this.t=r}}for(const n in e)t.prototype[n]=e[n];return t.t=r,t}const bD=A0("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),_D=A0("text"),zee=A0("nl"),sv=A0("url",{isLink:!0,toHref(r=Ld.defaultProtocol){return this.hasProtocol()?this.v:`${r}://${this.v}`},hasProtocol(){const r=this.tk;return r.length>=2&&r[0].t!==Ed&&r[1].t===ts}}),Gn=r=>new Sn(r);function Fee({groups:r}){const e=r.domain.concat([Gg,Ug,Zo,Yg,qg,Xg,Kg,Zg,Kn,OT,Zh,Jg,Qg,ey,aa,ry,Qh,ty]),t=[Wg,ts,NT,ia,BT,Zh,Jh,zT,FT,Rg,Og,Xh,Kh,Lg,Eg,Ig,Pg,jg,Ng,Bg,zg,Fg,Vg,$g,Hg],n=[Gg,Wg,Ug,Yg,qg,Xg,Kg,Zg,Kn,Xh,Kh,Zh,Jg,Qg,ey,Jh,aa,ry,Qh,ty],i=Gn(),a=oe(i,Qh);st(a,n,a),st(a,r.domain,a);const o=Gn(),s=Gn(),l=Gn();st(i,r.domain,o),st(i,r.scheme,s),st(i,r.slashscheme,l),st(o,n,a),st(o,r.domain,o);const u=oe(o,Zo);oe(a,Zo,u),oe(s,Zo,u),oe(l,Zo,u);const c=oe(a,ia);st(c,n,a),st(c,r.domain,a);const f=Gn();st(u,r.domain,f),st(f,r.domain,f);const h=oe(f,ia);st(h,r.domain,f);const d=Gn(bD);st(h,r.tld,d),st(h,r.utld,d),oe(u,Ed,d);const p=oe(f,Kn);oe(p,Kn,p),st(p,r.domain,f),st(d,r.domain,f),oe(d,ia,h),oe(d,Kn,p);const v=oe(d,ts);st(v,r.numeric,bD);const m=oe(o,Kn),g=oe(o,ia);oe(m,Kn,m),st(m,r.domain,o),st(g,n,a),st(g,r.domain,o);const y=Gn(sv);st(g,r.tld,y),st(g,r.utld,y),st(y,r.domain,o),st(y,n,a),oe(y,ia,g),oe(y,Kn,m),oe(y,Zo,u);const b=oe(y,ts),_=Gn(sv);st(b,r.numeric,_);const x=Gn(sv),w=Gn();st(x,e,x),st(x,t,w),st(w,e,x),st(w,t,w),oe(y,aa,x),oe(_,aa,x);const S=oe(s,ts),T=oe(l,ts),C=oe(T,aa),A=oe(C,aa);st(s,r.domain,o),oe(s,ia,g),oe(s,Kn,m),st(l,r.domain,o),oe(l,ia,g),oe(l,Kn,m),st(S,r.domain,x),oe(S,aa,x),oe(S,Jh,x),st(A,r.domain,x),st(A,e,x),oe(A,aa,x);const M=[[Xh,Kh],[Eg,Lg],[Ig,Pg],[Rg,Og],[jg,Ng],[Bg,zg],[Fg,Vg],[$g,Hg]];for(let D=0;D<M.length;D++){const[E,L]=M[D],I=oe(x,E);oe(w,E,I),oe(I,L,x);const R=Gn(sv);st(I,e,R);const P=Gn();st(I,t),st(R,e,R),st(R,t,P),st(P,e,R),st(P,t,P),oe(R,L,x),oe(P,L,x)}return oe(i,Ed,y),oe(i,jT,zee),{start:i,tokens:L4}}function Vee(r,e,t){let n=t.length,i=0,a=[],o=[];for(;i<n;){let s=r,l=null,u=null,c=0,f=null,h=-1;for(;i<n&&!(l=s.go(t[i].t));)o.push(t[i++]);for(;i<n&&(u=l||s.go(t[i].t));)l=null,s=u,s.accepts()?(h=0,f=s):h>=0&&h++,i++,c++;if(h<0)i-=c,i<n&&(o.push(t[i]),i++);else{o.length>0&&(a.push(nb(_D,e,o)),o=[]),i-=h,c-=h;const d=f.t,p=t.slice(i-c,i);a.push(nb(d,e,p))}}return o.length>0&&a.push(nb(_D,e,o)),a}function nb(r,e,t){const n=t[0].s,i=t[t.length-1].e,a=e.slice(n,i);return new r(a,t)}const $ee=typeof console<"u"&&console&&console.warn||(()=>{}),Hee="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ft={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Gee(){return Sn.groups={},Ft.scanner=null,Ft.parser=null,Ft.tokenQueue=[],Ft.pluginQueue=[],Ft.customSchemes=[],Ft.initialized=!1,Ft}function xD(r,e=!1){if(Ft.initialized&&$ee(`linkifyjs: already initialized - will not register custom scheme "${r}" ${Hee}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(r))throw new Error(`linkifyjs: incorrect scheme format.
|
||
1. Must only contain digits, lowercase ASCII letters or "-"
|
||
2. Cannot start or end with "-"
|
||
3. "-" cannot repeat`);Ft.customSchemes.push([r,e])}function Wee(){Ft.scanner=Nee(Ft.customSchemes);for(let r=0;r<Ft.tokenQueue.length;r++)Ft.tokenQueue[r][1]({scanner:Ft.scanner});Ft.parser=Fee(Ft.scanner.tokens);for(let r=0;r<Ft.pluginQueue.length;r++)Ft.pluginQueue[r][1]({scanner:Ft.scanner,parser:Ft.parser});return Ft.initialized=!0,Ft}function $T(r){return Ft.initialized||Wee(),Vee(Ft.parser.start,r,I4(Ft.scanner.start,r))}$T.scan=I4;function R4(r,e=null,t=null){if(e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const n=new VT(t),i=$T(r),a=[];for(let o=0;o<i.length;o++){const s=i[o];s.isLink&&(!e||s.t===e)&&n.check(s)&&a.push(s.toFormattedObject(n))}return a}const HT="[\0- -\u2029 ]",Uee=new RegExp(HT),Yee=new RegExp(`${HT}$`),qee=new RegExp(HT,"g");function Xee(r){return r.length===1?r[0].isLink:r.length===3&&r[1].isLink?["()","[]"].includes(r[0].value+r[2].value):!1}function Kee(r){return new Ut({key:new jt("autolink"),appendTransaction:(e,t,n)=>{const i=e.some(u=>u.docChanged)&&!t.doc.eq(n.doc),a=e.some(u=>u.getMeta("preventAutolink"));if(!i||a)return;const{tr:o}=n,s=gK(t.doc,[...e]);if(TK(s).forEach(({newRange:u})=>{const c=bK(n.doc,u,d=>d.isTextblock);let f,h;if(c.length>1)f=c[0],h=n.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ");else if(c.length){const d=n.doc.textBetween(u.from,u.to," "," ");if(!Yee.test(d))return;f=c[0],h=n.doc.textBetween(f.pos,u.to,void 0," ")}if(f&&h){const d=h.split(Uee).filter(Boolean);if(d.length<=0)return!1;const p=d[d.length-1],v=f.pos+h.lastIndexOf(p);if(!p)return!1;const m=$T(p).map(g=>g.toObject(r.defaultProtocol));if(!Xee(m))return!1;m.filter(g=>g.isLink).map(g=>({...g,from:v+g.start+1,to:v+g.end+1})).filter(g=>n.schema.marks.code?!n.doc.rangeHasMark(g.from,g.to,n.schema.marks.code):!0).filter(g=>r.validate(g.value)).filter(g=>r.shouldAutoLink(g.value)).forEach(g=>{DT(g.from,g.to,n.doc).some(y=>y.mark.type===r.type)||o.addMark(g.from,g.to,r.type.create({href:g.href}))})}}),!!o.steps.length)return o}})}function Zee(r){return new Ut({key:new jt("handleClickLink"),props:{handleClick:(e,t,n)=>{var i,a;if(n.button!==0||!e.editable)return!1;let o=n.target;const s=[];for(;o.nodeName!=="DIV";)s.push(o),o=o.parentNode;if(!s.find(h=>h.nodeName==="A"))return!1;const l=xK(e.state,r.type.name),u=n.target,c=(i=u==null?void 0:u.href)!==null&&i!==void 0?i:l.href,f=(a=u==null?void 0:u.target)!==null&&a!==void 0?a:l.target;return u&&c?(window.open(c,f),!0):!1}}})}function Jee(r){return new Ut({key:new jt("handlePasteLink"),props:{handlePaste:(e,t,n)=>{const{state:i}=e,{selection:a}=i,{empty:o}=a;if(o)return!1;let s="";n.content.forEach(u=>{s+=u.textContent});const l=R4(s,{defaultProtocol:r.defaultProtocol}).find(u=>u.isLink&&u.value===s);return!s||!l?!1:r.editor.commands.setMark(r.type,{href:l.href})}}})}function Gs(r,e){const t=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(n=>{const i=typeof n=="string"?n:n.scheme;i&&t.push(i)}),!r||r.replace(qee,"").match(new RegExp(`^(?:(?:${t.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const Qee=Da.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(r=>{if(typeof r=="string"){xD(r);return}xD(r.scheme,r.optionalSlashes)})},onDestroy(){Gee()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(r,e)=>!!Gs(r,e.protocols),validate:r=>!!r,shouldAutoLink:r=>!!r}},addAttributes(){return{href:{default:null,parseHTML(r){return r.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:r=>{const e=r.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!Gs(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:r}){return this.options.isAllowedUri(r.href,{defaultValidate:e=>!!Gs(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Lt(this.options.HTMLAttributes,r),0]:["a",Lt(this.options.HTMLAttributes,{...r,href:""}),0]},addCommands(){return{setLink:r=>({chain:e})=>{const{href:t}=r;return this.options.isAllowedUri(t,{defaultValidate:n=>!!Gs(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,r).setMeta("preventAutolink",!0).run():!1},toggleLink:r=>({chain:e})=>{const{href:t}=r;return this.options.isAllowedUri(t,{defaultValidate:n=>!!Gs(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,r,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:r})=>r().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[fu({find:r=>{const e=[];if(r){const{protocols:t,defaultProtocol:n}=this.options,i=R4(r).filter(a=>a.isLink&&this.options.isAllowedUri(a.value,{defaultValidate:o=>!!Gs(o,t),protocols:t,defaultProtocol:n}));i.length&&i.forEach(a=>e.push({text:a.value,data:{href:a.href},index:a.start}))}return e},type:this.type,getAttributes:r=>{var e;return{href:(e=r.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const r=[],{protocols:e,defaultProtocol:t}=this.options;return this.options.autolink&&r.push(Kee({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:n=>this.options.isAllowedUri(n,{defaultValidate:i=>!!Gs(i,e),protocols:e,defaultProtocol:t}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&r.push(Zee({type:this.type})),this.options.linkOnPaste&&r.push(Jee({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),r}});function O4(r){return!!(r===""||/^(https?:\/\/|mailto:|tel:|\/\/)[^\s]+$/i.test(r)||/^([./#][^\s]*)$/i.test(r)||/^[\w\-]([\w\-./#?=&%]*)$/i.test(r))}const ete={class:"p-2 flex min-w-72 items-center gap-2 bg-surface-white shadow-xl rounded-lg"},tte={class:"shrink-0 flex items-center gap-2"},rte=Ke({__name:"EditLink",props:{href:{}},emits:["updateHref","close"],setup(r,{emit:e}){const t=r,n=e,i=te(t.href),a=bm("input"),o=()=>{(i.value===""||O4(i.value))&&n("updateHref",i.value)};return zi(async()=>{var s;await Ca(),(s=a.value)!=null&&s.el&&(a.value.el.focus(),a.value.el.select())}),(s,l)=>(Y(),ae("div",ete,[Ie(hU,{ref_key:"input",ref:a,type:"text",class:"w-full",placeholder:"https://example.com",modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=u=>i.value=u),onKeydown:[Ac(o,["enter"]),l[1]||(l[1]=Ac(u=>s.$emit("close"),["esc"]))]},null,8,["modelValue"]),Z("div",tte,[Ie(Ci,{text:"Submit",placement:"top"},{default:_e(()=>[Ie(ui,{label:"Submit",onClick:o},{icon:_e(()=>[Ie(H(sU),{class:"size-4"})]),_:1})]),_:1}),Ie(Ci,{text:"Remove link",placement:"top"},{default:_e(()=>[Ie(ui,{label:"Remove link",onClick:l[2]||(l[2]=u=>s.$emit("updateHref",""))},{icon:_e(()=>[Ie(H(C0),{class:"size-4"})]),_:1})]),_:1})])]))}});function nte(r){return new Ut({key:new jt("handlePasteLink"),props:{handlePaste:(e,t,n)=>{const{state:i}=e,{selection:a}=i,{empty:o}=a;if(o)return!1;let s="";if(n.content.forEach(u=>{s+=u.textContent}),!s)return!1;let l=O4(s)?s:null;return l?r.editor.chain().setTextSelection({from:a.from,to:a.to}).setLink({href:l}).setTextSelection(a.to).command(({tr:u})=>(u.setStoredMarks([]),!0)).run():!1}}})}Qee.extend({addOptions(){var r;return{...(r=this.parent)==null?void 0:r.call(this),openOnClick:!1,autolink:!0,defaultProtocol:"https",linkOnPaste:!1}},addCommands(){var r;return{...(r=this.parent)==null?void 0:r.call(this),openLinkEditor:()=>({editor:e})=>{const{state:t}=e,{from:n,to:i}=t.selection,{doc:a}=t;let o,s,l=!1;if(n===i){const d=t.selection.$from,p=x0(d,this.type);if(p)o=p,s=a.resolve(p.from).marks().find(v=>v.type===this.type),e.chain().setTextSelection({from:p.from,to:p.to}).run(),l=!0;else return!1}else o={from:n,to:i},s=a.resolve(n).marks().find(d=>d.type===this.type);if(!o)return!1;const u=(s==null?void 0:s.attrs.href)||"",c=o.from,f=o.to,h=()=>{ite(u,e.view.dom).then(d=>{if(d===null)return;let p=e.chain().focus(null,{scrollIntoView:!1});if(d===""){p.setTextSelection({from:c,to:f}).unsetLink().command(({tr:g})=>(g.setStoredMarks([]),!0)).run();return}p=p.setTextSelection({from:c,to:f}).setLink({href:d}).setTextSelection(f).command(({tr:g})=>(g.setStoredMarks([]),!0));const v=f,m=v<a.content.size?a.textBetween(v,v+1):null;(m===null||m!==" ")&&(p=p.insertContent(" ")),p.run()}).catch(()=>{})};return l?requestAnimationFrame(h):h(),!0}}},addKeyboardShortcuts(){return{"Mod-k":()=>this.editor.commands.openLinkEditor()}},addProseMirrorPlugins(){var e;let r=((e=this.parent)==null?void 0:e.call(this))||[];return r.push(nte({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),r.push(ate({editor:this.editor,type:this.type})),r}});function ite(r,e){return new Promise((t,n)=>{const i=document.createElement("div");document.body.appendChild(i);let a;const o=window.getSelection();if(o&&o.rangeCount>0){const d=o.getRangeAt(0),p=d.getBoundingClientRect(),v=d.collapsed;a={getBoundingClientRect:()=>({width:0,height:p.height,top:p.top,right:v?p.left:p.right,bottom:p.bottom,left:p.left,x:p.left,y:p.top,toJSON:()=>{}})}}else a={getBoundingClientRect:()=>e.getBoundingClientRect()};let s=null,l=null,u=!1,c=!1;const f=(d,p)=>{c||(c=!0,d==="resolve"?t(p):n(p))},h=()=>{u||(u=!0,f("reject","Link editing cancelled or destroyed"),requestAnimationFrame(()=>{l==null||l.destroy(),s==null||s.unmount(),i==null||i.remove(),s=null,l=null}))};if(s=w3({render(){return so(rte,{href:r,onClose:()=>{f("reject","Link editing cancelled"),h()},onUpdateHref:d=>{f("resolve",d),h()}})}}),s.mount(i),l=df(e,{getReferenceClientRect:()=>a.getBoundingClientRect(),content:i,trigger:"manual",interactive:!0,appendTo:document.body,placement:"top",arrow:!1,theme:"link-editor",maxWidth:"none",onHidden(){h()},hideOnClick:!0,interactiveDebounce:75}),!l){i.remove(),f("reject","Failed to initialize link editor tooltip");return}l.show()})}function ate(r){return new Ut({key:new jt("clearLinkMarkOnBoundary"),appendTransaction:(e,t,n)=>{if(!r.editor.isEditable)return null;const{tr:i,doc:a,selection:o,storedMarks:s}=n,{$from:l,empty:u}=o;if(!u||!s||s.length===0)return null;const c=r.type;return!s.some(p=>p.type===c)||l.marks().some(p=>p.type===c)?null:i.setStoredMarks([])}})}const ote=r=>ir({find:/--$/,replace:r??"—"}),ste=r=>ir({find:/\.\.\.$/,replace:r??"…"}),lte=r=>ir({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:r??"“"}),ute=r=>ir({find:/"$/,replace:r??"”"}),cte=r=>ir({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:r??"‘"}),fte=r=>ir({find:/'$/,replace:r??"’"}),hte=r=>ir({find:/<-$/,replace:r??"←"}),dte=r=>ir({find:/->$/,replace:r??"→"}),pte=r=>ir({find:/\(c\)$/,replace:r??"©"}),vte=r=>ir({find:/\(tm\)$/,replace:r??"™"}),mte=r=>ir({find:/\(sm\)$/,replace:r??"℠"}),gte=r=>ir({find:/\(r\)$/,replace:r??"®"}),yte=r=>ir({find:/(?:^|\s)(1\/2)\s$/,replace:r??"½"}),bte=r=>ir({find:/\+\/-$/,replace:r??"±"}),_te=r=>ir({find:/!=$/,replace:r??"≠"}),xte=r=>ir({find:/<<$/,replace:r??"«"}),wte=r=>ir({find:/>>$/,replace:r??"»"}),Ste=r=>ir({find:/\d+\s?([*x])\s?\d+$/,replace:r??"×"}),Tte=r=>ir({find:/\^2$/,replace:r??"²"}),Cte=r=>ir({find:/\^3$/,replace:r??"³"}),Ate=r=>ir({find:/(?:^|\s)(1\/4)\s$/,replace:r??"¼"}),Mte=r=>ir({find:/(?:^|\s)(3\/4)\s$/,replace:r??"¾"});Kt.create({name:"typography",addOptions(){return{closeDoubleQuote:"”",closeSingleQuote:"’",copyright:"©",ellipsis:"…",emDash:"—",laquo:"«",leftArrow:"←",multiplication:"×",notEqual:"≠",oneHalf:"½",oneQuarter:"¼",openDoubleQuote:"“",openSingleQuote:"‘",plusMinus:"±",raquo:"»",registeredTrademark:"®",rightArrow:"→",servicemark:"℠",superscriptThree:"³",superscriptTwo:"²",threeQuarters:"¾",trademark:"™"}},addInputRules(){const r=[];return this.options.emDash!==!1&&r.push(ote(this.options.emDash)),this.options.ellipsis!==!1&&r.push(ste(this.options.ellipsis)),this.options.openDoubleQuote!==!1&&r.push(lte(this.options.openDoubleQuote)),this.options.closeDoubleQuote!==!1&&r.push(ute(this.options.closeDoubleQuote)),this.options.openSingleQuote!==!1&&r.push(cte(this.options.openSingleQuote)),this.options.closeSingleQuote!==!1&&r.push(fte(this.options.closeSingleQuote)),this.options.leftArrow!==!1&&r.push(hte(this.options.leftArrow)),this.options.rightArrow!==!1&&r.push(dte(this.options.rightArrow)),this.options.copyright!==!1&&r.push(pte(this.options.copyright)),this.options.trademark!==!1&&r.push(vte(this.options.trademark)),this.options.servicemark!==!1&&r.push(mte(this.options.servicemark)),this.options.registeredTrademark!==!1&&r.push(gte(this.options.registeredTrademark)),this.options.oneHalf!==!1&&r.push(yte(this.options.oneHalf)),this.options.plusMinus!==!1&&r.push(bte(this.options.plusMinus)),this.options.notEqual!==!1&&r.push(_te(this.options.notEqual)),this.options.laquo!==!1&&r.push(xte(this.options.laquo)),this.options.raquo!==!1&&r.push(wte(this.options.raquo)),this.options.multiplication!==!1&&r.push(Ste(this.options.multiplication)),this.options.superscriptTwo!==!1&&r.push(Tte(this.options.superscriptTwo)),this.options.superscriptThree!==!1&&r.push(Cte(this.options.superscriptThree)),this.options.oneQuarter!==!1&&r.push(Ate(this.options.oneQuarter)),this.options.threeQuarters!==!1&&r.push(Mte(this.options.threeQuarters)),r}});const kte=r=>{if(!r.children.length)return;const e=r.querySelectorAll("span");e&&e.forEach(t=>{var n,i;const a=t.getAttribute("style"),o=(i=(n=t.parentElement)===null||n===void 0?void 0:n.closest("span"))===null||i===void 0?void 0:i.getAttribute("style");t.setAttribute("style",`${o};${a}`)})};Da.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:r=>r.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&kte(r),{}):!1}]},renderHTML({HTMLAttributes:r}){return["span",Lt(this.options.HTMLAttributes,r),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:r})=>{const{selection:e}=r;return r.doc.nodesBetween(e.from,e.to,(t,n)=>{if(t.isTextblock)return!0;t.marks.filter(i=>i.type===this.type).some(i=>Object.values(i.attrs).some(a=>!!a))||r.removeMark(n,n+t.nodeSize,this.type)}),!0}}}});const Dte=/^\s*(\[([( |x])?\])\s$/;ar.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:r=>{const e=r.getAttribute("data-checked");return e===""||e==="true"},renderHTML:r=>({"data-checked":r.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:r,HTMLAttributes:e}){return["li",Lt(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:r.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const r={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...r,Tab:()=>this.editor.commands.sinkListItem(this.name)}:r},addNodeView(){return({node:r,HTMLAttributes:e,getPos:t,editor:n})=>{const i=document.createElement("li"),a=document.createElement("label"),o=document.createElement("span"),s=document.createElement("input"),l=document.createElement("div"),u=()=>{var c,f;s.ariaLabel=((f=(c=this.options.a11y)===null||c===void 0?void 0:c.checkboxLabel)===null||f===void 0?void 0:f.call(c,r,s.checked))||`Task item checkbox for ${r.textContent||"empty task item"}`};return u(),a.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",c=>c.preventDefault()),s.addEventListener("change",c=>{if(!n.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}const{checked:f}=c.target;n.isEditable&&typeof t=="function"&&n.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:h})=>{const d=t();if(typeof d!="number")return!1;const p=h.doc.nodeAt(d);return h.setNodeMarkup(d,void 0,{...p==null?void 0:p.attrs,checked:f}),!0}).run(),!n.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(r,f)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,f])=>{i.setAttribute(c,f)}),i.dataset.checked=r.attrs.checked,s.checked=r.attrs.checked,a.append(s,o),i.append(a,l),Object.entries(e).forEach(([c,f])=>{i.setAttribute(c,f)}),{dom:i,contentDOM:l,update:c=>c.type!==this.type?!1:(i.dataset.checked=c.attrs.checked,s.checked=c.attrs.checked,u(),!0)}}},addInputRules(){return[Kc({find:Dte,type:this.type,getAttributes:r=>({checked:r[r.length-1]==="x"})})]}});ar.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:r}){return["ul",Lt(this.options.HTMLAttributes,r,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:r})=>r.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});const j4={black:"#000000",red:"#dc2626",blue:"#1579D0",green:"#16a34a",yellow:"#ca8a04",orange:"#ea580c",purple:"#9333ea",pink:"#db2777",gray:"#6b7280",indigo:"#4f46e5",teal:"#0d9488",cyan:"#06b6d4"},N4={red:"#fecaca",blue:"#bfdbfe",green:"#bbf7d0",yellow:"#fef08a",orange:"#fed7aa",purple:"#e9d5ff",pink:"#fbcfe8",gray:"#e5e7eb",indigo:"#c7d2fe",teal:"#99f6e4",cyan:"#a5f3fc"},B4={"#1F272E":"gray","#ca8a04":"yellow","#ea580c":"orange","#dc2626":"red","#16a34a":"green","#1579D0":"blue","#9333ea":"purple","#db2777":"pink"},z4={"#fef9c3":"yellow","#ffedd5":"orange","#fee2e2":"red","#dcfce7":"green","#D3E9FC":"blue","#f3e8ff":"purple","#fce7f3":"pink"};function jw(r,e,t,n){if(n&&r.startsWith("#")&&n[r])return n[r];let i=0,a=0,o=0;if(r.startsWith("#")){const u=r.substring(1);u.length===6&&(i=parseInt(u.substring(0,2),16),a=parseInt(u.substring(2,4),16),o=parseInt(u.substring(4,6),16))}else if(r.startsWith("rgb")){const u=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.exec(r);u&&(i=parseInt(u[1],10),a=parseInt(u[2],10),o=parseInt(u[3],10))}if(isNaN(i)||isNaN(a)||isNaN(o))return null;let s=null,l=1/0;for(const u of e){const c=t[u];if(!c)continue;const f=c.startsWith("#")?c.substring(1):c;if(f.length!==6)continue;const h=parseInt(f.substring(0,2),16),d=parseInt(f.substring(2,4),16),p=parseInt(f.substring(4,6),16),v=Math.sqrt(Math.pow(i-h,2)+Math.pow(a-d,2)+Math.pow(o-p,2));v<l&&(l=v,s=u)}return s}function F4(r,e,t=j4,n=B4,i="color"){const a=Object.keys(t),o=new RegExp(`${i}:\\s*(#[0-9a-f]{6})`,"i").exec(r);if(o&&o[1]){const l=jw(o[1],a,t,n);if(l&&e.includes(l))return l==="gray"?null:l}const s=new RegExp(`${i}:\\s*(rgb\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*\\))`,"i").exec(r);if(s&&s[1]){const l=jw(s[1],a,t,n);if(l&&e.includes(l))return l==="gray"?null:l}return null}function Ete(r,e){return F4(r,e,j4,B4,"color")}function Lte(r,e){return F4(r,e,N4,z4,"background-color")}Kt.create({name:"namedColor",addOptions(){return{types:["textStyle"],colors:["red","blue","green","yellow","orange","purple","pink","gray","teal","cyan"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:r=>{const e=r.getAttribute("style");if(e){const t=e.match(/color:\s*var\(--prose-color-(\w+)\)/);if(t&&this.options.colors.includes(t[1]))return t[1];const n=Ete(e,this.options.colors);if(n)return n}return null},renderHTML:r=>!r.color||!this.options.colors.includes(r.color)?{}:{style:`color: var(--prose-color-${r.color})`}}}}]},addCommands(){return{setColorByName:r=>({chain:e,state:t,editor:n})=>{if(!this.options.colors.includes(r))return console.warn(`Color "${r}" is not in the allowed colors list`),!1;const{to:i,empty:a}=t.selection;let o=e().setMark("textStyle",{color:r});return a||(o=o.setTextSelection(i).command(({tr:s})=>(s.setStoredMarks([]),!0))),o.focus().run()},unsetColor:()=>({chain:r})=>r().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}});Da.create({name:"namedHighlight",addOptions(){return{HTMLAttributes:{},multicolor:!0,colors:["yellow","blue","green","red","orange","purple","pink","gray","teal","cyan"]}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:r=>{const e=r.getAttribute("style");if(e){const n=e.match(/background-color:\s*var\(--prose-highlight-(\w+)\)/);if(n&&this.options.colors.includes(n[1]))return n[1]}const t=r.getAttribute("data-color");if(t){const n=jw(t,this.options.colors,N4,z4);if(n)return n}if(e){const n=Lte(e,this.options.colors);if(n)return n}return null},renderHTML:r=>!r.color||!this.options.colors.includes(r.color)?{}:{style:`background-color: var(--prose-highlight-${r.color})`}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:r}){return["mark",Lt(this.options.HTMLAttributes,r),0]},addCommands(){return{setHighlightByName:r=>({chain:e,commands:t,editor:n,state:i})=>{if(!this.options.colors.includes(r))return console.warn(`Highlight color "${r}" is not in the allowed colors list`),!1;const{from:a,to:o,empty:s}=i.selection;let l=e();return this.options.multicolor?l=l.setMark(this.name,{color:r}):l=l.setMark(this.name),s||(l=l.setTextSelection(o).command(({tr:u})=>(u.setStoredMarks([]),!0))),l.focus().run()},toggleHighlightByName:r=>({chain:e,commands:t,editor:n,state:i})=>{if(!this.options.colors.includes(r))return console.warn(`Highlight color "${r}" is not in the allowed colors list`),!1;const{to:a,empty:o}=i.selection,s=this.options.multicolor?{color:r}:void 0,l=n.isActive(this.name,s);let u=e().toggleMark(this.name,s);return!o&&!l&&(u=u.setTextSelection(a).command(({tr:c})=>(c.setStoredMarks([]),!0))),u.focus().run()},unsetHighlight:()=>({commands:r})=>r.unsetMark(this.name)}}});function Ite(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function V4(r){return r instanceof Map?r.clear=r.delete=r.set=function(){throw new Error("map is read-only")}:r instanceof Set&&(r.add=r.clear=r.delete=function(){throw new Error("set is read-only")}),Object.freeze(r),Object.getOwnPropertyNames(r).forEach(e=>{const t=r[e],n=typeof t;(n==="object"||n==="function")&&!Object.isFrozen(t)&&V4(t)}),r}class wD{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function $4(r){return r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function as(r,...e){const t=Object.create(null);for(const n in r)t[n]=r[n];return e.forEach(function(n){for(const i in n)t[i]=n[i]}),t}const Pte="</span>",SD=r=>!!r.scope,Rte=(r,{prefix:e})=>{if(r.startsWith("language:"))return r.replace("language:","language-");if(r.includes(".")){const t=r.split(".");return[`${e}${t.shift()}`,...t.map((n,i)=>`${n}${"_".repeat(i+1)}`)].join(" ")}return`${e}${r}`};class Ote{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=$4(e)}openNode(e){if(!SD(e))return;const t=Rte(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){SD(e)&&(this.buffer+=Pte)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const TD=(r={})=>{const e={children:[]};return Object.assign(e,r),e};class GT{constructor(){this.rootNode=TD(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=TD({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t=="string"?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(n=>this._walk(e,n)),e.closeNode(t)),e}static _collapse(e){typeof e!="string"&&e.children&&(e.children.every(t=>typeof t=="string")?e.children=[e.children.join("")]:e.children.forEach(t=>{GT._collapse(t)}))}}class jte extends GT{constructor(e){super(),this.options=e}addText(e){e!==""&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new Ote(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Id(r){return r?typeof r=="string"?r:r.source:null}function H4(r){return Au("(?=",r,")")}function Nte(r){return Au("(?:",r,")*")}function Bte(r){return Au("(?:",r,")?")}function Au(...r){return r.map(t=>Id(t)).join("")}function zte(r){const e=r[r.length-1];return typeof e=="object"&&e.constructor===Object?(r.splice(r.length-1,1),e):{}}function WT(...r){return"("+(zte(r).capture?"":"?:")+r.map(n=>Id(n)).join("|")+")"}function G4(r){return new RegExp(r.toString()+"|").exec("").length-1}function Fte(r,e){const t=r&&r.exec(e);return t&&t.index===0}const Vte=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function UT(r,{joinWith:e}){let t=0;return r.map(n=>{t+=1;const i=t;let a=Id(n),o="";for(;a.length>0;){const s=Vte.exec(a);if(!s){o+=a;break}o+=a.substring(0,s.index),a=a.substring(s.index+s[0].length),s[0][0]==="\\"&&s[1]?o+="\\"+String(Number(s[1])+i):(o+=s[0],s[0]==="("&&t++)}return o}).map(n=>`(${n})`).join(e)}const $te=/\b\B/,W4="[a-zA-Z]\\w*",YT="[a-zA-Z_]\\w*",U4="\\b\\d+(\\.\\d+)?",Y4="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",q4="\\b(0b[01]+)",Hte="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Gte=(r={})=>{const e=/^#![ ]*\//;return r.binary&&(r.begin=Au(e,/.*\b/,r.binary,/\b.*/)),as({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(t,n)=>{t.index!==0&&n.ignoreMatch()}},r)},Pd={begin:"\\\\[\\s\\S]",relevance:0},Wte={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Pd]},Ute={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Pd]},Yte={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},M0=function(r,e,t={}){const n=as({scope:"comment",begin:r,end:e,contains:[]},t);n.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=WT("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return n.contains.push({begin:Au(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),n},qte=M0("//","$"),Xte=M0("/\\*","\\*/"),Kte=M0("#","$"),Zte={scope:"number",begin:U4,relevance:0},Jte={scope:"number",begin:Y4,relevance:0},Qte={scope:"number",begin:q4,relevance:0},ere={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Pd,{begin:/\[/,end:/\]/,relevance:0,contains:[Pd]}]},tre={scope:"title",begin:W4,relevance:0},rre={scope:"title",begin:YT,relevance:0},nre={begin:"\\.\\s*"+YT,relevance:0},ire=function(r){return Object.assign(r,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})};var lv=Object.freeze({__proto__:null,APOS_STRING_MODE:Wte,BACKSLASH_ESCAPE:Pd,BINARY_NUMBER_MODE:Qte,BINARY_NUMBER_RE:q4,COMMENT:M0,C_BLOCK_COMMENT_MODE:Xte,C_LINE_COMMENT_MODE:qte,C_NUMBER_MODE:Jte,C_NUMBER_RE:Y4,END_SAME_AS_BEGIN:ire,HASH_COMMENT_MODE:Kte,IDENT_RE:W4,MATCH_NOTHING_RE:$te,METHOD_GUARD:nre,NUMBER_MODE:Zte,NUMBER_RE:U4,PHRASAL_WORDS_MODE:Yte,QUOTE_STRING_MODE:Ute,REGEXP_MODE:ere,RE_STARTERS_RE:Hte,SHEBANG:Gte,TITLE_MODE:tre,UNDERSCORE_IDENT_RE:YT,UNDERSCORE_TITLE_MODE:rre});function are(r,e){r.input[r.index-1]==="."&&e.ignoreMatch()}function ore(r,e){r.className!==void 0&&(r.scope=r.className,delete r.className)}function sre(r,e){e&&r.beginKeywords&&(r.begin="\\b("+r.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",r.__beforeBegin=are,r.keywords=r.keywords||r.beginKeywords,delete r.beginKeywords,r.relevance===void 0&&(r.relevance=0))}function lre(r,e){Array.isArray(r.illegal)&&(r.illegal=WT(...r.illegal))}function ure(r,e){if(r.match){if(r.begin||r.end)throw new Error("begin & end are not supported with match");r.begin=r.match,delete r.match}}function cre(r,e){r.relevance===void 0&&(r.relevance=1)}const fre=(r,e)=>{if(!r.beforeMatch)return;if(r.starts)throw new Error("beforeMatch cannot be used with starts");const t=Object.assign({},r);Object.keys(r).forEach(n=>{delete r[n]}),r.keywords=t.keywords,r.begin=Au(t.beforeMatch,H4(t.begin)),r.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},r.relevance=0,delete t.beforeMatch},hre=["of","and","for","in","not","or","if","then","parent","list","value"],dre="keyword";function X4(r,e,t=dre){const n=Object.create(null);return typeof r=="string"?i(t,r.split(" ")):Array.isArray(r)?i(t,r):Object.keys(r).forEach(function(a){Object.assign(n,X4(r[a],e,a))}),n;function i(a,o){e&&(o=o.map(s=>s.toLowerCase())),o.forEach(function(s){const l=s.split("|");n[l[0]]=[a,pre(l[0],l[1])]})}}function pre(r,e){return e?Number(e):vre(r)?0:1}function vre(r){return hre.includes(r.toLowerCase())}const CD={},Xl=r=>{console.error(r)},AD=(r,...e)=>{console.log(`WARN: ${r}`,...e)},Uu=(r,e)=>{CD[`${r}/${e}`]||(console.log(`Deprecated as of ${r}. ${e}`),CD[`${r}/${e}`]=!0)},ny=new Error;function K4(r,e,{key:t}){let n=0;const i=r[t],a={},o={};for(let s=1;s<=e.length;s++)o[s+n]=i[s],a[s+n]=!0,n+=G4(e[s-1]);r[t]=o,r[t]._emit=a,r[t]._multi=!0}function mre(r){if(Array.isArray(r.begin)){if(r.skip||r.excludeBegin||r.returnBegin)throw Xl("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ny;if(typeof r.beginScope!="object"||r.beginScope===null)throw Xl("beginScope must be object"),ny;K4(r,r.begin,{key:"beginScope"}),r.begin=UT(r.begin,{joinWith:""})}}function gre(r){if(Array.isArray(r.end)){if(r.skip||r.excludeEnd||r.returnEnd)throw Xl("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ny;if(typeof r.endScope!="object"||r.endScope===null)throw Xl("endScope must be object"),ny;K4(r,r.end,{key:"endScope"}),r.end=UT(r.end,{joinWith:""})}}function yre(r){r.scope&&typeof r.scope=="object"&&r.scope!==null&&(r.beginScope=r.scope,delete r.scope)}function bre(r){yre(r),typeof r.beginScope=="string"&&(r.beginScope={_wrap:r.beginScope}),typeof r.endScope=="string"&&(r.endScope={_wrap:r.endScope}),mre(r),gre(r)}function _re(r){function e(o,s){return new RegExp(Id(o),"m"+(r.case_insensitive?"i":"")+(r.unicodeRegex?"u":"")+(s?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(s,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,s]),this.matchAt+=G4(s)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const s=this.regexes.map(l=>l[1]);this.matcherRe=e(UT(s,{joinWith:"|"}),!0),this.lastIndex=0}exec(s){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(s);if(!l)return null;const u=l.findIndex((f,h)=>h>0&&f!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class n{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(s){if(this.multiRegexes[s])return this.multiRegexes[s];const l=new t;return this.rules.slice(s).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[s]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(s,l){this.rules.push([s,l]),l.type==="begin"&&this.count++}exec(s){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(s);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(s)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function i(o){const s=new n;return o.contains.forEach(l=>s.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd&&s.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&s.addRule(o.illegal,{type:"illegal"}),s}function a(o,s){const l=o;if(o.isCompiled)return l;[ore,ure,bre,fre].forEach(c=>c(o,s)),r.compilerExtensions.forEach(c=>c(o,s)),o.__beforeBegin=null,[sre,lre,cre].forEach(c=>c(o,s)),o.isCompiled=!0;let u=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),u=o.keywords.$pattern,delete o.keywords.$pattern),u=u||/\w+/,o.keywords&&(o.keywords=X4(o.keywords,r.case_insensitive)),l.keywordPatternRe=e(u,!0),s&&(o.begin||(o.begin=/\B|\b/),l.beginRe=e(l.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(l.endRe=e(l.end)),l.terminatorEnd=Id(l.end)||"",o.endsWithParent&&s.terminatorEnd&&(l.terminatorEnd+=(o.end?"|":"")+s.terminatorEnd)),o.illegal&&(l.illegalRe=e(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(c){return xre(c==="self"?o:c)})),o.contains.forEach(function(c){a(c,l)}),o.starts&&a(o.starts,s),l.matcher=i(l),l}if(r.compilerExtensions||(r.compilerExtensions=[]),r.contains&&r.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return r.classNameAliases=as(r.classNameAliases||{}),a(r)}function Z4(r){return r?r.endsWithParent||Z4(r.starts):!1}function xre(r){return r.variants&&!r.cachedVariants&&(r.cachedVariants=r.variants.map(function(e){return as(r,{variants:null},e)})),r.cachedVariants?r.cachedVariants:Z4(r)?as(r,{starts:r.starts?as(r.starts):null}):Object.isFrozen(r)?as(r):r}var wre="11.10.0";class Sre extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const ib=$4,MD=as,kD=Symbol("nomatch"),Tre=7,J4=function(r){const e=Object.create(null),t=Object.create(null),n=[];let i=!0;const a="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let s={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:jte};function l(P){return s.noHighlightRe.test(P)}function u(P){let O=P.className+" ";O+=P.parentNode?P.parentNode.className:"";const j=s.languageDetectRe.exec(O);if(j){const F=C(j[1]);return F||(AD(a.replace("{}",j[1])),AD("Falling back to no-highlight mode for this block.",P)),F?j[1]:"no-highlight"}return O.split(/\s+/).find(F=>l(F)||C(F))}function c(P,O,j){let F="",N="";typeof O=="object"?(F=P,j=O.ignoreIllegals,N=O.language):(Uu("10.7.0","highlight(lang, code, ...args) has been deprecated."),Uu("10.7.0",`Please use highlight(code, options) instead.
|
||
https://github.com/highlightjs/highlight.js/issues/2277`),N=P,F=O),j===void 0&&(j=!0);const B={code:F,language:N};I("before:highlight",B);const $=B.result?B.result:f(B.language,B.code,j);return $.code=B.code,I("after:highlight",$),$}function f(P,O,j,F){const N=Object.create(null);function B(pe,De){return pe.keywords[De]}function $(){if(!xe.keywords){at.addText(ht);return}let pe=0;xe.keywordPatternRe.lastIndex=0;let De=xe.keywordPatternRe.exec(ht),tt="";for(;De;){tt+=ht.substring(pe,De.index);const mt=he.case_insensitive?De[0].toLowerCase():De[0],or=B(xe,mt);if(or){const[$r,Io]=or;if(at.addText(tt),tt="",N[mt]=(N[mt]||0)+1,N[mt]<=Tre&&(fr+=Io),$r.startsWith("_"))tt+=De[0];else{const X=he.classNameAliases[$r]||$r;we(De[0],X)}}else tt+=De[0];pe=xe.keywordPatternRe.lastIndex,De=xe.keywordPatternRe.exec(ht)}tt+=ht.substring(pe),at.addText(tt)}function J(){if(ht==="")return;let pe=null;if(typeof xe.subLanguage=="string"){if(!e[xe.subLanguage]){at.addText(ht);return}pe=f(xe.subLanguage,ht,!0,rt[xe.subLanguage]),rt[xe.subLanguage]=pe._top}else pe=d(ht,xe.subLanguage.length?xe.subLanguage:null);xe.relevance>0&&(fr+=pe.relevance),at.__addSublanguage(pe._emitter,pe.language)}function U(){xe.subLanguage!=null?J():$(),ht=""}function we(pe,De){pe!==""&&(at.startScope(De),at.addText(pe),at.endScope())}function Ye(pe,De){let tt=1;const mt=De.length-1;for(;tt<=mt;){if(!pe._emit[tt]){tt++;continue}const or=he.classNameAliases[pe[tt]]||pe[tt],$r=De[tt];or?we($r,or):(ht=$r,$(),ht=""),tt++}}function ge(pe,De){return pe.scope&&typeof pe.scope=="string"&&at.openNode(he.classNameAliases[pe.scope]||pe.scope),pe.beginScope&&(pe.beginScope._wrap?(we(ht,he.classNameAliases[pe.beginScope._wrap]||pe.beginScope._wrap),ht=""):pe.beginScope._multi&&(Ye(pe.beginScope,De),ht="")),xe=Object.create(pe,{parent:{value:xe}}),xe}function le(pe,De,tt){let mt=Fte(pe.endRe,tt);if(mt){if(pe["on:end"]){const or=new wD(pe);pe["on:end"](De,or),or.isMatchIgnored&&(mt=!1)}if(mt){for(;pe.endsParent&&pe.parent;)pe=pe.parent;return pe}}if(pe.endsWithParent)return le(pe.parent,De,tt)}function be(pe){return xe.matcher.regexIndex===0?(ht+=pe[0],1):(tn=!0,0)}function re(pe){const De=pe[0],tt=pe.rule,mt=new wD(tt),or=[tt.__beforeBegin,tt["on:begin"]];for(const $r of or)if($r&&($r(pe,mt),mt.isMatchIgnored))return be(De);return tt.skip?ht+=De:(tt.excludeBegin&&(ht+=De),U(),!tt.returnBegin&&!tt.excludeBegin&&(ht=De)),ge(tt,pe),tt.returnBegin?0:De.length}function G(pe){const De=pe[0],tt=O.substring(pe.index),mt=le(xe,pe,tt);if(!mt)return kD;const or=xe;xe.endScope&&xe.endScope._wrap?(U(),we(De,xe.endScope._wrap)):xe.endScope&&xe.endScope._multi?(U(),Ye(xe.endScope,pe)):or.skip?ht+=De:(or.returnEnd||or.excludeEnd||(ht+=De),U(),or.excludeEnd&&(ht=De));do xe.scope&&at.closeNode(),!xe.skip&&!xe.subLanguage&&(fr+=xe.relevance),xe=xe.parent;while(xe!==mt.parent);return mt.starts&&ge(mt.starts,pe),or.returnEnd?0:De.length}function ee(){const pe=[];for(let De=xe;De!==he;De=De.parent)De.scope&&pe.unshift(De.scope);pe.forEach(De=>at.openNode(De))}let Q={};function me(pe,De){const tt=De&&De[0];if(ht+=pe,tt==null)return U(),0;if(Q.type==="begin"&&De.type==="end"&&Q.index===De.index&&tt===""){if(ht+=O.slice(De.index,De.index+1),!i){const mt=new Error(`0 width match regex (${P})`);throw mt.languageName=P,mt.badRule=Q.rule,mt}return 1}if(Q=De,De.type==="begin")return re(De);if(De.type==="illegal"&&!j){const mt=new Error('Illegal lexeme "'+tt+'" for mode "'+(xe.scope||"<unnamed>")+'"');throw mt.mode=xe,mt}else if(De.type==="end"){const mt=G(De);if(mt!==kD)return mt}if(De.type==="illegal"&&tt==="")return 1;if(en>1e5&&en>De.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ht+=tt,tt.length}const he=C(P);if(!he)throw Xl(a.replace("{}",P)),new Error('Unknown language: "'+P+'"');const Se=_re(he);let Fe="",xe=F||Se;const rt={},at=new s.__emitter(s);ee();let ht="",fr=0,yr=0,en=0,tn=!1;try{if(he.__emitTokens)he.__emitTokens(O,at);else{for(xe.matcher.considerAll();;){en++,tn?tn=!1:xe.matcher.considerAll(),xe.matcher.lastIndex=yr;const pe=xe.matcher.exec(O);if(!pe)break;const De=O.substring(yr,pe.index),tt=me(De,pe);yr=pe.index+tt}me(O.substring(yr))}return at.finalize(),Fe=at.toHTML(),{language:P,value:Fe,relevance:fr,illegal:!1,_emitter:at,_top:xe}}catch(pe){if(pe.message&&pe.message.includes("Illegal"))return{language:P,value:ib(O),illegal:!0,relevance:0,_illegalBy:{message:pe.message,index:yr,context:O.slice(yr-100,yr+100),mode:pe.mode,resultSoFar:Fe},_emitter:at};if(i)return{language:P,value:ib(O),illegal:!1,relevance:0,errorRaised:pe,_emitter:at,_top:xe};throw pe}}function h(P){const O={value:ib(P),illegal:!1,relevance:0,_top:o,_emitter:new s.__emitter(s)};return O._emitter.addText(P),O}function d(P,O){O=O||s.languages||Object.keys(e);const j=h(P),F=O.filter(C).filter(M).map(U=>f(U,P,!1));F.unshift(j);const N=F.sort((U,we)=>{if(U.relevance!==we.relevance)return we.relevance-U.relevance;if(U.language&&we.language){if(C(U.language).supersetOf===we.language)return 1;if(C(we.language).supersetOf===U.language)return-1}return 0}),[B,$]=N,J=B;return J.secondBest=$,J}function p(P,O,j){const F=O&&t[O]||j;P.classList.add("hljs"),P.classList.add(`language-${F}`)}function v(P){let O=null;const j=u(P);if(l(j))return;if(I("before:highlightElement",{el:P,language:j}),P.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",P);return}if(P.children.length>0&&(s.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(P)),s.throwUnescapedHTML))throw new Sre("One of your code blocks includes unescaped HTML.",P.innerHTML);O=P;const F=O.textContent,N=j?c(F,{language:j,ignoreIllegals:!0}):d(F);P.innerHTML=N.value,P.dataset.highlighted="yes",p(P,j,N.language),P.result={language:N.language,re:N.relevance,relevance:N.relevance},N.secondBest&&(P.secondBest={language:N.secondBest.language,relevance:N.secondBest.relevance}),I("after:highlightElement",{el:P,result:N,text:F})}function m(P){s=MD(s,P)}const g=()=>{_(),Uu("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){_(),Uu("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let b=!1;function _(){if(document.readyState==="loading"){b=!0;return}document.querySelectorAll(s.cssSelector).forEach(v)}function x(){b&&_()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",x,!1);function w(P,O){let j=null;try{j=O(r)}catch(F){if(Xl("Language definition for '{}' could not be registered.".replace("{}",P)),i)Xl(F);else throw F;j=o}j.name||(j.name=P),e[P]=j,j.rawDefinition=O.bind(null,r),j.aliases&&A(j.aliases,{languageName:P})}function S(P){delete e[P];for(const O of Object.keys(t))t[O]===P&&delete t[O]}function T(){return Object.keys(e)}function C(P){return P=(P||"").toLowerCase(),e[P]||e[t[P]]}function A(P,{languageName:O}){typeof P=="string"&&(P=[P]),P.forEach(j=>{t[j.toLowerCase()]=O})}function M(P){const O=C(P);return O&&!O.disableAutodetect}function D(P){P["before:highlightBlock"]&&!P["before:highlightElement"]&&(P["before:highlightElement"]=O=>{P["before:highlightBlock"](Object.assign({block:O.el},O))}),P["after:highlightBlock"]&&!P["after:highlightElement"]&&(P["after:highlightElement"]=O=>{P["after:highlightBlock"](Object.assign({block:O.el},O))})}function E(P){D(P),n.push(P)}function L(P){const O=n.indexOf(P);O!==-1&&n.splice(O,1)}function I(P,O){const j=P;n.forEach(function(F){F[j]&&F[j](O)})}function R(P){return Uu("10.7.0","highlightBlock will be removed entirely in v12.0"),Uu("10.7.0","Please use highlightElement now."),v(P)}Object.assign(r,{highlight:c,highlightAuto:d,highlightAll:_,highlightElement:v,highlightBlock:R,configure:m,initHighlighting:g,initHighlightingOnLoad:y,registerLanguage:w,unregisterLanguage:S,listLanguages:T,getLanguage:C,registerAliases:A,autoDetection:M,inherit:MD,addPlugin:E,removePlugin:L}),r.debugMode=function(){i=!1},r.safeMode=function(){i=!0},r.versionString=wre,r.regex={concat:Au,lookahead:H4,either:WT,optional:Bte,anyNumberOfTimes:Nte};for(const P in lv)typeof lv[P]=="object"&&V4(lv[P]);return Object.assign(r,lv),r},Zc=J4({});Zc.newInstance=()=>J4({});var Cre=Zc;Zc.HighlightJS=Zc;Zc.default=Zc;var Are=Ite(Cre);function Q4(r,e=[]){return r.map(t=>{const n=[...e,...t.properties?t.properties.className:[]];return t.children?Q4(t.children,n):{text:t.value,classes:n}}).flat()}function DD(r){return r.value||r.children||[]}function Mre(r){return!!Are.getLanguage(r)}function ED({doc:r,name:e,lowlight:t,defaultLanguage:n}){const i=[];return gw(r,a=>a.type.name===e).forEach(a=>{var o;let s=a.pos+1;const l=a.node.attrs.language||n,u=t.listLanguages(),c=l&&(u.includes(l)||Mre(l)||!((o=t.registered)===null||o===void 0)&&o.call(t,l))?DD(t.highlight(l,a.node.textContent)):DD(t.highlightAuto(a.node.textContent));Q4(c).forEach(f=>{const h=s+f.text.length;if(f.classes.length){const d=Xr.inline(s,h,{class:f.classes.join(" ")});i.push(d)}s=h})}),Gt.create(r,i)}function kre(r){return typeof r=="function"}function Dre({name:r,lowlight:e,defaultLanguage:t}){if(!["highlight","highlightAuto","listLanguages"].every(i=>kre(e[i])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const n=new Ut({key:new jt("lowlight"),state:{init:(i,{doc:a})=>ED({doc:a,name:r,lowlight:e,defaultLanguage:t}),apply:(i,a,o,s)=>{const l=o.selection.$head.parent.type.name,u=s.selection.$head.parent.type.name,c=gw(o.doc,h=>h.type.name===r),f=gw(s.doc,h=>h.type.name===r);return i.docChanged&&([l,u].includes(r)||f.length!==c.length||i.steps.some(h=>h.from!==void 0&&h.to!==void 0&&c.some(d=>d.pos>=h.from&&d.pos+d.node.nodeSize<=h.to)))?ED({doc:i.doc,name:r,lowlight:e,defaultLanguage:t}):a.map(i.mapping,i.doc)}},props:{decorations(i){return n.getState(i)}}});return n}o4.extend({addOptions(){var r;return{...(r=this.parent)===null||r===void 0?void 0:r.call(this),lowlight:{},languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},addProseMirrorPlugins(){var r;return[...((r=this.parent)===null||r===void 0?void 0:r.call(this))||[],Dre({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}});function Ere(r){var e;const{char:t,allowSpaces:n,allowToIncludeChar:i,allowedPrefixes:a,startOfLine:o,$position:s}=r,l=n&&!i,u=KK(t),c=new RegExp(`\\s${u}$`),f=o?"^":"",h=i?"":u,d=l?new RegExp(`${f}${u}.*?(?=\\s${h}|$)`,"gm"):new RegExp(`${f}(?:^)?${u}[^\\s${h}]*`,"gm"),p=((e=s.nodeBefore)===null||e===void 0?void 0:e.isText)&&s.nodeBefore.text;if(!p)return null;const v=s.pos-p.length,m=Array.from(p.matchAll(d)).pop();if(!m||m.input===void 0||m.index===void 0)return null;const g=m.input.slice(Math.max(0,m.index-1),m.index),y=new RegExp(`^[${a==null?void 0:a.join("")}\0]?$`).test(g);if(a!==null&&!y)return null;const b=v+m.index;let _=b+m[0].length;return l&&c.test(p.slice(_-1,_+1))&&(m[0]+=" ",_+=1),b<s.pos&&_>=s.pos?{range:{from:b,to:_},query:m[0].slice(t.length),text:m[0]}:null}const Lre=new jt("suggestion");function Ire({pluginKey:r=Lre,editor:e,char:t="@",allowSpaces:n=!1,allowToIncludeChar:i=!1,allowedPrefixes:a=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:l="suggestion",decorationContent:u="",decorationEmptyClass:c="is-empty",command:f=()=>null,items:h=()=>[],render:d=()=>({}),allow:p=()=>!0,findSuggestionMatch:v=Ere}){let m;const g=d==null?void 0:d(),y=new Ut({key:r,view(){return{update:async(b,_)=>{var x,w,S,T,C,A,M;const D=(x=this.key)===null||x===void 0?void 0:x.getState(_),E=(w=this.key)===null||w===void 0?void 0:w.getState(b.state),L=D.active&&E.active&&D.range.from!==E.range.from,I=!D.active&&E.active,R=D.active&&!E.active,P=!I&&!R&&D.query!==E.query,O=I||L&&P,j=P||L,F=R||L&&P;if(!O&&!j&&!F)return;const N=F&&!O?D:E,B=b.dom.querySelector(`[data-decoration-id="${N.decorationId}"]`);m={editor:e,range:N.range,query:N.query,text:N.text,items:[],command:$=>f({editor:e,range:N.range,props:$}),decorationNode:B,clientRect:B?()=>{var $;const{decorationId:J}=($=this.key)===null||$===void 0?void 0:$.getState(e.state),U=b.dom.querySelector(`[data-decoration-id="${J}"]`);return(U==null?void 0:U.getBoundingClientRect())||null}:null},O&&((S=g==null?void 0:g.onBeforeStart)===null||S===void 0||S.call(g,m)),j&&((T=g==null?void 0:g.onBeforeUpdate)===null||T===void 0||T.call(g,m)),(j||O)&&(m.items=await h({editor:e,query:N.query})),F&&((C=g==null?void 0:g.onExit)===null||C===void 0||C.call(g,m)),j&&((A=g==null?void 0:g.onUpdate)===null||A===void 0||A.call(g,m)),O&&((M=g==null?void 0:g.onStart)===null||M===void 0||M.call(g,m))},destroy:()=>{var b;m&&((b=g==null?void 0:g.onExit)===null||b===void 0||b.call(g,m))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(b,_,x,w){const{isEditable:S}=e,{composing:T}=e.view,{selection:C}=b,{empty:A,from:M}=C,D={..._};if(D.composing=T,S&&(A||e.view.composing)){(M<_.range.from||M>_.range.to)&&!T&&!_.composing&&(D.active=!1);const E=v({char:t,allowSpaces:n,allowToIncludeChar:i,allowedPrefixes:a,startOfLine:o,$position:C.$from}),L=`id_${Math.floor(Math.random()*4294967295)}`;E&&p({editor:e,state:w,range:E.range,isActive:_.active})?(D.active=!0,D.decorationId=_.decorationId?_.decorationId:L,D.range=E.range,D.query=E.query,D.text=E.text):D.active=!1}else D.active=!1;return D.active||(D.decorationId=null,D.range={from:0,to:0},D.query=null,D.text=null),D}},props:{handleKeyDown(b,_){var x;const{active:w,range:S}=y.getState(b.state);return w&&((x=g==null?void 0:g.onKeyDown)===null||x===void 0?void 0:x.call(g,{view:b,event:_,range:S}))||!1},decorations(b){const{active:_,range:x,decorationId:w,query:S}=y.getState(b);if(!_)return null;const T=!(S!=null&&S.length),C=[l];return T&&C.push(c),Gt.create(b.doc,[Xr.inline(x.from,x.to,{nodeName:s,class:C.join(" "),"data-decoration-id":w,"data-decoration-content":u})])}}});return y}function k0(r){return Kt.create({name:r.name,addOptions(){return{...r.addOptions?r.addOptions.call(this):{},suggestion:{char:r.char,pluginKey:r.pluginKey,items:r.items,command:r.command,allowSpaces:r.allowSpaces,startOfLine:r.startOfLine,decorationTag:r.decorationTag||"span",decorationClass:r.decorationClass||"suggestion",render:()=>{let t,n;return{onStart:i=>{if(t=new a4(r.component,{editor:i.editor,props:i}),!i.clientRect||!t.element)return;const a={getReferenceClientRect:i.clientRect,appendTo:()=>document.body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"};n=df("body",{...a,...r.tippyOptions})},onUpdate(i){t==null||t.updateProps(i),i.clientRect&&n&&n[0]&&n[0].setProps({getReferenceClientRect:i.clientRect})},onKeyDown(i){return i.event.key==="Escape"?(n&&n[0]&&n[0].hide(),!0):t&&t.ref&&typeof t.ref.onKeyDown=="function"?t.ref.onKeyDown(i):!1},onExit(){n&&n[0]&&n[0].destroy(),t&&t.destroy(),n=null,t=null}}}}}},addProseMirrorPlugins(){return[Ire({editor:this.editor,...this.options.suggestion})]}})}const Pre=["onClick","onMouseover"],Rre={key:0,class:"px-3 py-1.5 text-sm text-ink-gray-5"},D0=Ke({__name:"SuggestionList",props:{items:{type:Array,required:!0},command:{type:Function,required:!0},containerClass:{type:String,default:""},itemClass:{type:String,default:""},showNoResults:{type:Boolean,default:!1}},setup(r,{expose:e}){const t=r,n=te(0),i=te(null),a=te([]);LH(()=>{a.value=[]});const o=()=>{Ca(()=>{const h=a.value[n.value];h&&h.scrollIntoView({block:"nearest"})})},s=h=>{const d=t.items[h];d&&t.command(d)},l=({event:h})=>t.items.length?h.key==="ArrowUp"?(u(),!0):h.key==="ArrowDown"?(c(),!0):h.key==="Enter"?(f(),!0):!1:!1,u=()=>{n.value=(n.value+t.items.length-1)%t.items.length,o()},c=()=>{n.value=(n.value+1)%t.items.length,o()},f=()=>{s(n.value)};return Nt(()=>t.items,()=>{n.value=0}),e({onKeyDown:l}),(h,d)=>r.items.length?(Y(),ae("div",{key:0,ref_key:"container",ref:i,class:kt(["relative max-h-[300px] min-w-40 overflow-y-auto rounded-lg bg-surface-white p-1 text-base shadow-lg",r.containerClass])},[(Y(!0),ae(oi,null,cp(r.items,(p,v)=>(Y(),ae("button",{key:v,ref_for:!0,ref:m=>{m&&(a.value[v]=m)},class:kt(["flex w-full items-center whitespace-nowrap rounded-md px-2 py-1.5 text-sm text-ink-gray-9",v===n.value?"bg-surface-gray-2":"",r.itemClass]),onClick:m=>s(v),onMouseover:m=>n.value=v},[Je(h.$slots,"default",{item:p,index:v},()=>[Z("span",null,qt(p.display||p.title||p.name),1)])],42,Pre))),128)),!r.items.length&&r.showNoResults?(Y(),ae("div",Rre," No results ")):ct("",!0)],2)):ct("",!0)}});function Ore(r){const e={name:"mention",group:"inline",inline:!0,selectable:!0,atom:!0,addOptions(){return{component:void 0}},addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),renderHTML:t=>t.label?{"data-label":t.label}:{}}}},parseHTML(){return[{tag:'span.mention[data-type="mention"]',getAttrs:t=>{const n=t;return{id:n.getAttribute("data-id"),label:n.getAttribute("data-label")}}}]},renderHTML({HTMLAttributes:t}){return["span",Lt(t,{class:"mention","data-type":"mention"}),`@${t["data-label"]||t.id||""}`]}};return r&&(e.addNodeView=()=>IT(r)),ar.create(e)}const jre=k0({name:"mentionSuggestion",char:"@",pluginKey:new jt("mentionSuggestion"),component:D0,addOptions(){return{mentions:[]}},items:({query:r,editor:e})=>{const{mentions:t}=e.extensionManager.extensions.find(a=>a.name==="mentionSuggestion").options;return Nr(t).filter(a=>a.label.toLowerCase().startsWith(r.toLowerCase())).slice(0,10).map(a=>({...a,display:a.label}))},command:({editor:r,range:e,props:t})=>{const n={id:t.id||t.value,label:t.label};r.chain().focus().insertContentAt(e,[{type:"mention",attrs:n},{type:"text",text:" "}]).run()},tippyOptions:{placement:"bottom-start",offset:[0,8]},allowSpaces:!1,decorationTag:"span",decorationClass:"mention-suggestion-active"});Kt.create({name:"mentionExtension",addOptions(){return{mentions:[],component:void 0}},addExtensions(){return[Ore(this.options.component),jre.configure({mentions:this.options.mentions})]}});const Nre={class:"mr-2"},Bre=Ke({__name:"EmojiList",props:{items:{type:Array,required:!0},editor:{type:Object,required:!0},range:{type:Object,required:!0},command:{type:Function,required:!0}},setup(r,{expose:e}){const t=r,n=te(null),i=o=>{o&&t.command(o)};return e({onKeyDown:({event:o})=>{var s;return((s=n.value)==null?void 0:s.onKeyDown({event:o}))??!1}}),(o,s)=>(Y(),$e(D0,{ref_key:"suggestionList",ref:n,items:r.items,command:l=>i(l),"item-class":"py-2"},{default:_e(({item:l})=>[Z("span",Nre,qt(l.emoji),1),Z("span",null,qt(l.name),1)]),_:1},8,["items","command"]))}}),zre=[{name:"grinning",emoji:"😀"},{name:"grimacing",emoji:"😬"},{name:"grin",emoji:"😁"},{name:"joy",emoji:"😂"},{name:"rofl",emoji:"🤣"},{name:"smiley",emoji:"😃"},{name:"smile",emoji:"😄"},{name:"sweat_smile",emoji:"😅"},{name:"laughing",emoji:"😆"},{name:"innocent",emoji:"😇"},{name:"wink",emoji:"😉"},{name:"blush",emoji:"😊"},{name:"slightly_smiling_face",emoji:"🙂"},{name:"upside_down_face",emoji:"🙃"},{name:"relaxed",emoji:"☺"},{name:"yum",emoji:"😋"},{name:"relieved",emoji:"😌"},{name:"heart_eyes",emoji:"😍"},{name:"kissing_heart",emoji:"😘"},{name:"kissing",emoji:"😗"},{name:"kissing_smiling_eyes",emoji:"😙"},{name:"kissing_closed_eyes",emoji:"😚"},{name:"stuck_out_tongue_winking_eye",emoji:"😜"},{name:"stuck_out_tongue_closed_eyes",emoji:"😝"},{name:"stuck_out_tongue",emoji:"😛"},{name:"money_mouth_face",emoji:"🤑"},{name:"nerd_face",emoji:"🤓"},{name:"sunglasses",emoji:"😎"},{name:"clown_face",emoji:"🤡"},{name:"cowboy_hat_face",emoji:"🤠"},{name:"hugs",emoji:"🤗"},{name:"smirk",emoji:"😏"},{name:"no_mouth",emoji:"😶"},{name:"neutral_face",emoji:"😐"},{name:"expressionless",emoji:"😑"},{name:"unamused",emoji:"😒"},{name:"roll_eyes",emoji:"🙄"},{name:"thinking",emoji:"🤔"},{name:"lying_face",emoji:"🤥"},{name:"flushed",emoji:"😳"},{name:"disappointed",emoji:"😞"},{name:"worried",emoji:"😟"},{name:"angry",emoji:"😠"},{name:"rage",emoji:"😡"},{name:"pensive",emoji:"😔"},{name:"confused",emoji:"😕"},{name:"slightly_frowning_face",emoji:"🙁"},{name:"frowning_face",emoji:"☹"},{name:"persevere",emoji:"😣"},{name:"confounded",emoji:"😖"},{name:"tired_face",emoji:"😫"},{name:"weary",emoji:"😩"},{name:"triumph",emoji:"😤"},{name:"open_mouth",emoji:"😮"},{name:"scream",emoji:"😱"},{name:"fearful",emoji:"😨"},{name:"cold_sweat",emoji:"😰"},{name:"hushed",emoji:"😯"},{name:"frowning_with_open_mouth",emoji:"😦"},{name:"anguished",emoji:"😧"},{name:"cry",emoji:"😢"},{name:"disappointed_relieved",emoji:"😥"},{name:"drooling_face",emoji:"🤤"},{name:"sleepy",emoji:"😪"},{name:"sweat",emoji:"😓"},{name:"sob",emoji:"😭"},{name:"dizzy_face",emoji:"😵"},{name:"astonished",emoji:"😲"},{name:"zipper_mouth_face",emoji:"🤐"},{name:"nauseated_face",emoji:"🤢"},{name:"sneezing_face",emoji:"🤧"},{name:"mask",emoji:"😷"},{name:"face_with_thermometer",emoji:"🤒"},{name:"face_with_head_bandage",emoji:"🤕"},{name:"sleeping",emoji:"😴"},{name:"zzz",emoji:"💤"},{name:"poop",emoji:"💩"},{name:"smiling_imp",emoji:"😈"},{name:"imp",emoji:"👿"},{name:"japanese_ogre",emoji:"👹"},{name:"japanese_goblin",emoji:"👺"},{name:"skull",emoji:"💀"},{name:"ghost",emoji:"👻"},{name:"alien",emoji:"👽"},{name:"robot",emoji:"🤖"},{name:"smiley_cat",emoji:"😺"},{name:"smile_cat",emoji:"😸"},{name:"joy_cat",emoji:"😹"},{name:"heart_eyes_cat",emoji:"😻"},{name:"smirk_cat",emoji:"😼"},{name:"kissing_cat",emoji:"😽"},{name:"scream_cat",emoji:"🙀"},{name:"crying_cat_face",emoji:"😿"},{name:"pouting_cat",emoji:"😾"},{name:"raised_hands",emoji:"🙌"},{name:"clap",emoji:"👏"},{name:"wave",emoji:"👋"},{name:"call_me_hand",emoji:"🤙"},{name:"+1",emoji:"👍"},{name:"-1",emoji:"👎"},{name:"facepunch",emoji:"👊"},{name:"fist",emoji:"✊"},{name:"fist_left",emoji:"🤛"},{name:"fist_right",emoji:"🤜"},{name:"v",emoji:"✌"},{name:"ok_hand",emoji:"👌"},{name:"raised_hand",emoji:"✋"},{name:"raised_back_of_hand",emoji:"🤚"},{name:"open_hands",emoji:"👐"},{name:"muscle",emoji:"💪"},{name:"pray",emoji:"🙏"},{name:"handshake",emoji:"🤝"},{name:"point_up",emoji:"☝"},{name:"point_up_2",emoji:"👆"},{name:"point_down",emoji:"👇"},{name:"point_left",emoji:"👈"},{name:"point_right",emoji:"👉"},{name:"fu",emoji:"🖕"},{name:"raised_hand_with_fingers_splayed",emoji:"🖐"},{name:"metal",emoji:"🤘"},{name:"crossed_fingers",emoji:"🤞"},{name:"vulcan_salute",emoji:"🖖"},{name:"writing_hand",emoji:"✍"},{name:"selfie",emoji:"🤳"},{name:"nail_care",emoji:"💅"},{name:"lips",emoji:"👄"},{name:"tongue",emoji:"👅"},{name:"ear",emoji:"👂"},{name:"nose",emoji:"👃"},{name:"eye",emoji:"👁"},{name:"eyes",emoji:"👀"},{name:"bust_in_silhouette",emoji:"👤"},{name:"busts_in_silhouette",emoji:"👥"},{name:"speaking_head",emoji:"🗣"},{name:"baby",emoji:"👶"},{name:"boy",emoji:"👦"},{name:"girl",emoji:"👧"},{name:"man",emoji:"👨"},{name:"woman",emoji:"👩"},{name:"blonde_woman",emoji:"👱♀️"},{name:"blonde_man",emoji:"👱"},{name:"older_man",emoji:"👴"},{name:"older_woman",emoji:"👵"},{name:"man_with_gua_pi_mao",emoji:"👲"},{name:"woman_with_turban",emoji:"👳♀️"},{name:"man_with_turban",emoji:"👳"},{name:"policewoman",emoji:"👮♀️"},{name:"policeman",emoji:"👮"},{name:"construction_worker_woman",emoji:"👷♀️"},{name:"construction_worker_man",emoji:"👷"},{name:"guardswoman",emoji:"💂♀️"},{name:"guardsman",emoji:"💂"},{name:"female_detective",emoji:"🕵️♀"},{name:"male_detective",emoji:"🕵"},{name:"woman_health_worker",emoji:"👩⚕️"},{name:"man_health_worker",emoji:"👨⚕️"},{name:"woman_farmer",emoji:"👩🌾"},{name:"man_farmer",emoji:"👨🌾"},{name:"woman_cook",emoji:"👩🍳"},{name:"man_cook",emoji:"👨🍳"},{name:"woman_student",emoji:"👩🎓"},{name:"man_student",emoji:"👨🎓"},{name:"woman_singer",emoji:"👩🎤"},{name:"man_singer",emoji:"👨🎤"},{name:"woman_teacher",emoji:"👩🏫"},{name:"man_teacher",emoji:"👨🏫"},{name:"woman_factory_worker",emoji:"👩🏭"},{name:"man_factory_worker",emoji:"👨🏭"},{name:"woman_technologist",emoji:"👩💻"},{name:"man_technologist",emoji:"👨💻"},{name:"woman_office_worker",emoji:"👩💼"},{name:"man_office_worker",emoji:"👨💼"},{name:"woman_mechanic",emoji:"👩🔧"},{name:"man_mechanic",emoji:"👨🔧"},{name:"woman_scientist",emoji:"👩🔬"},{name:"man_scientist",emoji:"👨🔬"},{name:"woman_artist",emoji:"👩🎨"},{name:"man_artist",emoji:"👨🎨"},{name:"woman_firefighter",emoji:"👩🚒"},{name:"man_firefighter",emoji:"👨🚒"},{name:"woman_pilot",emoji:"👩✈️"},{name:"man_pilot",emoji:"👨✈️"},{name:"woman_astronaut",emoji:"👩🚀"},{name:"man_astronaut",emoji:"👨🚀"},{name:"woman_judge",emoji:"👩⚖️"},{name:"man_judge",emoji:"👨⚖️"},{name:"mrs_claus",emoji:"🤶"},{name:"santa",emoji:"🎅"},{name:"angel",emoji:"👼"},{name:"pregnant_woman",emoji:"🤰"},{name:"princess",emoji:"👸"},{name:"prince",emoji:"🤴"},{name:"bride_with_veil",emoji:"👰"},{name:"person_in_tuxedo",emoji:"🤵"},{name:"running_woman",emoji:"🏃♀️"},{name:"running_man",emoji:"🏃"},{name:"walking_woman",emoji:"🚶♀️"},{name:"walking_man",emoji:"🚶"},{name:"dancer",emoji:"💃"},{name:"man_dancing",emoji:"🕺"},{name:"dancing_women",emoji:"👯"},{name:"dancing_men",emoji:"👯♂"},{name:"couple",emoji:"👫"},{name:"two_men_holding_hands",emoji:"👬"},{name:"two_women_holding_hands",emoji:"👭"},{name:"bowing_woman",emoji:"🙇♀️"},{name:"bowing_man",emoji:"🙇"},{name:"man_facepalming",emoji:"🤦♂️"},{name:"woman_facepalming",emoji:"🤦♀️"},{name:"woman_shrugging",emoji:"🤷♀️"},{name:"man_shrugging",emoji:"🤷♂️"},{name:"tipping_hand_woman",emoji:"💁♀️"},{name:"tipping_hand_man",emoji:"💁♂️"},{name:"no_good_woman",emoji:"🙅♀️"},{name:"no_good_man",emoji:"🙅♂️"},{name:"ok_woman",emoji:"🙆♀️"},{name:"ok_man",emoji:"🙆♂️"},{name:"raising_hand_woman",emoji:"🙋♀️"},{name:"raising_hand_man",emoji:"🙋♂️"},{name:"pouting_woman",emoji:"🙎♀️"},{name:"pouting_man",emoji:"🙎♂️"},{name:"frowning_woman",emoji:"🙍♀️"},{name:"frowning_man",emoji:"🙍♂️"},{name:"haircut_woman",emoji:"💇♀️"},{name:"haircut_man",emoji:"💇♂️"},{name:"massage_woman",emoji:"💆♀️"},{name:"massage_man",emoji:"💆♂️"},{name:"couple_with_heart",emoji:"💑"},{name:"couple_with_heart_woman_woman",emoji:"👩❤️👩"},{name:"couple_with_heart_man_man",emoji:"👨❤️👨"},{name:"couplekiss_man_woman",emoji:"💏"},{name:"couplekiss_woman_woman",emoji:"👩❤️💋👩"},{name:"couplekiss_man_man",emoji:"👨❤️💋👨"},{name:"family",emoji:"👪"},{name:"family_man_woman_girl",emoji:"👨👩👧"},{name:"family_man_woman_girl_boy",emoji:"👨👩👧👦"},{name:"family_man_woman_boy_boy",emoji:"👨👩👦👦"},{name:"family_man_woman_girl_girl",emoji:"👨👩👧👧"},{name:"family_woman_woman_boy",emoji:"👩👩👦"},{name:"family_woman_woman_girl",emoji:"👩👩👧"},{name:"family_woman_woman_girl_boy",emoji:"👩👩👧👦"},{name:"family_woman_woman_boy_boy",emoji:"👩👩👦👦"},{name:"family_woman_woman_girl_girl",emoji:"👩👩👧👧"},{name:"family_man_man_boy",emoji:"👨👨👦"},{name:"family_man_man_girl",emoji:"👨👨👧"},{name:"family_man_man_girl_boy",emoji:"👨👨👧👦"},{name:"family_man_man_boy_boy",emoji:"👨👨👦👦"},{name:"family_man_man_girl_girl",emoji:"👨👨👧👧"},{name:"family_woman_boy",emoji:"👩👦"},{name:"family_woman_girl",emoji:"👩👧"},{name:"family_woman_girl_boy",emoji:"👩👧👦"},{name:"family_woman_boy_boy",emoji:"👩👦👦"},{name:"family_woman_girl_girl",emoji:"👩👧👧"},{name:"family_man_boy",emoji:"👨👦"},{name:"family_man_girl",emoji:"👨👧"},{name:"family_man_girl_boy",emoji:"👨👧👦"},{name:"family_man_boy_boy",emoji:"👨👦👦"},{name:"family_man_girl_girl",emoji:"👨👧👧"},{name:"womans_clothes",emoji:"👚"},{name:"tshirt",emoji:"👕"},{name:"jeans",emoji:"👖"},{name:"necktie",emoji:"👔"},{name:"dress",emoji:"👗"},{name:"bikini",emoji:"👙"},{name:"kimono",emoji:"👘"},{name:"lipstick",emoji:"💄"},{name:"kiss",emoji:"💋"},{name:"footprints",emoji:"👣"},{name:"high_heel",emoji:"👠"},{name:"sandal",emoji:"👡"},{name:"boot",emoji:"👢"},{name:"mans_shoe",emoji:"👞"},{name:"athletic_shoe",emoji:"👟"},{name:"womans_hat",emoji:"👒"},{name:"tophat",emoji:"🎩"},{name:"rescue_worker_helmet",emoji:"⛑"},{name:"mortar_board",emoji:"🎓"},{name:"crown",emoji:"👑"},{name:"school_satchel",emoji:"🎒"},{name:"pouch",emoji:"👝"},{name:"purse",emoji:"👛"},{name:"handbag",emoji:"👜"},{name:"briefcase",emoji:"💼"},{name:"eyeglasses",emoji:"👓"},{name:"dark_sunglasses",emoji:"🕶"},{name:"ring",emoji:"💍"},{name:"closed_umbrella",emoji:"🌂"},{name:"dog",emoji:"🐶"},{name:"cat",emoji:"🐱"},{name:"mouse",emoji:"🐭"},{name:"hamster",emoji:"🐹"},{name:"rabbit",emoji:"🐰"},{name:"fox_face",emoji:"🦊"},{name:"bear",emoji:"🐻"},{name:"panda_face",emoji:"🐼"},{name:"koala",emoji:"🐨"},{name:"tiger",emoji:"🐯"},{name:"lion",emoji:"🦁"},{name:"cow",emoji:"🐮"},{name:"pig",emoji:"🐷"},{name:"pig_nose",emoji:"🐽"},{name:"frog",emoji:"🐸"},{name:"squid",emoji:"🦑"},{name:"octopus",emoji:"🐙"},{name:"shrimp",emoji:"🦐"},{name:"monkey_face",emoji:"🐵"},{name:"gorilla",emoji:"🦍"},{name:"see_no_evil",emoji:"🙈"},{name:"hear_no_evil",emoji:"🙉"},{name:"speak_no_evil",emoji:"🙊"},{name:"monkey",emoji:"🐒"},{name:"chicken",emoji:"🐔"},{name:"penguin",emoji:"🐧"},{name:"bird",emoji:"🐦"},{name:"baby_chick",emoji:"🐤"},{name:"hatching_chick",emoji:"🐣"},{name:"hatched_chick",emoji:"🐥"},{name:"duck",emoji:"🦆"},{name:"eagle",emoji:"🦅"},{name:"owl",emoji:"🦉"},{name:"bat",emoji:"🦇"},{name:"wolf",emoji:"🐺"},{name:"boar",emoji:"🐗"},{name:"horse",emoji:"🐴"},{name:"unicorn",emoji:"🦄"},{name:"honeybee",emoji:"🐝"},{name:"bug",emoji:"🐛"},{name:"butterfly",emoji:"🦋"},{name:"snail",emoji:"🐌"},{name:"lady_beetle",emoji:"🐞"},{name:"ant",emoji:"🐜"},{name:"spider",emoji:"🕷"},{name:"scorpion",emoji:"🦂"},{name:"crab",emoji:"🦀"},{name:"snake",emoji:"🐍"},{name:"lizard",emoji:"🦎"},{name:"turtle",emoji:"🐢"},{name:"tropical_fish",emoji:"🐠"},{name:"fish",emoji:"🐟"},{name:"blowfish",emoji:"🐡"},{name:"dolphin",emoji:"🐬"},{name:"shark",emoji:"🦈"},{name:"whale",emoji:"🐳"},{name:"whale2",emoji:"🐋"},{name:"crocodile",emoji:"🐊"},{name:"leopard",emoji:"🐆"},{name:"tiger2",emoji:"🐅"},{name:"water_buffalo",emoji:"🐃"},{name:"ox",emoji:"🐂"},{name:"cow2",emoji:"🐄"},{name:"deer",emoji:"🦌"},{name:"dromedary_camel",emoji:"🐪"},{name:"camel",emoji:"🐫"},{name:"elephant",emoji:"🐘"},{name:"rhinoceros",emoji:"🦏"},{name:"goat",emoji:"🐐"},{name:"ram",emoji:"🐏"},{name:"sheep",emoji:"🐑"},{name:"racehorse",emoji:"🐎"},{name:"pig2",emoji:"🐖"},{name:"rat",emoji:"🐀"},{name:"mouse2",emoji:"🐁"},{name:"rooster",emoji:"🐓"},{name:"turkey",emoji:"🦃"},{name:"dove",emoji:"🕊"},{name:"dog2",emoji:"🐕"},{name:"poodle",emoji:"🐩"},{name:"cat2",emoji:"🐈"},{name:"rabbit2",emoji:"🐇"},{name:"chipmunk",emoji:"🐿"},{name:"paw_prints",emoji:"🐾"},{name:"dragon",emoji:"🐉"},{name:"dragon_face",emoji:"🐲"},{name:"cactus",emoji:"🌵"},{name:"christmas_tree",emoji:"🎄"},{name:"evergreen_tree",emoji:"🌲"},{name:"deciduous_tree",emoji:"🌳"},{name:"palm_tree",emoji:"🌴"},{name:"seedling",emoji:"🌱"},{name:"herb",emoji:"🌿"},{name:"shamrock",emoji:"☘"},{name:"four_leaf_clover",emoji:"🍀"},{name:"bamboo",emoji:"🎍"},{name:"tanabata_tree",emoji:"🎋"},{name:"leaves",emoji:"🍃"},{name:"fallen_leaf",emoji:"🍂"},{name:"maple_leaf",emoji:"🍁"},{name:"ear_of_rice",emoji:"🌾"},{name:"hibiscus",emoji:"🌺"},{name:"sunflower",emoji:"🌻"},{name:"rose",emoji:"🌹"},{name:"wilted_flower",emoji:"🥀"},{name:"tulip",emoji:"🌷"},{name:"blossom",emoji:"🌼"},{name:"cherry_blossom",emoji:"🌸"},{name:"bouquet",emoji:"💐"},{name:"mushroom",emoji:"🍄"},{name:"chestnut",emoji:"🌰"},{name:"jack_o_lantern",emoji:"🎃"},{name:"shell",emoji:"🐚"},{name:"spider_web",emoji:"🕸"},{name:"earth_americas",emoji:"🌎"},{name:"earth_africa",emoji:"🌍"},{name:"earth_asia",emoji:"🌏"},{name:"full_moon",emoji:"🌕"},{name:"waning_gibbous_moon",emoji:"🌖"},{name:"last_quarter_moon",emoji:"🌗"},{name:"waning_crescent_moon",emoji:"🌘"},{name:"new_moon",emoji:"🌑"},{name:"waxing_crescent_moon",emoji:"🌒"},{name:"first_quarter_moon",emoji:"🌓"},{name:"waxing_gibbous_moon",emoji:"🌔"},{name:"new_moon_with_face",emoji:"🌚"},{name:"full_moon_with_face",emoji:"🌝"},{name:"first_quarter_moon_with_face",emoji:"🌛"},{name:"last_quarter_moon_with_face",emoji:"🌜"},{name:"sun_with_face",emoji:"🌞"},{name:"crescent_moon",emoji:"🌙"},{name:"star",emoji:"⭐"},{name:"star2",emoji:"🌟"},{name:"dizzy",emoji:"💫"},{name:"sparkles",emoji:"✨"},{name:"comet",emoji:"☄"},{name:"sunny",emoji:"☀"},{name:"sun_behind_small_cloud",emoji:"🌤"},{name:"partly_sunny",emoji:"⛅"},{name:"sun_behind_large_cloud",emoji:"🌥"},{name:"sun_behind_rain_cloud",emoji:"🌦"},{name:"cloud",emoji:"☁"},{name:"cloud_with_rain",emoji:"🌧"},{name:"cloud_with_lightning_and_rain",emoji:"⛈"},{name:"cloud_with_lightning",emoji:"🌩"},{name:"zap",emoji:"⚡"},{name:"fire",emoji:"🔥"},{name:"boom",emoji:"💥"},{name:"snowflake",emoji:"❄"},{name:"cloud_with_snow",emoji:"🌨"},{name:"snowman",emoji:"⛄"},{name:"snowman_with_snow",emoji:"☃"},{name:"wind_face",emoji:"🌬"},{name:"dash",emoji:"💨"},{name:"tornado",emoji:"🌪"},{name:"fog",emoji:"🌫"},{name:"open_umbrella",emoji:"☂"},{name:"umbrella",emoji:"☔"},{name:"droplet",emoji:"💧"},{name:"sweat_drops",emoji:"💦"},{name:"ocean",emoji:"🌊"},{name:"green_apple",emoji:"🍏"},{name:"apple",emoji:"🍎"},{name:"pear",emoji:"🍐"},{name:"tangerine",emoji:"🍊"},{name:"lemon",emoji:"🍋"},{name:"banana",emoji:"🍌"},{name:"watermelon",emoji:"🍉"},{name:"grapes",emoji:"🍇"},{name:"strawberry",emoji:"🍓"},{name:"melon",emoji:"🍈"},{name:"cherries",emoji:"🍒"},{name:"peach",emoji:"🍑"},{name:"pineapple",emoji:"🍍"},{name:"kiwi_fruit",emoji:"🥝"},{name:"avocado",emoji:"🥑"},{name:"tomato",emoji:"🍅"},{name:"eggplant",emoji:"🍆"},{name:"cucumber",emoji:"🥒"},{name:"carrot",emoji:"🥕"},{name:"hot_pepper",emoji:"🌶"},{name:"potato",emoji:"🥔"},{name:"corn",emoji:"🌽"},{name:"sweet_potato",emoji:"🍠"},{name:"peanuts",emoji:"🥜"},{name:"honey_pot",emoji:"🍯"},{name:"croissant",emoji:"🥐"},{name:"bread",emoji:"🍞"},{name:"baguette_bread",emoji:"🥖"},{name:"cheese",emoji:"🧀"},{name:"egg",emoji:"🥚"},{name:"bacon",emoji:"🥓"},{name:"pancakes",emoji:"🥞"},{name:"poultry_leg",emoji:"🍗"},{name:"meat_on_bone",emoji:"🍖"},{name:"fried_shrimp",emoji:"🍤"},{name:"fried_egg",emoji:"🍳"},{name:"hamburger",emoji:"🍔"},{name:"fries",emoji:"🍟"},{name:"stuffed_flatbread",emoji:"🥙"},{name:"hotdog",emoji:"🌭"},{name:"pizza",emoji:"🍕"},{name:"spaghetti",emoji:"🍝"},{name:"taco",emoji:"🌮"},{name:"burrito",emoji:"🌯"},{name:"green_salad",emoji:"🥗"},{name:"shallow_pan_of_food",emoji:"🥘"},{name:"ramen",emoji:"🍜"},{name:"stew",emoji:"🍲"},{name:"fish_cake",emoji:"🍥"},{name:"sushi",emoji:"🍣"},{name:"bento",emoji:"🍱"},{name:"curry",emoji:"🍛"},{name:"rice_ball",emoji:"🍙"},{name:"rice",emoji:"🍚"},{name:"rice_cracker",emoji:"🍘"},{name:"oden",emoji:"🍢"},{name:"dango",emoji:"🍡"},{name:"shaved_ice",emoji:"🍧"},{name:"ice_cream",emoji:"🍨"},{name:"icecream",emoji:"🍦"},{name:"cake",emoji:"🍰"},{name:"birthday",emoji:"🎂"},{name:"custard",emoji:"🍮"},{name:"candy",emoji:"🍬"},{name:"lollipop",emoji:"🍭"},{name:"chocolate_bar",emoji:"🍫"},{name:"popcorn",emoji:"🍿"},{name:"doughnut",emoji:"🍩"},{name:"cookie",emoji:"🍪"},{name:"milk_glass",emoji:"🥛"},{name:"beer",emoji:"🍺"},{name:"beers",emoji:"🍻"},{name:"clinking_glasses",emoji:"🥂"},{name:"wine_glass",emoji:"🍷"},{name:"tumbler_glass",emoji:"🥃"},{name:"cocktail",emoji:"🍸"},{name:"tropical_drink",emoji:"🍹"},{name:"champagne",emoji:"🍾"},{name:"sake",emoji:"🍶"},{name:"tea",emoji:"🍵"},{name:"coffee",emoji:"☕"},{name:"baby_bottle",emoji:"🍼"},{name:"spoon",emoji:"🥄"},{name:"fork_and_knife",emoji:"🍴"},{name:"plate_with_cutlery",emoji:"🍽"},{name:"soccer",emoji:"⚽"},{name:"basketball",emoji:"🏀"},{name:"football",emoji:"🏈"},{name:"baseball",emoji:"⚾"},{name:"tennis",emoji:"🎾"},{name:"volleyball",emoji:"🏐"},{name:"rugby_football",emoji:"🏉"},{name:"8ball",emoji:"🎱"},{name:"golf",emoji:"⛳"},{name:"golfing_woman",emoji:"🏌️♀"},{name:"golfing_man",emoji:"🏌"},{name:"ping_pong",emoji:"🏓"},{name:"badminton",emoji:"🏸"},{name:"goal_net",emoji:"🥅"},{name:"ice_hockey",emoji:"🏒"},{name:"field_hockey",emoji:"🏑"},{name:"cricket_bat_and_ball",emoji:"🏏"},{name:"ski",emoji:"🎿"},{name:"skier",emoji:"⛷"},{name:"snowboarder",emoji:"🏂"},{name:"person_fencing",emoji:"🤺"},{name:"women_wrestling",emoji:"🤼♀"},{name:"men_wrestling",emoji:"🤼♂"},{name:"woman_cartwheeling",emoji:"🤸♀️"},{name:"man_cartwheeling",emoji:"🤸♂️"},{name:"woman_playing_handball",emoji:"🤾♀️"},{name:"man_playing_handball",emoji:"🤾♂️"},{name:"ice_skate",emoji:"⛸"},{name:"bow_and_arrow",emoji:"🏹"},{name:"fishing_pole_and_fish",emoji:"🎣"},{name:"boxing_glove",emoji:"🥊"},{name:"martial_arts_uniform",emoji:"🥋"},{name:"rowing_woman",emoji:"🚣♀️"},{name:"rowing_man",emoji:"🚣"},{name:"swimming_woman",emoji:"🏊♀️"},{name:"swimming_man",emoji:"🏊"},{name:"woman_playing_water_polo",emoji:"🤽♀️"},{name:"man_playing_water_polo",emoji:"🤽♂️"},{name:"surfing_woman",emoji:"🏄♀️"},{name:"surfing_man",emoji:"🏄"},{name:"bath",emoji:"🛀"},{name:"basketball_woman",emoji:"⛹️♀"},{name:"basketball_man",emoji:"⛹"},{name:"weight_lifting_woman",emoji:"🏋️♀"},{name:"weight_lifting_man",emoji:"🏋"},{name:"biking_woman",emoji:"🚴♀️"},{name:"biking_man",emoji:"🚴"},{name:"mountain_biking_woman",emoji:"🚵♀️"},{name:"mountain_biking_man",emoji:"🚵"},{name:"horse_racing",emoji:"🏇"},{name:"business_suit_levitating",emoji:"🕴"},{name:"trophy",emoji:"🏆"},{name:"running_shirt_with_sash",emoji:"🎽"},{name:"medal_sports",emoji:"🏅"},{name:"medal_military",emoji:"🎖"},{name:"1st_place_medal",emoji:"🥇"},{name:"2nd_place_medal",emoji:"🥈"},{name:"3rd_place_medal",emoji:"🥉"},{name:"reminder_ribbon",emoji:"🎗"},{name:"rosette",emoji:"🏵"},{name:"ticket",emoji:"🎫"},{name:"tickets",emoji:"🎟"},{name:"performing_arts",emoji:"🎭"},{name:"art",emoji:"🎨"},{name:"circus_tent",emoji:"🎪"},{name:"woman_juggling",emoji:"🤹♀️"},{name:"man_juggling",emoji:"🤹♂️"},{name:"microphone",emoji:"🎤"},{name:"headphones",emoji:"🎧"},{name:"musical_score",emoji:"🎼"},{name:"musical_keyboard",emoji:"🎹"},{name:"drum",emoji:"🥁"},{name:"saxophone",emoji:"🎷"},{name:"trumpet",emoji:"🎺"},{name:"guitar",emoji:"🎸"},{name:"violin",emoji:"🎻"},{name:"clapper",emoji:"🎬"},{name:"video_game",emoji:"🎮"},{name:"space_invader",emoji:"👾"},{name:"dart",emoji:"🎯"},{name:"game_die",emoji:"🎲"},{name:"slot_machine",emoji:"🎰"},{name:"bowling",emoji:"🎳"},{name:"red_car",emoji:"🚗"},{name:"taxi",emoji:"🚕"},{name:"blue_car",emoji:"🚙"},{name:"bus",emoji:"🚌"},{name:"trolleybus",emoji:"🚎"},{name:"racing_car",emoji:"🏎"},{name:"police_car",emoji:"🚓"},{name:"ambulance",emoji:"🚑"},{name:"fire_engine",emoji:"🚒"},{name:"minibus",emoji:"🚐"},{name:"truck",emoji:"🚚"},{name:"articulated_lorry",emoji:"🚛"},{name:"tractor",emoji:"🚜"},{name:"kick_scooter",emoji:"🛴"},{name:"motorcycle",emoji:"🏍"},{name:"bike",emoji:"🚲"},{name:"motor_scooter",emoji:"🛵"},{name:"rotating_light",emoji:"🚨"},{name:"oncoming_police_car",emoji:"🚔"},{name:"oncoming_bus",emoji:"🚍"},{name:"oncoming_automobile",emoji:"🚘"},{name:"oncoming_taxi",emoji:"🚖"},{name:"aerial_tramway",emoji:"🚡"},{name:"mountain_cableway",emoji:"🚠"},{name:"suspension_railway",emoji:"🚟"},{name:"railway_car",emoji:"🚃"},{name:"train",emoji:"🚋"},{name:"monorail",emoji:"🚝"},{name:"bullettrain_side",emoji:"🚄"},{name:"bullettrain_front",emoji:"🚅"},{name:"light_rail",emoji:"🚈"},{name:"mountain_railway",emoji:"🚞"},{name:"steam_locomotive",emoji:"🚂"},{name:"train2",emoji:"🚆"},{name:"metro",emoji:"🚇"},{name:"tram",emoji:"🚊"},{name:"station",emoji:"🚉"},{name:"helicopter",emoji:"🚁"},{name:"small_airplane",emoji:"🛩"},{name:"airplane",emoji:"✈"},{name:"flight_departure",emoji:"🛫"},{name:"flight_arrival",emoji:"🛬"},{name:"sailboat",emoji:"⛵"},{name:"motor_boat",emoji:"🛥"},{name:"speedboat",emoji:"🚤"},{name:"ferry",emoji:"⛴"},{name:"passenger_ship",emoji:"🛳"},{name:"rocket",emoji:"🚀"},{name:"artificial_satellite",emoji:"🛰"},{name:"seat",emoji:"💺"},{name:"canoe",emoji:"🛶"},{name:"anchor",emoji:"⚓"},{name:"construction",emoji:"🚧"},{name:"fuelpump",emoji:"⛽"},{name:"busstop",emoji:"🚏"},{name:"vertical_traffic_light",emoji:"🚦"},{name:"traffic_light",emoji:"🚥"},{name:"checkered_flag",emoji:"🏁"},{name:"ship",emoji:"🚢"},{name:"ferris_wheel",emoji:"🎡"},{name:"roller_coaster",emoji:"🎢"},{name:"carousel_horse",emoji:"🎠"},{name:"building_construction",emoji:"🏗"},{name:"foggy",emoji:"🌁"},{name:"tokyo_tower",emoji:"🗼"},{name:"factory",emoji:"🏭"},{name:"fountain",emoji:"⛲"},{name:"rice_scene",emoji:"🎑"},{name:"mountain",emoji:"⛰"},{name:"mountain_snow",emoji:"🏔"},{name:"mount_fuji",emoji:"🗻"},{name:"volcano",emoji:"🌋"},{name:"japan",emoji:"🗾"},{name:"camping",emoji:"🏕"},{name:"tent",emoji:"⛺"},{name:"national_park",emoji:"🏞"},{name:"motorway",emoji:"🛣"},{name:"railway_track",emoji:"🛤"},{name:"sunrise",emoji:"🌅"},{name:"sunrise_over_mountains",emoji:"🌄"},{name:"desert",emoji:"🏜"},{name:"beach_umbrella",emoji:"🏖"},{name:"desert_island",emoji:"🏝"},{name:"city_sunrise",emoji:"🌇"},{name:"city_sunset",emoji:"🌆"},{name:"cityscape",emoji:"🏙"},{name:"night_with_stars",emoji:"🌃"},{name:"bridge_at_night",emoji:"🌉"},{name:"milky_way",emoji:"🌌"},{name:"stars",emoji:"🌠"},{name:"sparkler",emoji:"🎇"},{name:"fireworks",emoji:"🎆"},{name:"rainbow",emoji:"🌈"},{name:"houses",emoji:"🏘"},{name:"european_castle",emoji:"🏰"},{name:"japanese_castle",emoji:"🏯"},{name:"stadium",emoji:"🏟"},{name:"statue_of_liberty",emoji:"🗽"},{name:"house",emoji:"🏠"},{name:"house_with_garden",emoji:"🏡"},{name:"derelict_house",emoji:"🏚"},{name:"office",emoji:"🏢"},{name:"department_store",emoji:"🏬"},{name:"post_office",emoji:"🏣"},{name:"european_post_office",emoji:"🏤"},{name:"hospital",emoji:"🏥"},{name:"bank",emoji:"🏦"},{name:"hotel",emoji:"🏨"},{name:"convenience_store",emoji:"🏪"},{name:"school",emoji:"🏫"},{name:"love_hotel",emoji:"🏩"},{name:"wedding",emoji:"💒"},{name:"classical_building",emoji:"🏛"},{name:"church",emoji:"⛪"},{name:"mosque",emoji:"🕌"},{name:"synagogue",emoji:"🕍"},{name:"kaaba",emoji:"🕋"},{name:"shinto_shrine",emoji:"⛩"},{name:"watch",emoji:"⌚"},{name:"iphone",emoji:"📱"},{name:"calling",emoji:"📲"},{name:"computer",emoji:"💻"},{name:"keyboard",emoji:"⌨"},{name:"desktop_computer",emoji:"🖥"},{name:"printer",emoji:"🖨"},{name:"computer_mouse",emoji:"🖱"},{name:"trackball",emoji:"🖲"},{name:"joystick",emoji:"🕹"},{name:"clamp",emoji:"🗜"},{name:"minidisc",emoji:"💽"},{name:"floppy_disk",emoji:"💾"},{name:"cd",emoji:"💿"},{name:"dvd",emoji:"📀"},{name:"vhs",emoji:"📼"},{name:"camera",emoji:"📷"},{name:"camera_flash",emoji:"📸"},{name:"video_camera",emoji:"📹"},{name:"movie_camera",emoji:"🎥"},{name:"film_projector",emoji:"📽"},{name:"film_strip",emoji:"🎞"},{name:"telephone_receiver",emoji:"📞"},{name:"phone",emoji:"☎"},{name:"pager",emoji:"📟"},{name:"fax",emoji:"📠"},{name:"tv",emoji:"📺"},{name:"radio",emoji:"📻"},{name:"studio_microphone",emoji:"🎙"},{name:"level_slider",emoji:"🎚"},{name:"control_knobs",emoji:"🎛"},{name:"stopwatch",emoji:"⏱"},{name:"timer_clock",emoji:"⏲"},{name:"alarm_clock",emoji:"⏰"},{name:"mantelpiece_clock",emoji:"🕰"},{name:"hourglass_flowing_sand",emoji:"⏳"},{name:"hourglass",emoji:"⌛"},{name:"satellite",emoji:"📡"},{name:"battery",emoji:"🔋"},{name:"electric_plug",emoji:"🔌"},{name:"bulb",emoji:"💡"},{name:"flashlight",emoji:"🔦"},{name:"candle",emoji:"🕯"},{name:"wastebasket",emoji:"🗑"},{name:"oil_drum",emoji:"🛢"},{name:"money_with_wings",emoji:"💸"},{name:"dollar",emoji:"💵"},{name:"yen",emoji:"💴"},{name:"euro",emoji:"💶"},{name:"pound",emoji:"💷"},{name:"moneybag",emoji:"💰"},{name:"credit_card",emoji:"💳"},{name:"gem",emoji:"💎"},{name:"balance_scale",emoji:"⚖"},{name:"wrench",emoji:"🔧"},{name:"hammer",emoji:"🔨"},{name:"hammer_and_pick",emoji:"⚒"},{name:"hammer_and_wrench",emoji:"🛠"},{name:"pick",emoji:"⛏"},{name:"nut_and_bolt",emoji:"🔩"},{name:"gear",emoji:"⚙"},{name:"chains",emoji:"⛓"},{name:"gun",emoji:"🔫"},{name:"bomb",emoji:"💣"},{name:"hocho",emoji:"🔪"},{name:"dagger",emoji:"🗡"},{name:"crossed_swords",emoji:"⚔"},{name:"shield",emoji:"🛡"},{name:"smoking",emoji:"🚬"},{name:"skull_and_crossbones",emoji:"☠"},{name:"coffin",emoji:"⚰"},{name:"funeral_urn",emoji:"⚱"},{name:"amphora",emoji:"🏺"},{name:"crystal_ball",emoji:"🔮"},{name:"prayer_beads",emoji:"📿"},{name:"barber",emoji:"💈"},{name:"alembic",emoji:"⚗"},{name:"telescope",emoji:"🔭"},{name:"microscope",emoji:"🔬"},{name:"hole",emoji:"🕳"},{name:"pill",emoji:"💊"},{name:"syringe",emoji:"💉"},{name:"thermometer",emoji:"🌡"},{name:"label",emoji:"🏷"},{name:"bookmark",emoji:"🔖"},{name:"toilet",emoji:"🚽"},{name:"shower",emoji:"🚿"},{name:"bathtub",emoji:"🛁"},{name:"key",emoji:"🔑"},{name:"old_key",emoji:"🗝"},{name:"couch_and_lamp",emoji:"🛋"},{name:"sleeping_bed",emoji:"🛌"},{name:"bed",emoji:"🛏"},{name:"door",emoji:"🚪"},{name:"bellhop_bell",emoji:"🛎"},{name:"framed_picture",emoji:"🖼"},{name:"world_map",emoji:"🗺"},{name:"parasol_on_ground",emoji:"⛱"},{name:"moyai",emoji:"🗿"},{name:"shopping",emoji:"🛍"},{name:"shopping_cart",emoji:"🛒"},{name:"balloon",emoji:"🎈"},{name:"flags",emoji:"🎏"},{name:"ribbon",emoji:"🎀"},{name:"gift",emoji:"🎁"},{name:"confetti_ball",emoji:"🎊"},{name:"tada",emoji:"🎉"},{name:"dolls",emoji:"🎎"},{name:"wind_chime",emoji:"🎐"},{name:"crossed_flags",emoji:"🎌"},{name:"izakaya_lantern",emoji:"🏮"},{name:"email",emoji:"✉"},{name:"envelope_with_arrow",emoji:"📩"},{name:"incoming_envelope",emoji:"📨"},{name:"e-mail",emoji:"📧"},{name:"love_letter",emoji:"💌"},{name:"postbox",emoji:"📮"},{name:"mailbox_closed",emoji:"📪"},{name:"mailbox",emoji:"📫"},{name:"mailbox_with_mail",emoji:"📬"},{name:"mailbox_with_no_mail",emoji:"📭"},{name:"package",emoji:"📦"},{name:"postal_horn",emoji:"📯"},{name:"inbox_tray",emoji:"📥"},{name:"outbox_tray",emoji:"📤"},{name:"scroll",emoji:"📜"},{name:"page_with_curl",emoji:"📃"},{name:"bookmark_tabs",emoji:"📑"},{name:"bar_chart",emoji:"📊"},{name:"chart_with_upwards_trend",emoji:"📈"},{name:"chart_with_downwards_trend",emoji:"📉"},{name:"page_facing_up",emoji:"📄"},{name:"date",emoji:"📅"},{name:"calendar",emoji:"📆"},{name:"spiral_calendar",emoji:"🗓"},{name:"card_index",emoji:"📇"},{name:"card_file_box",emoji:"🗃"},{name:"ballot_box",emoji:"🗳"},{name:"file_cabinet",emoji:"🗄"},{name:"clipboard",emoji:"📋"},{name:"spiral_notepad",emoji:"🗒"},{name:"file_folder",emoji:"📁"},{name:"open_file_folder",emoji:"📂"},{name:"card_index_dividers",emoji:"🗂"},{name:"newspaper_roll",emoji:"🗞"},{name:"newspaper",emoji:"📰"},{name:"notebook",emoji:"📓"},{name:"closed_book",emoji:"📕"},{name:"green_book",emoji:"📗"},{name:"blue_book",emoji:"📘"},{name:"orange_book",emoji:"📙"},{name:"notebook_with_decorative_cover",emoji:"📔"},{name:"ledger",emoji:"📒"},{name:"books",emoji:"📚"},{name:"open_book",emoji:"📖"},{name:"link",emoji:"🔗"},{name:"paperclip",emoji:"📎"},{name:"paperclips",emoji:"🖇"},{name:"scissors",emoji:"✂"},{name:"triangular_ruler",emoji:"📐"},{name:"straight_ruler",emoji:"📏"},{name:"pushpin",emoji:"📌"},{name:"round_pushpin",emoji:"📍"},{name:"triangular_flag_on_post",emoji:"🚩"},{name:"white_flag",emoji:"🏳"},{name:"black_flag",emoji:"🏴"},{name:"rainbow_flag",emoji:"🏳️🌈"},{name:"closed_lock_with_key",emoji:"🔐"},{name:"lock",emoji:"🔒"},{name:"unlock",emoji:"🔓"},{name:"lock_with_ink_pen",emoji:"🔏"},{name:"pen",emoji:"🖊"},{name:"fountain_pen",emoji:"🖋"},{name:"black_nib",emoji:"✒"},{name:"memo",emoji:"📝"},{name:"pencil2",emoji:"✏"},{name:"crayon",emoji:"🖍"},{name:"paintbrush",emoji:"🖌"},{name:"mag",emoji:"🔍"},{name:"mag_right",emoji:"🔎"},{name:"heart",emoji:"❤"},{name:"yellow_heart",emoji:"💛"},{name:"green_heart",emoji:"💚"},{name:"blue_heart",emoji:"💙"},{name:"purple_heart",emoji:"💜"},{name:"black_heart",emoji:"🖤"},{name:"broken_heart",emoji:"💔"},{name:"heavy_heart_exclamation",emoji:"❣"},{name:"two_hearts",emoji:"💕"},{name:"revolving_hearts",emoji:"💞"},{name:"heartbeat",emoji:"💓"},{name:"heartpulse",emoji:"💗"},{name:"sparkling_heart",emoji:"💖"},{name:"cupid",emoji:"💘"},{name:"gift_heart",emoji:"💝"},{name:"heart_decoration",emoji:"💟"},{name:"peace_symbol",emoji:"☮"},{name:"latin_cross",emoji:"✝"},{name:"star_and_crescent",emoji:"☪"},{name:"om",emoji:"🕉"},{name:"wheel_of_dharma",emoji:"☸"},{name:"star_of_david",emoji:"✡"},{name:"six_pointed_star",emoji:"🔯"},{name:"menorah",emoji:"🕎"},{name:"yin_yang",emoji:"☯"},{name:"orthodox_cross",emoji:"☦"},{name:"place_of_worship",emoji:"🛐"},{name:"ophiuchus",emoji:"⛎"},{name:"aries",emoji:"♈"},{name:"taurus",emoji:"♉"},{name:"gemini",emoji:"♊"},{name:"cancer",emoji:"♋"},{name:"leo",emoji:"♌"},{name:"virgo",emoji:"♍"},{name:"libra",emoji:"♎"},{name:"scorpius",emoji:"♏"},{name:"sagittarius",emoji:"♐"},{name:"capricorn",emoji:"♑"},{name:"aquarius",emoji:"♒"},{name:"pisces",emoji:"♓"},{name:"id",emoji:"🆔"},{name:"atom_symbol",emoji:"⚛"},{name:"u7a7a",emoji:"🈳"},{name:"u5272",emoji:"🈹"},{name:"radioactive",emoji:"☢"},{name:"biohazard",emoji:"☣"},{name:"mobile_phone_off",emoji:"📴"},{name:"vibration_mode",emoji:"📳"},{name:"u6709",emoji:"🈶"},{name:"u7121",emoji:"🈚"},{name:"u7533",emoji:"🈸"},{name:"u55b6",emoji:"🈺"},{name:"u6708",emoji:"🈷"},{name:"eight_pointed_black_star",emoji:"✴"},{name:"vs",emoji:"🆚"},{name:"accept",emoji:"🉑"},{name:"white_flower",emoji:"💮"},{name:"ideograph_advantage",emoji:"🉐"},{name:"secret",emoji:"㊙"},{name:"congratulations",emoji:"㊗"},{name:"u5408",emoji:"🈴"},{name:"u6e80",emoji:"🈵"},{name:"u7981",emoji:"🈲"},{name:"a",emoji:"🅰"},{name:"b",emoji:"🅱"},{name:"ab",emoji:"🆎"},{name:"cl",emoji:"🆑"},{name:"o2",emoji:"🅾"},{name:"sos",emoji:"🆘"},{name:"no_entry",emoji:"⛔"},{name:"name_badge",emoji:"📛"},{name:"no_entry_sign",emoji:"🚫"},{name:"x",emoji:"❌"},{name:"o",emoji:"⭕"},{name:"stop_sign",emoji:"🛑"},{name:"anger",emoji:"💢"},{name:"hotsprings",emoji:"♨"},{name:"no_pedestrians",emoji:"🚷"},{name:"do_not_litter",emoji:"🚯"},{name:"no_bicycles",emoji:"🚳"},{name:"non-potable_water",emoji:"🚱"},{name:"underage",emoji:"🔞"},{name:"no_mobile_phones",emoji:"📵"},{name:"exclamation",emoji:"❗"},{name:"grey_exclamation",emoji:"❕"},{name:"question",emoji:"❓"},{name:"grey_question",emoji:"❔"},{name:"bangbang",emoji:"‼"},{name:"interrobang",emoji:"⁉"},{name:"100",emoji:"💯"},{name:"low_brightness",emoji:"🔅"},{name:"high_brightness",emoji:"🔆"},{name:"trident",emoji:"🔱"},{name:"fleur_de_lis",emoji:"⚜"},{name:"part_alternation_mark",emoji:"〽"},{name:"warning",emoji:"⚠"},{name:"children_crossing",emoji:"🚸"},{name:"beginner",emoji:"🔰"},{name:"recycle",emoji:"♻"},{name:"u6307",emoji:"🈯"},{name:"chart",emoji:"💹"},{name:"sparkle",emoji:"❇"},{name:"eight_spoked_asterisk",emoji:"✳"},{name:"negative_squared_cross_mark",emoji:"❎"},{name:"white_check_mark",emoji:"✅"},{name:"diamond_shape_with_a_dot_inside",emoji:"💠"},{name:"cyclone",emoji:"🌀"},{name:"loop",emoji:"➿"},{name:"globe_with_meridians",emoji:"🌐"},{name:"m",emoji:"Ⓜ"},{name:"atm",emoji:"🏧"},{name:"sa",emoji:"🈂"},{name:"passport_control",emoji:"🛂"},{name:"customs",emoji:"🛃"},{name:"baggage_claim",emoji:"🛄"},{name:"left_luggage",emoji:"🛅"},{name:"wheelchair",emoji:"♿"},{name:"no_smoking",emoji:"🚭"},{name:"wc",emoji:"🚾"},{name:"parking",emoji:"🅿"},{name:"potable_water",emoji:"🚰"},{name:"mens",emoji:"🚹"},{name:"womens",emoji:"🚺"},{name:"baby_symbol",emoji:"🚼"},{name:"restroom",emoji:"🚻"},{name:"put_litter_in_its_place",emoji:"🚮"},{name:"cinema",emoji:"🎦"},{name:"signal_strength",emoji:"📶"},{name:"koko",emoji:"🈁"},{name:"ng",emoji:"🆖"},{name:"ok",emoji:"🆗"},{name:"up",emoji:"🆙"},{name:"cool",emoji:"🆒"},{name:"new",emoji:"🆕"},{name:"free",emoji:"🆓"},{name:"zero",emoji:"0️⃣"},{name:"one",emoji:"1️⃣"},{name:"two",emoji:"2️⃣"},{name:"three",emoji:"3️⃣"},{name:"four",emoji:"4️⃣"},{name:"five",emoji:"5️⃣"},{name:"six",emoji:"6️⃣"},{name:"seven",emoji:"7️⃣"},{name:"eight",emoji:"8️⃣"},{name:"nine",emoji:"9️⃣"},{name:"keycap_ten",emoji:"🔟"},{name:"asterisk",emoji:"*️⃣"},{name:"1234",emoji:"🔢"},{name:"arrow_forward",emoji:"▶"},{name:"pause_button",emoji:"⏸"},{name:"next_track_button",emoji:"⏭"},{name:"stop_button",emoji:"⏹"},{name:"record_button",emoji:"⏺"},{name:"play_or_pause_button",emoji:"⏯"},{name:"previous_track_button",emoji:"⏮"},{name:"fast_forward",emoji:"⏩"},{name:"rewind",emoji:"⏪"},{name:"twisted_rightwards_arrows",emoji:"🔀"},{name:"repeat",emoji:"🔁"},{name:"repeat_one",emoji:"🔂"},{name:"arrow_backward",emoji:"◀"},{name:"arrow_up_small",emoji:"🔼"},{name:"arrow_down_small",emoji:"🔽"},{name:"arrow_double_up",emoji:"⏫"},{name:"arrow_double_down",emoji:"⏬"},{name:"arrow_right",emoji:"➡"},{name:"arrow_left",emoji:"⬅"},{name:"arrow_up",emoji:"⬆"},{name:"arrow_down",emoji:"⬇"},{name:"arrow_upper_right",emoji:"↗"},{name:"arrow_lower_right",emoji:"↘"},{name:"arrow_lower_left",emoji:"↙"},{name:"arrow_upper_left",emoji:"↖"},{name:"arrow_up_down",emoji:"↕"},{name:"left_right_arrow",emoji:"↔"},{name:"arrows_counterclockwise",emoji:"🔄"},{name:"arrow_right_hook",emoji:"↪"},{name:"leftwards_arrow_with_hook",emoji:"↩"},{name:"arrow_heading_up",emoji:"⤴"},{name:"arrow_heading_down",emoji:"⤵"},{name:"hash",emoji:"#️⃣"},{name:"information_source",emoji:"ℹ"},{name:"abc",emoji:"🔤"},{name:"abcd",emoji:"🔡"},{name:"capital_abcd",emoji:"🔠"},{name:"symbols",emoji:"🔣"},{name:"musical_note",emoji:"🎵"},{name:"notes",emoji:"🎶"},{name:"wavy_dash",emoji:"〰"},{name:"curly_loop",emoji:"➰"},{name:"heavy_check_mark",emoji:"✔"},{name:"arrows_clockwise",emoji:"🔃"},{name:"heavy_plus_sign",emoji:"➕"},{name:"heavy_minus_sign",emoji:"➖"},{name:"heavy_division_sign",emoji:"➗"},{name:"heavy_multiplication_x",emoji:"✖"},{name:"heavy_dollar_sign",emoji:"💲"},{name:"currency_exchange",emoji:"💱"},{name:"copyright",emoji:"©"},{name:"registered",emoji:"®"},{name:"tm",emoji:"™"},{name:"end",emoji:"🔚"},{name:"back",emoji:"🔙"},{name:"on",emoji:"🔛"},{name:"top",emoji:"🔝"},{name:"soon",emoji:"🔜"},{name:"ballot_box_with_check",emoji:"☑"},{name:"radio_button",emoji:"🔘"},{name:"white_circle",emoji:"⚪"},{name:"black_circle",emoji:"⚫"},{name:"red_circle",emoji:"🔴"},{name:"large_blue_circle",emoji:"🔵"},{name:"small_orange_diamond",emoji:"🔸"},{name:"small_blue_diamond",emoji:"🔹"},{name:"large_orange_diamond",emoji:"🔶"},{name:"large_blue_diamond",emoji:"🔷"},{name:"small_red_triangle",emoji:"🔺"},{name:"black_small_square",emoji:"▪"},{name:"white_small_square",emoji:"▫"},{name:"black_large_square",emoji:"⬛"},{name:"white_large_square",emoji:"⬜"},{name:"small_red_triangle_down",emoji:"🔻"},{name:"black_medium_square",emoji:"◼"},{name:"white_medium_square",emoji:"◻"},{name:"black_medium_small_square",emoji:"◾"},{name:"white_medium_small_square",emoji:"◽"},{name:"black_square_button",emoji:"🔲"},{name:"white_square_button",emoji:"🔳"},{name:"speaker",emoji:"🔈"},{name:"sound",emoji:"🔉"},{name:"loud_sound",emoji:"🔊"},{name:"mute",emoji:"🔇"},{name:"mega",emoji:"📣"},{name:"loudspeaker",emoji:"📢"},{name:"bell",emoji:"🔔"},{name:"no_bell",emoji:"🔕"},{name:"black_joker",emoji:"🃏"},{name:"mahjong",emoji:"🀄"},{name:"spades",emoji:"♠"},{name:"clubs",emoji:"♣"},{name:"hearts",emoji:"♥"},{name:"diamonds",emoji:"♦"},{name:"flower_playing_cards",emoji:"🎴"},{name:"thought_balloon",emoji:"💭"},{name:"right_anger_bubble",emoji:"🗯"},{name:"speech_balloon",emoji:"💬"},{name:"left_speech_bubble",emoji:"🗨"},{name:"clock1",emoji:"🕐"},{name:"clock2",emoji:"🕑"},{name:"clock3",emoji:"🕒"},{name:"clock4",emoji:"🕓"},{name:"clock5",emoji:"🕔"},{name:"clock6",emoji:"🕕"},{name:"clock7",emoji:"🕖"},{name:"clock8",emoji:"🕗"},{name:"clock9",emoji:"🕘"},{name:"clock10",emoji:"🕙"},{name:"clock11",emoji:"🕚"},{name:"clock12",emoji:"🕛"},{name:"clock130",emoji:"🕜"},{name:"clock230",emoji:"🕝"},{name:"clock330",emoji:"🕞"},{name:"clock430",emoji:"🕟"},{name:"clock530",emoji:"🕠"},{name:"clock630",emoji:"🕡"},{name:"clock730",emoji:"🕢"},{name:"clock830",emoji:"🕣"},{name:"clock930",emoji:"🕤"},{name:"clock1030",emoji:"🕥"},{name:"clock1130",emoji:"🕦"},{name:"clock1230",emoji:"🕧"},{name:"afghanistan",emoji:"🇦🇫"},{name:"aland_islands",emoji:"🇦🇽"},{name:"albania",emoji:"🇦🇱"},{name:"algeria",emoji:"🇩🇿"},{name:"american_samoa",emoji:"🇦🇸"},{name:"andorra",emoji:"🇦🇩"},{name:"angola",emoji:"🇦🇴"},{name:"anguilla",emoji:"🇦🇮"},{name:"antarctica",emoji:"🇦🇶"},{name:"antigua_barbuda",emoji:"🇦🇬"},{name:"argentina",emoji:"🇦🇷"},{name:"armenia",emoji:"🇦🇲"},{name:"aruba",emoji:"🇦🇼"},{name:"australia",emoji:"🇦🇺"},{name:"austria",emoji:"🇦🇹"},{name:"azerbaijan",emoji:"🇦🇿"},{name:"bahamas",emoji:"🇧🇸"},{name:"bahrain",emoji:"🇧🇭"},{name:"bangladesh",emoji:"🇧🇩"},{name:"barbados",emoji:"🇧🇧"},{name:"belarus",emoji:"🇧🇾"},{name:"belgium",emoji:"🇧🇪"},{name:"belize",emoji:"🇧🇿"},{name:"benin",emoji:"🇧🇯"},{name:"bermuda",emoji:"🇧🇲"},{name:"bhutan",emoji:"🇧🇹"},{name:"bolivia",emoji:"🇧🇴"},{name:"caribbean_netherlands",emoji:"🇧🇶"},{name:"bosnia_herzegovina",emoji:"🇧🇦"},{name:"botswana",emoji:"🇧🇼"},{name:"brazil",emoji:"🇧🇷"},{name:"british_indian_ocean_territory",emoji:"🇮🇴"},{name:"british_virgin_islands",emoji:"🇻🇬"},{name:"brunei",emoji:"🇧🇳"},{name:"bulgaria",emoji:"🇧🇬"},{name:"burkina_faso",emoji:"🇧🇫"},{name:"burundi",emoji:"🇧🇮"},{name:"cape_verde",emoji:"🇨🇻"},{name:"cambodia",emoji:"🇰🇭"},{name:"cameroon",emoji:"🇨🇲"},{name:"canada",emoji:"🇨🇦"},{name:"canary_islands",emoji:"🇮🇨"},{name:"cayman_islands",emoji:"🇰🇾"},{name:"central_african_republic",emoji:"🇨🇫"},{name:"chad",emoji:"🇹🇩"},{name:"chile",emoji:"🇨🇱"},{name:"cn",emoji:"🇨🇳"},{name:"christmas_island",emoji:"🇨🇽"},{name:"cocos_islands",emoji:"🇨🇨"},{name:"colombia",emoji:"🇨🇴"},{name:"comoros",emoji:"🇰🇲"},{name:"congo_brazzaville",emoji:"🇨🇬"},{name:"congo_kinshasa",emoji:"🇨🇩"},{name:"cook_islands",emoji:"🇨🇰"},{name:"costa_rica",emoji:"🇨🇷"},{name:"croatia",emoji:"🇭🇷"},{name:"cuba",emoji:"🇨🇺"},{name:"curacao",emoji:"🇨🇼"},{name:"cyprus",emoji:"🇨🇾"},{name:"czech_republic",emoji:"🇨🇿"},{name:"denmark",emoji:"🇩🇰"},{name:"djibouti",emoji:"🇩🇯"},{name:"dominica",emoji:"🇩🇲"},{name:"dominican_republic",emoji:"🇩🇴"},{name:"ecuador",emoji:"🇪🇨"},{name:"egypt",emoji:"🇪🇬"},{name:"el_salvador",emoji:"🇸🇻"},{name:"equatorial_guinea",emoji:"🇬🇶"},{name:"eritrea",emoji:"🇪🇷"},{name:"estonia",emoji:"🇪🇪"},{name:"ethiopia",emoji:"🇪🇹"},{name:"eu",emoji:"🇪🇺"},{name:"falkland_islands",emoji:"🇫🇰"},{name:"faroe_islands",emoji:"🇫🇴"},{name:"fiji",emoji:"🇫🇯"},{name:"finland",emoji:"🇫🇮"},{name:"fr",emoji:"🇫🇷"},{name:"french_guiana",emoji:"🇬🇫"},{name:"french_polynesia",emoji:"🇵🇫"},{name:"french_southern_territories",emoji:"🇹🇫"},{name:"gabon",emoji:"🇬🇦"},{name:"gambia",emoji:"🇬🇲"},{name:"georgia",emoji:"🇬🇪"},{name:"de",emoji:"🇩🇪"},{name:"ghana",emoji:"🇬🇭"},{name:"gibraltar",emoji:"🇬🇮"},{name:"greece",emoji:"🇬🇷"},{name:"greenland",emoji:"🇬🇱"},{name:"grenada",emoji:"🇬🇩"},{name:"guadeloupe",emoji:"🇬🇵"},{name:"guam",emoji:"🇬🇺"},{name:"guatemala",emoji:"🇬🇹"},{name:"guernsey",emoji:"🇬🇬"},{name:"guinea",emoji:"🇬🇳"},{name:"guinea_bissau",emoji:"🇬🇼"},{name:"guyana",emoji:"🇬🇾"},{name:"haiti",emoji:"🇭🇹"},{name:"honduras",emoji:"🇭🇳"},{name:"hong_kong",emoji:"🇭🇰"},{name:"hungary",emoji:"🇭🇺"},{name:"iceland",emoji:"🇮🇸"},{name:"india",emoji:"🇮🇳"},{name:"indonesia",emoji:"🇮🇩"},{name:"iran",emoji:"🇮🇷"},{name:"iraq",emoji:"🇮🇶"},{name:"ireland",emoji:"🇮🇪"},{name:"isle_of_man",emoji:"🇮🇲"},{name:"israel",emoji:"🇮🇱"},{name:"it",emoji:"🇮🇹"},{name:"cote_divoire",emoji:"🇨🇮"},{name:"jamaica",emoji:"🇯🇲"},{name:"jp",emoji:"🇯🇵"},{name:"jersey",emoji:"🇯🇪"},{name:"jordan",emoji:"🇯🇴"},{name:"kazakhstan",emoji:"🇰🇿"},{name:"kenya",emoji:"🇰🇪"},{name:"kiribati",emoji:"🇰🇮"},{name:"kosovo",emoji:"🇽🇰"},{name:"kuwait",emoji:"🇰🇼"},{name:"kyrgyzstan",emoji:"🇰🇬"},{name:"laos",emoji:"🇱🇦"},{name:"latvia",emoji:"🇱🇻"},{name:"lebanon",emoji:"🇱🇧"},{name:"lesotho",emoji:"🇱🇸"},{name:"liberia",emoji:"🇱🇷"},{name:"libya",emoji:"🇱🇾"},{name:"liechtenstein",emoji:"🇱🇮"},{name:"lithuania",emoji:"🇱🇹"},{name:"luxembourg",emoji:"🇱🇺"},{name:"macau",emoji:"🇲🇴"},{name:"macedonia",emoji:"🇲🇰"},{name:"madagascar",emoji:"🇲🇬"},{name:"malawi",emoji:"🇲🇼"},{name:"malaysia",emoji:"🇲🇾"},{name:"maldives",emoji:"🇲🇻"},{name:"mali",emoji:"🇲🇱"},{name:"malta",emoji:"🇲🇹"},{name:"marshall_islands",emoji:"🇲🇭"},{name:"martinique",emoji:"🇲🇶"},{name:"mauritania",emoji:"🇲🇷"},{name:"mauritius",emoji:"🇲🇺"},{name:"mayotte",emoji:"🇾🇹"},{name:"mexico",emoji:"🇲🇽"},{name:"micronesia",emoji:"🇫🇲"},{name:"moldova",emoji:"🇲🇩"},{name:"monaco",emoji:"🇲🇨"},{name:"mongolia",emoji:"🇲🇳"},{name:"montenegro",emoji:"🇲🇪"},{name:"montserrat",emoji:"🇲🇸"},{name:"morocco",emoji:"🇲🇦"},{name:"mozambique",emoji:"🇲🇿"},{name:"myanmar",emoji:"🇲🇲"},{name:"namibia",emoji:"🇳🇦"},{name:"nauru",emoji:"🇳🇷"},{name:"nepal",emoji:"🇳🇵"},{name:"netherlands",emoji:"🇳🇱"},{name:"new_caledonia",emoji:"🇳🇨"},{name:"new_zealand",emoji:"🇳🇿"},{name:"nicaragua",emoji:"🇳🇮"},{name:"niger",emoji:"🇳🇪"},{name:"nigeria",emoji:"🇳🇬"},{name:"niue",emoji:"🇳🇺"},{name:"norfolk_island",emoji:"🇳🇫"},{name:"northern_mariana_islands",emoji:"🇲🇵"},{name:"north_korea",emoji:"🇰🇵"},{name:"norway",emoji:"🇳🇴"},{name:"oman",emoji:"🇴🇲"},{name:"pakistan",emoji:"🇵🇰"},{name:"palau",emoji:"🇵🇼"},{name:"palestinian_territories",emoji:"🇵🇸"},{name:"panama",emoji:"🇵🇦"},{name:"papua_new_guinea",emoji:"🇵🇬"},{name:"paraguay",emoji:"🇵🇾"},{name:"peru",emoji:"🇵🇪"},{name:"philippines",emoji:"🇵🇭"},{name:"pitcairn_islands",emoji:"🇵🇳"},{name:"poland",emoji:"🇵🇱"},{name:"portugal",emoji:"🇵🇹"},{name:"puerto_rico",emoji:"🇵🇷"},{name:"qatar",emoji:"🇶🇦"},{name:"reunion",emoji:"🇷🇪"},{name:"romania",emoji:"🇷🇴"},{name:"ru",emoji:"🇷🇺"},{name:"rwanda",emoji:"🇷🇼"},{name:"st_barthelemy",emoji:"🇧🇱"},{name:"st_helena",emoji:"🇸🇭"},{name:"st_kitts_nevis",emoji:"🇰🇳"},{name:"st_lucia",emoji:"🇱🇨"},{name:"st_pierre_miquelon",emoji:"🇵🇲"},{name:"st_vincent_grenadines",emoji:"🇻🇨"},{name:"samoa",emoji:"🇼🇸"},{name:"san_marino",emoji:"🇸🇲"},{name:"sao_tome_principe",emoji:"🇸🇹"},{name:"saudi_arabia",emoji:"🇸🇦"},{name:"senegal",emoji:"🇸🇳"},{name:"serbia",emoji:"🇷🇸"},{name:"seychelles",emoji:"🇸🇨"},{name:"sierra_leone",emoji:"🇸🇱"},{name:"singapore",emoji:"🇸🇬"},{name:"sint_maarten",emoji:"🇸🇽"},{name:"slovakia",emoji:"🇸🇰"},{name:"slovenia",emoji:"🇸🇮"},{name:"solomon_islands",emoji:"🇸🇧"},{name:"somalia",emoji:"🇸🇴"},{name:"south_africa",emoji:"🇿🇦"},{name:"south_georgia_south_sandwich_islands",emoji:"🇬🇸"},{name:"kr",emoji:"🇰🇷"},{name:"south_sudan",emoji:"🇸🇸"},{name:"es",emoji:"🇪🇸"},{name:"sri_lanka",emoji:"🇱🇰"},{name:"sudan",emoji:"🇸🇩"},{name:"suriname",emoji:"🇸🇷"},{name:"swaziland",emoji:"🇸🇿"},{name:"sweden",emoji:"🇸🇪"},{name:"switzerland",emoji:"🇨🇭"},{name:"syria",emoji:"🇸🇾"},{name:"taiwan",emoji:"🇹🇼"},{name:"tajikistan",emoji:"🇹🇯"},{name:"tanzania",emoji:"🇹🇿"},{name:"thailand",emoji:"🇹🇭"},{name:"timor_leste",emoji:"🇹🇱"},{name:"togo",emoji:"🇹🇬"},{name:"tokelau",emoji:"🇹🇰"},{name:"tonga",emoji:"🇹🇴"},{name:"trinidad_tobago",emoji:"🇹🇹"},{name:"tunisia",emoji:"🇹🇳"},{name:"tr",emoji:"🇹🇷"},{name:"turkmenistan",emoji:"🇹🇲"},{name:"turks_caicos_islands",emoji:"🇹🇨"},{name:"tuvalu",emoji:"🇹🇻"},{name:"uganda",emoji:"🇺🇬"},{name:"ukraine",emoji:"🇺🇦"},{name:"united_arab_emirates",emoji:"🇦🇪"},{name:"uk",emoji:"🇬🇧"},{name:"us",emoji:"🇺🇸"},{name:"us_virgin_islands",emoji:"🇻🇮"},{name:"uruguay",emoji:"🇺🇾"},{name:"uzbekistan",emoji:"🇺🇿"},{name:"vanuatu",emoji:"🇻🇺"},{name:"vatican_city",emoji:"🇻🇦"},{name:"venezuela",emoji:"🇻🇪"},{name:"vietnam",emoji:"🇻🇳"},{name:"wallis_futuna",emoji:"🇼🇫"},{name:"western_sahara",emoji:"🇪🇭"},{name:"yemen",emoji:"🇾🇪"},{name:"zambia",emoji:"🇿🇲"},{name:"zimbabwe",emoji:"🇿🇼"},{name:"star_struck",emoji:"🤩"},{name:"face_with_raised_eyebrow",emoji:"🤨"},{name:"exploding_head",emoji:"🤯"},{name:"crazy_face",emoji:"🤪"},{name:"face_with_symbols_over_mouth",emoji:"🤬"},{name:"face_vomiting",emoji:"🤮"},{name:"shushing_face",emoji:"🤫"},{name:"face_with_hand_over_mouth",emoji:"🤭"},{name:"face_with_monocle",emoji:"🧐"},{name:"child",emoji:"🧒"},{name:"adult",emoji:"🧑"},{name:"older_adult",emoji:"🧓"},{name:"woman_with_headscarf",emoji:"🧕"},{name:"bearded_person",emoji:"🧔"},{name:"breast_feeding",emoji:"🤱"},{name:"mage",emoji:"🧙"},{name:"woman_mage",emoji:"🧙♀️"},{name:"fairy",emoji:"🧚"},{name:"vampire",emoji:"🧛"},{name:"merperson",emoji:"🧜"},{name:"merman",emoji:"🧜♂️"},{name:"elf",emoji:"🧝"},{name:"genie",emoji:"🧞"},{name:"woman_genie",emoji:"🧞♀"},{name:"zombie",emoji:"🧟"},{name:"woman_zombie",emoji:"🧟♀"},{name:"person_in_steamy_room",emoji:"🧖"},{name:"woman_in_steamy_room",emoji:"🧖♀️"},{name:"person_climbing",emoji:"🧗"},{name:"woman_climbing",emoji:"🧗♀️"},{name:"person_in_lotus_position",emoji:"🧘"},{name:"woman_in_lotus_position",emoji:"🧘♀️"},{name:"love_you_gesture",emoji:"🤟"},{name:"palms_up_together",emoji:"🤲"},{name:"brain",emoji:"🧠"},{name:"orange_heart",emoji:"🧡"},{name:"scarf",emoji:"🧣"},{name:"gloves",emoji:"🧤"},{name:"coat",emoji:"🧥"},{name:"socks",emoji:"🧦"},{name:"billed_cap",emoji:"🧢"},{name:"zebra",emoji:"🦓"},{name:"giraffe",emoji:"🦒"},{name:"hedgehog",emoji:"🦔"},{name:"sauropod",emoji:"🦕"},{name:"t_rex",emoji:"🦖"},{name:"cricket",emoji:"🦗"},{name:"coconut",emoji:"🥥"},{name:"broccoli",emoji:"🥦"},{name:"pretzel",emoji:"🥨"},{name:"cut_of_meat",emoji:"🥩"},{name:"sandwich",emoji:"🥪"},{name:"bowl_with_spoon",emoji:"🥣"},{name:"canned_food",emoji:"🥫"},{name:"dumpling",emoji:"🥟"},{name:"fortune_cookie",emoji:"🥠"},{name:"takeout_box",emoji:"🥡"},{name:"pie",emoji:"🥧"},{name:"cup_with_straw",emoji:"🥤"},{name:"chopsticks",emoji:"🥢"},{name:"flying_saucer",emoji:"🛸"},{name:"sled",emoji:"🛷"},{name:"curling_stone",emoji:"🥌"},{name:"svalbard_and_jan_mayen",emoji:"🇸🇯"},{name:"st_martin",emoji:"🇲🇫"},{name:"us_outlying_islands",emoji:"🇺🇲"},{name:"tristan_da_cunha",emoji:"🇹🇦"},{name:"heard_and_mc_donald_islands",emoji:"🇭🇲"},{name:"ceuta_and_melilla",emoji:"🇪🇦"},{name:"diego_garcia",emoji:"🇩🇬"},{name:"ascension_island",emoji:"🇦🇨"},{name:"bouvet_island",emoji:"🇧🇻"},{name:"clipperton_island",emoji:"🇨🇵"},{name:"united_nations",emoji:"🇺🇳"},{name:"smiling_face_with_three_hearts",emoji:"🥰"},{name:"hot_face",emoji:"🥵"},{name:"cold_face",emoji:"🥶"},{name:"partying_face",emoji:"🥳"},{name:"woozy_face",emoji:"🥴"},{name:"pleading_face",emoji:"🥺"},{name:"man_red_haired",emoji:"👨🦰"},{name:"man_curly_haired",emoji:"👨🦱"},{name:"man_white_haired",emoji:"👨🦳"},{name:"man_bald",emoji:"👨🦲"},{name:"woman_red_haired",emoji:"👩🦰"},{name:"woman_curly_haired",emoji:"👩🦱"},{name:"woman_white_haired",emoji:"👩🦳"},{name:"woman_bald",emoji:"👩🦲"},{name:"superhero",emoji:"🦸"},{name:"man_superhero",emoji:"🦸♂️"},{name:"woman_superhero",emoji:"🦸♀️"},{name:"supervillain",emoji:"🦹"},{name:"woman_supervillain",emoji:"🦹♀️"},{name:"man_supervillain",emoji:"🦹♂️"},{name:"leg",emoji:"🦵"},{name:"foot",emoji:"🦶"},{name:"bone",emoji:"🦴"},{name:"tooth",emoji:"🦷"},{name:"goggles",emoji:"🥽"},{name:"lab_coat",emoji:"🥼"},{name:"hiking_boot",emoji:"🥾"},{name:"flat_shoe",emoji:"🥿"},{name:"raccoon",emoji:"🦝"},{name:"llama",emoji:"🦙"},{name:"hippopotamus",emoji:"🦛"},{name:"kangaroo",emoji:"🦘"},{name:"badger",emoji:"🦡"},{name:"swan",emoji:"🦢"},{name:"peacock",emoji:"🦚"},{name:"parrot",emoji:"🦜"},{name:"lobster",emoji:"🦞"},{name:"mosquito",emoji:"🦟"},{name:"microbe",emoji:"🦠"},{name:"mango",emoji:"🥭"},{name:"leafy_green",emoji:"🥬"},{name:"bagel",emoji:"🥯"},{name:"salt",emoji:"🧂"},{name:"moon_cake",emoji:"🥮"},{name:"cupcake",emoji:"🧁"},{name:"compass",emoji:"🧭"},{name:"brick",emoji:"🧱"},{name:"skateboard",emoji:"🛹"},{name:"luggage",emoji:"🧳"},{name:"firecracker",emoji:"🧨"},{name:"red_gift_envelope",emoji:"🧧"},{name:"softball",emoji:"🥎"},{name:"flying_disc",emoji:"🥏"},{name:"lacrosse",emoji:"🥍"},{name:"nazar_amulet",emoji:"🧿"},{name:"jigsaw",emoji:"🧩"},{name:"teddy_bear",emoji:"🧸"},{name:"chess_pawn",emoji:"♟"},{name:"thread",emoji:"🧵"},{name:"yarn",emoji:"🧶"},{name:"abacus",emoji:"🧮"},{name:"receipt",emoji:"🧾"},{name:"toolbox",emoji:"🧰"},{name:"magnet",emoji:"🧲"},{name:"test_tube",emoji:"🧪"},{name:"petri_dish",emoji:"🧫"},{name:"dna",emoji:"🧬"},{name:"lotion_bottle",emoji:"🧴"},{name:"safety_pin",emoji:"🧷"},{name:"broom",emoji:"🧹"},{name:"basket",emoji:"🧺"},{name:"roll_of_toilet_paper",emoji:"🧻"},{name:"soap",emoji:"🧼"},{name:"sponge",emoji:"🧽"},{name:"fire_extinguisher",emoji:"🧯"},{name:"infinity",emoji:"♾"},{name:"pirate_flag",emoji:"🏴☠"},{name:"waffle",emoji:"🧇"},{name:"otter",emoji:"🦦"},{name:"sloth",emoji:"🦥"},{name:"ice_cube",emoji:"🧊"},{name:"ringer_planet",emoji:"🪐"},{name:"flamingo",emoji:"🦩"},{name:"yawning_face",emoji:"🥱"},{name:"pinching_hand",emoji:"🤏"},{name:"service_dog",emoji:"🐕🦺"},{name:"orangutan",emoji:"🦧"},{name:"auto_rickshaw",emoji:"🛺"},{name:"parachute",emoji:"🪂"},{name:"yo-yo",emoji:"🪀"},{name:"kite",emoji:"🪁"},{name:"brown_square",emoji:"🟫"},{name:"purple_square",emoji:"🟪"},{name:"blue_square",emoji:"🟦"},{name:"green_square",emoji:"🟩"},{name:"yellow_square",emoji:"🟨"},{name:"orange_square",emoji:"🟧"},{name:"red_square",emoji:"🟥"},{name:"brown_circle",emoji:"🟤"},{name:"purple_circle",emoji:"🟣"},{name:"green_circle",emoji:"🟢"},{name:"yellow_circle",emoji:"🟡"},{name:"orange_circle",emoji:"🟠"},{name:"razor",emoji:"🪒"},{name:"chair",emoji:"🪑"},{name:"stethoscope",emoji:"🩺"},{name:"adhesive_bandage",emoji:"🩹"},{name:"drop_of_blood",emoji:"🩸"},{name:"probing_cane",emoji:"🦯"},{name:"axe",emoji:"🪓"},{name:"diya_lamp",emoji:"🪔"},{name:"banjo",emoji:"🪕"},{name:"ballet_shoes",emoji:"🩰"},{name:"shorts",emoji:"🩳"},{name:"briefs",emoji:"🩲"},{name:"one_piece_swimsuit",emoji:"🩱"},{name:"sari",emoji:"🥻"},{name:"safety_vest",emoji:"🦺"},{name:"diving_mask",emoji:"🤿"},{name:"motorized_wheelchair",emoji:"🦼"},{name:"manual_wheelchair",emoji:"🦽"},{name:"hindu_temple",emoji:"🛕"},{name:"maté",emoji:"🧉"},{name:"beverage_box",emoji:"🧃"},{name:"oyster",emoji:"🦪"},{name:"butter",emoji:"🧈"},{name:"falafel",emoji:"🧆"},{name:"onion",emoji:"🧅"},{name:"garlic",emoji:"🧄"},{name:"skunk",emoji:"🦨"},{name:"guide_dog",emoji:"🦮"},{name:"people_holding_hands",emoji:"🧑🤝🧑"},{name:"woman_in_manual_wheelchair",emoji:"👩🦽"},{name:"man_in_manual_wheelchair",emoji:"👨🦽"},{name:"woman_in_motorized_wheelchair",emoji:"👩🦼"},{name:"man_in_motorized_wheelchair",emoji:"👨🦼"},{name:"woman_with_probing_cane",emoji:"👩🦯"},{name:"man_with_probing_cane",emoji:"👨🦯"},{name:"woman_kneeling",emoji:"🧎♀️"},{name:"man_kneeling",emoji:"🧎♂️"},{name:"man_standing",emoji:"🧍♂️"},{name:"woman_standing",emoji:"🧍♀️"},{name:"deaf_woman",emoji:"🧏♀️"},{name:"deaf_man",emoji:"🧏♂️"},{name:"hear_with_hearing_aid",emoji:"🦻"},{name:"mechanical_leg",emoji:"🦿"},{name:"mechanical_arm",emoji:"🦾"},{name:"white_heart",emoji:"🤍"},{name:"brown_heart",emoji:"🤎"},{name:"transgender_flag",emoji:"🏳️⚧"},{name:"smiling_face_with_tear",emoji:"🥲"},{name:"disguised_face",emoji:"🥸"},{name:"pinched_fingers",emoji:"🤌"},{name:"anatomical_heart",emoji:"🫀"},{name:"lungs",emoji:"🫁"},{name:"ninja",emoji:"🥷"},{name:"mx_claus",emoji:"🧑🎄"},{name:"people_hugging",emoji:"🫂"},{name:"black_cat",emoji:"🐈⬛"},{name:"bison",emoji:"🦬"},{name:"mammoth",emoji:"🦣"},{name:"beaver",emoji:"🦫"},{name:"dodo",emoji:"🦤"},{name:"feather",emoji:"🪶"},{name:"seal",emoji:"🦭"},{name:"beetle",emoji:"🪲"},{name:"cockroach",emoji:"🪳"},{name:"fly",emoji:"🪰"},{name:"worm",emoji:"🪱"},{name:"potted_plant",emoji:"🪴"},{name:"blueberries",emoji:"🫐"},{name:"olive",emoji:"🫒"},{name:"bell_pepper",emoji:"🫑"},{name:"flatbread",emoji:"🫓"},{name:"tamale",emoji:"🫔"},{name:"fondue",emoji:"🫕"},{name:"teapot",emoji:"🫖"},{name:"bubble_tea",emoji:"🧋"},{name:"rock",emoji:"🪨"},{name:"wood",emoji:"🪵"},{name:"hut",emoji:"🛖"},{name:"pickup_truck",emoji:"🛻"},{name:"roller_skate",emoji:"🛼"},{name:"magic_wand",emoji:"🪄"},{name:"piñata",emoji:"🪅"},{name:"nesting_dolls",emoji:"🪆"},{name:"sewing_needle",emoji:"🪡"},{name:"knot",emoji:"🪢"},{name:"thong_sandal",emoji:"🩴"},{name:"military_helmet",emoji:"🪖"},{name:"accordion",emoji:"🪗"},{name:"long_drum",emoji:"🪘"},{name:"coin",emoji:"🪙"},{name:"boomerang",emoji:"🪃"},{name:"carpentry_saw",emoji:"🪚"},{name:"screwdriver",emoji:"🪛"},{name:"hook",emoji:"🪝"},{name:"ladder",emoji:"🪜"},{name:"mirror",emoji:"🪞"},{name:"window",emoji:"🪟"},{name:"plunger",emoji:"🪠"},{name:"mouse_trap",emoji:"🪤"},{name:"bucket",emoji:"🪣"},{name:"toothbrush",emoji:"🪥"},{name:"headstone",emoji:"🪦"},{name:"placard",emoji:"🪧"},{name:"transgender_symbol",emoji:"⚧"},{name:"man_feeding_baby",emoji:"👨🍼"},{name:"person_feeding_baby",emoji:"🧑🍼"},{name:"polar_bear",emoji:"🐻❄"},{name:"melting_face",emoji:"🫠"},{name:"smiling_face",emoji:"☺"},{name:"face_with_open_eyes_and_hand_over_mouth",emoji:"🫢"},{name:"face_with_peeking_eye",emoji:"🫣"},{name:"saluting_face",emoji:"🫡"},{name:"dotted_line_face",emoji:"🫥"},{name:"face_in_clouds",emoji:"😶🌫"},{name:"face_exhaling",emoji:"😮💨"},{name:"face_with_spiral_eyes",emoji:"😵💫"},{name:"face_with_diagonal_mouth",emoji:"🫤"},{name:"frowning_face",emoji:"☹"},{name:"face_holding_back_tears",emoji:"🥹"},{name:"heart_on_fire",emoji:"❤️🔥"},{name:"mending_heart",emoji:"❤️🩹"},{name:"eye_in_speech_bubble",emoji:"👁️🗨"},{name:"rightwards_hand",emoji:"🫱"},{name:"leftwards_hand",emoji:"🫲"},{name:"palm_down_hand",emoji:"🫳"},{name:"palm_up_hand",emoji:"🫴"},{name:"hand_with_index_finger_and_thumb_crossed",emoji:"🫰"},{name:"index_pointing_at_the_viewer",emoji:"🫵"},{name:"heart_hands",emoji:"🫶"},{name:"biting_lip",emoji:"🫦"},{name:"man_beard",emoji:"🧔♂"},{name:"woman_beard",emoji:"🧔♀"},{name:"person_red_hair",emoji:"🧑🦰"},{name:"person_curly_hair",emoji:"🧑🦱"},{name:"person_white_hair",emoji:"🧑🦳"},{name:"person_bald",emoji:"🧑🦲"},{name:"man_blond_hair",emoji:"👱♂️"},{name:"person_frowning",emoji:"🙍"},{name:"person_pouting",emoji:"🙎"},{name:"person_gesturing_no",emoji:"🙅"},{name:"person_gesturing_ok",emoji:"🙆"},{name:"person_tipping_hand",emoji:"💁"},{name:"person_raising_hand",emoji:"🙋"},{name:"deaf_person",emoji:"🧏"},{name:"man_bowing",emoji:"🙇♂️"},{name:"person_facepalming",emoji:"🤦"},{name:"person_shrugging",emoji:"🤷"},{name:"health_worker",emoji:"🧑⚕️"},{name:"student",emoji:"🧑🎓"},{name:"teacher",emoji:"🧑🏫"},{name:"judge",emoji:"🧑⚖️"},{name:"farmer",emoji:"🧑🌾"},{name:"cook",emoji:"🧑🍳"},{name:"mechanic",emoji:"🧑🔧"},{name:"factory_worker",emoji:"🧑🏭"},{name:"office_worker",emoji:"🧑💼"},{name:"scientist",emoji:"🧑🔬"},{name:"technologist",emoji:"🧑💻"},{name:"singer",emoji:"🧑🎤"},{name:"artist",emoji:"🧑🎨"},{name:"pilot",emoji:"🧑✈️"},{name:"astronaut",emoji:"🧑🚀"},{name:"firefighter",emoji:"🧑🚒"},{name:"man_police_officer",emoji:"👮♂️"},{name:"man_detective",emoji:"🕵️♂️"},{name:"man_guard",emoji:"💂♂️"},{name:"man_construction_worker",emoji:"👷♂️"},{name:"person_with_crown",emoji:"🫅"},{name:"man_wearing_turban",emoji:"👳♂️"},{name:"man_in_tuxedo",emoji:"🤵♂️"},{name:"woman_in_tuxedo",emoji:"🤵♀️"},{name:"man_with_veil",emoji:"👰♂️"},{name:"woman_with_veil",emoji:"👰♀️"},{name:"pregnant_man",emoji:"🫃"},{name:"pregnant_person",emoji:"🫄"},{name:"woman_feeding_baby",emoji:"👩🍼"},{name:"man_mage",emoji:"🧙♂️"},{name:"man_fairy",emoji:"🧚♂️"},{name:"woman_fairy",emoji:"🧚♀️"},{name:"man_vampire",emoji:"🧛♂️"},{name:"woman_vampire",emoji:"🧛♀️"},{name:"mermaid",emoji:"🧜♀️"},{name:"man_elf",emoji:"🧝♂️"},{name:"woman_elf",emoji:"🧝♀️"},{name:"man_genie",emoji:"🧞♂"},{name:"man_zombie",emoji:"🧟♂"},{name:"troll",emoji:"🧌"},{name:"person_getting_massage",emoji:"💆"},{name:"person_getting_haircut",emoji:"💇"},{name:"man_walking",emoji:"🚶♂️"},{name:"person_standing",emoji:"🧍"},{name:"person_kneeling",emoji:"🧎"},{name:"person_with_white_cane",emoji:"🧑🦯"},{name:"person_in_motorized_wheelchair",emoji:"🧑🦼"},{name:"person_in_manual_wheelchair",emoji:"🧑🦽"},{name:"man_running",emoji:"🏃♂️"},{name:"women_with_bunny_ears",emoji:"👯♀"},{name:"man_in_steamy_room",emoji:"🧖♂️"},{name:"man_climbing",emoji:"🧗♂️"},{name:"man_golfing",emoji:"🏌️♂️"},{name:"man_surfing",emoji:"🏄♂️"},{name:"man_rowing_boat",emoji:"🚣♂️"},{name:"man_swimming",emoji:"🏊♂️"},{name:"man_bouncing_ball",emoji:"⛹️♂️"},{name:"man_lifting_weights",emoji:"🏋️♂️"},{name:"man_biking",emoji:"🚴♂️"},{name:"man_mountain_biking",emoji:"🚵♂️"},{name:"person_cartwheeling",emoji:"🤸"},{name:"people_wrestling",emoji:"🤼"},{name:"person_playing_water_polo",emoji:"🤽"},{name:"person_playing_handball",emoji:"🤾"},{name:"person_juggling",emoji:"🤹"},{name:"man_in_lotus_position",emoji:"🧘♂️"},{name:"kiss_woman_man",emoji:"👩❤️💋👨"},{name:"couple_with_heart_woman_man",emoji:"👩❤️👨"},{name:"family_man_woman_boy",emoji:"👨👩👦"},{name:"red_hair",emoji:"🦰"},{name:"curly_hair",emoji:"🦱"},{name:"white_hair",emoji:"🦳"},{name:"bald",emoji:"🦲"},{name:"coral",emoji:"🪸"},{name:"lotus",emoji:"🪷"},{name:"empty_nest",emoji:"🪹"},{name:"nest_with_eggs",emoji:"🪺"},{name:"beans",emoji:"🫘"},{name:"pouring_liquid",emoji:"🫗"},{name:"jar",emoji:"🫙"},{name:"playground_slide",emoji:"🛝"},{name:"wheel",emoji:"🛞"},{name:"ring_buoy",emoji:"🛟"},{name:"hamsa",emoji:"🪬"},{name:"mirror_ball",emoji:"🪩"},{name:"low_battery",emoji:"🪫"},{name:"crutch",emoji:"🩼"},{name:"xray",emoji:"🩻"},{name:"elevator",emoji:"🛗"},{name:"bubbles",emoji:"🫧"},{name:"identification_card",emoji:"🪪"},{name:"eject_button",emoji:"⏏"},{name:"female_sign",emoji:"♀"},{name:"male_sign",emoji:"♂"},{name:"heavy_equals_sign",emoji:"🟰"},{name:"medical_symbol",emoji:"⚕"},{name:"england",emoji:"🏴"},{name:"scotland",emoji:"🏴"},{name:"wales",emoji:"🏴"}],Fre=zre;k0({name:"emoji",char:":",pluginKey:new jt("emojiSuggestion"),items:({query:r})=>Fre.filter(e=>e.name.toLowerCase().includes(r.toLowerCase())).sort((e,t)=>{const n=e.name.toLowerCase(),i=t.name.toLowerCase(),a=r.toLowerCase();return n===a&&i!==a?-1:i===a&&n!==a?1:n.startsWith(a)&&!i.startsWith(a)?-1:i.startsWith(a)&&!n.startsWith(a)?1:n.length-i.length}).slice(0,5),command:({editor:r,range:e,props:t})=>{t&&t.emoji?r.chain().focus().deleteRange(e).insertContent(t.emoji).run():console.error("Emoji command execution error: emoji property not found on selected item or item is invalid.",t)},component:Bre});const Vre={key:1,class:"mr-2 h-4 w-4"},$re=Ke({__name:"SlashCommandsList",props:{items:{type:Array,required:!0},editor:{type:Object,required:!0},range:{type:Object,required:!0},command:{type:Function,required:!0},query:String},setup(r,{expose:e}){const t=r,n=te(null),i=o=>{o&&t.command(o)};return e({onKeyDown:({event:o})=>{var s;return((s=n.value)==null?void 0:s.onKeyDown({event:o}))??!1}}),(o,s)=>(Y(),$e(D0,{ref_key:"suggestionList",ref:n,items:t.items,command:l=>i(l),"container-class":"min-w-48","item-class":"h-7","show-no-results":!0},{default:_e(({item:l})=>[l.icon?(Y(),$e(Bh(l.icon),{key:0,class:"mr-2 h-4 w-4"})):(Y(),ae("div",Vre)),Z("span",null,qt(l.title),1)]),_:1},8,["items","command"]))}}),Hre={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Gre(r,e){return Y(),ae("svg",Hre,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 12h8m-8 6V6m8 12V6m9 12h-4c0-4 4-3 4-6c0-1.5-2-2.5-4-1"},null,-1)]))}const Wre=vt({name:"lucide-heading-2",render:Gre}),Ure={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Yre(r,e){return Y(),ae("svg",Ure,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 12h8m-8 6V6m8 12V6m5.5 4.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2m-2 3.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2"},null,-1)]))}const qre=vt({name:"lucide-heading-3",render:Yre}),Xre={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Kre(r,e){return Y(),ae("svg",Xre,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 12h.01M3 18h.01M3 6h.01M8 12h13M8 18h13M8 6h13"},null,-1)]))}const Zre=vt({name:"lucide-list",render:Kre}),Jre={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Qre(r,e){return Y(),ae("svg",Jre,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 12h11m-11 6h11M10 6h11M4 10h2M4 6h1v4m1 8H4c0-1 2-2 2-3s-1-1.5-2-1"},null,-1)]))}const ene=vt({name:"lucide-list-ordered",render:Qre}),tne={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function rne(r,e){return Y(),ae("svg",tne,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m3 17l2 2l4-4M3 7l2 2l4-4m4 1h8m-8 6h8m-8 6h8"},null,-1)]))}const nne=vt({name:"lucide-list-checks",render:rne}),ine={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function ane(r,e){return Y(),ae("svg",ine,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"},null,-1)]))}const one=vt({name:"lucide-code",render:ane}),sne={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function lne(r,e){return Y(),ae("svg",sne,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1a6 6 0 0 0 6-6V5a2 2 0 0 0-2-2zM5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1a6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"},null,-1)]))}const une=vt({name:"lucide-quote",render:lne}),cne={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function fne(r,e){return Y(),ae("svg",cne,e[0]||(e[0]=[Z("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[Z("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}),Z("circle",{cx:"9",cy:"9",r:"2"}),Z("path",{d:"m21 15l-3.086-3.086a2 2 0 0 0-2.828 0L6 21"})],-1)]))}const hne=vt({name:"lucide-image",render:fne}),dne={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function pne(r,e){return Y(),ae("svg",dne,e[0]||(e[0]=[Z("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[Z("path",{d:"m16 13l5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"}),Z("rect",{width:"14",height:"12",x:"2",y:"6",rx:"2"})],-1)]))}const vne=vt({name:"lucide-video",render:pne}),mne={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function gne(r,e){return Y(),ae("svg",mne,e[0]||(e[0]=[Z("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[Z("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),Z("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})],-1)]))}const yne=vt({name:"lucide-link",render:gne}),bne={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function _ne(r,e){return Y(),ae("svg",bne,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",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"},null,-1)]))}const xne=vt({name:"lucide-table-2",render:_ne}),wne=new jt("slashCommandSuggestion"),Sne=()=>[{title:"Heading 2",icon:Wre,command:({editor:r,range:e})=>{r.chain().focus().deleteRange(e).setNode("heading",{level:2}).run()}},{title:"Heading 3",icon:qre,command:({editor:r,range:e})=>{r.chain().focus().deleteRange(e).setNode("heading",{level:3}).run()}},{title:"Bullet List",icon:Zre,command:({editor:r,range:e})=>{r.chain().focus().deleteRange(e).toggleBulletList().run()}},{title:"Numbered List",icon:ene,command:({editor:r,range:e})=>{r.chain().focus().deleteRange(e).toggleOrderedList().run()}},{title:"Task List",icon:nne,command:({editor:r,range:e})=>{r.chain().focus().deleteRange(e).toggleTaskList().run()}},{title:"Code Block",icon:one,command:({editor:r,range:e})=>{r.chain().focus().deleteRange(e).toggleCodeBlock().run()}},{title:"Blockquote",icon:une,command:({editor:r,range:e})=>{r.chain().focus().deleteRange(e).toggleBlockquote().run()}},{title:"Image",icon:hne,command:({editor:r,range:e})=>{r.chain().focus().deleteRange(e).selectAndUploadImage().run()}},{title:"Video",icon:vne,command:({editor:r,range:e})=>{r.chain().focus().deleteRange(e).selectAndUploadVideo().run()}},{title:"Link",icon:yne,command:({editor:r,range:e})=>{r.chain().focus().deleteRange(e).setLink({href:""}).run()}},{title:"Horizontal Rule",icon:T4,command:({editor:r,range:e})=>{r.chain().focus().deleteRange(e).setHorizontalRule().run()}},{title:"Table",icon:xne,command:({editor:r,range:e})=>{r.chain().focus().deleteRange(e).insertTable({rows:3,cols:3,withHeaderRow:!0}).run()}}];k0({name:"slashCommands",char:"/",pluginKey:wne,items:({query:r})=>Sne().filter(t=>t.title.toLowerCase().startsWith(r.toLowerCase())),command:({editor:r,range:e,props:t})=>{t&&typeof t.command=="function"?t.command({editor:r,range:e}):console.error("Slash command execution error: command function not found on selected item or item is invalid.",t)},component:$re});function qT(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mu=qT();function eB(r){Mu=r}var ed={exec:()=>null};function Ct(r,e=""){let t=typeof r=="string"?r:r.source;const n={replace:(i,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(cn.caret,"$1"),t=t.replace(i,o),n},getRegex:()=>new RegExp(t,e)};return n}var cn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},Tne=/^(?:[ \t]*(?:\n|$))+/,Cne=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ane=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,bp=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Mne=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,XT=/(?:[*+-]|\d{1,9}[.)])/,tB=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,rB=Ct(tB).replace(/bull/g,XT).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),kne=Ct(tB).replace(/bull/g,XT).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),KT=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Dne=/^[^\n]+/,ZT=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Ene=Ct(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ZT).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Lne=Ct(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,XT).getRegex(),E0="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",JT=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ine=Ct("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",JT).replace("tag",E0).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),nB=Ct(KT).replace("hr",bp).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",E0).getRegex(),Pne=Ct(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",nB).getRegex(),QT={blockquote:Pne,code:Cne,def:Ene,fences:Ane,heading:Mne,hr:bp,html:Ine,lheading:rB,list:Lne,newline:Tne,paragraph:nB,table:ed,text:Dne},LD=Ct("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",bp).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",E0).getRegex(),Rne={...QT,lheading:kne,table:LD,paragraph:Ct(KT).replace("hr",bp).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",LD).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",E0).getRegex()},One={...QT,html:Ct(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",JT).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ed,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ct(KT).replace("hr",bp).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",rB).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},jne=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Nne=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,iB=/^( {2,}|\\)\n(?!\s*$)/,Bne=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,L0=/[\p{P}\p{S}]/u,eC=/[\s\p{P}\p{S}]/u,aB=/[^\s\p{P}\p{S}]/u,zne=Ct(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,eC).getRegex(),oB=/(?!~)[\p{P}\p{S}]/u,Fne=/(?!~)[\s\p{P}\p{S}]/u,Vne=/(?:[^\s\p{P}\p{S}]|~)/u,$ne=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,sB=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Hne=Ct(sB,"u").replace(/punct/g,L0).getRegex(),Gne=Ct(sB,"u").replace(/punct/g,oB).getRegex(),lB="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Wne=Ct(lB,"gu").replace(/notPunctSpace/g,aB).replace(/punctSpace/g,eC).replace(/punct/g,L0).getRegex(),Une=Ct(lB,"gu").replace(/notPunctSpace/g,Vne).replace(/punctSpace/g,Fne).replace(/punct/g,oB).getRegex(),Yne=Ct("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,aB).replace(/punctSpace/g,eC).replace(/punct/g,L0).getRegex(),qne=Ct(/\\(punct)/,"gu").replace(/punct/g,L0).getRegex(),Xne=Ct(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Kne=Ct(JT).replace("(?:-->|$)","-->").getRegex(),Zne=Ct("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Kne).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),iy=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Jne=Ct(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",iy).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),uB=Ct(/^!?\[(label)\]\[(ref)\]/).replace("label",iy).replace("ref",ZT).getRegex(),cB=Ct(/^!?\[(ref)\](?:\[\])?/).replace("ref",ZT).getRegex(),Qne=Ct("reflink|nolink(?!\\()","g").replace("reflink",uB).replace("nolink",cB).getRegex(),tC={_backpedal:ed,anyPunctuation:qne,autolink:Xne,blockSkip:$ne,br:iB,code:Nne,del:ed,emStrongLDelim:Hne,emStrongRDelimAst:Wne,emStrongRDelimUnd:Yne,escape:jne,link:Jne,nolink:cB,punctuation:zne,reflink:uB,reflinkSearch:Qne,tag:Zne,text:Bne,url:ed},eie={...tC,link:Ct(/^!?\[(label)\]\((.*?)\)/).replace("label",iy).getRegex(),reflink:Ct(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",iy).getRegex()},Nw={...tC,emStrongRDelimAst:Une,emStrongLDelim:Gne,url:Ct(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},tie={...Nw,br:Ct(iB).replace("{2,}","*").getRegex(),text:Ct(Nw.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},uv={normal:QT,gfm:Rne,pedantic:One},Bf={normal:tC,gfm:Nw,breaks:tie,pedantic:eie},rie={"&":"&","<":"<",">":">",'"':""","'":"'"},ID=r=>rie[r];function Ji(r,e){if(e){if(cn.escapeTest.test(r))return r.replace(cn.escapeReplace,ID)}else if(cn.escapeTestNoEncode.test(r))return r.replace(cn.escapeReplaceNoEncode,ID);return r}function PD(r){try{r=encodeURI(r).replace(cn.percentDecode,"%")}catch{return null}return r}function RD(r,e){var a;const t=r.replace(cn.findPipe,(o,s,l)=>{let u=!1,c=s;for(;--c>=0&&l[c]==="\\";)u=!u;return u?"|":" |"}),n=t.split(cn.splitPipe);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!((a=n.at(-1))!=null&&a.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(cn.slashPipe,"|");return n}function zf(r,e,t){const n=r.length;if(n===0)return"";let i=0;for(;i<n&&r.charAt(n-i-1)===e;)i++;return r.slice(0,n-i)}function nie(r,e){if(r.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<r.length;n++)if(r[n]==="\\")n++;else if(r[n]===e[0])t++;else if(r[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}function OD(r,e,t,n,i){const a=e.href,o=e.title||null,s=r[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;const l={type:r[0].charAt(0)==="!"?"image":"link",raw:t,href:a,title:o,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,l}function iie(r,e,t){const n=r.match(t.other.indentCodeCompensation);if(n===null)return e;const i=n[1];return e.split(`
|
||
`).map(a=>{const o=a.match(t.other.beginningSpace);if(o===null)return a;const[s]=o;return s.length>=i.length?a.slice(i.length):a}).join(`
|
||
`)}var ay=class{constructor(r){Rt(this,"options");Rt(this,"rules");Rt(this,"lexer");this.options=r||Mu}space(r){const e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){const e=this.rules.block.code.exec(r);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:zf(t,`
|
||
`)}}}fences(r){const e=this.rules.block.fences.exec(r);if(e){const t=e[0],n=iie(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(r){const e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const n=zf(t,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(t=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){const e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:zf(e[0],`
|
||
`)}}blockquote(r){const e=this.rules.block.blockquote.exec(r);if(e){let t=zf(e[0],`
|
||
`).split(`
|
||
`),n="",i="";const a=[];for(;t.length>0;){let o=!1;const s=[];let l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))s.push(t[l]),o=!0;else if(!o)s.push(t[l]);else break;t=t.slice(l);const u=s.join(`
|
||
`),c=u.replace(this.rules.other.blockquoteSetextReplace,`
|
||
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
||
${u}`:u,i=i?`${i}
|
||
${c}`:c;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,a,!0),this.lexer.state.top=f,t.length===0)break;const h=a.at(-1);if((h==null?void 0:h.type)==="code")break;if((h==null?void 0:h.type)==="blockquote"){const d=h,p=d.raw+`
|
||
`+t.join(`
|
||
`),v=this.blockquote(p);a[a.length-1]=v,n=n.substring(0,n.length-d.raw.length)+v.raw,i=i.substring(0,i.length-d.text.length)+v.text;break}else if((h==null?void 0:h.type)==="list"){const d=h,p=d.raw+`
|
||
`+t.join(`
|
||
`),v=this.list(p);a[a.length-1]=v,n=n.substring(0,n.length-h.raw.length)+v.raw,i=i.substring(0,i.length-d.raw.length)+v.raw,t=p.substring(a.at(-1).raw.length).split(`
|
||
`);continue}}return{type:"blockquote",raw:n,tokens:a,text:i}}}list(r){let e=this.rules.block.list.exec(r);if(e){let t=e[1].trim();const n=t.length>1,i={type:"list",raw:"",ordered:n,start:n?+t.slice(0,-1):"",loose:!1,items:[]};t=n?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=n?t:"[*+-]");const a=this.rules.other.listItemRegex(t);let o=!1;for(;r;){let l=!1,u="",c="";if(!(e=a.exec(r))||this.rules.block.hr.test(r))break;u=e[0],r=r.substring(u.length);let f=e[2].split(`
|
||
`,1)[0].replace(this.rules.other.listReplaceTabs,g=>" ".repeat(3*g.length)),h=r.split(`
|
||
`,1)[0],d=!f.trim(),p=0;if(this.options.pedantic?(p=2,c=f.trimStart()):d?p=e[1].length+1:(p=e[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,c=f.slice(p),p+=e[1].length),d&&this.rules.other.blankLine.test(h)&&(u+=h+`
|
||
`,r=r.substring(h.length+1),l=!0),!l){const g=this.rules.other.nextBulletRegex(p),y=this.rules.other.hrRegex(p),b=this.rules.other.fencesBeginRegex(p),_=this.rules.other.headingBeginRegex(p),x=this.rules.other.htmlBeginRegex(p);for(;r;){const w=r.split(`
|
||
`,1)[0];let S;if(h=w,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),S=h):S=h.replace(this.rules.other.tabCharGlobal," "),b.test(h)||_.test(h)||x.test(h)||g.test(h)||y.test(h))break;if(S.search(this.rules.other.nonSpaceChar)>=p||!h.trim())c+=`
|
||
`+S.slice(p);else{if(d||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||b.test(f)||_.test(f)||y.test(f))break;c+=`
|
||
`+h}!d&&!h.trim()&&(d=!0),u+=w+`
|
||
`,r=r.substring(w.length+1),f=S.slice(p)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(o=!0));let v=null,m;this.options.gfm&&(v=this.rules.other.listIsTask.exec(c),v&&(m=v[0]!=="[ ] ",c=c.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:u,task:!!v,checked:m,loose:!1,text:c,tokens:[]}),i.raw+=u}const s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l=0;l<i.items.length;l++)if(this.lexer.state.top=!1,i.items[l].tokens=this.lexer.blockTokens(i.items[l].text,[]),!i.loose){const u=i.items[l].tokens.filter(f=>f.type==="space"),c=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));i.loose=c}if(i.loose)for(let l=0;l<i.items.length;l++)i.items[l].loose=!0;return i}}html(r){const e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){const e=this.rules.block.def.exec(r);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:i}}}table(r){var o;const e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const t=RD(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(o=e[3])!=null&&o.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
||
`):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===n.length){for(const s of n)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<t.length;s++)a.header.push({text:t[s],tokens:this.lexer.inline(t[s]),header:!0,align:a.align[s]});for(const s of i)a.rows.push(RD(s,a.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[u]})));return a}}lheading(r){const e=this.rules.block.lheading.exec(r);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(r){const e=this.rules.block.paragraph.exec(r);if(e){const t=e[1].charAt(e[1].length-1)===`
|
||
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){const e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){const e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){const e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){const e=this.rules.inline.link.exec(r);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const a=zf(t.slice(0,-1),"\\");if((t.length-a.length)%2===0)return}else{const a=nie(e[2],"()");if(a===-2)return;if(a>-1){const s=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,s).trim(),e[3]=""}}let n=e[2],i="";if(this.options.pedantic){const a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],i=a[3])}else i=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n=n.slice(1):n=n.slice(1,-1)),OD(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){const n=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[n.toLowerCase()];if(!i){const a=t[0].charAt(0);return{type:"text",raw:a,text:a}}return OD(t,i,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let n=this.rules.inline.emStrongLDelim.exec(r);if(!n||n[3]&&t.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!t||this.rules.inline.punctuation.exec(t)){const a=[...n[0]].length-1;let o,s,l=a,u=0;const c=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*r.length+a);(n=c.exec(e))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(s=[...o].length,n[3]||n[4]){l+=s;continue}else if((n[5]||n[6])&&a%3&&!((a+s)%3)){u+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+u);const f=[...n[0]][0].length,h=r.slice(0,a+n.index+f+s);if(Math.min(a,s)%2){const p=h.slice(1,-1);return{type:"em",raw:h,text:p,tokens:this.lexer.inlineTokens(p)}}const d=h.slice(2,-2);return{type:"strong",raw:h,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(r){const e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){const e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){const e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){const e=this.rules.inline.autolink.exec(r);if(e){let t,n;return e[2]==="@"?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(r){var t;let e;if(e=this.rules.inline.url.exec(r)){let n,i;if(e[2]==="@")n=e[0],i="mailto:"+n;else{let a;do a=e[0],e[0]=((t=this.rules.inline._backpedal.exec(e[0]))==null?void 0:t[0])??"";while(a!==e[0]);n=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(r){const e=this.rules.inline.text.exec(r);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},no=class Bw{constructor(e){Rt(this,"tokens");Rt(this,"options");Rt(this,"state");Rt(this,"tokenizer");Rt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Mu,this.options.tokenizer=this.options.tokenizer||new ay,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:cn,block:uv.normal,inline:Bf.normal};this.options.pedantic?(t.block=uv.pedantic,t.inline=Bf.pedantic):this.options.gfm&&(t.block=uv.gfm,this.options.breaks?t.inline=Bf.breaks:t.inline=Bf.gfm),this.tokenizer.rules=t}static get rules(){return{block:uv,inline:Bf}}static lex(e,t){return new Bw(t).lex(e)}static lexInline(e,t){return new Bw(t).inlineTokens(e)}lex(e){e=e.replace(cn.carriageReturn,`
|
||
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){var i,a,o;for(this.options.pedantic&&(e=e.replace(cn.tabCharGlobal," ").replace(cn.spaceLine,""));e;){let s;if((a=(i=this.options.extensions)==null?void 0:i.block)!=null&&a.some(u=>(s=u.call({lexer:this},e,t))?(e=e.substring(s.raw.length),t.push(s),!0):!1))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);const u=t.at(-1);s.raw.length===1&&u!==void 0?u.raw+=`
|
||
`:t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);const u=t.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=`
|
||
`+s.raw,u.text+=`
|
||
`+s.text,this.inlineQueue.at(-1).src=u.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);const u=t.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=`
|
||
`+s.raw,u.text+=`
|
||
`+s.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}let l=e;if((o=this.options.extensions)!=null&&o.startBlock){let u=1/0;const c=e.slice(1);let f;this.options.extensions.startBlock.forEach(h=>{f=h.call({lexer:this},c),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(l=e.substring(0,u+1))}if(this.state.top&&(s=this.tokenizer.paragraph(l))){const u=t.at(-1);n&&(u==null?void 0:u.type)==="paragraph"?(u.raw+=`
|
||
`+s.raw,u.text+=`
|
||
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):t.push(s),n=l.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);const u=t.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=`
|
||
`+s.raw,u.text+=`
|
||
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):t.push(s);continue}if(e){const u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var s,l,u;let n=e,i=null;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)c.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,o="";for(;e;){a||(o=""),a=!1;let c;if((l=(s=this.options.extensions)==null?void 0:s.inline)!=null&&l.some(h=>(c=h.call({lexer:this},e,t))?(e=e.substring(c.raw.length),t.push(c),!0):!1))continue;if(c=this.tokenizer.escape(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.tag(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.link(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(c.raw.length);const h=t.at(-1);c.type==="text"&&(h==null?void 0:h.type)==="text"?(h.raw+=c.raw,h.text+=c.text):t.push(c);continue}if(c=this.tokenizer.emStrong(e,n,o)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.codespan(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.br(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.del(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.autolink(e)){e=e.substring(c.raw.length),t.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(e))){e=e.substring(c.raw.length),t.push(c);continue}let f=e;if((u=this.options.extensions)!=null&&u.startInline){let h=1/0;const d=e.slice(1);let p;this.options.extensions.startInline.forEach(v=>{p=v.call({lexer:this},d),typeof p=="number"&&p>=0&&(h=Math.min(h,p))}),h<1/0&&h>=0&&(f=e.substring(0,h+1))}if(c=this.tokenizer.inlineText(f)){e=e.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(o=c.raw.slice(-1)),a=!0;const h=t.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=c.raw,h.text+=c.text):t.push(c);continue}if(e){const h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return t}},oy=class{constructor(r){Rt(this,"options");Rt(this,"parser");this.options=r||Mu}space(r){return""}code({text:r,lang:e,escaped:t}){var a;const n=(a=(e||"").match(cn.notSpaceStart))==null?void 0:a[0],i=r.replace(cn.endingNewline,"")+`
|
||
`;return n?'<pre><code class="language-'+Ji(n)+'">'+(t?i:Ji(i,!0))+`</code></pre>
|
||
`:"<pre><code>"+(t?i:Ji(i,!0))+`</code></pre>
|
||
`}blockquote({tokens:r}){return`<blockquote>
|
||
${this.parser.parse(r)}</blockquote>
|
||
`}html({text:r}){return r}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
|
||
`}hr(r){return`<hr>
|
||
`}list(r){const e=r.ordered,t=r.start;let n="";for(let o=0;o<r.items.length;o++){const s=r.items[o];n+=this.listitem(s)}const i=e?"ol":"ul",a=e&&t!==1?' start="'+t+'"':"";return"<"+i+a+`>
|
||
`+n+"</"+i+`>
|
||
`}listitem(r){var t;let e="";if(r.task){const n=this.checkbox({checked:!!r.checked});r.loose?((t=r.tokens[0])==null?void 0:t.type)==="paragraph"?(r.tokens[0].text=n+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&r.tokens[0].tokens[0].type==="text"&&(r.tokens[0].tokens[0].text=n+" "+Ji(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(r.tokens,!!r.loose),`<li>${e}</li>
|
||
`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
|
||
`}table(r){let e="",t="";for(let i=0;i<r.header.length;i++)t+=this.tablecell(r.header[i]);e+=this.tablerow({text:t});let n="";for(let i=0;i<r.rows.length;i++){const a=r.rows[i];t="";for(let o=0;o<a.length;o++)t+=this.tablecell(a[o]);n+=this.tablerow({text:t})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
||
<thead>
|
||
`+e+`</thead>
|
||
`+n+`</table>
|
||
`}tablerow({text:r}){return`<tr>
|
||
${r}</tr>
|
||
`}tablecell(r){const e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>
|
||
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${Ji(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:t}){const n=this.parser.parseInline(t),i=PD(r);if(i===null)return n;r=i;let a='<a href="'+r+'"';return e&&(a+=' title="'+Ji(e)+'"'),a+=">"+n+"</a>",a}image({href:r,title:e,text:t,tokens:n}){n&&(t=this.parser.parseInline(n,this.parser.textRenderer));const i=PD(r);if(i===null)return Ji(t);r=i;let a=`<img src="${r}" alt="${t}"`;return e&&(a+=` title="${Ji(e)}"`),a+=">",a}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:Ji(r.text)}},rC=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},io=class zw{constructor(e){Rt(this,"options");Rt(this,"renderer");Rt(this,"textRenderer");this.options=e||Mu,this.options.renderer=this.options.renderer||new oy,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new rC}static parse(e,t){return new zw(t).parse(e)}static parseInline(e,t){return new zw(t).parseInline(e)}parse(e,t=!0){var i,a;let n="";for(let o=0;o<e.length;o++){const s=e[o];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[s.type]){const u=s,c=this.options.extensions.renderers[u.type].call({parser:this},u);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)){n+=c||"";continue}}const l=s;switch(l.type){case"space":{n+=this.renderer.space(l);continue}case"hr":{n+=this.renderer.hr(l);continue}case"heading":{n+=this.renderer.heading(l);continue}case"code":{n+=this.renderer.code(l);continue}case"table":{n+=this.renderer.table(l);continue}case"blockquote":{n+=this.renderer.blockquote(l);continue}case"list":{n+=this.renderer.list(l);continue}case"html":{n+=this.renderer.html(l);continue}case"paragraph":{n+=this.renderer.paragraph(l);continue}case"text":{let u=l,c=this.renderer.text(u);for(;o+1<e.length&&e[o+1].type==="text";)u=e[++o],c+=`
|
||
`+this.renderer.text(u);t?n+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):n+=c;continue}default:{const u='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}parseInline(e,t=this.renderer){var i,a;let n="";for(let o=0;o<e.length;o++){const s=e[o];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[s.type]){const u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=u||"";continue}}const l=s;switch(l.type){case"escape":{n+=t.text(l);break}case"html":{n+=t.html(l);break}case"link":{n+=t.link(l);break}case"image":{n+=t.image(l);break}case"strong":{n+=t.strong(l);break}case"em":{n+=t.em(l);break}case"codespan":{n+=t.codespan(l);break}case"br":{n+=t.br(l);break}case"del":{n+=t.del(l);break}case"text":{n+=t.text(l);break}default:{const u='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}},Vx,Lm=(Vx=class{constructor(r){Rt(this,"options");Rt(this,"block");this.options=r||Mu}preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}provideLexer(){return this.block?no.lex:no.lexInline}provideParser(){return this.block?io.parse:io.parseInline}},Rt(Vx,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Vx),aie=class{constructor(...r){Rt(this,"defaults",qT());Rt(this,"options",this.setOptions);Rt(this,"parse",this.parseMarkdown(!0));Rt(this,"parseInline",this.parseMarkdown(!1));Rt(this,"Parser",io);Rt(this,"Renderer",oy);Rt(this,"TextRenderer",rC);Rt(this,"Lexer",no);Rt(this,"Tokenizer",ay);Rt(this,"Hooks",Lm);this.use(...r)}walkTokens(r,e){var n,i;let t=[];for(const a of r)switch(t=t.concat(e.call(this,a)),a.type){case"table":{const o=a;for(const s of o.header)t=t.concat(this.walkTokens(s.tokens,e));for(const s of o.rows)for(const l of s)t=t.concat(this.walkTokens(l.tokens,e));break}case"list":{const o=a;t=t.concat(this.walkTokens(o.items,e));break}default:{const o=a;(i=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&i[o.type]?this.defaults.extensions.childTokens[o.type].forEach(s=>{const l=o[s].flat(1/0);t=t.concat(this.walkTokens(l,e))}):o.tokens&&(t=t.concat(this.walkTokens(o.tokens,e)))}}return t}use(...r){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const a=e.renderers[i.name];a?e.renderers[i.name]=function(...o){let s=i.renderer.apply(this,o);return s===!1&&(s=a.apply(this,o)),s}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=e[i.level];a?a.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),t.renderer){const i=this.defaults.renderer||new oy(this.defaults);for(const a in t.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const o=a,s=t.renderer[o],l=i[o];i[o]=(...u)=>{let c=s.apply(i,u);return c===!1&&(c=l.apply(i,u)),c||""}}n.renderer=i}if(t.tokenizer){const i=this.defaults.tokenizer||new ay(this.defaults);for(const a in t.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const o=a,s=t.tokenizer[o],l=i[o];i[o]=(...u)=>{let c=s.apply(i,u);return c===!1&&(c=l.apply(i,u)),c}}n.tokenizer=i}if(t.hooks){const i=this.defaults.hooks||new Lm;for(const a in t.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;const o=a,s=t.hooks[o],l=i[o];Lm.passThroughHooks.has(a)?i[o]=u=>{if(this.defaults.async)return Promise.resolve(s.call(i,u)).then(f=>l.call(i,f));const c=s.call(i,u);return l.call(i,c)}:i[o]=(...u)=>{let c=s.apply(i,u);return c===!1&&(c=l.apply(i,u)),c}}n.hooks=i}if(t.walkTokens){const i=this.defaults.walkTokens,a=t.walkTokens;n.walkTokens=function(o){let s=[];return s.push(a.call(this,o)),i&&(s=s.concat(i.call(this,o))),s}}this.defaults={...this.defaults,...n}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return no.lex(r,e??this.defaults)}parser(r,e){return io.parse(r,e??this.defaults)}parseMarkdown(r){return(t,n)=>{const i={...n},a={...this.defaults,...i},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=r);const s=a.hooks?a.hooks.provideLexer():r?no.lex:no.lexInline,l=a.hooks?a.hooks.provideParser():r?io.parse:io.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(t):t).then(u=>s(u,a)).then(u=>a.hooks?a.hooks.processAllTokens(u):u).then(u=>a.walkTokens?Promise.all(this.walkTokens(u,a.walkTokens)).then(()=>u):u).then(u=>l(u,a)).then(u=>a.hooks?a.hooks.postprocess(u):u).catch(o);try{a.hooks&&(t=a.hooks.preprocess(t));let u=s(t,a);a.hooks&&(u=a.hooks.processAllTokens(u)),a.walkTokens&&this.walkTokens(u,a.walkTokens);let c=l(u,a);return a.hooks&&(c=a.hooks.postprocess(c)),c}catch(u){return o(u)}}}onError(r,e){return t=>{if(t.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,r){const n="<p>An error occurred:</p><pre>"+Ji(t.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(t);throw t}}},du=new aie;function Dt(r,e){return du.parse(r,e)}Dt.options=Dt.setOptions=function(r){return du.setOptions(r),Dt.defaults=du.defaults,eB(Dt.defaults),Dt};Dt.getDefaults=qT;Dt.defaults=Mu;Dt.use=function(...r){return du.use(...r),Dt.defaults=du.defaults,eB(Dt.defaults),Dt};Dt.walkTokens=function(r,e){return du.walkTokens(r,e)};Dt.parseInline=du.parseInline;Dt.Parser=io;Dt.parser=io.parse;Dt.Renderer=oy;Dt.TextRenderer=rC;Dt.Lexer=no;Dt.lexer=no.lex;Dt.Tokenizer=ay;Dt.Hooks=Lm;Dt.parse=Dt;Dt.options;Dt.setOptions;Dt.use;Dt.walkTokens;Dt.parseInline;io.parse;no.lex;function oie(r){return Dt.parse(r,{gfm:!0,breaks:!0,async:!1})}function sie(r){return r.split(`
|
||
`).filter(n=>/!\[.*\]\(.*\)/.test(n)||/\[.*\]\(.*\)/.test(n)||/(^|\s)\*.*\*(\s|$)/.test(n)||/(^|\s)_.*_(\s|$)/.test(n)||/(^|\s)\*\*.*\*\*(\s|$)/.test(n)||/(^|\s)__.*__(\s|$)/.test(n)||/(^|\s)~~.*~~(\s|$)/.test(n)||n.startsWith("![")||n.startsWith("#")||n.startsWith("> ")||n.startsWith("*")||n.startsWith("- ")||n.startsWith("1. ")||n.startsWith("```")||n.startsWith("`")||n.startsWith("[")||n.startsWith("---")).length>0}Kt.create({name:"contentPaste",addOptions(){return{enabled:!0,showConfirmation:!0,uploadFunction:null}},addProseMirrorPlugins(){const r=this;return[new Ut({key:new jt("contentPaste"),props:{handlePaste:(e,t,n)=>{var h,d;if(!this.options.enabled)return!1;const i=Array.from(((h=t.clipboardData)==null?void 0:h.files)||[]),a=Array.from(i).filter(p=>p.type.startsWith("image/"));if(a.length>0)return Mw(a,e,null,r.options),!0;const o=(d=t.clipboardData)==null?void 0:d.getData("text/plain");if(!o||!sie(o)||this.options.showConfirmation&&!confirm("Do you want to convert markdown content to HTML before pasting?"))return!1;const s=oie(o),l=document.createElement("div");l.innerHTML=s;const c=Gh.fromSchema(e.state.schema).parseSlice(l,{preserveWhitespace:!0}),f=e.state.tr.replaceSelection(c);return e.dispatch(f),!0}}})]}});const lie=ar.create({name:"tagItem",group:"inline",inline:!0,selectable:!0,atom:!0,addAttributes(){return{tagId:{default:null,parseHTML:r=>r.getAttribute("data-tag-id"),renderHTML:r=>r.tagId?{"data-tag-id":r.tagId}:{}},tagLabel:{default:"tag",parseHTML:r=>r.getAttribute("data-tag-label"),renderHTML:r=>({"data-tag-label":r.tagLabel})}}},parseHTML(){return[{tag:"span.tag-item",getAttrs:r=>{const e=r;return{tagId:e.getAttribute("data-tag-id"),tagLabel:e.getAttribute("data-tag-label")||e.innerText.replace(/^#/,"")}}}]},renderHTML({HTMLAttributes:r}){return["span",Lt(r,{class:"tag-item"}),`#${r["data-tag-label"]}`]},addCommands(){return{setTag:r=>({commands:e})=>e.insertContent({type:this.name,attrs:r})}}});k0({name:"tagSuggestion",char:"#",pluginKey:new jt("tagSuggestion"),component:D0,addOptions(){return{tags:[]}},items:({query:r,editor:e})=>{const{tags:t}=e.extensionManager.extensions.find(a=>a.name==="tagSuggestion").options;let n=Nr(t),i=n.filter(a=>a.label.toLowerCase().startsWith(r.toLowerCase())).map(a=>({...a,display:a.label}));return r.length>0&&!n.some(a=>a.label.toLowerCase()===r.toLowerCase())&&i.push({display:`New tag: "${r}"`,label:r,isNew:!0}),i},command:({editor:r,range:e,props:t})=>{const n={tagLabel:t.label,...t.id&&!t.isNew&&{tagId:t.id}};r.chain().focus().insertContentAt(e,[{type:lie.name,attrs:n},{type:"text",text:" "}]).run()},tippyOptions:{placement:"bottom-start",offset:[0,8]},allowSpaces:!1,decorationTag:"span",decorationClass:"tag-suggestion-active"});s4.extend({addInputRules(){return this.options.levels.map(r=>{let e=new RegExp(`^(#{${r}}) $`);return Mg({find:e,type:this.type,getAttributes:{level:r}})})}});const uie={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function cie(r,e){return Y(),ae("svg",uie,e[0]||(e[0]=[Z("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[Z("path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),Z("path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"})],-1)]))}const fie=vt({name:"lucide-edit",render:cie}),hie={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function die(r,e){return Y(),ae("svg",hie,e[0]||(e[0]=[Z("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[Z("path",{d:"M16 5h6m-3-3v6m2 3.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5"}),Z("path",{d:"m21 15l-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}),Z("circle",{cx:"9",cy:"9",r:"2"})],-1)]))}const jD=vt({name:"lucide-image-plus",render:die}),pie={class:"space-y-2"},vie={class:"flex items-center gap-2"},mie=["onDragstart","onDragover","onDragleave"],gie=["onClick"],yie=["src","alt"],bie=["onClick"],_ie=["title"],xie=["onBlur","onKeydown"],wie={key:0,class:"flex flex-col items-center justify-center w-full h-full text-ink-gray-4 bg-surface-gray-1 rounded-[2px]"},Sie=["title"],Tie=["src","alt"],Cie=["onClick"],Aie=["title"],Mie=["onBlur","onKeydown"],kie={key:1,class:"text-p-sm text-ink-gray-5"},Die={key:2,class:"flex flex-col items-center justify-center min-h-[200px]"},Eie={class:"text-ink-gray-4 mb-2"},Lie={key:3},Iie={class:"mb-2 text-sm"},Pie={class:"w-full bg-gray-200 rounded h-2 overflow-hidden"},Rie={key:0,class:"mt-2 text-red-500 text-xs"},Oie={class:"flex justify-end gap-2"},jie={key:0,class:"fixed inset-0 z-50 bg-gray-900/60 pointer-events-none flex items-center justify-center"},Nie=Ke({__name:"ImageGroupUploadDialog",props:{modelValue:{type:Boolean},files:{},editor:{},mode:{default:"new"},existingImages:{},initialColumns:{}},emits:["update:modelValue","close","update:files","save"],setup(r,{emit:e}){const t=r,n=e,i=de({get:()=>t.modelValue,set:G=>n("update:modelValue",G)}),a=te(!1),o=te(null),s=te(null),l=te(!1),u=te(null),c=te(""),f=te(null),h=te(!1),d=te(4),p=te(0),v=te(0),m=te(0),g=te([]),y=te([]),b=te([]);Nt(()=>t.modelValue,G=>{if(G&&t.mode==="edit"){const ee=(t.existingImages||[]).map(D),Q=(t.files||[]).map(M);b.value=[...ee,...Q],t.initialColumns&&(d.value=t.initialColumns,l.value=!0)}else G&&t.mode==="new"&&(b.value=(t.files||[]).map(M),d.value=E(b.value.length),l.value=!0)},{immediate:!0}),Nt(()=>t.existingImages,G=>{if(t.modelValue&&t.mode==="edit"){const ee=(G||[]).map(D),Q=(t.files||[]).map(M);b.value=[...ee,...Q]}},{deep:!0}),Nt(()=>t.files,G=>{t.mode==="new"&&(b.value=(G||[]).map(M))},{deep:!0}),zi(()=>{window.addEventListener("dragover",B),window.addEventListener("drop",A),window.addEventListener("dragleave",$)}),Ss(()=>{window.removeEventListener("dragover",B),window.removeEventListener("drop",A),window.removeEventListener("dragleave",$)});async function _(){const G=b.value.filter(he=>he.type==="file"&&he.file).map(he=>he.file);b.value.filter(he=>he.type==="existing"&&he.existing).map(he=>he.existing);let ee=[];G.length>0&&(ee=await re(G));const Q=new Map;G.forEach((he,Se)=>{const Fe=ee[Se];Fe!=null&&Fe.success&&Fe.file&&Q.set(he,{src:Fe.file.file_url||"",alt:Fe.file.file_name||""})});const me=[];for(const he of b.value)if(he.type==="existing"&&he.existing)me.push(he.existing);else if(he.type==="file"&&he.file){const Se=Q.get(he.file);Se&&me.push(Se)}n("save",{images:me,columns:d.value}),h.value=!1,i.value=!1}async function x(){if(!t.files||t.files.length===0)return;const ee=(await re(t.files)).filter(Q=>Q.success&&Q.file).map(Q=>{var me,he;return{src:((me=Q.file)==null?void 0:me.file_url)||"",alt:((he=Q.file)==null?void 0:he.file_name)||""}});ee.length>1&&t.editor.chain().focus().setImageGroup({images:ee,columns:d.value}).run(),h.value=!1,i.value=!1,n("close")}function w(){i.value=!1,n("close")}function S(G){if(b.value.splice(G,1),t.mode==="new"){const ee=b.value.filter(Q=>Q.type==="file"&&Q.file).map(Q=>Q.file);n("update:files",ee)}}function T(){const G=document.createElement("input");G.type="file",G.accept="image/*",G.multiple=!0,G.onchange=ee=>{const Q=ee.target.files;Q&&C(Array.from(Q))},G.click()}function C(G){const Q=G.filter(Se=>Se.type.startsWith("image/")).map(M),me=b.value.filter(Se=>Se.type==="file"&&Se.file).map(Se=>`${Se.file.name}-${Se.file.size}`),he=Q.filter(Se=>!me.includes(`${Se.file.name}-${Se.file.size}`));if(b.value.push(...he),t.mode==="new"){const Se=b.value.filter(Fe=>Fe.type==="file"&&Fe.file).map(Fe=>Fe.file);n("update:files",Se)}}function A(G){var Q;G.preventDefault(),G.stopPropagation();const ee=Array.from(((Q=G.dataTransfer)==null?void 0:Q.files)||[]);if(ee.length)C(ee);else if(o.value!==null&&s.value!==null&&o.value!==s.value){const[me]=b.value.splice(o.value,1);if(b.value.splice(s.value,0,me),t.mode==="new"){const he=b.value.filter(Se=>Se.type==="file"&&Se.file).map(Se=>Se.file);n("update:files",he)}}a.value=!1,o.value=null,s.value=null}function M(G){return{type:"file",file:G,id:`file-${G.name}-${G.size}-${Date.now()}`}}function D(G){return{type:"existing",existing:G,id:`existing-${G.src}-${Date.now()}`}}function E(G){return G<=4?G:G%4===0?4:G%3===0?3:G>10?4:3}function L(){var ee;const G=t.editor.extensionManager.extensions.find(Q=>Q.name==="imageGroup");return(ee=G==null?void 0:G.options)==null?void 0:ee.uploadFunction}function I(G){const ee=URL.createObjectURL(G);return Ss(()=>{URL.revokeObjectURL(ee)}),ee}function R(G){const ee=["image/heic","image/heif"],Q=[".heic",".heif"],me=ee.includes(G.type),he=Q.some(Se=>{var Fe;return(Fe=G.name)==null?void 0:Fe.toLowerCase().endsWith(Se)});return!me&&!he}function P(G,ee){G.preventDefault(),s.value=ee}function O(G){o.value=G}function j(){o.value=null,s.value=null}function F(G,ee){s.value===ee&&(s.value=null)}function N(G){return s.value===G&&o.value!==null&&o.value!==G}function B(G){G.preventDefault(),G.dataTransfer&&Array.from(G.dataTransfer.types).includes("Files")&&(a.value=!0)}function $(G){(G.target===window||G.relatedTarget===null)&&(a.value=!1)}const J=de(()=>({gridTemplateColumns:`repeat(${d.value||4}, minmax(0, 1fr))`})),U=de({get:()=>String(d.value??4),set:G=>{d.value=+G}}),we=[{label:"2 columns",value:"2"},{label:"3 columns",value:"3"},{label:"4 columns",value:"4"}];function Ye(G,ee){u.value=G,c.value=ee,Ca(()=>{f.value&&(f.value.focus(),f.value.select())})}function ge(G,ee){var Se;const[Q,me]=G.split("-"),he=c.value.trim();Q==="existing"?(Se=b.value[ee])!=null&&Se.existing&&(b.value[ee].existing.alt=he):Q==="file"&&b.value[ee]&&(b.value[ee].alt=he),u.value=null,c.value=""}function le(){u.value=null,c.value=""}function be(G,ee){u.value===G&&ge(G,ee)}async function re(G){const ee=L();if(!ee)throw console.error("uploadFunction not found"),new Error("Upload function not found");h.value=!0,m.value=G.length,v.value=0,p.value=0,g.value=Array(G.length).fill(null),y.value=Array(G.length).fill(null);const Q=G.map(async(he,Se)=>{try{const Fe=await ee(he);return y.value[Se]={success:!0,file:Fe},{success:!0,file:Fe}}catch(Fe){const xe=Fe;return g.value[Se]=xe,y.value[Se]={success:!1,error:xe},{success:!1,error:xe}}finally{v.value++,p.value=Math.round(v.value/m.value*100)}});return await Promise.all(Q)}return(G,ee)=>(Y(),ae(oi,null,[Ie(xN,{modelValue:i.value,"onUpdate:modelValue":ee[8]||(ee[8]=Q=>i.value=Q),options:{title:t.mode==="edit"?"Edit Images":"Upload Images",size:"3xl"},onClose:ee[9]||(ee[9]=Q=>G.$emit("close")),disableOutsideClickToClose:!0},{"body-content":_e(()=>[Z("div",pie,[Z("div",vie,[Ie(ui,{onClick:T},{prefix:_e(()=>[Ie(H(jD),{class:"size-4"})]),default:_e(()=>[ee[10]||(ee[10]=Di(" Add images ",-1))]),_:1,__:[10]}),Ie(SN,{id:"columns-select",options:we,modelValue:U.value,"onUpdate:modelValue":[ee[0]||(ee[0]=Q=>U.value=Q),ee[1]||(ee[1]=Q=>d.value=+Q)],size:"sm",variant:"subtle",class:"w-28"},null,8,["modelValue"])]),b.value&&b.value.length?(Y(),ae("div",{key:0,class:"grid gap-px mb-4",style:Sa(J.value)},[(Y(!0),ae(oi,null,cp(b.value,(Q,me)=>{var he,Se,Fe,xe;return Y(),ae("div",{key:Q.id,class:kt(["relative aspect-square w-full h-full overflow-hidden group bg-surface-white",{"ring-2 ring-primary-400 z-10":N(me)}]),draggable:!0,onDragstart:rt=>O(me),onDragover:rt=>P(rt,me),onDrop:ee[6]||(ee[6]=rt=>A(rt)),onDragend:j,onDragleave:rt=>F(rt,me)},[Z("button",{type:"button",class:"absolute top-1 right-1 z-10 bg-white/80 hover:bg-white rounded-full p-1 shadow transition-opacity opacity-0 group-hover:opacity-100 focus:opacity-100","aria-label":"Remove image",onClick:At(rt=>S(me),["stop"])},[Ie(H(C0),{class:"w-4 h-4 text-gray-700"})],8,gie),Q.type==="existing"?(Y(),ae(oi,{key:0},[Z("img",{src:(he=Q.existing)==null?void 0:he.src,alt:((Se=Q.existing)==null?void 0:Se.alt)||"",class:"object-cover w-full h-full rounded-[2px]"},null,8,yie),Z("div",{class:kt(["absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/60 to-transparent rounded-b-[2px] transition-opacity",u.value===`${Q.type}-${me}`?"opacity-100":"opacity-0 group-hover:opacity-100"])},[u.value!==`${Q.type}-${me}`?(Y(),ae("div",{key:0,class:"p-2 cursor-pointer",onClick:At(rt=>{var at;return Ye(`${Q.type}-${me}`,((at=Q.existing)==null?void 0:at.alt)||"")},["stop"])},[Z("div",{class:"text-white text-xs truncate",title:((Fe=Q.existing)==null?void 0:Fe.alt)||"Click to add caption"},qt(((xe=Q.existing)==null?void 0:xe.alt)||"Add caption..."),9,_ie)],8,bie)):(Y(),ae("div",{key:1,class:"p-2",onClick:ee[3]||(ee[3]=At(()=>{},["stop"]))},[og(Z("input",{ref_for:!0,ref:rt=>f.value=rt,"onUpdate:modelValue":ee[2]||(ee[2]=rt=>c.value=rt),onBlur:rt=>be(`${Q.type}-${me}`,me),onKeydown:[Ac(At(rt=>ge(`${Q.type}-${me}`,me),["prevent"]),["enter"]),Ac(le,["escape"])],class:"w-full text-xs bg-white/90 text-gray-900 px-1 py-0.5 rounded-sm border-none outline-none",placeholder:"Add caption...",maxlength:"200"},null,40,xie),[[Hx,c.value]])]))],2)],64)):Q.type==="file"&&Q.file?(Y(),ae(oi,{key:1},[R(Q.file)?Q.file.type.startsWith("image/")?(Y(),ae(oi,{key:1},[Z("img",{src:I(Q.file),class:"object-cover w-full h-full rounded-[2px]",alt:Q.alt||""},null,8,Tie),Z("div",{class:kt(["absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/60 to-transparent rounded-b-[2px] transition-opacity",u.value===`${Q.type}-${me}`?"opacity-100":"opacity-0 group-hover:opacity-100"])},[u.value!==`${Q.type}-${me}`?(Y(),ae("div",{key:0,class:"p-2 cursor-pointer",onClick:At(rt=>Ye(`${Q.type}-${me}`,Q.alt||""),["stop"])},[Z("div",{class:"text-white text-xs truncate",title:Q.alt||"Click to add caption"},qt(Q.alt||"Add caption..."),9,Aie)],8,Cie)):(Y(),ae("div",{key:1,class:"p-2",onClick:ee[5]||(ee[5]=At(()=>{},["stop"]))},[og(Z("input",{ref_for:!0,ref:"captionInput","onUpdate:modelValue":ee[4]||(ee[4]=rt=>c.value=rt),onBlur:rt=>be(`${Q.type}-${me}`,me),onKeydown:[Ac(At(rt=>ge(`${Q.type}-${me}`,me),["prevent"]),["enter"]),Ac(le,["escape"])],class:"w-full text-xs bg-white/90 text-gray-900 px-1 py-0.5 rounded border-none outline-none",placeholder:"Add caption...",maxlength:"200"},null,40,Mie),[[Hx,c.value]])]))],2)],64)):ct("",!0):(Y(),ae("div",wie,[Z("span",{class:"text-p-xs text-ink-gray-4 w-full text-center px-2 mt-1",title:Q.file.name},qt(Q.file.name),9,Sie)]))],64)):ct("",!0)],42,mie)}),128))],4)):ct("",!0),b.value&&b.value.length?(Y(),ae("div",kie," Upload more images by dropping them anywhere in this window. Reorder images by dragging them. Hover over an image to edit caption. ")):(Y(),ae("div",Die,[Z("div",{class:"w-full flex flex-1 flex-col items-center justify-center border border-outline-gray-2 rounded-lg bg-surface-gray-1 h-full cursor-pointer transition hover:border-primary-400 hover:bg-primary-50 text-center",onClick:T,onDragover:ee[7]||(ee[7]=At(()=>{},["prevent"])),onDrop:At(A,["prevent"])},[Z("div",Eie,[Ie(H(jD),{class:"size-6"})]),ee[11]||(ee[11]=Z("div",{class:"text-ink-gray-5 text-sm font-medium"}," Drag & drop images here or click to select ",-1))],32)])),h.value?(Y(),ae("div",Lie,[Z("div",Iie," Uploading: "+qt(v.value)+"/"+qt(m.value),1),Z("div",Pie,[Z("div",{class:"bg-surface-gray-5 h-2 transition-all",style:Sa({width:p.value+"%"})},null,4)]),g.value&&g.value.some(Q=>Q)?(Y(),ae("div",Rie," Some files failed to upload. ")):ct("",!0)])):ct("",!0)])]),actions:_e(()=>[Z("div",Oie,[Ie(ui,{variant:"ghost",disabled:h.value,onClick:w},{default:_e(()=>ee[12]||(ee[12]=[Di(" Cancel ",-1)])),_:1,__:[12]},8,["disabled"]),t.mode==="edit"?(Y(),$e(ui,{key:0,variant:"solid",loading:h.value,onClick:_},{default:_e(()=>ee[13]||(ee[13]=[Di(" Save ",-1)])),_:1,__:[13]},8,["loading"])):ct("",!0),t.mode==="new"?(Y(),$e(ui,{key:1,variant:"solid",loading:h.value,onClick:x},{default:_e(()=>ee[14]||(ee[14]=[Di(" Upload ",-1)])),_:1,__:[14]},8,["loading"])):ct("",!0)])]),_:1},8,["modelValue","options"]),(Y(),$e(VS,{to:"body"},[Ie(x3,{name:"fade","enter-active-class":"transition-opacity duration-200","leave-active-class":"transition-opacity duration-200","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:_e(()=>[a.value?(Y(),ae("div",jie,ee[15]||(ee[15]=[Z("div",{class:"text-ink-gray-1 text-base font-medium"}," Drop images anywhere ",-1)]))):ct("",!0)]),_:1})]))],64))}}),Bie={class:"w-full"},zie={key:0,class:"flex items-center mb-2 gap-2"},Fie=["onClick"],Vie=["src","alt","onClick"],$ie=["src","alt"],Hie={key:3,class:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/60 to-transparent rounded-b-[2px] opacity-0 group-hover:opacity-100 transition-opacity"},Gie={class:"p-2"},Wie=["title"],Uie=Ke({__name:"ImageGroupNodeView",props:{decorations:{},selected:{type:Boolean},updateAttributes:{type:Function},deleteNode:{type:Function},node:{},view:{},getPos:{type:Function},innerDecorations:{},editor:{},extension:{},HTMLAttributes:{}},setup(r){const e=r,t=de(()=>e.node.attrs.columns||4),n=de(()=>e.node.content.content||[]),i=de(()=>({gridTemplateColumns:`repeat(${t.value}, minmax(0, 1fr))`})),a=te(e.editor.isEditable),o=[{label:"2 columns",value:"2"},{label:"3 columns",value:"3"},{label:"4 columns",value:"4"}],s=de({get:()=>String(t.value),set:b=>e.updateAttributes({columns:+b})}),l=te(!1),u=te(0),c=de(()=>n.value.map(b=>({src:b.attrs.src,alt:b.attrs.alt||""}))),f=te(!1),h=te([]),d=de(()=>n.value.map(b=>({src:b.attrs.src,alt:b.attrs.alt||""})));zi(()=>{const b=()=>{a.value=e.editor.isEditable};e.editor.on("update",b),Ss(()=>{e.editor.off("update",b)})});function p(){h.value=[],f.value=!0}function v(){f.value=!1,h.value=[]}async function m(b){e.editor.commands.command(({tr:_,state:x})=>{const w=e.getPos();if(typeof w=="number"){const S=x.doc.nodeAt(w);if(S&&S.type.name==="imageGroup"){const T=b.images.map(M=>x.schema.nodes.image.create({src:M.src,alt:M.alt})),C={...S.attrs,columns:b.columns},A=S.type.create(C,T);return _.replaceWith(w,w+S.nodeSize,A),!0}}return!1}),f.value=!1}function g(b){e.editor.isEditable||(u.value=b,l.value=!0)}function y(b){const _=n.value.slice();_.splice(b,1),_.length===0?e.editor.commands.deleteNode("imageGroup"):(e.updateAttributes({}),e.editor.commands.command(({tr:x,state:w})=>{const S=e.getPos();if(typeof S=="number"){const T=w.doc.nodeAt(S);if(T&&T.type.name==="imageGroup"){const C=_.map(A=>w.schema.nodes.image.create(A.attrs));return x.replaceWith(S+1,S+1+T.content.size,C),!0}}return!1}))}return(b,_)=>(Y(),$e(H(i4),null,{default:_e(()=>[Z("div",Bie,[a.value?(Y(),ae("div",zie,[Ie(ui,{onClick:p},{prefix:_e(()=>[Ie(H(fie),{class:"size-4"})]),default:_e(()=>[_[3]||(_[3]=Di(" Edit ",-1))]),_:1,__:[3]}),Ie(SN,{options:o,modelValue:s.value,"onUpdate:modelValue":_[0]||(_[0]=x=>s.value=x),size:"sm",variant:"subtle",class:"w-28"},null,8,["modelValue"])])):ct("",!0),Z("div",{class:"grid gap-px",style:Sa(i.value)},[(Y(!0),ae(oi,null,cp(n.value,(x,w)=>(Y(),ae("div",{key:x.attrs.src+w,class:"relative aspect-square w-full h-full overflow-hidden bg-surface-white group"},[a.value?(Y(),ae("button",{key:0,type:"button",class:"absolute top-1 right-1 z-10 bg-white/80 hover:bg-white rounded-full p-1 shadow transition-opacity opacity-0 group-hover:opacity-100 focus:opacity-100","aria-label":"Remove image",onClick:At(S=>y(w),["stop"])},[Ie(H(C0),{class:"w-4 h-4 text-gray-700"})],8,Fie)):ct("",!0),a.value?(Y(),ae("img",{key:2,src:x.attrs.src,alt:x.attrs.alt||"",class:"object-cover w-full h-full not-prose rounded-[2px]"},null,8,$ie)):(Y(),ae("img",{key:1,src:x.attrs.src,alt:x.attrs.alt||"",class:"object-cover w-full h-full not-prose cursor-pointer rounded-[2px]",onClick:S=>g(w)},null,8,Vie)),x.attrs.alt?(Y(),ae("div",Hie,[Z("div",Gie,[Z("div",{class:"text-white text-xs truncate",title:x.attrs.alt},qt(x.attrs.alt),9,Wie)])])):ct("",!0)]))),128))],4),l.value?(Y(),$e(C4,{key:1,show:l.value,"onUpdate:show":_[1]||(_[1]=x=>l.value=x),images:c.value,initialIndex:u.value},null,8,["show","images","initialIndex"])):ct("",!0),f.value?(Y(),$e(Nie,{key:2,modelValue:f.value,"onUpdate:modelValue":_[2]||(_[2]=x=>f.value=x),files:h.value,editor:e.editor,mode:"edit",existingImages:d.value,initialColumns:t.value,onClose:v,onSave:m},null,8,["modelValue","files","editor","existingImages","initialColumns"])):ct("",!0),Je(b.$slots,"default")])]),_:3}))}});ar.create({name:"imageGroup",group:"block",content:"image+",selectable:!0,draggable:!0,isolating:!0,addOptions(){return{uploadFunction:null,HTMLAttributes:{}}},addAttributes(){return{columns:{default:4}}},parseHTML(){return[{tag:'div[data-type="image-group"]',getAttrs:r=>{if(typeof r=="string")return{};const e=r;return{columns:e.getAttribute("data-columns")?Number(e.getAttribute("data-columns")):4}}}]},renderHTML({HTMLAttributes:r,node:e}){return["div",Lt({"data-type":"image-group","data-columns":e.attrs.columns},this.options.HTMLAttributes,r),0]},addNodeView(){return IT(Uie)},addCommands(){return{setImageGroup:r=>({commands:e})=>e.insertContent({type:this.name,attrs:{columns:r.columns||4},content:r.images.map(t=>({type:"image",attrs:t}))})}}});const Yie={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function qie(r,e){return Y(),ae("svg",Yie,e[0]||(e[0]=[Z("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[Z("circle",{cx:"12",cy:"12",r:"10"}),Z("path",{d:"M12 16v-4m0-4h.01"})],-1)]))}vt({name:"lucide-info",render:qie});const Xie={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Kie(r,e){return Y(),ae("svg",Xie,e[0]||(e[0]=[Z("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m21.73 18l-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3M12 9v4m0 4h.01"},null,-1)]))}vt({name:"lucide-alert-triangle",render:Kie});/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:fB,setPrototypeOf:ND,isFrozen:Zie,getPrototypeOf:Jie,getOwnPropertyDescriptor:Qie}=Object;let{freeze:dn,seal:vi,create:hB}=Object,{apply:Fw,construct:Vw}=typeof Reflect<"u"&&Reflect;dn||(dn=function(e){return e});vi||(vi=function(e){return e});Fw||(Fw=function(e,t,n){return e.apply(t,n)});Vw||(Vw=function(e,t){return new e(...t)});const cv=pn(Array.prototype.forEach),eae=pn(Array.prototype.lastIndexOf),BD=pn(Array.prototype.pop),Ff=pn(Array.prototype.push),tae=pn(Array.prototype.splice),Im=pn(String.prototype.toLowerCase),ab=pn(String.prototype.toString),zD=pn(String.prototype.match),Vf=pn(String.prototype.replace),rae=pn(String.prototype.indexOf),nae=pn(String.prototype.trim),Si=pn(Object.prototype.hasOwnProperty),rn=pn(RegExp.prototype.test),$f=iae(TypeError);function pn(r){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return Fw(r,e,n)}}function iae(r){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Vw(r,t)}}function ft(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Im;ND&&ND(r,null);let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){const a=t(i);a!==i&&(Zie(e)||(e[n]=a),i=a)}r[i]=!0}return r}function aae(r){for(let e=0;e<r.length;e++)Si(r,e)||(r[e]=null);return r}function Ja(r){const e=hB(null);for(const[t,n]of fB(r))Si(r,t)&&(Array.isArray(n)?e[t]=aae(n):n&&typeof n=="object"&&n.constructor===Object?e[t]=Ja(n):e[t]=n);return e}function Hf(r,e){for(;r!==null;){const n=Qie(r,e);if(n){if(n.get)return pn(n.get);if(typeof n.value=="function")return pn(n.value)}r=Jie(r)}function t(){return null}return t}const FD=dn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ob=dn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),sb=dn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),oae=dn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),lb=dn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),sae=dn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),VD=dn(["#text"]),$D=dn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ub=dn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),HD=dn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),fv=dn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),lae=vi(/\{\{[\w\W]*|[\w\W]*\}\}/gm),uae=vi(/<%[\w\W]*|[\w\W]*%>/gm),cae=vi(/\$\{[\w\W]*/gm),fae=vi(/^data-[\-\w.\u00B7-\uFFFF]+$/),hae=vi(/^aria-[\-\w]+$/),dB=vi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),dae=vi(/^(?:\w+script|data):/i),pae=vi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),pB=vi(/^html$/i),vae=vi(/^[a-z][.\w]*(-[.\w]+)+$/i);var GD=Object.freeze({__proto__:null,ARIA_ATTR:hae,ATTR_WHITESPACE:pae,CUSTOM_ELEMENT:vae,DATA_ATTR:fae,DOCTYPE_NAME:pB,ERB_EXPR:uae,IS_ALLOWED_URI:dB,IS_SCRIPT_OR_DATA:dae,MUSTACHE_EXPR:lae,TMPLIT_EXPR:cae});const Gf={element:1,text:3,progressingInstruction:7,comment:8,document:9},mae=function(){return typeof window>"u"?null:window},gae=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},WD=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function vB(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:mae();const e=je=>vB(je);if(e.version="3.2.6",e.removed=[],!r||!r.document||r.document.nodeType!==Gf.document||!r.Element)return e.isSupported=!1,e;let{document:t}=r;const n=t,i=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:l,NodeFilter:u,NamedNodeMap:c=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:f,DOMParser:h,trustedTypes:d}=r,p=l.prototype,v=Hf(p,"cloneNode"),m=Hf(p,"remove"),g=Hf(p,"nextSibling"),y=Hf(p,"childNodes"),b=Hf(p,"parentNode");if(typeof o=="function"){const je=t.createElement("template");je.content&&je.content.ownerDocument&&(t=je.content.ownerDocument)}let _,x="";const{implementation:w,createNodeIterator:S,createDocumentFragment:T,getElementsByTagName:C}=t,{importNode:A}=n;let M=WD();e.isSupported=typeof fB=="function"&&typeof b=="function"&&w&&w.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:D,ERB_EXPR:E,TMPLIT_EXPR:L,DATA_ATTR:I,ARIA_ATTR:R,IS_SCRIPT_OR_DATA:P,ATTR_WHITESPACE:O,CUSTOM_ELEMENT:j}=GD;let{IS_ALLOWED_URI:F}=GD,N=null;const B=ft({},[...FD,...ob,...sb,...lb,...VD]);let $=null;const J=ft({},[...$D,...ub,...HD,...fv]);let U=Object.seal(hB(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,Ye=null,ge=!0,le=!0,be=!1,re=!0,G=!1,ee=!0,Q=!1,me=!1,he=!1,Se=!1,Fe=!1,xe=!1,rt=!0,at=!1;const ht="user-content-";let fr=!0,yr=!1,en={},tn=null;const pe=ft({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let De=null;const tt=ft({},["audio","video","img","source","image","track"]);let mt=null;const or=ft({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$r="http://www.w3.org/1998/Math/MathML",Io="http://www.w3.org/2000/svg",X="http://www.w3.org/1999/xhtml";let Ae=X,Ge=!1,xt=null;const gt=ft({},[$r,Io,X],ab);let hr=ft({},["mi","mo","mn","ms","mtext"]),Ir=ft({},["annotation-xml"]);const Po=ft({},["title","style","font","a","script"]);let Ro=null;const Va=["application/xhtml+xml","text/html"],If="text/html";let Yt=null,En=null;const x1=t.createElement("form"),zu=function(V){return V instanceof RegExp||V instanceof Function},Oo=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(En&&En===V)){if((!V||typeof V!="object")&&(V={}),V=Ja(V),Ro=Va.indexOf(V.PARSER_MEDIA_TYPE)===-1?If:V.PARSER_MEDIA_TYPE,Yt=Ro==="application/xhtml+xml"?ab:Im,N=Si(V,"ALLOWED_TAGS")?ft({},V.ALLOWED_TAGS,Yt):B,$=Si(V,"ALLOWED_ATTR")?ft({},V.ALLOWED_ATTR,Yt):J,xt=Si(V,"ALLOWED_NAMESPACES")?ft({},V.ALLOWED_NAMESPACES,ab):gt,mt=Si(V,"ADD_URI_SAFE_ATTR")?ft(Ja(or),V.ADD_URI_SAFE_ATTR,Yt):or,De=Si(V,"ADD_DATA_URI_TAGS")?ft(Ja(tt),V.ADD_DATA_URI_TAGS,Yt):tt,tn=Si(V,"FORBID_CONTENTS")?ft({},V.FORBID_CONTENTS,Yt):pe,we=Si(V,"FORBID_TAGS")?ft({},V.FORBID_TAGS,Yt):Ja({}),Ye=Si(V,"FORBID_ATTR")?ft({},V.FORBID_ATTR,Yt):Ja({}),en=Si(V,"USE_PROFILES")?V.USE_PROFILES:!1,ge=V.ALLOW_ARIA_ATTR!==!1,le=V.ALLOW_DATA_ATTR!==!1,be=V.ALLOW_UNKNOWN_PROTOCOLS||!1,re=V.ALLOW_SELF_CLOSE_IN_ATTR!==!1,G=V.SAFE_FOR_TEMPLATES||!1,ee=V.SAFE_FOR_XML!==!1,Q=V.WHOLE_DOCUMENT||!1,Se=V.RETURN_DOM||!1,Fe=V.RETURN_DOM_FRAGMENT||!1,xe=V.RETURN_TRUSTED_TYPE||!1,he=V.FORCE_BODY||!1,rt=V.SANITIZE_DOM!==!1,at=V.SANITIZE_NAMED_PROPS||!1,fr=V.KEEP_CONTENT!==!1,yr=V.IN_PLACE||!1,F=V.ALLOWED_URI_REGEXP||dB,Ae=V.NAMESPACE||X,hr=V.MATHML_TEXT_INTEGRATION_POINTS||hr,Ir=V.HTML_INTEGRATION_POINTS||Ir,U=V.CUSTOM_ELEMENT_HANDLING||{},V.CUSTOM_ELEMENT_HANDLING&&zu(V.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=V.CUSTOM_ELEMENT_HANDLING.tagNameCheck),V.CUSTOM_ELEMENT_HANDLING&&zu(V.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=V.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),V.CUSTOM_ELEMENT_HANDLING&&typeof V.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=V.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),G&&(le=!1),Fe&&(Se=!0),en&&(N=ft({},VD),$=[],en.html===!0&&(ft(N,FD),ft($,$D)),en.svg===!0&&(ft(N,ob),ft($,ub),ft($,fv)),en.svgFilters===!0&&(ft(N,sb),ft($,ub),ft($,fv)),en.mathMl===!0&&(ft(N,lb),ft($,HD),ft($,fv))),V.ADD_TAGS&&(N===B&&(N=Ja(N)),ft(N,V.ADD_TAGS,Yt)),V.ADD_ATTR&&($===J&&($=Ja($)),ft($,V.ADD_ATTR,Yt)),V.ADD_URI_SAFE_ATTR&&ft(mt,V.ADD_URI_SAFE_ATTR,Yt),V.FORBID_CONTENTS&&(tn===pe&&(tn=Ja(tn)),ft(tn,V.FORBID_CONTENTS,Yt)),fr&&(N["#text"]=!0),Q&&ft(N,["html","head","body"]),N.table&&(ft(N,["tbody"]),delete we.tbody),V.TRUSTED_TYPES_POLICY){if(typeof V.TRUSTED_TYPES_POLICY.createHTML!="function")throw $f('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof V.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $f('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=V.TRUSTED_TYPES_POLICY,x=_.createHTML("")}else _===void 0&&(_=gae(d,i)),_!==null&&typeof x=="string"&&(x=_.createHTML(""));dn&&dn(V),En=V}},mM=ft({},[...ob,...sb,...oae]),gM=ft({},[...lb,...sae]),pH=function(V){let ce=b(V);(!ce||!ce.tagName)&&(ce={namespaceURI:Ae,tagName:"template"});const Pe=Im(V.tagName),Ht=Im(ce.tagName);return xt[V.namespaceURI]?V.namespaceURI===Io?ce.namespaceURI===X?Pe==="svg":ce.namespaceURI===$r?Pe==="svg"&&(Ht==="annotation-xml"||hr[Ht]):!!mM[Pe]:V.namespaceURI===$r?ce.namespaceURI===X?Pe==="math":ce.namespaceURI===Io?Pe==="math"&&Ir[Ht]:!!gM[Pe]:V.namespaceURI===X?ce.namespaceURI===Io&&!Ir[Ht]||ce.namespaceURI===$r&&!hr[Ht]?!1:!gM[Pe]&&(Po[Pe]||!mM[Pe]):!!(Ro==="application/xhtml+xml"&&xt[V.namespaceURI]):!1},Wi=function(V){Ff(e.removed,{element:V});try{b(V).removeChild(V)}catch{m(V)}},Fu=function(V,ce){try{Ff(e.removed,{attribute:ce.getAttributeNode(V),from:ce})}catch{Ff(e.removed,{attribute:null,from:ce})}if(ce.removeAttribute(V),V==="is")if(Se||Fe)try{Wi(ce)}catch{}else try{ce.setAttribute(V,"")}catch{}},yM=function(V){let ce=null,Pe=null;if(he)V="<remove></remove>"+V;else{const br=zD(V,/^[\r\n\t ]+/);Pe=br&&br[0]}Ro==="application/xhtml+xml"&&Ae===X&&(V='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+V+"</body></html>");const Ht=_?_.createHTML(V):V;if(Ae===X)try{ce=new h().parseFromString(Ht,Ro)}catch{}if(!ce||!ce.documentElement){ce=w.createDocument(Ae,"template",null);try{ce.documentElement.innerHTML=Ge?x:Ht}catch{}}const Hr=ce.body||ce.documentElement;return V&&Pe&&Hr.insertBefore(t.createTextNode(Pe),Hr.childNodes[0]||null),Ae===X?C.call(ce,Q?"html":"body")[0]:Q?ce.documentElement:Hr},bM=function(V){return S.call(V.ownerDocument||V,V,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},w1=function(V){return V instanceof f&&(typeof V.nodeName!="string"||typeof V.textContent!="string"||typeof V.removeChild!="function"||!(V.attributes instanceof c)||typeof V.removeAttribute!="function"||typeof V.setAttribute!="function"||typeof V.namespaceURI!="string"||typeof V.insertBefore!="function"||typeof V.hasChildNodes!="function")},_M=function(V){return typeof s=="function"&&V instanceof s};function $a(je,V,ce){cv(je,Pe=>{Pe.call(e,V,ce,En)})}const xM=function(V){let ce=null;if($a(M.beforeSanitizeElements,V,null),w1(V))return Wi(V),!0;const Pe=Yt(V.nodeName);if($a(M.uponSanitizeElement,V,{tagName:Pe,allowedTags:N}),ee&&V.hasChildNodes()&&!_M(V.firstElementChild)&&rn(/<[/\w!]/g,V.innerHTML)&&rn(/<[/\w!]/g,V.textContent)||V.nodeType===Gf.progressingInstruction||ee&&V.nodeType===Gf.comment&&rn(/<[/\w]/g,V.data))return Wi(V),!0;if(!N[Pe]||we[Pe]){if(!we[Pe]&&SM(Pe)&&(U.tagNameCheck instanceof RegExp&&rn(U.tagNameCheck,Pe)||U.tagNameCheck instanceof Function&&U.tagNameCheck(Pe)))return!1;if(fr&&!tn[Pe]){const Ht=b(V)||V.parentNode,Hr=y(V)||V.childNodes;if(Hr&&Ht){const br=Hr.length;for(let _n=br-1;_n>=0;--_n){const Ha=v(Hr[_n],!0);Ha.__removalCount=(V.__removalCount||0)+1,Ht.insertBefore(Ha,g(V))}}}return Wi(V),!0}return V instanceof l&&!pH(V)||(Pe==="noscript"||Pe==="noembed"||Pe==="noframes")&&rn(/<\/no(script|embed|frames)/i,V.innerHTML)?(Wi(V),!0):(G&&V.nodeType===Gf.text&&(ce=V.textContent,cv([D,E,L],Ht=>{ce=Vf(ce,Ht," ")}),V.textContent!==ce&&(Ff(e.removed,{element:V.cloneNode()}),V.textContent=ce)),$a(M.afterSanitizeElements,V,null),!1)},wM=function(V,ce,Pe){if(rt&&(ce==="id"||ce==="name")&&(Pe in t||Pe in x1))return!1;if(!(le&&!Ye[ce]&&rn(I,ce))){if(!(ge&&rn(R,ce))){if(!$[ce]||Ye[ce]){if(!(SM(V)&&(U.tagNameCheck instanceof RegExp&&rn(U.tagNameCheck,V)||U.tagNameCheck instanceof Function&&U.tagNameCheck(V))&&(U.attributeNameCheck instanceof RegExp&&rn(U.attributeNameCheck,ce)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(ce))||ce==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&rn(U.tagNameCheck,Pe)||U.tagNameCheck instanceof Function&&U.tagNameCheck(Pe))))return!1}else if(!mt[ce]){if(!rn(F,Vf(Pe,O,""))){if(!((ce==="src"||ce==="xlink:href"||ce==="href")&&V!=="script"&&rae(Pe,"data:")===0&&De[V])){if(!(be&&!rn(P,Vf(Pe,O,"")))){if(Pe)return!1}}}}}}return!0},SM=function(V){return V!=="annotation-xml"&&zD(V,j)},TM=function(V){$a(M.beforeSanitizeAttributes,V,null);const{attributes:ce}=V;if(!ce||w1(V))return;const Pe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$,forceKeepAttr:void 0};let Ht=ce.length;for(;Ht--;){const Hr=ce[Ht],{name:br,namespaceURI:_n,value:Ha}=Hr,Pf=Yt(br),S1=Ha;let Gr=br==="value"?S1:nae(S1);if(Pe.attrName=Pf,Pe.attrValue=Gr,Pe.keepAttr=!0,Pe.forceKeepAttr=void 0,$a(M.uponSanitizeAttribute,V,Pe),Gr=Pe.attrValue,at&&(Pf==="id"||Pf==="name")&&(Fu(br,V),Gr=ht+Gr),ee&&rn(/((--!?|])>)|<\/(style|title)/i,Gr)){Fu(br,V);continue}if(Pe.forceKeepAttr)continue;if(!Pe.keepAttr){Fu(br,V);continue}if(!re&&rn(/\/>/i,Gr)){Fu(br,V);continue}G&&cv([D,E,L],AM=>{Gr=Vf(Gr,AM," ")});const CM=Yt(V.nodeName);if(!wM(CM,Pf,Gr)){Fu(br,V);continue}if(_&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!_n)switch(d.getAttributeType(CM,Pf)){case"TrustedHTML":{Gr=_.createHTML(Gr);break}case"TrustedScriptURL":{Gr=_.createScriptURL(Gr);break}}if(Gr!==S1)try{_n?V.setAttributeNS(_n,br,Gr):V.setAttribute(br,Gr),w1(V)?Wi(V):BD(e.removed)}catch{Fu(br,V)}}$a(M.afterSanitizeAttributes,V,null)},vH=function je(V){let ce=null;const Pe=bM(V);for($a(M.beforeSanitizeShadowDOM,V,null);ce=Pe.nextNode();)$a(M.uponSanitizeShadowNode,ce,null),xM(ce),TM(ce),ce.content instanceof a&&je(ce.content);$a(M.afterSanitizeShadowDOM,V,null)};return e.sanitize=function(je){let V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ce=null,Pe=null,Ht=null,Hr=null;if(Ge=!je,Ge&&(je="<!-->"),typeof je!="string"&&!_M(je))if(typeof je.toString=="function"){if(je=je.toString(),typeof je!="string")throw $f("dirty is not a string, aborting")}else throw $f("toString is not a function");if(!e.isSupported)return je;if(me||Oo(V),e.removed=[],typeof je=="string"&&(yr=!1),yr){if(je.nodeName){const Ha=Yt(je.nodeName);if(!N[Ha]||we[Ha])throw $f("root node is forbidden and cannot be sanitized in-place")}}else if(je instanceof s)ce=yM("<!---->"),Pe=ce.ownerDocument.importNode(je,!0),Pe.nodeType===Gf.element&&Pe.nodeName==="BODY"||Pe.nodeName==="HTML"?ce=Pe:ce.appendChild(Pe);else{if(!Se&&!G&&!Q&&je.indexOf("<")===-1)return _&&xe?_.createHTML(je):je;if(ce=yM(je),!ce)return Se?null:xe?x:""}ce&&he&&Wi(ce.firstChild);const br=bM(yr?je:ce);for(;Ht=br.nextNode();)xM(Ht),TM(Ht),Ht.content instanceof a&&vH(Ht.content);if(yr)return je;if(Se){if(Fe)for(Hr=T.call(ce.ownerDocument);ce.firstChild;)Hr.appendChild(ce.firstChild);else Hr=ce;return($.shadowroot||$.shadowrootmode)&&(Hr=A.call(n,Hr,!0)),Hr}let _n=Q?ce.outerHTML:ce.innerHTML;return Q&&N["!doctype"]&&ce.ownerDocument&&ce.ownerDocument.doctype&&ce.ownerDocument.doctype.name&&rn(pB,ce.ownerDocument.doctype.name)&&(_n="<!DOCTYPE "+ce.ownerDocument.doctype.name+`>
|
||
`+_n),G&&cv([D,E,L],Ha=>{_n=Vf(_n,Ha," ")}),_&&xe?_.createHTML(_n):_n},e.setConfig=function(){let je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Oo(je),me=!0},e.clearConfig=function(){En=null,me=!1},e.isValidAttribute=function(je,V,ce){En||Oo({});const Pe=Yt(je),Ht=Yt(V);return wM(Pe,Ht,ce)},e.addHook=function(je,V){typeof V=="function"&&Ff(M[je],V)},e.removeHook=function(je,V){if(V!==void 0){const ce=eae(M[je],V);return ce===-1?void 0:tae(M[je],ce,1)[0]}return BD(M[je])},e.removeHooks=function(je){M[je]=[]},e.removeAllHooks=function(){M=WD()},e}vB();te([]);const yae={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function bae(r,e){return Y(),ae("svg",yae,e[0]||(e[0]=[Z("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[Z("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),Z("path",{d:"M15 3v18m-5-6l-3-3l3-3"})],-1)]))}vt({name:"lucide-panel-right-open",render:bae});const _ae=typeof window<"u";var UD;_ae&&((UD=window==null?void 0:window.navigator)!=null&&UD.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);const xae=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(xae)));const ku=typeof window<"u";var YD;ku&&(YD=window==null?void 0:window.navigator)!=null&&YD.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function qD(r){return r!=null}const wae=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(wae)));const Sae=ku&&("ontouchstart"in window||Cae()>0),Tae=Sae?"pointerdown":"click";function Cae(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function Aae(r,e,t=window.Event){const{type:n,bubbles:i=!1,cancelable:a=!1,...o}=e;if(!qD(n)||n==="")return!1;let s;return qD(t)?s=new t(n,{bubbles:i,cancelable:a}):(s=document.createEvent("HTMLEvents"),s.initEvent(n,i,a)),Object.assign(s,o),r.dispatchEvent(s)}const Mae="clickoutside",kae=new Set;ku&&document.addEventListener(Tae,r=>{const e=r.target,t=r.composedPath&&r.composedPath();kae.forEach(n=>{n!==e&&(t?!t.includes(n):!n.contains(e))&&(!n.__transferElement||n.__transferElement!==e&&!n.__transferElement.contains(e))&&Aae(n,{type:Mae})})},!0);const Dae=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];let Pm;if(ku){for(const r of Dae)if(r[1]in document){Pm=r;break}}de(()=>!1);const Eae=new Set,Lae=new WeakMap;if(ku&&Pm){const r=Pm[2],e=Pm[4];document.addEventListener(e,()=>{if(Eae.forEach(t=>{t.value=!1}),document[r]){const t=Lae.get(document[r]);t&&(t.value=!0)}},!1)}const mB=new Map;mB.set("x",0);mB.set("y",0);var Kl=[],Iae=function(){return Kl.some(function(r){return r.activeTargets.length>0})},Pae=function(){return Kl.some(function(r){return r.skippedTargets.length>0})},XD="ResizeObserver loop completed with undelivered notifications.",Rae=function(){var r;typeof ErrorEvent=="function"?r=new ErrorEvent("error",{message:XD}):(r=document.createEvent("Event"),r.initEvent("error",!1,!1),r.message=XD),window.dispatchEvent(r)},Rd;(function(r){r.BORDER_BOX="border-box",r.CONTENT_BOX="content-box",r.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Rd||(Rd={}));var Zl=function(r){return Object.freeze(r)},Oae=function(){function r(e,t){this.inlineSize=e,this.blockSize=t,Zl(this)}return r}(),gB=function(){function r(e,t,n,i){return this.x=e,this.y=t,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Zl(this)}return r.prototype.toJSON=function(){var e=this,t=e.x,n=e.y,i=e.top,a=e.right,o=e.bottom,s=e.left,l=e.width,u=e.height;return{x:t,y:n,top:i,right:a,bottom:o,left:s,width:l,height:u}},r.fromRect=function(e){return new r(e.x,e.y,e.width,e.height)},r}(),nC=function(r){return r instanceof SVGElement&&"getBBox"in r},yB=function(r){if(nC(r)){var e=r.getBBox(),t=e.width,n=e.height;return!t&&!n}var i=r,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||r.getClientRects().length)},KD=function(r){var e;if(r instanceof Element)return!0;var t=(e=r==null?void 0:r.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(t&&r instanceof t.Element)},jae=function(r){switch(r.tagName){case"INPUT":if(r.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},td=typeof window<"u"?window:{},hv=new WeakMap,ZD=/auto|scroll/,Nae=/^tb|vertical/,Bae=/msie|trident/i.test(td.navigator&&td.navigator.userAgent),Ui=function(r){return parseFloat(r||"0")},Oc=function(r,e,t){return r===void 0&&(r=0),e===void 0&&(e=0),t===void 0&&(t=!1),new Oae((t?e:r)||0,(t?r:e)||0)},JD=Zl({devicePixelContentBoxSize:Oc(),borderBoxSize:Oc(),contentBoxSize:Oc(),contentRect:new gB(0,0,0,0)}),bB=function(r,e){if(e===void 0&&(e=!1),hv.has(r)&&!e)return hv.get(r);if(yB(r))return hv.set(r,JD),JD;var t=getComputedStyle(r),n=nC(r)&&r.ownerSVGElement&&r.getBBox(),i=!Bae&&t.boxSizing==="border-box",a=Nae.test(t.writingMode||""),o=!n&&ZD.test(t.overflowY||""),s=!n&&ZD.test(t.overflowX||""),l=n?0:Ui(t.paddingTop),u=n?0:Ui(t.paddingRight),c=n?0:Ui(t.paddingBottom),f=n?0:Ui(t.paddingLeft),h=n?0:Ui(t.borderTopWidth),d=n?0:Ui(t.borderRightWidth),p=n?0:Ui(t.borderBottomWidth),v=n?0:Ui(t.borderLeftWidth),m=f+u,g=l+c,y=v+d,b=h+p,_=s?r.offsetHeight-b-r.clientHeight:0,x=o?r.offsetWidth-y-r.clientWidth:0,w=i?m+y:0,S=i?g+b:0,T=n?n.width:Ui(t.width)-w-x,C=n?n.height:Ui(t.height)-S-_,A=T+m+x+y,M=C+g+_+b,D=Zl({devicePixelContentBoxSize:Oc(Math.round(T*devicePixelRatio),Math.round(C*devicePixelRatio),a),borderBoxSize:Oc(A,M,a),contentBoxSize:Oc(T,C,a),contentRect:new gB(f,l,T,C)});return hv.set(r,D),D},_B=function(r,e,t){var n=bB(r,t),i=n.borderBoxSize,a=n.contentBoxSize,o=n.devicePixelContentBoxSize;switch(e){case Rd.DEVICE_PIXEL_CONTENT_BOX:return o;case Rd.BORDER_BOX:return i;default:return a}},zae=function(){function r(e){var t=bB(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=Zl([t.borderBoxSize]),this.contentBoxSize=Zl([t.contentBoxSize]),this.devicePixelContentBoxSize=Zl([t.devicePixelContentBoxSize])}return r}(),xB=function(r){if(yB(r))return 1/0;for(var e=0,t=r.parentNode;t;)e+=1,t=t.parentNode;return e},Fae=function(){var r=1/0,e=[];Kl.forEach(function(a){if(a.activeTargets.length!==0){var o=[];a.activeTargets.forEach(function(s){var l=new zae(s.target),u=xB(s.target);o.push(l),s.lastReportedSize=_B(s.target,s.observedBox),u<r&&(r=u)}),e.push(function(){a.callback.call(a.observer,o,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var t=0,n=e;t<n.length;t++){var i=n[t];i()}return r},QD=function(r){Kl.forEach(function(e){e.activeTargets.splice(0,e.activeTargets.length),e.skippedTargets.splice(0,e.skippedTargets.length),e.observationTargets.forEach(function(t){t.isActive()&&(xB(t.target)>r?e.activeTargets.push(t):e.skippedTargets.push(t))})})},Vae=function(){var r=0;for(QD(r);Iae();)r=Fae(),QD(r);return Pae()&&Rae(),r>0},cb,wB=[],$ae=function(){return wB.splice(0).forEach(function(r){return r()})},Hae=function(r){if(!cb){var e=0,t=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return $ae()}).observe(t,n),cb=function(){t.textContent="".concat(e?e--:e++)}}wB.push(r),cb()},Gae=function(r){Hae(function(){requestAnimationFrame(r)})},Rm=0,Wae=function(){return!!Rm},Uae=250,Yae={attributes:!0,characterData:!0,childList:!0,subtree:!0},eE=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],tE=function(r){return r===void 0&&(r=0),Date.now()+r},fb=!1,qae=function(){function r(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return r.prototype.run=function(e){var t=this;if(e===void 0&&(e=Uae),!fb){fb=!0;var n=tE(e);Gae(function(){var i=!1;try{i=Vae()}finally{if(fb=!1,e=n-tE(),!Wae())return;i?t.run(1e3):e>0?t.run(e):t.start()}})}},r.prototype.schedule=function(){this.stop(),this.run()},r.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Yae)};document.body?t():td.addEventListener("DOMContentLoaded",t)},r.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),eE.forEach(function(t){return td.addEventListener(t,e.listener,!0)}))},r.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),eE.forEach(function(t){return td.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},r}(),$w=new qae,rE=function(r){!Rm&&r>0&&$w.start(),Rm+=r,!Rm&&$w.stop()},Xae=function(r){return!nC(r)&&!jae(r)&&getComputedStyle(r).display==="inline"},Kae=function(){function r(e,t){this.target=e,this.observedBox=t||Rd.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return r.prototype.isActive=function(){var e=_B(this.target,this.observedBox,!0);return Xae(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},r}(),Zae=function(){function r(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return r}(),dv=new WeakMap,nE=function(r,e){for(var t=0;t<r.length;t+=1)if(r[t].target===e)return t;return-1},pv=function(){function r(){}return r.connect=function(e,t){var n=new Zae(e,t);dv.set(e,n)},r.observe=function(e,t,n){var i=dv.get(e),a=i.observationTargets.length===0;nE(i.observationTargets,t)<0&&(a&&Kl.push(i),i.observationTargets.push(new Kae(t,n&&n.box)),rE(1),$w.schedule())},r.unobserve=function(e,t){var n=dv.get(e),i=nE(n.observationTargets,t),a=n.observationTargets.length===1;i>=0&&(a&&Kl.splice(Kl.indexOf(n),1),n.observationTargets.splice(i,1),rE(-1))},r.disconnect=function(e){var t=this,n=dv.get(e);n.observationTargets.slice().forEach(function(i){return t.unobserve(e,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},r}(),Jae=function(){function r(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");pv.connect(this,e)}return r.prototype.observe=function(e,t){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!KD(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");pv.observe(this,e,t)},r.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!KD(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");pv.unobserve(this,e)},r.prototype.disconnect=function(){pv.disconnect(this)},r.toString=function(){return"function ResizeObserver () { [polyfill code] }"},r}();const Qae=new WeakMap;function eoe(r){var e;for(let t=0,n=r.length;t<n;++t){const i=r[t],a=Qae.get(i.target);if(typeof a=="function"){const{inlineSize:o,blockSize:s}=((e=i.borderBoxSize)==null?void 0:e[0])??{},{offsetWidth:l,offsetHeight:u}=i.target;a(Object.assign(i,{offsetWidth:l,offsetHeight:u,width:o??l,height:s??u}))}}}new(ku&&window.ResizeObserver||Jae)(eoe);const toe=te(!1);de(()=>toe.value);const iE="__theme_style__",hb="__theme_observer__",aE=wu(new Map),oE=new Map;Nt(aE,()=>{if(!ku)return;oE.clear();const r=document.head.querySelector(`#${iE}`);r&&document.head.removeChild(r);const e=document.createElement("style");let t=`.${hb} { width: 1px }`,n=1;for(const[i,[a,o]]of aE.entries())t+=` html.${a} .${hb}, .${o} .${hb} { width: ${++n}px }`,oE.set(n,i);e.textContent=t,e.id=iE,document.head.appendChild(e)});(function(){try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation.
|
||
|
||
Permission to use, copy, modify, and/or distribute this software for any
|
||
purpose with or without fee is hereby granted.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
PERFORMANCE OF THIS SOFTWARE.
|
||
***************************************************************************** */var Hw=function(r,e){return Hw=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},Hw(r,e)};function z(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Hw(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var roe=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),noe=function(){function r(){this.browser=new roe,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 r}(),Ze=new noe;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Ze.wxa=!0,Ze.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Ze.worker=!0:!Ze.hasGlobalWindow||"Deno"in window?(Ze.node=!0,Ze.svgSupported=!0):ioe(navigator.userAgent,Ze);function ioe(r,e){var t=e.browser,n=r.match(/Firefox\/([\d.]+)/),i=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(t.firefox=!0,t.version=n[1]),i&&(t.ie=!0,t.version=i[1]),a&&(t.edge=!0,t.version=a[1],t.newEdge=+a[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}var iC=12,SB="sans-serif",Ms=iC+"px "+SB,aoe=20,ooe=100,soe="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function loe(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t<r.length;t++){var n=String.fromCharCode(t+32),i=(r.charCodeAt(t)-aoe)/ooe;e[n]=i}return e}var uoe=loe(soe),ks={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var r,e;return function(t,n){if(!r){var i=ks.createCanvas();r=i&&i.getContext("2d")}if(r)return e!==n&&(e=r.font=n||Ms),r.measureText(t);t=t||"",n=n||Ms;var a=/((?:\d+)?\.?\d*)px/.exec(n),o=a&&+a[1]||iC,s=0;if(n.indexOf("mono")>=0)s=o*t.length;else for(var l=0;l<t.length;l++){var u=uoe[t[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(r,e,t){var n=new Image;return n.onload=e,n.onerror=t,n.src=r,n}},TB=Ea(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,e){return r["[object "+e+"]"]=!0,r},{}),CB=Ea(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,e){return r["[object "+e+"Array]"]=!0,r},{}),vf=Object.prototype.toString,I0=Array.prototype,coe=I0.forEach,foe=I0.filter,aC=I0.slice,hoe=I0.map,sE=(function(){}).constructor,vv=sE?sE.prototype:null,oC="__proto__",doe=2311;function AB(){return doe++}function sC(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];typeof console<"u"&&console.error.apply(console,r)}function ke(r){if(r==null||typeof r!="object")return r;var e=r,t=vf.call(r);if(t==="[object Array]"){if(!rd(r)){e=[];for(var n=0,i=r.length;n<i;n++)e[n]=ke(r[n])}}else if(CB[t]){if(!rd(r)){var a=r.constructor;if(a.from)e=a.from(r);else{e=new a(r.length);for(var n=0,i=r.length;n<i;n++)e[n]=r[n]}}}else if(!TB[t]&&!rd(r)&&!Jc(r)){e={};for(var o in r)r.hasOwnProperty(o)&&o!==oC&&(e[o]=ke(r[o]))}return e}function Be(r,e,t){if(!Me(e)||!Me(r))return t?ke(e):r;for(var n in e)if(e.hasOwnProperty(n)&&n!==oC){var i=r[n],a=e[n];Me(a)&&Me(i)&&!q(a)&&!q(i)&&!Jc(a)&&!Jc(i)&&!lE(a)&&!lE(i)&&!rd(a)&&!rd(i)?Be(i,a,t):(t||!(n in r))&&(r[n]=ke(e[n]))}return r}function lC(r,e){for(var t=r[0],n=1,i=r.length;n<i;n++)t=Be(t,r[n],e);return t}function W(r,e){if(Object.assign)Object.assign(r,e);else for(var t in e)e.hasOwnProperty(t)&&t!==oC&&(r[t]=e[t]);return r}function Ce(r,e,t){for(var n=et(e),i=0,a=n.length;i<a;i++){var o=n[i];(t?e[o]!=null:r[o]==null)&&(r[o]=e[o])}return r}function He(r,e){if(r){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t}return-1}function poe(r,e){var t=r.prototype;function n(){}n.prototype=e.prototype,r.prototype=new n;for(var i in t)t.hasOwnProperty(i)&&(r.prototype[i]=t[i]);r.prototype.constructor=r,r.superClass=e}function cr(r,e,t){if(r="prototype"in r?r.prototype:r,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),i=0;i<n.length;i++){var a=n[i];a!=="constructor"&&(t?e[a]!=null:r[a]==null)&&(r[a]=e[a])}else Ce(r,e,t)}function Zr(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function k(r,e,t){if(r&&e)if(r.forEach&&r.forEach===coe)r.forEach(e,t);else if(r.length===+r.length)for(var n=0,i=r.length;n<i;n++)e.call(t,r[n],n,r);else for(var a in r)r.hasOwnProperty(a)&&e.call(t,r[a],a,r)}function K(r,e,t){if(!r)return[];if(!e)return uC(r);if(r.map&&r.map===hoe)return r.map(e,t);for(var n=[],i=0,a=r.length;i<a;i++)n.push(e.call(t,r[i],i,r));return n}function Ea(r,e,t,n){if(r&&e){for(var i=0,a=r.length;i<a;i++)t=e.call(n,t,r[i],i,r);return t}}function pt(r,e,t){if(!r)return[];if(!e)return uC(r);if(r.filter&&r.filter===foe)return r.filter(e,t);for(var n=[],i=0,a=r.length;i<a;i++)e.call(t,r[i],i,r)&&n.push(r[i]);return n}function voe(r,e,t){if(r&&e){for(var n=0,i=r.length;n<i;n++)if(e.call(t,r[n],n,r))return r[n]}}function et(r){if(!r)return[];if(Object.keys)return Object.keys(r);var e=[];for(var t in r)r.hasOwnProperty(t)&&e.push(t);return e}function moe(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return function(){return r.apply(e,t.concat(aC.call(arguments)))}}var ue=vv&&Te(vv.bind)?vv.call.bind(vv.bind):moe;function Oe(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return r.apply(this,e.concat(aC.call(arguments)))}}function q(r){return Array.isArray?Array.isArray(r):vf.call(r)==="[object Array]"}function Te(r){return typeof r=="function"}function se(r){return typeof r=="string"}function Gw(r){return vf.call(r)==="[object String]"}function lt(r){return typeof r=="number"}function Me(r){var e=typeof r;return e==="function"||!!r&&e==="object"}function lE(r){return!!TB[vf.call(r)]}function Dn(r){return!!CB[vf.call(r)]}function Jc(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function P0(r){return r.colorStops!=null}function goe(r){return r.image!=null}function yoe(r){return vf.call(r)==="[object RegExp]"}function Od(r){return r!==r}function kr(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=0,n=r.length;t<n;t++)if(r[t]!=null)return r[t]}function Re(r,e){return r??e}function _a(r,e,t){return r??e??t}function uC(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return aC.apply(r,e)}function cC(r){if(typeof r=="number")return[r,r,r,r];var e=r.length;return e===2?[r[0],r[1],r[0],r[1]]:e===3?[r[0],r[1],r[2],r[1]]:r}function vn(r,e){if(!r)throw new Error(e)}function Li(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var MB="__ec_primitive__";function sy(r){r[MB]=!0}function rd(r){return r[MB]}var boe=function(){function r(){this.data={}}return r.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},r.prototype.has=function(e){return this.data.hasOwnProperty(e)},r.prototype.get=function(e){return this.data[e]},r.prototype.set=function(e,t){return this.data[e]=t,this},r.prototype.keys=function(){return et(this.data)},r.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},r}(),kB=typeof Map=="function";function _oe(){return kB?new Map:new boe}var xoe=function(){function r(e){var t=q(e);this.data=_oe();var n=this;e instanceof r?e.each(i):e&&k(e,i);function i(a,o){t?n.set(a,o):n.set(o,a)}}return r.prototype.hasKey=function(e){return this.data.has(e)},r.prototype.get=function(e){return this.data.get(e)},r.prototype.set=function(e,t){return this.data.set(e,t),t},r.prototype.each=function(e,t){this.data.forEach(function(n,i){e.call(t,n,i)})},r.prototype.keys=function(){var e=this.data.keys();return kB?Array.from(e):e},r.prototype.removeKey=function(e){this.data.delete(e)},r}();function ve(r){return new xoe(r)}function jd(r,e){for(var t=new r.constructor(r.length+e.length),n=0;n<r.length;n++)t[n]=r[n];for(var i=r.length,n=0;n<e.length;n++)t[n+i]=e[n];return t}function R0(r,e){var t;if(Object.create)t=Object.create(r);else{var n=function(){};n.prototype=r,t=new n}return e&&W(t,e),t}function DB(r){var e=r.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function fe(r,e){return r.hasOwnProperty(e)}function tr(){}var Om=180/Math.PI;function Du(r,e){return r==null&&(r=0),e==null&&(e=0),[r,e]}function on(r,e){return r[0]=e[0],r[1]=e[1],r}function co(r){return[r[0],r[1]]}function woe(r,e,t){return r[0]=e,r[1]=t,r}function uE(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r}function Ww(r,e,t,n){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r}function Ll(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r}function Uw(r){return Math.sqrt(Soe(r))}function Soe(r){return r[0]*r[0]+r[1]*r[1]}function jm(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r}function mf(r,e){var t=Uw(e);return t===0?(r[0]=0,r[1]=0):(r[0]=e[0]/t,r[1]=e[1]/t),r}function Yw(r,e){return Math.sqrt((r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1]))}var ss=Yw;function Toe(r,e){return(r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1])}var Jl=Toe;function Nm(r,e,t,n){return r[0]=e[0]+n*(t[0]-e[0]),r[1]=e[1]+n*(t[1]-e[1]),r}function Br(r,e,t){var n=e[0],i=e[1];return r[0]=t[0]*n+t[2]*i+t[4],r[1]=t[1]*n+t[3]*i+t[5],r}function ls(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r}function us(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r}var Yu=function(){function r(e,t){this.target=e,this.topTarget=t&&t.topTarget}return r}(),Coe=function(){function r(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Yu(t,e),"dragstart",e.event))},r.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,i=e.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,t.drift(a,o,e),this.handler.dispatchToElement(new Yu(t,e),"drag",e.event);var s=this.handler.findHover(n,i,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Yu(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new Yu(s,e),"dragenter",e.event))}},r.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Yu(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Yu(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},r}(),gi=function(){function r(e){e&&(this._$eventProcessor=e)}return r.prototype.on=function(e,t,n,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof t=="function"&&(i=n,n=t,t=null),!n||!e)return this;var o=this._$eventProcessor;t!=null&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),a[e]||(a[e]=[]);for(var s=0;s<a[e].length;s++)if(a[e][s].h===n)return this;var l={h:n,query:t,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},u=a[e].length-1,c=a[e][u];return c&&c.callAtLast?a[e].splice(u,0,l):a[e].push(l),this},r.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},r.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var i=[],a=0,o=n[e].length;a<o;a++)n[e][a].h!==t&&i.push(n[e][a]);n[e]=i}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},r.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=t.length,s=i.length,l=0;l<s;l++){var u=i[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(e,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,t[0]);break;case 2:u.h.call(u.ctx,t[0],t[1]);break;default:u.h.apply(u.ctx,t);break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},r.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=t.length,s=t[o-1],l=i.length,u=0;u<l;u++){var c=i[u];if(!(a&&a.filter&&c.query!=null&&!a.filter(e,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,t[0]);break;case 2:c.h.call(s,t[0],t[1]);break;default:c.h.apply(s,t.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},r}(),Aoe=Math.log(2);function qw(r,e,t,n,i,a){var o=n+"-"+i,s=r.length;if(a.hasOwnProperty(o))return a[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~i)/Aoe);return r[t][l]}for(var u=n|1<<t,c=t+1;n&1<<c;)c++;for(var f=0,h=0,d=0;h<s;h++){var p=1<<h;p&i||(f+=(d%2?-1:1)*r[t][h]*qw(r,e-1,c,u,i|p,a),d++)}return a[o]=f,f}function cE(r,e){var t=[[r[0],r[1],1,0,0,0,-e[0]*r[0],-e[0]*r[1]],[0,0,0,r[0],r[1],1,-e[1]*r[0],-e[1]*r[1]],[r[2],r[3],1,0,0,0,-e[2]*r[2],-e[2]*r[3]],[0,0,0,r[2],r[3],1,-e[3]*r[2],-e[3]*r[3]],[r[4],r[5],1,0,0,0,-e[4]*r[4],-e[4]*r[5]],[0,0,0,r[4],r[5],1,-e[5]*r[4],-e[5]*r[5]],[r[6],r[7],1,0,0,0,-e[6]*r[6],-e[6]*r[7]],[0,0,0,r[6],r[7],1,-e[7]*r[6],-e[7]*r[7]]],n={},i=qw(t,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)*qw(t,7,o===0?1:0,1<<o,1<<s,n)/i*e[o];return function(l,u,c){var f=u*a[6]+c*a[7]+1;l[0]=(u*a[0]+c*a[1]+a[2])/f,l[1]=(u*a[3]+c*a[4]+a[5])/f}}}var fE="___zrEVENTSAVED",db=[];function Moe(r,e,t,n,i){return Xw(db,e,n,i,!0)&&Xw(r,t,db[0],db[1])}function Xw(r,e,t,n,i){if(e.getBoundingClientRect&&Ze.domSupported&&!EB(e)){var a=e[fE]||(e[fE]={}),o=koe(e,a),s=Doe(o,a,i);if(s)return s(r,t,n),!0}return!1}function koe(r,e){var t=e.markers;if(t)return t;t=e.markers=[];for(var n=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return t}function Doe(r,e,t){for(var n=t?"invTrans":"trans",i=e[n],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),f=2*u,h=c.left,d=c.top;o.push(h,d),l=l&&a&&h===a[f]&&d===a[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=t?cE(s,o):cE(o,s))}function EB(r){return r.nodeName.toUpperCase()==="CANVAS"}var Eoe=/([&<>"'])/g,Loe={"&":"&","<":"<",">":">",'"':""","'":"'"};function un(r){return r==null?"":(r+"").replace(Eoe,function(e,t){return Loe[t]})}var Ioe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,pb=[],Poe=Ze.browser.firefox&&+Ze.browser.version.split(".")[0]<39;function Kw(r,e,t,n){return t=t||{},n?hE(r,e,t):Poe&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):hE(r,e,t),t}function hE(r,e,t){if(Ze.domSupported&&r.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(EB(r)){var a=r.getBoundingClientRect();t.zrX=n-a.left,t.zrY=i-a.top;return}else if(Xw(pb,r,n,i)){t.zrX=pb[0],t.zrY=pb[1];return}}t.zrX=t.zrY=0}function fC(r){return r||window.event}function Zn(r,e,t){if(e=fC(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&Kw(r,o,e,t)}else{Kw(r,e,e,t);var a=Roe(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&Ioe.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function Roe(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,n=r.deltaY;if(t==null||n==null)return e;var i=Math.abs(n!==0?n:t),a=n>0?-1:n<0?1:t>0?-1:1;return 3*i*a}function Zw(r,e,t,n){r.addEventListener(e,t,n)}function Ooe(r,e,t,n){r.removeEventListener(e,t,n)}var _o=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function dE(r){return r.which===2||r.which===3}var joe=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:t,event:e},o=0,s=i.length;o<s;o++){var l=i[o],u=Kw(n,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},r.prototype._recognize=function(e){for(var t in vb)if(vb.hasOwnProperty(t)){var n=vb[t](this._track,e);if(n)return n}},r}();function pE(r){var e=r[1][0]-r[0][0],t=r[1][1]-r[0][1];return Math.sqrt(e*e+t*t)}function Noe(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var vb={pinch:function(r,e){var t=r.length;if(t){var n=(r[t-1]||{}).points,i=(r[t-2]||{}).points||n;if(i&&i.length>1&&n&&n.length>1){var a=pE(n)/pE(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=Noe(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function zn(){return[1,0,0,1,0,0]}function O0(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function hC(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function fo(r,e,t){var n=e[0]*t[0]+e[2]*t[1],i=e[1]*t[0]+e[3]*t[1],a=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function La(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function Eu(r,e,t,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(t),f=Math.cos(t);return r[0]=i*f+s*c,r[1]=-i*c+s*f,r[2]=a*f+l*c,r[3]=-a*c+f*l,r[4]=f*(o-n[0])+c*(u-n[1])+n[0],r[5]=f*(u-n[1])-c*(o-n[0])+n[1],r}function dC(r,e,t){var n=t[0],i=t[1];return r[0]=e[0]*n,r[1]=e[1]*i,r[2]=e[2]*n,r[3]=e[3]*i,r[4]=e[4]*n,r[5]=e[5]*i,r}function gf(r,e){var t=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=t*o-a*n;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-n*l,r[3]=t*l,r[4]=(n*s-o*i)*l,r[5]=(a*i-t*s)*l,r):null}function Boe(r){var e=zn();return hC(e,r),e}var ze=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,n){e.x=t,e.y=n},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},r.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},r.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},r.scaleAndAdd=function(e,t,n,i){e.x=t.x+n.x*i,e.y=t.y+n.y*i},r.lerp=function(e,t,n,i){var a=1-i;e.x=a*t.x+i*n.x,e.y=a*t.y+i*n.y},r}(),mv=Math.min,gv=Math.max,Ws=new ze,Us=new ze,Ys=new ze,qs=new ze,Wf=new ze,Uf=new ze,Ve=function(){function r(e,t,n,i){n<0&&(e=e+n,n=-n),i<0&&(t=t+i,i=-i),this.x=e,this.y=t,this.width=n,this.height=i}return r.prototype.union=function(e){var t=mv(e.x,this.x),n=mv(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=gv(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=gv(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,i=e.height/t.height,a=zn();return La(a,a,[-t.x,-t.y]),dC(a,a,[n,i]),La(a,a,[e.x,e.y]),a},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var n=this,i=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,l=e.x,u=e.x+e.width,c=e.y,f=e.y+e.height,h=!(a<l||u<i||s<c||f<o);if(t){var d=1/0,p=0,v=Math.abs(a-l),m=Math.abs(u-i),g=Math.abs(s-c),y=Math.abs(f-o),b=Math.min(v,m),_=Math.min(g,y);a<l||u<i?b>p&&(p=b,v<m?ze.set(Uf,-v,0):ze.set(Uf,m,0)):b<d&&(d=b,v<m?ze.set(Wf,v,0):ze.set(Wf,-m,0)),s<c||f<o?_>p&&(p=_,g<y?ze.set(Uf,0,-g):ze.set(Uf,0,y)):b<d&&(d=b,g<y?ze.set(Wf,0,g):ze.set(Wf,0,-y))}return t&&ze.copy(t,h?Wf:Uf),h},r.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,n){if(!n){e!==t&&r.copy(e,t);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];e.x=t.x*i+o,e.y=t.y*a+s,e.width=t.width*i,e.height=t.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Ws.x=Ys.x=t.x,Ws.y=qs.y=t.y,Us.x=qs.x=t.x+t.width,Us.y=Ys.y=t.y+t.height,Ws.transform(n),qs.transform(n),Us.transform(n),Ys.transform(n),e.x=mv(Ws.x,Us.x,Ys.x,qs.x),e.y=mv(Ws.y,Us.y,Ys.y,qs.y);var l=gv(Ws.x,Us.x,Ys.x,qs.x),u=gv(Ws.y,Us.y,Ys.y,qs.y);e.width=l-e.x,e.height=u-e.y},r}(),LB="silent";function zoe(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:Foe}}function Foe(){_o(this.event)}var Voe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(gi),Yf=function(){function r(e,t){this.x=e,this.y=t}return r}(),$oe=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],mb=new Ve(0,0,0,0),IB=function(r){z(e,r);function e(t,n,i,a,o){var s=r.call(this)||this;return s._hovered=new Yf(0,0),s.storage=t,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new Voe,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new Coe(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(k($oe,function(n){t.on&&t.on(n,this[n],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var n=t.zrX,i=t.zrY,a=PB(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 Yf(n,i):this.findHover(n,i),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var n=t.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Yf(0,0)},e.prototype.dispatch=function(t,n){var i=this[t];i&&i.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var n=this.proxy;n.setCursor&&n.setCursor(t)},e.prototype.dispatchToElement=function(t,n,i){t=t||{};var a=t.target;if(!(a&&a.silent)){for(var o="on"+n,s=zoe(n,t,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)}))}},e.prototype.findHover=function(t,n,i){var a=this.storage.getDisplayList(),o=new Yf(t,n);if(vE(a,o,t,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new Ve(t-u,n-u,l,l),f=a.length-1;f>=0;f--){var h=a[f];h!==i&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(mb.copy(h.getBoundingRect()),h.transform&&mb.applyTransform(h.transform),mb.intersect(c)&&s.push(h))}if(s.length)for(var d=4,p=Math.PI/12,v=Math.PI*2,m=0;m<u;m+=d)for(var g=0;g<v;g+=p){var y=t+m*Math.cos(g),b=n+m*Math.sin(g);if(vE(s,o,y,b,i),o.target)return o}}return o},e.prototype.processGesture=function(t,n){this._gestureMgr||(this._gestureMgr=new joe);var i=this._gestureMgr;n==="start"&&i.clear();var a=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(n==="end"&&i.clear(),a){var o=a.type;t.gestureEvent=o;var s=new Yf;s.target=a.target,this.dispatchToElement(s,o,a.event)}},e}(gi);k(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){IB.prototype[r]=function(e){var t=e.zrX,n=e.zrY,i=PB(this,t,n),a,o;if((r!=="mouseup"||!i)&&(a=this.findHover(t,n),o=a.target),r==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||ss(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,r,e)}});function Hoe(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var n=r,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,t))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s||n.parent}return i?LB:!0}return!1}function vE(r,e,t,n,i){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==i&&!o.ignore&&(s=Hoe(o,t,n))&&(!e.topTarget&&(e.topTarget=o),s!==LB)){e.target=o;break}}}function PB(r,e,t){var n=r.painter;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var RB=32,qf=7;function Goe(r){for(var e=0;r>=RB;)e|=r&1,r>>=1;return r+e}function mE(r,e,t,n){var i=e+1;if(i===t)return 1;if(n(r[i++],r[e])<0){for(;i<t&&n(r[i],r[i-1])<0;)i++;Woe(r,e,i)}else for(;i<t&&n(r[i],r[i-1])>=0;)i++;return i-e}function Woe(r,e,t){for(t--;e<t;){var n=r[e];r[e++]=r[t],r[t--]=n}}function gE(r,e,t,n,i){for(n===e&&n++;n<t;n++){for(var a=r[n],o=e,s=n,l;o<s;)l=o+s>>>1,i(a,r[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=a}}function gb(r,e,t,n,i,a){var o=0,s=0,l=1;if(a(r,e[t+i])>0){for(s=n-i;l<s&&a(r,e[t+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(r,e[t+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var c=o+(l-o>>>1);a(r,e[t+c])>0?o=c+1:l=c}return l}function yb(r,e,t,n,i,a){var o=0,s=0,l=1;if(a(r,e[t+i])<0){for(s=i+1;l<s&&a(r,e[t+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l<s&&a(r,e[t+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 c=o+(l-o>>>1);a(r,e[t+c])<0?l=c:o=c+1}return l}function Uoe(r,e){var t=qf,n,i,a=0,o=[];n=[],i=[];function s(d,p){n[a]=d,i[a]=p,a+=1}function l(){for(;a>1;){var d=a-2;if(d>=1&&i[d-1]<=i[d]+i[d+1]||d>=2&&i[d-2]<=i[d]+i[d-1])i[d-1]<i[d+1]&&d--;else if(i[d]>i[d+1])break;c(d)}}function u(){for(;a>1;){var d=a-2;d>0&&i[d-1]<i[d+1]&&d--,c(d)}}function c(d){var p=n[d],v=i[d],m=n[d+1],g=i[d+1];i[d]=v+g,d===a-3&&(n[d+1]=n[d+2],i[d+1]=i[d+2]),a--;var y=yb(r[m],r,p,v,0,e);p+=y,v-=y,v!==0&&(g=gb(r[p+v-1],r,m,g,g-1,e),g!==0&&(v<=g?f(p,v,m,g):h(p,v,m,g)))}function f(d,p,v,m){var g=0;for(g=0;g<p;g++)o[g]=r[d+g];var y=0,b=v,_=d;if(r[_++]=r[b++],--m===0){for(g=0;g<p;g++)r[_+g]=o[y+g];return}if(p===1){for(g=0;g<m;g++)r[_+g]=r[b+g];r[_+m]=o[y];return}for(var x=t,w,S,T;;){w=0,S=0,T=!1;do if(e(r[b],o[y])<0){if(r[_++]=r[b++],S++,w=0,--m===0){T=!0;break}}else if(r[_++]=o[y++],w++,S=0,--p===1){T=!0;break}while((w|S)<x);if(T)break;do{if(w=yb(r[b],o,y,p,0,e),w!==0){for(g=0;g<w;g++)r[_+g]=o[y+g];if(_+=w,y+=w,p-=w,p<=1){T=!0;break}}if(r[_++]=r[b++],--m===0){T=!0;break}if(S=gb(o[y],r,b,m,0,e),S!==0){for(g=0;g<S;g++)r[_+g]=r[b+g];if(_+=S,b+=S,m-=S,m===0){T=!0;break}}if(r[_++]=o[y++],--p===1){T=!0;break}x--}while(w>=qf||S>=qf);if(T)break;x<0&&(x=0),x+=2}if(t=x,t<1&&(t=1),p===1){for(g=0;g<m;g++)r[_+g]=r[b+g];r[_+m]=o[y]}else{if(p===0)throw new Error;for(g=0;g<p;g++)r[_+g]=o[y+g]}}function h(d,p,v,m){var g=0;for(g=0;g<m;g++)o[g]=r[v+g];var y=d+p-1,b=m-1,_=v+m-1,x=0,w=0;if(r[_--]=r[y--],--p===0){for(x=_-(m-1),g=0;g<m;g++)r[x+g]=o[g];return}if(m===1){for(_-=p,y-=p,w=_+1,x=y+1,g=p-1;g>=0;g--)r[w+g]=r[x+g];r[_]=o[b];return}for(var S=t;;){var T=0,C=0,A=!1;do if(e(o[b],r[y])<0){if(r[_--]=r[y--],T++,C=0,--p===0){A=!0;break}}else if(r[_--]=o[b--],C++,T=0,--m===1){A=!0;break}while((T|C)<S);if(A)break;do{if(T=p-yb(o[b],r,d,p,p-1,e),T!==0){for(_-=T,y-=T,p-=T,w=_+1,x=y+1,g=T-1;g>=0;g--)r[w+g]=r[x+g];if(p===0){A=!0;break}}if(r[_--]=o[b--],--m===1){A=!0;break}if(C=m-gb(r[y],o,0,m,m-1,e),C!==0){for(_-=C,b-=C,m-=C,w=_+1,x=b+1,g=0;g<C;g++)r[w+g]=o[x+g];if(m<=1){A=!0;break}}if(r[_--]=r[y--],--p===0){A=!0;break}S--}while(T>=qf||C>=qf);if(A)break;S<0&&(S=0),S+=2}if(t=S,t<1&&(t=1),m===1){for(_-=p,y-=p,w=_+1,x=y+1,g=p-1;g>=0;g--)r[w+g]=r[x+g];r[_]=o[b]}else{if(m===0)throw new Error;for(x=_-(m-1),g=0;g<m;g++)r[x+g]=o[g]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function Bm(r,e,t,n){t||(t=0),n||(n=r.length);var i=n-t;if(!(i<2)){var a=0;if(i<RB){a=mE(r,t,n,e),gE(r,t,n,t+a,e);return}var o=Uoe(r,e),s=Goe(i);do{if(a=mE(r,t,n,e),a<s){var l=i;l>s&&(l=s),gE(r,t,t+l,t+a,e),a=l}o.pushRun(t,a),o.mergeRuns(),i-=a,t+=a}while(i!==0);o.forceMergeRuns()}}var On=1,Ch=2,xc=4,yE=!1;function bb(){yE||(yE=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function bE(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var Yoe=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=bE}return r.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},r.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},r.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,i=0,a=t.length;i<a;i++)this._updateAndAddDisplayable(t[i],null,e);n.length=this._displayListLen,Bm(n,bE)},r.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var i=e.getClipPath();if(e.ignoreClip)t=null;else if(i){t?t=t.slice():t=[];for(var a=i,o=e;a;)a.parent=o,a.updateTransform(),t.push(a),o=a,a=a.getClipPath()}if(e.childrenRef){for(var s=e.childrenRef(),l=0;l<s.length;l++){var u=s[l];e.__dirty&&(u.__dirty|=On),this._updateAndAddDisplayable(u,t,n)}e.__dirty=0}else{var c=e;t&&t.length?c.__clipPaths=t:c.__clipPaths&&c.__clipPaths.length>0&&(c.__clipPaths=[]),isNaN(c.z)&&(bb(),c.z=0),isNaN(c.z2)&&(bb(),c.z2=0),isNaN(c.zlevel)&&(bb(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var f=e.getDecalElement&&e.getDecalElement();f&&this._updateAndAddDisplayable(f,t,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,t,n);var d=e.getTextContent();d&&this._updateAndAddDisplayable(d,t,n)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var i=He(this._roots,e);i>=0&&this._roots.splice(i,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}(),ly;ly=Ze.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var nd={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)))},elasticOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-nd.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?nd.bounceIn(r*2)*.5:nd.bounceOut(r*2-1)*.5+.5}},yv=Math.pow,ys=Math.sqrt,uy=1e-8,OB=1e-4,_E=ys(3),bv=1/3,ua=Du(),ni=Du(),jc=Du();function cs(r){return r>-uy&&r<uy}function jB(r){return r>uy||r<-uy}function _r(r,e,t,n,i){var a=1-i;return a*a*(a*r+3*i*e)+i*i*(i*n+3*a*t)}function xE(r,e,t,n,i){var a=1-i;return 3*(((e-r)*a+2*(t-e)*i)*a+(n-t)*i*i)}function cy(r,e,t,n,i,a){var o=n+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-i,c=s*s-3*o*l,f=s*l-9*o*u,h=l*l-3*s*u,d=0;if(cs(c)&&cs(f))if(cs(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[d++]=p)}else{var v=f*f-4*c*h;if(cs(v)){var m=f/c,p=-s/o+m,g=-m/2;p>=0&&p<=1&&(a[d++]=p),g>=0&&g<=1&&(a[d++]=g)}else if(v>0){var y=ys(v),b=c*s+1.5*o*(-f+y),_=c*s+1.5*o*(-f-y);b<0?b=-yv(-b,bv):b=yv(b,bv),_<0?_=-yv(-_,bv):_=yv(_,bv);var p=(-s-(b+_))/(3*o);p>=0&&p<=1&&(a[d++]=p)}else{var x=(2*c*s-3*o*f)/(2*ys(c*c*c)),w=Math.acos(x)/3,S=ys(c),T=Math.cos(w),p=(-s-2*S*T)/(3*o),g=(-s+S*(T+_E*Math.sin(w)))/(3*o),C=(-s+S*(T-_E*Math.sin(w)))/(3*o);p>=0&&p<=1&&(a[d++]=p),g>=0&&g<=1&&(a[d++]=g),C>=0&&C<=1&&(a[d++]=C)}}return d}function NB(r,e,t,n,i){var a=6*t-12*e+6*r,o=9*e+3*n-3*r-9*t,s=3*e-3*r,l=0;if(cs(o)){if(jB(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(cs(c))i[0]=-a/(2*o);else if(c>0){var f=ys(c),u=(-a+f)/(2*o),h=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function Ds(r,e,t,n,i,a){var o=(e-r)*i+r,s=(t-e)*i+e,l=(n-t)*i+t,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;a[0]=r,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=n}function BB(r,e,t,n,i,a,o,s,l,u,c){var f,h=.005,d=1/0,p,v,m,g;ua[0]=l,ua[1]=u;for(var y=0;y<1;y+=.05)ni[0]=_r(r,t,i,o,y),ni[1]=_r(e,n,a,s,y),m=Jl(ua,ni),m<d&&(f=y,d=m);d=1/0;for(var b=0;b<32&&!(h<OB);b++)p=f-h,v=f+h,ni[0]=_r(r,t,i,o,p),ni[1]=_r(e,n,a,s,p),m=Jl(ni,ua),p>=0&&m<d?(f=p,d=m):(jc[0]=_r(r,t,i,o,v),jc[1]=_r(e,n,a,s,v),g=Jl(jc,ua),v<=1&&g<d?(f=v,d=g):h*=.5);return c&&(c[0]=_r(r,t,i,o,f),c[1]=_r(e,n,a,s,f)),ys(d)}function qoe(r,e,t,n,i,a,o,s,l){for(var u=r,c=e,f=0,h=1/l,d=1;d<=l;d++){var p=d*h,v=_r(r,t,i,o,p),m=_r(e,n,a,s,p),g=v-u,y=m-c;f+=Math.sqrt(g*g+y*y),u=v,c=m}return f}function Ar(r,e,t,n){var i=1-n;return i*(i*r+2*n*e)+n*n*t}function Jw(r,e,t,n){return 2*((1-n)*(e-r)+n*(t-e))}function Xoe(r,e,t,n,i){var a=r-2*e+t,o=2*(e-r),s=r-n,l=0;if(cs(a)){if(jB(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(cs(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=ys(c),u=(-o+f)/(2*a),h=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function zB(r,e,t){var n=r+t-2*e;return n===0?.5:(r-e)/n}function Nd(r,e,t,n,i){var a=(e-r)*n+r,o=(t-e)*n+e,s=(o-a)*n+a;i[0]=r,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=t}function FB(r,e,t,n,i,a,o,s,l){var u,c=.005,f=1/0;ua[0]=o,ua[1]=s;for(var h=0;h<1;h+=.05){ni[0]=Ar(r,t,i,h),ni[1]=Ar(e,n,a,h);var d=Jl(ua,ni);d<f&&(u=h,f=d)}f=1/0;for(var p=0;p<32&&!(c<OB);p++){var v=u-c,m=u+c;ni[0]=Ar(r,t,i,v),ni[1]=Ar(e,n,a,v);var d=Jl(ni,ua);if(v>=0&&d<f)u=v,f=d;else{jc[0]=Ar(r,t,i,m),jc[1]=Ar(e,n,a,m);var g=Jl(jc,ua);m<=1&&g<f?(u=m,f=g):c*=.5}}return l&&(l[0]=Ar(r,t,i,u),l[1]=Ar(e,n,a,u)),ys(f)}function Koe(r,e,t,n,i,a,o){for(var s=r,l=e,u=0,c=1/o,f=1;f<=o;f++){var h=f*c,d=Ar(r,t,i,h),p=Ar(e,n,a,h),v=d-s,m=p-l;u+=Math.sqrt(v*v+m*m),s=d,l=p}return u}var Zoe=/cubic-bezier\(([0-9,\.e ]+)\)/;function pC(r){var e=r&&Zoe.exec(r);if(e){var t=e[1].split(","),n=+Li(t[0]),i=+Li(t[1]),a=+Li(t[2]),o=+Li(t[3]);if(isNaN(n+i+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:cy(0,n,a,1,l,s)&&_r(0,i,o,1,s[0])}}}var Joe=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||tr,this.ondestroy=e.ondestroy||tr,this.onrestart=e.onrestart||tr,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var n=this._life,i=e-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=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Te(e)?e:nd[e]||pC(e)},r}(),VB=function(){function r(e){this.value=e}return r}(),Qoe=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new VB(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),_p=function(){function r(e){this._list=new Qoe,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var n=this._list,i=this._map,a=null;if(i[e]==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=t:s=new VB(t),s.key=e,n.insertEntry(s),i[e]=s}return a},r.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),wE={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 Pi(r){return r=Math.round(r),r<0?0:r>255?255:r}function ese(r){return r=Math.round(r),r<0?0:r>360?360:r}function Bd(r){return r<0?0:r>1?1:r}function _b(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Pi(parseFloat(e)/100*255):Pi(parseInt(e,10))}function Ql(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Bd(parseFloat(e)/100):Bd(parseFloat(e))}function xb(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function fs(r,e,t){return r+(e-r)*t}function Xn(r,e,t,n,i){return r[0]=e,r[1]=t,r[2]=n,r[3]=i,r}function Qw(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var $B=new _p(20),_v=null;function qu(r,e){_v&&Qw(_v,e),_v=$B.put(r,_v||e.slice())}function Fn(r,e){if(r){e=e||[];var t=$B.get(r);if(t)return Qw(e,t);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in wE)return Qw(e,wE[n]),qu(r,e),e;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)){Xn(e,0,0,0,1);return}return Xn(e,(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),qu(r,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Xn(e,0,0,0,1);return}return Xn(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),qu(r,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Xn(e,+u[0],+u[1],+u[2],1):Xn(e,0,0,0,1);c=Ql(u.pop());case"rgb":if(u.length>=3)return Xn(e,_b(u[0]),_b(u[1]),_b(u[2]),u.length===3?c:Ql(u[3])),qu(r,e),e;Xn(e,0,0,0,1);return;case"hsla":if(u.length!==4){Xn(e,0,0,0,1);return}return u[3]=Ql(u[3]),e2(u,e),qu(r,e),e;case"hsl":if(u.length!==3){Xn(e,0,0,0,1);return}return e2(u,e),qu(r,e),e;default:return}}Xn(e,0,0,0,1)}}function e2(r,e){var t=(parseFloat(r[0])%360+360)%360/360,n=Ql(r[1]),i=Ql(r[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],Xn(e,Pi(xb(o,a,t+1/3)*255),Pi(xb(o,a,t)*255),Pi(xb(o,a,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function tse(r){if(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.min(e,t,n),a=Math.max(e,t,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-e)/6+o/2)/o,f=((a-t)/6+o/2)/o,h=((a-n)/6+o/2)/o;e===a?l=h-f:t===a?l=1/3+c-h:n===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var d=[l*360,u,s];return r[3]!=null&&d.push(r[3]),d}}function t2(r,e){var t=Fn(r);if(t){for(var n=0;n<3;n++)e<0?t[n]=t[n]*(1-e)|0:t[n]=(255-t[n])*e+t[n]|0,t[n]>255?t[n]=255:t[n]<0&&(t[n]=0);return ho(t,t.length===4?"rgba":"rgb")}}function wb(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var n=r*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=e[i],s=e[a],l=n-i;return t[0]=Pi(fs(o[0],s[0],l)),t[1]=Pi(fs(o[1],s[1],l)),t[2]=Pi(fs(o[2],s[2],l)),t[3]=Bd(fs(o[3],s[3],l)),t}}function rse(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var n=r*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=Fn(e[i]),s=Fn(e[a]),l=n-i,u=ho([Pi(fs(o[0],s[0],l)),Pi(fs(o[1],s[1],l)),Pi(fs(o[2],s[2],l)),Bd(fs(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}function id(r,e,t,n){var i=Fn(r);if(r)return i=tse(i),e!=null&&(i[0]=ese(e)),t!=null&&(i[1]=Ql(t)),n!=null&&(i[2]=Ql(n)),ho(e2(i),"rgba")}function fy(r,e){var t=Fn(r);if(t&&e!=null)return t[3]=Bd(e),ho(t,"rgba")}function ho(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function hy(r,e){var t=Fn(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var SE=new _p(100);function r2(r){if(se(r)){var e=SE.get(r);return e||(e=t2(r,-.1),SE.put(r,e)),e}else if(P0(r)){var t=W({},r);return t.colorStops=K(r.colorStops,function(n){return{offset:n.offset,color:t2(n.color,-.1)}}),t}return r}var dy=Math.round;function zd(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=Fn(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var TE=1e-4;function hs(r){return r<TE&&r>-TE}function xv(r){return dy(r*1e3)/1e3}function n2(r){return dy(r*1e4)/1e4}function nse(r){return"matrix("+xv(r[0])+","+xv(r[1])+","+xv(r[2])+","+xv(r[3])+","+n2(r[4])+","+n2(r[5])+")"}var ise={left:"start",right:"end",center:"middle",middle:"middle"};function ase(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function ose(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function sse(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function HB(r){return r&&!!r.image}function lse(r){return r&&!!r.svgElement}function vC(r){return HB(r)||lse(r)}function GB(r){return r.type==="linear"}function WB(r){return r.type==="radial"}function UB(r){return r&&(r.type==="linear"||r.type==="radial")}function j0(r){return"url(#"+r+")"}function YB(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function qB(r){var e=r.x||0,t=r.y||0,n=(r.rotation||0)*Om,i=Re(r.scaleX,1),a=Re(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+dy(o*Om)+"deg, "+dy(s*Om)+"deg)"),l.join(" ")}var use=function(){return Ze.hasGlobalWindow&&Te(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),i2=Array.prototype.slice;function Qa(r,e,t){return(e-r)*t+r}function Sb(r,e,t,n){for(var i=e.length,a=0;a<i;a++)r[a]=Qa(e[a],t[a],n);return r}function cse(r,e,t,n){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=Qa(e[o][s],t[o][s],n)}return r}function wv(r,e,t,n){for(var i=e.length,a=0;a<i;a++)r[a]=e[a]+t[a]*n;return r}function CE(r,e,t,n){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=e[o][s]+t[o][s]*n}return r}function fse(r,e){for(var t=r.length,n=e.length,i=t>n?e:r,a=Math.min(t,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(t,n);s++)i.push({offset:o.offset,color:o.color.slice()})}function hse(r,e,t){var n=r,i=e;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(t===1?i[l]:i2.call(i[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(t===1)isNaN(n[l])&&(n[l]=i[l]);else for(var c=0;c<u;c++)isNaN(n[l][c])&&(n[l][c]=i[l][c])}}function ad(r){if(Zr(r)){var e=r.length;if(Zr(r[0])){for(var t=[],n=0;n<e;n++)t.push(i2.call(r[n]));return t}return i2.call(r)}return r}function zm(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function dse(r){return Zr(r&&r[0])?2:1}var Sv=0,Fm=1,XB=2,Ah=3,a2=4,o2=5,AE=6;function ME(r){return r===a2||r===o2}function Tv(r){return r===Fm||r===XB}var Xf=[0,0,0,0],pse=function(){function r(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=AE,l=t;if(Zr(t)){var u=dse(t);s=u,(u===1&&!lt(t[0])||u===2&&!lt(t[0][0]))&&(o=!0)}else if(lt(t)&&!Od(t))s=Sv;else if(se(t))if(!isNaN(+t))s=Sv;else{var c=Fn(t);c&&(l=c,s=Ah)}else if(P0(t)){var f=W({},l);f.colorStops=K(t.colorStops,function(d){return{offset:d.offset,color:Fn(d.color)}}),GB(t)?s=a2:WB(t)&&(s=o2),l=f}a===0?this.valType=s:(s!==this.valType||s===AE)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:l,rawValue:t,percent:0};return n&&(h.easing=n,h.easingFunc=Te(n)?n:nd[n]||pC(n)),i.push(h),h},r.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(v,m){return v.time-m.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Tv(i),u=ME(i),c=0;c<a;c++){var f=n[c],h=f.value,d=o.value;f.percent=f.time/e,s||(l&&c!==a-1?hse(h,d,i):u&&fse(h.colorStops,d.colorStops))}if(!s&&i!==o2&&t&&this.needsAnimate()&&t.needsAnimate()&&i===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,c=0;c<a;c++)i===Sv?n[c].additiveValue=n[c].value-p:i===Ah?n[c].additiveValue=wv([],n[c].value,p,-1):Tv(i)&&(n[c].additiveValue=i===Fm?wv([],n[c].value,p,-1):CE([],n[c].value,p,-1))}},r.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,i=n?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===Ah,c,f=this._lastFr,h=Math.min,d,p;if(s===1)d=p=o[0];else{if(t<0)c=0;else if(t<this._lastFrP){var v=h(f+1,s-1);for(c=v;c>=0&&!(o[c].percent<=t);c--);c=h(c,s-2)}else{for(c=f;c<s&&!(o[c].percent>t);c++);c=h(c-1,s-2)}p=o[c+1],d=o[c]}if(d&&p){this._lastFr=c,this._lastFrP=t;var m=p.percent-d.percent,g=m===0?1:h((t-d.percent)/m,1);p.easingFunc&&(g=p.easingFunc(g));var y=n?this._additiveValue:u?Xf:e[l];if((Tv(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)e[l]=g<1?d.rawValue:p.rawValue;else if(Tv(a))a===Fm?Sb(y,d[i],p[i],g):cse(y,d[i],p[i],g);else if(ME(a)){var b=d[i],_=p[i],x=a===a2;e[l]={type:x?"linear":"radial",x:Qa(b.x,_.x,g),y:Qa(b.y,_.y,g),colorStops:K(b.colorStops,function(S,T){var C=_.colorStops[T];return{offset:Qa(S.offset,C.offset,g),color:zm(Sb([],S.color,C.color,g))}}),global:_.global},x?(e[l].x2=Qa(b.x2,_.x2,g),e[l].y2=Qa(b.y2,_.y2,g)):e[l].r=Qa(b.r,_.r,g)}else if(u)Sb(y,d[i],p[i],g),n||(e[l]=zm(y));else{var w=Qa(d[i],p[i],g);n?this._additiveValue=w:e[l]=w}n&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,i=this._additiveValue;t===Sv?e[n]=e[n]+i:t===Ah?(Fn(e[n],Xf),wv(Xf,Xf,i,1),e[n]=zm(Xf)):t===Fm?wv(e[n],e[n],i,1):t===XB&&CE(e[n],e[n],i,1)},r}(),mC=function(){function r(e,t,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&i){sC("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,et(t),n)},r.prototype.whenWithKeys=function(e,t,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 pse(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var f=c.keyframes,h=f[f.length-1];u=h&&h.value,c.valType===Ah&&u&&(u=zm(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,ad(u),i),this._trackKeys.push(s)}l.addKeyframe(e,ad(t[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},r.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},r.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var a=n[i].getTrack(e);a&&(t=a)}return t},r.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],i=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[c-1];f&&(t._target[s.propName]=f.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var h=new Joe({life:i,loop:this._loop,delay:this._delay||0,onframe:function(d){t._started=2;var p=t._additiveAnimators;if(p){for(var v=!1,m=0;m<p.length;m++)if(p[m]._clip){v=!0;break}v||(t._additiveAnimators=null)}for(var m=0;m<n.length;m++)n[m].step(t._target,d);var g=t._onframeCbs;if(g)for(var m=0;m<g.length;m++)g[m](t._target,d)},ondestroy:function(){t._doneCallback()}});this._clip=h,this.animation&&this.animation.addClip(h),e&&h.setEasing(e)}else this._doneCallback();return this}},r.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},r.prototype.delay=function(e){return this._delay=e,this},r.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},r.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},r.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(e){return this._tracks[e]},r.prototype.getTracks=function(){var e=this;return K(this._trackKeys,function(t){return e._tracks[t]})},r.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,a=0;a<e.length;a++){var o=n[e[a]];o&&!o.isFinished()&&(t?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},r.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var i=0;i<t.length;i++){var a=t[i],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(e[a]=ad(l.rawValue))}}}},r.prototype.__changeFinalValue=function(e,t){t=t||et(e);for(var n=0;n<t.length;n++){var i=t[n],a=this._tracks[i];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r}();function kc(){return new Date().getTime()}var vse=function(r){z(e,r);function e(t){var n=r.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var n=t.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(t){if(t.animation){var n=t.prev,i=t.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var n=t.getClip();n&&this.removeClip(n),t.animation=null},e.prototype.update=function(t){for(var n=kc()-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,t||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function n(){t._running&&(ly(n),!t._paused&&t.update())}ly(n)},e.prototype.start=function(){this._running||(this._time=kc(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=kc(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=kc()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var n=t.next;t.prev=t.next=t.animation=null,t=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,n){n=n||{},this.start();var i=new mC(t,n.loop);return this.addAnimator(i),i},e}(gi),mse=300,Tb=Ze.domSupported,Cb=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=K(r,function(i){var a=i.replace("mouse","pointer");return t.hasOwnProperty(a)?a:i});return{mouse:r,touch:e,pointer:n}}(),kE={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},DE=!1;function s2(r){var e=r.pointerType;return e==="pen"||e==="touch"}function gse(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function Ab(r){r&&(r.zrByTouch=!0)}function yse(r,e){return Zn(r.dom,new bse(r,e),!0)}function KB(r,e){for(var t=e,n=!1;t&&t.nodeType!==9&&!(n=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return n}var bse=function(){function r(e,t){this.stopPropagation=tr,this.stopImmediatePropagation=tr,this.preventDefault=tr,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),Ti={mousedown:function(r){r=Zn(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Zn(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Zn(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Zn(this.dom,r);var e=r.toElement||r.relatedTarget;KB(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){DE=!0,r=Zn(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){DE||(r=Zn(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Zn(this.dom,r),Ab(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Ti.mousemove.call(this,r),Ti.mousedown.call(this,r)},touchmove:function(r){r=Zn(this.dom,r),Ab(r),this.handler.processGesture(r,"change"),Ti.mousemove.call(this,r)},touchend:function(r){r=Zn(this.dom,r),Ab(r),this.handler.processGesture(r,"end"),Ti.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<mse&&Ti.click.call(this,r)},pointerdown:function(r){Ti.mousedown.call(this,r)},pointermove:function(r){s2(r)||Ti.mousemove.call(this,r)},pointerup:function(r){Ti.mouseup.call(this,r)},pointerout:function(r){s2(r)||Ti.mouseout.call(this,r)}};k(["click","dblclick","contextmenu"],function(r){Ti[r]=function(e){e=Zn(this.dom,e),this.trigger(r,e)}});var l2={pointermove:function(r){s2(r)||l2.mousemove.call(this,r)},pointerup:function(r){l2.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),e&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function _se(r,e){var t=e.domHandlers;Ze.pointerEventsSupported?k(Cb.pointer,function(n){Vm(e,n,function(i){t[n].call(r,i)})}):(Ze.touchEventsSupported&&k(Cb.touch,function(n){Vm(e,n,function(i){t[n].call(r,i),gse(e)})}),k(Cb.mouse,function(n){Vm(e,n,function(i){i=fC(i),e.touching||t[n].call(r,i)})}))}function xse(r,e){Ze.pointerEventsSupported?k(kE.pointer,t):Ze.touchEventsSupported||k(kE.mouse,t);function t(n){function i(a){a=fC(a),KB(r,a.target)||(a=yse(r,a),e.domHandlers[n].call(r,a))}Vm(e,n,i,{capture:!0})}}function Vm(r,e,t,n){r.mounted[e]=t,r.listenerOpts[e]=n,Zw(r.domTarget,e,t,n)}function Mb(r){var e=r.mounted;for(var t in e)e.hasOwnProperty(t)&&Ooe(r.domTarget,t,e[t],r.listenerOpts[t]);r.mounted={}}var EE=function(){function r(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return r}(),wse=function(r){z(e,r);function e(t,n){var i=r.call(this)||this;return i.__pointerCapturing=!1,i.dom=t,i.painterRoot=n,i._localHandlerScope=new EE(t,Ti),Tb&&(i._globalHandlerScope=new EE(document,l2)),_se(i,i._localHandlerScope),i}return e.prototype.dispose=function(){Mb(this._localHandlerScope),Tb&&Mb(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Tb&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var n=this._globalHandlerScope;t?xse(this,n):Mb(n)}},e}(gi),ZB=1;Ze.hasGlobalWindow&&(ZB=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var py=ZB,u2=.4,c2="#333",f2="#ccc",Sse="#eee",LE=O0,IE=5e-5;function Xs(r){return r>IE||r<-IE}var Ks=[],Xu=[],kb=zn(),Db=Math.abs,ao=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return Xs(this.rotation)||Xs(this.x)||Xs(this.y)||Xs(this.scaleX-1)||Xs(this.scaleY-1)||Xs(this.skewX)||Xs(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(LE(n),this.invTransform=null);return}n=n||zn(),t?this.getLocalTransform(n):LE(n),e&&(t?fo(n,e,n):hC(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Ks);var n=Ks[0]<0?-1:1,i=Ks[1]<0?-1:1,a=((Ks[0]-n)*t+n)/Ks[0]||0,o=((Ks[1]-i)*t+i)/Ks[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||zn(),gf(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(a),t=Math.sqrt(t),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||zn(),fo(Xu,e.invTransform,t),t=Xu);var n=this.originX,i=this.originY;(n||i)&&(kb[4]=n,kb[5]=i,fo(Xu,t,kb),Xu[4]-=n,Xu[5]-=i,t=Xu),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var n=[e,t],i=this.invTransform;return i&&Br(n,n,i),n},r.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],i=this.transform;return i&&Br(n,n,i),n},r.prototype.getLineScale=function(){var e=this.transform;return e&&Db(e[0]-1)>1e-10&&Db(e[3]-1)>1e-10?Math.sqrt(Db(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){JB(this,e)},r.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,f=e.y,h=e.skewX?Math.tan(e.skewX):0,d=e.skewY?Math.tan(-e.skewY):0;if(n||i||s||l){var p=n+s,v=i+l;t[4]=-p*a-h*v*o,t[5]=-v*o-d*p*a}else t[4]=t[5]=0;return t[0]=a,t[3]=o,t[1]=d*a,t[2]=h*o,u&&Eu(t,t,u),t[4]+=n+c,t[5]+=i+f,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),Ia=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function JB(r,e){for(var t=0;t<Ia.length;t++){var n=Ia[t];r[n]=e[n]}}var PE={};function Vn(r,e){e=e||Ms;var t=PE[e];t||(t=PE[e]=new _p(500));var n=t.get(r);return n==null&&(n=ks.measureText(r,e).width,t.put(r,n)),n}function RE(r,e,t,n){var i=Vn(r,e),a=N0(e),o=Mh(0,i,t),s=wc(0,a,n),l=new Ve(o,s,i,a);return l}function xp(r,e,t,n){var i=((r||"")+"").split(`
|
||
`),a=i.length;if(a===1)return RE(i[0],e,t,n);for(var o=new Ve(0,0,0,0),s=0;s<i.length;s++){var l=RE(i[s],e,t,n);s===0?o.copy(l):o.union(l)}return o}function Mh(r,e,t){return t==="right"?r-=e:t==="center"&&(r-=e/2),r}function wc(r,e,t){return t==="middle"?r-=e/2:t==="bottom"&&(r-=e),r}function N0(r){return Vn("国",r)}function Ni(r,e){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*e:parseFloat(r):r}function vy(r,e,t){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=t.height,o=t.width,s=a/2,l=t.x,u=t.y,c="left",f="top";if(n instanceof Array)l+=Ni(n[0],t.width),u+=Ni(n[1],t.height),c=null,f=null;else switch(n){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",f="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=f,r}var Eb="__zr_normal__",Lb=Ia.concat(["ignore"]),Tse=Ea(Ia,function(r,e){return r[e]=!0,r},{ignore:!1}),Ku={},Cse=new Ve(0,0,0,0),B0=function(){function r(e){this.id=AB(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=t.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;if(a.copyTransform(t),n.position!=null){var c=Cse;n.layoutRect?c.copy(n.layoutRect):c.copy(this.getBoundingRect()),i||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Ku,n,c):vy(Ku,n,c),a.x=Ku.x,a.y=Ku.y,o=Ku.align,s=Ku.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var h=void 0,d=void 0;f==="center"?(h=c.width*.5,d=c.height*.5):(h=Ni(f[0],c.width),d=Ni(f[1],c.height)),u=!0,a.originX=-a.x+h+(i?0:c.x),a.originY=-a.y+d+(i?0:c.y)}}n.rotation!=null&&(a.rotation=n.rotation);var p=n.offset;p&&(a.x+=p[0],a.y+=p[1],u||(a.originX=-p[0],a.originY=-p[1]));var v=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,y=void 0,b=void 0;v&&this.canBeInsideText()?(g=n.insideFill,y=n.insideStroke,(g==null||g==="auto")&&(g=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(g),b=!0)):(g=n.outsideFill,y=n.outsideStroke,(g==null||g==="auto")&&(g=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(g),b=!0)),g=g||"#000",(g!==m.fill||y!==m.stroke||b!==m.autoStroke||o!==m.align||s!==m.verticalAlign)&&(l=!0,m.fill=g,m.stroke=y,m.autoStroke=b,m.align=o,m.verticalAlign=s,t.setDefaultTextStyle(m)),t.__dirty|=On,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?f2:c2},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t=="string"&&Fn(t);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,ho(n,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},W(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(Me(e))for(var n=e,i=et(n),a=0;a<i.length;a++){var o=i[a];this.attrKV(o,e[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],a=i.__fromStateTransition;if(!(i.getLoop()||a&&a!==Eb)){var o=i.targetName,s=o?t[o]:t;i.saveTo(s)}}},r.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Lb)},r.prototype._savePrimaryToNormal=function(e,t,n){for(var i=0;i<n.length;i++){var a=n[i];e[a]!=null&&!(a in t)&&(t[a]=this[a])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(Eb,!1,e)},r.prototype.useState=function(e,t,n,i){var a=e===Eb,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(He(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){sC("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,h=this._textGuide;return f&&f.useState(e,t,n,c),h&&h.useState(e,t,n,c),a?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~On),u}}},r.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l<o;l++)if(e[l]!==a[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=e[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,e)),c||(c=this.states[u]),c&&i.push(c)}var f=i[o-1],h=!!(f&&f.hoverLayer||n);h&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(i),p=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(e.join(","),d,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var v=this._textContent,m=this._textGuide;v&&v.useStates(e,t,h),m&&m.useStates(e,t,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~On)}},r.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},r.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},r.prototype.removeState=function(e){var t=He(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},r.prototype.replaceState=function(e,t,n){var i=this.currentStates.slice(),a=He(i,e),o=He(i,t)>=0;a>=0?o?i.splice(a,1):i[a]=t:n&&!o&&i.push(t),this.useStates(i)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},n,i=0;i<e.length;i++){var a=e[i];W(t,a),a.textConfig&&(n=n||{},W(n,a.textConfig))}return n&&(t.textConfig=n),t},r.prototype._applyStateObj=function(e,t,n,i,a,o){var s=!(t&&i);t&&t.textConfig?(this.textConfig=W({},i?this.textConfig:n.textConfig),W(this.textConfig,t.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,c=0;c<Lb.length;c++){var f=Lb[c],h=a&&Tse[f];t&&t[f]!=null?h?(u=!0,l[f]=t[f]):this[f]=t[f]:s&&n[f]!=null&&(h?(u=!0,l[f]=n[f]):this[f]=n[f])}if(!a)for(var c=0;c<this.animators.length;c++){var d=this.animators[c],p=d.targetName;d.getLoop()||d.__changeFinalValue(p?(t||n)[p]:t||n)}u&&this._transitionState(e,l,o)},r.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},r.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},r.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new ao,this._attachComponent(e),this._textContent=e,this.markRedraw())},r.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),W(this.textConfig,e),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=On;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},r.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},r.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},r.prototype.animate=function(e,t,n){var i=e?this[e]:this,a=new mC(i,t,n);return e&&(a.targetName=e),this.addAnimator(a,e),a},r.prototype.addAnimator=function(e,t){var n=this.__zr,i=this;e.during(function(){i.updateDuringAnimation(t)}).done(function(){var a=i.animators,o=He(a,e);o>=0&&a.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var n=this.animators,i=n.length,a=[],o=0;o<i;o++){var s=n[o];!e||e===s.scope?s.stop(t):a.push(s)}return this.animators=a,this},r.prototype.animateTo=function(e,t,n){Ib(this,e,t,n)},r.prototype.animateFrom=function(e,t,n){Ib(this,e,t,n,!0)},r.prototype._transitionState=function(e,t,n,i){for(var a=Ib(this,t,n,i),o=0;o<a.length;o++)a[o].__fromStateTransition=e},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=function(){var e=r.prototype;e.type="element",e.name="",e.ignore=e.silent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=On;function t(n,i,a,o){Object.defineProperty(e,n,{get:function(){if(!this[i]){var l=this[i]=[];s(this,l)}return this[i]},set:function(l){this[a]=l[0],this[o]=l[1],this[i]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[a]},set:function(c){l[a]=c}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(c){l[o]=c}})}}Object.defineProperty&&(t("position","_legacyPos","x","y"),t("scale","_legacyScale","scaleX","scaleY"),t("origin","_legacyOrigin","originX","originY"))}(),r}();cr(B0,gi);cr(B0,ao);function Ib(r,e,t,n,i){t=t||{};var a=[];QB(r,"",r,e,t,n,a,i);var o=a.length,s=!1,l=t.done,u=t.aborted,c=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},f=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),a.length>0&&t.during&&a[0].during(function(p,v){t.during(v)});for(var h=0;h<a.length;h++){var d=a[h];c&&d.done(c),f&&d.aborted(f),t.force&&d.duration(t.duration),d.start(t.easing)}return a}function Pb(r,e,t){for(var n=0;n<t;n++)r[n]=e[n]}function Ase(r){return Zr(r[0])}function Mse(r,e,t){if(Zr(e[t]))if(Zr(r[t])||(r[t]=[]),Dn(e[t])){var n=e[t].length;r[t].length!==n&&(r[t]=new e[t].constructor(n),Pb(r[t],e[t],n))}else{var i=e[t],a=r[t],o=i.length;if(Ase(i))for(var s=i[0].length,l=0;l<o;l++)a[l]?Pb(a[l],i[l],s):a[l]=Array.prototype.slice.call(i[l]);else Pb(a,i,o);a.length=i.length}else r[t]=e[t]}function kse(r,e){return r===e||Zr(r)&&Zr(e)&&Dse(r,e)}function Dse(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++)if(r[n]!==e[n])return!1;return!0}function QB(r,e,t,n,i,a,o,s){for(var l=et(n),u=i.duration,c=i.delay,f=i.additive,h=i.setToFinal,d=!Me(a),p=r.animators,v=[],m=0;m<l.length;m++){var g=l[m],y=n[g];if(y!=null&&t[g]!=null&&(d||a[g]))if(Me(y)&&!Zr(y)&&!P0(y)){if(e){s||(t[g]=y,r.updateDuringAnimation(e));continue}QB(r,g,t[g],y,i,a&&a[g],o,s)}else v.push(g);else s||(t[g]=y,r.updateDuringAnimation(e),v.push(g))}var b=v.length;if(!f&&b)for(var _=0;_<p.length;_++){var x=p[_];if(x.targetName===e){var w=x.stopTracks(v);if(w){var S=He(p,x);p.splice(S,1)}}}if(i.force||(v=pt(v,function(M){return!kse(n[M],t[M])}),b=v.length),b>0||i.force&&!o.length){var T=void 0,C=void 0,A=void 0;if(s){C={},h&&(T={});for(var _=0;_<b;_++){var g=v[_];C[g]=t[g],h?T[g]=n[g]:t[g]=n[g]}}else if(h){A={};for(var _=0;_<b;_++){var g=v[_];A[g]=ad(t[g]),Mse(t,n,g)}}var x=new mC(t,!1,!1,f?pt(p,function(D){return D.targetName===e}):null);x.targetName=e,i.scope&&(x.scope=i.scope),h&&T&&x.whenWithKeys(0,T,v),A&&x.whenWithKeys(0,A,v),x.whenWithKeys(u??500,s?C:n,v).delay(c||0),r.addAnimator(x,e),o.push(x)}}var Ee=function(r){z(e,r);function e(t){var n=r.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var n=this._children,i=0;i<n.length;i++)if(n[i].name===t)return n[i]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},e.prototype.addBefore=function(t,n){if(t&&t!==this&&t.parent!==this&&n&&n.parent===this){var i=this._children,a=i.indexOf(n);a>=0&&(i.splice(a,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,n){var i=He(this._children,t);return i>=0&&this.replaceAt(n,i),this},e.prototype.replaceAt=function(t,n){var i=this._children,a=i[n];if(t&&t!==this&&t.parent!==this&&t!==a){i[n]=t,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var n=this.__zr;n&&n!==t.__zr&&t.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(t){var n=this.__zr,i=this._children,a=He(i,t);return a<0?this:(i.splice(a,1),t.parent=null,n&&t.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,n=this.__zr,i=0;i<t.length;i++){var a=t[i];n&&a.removeSelfFromZr(n),a.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,n){for(var i=this._children,a=0;a<i.length;a++){var o=i[a];t.call(n,o,a)}return this},e.prototype.traverse=function(t,n){for(var i=0;i<this._children.length;i++){var a=this._children[i],o=t.call(n,a);a.isGroup&&!o&&a.traverse(t,n)}return this},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.removeSelfFromZr(t)}},e.prototype.getBoundingRect=function(t){for(var n=new Ve(0,0,0,0),i=t||this._children,a=[],o=null,s=0;s<i.length;s++){var l=i[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(a);c?(Ve.applyTransform(n,u,c),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},e}(B0);Ee.prototype.type="group";/*!
|
||
* ZRender, a high performance 2d drawing library.
|
||
*
|
||
* Copyright (c) 2013, Baidu Inc.
|
||
* All rights reserved.
|
||
*
|
||
* LICENSE
|
||
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
||
*/var $m={},ez={};function Ese(r){delete ez[r]}function Lse(r){if(!r)return!1;if(typeof r=="string")return hy(r,1)<u2;if(r.colorStops){for(var e=r.colorStops,t=0,n=e.length,i=0;i<n;i++)t+=hy(e[i].color,1);return t/=n,t<u2}return!1}var Ise=function(){function r(e,t,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var a=new Yoe,o=n.renderer||"canvas";$m[o]||(o=et($m)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new $m[o](t,a,n,e),l=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!Ze.node&&!Ze.worker&&!l?new wse(s.getViewportRoot(),s.root):null,c=n.useCoarsePointer,f=c==null||c==="auto"?Ze.touchEventsSupported:!!c,h=44,d;f&&(d=Re(n.pointerSize,h)),this.handler=new IB(a,s,u,s.root,d),this.animation=new vse({stage:{update:l?null:function(){return i._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},r.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},r.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=Lse(e))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(e){this._darkMode=e},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(e){var t,n=kc();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var i=kc();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Ee&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.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,Ese(this.id))},r}();function OE(r,e){var t=new Ise(AB(),r,e);return ez[t.id]=t,t}function Pse(r,e){$m[r]=e}var h2;function Rse(r){if(typeof h2=="function")return h2(r)}function Ose(r){h2=r}var jE=1e-4,tz=20;function jse(r){return r.replace(/^\s+|\s+$/g,"")}function bt(r,e,t,n){var i=e[0],a=e[1],o=t[0],s=t[1],l=a-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(r<=i)return o;if(r>=a)return s}else{if(r>=i)return o;if(r<=a)return s}else{if(r===i)return o;if(r===a)return s}return(r-i)/l*u+o}function ie(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return se(r)?jse(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function Xt(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),tz),r=(+r).toFixed(e),t?r:+r}function ci(r){return r.sort(function(e,t){return e-t}),r}function pa(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return Nse(r)}function Nse(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),n=t>0?+e.slice(t+1):0,i=t>0?t:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function rz(r,e){var t=Math.log,n=Math.LN10,i=Math.floor(t(r[1]-r[0])/n),a=Math.round(t(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function Bse(r,e){var t=Ea(r,function(d,p){return d+(isNaN(p)?0:p)},0);if(t===0)return[];for(var n=Math.pow(10,e),i=K(r,function(d){return(isNaN(d)?0:d)/t*n*100}),a=n*100,o=K(i,function(d){return Math.floor(d)}),s=Ea(o,function(d,p){return d+p},0),l=K(i,function(d,p){return d-o[p]});s<a;){for(var u=Number.NEGATIVE_INFINITY,c=null,f=0,h=l.length;f<h;++f)l[f]>u&&(u=l[f],c=f);++o[c],l[c]=0,++s}return K(o,function(d){return d/n})}function zse(r,e){var t=Math.max(pa(r),pa(e)),n=r+e;return t>tz?n:Xt(n,t)}var NE=9007199254740991;function nz(r){var e=Math.PI*2;return(r%e+e)%e}function Fd(r){return r>-jE&&r<jE}var Fse=/^(?:(\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 Pa(r){if(r instanceof Date)return r;if(se(r)){var e=Fse.exec(r);if(!e)return new Date(NaN);if(e[8]){var t=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(t-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,t,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function Vse(r){return Math.pow(10,gC(r))}function gC(r){if(r===0)return 0;var e=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,e)>=10&&e++,e}function iz(r,e){var t=gC(r),n=Math.pow(10,t),i=r/n,a;return i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10,r=a*n,t>=-20?+r.toFixed(t<0?-t:0):r}function Rb(r,e){var t=(r.length-1)*e+1,n=Math.floor(t),i=+r[n-1],a=t-n;return a?i+a*(r[n]-i):i}function BE(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,n=0;n<r.length;){for(var i=r[n].interval,a=r[n].close,o=0;o<2;o++)i[o]<=e&&(i[o]=e,a[o]=o?1:1-t),e=i[o],t=a[o];i[0]===i[1]&&a[0]*a[1]!==1?r.splice(n,1):n++}return r;function s(l,u,c){return l.interval[c]<u.interval[c]||l.interval[c]===u.interval[c]&&(l.close[c]-u.close[c]===(c?-1:1)||!c&&s(l,u,1))}}function xo(r){var e=parseFloat(r);return e==r&&(e!==0||!se(r)||r.indexOf("x")<=0)?e:NaN}function az(r){return!isNaN(xo(r))}function oz(){return Math.round(Math.random()*9)}function sz(r,e){return e===0?r:sz(e,r%e)}function zE(r,e){return r==null?e:e==null?r:r*e/sz(r,e)}function dt(r){throw new Error(r)}function FE(r,e,t){return(e-r)*t+r}var lz="series\0",uz="\0_ec_\0";function wt(r){return r instanceof Array?r:r==null?[]:[r]}function pu(r,e,t){if(r){r[e]=r[e]||{},r.emphasis=r.emphasis||{},r.emphasis[e]=r.emphasis[e]||{};for(var n=0,i=t.length;n<i;n++){var a=t[n];!r.emphasis[e].hasOwnProperty(a)&&r[e].hasOwnProperty(a)&&(r.emphasis[e][a]=r[e][a])}}}var VE=["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 yf(r){return Me(r)&&!q(r)&&!(r instanceof Date)?r.value:r}function $se(r){return Me(r)&&!(r instanceof Array)}function cz(r,e,t){var n=t==="normalMerge",i=t==="replaceMerge",a=t==="replaceAll";r=r||[],e=(e||[]).slice();var o=ve();k(e,function(l,u){if(!Me(l)){e[u]=null;return}});var s=Hse(r,o,t);return(n||i)&&Gse(s,r,o,e),n&&Wse(s,e),n||i?Use(s,e,i):a&&Yse(s,e),qse(s),s}function Hse(r,e,t){var n=[];if(t==="replaceAll")return n;for(var i=0;i<r.length;i++){var a=r[i];a&&a.id!=null&&e.set(a.id,i),n.push({existing:t==="replaceMerge"||Vd(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return n}function Gse(r,e,t,n){k(n,function(i,a){if(!(!i||i.id==null)){var o=od(i.id),s=t.get(o);if(s!=null){var l=r[s];vn(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=e[s],n[a]=null}}})}function Wse(r,e){k(e,function(t,n){if(!(!t||t.name==null))for(var i=0;i<r.length;i++){var a=r[i].existing;if(!r[i].newOption&&a&&(a.id==null||t.id==null)&&!Vd(t)&&!Vd(a)&&fz("name",a,t)){r[i].newOption=t,e[n]=null;return}}})}function Use(r,e,t){k(e,function(n){if(n){for(var i,a=0;(i=r[a])&&(i.newOption||Vd(i.existing)||i.existing&&n.id!=null&&!fz("id",n,i.existing));)a++;i?(i.newOption=n,i.brandNew=t):r.push({newOption:n,brandNew:t,existing:null,keyInfo:null}),a++}})}function Yse(r,e){k(e,function(t){r.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function qse(r){var e=ve();k(r,function(t){var n=t.existing;n&&e.set(n.id,t)}),k(r,function(t){var n=t.newOption;vn(!n||n.id==null||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),k(r,function(t,n){var i=t.existing,a=t.newOption,o=t.keyInfo;if(Me(a)){if(o.name=a.name!=null?od(a.name):i?i.name:lz+n,i)o.id=od(i.id);else if(a.id!=null)o.id=od(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,t)}})}function fz(r,e,t){var n=vr(e[r],null),i=vr(t[r],null);return n!=null&&i!=null&&n===i}function od(r){return vr(r,"")}function vr(r,e){return r==null?e:se(r)?r:lt(r)||Gw(r)?r+"":e}function yC(r){var e=r.name;return!!(e&&e.indexOf(lz))}function Vd(r){return r&&r.id!=null&&od(r.id).indexOf(uz)===0}function Xse(r){return uz+r}function Kse(r,e,t){k(r,function(n){var i=n.newOption;Me(i)&&(n.keyInfo.mainType=e,n.keyInfo.subType=Zse(e,i,n.existing,t))})}function Zse(r,e,t,n){var i=e.type?e.type:t?t.subType:n.determineSubType(r,e);return i}function Jse(r,e){var t={},n={};return i(r||[],t),i(e||[],n,t),[a(t),a(n)];function i(o,s,l){for(var u=0,c=o.length;u<c;u++){var f=vr(o[u].seriesId,null);if(f==null)return;for(var h=wt(o[u].dataIndex),d=l&&l[f],p=0,v=h.length;p<v;p++){var m=h[p];d&&d[m]?d[m]=null:(s[f]||(s[f]={}))[m]=1}}}function a(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var c=a(o[u],!0);c.length&&l.push({seriesId:u,dataIndex:c})}return l}}function vu(r,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return q(e.dataIndex)?K(e.dataIndex,function(t){return r.indexOfRawIndex(t)}):r.indexOfRawIndex(e.dataIndex);if(e.name!=null)return q(e.name)?K(e.name,function(t){return r.indexOfName(t)}):r.indexOfName(e.name)}function it(){var r="__ec_inner_"+Qse++;return function(e){return e[r]||(e[r]={})}}var Qse=oz();function sd(r,e,t){var n=bC(e,t),i=n.mainTypeSpecified,a=n.queryOptionMap,o=n.others,s=o,l=t?t.defaultMainType:null;return!i&&l&&a.set(l,{}),a.each(function(u,c){var f=wp(r,c,u,{useDefault:l===c,enableAll:t&&t.enableAll!=null?t.enableAll:!0,enableNone:t&&t.enableNone!=null?t.enableNone:!0});s[c+"Models"]=f.models,s[c+"Model"]=f.models[0]}),s}function bC(r,e){var t;if(se(r)){var n={};n[r+"Index"]=0,t=n}else t=r;var i=ve(),a={},o=!1;return k(t,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],f=(u[2]||"").toLowerCase();if(!(!c||!f||e&&e.includeMainTypes&&He(e.includeMainTypes,c)<0)){o=o||!!c;var h=i.get(c)||i.set(c,{});h[f]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var lr={useDefault:!0,enableAll:!1,enableNone:!1},ele={useDefault:!1,enableAll:!0,enableNone:!0};function wp(r,e,t,n){n=n||lr;var i=t.index,a=t.id,o=t.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=r.getComponent(e))?[l]:[],s}return i==="none"||i===!1?(vn(n.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(i==="all"&&(vn(n.enableAll,'`"all"` is not a valid value on index option.'),i=a=o=null),s.models=r.queryComponents({mainType:e,index:i,id:a,name:o}),s)}function tle(r,e,t){r.setAttribute?r.setAttribute(e,t):r[e]=t}function rle(r){return r==="auto"?Ze.domSupported?"html":"richText":r||"html"}function d2(r,e){var t=ve(),n=[];return k(r,function(i){var a=e(i);(t.get(a)||(n.push(a),t.set(a,[]))).push(i)}),{keys:n,buckets:t}}function hz(r,e,t,n,i){var a=e==null||e==="auto";if(n==null)return n;if(lt(n)){var o=FE(t||0,n,i);return Xt(o,a?Math.max(pa(t||0),pa(n)):e)}else{if(se(n))return i<1?t:n;for(var s=[],l=t,u=n,c=Math.max(l?l.length:0,u.length),f=0;f<c;++f){var h=r.getDimensionInfo(f);if(h&&h.type==="ordinal")s[f]=(i<1&&l?l:u)[f];else{var d=l&&l[f]?l[f]:0,p=u[f],o=FE(d,p,i);s[f]=Xt(o,a?Math.max(pa(d),pa(p)):e)}}return s}}var nle=".",Zs="___EC__COMPONENT__CONTAINER___",dz="___EC__EXTENDED_CLASS___";function va(r){var e={main:"",sub:""};if(r){var t=r.split(nle);e.main=t[0]||"",e.sub=t[1]||""}return e}function ile(r){vn(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function ale(r){return!!(r&&r[dz])}function _C(r,e){r.$constructor=r,r.extend=function(t){var n=this,i;return ole(n)?i=function(a){z(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(t.$constructor||n).apply(this,arguments)},poe(i,this)),W(i.prototype,t),i[dz]=!0,i.extend=this.extend,i.superCall=ule,i.superApply=cle,i.superClass=n,i}}function ole(r){return Te(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function pz(r,e){r.extend=e.extend}var sle=Math.round(Math.random()*10);function lle(r){var e=["__\0is_clz",sle++].join("_");r.prototype[e]=!0,r.isInstance=function(t){return!!(t&&t[e])}}function ule(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return this.superClass.prototype[e].apply(r,t)}function cle(r,e,t){return this.superClass.prototype[e].apply(r,t)}function z0(r){var e={};r.registerClass=function(n){var i=n.type||n.prototype.type;if(i){ile(i),n.prototype.type=i;var a=va(i);if(!a.sub)e[a.main]=n;else if(a.sub!==Zs){var o=t(a);o[a.sub]=n}}return n},r.getClass=function(n,i,a){var o=e[n];if(o&&o[Zs]&&(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},r.getClassesByMainType=function(n){var i=va(n),a=[],o=e[i.main];return o&&o[Zs]?k(o,function(s,l){l!==Zs&&a.push(s)}):a.push(o),a},r.hasClass=function(n){var i=va(n);return!!e[i.main]},r.getAllClassMainTypes=function(){var n=[];return k(e,function(i,a){n.push(a)}),n},r.hasSubTypes=function(n){var i=va(n),a=e[i.main];return a&&a[Zs]};function t(n){var i=e[n.main];return(!i||!i[Zs])&&(i=e[n.main]={},i[Zs]=!0),i}}function mu(r,e){for(var t=0;t<r.length;t++)r[t][1]||(r[t][1]=r[t][0]);return e=e||!1,function(n,i,a){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(i&&He(i,l)>=0||a&&He(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var fle=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],hle=mu(fle),dle=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return hle(this,e,t)},r}(),p2=new _p(50);function ple(r){if(typeof r=="string"){var e=p2.get(r);return e&&e.image}else return r}function xC(r,e,t,n,i){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var a=p2.get(r),o={hostEl:t,cb:n,cbPayload:i};return a?(e=a.image,!F0(e)&&a.pending.push(o)):(e=ks.loadImage(r,$E,$E),e.__zrImageSrc=r,p2.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function $E(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<r.pending.length;e++){var t=r.pending[e],n=t.cb;n&&n(this,t.cbPayload),t.hostEl.dirty()}r.pending.length=0}function F0(r){return r&&r.width&&r.height}var Ob=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function vle(r,e,t,n,i,a){if(!t){r.text="",r.isTruncated=!1;return}var o=(e+"").split(`
|
||
`);a=vz(t,n,i,a);for(var s=!1,l={},u=0,c=o.length;u<c;u++)mz(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
|
||
`),r.isTruncated=s}function vz(r,e,t,n){n=n||{};var i=W({},n);i.font=e,t=Re(t,"..."),i.maxIterations=Re(n.maxIterations,2);var a=i.minChar=Re(n.minChar,0);i.cnCharWidth=Vn("国",e);var o=i.ascCharWidth=Vn("a",e);i.placeholder=Re(n.placeholder,"");for(var s=r=Math.max(0,r-1),l=0;l<a&&s>=o;l++)s-=o;var u=Vn(t,e);return u>s&&(t="",u=0),s=r-u,i.ellipsis=t,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=r,i}function mz(r,e,t){var n=t.containerWidth,i=t.font,a=t.contentWidth;if(!n){r.textLine="",r.isTruncated=!1;return}var o=Vn(e,i);if(o<=n){r.textLine=e,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?mle(e,a,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*a/o):0;e=e.substr(0,l),o=Vn(e,i)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function mle(r,e,t,n){for(var i=0,a=0,o=r.length;a<o&&i<e;a++){var s=r.charCodeAt(a);i+=0<=s&&s<=127?t:n}return a}function gle(r,e){r!=null&&(r+="");var t=e.overflow,n=e.padding,i=e.font,a=t==="truncate",o=N0(i),s=Re(e.lineHeight,o),l=!!e.backgroundColor,u=e.lineOverflow==="truncate",c=!1,f=e.width,h;f!=null&&(t==="break"||t==="breakAll")?h=r?gz(r,e.font,f,t==="breakAll",0).lines:[]:h=r?r.split(`
|
||
`):[];var d=h.length*s,p=Re(e.height,d);if(d>p&&u){var v=Math.floor(p/s);c=c||h.length>v,h=h.slice(0,v)}if(r&&a&&f!=null)for(var m=vz(f,i,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),g={},y=0;y<h.length;y++)mz(g,h[y],m),h[y]=g.textLine,c=c||g.isTruncated;for(var b=p,_=0,y=0;y<h.length;y++)_=Math.max(Vn(h[y],i),_);f==null&&(f=_);var x=_;return n&&(b+=n[0]+n[2],x+=n[1]+n[3],f+=n[1]+n[3]),l&&(x=f),{lines:h,height:p,outerWidth:x,outerHeight:b,lineHeight:s,calculatedLineHeight:o,contentWidth:_,contentHeight:d,width:f,isTruncated:c}}var yle=function(){function r(){}return r}(),HE=function(){function r(e){this.tokens=[],e&&(this.tokens=e)}return r}(),ble=function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r}();function _le(r,e){var t=new ble;if(r!=null&&(r+=""),!r)return t;for(var n=e.width,i=e.height,a=e.overflow,o=(a==="break"||a==="breakAll")&&n!=null?{width:n,accumWidth:0,breakAll:a==="breakAll"}:null,s=Ob.lastIndex=0,l;(l=Ob.exec(r))!=null;){var u=l.index;u>s&&jb(t,r.substring(s,u),e,o),jb(t,l[2],e,o,l[1]),s=Ob.lastIndex}s<r.length&&jb(t,r.substring(s,r.length),e,o);var c=[],f=0,h=0,d=e.padding,p=a==="truncate",v=e.lineOverflow==="truncate",m={};function g(F,N,B){F.width=N,F.lineHeight=B,f+=B,h=Math.max(h,N)}e:for(var y=0;y<t.lines.length;y++){for(var b=t.lines[y],_=0,x=0,w=0;w<b.tokens.length;w++){var S=b.tokens[w],T=S.styleName&&e.rich[S.styleName]||{},C=S.textPadding=T.padding,A=C?C[1]+C[3]:0,M=S.font=T.font||e.font;S.contentHeight=N0(M);var D=Re(T.height,S.contentHeight);if(S.innerHeight=D,C&&(D+=C[0]+C[2]),S.height=D,S.lineHeight=_a(T.lineHeight,e.lineHeight,D),S.align=T&&T.align||e.align,S.verticalAlign=T&&T.verticalAlign||"middle",v&&i!=null&&f+S.lineHeight>i){var E=t.lines.length;w>0?(b.tokens=b.tokens.slice(0,w),g(b,x,_),t.lines=t.lines.slice(0,y+1)):t.lines=t.lines.slice(0,y),t.isTruncated=t.isTruncated||t.lines.length<E;break e}var L=T.width,I=L==null||L==="auto";if(typeof L=="string"&&L.charAt(L.length-1)==="%")S.percentWidth=L,c.push(S),S.contentWidth=Vn(S.text,M);else{if(I){var R=T.backgroundColor,P=R&&R.image;P&&(P=ple(P),F0(P)&&(S.width=Math.max(S.width,P.width*D/P.height)))}var O=p&&n!=null?n-x:null;O!=null&&O<S.width?!I||O<A?(S.text="",S.width=S.contentWidth=0):(vle(m,S.text,O-A,M,e.ellipsis,{minChar:e.truncateMinChar}),S.text=m.text,t.isTruncated=t.isTruncated||m.isTruncated,S.width=S.contentWidth=Vn(S.text,M)):S.contentWidth=Vn(S.text,M)}S.width+=A,x+=S.width,T&&(_=Math.max(_,S.lineHeight))}g(b,x,_)}t.outerWidth=t.width=Re(n,h),t.outerHeight=t.height=Re(i,f),t.contentHeight=f,t.contentWidth=h,d&&(t.outerWidth+=d[1]+d[3],t.outerHeight+=d[0]+d[2]);for(var y=0;y<c.length;y++){var S=c[y],j=S.percentWidth;S.width=parseInt(j,10)/100*t.width}return t}function jb(r,e,t,n,i){var a=e==="",o=i&&t.rich[i]||{},s=r.lines,l=o.font||t.font,u=!1,c,f;if(n){var h=o.padding,d=h?h[1]+h[3]:0;if(o.width!=null&&o.width!=="auto"){var p=Ni(o.width,n.width)+d;s.length>0&&p+n.accumWidth>n.width&&(c=e.split(`
|
||
`),u=!0),n.accumWidth=p}else{var v=gz(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=v.accumWidth+d,f=v.linesWidths,c=v.lines}}else c=e.split(`
|
||
`);for(var m=0;m<c.length;m++){var g=c[m],y=new yle;if(y.styleName=i,y.text=g,y.isLineHolder=!g&&!a,typeof o.width=="number"?y.width=o.width:y.width=f?f[m]:Vn(g,l),!m&&!u){var b=(s[s.length-1]||(s[0]=new HE)).tokens,_=b.length;_===1&&b[0].isLineHolder?b[0]=y:(g||!_||a)&&b.push(y)}else s.push(new HE([y]))}}function xle(r){var e=r.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var wle=Ea(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function Sle(r){return xle(r)?!!wle[r]:!0}function gz(r,e,t,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,f=0;f<r.length;f++){var h=r.charAt(f);if(h===`
|
||
`){l&&(s+=l,c+=u),a.push(s),o.push(c),s="",l="",u=0,c=0;continue}var d=Vn(h,e),p=n?!1:!Sle(h);if(a.length?c+d>t:i+c+d>t){c?(s||l)&&(p?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=h,u+=d,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=h,c=d)):p?(a.push(l),o.push(u),l=h,u=d):(a.push(h),o.push(d));continue}c+=d,p?(l+=h,u+=d):(l&&(s+=l,l="",u=0),s+=h)}return!a.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}var v2="__zr_style_"+Math.round(Math.random()*10),eu={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},V0={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};eu[v2]=!0;var GE=["z","z2","invisible"],Tle=["invisible"],mi=function(r){z(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var n=et(t),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(t[a]):r.prototype.attrKV.call(this,a,t[a])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(t,n,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&Cle(this,t,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},e.prototype.contain=function(t,n){return this.rectContain(t,n)},e.prototype.traverse=function(t,n){t.call(n,this)},e.prototype.rectContain=function(t,n){var i=this.transformCoordToLocal(t,n),a=this.getBoundingRect();return a.contain(i[0],i[1])},e.prototype.getPaintRect=function(){var t=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;t=this._paintRect||(this._paintRect=new Ve(0,0,0,0)),n?Ve.applyTransform(t,i,n):t.copy(i),(o||s||l)&&(t.width+=o*2+Math.abs(s),t.height+=o*2+Math.abs(l),t.x=Math.min(t.x,t.x+s-o),t.y=Math.min(t.y,t.y+l-o));var u=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-u),t.y=Math.floor(t.y-u),t.width=Math.ceil(t.width+1+u*2),t.height=Math.ceil(t.height+1+u*2))}return t},e.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new Ve(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(t){return this.animate("style",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(t,n){t!=="style"?r.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},e.prototype.setStyle=function(t,n){return typeof t=="string"?this.style[t]=n:W(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=Ch,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&Ch)},e.prototype.styleUpdated=function(){this.__dirty&=~Ch},e.prototype.createStyle=function(t){return R0(eu,t)},e.prototype.useStyle=function(t){t[v2]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[v2]},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,GE)},e.prototype._applyStateObj=function(t,n,i,a,o,s){r.prototype._applyStateObj.call(this,t,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.style?o?a?u=n.style:(u=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(u,n.style)):l&&(u=i.style),u)if(o){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var f=et(c),h=0;h<f.length;h++){var d=f[h];d in u&&(u[d]=u[d],this.style[d]=c[d])}for(var p=et(u),h=0;h<p.length;h++){var d=p[h];this.style[d]=this.style[d]}this._transitionState(t,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var v=this.__inHover?Tle:GE,h=0;h<v.length;h++){var d=v[h];n&&n[d]!=null?this[d]=n[d]:l&&i[d]!=null&&(this[d]=i[d])}},e.prototype._mergeStates=function(t){for(var n=r.prototype._mergeStates.call(this,t),i,a=0;a<t.length;a++){var o=t[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(n.style=i),n},e.prototype._mergeStyle=function(t,n){return W(t,n),t},e.prototype.getAnimationStyleProps=function(){return V0},e.initDefaultProps=function(){var t=e.prototype;t.type="displayable",t.invisible=!1,t.z=0,t.z2=0,t.zlevel=0,t.culling=!1,t.cursor="pointer",t.rectHover=!1,t.incremental=!1,t._rect=null,t.dirtyRectTolerance=0,t.__dirty=On|Ch}(),e}(B0),Nb=new Ve(0,0,0,0),Bb=new Ve(0,0,0,0);function Cle(r,e,t){return Nb.copy(r.getBoundingRect()),r.transform&&Nb.applyTransform(r.transform),Bb.width=e,Bb.height=t,!Nb.intersect(Bb)}var Tn=Math.min,Cn=Math.max,zb=Math.sin,Fb=Math.cos,Js=Math.PI*2,Cv=Du(),Av=Du(),Mv=Du();function $0(r,e,t){if(r.length!==0){for(var n=r[0],i=n[0],a=n[0],o=n[1],s=n[1],l=1;l<r.length;l++)n=r[l],i=Tn(i,n[0]),a=Cn(a,n[0]),o=Tn(o,n[1]),s=Cn(s,n[1]);e[0]=i,e[1]=o,t[0]=a,t[1]=s}}function WE(r,e,t,n,i,a){i[0]=Tn(r,t),i[1]=Tn(e,n),a[0]=Cn(r,t),a[1]=Cn(e,n)}var UE=[],YE=[];function Ale(r,e,t,n,i,a,o,s,l,u){var c=NB,f=_r,h=c(r,t,i,o,UE);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var d=0;d<h;d++){var p=f(r,t,i,o,UE[d]);l[0]=Tn(p,l[0]),u[0]=Cn(p,u[0])}h=c(e,n,a,s,YE);for(var d=0;d<h;d++){var v=f(e,n,a,s,YE[d]);l[1]=Tn(v,l[1]),u[1]=Cn(v,u[1])}l[0]=Tn(r,l[0]),u[0]=Cn(r,u[0]),l[0]=Tn(o,l[0]),u[0]=Cn(o,u[0]),l[1]=Tn(e,l[1]),u[1]=Cn(e,u[1]),l[1]=Tn(s,l[1]),u[1]=Cn(s,u[1])}function Mle(r,e,t,n,i,a,o,s){var l=zB,u=Ar,c=Cn(Tn(l(r,t,i),1),0),f=Cn(Tn(l(e,n,a),1),0),h=u(r,t,i,c),d=u(e,n,a,f);o[0]=Tn(r,i,h),o[1]=Tn(e,a,d),s[0]=Cn(r,i,h),s[1]=Cn(e,a,d)}function kle(r,e,t,n,i,a,o,s,l){var u=ls,c=us,f=Math.abs(i-a);if(f%Js<1e-4&&f>1e-4){s[0]=r-t,s[1]=e-n,l[0]=r+t,l[1]=e+n;return}if(Cv[0]=Fb(i)*t+r,Cv[1]=zb(i)*n+e,Av[0]=Fb(a)*t+r,Av[1]=zb(a)*n+e,u(s,Cv,Av),c(l,Cv,Av),i=i%Js,i<0&&(i=i+Js),a=a%Js,a<0&&(a=a+Js),i>a&&!o?a+=Js:i<a&&o&&(i+=Js),o){var h=a;a=i,i=h}for(var d=0;d<a;d+=Math.PI/2)d>i&&(Mv[0]=Fb(d)*t+r,Mv[1]=zb(d)*n+e,u(s,Mv,s),c(l,Mv,l))}var Tt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Qs=[],el=[],Yi=[],No=[],qi=[],Xi=[],Vb=Math.min,$b=Math.max,tl=Math.cos,rl=Math.sin,Ya=Math.abs,m2=Math.PI,Yo=m2*2,Hb=typeof Float32Array<"u",Kf=[];function Gb(r){var e=Math.round(r/m2*1e8)/1e8;return e%2*m2}function wC(r,e){var t=Gb(r[0]);t<0&&(t+=Yo);var n=t-r[0],i=r[1];i+=n,!e&&i-t>=Yo?i=t+Yo:e&&t-i>=Yo?i=t-Yo:!e&&t>i?i=t+(Yo-Gb(t-i)):e&&t<i&&(i=t-(Yo-Gb(i-t))),r[0]=t,r[1]=i}var Ra=function(){function r(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(e,t,n){n=n||0,n>0&&(this._ux=Ya(n/py/e)||0,this._uy=Ya(n/py/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Tt.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var n=Ya(e-this._xi),i=Ya(t-this._yi),a=n>this._ux||i>this._uy;if(this.addData(Tt.L,e,t),this._ctx&&a&&this._ctx.lineTo(e,t),a)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,n,i,a,o){return this._drawPendingPt(),this.addData(Tt.C,e,t,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,i,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,n,i){return this._drawPendingPt(),this.addData(Tt.Q,e,t,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,i),this._xi=n,this._yi=i,this},r.prototype.arc=function(e,t,n,i,a,o){this._drawPendingPt(),Kf[0]=i,Kf[1]=a,wC(Kf,o),i=Kf[0],a=Kf[1];var s=a-i;return this.addData(Tt.A,e,t,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,i,a,o),this._xi=tl(a)*n+e,this._yi=rl(a)*n+t,this},r.prototype.arcTo=function(e,t,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,i,a),this},r.prototype.rect=function(e,t,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,i),this.addData(Tt.R,e,t,n,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Tt.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&Hb&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},r.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,i=this._len,a=0;a<t;a++)n+=e[a].len();Hb&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(var a=0;a<t;a++)for(var o=e[a].data,s=0;s<o.length;s++)this.data[i++]=o[s];this._len=i},r.prototype.addData=function(e,t,n,i,a,o,s,l,u){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var f=0;f<arguments.length;f++)c[this._len++]=arguments[f]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,Hb&&this._len>11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){Yi[0]=Yi[1]=qi[0]=qi[1]=Number.MAX_VALUE,No[0]=No[1]=Xi[0]=Xi[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,i=0,a=0,o;for(o=0;o<this._len;){var s=e[o++],l=o===1;switch(l&&(t=e[o],n=e[o+1],i=t,a=n),s){case Tt.M:t=i=e[o++],n=a=e[o++],qi[0]=i,qi[1]=a,Xi[0]=i,Xi[1]=a;break;case Tt.L:WE(t,n,e[o],e[o+1],qi,Xi),t=e[o++],n=e[o++];break;case Tt.C:Ale(t,n,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],qi,Xi),t=e[o++],n=e[o++];break;case Tt.Q:Mle(t,n,e[o++],e[o++],e[o],e[o+1],qi,Xi),t=e[o++],n=e[o++];break;case Tt.A:var u=e[o++],c=e[o++],f=e[o++],h=e[o++],d=e[o++],p=e[o++]+d;o+=1;var v=!e[o++];l&&(i=tl(d)*f+u,a=rl(d)*h+c),kle(u,c,f,h,d,p,v,qi,Xi),t=tl(p)*f+u,n=rl(p)*h+c;break;case Tt.R:i=t=e[o++],a=n=e[o++];var m=e[o++],g=e[o++];WE(i,a,i+m,a+g,qi,Xi);break;case Tt.Z:t=i,n=a;break}ls(Yi,Yi,qi),us(No,No,Xi)}return o===0&&(Yi[0]=Yi[1]=No[0]=No[1]=0),new Ve(Yi[0],Yi[1],No[0]-Yi[0],No[1]-Yi[1])},r.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,i=this._uy,a=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,f=0,h=0;h<t;){var d=e[h++],p=h===1;p&&(a=e[h],o=e[h+1],s=a,l=o);var v=-1;switch(d){case Tt.M:a=s=e[h++],o=l=e[h++];break;case Tt.L:{var m=e[h++],g=e[h++],y=m-a,b=g-o;(Ya(y)>n||Ya(b)>i||h===t-1)&&(v=Math.sqrt(y*y+b*b),a=m,o=g);break}case Tt.C:{var _=e[h++],x=e[h++],m=e[h++],g=e[h++],w=e[h++],S=e[h++];v=qoe(a,o,_,x,m,g,w,S,10),a=w,o=S;break}case Tt.Q:{var _=e[h++],x=e[h++],m=e[h++],g=e[h++];v=Koe(a,o,_,x,m,g,10),a=m,o=g;break}case Tt.A:var T=e[h++],C=e[h++],A=e[h++],M=e[h++],D=e[h++],E=e[h++],L=E+D;h+=1,p&&(s=tl(D)*A+T,l=rl(D)*M+C),v=$b(A,M)*Vb(Yo,Math.abs(E)),a=tl(L)*A+T,o=rl(L)*M+C;break;case Tt.R:{s=a=e[h++],l=o=e[h++];var I=e[h++],R=e[h++];v=I*2+R*2;break}case Tt.Z:{var y=s-a,b=l-o;v=Math.sqrt(y*y+b*b),a=s,o=l;break}}v>=0&&(u[f++]=v,c+=v)}return this._pathLen=c,c},r.prototype.rebuildPath=function(e,t){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,f,h,d=t<1,p,v,m=0,g=0,y,b=0,_,x;if(!(d&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,v=this._pathLen,y=t*v,!y)))e:for(var w=0;w<o;){var S=n[w++],T=w===1;switch(T&&(u=n[w],c=n[w+1],s=u,l=c),S!==Tt.L&&b>0&&(e.lineTo(_,x),b=0),S){case Tt.M:s=u=n[w++],l=c=n[w++],e.moveTo(u,c);break;case Tt.L:{f=n[w++],h=n[w++];var C=Ya(f-u),A=Ya(h-c);if(C>i||A>a){if(d){var M=p[g++];if(m+M>y){var D=(y-m)/M;e.lineTo(u*(1-D)+f*D,c*(1-D)+h*D);break e}m+=M}e.lineTo(f,h),u=f,c=h,b=0}else{var E=C*C+A*A;E>b&&(_=f,x=h,b=E)}break}case Tt.C:{var L=n[w++],I=n[w++],R=n[w++],P=n[w++],O=n[w++],j=n[w++];if(d){var M=p[g++];if(m+M>y){var D=(y-m)/M;Ds(u,L,R,O,D,Qs),Ds(c,I,P,j,D,el),e.bezierCurveTo(Qs[1],el[1],Qs[2],el[2],Qs[3],el[3]);break e}m+=M}e.bezierCurveTo(L,I,R,P,O,j),u=O,c=j;break}case Tt.Q:{var L=n[w++],I=n[w++],R=n[w++],P=n[w++];if(d){var M=p[g++];if(m+M>y){var D=(y-m)/M;Nd(u,L,R,D,Qs),Nd(c,I,P,D,el),e.quadraticCurveTo(Qs[1],el[1],Qs[2],el[2]);break e}m+=M}e.quadraticCurveTo(L,I,R,P),u=R,c=P;break}case Tt.A:var F=n[w++],N=n[w++],B=n[w++],$=n[w++],J=n[w++],U=n[w++],we=n[w++],Ye=!n[w++],ge=B>$?B:$,le=Ya(B-$)>.001,be=J+U,re=!1;if(d){var M=p[g++];m+M>y&&(be=J+U*(y-m)/M,re=!0),m+=M}if(le&&e.ellipse?e.ellipse(F,N,B,$,we,J,be,Ye):e.arc(F,N,ge,J,be,Ye),re)break e;T&&(s=tl(J)*B+F,l=rl(J)*$+N),u=tl(be)*B+F,c=rl(be)*$+N;break;case Tt.R:s=u=n[w],l=c=n[w+1],f=n[w++],h=n[w++];var G=n[w++],ee=n[w++];if(d){var M=p[g++];if(m+M>y){var Q=y-m;e.moveTo(f,h),e.lineTo(f+Vb(Q,G),h),Q-=G,Q>0&&e.lineTo(f+G,h+Vb(Q,ee)),Q-=ee,Q>0&&e.lineTo(f+$b(G-Q,0),h+ee),Q-=G,Q>0&&e.lineTo(f,h+$b(ee-Q,0));break e}m+=M}e.rect(f,h,G,ee);break;case Tt.Z:if(d){var M=p[g++];if(m+M>y){var D=(y-m)/M;e.lineTo(u*(1-D)+s*D,c*(1-D)+l*D);break e}m+=M}e.closePath(),u=s,c=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.CMD=Tt,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}();function Jo(r,e,t,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=r;if(o>e+s&&o>n+s||o<e-s&&o<n-s||a>r+s&&a>t+s||a<r-s&&a<t-s)return!1;if(r!==t)l=(e-n)/(r-t),u=(r*n-t*e)/(r-t);else return Math.abs(a-r)<=s/2;var c=l*a-o+u,f=c*c/(l*l+1);return f<=s/2*s/2}function Dle(r,e,t,n,i,a,o,s,l,u,c){if(l===0)return!1;var f=l;if(c>e+f&&c>n+f&&c>a+f&&c>s+f||c<e-f&&c<n-f&&c<a-f&&c<s-f||u>r+f&&u>t+f&&u>i+f&&u>o+f||u<r-f&&u<t-f&&u<i-f&&u<o-f)return!1;var h=BB(r,e,t,n,i,a,o,s,u,c,null);return h<=f/2}function yz(r,e,t,n,i,a,o,s,l){if(o===0)return!1;var u=o;if(l>e+u&&l>n+u&&l>a+u||l<e-u&&l<n-u&&l<a-u||s>r+u&&s>t+u&&s>i+u||s<r-u&&s<t-u&&s<i-u)return!1;var c=FB(r,e,t,n,i,a,s,l,null);return c<=u/2}var qE=Math.PI*2;function jn(r){return r%=qE,r<0&&(r+=qE),r}var Zf=Math.PI*2;function Ele(r,e,t,n,i,a,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=e;var c=Math.sqrt(s*s+l*l);if(c-u>t||c+u<t)return!1;if(Math.abs(n-i)%Zf<1e-4)return!0;if(a){var f=n;n=jn(i),i=jn(f)}else n=jn(n),i=jn(i);n>i&&(i+=Zf);var h=Math.atan2(l,s);return h<0&&(h+=Zf),h>=n&&h<=i||h+Zf>=n&&h+Zf<=i}function eo(r,e,t,n,i,a){if(a>e&&a>n||a<e&&a<n||n===e)return 0;var o=(a-e)/(n-e),s=n<e?1:-1;(o===1||o===0)&&(s=n<e?.5:-.5);var l=o*(t-r)+r;return l===i?1/0:l>i?s:0}var Bo=Ra.CMD,nl=Math.PI*2,Lle=1e-4;function Ile(r,e){return Math.abs(r-e)<Lle}var sn=[-1,-1,-1],Qn=[-1,-1];function Ple(){var r=Qn[0];Qn[0]=Qn[1],Qn[1]=r}function Rle(r,e,t,n,i,a,o,s,l,u){if(u>e&&u>n&&u>a&&u>s||u<e&&u<n&&u<a&&u<s)return 0;var c=cy(e,n,a,s,u,sn);if(c===0)return 0;for(var f=0,h=-1,d=void 0,p=void 0,v=0;v<c;v++){var m=sn[v],g=m===0||m===1?.5:1,y=_r(r,t,i,o,m);y<l||(h<0&&(h=NB(e,n,a,s,Qn),Qn[1]<Qn[0]&&h>1&&Ple(),d=_r(e,n,a,s,Qn[0]),h>1&&(p=_r(e,n,a,s,Qn[1]))),h===2?m<Qn[0]?f+=d<e?g:-g:m<Qn[1]?f+=p<d?g:-g:f+=s<p?g:-g:m<Qn[0]?f+=d<e?g:-g:f+=s<d?g:-g)}return f}function Ole(r,e,t,n,i,a,o,s){if(s>e&&s>n&&s>a||s<e&&s<n&&s<a)return 0;var l=Xoe(e,n,a,s,sn);if(l===0)return 0;var u=zB(e,n,a);if(u>=0&&u<=1){for(var c=0,f=Ar(e,n,a,u),h=0;h<l;h++){var d=sn[h]===0||sn[h]===1?.5:1,p=Ar(r,t,i,sn[h]);p<o||(sn[h]<u?c+=f<e?d:-d:c+=a<f?d:-d)}return c}else{var d=sn[0]===0||sn[0]===1?.5:1,p=Ar(r,t,i,sn[0]);return p<o?0:a<e?d:-d}}function jle(r,e,t,n,i,a,o,s){if(s-=e,s>t||s<-t)return 0;var l=Math.sqrt(t*t-s*s);sn[0]=-l,sn[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=nl-1e-4){n=0,i=nl;var c=a?1:-1;return o>=sn[0]+r&&o<=sn[1]+r?c:0}if(n>i){var f=n;n=i,i=f}n<0&&(n+=nl,i+=nl);for(var h=0,d=0;d<2;d++){var p=sn[d];if(p+r>o){var v=Math.atan2(s,p),c=a?1:-1;v<0&&(v=nl+v),(v>=n&&v<=i||v+nl>=n&&v+nl<=i)&&(v>Math.PI/2&&v<Math.PI*1.5&&(c=-c),h+=c)}}return h}function bz(r,e,t,n,i){for(var a=r.data,o=r.len(),s=0,l=0,u=0,c=0,f=0,h,d,p=0;p<o;){var v=a[p++],m=p===1;switch(v===Bo.M&&p>1&&(t||(s+=eo(l,u,c,f,n,i))),m&&(l=a[p],u=a[p+1],c=l,f=u),v){case Bo.M:c=a[p++],f=a[p++],l=c,u=f;break;case Bo.L:if(t){if(Jo(l,u,a[p],a[p+1],e,n,i))return!0}else s+=eo(l,u,a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Bo.C:if(t){if(Dle(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=Rle(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Bo.Q:if(t){if(yz(l,u,a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=Ole(l,u,a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Bo.A:var g=a[p++],y=a[p++],b=a[p++],_=a[p++],x=a[p++],w=a[p++];p+=1;var S=!!(1-a[p++]);h=Math.cos(x)*b+g,d=Math.sin(x)*_+y,m?(c=h,f=d):s+=eo(l,u,h,d,n,i);var T=(n-g)*_/b+g;if(t){if(Ele(g,y,_,x,x+w,S,e,T,i))return!0}else s+=jle(g,y,_,x,x+w,S,T,i);l=Math.cos(x+w)*b+g,u=Math.sin(x+w)*_+y;break;case Bo.R:c=l=a[p++],f=u=a[p++];var C=a[p++],A=a[p++];if(h=c+C,d=f+A,t){if(Jo(c,f,h,f,e,n,i)||Jo(h,f,h,d,e,n,i)||Jo(h,d,c,d,e,n,i)||Jo(c,d,c,f,e,n,i))return!0}else s+=eo(h,f,h,d,n,i),s+=eo(c,d,c,f,n,i);break;case Bo.Z:if(t){if(Jo(l,u,c,f,e,n,i))return!0}else s+=eo(l,u,c,f,n,i);l=c,u=f;break}}return!t&&!Ile(u,f)&&(s+=eo(l,u,c,f,n,i)||0),s!==0}function Nle(r,e,t){return bz(r,0,!1,e,t)}function Ble(r,e,t,n){return bz(r,e,!0,t,n)}var my=Ce({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},eu),zle={style:Ce({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},V0.style)},Wb=Ia.concat(["invisible","culling","z","z2","zlevel","parent"]),Xe=function(r){z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){t.buildPath(l,t.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<Wb.length;++s)i[Wb[s]]=this[Wb[s]];i.__dirty|=On}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(t){var n=et(t);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=t[o];o==="style"?this.style?W(this.style,s):this.useStyle(s):o==="shape"?W(this.shape,s):r.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var t=this.style.fill;if(t!=="none"){if(se(t)){var n=hy(t,0);return n>.5?c2:n>.2?Sse:f2}else if(t)return f2}return c2},e.prototype.getInsideTextStroke=function(t){var n=this.style.fill;if(se(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=hy(t,0)<u2;if(a===o)return n}},e.prototype.buildPath=function(t,n,i){},e.prototype.pathUpdated=function(){this.__dirty&=~xc},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new Ra(!1)},e.prototype.hasStroke=function(){var t=this.style,n=t.stroke;return!(n==null||n==="none"||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,i=!t;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&xc)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||i){s.copy(t);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n),a=this.getBoundingRect(),o=this.style;if(t=i[0],n=i[1],a.contain(t,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),Ble(s,l/u,t,n)))return!0}if(this.hasFill())return Nle(s,t,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=xc,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,n){t==="shape"?this.setShape(n):r.prototype.attrKV.call(this,t,n)},e.prototype.setShape=function(t,n){var i=this.shape;return i||(i=this.shape={}),typeof t=="string"?i[t]=n:W(i,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&xc)},e.prototype.createStyle=function(t){return R0(my,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=W({},this.shape))},e.prototype._applyStateObj=function(t,n,i,a,o,s){r.prototype._applyStateObj.call(this,t,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=W({},i.shape),W(u,n.shape)):(u=W({},a?this.shape:i.shape),W(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=W({},this.shape);for(var c={},f=et(u),h=0;h<f.length;h++){var d=f[h];typeof u[d]=="object"?this.shape[d]=u[d]:c[d]=u[d]}this._transitionState(t,{shape:c},s)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(t){for(var n=r.prototype._mergeStates.call(this,t),i,a=0;a<t.length;a++){var o=t[a];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(n.shape=i),n},e.prototype.getAnimationStyleProps=function(){return zle},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var n=function(a){z(o,a);function o(s){var l=a.call(this,s)||this;return t.init&&t.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return ke(t.style)},o.prototype.getDefaultShape=function(){return ke(t.shape)},o}(e);for(var i in t)typeof t[i]=="function"&&(n.prototype[i]=t[i]);return n},e.initDefaultProps=function(){var t=e.prototype;t.type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=On|Ch|xc}(),e}(mi),Fle=Ce({strokeFirst:!0,font:Ms,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},my),Qc=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.hasStroke=function(){var t=this.style,n=t.stroke;return n!=null&&n!=="none"&&t.lineWidth>0},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(t){return R0(Fle,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var n=t.text;n!=null?n+="":n="";var i=xp(n,t.font,t.textAlign,t.textBaseline);if(i.x+=t.x||0,i.y+=t.y||0,this.hasStroke()){var a=t.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(mi);Qc.prototype.type="tspan";var Vle=Ce({x:0,y:0},eu),$le={style:Ce({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},V0.style)};function Hle(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var Lr=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return R0(Vle,t)},e.prototype._getSize=function(t){var n=this.style,i=n[t];if(i!=null)return i;var a=Hle(n.image)?n.image:this.__image;if(!a)return 0;var o=t==="width"?"height":"width",s=n[o];return s==null?a[t]:a[t]/a[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return $le},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new Ve(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(mi);Lr.prototype.type="image";function Gle(r,e){var t=e.x,n=e.y,i=e.width,a=e.height,o=e.r,s,l,u,c;i<0&&(t=t+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var f;s+l>i&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),r.moveTo(t+s,n),r.lineTo(t+i-l,n),l!==0&&r.arc(t+i-l,n+l,l,-Math.PI/2,0),r.lineTo(t+i,n+a-u),u!==0&&r.arc(t+i-u,n+a-u,u,0,Math.PI/2),r.lineTo(t+c,n+a),c!==0&&r.arc(t+c,n+a-c,c,Math.PI/2,Math.PI),r.lineTo(t,n+s),s!==0&&r.arc(t+s,n+s,s,Math.PI,Math.PI*1.5)}var Dc=Math.round;function _z(r,e,t){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;r.x1=n,r.x2=i,r.y1=a,r.y2=o;var s=t&&t.lineWidth;return s&&(Dc(n*2)===Dc(i*2)&&(r.x1=r.x2=Il(n,s,!0)),Dc(a*2)===Dc(o*2)&&(r.y1=r.y2=Il(a,s,!0))),r}}function xz(r,e,t){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;r.x=n,r.y=i,r.width=a,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=Il(n,s,!0),r.y=Il(i,s,!0),r.width=Math.max(Il(n+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(Il(i+o,s,!1)-r.y,o===0?0:1)),r}}function Il(r,e,t){if(!e)return r;var n=Dc(r*2);return(n+Dc(e))%2===0?n/2:(n+(t?1:-1))/2}var Wle=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),Ule={},nt=function(r){z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Wle},e.prototype.buildPath=function(t,n){var i,a,o,s;if(this.subPixelOptimize){var l=xz(Ule,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?Gle(t,n):t.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Xe);nt.prototype.type="rect";var XE={fill:"#000"},KE=2,Yle={style:Ce({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},V0.style)},ot=function(r){z(e,r);function e(t){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=XE,n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},e.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):r.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):r.prototype.getLocalTransform.call(this,t)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,Kle(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new Ve(0,0,0,0),n=this._children,i=[],a=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),u=s.getLocalTransform(i);u?(t.copy(l),t.applyTransform(u),a=a||t.clone(),a.union(t)):(a=a||l.clone(),a.union(l))}this._rect=a||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||XE},e.prototype.setTextContent=function(t){},e.prototype._mergeStyle=function(t,n){if(!n)return t;var i=n.rich,a=t.rich||i&&{};return W(t,n),i&&a?(this._mergeRich(a,i),t.rich=a):a&&(t.rich=a),t},e.prototype._mergeRich=function(t,n){for(var i=et(n),a=0;a<i.length;a++){var o=i[a];t[o]=t[o]||{},W(t[o],n[o])}},e.prototype.getAnimationStyleProps=function(){return Yle},e.prototype._getOrCreateChild=function(t){var n=this._children[this._childCursor];return(!n||!(n instanceof t))&&(n=new t),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},e.prototype._updatePlainTexts=function(){var t=this.style,n=t.font||Ms,i=t.padding,a=nL(t),o=gle(a,t),s=Ub(t),l=!!t.backgroundColor,u=o.outerHeight,c=o.outerWidth,f=o.contentWidth,h=o.lines,d=o.lineHeight,p=this._defaultStyle;this.isTruncated=!!o.isTruncated;var v=t.x||0,m=t.y||0,g=t.align||p.align||"left",y=t.verticalAlign||p.verticalAlign||"top",b=v,_=wc(m,o.contentHeight,y);if(s||i){var x=Mh(v,c,g),w=wc(m,u,y);s&&this._renderBackground(t,t,x,w,c,u)}_+=d/2,i&&(b=rL(v,g,i),y==="top"?_+=i[0]:y==="bottom"&&(_-=i[2]));for(var S=0,T=!1,C=tL("fill"in t?t.fill:(T=!0,p.fill)),A=eL("stroke"in t?t.stroke:!l&&(!p.autoStroke||T)?(S=KE,p.stroke):null),M=t.textShadowBlur>0,D=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),E=o.calculatedLineHeight,L=0;L<h.length;L++){var I=this._getOrCreateChild(Qc),R=I.createStyle();I.useStyle(R),R.text=h[L],R.x=b,R.y=_,R.textAlign=g,R.textBaseline="middle",R.opacity=t.opacity,R.strokeFirst=!0,M&&(R.shadowBlur=t.textShadowBlur||0,R.shadowColor=t.textShadowColor||"transparent",R.shadowOffsetX=t.textShadowOffsetX||0,R.shadowOffsetY=t.textShadowOffsetY||0),R.stroke=A,R.fill=C,A&&(R.lineWidth=t.lineWidth||S,R.lineDash=t.lineDash,R.lineDashOffset=t.lineDashOffset||0),R.font=n,JE(R,t),_+=d,D&&I.setBoundingRect(new Ve(Mh(R.x,f,R.textAlign),wc(R.y,E,R.textBaseline),f,E))}},e.prototype._updateRichTexts=function(){var t=this.style,n=nL(t),i=_le(n,t),a=i.width,o=i.outerWidth,s=i.outerHeight,l=t.padding,u=t.x||0,c=t.y||0,f=this._defaultStyle,h=t.align||f.align,d=t.verticalAlign||f.verticalAlign;this.isTruncated=!!i.isTruncated;var p=Mh(u,o,h),v=wc(c,s,d),m=p,g=v;l&&(m+=l[3],g+=l[0]);var y=m+a;Ub(t)&&this._renderBackground(t,t,p,v,o,s);for(var b=!!t.backgroundColor,_=0;_<i.lines.length;_++){for(var x=i.lines[_],w=x.tokens,S=w.length,T=x.lineHeight,C=x.width,A=0,M=m,D=y,E=S-1,L=void 0;A<S&&(L=w[A],!L.align||L.align==="left");)this._placeToken(L,t,T,g,M,"left",b),C-=L.width,M+=L.width,A++;for(;E>=0&&(L=w[E],L.align==="right");)this._placeToken(L,t,T,g,D,"right",b),C-=L.width,D-=L.width,E--;for(M+=(a-(M-m)-(y-D)-C)/2;A<=E;)L=w[A],this._placeToken(L,t,T,g,M+L.width/2,"center",b),M+=L.width,A++;g+=T}},e.prototype._placeToken=function(t,n,i,a,o,s,l){var u=n.rich[t.styleName]||{};u.text=t.text;var c=t.verticalAlign,f=a+i/2;c==="top"?f=a+t.height/2:c==="bottom"&&(f=a+i-t.height/2);var h=!t.isLineHolder&&Ub(u);h&&this._renderBackground(u,n,s==="right"?o-t.width:s==="center"?o-t.width/2:o,f-t.height/2,t.width,t.height);var d=!!u.backgroundColor,p=t.textPadding;p&&(o=rL(o,s,p),f-=t.height/2-p[0]-t.innerHeight/2);var v=this._getOrCreateChild(Qc),m=v.createStyle();v.useStyle(m);var g=this._defaultStyle,y=!1,b=0,_=tL("fill"in u?u.fill:"fill"in n?n.fill:(y=!0,g.fill)),x=eL("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!g.autoStroke||y)?(b=KE,g.stroke):null),w=u.textShadowBlur>0||n.textShadowBlur>0;m.text=t.text,m.x=o,m.y=f,w&&(m.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,m.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=t.font||Ms,m.opacity=_a(u.opacity,n.opacity,1),JE(m,u),x&&(m.lineWidth=_a(u.lineWidth,n.lineWidth,b),m.lineDash=Re(u.lineDash,n.lineDash),m.lineDashOffset=n.lineDashOffset||0,m.stroke=x),_&&(m.fill=_);var S=t.contentWidth,T=t.contentHeight;v.setBoundingRect(new Ve(Mh(m.x,S,m.textAlign),wc(m.y,T,m.textBaseline),S,T))},e.prototype._renderBackground=function(t,n,i,a,o,s){var l=t.backgroundColor,u=t.borderWidth,c=t.borderColor,f=l&&l.image,h=l&&!f,d=t.borderRadius,p=this,v,m;if(h||t.lineHeight||u&&c){v=this._getOrCreateChild(nt),v.useStyle(v.createStyle()),v.style.fill=null;var g=v.shape;g.x=i,g.y=a,g.width=o,g.height=s,g.r=d,v.dirtyShape()}if(h){var y=v.style;y.fill=l||null,y.fillOpacity=Re(t.fillOpacity,1)}else if(f){m=this._getOrCreateChild(Lr),m.onload=function(){p.dirtyStyle()};var b=m.style;b.image=l.image,b.x=i,b.y=a,b.width=o,b.height=s}if(u&&c){var y=v.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=Re(t.strokeOpacity,1),y.lineDash=t.borderDash,y.lineDashOffset=t.borderDashOffset||0,v.strokeContainThreshold=0,v.hasFill()&&v.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var _=(v||m).style;_.shadowBlur=t.shadowBlur||0,_.shadowColor=t.shadowColor||"transparent",_.shadowOffsetX=t.shadowOffsetX||0,_.shadowOffsetY=t.shadowOffsetY||0,_.opacity=_a(t.opacity,n.opacity,1)},e.makeFont=function(t){var n="";return Sz(t)&&(n=[t.fontStyle,t.fontWeight,wz(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),n&&Li(n)||t.textFont||t.font},e}(mi),qle={left:!0,right:1,center:1},Xle={top:1,bottom:1,middle:1},ZE=["fontStyle","fontWeight","fontSize","fontFamily"];function wz(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?iC+"px":r+"px"}function JE(r,e){for(var t=0;t<ZE.length;t++){var n=ZE[t],i=e[n];i!=null&&(r[n]=i)}}function Sz(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function Kle(r){return QE(r),k(r.rich,QE),r}function QE(r){if(r){r.font=ot.makeFont(r);var e=r.align;e==="middle"&&(e="center"),r.align=e==null||qle[e]?e:"left";var t=r.verticalAlign;t==="center"&&(t="middle"),r.verticalAlign=t==null||Xle[t]?t:"top";var n=r.padding;n&&(r.padding=cC(r.padding))}}function eL(r,e){return r==null||e<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function tL(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function rL(r,e,t){return e==="right"?r-t[1]:e==="center"?r+t[3]/2-t[1]/2:r+t[3]}function nL(r){var e=r.text;return e!=null&&(e+=""),e}function Ub(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var Le=it(),g2=function(r,e,t,n){if(n){var i=Le(n);i.dataIndex=t,i.dataType=e,i.seriesIndex=r,i.ssrType="chart",n.type==="group"&&n.traverse(function(a){var o=Le(a);o.seriesIndex=r,o.dataIndex=t,o.dataType=e,o.ssrType="chart"})}},iL=1,aL={},Tz=it(),SC=it(),TC=0,Sp=1,H0=2,mn=["emphasis","blur","select"],$d=["normal","emphasis","blur","select"],bf=10,Zle=9,tu="highlight",Hm="downplay",ld="select",Gm="unselect",ud="toggleSelect";function Zu(r){return r!=null&&r!=="none"}function G0(r,e,t){r.onHoverStateChange&&(r.hoverState||0)!==t&&r.onHoverStateChange(e),r.hoverState=t}function Cz(r){G0(r,"emphasis",H0)}function Az(r){r.hoverState===H0&&G0(r,"normal",TC)}function CC(r){G0(r,"blur",Sp)}function Mz(r){r.hoverState===Sp&&G0(r,"normal",TC)}function Jle(r){r.selected=!0}function Qle(r){r.selected=!1}function oL(r,e,t){e(r,t)}function Do(r,e,t){oL(r,e,t),r.isGroup&&r.traverse(function(n){oL(n,e,t)})}function gy(r,e){switch(e){case"emphasis":r.hoverState=H0;break;case"normal":r.hoverState=TC;break;case"blur":r.hoverState=Sp;break;case"select":r.selected=!0}}function eue(r,e,t,n){for(var i=r.style,a={},o=0;o<e.length;o++){var s=e[o],l=i[s];a[s]=l??(n&&n[s])}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(t)<0&&u.targetName==="style"&&u.saveTo(a,e)}return a}function tue(r,e,t,n){var i=t&&He(t,"select")>=0,a=!1;if(r instanceof Xe){var o=Tz(r),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Zu(s)||Zu(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=W({},n),u=W({},u),u.fill=s):!Zu(u.fill)&&Zu(s)?(a=!0,n=W({},n),u=W({},u),u.fill=r2(s)):!Zu(u.stroke)&&Zu(l)&&(a||(n=W({},n),u=W({},u)),u.stroke=r2(l)),n.style=u}}if(n&&n.z2==null){a||(n=W({},n));var c=r.z2EmphasisLift;n.z2=r.z2+(c??bf)}return n}function rue(r,e,t){if(t&&t.z2==null){t=W({},t);var n=r.z2SelectLift;t.z2=r.z2+(n??Zle)}return t}function nue(r,e,t){var n=He(r.currentStates,e)>=0,i=r.style.opacity,a=n?null:eue(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=W({},t),o=W({opacity:n?i:a.opacity*.1},o),t.style=o),t}function Yb(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return tue(this,r,e,t);if(r==="blur")return nue(this,r,t);if(r==="select")return rue(this,r,t)}return t}function gu(r){r.stateProxy=Yb;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=Yb),t&&(t.stateProxy=Yb)}function sL(r,e){!Lz(r,e)&&!r.__highByOuter&&Do(r,Cz)}function lL(r,e){!Lz(r,e)&&!r.__highByOuter&&Do(r,Az)}function wo(r,e){r.__highByOuter|=1<<(e||0),Do(r,Cz)}function So(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&Do(r,Az)}function kz(r){Do(r,CC)}function AC(r){Do(r,Mz)}function Dz(r){Do(r,Jle)}function Ez(r){Do(r,Qle)}function Lz(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function Iz(r){var e=r.getModel(),t=[],n=[];e.eachComponent(function(i,a){var o=SC(a),s=i==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){Mz(u)}),s&&t.push(a)),o.isBlured=!1}),k(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(t,!1,e)})}function y2(r,e,t,n){var i=n.getModel();t=t||"coordinateSystem";function a(u,c){for(var f=0;f<c.length;f++){var h=u.getItemGraphicEl(c[f]);h&&AC(h)}}if(r!=null&&!(!e||e==="none")){var o=i.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(u){var c=o===u,f=u.coordinateSystem;f&&f.master&&(f=f.master);var h=f&&s?f===s:c;if(!(t==="series"&&!c||t==="coordinateSystem"&&!h||e==="series"&&c)){var d=n.getViewOfSeriesModel(u);if(d.group.traverse(function(m){m.__highByOuter&&c&&e==="self"||CC(m)}),Zr(e))a(u.getData(),e);else if(Me(e))for(var p=et(e),v=0;v<p.length;v++)a(u.getData(p[v]),e[p[v]]);l.push(u),SC(u).isBlured=!0}}),i.eachComponent(function(u,c){if(u!=="series"){var f=n.getViewOfComponentModel(c);f&&f.toggleBlurSeries&&f.toggleBlurSeries(l,!0,i)}})}}function b2(r,e,t){if(!(r==null||e==null)){var n=t.getModel().getComponent(r,e);if(n){SC(n).isBlured=!0;var i=t.getViewOfComponentModel(n);!i||!i.focusBlurEnabled||i.group.traverse(function(a){CC(a)})}}}function iue(r,e,t){var n=r.seriesIndex,i=r.getData(e.dataType);if(i){var a=vu(i,e);a=(q(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),l=0;!o&&l<s;)o=i.getItemGraphicEl(l++);if(o){var u=Le(o);y2(n,u.focus,u.blurScope,t)}else{var c=r.get(["emphasis","focus"]),f=r.get(["emphasis","blurScope"]);c!=null&&y2(n,c,f,t)}}}function MC(r,e,t,n){var i={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||e==null||t==null)return i;var a=n.getModel().getComponent(r,e);if(!a)return i;var o=n.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(t),l,u=0;u<s.length;u++)if(Le(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function aue(r,e,t){var n=Le(r),i=MC(n.componentMainType,n.componentIndex,n.componentHighDownName,t),a=i.dispatchers,o=i.focusSelf;a?(o&&b2(n.componentMainType,n.componentIndex,t),k(a,function(s){return sL(s,e)})):(y2(n.seriesIndex,n.focus,n.blurScope,t),n.focus==="self"&&b2(n.componentMainType,n.componentIndex,t),sL(r,e))}function oue(r,e,t){Iz(t);var n=Le(r),i=MC(n.componentMainType,n.componentIndex,n.componentHighDownName,t).dispatchers;i?k(i,function(a){return lL(a,e)}):lL(r,e)}function sue(r,e,t){if(x2(e)){var n=e.dataType,i=r.getData(n),a=vu(i,e);q(a)||(a=[a]),r[e.type===ud?"toggleSelect":e.type===ld?"select":"unselect"](a,n)}}function uL(r){var e=r.getAllData();k(e,function(t){var n=t.data,i=t.type;n.eachItemGraphicEl(function(a,o){r.isSelected(o,i)?Dz(a):Ez(a)})})}function lue(r){var e=[];return r.eachSeries(function(t){var n=t.getAllData();k(n,function(i){i.data;var a=i.type,o=t.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:t.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function ru(r,e,t){Pl(r,!0),Do(r,gu),_2(r,e,t)}function uue(r){Pl(r,!1)}function $t(r,e,t,n){n?uue(r):ru(r,e,t)}function _2(r,e,t){var n=Le(r);e!=null?(n.focus=e,n.blurScope=t):n.focus&&(n.focus=null)}var cL=["emphasis","blur","select"],cue={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Fr(r,e,t,n){t=t||"itemStyle";for(var i=0;i<cL.length;i++){var a=cL[i],o=e.getModel([a,t]),s=r.ensureState(a);s.style=n?n(o):o[cue[t]]()}}function Pl(r,e){var t=e===!1,n=r;r.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!t||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!t)}function Hd(r){return!!(r&&r.__highDownDispatcher)}function fue(r,e,t){var n=Le(r);n.componentMainType=e.mainType,n.componentIndex=e.componentIndex,n.componentHighDownName=t}function hue(r){var e=aL[r];return e==null&&iL<=32&&(e=aL[r]=iL++),e}function x2(r){var e=r.type;return e===ld||e===Gm||e===ud}function fL(r){var e=r.type;return e===tu||e===Hm}function due(r){var e=Tz(r);e.normalFill=r.style.fill,e.normalStroke=r.style.stroke;var t=r.states.select||{};e.selectFill=t.style&&t.style.fill||null,e.selectStroke=t.style&&t.style.stroke||null}var Ju=Ra.CMD,pue=[[],[],[]],hL=Math.sqrt,vue=Math.atan2;function Pz(r,e){if(e){var t=r.data,n=r.len(),i,a,o,s,l,u,c=Ju.M,f=Ju.C,h=Ju.L,d=Ju.R,p=Ju.A,v=Ju.Q;for(o=0,s=0;o<n;){switch(i=t[o++],s=o,a=0,i){case c:a=1;break;case h:a=1;break;case f:a=3;break;case v:a=2;break;case p:var m=e[4],g=e[5],y=hL(e[0]*e[0]+e[1]*e[1]),b=hL(e[2]*e[2]+e[3]*e[3]),_=vue(-e[1]/b,e[0]/y);t[o]*=y,t[o++]+=m,t[o]*=b,t[o++]+=g,t[o++]*=y,t[o++]*=b,t[o++]+=_,t[o++]+=_,o+=2,s=o;break;case d:u[0]=t[o++],u[1]=t[o++],Br(u,u,e),t[s++]=u[0],t[s++]=u[1],u[0]+=t[o++],u[1]+=t[o++],Br(u,u,e),t[s++]=u[0],t[s++]=u[1]}for(l=0;l<a;l++){var x=pue[l];x[0]=t[o++],x[1]=t[o++],Br(x,x,e),t[s++]=x[0],t[s++]=x[1]}}r.increaseVersion()}}var qb=Math.sqrt,kv=Math.sin,Dv=Math.cos,Jf=Math.PI;function dL(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function w2(r,e){return(r[0]*e[0]+r[1]*e[1])/(dL(r)*dL(e))}function pL(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(w2(r,e))}function vL(r,e,t,n,i,a,o,s,l,u,c){var f=l*(Jf/180),h=Dv(f)*(r-t)/2+kv(f)*(e-n)/2,d=-1*kv(f)*(r-t)/2+Dv(f)*(e-n)/2,p=h*h/(o*o)+d*d/(s*s);p>1&&(o*=qb(p),s*=qb(p));var v=(i===a?-1:1)*qb((o*o*(s*s)-o*o*(d*d)-s*s*(h*h))/(o*o*(d*d)+s*s*(h*h)))||0,m=v*o*d/s,g=v*-s*h/o,y=(r+t)/2+Dv(f)*m-kv(f)*g,b=(e+n)/2+kv(f)*m+Dv(f)*g,_=pL([1,0],[(h-m)/o,(d-g)/s]),x=[(h-m)/o,(d-g)/s],w=[(-1*h-m)/o,(-1*d-g)/s],S=pL(x,w);if(w2(x,w)<=-1&&(S=Jf),w2(x,w)>=1&&(S=0),S<0){var T=Math.round(S/Jf*1e6)/1e6;S=Jf*2+T%2*Jf}c.addData(u,y,b,o,s,_,S,f,a)}var mue=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,gue=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function yue(r){var e=new Ra;if(!r)return e;var t=0,n=0,i=t,a=n,o,s=Ra.CMD,l=r.match(mue);if(!l)return e;for(var u=0;u<l.length;u++){for(var c=l[u],f=c.charAt(0),h=void 0,d=c.match(gue)||[],p=d.length,v=0;v<p;v++)d[v]=parseFloat(d[v]);for(var m=0;m<p;){var g=void 0,y=void 0,b=void 0,_=void 0,x=void 0,w=void 0,S=void 0,T=t,C=n,A=void 0,M=void 0;switch(f){case"l":t+=d[m++],n+=d[m++],h=s.L,e.addData(h,t,n);break;case"L":t=d[m++],n=d[m++],h=s.L,e.addData(h,t,n);break;case"m":t+=d[m++],n+=d[m++],h=s.M,e.addData(h,t,n),i=t,a=n,f="l";break;case"M":t=d[m++],n=d[m++],h=s.M,e.addData(h,t,n),i=t,a=n,f="L";break;case"h":t+=d[m++],h=s.L,e.addData(h,t,n);break;case"H":t=d[m++],h=s.L,e.addData(h,t,n);break;case"v":n+=d[m++],h=s.L,e.addData(h,t,n);break;case"V":n=d[m++],h=s.L,e.addData(h,t,n);break;case"C":h=s.C,e.addData(h,d[m++],d[m++],d[m++],d[m++],d[m++],d[m++]),t=d[m-2],n=d[m-1];break;case"c":h=s.C,e.addData(h,d[m++]+t,d[m++]+n,d[m++]+t,d[m++]+n,d[m++]+t,d[m++]+n),t+=d[m-2],n+=d[m-1];break;case"S":g=t,y=n,A=e.len(),M=e.data,o===s.C&&(g+=t-M[A-4],y+=n-M[A-3]),h=s.C,T=d[m++],C=d[m++],t=d[m++],n=d[m++],e.addData(h,g,y,T,C,t,n);break;case"s":g=t,y=n,A=e.len(),M=e.data,o===s.C&&(g+=t-M[A-4],y+=n-M[A-3]),h=s.C,T=t+d[m++],C=n+d[m++],t+=d[m++],n+=d[m++],e.addData(h,g,y,T,C,t,n);break;case"Q":T=d[m++],C=d[m++],t=d[m++],n=d[m++],h=s.Q,e.addData(h,T,C,t,n);break;case"q":T=d[m++]+t,C=d[m++]+n,t+=d[m++],n+=d[m++],h=s.Q,e.addData(h,T,C,t,n);break;case"T":g=t,y=n,A=e.len(),M=e.data,o===s.Q&&(g+=t-M[A-4],y+=n-M[A-3]),t=d[m++],n=d[m++],h=s.Q,e.addData(h,g,y,t,n);break;case"t":g=t,y=n,A=e.len(),M=e.data,o===s.Q&&(g+=t-M[A-4],y+=n-M[A-3]),t+=d[m++],n+=d[m++],h=s.Q,e.addData(h,g,y,t,n);break;case"A":b=d[m++],_=d[m++],x=d[m++],w=d[m++],S=d[m++],T=t,C=n,t=d[m++],n=d[m++],h=s.A,vL(T,C,t,n,w,S,b,_,x,h,e);break;case"a":b=d[m++],_=d[m++],x=d[m++],w=d[m++],S=d[m++],T=t,C=n,t+=d[m++],n+=d[m++],h=s.A,vL(T,C,t,n,w,S,b,_,x,h,e);break}}(f==="z"||f==="Z")&&(h=s.Z,e.addData(h),t=i,n=a),o=h}return e.toStatic(),e}var Rz=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.applyTransform=function(t){},e}(Xe);function Oz(r){return r.setData!=null}function jz(r,e){var t=yue(r),n=W({},e);return n.buildPath=function(i){if(Oz(i)){i.setData(t.data);var a=i.getContext();a&&i.rebuildPath(a,1)}else{var a=i;t.rebuildPath(a,1)}},n.applyTransform=function(i){Pz(t,i),this.dirtyShape()},n}function Nz(r,e){return new Rz(jz(r,e))}function bue(r,e){var t=jz(r,e),n=function(i){z(a,i);function a(o){var s=i.call(this,o)||this;return s.applyTransform=t.applyTransform,s.buildPath=t.buildPath,s}return a}(Rz);return n}function _ue(r,e){for(var t=[],n=r.length,i=0;i<n;i++){var a=r[i];t.push(a.getUpdatedPathProxy(!0))}var o=new Xe(e);return o.createPathProxy(),o.buildPath=function(s){if(Oz(s)){s.appendPath(t);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function kC(r,e){e=e||{};var t=new Xe;return r.shape&&t.setShape(r.shape),t.setStyle(r.style),e.bakeTransform?Pz(t.path,r.getComputedTransform()):e.toLocal?t.setLocalTransform(r.getComputedTransform()):t.copyTransform(r),t.buildPath=r.buildPath,t.applyTransform=t.applyTransform,t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel,t}var xue=function(){function r(){this.cx=0,this.cy=0,this.r=0}return r}(),Eo=function(r){z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new xue},e.prototype.buildPath=function(t,n){t.moveTo(n.cx+n.r,n.cy),t.arc(n.cx,n.cy,n.r,0,Math.PI*2)},e}(Xe);Eo.prototype.type="circle";var wue=function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r}(),W0=function(r){z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new wue},e.prototype.buildPath=function(t,n){var i=.5522848,a=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*i,c=l*i;t.moveTo(a-s,o),t.bezierCurveTo(a-s,o-c,a-u,o-l,a,o-l),t.bezierCurveTo(a+u,o-l,a+s,o-c,a+s,o),t.bezierCurveTo(a+s,o+c,a+u,o+l,a,o+l),t.bezierCurveTo(a-u,o+l,a-s,o+c,a-s,o),t.closePath()},e}(Xe);W0.prototype.type="ellipse";var Bz=Math.PI,Xb=Bz*2,il=Math.sin,Qu=Math.cos,Sue=Math.acos,Wr=Math.atan2,mL=Math.abs,cd=Math.sqrt,kh=Math.max,Ki=Math.min,wi=1e-4;function Tue(r,e,t,n,i,a,o,s){var l=t-r,u=n-e,c=o-i,f=s-a,h=f*l-c*u;if(!(h*h<wi))return h=(c*(e-a)-f*(r-i))/h,[r+h*l,e+h*u]}function Ev(r,e,t,n,i,a,o){var s=r-t,l=e-n,u=(o?a:-a)/cd(s*s+l*l),c=u*l,f=-u*s,h=r+c,d=e+f,p=t+c,v=n+f,m=(h+p)/2,g=(d+v)/2,y=p-h,b=v-d,_=y*y+b*b,x=i-a,w=h*v-p*d,S=(b<0?-1:1)*cd(kh(0,x*x*_-w*w)),T=(w*b-y*S)/_,C=(-w*y-b*S)/_,A=(w*b+y*S)/_,M=(-w*y+b*S)/_,D=T-m,E=C-g,L=A-m,I=M-g;return D*D+E*E>L*L+I*I&&(T=A,C=M),{cx:T,cy:C,x0:-c,y0:-f,x1:T*(i/x-1),y1:C*(i/x-1)}}function Cue(r){var e;if(q(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function Aue(r,e){var t,n=kh(e.r,0),i=kh(e.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=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,f=e.cy,h=!!e.clockwise,d=mL(u-l),p=d>Xb&&d%Xb;if(p>wi&&(d=p),!(n>wi))r.moveTo(c,f);else if(d>Xb-wi)r.moveTo(c+n*Qu(l),f+n*il(l)),r.arc(c,f,n,l,u,!h),i>wi&&(r.moveTo(c+i*Qu(u),f+i*il(u)),r.arc(c,f,i,u,l,h));else{var v=void 0,m=void 0,g=void 0,y=void 0,b=void 0,_=void 0,x=void 0,w=void 0,S=void 0,T=void 0,C=void 0,A=void 0,M=void 0,D=void 0,E=void 0,L=void 0,I=n*Qu(l),R=n*il(l),P=i*Qu(u),O=i*il(u),j=d>wi;if(j){var F=e.cornerRadius;F&&(t=Cue(F),v=t[0],m=t[1],g=t[2],y=t[3]);var N=mL(n-i)/2;if(b=Ki(N,g),_=Ki(N,y),x=Ki(N,v),w=Ki(N,m),C=S=kh(b,_),A=T=kh(x,w),(S>wi||T>wi)&&(M=n*Qu(u),D=n*il(u),E=i*Qu(l),L=i*il(l),d<Bz)){var B=Tue(I,R,E,L,M,D,P,O);if(B){var $=I-B[0],J=R-B[1],U=M-B[0],we=D-B[1],Ye=1/il(Sue(($*U+J*we)/(cd($*$+J*J)*cd(U*U+we*we)))/2),ge=cd(B[0]*B[0]+B[1]*B[1]);C=Ki(S,(n-ge)/(Ye+1)),A=Ki(T,(i-ge)/(Ye-1))}}}if(!j)r.moveTo(c+I,f+R);else if(C>wi){var le=Ki(g,C),be=Ki(y,C),re=Ev(E,L,I,R,n,le,h),G=Ev(M,D,P,O,n,be,h);r.moveTo(c+re.cx+re.x0,f+re.cy+re.y0),C<S&&le===be?r.arc(c+re.cx,f+re.cy,C,Wr(re.y0,re.x0),Wr(G.y0,G.x0),!h):(le>0&&r.arc(c+re.cx,f+re.cy,le,Wr(re.y0,re.x0),Wr(re.y1,re.x1),!h),r.arc(c,f,n,Wr(re.cy+re.y1,re.cx+re.x1),Wr(G.cy+G.y1,G.cx+G.x1),!h),be>0&&r.arc(c+G.cx,f+G.cy,be,Wr(G.y1,G.x1),Wr(G.y0,G.x0),!h))}else r.moveTo(c+I,f+R),r.arc(c,f,n,l,u,!h);if(!(i>wi)||!j)r.lineTo(c+P,f+O);else if(A>wi){var le=Ki(v,A),be=Ki(m,A),re=Ev(P,O,M,D,i,-be,h),G=Ev(I,R,E,L,i,-le,h);r.lineTo(c+re.cx+re.x0,f+re.cy+re.y0),A<T&&le===be?r.arc(c+re.cx,f+re.cy,A,Wr(re.y0,re.x0),Wr(G.y0,G.x0),!h):(be>0&&r.arc(c+re.cx,f+re.cy,be,Wr(re.y0,re.x0),Wr(re.y1,re.x1),!h),r.arc(c,f,i,Wr(re.cy+re.y1,re.cx+re.x1),Wr(G.cy+G.y1,G.cx+G.x1),h),le>0&&r.arc(c+G.cx,f+G.cy,le,Wr(G.y1,G.x1),Wr(G.y0,G.x0),!h))}else r.lineTo(c+P,f+O),r.arc(c,f,i,u,l,h)}r.closePath()}}}var Mue=function(){function r(){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 r}(),gn=function(r){z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Mue},e.prototype.buildPath=function(t,n){Aue(t,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Xe);gn.prototype.type="sector";var kue=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),Tp=function(r){z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new kue},e.prototype.buildPath=function(t,n){var i=n.cx,a=n.cy,o=Math.PI*2;t.moveTo(i+n.r,a),t.arc(i,a,n.r,0,o,!1),t.moveTo(i+n.r0,a),t.arc(i,a,n.r0,0,o,!0)},e}(Xe);Tp.prototype.type="ring";function Due(r,e,t,n){var i=[],a=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var h=0,d=r.length;h<d;h++)ls(c,c,r[h]),us(f,f,r[h]);ls(c,c,n[0]),us(f,f,n[1])}for(var h=0,d=r.length;h<d;h++){var p=r[h];if(t)l=r[h?h-1:d-1],u=r[(h+1)%d];else if(h===0||h===d-1){i.push(co(r[h]));continue}else l=r[h-1],u=r[h+1];Ll(a,u,l),jm(a,a,e);var v=Yw(p,l),m=Yw(p,u),g=v+m;g!==0&&(v/=g,m/=g),jm(o,a,-v),jm(s,a,m);var y=uE([],p,o),b=uE([],p,s);n&&(us(y,y,c),ls(y,y,f),us(b,b,c),ls(b,b,f)),i.push(y),i.push(b)}return t&&i.push(i.shift()),i}function zz(r,e,t){var n=e.smooth,i=e.points;if(i&&i.length>=2){if(n){var a=Due(i,n,t,e.smoothConstraint);r.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(t?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;s<f;s++)r.lineTo(i[s][0],i[s][1])}t&&r.closePath()}}var Eue=function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r}(),yn=function(r){z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Eue},e.prototype.buildPath=function(t,n){zz(t,n,!0)},e}(Xe);yn.prototype.type="polygon";var Lue=function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r}(),bn=function(r){z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Lue},e.prototype.buildPath=function(t,n){zz(t,n,!1)},e}(Xe);bn.prototype.type="polyline";var Iue={},Pue=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}(),xr=function(r){z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Pue},e.prototype.buildPath=function(t,n){var i,a,o,s;if(this.subPixelOptimize){var l=_z(Iue,n,this.style);i=l.x1,a=l.y1,o=l.x2,s=l.y2}else i=n.x1,a=n.y1,o=n.x2,s=n.y2;var u=n.percent;u!==0&&(t.moveTo(i,a),u<1&&(o=i*(1-u)+o*u,s=a*(1-u)+s*u),t.lineTo(o,s))},e.prototype.pointAt=function(t){var n=this.shape;return[n.x1*(1-t)+n.x2*t,n.y1*(1-t)+n.y2*t]},e}(Xe);xr.prototype.type="line";var xn=[],Rue=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r}();function gL(r,e,t){var n=r.cpx2,i=r.cpy2;return n!=null||i!=null?[(t?xE:_r)(r.x1,r.cpx1,r.cpx2,r.x2,e),(t?xE:_r)(r.y1,r.cpy1,r.cpy2,r.y2,e)]:[(t?Jw:Ar)(r.x1,r.cpx1,r.x2,e),(t?Jw:Ar)(r.y1,r.cpy1,r.y2,e)]}var Cp=function(r){z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Rue},e.prototype.buildPath=function(t,n){var i=n.x1,a=n.y1,o=n.x2,s=n.y2,l=n.cpx1,u=n.cpy1,c=n.cpx2,f=n.cpy2,h=n.percent;h!==0&&(t.moveTo(i,a),c==null||f==null?(h<1&&(Nd(i,l,o,h,xn),l=xn[1],o=xn[2],Nd(a,u,s,h,xn),u=xn[1],s=xn[2]),t.quadraticCurveTo(l,u,o,s)):(h<1&&(Ds(i,l,c,o,h,xn),l=xn[1],c=xn[2],o=xn[3],Ds(a,u,f,s,h,xn),u=xn[1],f=xn[2],s=xn[3]),t.bezierCurveTo(l,u,c,f,o,s)))},e.prototype.pointAt=function(t){return gL(this.shape,t,!1)},e.prototype.tangentAt=function(t){var n=gL(this.shape,t,!0);return mf(n,n)},e}(Xe);Cp.prototype.type="bezier-curve";var Oue=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),U0=function(r){z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Oue},e.prototype.buildPath=function(t,n){var i=n.cx,a=n.cy,o=Math.max(n.r,0),s=n.startAngle,l=n.endAngle,u=n.clockwise,c=Math.cos(s),f=Math.sin(s);t.moveTo(c*o+i,f*o+a),t.arc(i,a,o,s,l,!u)},e}(Xe);U0.prototype.type="arc";var DC=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="compound",t}return e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,n=this.shapeChanged(),i=0;i<t.length;i++)n=n||t[i].shapeChanged();n&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(n[0],n[1],t[i].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,n){for(var i=n.paths||[],a=0;a<i.length;a++)i[a].buildPath(t,i[a].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],n=0;n<t.length;n++)t[n].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Xe.prototype.getBoundingRect.call(this)},e}(Xe),Fz=function(){function r(e){this.colorStops=e||[]}return r.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},r}(),Ap=function(r){z(e,r);function e(t,n,i,a,o,s){var l=r.call(this,o)||this;return l.x=t??0,l.y=n??0,l.x2=i??1,l.y2=a??0,l.type="linear",l.global=s||!1,l}return e}(Fz),Vz=function(r){z(e,r);function e(t,n,i,a,o){var s=r.call(this,a)||this;return s.x=t??.5,s.y=n??.5,s.r=i??.5,s.type="radial",s.global=o||!1,s}return e}(Fz),al=[0,0],ol=[0,0],Lv=new ze,Iv=new ze,yy=function(){function r(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new ze;for(var n=0;n<2;n++)this._axes[n]=new ze;e&&this.fromBoundingRect(e,t)}return r.prototype.fromBoundingRect=function(e,t){var n=this._corners,i=this._axes,a=e.x,o=e.y,s=a+e.width,l=o+e.height;if(n[0].set(a,o),n[1].set(s,o),n[2].set(s,l),n[3].set(a,l),t)for(var u=0;u<4;u++)n[u].transform(t);ze.sub(i[0],n[1],n[0]),ze.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var u=0;u<2;u++)this._origin[u]=i[u].dot(n[0])},r.prototype.intersect=function(e,t){var n=!0,i=!t;return Lv.set(1/0,1/0),Iv.set(0,0),!this._intersectCheckOneSide(this,e,Lv,Iv,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(e,this,Lv,Iv,i,-1)&&(n=!1,i)||i||ze.copy(t,n?Lv:Iv),n},r.prototype._intersectCheckOneSide=function(e,t,n,i,a,o){for(var s=!0,l=0;l<2;l++){var u=this._axes[l];if(this._getProjMinMaxOnAxis(l,e._corners,al),this._getProjMinMaxOnAxis(l,t._corners,ol),al[1]<ol[0]||al[0]>ol[1]){if(s=!1,a)return s;var c=Math.abs(ol[0]-al[1]),f=Math.abs(al[0]-ol[1]);Math.min(c,f)>i.len()&&(c<f?ze.scale(i,u,-c*o):ze.scale(i,u,f*o))}else if(n){var c=Math.abs(ol[0]-al[1]),f=Math.abs(al[0]-ol[1]);Math.min(c,f)<n.len()&&(c<f?ze.scale(n,u,c*o):ze.scale(n,u,-f*o))}}return s},r.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var i=this._axes[e],a=this._origin,o=t[0].dot(i)+a[e],s=o,l=o,u=1;u<t.length;u++){var c=t[u].dot(i)+a[e];s=Math.min(c,s),l=Math.max(c,l)}n[0]=s,n[1]=l},r}(),jue=[],Nue=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return e.prototype.traverse=function(t,n){t.call(n,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,n){n?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,n){n=n||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],n)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var n=this._cursor;n<this._displayables.length;n++)t&&t(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)t&&t(this._temporaryDisplayables[n])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var n=this._displayables[t];n.parent=this,n.update(),n.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var n=this._temporaryDisplayables[t];n.parent=this,n.update(),n.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Ve(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(jue)),t.union(a)}this._rect=t}return this._rect},e.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,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(t,n))return!0}return!1},e}(mi),$z=it();function _f(r,e,t,n,i){var a;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();a=o&&o.animation}var s=e&&e.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,c=void 0,f=void 0;n?(u=Re(n.duration,200),c=Re(n.easing,"cubicOut"),f=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),f=e.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(c=a.easing),a.delay!=null&&(f=a.delay)),Te(f)&&(f=f(t,i)),Te(u)&&(u=u(t));var h={duration:u||0,delay:f,easing:c};return h}else return null}function EC(r,e,t,n,i,a,o){var s=!1,l;Te(i)?(o=a,a=i,i=null):Me(i)&&(a=i.cb,o=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var u=r==="leave";u||e.stopAnimation("leave");var c=_f(r,n,i,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,i):null);if(c&&c.duration>0){var f=c.duration,h=c.delay,d=c.easing,p={duration:f,delay:h||0,easing:d,done:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,p):e.animateTo(t,p)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),a&&a()}function ut(r,e,t,n,i,a){EC("update",r,e,t,n,i,a)}function Ot(r,e,t,n,i,a){EC("enter",r,e,t,n,i,a)}function Nc(r){if(!r.__zr)return!0;for(var e=0;e<r.animators.length;e++){var t=r.animators[e];if(t.scope==="leave")return!0}return!1}function Es(r,e,t,n,i,a){Nc(r)||EC("leave",r,e,t,n,i,a)}function yL(r,e,t,n){r.removeTextContent(),r.removeTextGuideLine(),Es(r,{style:{opacity:0}},e,t,n)}function Gd(r,e,t){function n(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(i){i.isGroup||yL(i,e,t,n)}):yL(r,e,t,n)}function Bi(r){$z(r).oldStyle=r.style}function Bue(r){return $z(r).oldStyle}var by=Math.max,_y=Math.min,S2={};function zue(r){return Xe.extend(r)}var Fue=bue;function Vue(r,e){return Fue(r,e)}function Hi(r,e){S2[r]=e}function LC(r){if(S2.hasOwnProperty(r))return S2[r]}function Y0(r,e,t,n){var i=Nz(r,e);return t&&(n==="center"&&(t=Gz(t,i.getBoundingRect())),Wz(i,t)),i}function Hz(r,e,t){var n=new Lr({style:{image:r,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(i){if(t==="center"){var a={width:i.width,height:i.height};n.setStyle(Gz(e,a))}}});return n}function Gz(r,e){var t=e.width/e.height,n=r.height*t,i;n<=r.width?i=r.height:(n=r.width,i=n/t);var a=r.x+r.width/2,o=r.y+r.height/2;return{x:a-n/2,y:o-i/2,width:n,height:i}}var si=_ue;function Wz(r,e){if(r.applyTransform){var t=r.getBoundingRect(),n=t.calculateTransform(e);r.applyTransform(n)}}function ef(r,e){return _z(r,r,{lineWidth:e}),r}function $ue(r){return xz(r.shape,r.shape,r.style),r}var Wm=Il;function nu(r,e){for(var t=O0([]);r&&r!==e;)fo(t,r.getLocalTransform(),t),r=r.parent;return t}function Ri(r,e,t){return e&&!Zr(e)&&(e=ao.getLocalTransform(e)),t&&(e=gf([],e)),Br([],r,e)}function q0(r,e,t){var n=e[4]===0||e[5]===0||e[0]===0?1:Math.abs(2*e[4]/e[0]),i=e[4]===0||e[5]===0||e[2]===0?1:Math.abs(2*e[4]/e[2]),a=[r==="left"?-n:r==="right"?n:0,r==="top"?-i:r==="bottom"?i:0];return a=Ri(a,e,t),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function bL(r){return!r.isGroup}function Hue(r){return r.shape!=null}function Mp(r,e,t){if(!r||!e)return;function n(o){var s={};return o.traverse(function(l){bL(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return Hue(o)&&(s.shape=W({},o.shape)),s}var a=n(r);e.traverse(function(o){if(bL(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),ut(o,l,t,Le(o).dataIndex)}}})}function Uz(r,e){return K(r,function(t){var n=t[0];n=by(n,e.x),n=_y(n,e.x+e.width);var i=t[1];return i=by(i,e.y),i=_y(i,e.y+e.height),[n,i]})}function Gue(r,e){var t=by(r.x,e.x),n=_y(r.x+r.width,e.x+e.width),i=by(r.y,e.y),a=_y(r.y+r.height,e.y+e.height);if(n>=t&&a>=i)return{x:t,y:i,width:n-t,height:a-i}}function kp(r,e,t){var n=W({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(i.image=r.slice(8),Ce(i,t),new Lr(n)):Y0(r.replace("path://",""),n,t,"center")}function Dh(r,e,t,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(Yz(r,e,t,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function Yz(r,e,t,n,i,a,o,s){var l=t-r,u=n-e,c=o-i,f=s-a,h=Kb(c,f,l,u);if(Wue(h))return!1;var d=r-i,p=e-a,v=Kb(d,p,l,u)/h;if(v<0||v>1)return!1;var m=Kb(d,p,c,f)/h;return!(m<0||m>1)}function Kb(r,e,t,n){return r*n-t*e}function Wue(r){return r<=1e-6&&r>=-1e-6}function Lu(r){var e=r.itemTooltipOption,t=r.componentModel,n=r.itemName,i=se(e)?{formatter:e}:e,a=t.mainType,o=t.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&k(et(l),function(c){fe(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=Le(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:Ce({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function _L(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function Vs(r,e){if(r)if(q(r))for(var t=0;t<r.length;t++)_L(r[t],e);else _L(r,e)}Hi("circle",Eo);Hi("ellipse",W0);Hi("sector",gn);Hi("ring",Tp);Hi("polygon",yn);Hi("polyline",bn);Hi("rect",nt);Hi("line",xr);Hi("bezierCurve",Cp);Hi("arc",U0);const Iu=Object.freeze(Object.defineProperty({__proto__:null,Arc:U0,BezierCurve:Cp,BoundingRect:Ve,Circle:Eo,CompoundPath:DC,Ellipse:W0,Group:Ee,Image:Lr,IncrementalDisplayable:Nue,Line:xr,LinearGradient:Ap,OrientedBoundingRect:yy,Path:Xe,Point:ze,Polygon:yn,Polyline:bn,RadialGradient:Vz,Rect:nt,Ring:Tp,Sector:gn,Text:ot,applyTransform:Ri,clipPointsByRect:Uz,clipRectByRect:Gue,createIcon:kp,extendPath:Vue,extendShape:zue,getShapeClass:LC,getTransform:nu,groupTransition:Mp,initProps:Ot,isElementRemoved:Nc,lineLineIntersect:Yz,linePolygonIntersect:Dh,makeImage:Hz,makePath:Y0,mergePath:si,registerShape:Hi,removeElement:Es,removeElementWithFadeOut:Gd,resizePath:Wz,setTooltipConfig:Lu,subPixelOptimize:Wm,subPixelOptimizeLine:ef,subPixelOptimizeRect:$ue,transformDirection:q0,traverseElements:Vs,updateProps:ut},Symbol.toStringTag,{value:"Module"}));var X0={};function qz(r,e){for(var t=0;t<mn.length;t++){var n=mn[t],i=e[n],a=r.ensureState(n);a.style=a.style||{},a.style.text=i}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:e.normal}),r.useStates(o,!0)}function T2(r,e,t){var n=r.labelFetcher,i=r.labelDataIndex,a=r.labelDimIndex,o=e.normal,s;n&&(s=n.getFormattedLabel(i,"normal",null,a,o&&o.get("formatter"),t!=null?{interpolatedValue:t}:null)),s==null&&(s=Te(r.defaultText)?r.defaultText(i,r,t):r.defaultText);for(var l={normal:s},u=0;u<mn.length;u++){var c=mn[u],f=e[c];l[c]=Re(n?n.getFormattedLabel(i,c,null,a,f&&f.get("formatter")):null,s)}return l}function Vr(r,e,t,n){t=t||X0;for(var i=r instanceof ot,a=!1,o=0;o<$d.length;o++){var s=e[$d[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=i?r:r.getTextContent();if(a){i||(l||(l=new ot,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=T2(t,e),c=e.normal,f=!!c.getShallow("show"),h=Et(c,n&&n.normal,t,!1,!i);h.text=u.normal,i||r.setTextConfig(xy(c,t,!1));for(var o=0;o<mn.length;o++){var d=mn[o],s=e[d];if(s){var p=l.ensureState(d),v=!!Re(s.getShallow("show"),f);if(v!==f&&(p.ignore=!v),p.style=Et(s,n&&n[d],t,!0,!i),p.style.text=u[d],!i){var m=r.ensureState(d);m.textConfig=xy(s,t,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(h.x=l.style.x),l.style.y!=null&&(h.y=l.style.y),l.ignore=!f,l.useStyle(h),l.dirty(),t.enableTextSetter&&(xf(l).setLabelText=function(g){var y=T2(t,e,g);qz(l,y)})}else l&&(l.ignore=!0);r.dirty()}function Tr(r,e){e=e||"label";for(var t={normal:r.getModel(e)},n=0;n<mn.length;n++){var i=mn[n];t[i]=r.getModel([i,e])}return t}function Et(r,e,t,n,i){var a={};return Uue(a,r,t,n,i),e&&W(a,e),a}function xy(r,e,t){e=e||{};var n={},i,a=r.getShallow("rotate"),o=Re(r.getShallow("distance"),t?null:5),s=r.getShallow("offset");return i=r.getShallow("position")||(t?null:"inside"),i==="outside"&&(i=e.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=r.get("color")==="inherit"?e.inheritColor||null:"auto",n}function Uue(r,e,t,n,i){t=t||X0;var a=e.ecModel,o=a&&a.option.textStyle,s=Yue(e),l;if(s){l={};for(var u in s)if(s.hasOwnProperty(u)){var c=e.getModel(["rich",u]);TL(l[u]={},c,o,t,n,i,!1,!0)}}l&&(r.rich=l);var f=e.get("overflow");f&&(r.overflow=f);var h=e.get("minMargin");h!=null&&(r.margin=h),TL(r,e,o,t,n,i,!0,!1)}function Yue(r){for(var e;r&&r!==r.ecModel;){var t=(r.option||X0).rich;if(t){e=e||{};for(var n=et(t),i=0;i<n.length;i++){var a=n[i];e[a]=1}}r=r.parentModel}return e}var xL=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],wL=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],SL=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function TL(r,e,t,n,i,a,o,s){t=!i&&t||X0;var l=n&&n.inheritColor,u=e.getShallow("color"),c=e.getShallow("textBorderColor"),f=Re(e.getShallow("opacity"),t.opacity);(u==="inherit"||u==="auto")&&(l?u=l:u=null),(c==="inherit"||c==="auto")&&(l?c=l:c=null),a||(u=u||t.color,c=c||t.textBorderColor),u!=null&&(r.fill=u),c!=null&&(r.stroke=c);var h=Re(e.getShallow("textBorderWidth"),t.textBorderWidth);h!=null&&(r.lineWidth=h);var d=Re(e.getShallow("textBorderType"),t.textBorderType);d!=null&&(r.lineDash=d);var p=Re(e.getShallow("textBorderDashOffset"),t.textBorderDashOffset);p!=null&&(r.lineDashOffset=p),!i&&f==null&&!s&&(f=n&&n.defaultOpacity),f!=null&&(r.opacity=f),!i&&!a&&r.fill==null&&n.inheritColor&&(r.fill=n.inheritColor);for(var v=0;v<xL.length;v++){var m=xL[v],g=Re(e.getShallow(m),t[m]);g!=null&&(r[m]=g)}for(var v=0;v<wL.length;v++){var m=wL[v],g=e.getShallow(m);g!=null&&(r[m]=g)}if(r.verticalAlign==null){var y=e.getShallow("baseline");y!=null&&(r.verticalAlign=y)}if(!o||!n.disableBox){for(var v=0;v<SL.length;v++){var m=SL[v],g=e.getShallow(m);g!=null&&(r[m]=g)}var b=e.getShallow("borderType");b!=null&&(r.borderDash=b),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&l&&(r.backgroundColor=l),(r.borderColor==="auto"||r.borderColor==="inherit")&&l&&(r.borderColor=l)}}function IC(r,e){var t=e&&e.getModel("textStyle");return Li([r.fontStyle||t&&t.getShallow("fontStyle")||"",r.fontWeight||t&&t.getShallow("fontWeight")||"",(r.fontSize||t&&t.getShallow("fontSize")||12)+"px",r.fontFamily||t&&t.getShallow("fontFamily")||"sans-serif"].join(" "))}var xf=it();function Xz(r,e,t,n){if(r){var i=xf(r);i.prevValue=i.value,i.value=t;var a=e.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=n,i.statesModels=e)}}function Kz(r,e,t,n,i){var a=xf(r);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=Re(a.interpolatedValue,a.prevValue),l=a.value;function u(c){var f=hz(t,a.precision,s,l,c);a.interpolatedValue=c===1?null:f;var h=T2({labelDataIndex:e,labelFetcher:i,defaultText:o?o(f):f+""},a.statesModels,f);qz(r,h)}r.percent=0,(a.prevValue==null?Ot:ut)(r,{percent:1},n,e,null,u)}var que=["textStyle","color"],Zb=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Jb=new ot,Xue=function(){function r(){}return r.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(que):null)},r.prototype.getFont=function(){return IC({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<Zb.length;n++)t[Zb[n]]=this.getShallow(Zb[n]);return Jb.useStyle(t),Jb.update(),Jb.getBoundingRect()},r}(),Zz=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],Kue=mu(Zz),Zue=function(){function r(){}return r.prototype.getLineStyle=function(e){return Kue(this,e)},r}(),Jz=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],Jue=mu(Jz),Que=function(){function r(){}return r.prototype.getItemStyle=function(e,t){return Jue(this,e,t)},r}(),_t=function(){function r(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return r.prototype.init=function(e,t,n){},r.prototype.mergeOption=function(e,t){Be(this.option,e,!0)},r.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},r.prototype.getShallow=function(e,t){var n=this.option,i=n==null?n:n[e];if(i==null&&!t){var a=this.parentModel;a&&(i=a.getShallow(e))}return i},r.prototype.getModel=function(e,t){var n=e!=null,i=n?this.parsePath(e):null,a=n?this._doGet(i):this.option;return t=t||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new r(a,t,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var e=this.constructor;return new e(ke(this.option))},r.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},r.prototype.resolveParentPath=function(e){return e},r.prototype.isAnimationEnabled=function(){if(!Ze.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var i=0;i<e.length&&!(e[i]&&(n=n&&typeof n=="object"?n[e[i]]:null,n==null));i++);return n==null&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},r}();_C(_t);lle(_t);cr(_t,Zue);cr(_t,Que);cr(_t,dle);cr(_t,Xue);var ece=Math.round(Math.random()*10);function wf(r){return[r||"",ece++].join("_")}function tce(r){var e={};r.registerSubTypeDefaulter=function(t,n){var i=va(t);e[i.main]=n},r.determineSubType=function(t,n){var i=n.type;if(!i){var a=va(t).main;r.hasSubTypes(t)&&e[a]&&(i=e[a](n))}return i}}function rce(r,e){r.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=t(o),c=u.graph,f=u.noEntryList,h={};for(k(a,function(y){h[y]=!0});f.length;){var d=f.pop(),p=c[d],v=!!h[d];v&&(s.call(l,d,p.originalDeps.slice()),delete h[d]),k(p.successor,v?g:m)}k(h,function(){var y="";throw new Error(y)});function m(y){c[y].entryCount--,c[y].entryCount===0&&f.push(y)}function g(y){h[y]=!0,m(y)}};function t(a){var o={},s=[];return k(a,function(l){var u=n(o,l),c=u.originalDeps=e(l),f=i(c,a);u.entryCount=f.length,u.entryCount===0&&s.push(l),k(f,function(h){He(u.predecessor,h)<0&&u.predecessor.push(h);var d=n(o,h);He(d.successor,h)<0&&d.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 k(a,function(l){He(o,l)>=0&&s.push(l)}),s}}function $s(r,e){return Be(Be({},r,!0),e,!0)}const nce={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:". "}}}},ice={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 wy="ZH",PC="EN",Bc=PC,Um={},RC={},Qz=Ze.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Bc).toUpperCase();return r.indexOf(wy)>-1?wy:Bc}():Bc;function e6(r,e){r=r.toUpperCase(),RC[r]=new _t(e),Um[r]=e}function ace(r){if(se(r)){var e=Um[r.toUpperCase()]||{};return r===wy||r===PC?ke(e):Be(ke(e),ke(Um[Bc]),!1)}else return Be(ke(r),ke(Um[Bc]),!1)}function C2(r){return RC[r]}function oce(){return RC[Bc]}e6(PC,nce);e6(wy,ice);var OC=1e3,jC=OC*60,fd=jC*60,li=fd*24,CL=li*365,Eh={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}"},Pv="{yyyy}-{MM}-{dd}",AL={year:"{yyyy}",month:"{yyyy}-{MM}",day:Pv,hour:Pv+" "+Eh.hour,minute:Pv+" "+Eh.minute,second:Pv+" "+Eh.second,millisecond:Eh.none},Qb=["year","month","day","hour","minute","second","millisecond"],t6=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function zo(r,e){return r+="","0000".substr(0,e-r.length)+r}function zc(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function sce(r){return r===zc(r)}function lce(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function K0(r,e,t,n){var i=Pa(r),a=i[NC(t)](),o=i[Fc(t)]()+1,s=Math.floor((o-1)/3)+1,l=i[Z0(t)](),u=i["get"+(t?"UTC":"")+"Day"](),c=i[Wd(t)](),f=(c-1)%12+1,h=i[J0(t)](),d=i[Q0(t)](),p=i[e1(t)](),v=c>=12?"pm":"am",m=v.toUpperCase(),g=n instanceof _t?n:C2(n||Qz)||oce(),y=g.getModel("time"),b=y.get("month"),_=y.get("monthAbbr"),x=y.get("dayOfWeek"),w=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,v+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,zo(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,b[o-1]).replace(/{MMM}/g,_[o-1]).replace(/{MM}/g,zo(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,zo(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,w[u]).replace(/{e}/g,u+"").replace(/{HH}/g,zo(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,zo(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,zo(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,zo(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,zo(p,3)).replace(/{S}/g,p+"")}function uce(r,e,t,n,i){var a=null;if(se(t))a=t;else if(Te(t))a=t(r.value,e,{level:r.level});else{var o=W({},Eh);if(r.level>0)for(var s=0;s<Qb.length;++s)o[Qb[s]]="{primary|"+o[Qb[s]]+"}";var l=t?t.inherit===!1?t:Ce(t,o):o,u=r6(r.value,i);if(l[u])a=l[u];else if(l.inherit){for(var c=t6.indexOf(u),s=c-1;s>=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(q(a)){var f=r.level==null?0:r.level>=0?r.level:a.length+r.level;f=Math.min(f,a.length-1),a=a[f]}}return K0(new Date(r.value),a,i,n)}function r6(r,e){var t=Pa(r),n=t[Fc(e)]()+1,i=t[Z0(e)](),a=t[Wd(e)](),o=t[J0(e)](),s=t[Q0(e)](),l=t[e1(e)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&a===0,d=h&&i===1,p=d&&n===1;return p?"year":d?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function ML(r,e,t){var n=lt(r)?Pa(r):r;switch(e=e||r6(r,t),e){case"year":return n[NC(t)]();case"half-year":return n[Fc(t)]()>=6?1:0;case"quarter":return Math.floor((n[Fc(t)]()+1)/4);case"month":return n[Fc(t)]();case"day":return n[Z0(t)]();case"half-day":return n[Wd(t)]()/24;case"hour":return n[Wd(t)]();case"minute":return n[J0(t)]();case"second":return n[Q0(t)]();case"millisecond":return n[e1(t)]()}}function NC(r){return r?"getUTCFullYear":"getFullYear"}function Fc(r){return r?"getUTCMonth":"getMonth"}function Z0(r){return r?"getUTCDate":"getDate"}function Wd(r){return r?"getUTCHours":"getHours"}function J0(r){return r?"getUTCMinutes":"getMinutes"}function Q0(r){return r?"getUTCSeconds":"getSeconds"}function e1(r){return r?"getUTCMilliseconds":"getMilliseconds"}function cce(r){return r?"setUTCFullYear":"setFullYear"}function n6(r){return r?"setUTCMonth":"setMonth"}function i6(r){return r?"setUTCDate":"setDate"}function a6(r){return r?"setUTCHours":"setHours"}function o6(r){return r?"setUTCMinutes":"setMinutes"}function s6(r){return r?"setUTCSeconds":"setSeconds"}function l6(r){return r?"setUTCMilliseconds":"setMilliseconds"}function u6(r){if(!az(r))return se(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function c6(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,n){return n.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Sf=cC;function A2(r,e,t){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&Li(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?Pa(r):r;if(isNaN(+l)){if(s)return"-"}else return K0(l,n,t)}if(e==="ordinal")return Gw(r)?i(r):lt(r)&&a(r)?r+"":"-";var u=xo(r);return a(u)?u6(u):Gw(r)?i(r):typeof r=="boolean"?r+"":"-"}var kL=["a","b","c","d","e","f","g"],e_=function(r,e){return"{"+r+(e??"")+"}"};function f6(r,e,t){q(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a<i.length;a++){var o=kL[a];r=r.replace(e_(o),e_(o,0))}for(var s=0;s<n;s++)for(var l=0;l<i.length;l++){var u=e[s][i[l]];r=r.replace(e_(kL[l],s),t?un(u):u)}return r}function fce(r,e,t){return k(e,function(n,i){r=r.replace("{"+i+"}",n)}),r}function hce(r,e){var t=se(r)?{color:r,extraCssText:e}:r||{},n=t.color,i=t.type;e=t.extraCssText;var a=t.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:'+un(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+un(n)+";"+(e||"")+'"></span>';var o=t.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 yu(r,e){return e=e||"transparent",se(r)?r:Me(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function Sy(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Ym=k,h6=["left","right","top","bottom","width","height"],Rl=[["width","left","right"],["height","top","bottom"]];function BC(r,e,t,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),f=e.childAt(u+1),h=f&&f.getBoundingRect(),d,p;if(r==="horizontal"){var v=c.width+(h?-h.x+c.x:0);d=a+v,d>n||l.newline?(a=0,d=v,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(h?-h.y+c.y:0);p=o+m,p>i||l.newline?(a+=s+t,o=0,p=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=d+t:o=p+t)})}var iu=BC;Oe(BC,"vertical");Oe(BC,"horizontal");function dce(r,e,t){var n=e.width,i=e.height,a=ie(r.left,n),o=ie(r.top,i),s=ie(r.right,n),l=ie(r.bottom,i);return(isNaN(a)||isNaN(parseFloat(r.left)))&&(a=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=n),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=i),t=Sf(t||0),{width:Math.max(s-a-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function gr(r,e,t){t=Sf(t||0);var n=e.width,i=e.height,a=ie(r.left,n),o=ie(r.top,i),s=ie(r.right,n),l=ie(r.bottom,i),u=ie(r.width,n),c=ie(r.height,i),f=t[2]+t[0],h=t[1]+t[3],d=r.aspect;switch(isNaN(u)&&(u=n-s-h-a),isNaN(c)&&(c=i-l-f-o),d!=null&&(isNaN(u)&&isNaN(c)&&(d>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=d*c),isNaN(c)&&(c=u/d)),isNaN(a)&&(a=n-s-u-h),isNaN(o)&&(o=i-l-c-f),r.left||r.right){case"center":a=n/2-u/2-t[3];break;case"right":a=n-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=i/2-c/2-t[0];break;case"bottom":o=i-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=n-h-a-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var p=new Ve(a+t[3],o+t[0],u,c);return p.margin=t,p}function t1(r,e,t,n,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],l=i&&i.boundingMode||"all";if(a=a||r,a.x=r.x,a.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new Ve(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var c=r.getLocalTransform();u=u.clone(),u.applyTransform(c)}var f=gr(Ce({width:u.width,height:u.height},e),t,n),h=o?f.x-u.x:0,d=s?f.y-u.y:0;return l==="raw"?(a.x=h,a.y=d):(a.x+=h,a.y+=d),a===r&&r.markRedraw(),!0}function pce(r,e){return r[Rl[e][0]]!=null||r[Rl[e][1]]!=null&&r[Rl[e][2]]!=null}function Ud(r){var e=r.layoutMode||r.constructor.layoutMode;return Me(e)?e:e?{type:e}:null}function Ls(r,e,t){var n=t&&t.ignoreSize;!q(n)&&(n=[n,n]);var i=o(Rl[0],0),a=o(Rl[1],1);u(Rl[0],r,i),u(Rl[1],r,a);function o(c,f){var h={},d=0,p={},v=0,m=2;if(Ym(c,function(b){p[b]=r[b]}),Ym(c,function(b){s(e,b)&&(h[b]=p[b]=e[b]),l(h,b)&&d++,l(p,b)&&v++}),n[f])return l(e,c[1])?p[c[2]]=null:l(e,c[2])&&(p[c[1]]=null),p;if(v===m||!d)return p;if(d>=m)return h;for(var g=0;g<c.length;g++){var y=c[g];if(!s(h,y)&&s(r,y)){h[y]=r[y];break}}return h}function s(c,f){return c.hasOwnProperty(f)}function l(c,f){return c[f]!=null&&c[f]!=="auto"}function u(c,f,h){Ym(c,function(d){f[d]=h[d]})}}function Tf(r){return d6({},r)}function d6(r,e){return e&&r&&Ym(h6,function(t){e.hasOwnProperty(t)&&(r[t]=e[t])}),r}var vce=it(),Qe=function(r){z(e,r);function e(t,n,i){var a=r.call(this,t,n,i)||this;return a.uid=wf("ec_cpt_model"),a}return e.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i)},e.prototype.mergeDefaultAndTheme=function(t,n){var i=Ud(this),a=i?Tf(t):{},o=n.getTheme();Be(t,o.get(this.mainType)),Be(t,this.getDefaultOption()),i&&Ls(t,a,i)},e.prototype.mergeOption=function(t,n){Be(this.option,t,!0);var i=Ud(this);i&&Ls(this.option,t,i)},e.prototype.optionUpdated=function(t,n){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!ale(t))return t.defaultOption;var n=vce(this);if(!n.defaultOption){for(var i=[],a=t;a;){var o=a.prototype.defaultOption;o&&i.push(o),a=a.superClass}for(var s={},l=i.length-1;l>=0;l--)s=Be(s,i[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(t,n){var i=t+"Index",a=t+"Id";return wp(this.ecModel,t,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(_t);pz(Qe,_t);z0(Qe);tce(Qe);rce(Qe,mce);function mce(r){var e=[];return k(Qe.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=K(e,function(t){return va(t).main}),r!=="dataset"&&He(e,"dataset")<=0&&e.unshift("dataset"),e}var p6="";typeof navigator<"u"&&(p6=navigator.platform||"");var ec="rgba(0, 0, 0, 0.2)";const gce={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:ec,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ec,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ec,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ec,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ec,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ec,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:p6.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 v6=ve(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),yi="original",Jr="arrayRows",bi="objectRows",Ba="keyedColumns",bs="typedArray",m6="unknown",xa="column",Cf="row",Rr={Must:1,Might:2,Not:3},g6=it();function yce(r){g6(r).datasetMap=ve()}function y6(r,e,t){var n={},i=FC(e);if(!i||!r)return n;var a=[],o=[],s=e.ecModel,l=g6(s).datasetMap,u=i.uid+"_"+t.seriesLayoutBy,c,f;r=r.slice(),k(r,function(v,m){var g=Me(v)?v:r[m]={name:v};g.type==="ordinal"&&c==null&&(c=m,f=p(g)),n[g.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});k(r,function(v,m){var g=v.name,y=p(v);if(c==null){var b=h.valueWayDim;d(n[g],b,y),d(o,b,y),h.valueWayDim+=y}else if(c===m)d(n[g],0,y),d(a,0,y);else{var b=h.categoryWayDim;d(n[g],b,y),d(o,b,y),h.categoryWayDim+=y}});function d(v,m,g){for(var y=0;y<g;y++)v.push(m+y)}function p(v){var m=v.dimsDef;return m?m.length:1}return a.length&&(n.itemName=a),o.length&&(n.seriesName=o),n}function zC(r,e,t){var n={},i=FC(r);if(!i)return n;var a=e.sourceFormat,o=e.dimensionsDefine,s;(a===bi||a===Ba)&&k(o,function(c,f){(Me(c)?c.name:c)==="name"&&(s=f)});var l=function(){for(var c={},f={},h=[],d=0,p=Math.min(5,t);d<p;d++){var v=_6(e.data,a,e.seriesLayoutBy,o,e.startIndex,d);h.push(v);var m=v===Rr.Not;if(m&&c.v==null&&d!==s&&(c.v=d),(c.n==null||c.n===c.v||!m&&h[c.n]===Rr.Not)&&(c.n=d),g(c)&&h[c.n]!==Rr.Not)return c;m||(v===Rr.Might&&f.v==null&&d!==s&&(f.v=d),(f.n==null||f.n===f.v)&&(f.n=d))}function g(y){return y.v!=null&&y.n!=null}return g(c)?c:g(f)?f:null}();if(l){n.value=[l.v];var u=s??l.n;n.itemName=[u],n.seriesName=[u]}return n}function FC(r){var e=r.get("data",!0);if(!e)return wp(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},lr).models[0]}function bce(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:wp(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},lr).models}function b6(r,e){return _6(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,e)}function _6(r,e,t,n,i,a){var o,s=5;if(Dn(r))return Rr.Not;var l,u;if(n){var c=n[a];Me(c)?(l=c.name,u=c.type):se(c)&&(l=c)}if(u!=null)return u==="ordinal"?Rr.Must:Rr.Not;if(e===Jr){var f=r;if(t===Cf){for(var h=f[a],d=0;d<(h||[]).length&&d<s;d++)if((o=_(h[i+d]))!=null)return o}else for(var d=0;d<f.length&&d<s;d++){var p=f[i+d];if(p&&(o=_(p[a]))!=null)return o}}else if(e===bi){var v=r;if(!l)return Rr.Not;for(var d=0;d<v.length&&d<s;d++){var m=v[d];if(m&&(o=_(m[l]))!=null)return o}}else if(e===Ba){var g=r;if(!l)return Rr.Not;var h=g[l];if(!h||Dn(h))return Rr.Not;for(var d=0;d<h.length&&d<s;d++)if((o=_(h[d]))!=null)return o}else if(e===yi)for(var y=r,d=0;d<y.length&&d<s;d++){var m=y[d],b=yf(m);if(!q(b))return Rr.Not;if((o=_(b[a]))!=null)return o}function _(x){var w=se(x);if(x!=null&&Number.isFinite(Number(x))&&x!=="")return w?Rr.Might:Rr.Not;if(w&&x!=="-")return Rr.Must}return Rr.Not}var M2=ve();function _ce(r,e){vn(M2.get(r)==null&&e),M2.set(r,e)}function xce(r,e,t){var n=M2.get(e);if(!n)return t;var i=n(r);return i?t.concat(i):t}var DL=it(),wce=it(),VC=function(){function r(){}return r.prototype.getColorFromPalette=function(e,t,n){var i=wt(this.get("color",!0)),a=this.get("colorLayer",!0);return x6(this,DL,i,a,e,t,n)},r.prototype.clearColorPalette=function(){Tce(this,DL)},r}();function k2(r,e,t,n){var i=wt(r.get(["aria","decal","decals"]));return x6(r,wce,i,null,e,t,n)}function Sce(r,e){for(var t=r.length,n=0;n<t;n++)if(r[n].length>e)return r[n];return r[t-1]}function x6(r,e,t,n,i,a,o){a=a||r;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?t:Sce(n,o);if(c=c||t,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function Tce(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var Rv,Qf,EL,LL="\0_ec_inner",Cce=1,$C=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,n,i,a,o,s){a=a||{},this.option=null,this._theme=new _t(a),this._locale=new _t(o),this._optionManager=s},e.prototype.setOption=function(t,n,i){var a=RL(n);this._optionManager.setOption(t,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(t,n){return this._resetOption(t,RL(n))},e.prototype._resetOption=function(t,n){var i=!1,a=this._optionManager;if(!t||t==="recreate"){var o=a.mountOption(t==="recreate");!this.option||t==="recreate"?EL(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!t||t==="recreate"||t==="media"){var l=a.getMediaOption(this);l.length&&k(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=ve(),u=n&&n.replaceMergeMainTypeMap;yce(this),k(t,function(f,h){f!=null&&(Qe.hasClass(h)?h&&(s.push(h),l.set(h,!0)):i[h]=i[h]==null?ke(f):Be(i[h],f,!0))}),u&&u.each(function(f,h){Qe.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),Qe.topologicalTravel(s,Qe.getAllClassMainTypes(),c,this);function c(f){var h=xce(this,f,wt(t[f])),d=a.get(f),p=d?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",v=cz(d,h,p);Kse(v,f,Qe),i[f]=null,a.set(f,null),o.set(f,0);var m=[],g=[],y=0,b;k(v,function(_,x){var w=_.existing,S=_.newOption;if(!S)w&&(w.mergeOption({},this),w.optionUpdated({},!1));else{var T=f==="series",C=Qe.getClass(f,_.keyInfo.subType,!T);if(!C)return;if(f==="tooltip"){if(b)return;b=!0}if(w&&w.constructor===C)w.name=_.keyInfo.name,w.mergeOption(S,this),w.optionUpdated(S,!1);else{var A=W({componentIndex:x},_.keyInfo);w=new C(S,this,this,A),W(w,A),_.brandNew&&(w.__requireNewView=!0),w.init(S,this,this),w.optionUpdated(null,!0)}}w?(m.push(w.option),g.push(w),y++):(m.push(void 0),g.push(void 0))},this),i[f]=m,a.set(f,g),o.set(f,y),f==="series"&&Rv(this)}this._seriesIndices||Rv(this)},e.prototype.getOption=function(){var t=ke(this.option);return k(t,function(n,i){if(Qe.hasClass(i)){for(var a=wt(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Vd(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,t[i]=a}}),delete t[LL],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,n){var i=this._componentsMap.get(t);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]}}},e.prototype.queryComponents=function(t){var n=t.mainType;if(!n)return[];var i=t.index,a=t.id,o=t.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return i!=null?(l=[],k(wt(i),function(u){s[u]&&l.push(s[u])})):a!=null?l=IL("id",a,s):o!=null?l=IL("name",o,s):l=pt(s,function(u){return!!u}),PL(l,t)},e.prototype.findComponents=function(t){var n=t.query,i=t.mainType,a=s(n),o=a?this.queryComponents(a):pt(this._componentsMap.get(i),function(u){return!!u});return l(PL(o,t));function s(u){var c=i+"Index",f=i+"Id",h=i+"Name";return u&&(u[c]!=null||u[f]!=null||u[h]!=null)?{mainType:i,index:u[c],id:u[f],name:u[h]}:null}function l(u){return t.filter?pt(u,t.filter):u}},e.prototype.eachComponent=function(t,n,i){var a=this._componentsMap;if(Te(t)){var o=n,s=t;a.each(function(f,h){for(var d=0;f&&d<f.length;d++){var p=f[d];p&&s.call(o,h,p,p.componentIndex)}})}else for(var l=se(t)?a.get(t):Me(t)?this.findComponents(t):null,u=0;l&&u<l.length;u++){var c=l[u];c&&n.call(i,c,c.componentIndex)}},e.prototype.getSeriesByName=function(t){var n=vr(t,null);return pt(this._componentsMap.get("series"),function(i){return!!i&&n!=null&&i.name===n})},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return pt(this._componentsMap.get("series"),function(n){return!!n&&n.subType===t})},e.prototype.getSeries=function(){return pt(this._componentsMap.get("series"),function(t){return!!t})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,n){Qf(this),k(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];t.call(n,a,i)},this)},e.prototype.eachRawSeries=function(t,n){k(this._componentsMap.get("series"),function(i){i&&t.call(n,i,i.componentIndex)})},e.prototype.eachSeriesByType=function(t,n,i){Qf(this),k(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===t&&n.call(i,o,a)},this)},e.prototype.eachRawSeriesByType=function(t,n,i){return k(this.getSeriesByType(t),n,i)},e.prototype.isSeriesFiltered=function(t){return Qf(this),this._seriesIndicesMap.get(t.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,n){Qf(this);var i=[];k(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];t.call(n,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=ve(i)},e.prototype.restoreData=function(t){Rv(this);var n=this._componentsMap,i=[];n.each(function(a,o){Qe.hasClass(o)&&i.push(o)}),Qe.topologicalTravel(i,Qe.getAllClassMainTypes(),function(a){k(n.get(a),function(o){o&&(a!=="series"||!Ace(o,t))&&o.restoreData()})})},e.internalField=function(){Rv=function(t){var n=t._seriesIndices=[];k(t._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),t._seriesIndicesMap=ve(n)},Qf=function(t){},EL=function(t,n){t.option={},t.option[LL]=Cce,t._componentsMap=ve({series:[]}),t._componentsCount=ve();var i=n.aria;Me(i)&&i.enabled==null&&(i.enabled=!0),Mce(n,t._theme.option),Be(n,gce,!1),t._mergeOption(n,null)}}(),e}(_t);function Ace(r,e){if(e){var t=e.seriesIndex,n=e.seriesId,i=e.seriesName;return t!=null&&r.componentIndex!==t||n!=null&&r.id!==n||i!=null&&r.name!==i}}function Mce(r,e){var t=r.color&&!r.colorLayer;k(e,function(n,i){i==="colorLayer"&&t||Qe.hasClass(i)||(typeof n=="object"?r[i]=r[i]?Be(r[i],n,!1):ke(n):r[i]==null&&(r[i]=n))})}function IL(r,e,t){if(q(e)){var n=ve();return k(e,function(a){if(a!=null){var o=vr(a,null);o!=null&&n.set(a,!0)}}),pt(t,function(a){return a&&n.get(a[r])})}else{var i=vr(e,null);return pt(t,function(a){return a&&i!=null&&a[r]===i})}}function PL(r,e){return e.hasOwnProperty("subType")?pt(r,function(t){return t&&t.subType===e.subType}):r}function RL(r){var e=ve();return r&&k(wt(r.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}cr($C,VC);var kce=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],w6=function(){function r(e){k(kce,function(t){this[t]=ue(e[t],e)},this)}return r}(),t_={},Dp=function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(e,t){var n=[];k(t_,function(i,a){var o=i.create(e,t);n=n.concat(o||[])}),this._coordinateSystems=n},r.prototype.update=function(e,t){k(this._coordinateSystems,function(n){n.update&&n.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},r.register=function(e,t){t_[e]=t},r.get=function(e){return t_[e]},r}(),Dce=/^(min|max)?(.+)$/,Ece=function(){function r(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return r.prototype.setOption=function(e,t,n){e&&(k(wt(e.series),function(o){o&&o.data&&Dn(o.data)&&sy(o.data)}),k(wt(e.dataset),function(o){o&&o.source&&Dn(o.source)&&sy(o.source)})),e=ke(e);var i=this._optionBackup,a=Lce(e,t,!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},r.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],ke(e?t.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(t=ke(n[i.getCurrentIndex()]))}return t},r.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!i.length&&!a)return s;for(var l=0,u=i.length;l<u;l++)Ice(i[l].query,t,n)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!Rce(o,this._currentMediaIndices)&&(s=K(o,function(c){return ke(c===-1?a.option:i[c].option)})),this._currentMediaIndices=o,s},r}();function Lce(r,e,t){var n=[],i,a,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,c=!!r.media,f=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((f||c)&&(r.options=r.media=null),a=r),c&&q(u)&&k(u,function(d){d&&d.option&&(d.query?n.push(d):i||(i=d))}),h(a),k(l,function(d){return h(d)}),k(n,function(d){return h(d.option)});function h(d){k(e,function(p){p(d,t)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:i,mediaList:n}}function Ice(r,e,t){var n={width:e,height:t,aspectratio:e/t},i=!0;return k(r,function(a,o){var s=o.match(Dce);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();Pce(n[u],a,l)||(i=!1)}}),i}function Pce(r,e,t){return t==="min"?r>=e:t==="max"?r<=e:r===e}function Rce(r,e){return r.join(",")===e.join(",")}var _i=k,Yd=Me,OL=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function r_(r){var e=r&&r.itemStyle;if(e)for(var t=0,n=OL.length;t<n;t++){var i=OL[t],a=e.normal,o=e.emphasis;a&&a[i]&&(r[i]=r[i]||{},r[i].normal?Be(r[i].normal,a[i]):r[i].normal=a[i],a[i]=null),o&&o[i]&&(r[i]=r[i]||{},r[i].emphasis?Be(r[i].emphasis,o[i]):r[i].emphasis=o[i],o[i]=null)}}function qr(r,e,t){if(r&&r[e]&&(r[e].normal||r[e].emphasis)){var n=r[e].normal,i=r[e].emphasis;n&&(t?(r[e].normal=r[e].emphasis=null,Ce(r[e],n)):r[e]=n),i&&(r.emphasis=r.emphasis||{},r.emphasis[e]=i,i.focus&&(r.emphasis.focus=i.focus),i.blurScope&&(r.emphasis.blurScope=i.blurScope))}}function Lh(r){qr(r,"itemStyle"),qr(r,"lineStyle"),qr(r,"areaStyle"),qr(r,"label"),qr(r,"labelLine"),qr(r,"upperLabel"),qr(r,"edgeLabel")}function sr(r,e){var t=Yd(r)&&r[e],n=Yd(t)&&t.textStyle;if(n)for(var i=0,a=VE.length;i<a;i++){var o=VE[i];n.hasOwnProperty(o)&&(t[o]=n[o])}}function Jn(r){r&&(Lh(r),sr(r,"label"),r.emphasis&&sr(r.emphasis,"label"))}function Oce(r){if(Yd(r)){r_(r),Lh(r),sr(r,"label"),sr(r,"upperLabel"),sr(r,"edgeLabel"),r.emphasis&&(sr(r.emphasis,"label"),sr(r.emphasis,"upperLabel"),sr(r.emphasis,"edgeLabel"));var e=r.markPoint;e&&(r_(e),Jn(e));var t=r.markLine;t&&(r_(t),Jn(t));var n=r.markArea;n&&Jn(n);var i=r.data;if(r.type==="graph"){i=i||r.nodes;var a=r.links||r.edges;if(a&&!Dn(a))for(var o=0;o<a.length;o++)Jn(a[o]);k(r.categories,function(u){Lh(u)})}if(i&&!Dn(i))for(var o=0;o<i.length;o++)Jn(i[o]);if(e=r.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)Jn(s[o]);if(t=r.markLine,t&&t.data)for(var l=t.data,o=0;o<l.length;o++)q(l[o])?(Jn(l[o][0]),Jn(l[o][1])):Jn(l[o]);r.type==="gauge"?(sr(r,"axisLabel"),sr(r,"title"),sr(r,"detail")):r.type==="treemap"?(qr(r.breadcrumb,"itemStyle"),k(r.levels,function(u){Lh(u)})):r.type==="tree"&&Lh(r.leaves)}}function qa(r){return q(r)?r:r?[r]:[]}function jL(r){return(q(r)?r[0]:r)||{}}function jce(r,e){_i(qa(r.series),function(n){Yd(n)&&Oce(n)});var t=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&t.push("valueAxis","categoryAxis","logAxis","timeAxis"),_i(t,function(n){_i(qa(r[n]),function(i){i&&(sr(i,"axisLabel"),sr(i.axisPointer,"label"))})}),_i(qa(r.parallel),function(n){var i=n&&n.parallelAxisDefault;sr(i,"axisLabel"),sr(i&&i.axisPointer,"label")}),_i(qa(r.calendar),function(n){qr(n,"itemStyle"),sr(n,"dayLabel"),sr(n,"monthLabel"),sr(n,"yearLabel")}),_i(qa(r.radar),function(n){sr(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)}),_i(qa(r.geo),function(n){Yd(n)&&(Jn(n),_i(qa(n.regions),function(i){Jn(i)}))}),_i(qa(r.timeline),function(n){Jn(n),qr(n,"label"),qr(n,"itemStyle"),qr(n,"controlStyle",!0);var i=n.data;q(i)&&k(i,function(a){Me(a)&&(qr(a,"label"),qr(a,"itemStyle"))})}),_i(qa(r.toolbox),function(n){qr(n,"iconStyle"),_i(n.feature,function(i){qr(i,"iconStyle")})}),sr(jL(r.axisPointer),"label"),sr(jL(r.tooltip).axisPointer,"label")}function Nce(r,e){for(var t=e.split(","),n=r,i=0;i<t.length&&(n=n&&n[t[i]],n!=null);i++);return n}function Bce(r,e,t,n){for(var i=e.split(","),a=r,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]]=t)}function NL(r){r&&k(zce,function(e){e[0]in r&&!(e[1]in r)&&(r[e[1]]=r[e[0]])})}var zce=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Fce=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],n_=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function eh(r){var e=r&&r.itemStyle;if(e)for(var t=0;t<n_.length;t++){var n=n_[t][1],i=n_[t][0];e[n]!=null&&(e[i]=e[n])}}function BL(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function zL(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function Vce(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function S6(r,e){if(r)for(var t=0;t<r.length;t++)e(r[t]),r[t]&&S6(r[t].children,e)}function T6(r,e){jce(r,e),r.series=wt(r.series),k(r.series,function(t){if(Me(t)){var n=t.type;if(n==="line")t.clipOverflow!=null&&(t.clip=t.clipOverflow);else if(n==="pie"||n==="gauge"){t.clockWise!=null&&(t.clockwise=t.clockWise),BL(t.label);var i=t.data;if(i&&!Dn(i))for(var a=0;a<i.length;a++)BL(i[a]);t.hoverOffset!=null&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if(n==="gauge"){var o=Nce(t,"pointer.color");o!=null&&Bce(t,"itemStyle.color",o)}else if(n==="bar"){eh(t),eh(t.backgroundStyle),eh(t.emphasis);var i=t.data;if(i&&!Dn(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(eh(i[a]),eh(i[a]&&i[a].emphasis))}else if(n==="sunburst"){var s=t.highlightPolicy;s&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=s)),zL(t),S6(t.data,zL)}else n==="graph"||n==="sankey"?Vce(t):n==="map"&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&Ce(t,t.mapLocation));t.hoverAnimation!=null&&(t.emphasis=t.emphasis||{},t.emphasis&&t.emphasis.scale==null&&(t.emphasis.scale=t.hoverAnimation)),NL(t)}}),r.dataRange&&(r.visualMap=r.dataRange),k(Fce,function(t){var n=r[t];n&&(q(n)||(n=[n]),k(n,function(i){NL(i)}))})}function $ce(r){var e=ve();r.eachSeries(function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),a=t.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:t};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.length&&a.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),e.each(Hce)}function Hce(r){k(r,function(e,t){var n=[],i=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,f){var h=o.get(e.stackedDimension,f);if(isNaN(h))return i;var d,p;s?p=o.getRawIndex(f):d=o.get(e.stackedByDimension,f);for(var v=NaN,m=t-1;m>=0;m--){var g=r[m];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,d)),p>=0){var y=g.data.getByRawIndex(g.stackResultDimension,p);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&h>=0&&y>0||l==="samesign"&&h<=0&&y<0){h=zse(h,y),v=y;break}}}return n[0]=h,n[1]=v,n})})}var r1=function(){function r(e){this.data=e.data||(e.sourceFormat===Ba?{}:[]),this.sourceFormat=e.sourceFormat||m6,this.seriesLayoutBy=e.seriesLayoutBy||xa,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var i=t[n];i.type==null&&b6(this,n)===Rr.Must&&(i.type="ordinal")}}return r}();function HC(r){return r instanceof r1}function D2(r,e,t){t=t||C6(r);var n=e.seriesLayoutBy,i=Wce(r,t,n,e.sourceHeader,e.dimensions),a=new r1({data:r,sourceFormat:t,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:ke(e)});return a}function GC(r){return new r1({data:r,sourceFormat:Dn(r)?bs:yi})}function Gce(r){return new r1({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:ke(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function C6(r){var e=m6;if(Dn(r))e=bs;else if(q(r)){r.length===0&&(e=Jr);for(var t=0,n=r.length;t<n;t++){var i=r[t];if(i!=null){if(q(i)||Dn(i)){e=Jr;break}else if(Me(i)){e=bi;break}}}}else if(Me(r)){for(var a in r)if(fe(r,a)&&Zr(r[a])){e=Ba;break}}return e}function Wce(r,e,t,n,i){var a,o;if(!r)return{dimensionsDefine:FL(i),startIndex:o,dimensionsDetectedCount:a};if(e===Jr){var s=r;n==="auto"||n==null?VL(function(u){u!=null&&u!=="-"&&(se(u)?o==null&&(o=1):o=0)},t,s,10):o=lt(n)?n:n?1:0,!i&&o===1&&(i=[],VL(function(u,c){i[c]=u!=null?u+"":""},t,s,1/0)),a=i?i.length:t===Cf?s.length:s[0]?s[0].length:null}else if(e===bi)i||(i=Uce(r));else if(e===Ba)i||(i=[],k(r,function(u,c){i.push(c)}));else if(e===yi){var l=yf(r[0]);a=q(l)&&l.length||1}return{startIndex:o,dimensionsDefine:FL(i),dimensionsDetectedCount:a}}function Uce(r){for(var e=0,t;e<r.length&&!(t=r[e++]););if(t)return et(t)}function FL(r){if(r){var e=ve();return K(r,function(t,n){t=Me(t)?t:{name:t};var i={name:t.name,displayName:t.displayName,type:t.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var a=e.get(i.name);return a?i.name+="-"+a.count++:e.set(i.name,{count:1}),i})}}function VL(r,e,t,n){if(e===Cf)for(var i=0;i<t.length&&i<n;i++)r(t[i]?t[i][0]:null,i);else for(var a=t[0]||[],i=0;i<a.length&&i<n;i++)r(a[i],i)}function A6(r){var e=r.sourceFormat;return e===bi||e===Ba}var sl,ll,ul,$L,HL,M6=function(){function r(e,t){var n=HC(e)?e:GC(e);this._source=n;var i=this._data=n.data;n.sourceFormat===bs&&(this._offset=0,this._dimSize=t,this._data=i),HL(this,i,n)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(e,t){},r.prototype.appendData=function(e){},r.prototype.clean=function(){},r.protoInitialize=function(){var e=r.prototype;e.pure=!1,e.persistent=!0}(),r.internalField=function(){var e;HL=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,f=l.startIndex,h=l.dimensionsDefine,d=$L[WC(u,c)];if(W(o,d),u===bs)o.getItem=t,o.count=i,o.fillStorage=n;else{var p=k6(u,c);o.getItem=ue(p,null,s,f,h);var v=D6(u,c);o.count=ue(v,null,s,f,h)}};var t=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,c=u*o,f=0;f<u;f++)s[f]=l[c+f];return s},n=function(o,s,l,u){for(var c=this._data,f=this._dimSize,h=0;h<f;h++){for(var d=u[h],p=d[0]==null?1/0:d[0],v=d[1]==null?-1/0:d[1],m=s-o,g=l[h],y=0;y<m;y++){var b=c[y*f+h];g[o+y]=b,b<p&&(p=b),b>v&&(v=b)}d[0]=p,d[1]=v}},i=function(){return this._data?this._data.length/this._dimSize:0};$L=(e={},e[Jr+"_"+xa]={pure:!0,appendData:a},e[Jr+"_"+Cf]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[bi]={pure:!0,appendData:a},e[Ba]={pure:!0,appendData:function(o){var s=this._data;k(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[yi]={appendData:a},e[bs]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),r}(),GL=function(r,e,t,n){return r[n]},Yce=(sl={},sl[Jr+"_"+xa]=function(r,e,t,n){return r[n+e]},sl[Jr+"_"+Cf]=function(r,e,t,n,i){n+=e;for(var a=i||[],o=r,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[n]:null}return a},sl[bi]=GL,sl[Ba]=function(r,e,t,n,i){for(var a=i||[],o=0;o<t.length;o++){var s=t[o].name,l=r[s];a[o]=l?l[n]:null}return a},sl[yi]=GL,sl);function k6(r,e){var t=Yce[WC(r,e)];return t}var WL=function(r,e,t){return r.length},qce=(ll={},ll[Jr+"_"+xa]=function(r,e,t){return Math.max(0,r.length-e)},ll[Jr+"_"+Cf]=function(r,e,t){var n=r[0];return n?Math.max(0,n.length-e):0},ll[bi]=WL,ll[Ba]=function(r,e,t){var n=t[0].name,i=r[n];return i?i.length:0},ll[yi]=WL,ll);function D6(r,e){var t=qce[WC(r,e)];return t}var i_=function(r,e,t){return r[e]},Xce=(ul={},ul[Jr]=i_,ul[bi]=function(r,e,t){return r[t]},ul[Ba]=i_,ul[yi]=function(r,e,t){var n=yf(r);return n instanceof Array?n[e]:n},ul[bs]=i_,ul);function E6(r){var e=Xce[r];return e}function WC(r,e){return r===Jr?r+"_"+e:r}function tf(r,e,t){if(r){var n=r.getRawDataItem(e);if(n!=null){var i=r.getStore(),a=i.getSource().sourceFormat;if(t!=null){var o=r.getDimensionIndex(t),s=i.getDimensionProperty(o);return E6(a)(n,o,s)}else{var l=n;return a===yi&&(l=yf(n)),l}}}}var Kce=/\{@(.+?)\}/g,n1=function(){function r(){}return r.prototype.getDataParams=function(e,t){var n=this.getData(t),i=this.getRawValue(e,t),a=n.getRawIndex(e),o=n.getName(e),s=n.getRawDataItem(e),l=n.getItemVisual(e,"style"),u=l&&l[n.getItemVisual(e,"drawType")||"fill"],c=l&&l.stroke,f=this.mainType,h=f==="series",d=n.userOutput&&n.userOutput.get();return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:a,data:s,dataType:t,value:i,color:u,borderColor:c,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(e,t,n,i,a,o){t=t||"normal";var s=this.getData(n),l=this.getDataParams(e,n);if(o&&(l.value=o.interpolatedValue),i!=null&&q(l.value)&&(l.value=l.value[i]),!a){var u=s.getItemModel(e);a=u.get(t==="normal"?["label","formatter"]:[t,"label","formatter"])}if(Te(a))return l.status=t,l.dimensionIndex=i,a(l);if(se(a)){var c=f6(a,l);return c.replace(Kce,function(f,h){var d=h.length,p=h;p.charAt(0)==="["&&p.charAt(d-1)==="]"&&(p=+p.slice(1,d-1));var v=tf(s,e,p);if(o&&q(o.interpolatedValue)){var m=s.getDimensionIndex(p);m>=0&&(v=o.interpolatedValue[m])}return v!=null?v+"":""})}},r.prototype.getRawValue=function(e,t){return tf(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,n){},r}();function UL(r){var e,t;return Me(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function hd(r){return new Zce(r)}var Zce=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var i=this.context;i.data=i.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(y){return!(y>=1)&&(y=1),y}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(f||d<p)){var v=this._progress;if(q(v))for(var m=0;m<v.length;m++)this._doProgress(v[m],d,p,l,u);else this._doProgress(v,d,p,l,u)}this._dueIndex=p;var g=this._settedOutputEnd!=null?this._settedOutputEnd:p;this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(e,t,n,i,a){YL.reset(t,n,i,a),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:YL.next},this.context)},r.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,n;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(n=t.forceFirstProgress,t=t.progress),q(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},r}(),YL=function(){var r,e,t,n,i,a={reset:function(l,u,c,f){e=l,r=u,t=c,n=f,i=Math.ceil(n/t),a.next=t>1&&n>0?s:o}};return a;function o(){return e<r?e++:null}function s(){var l=e%i*t+Math.ceil(e/i),u=e>=r?null:l<n?l:e;return e++,u}}();function _s(r,e){var t=e&&e.type;return t==="ordinal"?r:(t==="time"&&!lt(r)&&r!=null&&r!=="-"&&(r=+Pa(r)),r==null||r===""?NaN:Number(r))}var Jce=ve({number:function(r){return parseFloat(r)},time:function(r){return+Pa(r)},trim:function(r){return se(r)?Li(r):r}});function L6(r){return Jce.get(r)}var I6={lt:function(r,e){return r<e},lte:function(r,e){return r<=e},gt:function(r,e){return r>e},gte:function(r,e){return r>=e}},Qce=function(){function r(e,t){if(!lt(t)){var n="";dt(n)}this._opFn=I6[e],this._rvalFloat=xo(t)}return r.prototype.evaluate=function(e){return lt(e)?this._opFn(e,this._rvalFloat):this._opFn(xo(e),this._rvalFloat)},r}(),P6=function(){function r(e,t){var n=e==="desc";this._resultLT=n?1:-1,t==null&&(t=n?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var n=lt(e)?e:xo(e),i=lt(t)?t:xo(t),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=se(e),l=se(t);s&&(n=l?e:0),l&&(i=s?t:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},r}(),efe=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=xo(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(t=xo(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function tfe(r,e){return r==="eq"||r==="ne"?new efe(r==="eq",e):fe(I6,r)?new Qce(r,e):null}var rfe=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return _s(e,t)},r}();function nfe(r,e){var t=new rfe,n=r.data,i=t.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==xa&&dt(o);var s=[],l={},u=r.dimensionsDefine;if(u)k(u,function(v,m){var g=v.name,y={index:m,name:g,displayName:v.displayName};if(s.push(y),g!=null){var b="";fe(l,g)&&dt(b),l[g]=y}});else for(var c=0;c<r.dimensionsDetectedCount;c++)s.push({index:c});var f=k6(i,xa);e.__isBuiltIn&&(t.getRawDataItem=function(v){return f(n,a,s,v)},t.getRawData=ue(ife,null,r)),t.cloneRawData=ue(afe,null,r);var h=D6(i,xa);t.count=ue(h,null,n,a,s);var d=E6(i);t.retrieveValue=function(v,m){var g=f(n,a,s,v);return p(g,m)};var p=t.retrieveValueFromItem=function(v,m){if(v!=null){var g=s[m];if(g)return d(v,m,g.name)}};return t.getDimensionInfo=ue(ofe,null,s,l),t.cloneAllDimensionInfo=ue(sfe,null,s),t}function ife(r){var e=r.sourceFormat;if(!UC(e)){var t="";dt(t)}return r.data}function afe(r){var e=r.sourceFormat,t=r.data;if(!UC(e)){var n="";dt(n)}if(e===Jr){for(var i=[],a=0,o=t.length;a<o;a++)i.push(t[a].slice());return i}else if(e===bi){for(var i=[],a=0,o=t.length;a<o;a++)i.push(W({},t[a]));return i}}function ofe(r,e,t){if(t!=null){if(lt(t)||!isNaN(t)&&!fe(e,t))return r[t];if(fe(e,t))return e[t]}}function sfe(r){return ke(r)}var R6=ve();function lfe(r){r=ke(r);var e=r.type,t="";e||dt(t);var n=e.split(":");n.length!==2&&dt(t);var i=!1;n[0]==="echarts"&&(e=n[1],i=!0),r.__isBuiltIn=i,R6.set(e,r)}function ufe(r,e,t){var n=wt(r),i=n.length,a="";i||dt(a);for(var o=0,s=i;o<s;o++){var l=n[o];e=cfe(l,e),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function cfe(r,e,t,n){var i="";e.length||dt(i),Me(r)||dt(i);var a=r.type,o=R6.get(a);o||dt(i);var s=K(e,function(u){return nfe(u,o)}),l=wt(o.transform({upstream:s[0],upstreamList:s,config:ke(r.config)}));return K(l,function(u,c){var f="";Me(u)||dt(f),u.data||dt(f);var h=C6(u.data);UC(h)||dt(f);var d,p=e[0];if(p&&c===0&&!u.dimensions){var v=p.startIndex;v&&(u.data=p.data.slice(0,v).concat(u.data)),d={seriesLayoutBy:xa,sourceHeader:v,dimensions:p.metaRawOption.dimensions}}else d={seriesLayoutBy:xa,sourceHeader:0,dimensions:u.dimensions};return D2(u.data,d,null)})}function UC(r){return r===Jr||r===bi}var i1="undefined",ffe=typeof Uint32Array===i1?Array:Uint32Array,hfe=typeof Uint16Array===i1?Array:Uint16Array,O6=typeof Int32Array===i1?Array:Int32Array,qL=typeof Float64Array===i1?Array:Float64Array,j6={float:qL,int:O6,ordinal:Array,number:Array,time:qL},a_;function tc(r){return r>65535?ffe:hfe}function rc(){return[1/0,-1/0]}function dfe(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function XL(r,e,t,n,i){var a=j6[t||"float"];if(i){var o=r[e],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;u<s;u++)l[u]=o[u];r[e]=l}}else r[e]=new a(n)}var E2=function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=ve()}return r.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=e.getSource(),a=this.defaultDimValueGetter=a_[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[],A6(i),this._dimensions=K(t,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,e.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,i=this._dimensions,a=n.get(e);if(a!=null){if(i[a].type===t)return a}else a=i.length;return i[a]={type:t},n.set(e,a),this._chunks[a]=new j6[t||"float"](this._rawCount),this._rawExtent[a]=rc(),a},r.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],i=this._dimensions[e],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[e]=rc());for(var l=a[e],u=o;u<s;u++){var c=n[u]=t.parseAndCollect(n[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}i.ordinalMeta=t,i.ordinalOffset=s,i.type="ordinal"},r.prototype.getOrdinalMeta=function(e){var t=this._dimensions[e],n=t.ordinalMeta;return n},r.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},r.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var i=t.count();return t.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},r.prototype.appendValues=function(e,t){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t||0),u=0;u<a;u++){var c=i[u];XL(n,u,c.type,l,!0)}for(var f=[],h=s;h<l;h++)for(var d=h-s,p=0;p<a;p++){var c=i[p],v=a_.arrayRows.call(this,e[d]||f,c.property,d,p);n[p][h]=v;var m=o[p];v<m[0]&&(m[0]=v),v>m[1]&&(m[1]=v)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=K(o,function(y){return y.property}),c=0;c<s;c++){var f=o[c];l[c]||(l[c]=rc()),XL(a,c,f.type,t,n)}if(i.fillStorage)i.fillStorage(e,t,a,l);else for(var h=[],d=e;d<t;d++){h=i.getItem(d,h);for(var p=0;p<s;p++){var v=a[p],m=this._dimValueGetter(h,u[p],d,p);v[d]=m;var g=l[p];m<g[0]&&(g[0]=m),m>g[1]&&(g[1]=m)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},r.prototype.getValues=function(e,t){var n=[],i=[];if(t==null){t=e,e=[];for(var a=0;a<this._dimensions.length;a++)i.push(a)}else i=e;for(var a=0,o=i.length;a<o;a++)n.push(this.get(i[a],t));return n},r.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},r.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var i=0,a=this.count();i<a;i++){var o=this.get(e,i);isNaN(o)||(n+=o)}return n},r.prototype.getMedian=function(e){var t=[];this.each([e],function(a){isNaN(a)||t.push(a)});var n=t.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},r.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&n<this._count&&n===e)return e;for(var i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(t[o]<e)i=o+1;else if(t[o]>e)a=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(e,t,n){var i=this._chunks,a=i[e],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,c=0,f=this.count();c<f;c++){var h=this.getRawIndex(c),d=t-a[h],p=Math.abs(d);p<=n&&((p<s||p===s&&d>=0&&l<0)&&(s=p,l=d,u=0),d===l&&(o[u++]=c))}return o.length=u,o},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a<i;a++)e[a]=t[a]}else e=new n(t.buffer,0,i)}else{var n=tc(this._rawCount);e=new n(this.count());for(var a=0;a<e.length;a++)e[a]=a}return e},r.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),i=n.count(),a=tc(n._rawCount),o=new a(i),s=[],l=e.length,u=0,c=e[0],f=n._chunks,h=0;h<i;h++){var d=void 0,p=n.getRawIndex(h);if(l===0)d=t(h);else if(l===1){var v=f[c][p];d=t(v,h)}else{for(var m=0;m<l;m++)s[m]=f[e[m]][p];s[m]=h,d=t.apply(null,s)}d&&(o[u++]=p)}return u<i&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},r.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var i=et(e),a=i.length;if(!a)return this;var o=t.count(),s=tc(t._rawCount),l=new s(o),u=0,c=i[0],f=e[c][0],h=e[c][1],d=t._chunks,p=!1;if(!t._indices){var v=0;if(a===1){for(var m=d[i[0]],g=0;g<n;g++){var y=m[g];(y>=f&&y<=h||isNaN(y))&&(l[u++]=v),v++}p=!0}else if(a===2){for(var m=d[i[0]],b=d[i[1]],_=e[i[1]][0],x=e[i[1]][1],g=0;g<n;g++){var y=m[g],w=b[g];(y>=f&&y<=h||isNaN(y))&&(w>=_&&w<=x||isNaN(w))&&(l[u++]=v),v++}p=!0}}if(!p)if(a===1)for(var g=0;g<o;g++){var S=t.getRawIndex(g),y=d[i[0]][S];(y>=f&&y<=h||isNaN(y))&&(l[u++]=S)}else for(var g=0;g<o;g++){for(var T=!0,S=t.getRawIndex(g),C=0;C<a;C++){var A=i[C],y=d[A][S];(y<e[A][0]||y>e[A][1])&&(T=!1)}T&&(l[u++]=t.getRawIndex(g))}return u<o&&(t._indices=l),t._count=u,t._extent=[],t._updateGetRawIdx(),t},r.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},r.prototype.modify=function(e,t){this._updateDims(this,e,t)},r.prototype._updateDims=function(e,t,n){for(var i=e._chunks,a=[],o=t.length,s=e.count(),l=[],u=e._rawExtent,c=0;c<t.length;c++)u[t[c]]=rc();for(var f=0;f<s;f++){for(var h=e.getRawIndex(f),d=0;d<o;d++)l[d]=i[t[d]][h];l[o]=f;var p=n&&n.apply(null,l);if(p!=null){typeof p!="object"&&(a[0]=p,p=a);for(var c=0;c<p.length;c++){var v=t[c],m=p[c],g=u[v],y=i[v];y&&(y[h]=m),m<g[0]&&(g[0]=m),m>g[1]&&(g[1]=m)}}}},r.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,f,h,d=new(tc(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var p=1;p<o-1;p+=l){for(var v=Math.min(p+l,o-1),m=Math.min(p+l*2,o),g=(m+v)/2,y=0,b=v;b<m;b++){var _=this.getRawIndex(b),x=a[_];isNaN(x)||(y+=x)}y/=m-v;var w=p,S=Math.min(p+l,o),T=p-1,C=a[u];c=-1,h=w;for(var A=-1,M=0,b=w;b<S;b++){var _=this.getRawIndex(b),x=a[_];if(isNaN(x)){M++,A<0&&(A=_);continue}f=Math.abs((T-g)*(x-C)-(T-b)*(y-C)),f>c&&(c=f,h=_)}M>0&&M<S-w&&(d[s++]=Math.min(A,h),h=Math.max(A,h)),d[s++]=h,u=h}return d[s++]=this.getRawIndex(o-1),n._count=s,n._indices=d,n.getRawIndex=this._getRawIdx,n},r.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),i=n._chunks,a=Math.floor(1/t),o=i[e],s=this.count(),l=new(tc(this._rawCount))(Math.ceil(s/a)*2),u=0,c=0;c<s;c+=a){var f=c,h=o[this.getRawIndex(f)],d=c,p=o[this.getRawIndex(d)],v=a;c+a>s&&(v=s-c);for(var m=0;m<v;m++){var g=this.getRawIndex(c+m),y=o[g];y<h&&(h=y,f=c+m),y>p&&(p=y,d=c+m)}var b=this.getRawIndex(f),_=this.getRawIndex(d);f<d?(l[u++]=b,l[u++]=_):(l[u++]=_,l[u++]=b)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},r.prototype.downSample=function(e,t,n,i){for(var a=this.clone([e],!0),o=a._chunks,s=[],l=Math.floor(1/t),u=o[e],c=this.count(),f=a._rawExtent[e]=rc(),h=new(tc(this._rawCount))(Math.ceil(c/l)),d=0,p=0;p<c;p+=l){l>c-p&&(l=c-p,s.length=l);for(var v=0;v<l;v++){var m=this.getRawIndex(p+v);s[v]=u[m]}var g=n(s),y=this.getRawIndex(Math.min(p+i(s,g)||0,c-1));u[y]=g,g<f[0]&&(f[0]=g),g>f[1]&&(f[1]=g),h[d++]=y}return a._count=d,a._indices=h,a._updateGetRawIdx(),a},r.prototype.each=function(e,t){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(n){case 0:t(a);break;case 1:t(i[e[0]][s],a);break;case 2:t(i[e[0]][s],i[e[1]][s],a);break;default:for(var l=0,u=[];l<n;l++)u[l]=i[e[l]][s];u[l]=a,t.apply(null,u)}}},r.prototype.getDataExtent=function(e){var t=this._chunks[e],n=rc();if(!t)return n;var i=this.count(),a=!this._indices,o;if(a)return this._rawExtent[e].slice();if(o=this._extent[e],o)return o.slice();o=n;for(var s=o[0],l=o[1],u=0;u<i;u++){var c=this.getRawIndex(u),f=t[c];f<s&&(s=f),f>l&&(l=f)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][t]);return n},r.prototype.clone=function(e,t){var n=new r,i=this._chunks,a=e&&Ea(e,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?dfe(i[o]):i[o];else n._chunks=i;return this._copyCommonProps(n),t||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},r.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=ke(this._extent),e._rawExtent=ke(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var i=0;i<n;i++)t[i]=this._indices[i]}else t=new e(this._indices);return t}return null},r.prototype._getRawIdxIdentity=function(e){return e},r.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,n,i,a){return _s(t[a],this._dimensions[a])}a_={arrayRows:e,objectRows:function(t,n,i,a){return _s(t[n],this._dimensions[a])},keyedColumns:e,original:function(t,n,i,a){var o=t&&(t.value==null?t:t.value);return _s(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(t,n,i,a){return t[a]}}}(),r}(),N6=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,i,a;if(Ov(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=t[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=Dn(s)?bs:yi,a=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},d=Re(f.seriesLayoutBy,h.seriesLayoutBy)||null,p=Re(f.sourceHeader,h.sourceHeader),v=Re(f.dimensions,h.dimensions),m=d!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||v;i=m?[D2(s,{seriesLayoutBy:d,sourceHeader:p,dimensions:v},l)]:[]}else{var g=e;if(n){var y=this._applyTransform(t);i=y.sourceList,a=y.upstreamSignList}else{var b=g.get("source",!0);i=[D2(b,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},r.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get("transform",!0),i=t.get("fromTransformResult",!0);if(i!=null){var a="";e.length!==1&&ZL(a)}var o,s=[],l=[];return k(e,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&ZL(f),s.push(c),l.push(u._getVersionSign())}),n?o=ufe(n,s,{datasetIndex:t.componentIndex}):i!=null&&(o=[Gce(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},r.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},r.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},r.prototype._innerGetDataStore=function(e,t,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];Ov(this._sourceHost)&&l?s=l._innerGetDataStore(e,t,n):(s=new E2,s.initData(new M6(t,e.length),e)),o[n]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Ov(e)){var t=FC(e);return t?[t.getSourceManager()]:[]}else return K(bce(e),function(n){return n.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,i;if(Ov(e))t=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),i=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=e;t=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:i}},r}();function KL(r){var e=r.option.transform;e&&sy(r.option.transform)}function Ov(r){return r.mainType==="series"}function ZL(r){throw new Error(r)}var pfe="line-height:1";function B6(r){var e=r.lineHeight;return e==null?pfe:"line-height:"+un(e+"")+"px"}function z6(r,e){var t=r.color||"#6e7079",n=r.fontSize||12,i=r.fontWeight||"400",a=r.color||"#464646",o=r.fontSize||14,s=r.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+un(n+"")+"px;color:"+un(t)+";font-weight:"+un(i+""),valueStyle:"font-size:"+un(o+"")+"px;color:"+un(a)+";font-weight:"+un(s+"")}:{nameStyle:{fontSize:n,fill:t,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var vfe=[0,10,20,30],mfe=["",`
|
||
`,`
|
||
|
||
`,`
|
||
|
||
|
||
`];function Cr(r,e){return e.type=r,e}function L2(r){return r.type==="section"}function F6(r){return L2(r)?gfe:yfe}function V6(r){if(L2(r)){var e=0,t=r.blocks.length,n=t>1||t>0&&!r.noHeader;return k(r.blocks,function(i){var a=V6(i);a>=e&&(e=a+ +(n&&(!a||L2(i)&&!i.noHeader)))}),e}return 0}function gfe(r,e,t,n){var i=e.noHeader,a=bfe(V6(e)),o=[],s=e.blocks||[];vn(!s||q(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(fe(u,l)){var c=new P6(u[l],null);s.sort(function(v,m){return c.evaluate(v.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}k(s,function(v,m){var g=e.valueFormatter,y=F6(v)(g?W(W({},r),{valueFormatter:g}):r,v,m>0?a.html:0,n);y!=null&&o.push(y)});var f=r.renderMode==="richText"?o.join(a.richText):I2(n,o.join(""),i?t:a.html);if(i)return f;var h=A2(e.header,"ordinal",r.useUTC),d=z6(n,r.renderMode).nameStyle,p=B6(n);return r.renderMode==="richText"?$6(r,h,d)+a.richText+f:I2(n,'<div style="'+d+";"+p+';">'+un(h)+"</div>"+f,t)}function yfe(r,e,t,n){var i=r.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(_){return _=q(_)?_:[_],K(_,function(x,w){return A2(x,q(d)?d[w]:d,u)})};if(!(a&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",i),h=a?"":A2(l,"ordinal",u),d=e.valueType,p=o?[]:c(e.value,e.dataIndex),v=!s||!a,m=!s&&a,g=z6(n,i),y=g.nameStyle,b=g.valueStyle;return i==="richText"?(s?"":f)+(a?"":$6(r,h,y))+(o?"":wfe(r,p,v,m,b)):I2(n,(s?"":f)+(a?"":_fe(h,!s,y))+(o?"":xfe(p,v,m,b)),t)}}function JL(r,e,t,n,i,a){if(r){var o=F6(r),s={useUTC:i,renderMode:t,orderMode:n,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function bfe(r){return{html:vfe[r],richText:mfe[r]}}function I2(r,e,t){var n='<div style="clear:both"></div>',i="margin: "+t+"px 0 0",a=B6(r);return'<div style="'+i+";"+a+';">'+e+n+"</div>"}function _fe(r,e,t){var n=e?"margin-left:2px":"";return'<span style="'+t+";"+n+'">'+un(r)+"</span>"}function xfe(r,e,t,n){var i=t?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return r=q(r)?r:[r],'<span style="'+a+";"+n+'">'+K(r,function(o){return un(o)}).join(" ")+"</span>"}function $6(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function wfe(r,e,t,n,i){var a=[i],o=n?10:20;return t&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(q(e)?e.join(" "):e,a)}function H6(r,e){var t=r.getData().getItemVisual(e,"style"),n=t[r.visualDrawType];return yu(n)}function G6(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var o_=function(){function r(){this.richTextStyles={},this._nextStyleNameId=oz()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,n){var i=n==="richText"?this._generateStyleName():null,a=hce({color:t,type:e,renderMode:n,markerId:i});return se(a)?a:(this.richTextStyles[i]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(e,t){var n={};q(t)?k(t,function(a){return W(n,a)}):W(n,t);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},r}();function W6(r){var e=r.series,t=r.dataIndex,n=r.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(t),l=q(s),u=H6(e,t),c,f,h,d;if(o>1||l&&!o){var p=Sfe(s,e,t,a,u);c=p.inlineValues,f=p.inlineValueTypes,h=p.blocks,d=p.inlineValues[0]}else if(o){var v=i.getDimensionInfo(a[0]);d=c=tf(i,t,a[0]),f=v.type}else d=c=l?s[0]:s;var m=yC(e),g=m&&e.name||"",y=i.getName(t),b=n?g:y;return Cr("section",{header:g,noHeader:n||!m,sortParam:d,blocks:[Cr("nameValue",{markerType:"item",markerColor:u,name:b,noName:!Li(b),value:c,valueType:f,dataIndex:t})].concat(h||[])})}function Sfe(r,e,t,n,i){var a=e.getData(),o=Ea(r,function(f,h,d){var p=a.getDimensionInfo(d);return f=f||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?k(n,function(f){c(tf(a,t,f),f)}):k(r,c);function c(f,h){var d=a.getDimensionInfo(h);!d||d.otherDims.tooltip===!1||(o?u.push(Cr("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:f,valueType:d.type})):(s.push(f),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Fo=it();function jv(r,e){return r.getName(e)||r.getId(e)}var qm="__universalTransitionEnabled",It=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,n,i){this.seriesIndex=this.componentIndex,this.dataTask=hd({count:Cfe,reset:Afe}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i);var a=Fo(this).sourceManager=new N6(this);a.prepareSource();var o=this.getInitialData(t,i);eI(o,this),this.dataTask.context.data=o,Fo(this).dataBeforeProcessed=o,QL(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,n){var i=Ud(this),a=i?Tf(t):{},o=this.subType;Qe.hasClass(o)&&(o+="Series"),Be(t,n.getTheme().get(this.subType)),Be(t,this.getDefaultOption()),pu(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&Ls(t,a,i)},e.prototype.mergeOption=function(t,n){t=Be(this.option,t,!0),this.fillDataTextStyle(t.data);var i=Ud(this);i&&Ls(this.option,t,i);var a=Fo(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(t,n);eI(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Fo(this).dataBeforeProcessed=o,QL(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!Dn(t))for(var n=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&pu(t[i],"label",n)},e.prototype.getInitialData=function(t,n){},e.prototype.appendData=function(t){var n=this.getRawData();n.appendData(t.data)},e.prototype.getData=function(t){var n=P2(this);if(n){var i=n.context.data;return t==null||!i.getLinkedData?i:i.getLinkedData(t)}else return Fo(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var n=P2(this);if(n){var i=n.context;i.outputData=t,n!==this.dataTask&&(i.data=t)}Fo(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return ve(t)},e.prototype.getSourceManager=function(){return Fo(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Fo(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var t=this.get("colorBy");return t||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.formatTooltip=function(t,n,i){return W6({series:this,dataIndex:t,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(Ze.node&&!(t&&t.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,n,i){var a=this.ecModel,o=VC.prototype.getColorFromPalette.call(this,t,n,i);return o||(o=a.getColorFromPalette(t,n,i)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,n){this._innerSelect(this.getData(n),t)},e.prototype.unselect=function(t,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<t.length;s++){var l=t[s],u=jv(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(t,n){for(var i=[],a=0;a<t.length;a++)i[0]=t[a],this.isSelected(t[a],n)?this.unselect(i,n):this.select(i,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,n=et(t),i=[],a=0;a<n.length;a++){var o=t[n[a]];o>=0&&i.push(o)}return i},e.prototype.isSelected=function(t,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[jv(a,t)])&&!a.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[qm])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,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"){Me(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var f=n[c],h=jv(t,f);u[h]=!0,this._selectedDataIndicesMap[h]=t.getRawIndex(f)}}else if(s==="single"||s===!0){var d=n[l-1],h=jv(t,d);o.selectedMap=(i={},i[h]=!0,i),this._selectedDataIndicesMap=(a={},a[h]=t.getRawIndex(d),a)}}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var n=[];t.hasItemOption&&t.each(function(i){var a=t.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(t,n)}},e.registerClass=function(t){return Qe.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(Qe);cr(It,n1);cr(It,VC);pz(It,Qe);function QL(r){var e=r.name;yC(r)||(r.name=Tfe(r)||e)}function Tfe(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),n=[];return k(t,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function Cfe(r){return r.model.getRawData().count()}function Afe(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),Mfe}function Mfe(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function eI(r,e){k(jd(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,Oe(kfe,e))})}function kfe(r,e){var t=P2(r);return t&&t.setOutputEnd((e||this).count()),e}function P2(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var n=t.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(r.uid))}return n}}var zt=function(){function r(){this.group=new Ee,this.uid=wf("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,i){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,i){},r.prototype.updateLayout=function(e,t,n,i){},r.prototype.updateVisual=function(e,t,n,i){},r.prototype.toggleBlurSeries=function(e,t,n){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();_C(zt);z0(zt);function Af(){var r=it();return function(e){var t=r(e),n=e.pipelineContext,i=!!t.large,a=!!t.progressiveRender,o=t.large=!!(n&&n.large),s=t.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var U6=it(),Dfe=Af(),St=function(){function r(){this.group=new Ee,this.uid=wf("viewChart"),this.renderTask=hd({plan:Efe,reset:Lfe}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,i){},r.prototype.highlight=function(e,t,n,i){var a=e.getData(i&&i.dataType);a&&rI(a,i,"emphasis")},r.prototype.downplay=function(e,t,n,i){var a=e.getData(i&&i.dataType);a&&rI(a,i,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,i){this.render(e,t,n,i)},r.prototype.updateLayout=function(e,t,n,i){this.render(e,t,n,i)},r.prototype.updateVisual=function(e,t,n,i){this.render(e,t,n,i)},r.prototype.eachRendered=function(e){Vs(this.group,e)},r.markUpdateMethod=function(e,t){U6(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function tI(r,e,t){r&&Hd(r)&&(e==="emphasis"?wo:So)(r,t)}function rI(r,e,t){var n=vu(r,e),i=e&&e.highlightKey!=null?hue(e.highlightKey):null;n!=null?k(wt(n),function(a){tI(r.getItemGraphicEl(a),t,i)}):r.eachItemGraphicEl(function(a){tI(a,t,i)})}_C(St);z0(St);function Efe(r){return Dfe(r.model)}function Lfe(r){var e=r.model,t=r.ecModel,n=r.api,i=r.payload,a=e.pipelineContext.progressiveRender,o=r.view,s=i&&U6(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,n,i),Ife[l]}var Ife={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Ty="\0__throttleOriginMethod",nI="\0__throttleRate",iI="\0__throttleType";function YC(r,e,t){var n,i=0,a=0,o=null,s,l,u,c;e=e||0;function f(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var d=[],p=0;p<arguments.length;p++)d[p]=arguments[p];n=new Date().getTime(),l=this,u=d;var v=c||e,m=c||t;c=null,s=n-(m?i:a)-v,clearTimeout(o),m?o=setTimeout(f,v):s>=0?f():o=setTimeout(f,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(d){c=d},h}function Mf(r,e,t,n){var i=r[e];if(i){var a=i[Ty]||i,o=i[iI],s=i[nI];if(s!==t||o!==n){if(t==null||!n)return r[e]=a;i=r[e]=YC(a,t,n==="debounce"),i[Ty]=a,i[iI]=n,i[nI]=t}return i}}function qd(r,e){var t=r[e];t&&t[Ty]&&(t.clear&&t.clear(),r[e]=t[Ty])}var aI=it(),oI={itemStyle:mu(Jz,!0),lineStyle:mu(Zz,!0)},Pfe={lineStyle:"stroke",itemStyle:"fill"};function Y6(r,e){var t=r.visualStyleMapper||oI[e];return t||(console.warn("Unknown style type '"+e+"'."),oI.itemStyle)}function q6(r,e){var t=r.visualDrawType||Pfe[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var Rfe={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=r.getModel(n),a=Y6(r,n),o=a(i),s=i.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=q6(r,n),u=o[l],c=Te(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=h,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Te(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||Te(o.stroke)?h:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(d,p){var v=r.getDataParams(p),m=W({},o);m[l]=c(v),d.setItemVisual(p,"style",m)}}}},th=new _t,Ofe={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=Y6(r,n),a=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){th.option=l[n];var u=i(th),c=o.ensureUniqueItemVisual(s,"style");W(c,u),th.option.decal&&(o.setItemVisual(s,"decal",th.option.decal),th.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},jfe={performRawSeries:!0,overallReset:function(r){var e=ve();r.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),aI(t).scope=a}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var n=t.getRawData(),i={},a=t.getData(),o=aI(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=q6(t,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var h=a.ensureUniqueItemVisual(c,"style"),d=n.getName(u)||u+"",p=n.count();h[l]=t.getColorFromPalette(d,o,p)}})}})}},Nv=Math.PI;function Nfe(r,e){e=e||{},Ce(e,{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 t=new Ee,n=new nt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(n);var i=new ot({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new nt({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(a);var o;return e.showSpinner&&(o=new U0({shape:{startAngle:-Nv/2,endAngle:-Nv/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Nv*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Nv*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var X6=function(){function r(e,t,n,i){this._stageTaskMap=ve(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!t&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__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}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=ve();e.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}),t._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;k(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";vn(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,t,n),i.overallReset&&this._createOverallStageTask(i,a,t,n)},this)},r.prototype.prepareView=function(e,t,n,i){var a=e.renderTask,o=a.context;o.model=t,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(t,a)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},r.prototype._performStageTasks=function(e,t,n,i){i=i||{};var a=!1,o=this;k(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var d,p=h.agentStubMap;p.each(function(m){s(i,m)&&(m.dirty(),d=!0)}),d&&h.dirty(),o.updatePayload(h,n);var v=o.getPerformArgs(h,i.block);p.each(function(m){m.perform(v)}),h.perform(v)&&(a=!0)}else f&&f.each(function(m,g){s(i,m)&&m.dirty();var y=o.getPerformArgs(m,i.block);y.skip=!l.performRawSeries&&t.isSeriesFiltered(m.context.model),o.updatePayload(m,n),m.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(n){t=n.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,n,i){var a=this,o=t.seriesTaskMap,s=t.seriesTaskMap=ve(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(f){var h=f.uid,d=s.set(h,o&&o.get(h)||hd({plan:$fe,reset:Hfe,count:Wfe}));d.context={model:f,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(f,d)}},r.prototype._createOverallStageTask=function(e,t,n,i){var a=this,o=t.overallTask=t.overallTask||hd({reset:Bfe});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=ve(),u=e.seriesType,c=e.getTargetSeries,f=!0,h=!1,d="";vn(!e.createOnAllSeries,d),u?n.eachRawSeriesByType(u,p):c?c(n,i).each(p):(f=!1,k(n.getSeries(),p));function p(v){var m=v.uid,g=l.set(m,s&&s.get(m)||(h=!0,hd({reset:zfe,onDirty:Vfe})));g.context={model:v,overallProgress:f},g.agent=o,g.__block=f,a._pipe(v,g)}h&&o.dirty()},r.prototype._pipe=function(e,t){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=t),i.tail&&i.tail.pipe(t),i.tail=t,t.__idxInPipeline=i.count++,t.__pipeline=i},r.wrapStageHandler=function(e,t){return Te(e)&&(e={overallReset:e,seriesType:Ufe(e)}),e.uid=wf("stageHandler"),t&&(e.visualType=t),e},r}();function Bfe(r){r.overallReset(r.ecModel,r.api,r.payload)}function zfe(r){return r.overallProgress&&Ffe}function Ffe(){this.agent.dirty(),this.getDownstream().dirty()}function Vfe(){this.agent&&this.agent.dirty()}function $fe(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function Hfe(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=wt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?K(e,function(t,n){return K6(n)}):Gfe}var Gfe=K6(0);function K6(r){return function(e,t){var n=t.data,i=t.resetDefines[r];if(i&&i.dataEach)for(var a=e.start;a<e.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(e,n)}}function Wfe(r){return r.data.count()}function Ufe(r){Cy=null;try{r(Xd,Z6)}catch{}return Cy}var Xd={},Z6={},Cy;J6(Xd,$C);J6(Z6,w6);Xd.eachSeriesByType=Xd.eachRawSeriesByType=function(r){Cy=r};Xd.eachComponent=function(r){r.mainType==="series"&&r.subType&&(Cy=r.subType)};function J6(r,e){for(var t in e.prototype)r[t]=tr}var sI=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const Yfe={color:sI,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],sI]};var Yr="#B9B8CE",lI="#100C2A",Bv=function(){return{axisLine:{lineStyle:{color:Yr}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},uI=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],Q6={darkMode:!0,color:uI,backgroundColor:lI,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Yr},pageTextStyle:{color:Yr}},textStyle:{color:Yr},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Yr}},dataZoom:{borderColor:"#71708A",textStyle:{color:Yr},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:Yr}},timeline:{lineStyle:{color:Yr},label:{color:Yr},controlStyle:{color:Yr,borderColor:Yr}},calendar:{itemStyle:{color:lI},dayLabel:{color:Yr},monthLabel:{color:Yr},yearLabel:{color:Yr}},timeAxis:Bv(),logAxis:Bv(),valueAxis:Bv(),categoryAxis:Bv(),line:{symbol:"circle"},graph:{color:uI},gauge:{title:{color:Yr},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Yr},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};Q6.categoryAxis.splitLine.show=!1;var qfe=function(){function r(){}return r.prototype.normalizeQuery=function(e){var t={},n={},i={};if(se(e)){var a=va(e);t.mainType=a.main||null,t.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};k(e,function(l,u){for(var c=!1,f=0;f<o.length;f++){var h=o[f],d=u.lastIndexOf(h);if(d>0&&d===u.length-h.length){var p=u.slice(0,d);p!=="data"&&(t.mainType=p,t[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:t,dataQuery:n,otherQuery:i}},r.prototype.filter=function(e,t){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=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,i,a));function c(f,h,d,p){return f[d]==null||h[p||d]===f[d]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),R2=["symbol","symbolSize","symbolRotate","symbolOffset"],cI=R2.concat(["symbolKeepAspect"]),Xfe={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<R2.length;o++){var s=R2[o],l=r.get(s);Te(l)?(a=!0,i[s]=l):n[s]=l}if(n.symbol=n.symbol||r.defaultSymbol,t.setVisual(W({legendIcon:r.legendIcon||n.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},n)),e.isSeriesFiltered(r))return;var u=et(i);function c(f,h){for(var d=r.getRawValue(h),p=r.getDataParams(h),v=0;v<u.length;v++){var m=u[v];f.setItemVisual(h,m,i[m](d,p))}}return{dataEach:a?c:null}}},Kfe={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!r.hasSymbolVisual||e.isSeriesFiltered(r))return;var t=r.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<cI.length;s++){var l=cI[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(a,l,u)}}return{dataEach:t.hasItemOption?n:null}}};function qC(r,e,t){switch(t){case"color":var n=r.getItemVisual(e,"style");return n[r.getVisual("drawType")];case"opacity":return r.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(e,t)}}function Ep(r,e){switch(e){case"color":var t=r.getVisual("style");return t[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(e)}}function eF(r,e,t,n){switch(t){case"color":var i=r.ensureUniqueItemVisual(e,"style");i[r.getVisual("drawType")]=n,r.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(e,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(e,t,n);break}}function tF(r,e){function t(n,i){var a=[];return n.eachComponent({mainType:"series",subType:r,query:i},function(o){a.push(o.seriesIndex)}),a}k([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(n){e(n[0],function(i,a,o){i=W({},i),o.dispatchAction(W(i,{type:n[1],seriesIndex:t(a,i)}))})})}function nc(r,e,t,n,i){var a=r+e;t.isSilent(a)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var f=o.getData(),h=vu(f,i.fromActionPayload);t.trigger(a,{type:a,seriesId:o.id,name:q(h)?f.getName(h[0]):f.getName(h),selected:se(l)?l:W({},l)})}})}function Zfe(r,e,t){r.on("selectchanged",function(n){var i=t.getModel();n.isFromClick?(nc("map","selectchanged",e,i,n),nc("pie","selectchanged",e,i,n)):n.fromAction==="select"?(nc("map","selected",e,i,n),nc("pie","selected",e,i,n)):n.fromAction==="unselect"&&(nc("map","unselected",e,i,n),nc("pie","unselected",e,i,n))})}function Ol(r,e,t){for(var n;r&&!(e(r)&&(n=r,t));)r=r.__hostTarget||r.parent;return n}var Jfe=Math.round(Math.random()*9),Qfe=typeof Object.defineProperty=="function",ehe=function(){function r(){this._id="__ec_inner_"+Jfe++}return r.prototype.get=function(e){return this._guard(e)[this._id]},r.prototype.set=function(e,t){var n=this._guard(e);return Qfe?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},r.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},r.prototype.has=function(e){return!!this._guard(e)[this._id]},r.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},r}(),the=Xe.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,i=e.width/2,a=e.height/2;r.moveTo(t,n-a),r.lineTo(t+i,n+a),r.lineTo(t-i,n+a),r.closePath()}}),rhe=Xe.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,i=e.width/2,a=e.height/2;r.moveTo(t,n-a),r.lineTo(t+i,n),r.lineTo(t,n+a),r.lineTo(t-i,n),r.closePath()}}),nhe=Xe.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.x,n=e.y,i=e.width/5*3,a=Math.max(i,e.height),o=i/2,s=o*o/(a-o),l=n-a+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,f=Math.sin(u),h=Math.cos(u),d=o*.6,p=o*.7;r.moveTo(t-c,l+s),r.arc(t,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(t+c-f*d,l+s+h*d,t,n-p,t,n),r.bezierCurveTo(t,n-p,t-c+f*d,l+s+h*d,t-c,l+s),r.closePath()}}),ihe=Xe.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.height,n=e.width,i=e.x,a=e.y,o=n/3*2;r.moveTo(i,a),r.lineTo(i+o,a+t),r.lineTo(i,a+t/4*3),r.lineTo(i-o,a+t),r.lineTo(i,a),r.closePath()}}),ahe={line:xr,rect:nt,roundRect:nt,square:nt,circle:Eo,diamond:rhe,pin:nhe,arrow:ihe,triangle:the},ohe={line:function(r,e,t,n,i){i.x1=r,i.y1=e+n/2,i.x2=r+t,i.y2=e+n/2},rect:function(r,e,t,n,i){i.x=r,i.y=e,i.width=t,i.height=n},roundRect:function(r,e,t,n,i){i.x=r,i.y=e,i.width=t,i.height=n,i.r=Math.min(t,n)/4},square:function(r,e,t,n,i){var a=Math.min(t,n);i.x=r,i.y=e,i.width=a,i.height=a},circle:function(r,e,t,n,i){i.cx=r+t/2,i.cy=e+n/2,i.r=Math.min(t,n)/2},diamond:function(r,e,t,n,i){i.cx=r+t/2,i.cy=e+n/2,i.width=t,i.height=n},pin:function(r,e,t,n,i){i.x=r+t/2,i.y=e+n/2,i.width=t,i.height=n},arrow:function(r,e,t,n,i){i.x=r+t/2,i.y=e+n/2,i.width=t,i.height=n},triangle:function(r,e,t,n,i){i.cx=r+t/2,i.cy=e+n/2,i.width=t,i.height=n}},Ay={};k(ahe,function(r,e){Ay[e]=new r});var she=Xe.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,e,t){var n=vy(r,e,t),i=this.shape;return i&&i.symbolType==="pin"&&e.position==="inside"&&(n.y=t.y+t.height*.4),n},buildPath:function(r,e,t){var n=e.symbolType;if(n!=="none"){var i=Ay[n];i||(n="rect",i=Ay[n]),ohe[n](e.x,e.y,e.width,e.height,i.shape),i.buildPath(r,i.shape,t)}}});function lhe(r,e){if(this.type!=="image"){var t=this.style;this.__isEmptyBrush?(t.stroke=r,t.fill=e||"#fff",t.lineWidth=2):this.shape.symbolType==="line"?t.stroke=r:t.fill=r,this.markRedraw()}}function ur(r,e,t,n,i,a,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=Hz(r.slice(8),new Ve(e,t,n,i),o?"center":"cover"):r.indexOf("path://")===0?l=Y0(r.slice(7),{},new Ve(e,t,n,i),o?"center":"cover"):l=new she({shape:{symbolType:r,x:e,y:t,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=lhe,a&&l.setColor(a),l}function kf(r){return q(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function Pu(r,e){if(r!=null)return q(r)||(r=[r,r]),[ie(r[0],e[0])||0,ie(Re(r[1],r[0]),e[1])||0]}function jl(r){return isFinite(r)}function uhe(r,e,t){var n=e.x==null?0:e.x,i=e.x2==null?1:e.x2,a=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*t.width+t.x,i=i*t.width+t.x,a=a*t.height+t.y,o=o*t.height+t.y),n=jl(n)?n:0,i=jl(i)?i:1,a=jl(a)?a:0,o=jl(o)?o:0;var s=r.createLinearGradient(n,a,i,o);return s}function che(r,e,t){var n=t.width,i=t.height,a=Math.min(n,i),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(o=o*n+t.x,s=s*i+t.y,l=l*a),o=jl(o)?o:.5,s=jl(s)?s:.5,l=l>=0&&jl(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function O2(r,e,t){for(var n=e.type==="radial"?che(r,e,t):uhe(r,e,t),i=e.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function fhe(r,e){if(r===e||!r&&!e)return!1;if(!r||!e||r.length!==e.length)return!0;for(var t=0;t<r.length;t++)if(r[t]!==e[t])return!0;return!1}function zv(r){return parseInt(r,10)}function Ec(r,e,t){var n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(t[n]!=null&&t[n]!=="auto")return parseFloat(t[n]);var s=document.defaultView.getComputedStyle(r);return(r[i]||zv(s[n])||zv(r.style[n]))-(zv(s[a])||0)-(zv(s[o])||0)|0}function hhe(r,e){return!r||r==="solid"||!(e>0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:lt(r)?[r]:q(r)?r:null}function XC(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&hhe(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(t){var i=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;i&&i!==1&&(t=K(t,function(a){return a/i}),n/=i)}return[t,n]}var dhe=new Ra(!0);function My(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function fI(r){return typeof r=="string"&&r!=="none"}function ky(r){var e=r.fill;return e!=null&&e!=="none"}function hI(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function dI(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function j2(r,e,t){var n=xC(e.image,e.__image,t);if(F0(n)){var i=r.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*Om),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function phe(r,e,t,n){var i,a=My(t),o=ky(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||dhe,f=e.__dirty;if(!n){var h=t.fill,d=t.stroke,p=o&&!!h.colorStops,v=a&&!!d.colorStops,m=o&&!!h.image,g=a&&!!d.image,y=void 0,b=void 0,_=void 0,x=void 0,w=void 0;(p||v)&&(w=e.getBoundingRect()),p&&(y=f?O2(r,h,w):e.__canvasFillGradient,e.__canvasFillGradient=y),v&&(b=f?O2(r,d,w):e.__canvasStrokeGradient,e.__canvasStrokeGradient=b),m&&(_=f||!e.__canvasFillPattern?j2(r,h,e):e.__canvasFillPattern,e.__canvasFillPattern=_),g&&(x=f||!e.__canvasStrokePattern?j2(r,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=_),p?r.fillStyle=y:m&&(_?r.fillStyle=_:o=!1),v?r.strokeStyle=b:g&&(x?r.strokeStyle=x:a=!1)}var S=e.getGlobalScale();c.setScale(S[0],S[1],e.segmentIgnoreThreshold);var T,C;r.setLineDash&&t.lineDash&&(i=XC(e),T=i[0],C=i[1]);var A=!0;(u||f&xc)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),A=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),A&&c.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=C),n||(t.strokeFirst?(a&&dI(r,t),o&&hI(r,t)):(o&&hI(r,t),a&&dI(r,t))),T&&r.setLineDash([])}function vhe(r,e,t){var n=e.__image=xC(t.image,e.__image,e,e.onload);if(!(!n||!F0(n))){var i=t.x||0,a=t.y||0,o=e.getWidth(),s=e.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),t.sWidth&&t.sHeight){var u=t.sx||0,c=t.sy||0;r.drawImage(n,u,c,t.sWidth,t.sHeight,i,a,o,s)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,f=o-u,h=s-c;r.drawImage(n,u,c,f,h,i,a,o,s)}else r.drawImage(n,i,a,o,s)}}function mhe(r,e,t){var n,i=t.text;if(i!=null&&(i+=""),i){r.font=t.font||Ms,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var a=void 0,o=void 0;r.setLineDash&&t.lineDash&&(n=XC(e),a=n[0],o=n[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),t.strokeFirst?(My(t)&&r.strokeText(i,t.x,t.y),ky(t)&&r.fillText(i,t.x,t.y)):(ky(t)&&r.fillText(i,t.x,t.y),My(t)&&r.strokeText(i,t.x,t.y)),a&&r.setLineDash([])}}var pI=["shadowBlur","shadowOffsetX","shadowOffsetY"],vI=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function rF(r,e,t,n,i){var a=!1;if(!n&&(t=t||{},e===t))return!1;if(n||e.opacity!==t.opacity){An(r,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?eu.opacity:o}(n||e.blend!==t.blend)&&(a||(An(r,i),a=!0),r.globalCompositeOperation=e.blend||eu.blend);for(var s=0;s<pI.length;s++){var l=pI[s];(n||e[l]!==t[l])&&(a||(An(r,i),a=!0),r[l]=r.dpr*(e[l]||0))}return(n||e.shadowColor!==t.shadowColor)&&(a||(An(r,i),a=!0),r.shadowColor=e.shadowColor||eu.shadowColor),a}function mI(r,e,t,n,i){var a=Kd(e,i.inHover),o=n?null:t&&Kd(t,i.inHover)||{};if(a===o)return!1;var s=rF(r,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(An(r,i),s=!0),fI(a.fill)&&(r.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(An(r,i),s=!0),fI(a.stroke)&&(r.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(An(r,i),s=!0),r.globalAlpha=a.opacity==null?1:a.opacity),e.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&e.getLineScale?e.getLineScale():1);r.lineWidth!==u&&(s||(An(r,i),s=!0),r.lineWidth=u)}for(var c=0;c<vI.length;c++){var f=vI[c],h=f[0];(n||a[h]!==o[h])&&(s||(An(r,i),s=!0),r[h]=a[h]||f[1])}return s}function ghe(r,e,t,n,i){return rF(r,Kd(e,i.inHover),t&&Kd(t,i.inHover),n,i)}function nF(r,e){var t=e.transform,n=r.dpr||1;t?r.setTransform(n*t[0],n*t[1],n*t[2],n*t[3],n*t[4],n*t[5]):r.setTransform(n,0,0,n,0,0)}function yhe(r,e,t){for(var n=!1,i=0;i<r.length;i++){var a=r[i];n=n||a.isZeroArea(),nF(e,a),e.beginPath(),a.buildPath(e,a.shape),e.clip()}t.allClipped=n}function bhe(r,e){return r&&e?r[0]!==e[0]||r[1]!==e[1]||r[2]!==e[2]||r[3]!==e[3]||r[4]!==e[4]||r[5]!==e[5]:!(!r&&!e)}var gI=1,yI=2,bI=3,_I=4;function _he(r){var e=ky(r),t=My(r);return!(r.lineDash||!(+e^+t)||e&&typeof r.fill!="string"||t&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function An(r,e){e.batchFill&&r.fill(),e.batchStroke&&r.stroke(),e.batchFill="",e.batchStroke=""}function Kd(r,e){return e&&r.__hoverStyle||r.style}function iF(r,e){Nl(r,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Nl(r,e,t,n){var i=e.transform;if(!e.shouldBePainted(t.viewWidth,t.viewHeight,!1,!1)){e.__dirty&=~On,e.__isRendered=!1;return}var a=e.__clipPaths,o=t.prevElClipPaths,s=!1,l=!1;if((!o||fhe(a,o))&&(o&&o.length&&(An(r,t),r.restore(),l=s=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),a&&a.length&&(An(r,t),r.save(),yhe(a,r,t),s=!0),t.prevElClipPaths=a),t.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=t.prevEl;u||(l=s=!0);var c=e instanceof Xe&&e.autoBatch&&_he(e.style);s||bhe(i,u.transform)?(An(r,t),nF(r,e)):c||An(r,t);var f=Kd(e,t.inHover);e instanceof Xe?(t.lastDrawType!==gI&&(l=!0,t.lastDrawType=gI),mI(r,e,u,l,t),(!c||!t.batchFill&&!t.batchStroke)&&r.beginPath(),phe(r,e,f,c),c&&(t.batchFill=f.fill||"",t.batchStroke=f.stroke||"")):e instanceof Qc?(t.lastDrawType!==bI&&(l=!0,t.lastDrawType=bI),mI(r,e,u,l,t),mhe(r,e,f)):e instanceof Lr?(t.lastDrawType!==yI&&(l=!0,t.lastDrawType=yI),ghe(r,e,u,l,t),vhe(r,e,f)):e.getTemporalDisplayables&&(t.lastDrawType!==_I&&(l=!0,t.lastDrawType=_I),xhe(r,e,t)),c&&n&&An(r,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function xhe(r,e,t){var n=e.getDisplayables(),i=e.getTemporalDisplayables();r.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:t.viewWidth,viewHeight:t.viewHeight,inHover:t.inHover},o,s;for(o=e.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Nl(r,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,c=i.length;u<c;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Nl(r,l,a,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,r.restore()}var s_=new ehe,xI=new _p(100),wI=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function rf(r,e){if(r==="none")return null;var t=e.getDevicePixelRatio(),n=e.getZr(),i=n.painter.type==="svg";r.dirty&&s_.delete(r);var a=s_.get(r);if(a)return a;var o=Ce(r,{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/t,s_.set(r,s),r.dirty=!1,s;function l(u){for(var c=[t],f=!0,h=0;h<wI.length;++h){var d=o[wI[h]];if(d!=null&&!q(d)&&!se(d)&&!lt(d)&&typeof d!="boolean"){f=!1;break}c.push(d)}var p;if(f){p=c.join(",")+(i?"-svg":"");var v=xI.get(p);v&&(i?u.svgElement=v:u.image=v)}var m=oF(o.dashArrayX),g=whe(o.dashArrayY),y=aF(o.symbol),b=She(m),_=sF(g),x=!i&&ks.createCanvas(),w=i&&{tag:"g",attrs:{},key:"dcl",children:[]},S=C(),T;x&&(x.width=S.width*t,x.height=S.height*t,T=x.getContext("2d")),A(),f&&xI.put(p,x||w),u.image=x,u.svgElement=w,u.svgWidth=S.width,u.svgHeight=S.height;function C(){for(var M=1,D=0,E=b.length;D<E;++D)M=zE(M,b[D]);for(var L=1,D=0,E=y.length;D<E;++D)L=zE(L,y[D].length);M*=L;var I=_*b.length*y.length;return{width:Math.max(1,Math.min(M,o.maxTileWidth)),height:Math.max(1,Math.min(I,o.maxTileHeight))}}function A(){T&&(T.clearRect(0,0,x.width,x.height),o.backgroundColor&&(T.fillStyle=o.backgroundColor,T.fillRect(0,0,x.width,x.height)));for(var M=0,D=0;D<g.length;++D)M+=g[D];if(M<=0)return;for(var E=-_,L=0,I=0,R=0;E<S.height;){if(L%2===0){for(var P=I/2%y.length,O=0,j=0,F=0;O<S.width*2;){for(var N=0,D=0;D<m[R].length;++D)N+=m[R][D];if(N<=0)break;if(j%2===0){var B=(1-o.symbolSize)*.5,$=O+m[R][j]*B,J=E+g[L]*B,U=m[R][j]*o.symbolSize,we=g[L]*o.symbolSize,Ye=F/2%y[P].length;ge($,J,U,we,y[P][Ye])}O+=m[R][j],++F,++j,j===m[R].length&&(j=0)}++R,R===m.length&&(R=0)}E+=g[L],++I,++L,L===g.length&&(L=0)}function ge(le,be,re,G,ee){var Q=i?1:t,me=ur(ee,le*Q,be*Q,re*Q,G*Q,o.color,o.symbolKeepAspect);if(i){var he=n.painter.renderOneToVNode(me);he&&w.children.push(he)}else iF(T,me)}}}}function aF(r){if(!r||r.length===0)return[["rect"]];if(se(r))return[[r]];for(var e=!0,t=0;t<r.length;++t)if(!se(r[t])){e=!1;break}if(e)return aF([r]);for(var n=[],t=0;t<r.length;++t)se(r[t])?n.push([r[t]]):n.push(r[t]);return n}function oF(r){if(!r||r.length===0)return[[0,0]];if(lt(r)){var e=Math.ceil(r);return[[e,e]]}for(var t=!0,n=0;n<r.length;++n)if(!lt(r[n])){t=!1;break}if(t)return oF([r]);for(var i=[],n=0;n<r.length;++n)if(lt(r[n])){var e=Math.ceil(r[n]);i.push([e,e])}else{var e=K(r[n],function(s){return Math.ceil(s)});e.length%2===1?i.push(e.concat(e)):i.push(e)}return i}function whe(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(lt(r)){var e=Math.ceil(r);return[e,e]}var t=K(r,function(n){return Math.ceil(n)});return r.length%2?t.concat(t):t}function She(r){return K(r,function(e){return sF(e)})}function sF(r){for(var e=0,t=0;t<r.length;++t)e+=r[t];return r.length%2===1?e*2:e}function The(r,e){r.eachRawSeries(function(t){if(!r.isSeriesFiltered(t)){var n=t.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=rf(s,e)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=rf(i,e)}}})}var Qi=new gi,lF={};function Che(r,e){lF[r]=e}function Ahe(r){return lF[r]}var Mhe=1,khe=800,Dhe=900,Ehe=1e3,Lhe=2e3,Ihe=5e3,uF=1e3,Phe=1100,KC=2e3,cF=3e3,Rhe=4e3,a1=4500,Ohe=4600,jhe=5e3,Nhe=6e3,fF=7e3,Bhe={PROCESSOR:{FILTER:Ehe,SERIES_FILTER:khe,STATISTIC:Ihe},VISUAL:{LAYOUT:uF,PROGRESSIVE_LAYOUT:Phe,GLOBAL:KC,CHART:cF,POST_CHART_LAYOUT:Ohe,COMPONENT:Rhe,BRUSH:jhe,CHART_ITEM:a1,ARIA:Nhe,DECAL:fF}},Ur="__flagInMainProcess",wn="__pendingUpdate",l_="__needsUpdateStatus",SI=/^[a-zA-Z0-9_]+$/;function hF(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){this.id;return}return pF(this,r,e)}}function dF(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return pF(this,r,e)}}function pF(r,e,t){return t[0]=t[0]&&t[0].toLowerCase(),gi.prototype[e].apply(r,t)}var vF=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(gi),mF=vF.prototype;mF.on=dF("on");mF.off=dF("off");var ic,u_,Fv,Vo,c_,f_,h_,rh,nh,TI,CI,d_,AI,Vv,MI,Wn,kI,zhe=function(r){z(e,r);function e(t,n,i){var a=r.call(this,new qfe)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},se(n)&&(n=gF[n]),a._dom=t;var o="canvas",s="auto",l=!1;i.ssr&&Ose(function(h){var d=Le(h),p=d.dataIndex;if(p!=null){var v=ve();return v.set("series_index",d.seriesIndex),v.set("data_index",p),d.ssrType&&v.set("ssr_type",d.ssrType),v}});var u=a._zr=OE(t,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:Re(i.useDirtyRect,l),useCoarsePointer:Re(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=YC(ue(u.flush,u),17),n=ke(n),n&&T6(n,!0),a._theme=n,a._locale=ace(i.locale||Qz),a._coordSysMgr=new Dp;var c=a._api=MI(a);function f(h,d){return h.__prio-d.__prio}return Bm(Ly,f),Bm(N2,f),a._scheduler=new X6(a,c,N2,Ly),a._messageCenter=new vF,a._initEvents(),a.resize=ue(a.resize,a),u.animation.on("frame",a._onframe,a),TI(u,a),CI(u,a),sy(a),a}return e.prototype._onframe=function(){if(!this._disposed){kI(this);var t=this._scheduler;if(this[wn]){var n=this[wn].silent;this[Ur]=!0;try{ic(this),Vo.update.call(this,null,this[wn].updateParams)}catch(l){throw this[Ur]=!1,this[wn]=null,l}this._zr.flush(),this[Ur]=!1,this[wn]=null,rh.call(this,n),nh.call(this,n)}else if(t.unfinished){var i=Mhe,a=this._model,o=this._api;t.unfinished=!1;do{var s=+new Date;t.performSeriesTasks(a),t.performDataProcessorTasks(a),f_(this,a),t.performVisualTasks(a),Vv(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,n,i){if(!this[Ur]){if(this._disposed){this.id;return}var a,o,s;if(Me(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Ur]=!0,!this._model||n){var l=new Ece(this._api),u=this._theme,c=this._model=new $C;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},B2);var f={seriesTransition:s,optionChanged:!0};if(i)this[wn]={silent:a,updateParams:f},this[Ur]=!1,this.getZr().wakeUp();else{try{ic(this),Vo.update.call(this,null,f)}catch(h){throw this[wn]=null,this[Ur]=!1,h}this._ssr||this._zr.flush(),this[wn]=null,this[Ur]=!1,rh.call(this,a),nh.call(this,a)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ze.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var n=this._zr.painter;return n.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(Ze.svgSupported){var t=this._zr,n=t.storage.getDisplayList();return k(n,function(i){i.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var n=t.excludeComponents,i=this._model,a=[],o=this;k(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return k(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var n=t.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(Vhe[i]){var l=s,u=s,c=-s,f=-s,h=[],d=t&&t.pixelRatio||this.getDevicePixelRatio();k(DI,function(b,_){if(b.group===i){var x=n?b.getZr().painter.getSvgDom().innerHTML:b.renderToCanvas(ke(t)),w=b.getDom().getBoundingClientRect();l=a(w.left,l),u=a(w.top,u),c=o(w.right,c),f=o(w.bottom,f),h.push({dom:x,left:w.left,top:w.top})}}),l*=d,u*=d,c*=d,f*=d;var p=c-l,v=f-u,m=ks.createCanvas(),g=OE(m,{renderer:n?"svg":"canvas"});if(g.resize({width:p,height:v}),n){var y="";return k(h,function(b){var _=b.left-l,x=b.top-u;y+='<g transform="translate('+_+","+x+')">'+b.dom+"</g>"}),g.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return t.connectedBackgroundColor&&g.add(new nt({shape:{x:0,y:0,width:p,height:v},style:{fill:t.connectedBackgroundColor}})),k(h,function(b){var _=new Lr({style:{x:b.left*d-l,y:b.top*d-u,image:b.dom}});g.add(_)}),g.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,n){return c_(this,"convertToPixel",t,n)},e.prototype.convertFromPixel=function(t,n){return c_(this,"convertFromPixel",t,n)},e.prototype.containPixel=function(t,n){if(this._disposed){this.id;return}var i=this._model,a,o=sd(i,t);return k(o,function(s,l){l.indexOf("Models")>=0&&k(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(a=a||f.containPoint(n,u))}},this)},this),!!a},e.prototype.getVisual=function(t,n){var i=this._model,a=sd(i,t,{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?qC(s,l,n):Ep(s,n)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;k(Fhe,function(n){var i=function(a){var o=t.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&Ol(s,function(p){var v=Le(p);if(v&&v.dataIndex!=null){var m=v.dataModel||o.getSeriesByIndex(v.seriesIndex);return l=m&&m.getDataParams(v.dataIndex,v.dataType,s)||{},!0}else if(v.eventData)return l=W({},v.eventData),!0},!0),l){var c=l.componentType,f=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",f=l.seriesIndex);var h=c&&f!=null&&o.getComponent(c,f),d=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];l.event=a,l.type=n,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:h,view:d},t.trigger(n,l)}};i.zrEventfulCallAtLast=!0,t._zr.on(n,i,t)}),k(Ey,function(n,i){t._messageCenter.on(i,function(a){this.trigger(i,a)},t)}),k(["selectchanged"],function(n){t._messageCenter.on(n,function(i){this.trigger(n,i)},t)}),Zfe(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&tle(this.getDom(),$he,"");var n=this,i=n._api,a=n._model;k(n._componentsViews,function(o){o.dispose(a,i)}),k(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 DI[n.id]},e.prototype.resize=function(t){if(!this[Ur]){if(this._disposed){this.id;return}this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=t&&t.silent;this[wn]&&(a==null&&(a=this[wn].silent),i=!0,this[wn]=null),this[Ur]=!0;try{i&&ic(this),Vo.update.call(this,{type:"resize",animation:W({duration:0},t&&t.animation)})}catch(o){throw this[Ur]=!1,o}this[Ur]=!1,rh.call(this,a),nh.call(this,a)}}},e.prototype.showLoading=function(t,n){if(this._disposed){this.id;return}if(Me(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),!!z2[t]){var i=z2[t](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var n=W({},t);return n.type=Ey[t.type],n},e.prototype.dispatchAction=function(t,n){if(this._disposed){this.id;return}if(Me(n)||(n={silent:!!n}),!!Dy[t.type]&&this._model){if(this[Ur]){this._pendingActions.push(t);return}var i=n.silent;h_.call(this,t,i);var a=n.flush;a?this._zr.flush():a!==!1&&Ze.browser.weChat&&this._throttledZrFlush(),rh.call(this,i),nh.call(this,i)}},e.prototype.updateLabelLayout=function(){Qi.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var n=t.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){ic=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),u_(f,!0),u_(f,!1),h.plan()},u_=function(f,h){for(var d=f._model,p=f._scheduler,v=h?f._componentsViews:f._chartsViews,m=h?f._componentsMap:f._chartsMap,g=f._zr,y=f._api,b=0;b<v.length;b++)v[b].__alive=!1;h?d.eachComponent(function(w,S){w!=="series"&&_(S)}):d.eachSeries(_);function _(w){var S=w.__requireNewView;w.__requireNewView=!1;var T="_ec_"+w.id+"_"+w.type,C=!S&&m[T];if(!C){var A=va(w.type),M=h?zt.getClass(A.main,A.sub):St.getClass(A.sub);C=new M,C.init(d,y),m[T]=C,v.push(C),g.add(C.group)}w.__viewId=C.__id=T,C.__alive=!0,C.__model=w,C.group.__ecComponentInfo={mainType:w.mainType,index:w.componentIndex},!h&&p.prepareView(C,w,d,y)}for(var b=0;b<v.length;){var x=v[b];x.__alive?b++:(!h&&x.renderTask.dispose(),g.remove(x.group),x.dispose(d,y),v.splice(b,1),m[x.__id]===x&&delete m[x.__id],x.__id=x.group.__ecComponentInfo=null)}},Fv=function(f,h,d,p,v){var m=f._model;if(m.setUpdatePayload(d),!p){k([].concat(f._componentsViews).concat(f._chartsViews),x);return}var g={};g[p+"Id"]=d[p+"Id"],g[p+"Index"]=d[p+"Index"],g[p+"Name"]=d[p+"Name"];var y={mainType:p,query:g};v&&(y.subType=v);var b=d.excludeSeriesId,_;b!=null&&(_=ve(),k(wt(b),function(w){var S=vr(w,null);S!=null&&_.set(S,!0)})),m&&m.eachComponent(y,function(w){var S=_&&_.get(w.id)!=null;if(!S)if(fL(d))if(w instanceof It)d.type===tu&&!d.notBlur&&!w.get(["emphasis","disabled"])&&iue(w,d,f._api);else{var T=MC(w.mainType,w.componentIndex,d.name,f._api),C=T.focusSelf,A=T.dispatchers;d.type===tu&&C&&!d.notBlur&&b2(w.mainType,w.componentIndex,f._api),A&&k(A,function(M){d.type===tu?wo(M):So(M)})}else x2(d)&&w instanceof It&&(sue(w,d,f._api),uL(w),Wn(f))},f),m&&m.eachComponent(y,function(w){var S=_&&_.get(w.id)!=null;S||x(f[p==="series"?"_chartsMap":"_componentsMap"][w.__viewId])},f);function x(w){w&&w.__alive&&w[h]&&w[h](w.__model,m,f._api,d)}},Vo={prepareAndUpdate:function(f){ic(this),Vo.update.call(this,f,{optionChanged:f.newOption!=null})},update:function(f,h){var d=this._model,p=this._api,v=this._zr,m=this._coordSysMgr,g=this._scheduler;if(d){d.setUpdatePayload(f),g.restoreData(d,f),g.performSeriesTasks(d),m.create(d,p),g.performDataProcessorTasks(d,f),f_(this,d),m.update(d,p),t(d),g.performVisualTasks(d,f),d_(this,d,p,f,h);var y=d.get("backgroundColor")||"transparent",b=d.get("darkMode");v.setBackgroundColor(y),b!=null&&b!=="auto"&&v.setDarkMode(b),Qi.trigger("afterupdate",d,p)}},updateTransform:function(f){var h=this,d=this._model,p=this._api;if(d){d.setUpdatePayload(f);var v=[];d.eachComponent(function(g,y){if(g!=="series"){var b=h.getViewOfComponentModel(y);if(b&&b.__alive)if(b.updateTransform){var _=b.updateTransform(y,d,p,f);_&&_.update&&v.push(b)}else v.push(b)}});var m=ve();d.eachSeries(function(g){var y=h._chartsMap[g.__viewId];if(y.updateTransform){var b=y.updateTransform(g,d,p,f);b&&b.update&&m.set(g.uid,1)}else m.set(g.uid,1)}),t(d),this._scheduler.performVisualTasks(d,f,{setDirty:!0,dirtyMap:m}),Vv(this,d,p,f,{},m),Qi.trigger("afterupdate",d,p)}},updateView:function(f){var h=this._model;h&&(h.setUpdatePayload(f),St.markUpdateMethod(f,"updateView"),t(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0}),d_(this,h,this._api,f,{}),Qi.trigger("afterupdate",h,this._api))},updateVisual:function(f){var h=this,d=this._model;d&&(d.setUpdatePayload(f),d.eachSeries(function(p){p.getData().clearAllVisual()}),St.markUpdateMethod(f,"updateVisual"),t(d),this._scheduler.performVisualTasks(d,f,{visualType:"visual",setDirty:!0}),d.eachComponent(function(p,v){if(p!=="series"){var m=h.getViewOfComponentModel(v);m&&m.__alive&&m.updateVisual(v,d,h._api,f)}}),d.eachSeries(function(p){var v=h._chartsMap[p.__viewId];v.updateVisual(p,d,h._api,f)}),Qi.trigger("afterupdate",d,this._api))},updateLayout:function(f){Vo.update.call(this,f)}},c_=function(f,h,d,p){if(f._disposed){f.id;return}for(var v=f._model,m=f._coordSysMgr.getCoordinateSystems(),g,y=sd(v,d),b=0;b<m.length;b++){var _=m[b];if(_[h]&&(g=_[h](v,y,p))!=null)return g}},f_=function(f,h){var d=f._chartsMap,p=f._scheduler;h.eachSeries(function(v){p.updateStreamModes(v,d[v.__viewId])})},h_=function(f,h){var d=this,p=this.getModel(),v=f.type,m=f.escapeConnect,g=Dy[v],y=g.actionInfo,b=(y.update||"update").split(":"),_=b.pop(),x=b[0]!=null&&va(b[0]);this[Ur]=!0;var w=[f],S=!1;f.batch&&(S=!0,w=K(f.batch,function(L){return L=Ce(W({},L),f),L.batch=null,L}));var T=[],C,A=x2(f),M=fL(f);if(M&&Iz(this._api),k(w,function(L){if(C=g.action(L,d._model,d._api),C=C||W({},L),C.type=y.event||C.type,T.push(C),M){var I=bC(f),R=I.queryOptionMap,P=I.mainTypeSpecified,O=P?R.keys()[0]:"series";Fv(d,_,L,O),Wn(d)}else A?(Fv(d,_,L,"series"),Wn(d)):x&&Fv(d,_,L,x.main,x.sub)}),_!=="none"&&!M&&!A&&!x)try{this[wn]?(ic(this),Vo.update.call(this,f),this[wn]=null):Vo[_].call(this,f)}catch(L){throw this[Ur]=!1,L}if(S?C={type:y.event||v,escapeConnect:m,batch:T}:C=T[0],this[Ur]=!1,!h){var D=this._messageCenter;if(D.trigger(C.type,C),A){var E={type:"selectchanged",escapeConnect:m,selected:lue(p),isFromClick:f.isFromClick||!1,fromAction:f.type,fromActionPayload:f};D.trigger(E.type,E)}}},rh=function(f){for(var h=this._pendingActions;h.length;){var d=h.shift();h_.call(this,d,f)}},nh=function(f){!f&&this.trigger("updated")},TI=function(f,h){f.on("rendered",function(d){h.trigger("rendered",d),f.animation.isFinished()&&!h[wn]&&!h._scheduler.unfinished&&!h._pendingActions.length&&h.trigger("finished")})},CI=function(f,h){f.on("mouseover",function(d){var p=d.target,v=Ol(p,Hd);v&&(aue(v,d,h._api),Wn(h))}).on("mouseout",function(d){var p=d.target,v=Ol(p,Hd);v&&(oue(v,d,h._api),Wn(h))}).on("click",function(d){var p=d.target,v=Ol(p,function(y){return Le(y).dataIndex!=null},!0);if(v){var m=v.selected?"unselect":"select",g=Le(v);h._api.dispatchAction({type:m,dataType:g.dataType,dataIndexInside:g.dataIndex,seriesIndex:g.seriesIndex,isFromClick:!0})}})};function t(f){f.clearColorPalette(),f.eachSeries(function(h){h.clearColorPalette()})}function n(f){var h=[],d=[],p=!1;if(f.eachComponent(function(y,b){var _=b.get("zlevel")||0,x=b.get("z")||0,w=b.getZLevelKey();p=p||!!w,(y==="series"?d:h).push({zlevel:_,z:x,idx:b.componentIndex,type:y,key:w})}),p){var v=h.concat(d),m,g;Bm(v,function(y,b){return y.zlevel===b.zlevel?y.z-b.z:y.zlevel-b.zlevel}),k(v,function(y){var b=f.getComponent(y.type,y.idx),_=y.zlevel,x=y.key;m!=null&&(_=Math.max(m,_)),x?(_===m&&x!==g&&_++,g=x):g&&(_===m&&_++,g=""),m=_,b.setZLevel(_)})}}d_=function(f,h,d,p,v){n(h),AI(f,h,d,p,v),k(f._chartsViews,function(m){m.__alive=!1}),Vv(f,h,d,p,v),k(f._chartsViews,function(m){m.__alive||m.remove(h,d)})},AI=function(f,h,d,p,v,m){k(m||f._componentsViews,function(g){var y=g.__model;u(y,g),g.render(y,h,d,p),s(y,g),c(y,g)})},Vv=function(f,h,d,p,v,m){var g=f._scheduler;v=W(v||{},{updatedSeries:h.getSeries()}),Qi.trigger("series:beforeupdate",h,d,v);var y=!1;h.eachSeries(function(b){var _=f._chartsMap[b.__viewId];_.__alive=!0;var x=_.renderTask;g.updatePayload(x,p),u(b,_),m&&m.get(b.uid)&&x.dirty(),x.perform(g.getPerformArgs(x))&&(y=!0),_.group.silent=!!b.get("silent"),o(b,_),uL(b)}),g.unfinished=y||g.unfinished,Qi.trigger("series:layoutlabels",h,d,v),Qi.trigger("series:transition",h,d,v),h.eachSeries(function(b){var _=f._chartsMap[b.__viewId];s(b,_),c(b,_)}),a(f,h),Qi.trigger("series:afterupdate",h,d,v)},Wn=function(f){f[l_]=!0,f.getZr().wakeUp()},kI=function(f){f[l_]&&(f.getZr().storage.traverse(function(h){Nc(h)||i(h)}),f[l_]=!1)};function i(f){for(var h=[],d=f.currentStates,p=0;p<d.length;p++){var v=d[p];v==="emphasis"||v==="blur"||v==="select"||h.push(v)}f.selected&&f.states.select&&h.push("select"),f.hoverState===H0&&f.states.emphasis?h.push("emphasis"):f.hoverState===Sp&&f.states.blur&&h.push("blur"),f.useStates(h)}function a(f,h){var d=f._zr,p=d.storage,v=0;p.traverse(function(m){m.isGroup||v++}),v>h.get("hoverLayerThreshold")&&!Ze.node&&!Ze.worker&&h.eachSeries(function(m){if(!m.preventUsingHoverLayer){var g=f._chartsMap[m.__viewId];g.__alive&&g.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(f,h){var d=f.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=d)})}function s(f,h){if(!f.preventAutoZ){var d=f.get("z")||0,p=f.get("zlevel")||0;h.eachRendered(function(v){return l(v,d,p,-1/0),!0})}}function l(f,h,d,p){var v=f.getTextContent(),m=f.getTextGuideLine(),g=f.isGroup;if(g)for(var y=f.childrenRef(),b=0;b<y.length;b++)p=Math.max(l(y[b],h,d,p),p);else f.z=h,f.zlevel=d,p=Math.max(f.z2,p);if(v&&(v.z=h,v.zlevel=d,isFinite(p)&&(v.z2=p+2)),m){var _=f.textGuideLineConfig;m.z=h,m.zlevel=d,isFinite(p)&&(m.z2=p+(_&&_.showAbove?1:-1))}return p}function u(f,h){h.eachRendered(function(d){if(!Nc(d)){var p=d.getTextContent(),v=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function c(f,h){var d=f.getModel("stateAnimation"),p=f.isAnimationEnabled(),v=d.get("duration"),m=v>0?{duration:v,delay:d.get("delay"),easing:d.get("easing")}:null;h.eachRendered(function(g){if(g.states&&g.states.emphasis){if(Nc(g))return;if(g instanceof Xe&&due(g),g.__dirty){var y=g.prevStates;y&&g.useStates(y)}if(p){g.stateTransition=m;var b=g.getTextContent(),_=g.getTextGuideLine();b&&(b.stateTransition=m),_&&(_.stateTransition=m)}g.__dirty&&i(g)}})}MI=function(f){return new(function(h){z(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(p){for(;p;){var v=p.__ecComponentInfo;if(v!=null)return f._model.getComponent(v.mainType,v.index);p=p.parent}},d.prototype.enterEmphasis=function(p,v){wo(p,v),Wn(f)},d.prototype.leaveEmphasis=function(p,v){So(p,v),Wn(f)},d.prototype.enterBlur=function(p){kz(p),Wn(f)},d.prototype.leaveBlur=function(p){AC(p),Wn(f)},d.prototype.enterSelect=function(p){Dz(p),Wn(f)},d.prototype.leaveSelect=function(p){Ez(p),Wn(f)},d.prototype.getModel=function(){return f.getModel()},d.prototype.getViewOfComponentModel=function(p){return f.getViewOfComponentModel(p)},d.prototype.getViewOfSeriesModel=function(p){return f.getViewOfSeriesModel(p)},d}(w6))(f)}}(),e}(gi),ZC=zhe.prototype;ZC.on=hF("on");ZC.off=hF("off");ZC.one=function(r,e,t){var n=this;function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];e&&e.apply&&e.apply(this,a),n.off(r,i)}this.on.call(this,r,i,t)};var Fhe=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var Dy={},Ey={},N2=[],B2=[],Ly=[],gF={},z2={},DI={},Vhe={},$he="_echarts_instance_";function yF(r,e){gF[r]=e}function bF(r){He(B2,r)<0&&B2.push(r)}function _F(r,e){QC(N2,r,e,Lhe)}function Hhe(r){JC("afterinit",r)}function Ghe(r){JC("afterupdate",r)}function JC(r,e){Qi.on(r,e)}function za(r,e,t){Te(e)&&(t=e,e="");var n=Me(r)?r.type:[r,r={event:e}][0];r.event=(r.event||n).toLowerCase(),e=r.event,!Ey[e]&&(vn(SI.test(n)&&SI.test(e)),Dy[n]||(Dy[n]={action:t,actionInfo:r}),Ey[e]=n)}function Whe(r,e){Dp.register(r,e)}function Uhe(r,e){QC(Ly,r,e,uF,"layout")}function Ru(r,e){QC(Ly,r,e,cF,"visual")}var EI=[];function QC(r,e,t,n,i){if((Te(e)||Me(e))&&(t=e,e=n),!(He(EI,t)>=0)){EI.push(t);var a=X6.wrapStageHandler(t,i);a.__prio=e,a.__raw=t,r.push(a)}}function xF(r,e){z2[r]=e}function Yhe(r,e,t){var n=Ahe("registerMap");n&&n(r,e,t)}var qhe=lfe;Ru(KC,Rfe);Ru(a1,Ofe);Ru(a1,jfe);Ru(KC,Xfe);Ru(a1,Kfe);Ru(fF,The);bF(T6);_F(Dhe,$ce);xF("default",Nfe);za({type:tu,event:tu,update:tu},tr);za({type:Hm,event:Hm,update:Hm},tr);za({type:ld,event:ld,update:ld},tr);za({type:Gm,event:Gm,update:Gm},tr);za({type:ud,event:ud,update:ud},tr);yF("light",Yfe);yF("dark",Q6);var LI=[],Xhe={registerPreprocessor:bF,registerProcessor:_F,registerPostInit:Hhe,registerPostUpdate:Ghe,registerUpdateLifecycle:JC,registerAction:za,registerCoordinateSystem:Whe,registerLayout:Uhe,registerVisual:Ru,registerTransform:qhe,registerLoading:xF,registerMap:Yhe,registerImpl:Che,PRIORITY:Bhe,ComponentModel:Qe,ComponentView:zt,SeriesModel:It,ChartView:St,registerComponentModel:function(r){Qe.registerClass(r)},registerComponentView:function(r){zt.registerClass(r)},registerSeriesModel:function(r){It.registerClass(r)},registerChartView:function(r){St.registerClass(r)},registerSubTypeDefaulter:function(r,e){Qe.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){Pse(r,e)}};function Ue(r){if(q(r)){k(r,function(e){Ue(e)});return}He(LI,r)>=0||(LI.push(r),Te(r)&&(r={install:r}),r.install(Xhe))}function ih(r){return r==null?0:r.length||1}function II(r){return r}var To=function(){function r(e,t,n,i,a,o){this._old=e,this._new=t,this._oldKeyGetter=n||II,this._newKeyGetter=i||II,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},i=new Array(e.length),a=new Array(t.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(t,n,a,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=i[o],l=n[s],u=ih(l);if(u>1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(t,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=n[l],c=i[l],f=ih(u),h=ih(c);if(f>1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var d=0;d<f;d++)this._remove&&this._remove(u[d]);else this._remove&&this._remove(u)}this._performRestAdd(o,i)},r.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var i=e[n],a=t[i],o=ih(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);t[i]=null}},r.prototype._initIndexMap=function(e,t,n,i){for(var a=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[i](e[o],o);if(a||(n[o]=s),!!t){var l=t[s],u=ih(l);u===0?(t[s]=o,a&&n.push(s)):u===1?t[s]=[l,o]:l.push(o)}}},r}(),Khe=function(){function r(e,t){this._encode=e,this._schema=t}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r}();function Zhe(r,e){var t={},n=t.encode={},i=ve(),a=[],o=[],s={};k(r.dimensions,function(h){var d=r.getDimensionInfo(h),p=d.coordDim;if(p){var v=d.coordDimIndex;p_(n,p)[v]=h,d.isExtraCoord||(i.set(p,1),Jhe(d.type)&&(a[0]=h),p_(s,p)[v]=r.getDimensionIndex(d.name)),d.defaultTooltip&&o.push(h)}v6.each(function(m,g){var y=p_(n,g),b=d.otherDims[g];b!=null&&b!==!1&&(y[b]=d.name)})});var l=[],u={};i.each(function(h,d){var p=n[d];u[d]=p[0],l=l.concat(p)}),t.dataDimsOnCoord=l,t.dataDimIndicesOnCoord=K(l,function(h){return r.getDimensionInfo(h).storeDimIndex}),t.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(a=c.slice());var f=n.tooltip;return f&&f.length?o=f.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,t.userOutput=new Khe(s,e),t}function p_(r,e){return r.hasOwnProperty(e)||(r[e]=[]),r[e]}function Iy(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function Jhe(r){return!(r==="ordinal"||r==="time")}var Xm=function(){function r(e){this.otherDims={},e!=null&&W(this,e)}return r}(),Qhe=it(),ede={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},wF=function(){function r(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=CF(this.source)))},r.prototype.getSourceDimensionIndex=function(e){return Re(this._dimNameMap.get(e),-1)},r.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},r.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=A6(this.source),n=!AF(e),i="",a=[],o=0,s=0;o<e;o++){var l=void 0,u=void 0,c=void 0,f=this.dimensions[s];if(f&&f.storeDimIndex===o)l=t?f.name:null,u=f.type,c=f.ordinalMeta,s++;else{var h=this.getSourceDimension(o);h&&(l=t?h.name:null,u=h.type)}a.push({property:l,type:u,ordinalMeta:c}),t&&l!=null&&(!f||!f.isCalculationCoord)&&(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=ede[u]||"f",c&&(i+=c.uid),i+="$"}var d=this.source,p=[d.seriesLayoutBy,d.startIndex,i].join("$$");return{dimensions:a,hash:p}},r.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===t)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(t);o&&(i=o.name)}e.push(i)}return e},r.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r}();function SF(r){return r instanceof wF}function TF(r){for(var e=ve(),t=0;t<(r||[]).length;t++){var n=r[t],i=Me(n)?n.name:n;i!=null&&e.get(i)==null&&e.set(i,t)}return e}function CF(r){var e=Qhe(r);return e.dimNameMap||(e.dimNameMap=TF(r.dimensionsDefine))}function AF(r){return r>30}var ah=Me,$o=K,tde=typeof Int32Array>"u"?Array:Int32Array,rde="e\0\0",PI=-1,nde=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],ide=["_approximateExtent"],RI,$v,oh,sh,v_,lh,m_,fn=function(){function r(e,t){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;SF(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c<n.length;c++){var f=n[c],h=se(f)?new Xm({name:f}):f instanceof Xm?f:new Xm(f),d=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=d,h.coordDimIndex=0);var p=h.otherDims=h.otherDims||{};o.push(d),a[d]=h,u[d]!=null&&(l=!0),h.createInvertedIndices&&(s[d]=[]),p.itemName===0&&(this._nameDimIdx=c),p.itemId===0&&(this._idDimIdx=c),i&&(h.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=s,this._dimOmitted){var v=this._dimIdxToName=ve();k(o,function(m){v.set(a[m].storeDimIndex,m)})}}return r.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(n!=null)return n;var i=this._schema.getSourceDimension(t);if(i)return i.name},r.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},r.prototype._recognizeDimIndex=function(e){if(lt(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},r.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);return t},r.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},r.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(n){return t.hasOwnProperty(n)?t[n]:void 0}:function(n){return t[n]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return i?i[t]:null},r.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,n=t.encode[e];return(n||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(e,t,n){var i=this,a;if(e instanceof E2&&(a=e),!a){var o=this.dimensions,s=HC(e)||Zr(e)?new M6(e,o.length):e;a=new E2;var l=$o(o,function(u){return{type:i._dimInfos[u].type,property:u}});a.initData(s,l,n)}this._store=a,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=Zhe(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},r.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var s=i;s<a;s++){var l=s-i;this._nameList[s]=t[l],o&&m_(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var i=this._dimInfos[t[n]];i.ordinalMeta&&e.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==bs&&!e.fillStorage},r.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===yi;if(l&&!i.pure)for(var u=[],c=e;c<t;c++){var f=i.getItem(c,u);if(!this.hasItemOption&&$se(f)&&(this.hasItemOption=!0),f){var h=f.name;a[c]==null&&h!=null&&(a[c]=vr(h,null));var d=f.id;o[c]==null&&d!=null&&(o[c]=vr(d,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<t;c++)m_(this,c);RI(this)}},r.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},r.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},r.prototype.setCalculationInfo=function(e,t){ah(e)?W(this._calculationInfo,e):this._calculationInfo[e]=t},r.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=oh(this,this._nameDimIdx,t)),n==null&&(n=""),n},r.prototype._getCategory=function(e,t){var n=this._store.get(e,t),i=this._store.getOrdinalMeta(e);return i?i.categories[n]:n},r.prototype.getId=function(e){return $v(this,this.getRawIndex(e))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(e,t){var n=this._store,i=this._dimInfos[e];if(i)return n.get(i.storeDimIndex,t)},r.prototype.getByRawIndex=function(e,t){var n=this._store,i=this._dimInfos[e];if(i)return n.getByRawIndex(i.storeDimIndex,t)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},r.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},r.prototype.getValues=function(e,t){var n=this,i=this._store;return q(e)?i.getValues($o(e,function(a){return n._getStoreDimIndex(a)}),t):i.getValues(e)},r.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,i=t.length;n<i;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},r.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},r.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},r.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},r.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],i=n&&n[t];return i==null||isNaN(i)?PI:i},r.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},r.prototype.each=function(e,t,n){Te(e)&&(n=t,t=e,e=[]);var i=n||this,a=$o(sh(e),this._getStoreDimIndex,this);this._store.each(a,i?ue(t,i):t)},r.prototype.filterSelf=function(e,t,n){Te(e)&&(n=t,t=e,e=[]);var i=n||this,a=$o(sh(e),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?ue(t,i):t),this},r.prototype.selectRange=function(e){var t=this,n={},i=et(e);return k(i,function(a){var o=t._getStoreDimIndex(a);n[o]=e[a]}),this._store=this._store.selectRange(n),this},r.prototype.mapArray=function(e,t,n){Te(e)&&(n=t,t=e,e=[]),n=n||this;var i=[];return this.each(e,function(){i.push(t&&t.apply(this,arguments))},n),i},r.prototype.map=function(e,t,n,i){var a=n||i||this,o=$o(sh(e),this._getStoreDimIndex,this),s=lh(this);return s._store=this._store.map(o,a?ue(t,a):t),s},r.prototype.modify=function(e,t,n,i){var a=n||i||this,o=$o(sh(e),this._getStoreDimIndex,this);this._store.modify(o,a?ue(t,a):t)},r.prototype.downSample=function(e,t,n,i){var a=lh(this);return a._store=this._store.downSample(this._getStoreDimIndex(e),t,n,i),a},r.prototype.minmaxDownSample=function(e,t){var n=lh(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},r.prototype.lttbDownSample=function(e,t){var n=lh(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},r.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},r.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new _t(n,t,t&&t.ecModel)},r.prototype.diff=function(e){var t=this;return new To(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return $v(e,n)},function(n){return $v(t,n)})},r.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},r.prototype.setVisual=function(e,t){this._visual=this._visual||{},ah(e)?W(this._visual,e):this._visual[e]=t},r.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],i=n&&n[t];return i??this.getVisual(t)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[t];return a==null&&(a=this.getVisual(t),q(a)?a=a.slice():ah(a)&&(a=W({},a)),i[t]=a),a},r.prototype.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,ah(t)?W(i,t):i[t]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){ah(e)?W(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?W(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;g2(n,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){k(this._graphicEls,function(n,i){n&&e&&e.call(t,n,i)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:$o(this.dimensions,this._getDimInfo,this),this.hostModel)),v_(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var n=this[e];Te(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return t.apply(this,[i].concat(uC(arguments)))})},r.internalField=function(){RI=function(e){var t=e._invertedIndicesMap;k(t,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=t[i]=new tde(o.categories.length);for(var l=0;l<n.length;l++)n[l]=PI;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},oh=function(e,t,n){return vr(e._getCategory(t,n),null)},$v=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=oh(e,e._idDimIdx,t)),n==null&&(n=rde+t),n},sh=function(e){return q(e)||(e=e!=null?[e]:[]),e},lh=function(e){var t=new r(e._schema?e._schema:$o(e.dimensions,e._getDimInfo,e),e.hostModel);return v_(t,e),t},v_=function(e,t){k(nde.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,k(ide,function(n){e[n]=ke(t[n])}),e._calculationInfo=W({},t._calculationInfo)},m_=function(e,t){var n=e._nameList,i=e._idList,a=e._nameDimIdx,o=e._idDimIdx,s=n[t],l=i[t];if(s==null&&a!=null&&(n[t]=s=oh(e,a,t)),l==null&&o!=null&&(i[t]=l=oh(e,o,t)),l==null&&s!=null){var u=e._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),i[t]=l}}}(),r}();function Lp(r,e){HC(r)||(r=GC(r)),e=e||{};var t=e.coordDimensions||[],n=e.dimensionsDefine||r.dimensionsDefine||[],i=ve(),a=[],o=ode(r,t,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&AF(o),l=n===r.dimensionsDefine,u=l?CF(r):TF(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var f=ve(c),h=new O6(o),d=0;d<h.length;d++)h[d]=-1;function p(C){var A=h[C];if(A<0){var M=n[C],D=Me(M)?M:{name:M},E=new Xm,L=D.name;L!=null&&u.get(L)!=null&&(E.name=E.displayName=L),D.type!=null&&(E.type=D.type),D.displayName!=null&&(E.displayName=D.displayName);var I=a.length;return h[C]=I,E.storeDimIndex=C,a.push(E),E}return a[A]}if(!s)for(var d=0;d<o;d++)p(d);f.each(function(C,A){var M=wt(C).slice();if(M.length===1&&!se(M[0])&&M[0]<0){f.set(A,!1);return}var D=f.set(A,[]);k(M,function(E,L){var I=se(E)?u.get(E):E;I!=null&&I<o&&(D[L]=I,m(p(I),A,L))})});var v=0;k(t,function(C){var A,M,D,E;if(se(C))A=C,E={};else{E=C,A=E.name;var L=E.ordinalMeta;E.ordinalMeta=null,E=W({},E),E.ordinalMeta=L,M=E.dimsDef,D=E.otherDims,E.name=E.coordDim=E.coordDimIndex=E.dimsDef=E.otherDims=null}var I=f.get(A);if(I!==!1){if(I=wt(I),!I.length)for(var R=0;R<(M&&M.length||1);R++){for(;v<o&&p(v).coordDim!=null;)v++;v<o&&I.push(v++)}k(I,function(P,O){var j=p(P);if(l&&E.type!=null&&(j.type=E.type),m(Ce(j,E),A,O),j.name==null&&M){var F=M[O];!Me(F)&&(F={name:F}),j.name=j.displayName=F.name,j.defaultTooltip=F.defaultTooltip}D&&Ce(j.otherDims,D)})}});function m(C,A,M){v6.get(A)!=null?C.otherDims[A]=M:(C.coordDim=A,C.coordDimIndex=M,i.set(A,!0))}var g=e.generateCoord,y=e.generateCoordCount,b=y!=null;y=g?y||1:0;var _=g||"value";function x(C){C.name==null&&(C.name=C.coordDim)}if(s)k(a,function(C){x(C)}),a.sort(function(C,A){return C.storeDimIndex-A.storeDimIndex});else for(var w=0;w<o;w++){var S=p(w),T=S.coordDim;T==null&&(S.coordDim=sde(_,i,b),S.coordDimIndex=0,(!g||y<=0)&&(S.isExtraCoord=!0),y--),x(S),S.type==null&&(b6(r,w)===Rr.Must||S.isExtraCoord&&(S.otherDims.itemName!=null||S.otherDims.seriesName!=null))&&(S.type="ordinal")}return ade(a),new wF({source:r,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function ade(r){for(var e=ve(),t=0;t<r.length;t++){var n=r[t],i=n.name,a=e.get(i)||0;a>0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function ode(r,e,t,n){var i=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,n||0);return k(e,function(a){var o;Me(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function sde(r,e,t){if(t||e.hasKey(r)){for(var n=0;e.hasKey(r+n);)n++;r+=n}return e.set(r,!0),r}var lde=function(){function r(e){this.coordSysDims=[],this.axisMap=ve(),this.categoryAxisMap=ve(),this.coordSysName=e}return r}();function ude(r){var e=r.get("coordinateSystem"),t=new lde(e),n=cde[e];if(n)return n(r,t,t.axisMap,t.categoryAxisMap),t}var cde={cartesian2d:function(r,e,t,n){var i=r.getReferringComponents("xAxis",lr).models[0],a=r.getReferringComponents("yAxis",lr).models[0];e.coordSysDims=["x","y"],t.set("x",i),t.set("y",a),ac(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),ac(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,n){var i=r.getReferringComponents("singleAxis",lr).models[0];e.coordSysDims=["single"],t.set("single",i),ac(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(r,e,t,n){var i=r.getReferringComponents("polar",lr).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",a),t.set("angle",o),ac(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),ac(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,n){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,n){var i=r.ecModel,a=i.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();k(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];t.set(c,u),ac(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function ac(r){return r.get("type")==="category"}function fde(r,e,t){t=t||{};var n=t.byIndex,i=t.stackedCoordDimension,a,o,s;hde(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,c,f,h;if(k(a,function(y,b){se(y)&&(a[b]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(c=y))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var d=c.coordDim,p=c.type,v=0;k(a,function(y){y.coordDim===d&&v++});var m={name:f,coordDim:d,coordDimIndex:v,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},g={name:h,coordDim:h,coordDimIndex:v+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(h,p),g.storeDimIndex=s.ensureCalculationDimension(f,p)),o.appendCalculationDimension(m),o.appendCalculationDimension(g)):(a.push(m),a.push(g))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:f}}function hde(r){return!SF(r.schema)}function Is(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function MF(r,e){return Is(r,e)?r.getCalculationInfo("stackResultDimension"):e}function dde(r,e){var t=r.get("coordinateSystem"),n=Dp.get(t),i;return e&&e.coordSysDims&&(i=K(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=Iy(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function pde(r,e,t){var n,i;return t&&k(r,function(a,o){var s=a.coordDim,l=t.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(r[n].otherDims.itemName=0),n}function Lo(r,e,t){t=t||{};var n=e.getSourceManager(),i,a=!1;r?(a=!0,i=GC(r)):(i=n.getSource(),a=i.sourceFormat===yi);var o=ude(e),s=dde(e,o),l=t.useEncodeDefaulter,u=Te(l)?l:l?Oe(y6,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=Lp(i,c),h=pde(f.dimensions,t.createInvertedIndices,o),d=a?null:n.getSharedDataStore(f),p=fde(e,{schema:f,store:d}),v=new fn(f,e);v.setCalculationInfo(p);var m=h!=null&&vde(i)?function(g,y,b,_){return _===h?b:this.defaultDimValueGetter(g,y,b,_)}:null;return v.hasItemOption=!1,v.initData(a?i:d,null,m),v}function vde(r){if(r.sourceFormat===yi){var e=mde(r.data||[]);return!q(yf(e))}}function mde(r){for(var e=0;e<r.length&&r[e]==null;)e++;return r[e]}var Fa=function(){function r(e){this._setting=e||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();z0(Fa);var gde=0,F2=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++gde}return r.createByAxisModel=function(e){var t=e.option,n=t.data,i=n&&K(n,yde);return new r({categories:i,needCollect:!i,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!se(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var i=this._getOrCreateMap();return t=i.get(e),t==null&&(n?(t=this.categories.length,this.categories[t]=e,i.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=ve(this.categories))},r}();function yde(r){return Me(r)&&r.value!=null?r.value:r+""}function V2(r){return r.type==="interval"||r.type==="log"}function bde(r,e,t,n){var i={},a=r[1]-r[0],o=i.interval=iz(a/e);t!=null&&o<t&&(o=i.interval=t),n!=null&&o>n&&(o=i.interval=n);var s=i.intervalPrecision=kF(o),l=i.niceTickExtent=[Xt(Math.ceil(r[0]/o)*o,s),Xt(Math.floor(r[1]/o)*o,s)];return _de(l,r),i}function g_(r){var e=Math.pow(10,gC(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Xt(t*e)}function kF(r){return pa(r)+2}function OI(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function _de(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),OI(r,0,e),OI(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function o1(r,e){return r>=e[0]&&r<=e[1]}function s1(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function l1(r,e){return r*(e[1]-e[0])+e[0]}var u1=function(r){z(e,r);function e(t){var n=r.call(this,t)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new F2({})),q(i)&&(i=new F2({categories:K(i,function(a){return Me(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(t){return t==null?NaN:se(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),o1(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),s1(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(l1(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],n=this._extent,i=n[0];i<=n[1];)t.push({value:i}),i++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=t.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];i[o]=u,a[u]=o}for(var c=0;o<s;++o){for(;a[c]!=null;)c++;i.push(c),a[c]=o}},e.prototype._getTickNumber=function(t){var n=this._ticksByOrdinalNumber;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getRawOrdinalNumber=function(t){var n=this._ordinalNumbersByTick;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var n=this.getRawOrdinalNumber(t.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(t,n){this.unionExtent(t.getApproximateExtent(n))},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Fa);Fa.registerClass(u1);var cl=Xt,Co=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return o1(t,this._extent)},e.prototype.normalize=function(t){return s1(t,this._extent)},e.prototype.scale=function(t){return l1(t,this._extent)},e.prototype.setExtent=function(t,n){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(n)||(i[1]=parseFloat(n))},e.prototype.unionExtent=function(t){var n=this._extent;t[0]<n[0]&&(n[0]=t[0]),t[1]>n[1]&&(n[1]=t[1]),this.setExtent(n[0],n[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=kF(t)},e.prototype.getTicks=function(t){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]&&(t?s.push({value:cl(a[0]-n,o)}):s.push({value:i[0]}));for(var u=a[0];u<=a[1]&&(s.push({value:u}),u=cl(u+n,o),u!==s[s.length-1].value);)if(s.length>l)return[];var c=s.length?s[s.length-1].value:a[1];return i[1]>c&&(t?s.push({value:cl(c+n,o)}):s.push({value:i[1]})),s},e.prototype.getMinorTicks=function(t){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],u=0,c=[],f=s.value-l.value,h=f/t;u<t-1;){var d=cl(l.value+(u+1)*h);d>a[0]&&d<a[1]&&c.push(d),u++}i.push(c)}return i},e.prototype.getLabel=function(t,n){if(t==null)return"";var i=n&&n.precision;i==null?i=pa(t.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=cl(t.value,i,!0);return u6(a)},e.prototype.calcNiceTicks=function(t,n,i){t=t||5;var a=this._extent,o=a[1]-a[0];if(isFinite(o)){o<0&&(o=-o,a.reverse());var s=bde(a,t,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var n=this._extent;if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);t.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(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(n[0]=cl(Math.floor(n[0]/o)*o)),t.fixMax||(n[1]=cl(Math.ceil(n[1]/o)*o))},e.prototype.setNiceExtent=function(t,n){this._niceExtent=[t,n]},e.type="interval",e}(Fa);Fa.registerClass(Co);var DF=typeof Float32Array<"u",xde=DF?Float32Array:Array;function ma(r){return q(r)?DF?new Float32Array(r):r:new xde(r)}var $2="__ec_stack_";function EF(r){return r.get("stack")||$2+r.seriesIndex}function eA(r){return r.dim+r.index}function wde(r){var e=[],t=r.axis,n="axis0";if(t.type==="category"){for(var i=t.getBandWidth(),a=0;a<r.count;a++)e.push(Ce({bandWidth:i,axisKey:n,stackId:$2+a},r));for(var o=PF(e),s=[],a=0;a<r.count;a++){var l=o[n][$2+a];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function LF(r,e){var t=[];return e.eachSeriesByType(r,function(n){jF(n)&&t.push(n)}),t}function Sde(r){var e={};k(r,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var f=l.getData(),h=c.dim+"_"+c.index,d=f.getDimensionIndex(f.mapDimension(c.dim)),p=f.getStore(),v=0,m=p.count();v<m;++v){var g=p.get(d,v);e[h]?e[h].push(g):e[h]=[g]}});var t={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(i){i.sort(function(l,u){return l-u});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))}t[n]=a}}return t}function IF(r){var e=Sde(r),t=[];return k(r,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,u=e[l],c=Math.abs(o[1]-o[0]),f=a.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*u:c}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var p=ie(n.get("barWidth"),s),v=ie(n.get("barMaxWidth"),s),m=ie(n.get("barMinWidth")||(NF(n)?.5:1),s),g=n.get("barGap"),y=n.get("barCategoryGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:v,barMinWidth:m,barGap:g,barCategoryGap:y,axisKey:eA(a),stackId:EF(n)})}),PF(t)}function PF(r){var e={};k(r,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var h=n.barMinWidth;h&&(l[u].minWidth=h);var d=n.barGap;d!=null&&(s.gap=d);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var t={};return k(e,function(n,i){t[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=et(a).length;s=Math.max(35-l*4,15)+"%"}var u=ie(s,o),c=ie(n.gap,1),f=n.remainedWidth,h=n.autoWidthCount,d=(f-u)/(h+(h-1)*c);d=Math.max(d,0),k(a,function(g){var y=g.maxWidth,b=g.minWidth;if(g.width){var _=g.width;y&&(_=Math.min(_,y)),b&&(_=Math.max(_,b)),g.width=_,f-=_+c*_,h--}else{var _=d;y&&y<_&&(_=Math.min(y,f)),b&&b>_&&(_=b),_!==d&&(g.width=_,f-=_+c*_,h--)}}),d=(f-u)/(h+(h-1)*c),d=Math.max(d,0);var p=0,v;k(a,function(g,y){g.width||(g.width=d),v=g,p+=g.width*(1+c)}),v&&(p-=v.width*c);var m=-p/2;k(a,function(g,y){t[i][y]=t[i][y]||{bandWidth:o,offset:m,width:g.width},m+=g.width*(1+c)})}),t}function Tde(r,e,t){if(r&&e){var n=r[eA(e)];return n}}function RF(r,e){var t=LF(r,e),n=IF(t);k(t,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=EF(i),u=n[eA(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function OF(r){return{seriesType:r,plan:Af(),reset:function(e){if(jF(e)){var t=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=t.getDimensionIndex(t.mapDimension(a.dim)),s=t.getDimensionIndex(t.mapDimension(i.dim)),l=e.get("showBackground",!0),u=t.mapDimension(a.dim),c=t.getCalculationInfo("stackResultDimension"),f=Is(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),d=Cde(i,a),p=NF(e),v=e.get("barMinHeight")||0,m=c&&t.getDimensionIndex(c),g=t.getLayout("size"),y=t.getLayout("offset");return{progress:function(b,_){for(var x=b.count,w=p&&ma(x*3),S=p&&l&&ma(x*3),T=p&&ma(x),C=n.master.getRect(),A=h?C.width:C.height,M,D=_.getStore(),E=0;(M=b.next())!=null;){var L=D.get(f?m:o,M),I=D.get(s,M),R=d,P=void 0;f&&(P=+L-D.get(o,M));var O=void 0,j=void 0,F=void 0,N=void 0;if(h){var B=n.dataToPoint([L,I]);if(f){var $=n.dataToPoint([P,I]);R=$[0]}O=R,j=B[1]+y,F=B[0]-R,N=g,Math.abs(F)<v&&(F=(F<0?-1:1)*v)}else{var B=n.dataToPoint([I,L]);if(f){var $=n.dataToPoint([I,P]);R=$[1]}O=B[0]+y,j=R,F=g,N=B[1]-R,Math.abs(N)<v&&(N=(N<=0?-1:1)*v)}p?(w[E]=O,w[E+1]=j,w[E+2]=h?F:N,S&&(S[E]=h?C.x:O,S[E+1]=h?j:C.y,S[E+2]=A),T[M]=M):_.setItemLayout(M,{x:O,y:j,width:F,height:N}),E+=3}p&&_.setLayout({largePoints:w,largeDataIndices:T,largeBackgroundPoints:S,valueAxisHorizontal:h})}}}}}}function jF(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function NF(r){return r.pipelineContext&&r.pipelineContext.large}function Cde(r,e){var t=e.model.get("startValue");return t||(t=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?t>0?t:1:t))}var Ade=function(r,e,t,n){for(;t<n;){var i=t+n>>>1;r[i][1]<e?t=i+1:n=i}return t},tA=function(r){z(e,r);function e(t){var n=r.call(this,t)||this;return n.type="time",n}return e.prototype.getLabel=function(t){var n=this.getSetting("useUTC");return K0(t.value,AL[lce(zc(this._minLevelUnit))]||AL.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return uce(t,n,i,o,a)},e.prototype.getTicks=function(){var t=this._interval,n=this._extent,i=[];if(!t)return i;i.push({value:n[0],level:0});var a=this.getSetting("useUTC"),o=Pde(this._minLevelUnit,this._approxInterval,a,n);return i=i.concat(o),i.push({value:n[1],level:0}),i},e.prototype.calcNiceExtent=function(t){var n=this._extent;if(n[0]===n[1]&&(n[0]-=li,n[1]+=li),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]-li}this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,n,i){t=t||10;var a=this._extent,o=a[1]-a[0];this._approxInterval=o/t,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var s=Hv.length,l=Math.min(Ade(Hv,this._approxInterval,0,s),s-1);this._interval=Hv[l][1],this._minLevelUnit=Hv[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return lt(t)?t:+Pa(t)},e.prototype.contain=function(t){return o1(this.parse(t),this._extent)},e.prototype.normalize=function(t){return s1(this.parse(t),this._extent)},e.prototype.scale=function(t){return l1(t,this._extent)},e.type="time",e}(Co),Hv=[["second",OC],["minute",jC],["hour",fd],["quarter-day",fd*6],["half-day",fd*12],["day",li*1.2],["half-week",li*3.5],["week",li*7],["month",li*31],["quarter",li*95],["half-year",CL/2],["year",CL]];function Mde(r,e,t,n){var i=Pa(e),a=Pa(t),o=function(p){return ML(i,p,n)===ML(a,p,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},f=function(){return c()&&o("minute")},h=function(){return f()&&o("second")},d=function(){return h()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return f();case"second":return h();case"millisecond":return d()}}function kde(r,e){return r/=li,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function Dde(r){var e=30*li;return r/=e,r>6?6:r>3?3:r>2?2:1}function Ede(r){return r/=fd,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function jI(r,e){return r/=e?jC:OC,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function Lde(r){return iz(r)}function Ide(r,e,t){var n=new Date(r);switch(zc(e)){case"year":case"month":n[n6(t)](0);case"day":n[i6(t)](1);case"hour":n[a6(t)](0);case"minute":n[o6(t)](0);case"second":n[s6(t)](0),n[l6(t)](0)}return n.getTime()}function Pde(r,e,t,n){var i=1e4,a=t6,o=0;function s(A,M,D,E,L,I,R){for(var P=new Date(M),O=M,j=P[E]();O<D&&O<=n[1];)R.push({value:O}),j+=A,P[L](j),O=P.getTime();R.push({value:O,notAdd:!0})}function l(A,M,D){var E=[],L=!M.length;if(!Mde(zc(A),n[0],n[1],t)){L&&(M=[{value:Ide(new Date(n[0]),A,t)},{value:n[1]}]);for(var I=0;I<M.length-1;I++){var R=M[I].value,P=M[I+1].value;if(R!==P){var O=void 0,j=void 0,F=void 0,N=!1;switch(A){case"year":O=Math.max(1,Math.round(e/li/365)),j=NC(t),F=cce(t);break;case"half-year":case"quarter":case"month":O=Dde(e),j=Fc(t),F=n6(t);break;case"week":case"half-week":case"day":O=kde(e),j=Z0(t),F=i6(t),N=!0;break;case"half-day":case"quarter-day":case"hour":O=Ede(e),j=Wd(t),F=a6(t);break;case"minute":O=jI(e,!0),j=J0(t),F=o6(t);break;case"second":O=jI(e,!1),j=Q0(t),F=s6(t);break;case"millisecond":O=Lde(e),j=e1(t),F=l6(t);break}s(O,R,P,j,F,N,E),A==="year"&&D.length>1&&I===0&&D.unshift({value:D[0].value-O})}}for(var I=0;I<E.length;I++)D.push(E[I]);return E}}for(var u=[],c=[],f=0,h=0,d=0;d<a.length&&o++<i;++d){var p=zc(a[d]);if(sce(a[d])){l(a[d],u[u.length-1]||[],c);var v=a[d+1]?zc(a[d+1]):null;if(p!==v){if(c.length){h=f,c.sort(function(A,M){return A.value-M.value});for(var m=[],g=0;g<c.length;++g){var y=c[g].value;(g===0||c[g-1].value!==y)&&(m.push(c[g]),y>=n[0]&&y<=n[1]&&f++)}var b=(n[1]-n[0])/e;if(f>b*1.5&&h>b/1.5||(u.push(m),f>b||r===a[d]))break}c=[]}}}for(var _=pt(K(u,function(A){return pt(A,function(M){return M.value>=n[0]&&M.value<=n[1]&&!M.notAdd})}),function(A){return A.length>0}),x=[],w=_.length-1,d=0;d<_.length;++d)for(var S=_[d],T=0;T<S.length;++T)x.push({value:S[T].value,level:w-d});x.sort(function(A,M){return A.value-M.value});for(var C=[],d=0;d<x.length;++d)(d===0||x[d].value!==x[d-1].value)&&C.push(x[d]);return C}Fa.registerClass(tA);var NI=Fa.prototype,dd=Co.prototype,Rde=Xt,Ode=Math.floor,jde=Math.ceil,Gv=Math.pow,xi=Math.log,rA=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new Co,t._interval=0,t}return e.prototype.getTicks=function(t){var n=this._originalScale,i=this._extent,a=n.getExtent(),o=dd.getTicks.call(this,t);return K(o,function(s){var l=s.value,u=Xt(Gv(this.base,l));return u=l===i[0]&&this._fixMin?Wv(u,a[0]):u,u=l===i[1]&&this._fixMax?Wv(u,a[1]):u,{value:u}},this)},e.prototype.setExtent=function(t,n){var i=xi(this.base);t=xi(Math.max(0,t))/i,n=xi(Math.max(0,n))/i,dd.setExtent.call(this,t,n)},e.prototype.getExtent=function(){var t=this.base,n=NI.getExtent.call(this);n[0]=Gv(t,n[0]),n[1]=Gv(t,n[1]);var i=this._originalScale,a=i.getExtent();return this._fixMin&&(n[0]=Wv(n[0],a[0])),this._fixMax&&(n[1]=Wv(n[1],a[1])),n},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var n=this.base;t[0]=xi(t[0])/xi(n),t[1]=xi(t[1])/xi(n),NI.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,n){this.unionExtent(t.getApproximateExtent(n))},e.prototype.calcNiceTicks=function(t){t=t||10;var n=this._extent,i=n[1]-n[0];if(!(i===1/0||i<=0)){var a=Vse(i),o=t/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[Xt(jde(n[0]/a)*a),Xt(Ode(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){dd.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=xi(t)/xi(this.base),o1(t,this._extent)},e.prototype.normalize=function(t){return t=xi(t)/xi(this.base),s1(t,this._extent)},e.prototype.scale=function(t){return t=l1(t,this._extent),Gv(this.base,t)},e.type="log",e}(Fa),BF=rA.prototype;BF.getMinorTicks=dd.getMinorTicks;BF.getLabel=dd.getLabel;function Wv(r,e){return Rde(r,pa(e))}Fa.registerClass(rA);var Nde=function(){function r(e,t,n){this._prepareParams(e,t,n)}return r.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&t.getNeedCrossZero&&t.getNeedCrossZero();var a=t.get("min",!0);a==null&&(a=t.get("startValue",!0));var o=this._modelMinRaw=a;Te(o)?this._modelMinNum=Uv(e,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=Uv(e,o));var s=this._modelMaxRaw=t.get("max",!0);if(Te(s)?this._modelMaxNum=Uv(e,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=Uv(e,s)),i)this._axisDataLen=t.getCategories().length;else{var l=t.get("boundaryGap"),u=q(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Ni(u[0],1),Ni(u[1],1)]}},r.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=e?null:n-t||Math.abs(t),s=this._modelMinRaw==="dataMin"?t:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=e?i?0:NaN:t-a[0]*o),l==null&&(l=e?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var f=Od(s)||Od(l)||e&&!i;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,d=this._determinedMax;return h!=null&&(s=h,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},r.prototype.modifyDataMinMax=function(e,t){this[zde[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var n=Bde[e];this[n]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),Bde={min:"_determinedMin",max:"_determinedMax"},zde={min:"_dataMin",max:"_dataMax"};function zF(r,e,t){var n=r.rawExtentInfo;return n||(n=new Nde(r,e,t),r.rawExtentInfo=n,n)}function Uv(r,e){return e==null?null:Od(e)?NaN:r.parse(e)}function FF(r,e){var t=r.type,n=zF(r,e,r.getExtent()).calculate();r.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&t==="time"){var s=LF("bar",o),l=!1;if(k(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=IF(s),c=Fde(i,a,e,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function Fde(r,e,t,n){var i=t.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=Tde(n,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;k(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;k(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-r,f=1-(s+l)/a,h=c/f-c;return e+=h*(l/u),r-=h*(s/u),{min:r,max:e}}function nf(r,e){var t=e,n=FF(r,t),i=n.extent,a=t.get("splitNumber");r instanceof rA&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setExtent(i[0],i[1]),r.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function c1(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new u1({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new tA({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(Fa.getClass(e)||Co)}}function Vde(r){var e=r.scale.getExtent(),t=e[0],n=e[1];return!(t>0&&n>0||t<0&&n<0)}function Df(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(n){return function(i,a){return r.scale.getFormattedLabel(i,a,n)}}(e):se(e)?function(n){return function(i){var a=r.scale.getLabel(i),o=n.replace("{value}",a??"");return o}}(e):Te(e)?function(n){return function(i,a){return t!=null&&(a=i.value-t),n(nA(r,i),a,i.level!=null?{level:i.level}:null)}}(e):function(n){return r.scale.getLabel(n)}}function nA(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function $de(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var n,i,a=t.getExtent();t instanceof u1?i=t.count():(n=t.getTicks(),i=n.length);var o=r.getLabelModel(),s=Df(r),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c<i;c+=u){var f=n?n[c]:{value:a[0]+c},h=s(f,c),d=o.getTextRect(h),p=Hde(d,o.get("rotate")||0);l?l.union(p):l=p}return l}}function Hde(r,e){var t=e*Math.PI/180,n=r.width,i=r.height,a=n*Math.abs(Math.cos(t))+Math.abs(i*Math.sin(t)),o=n*Math.abs(Math.sin(t))+Math.abs(i*Math.cos(t)),s=new Ve(r.x,r.y,a,o);return s}function iA(r){var e=r.get("interval");return e??"auto"}function VF(r){return r.type==="category"&&iA(r.getLabelModel())===0}function Py(r,e){var t={};return k(r.mapDimensionsAll(e),function(n){t[MF(r,n)]=!0}),et(t)}function Gde(r,e,t){e&&k(Py(e,t),function(n){var i=e.getApproximateExtent(n);i[0]<r[0]&&(r[0]=i[0]),i[1]>r[1]&&(r[1]=i[1])})}var Ip=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),Wde=1e-8;function BI(r,e){return Math.abs(r-e)<Wde}function Sl(r,e,t){var n=0,i=r[0];if(!i)return!1;for(var a=1;a<r.length;a++){var o=r[a];n+=eo(i[0],i[1],o[0],o[1],e,t),i=o}var s=r[0];return(!BI(i[0],s[0])||!BI(i[1],s[1]))&&(n+=eo(i[0],i[1],s[0],s[1],e,t)),n!==0}var Ude=[];function y_(r,e){for(var t=0;t<r.length;t++)Br(r[t],r[t],e)}function zI(r,e,t,n){for(var i=0;i<r.length;i++){var a=r[i];n&&(a=n.project(a)),a&&isFinite(a[0])&&isFinite(a[1])&&(ls(e,e,a),us(t,t,a))}}function Yde(r){for(var e=0,t=0,n=0,i=r.length,a=r[i-1][0],o=r[i-1][1],s=0;s<i;s++){var l=r[s][0],u=r[s][1],c=a*u-l*o;e+=c,t+=(a+l)*c,n+=(o+u)*c,a=l,o=u}return e?[t/e/3,n/e/3,e]:[r[0][0]||0,r[0][1]||0]}var $F=function(){function r(e){this.name=e}return r.prototype.setCenter=function(e){this._center=e},r.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},r}(),FI=function(){function r(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return r}(),VI=function(){function r(e){this.type="linestring",this.points=e}return r}(),HF=function(r){z(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.type="geoJSON",a.geometries=n,a._center=i&&[i[0],i[1]],a}return e.prototype.calcCenter=function(){for(var t=this.geometries,n,i=0,a=0;a<t.length;a++){var o=t[a],s=o.exterior,l=s&&s.length;l>i&&(n=o,i=l)}if(n)return Yde(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var n=this._rect;if(n&&!t)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return k(o,function(s){s.type==="polygon"?zI(s.exterior,i,a,t):k(s.points,function(l){zI(l,i,a,t)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new Ve(i[0],i[1],a[0]-i[0],a[1]-i[1]),t||(this._rect=n),n},e.prototype.contain=function(t){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(t[0],t[1]))return!1;e:for(var a=0,o=i.length;a<o;a++){var s=i[a];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(Sl(l,t[0],t[1])){for(var c=0;c<(u?u.length:0);c++)if(Sl(u[c],t[0],t[1]))continue e;return!0}}}return!1},e.prototype.transformTo=function(t,n,i,a){var o=this.getBoundingRect(),s=o.width/o.height;i?a||(a=i/s):i=s*a;for(var l=new Ve(t,n,i,a),u=o.calculateTransform(l),c=this.geometries,f=0;f<c.length;f++){var h=c[f];h.type==="polygon"?(y_(h.exterior,u),k(h.interiors,function(d){y_(d,u)})):k(h.points,function(d){y_(d,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},e.prototype.cloneShallow=function(t){t==null&&(t=this.name);var n=new e(t,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},e}($F),qde=function(r){z(e,r);function e(t,n){var i=r.call(this,t)||this;return i.type="geoSVG",i._elOnlyForCalculate=n,i}return e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,n=t.getBoundingRect(),i=[n.x+n.width/2,n.y+n.height/2],a=O0(Ude),o=t;o&&!o.isGeoSVGGraphicRoot;)fo(a,o.getLocalTransform(),a),o=o.parent;return gf(a,a),Br(i,i,a),i},e}($F);function Xde(r){if(!r.UTF8Encoding)return r;var e=r,t=e.UTF8Scale;t==null&&(t=1024);var n=e.features;return k(n,function(i){var a=i.geometry,o=a.encodeOffsets,s=a.coordinates;if(o)switch(a.type){case"LineString":a.coordinates=GF(s,o,t);break;case"Polygon":b_(s,o,t);break;case"MultiLineString":b_(s,o,t);break;case"MultiPolygon":k(s,function(l,u){return b_(l,o[u],t)})}}),e.UTF8Encoding=!1,e}function b_(r,e,t){for(var n=0;n<r.length;n++)r[n]=GF(r[n],e[n],t)}function GF(r,e,t){for(var n=[],i=e[0],a=e[1],o=0;o<r.length;o+=2){var s=r.charCodeAt(o)-64,l=r.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/t,l/t])}return n}function Kde(r,e){return r=Xde(r),K(pt(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var n=t.properties,i=t.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new FI(o[0],o.slice(1)));break;case"MultiPolygon":k(i.coordinates,function(l){l[0]&&a.push(new FI(l[0],l.slice(1)))});break;case"LineString":a.push(new VI([i.coordinates]));break;case"MultiLineString":a.push(new VI(i.coordinates))}var s=new HF(n[e||"name"],a,n.cp);return s.properties=n,s})}var Zd=it();function WF(r,e){var t=K(e,function(n){return r.scale.parse(n)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function Zde(r){var e=r.getLabelModel().get("customValues");if(e){var t=Df(r),n=r.scale.getExtent(),i=WF(r,e),a=pt(i,function(o){return o>=n[0]&&o<=n[1]});return{labels:K(a,function(o){var s={value:o};return{formattedLabel:t(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?Qde(r):tpe(r)}function Jde(r,e){var t=r.getTickModel().get("customValues");if(t){var n=r.scale.getExtent(),i=WF(r,t);return{ticks:pt(i,function(a){return a>=n[0]&&a<=n[1]})}}return r.type==="category"?epe(r,e):{ticks:K(r.scale.getTicks(),function(a){return a.value})}}function Qde(r){var e=r.getLabelModel(),t=UF(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function UF(r,e){var t=YF(r,"labels"),n=iA(e),i=qF(t,n);if(i)return i;var a,o;return Te(n)?a=ZF(r,n):(o=n==="auto"?rpe(r):n,a=KF(r,o)),XF(t,n,{labels:a,labelCategoryInterval:o})}function epe(r,e){var t=YF(r,"ticks"),n=iA(e),i=qF(t,n);if(i)return i;var a,o;if((!e.get("show")||r.scale.isBlank())&&(a=[]),Te(n))a=ZF(r,n,!0);else if(n==="auto"){var s=UF(r,r.getLabelModel());o=s.labelCategoryInterval,a=K(s.labels,function(l){return l.tickValue})}else o=n,a=KF(r,o,!0);return XF(t,n,{ticks:a,tickCategoryInterval:o})}function tpe(r){var e=r.scale.getTicks(),t=Df(r);return{labels:K(e,function(n,i){return{level:n.level,formattedLabel:t(n,i),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function YF(r,e){return Zd(r)[e]||(Zd(r)[e]=[])}function qF(r,e){for(var t=0;t<r.length;t++)if(r[t].key===e)return r[t].value}function XF(r,e,t){return r.push({key:e,value:t}),t}function rpe(r){var e=Zd(r).autoInterval;return e??(Zd(r).autoInterval=r.calculateCategoryInterval())}function npe(r){var e=ipe(r),t=Df(r),n=(e.axisRotate-e.labelRotate)/180*Math.PI,i=r.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],u=r.dataToCoord(l+1)-r.dataToCoord(l),c=Math.abs(u*Math.cos(n)),f=Math.abs(u*Math.sin(n)),h=0,d=0;l<=a[1];l+=s){var p=0,v=0,m=xp(t({value:l}),e.font,"center","top");p=m.width*1.3,v=m.height*1.3,h=Math.max(h,p,7),d=Math.max(d,v,7)}var g=h/c,y=d/f;isNaN(g)&&(g=1/0),isNaN(y)&&(y=1/0);var b=Math.max(0,Math.floor(Math.min(g,y))),_=Zd(r.model),x=r.getExtent(),w=_.lastAutoInterval,S=_.lastTickCount;return w!=null&&S!=null&&Math.abs(w-b)<=1&&Math.abs(S-o)<=1&&w>b&&_.axisExtent0===x[0]&&_.axisExtent1===x[1]?b=w:(_.lastTickCount=o,_.lastAutoInterval=b,_.axisExtent0=x[0],_.axisExtent1=x[1]),b}function ipe(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function KF(r,e,t){var n=Df(r),i=r.scale,a=i.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=VF(r),h=o.get("showMinLabel")||f,d=o.get("showMaxLabel")||f;h&&u!==a[0]&&v(a[0]);for(var p=u;p<=a[1];p+=l)v(p);d&&p-l!==a[1]&&v(a[1]);function v(m){var g={value:m};s.push(t?m:{formattedLabel:n(g),rawLabel:i.getLabel(g),tickValue:m})}return s}function ZF(r,e,t){var n=r.scale,i=Df(r),a=[];return k(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&a.push(t?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var $I=[0,1],Gi=function(){function r(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return r.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e>=n&&e<=i},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return rz(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},r.prototype.dataToCoord=function(e,t){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&i.type==="ordinal"&&(n=n.slice(),HI(n,i.count())),bt(e,$I,n,t)},r.prototype.coordToData=function(e,t){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),HI(n,i.count()));var a=bt(e,n,$I,t);return this.scale.scale(a)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=Jde(this,t),i=n.ticks,a=K(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return ape(this,a,o,e.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var n=this.scale.getMinorTicks(t),i=K(n,function(a){return K(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(){return Zde(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},r.prototype.calculateCategoryInterval=function(){return npe(this)},r}();function HI(r,e){var t=r[1]-r[0],n=e,i=t/n/2;r[0]+=i,r[1]-=i}function ape(r,e,t,n){var i=e.length;if(!r.onBand||t||!i)return;var a=r.getExtent(),o,s;if(i===1)e[0].coord=a[0],o=e[1]={coord:a[1],tickValue:e[0].tickValue};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;k(e,function(d){d.coord-=u/2});var c=r.scale.getExtent();s=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s,tickValue:c[1]+1},e.push(o)}var f=a[0]>a[1];h(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&h(a[0],e[0].coord)&&e.unshift({coord:a[0]}),h(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&h(o.coord,a[1])&&e.push({coord:a[1]});function h(d,p){return d=Xt(d),p=Xt(p),f?d>p:d<p}}var uh=Math.PI*2,fl=Ra.CMD,ope=["top","right","bottom","left"];function spe(r,e,t,n,i){var a=t.width,o=t.height;switch(r){case"top":n.set(t.x+a/2,t.y-e),i.set(0,-1);break;case"bottom":n.set(t.x+a/2,t.y+o+e),i.set(0,1);break;case"left":n.set(t.x-e,t.y+o/2),i.set(-1,0);break;case"right":n.set(t.x+a+e,t.y+o/2),i.set(1,0);break}}function lpe(r,e,t,n,i,a,o,s,l){o-=r,s-=e;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var c=o*t+r,f=s*t+e;if(Math.abs(n-i)%uh<1e-4)return l[0]=c,l[1]=f,u-t;if(a){var h=n;n=jn(i),i=jn(h)}else n=jn(n),i=jn(i);n>i&&(i+=uh);var d=Math.atan2(s,o);if(d<0&&(d+=uh),d>=n&&d<=i||d+uh>=n&&d+uh<=i)return l[0]=c,l[1]=f,u-t;var p=t*Math.cos(n)+r,v=t*Math.sin(n)+e,m=t*Math.cos(i)+r,g=t*Math.sin(i)+e,y=(p-o)*(p-o)+(v-s)*(v-s),b=(m-o)*(m-o)+(g-s)*(g-s);return y<b?(l[0]=p,l[1]=v,Math.sqrt(y)):(l[0]=m,l[1]=g,Math.sqrt(b))}function Ry(r,e,t,n,i,a,o,s){var l=i-r,u=a-e,c=t-r,f=n-e,h=Math.sqrt(c*c+f*f);c/=h,f/=h;var d=l*c+u*f,p=d/h;s&&(p=Math.min(Math.max(p,0),1)),p*=h;var v=o[0]=r+p*c,m=o[1]=e+p*f;return Math.sqrt((v-i)*(v-i)+(m-a)*(m-a))}function JF(r,e,t,n,i,a,o){t<0&&(r=r+t,t=-t),n<0&&(e=e+n,n=-n);var s=r+t,l=e+n,u=o[0]=Math.min(Math.max(i,r),s),c=o[1]=Math.min(Math.max(a,e),l);return Math.sqrt((u-i)*(u-i)+(c-a)*(c-a))}var Ai=[];function upe(r,e,t){var n=JF(e.x,e.y,e.width,e.height,r.x,r.y,Ai);return t.set(Ai[0],Ai[1]),n}function cpe(r,e,t){for(var n=0,i=0,a=0,o=0,s,l,u=1/0,c=e.data,f=r.x,h=r.y,d=0;d<c.length;){var p=c[d++];d===1&&(n=c[d],i=c[d+1],a=n,o=i);var v=u;switch(p){case fl.M:a=c[d++],o=c[d++],n=a,i=o;break;case fl.L:v=Ry(n,i,c[d],c[d+1],f,h,Ai,!0),n=c[d++],i=c[d++];break;case fl.C:v=BB(n,i,c[d++],c[d++],c[d++],c[d++],c[d],c[d+1],f,h,Ai),n=c[d++],i=c[d++];break;case fl.Q:v=FB(n,i,c[d++],c[d++],c[d],c[d+1],f,h,Ai),n=c[d++],i=c[d++];break;case fl.A:var m=c[d++],g=c[d++],y=c[d++],b=c[d++],_=c[d++],x=c[d++];d+=1;var w=!!(1-c[d++]);s=Math.cos(_)*y+m,l=Math.sin(_)*b+g,d<=1&&(a=s,o=l);var S=(f-m)*b/y+m;v=lpe(m,g,b,_,_+x,w,S,h,Ai),n=Math.cos(_+x)*y+m,i=Math.sin(_+x)*b+g;break;case fl.R:a=n=c[d++],o=i=c[d++];var T=c[d++],C=c[d++];v=JF(a,o,T,C,f,h,Ai);break;case fl.Z:v=Ry(n,i,a,o,f,h,Ai,!0),n=a,i=o;break}v<u&&(u=v,t.set(Ai[0],Ai[1]))}return u}var Ii=new ze,Mt=new ze,Jt=new ze,ga=new ze,ca=new ze;function GI(r,e){if(r){var t=r.getTextGuideLine(),n=r.getTextContent();if(n&&t){var i=r.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=i.candidates||ope,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var l=1/0,u=i.anchor,c=r.getComputedTransform(),f=c&&gf([],c),h=e.get("length2")||0;u&&Jt.copy(u);for(var d=0;d<o.length;d++){var p=o[d];spe(p,0,s,Ii,ga),ze.scaleAndAdd(Mt,Ii,ga,h),Mt.transform(f);var v=r.getBoundingRect(),m=u?u.distance(Mt):r instanceof Xe?cpe(Mt,r.path,Jt):upe(Mt,v,Jt);m<l&&(l=m,Mt.transform(c),Jt.transform(c),Jt.toArray(a[0]),Mt.toArray(a[1]),Ii.toArray(a[2]))}QF(a,e.get("minTurnAngle")),t.setShape({points:a})}}}var Oy=[],ln=new ze;function QF(r,e){if(e<=180&&e>0){e=e/180*Math.PI,Ii.fromArray(r[0]),Mt.fromArray(r[1]),Jt.fromArray(r[2]),ze.sub(ga,Ii,Mt),ze.sub(ca,Jt,Mt);var t=ga.len(),n=ca.len();if(!(t<.001||n<.001)){ga.scale(1/t),ca.scale(1/n);var i=ga.dot(ca),a=Math.cos(e);if(a<i){var o=Ry(Mt.x,Mt.y,Jt.x,Jt.y,Ii.x,Ii.y,Oy,!1);ln.fromArray(Oy),ln.scaleAndAdd(ca,o/Math.tan(Math.PI-e));var s=Jt.x!==Mt.x?(ln.x-Mt.x)/(Jt.x-Mt.x):(ln.y-Mt.y)/(Jt.y-Mt.y);if(isNaN(s))return;s<0?ze.copy(ln,Mt):s>1&&ze.copy(ln,Jt),ln.toArray(r[1])}}}}function fpe(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Ii.fromArray(r[0]),Mt.fromArray(r[1]),Jt.fromArray(r[2]),ze.sub(ga,Mt,Ii),ze.sub(ca,Jt,Mt);var n=ga.len(),i=ca.len();if(!(n<.001||i<.001)){ga.scale(1/n),ca.scale(1/i);var a=ga.dot(e),o=Math.cos(t);if(a<o){var s=Ry(Mt.x,Mt.y,Jt.x,Jt.y,Ii.x,Ii.y,Oy,!1);ln.fromArray(Oy);var l=Math.PI/2,u=Math.acos(ca.dot(e)),c=l+u-t;if(c>=l)ze.copy(ln,Jt);else{ln.scaleAndAdd(ca,s/Math.tan(Math.PI/2-c));var f=Jt.x!==Mt.x?(ln.x-Mt.x)/(Jt.x-Mt.x):(ln.y-Mt.y)/(Jt.y-Mt.y);if(isNaN(f))return;f<0?ze.copy(ln,Mt):f>1&&ze.copy(ln,Jt)}ln.toArray(r[1])}}}}function __(r,e,t,n){var i=t==="normal",a=i?r:r.ensureState(t);a.ignore=e;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?r.useStyle(s):a.style=s}function hpe(r,e){var t=e.smooth,n=e.points;if(n)if(r.moveTo(n[0][0],n[0][1]),t>0&&n.length>=3){var i=ss(n[0],n[1]),a=ss(n[1],n[2]);if(!i||!a){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*t,s=Nm([],n[1],n[0],o/i),l=Nm([],n[1],n[2],o/a),u=Nm([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c<n.length;c++)r.lineTo(n[c][0],n[c][1])}function aA(r,e,t){var n=r.getTextGuideLine(),i=r.getTextContent();if(!i){n&&r.removeTextGuideLine();return}for(var a=e.normal,o=a.get("show"),s=i.ignore,l=0;l<$d.length;l++){var u=$d[l],c=e[u],f=u==="normal";if(c){var h=c.get("show"),d=f?s:Re(i.states[u]&&i.states[u].ignore,s);if(d||!Re(h,o)){var p=f?n:n&&n.states[u];p&&(p.ignore=!0),n&&__(n,!0,u,c);continue}n||(n=new bn,r.setTextGuideLine(n),!f&&(s||!o)&&__(n,!0,"normal",e.normal),r.stateProxy&&(n.stateProxy=r.stateProxy)),__(n,!1,u,c)}}if(n){Ce(n.style,t),n.style.fill=null;var v=a.get("showAbove"),m=r.textGuideLineConfig=r.textGuideLineConfig||{};m.showAbove=v||!1,n.buildPath=hpe}}function oA(r,e){e=e||"labelLine";for(var t={normal:r.getModel(e)},n=0;n<mn.length;n++){var i=mn[n];t[i]=r.getModel([i,e])}return t}function eV(r){for(var e=[],t=0;t<r.length;t++){var n=r[t];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,u=o.clone();u.applyTransform(a),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new yy(o,a):null;e.push({label:i,labelLine:n.labelLine,rect:u,localRect:o,obb:c,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:s,transform:a})}}return e}function tV(r,e,t,n,i,a){var o=r.length;if(o<2)return;r.sort(function(w,S){return w.rect[e]-S.rect[e]});for(var s=0,l,u=!1,c=0;c<o;c++){var f=r[c],h=f.rect;l=h[e]-s,l<0&&(h[e]-=l,f.label[e]-=l,u=!0),s=h[e]+h[t]}var d=r[0],p=r[o-1],v,m;g(),v<0&&_(-v,.8),m<0&&_(m,.8),g(),y(v,m,1),y(m,v,-1),g(),v<0&&x(-v),m<0&&x(m);function g(){v=d.rect[e]-n,m=i-p.rect[e]-p.rect[t]}function y(w,S,T){if(w<0){var C=Math.min(S,-w);if(C>0){b(C*T,0,o);var A=C+w;A<0&&_(-A*T,1)}else _(-w*T,1)}}function b(w,S,T){w!==0&&(u=!0);for(var C=S;C<T;C++){var A=r[C],M=A.rect;M[e]+=w,A.label[e]+=w}}function _(w,S){for(var T=[],C=0,A=1;A<o;A++){var M=r[A-1].rect,D=Math.max(r[A].rect[e]-M[e]-M[t],0);T.push(D),C+=D}if(C){var E=Math.min(Math.abs(w)/C,S);if(w>0)for(var A=0;A<o-1;A++){var L=T[A]*E;b(L,0,A+1)}else for(var A=o-1;A>0;A--){var L=T[A-1]*E;b(-L,A,o)}}}function x(w){var S=w<0?-1:1;w=Math.abs(w);for(var T=Math.ceil(w/(o-1)),C=0;C<o-1;C++)if(S>0?b(T,0,C+1):b(-T,o-C-1,o),w-=T,w<=0)return}return u}function dpe(r,e,t,n){return tV(r,"x","width",e,t)}function rV(r,e,t,n){return tV(r,"y","height",e,t)}function nV(r){var e=[];r.sort(function(v,m){return m.priority-v.priority});var t=new Ve(0,0,0,0);function n(v){if(!v.ignore){var m=v.ensureState("emphasis");m.ignore==null&&(m.ignore=!1)}v.ignore=!0}for(var i=0;i<r.length;i++){var a=r[i],o=a.axisAligned,s=a.localRect,l=a.transform,u=a.label,c=a.labelLine;t.copy(a.rect),t.width-=.1,t.height-=.1,t.x+=.05,t.y+=.05;for(var f=a.obb,h=!1,d=0;d<e.length;d++){var p=e[d];if(t.intersect(p.rect)){if(o&&p.axisAligned){h=!0;break}if(p.obb||(p.obb=new yy(p.localRect,p.transform)),f||(f=new yy(s,l)),f.intersect(p.obb)){h=!0;break}}}h?(n(u),c&&n(c)):(u.attr("ignore",a.defaultAttr.ignore),c&&c.attr("ignore",a.defaultAttr.labelGuideIgnore),e.push(a))}}function ppe(r){if(r){for(var e=[],t=0;t<r.length;t++)e.push(r[t].slice());return e}}function vpe(r,e){var t=r.label,n=e&&e.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:ppe(n&&n.shape.points)}}var WI=["align","verticalAlign","width","height","fontSize"],nn=new ao,x_=it(),mpe=it();function Yv(r,e,t){for(var n=0;n<t.length;n++){var i=t[n];e[i]!=null&&(r[i]=e[i])}}var qv=["x","y","rotation"],gpe=function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(e,t,n,i,a){var o=i.style,s=i.__hostTarget,l=s.textConfig||{},u=i.getComputedTransform(),c=i.getBoundingRect().plain();Ve.applyTransform(c,c,u),u?nn.setLocalTransform(u):(nn.x=nn.y=nn.rotation=nn.originX=nn.originY=0,nn.scaleX=nn.scaleY=1),nn.rotation=jn(nn.rotation);var f=i.__hostTarget,h;if(f){h=f.getBoundingRect().plain();var d=f.getComputedTransform();Ve.applyTransform(h,h,d)}var p=h&&f.getTextGuideLine();this._labelList.push({label:i,labelLine:p,seriesModel:n,dataIndex:e,dataType:t,layoutOption:a,computedLayoutOption:null,rect:c,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:p&&p.ignore,x:nn.x,y:nn.y,scaleX:nn.scaleX,scaleY:nn.scaleY,rotation:nn.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var n=e.__model,i=n.get("labelLayout");(Te(i)||et(i).length)&&e.group.traverse(function(a){if(a.ignore)return!0;var o=a.getTextContent(),s=Le(a);o&&!o.disableLabelLayout&&t._addLabel(s.dataIndex,s.dataType,n,o,i)})},r.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),n=e.getHeight();function i(b,_){return function(){GI(b,_)}}for(var a=0;a<this._labelList.length;a++){var o=this._labelList[a],s=o.label,l=s.__hostTarget,u=o.defaultAttr,c=void 0;Te(o.layoutOption)?c=o.layoutOption(vpe(o,l)):c=o.layoutOption,c=c||{},o.computedLayoutOption=c;var f=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*f:u.attachedRot,offset:[c.dx||0,c.dy||0]});var h=!1;if(c.x!=null?(s.x=ie(c.x,t),s.setStyle("x",0),h=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=ie(c.y,n),s.setStyle("y",0),h=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var d=l.getTextGuideLine();d&&(d.setShape({points:c.labelLinePoints}),h=!1)}var p=x_(s);p.needsUpdateLabelLine=h,s.rotation=c.rotate!=null?c.rotate*f:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var v=0;v<WI.length;v++){var m=WI[v];s.setStyle(m,c[m]!=null?c[m]:u.style[m])}if(c.draggable){if(s.draggable=!0,s.cursor="move",l){var g=o.seriesModel;if(o.dataIndex!=null){var y=o.seriesModel.getData(o.dataType);g=y.getItemModel(o.dataIndex)}s.on("drag",i(l,g.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(e){var t=e.getWidth(),n=e.getHeight(),i=eV(this._labelList),a=pt(i,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=pt(i,function(l){return l.layoutOption.moveOverlap==="shiftY"});dpe(a,0,t),rV(o,0,n);var s=pt(i,function(l){return l.layoutOption.hideOverlap});nV(s)},r.prototype.processLabelsOverall=function(){var e=this;k(this._chartViewList,function(t){var n=t.__model,i=t.ignoreLabelLineUpdate,a=n.isAnimationEnabled();t.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!i,l=o.getTextContent();!s&&l&&(s=x_(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,n),a&&e._animateLabels(o,n)})})},r.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),i=Le(e),a=i.dataIndex;if(n&&a!=null){var o=t.getData(i.dataType),s=o.getItemModel(a),l={},u=o.getItemVisual(a,"style");if(u){var c=o.getVisual("drawType");l.stroke=u[c]}var f=s.getModel("labelLine");aA(e,oA(s),l),GI(e,f)}},r.prototype._animateLabels=function(e,t){var n=e.getTextContent(),i=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!Nc(e))){var a=x_(n),o=a.oldLayout,s=Le(e),l=s.dataIndex,u={x:n.x,y:n.y,rotation:n.rotation},c=t.getData(s.dataType);if(o){n.attr(o);var h=e.prevStates;h&&(He(h,"select")>=0&&n.attr(a.oldLayoutSelect),He(h,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),ut(n,u,t,l)}else if(n.attr(u),!xf(n).valueAnimation){var f=Re(n.style.opacity,1);n.style.opacity=0,Ot(n,{style:{opacity:f}},t,l)}if(a.oldLayout=u,n.states.select){var d=a.oldLayoutSelect={};Yv(d,u,qv),Yv(d,n.states.select,qv)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};Yv(p,u,qv),Yv(p,n.states.emphasis,qv)}Kz(n,l,c,t,t)}if(i&&!i.ignore&&!i.invisible){var a=mpe(i),o=a.oldLayout,v={points:i.shape.points};o?(i.attr({shape:o}),ut(i,{shape:v},t)):(i.setShape(v),i.style.strokePercent=0,Ot(i,{style:{strokePercent:1}},t)),a.oldLayout=v}},r}(),w_=it();function ype(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var i=w_(t).labelManager;i||(i=w_(t).labelManager=new gpe),i.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var i=w_(t).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(t.getViewOfSeriesModel(a))}),i.updateLayoutConfig(t),i.layout(t),i.processLabelsOverall()})}var S_=Math.sin,T_=Math.cos,iV=Math.PI,hl=Math.PI*2,bpe=180/iV,aV=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,n,i,a,o){this._add("C",e,t,n,i,a,o)},r.prototype.quadraticCurveTo=function(e,t,n,i){this._add("Q",e,t,n,i)},r.prototype.arc=function(e,t,n,i,a,o){this.ellipse(e,t,n,n,0,i,a,o)},r.prototype.ellipse=function(e,t,n,i,a,o,s,l){var u=s-o,c=!l,f=Math.abs(u),h=hs(f-hl)||(c?u>=hl:-u>=hl),d=u>0?u%hl:u%hl+hl,p=!1;h?p=!0:hs(f)?p=!1:p=d>=iV==!!c;var v=e+n*T_(o),m=t+i*S_(o);this._start&&this._add("M",v,m);var g=Math.round(a*bpe);if(h){var y=1/this._p,b=(c?1:-1)*(hl-y);this._add("A",n,i,g,1,+c,e+n*T_(o+b),t+i*S_(o+b)),y>.01&&this._add("A",n,i,g,0,+c,v,m)}else{var _=e+n*T_(s),x=t+i*S_(s);this._add("A",n,i,g,+p,+c,_,x)}},r.prototype.rect=function(e,t,n,i){this._add("M",e,t),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,n,i,a,o,s,l,u){for(var c=[],f=this._p,h=1;h<arguments.length;h++){var d=arguments[h];if(isNaN(d)){this._invalid=!0;return}c.push(Math.round(d*f)/f)}this._d.push(e+c.join(" ")),this._start=e==="Z"},r.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},r.prototype.getStr=function(){return this._str},r}(),sA="none",_pe=Math.round;function xpe(r){var e=r.fill;return e!=null&&e!==sA}function wpe(r){var e=r.stroke;return e!=null&&e!==sA}var H2=["lineCap","miterLimit","lineJoin"],Spe=K(H2,function(r){return"stroke-"+r.toLowerCase()});function Tpe(r,e,t,n){var i=e.opacity==null?1:e.opacity;if(t instanceof Lr){r("opacity",i);return}if(xpe(e)){var a=zd(e.fill);r("fill",a.color);var o=e.fillOpacity!=null?e.fillOpacity*a.opacity*i:a.opacity*i;o<1&&r("fill-opacity",o)}else r("fill",sA);if(wpe(e)){var s=zd(e.stroke);r("stroke",s.color);var l=e.strokeNoScale?t.getLineScale():1,u=l?(e.lineWidth||0)/l:0,c=e.strokeOpacity!=null?e.strokeOpacity*s.opacity*i:s.opacity*i,f=e.strokeFirst;if(u!==1&&r("stroke-width",u),f&&r("paint-order",f?"stroke":"fill"),c<1&&r("stroke-opacity",c),e.lineDash){var h=XC(t),d=h[0],p=h[1];d&&(p=_pe(p||0),r("stroke-dasharray",d.join(",")),(p||n)&&r("stroke-dashoffset",p))}for(var v=0;v<H2.length;v++){var m=H2[v];if(e[m]!==my[m]){var g=e[m]||my[m];g&&r(Spe[v],g)}}}}var oV="http://www.w3.org/2000/svg",sV="http://www.w3.org/1999/xlink",Cpe="http://www.w3.org/2000/xmlns/",Ape="http://www.w3.org/XML/1998/namespace",UI="ecmeta_";function lV(r){return document.createElementNS(oV,r)}function wr(r,e,t,n,i){return{tag:r,attrs:t||{},children:n,text:i,key:e}}function Mpe(r,e){var t=[];if(e)for(var n in e){var i=e[n],a=n;i!==!1&&(i!==!0&&i!=null&&(a+='="'+i+'"'),t.push(a))}return"<"+r+" "+t.join(" ")+">"}function kpe(r){return"</"+r+">"}function lA(r,e){e=e||{};var t=e.newline?`
|
||
`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return Mpe(o,s)+(o!=="style"?un(l):l||"")+(a?""+t+K(a,function(u){return n(u)}).join(t)+t:"")+kpe(o)}return n(r)}function Dpe(r,e,t){t=t||{};var n=t.newline?`
|
||
`:"",i=" {"+n,a=n+"}",o=K(et(r),function(l){return l+i+K(et(r[l]),function(u){return u+":"+r[l][u]+";"}).join(n)+a}).join(n),s=K(et(e),function(l){return"@keyframes "+l+i+K(et(e[l]),function(u){return u+i+K(et(e[l][u]),function(c){var f=e[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(n)}function G2(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function YI(r,e,t,n){return wr("svg","root",{width:r,height:e,xmlns:oV,"xmlns:xlink":sV,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+r+" "+e:!1},t)}var Epe=0;function uV(){return Epe++}var qI={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},ml="transform-origin";function Lpe(r,e,t){var n=W({},r.shape);W(n,e),r.buildPath(t,n);var i=new aV;return i.reset(YB(r)),t.rebuildPath(i,1),i.generateStr(),i.getStr()}function Ipe(r,e){var t=e.originX,n=e.originY;(t||n)&&(r[ml]=t+"px "+n+"px")}var Ppe={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function cV(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function Rpe(r,e,t){var n=r.shape.paths,i={},a,o;if(k(n,function(l){var u=G2(t.zrId);u.animation=!0,f1(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,h=et(c),d=h.length;if(d){o=h[d-1];var p=c[o];for(var v in p){var m=p[v];i[v]=i[v]||{d:""},i[v].d+=m.d||""}for(var g in f){var y=f[g].animation;y.indexOf(o)>=0&&(a=y)}}}),!!a){e.d=!1;var s=cV(i,t);return a.replace(o,s)}}function XI(r){return se(r)?qI[r]?"cubic-bezier("+qI[r]+")":pC(r)?r:"":""}function f1(r,e,t,n){var i=r.animators,a=i.length,o=[];if(r instanceof DC){var s=Rpe(r,e,t);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u<a;u++){var c=i[u],f=[c.getMaxTime()/1e3+"s"],h=XI(c.getClip().easing),d=c.getDelay();h?f.push(h):f.push("linear"),d&&f.push(d/1e3+"s"),c.getLoop()&&f.push("infinite");var p=f.join(" ");l[p]=l[p]||[p,[]],l[p][1].push(c)}function v(y){var b=y[1],_=b.length,x={},w={},S={},T="animation-timing-function";function C(ge,le,be){for(var re=ge.getTracks(),G=ge.getMaxTime(),ee=0;ee<re.length;ee++){var Q=re[ee];if(Q.needsAnimate()){var me=Q.keyframes,he=Q.propName;if(be&&(he=be(he)),he)for(var Se=0;Se<me.length;Se++){var Fe=me[Se],xe=Math.round(Fe.time/G*100)+"%",rt=XI(Fe.easing),at=Fe.rawValue;(se(at)||lt(at))&&(le[xe]=le[xe]||{},le[xe][he]=Fe.rawValue,rt&&(le[xe][T]=rt))}}}}for(var A=0;A<_;A++){var M=b[A],D=M.targetName;D?D==="shape"&&C(M,w):!n&&C(M,x)}for(var E in x){var L={};JB(L,r),W(L,x[E]);var I=qB(L),R=x[E][T];S[E]=I?{transform:I}:{},Ipe(S[E],L),R&&(S[E][T]=R)}var P,O=!0;for(var E in w){S[E]=S[E]||{};var j=!P,R=w[E][T];j&&(P=new Ra);var F=P.len();P.reset(),S[E].d=Lpe(r,w[E],P);var N=P.len();if(!j&&F!==N){O=!1;break}R&&(S[E][T]=R)}if(!O)for(var E in S)delete S[E].d;if(!n)for(var A=0;A<_;A++){var M=b[A],D=M.targetName;D==="style"&&C(M,S,function(re){return Ppe[re]})}for(var B=et(S),$=!0,J,A=1;A<B.length;A++){var U=B[A-1],we=B[A];if(S[U][ml]!==S[we][ml]){$=!1;break}J=S[U][ml]}if($&&J){for(var E in S)S[E][ml]&&delete S[E][ml];e[ml]=J}if(pt(B,function(ge){return et(S[ge]).length>0}).length){var Ye=cV(S,t);return Ye+" "+y[0]+" both"}}for(var m in l){var s=v(l[m]);s&&o.push(s)}if(o.length){var g=t.zrId+"-cls-"+uV();t.cssNodes["."+g]={animation:o.join(",")},e.class=g}}function Ope(r,e,t){if(!r.ignore)if(r.isSilent()){var n={"pointer-events":"none"};KI(n,e,t)}else{var i=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},a=i.fill;if(!a){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(a=r2(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&r.transform?r.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),KI(n,e,t)}}function KI(r,e,t,n){var i=JSON.stringify(r),a=t.cssStyleCache[i];a||(a=t.zrId+"-cls-"+uV(),t.cssStyleCache[i]=a,t.cssNodes["."+a+":hover"]=r),e.class=e.class?e.class+" "+a:a}var Jd=Math.round;function fV(r){return r&&se(r.src)}function hV(r){return r&&Te(r.toDataURL)}function uA(r,e,t,n){Tpe(function(i,a){var o=i==="fill"||i==="stroke";o&&UB(a)?pV(e,r,i,n):o&&vC(a)?vV(t,r,i,n):r[i]=a,o&&n.ssr&&a==="none"&&(r["pointer-events"]="visible")},e,t,!1),$pe(t,r,n)}function cA(r,e){var t=Rse(e);t&&(t.each(function(n,i){n!=null&&(r[(UI+i).toLowerCase()]=n+"")}),e.isSilent()&&(r[UI+"silent"]="true"))}function ZI(r){return hs(r[0]-1)&&hs(r[1])&&hs(r[2])&&hs(r[3]-1)}function jpe(r){return hs(r[4])&&hs(r[5])}function fA(r,e,t){if(e&&!(jpe(e)&&ZI(e))){var n=1e4;r.transform=ZI(e)?"translate("+Jd(e[4]*n)/n+" "+Jd(e[5]*n)/n+")":nse(e)}}function JI(r,e,t){for(var n=r.points,i=[],a=0;a<n.length;a++)i.push(Jd(n[a][0]*t)/t),i.push(Jd(n[a][1]*t)/t);e.points=i.join(" ")}function QI(r){return!r.smooth}function Npe(r){var e=K(r,function(t){return typeof t=="string"?[t,t]:t});return function(t,n,i){for(var a=0;a<e.length;a++){var o=e[a],s=t[o[0]];s!=null&&(n[o[1]]=Jd(s*i)/i)}}}var Bpe={circle:[Npe(["cx","cy","r"])],polyline:[JI,QI],polygon:[JI,QI]};function zpe(r){for(var e=r.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function dV(r,e){var t=r.style,n=r.shape,i=Bpe[r.type],a={},o=e.animation,s="path",l=r.style.strokePercent,u=e.compress&&YB(r)||4;if(i&&!e.willUpdate&&!(i[1]&&!i[1](n))&&!(o&&zpe(r))&&!(l<1)){s=r.type;var c=Math.pow(10,u);i[0](n,a,c)}else{var f=!r.path||r.shapeChanged();r.path||r.createPathProxy();var h=r.path;f&&(h.beginPath(),r.buildPath(h,r.shape),r.pathUpdated());var d=h.getVersion(),p=r,v=p.__svgPathBuilder;(p.__svgPathVersion!==d||!v||l!==p.__svgPathStrokePercent)&&(v||(v=p.__svgPathBuilder=new aV),v.reset(u),h.rebuildPath(v,l),v.generateStr(),p.__svgPathVersion=d,p.__svgPathStrokePercent=l),a.d=v.getStr()}return fA(a,r.transform),uA(a,t,r,e),cA(a,r),e.animation&&f1(r,a,e),e.emphasis&&Ope(r,a,e),wr(s,r.id+"",a)}function Fpe(r,e){var t=r.style,n=t.image;if(n&&!se(n)&&(fV(n)?n=n.src:hV(n)&&(n=n.toDataURL())),!!n){var i=t.x||0,a=t.y||0,o=t.width,s=t.height,l={href:n,width:o,height:s};return i&&(l.x=i),a&&(l.y=a),fA(l,r.transform),uA(l,t,r,e),cA(l,r),e.animation&&f1(r,l,e),wr("image",r.id+"",l)}}function Vpe(r,e){var t=r.style,n=t.text;if(n!=null&&(n+=""),!(!n||isNaN(t.x)||isNaN(t.y))){var i=t.font||Ms,a=t.x||0,o=ase(t.y||0,N0(i),t.textBaseline),s=ise[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(Sz(t)){var u="",c=t.fontStyle,f=wz(t.fontSize);if(!parseFloat(f))return;var h=t.fontFamily||SB,d=t.fontWeight;u+="font-size:"+f+";font-family:"+h+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),d&&d!=="normal"&&(u+="font-weight:"+d+";"),l.style=u}else l.style="font: "+i;return n.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),o&&(l.y=o),fA(l,r.transform),uA(l,t,r,e),cA(l,r),e.animation&&f1(r,l,e),wr("text",r.id+"",l,void 0,n)}}function eP(r,e){if(r instanceof Xe)return dV(r,e);if(r instanceof Lr)return Fpe(r,e);if(r instanceof Qc)return Vpe(r,e)}function $pe(r,e,t){var n=r.style;if(ose(n)){var i=sse(r),a=t.shadowCache,o=a[i];if(!o){var s=r.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=n.shadowOffsetX||0,f=n.shadowOffsetY||0,h=n.shadowBlur,d=zd(n.shadowColor),p=d.opacity,v=d.color,m=h/2/l,g=h/2/u,y=m+" "+g;o=t.zrId+"-s"+t.shadowIdx++,t.defs[o]=wr("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[wr("feDropShadow","",{dx:c/l,dy:f/u,stdDeviation:y,"flood-color":v,"flood-opacity":p})]),a[i]=o}e.filter=j0(o)}}function pV(r,e,t,n){var i=r[t],a,o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(GB(i))a="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(WB(i))a="radialGradient",o.cx=Re(i.x,.5),o.cy=Re(i.y,.5),o.r=Re(i.r,.5);else return;for(var s=i.colorStops,l=[],u=0,c=s.length;u<c;++u){var f=n2(s[u].offset)*100+"%",h=s[u].color,d=zd(h),p=d.color,v=d.opacity,m={offset:f};m["stop-color"]=p,v<1&&(m["stop-opacity"]=v),l.push(wr("stop",u+"",m))}var g=wr(a,"",o,l),y=lA(g),b=n.gradientCache,_=b[y];_||(_=n.zrId+"-g"+n.gradientIdx++,b[y]=_,o.id=_,n.defs[_]=wr(a,_,o,l)),e[t]=j0(_)}function vV(r,e,t,n){var i=r.style[t],a=r.getBoundingRect(),o={},s=i.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",f;if(HB(i)){var h=i.imageWidth,d=i.imageHeight,p=void 0,v=i.image;if(se(v)?p=v:fV(v)?p=v.src:hV(v)&&(p=v.toDataURL()),typeof Image>"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";vn(h,m),vn(d,m)}else if(h==null||d==null){var g=function(A,M){if(A){var D=A.elm,E=h||M.width,L=d||M.height;A.tag==="pattern"&&(u?(L=1,E/=a.width):c&&(E=1,L/=a.height)),A.attrs.width=E,A.attrs.height=L,D&&(D.setAttribute("width",E),D.setAttribute("height",L))}},y=xC(p,null,r,function(A){l||g(w,A),g(f,A)});y&&y.width&&y.height&&(h=h||y.width,d=d||y.height)}f=wr("image","img",{href:p,width:h,height:d}),o.width=h,o.height=d}else i.svgElement&&(f=ke(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(f){var b,_;l?b=_=1:u?(_=1,b=o.width/a.width):c?(b=1,_=o.height/a.height):o.patternUnits="userSpaceOnUse",b!=null&&!isNaN(b)&&(o.width=b),_!=null&&!isNaN(_)&&(o.height=_);var x=qB(i);x&&(o.patternTransform=x);var w=wr("pattern","",o,[f]),S=lA(w),T=n.patternCache,C=T[S];C||(C=n.zrId+"-p"+n.patternIdx++,T[S]=C,o.id=C,w=n.defs[C]=wr("pattern",C,o,[f])),e[t]=j0(C)}}function Hpe(r,e,t){var n=t.clipPathCache,i=t.defs,a=n[r.id];if(!a){a=t.zrId+"-c"+t.clipPathIdx++;var o={id:a};n[r.id]=a,i[a]=wr("clipPath",a,o,[dV(r,t)])}e["clip-path"]=j0(a)}function tP(r){return document.createTextNode(r)}function Tl(r,e,t){r.insertBefore(e,t)}function rP(r,e){r.removeChild(e)}function nP(r,e){r.appendChild(e)}function mV(r){return r.parentNode}function gV(r){return r.nextSibling}function C_(r,e){r.textContent=e}var iP=58,Gpe=120,Wpe=wr("","");function W2(r){return r===void 0}function oa(r){return r!==void 0}function Upe(r,e,t){for(var n={},i=e;i<=t;++i){var a=r[i].key;a!==void 0&&(n[a]=i)}return n}function Ih(r,e){var t=r.key===e.key,n=r.tag===e.tag;return n&&t}function Qd(r){var e,t=r.children,n=r.tag;if(oa(n)){var i=r.elm=lV(n);if(hA(Wpe,r),q(t))for(e=0;e<t.length;++e){var a=t[e];a!=null&&nP(i,Qd(a))}else oa(r.text)&&!Me(r.text)&&nP(i,tP(r.text))}else r.elm=tP(r.text);return r.elm}function yV(r,e,t,n,i){for(;n<=i;++n){var a=t[n];a!=null&&Tl(r,Qd(a),e)}}function jy(r,e,t,n){for(;t<=n;++t){var i=e[t];if(i!=null)if(oa(i.tag)){var a=mV(i.elm);rP(a,i.elm)}else rP(r,i.elm)}}function hA(r,e){var t,n=e.elm,i=r&&r.attrs||{},a=e.attrs||{};if(i!==a){for(t in a){var o=a[t],s=i[t];s!==o&&(o===!0?n.setAttribute(t,""):o===!1?n.removeAttribute(t):t==="style"?n.style.cssText=o:t.charCodeAt(0)!==Gpe?n.setAttribute(t,o):t==="xmlns:xlink"||t==="xmlns"?n.setAttributeNS(Cpe,t,o):t.charCodeAt(3)===iP?n.setAttributeNS(Ape,t,o):t.charCodeAt(5)===iP?n.setAttributeNS(sV,t,o):n.setAttribute(t,o))}for(t in i)t in a||n.removeAttribute(t)}}function Ype(r,e,t){for(var n=0,i=0,a=e.length-1,o=e[0],s=e[a],l=t.length-1,u=t[0],c=t[l],f,h,d,p;n<=a&&i<=l;)o==null?o=e[++n]:s==null?s=e[--a]:u==null?u=t[++i]:c==null?c=t[--l]:Ih(o,u)?(Sc(o,u),o=e[++n],u=t[++i]):Ih(s,c)?(Sc(s,c),s=e[--a],c=t[--l]):Ih(o,c)?(Sc(o,c),Tl(r,o.elm,gV(s.elm)),o=e[++n],c=t[--l]):Ih(s,u)?(Sc(s,u),Tl(r,s.elm,o.elm),s=e[--a],u=t[++i]):(W2(f)&&(f=Upe(e,n,a)),h=f[u.key],W2(h)?Tl(r,Qd(u),o.elm):(d=e[h],d.tag!==u.tag?Tl(r,Qd(u),o.elm):(Sc(d,u),e[h]=void 0,Tl(r,d.elm,o.elm))),u=t[++i]);(n<=a||i<=l)&&(n>a?(p=t[l+1]==null?null:t[l+1].elm,yV(r,p,t,i,l)):jy(r,e,n,a))}function Sc(r,e){var t=e.elm=r.elm,n=r.children,i=e.children;r!==e&&(hA(r,e),W2(e.text)?oa(n)&&oa(i)?n!==i&&Ype(t,n,i):oa(i)?(oa(r.text)&&C_(t,""),yV(t,null,i,0,i.length-1)):oa(n)?jy(t,n,0,n.length-1):oa(r.text)&&C_(t,""):r.text!==e.text&&(oa(n)&&jy(t,n,0,n.length-1),C_(t,e.text)))}function qpe(r,e){if(Ih(r,e))Sc(r,e);else{var t=r.elm,n=mV(t);Qd(e),n!==null&&(Tl(n,e.elm,gV(t)),jy(n,[r],0,0))}return e}var Xpe=0,Kpe=function(){function r(e,t,n){if(this.type="svg",this.refreshHover=aP(),this.configLayer=aP(),this.storage=t,this._opts=n=W({},n),this.root=e,this._id="zr"+Xpe++,this._oldVNode=YI(n.width,n.height),e&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=lV("svg");hA(null,this._oldVNode),i.appendChild(a),e.appendChild(i)}this.resize(n.width,n.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",qpe(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return eP(e,G2(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=G2(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=Zpe(n,i,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=wr("g","main",{},[]);this._paintList(t,a,l?l.children:o),l&&o.push(l);var u=K(et(a.defs),function(h){return a.defs[h]});if(u.length&&o.push(wr("defs","defs",{},u)),e.animation){var c=Dpe(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=wr("style","stl",{},[],c);o.push(f)}}return YI(n,i,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},lA(this.renderToVNode({animation:Re(e.cssAnimation,!0),emphasis:Re(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Re(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,n){for(var i=e.length,a=[],o=0,s,l,u=0,c=0;c<i;c++){var f=e[c];if(!f.invisible){var h=f.__clipPaths,d=h&&h.length||0,p=l&&l.length||0,v=void 0;for(v=Math.max(d-1,p-1);v>=0&&!(h&&l&&h[v]===l[v]);v--);for(var m=p-1;m>v;m--)o--,s=a[o-1];for(var g=v+1;g<d;g++){var y={};Hpe(h[g],y,t);var b=wr("g","clip-g-"+u++,y,[]);(s?s.children:n).push(b),a[o++]=b,s=b}l=h;var _=eP(f,t);_&&(s?s.children:n).push(_)}}},r.prototype.resize=function(e,t){var n=this._opts,i=this.root,a=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),i&&a&&(a.style.display="none",e=Ec(i,0,n),t=Ec(i,1,n),a.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,a){var o=a.style;o.width=e+"px",o.height=t+"px"}if(vC(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",e),s.setAttribute("height",t));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",e),l.setAttribute("height",t))}}},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},r.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},r.prototype.toDataURL=function(e){var t=this.renderToString(),n="data:image/svg+xml;";return e?(t=use(t),t&&n+"base64,"+t):n+"charset=UTF-8,"+encodeURIComponent(t)},r}();function aP(r){return function(){}}function Zpe(r,e,t,n){var i;if(t&&t!=="none")if(i=wr("rect","bg",{width:r,height:e,x:"0",y:"0"}),UB(t))pV({fill:t},i.attrs,"fill",n);else if(vC(t))vV({style:{fill:t},dirty:tr,getBoundingRect:function(){return{width:r,height:e}}},i.attrs,"fill",n);else{var a=zd(t),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs["fill-opacity"]=s)}return i}function Jpe(r){r.registerPainter("svg",Kpe)}function oP(r,e,t){var n=ks.createCanvas(),i=e.getWidth(),a=e.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",r)),n.width=i*t,n.height=a*t,n}var A_=function(r){z(e,r);function e(t,n,i){var a=r.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||py,typeof t=="string"?o=oP(t,n,i):Me(t)&&(o=t,t=o.id),a.id=t,a.dom=o;var s=o.style;return s&&(DB(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=oP("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new Ve(0,0,0,0);function c(y){if(!(!y.isFinite()||y.isZero()))if(o.length===0){var b=new Ve(0,0,0,0);b.copy(y),o.push(b)}else{for(var _=!1,x=1/0,w=0,S=0;S<o.length;++S){var T=o[S];if(T.intersect(y)){var C=new Ve(0,0,0,0);C.copy(T),C.union(y),o[S]=C,_=!0;break}else if(l){u.copy(y),u.union(T);var A=y.width*y.height,M=T.width*T.height,D=u.width*u.height,E=D-A-M;E<x&&(x=E,w=S)}}if(l&&(o[w].union(y),_=!0),!_){var b=new Ve(0,0,0,0);b.copy(y),o.push(b)}l||(l=o.length>=s)}}for(var f=this.__startIndex;f<this.__endIndex;++f){var h=t[f];if(h){var d=h.shouldBePainted(i,a,!0,!0),p=h.__isRendered&&(h.__dirty&On||!d)?h.getPrevPaintRect():null;p&&c(p);var v=d&&(h.__dirty&On||!h.__isRendered)?h.getPaintRect():null;v&&c(v)}}for(var f=this.__prevStartIndex;f<this.__prevEndIndex;++f){var h=n[f],d=h&&h.shouldBePainted(i,a,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered){var p=h.getPrevPaintRect();p&&c(p)}}var m;do{m=!1;for(var f=0;f<o.length;){if(o[f].isZero()){o.splice(f,1);continue}for(var g=f+1;g<o.length;)o[f].intersect(o[g])?(m=!0,o[f].union(o[g]),o.splice(g,1)):g++;f++}}while(m);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=t+"px",o.height=n+"px"),a.width=t*i,a.height=n*i,s&&(s.width=t*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},e.prototype.clear=function(t,n,i){var a=this.dom,o=this.ctx,s=a.width,l=a.height;n=n||this.clearColor;var u=this.motionBlur&&!t,c=this.lastFrameAlpha,f=this.dpr,h=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/f,l/f));var d=this.domBack;function p(v,m,g,y){if(o.clearRect(v,m,g,y),n&&n!=="transparent"){var b=void 0;if(P0(n)){var _=n.global||n.__width===g&&n.__height===y;b=_&&n.__canvasGradient||O2(o,n,{x:0,y:0,width:g,height:y}),n.__canvasGradient=b,n.__width=g,n.__height=y}else goe(n)&&(n.scaleX=n.scaleX||f,n.scaleY=n.scaleY||f,b=j2(o,n,{dirty:function(){h.setUnpainted(),h.painter.refresh()}}));o.save(),o.fillStyle=b||n,o.fillRect(v,m,g,y),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(d,v,m,g,y),o.restore())}!i||u?p(0,0,s,l):i.length&&k(i,function(v){p(v.x*f,v.y*f,v.width*f,v.height*f)})},e}(gi),sP=1e5,dl=314159,Xv=.01,Qpe=.001;function eve(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function tve(r,e){var t=document.createElement("div");return t.style.cssText=["position:relative","width:"+r+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",t}var rve=function(){function r(e,t,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=n=W({},n||{}),this.dpr=n.devicePixelRatio||py,this._singleCanvas=a,this.root=e;var o=e.style;o&&(DB(e),e.innerHTML=""),this.storage=t;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var c=e,f=c.width,h=c.height;n.width!=null&&(f=n.width),n.height!=null&&(h=n.height),this.dpr=n.devicePixelRatio||1,c.width=f*this.dpr,c.height=h*this.dpr,this._width=f,this._height=h;var d=new A_(c,this,this.dpr);d.__builtin__=!0,d.initContext(),l[dl]=d,d.zlevel=dl,s.push(dl),this._domRoot=e}else{this._width=Ec(e,0,n),this._height=Ec(e,1,n);var u=this._domRoot=tve(this._width,this._height);e.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,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=t.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),!!t){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<t;o++){var s=e[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(sP)),a||(a=n.ctx,a.save()),Nl(a,s,i,o===t-1))}a&&a.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(sP)},r.prototype.paintOne=function(e,t){iF(e,t)},r.prototype._paintList=function(e,t,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(e);var a=this._doPaintList(e,t,n),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;ly(function(){l._paintList(e,t,n,i)})}}},r.prototype._compositeManually=function(){var e=this.getLayer(dl).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer(function(i){i.virtual&&e.drawImage(i.dom,0,0,t,n)})},r.prototype._doPaintList=function(e,t,n){for(var i=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&a.push(u)}for(var c=!0,f=!1,h=function(v){var m=a[v],g=m.ctx,y=o&&m.createRepaintRects(e,t,d._width,d._height),b=n?m.__startIndex:m.__drawIndex,_=!n&&m.incremental&&Date.now,x=_&&Date.now(),w=m.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(m.__startIndex===m.__endIndex)m.clear(!1,w,y);else if(b===m.__startIndex){var S=e[b];(!S.incremental||!S.notClear||n)&&m.clear(!1,w,y)}b===-1&&(console.error("For some unknown reason. drawIndex is -1"),b=m.__startIndex);var T,C=function(E){var L={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(T=b;T<m.__endIndex;T++){var I=e[T];if(I.__inHover&&(f=!0),i._doPaintEl(I,m,o,E,L,T===m.__endIndex-1),_){var R=Date.now()-x;if(R>15)break}}L.prevElClipPaths&&g.restore()};if(y)if(y.length===0)T=m.__endIndex;else for(var A=d.dpr,M=0;M<y.length;++M){var D=y[M];g.save(),g.beginPath(),g.rect(D.x*A,D.y*A,D.width*A,D.height*A),g.clip(),C(D),g.restore()}else g.save(),C(),g.restore();m.__drawIndex=T,m.__drawIndex<m.__endIndex&&(c=!1)},d=this,p=0;p<a.length;p++)h(p);return Ze.wxa&&k(this._layers,function(v){v&&v.ctx&&v.ctx.draw&&v.ctx.draw()}),{finished:c,needsRefreshHover:f}},r.prototype._doPaintEl=function(e,t,n,i,a,o){var s=t.ctx;if(n){var l=e.getPaintRect();(!i||l&&l.intersect(i))&&(Nl(s,e,a,o),e.setPrevPaintRect(l))}else Nl(s,e,a,o)},r.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=dl);var n=this._layers[e];return n||(n=new A_("zr_"+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Be(n,this._layerConfig[e],!0):this._layerConfig[e-Xv]&&Be(n,this._layerConfig[e-Xv],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},r.prototype.insertLayer=function(e,t){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,l=-1;if(!n[e]&&eve(t)){if(a>0&&e>i[0]){for(l=0;l<a-1&&!(i[l]<e&&i[l+1]>e);l++);s=n[i[l]]}if(i.splice(l+1,0,e),n[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];e.call(t,this._layers[a],a)}},r.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&e.call(t,o,a)}},r.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||e.call(t,o,a)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(f,h){f.__dirty=f.__used=!1});function t(f){a&&(a.__endIndex!==f&&(a.__dirty=!0),a.__endIndex=f)}if(this._singleCanvas)for(var n=1;n<e.length;n++){var i=e[n];if(i.zlevel!==e[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,l;for(l=0;l<e.length;l++){var i=e[l],u=i.zlevel,c=void 0;s!==u&&(s=u,o=0),i.incremental?(c=this.getLayer(u+Qpe,this._needsManuallyCompositing),c.incremental=!0,o=1):c=this.getLayer(u+(o>0?Xv:0),this._needsManuallyCompositing),c.__builtin__||sC("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,t(l),a=c),i.__dirty&On&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(f,h){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,k(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?Be(n[e],t,!0):n[e]=t;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===e||a===e+Xv){var o=this._layers[a];Be(o,n[e],!0)}}}},r.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,i=t[e];i&&(i.dom.parentNode.removeChild(i.dom),delete t[e],n.splice(He(n,e),1))},r.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(e!=null&&(i.width=e),t!=null&&(i.height=t),e=Ec(a,0,i),t=Ec(a,1,i),n.style.display="",this._width!==e||t!==this._height){n.style.width=e+"px",n.style.height=t+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this.getLayer(dl).resize(e,t)}return this},r.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[dl].dom;var t=new A_("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var i=t.dom.width,a=t.dom.height;this.eachLayer(function(f){f.__builtin__?n.drawImage(f.dom,0,0,i,a):f.renderToCanvas&&(n.save(),f.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var c=s[l];Nl(n,c,o,l===u-1)}return t.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r}();function nve(r){r.registerPainter("canvas",rve)}var ive=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t){return Lo(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var n=new Ee,i=ur("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);n.add(i),i.setStyle(t.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=t.itemHeight*.8,u=ur(s,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);n.add(u),u.setStyle(t.itemStyle);var c=t.iconRotate==="inherit"?o:t.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([t.itemWidth/2,t.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.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},e}(It);function af(r,e){var t=r.mapDimensionsAll("defaultedLabel"),n=t.length;if(n===1){var i=tf(r,e,t[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<t.length;o++)a.push(tf(r,e,t[o]));return a.join(" ")}}function bV(r,e){var t=r.mapDimensionsAll("defaultedLabel");if(!q(e))return e+"";for(var n=[],i=0;i<t.length;i++){var a=r.getDimensionIndex(t[i]);a>=0&&n.push(e[a])}return n.join(" ")}var Pp=function(r){z(e,r);function e(t,n,i,a){var o=r.call(this)||this;return o.updateData(t,n,i,a),o}return e.prototype._createSymbol=function(t,n,i,a,o){this.removeAll();var s=ur(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=ave,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){wo(this.childAt(0))},e.prototype.downplay=function(){So(this.childAt(0))},e.prototype.setZ=function(t,n){var i=this.childAt(0);i.zlevel=t,i.z=n},e.prototype.setDraggable=function(t,n){var i=this.childAt(0);i.draggable=t,i.cursor=!n&&t?"move":i.cursor},e.prototype.updateData=function(t,n,i,a){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,n),u=o!==this._symbolType,c=a&&a.disableAnimation;if(u){var f=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,l,f)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};c?h.attr(d):ut(h,d,s,n),Bi(h)}if(this._updateCommon(t,n,l,i,a),u){var h=this.childAt(0);if(!c){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,Ot(h,d,s,n)}}c&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,n,i,a,o){var s=this.childAt(0),l=t.hostModel,u,c,f,h,d,p,v,m,g;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,h=a.focus,d=a.blurScope,v=a.labelStatesModels,m=a.hoverScale,g=a.cursorStyle,p=a.emphasisDisabled),!a||t.hasItemOption){var y=a&&a.itemModel?a.itemModel:t.getItemModel(n),b=y.getModel("emphasis");u=b.getModel("itemStyle").getItemStyle(),f=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),h=b.get("focus"),d=b.get("blurScope"),p=b.get("disabled"),v=Tr(y),m=b.getShallow("scale"),g=y.getShallow("cursor")}var _=t.getItemVisual(n,"symbolRotate");s.attr("rotation",(_||0)*Math.PI/180||0);var x=Pu(t.getItemVisual(n,"symbolOffset"),i);x&&(s.x=x[0],s.y=x[1]),g&&s.attr("cursor",g);var w=t.getItemVisual(n,"style"),S=w.fill;if(s instanceof Lr){var T=s.style;s.useStyle(W({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},w))}else s.__isEmptyBrush?s.useStyle(W({},w)):s.useStyle(w),s.style.decal=null,s.setColor(S,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=t.getItemVisual(n,"liftZ"),A=this._z2;C!=null?A==null&&(this._z2=s.z2,s.z2+=C):A!=null&&(s.z2=A,this._z2=null);var M=o&&o.useNameLabel;Vr(s,v,{labelFetcher:l,labelDataIndex:n,defaultText:D,inheritColor:S,defaultOpacity:w.opacity});function D(I){return M?t.getName(I):af(t,I)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var E=s.ensureState("emphasis");E.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var L=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;E.scaleX=this._sizeX*L,E.scaleY=this._sizeY*L,this.setSymbolScale(1),$t(this,h,d,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,n,i){var a=this.childAt(0),o=Le(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&Es(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Es(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,n){return kf(t.getItemVisual(n,"symbolSize"))},e}(Ee);function ave(r,e){this.parent.drift(r,e)}function M_(r,e,t,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(t))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function lP(r){return r!=null&&!Me(r)&&(r={isIgnore:r}),r||{}}function uP(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:Tr(e),cursorStyle:e.get("cursor")}}var Rp=function(){function r(e){this.group=new Ee,this._SymbolCtor=e||Pp}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=lP(t);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=uP(e),u={disableAnimation:s},c=t.getSymbolPoint||function(f){return e.getItemLayout(f)};a||n.removeAll(),e.diff(a).add(function(f){var h=c(f);if(M_(e,h,f,t)){var d=new o(e,f,l,u);d.setPosition(h),e.setItemGraphicEl(f,d),n.add(d)}}).update(function(f,h){var d=a.getItemGraphicEl(h),p=c(f);if(!M_(e,p,f,t)){n.remove(d);return}var v=e.getItemVisual(f,"symbol")||"circle",m=d&&d.getSymbolType&&d.getSymbolType();if(!d||m&&m!==v)n.remove(d),d=new o(e,f,l,u),d.setPosition(p);else{d.updateData(e,f,l,u);var g={x:p[0],y:p[1]};s?d.attr(g):ut(d,g,i)}n.add(d),e.setItemGraphicEl(f,d)}).remove(function(f){var h=a.getItemGraphicEl(f);h&&h.fadeOut(function(){n.remove(h)},i)}).execute(),this._getSymbolPoint=c,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=uP(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=lP(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var o=t.getItemLayout(a);if(M_(t,o,a,n)){var s=new this._SymbolCtor(t,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(e){Vs(this._progressiveEls||this.group,e)},r.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(i){i.fadeOut(function(){t.remove(i)},n.hostModel)}):t.removeAll()},r}();function _V(r,e,t){var n=r.getBaseAxis(),i=r.getOtherAxis(n),a=ove(i,t),o=n.dim,s=i.dim,l=e.mapDimension(s),u=e.mapDimension(o),c=s==="x"||s==="radius"?1:0,f=K(r.dimensions,function(p){return e.mapDimension(p)}),h=!1,d=e.getCalculationInfo("stackResultDimension");return Is(e,f[0])&&(h=!0,f[0]=d),Is(e,f[1])&&(h=!0,f[1]=d),{dataDimsForPoint:f,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function ove(r,e){var t=0,n=r.scale.getExtent();return e==="start"?t=n[0]:e==="end"?t=n[1]:lt(e)&&!isNaN(e)?t=e:n[0]>0?t=n[0]:n[1]<0&&(t=n[1]),t}function xV(r,e,t,n){var i=NaN;r.stacked&&(i=t.get(t.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=t.get(r.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function sve(r,e){var t=[];return e.diff(r).add(function(n){t.push({cmd:"+",idx:n})}).update(function(n,i){t.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){t.push({cmd:"-",idx:n})}).execute(),t}function lve(r,e,t,n,i,a,o,s){for(var l=sve(r,e),u=[],c=[],f=[],h=[],d=[],p=[],v=[],m=_V(i,e,o),g=r.getLayout("points")||[],y=e.getLayout("points")||[],b=0;b<l.length;b++){var _=l[b],x=!0,w=void 0,S=void 0;switch(_.cmd){case"=":w=_.idx*2,S=_.idx1*2;var T=g[w],C=g[w+1],A=y[S],M=y[S+1];(isNaN(T)||isNaN(C))&&(T=A,C=M),u.push(T,C),c.push(A,M),f.push(t[w],t[w+1]),h.push(n[S],n[S+1]),v.push(e.getRawIndex(_.idx1));break;case"+":var D=_.idx,E=m.dataDimsForPoint,L=i.dataToPoint([e.get(E[0],D),e.get(E[1],D)]);S=D*2,u.push(L[0],L[1]),c.push(y[S],y[S+1]);var I=xV(m,i,e,D);f.push(I[0],I[1]),h.push(n[S],n[S+1]),v.push(e.getRawIndex(D));break;case"-":x=!1}x&&(d.push(_),p.push(p.length))}p.sort(function(U,we){return v[U]-v[we]});for(var R=u.length,P=ma(R),O=ma(R),j=ma(R),F=ma(R),N=[],b=0;b<p.length;b++){var B=p[b],$=b*2,J=B*2;P[$]=u[J],P[$+1]=u[J+1],O[$]=c[J],O[$+1]=c[J+1],j[$]=f[J],j[$+1]=f[J+1],F[$]=h[J],F[$+1]=h[J+1],N[b]=d[B]}return{current:P,next:O,stackedOnCurrent:j,stackedOnNext:F,status:N}}var Ho=Math.min,Go=Math.max;function au(r,e){return isNaN(r)||isNaN(e)}function U2(r,e,t,n,i,a,o,s,l){for(var u,c,f,h,d,p,v=t,m=0;m<n;m++){var g=e[v*2],y=e[v*2+1];if(v>=i||v<0)break;if(au(g,y)){if(l){v+=a;continue}break}if(v===t)r[a>0?"moveTo":"lineTo"](g,y),f=g,h=y;else{var b=g-u,_=y-c;if(b*b+_*_<.5){v+=a;continue}if(o>0){for(var x=v+a,w=e[x*2],S=e[x*2+1];w===g&&S===y&&m<n;)m++,x+=a,v+=a,w=e[x*2],S=e[x*2+1],g=e[v*2],y=e[v*2+1],b=g-u,_=y-c;var T=m+1;if(l)for(;au(w,S)&&T<n;)T++,x+=a,w=e[x*2],S=e[x*2+1];var C=.5,A=0,M=0,D=void 0,E=void 0;if(T>=n||au(w,S))d=g,p=y;else{A=w-u,M=S-c;var L=g-u,I=w-g,R=y-c,P=S-y,O=void 0,j=void 0;if(s==="x"){O=Math.abs(L),j=Math.abs(I);var F=A>0?1:-1;d=g-F*O*o,p=y,D=g+F*j*o,E=y}else if(s==="y"){O=Math.abs(R),j=Math.abs(P);var N=M>0?1:-1;d=g,p=y-N*O*o,D=g,E=y+N*j*o}else O=Math.sqrt(L*L+R*R),j=Math.sqrt(I*I+P*P),C=j/(j+O),d=g-A*o*(1-C),p=y-M*o*(1-C),D=g+A*o*C,E=y+M*o*C,D=Ho(D,Go(w,g)),E=Ho(E,Go(S,y)),D=Go(D,Ho(w,g)),E=Go(E,Ho(S,y)),A=D-g,M=E-y,d=g-A*O/j,p=y-M*O/j,d=Ho(d,Go(u,g)),p=Ho(p,Go(c,y)),d=Go(d,Ho(u,g)),p=Go(p,Ho(c,y)),A=g-d,M=y-p,D=g+A*j/O,E=y+M*j/O}r.bezierCurveTo(f,h,d,p,g,y),f=D,h=E}else r.lineTo(g,y)}u=g,c=y,v+=a}return m}var wV=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),uve=function(r){z(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new wV},e.prototype.buildPath=function(t,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&au(i[o*2-2],i[o*2-1]);o--);for(;a<o&&au(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=U2(t,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},e.prototype.getPointOn=function(t,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=Ra.CMD,s,l,u=n==="x",c=[],f=0;f<a.length;){var h=a[f++],d=void 0,p=void 0,v=void 0,m=void 0,g=void 0,y=void 0,b=void 0;switch(h){case o.M:s=a[f++],l=a[f++];break;case o.L:if(d=a[f++],p=a[f++],b=u?(t-s)/(d-s):(t-l)/(p-l),b<=1&&b>=0){var _=u?(p-l)*b+l:(d-s)*b+s;return u?[t,_]:[_,t]}s=d,l=p;break;case o.C:d=a[f++],p=a[f++],v=a[f++],m=a[f++],g=a[f++],y=a[f++];var x=u?cy(s,d,v,g,t,c):cy(l,p,m,y,t,c);if(x>0)for(var w=0;w<x;w++){var S=c[w];if(S<=1&&S>=0){var _=u?_r(l,p,m,y,S):_r(s,d,v,g,S);return u?[t,_]:[_,t]}}s=g,l=y;break}}},e}(Xe),cve=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(wV),SV=function(r){z(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new cve},e.prototype.buildPath=function(t,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&au(i[s*2-2],i[s*2-1]);s--);for(;o<s&&au(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=U2(t,i,o,s,s,1,n.smooth,l,n.connectNulls);U2(t,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,t.closePath()}},e}(Xe);function TV(r,e,t,n,i){var a=r.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=t.get(["lineStyle","width"])||0;o-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var f=new nt({shape:{x:o,y:s,width:l,height:u}});if(e){var h=r.getBaseAxis(),d=h.isHorizontal(),p=h.inverse;d?(p&&(f.shape.x+=l),f.shape.width=0):(p||(f.shape.y+=u),f.shape.height=0);var v=Te(i)?function(m){i(m,f)}:null;Ot(f,{shape:{width:l,height:u,x:o,y:s}},t,null,n,v)}return f}function CV(r,e,t){var n=r.getArea(),i=Xt(n.r0,1),a=Xt(n.r,1),o=new gn({shape:{cx:Xt(r.cx,1),cy:Xt(r.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(e){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,Ot(o,{shape:{endAngle:n.endAngle,r:a}},t)}return o}function Op(r,e,t,n,i){if(r){if(r.type==="polar")return CV(r,e,t);if(r.type==="cartesian2d")return TV(r,e,t,n,i)}else return null;return null}function Ou(r,e){return r.type===e}function cP(r,e){if(r.length===e.length){for(var t=0;t<r.length;t++)if(r[t]!==e[t])return;return!0}}function fP(r){for(var e=1/0,t=1/0,n=-1/0,i=-1/0,a=0;a<r.length;){var o=r[a++],s=r[a++];isNaN(o)||(e=Math.min(o,e),n=Math.max(o,n)),isNaN(s)||(t=Math.min(s,t),i=Math.max(s,i))}return[[e,t],[n,i]]}function hP(r,e){var t=fP(r),n=t[0],i=t[1],a=fP(e),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 dP(r){return lt(r)?r:r?.5:0}function fve(r,e,t){if(!t.valueDim)return[];for(var n=e.count(),i=ma(n*2),a=0;a<n;a++){var o=xV(t,r,e,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Wo(r,e,t,n,i){var a=t.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],c=[],f=[],h=[];if(i){for(l=0;l<r.length;l+=2){var d=e||r;!isNaN(d[l])&&!isNaN(d[l+1])&&h.push(r[l],r[l+1])}r=h}for(l=0;l<r.length-2;l+=2)switch(f[0]=r[l+2],f[1]=r[l+3],c[0]=r[l],c[1]=r[l+1],s.push(c[0],c[1]),n){case"end":u[o]=f[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var p=(c[o]+f[o])/2,v=[];u[o]=v[o]=p,u[1-o]=c[1-o],v[1-o]=f[1-o],s.push(u[0],u[1]),s.push(v[0],v[1]);break;default:u[o]=c[o],u[1-o]=f[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function hve(r,e){var t=[],n=r.length,i,a;function o(c,f,h){var d=c.coord,p=(h-d)/(f.coord-d),v=rse(p,[c.color,f.color]);return{coord:h,color:v}}for(var s=0;s<n;s++){var l=r[s],u=l.coord;if(u<0)i=l;else if(u>e){a?t.push(o(a,l,e)):i&&t.push(o(i,l,0),o(i,l,e));break}else i&&(t.push(o(i,l,0)),i=null),t.push(l),a=l}return t}function dve(r,e,t){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&e.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=e.getAxis(i),u=K(a.stops,function(b){return{coord:l.toGlobalCoord(l.dataToCoord(b.value)),color:b.color}}),c=u.length,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=hve(u,i==="x"?t.getWidth():t.getHeight()),d=h.length;if(!d&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var p=10,v=h[0].coord-p,m=h[d-1].coord+p,g=m-v;if(g<.001)return"transparent";k(h,function(b){b.offset=(b.coord-v)/g}),h.push({offset:d?h[d-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:d?h[0].offset:.5,color:f[0]||"transparent"});var y=new Ap(0,0,0,0,h,!0);return y[i]=v,y[i+"2"]=m,y}}}function pve(r,e,t){var n=r.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=t.getAxesByScale("ordinal")[0];if(a&&!(i&&vve(a,e))){var o=e.mapDimension(a.dim),s={};return k(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function vve(r,e){var t=r.getExtent(),n=Math.abs(t[1]-t[0])/r.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(Pp.getSymbolSize(e,o)[r.isHorizontal()?1:0]*1.5>n)return!1;return!0}function mve(r,e){return isNaN(r)||isNaN(e)}function gve(r){for(var e=r.length/2;e>0&&mve(r[e*2-2],r[e*2-1]);e--);return e-1}function pP(r,e){return[r[e*2],r[e*2+1]]}function yve(r,e,t){for(var n=r.length/2,i=t==="x"?0:1,a,o,s=0,l=-1,u=0;u<n;u++)if(o=r[u*2+i],!(isNaN(o)||isNaN(r[u*2+1-i]))){if(u===0){a=o;continue}if(a<=e&&o>=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function AV(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e<mn.length;e++)if(r.get([mn[e],"endLabel","show"]))return!0;return!1}function k_(r,e,t,n){if(Ou(e,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=AV(n)?function(d,p){r._endLabelOnDuring(d,p,o,s,a,i,e)}:null,u=e.getBaseAxis().isHorizontal(),c=TV(e,t,n,function(){var d=r._endLabel;d&&t&&s.originalX!=null&&d.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var f=c.shape,h=Math.max(f.width,f.height);u?(f.y-=h,f.height+=h*2):(f.x-=h,f.width+=h*2)}return l&&l(1,c),c}else return CV(e,t,n)}function bve(r,e){var t=e.getBaseAxis(),n=t.isHorizontal(),i=t.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:r.get("align")||a,verticalAlign:r.get("verticalAlign")||o}}}var _ve=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(){var t=new Ee,n=new Rp;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=t,this._changePolyState=ue(this._changePolyState,this)},e.prototype.render=function(t,n,i){var a=t.coordinateSystem,o=this.group,s=t.getData(),l=t.getModel("lineStyle"),u=t.getModel("areaStyle"),c=s.getLayout("points")||[],f=a.type==="polar",h=this._coordSys,d=this._symbolDraw,p=this._polyline,v=this._polygon,m=this._lineGroup,g=!n.ssr&&t.get("animation"),y=!u.isEmpty(),b=u.get("origin"),_=_V(a,s,b),x=y&&fve(a,s,_),w=t.get("showSymbol"),S=t.get("connectNulls"),T=w&&!f&&pve(t,s,a),C=this._data;C&&C.eachItemGraphicEl(function(U,we){U.__temp&&(o.remove(U),C.setItemGraphicEl(we,null))}),w||d.remove(),o.add(m);var A=f?!1:t.get("step"),M;a&&a.getArea&&t.get("clip",!0)&&(M=a.getArea(),M.width!=null?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r+=.5)),this._clipShapeForSymbol=M;var D=dve(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(p&&h.type===a.type&&A===this._step))w&&d.updateData(s,{isIgnore:T,clipShape:M,disableAnimation:!0,getSymbolPoint:function(U){return[c[U*2],c[U*2+1]]}}),g&&this._initSymbolLabelAnimation(s,a,M),A&&(x&&(x=Wo(x,c,a,A,S)),c=Wo(c,null,a,A,S)),p=this._newPolyline(c),y?v=this._newPolygon(c,x):v&&(m.remove(v),v=this._polygon=null),f||this._initOrUpdateEndLabel(t,a,yu(D)),m.setClipPath(k_(this,a,!0,t));else{y&&!v?v=this._newPolygon(c,x):v&&!y&&(m.remove(v),v=this._polygon=null),f||this._initOrUpdateEndLabel(t,a,yu(D));var E=m.getClipPath();if(E){var L=k_(this,a,!1,t);Ot(E,{shape:L.shape},t)}else m.setClipPath(k_(this,a,!0,t));w&&d.updateData(s,{isIgnore:T,clipShape:M,disableAnimation:!0,getSymbolPoint:function(U){return[c[U*2],c[U*2+1]]}}),(!cP(this._stackedOnPoints,x)||!cP(this._points,c))&&(g?this._doUpdateAnimation(s,x,a,i,A,b,S):(A&&(x&&(x=Wo(x,c,a,A,S)),c=Wo(c,null,a,A,S)),p.setShape({points:c}),v&&v.setShape({points:c,stackedOnPoints:x})))}var I=t.getModel("emphasis"),R=I.get("focus"),P=I.get("blurScope"),O=I.get("disabled");if(p.useStyle(Ce(l.getLineStyle(),{fill:"none",stroke:D,lineJoin:"bevel"})),Fr(p,t,"lineStyle"),p.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var j=p.getState("emphasis").style;j.lineWidth=+p.style.lineWidth+1}Le(p).seriesIndex=t.seriesIndex,$t(p,R,P,O);var F=dP(t.get("smooth")),N=t.get("smoothMonotone");if(p.setShape({smooth:F,smoothMonotone:N,connectNulls:S}),v){var B=s.getCalculationInfo("stackedOnSeries"),$=0;v.useStyle(Ce(u.getAreaStyle(),{fill:D,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),B&&($=dP(B.get("smooth"))),v.setShape({smooth:F,stackedOnSmooth:$,smoothMonotone:N,connectNulls:S}),Fr(v,t,"areaStyle"),Le(v).seriesIndex=t.seriesIndex,$t(v,R,P,O)}var J=this._changePolyState;s.eachItemGraphicEl(function(U){U&&(U.onHoverStateChange=J)}),this._polyline.onHoverStateChange=J,this._data=s,this._coordSys=a,this._stackedOnPoints=x,this._points=c,this._step=A,this._valueOrigin=b,t.get("triggerLineEvent")&&(this.packEventData(t,p),v&&this.packEventData(t,v))},e.prototype.packEventData=function(t,n){Le(n).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,n,i,a){var o=t.getData(),s=vu(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=t.get("zlevel")||0,d=t.get("z")||0;u=new Pp(o,s),u.x=c,u.y=f,u.setZ(h,d);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=d,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else St.prototype.highlight.call(this,t,n,i,a)},e.prototype.downplay=function(t,n,i,a){var o=t.getData(),s=vu(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 St.prototype.downplay.call(this,t,n,i,a)},e.prototype._changePolyState=function(t){var n=this._polygon;gy(this._polyline,t),n&&gy(n,t)},e.prototype._newPolyline=function(t){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new uve({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(t,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new SV({shape:{points:t,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(t,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=t.hostModel,c=u.get("animationDuration");Te(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=Te(f)?f(null):f;t.eachItemGraphicEl(function(d,p){var v=d;if(v){var m=[d.x,d.y],g=void 0,y=void 0,b=void 0;if(i)if(o){var _=i,x=n.pointToCoord(m);a?(g=_.startAngle,y=_.endAngle,b=-x[1]/180*Math.PI):(g=_.r0,y=_.r,b=x[0])}else{var w=i;a?(g=w.x,y=w.x+w.width,b=d.x):(g=w.y+w.height,y=w.y,b=d.y)}var S=y===g?0:(b-g)/(y-g);l&&(S=1-S);var T=Te(f)?f(p):c*S+h,C=v.getSymbolPath(),A=C.getTextContent();v.attr({scaleX:0,scaleY:0}),v.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,n,i){var a=t.getModel("endLabel");if(AV(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new ot({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=gve(l);c>=0&&(Vr(s,Tr(t,"endLabel"),{inheritColor:i,labelFetcher:t,labelDataIndex:c,defaultText:function(f,h,d){return d!=null?bV(o,d):af(o,f)},enableTextSetter:!0},bve(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){t<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var f=i.getLayout("points"),h=i.hostModel,d=h.get("connectNulls"),p=s.get("precision"),v=s.get("distance")||0,m=l.getBaseAxis(),g=m.isHorizontal(),y=m.inverse,b=n.shape,_=y?g?b.x:b.y+b.height:g?b.x+b.width:b.y,x=(g?v:0)*(y?-1:1),w=(g?0:-v)*(y?-1:1),S=g?"x":"y",T=yve(f,_,S),C=T.range,A=C[1]-C[0],M=void 0;if(A>=1){if(A>1&&!d){var D=pP(f,C[0]);u.attr({x:D[0]+x,y:D[1]+w}),o&&(M=h.getRawValue(C[0]))}else{var D=c.getPointOn(_,S);D&&u.attr({x:D[0]+x,y:D[1]+w});var E=h.getRawValue(C[0]),L=h.getRawValue(C[1]);o&&(M=hz(i,p,E,L,T.t))}a.lastFrameIndex=C[0]}else{var I=t===1||a.lastFrameIndex>0?C[0]:0,D=pP(f,I);o&&(M=h.getRawValue(I)),u.attr({x:D[0]+x,y:D[1]+w})}if(o){var R=xf(u);typeof R.setLabelText=="function"&&R.setLabelText(M)}}},e.prototype._doUpdateAnimation=function(t,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,f=t.hostModel,h=lve(this._data,t,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=h.current,p=h.stackedOnCurrent,v=h.next,m=h.stackedOnNext;if(o&&(p=Wo(h.stackedOnCurrent,h.current,i,o,l),d=Wo(h.current,null,i,o,l),m=Wo(h.stackedOnNext,h.next,i,o,l),v=Wo(h.next,null,i,o,l)),hP(d,v)>3e3||c&&hP(p,m)>3e3){u.stopAnimation(),u.setShape({points:v}),c&&(c.stopAnimation(),c.setShape({points:v,stackedOnPoints:m}));return}u.shape.__points=h.current,u.shape.points=d;var g={shape:{points:v}};h.current!==d&&(g.shape.__points=h.next),u.stopAnimation(),ut(u,g,f),c&&(c.setShape({points:d,stackedOnPoints:p}),c.stopAnimation(),ut(c,{shape:{stackedOnPoints:m}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],b=h.status,_=0;_<b.length;_++){var x=b[_].cmd;if(x==="="){var w=t.getItemGraphicEl(b[_].idx1);w&&y.push({el:w,ptIdx:_})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var S=u.shape.__points,T=0;T<y.length;T++){var C=y[T].el,A=y[T].ptIdx*2;C.x=S[A],C.y=S[A+1],C.markRedraw()}})},e.prototype.remove=function(t){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},e.type="line",e}(St);function jp(r,e){return{seriesType:r,plan:Af(),reset:function(t){var n=t.getData(),i=t.coordinateSystem,a=t.pipelineContext,o=e||a.large;if(i){var s=K(i.dimensions,function(d){return n.mapDimension(d)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");Is(n,s[0])&&(s[0]=u),Is(n,s[1])&&(s[1]=u);var c=n.getStore(),f=n.getDimensionIndex(s[0]),h=n.getDimensionIndex(s[1]);return l&&{progress:function(d,p){for(var v=d.end-d.start,m=o&&ma(v*l),g=[],y=[],b=d.start,_=0;b<d.end;b++){var x=void 0;if(l===1){var w=c.get(f,b);x=i.dataToPoint(w,null,y)}else g[0]=c.get(f,b),g[1]=c.get(h,b),x=i.dataToPoint(g,null,y);o?(m[_++]=x[0],m[_++]=x[1]):p.setItemLayout(b,x.slice())}o&&p.setLayout("points",m)}}}}}}var xve={average:function(r){for(var e=0,t=0,n=0;n<r.length;n++)isNaN(r[n])||(e+=r[n],t++);return t===0?NaN:e/t},sum:function(r){for(var e=0,t=0;t<r.length;t++)e+=r[t]||0;return e},max:function(r){for(var e=-1/0,t=0;t<r.length;t++)r[t]>e&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t<r.length;t++)r[t]<e&&(e=r[t]);return isFinite(e)?e:NaN},nearest:function(r){return r[0]}},wve=function(r){return Math.round(r.length/2)};function MV(r){return{seriesType:r,reset:function(e,t,n){var i=e.getData(),a=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),d=Math.round(s/h);if(isFinite(d)&&d>1){a==="lttb"?e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d)):a==="minmax"&&e.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/d));var p=void 0;se(a)?p=xve[a]:Te(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(u.dim),1/d,p,wve))}}}}}function Sve(r){r.registerChartView(_ve),r.registerSeriesModel(ive),r.registerLayout(jp("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,MV("line"))}var ep=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return Lo(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(t),s=a.dataToPoint(o);if(i)k(a.getAxes(),function(h,d){if(h.type==="category"&&n!=null){var p=h.getTicksCoords(),v=h.getTickModel().get("alignWithLabel"),m=o[d],g=n[d]==="x1"||n[d]==="y1";if(g&&!v&&(m+=1),p.length<2)return;if(p.length===2){s[d]=h.toGlobalCoord(h.getExtent()[g?1:0]);return}for(var y=void 0,b=void 0,_=1,x=0;x<p.length;x++){var w=p[x].coord,S=x===p.length-1?p[x-1].tickValue+_:p[x].tickValue;if(S===m){b=w;break}else if(S<m)y=w;else if(y!=null&&S>m){b=(w+y)/2;break}x===1&&(_=S-p[0].tickValue)}b==null&&(y?y&&(b=p[p.length-1].coord):b=p[0].coord),s[d]=h.toGlobalCoord(b)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(It);It.registerClass(ep);var Tve=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return Lo(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>t&&(t=n),t},e.prototype.brushSelector=function(t,n,i){return i.rect(n.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=$s(ep.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}),e}(ep),Cve=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),Ny=function(r){z(e,r);function e(t){var n=r.call(this,t)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new Cve},e.prototype.buildPath=function(t,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,h=n.clockwise,d=Math.PI*2,p=h?f-c<d:c-f<d;p||(c=f-(h?d:-d));var v=Math.cos(c),m=Math.sin(c),g=Math.cos(f),y=Math.sin(f);p?(t.moveTo(v*o+i,m*o+a),t.arc(v*u+i,m*u+a,l,-Math.PI+c,c,!h)):t.moveTo(v*s+i,m*s+a),t.arc(i,a,s,c,f,!h),t.arc(g*u+i,y*u+a,l,f-Math.PI*2,f-Math.PI,!h),o!==0&&t.arc(i,a,o,f,c,h)},e}(Xe);function Ave(r,e){e=e||{};var t=e.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return vy(n,i,a);var s=r(o),l=i.distance!=null?i.distance:5,u=this.shape,c=u.cx,f=u.cy,h=u.r,d=u.r0,p=(h+d)/2,v=u.startAngle,m=u.endAngle,g=(v+m)/2,y=t?Math.abs(h-d)/2:0,b=Math.cos,_=Math.sin,x=c+h*b(v),w=f+h*_(v),S="left",T="top";switch(s){case"startArc":x=c+(d-l)*b(g),w=f+(d-l)*_(g),S="center",T="top";break;case"insideStartArc":x=c+(d+l)*b(g),w=f+(d+l)*_(g),S="center",T="bottom";break;case"startAngle":x=c+p*b(v)+Kv(v,l+y,!1),w=f+p*_(v)+Zv(v,l+y,!1),S="right",T="middle";break;case"insideStartAngle":x=c+p*b(v)+Kv(v,-l+y,!1),w=f+p*_(v)+Zv(v,-l+y,!1),S="left",T="middle";break;case"middle":x=c+p*b(g),w=f+p*_(g),S="center",T="middle";break;case"endArc":x=c+(h+l)*b(g),w=f+(h+l)*_(g),S="center",T="bottom";break;case"insideEndArc":x=c+(h-l)*b(g),w=f+(h-l)*_(g),S="center",T="top";break;case"endAngle":x=c+p*b(m)+Kv(m,l+y,!0),w=f+p*_(m)+Zv(m,l+y,!0),S="left",T="middle";break;case"insideEndAngle":x=c+p*b(m)+Kv(m,-l+y,!0),w=f+p*_(m)+Zv(m,-l+y,!0),S="right",T="middle";break;default:return vy(n,i,a)}return n=n||{},n.x=x,n.y=w,n.align=S,n.verticalAlign=T,n}}function Mve(r,e,t,n){if(lt(n)){r.setTextConfig({rotation:n});return}else if(q(e)){r.setTextConfig({rotation:0});return}var i=r.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,l,u=t(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:r.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),r.setTextConfig({rotation:c})}function Kv(r,e,t){return e*Math.sin(r)*(t?-1:1)}function Zv(r,e,t){return e*Math.cos(r)*(t?1:-1)}function Bl(r,e,t){var n=r.get("borderRadius");if(n==null)return t?{cornerRadius:0}:null;q(n)||(n=[n,n,n,n]);var i=Math.abs(e.r||0-e.r0||0);return{cornerRadius:K(n,function(a){return Ni(a,i)})}}var D_=Math.max,E_=Math.min;function kve(r,e){var t=r.getArea&&r.getArea();if(Ou(r,"cartesian2d")){var n=r.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=e.getLayout("bandWidth");n.isHorizontal()?(t.x-=i,t.width+=i*2):(t.y-=i,t.height+=i*2)}}return t}var Dve=function(r){z(e,r);function e(){var t=r.call(this)||this;return t.type=e.type,t._isFirstFrame=!0,t}return e.prototype.render=function(t,n,i,a){this._model=t,this._removeOnRenderedListener(i),this._updateDrawMode(t);var o=t.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,n,i):this._renderNormal(t,n,i,a))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,n){this._progressiveEls=[],this._incrementalRenderLarge(t,n)},e.prototype.eachRendered=function(t){Vs(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t,n,i,a){var o=this.group,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.getBaseAxis(),f;u.type==="cartesian2d"?f=c.isHorizontal():u.type==="polar"&&(f=c.dim==="angle");var h=t.isAnimationEnabled()?t:null,d=Eve(t,u);d&&this._enableRealtimeSort(d,s,i);var p=t.get("clip",!0)||d,v=kve(u,s);o.removeClipPath();var m=t.get("roundCap",!0),g=t.get("showBackground",!0),y=t.getModel("backgroundStyle"),b=y.get("borderRadius")||0,_=[],x=this._backgroundEls,w=a&&a.isInitSort,S=a&&a.type==="changeAxisOrder";function T(M){var D=Jv[u.type](s,M),E=Nve(u,f,D);return E.useStyle(y.getItemStyle()),u.type==="cartesian2d"?E.setShape("r",b):E.setShape("cornerRadius",b),_[M]=E,E}s.diff(l).add(function(M){var D=s.getItemModel(M),E=Jv[u.type](s,M,D);if(g&&T(M),!(!s.hasValue(M)||!bP[u.type](E))){var L=!1;p&&(L=vP[u.type](v,E));var I=mP[u.type](t,s,M,E,f,h,c.model,!1,m);d&&(I.forceLabelAnimation=!0),_P(I,s,M,D,E,t,f,u.type==="polar"),w?I.attr({shape:E}):d?gP(d,h,I,E,M,f,!1,!1):Ot(I,{shape:E},t,M),s.setItemGraphicEl(M,I),o.add(I),I.ignore=L}}).update(function(M,D){var E=s.getItemModel(M),L=Jv[u.type](s,M,E);if(g){var I=void 0;x.length===0?I=T(D):(I=x[D],I.useStyle(y.getItemStyle()),u.type==="cartesian2d"?I.setShape("r",b):I.setShape("cornerRadius",b),_[M]=I);var R=Jv[u.type](s,M),P=DV(f,R,u);ut(I,{shape:P},h,M)}var O=l.getItemGraphicEl(D);if(!s.hasValue(M)||!bP[u.type](L)){o.remove(O);return}var j=!1;if(p&&(j=vP[u.type](v,L),j&&o.remove(O)),O?Bi(O):O=mP[u.type](t,s,M,L,f,h,c.model,!!O,m),d&&(O.forceLabelAnimation=!0),S){var F=O.getTextContent();if(F){var N=xf(F);N.prevValue!=null&&(N.prevValue=N.value)}}else _P(O,s,M,E,L,t,f,u.type==="polar");w?O.attr({shape:L}):d?gP(d,h,O,L,M,f,!0,S):ut(O,{shape:L},t,M,null),s.setItemGraphicEl(M,O),O.ignore=j,o.add(O)}).remove(function(M){var D=l.getItemGraphicEl(M);D&&Gd(D,t,M)}).execute();var C=this._backgroundGroup||(this._backgroundGroup=new Ee);C.removeAll();for(var A=0;A<_.length;++A)C.add(_[A]);o.add(C),this._backgroundEls=_,this._data=s},e.prototype._renderLarge=function(t,n,i){this._clear(),wP(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,n){this._removeBackground(),wP(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var n=t.get("clip",!0)&&Op(t.coordinateSystem,!1,t),i=this.group;n?i.setClipPath(n):i.removeClipPath()},e.prototype._enableRealtimeSort=function(t,n,i){var a=this;if(n.count()){var o=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,t,i),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,n,i){var a=[];return t.each(t.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:K(a,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,n,i){for(var a=i.scale,o=t.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var c=t.rawIndexOf(o,a.getRawOrdinalNumber(l)),f=c<0?Number.MIN_VALUE:n(t.indexOfRawIndex(c));if(f>s)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(t,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(t.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,n,i,a){if(this._isOrderChangedWithinSameData(t,n,i)){var o=this._dataSort(t,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,n,i){var a=n.baseAxis,o=this._dataSort(t,a,function(s){return t.get(t.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(t,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(t,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var n=this.group,i=this._data;t&&t.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Gd(a,t,Le(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(St),vP={cartesian2d:function(r,e){var t=e.width<0?-1:1,n=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=r.x+r.width,a=r.y+r.height,o=D_(e.x,r.x),s=E_(e.x+e.width,i),l=D_(e.y,r.y),u=E_(e.y+e.height,a),c=s<o,f=u<l;return e.x=c&&o>i?s:o,e.y=f&&l>a?u:l,e.width=c?0:s-o,e.height=f?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||f},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}var i=E_(e.r,r.r),a=D_(e.r0,r.r0);e.r=i,e.r0=a;var o=i-a<0;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},mP={cartesian2d:function(r,e,t,n,i,a,o,s,l){var u=new nt({shape:W({},n),z2:1});if(u.__dataIndex=t,u.name="item",a){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(r,e,t,n,i,a,o,s,l){var u=!i&&l?Ny:gn,c=new u({shape:n,z2:1});c.name="item";var f=kV(i);if(c.calculateTextPosition=Ave(f,{isRoundCap:u===Ny}),a){var h=c.shape,d=i?"r":"endAngle",p={};h[d]=i?n.r0:n.startAngle,p[d]=n[d],(s?ut:Ot)(c,{shape:p},a)}return c}};function Eve(r,e){var t=r.get("realtimeSort",!0),n=e.getBaseAxis();if(t&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function gP(r,e,t,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?ut:Ot)(t,{shape:l},e,i,null);var c=e?r.baseAxis.model:null;(o?ut:Ot)(t,{shape:u},c,i)}function yP(r,e){for(var t=0;t<e.length;t++)if(!isFinite(r[e[t]]))return!0;return!1}var Lve=["x","y","width","height"],Ive=["cx","cy","r","startAngle","endAngle"],bP={cartesian2d:function(r){return!yP(r,Lve)},polar:function(r){return!yP(r,Ive)}},Jv={cartesian2d:function(r,e,t){var n=r.getItemLayout(e),i=t?Rve(t,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(r,e,t){var n=r.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function Pve(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function kV(r){return function(e){var t=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+t;default:return n}}}(r)}function _P(r,e,t,n,i,a,o,s){var l=e.getItemVisual(t,"style");if(s){if(!a.get("roundCap")){var c=r.shape,f=Bl(n.getModel("itemStyle"),c,!0);W(c,f),r.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var h=n.getShallow("cursor");h&&r.attr("cursor",h);var d=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",p=Tr(n);Vr(r,p,{labelFetcher:a,labelDataIndex:t,defaultText:af(a.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var v=r.getTextContent();if(s&&v){var m=n.get(["label","position"]);r.textConfig.inside=m==="middle"?!0:null,Mve(r,m==="outside"?d:m,kV(o),n.get(["label","rotate"]))}Xz(v,p,a.getRawValue(t),function(y){return bV(e,y)});var g=n.getModel(["emphasis"]);$t(r,g.get("focus"),g.get("blurScope"),g.get("disabled")),Fr(r,n),Pve(i)&&(r.style.fill="none",r.style.stroke="none",k(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function Rve(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var Ove=function(){function r(){}return r}(),xP=function(r){z(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new Ove},e.prototype.buildPath=function(t,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<i.length;c+=3)l[a]=u,l[o]=i[c+2],s[a]=i[c+a],s[o]=i[c+o],t.rect(s[0],s[1],l[0],l[1])},e}(Xe);function wP(r,e,t,n){var i=r.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=r.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new xP({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),e.add(c),t&&t.push(c)}var f=new xP({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,e.add(f),f.useStyle(i.getVisual("style")),f.style.stroke=null,Le(f).seriesIndex=r.seriesIndex,r.get("silent")||(f.on("mousedown",SP),f.on("mousemove",SP)),t&&t.push(f)}var SP=YC(function(r){var e=this,t=jve(e,r.offsetX,r.offsetY);Le(e).dataIndex=t>=0?t:null},30,!1);function jve(r,e,t){for(var n=r.baseDimIdx,i=1-n,a=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,f=a.length/3;c<f;c++){var h=c*3;if(l[n]=u,l[i]=a[h+2],s[n]=a[h+n],s[i]=a[h+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),e>=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[c]}return-1}function DV(r,e,t){if(Ou(t,"cartesian2d")){var n=e,i=t.getArea();return{x:r?n.x:i.x,y:r?i.y:n.y,width:r?n.width:i.width,height:r?i.height:n.height}}else{var i=t.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:r?i.r0:a.r0,r:r?i.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function Nve(r,e,t){var n=r.type==="polar"?gn:nt;return new n({shape:DV(e,t,r),silent:!0,z2:0})}function Bve(r){r.registerChartView(Dve),r.registerSeriesModel(Tve),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Oe(RF,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,OF("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,MV("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var TP=Math.PI*2,Qv=Math.PI/180;function EV(r,e){return gr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function LV(r,e){var t=EV(r,e),n=r.get("center"),i=r.get("radius");q(i)||(i=[0,i]);var a=ie(t.width,e.getWidth()),o=ie(t.height,e.getHeight()),s=Math.min(a,o),l=ie(i[0],s/2),u=ie(i[1],s/2),c,f,h=r.coordinateSystem;if(h){var d=h.dataToPoint(n);c=d[0]||0,f=d[1]||0}else q(n)||(n=[n,n]),c=ie(n[0],a)+t.x,f=ie(n[1],o)+t.y;return{cx:c,cy:f,r0:l,r:u}}function zve(r,e,t){e.eachSeriesByType(r,function(n){var i=n.getData(),a=i.mapDimension("value"),o=EV(n,t),s=LV(n,t),l=s.cx,u=s.cy,c=s.r,f=s.r0,h=-n.get("startAngle")*Qv,d=n.get("endAngle"),p=n.get("padAngle")*Qv;d=d==="auto"?h-TP:-d*Qv;var v=n.get("minAngle")*Qv,m=v+p,g=0;i.each(a,function(P){!isNaN(P)&&g++});var y=i.getSum(a),b=Math.PI/(y||g)*2,_=n.get("clockwise"),x=n.get("roseType"),w=n.get("stillShowZeroSum"),S=i.getDataExtent(a);S[0]=0;var T=_?1:-1,C=[h,d],A=T*p/2;wC(C,!_),h=C[0],d=C[1];var M=IV(n);M.startAngle=h,M.endAngle=d,M.clockwise=_;var D=Math.abs(d-h),E=D,L=0,I=h;if(i.setLayout({viewRect:o,r:c}),i.each(a,function(P,O){var j;if(isNaN(P)){i.setItemLayout(O,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:l,cy:u,r0:f,r:x?NaN:c});return}x!=="area"?j=y===0&&w?b:P*b:j=D/g,j<m?(j=m,E-=m):L+=P;var F=I+T*j,N=0,B=0;p>j?(N=I+T*j/2,B=N):(N=I+A,B=F-A),i.setItemLayout(O,{angle:j,startAngle:N,endAngle:B,clockwise:_,cx:l,cy:u,r0:f,r:x?bt(P,S,[f,c]):c}),I=F}),E<TP&&g)if(E<=.001){var R=D/g;i.each(a,function(P,O){if(!isNaN(P)){var j=i.getItemLayout(O);j.angle=R;var F=0,N=0;R<p?(F=h+T*(O+1/2)*R,N=F):(F=h+T*O*R+A,N=h+T*(O+1)*R-A),j.startAngle=F,j.endAngle=N}})}else b=E/L,I=h,i.each(a,function(P,O){if(!isNaN(P)){var j=i.getItemLayout(O),F=j.angle===m?m:P*b,N=0,B=0;F<p?(N=I+T*F/2,B=N):(N=I+A,B=I+T*F-A),j.startAngle=N,j.endAngle=B,I+=T*F}})})}var IV=it();function Np(r){return{seriesType:r,reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=e.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})}}}}var Fve=Math.PI/180;function CP(r,e,t,n,i,a,o,s,l,u){if(r.length<2)return;function c(v){for(var m=v.rB,g=m*m,y=0;y<v.list.length;y++){var b=v.list[y],_=Math.abs(b.label.y-t),x=n+b.len,w=x*x,S=Math.sqrt(Math.abs((1-_*_/g)*w)),T=e+(S+b.len2)*i,C=T-b.label.x,A=b.targetTextWidth-C*i;PV(b,A,!0),b.label.x=T}}function f(v){for(var m={list:[],maxY:0},g={list:[],maxY:0},y=0;y<v.length;y++)if(v[y].labelAlignTo==="none"){var b=v[y],_=b.label.y>t?g:m,x=Math.abs(b.label.y-t);if(x>=_.maxY){var w=b.label.x-e-b.len2*i,S=n+b.len,T=Math.abs(w)<S?Math.sqrt(x*x/(1-w*w/S/S)):S;_.rB=T,_.maxY=x}_.list.push(b)}c(m),c(g)}for(var h=r.length,d=0;d<h;d++)if(r[d].position==="outer"&&r[d].labelAlignTo==="labelLine"){var p=r[d].label.x-u;r[d].linePoints[1][0]+=p,r[d].label.x=u}rV(r,l,l+o)&&f(r)}function Vve(r,e,t,n,i,a,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,f=-Number.MAX_VALUE,h=0;h<r.length;h++){var d=r[h].label;L_(r[h])||(d.x<e?(c=Math.min(c,d.x),l.push(r[h])):(f=Math.max(f,d.x),u.push(r[h])))}for(var h=0;h<r.length;h++){var p=r[h];if(!L_(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var d=p.label,v=p.linePoints,m=void 0;p.labelAlignTo==="edge"?d.x<e?m=v[2][0]-p.labelDistance-o-p.edgeDistance:m=o+i-p.edgeDistance-v[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?d.x<e?m=c-o-p.bleedMargin:m=o+i-f-p.bleedMargin:d.x<e?m=d.x-o-p.bleedMargin:m=o+i-d.x-p.bleedMargin,p.targetTextWidth=m,PV(p,m)}}CP(u,e,t,n,1,i,a,o,s,f),CP(l,e,t,n,-1,i,a,o,s,c);for(var h=0;h<r.length;h++){var p=r[h];if(!L_(p)&&p.linePoints){var d=p.label,v=p.linePoints,g=p.labelAlignTo==="edge",y=d.style.padding,b=y?y[1]+y[3]:0,_=d.style.backgroundColor?0:b,x=p.rect.width+_,w=v[1][0]-v[2][0];g?d.x<e?v[2][0]=o+p.edgeDistance+x+p.labelDistance:v[2][0]=o+i-p.edgeDistance-x-p.labelDistance:(d.x<e?v[2][0]=d.x+p.labelDistance:v[2][0]=d.x-p.labelDistance,v[1][0]=v[2][0]+w),v[1][1]=v[2][1]=d.y}}}function PV(r,e,t){if(t===void 0&&(t=!1),r.labelStyleWidth==null){var n=r.label,i=n.style,a=r.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,c=a.width+(o?0:l);if(e<c||t){var f=a.height;if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",e-l);var h=n.getBoundingRect();n.setStyle("width",Math.ceil(h.width)),n.setStyle("backgroundColor",o)}else{var d=e-l,p=e<c?d:t?d>r.unconstrainedWidth?null:d:null;n.setStyle("width",p)}var v=n.getBoundingRect();a.width=v.width;var m=(n.style.margin||0)+2.1;a.height=v.height+m,a.y-=(a.height-f)/2}}}function L_(r){return r.position==="center"}function $ve(r){var e=r.getData(),t=[],n,i,a=!1,o=(r.get("minShowLabelAngle")||0)*Fve,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,h=s.height;function d(w){w.ignore=!0}function p(w){if(!w.ignore)return!0;for(var S in w.states)if(w.states[S].ignore===!1)return!0;return!1}e.each(function(w){var S=e.getItemGraphicEl(w),T=S.shape,C=S.getTextContent(),A=S.getTextGuideLine(),M=e.getItemModel(w),D=M.getModel("label"),E=D.get("position")||M.get(["emphasis","label","position"]),L=D.get("distanceToLabelLine"),I=D.get("alignTo"),R=ie(D.get("edgeDistance"),u),P=D.get("bleedMargin"),O=M.getModel("labelLine"),j=O.get("length");j=ie(j,u);var F=O.get("length2");if(F=ie(F,u),Math.abs(T.endAngle-T.startAngle)<o){k(C.states,d),C.ignore=!0,A&&(k(A.states,d),A.ignore=!0);return}if(p(C)){var N=(T.startAngle+T.endAngle)/2,B=Math.cos(N),$=Math.sin(N),J,U,we,Ye;n=T.cx,i=T.cy;var ge=E==="inside"||E==="inner";if(E==="center")J=T.cx,U=T.cy,Ye="center";else{var le=(ge?(T.r+T.r0)/2*B:T.r*B)+n,be=(ge?(T.r+T.r0)/2*$:T.r*$)+i;if(J=le+B*3,U=be+$*3,!ge){var re=le+B*(j+l-T.r),G=be+$*(j+l-T.r),ee=re+(B<0?-1:1)*F,Q=G;I==="edge"?J=B<0?c+R:c+u-R:J=ee+(B<0?-L:L),U=Q,we=[[le,be],[re,G],[ee,Q]]}Ye=ge?"center":I==="edge"?B>0?"right":"left":B>0?"left":"right"}var me=Math.PI,he=0,Se=D.get("rotate");if(lt(Se))he=Se*(me/180);else if(E==="center")he=0;else if(Se==="radial"||Se===!0){var Fe=B<0?-N+me:-N;he=Fe}else if(Se==="tangential"&&E!=="outside"&&E!=="outer"){var xe=Math.atan2(B,$);xe<0&&(xe=me*2+xe);var rt=$>0;rt&&(xe=me+xe),he=xe-me}if(a=!!he,C.x=J,C.y=U,C.rotation=he,C.setStyle({verticalAlign:"middle"}),ge){C.setStyle({align:Ye});var fr=C.states.select;fr&&(fr.x+=C.x,fr.y+=C.y)}else{var at=C.getBoundingRect().clone();at.applyTransform(C.getComputedTransform());var ht=(C.style.margin||0)+2.1;at.y-=ht/2,at.height+=ht,t.push({label:C,labelLine:A,position:E,len:j,len2:F,minTurnAngle:O.get("minTurnAngle"),maxSurfaceAngle:O.get("maxSurfaceAngle"),surfaceNormal:new ze(B,$),linePoints:we,textAlign:Ye,labelDistance:L,labelAlignTo:I,edgeDistance:R,bleedMargin:P,rect:at,unconstrainedWidth:at.width,labelStyleWidth:C.style.width})}S.setTextConfig({inside:ge})}}),!a&&r.get("avoidLabelOverlap")&&Vve(t,n,i,l,u,h,c,f);for(var v=0;v<t.length;v++){var m=t[v],g=m.label,y=m.labelLine,b=isNaN(g.x)||isNaN(g.y);if(g){g.setStyle({align:m.textAlign}),b&&(k(g.states,d),g.ignore=!0);var _=g.states.select;_&&(_.x+=g.x,_.y+=g.y)}if(y){var x=m.linePoints;b||!x?(k(y.states,d),y.ignore=!0):(QF(x,m.minTurnAngle),fpe(x,m.surfaceNormal,m.maxSurfaceAngle),y.setShape({points:x}),g.__hostTarget.textGuideLineConfig={anchor:new ze(x[0][0],x[0][1])})}}}var Hve=function(r){z(e,r);function e(t,n,i){var a=r.call(this)||this;a.z2=2;var o=new ot;return a.setTextContent(o),a.updateData(t,n,i,!0),a}return e.prototype.updateData=function(t,n,i,a){var o=this,s=t.hostModel,l=t.getItemModel(n),u=l.getModel("emphasis"),c=t.getItemLayout(n),f=W(Bl(l.getModel("itemStyle"),c,!0),c);if(isNaN(f.startAngle)){o.setShape(f);return}if(a){o.setShape(f);var h=s.getShallow("animationType");s.ecModel.ssr?(Ot(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=f.cx,o.originY=f.cy):h==="scale"?(o.shape.r=c.r0,Ot(o,{shape:{r:c.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),Ot(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,n)):(o.shape.endAngle=c.startAngle,ut(o,{shape:{endAngle:c.endAngle}},s,n))}else Bi(o),ut(o,{shape:f},s,n);o.useStyle(t.getItemVisual(n,"style")),Fr(o,l);var d=(c.startAngle+c.endAngle)/2,p=s.get("selectedOffset"),v=Math.cos(d)*p,m=Math.sin(d)*p,g=l.getShallow("cursor");g&&o.attr("cursor",g),this._updateLabel(s,t,n),o.ensureState("emphasis").shape=W({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},Bl(u.getModel("itemStyle"),c)),W(o.ensureState("select"),{x:v,y:m,shape:Bl(l.getModel(["select","itemStyle"]),c)}),W(o.ensureState("blur"),{shape:Bl(l.getModel(["blur","itemStyle"]),c)});var y=o.getTextGuideLine(),b=o.getTextContent();y&&W(y.ensureState("select"),{x:v,y:m}),W(b.ensureState("select"),{x:v,y:m}),$t(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),l=n.getItemVisual(i,"style"),u=l&&l.fill,c=l&&l.opacity;Vr(a,Tr(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:c,defaultText:t.getFormattedLabel(i,"normal")||n.getName(i)});var f=a.getTextContent();a.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var h=t.get(["label","position"]);if(h!=="outside"&&h!=="outer")a.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new bn,this.setTextGuideLine(d)),aA(this,oA(o),{stroke:u,opacity:_a(s.get(["lineStyle","opacity"]),c,1)})}},e}(gn),Gve=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,i,a){var o=t.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f<o.count();++f)c=o.getItemLayout(f);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&t.get("showEmptyCircle")){var h=IV(t),d=new gn({shape:W(LV(t,i),h)});d.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,l.add(d)}o.diff(s).add(function(p){var v=new Hve(o,p,u);o.setItemGraphicEl(p,v),l.add(v)}).update(function(p,v){var m=s.getItemGraphicEl(v);m.updateData(o,p,u),m.off("click"),l.add(m),o.setItemGraphicEl(p,m)}).remove(function(p){var v=s.getItemGraphicEl(p);Gd(v,t,p)}).execute(),$ve(t),t.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=t[0]-a.cx,s=t[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="pie",e}(St);function Ef(r,e,t){e=q(e)&&{coordDimensions:e}||W({encodeDefine:r.getEncode()},e);var n=r.getSource(),i=Lp(n,e).dimensions,a=new fn(i,r);return a.initData(n,t),a}var Bp=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,t)},r}(),Wve=it(),Uve=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Bp(ue(this.getData,this),ue(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Ef(this,{coordDimensions:["value"],encodeDefaulter:Oe(zC,this)})},e.prototype.getDataParams=function(t){var n=this.getData(),i=Wve(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=Bse(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=a[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){pu(t,"labelLine",["show"]);var n=t.labelLine,i=t.emphasis.labelLine;n.show=n.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.type="series.pie",e.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"},e}(It);function Yve(r){return{seriesType:r,reset:function(e,t){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(lt(o)&&!isNaN(o)&&o<0)})}}}function qve(r){r.registerChartView(Gve),r.registerSeriesModel(Uve),tF("pie",r.registerAction),r.registerLayout(Oe(zve,"pie")),r.registerProcessor(Np("pie")),r.registerProcessor(Yve("pie"))}var Xve=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return Lo(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,n,i){return i.point(n.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(It),RV=4,Kve=function(){function r(){}return r}(),Zve=function(r){z(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new Kve},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&a[0]<RV,c=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<i.length;){var h=i[f++],d=i[f++];isNaN(h)||isNaN(d)||c&&!c.contain(h,d)||(s.x=h-a[0]/2,s.y=d-a[1]/2,s.width=a[0],s.height=a[1],o.buildPath(t,s,!0))}this.incremental&&(this._off=f,this.notClear=!0)},e.prototype.afterBrush=function(){var t=this.shape,n=t.points,i=t.size,a=this._ctx,o=this.softClipShape,s;if(a){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||a.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(t,n){for(var i=this.shape,a=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=a.length/2-1;u>=0;u--){var c=u*2,f=a[c]-s/2,h=a[c+1]-l/2;if(t>=f&&n>=h&&t<=f+s&&n<=h+l)return u}return-1},e.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n),a=this.getBoundingRect();if(t=i[0],n=i[1],a.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,f=-1/0,h=0;h<i.length;){var d=i[h++],p=i[h++];l=Math.min(d,l),c=Math.max(d,c),u=Math.min(p,u),f=Math.max(p,f)}t=this._rect=new Ve(l-o/2,u-s/2,c-l+o,f-u+s)}return t},e}(Xe),Jve=function(){function r(){this.group=new Ee}return r.prototype.updateData=function(e,t){this._clear();var n=this._create();n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,t)},r.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var i=(n.endIndex-n.startIndex)*2,a=n.startIndex*4*2;t=new Float32Array(t.buffer,a,i)}n.setShape("points",t),n.reset()})},r.prototype.incrementalPrepareUpdate=function(e){this._clear()},r.prototype.incrementalUpdate=function(e,t,n){var i=this._newAdded[0],a=t.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+a.length);l.set(o),l.set(a,s),i.endIndex=e.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:a}),this._setCommon(u,t,n)}},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new Zve({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},r.prototype._setCommon=function(e,t,n){var i=t.hostModel;n=n||{};var a=t.getVisual("symbolSize");e.setShape("size",a instanceof Array?a:[a,a]),e.softClipShape=n.clipShape||null,e.symbolProxy=ur(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<RV;e.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=Le(e);u.seriesIndex=i.seriesIndex,e.on("mousemove",function(c){u.dataIndex=null;var f=e.hoverDataIdx;f>=0&&(u.dataIndex=f+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),Qve=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=t.getData(),o=this._updateSymbolDraw(a,t);o.updateData(a,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,i){var a=t.getData(),o=this._updateSymbolDraw(a,t);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(t,n,i){this._symbolDraw.incrementalUpdate(t,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=t.end===n.getData().count()},e.prototype.updateTransform=function(t,n,i){var a=t.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=jp("").reset(t,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var n=t.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new Jve:new Rp,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(St),eme=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.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"},e}(Qe),Y2=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",lr).models[0]},e.type="cartesian2dAxis",e}(Qe);cr(Y2,Ip);var OV={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)"]}}},tme=Be({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},OV),dA=Be({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}}},OV),rme=Be({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},dA),nme=Ce({logBase:10},dA);const jV={category:tme,value:dA,time:rme,log:nme};var ime={value:1,category:1,time:1,log:1};function of(r,e,t,n){k(ime,function(i,a){var o=Be(Be({},jV[a],!0),n,!0),s=function(l){z(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var h=Ud(this),d=h?Tf(c):{},p=f.getTheme();Be(c,p.get(a+"Axis")),Be(c,this.getDefaultOption()),c.type=AP(c),h&&Ls(c,d,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=F2.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+a,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",AP)}function AP(r){return r.type||(r.data?"category":"value")}var ame=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return K(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),pt(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}(),q2=["x","y"];function MP(r){return r.type==="interval"||r.type==="time"}var ome=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=q2,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!MP(t)||!MP(n))){var i=t.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,h=o[0]-i[0]*c,d=o[1]-a[0]*f,p=this._transform=[c,0,0,f,h,d];this._invTransform=gf([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,n){var i=this.dataToPoint(t),a=this.dataToPoint(n),o=this.getArea(),s=new Ve(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,n,i){i=i||[];var a=t[0],o=t[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Br(i,t,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},e.prototype.clampData=function(t,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(t[0]),u=a.parse(t[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(t,n){var i=[];if(this._invTransform)return Br(i,t,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(t[0]),n),i[1]=o.coordToData(o.toLocalCoord(t[1]),n),i},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-t,o=Math.min(i[0],i[1])-t,s=Math.max(n[0],n[1])-a+t,l=Math.max(i[0],i[1])-o+t;return new Ve(a,o,s,l)},e}(ame),sme=function(r){z(e,r);function e(t,n,i,a,o){var s=r.call(this,t,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),t&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(t,n){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Gi);function X2(r,e,t){t=t||{};var n=r.coordinateSystem,i=e.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,c=n.getRect(),f=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,p=u==="x"?[f[2]-d,f[3]+d]:[f[0]-d,f[1]+d];if(o){var v=o.toGlobalCoord(o.dataToCoord(0));p[h.onZero]=Math.max(Math.min(v,p[1]),p[0])}a.position=[u==="y"?p[h[l]]:f[0],u==="x"?p[h[l]]:f[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var m={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=m[s],a.labelOffset=o?p[h[s]]-p[h.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),kr(t.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var g=e.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-g:g,a.z2=1,a}function kP(r){return r.get("coordinateSystem")==="cartesian2d"}function DP(r){var e={xAxisModel:null,yAxisModel:null};return k(e,function(t,n){var i=n.replace(/Model$/,""),a=r.getReferringComponents(i,lr).models[0];e[n]=a}),e}var I_=Math.log;function NV(r,e,t){var n=Co.prototype,i=n.getTicks.call(t),a=n.getTicks.call(t,!0),o=i.length-1,s=n.getInterval.call(t),l=FF(r,e),u=l.extent,c=l.fixMin,f=l.fixMax;if(r.type==="log"){var h=I_(r.base);u=[I_(u[0])/h,I_(u[1])/h]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:f});var d=n.getExtent.call(r);c&&(u[0]=d[0]),f&&(u[1]=d[1]);var p=n.getInterval.call(r),v=u[0],m=u[1];if(c&&f)p=(m-v)/o;else if(c)for(m=u[0]+p*o;m<u[1]&&isFinite(m)&&isFinite(u[1]);)p=g_(p),m=u[0]+p*o;else if(f)for(v=u[1]-p*o;v>u[0]&&isFinite(v)&&isFinite(u[0]);)p=g_(p),v=u[1]-p*o;else{var g=r.getTicks().length-1;g>o&&(p=g_(p));var y=p*o;m=Math.ceil(u[1]/p)*p,v=Xt(m-y),v<0&&u[0]>=0?(v=0,m=Xt(y)):m>0&&u[1]<=0&&(m=0,v=-Xt(y))}var b=(i[0].value-a[0].value)/s,_=(i[o].value-a[o].value)/s;n.setExtent.call(r,v+p*b,m+p*_),n.setInterval.call(r,p),(b||_)&&n.setNiceExtent.call(r,v+p,m-p)}var lme=function(){function r(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=q2,this._initCartesian(e,t,n),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=et(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var h=+l[f],d=o[h],p=d.model,v=d.scale;V2(v)&&p.get("alignTicks")&&p.get("interval")==null?c.push(d):(nf(v,p),V2(v)&&(s=d))}c.length&&(s||(s=c.pop(),nf(s.scale,s.model)),k(c,function(m){NV(m.scale,m.model,s.scale)}))}}i(n.x),i(n.y);var a={};k(n.x,function(o){EP(n,"y",o,a)}),k(n.y,function(o){EP(n,"x",o,a)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,n){var i=e.getBoxLayoutParams(),a=!n&&e.get("containLabel"),o=gr(i,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(k(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=$de(u);if(c){var f=u.isHorizontal()?"height":"width",h=u.model.get(["axisLabel","margin"]);o[f]-=c[f]+h,u.position==="top"?o.y+=c.height+h:u.position==="left"&&(o.x+=c.width+h)}}}),l()),k(this._coordsList,function(u){u.calcAffineTransform()});function l(){k(s,function(u){var c=u.isHorizontal(),f=c?[0,o.width]:[0,o.height],h=u.inverse?1:0;u.setExtent(f[h],f[1-h]),ume(u,c?o.x:o.y)})}},r.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n="x"+e+"y"+t;return this._coordsMap[n]}Me(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===e||a[i].getAxis("y").index===t)return a[i]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(e,t,n){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},r.prototype.convertFromPixel=function(e,t,n){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},r.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents("xAxis",lr).models[0],i=e.yAxisModel||t&&t.getReferringComponents("yAxis",lr).models[0],a=e.gridModel,o=this._coordsList,s,l;if(t)s=t.coordinateSystem,He(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},r.prototype._initCartesian=function(e,t,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(t.eachComponent("xAxis",u("x"),this),t.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,k(s.x,function(c,f){k(s.y,function(h,d){var p="x"+f+"y"+d,v=new ome(p);v.master=i,v.model=e,i._coordsMap[p]=v,i._coordsList.push(v),v.addAxis(c),v.addAxis(h)})});function u(c){return function(f,h){if(P_(f,e)){var d=f.get("position");c==="x"?d!=="top"&&d!=="bottom"&&(d=o.bottom?"top":"bottom"):d!=="left"&&d!=="right"&&(d=o.left?"right":"left"),o[d]=!0;var p=new sme(c,c1(f),[0,0],f.get("type"),d),v=p.type==="category";p.onBand=v&&f.get("boundaryGap"),p.inverse=f.get("inverse"),f.axis=p,p.model=f,p.grid=a,p.index=h,a._axesList.push(p),s[c][h]=p,l[c]++}}}},r.prototype._updateScale=function(e,t){k(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)}}),e.eachSeries(function(i){if(kP(i)){var a=DP(i),o=a.xAxisModel,s=a.yAxisModel;if(!P_(o,t)||!P_(s,t))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),c=l.getAxis("x"),f=l.getAxis("y");n(u,c),n(u,f)}},this);function n(i,a){k(Py(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},r.prototype.getTooltipAxes=function(e){var t=[],n=[];return k(this.getCartesians(),function(i){var a=e!=null&&e!=="auto"?i.getAxis(e):i.getBaseAxis(),o=i.getOtherAxis(a);He(t,a)<0&&t.push(a),He(n,o)<0&&n.push(o)}),{baseAxes:t,otherAxes:n}},r.create=function(e,t){var n=[];return e.eachComponent("grid",function(i,a){var o=new r(i,e,t);o.name="grid_"+a,o.resize(i,t,!0),i.coordinateSystem=o,n.push(o)}),e.eachSeries(function(i){if(kP(i)){var a=DP(i),o=a.xAxisModel,s=a.yAxisModel,l=o.getCoordSysModel(),u=l.coordinateSystem;i.coordinateSystem=u.getCartesian(o.componentIndex,s.componentIndex)}}),n},r.dimensions=q2,r}();function P_(r,e){return r.getCoordSysModel()===e}function EP(r,e,t,n){t.getAxesOnZeroOf=function(){return a?[a]:[]};var i=r[e],a,o=t.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)LP(i[l])&&(a=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&LP(i[u])&&!n[c(i[u])]){a=i[u];break}a&&(n[c(a)]=!0);function c(f){return f.dim+"_"+f.index}}function LP(r){return r&&r.type!=="category"&&r.type!=="time"&&Vde(r)}function ume(r,e){var t=r.getExtent(),n=t[0]+t[1];r.toGlobalCoord=r.dim==="x"?function(i){return i+e}:function(i){return n-i+e},r.toLocalCoord=r.dim==="x"?function(i){return i-e}:function(i){return n-i+e}}var ds=Math.PI,hn=function(){function r(e,t){this.group=new Ee,this.opt=t,this.axisModel=e,Ce(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Ee({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return r.prototype.hasBuilder=function(e){return!!IP[e]},r.prototype.add=function(e){IP[e](this.opt,this.axisModel,this.group,this._transformGroup)},r.prototype.getGroup=function(){return this.group},r.innerTextLayout=function(e,t,n){var i=nz(t-e),a,o;return Fd(i)?(o=n>0?"top":"bottom",a="center"):Fd(i-ds)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<ds?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),IP={axisLine:function(r,e,t,n){var i=e.get(["axisLine","show"]);if(i==="auto"&&r.handleAutoShown&&(i=r.handleAutoShown("axisLine")),!!i){var a=e.axis.getExtent(),o=n.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(Br(s,s,o),Br(l,l,o));var c=W({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new xr({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});ef(f.shape,f.style.lineWidth),f.anid="line",t.add(f);var h=e.get(["axisLine","symbol"]);if(h!=null){var d=e.get(["axisLine","symbolSize"]);se(h)&&(h=[h,h]),(se(d)||lt(d))&&(d=[d,d]);var p=Pu(e.get(["axisLine","symbolOffset"])||0,d),v=d[0],m=d[1];k([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(g,y){if(h[y]!=="none"&&h[y]!=null){var b=ur(h[y],-v/2,-m/2,v,m,c.stroke,!0),_=g.r+g.offset,x=u?l:s;b.attr({rotation:g.rotate,x:x[0]+_*Math.cos(r.rotation),y:x[1]-_*Math.sin(r.rotation),silent:!0,z2:11}),t.add(b)}})}}},axisTickLabel:function(r,e,t,n){var i=hme(t,n,e,r),a=pme(t,n,e,r);if(fme(e,a,i),dme(t,n,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=eV(K(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));nV(o)}},axisName:function(r,e,t,n){var i=kr(r.axisName,e.get("name"));if(i){var a=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),c=u[0]>u[1]?-1:1,f=[a==="start"?u[0]-c*l:a==="end"?u[1]+c*l:(u[0]+u[1])/2,RP(a)?r.labelOffset+o*l:0],h,d=e.get("nameRotate");d!=null&&(d=d*ds/180);var p;RP(a)?h=hn.innerTextLayout(r.rotation,d??r.rotation,o):(h=cme(r.rotation,a,d||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(h.rotation)),!isFinite(p)&&(p=null)));var v=s.getFont(),m=e.get("nameTruncate",!0)||{},g=m.ellipsis,y=kr(r.nameTruncateMaxWidth,m.maxWidth,p),b=new ot({x:f[0],y:f[1],rotation:h.rotation,silent:hn.isLabelSilent(e),style:Et(s,{text:i,font:v,overflow:"truncate",width:y,ellipsis:g,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(Lu({el:b,componentModel:e,itemName:i}),b.__fullText=i,b.anid="name",e.get("triggerEvent")){var _=hn.makeAxisEventDataBase(e);_.targetType="axisName",_.name=i,Le(b).eventData=_}n.add(b),b.updateTransform(),t.add(b),b.decomposeTransform()}}};function cme(r,e,t,n){var i=nz(t-r),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return Fd(i-ds/2)?(o=l?"bottom":"top",a="center"):Fd(i-ds*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<ds*1.5&&i>ds/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function fme(r,e,t){if(!VF(r.axis)){var n=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],c=t[1],f=t[t.length-1],h=t[t.length-2];n===!1?(Un(a),Un(u)):PP(a,o)&&(n?(Un(o),Un(c)):(Un(a),Un(u))),i===!1?(Un(s),Un(f)):PP(l,s)&&(i?(Un(l),Un(h)):(Un(s),Un(f)))}}function Un(r){r&&(r.ignore=!0)}function PP(r,e){var t=r&&r.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!t||!n)){var i=O0([]);return Eu(i,i,-r.rotation),t.applyTransform(fo([],i,r.getLocalTransform())),n.applyTransform(fo([],i,e.getLocalTransform())),t.intersect(n)}}function RP(r){return r==="middle"||r==="center"}function BV(r,e,t,n,i){for(var a=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=t,e&&(Br(o,o,e),Br(s,s,e));var c=new xr({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});ef(c.shape,c.style.lineWidth),c.anid=i+"_"+r[l].tickValue,a.push(c)}return a}function hme(r,e,t,n){var i=t.axis,a=t.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"),u=i.getTicksCoords(),c=BV(u,e.transform,l,Ce(s.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<c.length;f++)r.add(c[f]);return c}}function dme(r,e,t,n){var i=t.axis,a=t.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"),u=Ce(s.getLineStyle(),Ce(t.getModel("axisTick").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})),c=0;c<o.length;c++)for(var f=BV(o[c],e.transform,l,u,"minorticks_"+c),h=0;h<f.length;h++)r.add(f[h])}}function pme(r,e,t,n){var i=t.axis,a=kr(n.axisLabelShow,t.get(["axisLabel","show"]));if(!(!a||i.scale.isBlank())){var o=t.getModel("axisLabel"),s=o.get("margin"),l=i.getViewLabels(),u=(kr(n.labelRotate,o.get("rotate"))||0)*ds/180,c=hn.innerTextLayout(n.rotation,u,n.labelDirection),f=t.getCategories&&t.getCategories(!0),h=[],d=hn.isLabelSilent(t),p=t.get("triggerEvent");return k(l,function(v,m){var g=i.scale.type==="ordinal"?i.scale.getRawOrdinalNumber(v.tickValue):v.tickValue,y=v.formattedLabel,b=v.rawLabel,_=o;if(f&&f[g]){var x=f[g];Me(x)&&x.textStyle&&(_=new _t(x.textStyle,o,t.ecModel))}var w=_.getTextColor()||t.get(["axisLine","lineStyle","color"]),S=i.dataToCoord(g),T=_.getShallow("align",!0)||c.textAlign,C=Re(_.getShallow("alignMinLabel",!0),T),A=Re(_.getShallow("alignMaxLabel",!0),T),M=_.getShallow("verticalAlign",!0)||_.getShallow("baseline",!0)||c.textVerticalAlign,D=Re(_.getShallow("verticalAlignMinLabel",!0),M),E=Re(_.getShallow("verticalAlignMaxLabel",!0),M),L=new ot({x:S,y:n.labelOffset+n.labelDirection*s,rotation:c.rotation,silent:d,z2:10+(v.level||0),style:Et(_,{text:y,align:m===0?C:m===l.length-1?A:T,verticalAlign:m===0?D:m===l.length-1?E:M,fill:Te(w)?w(i.type==="category"?b:i.type==="value"?g+"":g,m):w})});if(L.anid="label_"+g,Lu({el:L,componentModel:t,itemName:y,formatterParamsExtra:{isTruncated:function(){return L.isTruncated},value:b,tickIndex:m}}),p){var I=hn.makeAxisEventDataBase(t);I.targetType="axisLabel",I.value=b,I.tickIndex=m,i.type==="category"&&(I.dataIndex=g),Le(L).eventData=I}e.add(L),L.updateTransform(),h.push(L),r.add(L),L.decomposeTransform()}),h}}function vme(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return mme(t,r,e),t.seriesInvolved&&yme(t,r),t}function mme(r,e,t){var n=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];k(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=tp(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",n);if(k(s.getAxes(),Oe(v,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var h=f.get("trigger")==="axis",d=f.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(f.get(["axisPointer","axis"]));(h||d)&&k(p.baseAxes,Oe(v,d?"cross":!0,h)),d&&k(p.otherAxes,Oe(v,"cross",!1))}function v(m,g,y){var b=y.model.getModel("axisPointer",i),_=b.get("show");if(!(!_||_==="auto"&&!m&&!K2(b))){g==null&&(g=b.get("triggerTooltip")),b=m?gme(y,f,i,e,m,g):b;var x=b.get("snap"),w=b.get("triggerEmphasis"),S=tp(y.model),T=g||x||y.type==="category",C=r.axesInfo[S]={key:S,axis:y,coordSys:s,axisPointerModel:b,triggerTooltip:g,triggerEmphasis:w,involveSeries:T,snap:x,useHandle:K2(b),seriesModels:[],linkGroup:null};u[S]=C,r.seriesInvolved=r.seriesInvolved||T;var A=bme(a,y);if(A!=null){var M=o[A]||(o[A]={axesInfo:{}});M.axesInfo[S]=C,M.mapper=a[A].mapper,C.linkGroup=M}}}})}function gme(r,e,t,n,i,a){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};k(s,function(h){l[h]=ke(o.get(h))}),l.snap=r.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!a){var f=l.lineStyle=o.get("crossStyle");f&&Ce(u,f.textStyle)}}return r.model.getModel("axisPointer",new _t(l,t,n))}function yme(r,e){e.eachSeries(function(t){var n=t.coordinateSystem,i=t.get(["tooltip","trigger"],!0),a=t.get(["tooltip","show"],!0);!n||i==="none"||i===!1||i==="item"||a===!1||t.get(["axisPointer","show"],!0)===!1||k(r.coordSysAxesInfo[tp(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(t),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=t.getData().count())})})}function bme(r,e){for(var t=e.model,n=e.dim,i=0;i<r.length;i++){var a=r[i]||{};if(R_(a[n+"AxisId"],t.id)||R_(a[n+"AxisIndex"],t.componentIndex)||R_(a[n+"AxisName"],t.name))return i}}function R_(r,e){return r==="all"||q(r)&&He(r,e)>=0||r===e}function _me(r){var e=pA(r);if(e){var t=e.axisPointerModel,n=e.axis.scale,i=t.option,a=t.get("status"),o=t.get("value");o!=null&&(o=n.parse(o));var s=K2(t);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=e.axis.scale.isBlank()?"hide":"show")}}function pA(r){var e=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[tp(r)]}function xme(r){var e=pA(r);return e&&e.axisPointerModel}function K2(r){return!!r.get(["handle","show"])}function tp(r){return r.type+"||"+r.id}var OP={},ju=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i,a){this.axisPointerClass&&_me(t),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,i,!0)},e.prototype.updateAxisPointer=function(t,n,i,a){this._doUpdateAxisPointerClass(t,i,!1)},e.prototype.remove=function(t,n){var i=this._axisPointer;i&&i.remove(n)},e.prototype.dispose=function(t,n){this._disposeAxisPointer(n),r.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,n,i){var a=e.getAxisPointerClass(this.axisPointerClass);if(a){var o=xme(t);o?(this._axisPointer||(this._axisPointer=new a)).render(t,o,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,n){OP[t]=n},e.getAxisPointerClass=function(t){return t&&OP[t]},e.type="axis",e}(zt),Z2=it();function zV(r,e,t,n){var i=t.axis;if(!i.scale.isBlank()){var a=t.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var c=s.length,f=Z2(r).splitAreaColors,h=ve(),d=0;if(f)for(var p=0;p<u.length;p++){var v=f.get(u[p].tickValue);if(v!=null){d=(v+(c-1)*p)%c;break}}var m=i.toGlobalCoord(u[0].coord),g=o.getAreaStyle();s=q(s)?s:[s];for(var p=1;p<u.length;p++){var y=i.toGlobalCoord(u[p].coord),b=void 0,_=void 0,x=void 0,w=void 0;i.isHorizontal()?(b=m,_=l.y,x=y-b,w=l.height,m=b+x):(b=l.x,_=m,x=l.width,w=y-_,m=_+w);var S=u[p-1].tickValue;S!=null&&h.set(S,d),e.add(new nt({anid:S!=null?"area_"+S:null,shape:{x:b,y:_,width:x,height:w},style:Ce({fill:s[d]},g),autoBatch:!0,silent:!0})),d=(d+1)%c}Z2(r).splitAreaColors=h}}}function FV(r){Z2(r).splitAreaColors=null}var wme=["axisLine","axisTickLabel","axisName"],Sme=["splitArea","splitLine","minorSplitLine"],VV=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="CartesianAxisPointer",t}return e.prototype.render=function(t,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Ee,this.group.add(this._axisGroup),!!t.get("show")){var s=t.getCoordSysModel(),l=X2(s,t),u=new hn(t,W({handleAutoShown:function(f){for(var h=s.coordinateSystem.getCartesians(),d=0;d<h.length;d++)if(V2(h[d].getOtherAxis(t.axis).scale))return!0;return!1}},l));k(wme,u.add,u),this._axisGroup.add(u.getGroup()),k(Sme,function(f){t.get([f,"show"])&&Tme[f](this,this._axisGroup,t,s)},this);var c=a&&a.type==="changeAxisOrder"&&a.isInitSort;c||Mp(o,this._axisGroup,t),r.prototype.render.call(this,t,n,i,a)}},e.prototype.remove=function(){FV(this)},e.type="cartesianAxis",e}(ju),Tme={splitLine:function(r,e,t,n){var i=t.axis;if(!i.scale.isBlank()){var a=t.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color"),l=a.get("showMinLine")!==!1,u=a.get("showMaxLine")!==!1;s=q(s)?s:[s];for(var c=n.coordinateSystem.getRect(),f=i.isHorizontal(),h=0,d=i.getTicksCoords({tickModel:a}),p=[],v=[],m=o.getLineStyle(),g=0;g<d.length;g++){var y=i.toGlobalCoord(d[g].coord);if(!(g===0&&!l||g===d.length-1&&!u)){var b=d[g].tickValue;f?(p[0]=y,p[1]=c.y,v[0]=y,v[1]=c.y+c.height):(p[0]=c.x,p[1]=y,v[0]=c.x+c.width,v[1]=y);var _=h++%s.length,x=new xr({anid:b!=null?"line_"+b:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:v[0],y2:v[1]},style:Ce({stroke:s[_]},m),silent:!0});ef(x.shape,m.lineWidth),e.add(x)}}}},minorSplitLine:function(r,e,t,n){var i=t.axis,a=t.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=n.coordinateSystem.getRect(),l=i.isHorizontal(),u=i.getMinorTicksCoords();if(u.length)for(var c=[],f=[],h=o.getLineStyle(),d=0;d<u.length;d++)for(var p=0;p<u[d].length;p++){var v=i.toGlobalCoord(u[d][p].coord);l?(c[0]=v,c[1]=s.y,f[0]=v,f[1]=s.y+s.height):(c[0]=s.x,c[1]=v,f[0]=s.x+s.width,f[1]=v);var m=new xr({anid:"minor_line_"+u[d][p].tickValue,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]},style:h,silent:!0});ef(m.shape,h.lineWidth),e.add(m)}},splitArea:function(r,e,t,n){zV(r,e,t,n)}},$V=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="xAxis",e}(VV),Cme=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=$V.type,t}return e.type="yAxis",e}(VV),Ame=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="grid",t}return e.prototype.render=function(t,n){this.group.removeAll(),t.get("show")&&this.group.add(new nt({shape:t.coordinateSystem.getRect(),style:Ce({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(zt),jP={offset:0};function HV(r){r.registerComponentView(Ame),r.registerComponentModel(eme),r.registerCoordinateSystem("cartesian2d",lme),of(r,"x",Y2,jP),of(r,"y",Y2,jP),r.registerComponentView($V),r.registerComponentView(Cme),r.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function Mme(r){Ue(HV),r.registerSeriesModel(Xve),r.registerChartView(Qve),r.registerLayout(jp("scatter"))}function kme(r){r.eachSeriesByType("radar",function(e){var t=e.getData(),n=[],i=e.coordinateSystem;if(i){var a=i.getIndicatorAxes();k(a,function(o,s){t.each(t.mapDimension(a[s].dim),function(l,u){n[u]=n[u]||[];var c=i.dataToPoint(l,s);n[u][s]=NP(c)?c:BP(i)})}),t.each(function(o){var s=voe(n[o],function(l){return NP(l)})||BP(i);n[o].push(s.slice()),t.setItemLayout(o,n[o])})}})}function NP(r){return!isNaN(r[0])&&!isNaN(r[1])}function BP(r){return[r.cx,r.cy]}function Dme(r){var e=r.polar;if(e){q(e)||(e=[e]);var t=[];k(e,function(n,i){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),r.radar=r.radar||[],q(r.radar)||(r.radar=[r.radar]),r.radar.push(n)):t.push(n)}),r.polar=t}k(r.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var Eme=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=t.coordinateSystem,o=this.group,s=t.getData(),l=this._data;function u(h,d){var p=h.getItemVisual(d,"symbol")||"circle";if(p!=="none"){var v=kf(h.getItemVisual(d,"symbolSize")),m=ur(p,-1,-1,2,2),g=h.getItemVisual(d,"symbolRotate")||0;return m.attr({style:{strokeNoScale:!0},z2:100,scaleX:v[0]/2,scaleY:v[1]/2,rotation:g*Math.PI/180||0}),m}}function c(h,d,p,v,m,g){p.removeAll();for(var y=0;y<d.length-1;y++){var b=u(v,m);b&&(b.__dimIdx=y,h[y]?(b.setPosition(h[y]),Iu[g?"initProps":"updateProps"](b,{x:d[y][0],y:d[y][1]},t,m)):b.setPosition(d[y]),p.add(b))}}function f(h){return K(h,function(d){return[a.cx,a.cy]})}s.diff(l).add(function(h){var d=s.getItemLayout(h);if(d){var p=new yn,v=new bn,m={shape:{points:d}};p.shape.points=f(d),v.shape.points=f(d),Ot(p,m,t,h),Ot(v,m,t,h);var g=new Ee,y=new Ee;g.add(v),g.add(p),g.add(y),c(v.shape.points,d,y,s,h,!0),s.setItemGraphicEl(h,g)}}).update(function(h,d){var p=l.getItemGraphicEl(d),v=p.childAt(0),m=p.childAt(1),g=p.childAt(2),y={shape:{points:s.getItemLayout(h)}};y.shape.points&&(c(v.shape.points,y.shape.points,g,s,h,!1),Bi(m),Bi(v),ut(v,y,t),ut(m,y,t),s.setItemGraphicEl(h,p))}).remove(function(h){o.remove(l.getItemGraphicEl(h))}).execute(),s.eachItemGraphicEl(function(h,d){var p=s.getItemModel(d),v=h.childAt(0),m=h.childAt(1),g=h.childAt(2),y=s.getItemVisual(d,"style"),b=y.fill;o.add(h),v.useStyle(Ce(p.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:b})),Fr(v,p,"lineStyle"),Fr(m,p,"areaStyle");var _=p.getModel("areaStyle"),x=_.isEmpty()&&_.parentModel.isEmpty();m.ignore=x,k(["emphasis","select","blur"],function(T){var C=p.getModel([T,"areaStyle"]),A=C.isEmpty()&&C.parentModel.isEmpty();m.ensureState(T).ignore=A&&x}),m.useStyle(Ce(_.getAreaStyle(),{fill:b,opacity:.7,decal:y.decal}));var w=p.getModel("emphasis"),S=w.getModel("itemStyle").getItemStyle();g.eachChild(function(T){if(T instanceof Lr){var C=T.style;T.useStyle(W({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},y))}else T.useStyle(y),T.setColor(b),T.style.strokeNoScale=!0;var A=T.ensureState("emphasis");A.style=ke(S);var M=s.getStore().get(s.getDimensionIndex(T.__dimIdx),d);(M==null||isNaN(M))&&(M=""),Vr(T,Tr(p),{labelFetcher:s.hostModel,labelDataIndex:d,labelDimIndex:T.__dimIdx,defaultText:M,inheritColor:b,defaultOpacity:y.opacity})}),$t(h,w.get("focus"),w.get("blurScope"),w.get("disabled"))}),this._data=s},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(St),Lme=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Bp(ue(this.getData,this),ue(this.getRawData,this))},e.prototype.getInitialData=function(t,n){return Ef(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,n,i){var a=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(t),u=l===""?this.name:l,c=H6(this,t);return Cr("section",{header:u,sortBlocks:!0,blocks:K(s,function(f){var h=a.get(a.mapDimension(f.dim),t);return Cr("nameValue",{markerType:"subItem",markerColor:c,name:f.name,value:h,sortParam:h})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var n=this.getData(),i=this.coordinateSystem,a=n.getValues(K(i.dimensions,function(u){return n.mapDimension(u)}),t),o=0,s=a.length;o<s;o++)if(!isNaN(a[o])){var l=i.getIndicatorAxes();return i.coordToPoint(l[o].dataToCoord(a[o]),o)}}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e}(It),ch=jV.value;function em(r,e){return Ce({show:e},r)}var Ime=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),n=this.get("splitNumber"),i=this.get("scale"),a=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),f=this.get("axisNameGap"),h=this.get("triggerEvent"),d=K(this.get("indicator")||[],function(p){p.max!=null&&p.max>0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var v=l;p.color!=null&&(v=Ce({color:p.color},l));var m=Be(ke(p),{boundaryGap:t,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:v,triggerEvent:h},!1);if(se(c)){var g=m.name;m.name=c.replace("{value}",g??"")}else Te(c)&&(m.name=c(m.name,m));var y=new _t(m,null,this.ecModel);return cr(y,Ip.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=d},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Be({lineStyle:{color:"#bbb"}},ch.axisLine),axisLabel:em(ch.axisLabel,!1),axisTick:em(ch.axisTick,!1),splitLine:em(ch.splitLine,!0),splitArea:em(ch.splitArea,!0),indicator:[]},e}(Qe),Pme=["axisLine","axisTickLabel","axisName"],Rme=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=this.group;a.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var n=t.coordinateSystem,i=n.getIndicatorAxes(),a=K(i,function(o){var s=o.model.get("showName")?o.name:"",l=new hn(o.model,{axisName:s,position:[n.cx,n.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});k(a,function(o){k(Pme,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var n=t.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),h=l.get("color"),d=u.get("color"),p=q(h)?h:[h],v=q(d)?d:[d],m=[],g=[];function y(I,R,P){var O=P%R.length;return I[O]=I[O]||[],O}if(a==="circle")for(var b=i[0].getTicksCoords(),_=n.cx,x=n.cy,w=0;w<b.length;w++){if(c){var S=y(m,p,w);m[S].push(new Eo({shape:{cx:_,cy:x,r:b[w].coord}}))}if(f&&w<b.length-1){var S=y(g,v,w);g[S].push(new Tp({shape:{cx:_,cy:x,r0:b[w].coord,r:b[w+1].coord}}))}}else for(var T,C=K(i,function(I,R){var P=I.getTicksCoords();return T=T==null?P.length-1:Math.min(P.length-1,T),K(P,function(O){return n.coordToPoint(O.coord,R)})}),A=[],w=0;w<=T;w++){for(var M=[],D=0;D<i.length;D++)M.push(C[D][w]);if(M[0]&&M.push(M[0].slice()),c){var S=y(m,p,w);m[S].push(new bn({shape:{points:M}}))}if(f&&A){var S=y(g,v,w-1);g[S].push(new yn({shape:{points:M.concat(A)}}))}A=M.slice().reverse()}var E=l.getLineStyle(),L=u.getAreaStyle();k(g,function(I,R){this.group.add(si(I,{style:Ce({stroke:"none",fill:v[R%v.length]},L),silent:!0}))},this),k(m,function(I,R){this.group.add(si(I,{style:Ce({fill:"none",stroke:p[R%p.length]},E),silent:!0}))},this)},e.type="radar",e}(zt),Ome=function(r){z(e,r);function e(t,n,i){var a=r.call(this,t,n,i)||this;return a.type="value",a.angle=0,a.name="",a}return e}(Gi),jme=function(){function r(e,t,n){this.dimensions=[],this._model=e,this._indicatorAxes=K(e.getIndicatorModels(),function(i,a){var o="indicator_"+a,s=new Ome(o,new Co);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(e,n)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(e,t){var n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)},r.prototype.coordToPoint=function(e,t){var n=this._indicatorAxes[t],i=n.angle,a=this.cx+e*Math.cos(i),o=this.cy-e*Math.sin(i);return[a,o]},r.prototype.pointToData=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=Math.sqrt(t*t+n*n);t/=i,n/=i;for(var a=Math.atan2(-n,t),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],f=Math.abs(a-c.angle);f<o&&(s=c,l=u,o=f)}return[l,+(s&&s.coordToData(i))]},r.prototype.resize=function(e,t){var n=e.get("center"),i=t.getWidth(),a=t.getHeight(),o=Math.min(i,a)/2;this.cx=ie(n[0],i),this.cy=ie(n[1],a),this.startAngle=e.get("startAngle")*Math.PI/180;var s=e.get("radius");(se(s)||lt(s))&&(s=[0,s]),this.r0=ie(s[0],o),this.r=ie(s[1],o),k(this._indicatorAxes,function(l,u){l.setExtent(this.r0,this.r);var c=this.startAngle+u*Math.PI*2/this._indicatorAxes.length;c=Math.atan2(Math.sin(c),Math.cos(c)),l.angle=c},this)},r.prototype.update=function(e,t){var n=this._indicatorAxes,i=this._model;k(n,function(s){s.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||e.getComponent("radar",s.get("radarIndex"))!==i)){var u=s.getData();k(n,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var a=i.get("splitNumber"),o=new Co;o.setExtent(0,a),o.setInterval(1),k(n,function(s,l){NV(s.scale,s.model,o)})},r.prototype.convertToPixel=function(e,t,n){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(e,t,n){return console.warn("Not implemented."),null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.create=function(e,t){var n=[];return e.eachComponent("radar",function(i){var a=new r(i,e,t);n.push(a),i.coordinateSystem=a}),e.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=n[i.get("radarIndex")||0])}),n},r.dimensions=[],r}();function Nme(r){r.registerCoordinateSystem("radar",jme),r.registerComponentModel(Ime),r.registerComponentView(Rme),r.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(n){t.setItemVisual(n,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}function Bme(r){Ue(Nme),r.registerChartView(Eme),r.registerSeriesModel(Lme),r.registerLayout(kme),r.registerProcessor(Np("radar")),r.registerPreprocessor(Dme)}var zP="\0_ec_interaction_mutex";function zme(r,e,t){var n=vA(r);n[e]=t}function Fme(r,e,t){var n=vA(r),i=n[e];i===t&&(n[e]=null)}function FP(r,e){return!!vA(r)[e]}function vA(r){return r[zP]||(r[zP]={})}za({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},tr);var zp=function(r){z(e,r);function e(t){var n=r.call(this)||this;n._zr=t;var i=ue(n._mousedownHandler,n),a=ue(n._mousemoveHandler,n),o=ue(n._mouseupHandler,n),s=ue(n._mousewheelHandler,n),l=ue(n._pinchHandler,n);return n.enable=function(u,c){this.disable(),this._opt=Ce(ke(c)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(t.on("mousedown",i),t.on("mousemove",a),t.on("mouseup",o)),(u===!0||u==="scale"||u==="zoom")&&(t.on("mousewheel",s),t.on("pinch",l))},n.disable=function(){t.off("mousedown",i),t.off("mousemove",a),t.off("mouseup",o),t.off("mousewheel",s),t.off("pinch",l)},n}return e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!dE(t)){for(var n=t.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var i=t.offsetX,a=t.offsetY;this.pointerChecker&&this.pointerChecker(t,i,a)&&(this._x=i,this._y=a,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(!(!this._dragging||!Km("moveOnMouseMove",t,this._opt)||t.gestureEvent==="pinch"||FP(this._zr,"globalPan"))){var n=t.offsetX,i=t.offsetY,a=this._x,o=this._y,s=n-a,l=i-o;this._x=n,this._y=i,this._opt.preventDefaultMouseMove&&_o(t.event),GV(this,"pan","moveOnMouseMove",t,{dx:s,dy:l,oldX:a,oldY:o,newX:n,newY:i,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){dE(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var n=Km("zoomOnMouseWheel",t,this._opt),i=Km("moveOnMouseWheel",t,this._opt),a=t.wheelDelta,o=Math.abs(a),s=t.offsetX,l=t.offsetY;if(!(a===0||!n&&!i)){if(n){var u=o>3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;O_(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var f=Math.abs(a),h=(a>0?1:-1)*(f>3?.4:f>1?.15:.05);O_(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!FP(this._zr,"globalPan")){var n=t.pinchScale>1?1.1:1/1.1;O_(this,"zoom",null,t,{scale:n,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(gi);function O_(r,e,t,n,i){r.pointerChecker&&r.pointerChecker(n,i.originX,i.originY)&&(_o(n.event),GV(r,e,t,n,i))}function GV(r,e,t,n,i){i.isAvailableBehavior=ue(Km,null,t,n),r.trigger(e,i)}function Km(r,e,t){var n=t[r];return!r||n&&(!se(n)||e.event[n+"Key"])}function mA(r,e,t){var n=r.target;n.x+=e,n.y+=t,n.dirty()}function gA(r,e,t,n){var i=r.target,a=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,a){var s=a.min||0,l=a.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,i.x-=(t-i.x)*(u-1),i.y-=(n-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var Vme={axisPointer:1,tooltip:1,brush:1};function h1(r,e,t){var n=e.getComponentByElement(r.topTarget),i=n&&n.coordinateSystem;return n&&n!==t&&!Vme.hasOwnProperty(n.mainType)&&i&&i.model!==t}function WV(r){if(se(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var j_,By={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},VP=et(By),zy={"alignment-baseline":"textBaseline","stop-color":"stopColor"},$P=et(zy),$me=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var n=WV(e);this._defsUsePending=[];var i=new Ee;this._root=i;var a=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||t.width),l=parseFloat(n.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Ln(n,i,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,i,a,null,!1,!1),u=u.nextSibling;Wme(this._defs,this._defsUsePending),this._defsUsePending=[];var c,f;if(o){var h=d1(o);h.length>=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(f=YV(c,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var d=i;i=new Ee,i.add(d),d.scaleX=d.scaleY=f.scale,d.x=f.x,d.y=f.y}return!t.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new nt({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:a}},r.prototype._parseNode=function(e,t,n,i,a,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!a){var c=j_[s];if(c&&fe(j_,s)){l=c.call(this,e,t);var f=e.getAttribute("name");if(f){var h={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(h),s==="g"&&(u=h)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});t.add(l)}}var d=HP[s];if(d&&fe(HP,s)){var p=d.call(this,e),v=e.getAttribute("id");v&&(this._defs[v]=p)}}if(l&&l.isGroup)for(var m=e.firstChild;m;)m.nodeType===1?this._parseNode(m,l,n,u,a,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},r.prototype._parseText=function(e,t){var n=new Qc({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Yn(t,n),Ln(e,n,this._defsUsePending,!1,!1),Hme(n,t);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,t.add(n),n},r.internalField=function(){j_={g:function(e,t){var n=new Ee;return Yn(t,n),Ln(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new nt;return Yn(t,n),Ln(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,t){var n=new Eo;return Yn(t,n),Ln(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,t){var n=new xr;return Yn(t,n),Ln(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,t){var n=new W0;return Yn(t,n),Ln(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,t){var n=e.getAttribute("points"),i;n&&(i=UP(n));var a=new yn({shape:{points:i||[]},silent:!0});return Yn(t,a),Ln(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,t){var n=e.getAttribute("points"),i;n&&(i=UP(n));var a=new bn({shape:{points:i||[]},silent:!0});return Yn(t,a),Ln(e,a,this._defsUsePending,!1,!1),a},image:function(e,t){var n=new Lr;return Yn(t,n),Ln(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new Ee;return Yn(t,s),Ln(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var n=e.getAttribute("x"),i=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new Ee;return Yn(t,s),Ln(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,t){var n=e.getAttribute("d")||"",i=Nz(n);return Yn(t,i),Ln(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),r}(),HP={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),n=parseInt(r.getAttribute("x2")||"10",10),i=parseInt(r.getAttribute("y2")||"0",10),a=new Ap(e,t,n,i);return GP(r,a),WP(r,a),a},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),n=parseInt(r.getAttribute("r")||"0",10),i=new Vz(e,t,n);return GP(r,i),WP(r,i),i}};function GP(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function WP(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var n=t.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};UV(t,a,a);var o=a.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:o})}t=t.nextSibling}}function Yn(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Ce(e.__inheritedStyle,r.__inheritedStyle))}function UP(r){for(var e=d1(r),t=[],n=0;n<e.length;n+=2){var i=parseFloat(e[n]),a=parseFloat(e[n+1]);t.push([i,a])}return t}function Ln(r,e,t,n,i){var a=e,o=a.__inheritedStyle=a.__inheritedStyle||{},s={};r.nodeType===1&&(qme(r,e),UV(r,o,s),n||Xme(r,o,s)),a.style=a.style||{},o.fill!=null&&(a.style.fill=YP(a,"fill",o.fill,t)),o.stroke!=null&&(a.style.stroke=YP(a,"stroke",o.stroke,t)),k(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(a.style[l]=parseFloat(o[l]))}),k(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(a.style[l]=o[l])}),i&&(a.__selfStyle=s),o.lineDash&&(a.style.lineDash=K(d1(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(a.invisible=!0),o.display==="none"&&(a.ignore=!0)}function Hme(r,e){var t=e.__selfStyle;if(t){var n=t.textBaseline,i=n;!n||n==="auto"||n==="baseline"?i="alphabetic":n==="before-edge"||n==="text-before-edge"?i="top":n==="after-edge"||n==="text-after-edge"?i="bottom":(n==="central"||n==="mathematical")&&(i="middle"),r.style.textBaseline=i}var a=e.__inheritedStyle;if(a){var o=a.textAlign,s=o;o&&(o==="middle"&&(s="center"),r.style.textAlign=s)}}var Gme=/^url\(\s*#(.*?)\)/;function YP(r,e,t,n){var i=t&&t.match(Gme);if(i){var a=Li(i[1]);n.push([r,e,a]);return}return t==="none"&&(t=null),t}function Wme(r,e){for(var t=0;t<e.length;t++){var n=e[t];n[0].style[n[1]]=r[n[2]]}}var Ume=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function d1(r){return r.match(Ume)||[]}var Yme=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,N_=Math.PI/180;function qme(r,e){var t=r.getAttribute("transform");if(t){t=t.replace(/,/g," ");var n=[],i=null;t.replace(Yme,function(f,h,d){return n.push(h,d),""});for(var a=n.length-1;a>0;a-=2){var o=n[a],s=n[a-1],l=d1(o);switch(i=i||zn(),s){case"translate":La(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":dC(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Eu(i,i,-parseFloat(l[0])*N_,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*N_);fo(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*N_);fo(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var qP=/([^\s:;]+)\s*:\s*([^:;]+)/g;function UV(r,e,t){var n=r.getAttribute("style");if(n){qP.lastIndex=0;for(var i;(i=qP.exec(n))!=null;){var a=i[1],o=fe(By,a)?By[a]:null;o&&(e[o]=i[2]);var s=fe(zy,a)?zy[a]:null;s&&(t[s]=i[2])}}}function Xme(r,e,t){for(var n=0;n<VP.length;n++){var i=VP[n],a=r.getAttribute(i);a!=null&&(e[By[i]]=a)}for(var n=0;n<$P.length;n++){var i=$P[n],a=r.getAttribute(i);a!=null&&(t[zy[i]]=a)}}function YV(r,e){var t=e.width/r.width,n=e.height/r.height,i=Math.min(t,n);return{scale:i,x:-(r.x+r.width/2)*i+(e.x+e.width/2),y:-(r.y+r.height/2)*i+(e.y+e.height/2)}}function Kme(r,e){var t=new $me;return t.parse(r,e)}var Zme=ve(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),Jme=function(){function r(e,t){this.type="geoSVG",this._usedGraphicMap=ve(),this._freedGraphics=[],this._mapName=e,this._parsedXML=WV(t)}return r.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=ege(e.named),n=t.regions,i=t.regionsMap;this._regions=n,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(e){var t,n;try{t=e&&Kme(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=t.root,vn(n!=null)}catch(m){throw new Error(`Invalid svg format
|
||
`+m.message)}var i=new Ee;i.add(n),i.isGeoSVGGraphicRoot=!0;var a=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,f=void 0,h=void 0;if(a!=null?(u=0,f=a):s&&(u=s.x,f=s.width),o!=null?(c=0,h=o):s&&(c=s.y,h=s.height),u==null||c==null){var d=n.getBoundingRect();u==null&&(u=d.x,f=d.width),c==null&&(c=d.y,h=d.height)}l=this._boundingRect=new Ve(u,c,f,h)}if(s){var p=YV(s,l);n.scaleX=n.scaleY=p.scale,n.x=p.x,n.y=p.y}i.setClipPath(new nt({shape:l.plain()}));var v=[];return k(t.named,function(m){Zme.get(m.svgNodeTagLower)!=null&&(v.push(m),Qme(m.el))}),{root:i,boundingRect:l,named:v}},r.prototype.useGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,n),n)},r.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);n&&(t.removeKey(e),this._freedGraphics.push(n))},r}();function Qme(r){r.silent=!1,r.isGroup&&r.traverse(function(e){e.silent=!1})}function ege(r){var e=[],t=ve();return k(r,function(n){if(n.namedFrom==null){var i=new qde(n.name,n.el);e.push(i),t.set(n.name,i)}}),{regions:e,regionsMap:t}}var J2=[126,25],XP="南海诸岛",gl=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var pl=0;pl<gl.length;pl++)for(var oc=0;oc<gl[pl].length;oc++)gl[pl][oc][0]/=10.5,gl[pl][oc][1]/=-10.5/.75,gl[pl][oc][0]+=J2[0],gl[pl][oc][1]+=J2[1];function tge(r,e){if(r==="china"){for(var t=0;t<e.length;t++)if(e[t].name===XP)return;e.push(new HF(XP,K(gl,function(n){return{type:"polygon",exterior:n}}),J2))}}var rge={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function nge(r,e){if(r==="china"){var t=rge[e.name];if(t){var n=e.getCenter();n[0]+=t[0]/10.5,n[1]+=-t[1]/(10.5/.75),e.setCenter(n)}}}var ige=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function age(r,e){r==="china"&&e.name==="台湾"&&e.geometries.push({type:"polygon",exterior:ige[0]})}var oge="name",sge=function(){function r(e,t,n){this.type="geoJSON",this._parsedMap=ve(),this._mapName=e,this._specialAreas=n,this._geoJSON=uge(t)}return r.prototype.load=function(e,t){t=t||oge;var n=this._parsedMap.get(t);if(!n){var i=this._parseToRegions(t);n=this._parsedMap.set(t,{regions:i,boundingRect:lge(i)})}var a=ve(),o=[];return k(n.regions,function(s){var l=s.name;e&&fe(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),a.set(l,s)}),{regions:o,boundingRect:n.boundingRect||new Ve(0,0,0,0),regionsMap:a}},r.prototype._parseToRegions=function(e){var t=this._mapName,n=this._geoJSON,i;try{i=n?Kde(n,e):[]}catch(a){throw new Error(`Invalid geoJson format
|
||
`+a.message)}return tge(t,i),k(i,function(a){var o=a.name;nge(t,a),age(t,a);var s=this._specialAreas&&this._specialAreas[o];s&&a.transformTo(s.left,s.top,s.width,s.height)},this),i},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r}();function lge(r){for(var e,t=0;t<r.length;t++){var n=r[t].getBoundingRect();e=e||n.clone(),e.union(n)}return e}function uge(r){return se(r)?typeof JSON<"u"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var fh=ve();const Ao={registerMap:function(r,e,t){if(e.svg){var n=new Jme(r,e.svg);fh.set(r,n)}else{var i=e.geoJson||e.geoJSON;i&&!e.features?t=e.specialAreas:i=e;var n=new sge(r,i,t);fh.set(r,n)}},getGeoResource:function(r){return fh.get(r)},getMapForUser:function(r){var e=fh.get(r);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(r,e,t){var n=fh.get(r);if(n)return n.load(e,t)}};var yA=["rect","circle","line","ellipse","polygon","polyline","path"],cge=ve(yA),fge=ve(yA.concat(["g"])),hge=ve(yA.concat(["g"])),qV=it();function tm(r){var e=r.getItemStyle(),t=r.get("areaColor");return t!=null&&(e.fill=t),e}function KP(r){var e=r.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var XV=function(){function r(e){var t=new Ee;this.uid=wf("ec_map_draw"),this._controller=new zp(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new Ee),t.add(this._svgGroup=new Ee)}return r.prototype.draw=function(e,t,n,i,a){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(g){!s&&g.getHostGeoModel()===e&&(s=g.getData())});var l=e.coordinateSystem,u=this._regionsGroup,c=this.group,f=l.getTransformInfo(),h=f.raw,d=f.roam,p=!u.childAt(0)||a;p?(c.x=d.x,c.y=d.y,c.scaleX=d.scaleX,c.scaleY=d.scaleY,c.dirty()):ut(c,d,e);var v=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,m={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:v,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(m):l.resourceType==="geoSVG"&&this._buildSVG(m),this._updateController(e,t,n),this._updateMapSelectHandler(e,u,n,i)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=ve(),n=ve(),i=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(d,p){return p&&(d=p(d)),d&&[d[0]*a.scaleX+a.x,d[1]*a.scaleY+a.y]}function f(d){for(var p=[],v=!u&&l&&l.project,m=0;m<d.length;++m){var g=c(d[m],v);g&&p.push(g)}return p}function h(d){return{shape:{points:f(d)}}}i.removeAll(),k(e.geo.regions,function(d){var p=d.name,v=t.get(p),m=n.get(p)||{},g=m.dataIdx,y=m.regionModel;if(!v){v=t.set(p,new Ee),i.add(v),g=s?s.indexOfName(p):null,y=e.isGeo?o.getRegionModel(p):s?s.getItemModel(g):null;var b=y.get("silent",!0);b!=null&&(v.silent=b),n.set(p,{dataIdx:g,regionModel:y})}var _=[],x=[];k(d.geometries,function(T){if(T.type==="polygon"){var C=[T.exterior].concat(T.interiors||[]);u&&(C=rR(C,u)),k(C,function(M){_.push(new yn(h(M)))})}else{var A=T.points;u&&(A=rR(A,u,!0)),k(A,function(M){x.push(new bn(h(M)))})}});var w=c(d.getCenter(),l&&l.project);function S(T,C){if(T.length){var A=new DC({culling:!0,segmentIgnoreThreshold:1,shape:{paths:T}});v.add(A),ZP(e,A,g,y),JP(e,A,p,y,o,g,w),C&&(KP(A),k(A.states,KP))}}S(_),S(x,!0)}),t.each(function(d,p){var v=n.get(p),m=v.dataIdx,g=v.regionModel;QP(e,d,p,g,o,m),eR(e,d,p,g,o),tR(e,d,p,g,o)},this)},r.prototype._buildSVG=function(e){var t=e.geo.map,n=e.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var i=this._svgDispatcherMap=ve(),a=!1;k(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,c=o.svgNodeTagLower,f=o.el,h=u?u.indexOfName(s):null,d=l.getRegionModel(s);cge.get(c)!=null&&f instanceof mi&&ZP(e,f,h,d),f instanceof mi&&(f.culling=!0);var p=d.get("silent",!0);if(p!=null&&(f.silent=p),f.z2EmphasisLift=0,!o.namedFrom&&(hge.get(c)!=null&&JP(e,f,s,d,l,h,null),QP(e,f,s,d,l,h),eR(e,f,s,d,l),fge.get(c)!=null)){var v=tR(e,f,s,d,l);v==="self"&&(a=!0);var m=i.get(s)||i.set(s,[]);m.push(f)}},this),this._enableBlurEntireSVG(a,e)},r.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var n=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),i=n.opacity;this._svgGraphicRecord.root.traverse(function(a){if(!a.isGroup){gu(a);var o=a.ensureState("blur").style||{};o.opacity==null&&i!=null&&(o.opacity=i),a.ensureState("emphasis")}})}},r.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},r.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var n=t.coordinateSystem;if(n.resourceType==="geoJSON"){var i=this._regionsGroupByName;if(i){var a=i.get(e);return a?[a]:[]}}else if(n.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},r.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},r.prototype._useSVG=function(e){var t=Ao.getGeoResource(e);if(t&&t.type==="geoSVG"){var n=t.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=e}},r.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=Ao.getGeoResource(e);t&&t.type==="geoSVG"&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},r.prototype._updateController=function(e,t,n){var i=e.coordinateSystem,a=this._controller,o=this._controllerHost;o.zoomLimit=e.get("scaleLimit"),o.zoom=i.getZoom(),a.enable(e.get("roam")||!1);var s=e.mainType;function l(){var u={type:"geoRoam",componentType:s};return u[s+"Id"]=e.id,u}a.off("pan").on("pan",function(u){this._mouseDownFlag=!1,mA(o,u.dx,u.dy),n.dispatchAction(W(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),a.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,gA(o,u.scale,u.originX,u.originY),n.dispatchAction(W(l(),{totalZoom:o.zoom,zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),a.setPointerChecker(function(u,c,f){return i.containPoint([c,f])&&!h1(u,n,e)})},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=qV(t).ignore)})},r.prototype._updateMapSelectHandler=function(e,t,n,i){var a=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){a._mouseDownFlag=!0}),t.on("click",function(o){a._mouseDownFlag&&(a._mouseDownFlag=!1)}))},r}();function ZP(r,e,t,n){var i=n.getModel("itemStyle"),a=n.getModel(["emphasis","itemStyle"]),o=n.getModel(["blur","itemStyle"]),s=n.getModel(["select","itemStyle"]),l=tm(i),u=tm(a),c=tm(s),f=tm(o),h=r.data;if(h){var d=h.getItemVisual(t,"style"),p=h.getItemVisual(t,"decal");r.isVisualEncodedByVisualMap&&d.fill&&(l.fill=d.fill),p&&(l.decal=rf(p,r.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=f,gu(e)}function JP(r,e,t,n,i,a,o){var s=r.data,l=r.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),a)),c=s&&s.getItemLayout(a);if(l||u||c&&c.showLabel){var f=l?t:a,h=void 0;(!s||a>=0)&&(h=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Vr(e,Tr(n),{labelFetcher:h,labelDataIndex:f,defaultText:t},d);var p=e.getTextContent();if(p&&(qV(p).ignore=p.ignore,e.textConfig&&o)){var v=e.getBoundingRect().clone();e.textConfig.layoutRect=v,e.textConfig.position=[(o[0]-v.x)/v.width*100+"%",(o[1]-v.y)/v.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function QP(r,e,t,n,i,a){r.data?r.data.setItemGraphicEl(a,e):Le(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:t,region:n&&n.option||{}}}function eR(r,e,t,n,i){r.data||Lu({el:e,componentModel:i,itemName:t,itemTooltipOption:n.get("tooltip")})}function tR(r,e,t,n,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return $t(e,o,a.get("blurScope"),a.get("disabled")),r.isGeo&&fue(e,i,t),o}function rR(r,e,t){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),k(r,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!t&&s.polygonEnd(),n}var dge=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i,a){if(!(a&&a.type==="mapToggleSelect"&&a.from===this.uid)){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&a&&a.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),a&&a.type==="geoRoam"&&a.componentType==="series"&&a.seriesId===t.id){var s=this._mapDraw;s&&o.add(s.group)}else if(t.needsDrawMap){var s=this._mapDraw||new XV(i);o.add(s.group),s.draw(t,n,i,this,a),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&n.getComponent("legend")&&this._renderSymbols(t,n,i)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,n,i){var a=t.originalData,o=this.group;a.each(a.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=a.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,f=u.offset,h=new Eo({style:{fill:t.getData().getVisual("style").fill},shape:{cx:c[0]+f*9,cy:c[1],r:3},silent:!0,z2:8+(f?0:bf+1)});if(!f){var d=t.mainSeries.getData(),p=a.getName(l),v=d.indexOfName(p),m=a.getItemModel(l),g=m.getModel("label"),y=d.getItemGraphicEl(v);Vr(h,Tr(m),{labelFetcher:{getFormattedLabel:function(b,_){return t.getFormattedLabel(v,_)}},defaultText:p}),h.disableLabelAnimation=!0,g.get("position")||h.setTextConfig({position:"bottom"}),y.onHoverStateChange=function(b){gy(h,b)}}o.add(h)}}})},e.type="map",e}(St),pge=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(n){if(n!=null){var i=this.getData().getName(n),a=this.coordinateSystem,o=a.getRegion(i);return o&&a.dataToPoint(o.getCenter())}},t}return e.prototype.getInitialData=function(t){for(var n=Ef(this,{coordDimensions:["value"],encodeDefaulter:Oe(zC,this)}),i=ve(),a=[],o=0,s=n.count();o<s;o++){var l=n.getName(o);i.set(l,o)}var u=Ao.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return k(u.regions,function(c){var f=c.name,h=i.get(f),d=c.properties&&c.properties.echartsStyle,p;h==null?(p={name:f},a.push(p)):p=n.getRawDataItem(h),d&&Be(p,d)}),n.appendData(a),n},e.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return t!=null?this.ecModel.getComponent("geo",t):null},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var n=this.getData();return n.get(n.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var n=this.getData();return n.getItemModel(n.indexOfName(t))},e.prototype.formatTooltip=function(t,n,i){for(var a=this.getData(),o=this.getRawValue(t),s=a.getName(t),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var f=l[c].originalData.indexOfName(s),h=a.mapDimension("value");isNaN(l[c].originalData.get(h,f))||u.push(l[c].name)}return Cr("section",{header:u.join(", "),noHeader:!u.length,blocks:[Cr("nameValue",{name:s,value:o})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var n=t.icon||"roundRect",i=ur(n,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return i.setStyle(t.itemStyle),i.style.stroke="none",n.indexOf("empty")>-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(It);function vge(r,e){var t={};return k(r,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);t[o]=t[o]||[],isNaN(i)||t[o].push(i)})}),r[0].map(r[0].mapDimension("value"),function(n,i){for(var a="ec-"+r[0].getName(i),o=0,s=1/0,l=-1/0,u=t[a].length,c=0;c<u;c++)s=Math.min(s,t[a][c]),l=Math.max(l,t[a][c]),o+=t[a][c];var f;return e==="min"?f=s:e==="max"?f=l:e==="average"?f=o/u:f=o,u===0?NaN:f})}function mge(r){var e={};r.eachSeriesByType("map",function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)}),k(e,function(t,n){for(var i=vge(K(t,function(o){return o.getData()}),t[0].get("mapValueCalculation")),a=0;a<t.length;a++)t[a].originalData=t[a].getData();for(var a=0;a<t.length;a++)t[a].seriesGroup=t,t[a].needsDrawMap=a===0&&!t[a].getHostGeoModel(),t[a].setData(i.cloneShallow()),t[a].mainSeries=t[0]})}function gge(r){var e={};r.eachSeriesByType("map",function(t){var n=t.getMapType();if(!(t.getHostGeoModel()||e[n])){var i={};k(t.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&r.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var f=l.getName(c),h=s.getRegion(f);if(!(!h||isNaN(u))){var d=i[f]||0,p=s.dataToPoint(h.getCenter());i[f]=d+1,l.setItemLayout(c,{point:p,offset:d})}})});var a=t.getData();a.each(function(o){var s=a.getName(o),l=a.getItemLayout(o)||{};l.showLabel=!i[s],a.setItemLayout(o,l)}),e[n]=!0}})}var nR=Br,Fp=function(r){z(e,r);function e(t){var n=r.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new ao,n._rawTransformable=new ao,n.name=t,n}return e.prototype.setBoundingRect=function(t,n,i,a){return this._rect=new Ve(t,n,i,a),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,n,i,a){this._transformTo(t,n,i,a),this._viewRect=new Ve(t,n,i,a)},e.prototype._transformTo=function(t,n,i,a){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new Ve(t,n,i,a));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},e.prototype.setCenter=function(t,n){t&&(this._center=[ie(t[0],n.getWidth()),ie(t[1],n.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var n=this.zoomLimit;n&&(n.max!=null&&(t=Math.min(n.max,t)),n.min!=null&&(t=Math.max(n.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect(),n=t.x+t.width/2,i=t.y+t.height/2;return[n,i]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),n=this._roamTransformable,i=this.getDefaultCenter(),a=this.getCenter(),o=this.getZoom();a=Br([],a,t),i=Br([],i,t),n.originX=a[0],n.originY=a[1],n.x=i[0]-a[0],n.y=i[1]-a[1],n.scaleX=n.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,n=this._rawTransformable;n.parent=t,t.updateTransform(),n.updateTransform(),hC(this.transform||(this.transform=[]),n.transform||zn()),this._rawTransform=n.getLocalTransform(),this.invTransform=this.invTransform||[],gf(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,n=this._roamTransformable,i=new ao;return i.transform=n.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,n,i){var a=n?this._rawTransform:this.transform;return i=i||[],a?nR(i,t,a):on(i,t)},e.prototype.pointToData=function(t){var n=this.invTransform;return n?nR([],t,n):[t[0],t[1]]},e.prototype.convertToPixel=function(t,n,i){var a=iR(n);return a===this?a.dataToPoint(i):null},e.prototype.convertFromPixel=function(t,n,i){var a=iR(n);return a===this?a.pointToData(i):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(ao);function iR(r){var e=r.seriesModel;return e?e.coordinateSystem:null}var yge={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},KV=["lng","lat"],Q2=function(r){z(e,r);function e(t,n,i){var a=r.call(this,t)||this;a.dimensions=KV,a.type="geo",a._nameCoordMap=ve(),a.map=n;var o=i.projection,s=Ao.load(n,i.nameMap,i.nameProperty),l=Ao.getGeoResource(n);a.resourceType=l?l.type:null;var u=a.regions=s.regions,c=yge[l.type];a._regionsMap=s.regionsMap,a.regions=s.regions,a.projection=o;var f;if(o)for(var h=0;h<u.length;h++){var d=u[h].getBoundingRect(o);f=f||d.clone(),f.union(d)}else f=s.boundingRect;return a.setBoundingRect(f.x,f.y,f.width,f.height),a.aspectScale=o?1:Re(i.aspectScale,c.aspectScale),a._invertLongitute=o?!1:c.invertLongitute,a}return e.prototype._transformTo=function(t,n,i,a){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new Ve(t,n,i,a));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var n=this.regions,i=0;i<n.length;i++){var a=n[i];if(a.type==="geoJSON"&&a.contain(t))return n[i]}},e.prototype.addGeoCoord=function(t,n){this._nameCoordMap.set(t,n)},e.prototype.getGeoCoord=function(t){var n=this._regionsMap.get(t);return this._nameCoordMap.get(t)||n&&n.getCenter()},e.prototype.dataToPoint=function(t,n,i){if(se(t)&&(t=this.getGeoCoord(t)),t){var a=this.projection;return a&&(t=a.project(t)),t&&this.projectedToPoint(t,n,i)}},e.prototype.pointToData=function(t){var n=this.projection;return n&&(t=n.unproject(t)),t&&this.pointToProjected(t)},e.prototype.pointToProjected=function(t){return r.prototype.pointToData.call(this,t)},e.prototype.projectedToPoint=function(t,n,i){return r.prototype.dataToPoint.call(this,t,n,i)},e.prototype.convertToPixel=function(t,n,i){var a=aR(n);return a===this?a.dataToPoint(i):null},e.prototype.convertFromPixel=function(t,n,i){var a=aR(n);return a===this?a.pointToData(i):null},e}(Fp);cr(Q2,Fp);function aR(r){var e=r.geoModel,t=r.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",lr).models[0]||{}).coordinateSystem:null}function oR(r,e){var t=r.get("boundingCoords");if(t!=null){var n=t[0],i=t[1];if(isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])){var a=this.projection;if(a){var o=n[0],s=n[1],l=i[0],u=i[1];n=[1/0,1/0],i=[-1/0,-1/0];var c=function(w,S,T,C){for(var A=T-w,M=C-S,D=0;D<=100;D++){var E=D/100,L=a.project([w+A*E,S+M*E]);ls(n,n,L),us(i,i,L)}};c(o,s,l,s),c(l,s,l,u),c(l,u,o,u),c(o,u,l,s)}this.setBoundingRect(n[0],n[1],i[0]-n[0],i[1]-n[1])}}var f=this.getBoundingRect(),h=r.get("layoutCenter"),d=r.get("layoutSize"),p=e.getWidth(),v=e.getHeight(),m=f.width/f.height*this.aspectScale,g=!1,y,b;h&&d&&(y=[ie(h[0],p),ie(h[1],v)],b=ie(d,Math.min(p,v)),!isNaN(y[0])&&!isNaN(y[1])&&!isNaN(b)&&(g=!0));var _;if(g)_={},m>1?(_.width=b,_.height=b/m):(_.height=b,_.width=b*m),_.y=y[1]-_.height/2,_.x=y[0]-_.width/2;else{var x=r.getBoxLayoutParams();x.aspect=m,_=gr(x,{width:p,height:v})}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function bge(r,e){k(e.get("geoCoord"),function(t,n){r.addGeoCoord(n,t)})}var _ge=function(){function r(){this.dimensions=KV}return r.prototype.create=function(e,t){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Q2(l+s,l,W({nameMap:o.get("nameMap")},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=oR,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=n[l]}});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),k(a,function(o,s){var l=K(o,function(c){return c.get("nameMap")}),u=new Q2(s,s,W({nameMap:lC(l)},i(o[0])));u.zoomLimit=kr.apply(null,K(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=oR,u.resize(o[0],t),k(o,function(c){c.coordinateSystem=u,bge(u,c)})}),n},r.prototype.getFilledRegions=function(e,t,n,i){for(var a=(e||[]).slice(),o=ve(),s=0;s<a.length;s++)o.set(a[s].name,a[s]);var l=Ao.load(t,n,i);return k(l.regions,function(u){var c=u.name,f=o.get(c),h=u.properties&&u.properties.echartsStyle;f||(f={name:c},a.push(f)),h&&Be(f,h)}),a},r}(),ZV=new _ge,xge=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,i){var a=Ao.getGeoResource(t.map);if(a&&a.type==="geoJSON"){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(t,i),pu(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,n=this.option;n.regions=ZV.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var i={};this._optionModelMap=Ea(n.regions||[],function(a,o){var s=o.name;return s&&(a.set(s,new _t(o,t,t.ecModel)),o.selected&&(i[s]=!0)),a},ve()),n.selectedMap||(n.selectedMap=i)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new _t(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,n){var i=this.getRegionModel(t),a=n==="normal"?i.get(["label","formatter"]):i.get(["emphasis","label","formatter"]),o={name:t};if(Te(a))return o.status=n,a(o);if(se(a))return a.replace("{a}",t??"")},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var n=this.option,i=n.selectedMode;if(i){i!=="multiple"&&(n.selectedMap=null);var a=n.selectedMap||(n.selectedMap={});a[t]=!0}},e.prototype.unSelect=function(t){var n=this.option.selectedMap;n&&(n[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var n=this.option.selectedMap;return!!(n&&n[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},e}(Qe);function sR(r,e){return r.pointToProjected?r.pointToProjected(e):r.pointToData(e)}function bA(r,e,t,n){var i=r.getZoom(),a=r.getCenter(),o=e.zoom,s=r.projectedToPoint?r.projectedToPoint(a):r.dataToPoint(a);if(e.dx!=null&&e.dy!=null&&(s[0]-=e.dx,s[1]-=e.dy,r.setCenter(sR(r,s),n)),o!=null){if(t){var l=t.min||0,u=t.max||1/0;o=Math.max(Math.min(i*o,u),l)/i}r.scaleX*=o,r.scaleY*=o;var c=(e.originX-r.x)*(o-1),f=(e.originY-r.y)*(o-1);r.x-=c,r.y-=f,r.updateTransform(),r.setCenter(sR(r,s),n),r.setZoom(o*i)}return{center:r.getCenter(),zoom:r.getZoom()}}var wge=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.focusBlurEnabled=!0,t}return e.prototype.init=function(t,n){this._api=n},e.prototype.render=function(t,n,i,a){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new XV(i));var o=this._mapDraw;o.draw(t,n,i,this,a),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,n,i)},e.prototype._handleRegionClick=function(t){var n;Ol(t.target,function(i){return(n=Le(i).eventData)!=null},!0),n&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:n.name})},e.prototype.updateSelectStatus=function(t,n,i){var a=this;this._mapDraw.group.traverse(function(o){var s=Le(o).eventData;if(s)return a._model.isSelected(s.name)?i.enterSelect(o):i.leaveSelect(o),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}(zt);function Sge(r,e,t){Ao.registerMap(r,e,t)}function JV(r){r.registerCoordinateSystem("geo",ZV),r.registerComponentModel(xge),r.registerComponentView(wge),r.registerImpl("registerMap",Sge),r.registerImpl("getMap",function(t){return Ao.getMapForUser(t)});function e(t,n){n.update="geo:updateSelectStatus",r.registerAction(n,function(i,a){var o={},s=[];return a.eachComponent({mainType:"geo",query:i},function(l){l[t](i.name);var u=l.coordinateSystem;k(u.regions,function(f){o[f.name]=l.isSelected(f.name)||!1});var c=[];k(o,function(f,h){o[h]&&c.push(h)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:i.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,n,i){var a=t.componentType||"series";n.eachComponent({mainType:a,query:t},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=bA(s,t,o.get("scaleLimit"),i);o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),a==="series"&&k(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function Tge(r){Ue(JV),r.registerChartView(dge),r.registerSeriesModel(pge),r.registerLayout(gge),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,mge),tF("map",r.registerAction)}function Cge(r){var e=r;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],n,i;n=t.pop();)if(i=n.children,n.isExpand&&i.length)for(var a=i.length,o=a-1;o>=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function Age(r,e){var t=r.isExpand?r.children:[],n=r.parentNode.children,i=r.hierNode.i?n[r.hierNode.i-1]:null;if(t.length){Dge(r);var a=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;i?(r.hierNode.prelim=i.hierNode.prelim+e(r,i),r.hierNode.modifier=r.hierNode.prelim-a):r.hierNode.prelim=a}else i&&(r.hierNode.prelim=i.hierNode.prelim+e(r,i));r.parentNode.hierNode.defaultAncestor=Ege(r,i,r.parentNode.hierNode.defaultAncestor||n[0],e)}function Mge(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function lR(r){return arguments.length?r:Pge}function Ph(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function kge(r,e){return gr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Dge(r){for(var e=r.children,t=e.length,n=0,i=0;--t>=0;){var a=e[t];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function Ege(r,e,t,n){if(e){for(var i=r,a=r,o=a.parentNode.children[0],s=e,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=B_(s),a=z_(a),s&&a;){i=B_(i),o=z_(o),i.hierNode.ancestor=r;var h=s.hierNode.prelim+f-a.hierNode.prelim-u+n(s,a);h>0&&(Ige(Lge(s,r,t),r,h),u+=h,l+=h),f+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!B_(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),a&&!z_(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,t=r)}return t}function B_(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function z_(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function Lge(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function Ige(r,e,t){var n=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=n}function Pge(r,e){return r.parentNode===e.parentNode?1:2}var Rge=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),Oge=function(r){z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Rge},e.prototype.buildPath=function(t,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,h=ie(n.forkPosition,1),d=[];d[c]=o[c],d[f]=o[f]+(l[f]-o[f])*h,t.moveTo(o[0],o[1]),t.lineTo(d[0],d[1]),t.moveTo(s[0],s[1]),d[c]=s[c],t.lineTo(d[0],d[1]),d[c]=l[c],t.lineTo(d[0],d[1]),t.lineTo(l[0],l[1]);for(var p=1;p<a-1;p++){var v=i[p];t.moveTo(v[0],v[1]),d[c]=v[c],t.lineTo(d[0],d[1])}},e}(Xe),jge=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new Ee,t}return e.prototype.init=function(t,n){this._controller=new zp(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,n,i){var a=t.getData(),o=t.layoutInfo,s=this._mainGroup,l=t.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(t,i),this._updateController(t,n,i);var u=this._data;a.diff(u).add(function(c){uR(a,c)&&cR(a,c,null,s,t)}).update(function(c,f){var h=u.getItemGraphicEl(f);if(!uR(a,c)){h&&hR(u,f,h,s,t);return}cR(a,c,h,s,t)}).remove(function(c){var f=u.getItemGraphicEl(c);f&&hR(u,c,f,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&a.eachItemGraphicEl(function(c,f){c.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:f})})}),this._data=a},e.prototype._updateViewCoordSys=function(t,n){var i=t.getData(),a=[];i.each(function(f){var h=i.getItemLayout(f);h&&!isNaN(h.x)&&!isNaN(h.y)&&a.push([+h.x,+h.y])});var o=[],s=[];$0(a,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var c=t.coordinateSystem=new Fp;c.zoomLimit=t.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(t.get("center"),n),c.setZoom(t.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=o,this._max=s},e.prototype._updateController=function(t,n,i){var a=this,o=this._controller,s=this._controllerHost,l=this.group;o.setPointerChecker(function(u,c,f){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,f)&&!h1(u,i,t)}),o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){mA(s,u.dx,u.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){gA(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(t),i.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(t){var n=t.getData(),i=this._getNodeGlobalScale(t);n.eachItemGraphicEl(function(a,o){a.setSymbolScale(i)})},e.prototype._getNodeGlobalScale=function(t){var n=t.coordinateSystem;if(n.type!=="view")return 1;var i=this._nodeScaleRatio,a=n.scaleX||1,o=n.getZoom(),s=(o-1)*i+1;return s/a},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(St);function uR(r,e){var t=r.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function cR(r,e,t,n,i){var a=!t,o=r.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:"#fff",c=r.tree.root,f=o.parentNode===c?o:o.parentNode||o,h=r.getItemGraphicEl(f.dataIndex),d=f.getLayout(),p=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:d,v=o.getLayout();a?(t=new Pp(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=p.x,t.y=p.y):t.updateData(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=v.rawX,t.__radialRawY=v.rawY,n.add(t),r.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,ut(t,{x:v.x,y:v.y},i);var m=t.getSymbolPath();if(i.get("layout")==="radial"){var g=c.children[0],y=g.getLayout(),b=g.children.length,_=void 0,x=void 0;if(v.x===y.x&&o.isExpand===!0&&g.children.length){var w={x:(g.children[0].getLayout().x+g.children[b-1].getLayout().x)/2,y:(g.children[0].getLayout().y+g.children[b-1].getLayout().y)/2};_=Math.atan2(w.y-y.y,w.x-y.x),_<0&&(_=Math.PI*2+_),x=w.x<y.x,x&&(_=_-Math.PI)}else _=Math.atan2(v.y-y.y,v.x-y.x),_<0&&(_=Math.PI*2+_),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(x=v.x<y.x,x&&(_=_-Math.PI)):(x=v.x>y.x,x||(_=_-Math.PI));var S=x?"left":"right",T=s.getModel("label"),C=T.get("rotate"),A=C*(Math.PI/180),M=m.getTextContent();M&&(m.setTextConfig({position:T.get("position")||S,rotation:C==null?-_:A,origin:"center"}),M.setStyle("verticalAlign","middle"))}var D=s.get(["emphasis","focus"]),E=D==="relative"?jd(o.getAncestorsIndices(),o.getDescendantIndices()):D==="ancestor"?o.getAncestorsIndices():D==="descendant"?o.getDescendantIndices():null;E&&(Le(t).focus=E),Nge(i,o,c,t,p,d,v,n),t.__edge&&(t.onHoverStateChange=function(L){if(L!=="blur"){var I=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);I&&I.hoverState===Sp||gy(t.__edge,L)}})}function Nge(r,e,t,n,i,a,o,s){var l=e.getModel(),u=r.get("edgeShape"),c=r.get("layout"),f=r.getOrient(),h=r.get(["lineStyle","curveness"]),d=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),v=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(v||(v=n.__edge=new Cp({shape:eS(c,f,h,i,i)})),ut(v,{shape:eS(c,f,h,a,o)},r));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var m=e.children,g=[],y=0;y<m.length;y++){var b=m[y].getLayout();g.push([b.x,b.y])}v||(v=n.__edge=new Oge({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:f,forkPosition:d}})),ut(v,{shape:{parentPoint:[o.x,o.y],childPoints:g}},r)}v&&!(u==="polyline"&&!e.isExpand)&&(v.useStyle(Ce({strokeNoScale:!0,fill:null},p)),Fr(v,l,"lineStyle"),gu(v),s.add(v))}function fR(r,e,t,n,i){var a=e.tree.root,o=QV(a,r),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(r.dataIndex);if(u){var c=e.getItemGraphicEl(s.dataIndex),f=c.__edge,h=u.__edge||(s.isExpand===!1||s.children.length===1?f:void 0),d=n.get("edgeShape"),p=n.get("layout"),v=n.get("orient"),m=n.get(["lineStyle","curveness"]);h&&(d==="curve"?Es(h,{shape:eS(p,v,m,l,l),style:{opacity:0}},n,{cb:function(){t.remove(h)},removeOpt:i}):d==="polyline"&&n.get("layout")==="orthogonal"&&Es(h,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},n,{cb:function(){t.remove(h)},removeOpt:i}))}}function QV(r,e){for(var t=e.parentNode===r?e:e.parentNode||e,n;n=t.getLayout(),n==null;)t=t.parentNode===r?t:t.parentNode||t;return{source:t,sourceLayout:n}}function hR(r,e,t,n,i){var a=r.tree.getNodeByDataIndex(e),o=r.tree.root,s=QV(o,a).sourceLayout,l={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};Es(t,{x:s.x+1,y:s.y+1},i,{cb:function(){n.remove(t),r.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:l}),a.children.forEach(function(u){fR(u,r,n,i,l)}),fR(a,r,n,i,l)}function eS(r,e,t,n,i){var a,o,s,l,u,c,f,h;if(r==="radial"){u=n.rawX,f=n.rawY,c=i.rawX,h=i.rawY;var d=Ph(u,f),p=Ph(u,f+(h-f)*t),v=Ph(c,h+(f-h)*t),m=Ph(c,h);return{x1:d.x||0,y1:d.y||0,x2:m.x||0,y2:m.y||0,cpx1:p.x||0,cpy1:p.y||0,cpx2:v.x||0,cpy2:v.y||0}}else u=n.x,f=n.y,c=i.x,h=i.y,(e==="LR"||e==="RL")&&(a=u+(c-u)*t,o=f,s=c+(u-c)*t,l=h),(e==="TB"||e==="BT")&&(a=u,o=f+(h-f)*t,s=c,l=h+(f-h)*t);return{x1:u,y1:f,x2:c,y2:h,cpx1:a,cpy1:o,cpx2:s,cpy2:l}}var hi=it();function e$(r){var e=r.mainData,t=r.datas;t||(t={main:e},r.datasAttr={main:"data"}),r.datas=r.mainData=null,t$(e,t,r),k(t,function(n){k(e.TRANSFERABLE_METHODS,function(i){n.wrapMethod(i,Oe(Bge,r))})}),e.wrapMethod("cloneShallow",Oe(Fge,r)),k(e.CHANGABLE_METHODS,function(n){e.wrapMethod(n,Oe(zge,r))}),vn(t[e.dataType]===e)}function Bge(r,e){if(Hge(this)){var t=W({},hi(this).datas);t[this.dataType]=e,t$(e,t,r)}else _A(e,this.dataType,hi(this).mainData,r);return e}function zge(r,e){return r.struct&&r.struct.update(),e}function Fge(r,e){return k(hi(e).datas,function(t,n){t!==e&&_A(t.cloneShallow(),n,e,r)}),e}function Vge(r){var e=hi(this).mainData;return r==null||e==null?e:hi(e).datas[r]}function $ge(){var r=hi(this).mainData;return r==null?[{data:r}]:K(et(hi(r).datas),function(e){return{type:e,data:hi(r).datas[e]}})}function Hge(r){return hi(r).mainData===r}function t$(r,e,t){hi(r).datas={},k(e,function(n,i){_A(n,i,r,t)})}function _A(r,e,t,n){hi(t).datas[e]=r,hi(r).mainData=t,r.dataType=e,n.struct&&(r[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=r),r.getLinkedData=Vge,r.getLinkedDataAll=$ge}var Gge=function(){function r(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(e,t,n){Te(e)&&(n=t,t=e,e=null),e=e||{},se(e)&&(e={order:e});var i=e.order||"preorder",a=this[e.attr||"children"],o;i==="preorder"&&(o=t.call(n,this));for(var s=0;!o&&s<a.length;s++)a[s].eachNode(e,t,n);i==="postorder"&&t.call(n,this)},r.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(e+1),i.height>t&&(t=i.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,i=n.length;t<i;t++){var a=n[t].getNodeById(e);if(a)return a}},r.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,i=n.length;t<i;t++){var a=n[t].contains(e);if(a)return a}},r.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},r.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},r.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},r.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},r.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},r.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},r.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},r}(),xA=function(){function r(e){this.type="tree",this._nodes=[],this.hostModel=e}return r.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},r.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},r.prototype.getNodeById=function(e){return this.root.getNodeById(e)},r.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,i=t.length;n<i;n++)t[n].dataIndex=-1;for(var n=0,i=e.count();n<i;n++)t[e.getRawIndex(n)].dataIndex=n},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(e,t,n){var i=new r(t),a=[],o=1;s(e);function s(c,f){var h=c.value;o=Math.max(o,q(h)?h.length:1),a.push(c);var d=new Gge(vr(c.name,""),i);f?Wge(d,f):i.root=d,i._nodes.push(d);var p=c.children;if(p)for(var v=0;v<p.length;v++)s(p[v],d)}i.root.updateDepthAndHeight(0);var l=Lp(a,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new fn(l,t);return u.initData(a),n&&n(u),e$({mainData:u,struct:i,structAttr:"tree"}),i.update(),i},r}();function Wge(r,e){var t=e.children;r.parentNode!==e&&(t.push(r),r.parentNode=e)}function rp(r,e,t){if(r&&He(e,r.type)>=0){var n=t.getData().tree.root,i=r.targetNode;if(se(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=r.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function r$(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function wA(r,e){var t=r$(r);return He(t,e)>=0}function p1(r,e){for(var t=[];r;){var n=r.dataIndex;t.push({name:r.name,dataIndex:n,value:e.getRawValue(n)}),r=r.parentNode}return t.reverse(),t}var Uge=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var n={name:t.name,children:t.data},i=t.leaves||{},a=new _t(i,this,this.ecModel),o=xA.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(h,d){var p=o.getNodeByDataIndex(d);return p&&p.children.length&&p.isExpand||(h.parentModel=a),h})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var h=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=h&&h.collapsed!=null?!h.collapsed:f.depth<=c}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Cr("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=p1(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(It);function Yge(r,e,t){for(var n=[r],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s<o.length;s++)n.push(o[s])}for(;a=i.pop();)e(a,t)}function hh(r,e){for(var t=[r],n;n=t.pop();)if(e(n),n.isExpand){var i=n.children;if(i.length)for(var a=i.length-1;a>=0;a--)t.push(i[a])}}function qge(r,e){r.eachSeriesByType("tree",function(t){Xge(t,e)})}function Xge(r,e){var t=kge(r,e);r.layoutInfo=t;var n=r.get("layout"),i=0,a=0,o=null;n==="radial"?(i=2*Math.PI,a=Math.min(t.height,t.width)/2,o=lR(function(b,_){return(b.parentNode===_.parentNode?1:2)/b.depth})):(i=t.width,a=t.height,o=lR());var s=r.getData().tree.root,l=s.children[0];if(l){Cge(s),Yge(l,Age,o),s.hierNode.modifier=-l.hierNode.prelim,hh(l,Mge);var u=l,c=l,f=l;hh(l,function(b){var _=b.getLayout().x;_<u.getLayout().x&&(u=b),_>c.getLayout().x&&(c=b),b.depth>f.depth&&(f=b)});var h=u===c?1:o(u,c)/2,d=h-u.getLayout().x,p=0,v=0,m=0,g=0;if(n==="radial")p=i/(c.getLayout().x+h+d),v=a/(f.depth-1||1),hh(l,function(b){m=(b.getLayout().x+d)*p,g=(b.depth-1)*v;var _=Ph(m,g);b.setLayout({x:_.x,y:_.y,rawX:m,rawY:g},!0)});else{var y=r.getOrient();y==="RL"||y==="LR"?(v=a/(c.getLayout().x+h+d),p=i/(f.depth-1||1),hh(l,function(b){g=(b.getLayout().x+d)*v,m=y==="LR"?(b.depth-1)*p:i-(b.depth-1)*p,b.setLayout({x:m,y:g},!0)})):(y==="TB"||y==="BT")&&(p=i/(c.getLayout().x+h+d),v=a/(f.depth-1||1),hh(l,function(b){m=(b.getLayout().x+d)*p,g=y==="TB"?(b.depth-1)*v:a-(b.depth-1)*v,b.setLayout({x:m,y:g},!0)}))}}}function Kge(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),n=t.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(i.dataIndex,"style");W(s,o)})})}function Zge(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=e.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var a=i.coordinateSystem,o=bA(a,e,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}function Jge(r){r.registerChartView(jge),r.registerSeriesModel(Uge),r.registerLayout(qge),r.registerVisual(Kge),Zge(r)}var dR=["treemapZoomToNode","treemapRender","treemapMove"];function Qge(r){for(var e=0;e<dR.length;e++)r.registerAction({type:dR[e],update:"updateView"},tr);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,n){n.eachComponent({mainType:"series",subType:"treemap",query:t},i);function i(a,o){var s=["treemapZoomToNode","treemapRootToNode"],l=rp(t,s,a);if(l){var u=a.getViewRoot();u&&(t.direction=wA(u,l.node)?"rollUp":"drillDown"),a.resetViewRoot(l.node)}}})}function n$(r){var e=r.getData(),t=e.tree,n={};t.eachNode(function(i){for(var a=i;a&&a.depth>1;)a=a.parentNode;var o=k2(r.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var eye=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,n){var i={name:t.name,children:t.data};i$(i);var a=t.levels||[],o=this.designatedVisualItemStyle={},s=new _t({itemStyle:o},this,n);a=t.levels=tye(a,n);var l=K(a||[],function(f){return new _t(f,s,n)},this),u=xA.createTree(i,this,c);function c(f){f.wrapMethod("getItemModel",function(h,d){var p=u.getNodeByDataIndex(d),v=p?l[p.depth]:null;return h.parentModel=v||s,h})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,n,i){var a=this.getData(),o=this.getRawValue(t),s=a.getName(t);return Cr("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=p1(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},W(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var n=this._idIndexMap;n||(n=this._idIndexMap=ve(),this._idIndexMapCount=0);var i=n.get(t);return i==null&&n.set(t,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){n$(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(It);function i$(r){var e=0;k(r.children,function(n){i$(n);var i=n.value;q(i)&&(i=i[0]),e+=i});var t=r.value;q(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),q(r.value)?r.value[0]=t:r.value=t}function tye(r,e){var t=wt(e.get("color")),n=wt(e.get(["aria","decal","decals"]));if(t){r=r||[];var i,a;k(r,function(s){var l=new _t(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=r[0]||(r[0]={});return i||(o.color=t.slice()),!a&&n&&(o.decal=n.slice()),r}}var rye=8,pR=8,F_=5,nye=function(){function r(e){this.group=new Ee,e.add(this.group)}return r.prototype.render=function(e,t,n,i){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,f,u),this._renderContent(e,f,s,l,u,c,i),t1(o,f.pos,f.box)}},r.prototype._prepare=function(e,t,n){for(var i=e;i;i=i.parentNode){var a=vr(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+rye*2,t.emptyItemWidth);t.totalWidth+=s+pR,t.renderList.push({node:i,text:a,width:s})}},r.prototype._renderContent=function(e,t,n,i,a,o,s){for(var l=0,u=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),f=dce(t.pos,t.box),h=t.totalWidth,d=t.renderList,p=i.getModel("itemStyle").getItemStyle(),v=d.length-1;v>=0;v--){var m=d[v],g=m.node,y=m.width,b=m.text;h>f.width&&(h-=y-u,y=u,b=null);var _=new yn({shape:{points:iye(l,0,y,c,v===d.length-1,v===0)},style:Ce(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new ot({style:Et(a,{text:b})}),textConfig:{position:"inside"},z2:bf*1e4,onclick:Oe(s,g)});_.disableLabelAnimation=!0,_.getTextContent().ensureState("emphasis").style=Et(o,{text:b}),_.ensureState("emphasis").style=p,$t(_,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(_),aye(_,e,g),l+=y+pR}},r.prototype.remove=function(){this.group.removeAll()},r}();function iye(r,e,t,n,i,a){var o=[[i?r:r-F_,e],[r+t,e],[r+t,e+n],[i?r:r-F_,e+n]];return!a&&o.splice(2,0,[r+t+F_,e+n/2]),!i&&o.push([r,e+n/2]),o}function aye(r,e,t){Le(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&p1(t,e)}}var oye=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,n,i,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:i,easing:a}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,a=this._storage.length;i<a;i++){var o=this._storage[i];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},r}();function sye(){return new oye}var tS=Ee,vR=nt,mR=3,gR="label",yR="upperLabel",lye=bf*10,uye=bf*2,cye=bf*3,yl=mu([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),bR=function(r){var e=yl(r);return e.stroke=e.fill=e.lineWidth=null,e},Fy=it(),fye=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=dh(),t}return e.prototype.render=function(t,n,i,a){var o=n.findComponents({mainType:"series",subType:"treemap",query:a});if(!(He(o,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=n;var s=["treemapZoomToNode","treemapRootToNode"],l=rp(a,s,t),u=a&&a.type,c=t.layoutInfo,f=!this._oldTree,h=this._storage,d=u==="treemapRootToNode"&&l&&h?{rootNodeGroup:h.nodeGroup[l.node.getRawIndex()],direction:a.direction}:null,p=this._giveContainerGroup(c),v=t.get("animation"),m=this._doRender(p,t,d);v&&!f&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(p,m,t,d):m.renderFinally(),this._resetController(i),this._renderBreadcrumb(t,i,l)}},e.prototype._giveContainerGroup=function(t){var n=this._containerGroup;return n||(n=this._containerGroup=new tS,this._initEvents(n),this.group.add(n)),n.x=t.x,n.y=t.y,n},e.prototype._doRender=function(t,n,i){var a=n.getData().tree,o=this._oldTree,s=dh(),l=dh(),u=this._storage,c=[];function f(y,b,_,x){return hye(n,l,u,i,s,c,y,b,_,x)}v(a.root?[a.root]:[],o&&o.root?[o.root]:[],t,a===o||!o,0);var h=m(u);if(this._oldTree=a,this._storage=l,this._controllerHost){var d=this.seriesModel.layoutInfo,p=a.root.getLayout();p.width===d.width&&p.height===d.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:h,renderFinally:g};function v(y,b,_,x,w){x?(b=y,k(y,function(C,A){!C.isRemoved()&&T(A,A)})):new To(b,y,S,S).add(T).update(T).remove(Oe(T,null)).execute();function S(C){return C.getId()}function T(C,A){var M=C!=null?y[C]:null,D=A!=null?b[A]:null,E=f(M,D,_,w);E&&v(M&&M.viewChildren||[],D&&D.viewChildren||[],E,x,w+1)}}function m(y){var b=dh();return y&&k(y,function(_,x){var w=b[x];k(_,function(S){S&&(w.push(S),Fy(S).willDelete=!0)})}),b}function g(){k(h,function(y){k(y,function(b){b.parent&&b.parent.remove(b)})}),k(c,function(y){y.invisible=!0,y.dirty()})}},e.prototype._doAnimation=function(t,n,i,a){var o=i.get("animationDurationUpdate"),s=i.get("animationEasing"),l=(Te(o)?0:o)||0,u=(Te(s)?null:s)||"cubicOut",c=sye();k(n.willDeleteEls,function(f,h){k(f,function(d,p){if(!d.invisible){var v=d.parent,m,g=Fy(v);if(a&&a.direction==="drillDown")m=v===a.rootNodeGroup?{shape:{x:0,y:0,width:g.nodeWidth,height:g.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var y=0,b=0;g.willDelete||(y=g.nodeWidth/2,b=g.nodeHeight/2),m=h==="nodeGroup"?{x:y,y:b,style:{opacity:0}}:{shape:{x:y,y:b,width:0,height:0},style:{opacity:0}}}m&&c.add(d,m,l,0,u)}})}),k(this._storage,function(f,h){k(f,function(d,p){var v=n.lastsForAnimation[h][p],m={};v&&(d instanceof Ee?v.oldX!=null&&(m.x=d.x,m.y=d.y,d.x=v.oldX,d.y=v.oldY):(v.oldShape&&(m.shape=W({},d.shape),d.setShape(v.oldShape)),v.fadein?(d.setStyle("opacity",0),m.style={opacity:1}):d.style.opacity!==1&&(m.style={opacity:1})),c.add(d,m,l,0,u))})},this),this._state="animating",c.finished(ue(function(){this._state="ready",n.renderFinally()},this)).start()},e.prototype._resetController=function(t){var n=this._controller,i=this._controllerHost;i||(this._controllerHost={target:this.group},i=this._controllerHost),n||(n=this._controller=new zp(t.getZr()),n.enable(this.seriesModel.get("roam")),i.zoomLimit=this.seriesModel.get("scaleLimit"),i.zoom=this.seriesModel.get("zoom"),n.on("pan",ue(this._onPan,this)),n.on("zoom",ue(this._onZoom,this)));var a=new Ve(0,0,t.getWidth(),t.getHeight());n.setPointerChecker(function(o,s,l){return a.contain(s,l)})},e.prototype._clearController=function(){var t=this._controller;this._controllerHost=null,t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>mR||Math.abs(t.dy)>mR)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(t){var n=t.originX,i=t.originY,a=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Ve(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var f=c.zoom=c.zoom||1;if(f*=a,u){var h=u.min||0,d=u.max||1/0;f=Math.max(Math.min(d,f),h)}var p=f/c.zoom;c.zoom=f;var v=this.seriesModel.layoutInfo;n-=v.x,i-=v.y;var m=zn();La(m,m,[-n,-i]),dC(m,m,[p,p]),La(m,m,[n,i]),l.applyTransform(m),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var n=this;t.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&Sy(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,n,i){var a=this;i||(i=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new nye(this.group))).render(t,n,i.node,function(o){a._state!=="animating"&&(wA(t.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=dh(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(St);function dh(){return{nodeGroup:[],background:[],content:[]}}function hye(r,e,t,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),f=r.getData(),h=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var d=c.width,p=c.height,v=c.borderWidth,m=c.invisible,g=o.getRawIndex(),y=s&&s.getRawIndex(),b=o.viewChildren,_=c.upperHeight,x=b&&b.length,w=h.getModel("itemStyle"),S=h.getModel(["emphasis","itemStyle"]),T=h.getModel(["blur","itemStyle"]),C=h.getModel(["select","itemStyle"]),A=w.get("borderRadius")||0,M=U("nodeGroup",tS);if(!M)return;if(l.add(M),M.x=c.x||0,M.y=c.y||0,M.markRedraw(),Fy(M).nodeWidth=d,Fy(M).nodeHeight=p,c.isAboveViewRoot)return M;var D=U("background",vR,u,uye);D&&F(M,D,x&&c.upperLabelHeight);var E=h.getModel("emphasis"),L=E.get("focus"),I=E.get("blurScope"),R=E.get("disabled"),P=L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():L;if(x)Hd(M)&&Pl(M,!1),D&&(Pl(D,!R),f.setItemGraphicEl(o.dataIndex,D),_2(D,P,I));else{var O=U("content",vR,u,cye);O&&N(M,O),D.disableMorphing=!0,D&&Hd(D)&&Pl(D,!1),Pl(M,!R),f.setItemGraphicEl(o.dataIndex,M);var j=h.getShallow("cursor");j&&O.attr("cursor",j),_2(M,P,I)}return M;function F(ge,le,be){var re=Le(le);if(re.dataIndex=o.dataIndex,re.seriesIndex=r.seriesIndex,le.setShape({x:0,y:0,width:d,height:p,r:A}),m)B(le);else{le.invisible=!1;var G=o.getVisual("style"),ee=G.stroke,Q=bR(w);Q.fill=ee;var me=yl(S);me.fill=S.get("borderColor");var he=yl(T);he.fill=T.get("borderColor");var Se=yl(C);if(Se.fill=C.get("borderColor"),be){var Fe=d-2*v;$(le,ee,G.opacity,{x:v,y:0,width:Fe,height:_})}else le.removeTextContent();le.setStyle(Q),le.ensureState("emphasis").style=me,le.ensureState("blur").style=he,le.ensureState("select").style=Se,gu(le)}ge.add(le)}function N(ge,le){var be=Le(le);be.dataIndex=o.dataIndex,be.seriesIndex=r.seriesIndex;var re=Math.max(d-2*v,0),G=Math.max(p-2*v,0);if(le.culling=!0,le.setShape({x:v,y:v,width:re,height:G,r:A}),m)B(le);else{le.invisible=!1;var ee=o.getVisual("style"),Q=ee.fill,me=bR(w);me.fill=Q,me.decal=ee.decal;var he=yl(S),Se=yl(T),Fe=yl(C);$(le,Q,ee.opacity,null),le.setStyle(me),le.ensureState("emphasis").style=he,le.ensureState("blur").style=Se,le.ensureState("select").style=Fe,gu(le)}ge.add(le)}function B(ge){!ge.invisible&&a.push(ge)}function $(ge,le,be,re){var G=h.getModel(re?yR:gR),ee=vr(h.get("name"),null),Q=G.getShallow("show");Vr(ge,Tr(h,re?yR:gR),{defaultText:Q?ee:null,inheritColor:le,defaultOpacity:be,labelFetcher:r,labelDataIndex:o.dataIndex});var me=ge.getTextContent();if(me){var he=me.style,Se=cC(he.padding||0);re&&(ge.setTextConfig({layoutRect:re}),me.disableLabelLayout=!0),me.beforeUpdate=function(){var xe=Math.max((re?re.width:ge.shape.width)-Se[1]-Se[3],0),rt=Math.max((re?re.height:ge.shape.height)-Se[0]-Se[2],0);(he.width!==xe||he.height!==rt)&&me.setStyle({width:xe,height:rt})},he.truncateMinChar=2,he.lineOverflow="truncate",J(he,re,c);var Fe=me.getState("emphasis");J(Fe?Fe.style:null,re,c)}}function J(ge,le,be){var re=ge?ge.text:null;if(!le&&be.isLeafRoot&&re!=null){var G=r.get("drillDownIcon",!0);ge.text=G?G+" "+re:re}}function U(ge,le,be,re){var G=y!=null&&t[ge][y],ee=i[ge];return G?(t[ge][y]=null,we(ee,G)):m||(G=new le,G instanceof mi&&(G.z2=dye(be,re)),Ye(ee,G)),e[ge][g]=G}function we(ge,le){var be=ge[g]={};le instanceof tS?(be.oldX=le.x,be.oldY=le.y):be.oldShape=W({},le.shape)}function Ye(ge,le){var be=ge[g]={},re=o.parentNode,G=le instanceof Ee;if(re&&(!n||n.direction==="drillDown")){var ee=0,Q=0,me=i.background[re.getRawIndex()];!n&&me&&me.oldShape&&(ee=me.oldShape.width,Q=me.oldShape.height),G?(be.oldX=0,be.oldY=Q):be.oldShape={x:ee,y:Q,width:0,height:0}}be.fadein=!G}}function dye(r,e){return r*lye+e}var np=k,pye=Me,Vy=-1,Sr=function(){function r(e){var t=e.mappingMethod,n=e.type,i=this.option=ke(e);this.type=n,this.mappingMethod=t,this._normalizeData=gye[t];var a=r.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[t],t==="piecewise"?(V_(i),vye(i)):t==="category"?i.categories?mye(i):V_(i,!0):(vn(t!=="linear"||i.dataExtent),V_(i))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return ue(this._normalizeData,this)},r.listVisualTypes=function(){return et(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,n){Me(e)?k(e,t,n):t.call(n,e)},r.mapVisual=function(e,t,n){var i,a=q(e)?[]:Me(e)?{}:(i=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(n,o,s);i?a=l:a[s]=l}),a},r.retrieveVisuals=function(e){var t={},n;return e&&np(r.visualHandlers,function(i,a){e.hasOwnProperty(a)&&(t[a]=e[a],n=!0)}),n?t:null},r.prepareVisualTypes=function(e){if(q(e))e=e.slice();else if(pye(e)){var t=[];np(e,function(n,i){t.push(i)}),e=t}else return[];return e.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,n){for(var i,a=1/0,o=0,s=t.length;o<s;o++){var l=t[o].value;if(l!=null){if(l===e||se(l)&&l===e+"")return o;n&&h(l,o)}}for(var o=0,s=t.length;o<s;o++){var u=t[o],c=u.interval,f=u.close;if(c){if(c[0]===-1/0){if(nm(f[1],e,c[1]))return o}else if(c[1]===1/0){if(nm(f[0],c[0],e))return o}else if(nm(f[0],c[0],e)&&nm(f[1],e,c[1]))return o;n&&h(c[0],o),n&&h(c[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:i;function h(d,p){var v=Math.abs(d-e);v<a&&(a=v,i=p)}},r.visualHandlers={color:{applyVisual:ph("color"),getColorMapper:function(){var e=this.option;return ue(e.mappingMethod==="category"?function(t,n){return!n&&(t=this._normalizeData(t)),Rh.call(this,t)}:function(t,n,i){var a=!!i;return!n&&(t=this._normalizeData(t)),i=wb(t,e.parsedVisual,i),a?i:ho(i,"rgba")},this)},_normalizedToVisual:{linear:function(e){return ho(wb(e,this.option.parsedVisual),"rgba")},category:Rh,piecewise:function(e,t){var n=nS.call(this,t);return n==null&&(n=ho(wb(e,this.option.parsedVisual),"rgba")),n},fixed:bl}},colorHue:rm(function(e,t){return id(e,t)}),colorSaturation:rm(function(e,t){return id(e,null,t)}),colorLightness:rm(function(e,t){return id(e,null,null,t)}),colorAlpha:rm(function(e,t){return fy(e,t)}),decal:{applyVisual:ph("decal"),_normalizedToVisual:{linear:null,category:Rh,piecewise:null,fixed:null}},opacity:{applyVisual:ph("opacity"),_normalizedToVisual:rS([0,1])},liftZ:{applyVisual:ph("liftZ"),_normalizedToVisual:{linear:bl,category:bl,piecewise:bl,fixed:bl}},symbol:{applyVisual:function(e,t,n){var i=this.mapValueToVisual(e);n("symbol",i)},_normalizedToVisual:{linear:_R,category:Rh,piecewise:function(e,t){var n=nS.call(this,t);return n==null&&(n=_R.call(this,e)),n},fixed:bl}},symbolSize:{applyVisual:ph("symbolSize"),_normalizedToVisual:rS([0,1])}},r}();function vye(r){var e=r.pieceList;r.hasSpecialVisual=!1,k(e,function(t,n){t.originIndex=n,t.visual!=null&&(r.hasSpecialVisual=!0)})}function mye(r){var e=r.categories,t=r.categoryMap={},n=r.visual;if(np(e,function(o,s){t[o]=s}),!q(n)){var i=[];Me(n)?np(n,function(o,s){var l=t[s];i[l??Vy]=o}):i[Vy]=n,n=a$(r,i)}for(var a=e.length-1;a>=0;a--)n[a]==null&&(delete t[e[a]],e.pop())}function V_(r,e){var t=r.visual,n=[];Me(t)?np(t,function(a){n.push(a)}):t!=null&&n.push(t);var i={color:1,symbol:1};!e&&n.length===1&&!i.hasOwnProperty(r.type)&&(n[1]=n[0]),a$(r,n)}function rm(r){return{applyVisual:function(e,t,n){var i=this.mapValueToVisual(e);n("color",r(t("color"),i))},_normalizedToVisual:rS([0,1])}}function _R(r){var e=this.option.visual;return e[Math.round(bt(r,[0,1],[0,e.length-1],!0))]||{}}function ph(r){return function(e,t,n){n(r,this.mapValueToVisual(e))}}function Rh(r){var e=this.option.visual;return e[this.option.loop&&r!==Vy?r%e.length:r]}function bl(){return this.option.visual[0]}function rS(r){return{linear:function(e){return bt(e,r,this.option.visual,!0)},category:Rh,piecewise:function(e,t){var n=nS.call(this,t);return n==null&&(n=bt(e,r,this.option.visual,!0)),n},fixed:bl}}function nS(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var n=Sr.findPieceIndex(r,t),i=t[n];if(i&&i.visual)return i.visual[this.type]}}function a$(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=K(e,function(t){var n=Fn(t);return n||[0,0,0,1]})),e}var gye={linear:function(r){return bt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=Sr.findPieceIndex(r,e,!0);if(t!=null)return bt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??Vy},fixed:tr};function nm(r,e,t){return r?e<=t:e<t}var yye="itemStyle",o$=it();const bye={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||s$(t,{},r.getViewRoot().getAncestors(),r)}};function s$(r,e,t,n){var i=r.getModel(),a=r.getLayout(),o=r.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var s=i.getModel(yye),l=_ye(s,e,n),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),c=s.get("borderColor"),f=s.get("borderColorSaturation"),h;f!=null&&(h=xR(l),c=xye(f,h)),u.stroke=c;var d=r.viewChildren;if(!d||!d.length)h=xR(l),u.fill=h;else{var p=wye(r,i,a,s,l,d);k(d,function(v,m){if(v.depth>=t.length||v===t[v.depth]){var g=Sye(i,l,v,m,p,n);s$(v,g,t,n)}})}}}function _ye(r,e,t){var n=W({},e),i=t.designatedVisualItemStyle;return k(["color","colorAlpha","colorSaturation"],function(a){i[a]=e[a];var o=r.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function xR(r){var e=$_(r,"color");if(e){var t=$_(r,"colorAlpha"),n=$_(r,"colorSaturation");return n&&(e=id(e,null,null,n)),t&&(e=fy(e,t)),e}}function xye(r,e){return e!=null?id(e,null,null,r):null}function $_(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function wye(r,e,t,n,i,a){if(!(!a||!a.length)){var o=H_(e,"color")||i.color!=null&&i.color!=="none"&&(H_(e,"colorAlpha")||H_(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var c=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var h=new Sr(f);return o$(h).drColorMappingBy=c,h}}}function H_(r,e){var t=r.get(e);return q(t)&&t.length?{name:e,range:t}:null}function Sye(r,e,t,n,i,a){var o=W({},e);if(i){var s=i.type,l=s==="color"&&o$(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var ip=Math.max,$y=Math.min,wR=kr,SA=k,l$=["itemStyle","borderWidth"],Tye=["itemStyle","gapWidth"],Cye=["upperLabel","show"],Aye=["upperLabel","height"];const Mye={seriesType:"treemap",reset:function(r,e,t,n){var i=t.getWidth(),a=t.getHeight(),o=r.option,s=gr(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=ie(wR(s.width,l[0]),i),c=ie(wR(s.height,l[1]),a),f=n&&n.type,h=["treemapZoomToNode","treemapRootToNode"],d=rp(n,h,r),p=f==="treemapRender"||f==="treemapMove"?n.rootRect:null,v=r.getViewRoot(),m=r$(v);if(f!=="treemapMove"){var g=f==="treemapZoomToNode"?Pye(r,d,v,u,c):p?[p.width,p.height]:[u,c],y=o.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var b={squareRatio:o.squareRatio,sort:y,leafDepth:o.leafDepth};v.hostTree.clearLayouts();var _={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};v.setLayout(_),u$(v,b,!1,0),_=v.getLayout(),SA(m,function(w,S){var T=(m[S+1]||v).getValue();w.setLayout(W({dataExtent:[T,T],borderWidth:0,upperHeight:0},_))})}var x=r.getData().tree.root;x.setLayout(Rye(s,p,d),!0),r.setLayoutInfo(s),c$(x,new Ve(-s.x,-s.y,i,a),m,v,0)}};function u$(r,e,t,n){var i,a;if(!r.isRemoved()){var o=r.getLayout();i=o.width,a=o.height;var s=r.getModel(),l=s.get(l$),u=s.get(Tye)/2,c=f$(s),f=Math.max(l,c),h=l-u,d=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),i=ip(i-2*h,0),a=ip(a-h-d,0);var p=i*a,v=kye(r,s,p,e,t,n);if(v.length){var m={x:h,y:d,width:i,height:a},g=$y(i,a),y=1/0,b=[];b.area=0;for(var _=0,x=v.length;_<x;){var w=v[_];b.push(w),b.area+=w.getLayout().area;var S=Iye(b,g,e.squareRatio);S<=y?(_++,y=S):(b.area-=b.pop().getLayout().area,SR(b,g,m,u,!1),g=$y(m.width,m.height),b.length=b.area=0,y=1/0)}if(b.length&&SR(b,g,m,u,!0),!t){var T=s.get("childrenVisibleMin");T!=null&&p<T&&(t=!0)}for(var _=0,x=v.length;_<x;_++)u$(v[_],e,t,n+1)}}}function kye(r,e,t,n,i,a){var o=r.children||[],s=n.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=n.leafDepth!=null&&n.leafDepth<=a;if(i&&!l)return r.viewChildren=[];o=pt(o,function(d){return!d.isRemoved()}),Eye(o,s);var u=Lye(e,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=Dye(e,t,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var c=0,f=o.length;c<f;c++){var h=o[c].getValue()/u.sum*t;o[c].setLayout({area:h})}return l&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function Dye(r,e,t,n,i){if(!n)return t;for(var a=r.get("visibleMin"),o=i.length,s=o,l=o-1;l>=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/t*e<a&&(s=l,t-=u)}return n==="asc"?i.splice(0,o-s):i.splice(s,o-s),t}function Eye(r,e){return e&&r.sort(function(t,n){var i=e==="asc"?t.getValue()-n.getValue():n.getValue()-t.getValue();return i===0?e==="asc"?t.dataIndex-n.dataIndex:n.dataIndex-t.dataIndex:i}),r}function Lye(r,e,t){for(var n=0,i=0,a=e.length;i<a;i++)n+=e[i].getValue();var o=r.get("visualDimension"),s;return!e||!e.length?s=[NaN,NaN]:o==="value"&&t?(s=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&s.reverse()):(s=[1/0,-1/0],SA(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function Iye(r,e,t){for(var n=0,i=1/0,a=0,o=void 0,s=r.length;a<s;a++)o=r[a].getLayout().area,o&&(o<i&&(i=o),o>n&&(n=o));var l=r.area*r.area,u=e*e*t;return l?ip(u*n/l,l/(u*i)):1/0}function SR(r,e,t,n,i){var a=e===t.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=t[s[a]],c=e?r.area/e:0;(i||c>t[l[o]])&&(c=t[l[o]]);for(var f=0,h=r.length;f<h;f++){var d=r[f],p={},v=c?d.getLayout().area/c:0,m=p[l[o]]=ip(c-2*n,0),g=t[s[a]]+t[l[a]]-u,y=f===h-1||g<v?g:v,b=p[l[a]]=ip(y-2*n,0);p[s[o]]=t[s[o]]+$y(n,m/2),p[s[a]]=u+$y(n,b/2),u+=y,d.setLayout(p,!0)}t[s[o]]+=c,t[l[o]]-=c}function Pye(r,e,t,n,i){var a=(e||{}).node,o=[n,i];if(!a||a===t)return o;for(var s,l=n*i,u=l*r.option.zoomToNodeRatio;s=a.parentNode;){for(var c=0,f=s.children,h=0,d=f.length;h<d;h++)c+=f[h].getValue();var p=a.getValue();if(p===0)return o;u*=c/p;var v=s.getModel(),m=v.get(l$),g=Math.max(m,f$(v));u+=4*m*m+(3*m+g)*Math.pow(u,.5),u>NE&&(u=NE),a=s}u<l&&(u=l);var y=Math.pow(u/l,.5);return[n*y,i*y]}function Rye(r,e,t){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!t)return n;var i=t.node,a=i.getLayout();if(!a)return n;for(var o=[a.width/2,a.height/2],s=i;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:r.width/2-o[0],y:r.height/2-o[1]}}function c$(r,e,t,n,i){var a=r.getLayout(),o=t[i],s=o&&o===r;if(!(o&&!s||i===t.length&&r!==n)){r.setLayout({isInView:!0,invisible:!s&&!e.intersect(a),isAboveViewRoot:s},!0);var l=new Ve(e.x-a.x,e.y-a.y,e.width,e.height);SA(r.viewChildren||[],function(u){c$(u,l,t,n,i+1)})}}function f$(r){return r.get(Cye)?r.get(Aye):0}function Oye(r){r.registerSeriesModel(eye),r.registerChartView(fye),r.registerVisual(bye),r.registerLayout(Mye),Qge(r)}function jye(r){var e=r.findComponents({mainType:"legend"});!e||!e.length||r.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),i=t.getGraph(),a=i.data,o=n.mapArray(n.getName);a.filterSelf(function(s){var l=a.getItemModel(s),u=l.getShallow("category");if(u!=null){lt(u)&&(u=o[u]);for(var c=0;c<e.length;c++)if(!e[c].isSelected(u))return!1}return!0})})}function Nye(r){var e={};r.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),i=t.getData(),a={};n.each(function(o){var s=n.getName(o);a["ec-"+s]=o;var l=n.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),n.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],f=0;f<c.length;f++){var h=l.getShallow(c[f],!0);h!=null&&n.setItemVisual(o,c[f],h)}}),n.count()&&i.each(function(o){var s=i.getItemModel(o),l=s.getShallow("category");if(l!=null){se(l)&&(l=a["ec-"+l]);var u=n.getItemVisual(l,"style"),c=i.ensureUniqueItemVisual(o,"style");W(c,u);for(var f=["symbol","symbolSize","symbolKeepAspect"],h=0;h<f.length;h++)i.setItemVisual(o,f[h],n.getItemVisual(l,f[h]))}})})}function im(r){return r instanceof Array||(r=[r,r]),r}function Bye(r){r.eachSeriesByType("graph",function(e){var t=e.getGraph(),n=e.getEdgeData(),i=im(e.get("edgeSymbol")),a=im(e.get("edgeSymbolSize"));n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",a&&a[0]),n.setVisual("toSymbolSize",a&&a[1]),n.setVisual("style",e.getModel("lineStyle").getLineStyle()),n.each(function(o){var s=n.getItemModel(o),l=t.getEdgeByIndex(o),u=im(s.getShallow("symbol",!0)),c=im(s.getShallow("symbolSize",!0)),f=s.getModel("lineStyle").getLineStyle(),h=n.ensureUniqueItemVisual(o,"style");switch(W(h,f),h.stroke){case"source":{var d=l.node1.getVisual("style");h.stroke=d&&d.fill;break}case"target":{var d=l.node2.getVisual("style");h.stroke=d&&d.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),c[0]&&l.setVisual("fromSymbolSize",c[0]),c[1]&&l.setVisual("toSymbolSize",c[1])})})}var iS="-->",v1=function(r){return r.get("autoCurveness")||null},h$=function(r,e){var t=v1(r),n=20,i=[];if(lt(t))n=t;else if(q(t)){r.__curvenessList=t;return}e>n&&(n=e);var a=n%2?n+2:n+3;i=[];for(var o=0;o<a;o++)i.push((o%2?o+1:o)/10*(o%2?-1:1));r.__curvenessList=i},ap=function(r,e,t){var n=[r.id,r.dataIndex].join("."),i=[e.id,e.dataIndex].join(".");return[t.uid,n,i].join(iS)},d$=function(r){var e=r.split(iS);return[e[0],e[2],e[1]].join(iS)},zye=function(r,e){var t=ap(r.node1,r.node2,e);return e.__edgeMap[t]},Fye=function(r,e){var t=aS(ap(r.node1,r.node2,e),e),n=aS(ap(r.node2,r.node1,e),e);return t+n},aS=function(r,e){var t=e.__edgeMap;return t[r]?t[r].length:0};function Vye(r){v1(r)&&(r.__curvenessList=[],r.__edgeMap={},h$(r))}function $ye(r,e,t,n){if(v1(t)){var i=ap(r,e,t),a=t.__edgeMap,o=a[d$(i)];a[i]&&!o?a[i].isForward=!0:o&&a[i]&&(o.isForward=!0,a[i].isForward=!1),a[i]=a[i]||[],a[i].push(n)}}function TA(r,e,t,n){var i=v1(e),a=q(i);if(!i)return null;var o=zye(r,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===t){s=l;break}var u=Fye(r,e);h$(e,u),r.lineStyle=r.lineStyle||{};var c=ap(r.node1,r.node2,e),f=e.__curvenessList,h=a||u%2?0:1;if(o.isForward)return f[h+s];var d=d$(c),p=aS(d,e),v=f[s+p+h];return n?a?i&&i[0]===0?(p+h)%2?v:-v:((p%2?0:1)+h)%2?v:-v:(p+h)%2?v:-v:f[s+p+h]}function p$(r){var e=r.coordinateSystem;if(!(e&&e.type!=="view")){var t=r.getGraph();t.eachNode(function(n){var i=n.getModel();n.setLayout([+i.get("x"),+i.get("y")])}),CA(t,r)}}function CA(r,e){r.eachEdge(function(t,n){var i=_a(t.getModel().get(["lineStyle","curveness"]),-TA(t,e,n,!0),0),a=co(t.node1.getLayout()),o=co(t.node2.getLayout()),s=[a,o];+i&&s.push([(a[0]+o[0])/2-(a[1]-o[1])*i,(a[1]+o[1])/2-(o[0]-a[0])*i]),t.setLayout(s)})}function Hye(r,e){r.eachSeriesByType("graph",function(t){var n=t.get("layout"),i=t.coordinateSystem;if(i&&i.type!=="view"){var a=t.getData(),o=[];k(i.dimensions,function(h){o=o.concat(a.mapDimensionsAll(h))});for(var s=0;s<a.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var f=a.get(o[c],s);isNaN(f)||(u=!0),l.push(f)}u?a.setItemLayout(s,i.dataToPoint(l)):a.setItemLayout(s,[NaN,NaN])}CA(a.graph,t)}else(!n||n==="none")&&p$(t)})}function Oh(r){var e=r.coordinateSystem;if(e.type!=="view")return 1;var t=r.option.nodeScaleRatio,n=e.scaleX,i=e.getZoom(),a=(i-1)*t+1;return a/n}function jh(r){var e=r.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var TR=Math.PI,G_=[];function AA(r,e,t,n){var i=r.coordinateSystem;if(!(i&&i.type!=="view")){var a=i.getBoundingRect(),o=r.getData(),s=o.graph,l=a.width/2+a.x,u=a.height/2+a.y,c=Math.min(a.width,a.height)/2,f=o.count();if(o.setLayout({cx:l,cy:u}),!!f){if(t){var h=i.pointToData(n),d=h[0],p=h[1],v=[d-l,p-u];mf(v,v),jm(v,v,c),t.setLayout([l+v[0],u+v[1]],!0);var m=r.get(["circular","rotateLabel"]);v$(t,m,l,u)}Gye[e](r,s,o,c,l,u,f),s.eachEdge(function(g,y){var b=_a(g.getModel().get(["lineStyle","curveness"]),TA(g,r,y),0),_=co(g.node1.getLayout()),x=co(g.node2.getLayout()),w,S=(_[0]+x[0])/2,T=(_[1]+x[1])/2;+b&&(b*=3,w=[l*b+S*(1-b),u*b+T*(1-b)]),g.setLayout([_,x,w])})}}}var Gye={value:function(r,e,t,n,i,a,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(c){var f=c.getValue("value"),h=u*(l?f:1)/2;s+=h,c.setLayout([n*Math.cos(s)+i,n*Math.sin(s)+a]),s+=h})},symbolSize:function(r,e,t,n,i,a,o){var s=0;G_.length=o;var l=Oh(r);e.eachNode(function(f){var h=jh(f);isNaN(h)&&(h=2),h<0&&(h=0),h*=l;var d=Math.asin(h/2/n);isNaN(d)&&(d=TR/2),G_[f.dataIndex]=d,s+=d*2});var u=(2*TR-s)/o/2,c=0;e.eachNode(function(f){var h=u+G_[f.dataIndex];c+=h,(!f.getLayout()||!f.getLayout().fixed)&&f.setLayout([n*Math.cos(c)+i,n*Math.sin(c)+a]),c+=h})}};function v$(r,e,t,n){var i=r.getGraphicEl();if(i){var a=r.getModel(),o=a.get(["label","rotate"])||0,s=i.getSymbolPath();if(e){var l=r.getLayout(),u=Math.atan2(l[1]-n,l[0]-t);u<0&&(u=Math.PI*2+u);var c=l[0]<t;c&&(u=u-Math.PI);var f=c?"left":"right";s.setTextConfig({rotation:-u,position:f,origin:"center"});var h=s.ensureState("emphasis");W(h.textConfig||(h.textConfig={}),{position:f})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function Wye(r){r.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&AA(e,"symbolSize")})}var sc=Ww;function Uye(r,e,t){for(var n=r,i=e,a=t.rect,o=a.width,s=a.height,l=[a.x+o/2,a.y+s/2],u=t.gravity==null?.1:t.gravity,c=0;c<n.length;c++){var f=n[c];f.p||(f.p=Du(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),f.pp=co(f.p),f.edges=null}var h=t.friction==null?.6:t.friction,d=h,p,v;return{warmUp:function(){d=h*.8},setFixed:function(m){n[m].fixed=!0},setUnfixed:function(m){n[m].fixed=!1},beforeStep:function(m){p=m},afterStep:function(m){v=m},step:function(m){p&&p(n,i);for(var g=[],y=n.length,b=0;b<i.length;b++){var _=i[b];if(!_.ignoreForceLayout){var x=_.n1,w=_.n2;Ll(g,w.p,x.p);var S=Uw(g)-_.d,T=w.w/(x.w+w.w);isNaN(T)&&(T=0),mf(g,g),!x.fixed&&sc(x.p,x.p,g,T*S*d),!w.fixed&&sc(w.p,w.p,g,-(1-T)*S*d)}}for(var b=0;b<y;b++){var C=n[b];C.fixed||(Ll(g,l,C.p),sc(C.p,C.p,g,u*d))}for(var b=0;b<y;b++)for(var x=n[b],A=b+1;A<y;A++){var w=n[A];Ll(g,w.p,x.p);var S=Uw(g);S===0&&(woe(g,Math.random()-.5,Math.random()-.5),S=1);var M=(x.rep+w.rep)/S/S;!x.fixed&&sc(x.pp,x.pp,g,M),!w.fixed&&sc(w.pp,w.pp,g,-M)}for(var D=[],b=0;b<y;b++){var C=n[b];C.fixed||(Ll(D,C.p,C.pp),sc(C.p,C.p,D,d),on(C.pp,C.p))}d=d*.992;var E=d<.01;v&&v(n,i,E),m&&m(E)}}}function Yye(r){r.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var n=e.preservedPoints||{},i=e.getGraph(),a=i.data,o=i.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?a.each(function(b){var _=a.getId(b);a.setItemLayout(b,n[_]||[NaN,NaN])}):!l||l==="none"?p$(e):l==="circular"&&AA(e,"value");var u=a.getDataExtent("value"),c=o.getDataExtent("value"),f=s.get("repulsion"),h=s.get("edgeLength"),d=q(f)?f:[f,f],p=q(h)?h:[h,h];p=[p[1],p[0]];var v=a.mapArray("value",function(b,_){var x=a.getItemLayout(_),w=bt(b,u,d);return isNaN(w)&&(w=(d[0]+d[1])/2),{w,rep:w,fixed:a.getItemModel(_).get("fixed"),p:!x||isNaN(x[0])||isNaN(x[1])?null:x}}),m=o.mapArray("value",function(b,_){var x=i.getEdgeByIndex(_),w=bt(b,c,p);isNaN(w)&&(w=(p[0]+p[1])/2);var S=x.getModel(),T=_a(x.getModel().get(["lineStyle","curveness"]),-TA(x,e,_,!0),0);return{n1:v[x.node1.dataIndex],n2:v[x.node2.dataIndex],d:w,curveness:T,ignoreForceLayout:S.get("ignoreForceLayout")}}),g=t.getBoundingRect(),y=Uye(v,m,{rect:g,gravity:s.get("gravity"),friction:s.get("friction")});y.beforeStep(function(b,_){for(var x=0,w=b.length;x<w;x++)b[x].fixed&&on(b[x].p,i.getNodeByIndex(x).getLayout())}),y.afterStep(function(b,_,x){for(var w=0,S=b.length;w<S;w++)b[w].fixed||i.getNodeByIndex(w).setLayout(b[w].p),n[a.getId(w)]=b[w].p;for(var w=0,S=_.length;w<S;w++){var T=_[w],C=i.getEdgeByIndex(w),A=T.n1.p,M=T.n2.p,D=C.getLayout();D=D?D.slice():[],D[0]=D[0]||[],D[1]=D[1]||[],on(D[0],A),on(D[1],M),+T.curveness&&(D[2]=[(A[0]+M[0])/2-(A[1]-M[1])*T.curveness,(A[1]+M[1])/2-(M[0]-A[0])*T.curveness]),C.setLayout(D)}}),e.forceLayout=y,e.preservedPoints=n,y.step()}else e.forceLayout=null})}function qye(r,e,t){var n=W(r.getBoxLayoutParams(),{aspect:t});return gr(n,{width:e.getWidth(),height:e.getHeight()})}function Xye(r,e){var t=[];return r.eachSeriesByType("graph",function(n){var i=n.get("coordinateSystem");if(!i||i==="view"){var a=n.getData(),o=a.mapArray(function(m){var g=a.getItemModel(m);return[+g.get("x"),+g.get("y")]}),s=[],l=[];$0(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),c=qye(n,e,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var f=l[0]-s[0],h=l[1]-s[1],d=c.width,p=c.height,v=n.coordinateSystem=new Fp;v.zoomLimit=n.get("scaleLimit"),v.setBoundingRect(s[0],s[1],f,h),v.setViewRect(c.x,c.y,d,p),v.setCenter(n.get("center"),e),v.setZoom(n.get("zoom")),t.push(v)}}),t}var CR=xr.prototype,W_=Cp.prototype,m$=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}();(function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(m$);function U_(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var Kye=function(r){z(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-line",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new m$},e.prototype.buildPath=function(t,n){U_(n)?CR.buildPath.call(this,t,n):W_.buildPath.call(this,t,n)},e.prototype.pointAt=function(t){return U_(this.shape)?CR.pointAt.call(this,t):W_.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var n=this.shape,i=U_(n)?[n.x2-n.x1,n.y2-n.y1]:W_.tangentAt.call(this,t);return mf(i,i)},e}(Xe),Y_=["fromSymbol","toSymbol"];function AR(r){return"_"+r+"Type"}function MR(r,e,t){var n=e.getItemVisual(t,r);if(!n||n==="none")return n;var i=e.getItemVisual(t,r+"Size"),a=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=kf(i),u=Pu(o||0,l);return n+l+u+(a||"")+(s||"")}function kR(r,e,t){var n=e.getItemVisual(t,r);if(!(!n||n==="none")){var i=e.getItemVisual(t,r+"Size"),a=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=kf(i),u=Pu(o||0,l),c=ur(n,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,c.name=r,c}}function Zye(r){var e=new Kye({name:"line",subPixelOptimize:!0});return oS(e.shape,r),e}function oS(r,e){r.x1=e[0][0],r.y1=e[0][1],r.x2=e[1][0],r.y2=e[1][1],r.percent=1;var t=e[2];t?(r.cpx1=t[0],r.cpy1=t[1]):(r.cpx1=NaN,r.cpy1=NaN)}var MA=function(r){z(e,r);function e(t,n,i){var a=r.call(this)||this;return a._createLine(t,n,i),a}return e.prototype._createLine=function(t,n,i){var a=t.hostModel,o=t.getItemLayout(n),s=Zye(o);s.shape.percent=0,Ot(s,{shape:{percent:1}},a,n),this.add(s),k(Y_,function(l){var u=kR(l,t,n);this.add(u),this[AR(l)]=MR(l,t,n)},this),this._updateCommonStl(t,n,i)},e.prototype.updateData=function(t,n,i){var a=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(n),l={shape:{}};oS(l.shape,s),ut(o,l,a,n),k(Y_,function(u){var c=MR(u,t,n),f=AR(u);if(this[f]!==c){this.remove(this.childOfName(u));var h=kR(u,t,n);this.add(h)}this[f]=c},this),this._updateCommonStl(t,n,i)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,n,i){var a=t.hostModel,o=this.childOfName("line"),s=i&&i.emphasisLineStyle,l=i&&i.blurLineStyle,u=i&&i.selectLineStyle,c=i&&i.labelStatesModels,f=i&&i.emphasisDisabled,h=i&&i.focus,d=i&&i.blurScope;if(!i||t.hasItemOption){var p=t.getItemModel(n),v=p.getModel("emphasis");s=v.getModel("lineStyle").getLineStyle(),l=p.getModel(["blur","lineStyle"]).getLineStyle(),u=p.getModel(["select","lineStyle"]).getLineStyle(),f=v.get("disabled"),h=v.get("focus"),d=v.get("blurScope"),c=Tr(p)}var m=t.getItemVisual(n,"style"),g=m.stroke;o.useStyle(m),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,k(Y_,function(w){var S=this.childOfName(w);if(S){S.setColor(g),S.style.opacity=m.opacity;for(var T=0;T<mn.length;T++){var C=mn[T],A=o.getState(C);if(A){var M=A.style||{},D=S.ensureState(C),E=D.style||(D.style={});M.stroke!=null&&(E[S.__isEmptyBrush?"stroke":"fill"]=M.stroke),M.opacity!=null&&(E.opacity=M.opacity)}}S.markRedraw()}},this);var y=a.getRawValue(n);Vr(this,c,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(w,S){return a.getFormattedLabel(w,S,t.dataType)}},inheritColor:g||"#000",defaultOpacity:m.opacity,defaultText:(y==null?t.getName(n):isFinite(y)?Xt(y):y)+""});var b=this.getTextContent();if(b){var _=c.normal;b.__align=b.style.align,b.__verticalAlign=b.style.verticalAlign,b.__position=_.get("position")||"middle";var x=_.get("distance");q(x)||(x=[x,x]),b.__labelDistance=x}this.setTextConfig({position:null,local:!0,inside:!1}),$t(this,h,d,f)},e.prototype.highlight=function(){wo(this)},e.prototype.downplay=function(){So(this)},e.prototype.updateLayout=function(t,n){this.setLinePoints(t.getItemLayout(n))},e.prototype.setLinePoints=function(t){var n=this.childOfName("line");oS(n.shape,t),n.dirty()},e.prototype.beforeUpdate=function(){var t=this,n=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),a=t.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=t.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),f=l.pointAt(u),h=Ll([],f,c);mf(h,h);function d(A,M){var D=A.__specifiedRotation;if(D==null){var E=l.tangentAt(M);A.attr("rotation",(M===1?-1:1)*Math.PI/2-Math.atan2(E[1],E[0]))}else A.attr("rotation",D)}if(n&&(n.setPosition(c),d(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),i&&(i.setPosition(f),d(i,1),i.scaleX=i.scaleY=o*u,i.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var p=void 0,v=void 0,m=a.__labelDistance,g=m[0]*o,y=m[1]*o,b=u/2,_=l.tangentAt(b),x=[_[1],-_[0]],w=l.pointAt(b);x[1]>0&&(x[0]=-x[0],x[1]=-x[1]);var S=_[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var T=-Math.atan2(_[1],_[0]);f[0]<c[0]&&(T=Math.PI+T),a.rotation=T}var C=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":C=-y,v="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":C=y,v="top";break;default:C=0,v="middle"}switch(a.__position){case"end":a.x=h[0]*g+f[0],a.y=h[1]*y+f[1],p=h[0]>.8?"left":h[0]<-.8?"right":"center",v=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":a.x=-h[0]*g+c[0],a.y=-h[1]*y+c[1],p=h[0]>.8?"right":h[0]<-.8?"left":"center",v=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=g*S+c[0],a.y=c[1]+C,p=_[0]<0?"right":"left",a.originX=-g*S,a.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=w[0],a.y=w[1]+C,p="center",a.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-g*S+f[0],a.y=f[1]+C,p=_[0]>=0?"right":"left",a.originX=g*S,a.originY=-C;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||v,align:a.__align||p})}},e}(Ee),kA=function(){function r(e){this.group=new Ee,this._LineCtor=e||MA}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=e,a||i.removeAll();var o=DR(e);e.diff(a).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(a,e,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=DR(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function n(s){!s.isGroup&&!Jye(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var a=t.getItemLayout(i);if(q_(a)){var o=new this._LineCtor(t,i,this._seriesScope);o.traverse(n),this.group.add(o),t.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(e){Vs(this._progressiveEls||this.group,e)},r.prototype._doAdd=function(e,t,n){var i=e.getItemLayout(t);if(q_(i)){var a=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,a),this.group.add(a)}},r.prototype._doUpdate=function(e,t,n,i,a){var o=e.getItemGraphicEl(n);if(!q_(t.getItemLayout(i))){this.group.remove(o);return}o?o.updateData(t,i,a):o=new this._LineCtor(t,i,a),t.setItemGraphicEl(i,o),this.group.add(o)},r}();function Jye(r){return r.animators&&r.animators.length>0}function DR(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:Tr(e)}}function ER(r){return isNaN(r[0])||isNaN(r[1])}function q_(r){return r&&!ER(r[0])&&!ER(r[1])}var X_=[],K_=[],Z_=[],lc=Ar,J_=Jl,LR=Math.abs;function IR(r,e,t){for(var n=r[0],i=r[1],a=r[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){X_[0]=lc(n[0],i[0],a[0],c),X_[1]=lc(n[1],i[1],a[1],c);var f=LR(J_(X_,e)-l);f<o&&(o=f,s=c)}for(var h=0;h<32;h++){var d=s+u;K_[0]=lc(n[0],i[0],a[0],s),K_[1]=lc(n[1],i[1],a[1],s),Z_[0]=lc(n[0],i[0],a[0],d),Z_[1]=lc(n[1],i[1],a[1],d);var f=J_(K_,e)-l;if(LR(f)<.01)break;var p=J_(Z_,e)-l;u/=2,f<0?p>=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function Q_(r,e){var t=[],n=Nd,i=[[],[],[]],a=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[co(u[0]),co(u[1])],u[2]&&u.__original.push(co(u[2])));var h=u.__original;if(u[2]!=null){if(on(i[0],h[0]),on(i[1],h[2]),on(i[2],h[1]),c&&c!=="none"){var d=jh(s.node1),p=IR(i,h[0],d*e);n(i[0][0],i[1][0],i[2][0],p,t),i[0][0]=t[3],i[1][0]=t[4],n(i[0][1],i[1][1],i[2][1],p,t),i[0][1]=t[3],i[1][1]=t[4]}if(f&&f!=="none"){var d=jh(s.node2),p=IR(i,h[1],d*e);n(i[0][0],i[1][0],i[2][0],p,t),i[1][0]=t[1],i[2][0]=t[2],n(i[0][1],i[1][1],i[2][1],p,t),i[1][1]=t[1],i[2][1]=t[2]}on(u[0],i[0]),on(u[1],i[2]),on(u[2],i[1])}else{if(on(a[0],h[0]),on(a[1],h[1]),Ll(o,a[1],a[0]),mf(o,o),c&&c!=="none"){var d=jh(s.node1);Ww(a[0],a[0],o,d*e)}if(f&&f!=="none"){var d=jh(s.node2);Ww(a[1],a[1],o,-d*e)}on(u[0],a[0]),on(u[1],a[1])}})}function PR(r){return r.type==="view"}var Qye=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){var i=new Rp,a=new kA,o=this.group;this._controller=new zp(n.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(a.group),this._symbolDraw=i,this._lineDraw=a,this._firstRender=!0},e.prototype.render=function(t,n,i){var a=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(PR(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(c):ut(u,c,t)}Q_(t.getGraph(),Oh(t));var f=t.getData();s.updateData(f);var h=t.getEdgeData();l.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,n,i),clearTimeout(this._layoutTimeout);var d=t.forceLayout,p=t.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,p);var v=t.get("layout");f.graph.eachNode(function(b){var _=b.dataIndex,x=b.getGraphicEl(),w=b.getModel();if(x){x.off("drag").off("dragend");var S=w.get("draggable");S&&x.on("drag",function(C){switch(v){case"force":d.warmUp(),!a._layouting&&a._startForceLayoutIteration(d,p),d.setFixed(_),f.setItemLayout(_,[x.x,x.y]);break;case"circular":f.setItemLayout(_,[x.x,x.y]),b.setLayout({fixed:!0},!0),AA(t,"symbolSize",b,[C.offsetX,C.offsetY]),a.updateLayout(t);break;case"none":default:f.setItemLayout(_,[x.x,x.y]),CA(t.getGraph(),t),a.updateLayout(t);break}}).on("dragend",function(){d&&d.setUnfixed(_)}),x.setDraggable(S,!!w.get("cursor"));var T=w.get(["emphasis","focus"]);T==="adjacency"&&(Le(x).focus=b.getAdjacentDataIndices())}}),f.graph.eachEdge(function(b){var _=b.getGraphicEl(),x=b.getModel().get(["emphasis","focus"]);_&&x==="adjacency"&&(Le(_).focus={edge:[b.dataIndex],node:[b.node1.dataIndex,b.node2.dataIndex]})});var m=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),g=f.getLayout("cx"),y=f.getLayout("cy");f.graph.eachNode(function(b){v$(b,m,g,y)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,n){var i=this;(function a(){t.step(function(o){i.updateLayout(i._model),(i._layouting=!o)&&(n?i._layoutTimeout=setTimeout(a,16):a())})})()},e.prototype._updateController=function(t,n,i){var a=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,c,f){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,f)&&!h1(u,i,t)}),!PR(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){mA(s,u.dx,u.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){gA(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(),Q_(t.getGraph(),Oh(t)),a._lineDraw.updateLayout(),i.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,n=t.getData(),i=Oh(t);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},e.prototype.updateLayout=function(t){Q_(t.getGraph(),Oh(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(St);function uc(r){return"_EC_"+r}var e0e=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var n=this._nodesMap;if(!n[uc(e)]){var i=new _l(e,t);return i.hostGraph=this,this.nodes.push(i),n[uc(e)]=i,i}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[uc(e)]},r.prototype.addEdge=function(e,t,n){var i=this._nodesMap,a=this._edgesMap;if(lt(e)&&(e=this.nodes[e]),lt(t)&&(t=this.nodes[t]),e instanceof _l||(e=i[uc(e)]),t instanceof _l||(t=i[uc(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new g$(e,t,n);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),a[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof _l&&(e=e.id),t instanceof _l&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var n=this.nodes,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&e.call(t,n[a],a)},r.prototype.eachEdge=function(e,t){for(var n=this.edges,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&e.call(t,n[a],a)},r.prototype.breadthFirstTraverse=function(e,t,n,i){if(t instanceof _l||(t=this._nodesMap[uc(t)]),!!t){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(i,t,null))for(var s=[t];s.length;)for(var l=s.shift(),u=l[a],o=0;o<u.length;o++){var c=u[o],f=c.node1===l?c.node2:c.node1;if(!f.__visited){if(e.call(i,f,l))return;s.push(f),f.__visited=!0}}}},r.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,i=this.edges,a=0,o=n.length;a<o;a++)n[a].dataIndex=-1;for(var a=0,o=e.count();a<o;a++)n[e.getRawIndex(a)].dataIndex=a;t.filterSelf(function(s){var l=i[t.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a<o;a++)i[a].dataIndex=-1;for(var a=0,o=t.count();a<o;a++)i[t.getRawIndex(a)].dataIndex=a},r.prototype.clone=function(){for(var e=new r(this._directed),t=this.nodes,n=this.edges,i=0;i<t.length;i++)e.addNode(t[i].id,t[i].dataIndex);for(var i=0;i<n.length;i++){var a=n[i];e.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return e},r}(),_l=function(){function r(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??"",this.dataIndex=t??-1}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},r.prototype.getTrajectoryDataIndices=function(){for(var e=ve(),t=ve(),n=0;n<this.edges.length;n++){var i=this.edges[n];if(!(i.dataIndex<0)){e.set(i.dataIndex,!0);for(var a=[i.node1],o=[i.node2],s=0;s<a.length;){var l=a[s];s++,t.set(l.dataIndex,!0);for(var u=0;u<l.inEdges.length;u++)e.set(l.inEdges[u].dataIndex,!0),a.push(l.inEdges[u].node1)}for(s=0;s<o.length;){var c=o[s];s++,t.set(c.dataIndex,!0);for(var u=0;u<c.outEdges.length;u++)e.set(c.outEdges[u].dataIndex,!0),o.push(c.outEdges[u].node2)}}}return{edge:e.keys(),node:t.keys()}},r}(),g$=function(){function r(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,n=t.edgeData.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var e=ve(),t=ve();e.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],a=0;a<n.length;){var o=n[a];a++,t.set(o.dataIndex,!0);for(var s=0;s<o.inEdges.length;s++)e.set(o.inEdges[s].dataIndex,!0),n.push(o.inEdges[s].node1)}for(a=0;a<i.length;){var l=i[a];a++,t.set(l.dataIndex,!0);for(var s=0;s<l.outEdges.length;s++)e.set(l.outEdges[s].dataIndex,!0),i.push(l.outEdges[s].node2)}return{edge:e.keys(),node:t.keys()}},r}();function y$(r,e){return{getValue:function(t){var n=this[r][e];return n.getStore().get(n.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,n){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,n)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,n){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,n)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}cr(_l,y$("hostGraph","data"));cr(g$,y$("hostGraph","edgeData"));function b$(r,e,t,n,i){for(var a=new e0e(n),o=0;o<r.length;o++)a.addNode(kr(r[o].id,r[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var c=e[o],f=c.source,h=c.target;a.addEdge(f,h,u)&&(l.push(c),s.push(kr(vr(c.id,null),f+" > "+h)),u++)}var d=t.get("coordinateSystem"),p;if(d==="cartesian2d"||d==="polar")p=Lo(r,t);else{var v=Dp.get(d),m=v?v.dimensions||[]:[];He(m,"value")<0&&m.concat(["value"]);var g=Lp(r,{coordDimensions:m,encodeDefine:t.getEncode()}).dimensions;p=new fn(g,t),p.initData(r)}var y=new fn(["value"],t);return y.initData(l,s),i&&i(p,y),e$({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var t0e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new Bp(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),pu(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,n){var i=t.edges||t.links||[],a=t.data||t.nodes||[],o=this;if(a&&i){Vye(this);var s=b$(a,i,this,!0,l);return k(s.edges,function(u){$ye(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var v=o._categoriesModels,m=p.getShallow("category"),g=v[m];return g&&(g.parentModel=p.parentModel,p.parentModel=g),p});var f=_t.prototype.getModel;function h(p,v){var m=f.call(this,p,v);return m.resolveParentPath=d,m}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=d,p.getModel=h,p});function d(p){if(p&&(p[0]==="label"||p[1]==="label")){var v=p.slice();return p[0]==="label"?v[0]="edgeLabel":p[1]==="label"&&(v[1]="edgeLabel"),v}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(t,i),s=a.graph.getEdgeByIndex(t),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Cr("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=W6({series:this,dataIndex:t,multipleSeries:n});return f},e.prototype._updateCategoriesData=function(){var t=K(this.option.categories||[],function(i){return i.value!=null?i:W({value:0},i)}),n=new fn(["value"],this);n.initData(t),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(It),r0e={type:"graphRoam",event:"graphRoam",update:"none"};function n0e(r){r.registerChartView(Qye),r.registerSeriesModel(t0e),r.registerProcessor(jye),r.registerVisual(Nye),r.registerVisual(Bye),r.registerLayout(Hye),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,Wye),r.registerLayout(Yye),r.registerCoordinateSystem("graphView",{dimensions:Fp.dimensions,create:Xye}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},tr),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},tr),r.registerAction(r0e,function(e,t,n){t.eachComponent({mainType:"series",query:e},function(i){var a=i.coordinateSystem,o=bA(a,e,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}var i0e=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),a0e=function(r){z(e,r);function e(t){var n=r.call(this,t)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new i0e},e.prototype.buildPath=function(t,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(n.x+i(l)*s,n.y+a(l)*s),t.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),t.lineTo(n.x-i(l)*s,n.y-a(l)*s),t.lineTo(u,c)},e}(Xe);function o0e(r,e){var t=r.get("center"),n=e.getWidth(),i=e.getHeight(),a=Math.min(n,i),o=ie(t[0],e.getWidth()),s=ie(t[1],e.getHeight()),l=ie(r.get("radius"),a/2);return{cx:o,cy:s,r:l}}function am(r,e){var t=r==null?"":r+"";return e&&(se(e)?t=e.replace("{value}",t):Te(e)&&(t=e(r))),t}var s0e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){this.group.removeAll();var a=t.get(["axisLine","lineStyle","color"]),o=o0e(t,i);this._renderMain(t,n,i,a,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,n,i,a,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,f=t.getModel("axisLine"),h=f.get("roundCap"),d=h?Ny:gn,p=f.get("show"),v=f.getModel("lineStyle"),m=v.get("width"),g=[u,c];wC(g,!l),u=g[0],c=g[1];for(var y=c-u,b=u,_=[],x=0;p&&x<a.length;x++){var w=Math.min(Math.max(a[x][0],0),1);c=u+y*w;var S=new d({shape:{startAngle:b,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-m,r:o.r},silent:!0});S.setStyle({fill:a[x][1]}),S.setStyle(v.getLineStyle(["color","width"])),_.push(S),b=c}_.reverse(),k(_,function(C){return s.add(C)});var T=function(C){if(C<=0)return a[0][1];var A;for(A=0;A<a.length;A++)if(a[A][0]>=C&&(A===0?0:a[A-1][0])<C)return a[A][1];return a[A-1][1]};this._renderTicks(t,n,i,T,o,u,c,l,m),this._renderTitleAndDetail(t,n,i,T,o),this._renderAnchor(t,o),this._renderPointer(t,n,i,T,o,u,c,l,m)},e.prototype._renderTicks=function(t,n,i,a,o,s,l,u,c){for(var f=this.group,h=o.cx,d=o.cy,p=o.r,v=+t.get("min"),m=+t.get("max"),g=t.getModel("splitLine"),y=t.getModel("axisTick"),b=t.getModel("axisLabel"),_=t.get("splitNumber"),x=y.get("splitNumber"),w=ie(g.get("length"),p),S=ie(y.get("length"),p),T=s,C=(l-s)/_,A=C/x,M=g.getModel("lineStyle").getLineStyle(),D=y.getModel("lineStyle").getLineStyle(),E=g.get("distance"),L,I,R=0;R<=_;R++){if(L=Math.cos(T),I=Math.sin(T),g.get("show")){var P=E?E+c:c,O=new xr({shape:{x1:L*(p-P)+h,y1:I*(p-P)+d,x2:L*(p-w-P)+h,y2:I*(p-w-P)+d},style:M,silent:!0});M.stroke==="auto"&&O.setStyle({stroke:a(R/_)}),f.add(O)}if(b.get("show")){var P=b.get("distance")+E,j=am(Xt(R/_*(m-v)+v),b.get("formatter")),F=a(R/_),N=L*(p-w-P)+h,B=I*(p-w-P)+d,$=b.get("rotate"),J=0;$==="radial"?(J=-T+2*Math.PI,J>Math.PI/2&&(J+=Math.PI)):$==="tangential"?J=-T-Math.PI/2:lt($)&&(J=$*Math.PI/180),J===0?f.add(new ot({style:Et(b,{text:j,x:N,y:B,verticalAlign:I<-.8?"top":I>.8?"bottom":"middle",align:L<-.4?"left":L>.4?"right":"center"},{inheritColor:F}),silent:!0})):f.add(new ot({style:Et(b,{text:j,x:N,y:B,verticalAlign:"middle",align:"center"},{inheritColor:F}),silent:!0,originX:N,originY:B,rotation:J}))}if(y.get("show")&&R!==_){var P=y.get("distance");P=P?P+c:c;for(var U=0;U<=x;U++){L=Math.cos(T),I=Math.sin(T);var we=new xr({shape:{x1:L*(p-P)+h,y1:I*(p-P)+d,x2:L*(p-S-P)+h,y2:I*(p-S-P)+d},silent:!0,style:D});D.stroke==="auto"&&we.setStyle({stroke:a((R+U/x)/_)}),f.add(we),T+=A}T-=A}else T+=C}},e.prototype._renderPointer=function(t,n,i,a,o,s,l,u,c){var f=this.group,h=this._data,d=this._progressEls,p=[],v=t.get(["pointer","show"]),m=t.getModel("progress"),g=m.get("show"),y=t.getData(),b=y.mapDimension("value"),_=+t.get("min"),x=+t.get("max"),w=[_,x],S=[s,l];function T(A,M){var D=y.getItemModel(A),E=D.getModel("pointer"),L=ie(E.get("width"),o.r),I=ie(E.get("length"),o.r),R=t.get(["pointer","icon"]),P=E.get("offsetCenter"),O=ie(P[0],o.r),j=ie(P[1],o.r),F=E.get("keepAspect"),N;return R?N=ur(R,O-L/2,j-I,L,I,null,F):N=new a0e({shape:{angle:-Math.PI/2,width:L,r:I,x:O,y:j}}),N.rotation=-(M+Math.PI/2),N.x=o.cx,N.y=o.cy,N}function C(A,M){var D=m.get("roundCap"),E=D?Ny:gn,L=m.get("overlap"),I=L?m.get("width"):c/y.count(),R=L?o.r-I:o.r-(A+1)*I,P=L?o.r:o.r-A*I,O=new E({shape:{startAngle:s,endAngle:M,cx:o.cx,cy:o.cy,clockwise:u,r0:R,r:P}});return L&&(O.z2=bt(y.get(b,A),[_,x],[100,0],!0)),O}(g||v)&&(y.diff(h).add(function(A){var M=y.get(b,A);if(v){var D=T(A,s);Ot(D,{rotation:-((isNaN(+M)?S[0]:bt(M,w,S,!0))+Math.PI/2)},t),f.add(D),y.setItemGraphicEl(A,D)}if(g){var E=C(A,s),L=m.get("clip");Ot(E,{shape:{endAngle:bt(M,w,S,L)}},t),f.add(E),g2(t.seriesIndex,y.dataType,A,E),p[A]=E}}).update(function(A,M){var D=y.get(b,A);if(v){var E=h.getItemGraphicEl(M),L=E?E.rotation:s,I=T(A,L);I.rotation=L,ut(I,{rotation:-((isNaN(+D)?S[0]:bt(D,w,S,!0))+Math.PI/2)},t),f.add(I),y.setItemGraphicEl(A,I)}if(g){var R=d[M],P=R?R.shape.endAngle:s,O=C(A,P),j=m.get("clip");ut(O,{shape:{endAngle:bt(D,w,S,j)}},t),f.add(O),g2(t.seriesIndex,y.dataType,A,O),p[A]=O}}).execute(),y.each(function(A){var M=y.getItemModel(A),D=M.getModel("emphasis"),E=D.get("focus"),L=D.get("blurScope"),I=D.get("disabled");if(v){var R=y.getItemGraphicEl(A),P=y.getItemVisual(A,"style"),O=P.fill;if(R instanceof Lr){var j=R.style;R.useStyle(W({image:j.image,x:j.x,y:j.y,width:j.width,height:j.height},P))}else R.useStyle(P),R.type!=="pointer"&&R.setColor(O);R.setStyle(M.getModel(["pointer","itemStyle"]).getItemStyle()),R.style.fill==="auto"&&R.setStyle("fill",a(bt(y.get(b,A),w,[0,1],!0))),R.z2EmphasisLift=0,Fr(R,M),$t(R,E,L,I)}if(g){var F=p[A];F.useStyle(y.getItemVisual(A,"style")),F.setStyle(M.getModel(["progress","itemStyle"]).getItemStyle()),F.z2EmphasisLift=0,Fr(F,M),$t(F,E,L,I)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,n){var i=t.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=ur(s,n.cx-o/2+ie(l[0],n.r),n.cy-o/2+ie(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,n,i,a,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),f=+t.get("max"),h=new Ee,d=[],p=[],v=t.isAnimationEnabled(),m=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(g){d[g]=new ot({silent:!0}),p[g]=new ot({silent:!0})}).update(function(g,y){d[g]=s._titleEls[y],p[g]=s._detailEls[y]}).execute(),l.each(function(g){var y=l.getItemModel(g),b=l.get(u,g),_=new Ee,x=a(bt(b,[c,f],[0,1],!0)),w=y.getModel("title");if(w.get("show")){var S=w.get("offsetCenter"),T=o.cx+ie(S[0],o.r),C=o.cy+ie(S[1],o.r),A=d[g];A.attr({z2:m?0:2,style:Et(w,{x:T,y:C,text:l.getName(g),align:"center",verticalAlign:"middle"},{inheritColor:x})}),_.add(A)}var M=y.getModel("detail");if(M.get("show")){var D=M.get("offsetCenter"),E=o.cx+ie(D[0],o.r),L=o.cy+ie(D[1],o.r),I=ie(M.get("width"),o.r),R=ie(M.get("height"),o.r),P=t.get(["progress","show"])?l.getItemVisual(g,"style").fill:x,A=p[g],O=M.get("formatter");A.attr({z2:m?0:2,style:Et(M,{x:E,y:L,text:am(b,O),width:isNaN(I)?null:I,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:P})}),Xz(A,{normal:M},b,function(F){return am(F,O)}),v&&Kz(A,g,l,t,{getFormattedLabel:function(F,N,B,$,J,U){return am(U?U.interpolatedValue:b,O)}}),_.add(A)}h.add(_)}),this.group.add(h),this._titleEls=d,this._detailEls=p},e.type="gauge",e}(St),l0e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,n){return Ef(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(It);function u0e(r){r.registerChartView(s0e),r.registerSeriesModel(l0e)}var c0e=["itemStyle","opacity"],f0e=function(r){z(e,r);function e(t,n){var i=r.call(this)||this,a=i,o=new bn,s=new ot;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(t,n,!0),i}return e.prototype.updateData=function(t,n,i){var a=this,o=t.hostModel,s=t.getItemModel(n),l=t.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(c0e);c=c??1,i||Bi(a),a.useStyle(t.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,Ot(a,{style:{opacity:c}},o,n)):ut(a,{style:{opacity:c},shape:{points:l.points}},o,n),Fr(a,s),this._updateLabel(t,n),$t(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=t.hostModel,l=t.getItemModel(n),u=t.getItemLayout(n),c=u.label,f=t.getItemVisual(n,"style"),h=f.fill;Vr(o,Tr(l),{labelFetcher:t.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:t.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}}),i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:h,outsideFill:h});var d=c.linePoints;a.setShape({points:d}),i.textGuideLineConfig={anchor:d?new ze(d[0][0],d[0][1]):null},ut(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),aA(i,oA(l),{stroke:h})},e}(yn),h0e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,i){var a=t.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new f0e(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);Gd(u,t,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(St),d0e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Bp(ue(this.getData,this),ue(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,n){return Ef(this,{coordDimensions:["value"],encodeDefaulter:Oe(zC,this)})},e.prototype._defaultLabelLine=function(t){pu(t,"labelLine",["show"]);var n=t.labelLine,i=t.emphasis.labelLine;n.show=n.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var n=this.getData(),i=r.prototype.getDataParams.call(this,t),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(It);function p0e(r,e){return gr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function v0e(r,e){for(var t=r.mapDimension("value"),n=r.mapArray(t,function(l){return l}),i=[],a=e==="ascending",o=0,s=r.count();o<s;o++)i[o]=o;return Te(e)?i.sort(e):e!=="none"&&i.sort(function(l,u){return a?n[l]-n[u]:n[u]-n[l]}),i}function m0e(r){var e=r.hostModel,t=e.get("orient");r.each(function(n){var i=r.getItemModel(n),a=i.getModel("label"),o=a.get("position"),s=i.getModel("labelLine"),l=r.getItemLayout(n),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",f,h,d,p;if(c)o==="insideLeft"?(h=(u[0][0]+u[3][0])/2+5,d=(u[0][1]+u[3][1])/2,f="left"):o==="insideRight"?(h=(u[1][0]+u[2][0])/2-5,d=(u[1][1]+u[2][1])/2,f="right"):(h=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,d=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,f="center"),p=[[h,d],[h,d]];else{var v=void 0,m=void 0,g=void 0,y=void 0,b=s.get("length");o==="left"?(v=(u[3][0]+u[0][0])/2,m=(u[3][1]+u[0][1])/2,g=v-b,h=g-5,f="right"):o==="right"?(v=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,g=v+b,h=g+5,f="left"):o==="top"?(v=(u[3][0]+u[0][0])/2,m=(u[3][1]+u[0][1])/2,y=m-b,d=y-5,f="center"):o==="bottom"?(v=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,y=m+b,d=y+5,f="center"):o==="rightTop"?(v=t==="horizontal"?u[3][0]:u[1][0],m=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(y=m-b,d=y-5,f="center"):(g=v+b,h=g+5,f="top")):o==="rightBottom"?(v=u[2][0],m=u[2][1],t==="horizontal"?(y=m+b,d=y+5,f="center"):(g=v+b,h=g+5,f="bottom")):o==="leftTop"?(v=u[0][0],m=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(y=m-b,d=y-5,f="center"):(g=v-b,h=g-5,f="right")):o==="leftBottom"?(v=t==="horizontal"?u[1][0]:u[3][0],m=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(y=m+b,d=y+5,f="center"):(g=v-b,h=g-5,f="right")):(v=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,t==="horizontal"?(y=m+b,d=y+5,f="center"):(g=v+b,h=g+5,f="left")),t==="horizontal"?(g=v,h=g):(y=m,d=y),p=[[v,m],[g,y]]}l.label={linePoints:p,x:h,y:d,verticalAlign:"middle",textAlign:f,inside:c}})}function g0e(r,e){r.eachSeriesByType("funnel",function(t){var n=t.getData(),i=n.mapDimension("value"),a=t.get("sort"),o=p0e(t,e),s=t.get("orient"),l=o.width,u=o.height,c=v0e(n,a),f=o.x,h=o.y,d=s==="horizontal"?[ie(t.get("minSize"),u),ie(t.get("maxSize"),u)]:[ie(t.get("minSize"),l),ie(t.get("maxSize"),l)],p=n.getDataExtent(i),v=t.get("min"),m=t.get("max");v==null&&(v=Math.min(p[0],0)),m==null&&(m=p[1]);var g=t.get("funnelAlign"),y=t.get("gap"),b=s==="horizontal"?l:u,_=(b-y*(n.count()-1))/n.count(),x=function(L,I){if(s==="horizontal"){var R=n.get(i,L)||0,P=bt(R,[v,m],d,!0),O=void 0;switch(g){case"top":O=h;break;case"center":O=h+(u-P)/2;break;case"bottom":O=h+(u-P);break}return[[I,O],[I,O+P]]}var j=n.get(i,L)||0,F=bt(j,[v,m],d,!0),N;switch(g){case"left":N=f;break;case"center":N=f+(l-F)/2;break;case"right":N=f+l-F;break}return[[N,I],[N+F,I]]};a==="ascending"&&(_=-_,y=-y,s==="horizontal"?f+=l:h+=u,c=c.reverse());for(var w=0;w<c.length;w++){var S=c[w],T=c[w+1],C=n.getItemModel(S);if(s==="horizontal"){var A=C.get(["itemStyle","width"]);A==null?A=_:(A=ie(A,l),a==="ascending"&&(A=-A));var M=x(S,f),D=x(T,f+A);f+=A+y,n.setItemLayout(S,{points:M.concat(D.slice().reverse())})}else{var E=C.get(["itemStyle","height"]);E==null?E=_:(E=ie(E,u),a==="ascending"&&(E=-E));var M=x(S,h),D=x(T,h+E);h+=E+y,n.setItemLayout(S,{points:M.concat(D.slice().reverse())})}}m0e(n)})}function y0e(r){r.registerChartView(h0e),r.registerSeriesModel(d0e),r.registerLayout(g0e),r.registerProcessor(Np("funnel"))}var b0e=.3,_0e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new Ee,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,n,i,a){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.dimensions,f=OR(t);s.diff(l).add(h).update(d).remove(p).execute();function h(m){var g=RR(s,o,m,c,u);ex(g,s,m,f)}function d(m,g){var y=l.getItemGraphicEl(g),b=_$(s,m,c,u);s.setItemGraphicEl(m,y),ut(y,{shape:{points:b}},t,m),Bi(y),ex(y,s,m,f)}function p(m){var g=l.getItemGraphicEl(m);o.remove(g)}if(!this._initialized){this._initialized=!0;var v=x0e(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(v)}this._data=s},e.prototype.incrementalPrepareRender=function(t,n,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,n,i){for(var a=n.getData(),o=n.coordinateSystem,s=o.dimensions,l=OR(n),u=this._progressiveEls=[],c=t.start;c<t.end;c++){var f=RR(a,this._dataGroup,c,s,o);f.incremental=!0,ex(f,a,c,l),u.push(f)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(St);function x0e(r,e,t){var n=r.model,i=r.getRect(),a=new nt({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),o=n.get("layout")==="horizontal"?"width":"height";return a.setShape(o,0),Ot(a,{shape:{width:i.width,height:i.height}},e,t),a}function _$(r,e,t,n){for(var i=[],a=0;a<t.length;a++){var o=t[a],s=r.get(r.mapDimension(o),e);w0e(s,n.getAxis(o).type)||i.push(n.dataToPoint(s,o))}return i}function RR(r,e,t,n,i){var a=_$(r,t,n,i),o=new bn({shape:{points:a},z2:10});return e.add(o),r.setItemGraphicEl(t,o),o}function OR(r){var e=r.get("smooth",!0);return e===!0&&(e=b0e),e=xo(e),Od(e)&&(e=0),{smooth:e}}function ex(r,e,t,n){r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.setShape("smooth",n.smooth);var i=e.getItemModel(t),a=i.getModel("emphasis");Fr(r,i,"lineStyle"),$t(r,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function w0e(r,e){return e==="category"?r==null:r==null||isNaN(r)}var S0e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,n){return Lo(null,this,{useEncodeDefaulter:ue(T0e,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var n=this.coordinateSystem,i=this.getData(),a=[];return n.eachActiveState(i,function(o,s){t===o&&a.push(i.getRawIndex(s))}),a},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(It);function T0e(r){var e=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(e){var t={};return k(e.dimensions,function(n){var i=C0e(n);t[n]=i}),t}}function C0e(r){return+r.replace("dim","")}var A0e=["lineStyle","opacity"],M0e={seriesType:"parallel",reset:function(r,e){var t=r.coordinateSystem,n={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(i,a){t.eachActiveState(a,function(o,s){var l=n[o];if(o==="normal"&&a.hasItemOption){var u=a.getItemModel(s).get(A0e,!0);u!=null&&(l=u)}var c=a.ensureUniqueItemVisual(s,"style");c.opacity=l},i.start,i.end)}}}};function k0e(r){D0e(r),E0e(r)}function D0e(r){if(!r.parallel){var e=!1;k(r.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(r.parallel=[{}])}}function E0e(r){var e=wt(r.parallelAxis);k(e,function(t){if(Me(t)){var n=t.parallelIndex||0,i=wt(r.parallel)[n];i&&i.parallelAxisDefault&&Be(t,i.parallelAxisDefault,!1)}})}var L0e=5,I0e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){this._model=t,this._api=i,this._handlers||(this._handlers={},k(P0e,function(a,o){i.getZr().on(o,this._handlers[o]=ue(a,this))},this)),Mf(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,n){qd(this,"_throttledDispatchExpand"),k(this._handlers,function(i,a){n.getZr().off(a,i)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(W({type:"parallelAxisExpand"},t))},e.type="parallel",e}(zt),P0e={mousedown:function(r){tx(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var e=this._mouseDownPoint;if(tx(this,"click")&&e){var t=[r.offsetX,r.offsetY],n=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(n>L0e)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!tx(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),n=t.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function tx(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var R0e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var n=this.option;t&&Be(n,t,!0),this._initDimensions()},e.prototype.contains=function(t,n){var i=t.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(t){k(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){t.hasOwnProperty(n)&&(this.option[n]=t[n])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],n=this.parallelAxisIndex=[],i=pt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);k(i,function(a){t.push("dim"+a.get("dim")),n.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Qe),O0e=function(r){z(e,r);function e(t,n,i,a,o){var s=r.call(this,t,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Gi);function Nu(r,e,t,n,i,a){r=r||0;var o=t[1]-t[0];if(i!=null&&(i=cc(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=cc(s,[0,o]),i=a=cc(s,[i,a]),n=0}e[0]=cc(e[0],t),e[1]=cc(e[1],t);var l=rx(e,n);e[n]+=r;var u=i||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=cc(e[n],c);var f;return f=rx(e,n),i!=null&&(f.sign!==l.sign||f.span<i)&&(e[1-n]=e[n]+l.sign*i),f=rx(e,n),a!=null&&f.span>a&&(e[1-n]=e[n]+f.sign*a),e}function rx(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function cc(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var nx=k,x$=Math.min,w$=Math.max,jR=Math.floor,j0e=Math.ceil,NR=Xt,N0e=Math.PI,B0e=function(){function r(e,t,n){this.type="parallel",this._axesMap=ve(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var i=e.dimensions,a=e.parallelAxisIndex;nx(i,function(o,s){var l=a[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new O0e(o,c1(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,i=t.layoutBase,a=t.pixelDimIndex,o=e[1-a],s=e[a];return o>=n&&o<=n+t.axisLength&&s>=i&&s<=i+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(n){if(e.contains(n,t)){var i=n.getData();nx(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),nf(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=gr(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,n=["x","y"],i=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=t[i[o]],l=[0,s],u=this.dimensions.length,c=om(e.get("axisExpandWidth"),l),f=om(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,d=e.get("axisExpandWindow"),p;if(d)p=om(d[1]-d[0],l),d[1]=d[0]+p;else{p=om(c*(f-1),l);var v=e.get("axisExpandCenter")||jR(u/2);d=[c*v-p/2],d[1]=d[0]+p}var m=(s-p)/(u-f);m<3&&(m=0);var g=[jR(NR(d[0]/c,1))+1,j0e(NR(d[1]/c,1))-1],y=m/c*d[0];return{layout:a,pixelDimIndex:o,layoutBase:t[n[o]],layoutLength:s,axisBase:t[n[1-o]],axisLength:t[i[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:m,axisExpandWindow:d,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:y}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;t.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),nx(n,function(o,s){var l=(i.axisExpandable?F0e:z0e)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:N0e/2,vertical:0},f=[u[a].x+e.x,u[a].y+e.y],h=c[a],d=zn();Eu(d,d,h),La(d,d,f),this._axesLayout[o]={position:f,rotation:h,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,n,i){n==null&&(n=0),i==null&&(i=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];k(o,function(m){s.push(e.mapDimension(m)),l.push(a.get(m).model)});for(var u=this.hasAxisBrushed(),c=n;c<i;c++){var f=void 0;if(!u)f="normal";else{f="active";for(var h=e.getValues(s,c),d=0,p=o.length;d<p;d++){var v=l[d].getActiveState(h[d]);if(v==="inactive"){f="inactive";break}}}t(f,c)}},r.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,n=!1,i=0,a=e.length;i<a;i++)t.get(e[i]).model.getActiveState()!=="normal"&&(n=!0);return n},r.prototype.axisCoordToPoint=function(e,t){var n=this._axesLayout[t];return Ri([e,0],n.transform)},r.prototype.getAxisLayout=function(e){return ke(this._axesLayout[e])},r.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,i=t.axisExpandWindow.slice(),a=i[1]-i[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:i};var s=e[n]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",c=t.axisCollapseWidth,f=this._model.get("axisExpandSlideTriggerArea"),h=f[0]!=null;if(c)h&&c&&s<a*f[0]?(u="jump",l=s-a*f[2]):h&&c&&s>a*(1-f[0])?(u="jump",l=s-a*(1-f[2])):(l=s-a*f[1])>=0&&(l=s-a*(1-f[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?Nu(l,i,o,"all"):u="none";else{var d=i[1]-i[0],p=o[1]*s/d;i=[w$(0,p-d/2)],i[1]=x$(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},r}();function om(r,e){return x$(w$(r,e[0]),e[1])}function z0e(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function F0e(r,e){var t=e.layoutLength,n=e.axisExpandWidth,i=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,c;return r<o[0]?(s=r*a,c=a):r<=o[1]?(s=e.axisExpandWindow0Pos+r*n-e.axisExpandWindow[0],l=n,u=!0):(s=t-(i-1-r)*a,c=a),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}function V0e(r,e){var t=[];return r.eachComponent("parallel",function(n,i){var a=new B0e(n,r,e);a.name="parallel_"+i,a.resize(n,e),n.coordinateSystem=a,a.model=n,t.push(a)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="parallel"){var i=n.getReferringComponents("parallel",lr).models[0];n.coordinateSystem=i.coordinateSystem}}),t}var $0e={create:V0e},sS=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.activeIntervals=[],t}return e.prototype.getAreaSelectStyle=function(){return mu([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var n=this.activeIntervals=ke(t);if(n)for(var i=n.length-1;i>=0;i--)ci(n[i])},e.prototype.getActiveState=function(t){var n=this.activeIntervals;if(!n.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var a=0,o=n.length;a<o;a++)if(n[a][0]<=t&&t<=n[a][1])return"active";return"inactive"},e}(Qe);cr(sS,Ip);var bu=!0,op=Math.min,sf=Math.max,H0e=Math.pow,G0e=1e4,W0e=6,U0e=6,BR="globalPan",Y0e={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},q0e={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},zR={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},X0e=0,DA=function(r){z(e,r);function e(t){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new Ee,n._uid="brushController_"+X0e++,k(r1e,function(i,a){this._handlers[a]=ue(i,this)},n),n}return e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var n=this._zr;this._enableGlobalPan||zme(n,BR,this._uid),k(this._handlers,function(i,a){n.on(a,i)}),this._brushType=t.brushType,this._brushOption=Be(ke(zR),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;Fme(t,BR,this._uid),k(this._handlers,function(n,i){t.off(i,n)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var n=this._panels={};k(t,function(i){n[i.panelId]=ke(i)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=n.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=K(t,function(h){return Be(ke(zR),h,!0)});var n="\0-brush-index-",i=this._covers,a=this._covers=[],o=this,s=this._creatingCover;return new To(i,t,u,l).add(c).update(c).remove(f).execute(),this;function l(h,d){return(h.id!=null?h.id:n+d)+"-"+h.brushType}function u(h,d){return l(h.__brushOption,d)}function c(h,d){var p=t[h];if(d!=null&&i[d]===s)a[h]=i[d];else{var v=a[h]=d!=null?(i[d].__brushOption=p,i[d]):T$(o,S$(o,p));EA(o,v)}}function f(h){i[h]!==s&&o.group.remove(i[h])}},e.prototype.unmount=function(){return this.enableBrush(!1),lS(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(gi);function S$(r,e){var t=m1[e.brushType].createCover(r,e);return t.__brushOption=e,A$(t,e),r.group.add(t),t}function T$(r,e){var t=LA(e);return t.endCreating&&(t.endCreating(r,e),A$(e,e.__brushOption)),e}function C$(r,e){var t=e.__brushOption;LA(e).updateCoverShape(r,e,t.range,t)}function A$(r,e){var t=e.z;t==null&&(t=G0e),r.traverse(function(n){n.z=t,n.z2=t})}function EA(r,e){LA(e).updateCommon(r,e),C$(r,e)}function LA(r){return m1[r.__brushOption.brushType]}function IA(r,e,t){var n=r._panels;if(!n)return bu;var i,a=r._transform;return k(n,function(o){o.isTargetByCursor(e,t,a)&&(i=o)}),i}function M$(r,e){var t=r._panels;if(!t)return bu;var n=e.__brushOption.panelId;return n!=null?t[n]:bu}function lS(r){var e=r._covers,t=e.length;return k(e,function(n){r.group.remove(n)},r),e.length=0,!!t}function _u(r,e){var t=K(r._covers,function(n){var i=n.__brushOption,a=ke(i.range);return{brushType:i.brushType,panelId:i.panelId,range:a}});r.trigger("brush",{areas:t,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function K0e(r){var e=r._track;if(!e.length)return!1;var t=e[e.length-1],n=e[0],i=t[0]-n[0],a=t[1]-n[1],o=H0e(i*i+a*a,.5);return o>W0e}function k$(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function D$(r,e,t,n){var i=new Ee;return i.add(new nt({name:"main",style:PA(t),silent:!0,draggable:!0,cursor:"move",drift:Oe(FR,r,e,i,["n","s","w","e"]),ondragend:Oe(_u,e,{isEnd:!0})})),k(n,function(a){i.add(new nt({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Oe(FR,r,e,i,a),ondragend:Oe(_u,e,{isEnd:!0})}))}),i}function E$(r,e,t,n){var i=n.brushStyle.lineWidth||0,a=sf(i,U0e),o=t[0][0],s=t[1][0],l=o-i/2,u=s-i/2,c=t[0][1],f=t[1][1],h=c-a+i/2,d=f-a+i/2,p=c-o,v=f-s,m=p+i,g=v+i;Xa(r,e,"main",o,s,p,v),n.transformable&&(Xa(r,e,"w",l,u,a,g),Xa(r,e,"e",h,u,a,g),Xa(r,e,"n",l,u,m,a),Xa(r,e,"s",l,d,m,a),Xa(r,e,"nw",l,u,a,a),Xa(r,e,"ne",h,u,a,a),Xa(r,e,"sw",l,d,a,a),Xa(r,e,"se",h,d,a,a))}function uS(r,e){var t=e.__brushOption,n=t.transformable,i=e.childAt(0);i.useStyle(PA(t)),i.attr({silent:!n,cursor:n?"move":"default"}),k([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?cS(r,a[0]):J0e(r,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?q0e[s]+"-resize":null})})}function Xa(r,e,t,n,i,a,o){var s=e.childOfName(t);s&&s.setShape(e1e(RA(r,e,[[n,i],[n+a,i+o]])))}function PA(r){return Ce({strokeNoScale:!0},r.brushStyle)}function L$(r,e,t,n){var i=[op(r,t),op(e,n)],a=[sf(r,t),sf(e,n)];return[[i[0],a[0]],[i[1],a[1]]]}function Z0e(r){return nu(r.group)}function cS(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=q0(t[e],Z0e(r));return n[i]}function J0e(r,e){var t=[cS(r,e[0]),cS(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function FR(r,e,t,n,i,a){var o=t.__brushOption,s=r.toRectRange(o.range),l=I$(e,i,a);k(n,function(u){var c=Y0e[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(L$(s[0][0],s[1][0],s[0][1],s[1][1])),EA(e,t),_u(e,{isEnd:!1})}function Q0e(r,e,t,n){var i=e.__brushOption.range,a=I$(r,t,n);k(i,function(o){o[0]+=a[0],o[1]+=a[1]}),EA(r,e),_u(r,{isEnd:!1})}function I$(r,e,t){var n=r.group,i=n.transformCoordToLocal(e,t),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function RA(r,e,t){var n=M$(r,e);return n&&n!==bu?n.clipPath(t,r._transform):ke(t)}function e1e(r){var e=op(r[0][0],r[1][0]),t=op(r[0][1],r[1][1]),n=sf(r[0][0],r[1][0]),i=sf(r[0][1],r[1][1]);return{x:e,y:t,width:n-e,height:i-t}}function t1e(r,e,t){if(!(!r._brushType||n1e(r,e.offsetX,e.offsetY))){var n=r._zr,i=r._covers,a=IA(r,e,t);if(!r._dragging)for(var o=0;o<i.length;o++){var s=i[o].__brushOption;if(a&&(a===bu||s.panelId===a.panelId)&&m1[s.brushType].contain(i[o],t[0],t[1]))return}a&&n.setCursorStyle("crosshair")}}function fS(r){var e=r.event;e.preventDefault&&e.preventDefault()}function hS(r,e,t){return r.childOfName("main").contain(e,t)}function P$(r,e,t,n){var i=r._creatingCover,a=r._creatingPanel,o=r._brushOption,s;if(r._track.push(t.slice()),K0e(r)||i){if(a&&!i){o.brushMode==="single"&&lS(r);var l=ke(o);l.brushType=VR(l.brushType,a),l.panelId=a===bu?null:a.panelId,i=r._creatingCover=S$(r,l),r._covers.push(i)}if(i){var u=m1[VR(r._brushType,a)],c=i.__brushOption;c.range=u.getCreatingRange(RA(r,i,r._track)),n&&(T$(r,i),u.updateCommon(r,i)),C$(r,i),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&IA(r,e,t)&&lS(r)&&(s={isEnd:n,removeOnClick:!0});return s}function VR(r,e){return r==="auto"?e.defaultBrushType:r}var r1e={mousedown:function(r){if(this._dragging)$R(this,r);else if(!r.target||!r.target.draggable){fS(r);var e=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var t=this._creatingPanel=IA(this,r,e);t&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(r){var e=r.offsetX,t=r.offsetY,n=this.group.transformCoordToLocal(e,t);if(t1e(this,r,n),this._dragging){fS(r);var i=P$(this,r,n,!1);i&&_u(this,i)}},mouseup:function(r){$R(this,r)}};function $R(r,e){if(r._dragging){fS(e);var t=e.offsetX,n=e.offsetY,i=r.group.transformCoordToLocal(t,n),a=P$(r,e,i,!0);r._dragging=!1,r._track=[],r._creatingCover=null,a&&_u(r,a)}}function n1e(r,e,t){var n=r._zr;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var m1={lineX:HR(0),lineY:HR(1),rect:{createCover:function(r,e){function t(n){return n}return D$({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=k$(r);return L$(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,n){E$(r,e,t,n)},updateCommon:uS,contain:hS},polygon:{createCover:function(r,e){var t=new Ee;return t.add(new bn({name:"main",style:PA(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new yn({name:"main",draggable:!0,drift:Oe(Q0e,r,e),ondragend:Oe(_u,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,n){e.childAt(0).setShape({points:RA(r,e,t)})},updateCommon:uS,contain:hS}};function HR(r){return{createCover:function(e,t){return D$({toRectRange:function(n){var i=[n,[0,100]];return r&&i.reverse(),i},fromRectRange:function(n){return n[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=k$(e),n=op(t[0][r],t[1][r]),i=sf(t[0][r],t[1][r]);return[n,i]},updateCoverShape:function(e,t,n,i){var a,o=M$(e,t);if(o!==bu&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(r);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,a];r&&l.reverse(),E$(e,t,l,i)},updateCommon:uS,contain:hS}}function R$(r){return r=OA(r),function(e){return Uz(e,r)}}function O$(r,e){return r=OA(r),function(t){var n=e??t,i=n?r.width:r.height,a=n?r.x:r.y;return[a,a+(i||0)]}}function j$(r,e,t){var n=OA(r);return function(i,a){return n.contain(a[0],a[1])&&!h1(i,e,t)}}function OA(r){return Ve.create(r)}var i1e=["axisLine","axisTickLabel","axisName"],a1e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){r.prototype.init.apply(this,arguments),(this._brushController=new DA(n.getZr())).on("brush",ue(this._onBrush,this))},e.prototype.render=function(t,n,i,a){if(!o1e(t,n,a)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Ee,this.group.add(this._axisGroup),!!t.get("show")){var s=l1e(t,n),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,f=t.axis.dim,h=l.getAxisLayout(f),d=W({strokeContainThreshold:c},h),p=new hn(t,d);k(i1e,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(d,u,t,s,c,i),Mp(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=Ve.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:R$(f),isTargetByCursor:j$(f,s,a),getLinearBrushOtherExtent:O$(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(s1e(i))},e.prototype._onBrush=function(t){var n=t.areas,i=this.axisModel,a=i.axis,o=K(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(zt);function o1e(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function s1e(r){var e=r.axis;return K(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function l1e(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var u1e={type:"axisAreaSelect",event:"axisAreaSelected"};function c1e(r){r.registerAction(u1e,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var f1e={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function N$(r){r.registerComponentView(I0e),r.registerComponentModel(R0e),r.registerCoordinateSystem("parallel",$0e),r.registerPreprocessor(k0e),r.registerComponentModel(sS),r.registerComponentView(a1e),of(r,"parallel",sS,f1e),c1e(r)}function h1e(r){Ue(N$),r.registerChartView(_0e),r.registerSeriesModel(S0e),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,M0e)}var d1e=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),p1e=function(r){z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new d1e},e.prototype.buildPath=function(t,n){var i=n.extent;t.moveTo(n.x1,n.y1),t.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(t.lineTo(n.x2+i,n.y2),t.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(t.lineTo(n.x2,n.y2+i),t.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),t.closePath()},e.prototype.highlight=function(){wo(this)},e.prototype.downplay=function(){So(this)},e}(Xe),v1e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,n,i){var a=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,c=l.height,f=t.getData(),h=t.getData("edge"),d=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var v=new p1e,m=Le(v);m.dataIndex=p.dataIndex,m.seriesIndex=t.seriesIndex,m.dataType="edge";var g=p.getModel(),y=g.getModel("lineStyle"),b=y.get("curveness"),_=p.node1.getLayout(),x=p.node1.getModel(),w=x.get("localX"),S=x.get("localY"),T=p.node2.getLayout(),C=p.node2.getModel(),A=C.get("localX"),M=C.get("localY"),D=p.getLayout(),E,L,I,R,P,O,j,F;v.shape.extent=Math.max(1,D.dy),v.shape.orient=d,d==="vertical"?(E=(w!=null?w*u:_.x)+D.sy,L=(S!=null?S*c:_.y)+_.dy,I=(A!=null?A*u:T.x)+D.ty,R=M!=null?M*c:T.y,P=E,O=L*(1-b)+R*b,j=I,F=L*b+R*(1-b)):(E=(w!=null?w*u:_.x)+_.dx,L=(S!=null?S*c:_.y)+D.sy,I=A!=null?A*u:T.x,R=(M!=null?M*c:T.y)+D.ty,P=E*(1-b)+I*b,O=L,j=E*b+I*(1-b),F=R),v.setShape({x1:E,y1:L,x2:I,y2:R,cpx1:P,cpy1:O,cpx2:j,cpy2:F}),v.useStyle(y.getItemStyle()),GR(v.style,d,p);var N=""+g.get("value"),B=Tr(g,"edgeLabel");Vr(v,B,{labelFetcher:{getFormattedLabel:function(U,we,Ye,ge,le,be){return t.getFormattedLabel(U,we,"edge",ge,_a(le,B.normal&&B.normal.get("formatter"),N),be)}},labelDataIndex:p.dataIndex,defaultText:N}),v.setTextConfig({position:"inside"});var $=g.getModel("emphasis");Fr(v,g,"lineStyle",function(U){var we=U.getItemStyle();return GR(we,d,p),we}),s.add(v),h.setItemGraphicEl(p.dataIndex,v);var J=$.get("focus");$t(v,J==="adjacency"?p.getAdjacentDataIndices():J==="trajectory"?p.getTrajectoryDataIndices():J,$.get("blurScope"),$.get("disabled"))}),o.eachNode(function(p){var v=p.getLayout(),m=p.getModel(),g=m.get("localX"),y=m.get("localY"),b=m.getModel("emphasis"),_=m.get(["itemStyle","borderRadius"])||0,x=new nt({shape:{x:g!=null?g*u:v.x,y:y!=null?y*c:v.y,width:v.dx,height:v.dy,r:_},style:m.getModel("itemStyle").getItemStyle(),z2:10});Vr(x,Tr(m),{labelFetcher:{getFormattedLabel:function(S,T){return t.getFormattedLabel(S,T,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),x.disableLabelAnimation=!0,x.setStyle("fill",p.getVisual("color")),x.setStyle("decal",p.getVisual("style").decal),Fr(x,m),s.add(x),f.setItemGraphicEl(p.dataIndex,x),Le(x).dataType="node";var w=b.get("focus");$t(x,w==="adjacency"?p.getAdjacentDataIndices():w==="trajectory"?p.getTrajectoryDataIndices():w,b.get("blurScope"),b.get("disabled"))}),f.eachItemGraphicEl(function(p,v){var m=f.getItemModel(v);m.get("draggable")&&(p.drift=function(g,y){a._focusAdjacencyDisabled=!0,this.shape.x+=g,this.shape.y+=y,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:f.getRawIndex(v),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){a._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(m1e(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(St);function GR(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var n=t.node1.getVisual("color"),i=t.node2.getVisual("color");se(n)&&se(i)&&(r.fill=new Ap(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function m1e(r,e,t){var n=new nt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Ot(n,{shape:{width:r.width+20}},e,t),n}var g1e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){var i=t.edges||t.links||[],a=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new _t(o[l],this,n));var u=b$(a,i,this,!0,c);return u.data;function c(f,h){f.wrapMethod("getItemModel",function(d,p){var v=d.parentModel,m=v.getData().getItemLayout(p);if(m){var g=m.depth,y=v.levelModels[g];y&&(d.parentModel=y)}return d}),h.wrapMethod("getItemModel",function(d,p){var v=d.parentModel,m=v.getGraph().getEdgeByIndex(p),g=m.node1.getLayout();if(g){var y=g.depth,b=v.levelModels[y];b&&(d.parentModel=b)}return d})}},e.prototype.setNodePosition=function(t,n){var i=this.option.data||this.option.nodes,a=i[t];a.localX=n[0],a.localY=n[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,n,i){function a(d){return isNaN(d)||d==null}if(i==="edge"){var o=this.getDataParams(t,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Cr("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(t),f=c.getLayout().value,h=this.getDataParams(t,i).data.name;return Cr("nameValue",{name:h!=null?h+"":null,value:f,noValue:a(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,n){var i=r.prototype.getDataParams.call(this,t,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(t),o=a.getLayout().value;i.value=o}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(It);function y1e(r,e){r.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),a=b1e(t,e);t.layoutInfo=a;var o=a.width,s=a.height,l=t.getGraph(),u=l.nodes,c=l.edges;x1e(u);var f=pt(u,function(v){return v.getLayout().value===0}),h=f.length!==0?0:t.get("layoutIterations"),d=t.get("orient"),p=t.get("nodeAlign");_1e(u,c,n,i,o,s,h,d,p)})}function b1e(r,e){return gr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function _1e(r,e,t,n,i,a,o,s,l){w1e(r,e,t,i,a,s,l),A1e(r,e,a,i,n,o,s),O1e(r,s)}function x1e(r){k(r,function(e){var t=xs(e.outEdges,Hy),n=xs(e.inEdges,Hy),i=e.getValue()||0,a=Math.max(t,n,i);e.setLayout({value:a},!0)})}function w1e(r,e,t,n,i,a,o){for(var s=[],l=[],u=[],c=[],f=0,h=0;h<e.length;h++)s[h]=1;for(var h=0;h<r.length;h++)l[h]=r[h].inEdges.length,l[h]===0&&u.push(r[h]);for(var d=-1;u.length;){for(var p=0;p<u.length;p++){var v=u[p],m=v.hostGraph.data.getRawDataItem(v.dataIndex),g=m.depth!=null&&m.depth>=0;g&&m.depth>d&&(d=m.depth),v.setLayout({depth:g?m.depth:f},!0),a==="vertical"?v.setLayout({dy:t},!0):v.setLayout({dx:t},!0);for(var y=0;y<v.outEdges.length;y++){var b=v.outEdges[y],_=e.indexOf(b);s[_]=0;var x=b.node2,w=r.indexOf(x);--l[w]===0&&c.indexOf(x)<0&&c.push(x)}}++f,u=c,c=[]}for(var h=0;h<s.length;h++)if(s[h]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var S=d>f-1?d:f-1;o&&o!=="left"&&S1e(r,o,a,S);var T=a==="vertical"?(i-t)/S:(n-t)/S;C1e(r,T,a)}function B$(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function S1e(r,e,t,n){if(e==="right"){for(var i=[],a=r,o=0;a.length;){for(var s=0;s<a.length;s++){var l=a[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];i.indexOf(c.node1)<0&&i.push(c.node1)}}a=i,i=[],++o}k(r,function(f){B$(f)||f.setLayout({depth:Math.max(0,n-f.getLayout().skNodeHeight)},!0)})}else e==="justify"&&T1e(r,n)}function T1e(r,e){k(r,function(t){!B$(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function C1e(r,e,t){k(r,function(n){var i=n.getLayout().depth*e;t==="vertical"?n.setLayout({y:i},!0):n.setLayout({x:i},!0)})}function A1e(r,e,t,n,i,a,o){var s=M1e(r,o);k1e(s,e,t,n,i,o),ix(s,i,t,n,o);for(var l=1;a>0;a--)l*=.99,D1e(s,l,o),ix(s,i,t,n,o),R1e(s,l,o),ix(s,i,t,n,o)}function M1e(r,e){var t=[],n=e==="vertical"?"y":"x",i=d2(r,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),k(i.keys,function(a){t.push(i.buckets.get(a))}),t}function k1e(r,e,t,n,i,a){var o=1/0;k(r,function(s){var l=s.length,u=0;k(s,function(f){u+=f.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(t-(l-1)*i)/u;c<o&&(o=c)}),k(r,function(s){k(s,function(l,u){var c=l.getLayout().value*o;a==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),k(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function ix(r,e,t,n,i){var a=i==="vertical"?"x":"y";k(r,function(o){o.sort(function(v,m){return v.getLayout()[a]-m.getLayout()[a]});for(var s,l,u,c=0,f=o.length,h=i==="vertical"?"dx":"dy",d=0;d<f;d++)l=o[d],u=c-l.getLayout()[a],u>0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[h]+e;var p=i==="vertical"?n:t;if(u=c-e-p,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var d=f-2;d>=0;--d)l=o[d],u=l.getLayout()[a]+l.getLayout()[h]+e-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function D1e(r,e,t){k(r.slice().reverse(),function(n){k(n,function(i){if(i.outEdges.length){var a=xs(i.outEdges,E1e,t)/xs(i.outEdges,Hy);if(isNaN(a)){var o=i.outEdges.length;a=o?xs(i.outEdges,L1e,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(a-Ps(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-Ps(i,t))*e;i.setLayout({y:l},!0)}}})})}function E1e(r,e){return Ps(r.node2,e)*r.getValue()}function L1e(r,e){return Ps(r.node2,e)}function I1e(r,e){return Ps(r.node1,e)*r.getValue()}function P1e(r,e){return Ps(r.node1,e)}function Ps(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Hy(r){return r.getValue()}function xs(r,e,t){for(var n=0,i=r.length,a=-1;++a<i;){var o=+e(r[a],t);isNaN(o)||(n+=o)}return n}function R1e(r,e,t){k(r,function(n){k(n,function(i){if(i.inEdges.length){var a=xs(i.inEdges,I1e,t)/xs(i.inEdges,Hy);if(isNaN(a)){var o=i.inEdges.length;a=o?xs(i.inEdges,P1e,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(a-Ps(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-Ps(i,t))*e;i.setLayout({y:l},!0)}}})})}function O1e(r,e){var t=e==="vertical"?"x":"y";k(r,function(n){n.outEdges.sort(function(i,a){return i.node2.getLayout()[t]-a.node2.getLayout()[t]}),n.inEdges.sort(function(i,a){return i.node1.getLayout()[t]-a.node1.getLayout()[t]})}),k(r,function(n){var i=0,a=0;k(n.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),k(n.inEdges,function(o){o.setLayout({ty:a},!0),a+=o.getLayout().dy})})}function j1e(r){r.eachSeriesByType("sankey",function(e){var t=e.getGraph(),n=t.nodes,i=t.edges;if(n.length){var a=1/0,o=-1/0;k(n,function(s){var l=s.getLayout().value;l<a&&(a=l),l>o&&(o=l)}),k(n,function(s){var l=new Sr({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&k(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function N1e(r){r.registerChartView(v1e),r.registerSeriesModel(g1e),r.registerLayout(y1e),r.registerVisual(j1e),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var z$=function(){function r(){}return r.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},r.prototype.getInitialData=function(e,t){var n,i=t.getComponent("xAxis",this.get("xAxisIndex")),a=t.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(e.layout="horizontal",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],h=u[1-c],d=[i,a],p=d[c].get("type"),v=d[1-c].get("type"),m=e.data;if(m&&l){var g=[];k(m,function(_,x){var w;q(_)?(w=_.slice(),_.unshift(x)):q(_.value)?(w=W({},_),w.value=w.value.slice(),_.value.unshift(x)):w=_,g.push(w)}),e.data=g}var y=this.defaultValueDimensions,b=[{name:f,type:Iy(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Iy(v),dimsDef:y.slice()}];return Ef(this,{coordDimensions:b,dimensionsCount:y.length+1,encodeDefaulter:Oe(y6,b,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),F$=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(It);cr(F$,z$,!0);var B1e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),f=WR(c,a,u,l,!0);a.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(f);return}var h=a.getItemLayout(u);f?(Bi(f),V$(h,f,a,u)):f=WR(h,a,u,l),o.add(f),a.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},e.prototype.remove=function(t){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},e.type="boxplot",e}(St),z1e=function(){function r(){}return r}(),F1e=function(r){z(e,r);function e(t){var n=r.call(this,t)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new z1e},e.prototype.buildPath=function(t,n){var i=n.points,a=0;for(t.moveTo(i[a][0],i[a][1]),a++;a<4;a++)t.lineTo(i[a][0],i[a][1]);for(t.closePath();a<i.length;a++)t.moveTo(i[a][0],i[a][1]),a++,t.lineTo(i[a][0],i[a][1])},e}(Xe);function WR(r,e,t,n,i){var a=r.ends,o=new F1e({shape:{points:i?V1e(a,n,r):a}});return V$(r,o,e,t,i),o}function V$(r,e,t,n,i){var a=t.hostModel,o=Iu[i?"initProps":"updateProps"];o(e,{shape:{points:r.ends}},a,n),e.useStyle(t.getItemVisual(n,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(n),l=s.getModel("emphasis");Fr(e,s),$t(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function V1e(r,e,t){return K(r,function(n){return n=n.slice(),n[e]=t.initBaseline,n})}var pd=k;function $1e(r){var e=H1e(r);pd(e,function(t){var n=t.seriesModels;n.length&&(G1e(t),pd(n,function(i,a){W1e(i,t.boxOffsetList[a],t.boxWidthList[a])}))})}function H1e(r){var e=[],t=[];return r.eachSeriesByType("boxplot",function(n){var i=n.getBaseAxis(),a=He(t,i);a<0&&(a=t.length,t[a]=i,e[a]={axis:i,seriesModels:[]}),e[a].seriesModels.push(n)}),e}function G1e(r){var e=r.axis,t=r.seriesModels,n=t.length,i=r.boxWidthList=[],a=r.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;pd(t,function(p){l=Math.max(l,p.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}pd(t,function(p){var v=p.get("boxWidth");q(v)||(v=[v,v]),o.push([ie(v[0],s)||0,ie(v[1],s)||0])});var c=s*.8-2,f=c/n*.3,h=(c-f*(n-1))/n,d=h/2-c/2;pd(t,function(p,v){a.push(d),d+=f+h,i.push(Math.min(Math.max(h,o[v][0]),o[v][1]))})}function W1e(r,e,t){var n=r.coordinateSystem,i=r.getData(),a=t/2,o=r.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=i.mapDimension(l[o]),c=i.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var f=0;f<i.count();f++){var h=i.get(u,f),d=b(h,c[2],f),p=b(h,c[0],f),v=b(h,c[1],f),m=b(h,c[3],f),g=b(h,c[4],f),y=[];_(y,v,!1),_(y,m,!0),y.push(p,v,g,m),x(y,p),x(y,g),x(y,d),i.setItemLayout(f,{initBaseline:d[s],ends:y})}function b(w,S,T){var C=i.get(S,T),A=[];A[o]=w,A[s]=C;var M;return isNaN(w)||isNaN(C)?M=[NaN,NaN]:(M=n.dataToPoint(A),M[o]+=e),M}function _(w,S,T){var C=S.slice(),A=S.slice();C[o]+=a,A[o]-=a,T?w.push(C,A):w.push(A,C)}function x(w,S){var T=S.slice(),C=S.slice();T[o]-=a,C[o]+=a,w.push(T,C)}}function U1e(r,e){e=e||{};for(var t=[],n=[],i=e.boundIQR,a=i==="none"||i===0,o=0;o<r.length;o++){var s=ci(r[o].slice()),l=Rb(s,.25),u=Rb(s,.5),c=Rb(s,.75),f=s[0],h=s[s.length-1],d=(i??1.5)*(c-l),p=a?f:Math.max(f,l-d),v=a?h:Math.min(h,c+d),m=e.itemNameFormatter,g=Te(m)?m({value:o}):se(m)?m.replace("{value}",o+""):o+"";t.push([g,p,l,u,c,v]);for(var y=0;y<s.length;y++){var b=s[y];if(b<p||b>v){var _=[g,b];n.push(_)}}}return{boxData:t,outliers:n}}var Y1e={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Jr){var n="";dt(n)}var i=U1e(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function q1e(r){r.registerSeriesModel(F$),r.registerChartView(B1e),r.registerLayout($1e),r.registerTransform(Y1e)}var X1e=["itemStyle","borderColor"],K1e=["itemStyle","borderColor0"],Z1e=["itemStyle","borderColorDoji"],J1e=["itemStyle","color"],Q1e=["itemStyle","color0"];function jA(r,e){return e.get(r>0?J1e:Q1e)}function NA(r,e){return e.get(r===0?Z1e:r>0?X1e:K1e)}var ebe={seriesType:"candlestick",plan:Af(),performRawSeries:!0,reset:function(r,e){if(!e.isSeriesFiltered(r)){var t=r.pipelineContext.large;return!t&&{progress:function(n,i){for(var a;(a=n.next())!=null;){var o=i.getItemModel(a),s=i.getItemLayout(a).sign,l=o.getItemStyle();l.fill=jA(s,o),l.stroke=NA(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");W(u,l)}}}}}},tbe=["color","borderColor"],rbe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,n,i){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,n):this._incrementalRenderNormal(t,n)},e.prototype.eachRendered=function(t){Vs(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t){var n=t.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&UR(u,f))return;var h=ax(f,c,!0);Ot(h,{shape:{points:f.ends}},t,c),ox(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}}).update(function(c,f){var h=i.getItemGraphicEl(f);if(!n.hasValue(c)){a.remove(h);return}var d=n.getItemLayout(c);if(s&&UR(u,d)){a.remove(h);return}h?(ut(h,{shape:{points:d.ends}},t,c),Bi(h)):h=ax(d),ox(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}).remove(function(c){var f=i.getItemGraphicEl(c);f&&a.remove(f)}).execute(),this._data=n},e.prototype._renderLarge=function(t){this._clear(),YR(t,this.group);var n=t.get("clip",!0)?Op(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=i.getItemLayout(o),l=ax(s);ox(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,n){YR(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(St),nbe=function(){function r(){}return r}(),ibe=function(r){z(e,r);function e(t){var n=r.call(this,t)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new nbe},e.prototype.buildPath=function(t,n){var i=n.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))},e}(Xe);function ax(r,e,t){var n=r.ends;return new ibe({shape:{points:t?abe(n,r):n},z2:100})}function UR(r,e){for(var t=!0,n=0;n<e.ends.length;n++)if(r.contain(e.ends[n][0],e.ends[n][1])){t=!1;break}return t}function ox(r,e,t,n){var i=e.getItemModel(t);r.useStyle(e.getItemVisual(t,"style")),r.style.strokeNoScale=!0,r.__simpleBox=n,Fr(r,i);var a=e.getItemLayout(t).sign;k(r.states,function(s,l){var u=i.getModel(l),c=jA(a,u),f=NA(a,u)||c,h=s.style||(s.style={});c&&(h.fill=c),f&&(h.stroke=f)});var o=i.getModel("emphasis");$t(r,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function abe(r,e){return K(r,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var obe=function(){function r(){}return r}(),sx=function(r){z(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new obe},e.prototype.buildPath=function(t,n){for(var i=n.points,a=0;a<i.length;)if(this.__sign===i[a++]){var o=i[a++];t.moveTo(o,i[a++]),t.lineTo(o,i[a++])}else a+=3},e}(Xe);function YR(r,e,t,n){var i=r.getData(),a=i.getLayout("largePoints"),o=new sx({shape:{points:a},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new sx({shape:{points:a},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new sx({shape:{points:a},__sign:0,ignoreCoarsePointer:!0});e.add(l),lx(1,o,r),lx(-1,s,r),lx(0,l,r),n&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function lx(r,e,t,n){var i=NA(r,t)||jA(r,t),a=t.getModel("itemStyle").getItemStyle(tbe);e.useStyle(a),e.style.fill=null,e.style.stroke=i}var $$=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,n,i){var a=n.getItemLayout(t);return a&&i.rect(a.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(It);cr($$,z$,!0);function sbe(r){!r||!q(r.series)||k(r.series,function(e){Me(e)&&e.type==="k"&&(e.type="candlestick")})}var lbe={seriesType:"candlestick",plan:Af(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),n=ube(r,t),i=0,a=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[i])),l=K(t.mapDimensionsAll(o[a]),t.getDimensionIndex,t),u=l[0],c=l[1],f=l[2],h=l[3];if(t.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?p:d};function d(v,m){for(var g,y=m.getStore();(g=v.next())!=null;){var b=y.get(s,g),_=y.get(u,g),x=y.get(c,g),w=y.get(f,g),S=y.get(h,g),T=Math.min(_,x),C=Math.max(_,x),A=P(T,b),M=P(C,b),D=P(w,b),E=P(S,b),L=[];O(L,M,0),O(L,A,1),L.push(F(E),F(M),F(D),F(A));var I=m.getItemModel(g),R=!!I.get(["itemStyle","borderColorDoji"]);m.setItemLayout(g,{sign:qR(y,g,_,x,c,R),initBaseline:_>x?M[a]:A[a],ends:L,brushRect:j(w,S,b)})}function P(N,B){var $=[];return $[i]=B,$[a]=N,isNaN(B)||isNaN(N)?[NaN,NaN]:e.dataToPoint($)}function O(N,B,$){var J=B.slice(),U=B.slice();J[i]=Wm(J[i]+n/2,1,!1),U[i]=Wm(U[i]-n/2,1,!0),$?N.push(J,U):N.push(U,J)}function j(N,B,$){var J=P(N,$),U=P(B,$);return J[i]-=n/2,U[i]-=n/2,{x:J[0],y:J[1],width:n,height:U[1]-J[1]}}function F(N){return N[i]=Wm(N[i],1),N}}function p(v,m){for(var g=ma(v.count*4),y=0,b,_=[],x=[],w,S=m.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(w=v.next())!=null;){var C=S.get(s,w),A=S.get(u,w),M=S.get(c,w),D=S.get(f,w),E=S.get(h,w);if(isNaN(C)||isNaN(D)||isNaN(E)){g[y++]=NaN,y+=3;continue}g[y++]=qR(S,w,A,M,c,T),_[i]=C,_[a]=D,b=e.dataToPoint(_,null,x),g[y++]=b?b[0]:NaN,g[y++]=b?b[1]:NaN,_[a]=E,b=e.dataToPoint(_,null,x),g[y++]=b?b[1]:NaN}m.setLayout("largePoints",g)}}};function qR(r,e,t,n,i,a){var o;return t>n?o=-1:t<n?o=1:o=a?0:e>0?r.get(i,e-1)<=n?1:-1:1,o}function ube(r,e){var t=r.getBaseAxis(),n,i=t.type==="category"?t.getBandWidth():(n=t.getExtent(),Math.abs(n[1]-n[0])/e.count()),a=ie(Re(r.get("barMaxWidth"),i),i),o=ie(Re(r.get("barMinWidth"),1),i),s=r.get("barWidth");return s!=null?ie(s,i):Math.max(Math.min(i/2,a),o)}function cbe(r){r.registerChartView(rbe),r.registerSeriesModel($$),r.registerPreprocessor(sbe),r.registerVisual(ebe),r.registerLayout(lbe)}function XR(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var fbe=function(r){z(e,r);function e(t,n){var i=r.call(this)||this,a=new Pp(t,n),o=new Ee;return i.add(a),i.add(o),i.updateData(t,n),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var n=t.symbolType,i=t.color,a=t.rippleNumber,o=this.childAt(1),s=0;s<a;s++){var l=ur(n,-1,-1,2,2,i);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/a*t.period+t.effectOffset;l.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),o.add(l)}XR(o,t)},e.prototype.updateEffectAnimation=function(t){for(var n=this._effectCfg,i=this.childAt(1),a=["symbolType","period","rippleScale","rippleNumber"],o=0;o<a.length;o++){var s=a[o];if(n[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}XR(i,t)},e.prototype.highlight=function(){wo(this)},e.prototype.downplay=function(){So(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,n){var i=this,a=t.hostModel;this.childAt(0).updateData(t,n);var o=this.childAt(1),s=t.getItemModel(n),l=t.getItemVisual(n,"symbol"),u=kf(t.getItemVisual(n,"symbolSize")),c=t.getItemVisual(n,"style"),f=c&&c.fill,h=s.getModel("emphasis");o.setScale(u),o.traverse(function(m){m.setStyle("fill",f)});var d=Pu(t.getItemVisual(n,"symbolOffset"),u);d&&(o.x=d[0],o.y=d[1]);var p=t.getItemVisual(n,"symbolRotate");o.rotation=(p||0)*Math.PI/180||0;var v={};v.showEffectOn=a.get("showEffectOn"),v.rippleScale=s.get(["rippleEffect","scale"]),v.brushType=s.get(["rippleEffect","brushType"]),v.period=s.get(["rippleEffect","period"])*1e3,v.effectOffset=n/t.count(),v.z=a.getShallow("z")||0,v.zlevel=a.getShallow("zlevel")||0,v.symbolType=l,v.color=f,v.rippleEffectColor=s.get(["rippleEffect","color"]),v.rippleNumber=s.get(["rippleEffect","number"]),v.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(v):this.startEffectAnimation(v),this._effectCfg=v):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(m){m==="emphasis"?v.showEffectOn!=="render"&&i.startEffectAnimation(v):m==="normal"&&v.showEffectOn!=="render"&&i.stopEffectAnimation()}),this._effectCfg=v,$t(this,h.get("focus"),h.get("blurScope"),h.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(Ee),hbe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new Rp(fbe)},e.prototype.render=function(t,n,i){var a=t.getData(),o=this._symbolDraw;o.updateData(a,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var n=t.coordinateSystem,i=n&&n.getArea&&n.getArea();return t.get("clip",!0)?i:null},e.prototype.updateTransform=function(t,n,i){var a=t.getData();this.group.dirty();var o=jp("").reset(t,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var n=t.coordinateSystem;n&&n.getRoamTransform&&(this.group.transform=Boe(n.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(St),dbe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return Lo(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,n,i){return i.point(n.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e}(It);function pbe(r){r.registerChartView(hbe),r.registerSeriesModel(dbe),r.registerLayout(jp("effectScatter"))}var H$=function(r){z(e,r);function e(t,n,i){var a=r.call(this)||this;return a.add(a.createLine(t,n,i)),a._updateEffectSymbol(t,n),a}return e.prototype.createLine=function(t,n,i){return new MA(t,n,i)},e.prototype._updateEffectSymbol=function(t,n){var i=t.getItemModel(n),a=i.getModel("effect"),o=a.get("symbolSize"),s=a.get("symbol");q(o)||(o=[o,o]);var l=t.getItemVisual(n,"style"),u=a.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=ur(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(a.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(t,a,n))},e.prototype._updateEffectAnimation=function(t,n,i){var a=this.childAt(1);if(a){var o=t.getItemLayout(i),s=n.get("period")*1e3,l=n.get("loop"),u=n.get("roundTrip"),c=n.get("constantSpeed"),f=kr(n.get("delay"),function(d){return d/t.count()*s/3});if(a.ignore=!0,this._updateAnimationPoints(a,o),c>0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var h=void 0;Te(f)?h=f(i):h=f,a.__t>0&&(h=-s*a.__t),this._animateSymbol(a,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,n,i,a,o){if(n>0){t.__t=0;var s=this,l=t.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(t)});a||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return ss(t.__p1,t.__cp1)+ss(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,n){t.__p1=n[0],t.__p2=n[1],t.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(t,n,i){this.childAt(0).updateData(t,n,i),this._updateEffectSymbol(t,n)},e.prototype._updateSymbolPosition=function(t){var n=t.__p1,i=t.__p2,a=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=Ar,c=Jw;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var f=t.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),h=t.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);t.rotation=-Math.atan2(h,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=ss(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):t.__lastT===1?t.scaleY=2*ss(n,s):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=s[0],t.y=s[1]},e.prototype.updateLayout=function(t,n){this.childAt(0).updateLayout(t,n);var i=t.getItemModel(n).getModel("effect");this._updateEffectAnimation(t,i,n)},e}(Ee),G$=function(r){z(e,r);function e(t,n,i){var a=r.call(this)||this;return a._createPolyline(t,n,i),a}return e.prototype._createPolyline=function(t,n,i){var a=t.getItemLayout(n),o=new bn({shape:{points:a}});this.add(o),this._updateCommonStl(t,n,i)},e.prototype.updateData=function(t,n,i){var a=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(n)}};ut(o,s,a,n),this._updateCommonStl(t,n,i)},e.prototype._updateCommonStl=function(t,n,i){var a=this.childAt(0),o=t.getItemModel(n),s=i&&i.emphasisLineStyle,l=i&&i.focus,u=i&&i.blurScope,c=i&&i.emphasisDisabled;if(!i||t.hasItemOption){var f=o.getModel("emphasis");s=f.getModel("lineStyle").getLineStyle(),c=f.get("disabled"),l=f.get("focus"),u=f.get("blurScope")}a.useStyle(t.getItemVisual(n,"style")),a.style.fill=null,a.style.strokeNoScale=!0;var h=a.ensureState("emphasis");h.style=s,$t(this,l,u,c)},e.prototype.updateLayout=function(t,n){var i=this.childAt(0);i.setShape("points",t.getItemLayout(n))},e}(Ee),vbe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,n,i){return new G$(t,n,i)},e.prototype._updateAnimationPoints=function(t,n){this._points=n;for(var i=[0],a=0,o=1;o<n.length;o++){var s=n[o-1],l=n[o];a+=ss(s,l),i.push(a)}if(a===0){this._length=0;return}for(var o=0;o<i.length;o++)i[o]/=a;this._offsets=i,this._length=a},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var n=t.__t<1?t.__t:2-t.__t,i=this._points,a=this._offsets,o=i.length;if(a){var s=this._lastFrame,l;if(n<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(a[l]>n);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),f=i[l],h=i[l+1];t.x=f[0]*(1-c)+c*h[0],t.y=f[1]*(1-c)+c*h[1];var d=t.__t<1?h[0]-f[0]:f[0]-h[0],p=t.__t<1?h[1]-f[1]:f[1]-h[1];t.rotation=-Math.atan2(p,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,t.ignore=!1}},e}(H$),mbe=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),gbe=function(r){z(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new mbe},e.prototype.buildPath=function(t,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o<i.length;){var s=i[o++];if(s>0){t.moveTo(i[o++],i[o++]);for(var l=1;l<s;l++)t.lineTo(i[o++],i[o++])}}else for(o=this._off;o<i.length;){var u=i[o++],c=i[o++],f=i[o++],h=i[o++];if(t.moveTo(u,c),a>0){var d=(u+f)/2-(c-h)*a,p=(c+h)/2-(f-u)*a;t.quadraticCurveTo(d,p,f,h)}else t.lineTo(f,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u<a.length;){var c=a[u++];if(c>0)for(var f=a[u++],h=a[u++],d=1;d<c;d++){var p=a[u++],v=a[u++];if(Jo(f,h,p,v,s,t,n))return l}l++}else for(var l=0,u=0;u<a.length;){var f=a[u++],h=a[u++],p=a[u++],v=a[u++];if(o>0){var m=(f+p)/2-(h-v)*o,g=(h+v)/2-(p-f)*o;if(yz(f,h,m,g,p,v,s,t,n))return l}else if(Jo(f,h,p,v,s,t,n))return l;l++}return-1},e.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n),a=this.getBoundingRect();if(t=i[0],n=i[1],a.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<i.length;){var c=i[u++],f=i[u++];a=Math.min(c,a),s=Math.max(c,s),o=Math.min(f,o),l=Math.max(f,l)}t=this._rect=new Ve(a,o,s,l)}return t},e}(Xe),ybe=function(){function r(){this.group=new Ee}return r.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},r.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(e,t){var n=this._newAdded[0],i=t.getLayout("linesPoints"),a=n&&n.shape.segs;if(a&&a.length<2e4){var o=a.length,s=new Float32Array(o+i.length);s.set(a),s.set(i,o),n.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:i}),this._setCommon(l,t),l.__startIndex=e.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new gbe({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},r.prototype._setCommon=function(e,t,n){var i=t.hostModel;e.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),e.useStyle(i.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var a=t.getVisual("style");a&&a.stroke&&e.setStyle("stroke",a.stroke),e.setStyle("fill",null);var o=Le(e);o.seriesIndex=i.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),W$={seriesType:"lines",plan:Af(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),n=r.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(t){for(var u=0,c=i.start;c<i.end;c++)u+=r.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var f=0,h=[],c=i.start;c<i.end;c++){var d=r.getLineCoords(c,o);t&&(s[f++]=d);for(var p=0;p<d;p++)h=e.dataToPoint(o[p],!1,h),s[f++]=h[0],s[f++]=h[1]}a.setLayout("linesPoints",s)}else for(var c=i.start;c<i.end;c++){var v=a.getItemModel(c),d=r.getLineCoords(c,o),m=[];if(t)for(var g=0;g<d;g++)m.push(e.dataToPoint(o[g]));else{m[0]=e.dataToPoint(o[0]),m[1]=e.dataToPoint(o[1]);var y=v.get(["lineStyle","curveness"]);+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}a.setItemLayout(c,m)}}}}}},bbe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=t.getData(),o=this._updateLineDraw(a,t),s=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=i.getZr(),c=u.painter.getType()==="svg";c||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!c&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&l>0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var f=t.get("clip",!0)&&Op(t.coordinateSystem,!1,t);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,i){var a=t.getData(),o=this._updateLineDraw(a,t);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(t,n,i){this._lineDraw.incrementalUpdate(t,n.getData()),this._finished=t.end===n.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,n,i){var a=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=W$.reset(t,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(t,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new ybe:new kA(o?a?vbe:G$:a?H$:MA),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var n=t.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.type="lines",e}(St),_be=typeof Uint32Array>"u"?Array:Uint32Array,xbe=typeof Float64Array>"u"?Array:Float64Array;function KR(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=K(e,function(t){var n=[t[0].coord,t[1].coord],i={coords:n};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),lC([i,t[0],t[1]])}))}var wbe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],KR(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(KR(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var n=this._processFlatCoordsArray(t.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=jd(this._flatCoords,n.flatCoords),this._flatCoordsOffset=jd(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),t.data=new Float32Array(n.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var n=this.getData().getItemModel(t),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[t*2],a=this._flatCoordsOffset[t*2+1],o=0;o<a;o++)n[o]=n[o]||[],n[o][0]=this._flatCoords[i+o*2],n[o][1]=this._flatCoords[i+o*2+1];return a}else{for(var s=this._getCoordsFromItemModel(t),o=0;o<s.length;o++)n[o]=n[o]||[],n[o][0]=s[o][0],n[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(t){var n=0;if(this._flatCoords&&(n=this._flatCoords.length),lt(t[0])){for(var i=t.length,a=new _be(i),o=new xbe(i),s=0,l=0,u=0,c=0;c<i;){u++;var f=t[c++];a[l++]=s+n,a[l++]=f;for(var h=0;h<f;h++){var d=t[c++],p=t[c++];o[s++]=d,o[s++]=p}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,n){var i=new fn(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],function(a,o,s,l){if(a instanceof Array)return NaN;i.hasItemOption=!0;var u=a.value;if(u!=null)return u instanceof Array?u[l]:u}),i},e.prototype.formatTooltip=function(t,n,i){var a=this.getData(),o=a.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Cr("nameValue",{name:c.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),n=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(It);function sm(r){return r instanceof Array||(r=[r,r]),r}var Sbe={seriesType:"lines",reset:function(r){var e=sm(r.get("symbol")),t=sm(r.get("symbolSize")),n=r.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",t&&t[0]),n.setVisual("toSymbolSize",t&&t[1]);function i(a,o){var s=a.getItemModel(o),l=sm(s.getShallow("symbol",!0)),u=sm(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};function Tbe(r){r.registerChartView(bbe),r.registerSeriesModel(wbe),r.registerLayout(W$),r.registerVisual(Sbe)}var Cbe=256,Abe=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=ks.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,h=f.getContext("2d"),d=e.length;f.width=t,f.height=n;for(var p=0;p<d;++p){var v=e[p],m=v[0],g=v[1],y=v[2],b=i(y);h.globalAlpha=b,h.drawImage(s,m-c,g-c)}if(!f.width||!f.height)return f;for(var _=h.getImageData(0,0,f.width,f.height),x=_.data,w=0,S=x.length,T=this.minOpacity,C=this.maxOpacity,A=C-T;w<S;){var b=x[w+3]/256,M=Math.floor(b*(Cbe-1))*4;if(b>0){var D=o(b)?l:u;b>0&&(b=b*A+T),x[w++]=D[M],x[w++]=D[M+1],x[w++]=D[M+2],x[w++]=D[M+3]*b*256}else w+=4}return h.putImageData(_,0,0),f},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=ks.createCanvas()),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-t,t,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},r.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,i=n[t]||(n[t]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},r}();function Mbe(r,e,t){var n=r[1]-r[0];e=K(e,function(o){return{interval:[(o.interval[0]-r[0])/n,(o.interval[1]-r[0])/n]}});var i=e.length,a=0;return function(o){var s;for(s=a;s<i;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}if(s===i)for(s=a-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s<i&&t[s]}}function kbe(r,e){var t=r[1]-r[0];return e=[(e[0]-r[0])/t,(e[1]-r[0])/t],function(n){return n>=e[0]&&n<=e[1]}}function ZR(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Dbe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):ZR(o)&&this._renderOnGeo(o,t,a,i)},e.prototype.incrementalPrepareRender=function(t,n,i){this.group.removeAll()},e.prototype.incrementalRender=function(t,n,i,a){var o=n.coordinateSystem;o&&(ZR(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,a,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Vs(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,n,i,a,o){var s=t.coordinateSystem,l=Ou(s,"cartesian2d"),u,c,f,h;if(l){var d=s.getAxis("x"),p=s.getAxis("y");u=d.getBandWidth()+.5,c=p.getBandWidth()+.5,f=d.scale.getExtent(),h=p.scale.getExtent()}for(var v=this.group,m=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),b=t.getModel(["select","itemStyle"]).getItemStyle(),_=t.get(["itemStyle","borderRadius"]),x=Tr(t),w=t.getModel("emphasis"),S=w.get("focus"),T=w.get("blurScope"),C=w.get("disabled"),A=l?[m.mapDimension("x"),m.mapDimension("y"),m.mapDimension("value")]:[m.mapDimension("time"),m.mapDimension("value")],M=i;M<a;M++){var D=void 0,E=m.getItemVisual(M,"style");if(l){var L=m.get(A[0],M),I=m.get(A[1],M);if(isNaN(m.get(A[2],M))||isNaN(L)||isNaN(I)||L<f[0]||L>f[1]||I<h[0]||I>h[1])continue;var R=s.dataToPoint([L,I]);D=new nt({shape:{x:R[0]-u/2,y:R[1]-c/2,width:u,height:c},style:E})}else{if(isNaN(m.get(A[1],M)))continue;D=new nt({z2:1,shape:s.dataToRect([m.get(A[0],M)]).contentShape,style:E})}if(m.hasItemOption){var P=m.getItemModel(M),O=P.getModel("emphasis");g=O.getModel("itemStyle").getItemStyle(),y=P.getModel(["blur","itemStyle"]).getItemStyle(),b=P.getModel(["select","itemStyle"]).getItemStyle(),_=P.get(["itemStyle","borderRadius"]),S=O.get("focus"),T=O.get("blurScope"),C=O.get("disabled"),x=Tr(P)}D.shape.r=_;var j=t.getRawValue(M),F="-";j&&j[2]!=null&&(F=j[2]+""),Vr(D,x,{labelFetcher:t,labelDataIndex:M,defaultOpacity:E.opacity,defaultText:F}),D.ensureState("emphasis").style=g,D.ensureState("blur").style=y,D.ensureState("select").style=b,$t(D,S,T,C),D.incremental=o,o&&(D.states.emphasis.hoverLayer=!0),v.add(D),m.setItemGraphicEl(M,D),this._progressiveEls&&this._progressiveEls.push(D)}},e.prototype._renderOnGeo=function(t,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new Abe;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=t.getViewRect().clone(),f=t.getRoamTransform();c.applyTransform(f);var h=Math.max(c.x,0),d=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),v=Math.min(c.height+c.y,a.getHeight()),m=p-h,g=v-d,y=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],b=l.mapArray(y,function(S,T,C){var A=t.dataToPoint([S,T]);return A[0]-=h,A[1]-=d,A.push(C),A}),_=i.getExtent(),x=i.type==="visualMap.continuous"?kbe(_,i.option.range):Mbe(_,i.getPieceList(),i.option.selected);u.update(b,m,g,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},x);var w=new Lr({style:{width:m,height:g,x:h,y:d,image:u.canvas},silent:!0});this.group.add(w)},e.type="heatmap",e}(St),Ebe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return Lo(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Dp.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(It);function Lbe(r){r.registerChartView(Dbe),r.registerSeriesModel(Ebe)}var Ibe=["itemStyle","borderWidth"],JR=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],ux=new Eo,Pbe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:JR[+c],categoryDim:JR[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var v=eO(o,p),m=QR(o,p,v,h),g=tO(o,h,m);o.setItemGraphicEl(p,g),a.add(g),nO(g,h,m)}}).update(function(p,v){var m=s.getItemGraphicEl(v);if(!o.hasValue(p)){a.remove(m);return}var g=eO(o,p),y=QR(o,p,g,h),b=Z$(o,y);m&&b!==m.__pictorialShapeStr&&(a.remove(m),o.setItemGraphicEl(p,null),m=null),m?Fbe(m,h,y):m=tO(o,h,y,!0),o.setItemGraphicEl(p,m),m.__pictorialSymbolMeta=y,a.add(m),nO(m,h,y)}).remove(function(p){var v=s.getItemGraphicEl(p);v&&rO(s,p,v.__pictorialSymbolMeta.animationModel,v)}).execute();var d=t.get("clip",!0)?Op(t.coordinateSystem,!1,t):null;return d?a.setClipPath(d):a.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,n){var i=this.group,a=this._data;t.get("animation")?a&&a.eachItemGraphicEl(function(o){rO(a,Le(o).dataIndex,t,o)}):i.removeAll()},e.type="pictorialBar",e}(St);function QR(r,e,t,n){var i=r.getItemLayout(e),a=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=t.get("symbolPatternSize")||2,f=t.isAnimationEnabled(),h={dataIndex:e,layout:i,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?t:null,hoverScale:f&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};Rbe(t,a,i,n,h),Obe(r,e,i,a,o,h.boundingLength,h.pxSign,c,n,h),jbe(t,h.symbolScale,u,n,h);var d=h.symbolSize,p=Pu(t.get("symbolOffset"),d);return Nbe(t,d,i,a,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function Rbe(r,e,t,n,i){var a=n.valueDim,o=r.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[a.wh]<=0),c;if(q(o)){var f=[cx(s,o[0])-l,cx(s,o[1])-l];f[1]<f[0]&&f.reverse(),c=f[u]}else o!=null?c=cx(s,o)-l:e?c=n.coordSysExtent[a.index][u]-l:c=t[a.wh];i.boundingLength=c,e&&(i.repeatCutLength=t[a.wh]);var h=a.xy==="x",d=s.inverse;i.pxSign=h&&!d||!h&&d?c>=0?1:-1:c>0?1:-1}function cx(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function Obe(r,e,t,n,i,a,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(t[f.wh]),d=r.getItemVisual(e,"symbolSize"),p;q(d)?p=d.slice():d==null?p=["100%","100%"]:p=[d,d],p[f.index]=ie(p[f.index],h),p[c.index]=ie(p[c.index],n?h:Math.abs(a)),u.symbolSize=p;var v=u.symbolScale=[p[0]/s,p[1]/s];v[c.index]*=(l.isHorizontal?-1:1)*o}function jbe(r,e,t,n,i){var a=r.get(Ibe)||0;a&&(ux.attr({scaleX:e[0],scaleY:e[1],rotation:t}),ux.updateTransform(),a/=ux.getLineScale(),a*=e[n.valueDim.index]),i.valueLineWidth=a||0}function Nbe(r,e,t,n,i,a,o,s,l,u,c,f){var h=c.categoryDim,d=c.valueDim,p=f.pxSign,v=Math.max(e[d.index]+s,0),m=v;if(n){var g=Math.abs(l),y=kr(r.get("symbolMargin"),"15%")+"",b=!1;y.lastIndexOf("!")===y.length-1&&(b=!0,y=y.slice(0,y.length-1));var _=ie(y,e[d.index]),x=Math.max(v+_*2,0),w=b?0:_*2,S=az(n),T=S?n:iO((g+w)/x),C=g-T*v;_=C/2/(b?T:Math.max(T-1,1)),x=v+_*2,w=b?0:_*2,!S&&n!=="fixed"&&(T=u?iO((Math.abs(u)+w)/x):0),m=T*x-w,f.repeatTimes=T,f.symbolMargin=_}var A=p*(m/2),M=f.pathPosition=[];M[h.index]=t[h.wh]/2,M[d.index]=o==="start"?A:o==="end"?l-A:l/2,a&&(M[0]+=a[0],M[1]+=a[1]);var D=f.bundlePosition=[];D[h.index]=t[h.xy],D[d.index]=t[d.xy];var E=f.barRectShape=W({},t);E[d.wh]=p*Math.max(Math.abs(t[d.wh]),Math.abs(M[d.index]+A)),E[h.wh]=t[h.wh];var L=f.clipShape={};L[h.xy]=-t[h.xy],L[h.wh]=c.ecSize[h.wh],L[d.xy]=0,L[d.wh]=t[d.wh]}function U$(r){var e=r.symbolPatternSize,t=ur(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function Y$(r,e,t,n){var i=r.__pictorialBundle,a=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,f=a[e.valueDim.index]+o+t.symbolMargin*2;for(BA(r,function(v){v.__pictorialAnimationIndex=c,v.__pictorialRepeatTimes=u,c<u?Vc(v,null,p(c),t,n):Vc(v,null,{scaleX:0,scaleY:0},t,n,function(){i.remove(v)}),c++});c<u;c++){var h=U$(t);h.__pictorialAnimationIndex=c,h.__pictorialRepeatTimes=u,i.add(h);var d=p(c);Vc(h,{x:d.x,y:d.y,scaleX:0,scaleY:0},{scaleX:d.scaleX,scaleY:d.scaleY,rotation:d.rotation},t,n)}function p(v){var m=s.slice(),g=t.pxSign,y=v;return(t.symbolRepeatDirection==="start"?g>0:g<0)&&(y=u-1-v),m[l.index]=f*(y-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function q$(r,e,t,n){var i=r.__pictorialBundle,a=r.__pictorialMainPath;a?Vc(a,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,n):(a=r.__pictorialMainPath=U$(t),i.add(a),Vc(a,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,n))}function X$(r,e,t){var n=W({},e.barRectShape),i=r.__pictorialBarRect;i?Vc(i,null,{shape:n},e,t):(i=r.__pictorialBarRect=new nt({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,r.add(i))}function K$(r,e,t,n){if(t.symbolClip){var i=r.__pictorialClipPath,a=W({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(i)ut(i,{shape:a},s,l);else{a[o.wh]=0,i=new nt({shape:a}),r.__pictorialBundle.setClipPath(i),r.__pictorialClipPath=i;var u={};u[o.wh]=t.clipShape[o.wh],Iu[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function eO(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=Bbe,t.isAnimationEnabled=zbe,t}function Bbe(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function zbe(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function tO(r,e,t,n){var i=new Ee,a=new Ee;return i.add(a),i.__pictorialBundle=a,a.x=t.bundlePosition[0],a.y=t.bundlePosition[1],t.symbolRepeat?Y$(i,e,t):q$(i,e,t),X$(i,t,n),K$(i,e,t,n),i.__pictorialShapeStr=Z$(r,t),i.__pictorialSymbolMeta=t,i}function Fbe(r,e,t){var n=t.animationModel,i=t.dataIndex,a=r.__pictorialBundle;ut(a,{x:t.bundlePosition[0],y:t.bundlePosition[1]},n,i),t.symbolRepeat?Y$(r,e,t,!0):q$(r,e,t,!0),X$(r,t,!0),K$(r,e,t,!0)}function rO(r,e,t,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];BA(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(t=null),k(a,function(o){Es(o,{scaleX:0,scaleY:0},t,e,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(e,null)}function Z$(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function BA(r,e,t){k(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&e.call(t,n)})}function Vc(r,e,t,n,i,a){e&&r.attr(e),n.symbolClip&&!i?t&&r.attr(t):t&&Iu[i?"updateProps":"initProps"](r,t,n.animationModel,n.dataIndex,a)}function nO(r,e,t){var n=t.dataIndex,i=t.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=a.get("focus"),f=a.get("blurScope"),h=a.get("scale");BA(r,function(v){if(v instanceof Lr){var m=v.style;v.useStyle(W({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},t.style))}else v.useStyle(t.style);var g=v.ensureState("emphasis");g.style=o,h&&(g.scaleX=v.scaleX*1.1,g.scaleY=v.scaleY*1.1),v.ensureState("blur").style=s,v.ensureState("select").style=l,u&&(v.cursor=u),v.z2=t.z2});var d=e.valueDim.posDesc[+(t.boundingLength>0)],p=r.__pictorialBarRect;p.ignoreClip=!0,Vr(p,Tr(i),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:af(e.seriesModel.getData(),n),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:d}),$t(r,c,f,a.get("disabled"))}function iO(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var Vbe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=$s(ep.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(ep);function $be(r){r.registerChartView(Pbe),r.registerSeriesModel(Vbe),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Oe(RF,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,OF("pictorialBar"))}var Hbe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,n,i){var a=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function h(m){return m.name}var d=new To(this._layersSeries||[],l,h,h),p=[];d.add(ue(v,this,"add")).update(ue(v,this,"update")).remove(ue(v,this,"remove")).execute();function v(m,g,y){var b=o._layers;if(m==="remove"){s.remove(b[g]);return}for(var _=[],x=[],w,S=l[g].indices,T=0;T<S.length;T++){var C=a.getItemLayout(S[T]),A=C.x,M=C.y0,D=C.y;_.push(A,M),x.push(A,M+D),w=a.getItemVisual(S[T],"style")}var E,L=a.getItemLayout(S[0]),I=t.getModel("label"),R=I.get("margin"),P=t.getModel("emphasis");if(m==="add"){var O=p[g]=new Ee;E=new SV({shape:{points:_,stackedOnPoints:x,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),O.add(E),s.add(O),t.isAnimationEnabled()&&E.setClipPath(Gbe(E.getBoundingRect(),t,function(){E.removeClipPath()}))}else{var O=b[y];E=O.childAt(0),s.add(O),p[g]=O,ut(E,{shape:{points:_,stackedOnPoints:x}},t),Bi(E)}Vr(E,Tr(t),{labelDataIndex:S[T-1],defaultText:a.getName(S[T-1]),inheritColor:w.fill},{normal:{verticalAlign:"middle"}}),E.setTextConfig({position:null,local:!0});var j=E.getTextContent();j&&(j.x=L.x-R,j.y=L.y0+L.y/2),E.useStyle(w),a.setItemGraphicEl(g,E),Fr(E,t),$t(E,P.get("focus"),P.get("blurScope"),P.get("disabled"))}this._layersSeries=l,this._layers=p},e.type="themeRiver",e}(St);function Gbe(r,e,t){var n=new nt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Ot(n,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},e,t),n}var fx=2,Wbe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Bp(ue(this.getData,this),ue(this.getRawData,this))},e.prototype.fixData=function(t){var n=t.length,i={},a=d2(t,function(h){return i.hasOwnProperty(h[0]+"")||(i[h[0]+""]=-1),h[2]}),o=[];a.buckets.each(function(h,d){o.push({name:d,dataList:h})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,c=0;c<o[l].dataList.length;++c){var f=o[l].dataList[c][0]+"";i[f]=l}for(var f in i)i.hasOwnProperty(f)&&i[f]!==l&&(i[f]=l,t[n]=[f,0,u],n++)}return t},e.prototype.getInitialData=function(t,n){for(var i=this.getReferringComponents("singleAxis",lr).models[0],a=i.get("type"),o=pt(t.data,function(p){return p[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=ve(),c=0,f=0;f<s.length;++f)l.push(s[f][fx]),u.get(s[f][fx])||(u.set(s[f][fx],c),c++);var h=Lp(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Iy(a)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,d=new fn(h,this);return d.initData(s),d},e.prototype.getLayerSeries=function(){for(var t=this.getData(),n=t.count(),i=[],a=0;a<n;++a)i[a]=a;var o=t.mapDimension("single"),s=d2(i,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(f,h){return t.get(o,f)-t.get(o,h)}),l.push({name:c,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,n,i){q(t)||(t=t?[t]:[]);for(var a=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var f=Number.MAX_VALUE,h=-1,d=o[c].indices.length,p=0;p<d;++p){var v=a.get(t[0],o[c].indices[p]),m=Math.abs(v-n);m<=f&&(u=v,f=m,h=o[c].indices[p])}s.push(h)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,n,i){var a=this.getData(),o=a.getName(t),s=a.get(a.mapDimension("value"),t);return Cr("nameValue",{name:o,value:s})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(It);function Ube(r,e){r.eachSeriesByType("themeRiver",function(t){var n=t.getData(),i=t.coordinateSystem,a={},o=i.getRect();a.rect=o;var s=t.get("boundaryGap"),l=i.getAxis();if(a.boundaryGap=s,l.orient==="horizontal"){s[0]=ie(s[0],o.height),s[1]=ie(s[1],o.height);var u=o.height-s[0]-s[1];aO(n,t,u)}else{s[0]=ie(s[0],o.width),s[1]=ie(s[1],o.width);var c=o.width-s[0]-s[1];aO(n,t,c)}n.setLayout("layoutInfo",a)})}function aO(r,e,t){if(r.count())for(var n=e.coordinateSystem,i=e.getLayerSeries(),a=r.mapDimension("single"),o=r.mapDimension("value"),s=K(i,function(m){return K(m.indices,function(g){var y=n.dataToPoint(r.get(a,g));return y[1]=r.get(o,g),y})}),l=Ybe(s),u=l.y0,c=t/l.max,f=i.length,h=i[0].indices.length,d,p=0;p<h;++p){d=u[p]*c,r.setItemLayout(i[0].indices[p],{layerIndex:0,x:s[0][p][0],y0:d,y:s[0][p][1]*c});for(var v=1;v<f;++v)d+=s[v-1][p][1]*c,r.setItemLayout(i[v].indices[p],{layerIndex:v,x:s[v][p][0],y0:d,y:s[v][p][1]*c})}}function Ybe(r){for(var e=r.length,t=r[0].length,n=[],i=[],a=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=r[l][o][1];s>a&&(a=s),n.push(s)}for(var u=0;u<t;++u)i[u]=(a-n[u])/2;a=0;for(var c=0;c<t;++c){var f=n[c]+i[c];f>a&&(a=f)}return{y0:i,max:a}}function qbe(r){r.registerChartView(Hbe),r.registerSeriesModel(Wbe),r.registerLayout(Ube),r.registerProcessor(Np("themeRiver"))}var Xbe=2,Kbe=4,oO=function(r){z(e,r);function e(t,n,i,a){var o=r.call(this)||this;o.z2=Xbe,o.textConfig={inside:!0},Le(o).seriesIndex=n.seriesIndex;var s=new ot({z2:Kbe,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,n,i,a),o}return e.prototype.updateData=function(t,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;Le(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),f=W({},c);f.label=null;var h=n.getVisual("style");h.lineJoin="bevel";var d=n.getVisual("decal");d&&(h.decal=rf(d,o));var p=Bl(l.getModel("itemStyle"),f,!0);W(f,p),k(mn,function(y){var b=s.ensureState(y),_=l.getModel([y,"itemStyle"]);b.style=_.getItemStyle();var x=Bl(_,f);x&&(b.shape=x)}),t?(s.setShape(f),s.shape.r=c.r0,Ot(s,{shape:{r:c.r}},i,n.dataIndex)):(ut(s,{shape:f},i),Bi(s)),s.useStyle(h),this._updateLabel(i);var v=l.getShallow("cursor");v&&s.attr("cursor",v),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var m=u.get("focus"),g=m==="relative"?jd(n.getAncestorsIndices(),n.getDescendantIndices()):m==="ancestor"?n.getAncestorsIndices():m==="descendant"?n.getDescendantIndices():m;$t(this,g,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),f=this,h=f.getTextContent(),d=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,v=a.get("show")&&!(p!=null&&Math.abs(s)<p);h.ignore=!v,k($d,function(g){var y=g==="normal"?i.getModel("label"):i.getModel([g,"label"]),b=g==="normal",_=b?h:h.ensureState(g),x=t.getFormattedLabel(d,g);b&&(x=x||n.node.name),_.style=Et(y,{},null,g!=="normal",!0),x&&(_.style.text=x);var w=y.get("show");w!=null&&!b&&(_.ignore=!w);var S=m(y,"position"),T=b?f:f.states[g],C=T.style.fill;T.textConfig={outsideFill:y.get("color")==="inherit"?C:null,inside:S!=="outside"};var A,M=m(y,"distance")||0,D=m(y,"align"),E=m(y,"rotate"),L=Math.PI*.5,I=Math.PI*1.5,R=jn(E==="tangential"?Math.PI/2-l:l),P=R>L&&!Fd(R-L)&&R<I;S==="outside"?(A=o.r+M,D=P?"right":"left"):!D||D==="center"?(s===2*Math.PI&&o.r0===0?A=0:A=(o.r+o.r0)/2,D="center"):D==="left"?(A=o.r0+M,D=P?"right":"left"):D==="right"&&(A=o.r-M,D=P?"left":"right"),_.style.align=D,_.style.verticalAlign=m(y,"verticalAlign")||"middle",_.x=A*u+o.cx,_.y=A*c+o.cy;var O=0;E==="radial"?O=jn(-l)+(P?Math.PI:0):E==="tangential"?O=jn(Math.PI/2-l)+(P?Math.PI:0):lt(E)&&(O=E*Math.PI/180),_.rotation=jn(O)});function m(g,y){var b=g.get(y);return b??a.get(y)}h.dirtyStyle()},e}(gn),dS="sunburstRootToNode",sO="sunburstHighlight",Zbe="sunburstUnhighlight";function Jbe(r){r.registerAction({type:dS,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(i,a){var o=rp(e,[dS],i);if(o){var s=i.getViewRoot();s&&(e.direction=wA(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),r.registerAction({type:sO,update:"none"},function(e,t,n){e=W({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},i);function i(a){var o=rp(e,[sO],a);o&&(e.dataIndex=o.node.dataIndex)}n.dispatchAction(W(e,{type:"highlight"}))}),r.registerAction({type:Zbe,update:"updateView"},function(e,t,n){e=W({},e),n.dispatchAction(W(e,{type:"downplay"}))})}var Qbe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i,a){var o=this;this.seriesModel=t,this.api=i,this.ecModel=n;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),c=this.group,f=t.get("renderLabelForZeroData"),h=[];u.eachNode(function(y){h.push(y)});var d=this._oldChildren||[];p(h,d),g(l,u),this._initEvents(),this._oldChildren=h;function p(y,b){if(y.length===0&&b.length===0)return;new To(b,y,_,_).add(x).update(x).remove(Oe(x,null)).execute();function _(w){return w.getId()}function x(w,S){var T=w==null?null:y[w],C=S==null?null:b[S];v(T,C)}}function v(y,b){if(!f&&y&&!y.getValue()&&(y=null),y!==l&&b!==l){if(b&&b.piece)y?(b.piece.updateData(!1,y,t,n,i),s.setItemGraphicEl(y.dataIndex,b.piece)):m(b);else if(y){var _=new oO(y,t,n,i);c.add(_),s.setItemGraphicEl(y.dataIndex,_)}}}function m(y){y&&y.piece&&(c.remove(y.piece),y.piece=null)}function g(y,b){b.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,y,t,n,i):(o.virtualPiece=new oO(y,t,n,i),c.add(o.virtualPiece)),b.piece.off("click"),o.virtualPiece.on("click",function(_){o._rootToNode(b.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=t.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";Sy(u,c)}}i=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:dS,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=t[0]-a.cx,s=t[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="sunburst",e}(St),e_e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,n){var i={name:t.name,children:t.data};J$(i);var a=this._levelModels=K(t.levels||[],function(l){return new _t(l,this,n)},this),o=xA.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),h=a[f.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=p1(i,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){n$(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(It);function J$(r){var e=0;k(r.children,function(n){J$(n);var i=n.value;q(i)&&(i=i[0]),e+=i});var t=r.value;q(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),q(r.value)?r.value[0]=t:r.value=t}var lO=Math.PI/180;function t_e(r,e,t){e.eachSeriesByType(r,function(n){var i=n.get("center"),a=n.get("radius");q(a)||(a=[0,a]),q(i)||(i=[i,i]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=ie(i[0],o),c=ie(i[1],s),f=ie(a[0],l/2),h=ie(a[1],l/2),d=-n.get("startAngle")*lO,p=n.get("minAngle")*lO,v=n.getData().tree.root,m=n.getViewRoot(),g=m.depth,y=n.get("sort");y!=null&&Q$(m,y);var b=0;k(m.children,function(R){!isNaN(R.getValue())&&b++});var _=m.getValue(),x=Math.PI/(_||b)*2,w=m.depth>0,S=m.height-(w?-1:1),T=(h-f)/(S||1),C=n.get("clockwise"),A=n.get("stillShowZeroSum"),M=C?1:-1,D=function(R,P){if(R){var O=P;if(R!==v){var j=R.getValue(),F=_===0&&A?x:j*x;F<p&&(F=p),O=P+M*F;var N=R.depth-g-(w?-1:1),B=f+T*N,$=f+T*(N+1),J=n.getLevelModel(R);if(J){var U=J.get("r0",!0),we=J.get("r",!0),Ye=J.get("radius",!0);Ye!=null&&(U=Ye[0],we=Ye[1]),U!=null&&(B=ie(U,l/2)),we!=null&&($=ie(we,l/2))}R.setLayout({angle:F,startAngle:P,endAngle:O,clockwise:C,cx:u,cy:c,r0:B,r:$})}if(R.children&&R.children.length){var ge=0;k(R.children,function(le){ge+=D(le,P+ge)})}return O-P}};if(w){var E=f,L=f+T,I=Math.PI*2;v.setLayout({angle:I,startAngle:d,endAngle:d+I,clockwise:C,cx:u,cy:c,r0:E,r:L})}D(m,d)})}function Q$(r,e){var t=r.children||[];r.children=r_e(t,e),t.length&&k(r.children,function(n){Q$(n,e)})}function r_e(r,e){if(Te(e)){var t=K(r,function(i,a){var o=i.getValue();return{params:{depth:i.depth,height:i.height,dataIndex:i.dataIndex,getValue:function(){return o}},index:a}});return t.sort(function(i,a){return e(i.params,a.params)}),K(t,function(i){return r[i.index]})}else{var n=e==="asc";return r.sort(function(i,a){var o=(i.getValue()-a.getValue())*(n?1:-1);return o===0?(i.dataIndex-a.dataIndex)*(n?-1:1):o})}}function n_e(r){var e={};function t(n,i,a){for(var o=n;o&&o.depth>1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&se(s)&&(s=t2(s,(n.depth-1)/(a-1)*.5)),s}r.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");W(u,l)})})}function i_e(r){r.registerChartView(Qbe),r.registerSeriesModel(e_e),r.registerLayout(Oe(t_e,"sunburst")),r.registerProcessor(Oe(Np,"sunburst")),r.registerVisual(n_e),Jbe(r)}var uO={color:"fill",borderColor:"stroke"},a_e={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},po=it(),o_e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,n){return Lo(null,this)},e.prototype.getDataParams=function(t,n,i){var a=r.prototype.getDataParams.call(this,t,n);return i&&(a.info=po(i).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(It);function s_e(r,e){return e=e||[0,0],K(["x","y"],function(t,n){var i=this.getAxis(t),a=e[n],o=r[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function l_e(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:ue(s_e,r)}}}function u_e(r,e){return e=e||[0,0],K([0,1],function(t){var n=e[t],i=r[t]/2,a=[],o=[];return a[t]=n-i,o[t]=n+i,a[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(a)[t]-this.dataToPoint(o)[t])},this)}function c_e(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:ue(u_e,r)}}}function f_e(r,e){var t=this.getAxis(),n=e instanceof Array?e[0]:e,i=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(n-i)-t.dataToCoord(n+i))}function h_e(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:ue(f_e,r)}}}function d_e(r,e){return e=e||[0,0],K(["Radius","Angle"],function(t,n){var i="get"+t+"Axis",a=this[i](),o=e[n],s=r[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function p_e(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=e.dataToRadius(i[0]),o=t.dataToAngle(i[1]),s=r.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:ue(d_e,r)}}}function v_e(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(n,i){return r.dataToPoint(n,i)}}}}function e8(r,e,t,n){return r&&(r.legacy||r.legacy!==!1&&!t&&!n&&e!=="tspan"&&(e==="text"||fe(r,"text")))}function t8(r,e,t){var n=r,i,a,o;if(e==="text")o=n;else{o={},fe(n,"text")&&(o.text=n.text),fe(n,"rich")&&(o.rich=n.rich),fe(n,"textFill")&&(o.fill=n.textFill),fe(n,"textStroke")&&(o.stroke=n.textStroke),fe(n,"fontFamily")&&(o.fontFamily=n.fontFamily),fe(n,"fontSize")&&(o.fontSize=n.fontSize),fe(n,"fontStyle")&&(o.fontStyle=n.fontStyle),fe(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=fe(n,"textPosition");t?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),fe(n,"textPosition")&&(i.position=n.textPosition),fe(n,"textOffset")&&(i.offset=n.textOffset),fe(n,"textRotation")&&(i.rotation=n.textRotation),fe(n,"textDistance")&&(i.distance=n.textDistance)}return cO(o,r),k(o.rich,function(l){cO(l,l)}),{textConfig:i,textContent:a}}function cO(r,e){e&&(e.font=e.textFont||e.font,fe(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),fe(e,"textAlign")&&(r.align=e.textAlign),fe(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),fe(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),fe(e,"textWidth")&&(r.width=e.textWidth),fe(e,"textHeight")&&(r.height=e.textHeight),fe(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),fe(e,"textPadding")&&(r.padding=e.textPadding),fe(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),fe(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),fe(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),fe(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),fe(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),fe(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),fe(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function fO(r,e,t){var n=r;n.textPosition=n.textPosition||t.position||"inside",t.offset!=null&&(n.textOffset=t.offset),t.rotation!=null&&(n.textRotation=t.rotation),t.distance!=null&&(n.textDistance=t.distance);var i=n.textPosition.indexOf("inside")>=0,a=r.fill||"#000";hO(n,e);var o=n.textFill==null;return i?o&&(n.textFill=t.insideFill||"#fff",!n.textStroke&&t.insideStroke&&(n.textStroke=t.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=r.fill||t.outsideFill||"#000"),!n.textStroke&&t.outsideStroke&&(n.textStroke=t.outsideStroke)),n.text=e.text,n.rich=e.rich,k(e.rich,function(s){hO(s,s)}),n}function hO(r,e){e&&(fe(e,"fill")&&(r.textFill=e.fill),fe(e,"stroke")&&(r.textStroke=e.fill),fe(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),fe(e,"font")&&(r.font=e.font),fe(e,"fontStyle")&&(r.fontStyle=e.fontStyle),fe(e,"fontWeight")&&(r.fontWeight=e.fontWeight),fe(e,"fontSize")&&(r.fontSize=e.fontSize),fe(e,"fontFamily")&&(r.fontFamily=e.fontFamily),fe(e,"align")&&(r.textAlign=e.align),fe(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),fe(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),fe(e,"width")&&(r.textWidth=e.width),fe(e,"height")&&(r.textHeight=e.height),fe(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),fe(e,"padding")&&(r.textPadding=e.padding),fe(e,"borderColor")&&(r.textBorderColor=e.borderColor),fe(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),fe(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),fe(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),fe(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),fe(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),fe(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),fe(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),fe(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),fe(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),fe(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var r8={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},dO=et(r8);Ea(Ia,function(r,e){return r[e]=1,r},{});Ia.join(", ");var Gy=["","style","shape","extra"],lf=it();function zA(r,e,t,n,i){var a=r+"Animation",o=_f(r,n,i)||{},s=lf(e).userDuring;return o.duration>0&&(o.during=s?ue(__e,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),W(o,t[a]),o}function Zm(r,e,t,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=t.isAnimationEnabled(),l=lf(r),u=e.style;l.userDuring=e.during;var c={},f={};if(w_e(r,e,f),vO("shape",e,f),vO("extra",e,f),!a&&s&&(x_e(r,e,c),pO("shape",r,e,c),pO("extra",r,e,c),S_e(r,e,u,c)),f.style=u,m_e(r,f,o),y_e(r,e),s)if(a){var h={};k(Gy,function(p){var v=p?e[p]:e;v&&v.enterFrom&&(p&&(h[p]=h[p]||{}),W(p?h[p]:h,v.enterFrom))});var d=zA("enter",r,e,t,i);d.duration>0&&r.animateFrom(h,d)}else g_e(r,e,i||0,t,c);n8(r,e),u?r.dirty():r.markRedraw()}function n8(r,e){for(var t=lf(r).leaveToProps,n=0;n<Gy.length;n++){var i=Gy[n],a=i?e[i]:e;a&&a.leaveTo&&(t||(t=lf(r).leaveToProps={}),i&&(t[i]=t[i]||{}),W(i?t[i]:t,a.leaveTo))}}function g1(r,e,t,n){if(r){var i=r.parent,a=lf(r).leaveToProps;if(a){var o=zA("update",r,e,t,0);o.done=function(){i.remove(r)},r.animateTo(a,o)}else i.remove(r)}}function ou(r){return r==="all"}function m_e(r,e,t){var n=e.style;if(!r.isGroup&&n){if(t){r.useStyle({});for(var i=r.animators,a=0;a<i.length;a++){var o=i[a];o.targetName==="style"&&o.changeTarget(r.style)}}r.setStyle(n)}e&&(e.style=null,e&&r.attr(e),e.style=n)}function g_e(r,e,t,n,i){if(i){var a=zA("update",r,e,n,t);a.duration>0&&r.animateFrom(i,a)}}function y_e(r,e){fe(e,"silent")&&(r.silent=e.silent),fe(e,"ignore")&&(r.ignore=e.ignore),r instanceof mi&&fe(e,"invisible")&&(r.invisible=e.invisible),r instanceof Xe&&fe(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var ea={},b_e={setTransform:function(r,e){return ea.el[r]=e,this},getTransform:function(r){return ea.el[r]},setShape:function(r,e){var t=ea.el,n=t.shape||(t.shape={});return n[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=ea.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=ea.el,n=t.style;return n&&(n[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=ea.el.style;if(e)return e[r]},setExtra:function(r,e){var t=ea.el.extra||(ea.el.extra={});return t[r]=e,this},getExtra:function(r){var e=ea.el.extra;if(e)return e[r]}};function __e(){var r=this,e=r.el;if(e){var t=lf(e).userDuring,n=r.userDuring;if(t!==n){r.el=r.userDuring=null;return}ea.el=e,n(b_e)}}function pO(r,e,t,n){var i=t[r];if(i){var a=e[r],o;if(a){var s=t.transition,l=i.transition;if(l)if(!o&&(o=n[r]={}),ou(l))W(o,a);else for(var u=wt(l),c=0;c<u.length;c++){var f=u[c],h=a[f];o[f]=h}else if(ou(s)||He(s,r)>=0){!o&&(o=n[r]={});for(var d=et(a),c=0;c<d.length;c++){var f=d[c],h=a[f];T_e(i[f],h)&&(o[f]=h)}}}}}function vO(r,e,t){var n=e[r];if(n)for(var i=t[r]={},a=et(n),o=0;o<a.length;o++){var s=a[o];i[s]=ad(n[s])}}function x_e(r,e,t){for(var n=e.transition,i=ou(n)?Ia:wt(n||[]),a=0;a<i.length;a++){var o=i[a];if(!(o==="style"||o==="shape"||o==="extra")){var s=r[o];t[o]=s}}}function w_e(r,e,t){for(var n=0;n<dO.length;n++){var i=dO[n],a=r8[i],o=e[i];o&&(t[a[0]]=o[0],t[a[1]]=o[1])}for(var n=0;n<Ia.length;n++){var s=Ia[n];e[s]!=null&&(t[s]=e[s])}}function S_e(r,e,t,n){if(t){var i=r.style,a;if(i){var o=t.transition,s=e.transition;if(o&&!ou(o)){var l=wt(o);!a&&(a=n.style={});for(var u=0;u<l.length;u++){var c=l[u],f=i[c];a[c]=f}}else if(r.getAnimationStyleProps&&(ou(s)||ou(o)||He(s,"style")>=0)){var h=r.getAnimationStyleProps(),d=h?h.style:null;if(d){!a&&(a=n.style={});for(var p=et(t),u=0;u<p.length;u++){var c=p[u];if(d[c]){var f=i[c];a[c]=f}}}}}}}function T_e(r,e){return Zr(r)?r!==e:r!=null&&isFinite(r)}var i8=it(),C_e=["percent","easing","shape","style","extra"];function a8(r){r.stopAnimation("keyframe"),r.attr(i8(r))}function Wy(r,e,t){if(!(!t.isAnimationEnabled()||!e)){if(q(e)){k(e,function(s){Wy(r,s,t)});return}var n=e.keyframes,i=e.duration;if(t&&i==null){var a=_f("enter",t,0);i=a&&a.duration}if(!(!n||!i)){var o=i8(r);k(Gy,function(s){if(!(s&&!r[s])){var l;n.sort(function(u,c){return u.percent-c.percent}),k(n,function(u){var c=r.animators,f=s?u[s]:u;if(f){var h=et(f);if(s||(h=pt(h,function(v){return He(C_e,v)<0})),!!h.length){l||(l=r.animate(s,e.loop,!0),l.scope="keyframe");for(var d=0;d<c.length;d++)c[d]!==l&&c[d].targetName===l.targetName&&c[d].stopTracks(h);s&&(o[s]=o[s]||{});var p=s?o[s]:o;k(h,function(v){p[v]=((s?r[s]:r)||{})[v]}),l.whenWithKeys(i*u.percent,f,h,u.easing)}}}),l&&l.delay(e.delay||0).duration(i).start(e.easing)}})}}}var vo="emphasis",ps="normal",FA="blur",VA="select",Rs=[ps,vo,FA,VA],hx={normal:["itemStyle"],emphasis:[vo,"itemStyle"],blur:[FA,"itemStyle"],select:[VA,"itemStyle"]},dx={normal:["label"],emphasis:[vo,"label"],blur:[FA,"label"],select:[VA,"label"]},A_e=["x","y"],M_e="e\0\0",qn={normal:{},emphasis:{},blur:{},select:{}},k_e={cartesian2d:l_e,geo:c_e,single:h_e,polar:p_e,calendar:v_e};function pS(r){return r instanceof Xe}function vS(r){return r instanceof mi}function D_e(r,e){e.copyTransform(r),vS(e)&&vS(r)&&(e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e.invisible=r.invisible,e.ignore=r.ignore,pS(e)&&pS(r)&&e.setShape(r.shape))}var E_e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i,a){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=mO(t,s,n,i);o||l.removeAll(),s.diff(o).add(function(f){px(i,null,f,u(f,a),t,l,s)}).remove(function(f){var h=o.getItemGraphicEl(f);h&&g1(h,po(h).option,t)}).update(function(f,h){var d=o.getItemGraphicEl(h);px(i,d,f,u(f,a),t,l,s)}).execute();var c=t.get("clip",!0)?Op(t.coordinateSystem,!1,t):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,n,i){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,n,i,a,o){var s=n.getData(),l=mO(n,s,i,a),u=this._progressiveEls=[];function c(d){d.isGroup||(d.incremental=!0,d.ensureState("emphasis").hoverLayer=!0)}for(var f=t.start;f<t.end;f++){var h=px(null,null,f,l(f,o),n,this.group,s);h&&(h.traverse(c),u.push(h))}},e.prototype.eachRendered=function(t){Vs(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,n,i,a){var o=n.element;if(o==null||i.name===o)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1},e.type="custom",e}(St);function $A(r){var e=r.type,t;if(e==="path"){var n=r.shape,i=n.width!=null&&n.height!=null?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=l8(n);t=Y0(a,null,i,n.layout||"center"),po(t).customPathData=a}else if(e==="image")t=new Lr({}),po(t).customImagePath=r.style.image;else if(e==="text")t=new ot({});else if(e==="group")t=new Ee;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=LC(e);if(!o){var s="";dt(s)}t=new o}return po(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function HA(r,e,t,n,i,a,o){a8(e);var s=i&&i.normal.cfg;s&&e.setTextConfig(s),n&&n.transition==null&&(n.transition=A_e);var l=n&&n.style;if(l){if(e.type==="text"){var u=l;fe(u,"textFill")&&(u.fill=u.textFill),fe(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,f=pS(e)?l.decal:null;r&&f&&(f.dirty=!0,c=rf(f,r)),l.__decalPattern=c}if(vS(e)&&l){var c=l.__decalPattern;c&&(l.decal=c)}Zm(e,n,a,{dataIndex:t,isInit:o,clearStyle:!0}),Wy(e,n.keyframeAnimation,a)}function o8(r,e,t,n,i){var a=e.isGroup?null:e,o=i&&i[r].cfg;if(a){var s=a.ensureState(r);if(n===!1){var l=a.getState(r);l&&(l.style=null)}else s.style=n||null;o&&(s.textConfig=o),gu(a)}}function L_e(r,e,t){if(!r.isGroup){var n=r,i=t.currentZ,a=t.currentZLevel;n.z=i,n.zlevel=a;var o=e.z2;o!=null&&(n.z2=o||0);for(var s=0;s<Rs.length;s++)I_e(n,e,Rs[s])}}function I_e(r,e,t){var n=t===ps,i=n?e:Uy(e,t),a=i?i.z2:null,o;a!=null&&(o=n?r:r.ensureState(t),o.z2=a||0)}function mO(r,e,t,n){var i=r.get("renderItem"),a=r.coordinateSystem,o={};a&&(o=a.prepareCustoms?a.prepareCustoms(a):k_e[a.type](a));for(var s=Ce({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:_,style:w,ordinalRawValue:x,styleEmphasis:S,visual:A,barLayout:M,currentSeriesIndices:D,font:E},o.api||{}),l={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:P_e(r.getData())},u,c,f={},h={},d={},p={},v=0;v<Rs.length;v++){var m=Rs[v];d[m]=r.getModel(hx[m]),p[m]=r.getModel(dx[m])}function g(L){return L===u?c||(c=e.getItemModel(L)):e.getItemModel(L)}function y(L,I){return e.hasItemOption?L===u?f[I]||(f[I]=g(L).getModel(hx[I])):g(L).getModel(hx[I]):d[I]}function b(L,I){return e.hasItemOption?L===u?h[I]||(h[I]=g(L).getModel(dx[I])):g(L).getModel(dx[I]):p[I]}return function(L,I){return u=L,c=null,f={},h={},i&&i(Ce({dataIndexInside:L,dataIndex:e.getRawIndex(L),actionType:I?I.type:null},l),s)};function _(L,I){return I==null&&(I=u),e.getStore().get(e.getDimensionIndex(L||0),I)}function x(L,I){I==null&&(I=u),L=L||0;var R=e.getDimensionInfo(L);if(!R){var P=e.getDimensionIndex(L);return P>=0?e.getStore().get(P,I):void 0}var O=e.get(R.name,I),j=R&&R.ordinalMeta;return j?j.categories[O]:O}function w(L,I){I==null&&(I=u);var R=e.getItemVisual(I,"style"),P=R&&R.fill,O=R&&R.opacity,j=y(I,ps).getItemStyle();P!=null&&(j.fill=P),O!=null&&(j.opacity=O);var F={inheritColor:se(P)?P:"#000"},N=b(I,ps),B=Et(N,null,F,!1,!0);B.text=N.getShallow("show")?Re(r.getFormattedLabel(I,ps),af(e,I)):null;var $=xy(N,F,!1);return C(L,j),j=fO(j,B,$),L&&T(j,L),j.legacy=!0,j}function S(L,I){I==null&&(I=u);var R=y(I,vo).getItemStyle(),P=b(I,vo),O=Et(P,null,null,!0,!0);O.text=P.getShallow("show")?_a(r.getFormattedLabel(I,vo),r.getFormattedLabel(I,ps),af(e,I)):null;var j=xy(P,null,!0);return C(L,R),R=fO(R,O,j),L&&T(R,L),R.legacy=!0,R}function T(L,I){for(var R in I)fe(I,R)&&(L[R]=I[R])}function C(L,I){L&&(L.textFill&&(I.textFill=L.textFill),L.textPosition&&(I.textPosition=L.textPosition))}function A(L,I){if(I==null&&(I=u),fe(uO,L)){var R=e.getItemVisual(I,"style");return R?R[uO[L]]:null}if(fe(a_e,L))return e.getItemVisual(I,L)}function M(L){if(a.type==="cartesian2d"){var I=a.getBaseAxis();return wde(Ce({axis:I},L))}}function D(){return t.getCurrentSeriesIndices()}function E(L){return IC(L,t)}}function P_e(r){var e={};return k(r.dimensions,function(t){var n=r.getDimensionInfo(t);if(!n.isExtraCoord){var i=n.coordDim,a=e[i]=e[i]||[];a[n.coordDimIndex]=r.getDimensionIndex(t)}}),e}function px(r,e,t,n,i,a,o){if(!n){a.remove(e);return}var s=GA(r,e,t,n,i,a);return s&&o.setItemGraphicEl(t,s),s&&$t(s,n.focus,n.blurScope,n.emphasisDisabled),s}function GA(r,e,t,n,i,a){var o=-1,s=e;e&&s8(e,n,i)&&(o=He(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=$A(n),s&&D_e(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),qn.normal.cfg=qn.normal.conOpt=qn.emphasis.cfg=qn.emphasis.conOpt=qn.blur.cfg=qn.blur.conOpt=qn.select.cfg=qn.select.conOpt=null,qn.isLegacy=!1,O_e(u,t,n,i,l,qn),R_e(u,t,n,i,l),HA(r,u,t,n,qn,i,l),fe(n,"info")&&(po(u).info=n.info);for(var c=0;c<Rs.length;c++){var f=Rs[c];if(f!==ps){var h=Uy(n,f),d=WA(n,h,f);o8(f,u,h,d,qn)}}return L_e(u,n,i),n.type==="group"&&j_e(r,u,t,n,i),o>=0?a.replaceAt(u,o):a.add(u),u}function s8(r,e,t){var n=po(r),i=e.type,a=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&F_e(a)&&l8(a)!==n.customPathData||i==="image"&&fe(o,"image")&&o.image!==n.customImagePath}function R_e(r,e,t,n,i){var a=t.clipPath;if(a===!1)r&&r.getClipPath()&&r.removeClipPath();else if(a){var o=r.getClipPath();o&&s8(o,a,n)&&(o=null),o||(o=$A(a),r.setClipPath(o)),HA(null,o,e,a,null,n,i)}}function O_e(r,e,t,n,i,a){if(!r.isGroup){gO(t,null,a),gO(t,vo,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=$A(o),r.setTextContent(c)),HA(null,c,e,o,null,n,i);for(var f=o&&o.style,h=0;h<Rs.length;h++){var d=Rs[h];if(d!==ps){var p=a[d].conOpt;o8(d,c,p,WA(o,p,d),null)}}f?c.dirty():c.markRedraw()}}}}function gO(r,e,t){var n=e?Uy(r,e):r,i=e?WA(r,n,vo):r.style,a=r.type,o=n?n.textConfig:null,s=r.textContent,l=s?e?Uy(s,e):s:null;if(i&&(t.isLegacy||e8(i,a,!!o,!!l))){t.isLegacy=!0;var u=t8(i,a,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var f=e?t[e]:t.normal;f.cfg=o,f.conOpt=l}function Uy(r,e){return e?r?r[e]:null:r}function WA(r,e,t){var n=e&&e.style;return n==null&&t===vo&&r&&(n=r.styleEmphasis),n}function j_e(r,e,t,n,i){var a=n.children,o=a?a.length:0,s=n.$mergeChildren,l=s==="byName"||n.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){B_e({api:r,oldChildren:e.children()||[],newChildren:a||[],dataIndex:t,seriesModel:i,group:e});return}u&&e.removeAll();for(var c=0;c<o;c++){var f=a[c],h=e.childAt(c);f?(f.ignore==null&&(f.ignore=!1),GA(r,h,t,f,i,e)):h.ignore=!0}for(var d=e.childCount()-1;d>=c;d--){var p=e.childAt(d);N_e(e,p,i)}}}function N_e(r,e,t){e&&g1(e,po(r).option,t)}function B_e(r){new To(r.oldChildren,r.newChildren,yO,yO,r).add(bO).update(bO).remove(z_e).execute()}function yO(r,e){var t=r&&r.name;return t??M_e+e}function bO(r,e){var t=this.context,n=r!=null?t.newChildren[r]:null,i=e!=null?t.oldChildren[e]:null;GA(t.api,i,t.dataIndex,n,t.seriesModel,t.group)}function z_e(r){var e=this.context,t=e.oldChildren[r];t&&g1(t,po(t).option,e.seriesModel)}function l8(r){return r&&(r.pathData||r.d)}function F_e(r){return r&&(fe(r,"pathData")||fe(r,"d"))}function V_e(r){r.registerChartView(E_e),r.registerSeriesModel(o_e)}var Cl=it(),_O=ke,vx=ue,UA=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,n,i){var a=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,e,t,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new Ee,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),n.getZr().add(s);else{var h=Oe(xO,t,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,t)}SO(s,t,!0),this._renderHandle(a)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var n=t.get("animation"),i=e.axis,a=i.type==="category",o=t.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=pA(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(e,t,n,i,a){},r.prototype.createPointerEl=function(e,t,n,i){var a=t.pointer;if(a){var o=Cl(e).pointerEl=new Iu[a.type](_O(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,n,i){if(t.label){var a=Cl(e).labelEl=new ot(_O(t.label));e.add(a),wO(a,i)}},r.prototype.updatePointerEl=function(e,t,n){var i=Cl(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),n(i,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,n,i){var a=Cl(e).labelEl;a&&(a.setStyle(t.label.style),n(a,{x:t.label.x,y:t.label.y}),wO(a,i))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=t.getModel("handle"),o=t.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=kp(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){_o(u.event)},onmousedown:vx(this._onHandleDragMove,this,0,0),drift:vx(this._onHandleDragMove,this),ondragend:vx(this._onHandleDragEnd,this)}),n.add(i)),SO(i,t,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");q(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Mf(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){xO(this._axisPointerModel,!t&&this._moveAnimation,this._handle,mx(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(mx(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(mx(i)),Cl(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,i=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),qd(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},r}();function xO(r,e,t,n){u8(Cl(t).lastProp,n)||(Cl(t).lastProp=n,e?ut(t,n,r):(t.stopAnimation(),t.attr(n)))}function u8(r,e){if(Me(r)&&Me(e)){var t=!0;return k(e,function(n,i){t=t&&u8(r[i],n)}),!!t}else return r===e}function wO(r,e){r[e.get(["label","show"])?"show":"hide"]()}function mx(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function SO(r,e,t){var n=e.get("z"),i=e.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=t)})}function YA(r){var e=r.get("type"),t=r.getModel(e+"Style"),n;return e==="line"?(n=t.getLineStyle(),n.fill=null):e==="shadow"&&(n=t.getAreaStyle(),n.stroke=null),n}function c8(r,e,t,n,i){var a=t.get("value"),o=f8(a,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=Sf(s.get("padding")||0),u=s.getFont(),c=xp(o,u),f=i.position,h=c.width+l[1]+l[3],d=c.height+l[0]+l[2],p=i.align;p==="right"&&(f[0]-=h),p==="center"&&(f[0]-=h/2);var v=i.verticalAlign;v==="bottom"&&(f[1]-=d),v==="middle"&&(f[1]-=d/2),$_e(f,h,d,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:Et(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function $_e(r,e,t,n){var i=n.getWidth(),a=n.getHeight();r[0]=Math.min(r[0]+e,i)-e,r[1]=Math.min(r[1]+t,a)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function f8(r,e,t,n,i){r=e.scale.parse(r);var a=e.scale.getLabel({value:r},{precision:i.precision}),o=i.formatter;if(o){var s={value:nA(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};k(n,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),se(o)?a=o.replace("{value}",a):Te(o)&&(a=o(s))}return a}function qA(r,e,t){var n=zn();return Eu(n,n,t.rotation),La(n,n,t.position),Ri([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],n)}function h8(r,e,t,n,i,a){var o=hn.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=i.get(["label","margin"]),c8(e,n,i,a,{position:qA(n.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function XA(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function d8(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function TO(r,e,t,n,i,a){return{cx:r,cy:e,r0:t,r:n,startAngle:i,endAngle:a,clockwise:!0}}var H_e=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=CO(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=YA(a),d=G_e[u](s,f,c);d.style=h,t.graphicKey=d.type,t.pointer=d}var p=X2(l.model,i);h8(n,t,p,i,a,o)},e.prototype.getHandleTransform=function(t,n,i){var a=X2(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=qA(n.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=CO(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[t.x,t.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,d=[h,h];d[c]=f[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:d,tooltipOption:p[c]}},e}(UA);function CO(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var G_e={line:function(r,e,t){var n=XA([e,t[0]],[e,t[1]],AO(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=Math.max(1,r.getBandWidth()),i=t[1]-t[0];return{type:"Rect",shape:d8([e-n/2,t[0]],[n,i],AO(r))}}};function AO(r){return r.dim==="x"?0:1}var W_e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.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}},e}(Qe),oo=it(),U_e=k;function p8(r,e,t){if(!Ze.node){var n=e.getZr();oo(n).records||(oo(n).records={}),Y_e(n,e);var i=oo(n).records[r]||(oo(n).records[r]={});i.handler=t}}function Y_e(r,e){if(oo(r).initialized)return;oo(r).initialized=!0,t("click",Oe(MO,"click")),t("mousemove",Oe(MO,"mousemove")),t("globalout",X_e);function t(n,i){r.on(n,function(a){var o=K_e(e);U_e(oo(r).records,function(s){s&&i(s,a,o.dispatchAction)}),q_e(o.pendings,e)})}}function q_e(r,e){var t=r.showTip.length,n=r.hideTip.length,i;t?i=r.showTip[t-1]:n&&(i=r.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function X_e(r,e,t){r.handler("leave",null,t)}function MO(r,e,t,n){e.handler(r,t,n)}function K_e(r){var e={showTip:[],hideTip:[]},t=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=t,r.dispatchAction(n))};return{dispatchAction:t,pendings:e}}function mS(r,e){if(!Ze.node){var t=e.getZr(),n=(oo(t).records||{})[r];n&&(oo(t).records[r]=null)}}var Z_e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=n.getComponent("tooltip"),o=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";p8("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,n){mS("axisPointer",n)},e.prototype.dispose=function(t,n){mS("axisPointer",n)},e.type="axisPointer",e}(zt);function v8(r,e){var t=[],n=r.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=vu(a,r);if(o==null||o<0||q(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)t=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,d=f==="x"||f==="radius"?1:0,p=a.mapDimension(h),v=[];v[d]=a.get(p,o),v[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(v)||[]}else t=l.dataToPoint(a.getValues(K(l.dimensions,function(g){return a.mapDimension(g)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),t=[m.x+m.width/2,m.y+m.height/2]}return{point:t,el:s}}var kO=it();function J_e(r,e,t){var n=r.currTrigger,i=[r.x,r.y],a=r,o=r.dispatchAction||ue(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Jm(i)&&(i=v8({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=Jm(i),u=a.axesInfo,c=s.axesInfo,f=n==="leave"||Jm(i),h={},d={},p={list:[],map:{}},v={showPointer:Oe(exe,d),showTooltip:Oe(txe,p)};k(s.coordSysMap,function(g,y){var b=l||g.containPoint(i);k(s.coordSysAxesInfo[y],function(_,x){var w=_.axis,S=axe(u,_);if(!f&&b&&(!u||S)){var T=S&&S.value;T==null&&!l&&(T=w.pointToData(i)),T!=null&&DO(_,T,v,!1,h)}})});var m={};return k(c,function(g,y){var b=g.linkGroup;b&&!d[y]&&k(b.axesInfo,function(_,x){var w=d[x];if(_!==g&&w){var S=w.value;b.mapper&&(S=g.axis.scale.parse(b.mapper(S,EO(_),EO(g)))),m[g.key]=S}})}),k(m,function(g,y){DO(c[y],g,v,!0,h)}),rxe(d,c,h),nxe(p,i,r,o),ixe(c,o,t),h}}function DO(r,e,t,n,i){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=Q_e(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&W(i,s[0]),!n&&r.snap&&a.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function Q_e(r,e){var t=e.axis,n=t.dim,i=r,a=[],o=Number.MAX_VALUE,s=-1;return k(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,h;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(c,r,t);h=d.dataIndices,f=d.nestestValue}else{if(h=l.getData().indicesOfNearest(c[0],r,t.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var p=r-f,v=Math.abs(p);v<=o&&((v<o||p>=0&&s<0)&&(o=v,s=p,i=f,a.length=0),k(h,function(m){a.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:a,snapToValue:i}}function exe(r,e,t,n){r[e.key]={value:t,payloadBatch:n}}function txe(r,e,t,n){var i=t.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=tp(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.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 rxe(r,e,t){var n=t.axesInfo=[];k(e,function(i,a){var o=i.axisPointerModel.option,s=r[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 nxe(r,e,t,n){if(Jm(e)||!r.list.length){n({type:"hideTip"});return}var i=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:r.list})}function ixe(r,e,t){var n=t.getZr(),i="axisPointerLastHighlights",a=kO(n)[i]||{},o=kO(n)[i]={};k(r,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&k(f.seriesDataIndices,function(h){var d=h.seriesIndex+" | "+h.dataIndex;o[d]=h})});var s=[],l=[];k(a,function(u,c){!o[c]&&l.push(u)}),k(o,function(u,c){!a[c]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function axe(r,e){for(var t=0;t<(r||[]).length;t++){var n=r[t];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function EO(r){var e=r.axis.model,t={},n=t.axisDim=r.axis.dim;return t.axisIndex=t[n+"AxisIndex"]=e.componentIndex,t.axisName=t[n+"AxisName"]=e.name,t.axisId=t[n+"AxisId"]=e.id,t}function Jm(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Vp(r){ju.registerAxisPointerClass("CartesianAxisPointer",H_e),r.registerComponentModel(W_e),r.registerComponentView(Z_e),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!q(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=vme(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},J_e)}function oxe(r){Ue(HV),Ue(Vp)}var sxe=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(n),h=a.get("type");if(h&&h!=="none"){var d=YA(a),p=uxe[h](s,l,f,c);p.style=d,t.graphicKey=p.type,t.pointer=p}var v=a.get(["label","margin"]),m=lxe(n,i,a,l,v);c8(t,i,a,o,m)},e}(UA);function lxe(r,e,t,n,i){var a=e.axis,o=a.dataToCoord(r),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,f;if(a.dim==="radius"){var h=zn();Eu(h,h,s),La(h,h,[n.cx,n.cy]),u=Ri([o,-i],h);var d=e.getModel("axisLabel").get("rotate")||0,p=hn.innerTextLayout(s,d*Math.PI/180,-1);c=p.textAlign,f=p.textVerticalAlign}else{var v=l[1];u=n.coordToPoint([v+i,o]);var m=n.cx,g=n.cy;c=Math.abs(u[0]-m)/v<.3?"center":u[0]>m?"left":"right",f=Math.abs(u[1]-g)/v<.3?"middle":u[1]>g?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var uxe={line:function(r,e,t,n){return r.dim==="angle"?{type:"Line",shape:XA(e.coordToPoint([n[0],t]),e.coordToPoint([n[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,n){var i=Math.max(1,r.getBandWidth()),a=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:TO(e.cx,e.cy,n[0],n[1],(-t-i/2)*a,(-t+i/2)*a)}:{type:"Sector",shape:TO(e.cx,e.cy,t-i/2,t+i/2,0,Math.PI*2)}}},cxe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var n,i=this.ecModel;return i.eachComponent(t,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Qe),KA=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",lr).models[0]},e.type="polarAxis",e}(Qe);cr(KA,Ip);var fxe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(KA),hxe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(KA),ZA=function(r){z(e,r);function e(t,n){return r.call(this,"radius",t,n)||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e}(Gi);ZA.prototype.dataToRadius=Gi.prototype.dataToCoord;ZA.prototype.radiusToData=Gi.prototype.coordToData;var dxe=it(),JA=function(r){z(e,r);function e(t,n){return r.call(this,"angle",t,n||[0,360])||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,n=t.getLabelModel(),i=t.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),c=xp(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),h=f/u;isNaN(h)&&(h=1/0);var d=Math.max(0,Math.floor(h)),p=dxe(t.model),v=p.lastAutoInterval,m=p.lastTickCount;return v!=null&&m!=null&&Math.abs(v-d)<=1&&Math.abs(m-o)<=1&&v>d?d=v:(p.lastTickCount=o,p.lastAutoInterval=d),d},e}(Gi);JA.prototype.dataToAngle=Gi.prototype.dataToCoord;JA.prototype.angleToData=Gi.prototype.coordToData;var m8=["radius","angle"],pxe=function(){function r(e){this.dimensions=m8,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new ZA,this._angleAxis=new JA,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&t.push(n),i.scale.type===e&&t.push(i),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+n*n);t/=l,n/=l;for(var u=Math.atan2(-n,t)/Math.PI*180,c=u<o?1:-1;u<o||u>s;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],n=e[1]/180*Math.PI,i=Math.cos(n)*t+this.cx,a=-Math.sin(n)*t+this.cy;return[i,a]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),n=t.getExtent().slice();n[0]>n[1]&&n.reverse();var i=e.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,f=u*u+c*c,h=this.r,d=this.r0;return h!==d&&f-o<=h*h&&f+o>=d*d}}},r.prototype.convertToPixel=function(e,t,n){var i=LO(t);return i===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var i=LO(t);return i===this?this.pointToData(n):null},r}();function LO(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function vxe(r,e,t){var n=e.get("center"),i=t.getWidth(),a=t.getHeight();r.cx=ie(n[0],i),r.cy=ie(n[1],a);var o=r.getRadiusAxis(),s=Math.min(i,a)/2,l=e.get("radius");l==null?l=[0,"100%"]:q(l)||(l=[0,l]);var u=[ie(l[0],s),ie(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function mxe(r,e){var t=this,n=t.getAngleAxis(),i=t.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();k(Py(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),k(Py(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),nf(n.scale,n.model),nf(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function gxe(r){return r.mainType==="angleAxis"}function IO(r,e){var t;if(r.type=e.get("type"),r.scale=c1(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),gxe(e)){r.inverse=r.inverse!==e.get("clockwise");var n=e.get("startAngle"),i=(t=e.get("endAngle"))!==null&&t!==void 0?t:n+(r.inverse?-360:360);r.setExtent(n,i)}e.axis=r,r.model=e}var yxe={dimensions:m8,create:function(r,e){var t=[];return r.eachComponent("polar",function(n,i){var a=new pxe(i+"");a.update=mxe;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");IO(o,l),IO(s,u),vxe(a,n,e),t.push(a),n.coordinateSystem=a,a.model=n}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",lr).models[0];n.coordinateSystem=i.coordinateSystem}}),t}},bxe=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function lm(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var n=r.coordToPoint([e[0],t]),i=r.coordToPoint([e[1],t]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function um(r){var e=r.getRadiusAxis();return e.inverse?0:1}function PO(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var _xe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n){if(this.group.removeAll(),!!t.get("show")){var i=t.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords(),l=i.getMinorTicksCoords(),u=K(i.getViewLabels(),function(c){c=ke(c);var f=i.scale,h=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(h),c});PO(u),PO(s),k(bxe,function(c){t.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&xxe[c](this.group,t,a,s,l,o,u)},this)}},e.type="angleAxis",e}(ju),xxe={axisLine:function(r,e,t,n,i,a){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=um(t),f=c?0:1,h,d=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[f]===0?h=new Iu[d]({shape:{cx:t.cx,cy:t.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new Tp({shape:{cx:t.cx,cy:t.cy,r:a[c],r0:a[f]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,r.add(h)},axisTick:function(r,e,t,n,i,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[um(t)],u=K(n,function(c){return new xr({shape:lm(t,[l,l+s],c.coord)})});r.add(si(u,{style:Ce(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,n,i,a){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[um(t)],c=[],f=0;f<i.length;f++)for(var h=0;h<i[f].length;h++)c.push(new xr({shape:lm(t,[u,u+l],i[f][h].coord)}));r.add(si(c,{style:Ce(s.getModel("lineStyle").getLineStyle(),Ce(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(r,e,t,n,i,a,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),c=e.get("triggerEvent");k(o,function(f,h){var d=l,p=f.tickValue,v=a[um(t)],m=t.coordToPoint([v+u,f.coord]),g=t.cx,y=t.cy,b=Math.abs(m[0]-g)/v<.3?"center":m[0]>g?"left":"right",_=Math.abs(m[1]-y)/v<.3?"middle":m[1]>y?"top":"bottom";if(s&&s[p]){var x=s[p];Me(x)&&x.textStyle&&(d=new _t(x.textStyle,l,l.ecModel))}var w=new ot({silent:hn.isLabelSilent(e),style:Et(d,{x:m[0],y:m[1],fill:d.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:b,verticalAlign:_})});if(r.add(w),c){var S=hn.makeAxisEventDataBase(e);S.targetType="axisLabel",S.value=f.rawLabel,Le(w).eventData=S}},this)},splitLine:function(r,e,t,n,i,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f<n.length;f++){var h=u++%l.length;c[h]=c[h]||[],c[h].push(new xr({shape:lm(t,a,n[f].coord)}))}for(var f=0;f<c.length;f++)r.add(si(c[f],{style:Ce({stroke:l[f%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(r,e,t,n,i,a){if(i.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<i.length;u++)for(var c=0;c<i[u].length;c++)l.push(new xr({shape:lm(t,a,i[u][c].coord)}));r.add(si(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(r,e,t,n,i,a){if(n.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=Math.PI/180,h=-n[0].coord*f,d=Math.min(a[0],a[1]),p=Math.max(a[0],a[1]),v=e.get("clockwise"),m=1,g=n.length;m<=g;m++){var y=m===g?n[0].coord:n[m].coord,b=u++%l.length;c[b]=c[b]||[],c[b].push(new gn({shape:{cx:t.cx,cy:t.cy,r0:d,r:p,startAngle:h,endAngle:-y*f,clockwise:v},silent:!0})),h=-y*f}for(var m=0;m<c.length;m++)r.add(si(c[m],{style:Ce({fill:l[m%l.length]},s.getAreaStyle()),silent:!0}))}}},wxe=["axisLine","axisTickLabel","axisName"],Sxe=["splitLine","splitArea","minorSplitLine"],Txe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n){if(this.group.removeAll(),!!t.get("show")){var i=this._axisGroup,a=this._axisGroup=new Ee;this.group.add(a);var o=t.axis,s=o.polar,l=s.getAngleAxis(),u=o.getTicksCoords(),c=o.getMinorTicksCoords(),f=l.getExtent()[0],h=o.getExtent(),d=Axe(s,t,f),p=new hn(t,d);k(wxe,p.add,p),a.add(p.getGroup()),Mp(i,a,t),k(Sxe,function(v){t.get([v,"show"])&&!o.scale.isBlank()&&Cxe[v](this.group,t,s,f,h,u,c)},this)}},e.type="radiusAxis",e}(ju),Cxe={splitLine:function(r,e,t,n,i,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,c=t.getAngleAxis(),f=Math.PI/180,h=c.getExtent(),d=Math.abs(h[1]-h[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var p=[],v=0;v<a.length;v++){var m=u++%l.length;p[m]=p[m]||[],p[m].push(new Iu[d]({shape:{cx:t.cx,cy:t.cy,r:Math.max(a[v].coord,0),startAngle:-h[0]*f,endAngle:-h[1]*f,clockwise:c.inverse}}))}for(var v=0;v<p.length;v++)r.add(si(p[v],{style:Ce({stroke:l[v%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(r,e,t,n,i,a,o){if(o.length){for(var s=e.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],c=0;c<o.length;c++)for(var f=0;f<o[c].length;f++)u.push(new Eo({shape:{cx:t.cx,cy:t.cy,r:o[c][f].coord}}));r.add(si(u,{style:Ce({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(r,e,t,n,i,a){if(a.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=a[0].coord,h=1;h<a.length;h++){var d=u++%l.length;c[d]=c[d]||[],c[d].push(new gn({shape:{cx:t.cx,cy:t.cy,r0:f,r:a[h].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),f=a[h].coord}for(var h=0;h<c.length;h++)r.add(si(c[h],{style:Ce({fill:l[h%l.length]},s.getAreaStyle()),silent:!0}))}}};function Axe(r,e,t){return{position:[r.cx,r.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function g8(r){return r.get("stack")||"__ec_stack_"+r.seriesIndex}function y8(r,e){return e.dim+r.model.componentIndex}function Mxe(r,e,t){var n={},i=kxe(pt(e.getSeriesByType(r),function(a){return!e.isSeriesFiltered(a)&&a.coordinateSystem&&a.coordinateSystem.type==="polar"}));e.eachSeriesByType(r,function(a){if(a.coordinateSystem.type==="polar"){var o=a.getData(),s=a.coordinateSystem,l=s.getBaseAxis(),u=y8(s,l),c=g8(a),f=i[u][c],h=f.offset,d=f.width,p=s.getOtherAxis(l),v=a.coordinateSystem.cx,m=a.coordinateSystem.cy,g=a.get("barMinHeight")||0,y=a.get("barMinAngle")||0;n[c]=n[c]||[];for(var b=o.mapDimension(p.dim),_=o.mapDimension(l.dim),x=Is(o,b),w=l.dim!=="radius"||!a.get("roundCap",!0),S=p.model,T=S.get("startValue"),C=p.dataToCoord(T||0),A=0,M=o.count();A<M;A++){var D=o.get(b,A),E=o.get(_,A),L=D>=0?"p":"n",I=C;x&&(n[c][E]||(n[c][E]={p:C,n:C}),I=n[c][E][L]);var R=void 0,P=void 0,O=void 0,j=void 0;if(p.dim==="radius"){var F=p.dataToCoord(D)-C,N=l.dataToCoord(E);Math.abs(F)<g&&(F=(F<0?-1:1)*g),R=I,P=I+F,O=N-h,j=O-d,x&&(n[c][E][L]=P)}else{var B=p.dataToCoord(D,w)-C,$=l.dataToCoord(E);Math.abs(B)<y&&(B=(B<0?-1:1)*y),R=$+h,P=R+d,O=I,j=I+B,x&&(n[c][E][L]=j)}o.setItemLayout(A,{cx:v,cy:m,r0:R,r:P,startAngle:-O*Math.PI/180,endAngle:-j*Math.PI/180,clockwise:O>=j})}}})}function kxe(r){var e={};k(r,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=y8(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),f=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=f.stacks;e[l]=f;var d=g8(n);h[d]||f.autoWidthCount++,h[d]=h[d]||{width:0,maxWidth:0};var p=ie(n.get("barWidth"),c),v=ie(n.get("barMaxWidth"),c),m=n.get("barGap"),g=n.get("barCategoryGap");p&&!h[d].width&&(p=Math.min(f.remainedWidth,p),h[d].width=p,f.remainedWidth-=p),v&&(h[d].maxWidth=v),m!=null&&(f.gap=m),g!=null&&(f.categoryGap=g)});var t={};return k(e,function(n,i){t[i]={};var a=n.stacks,o=n.bandWidth,s=ie(n.categoryGap,o),l=ie(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),k(a,function(v,m){var g=v.maxWidth;g&&g<f&&(g=Math.min(g,u),v.width&&(g=Math.min(g,v.width)),u-=g,v.width=g,c--)}),f=(u-s)/(c+(c-1)*l),f=Math.max(f,0);var h=0,d;k(a,function(v,m){v.width||(v.width=f),d=v,h+=v.width*(1+l)}),d&&(h-=d.width*l);var p=-h/2;k(a,function(v,m){t[i][m]=t[i][m]||{offset:p,width:v.width},p+=v.width*(1+l)})}),t}var Dxe={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},Exe={splitNumber:5},Lxe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e}(zt);function Ixe(r){Ue(Vp),ju.registerAxisPointerClass("PolarAxisPointer",sxe),r.registerCoordinateSystem("polar",yxe),r.registerComponentModel(cxe),r.registerComponentView(Lxe),of(r,"angle",fxe,Dxe),of(r,"radius",hxe,Exe),r.registerComponentView(_xe),r.registerComponentView(Txe),r.registerLayout(Oe(Mxe,"bar"))}function gS(r,e){e=e||{};var t=r.coordinateSystem,n=r.axis,i={},a=n.position,o=n.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[o==="vertical"?u.vertical[a]:l[0],o==="horizontal"?u.horizontal[a]:l[3]];var c={horizontal:0,vertical:1};i.rotation=Math.PI/2*c[o];var f={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=f[a],r.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),kr(e.labelInside,r.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var h=e.rotate;return h==null&&(h=r.get(["axisLabel","rotate"])),i.labelRotation=a==="top"?-h:h,i.z2=1,i}var Pxe=["axisLine","axisTickLabel","axisName"],Rxe=["splitArea","splitLine"],Oxe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,n,i,a){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new Ee;var l=gS(t),u=new hn(t,l);k(Pxe,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),k(Rxe,function(c){t.get([c,"show"])&&jxe[c](this,this.group,this._axisGroup,t)},this),Mp(s,this._axisGroup,t),r.prototype.render.call(this,t,n,i,a)},e.prototype.remove=function(){FV(this)},e.type="singleAxis",e}(ju),jxe={splitLine:function(r,e,t,n){var i=n.axis;if(!i.scale.isBlank()){var a=n.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=n.coordinateSystem.getRect(),c=i.isHorizontal(),f=[],h=0,d=i.getTicksCoords({tickModel:a}),p=[],v=[],m=0;m<d.length;++m){var g=i.toGlobalCoord(d[m].coord);c?(p[0]=g,p[1]=u.y,v[0]=g,v[1]=u.y+u.height):(p[0]=u.x,p[1]=g,v[0]=u.x+u.width,v[1]=g);var y=new xr({shape:{x1:p[0],y1:p[1],x2:v[0],y2:v[1]},silent:!0});ef(y.shape,l);var b=h++%s.length;f[b]=f[b]||[],f[b].push(y)}for(var _=o.getLineStyle(["color"]),m=0;m<f.length;++m)e.add(si(f[m],{style:Ce({stroke:s[m%s.length]},_),silent:!0}))}},splitArea:function(r,e,t,n){zV(r,t,n,n)}},Qm=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e}(Qe);cr(Qm,Ip.prototype);var Nxe=function(r){z(e,r);function e(t,n,i,a,o){var s=r.call(this,t,n,i)||this;return s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,n){return this.coordinateSystem.pointToData(t)[0]},e}(Gi),b8=["single"],Bxe=function(){function r(e,t,n){this.type="single",this.dimension="single",this.dimensions=b8,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var i=this.dimension,a=new Nxe(i,c1(e),[0,0],e.get("type"),e.get("position")),o=a.type==="category";a.onBand=o&&e.get("boundaryGap"),a.inverse=e.get("inverse"),a.orient=e.get("orient"),e.axis=a,a.model=e,a.coordinateSystem=this,this._axis=a},r.prototype.update=function(e,t){e.eachSeries(function(n){if(n.coordinateSystem===this){var i=n.getData();k(i.mapDimensionsAll(this.dimension),function(a){this._axis.scale.unionExtentFromData(i,a)},this),nf(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(e,t){this._rect=gr({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),i=n?[0,e.width]:[0,e.height],a=t.inverse?1:0;t.setExtent(i[a],i[1-a]),this._updateAxisTransform(t,n?e.x:e.y)},r.prototype._updateAxisTransform=function(e,t){var n=e.getExtent(),i=n[0]+n[1],a=e.isHorizontal();e.toGlobalCoord=a?function(o){return o+t}:function(o){return i-o+t},e.toLocalCoord=a?function(o){return o-t}:function(o){return i-o+t}},r.prototype.getAxis=function(){return this._axis},r.prototype.getBaseAxis=function(){return this._axis},r.prototype.getAxes=function(){return[this._axis]},r.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},r.prototype.containPoint=function(e){var t=this.getRect(),n=this.getAxis(),i=n.orient;return i==="horizontal"?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),n=this.getRect(),i=[],a=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),i[a]=t.toGlobalCoord(t.dataToCoord(+e)),i[1-a]=a===0?n.y+n.height/2:n.x+n.width/2,i},r.prototype.convertToPixel=function(e,t,n){var i=RO(t);return i===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var i=RO(t);return i===this?this.pointToData(n):null},r}();function RO(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function zxe(r,e){var t=[];return r.eachComponent("singleAxis",function(n,i){var a=new Bxe(n,r,e);a.name="single_"+i,a.resize(n,e),n.coordinateSystem=a,t.push(a)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",lr).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),t}var Fxe={create:zxe,dimensions:b8},OO=["x","y"],Vxe=["width","height"],$xe=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=gx(l,1-Yy(s)),c=l.dataToPoint(n)[0],f=a.get("type");if(f&&f!=="none"){var h=YA(a),d=Hxe[f](s,c,u);d.style=h,t.graphicKey=d.type,t.pointer=d}var p=gS(i);h8(n,t,p,i,a,o)},e.prototype.getHandleTransform=function(t,n,i){var a=gS(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=qA(n.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,i,a){var o=i.axis,s=o.coordinateSystem,l=Yy(o),u=gx(s,l),c=[t.x,t.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=gx(s,1-l),h=(f[1]+f[0])/2,d=[h,h];return d[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},e}(UA),Hxe={line:function(r,e,t){var n=XA([e,t[0]],[e,t[1]],Yy(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=r.getBandWidth(),i=t[1]-t[0];return{type:"Rect",shape:d8([e-n/2,t[0]],[n,i],Yy(r))}}};function Yy(r){return r.isHorizontal()?0:1}function gx(r,e){var t=r.getRect();return[t[OO[e]],t[OO[e]]+t[Vxe[e]]]}var Gxe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(zt);function Wxe(r){Ue(Vp),ju.registerAxisPointerClass("SingleAxisPointer",$xe),r.registerComponentView(Gxe),r.registerComponentView(Oxe),r.registerComponentModel(Qm),of(r,"single",Qm,Qm.defaultOption),r.registerCoordinateSystem("single",Fxe)}var Uxe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,i){var a=Tf(t);r.prototype.init.apply(this,arguments),jO(t,a)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),jO(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Qe);function jO(r,e){var t=r.cellSize,n;q(t)?n=t:n=r.cellSize=[t,t],n.length===1&&(n[1]=n[0]);var i=K([0,1],function(a){return pce(e,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});Ls(r,e,{type:"box",ignoreSize:i})}var Yxe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=this.group;a.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(t,s,a),this._renderLines(t,s,l,a),this._renderYearText(t,s,l,a),this._renderMonthText(t,u,l,a),this._renderWeekText(t,u,s,l,a)},e.prototype._renderDayRect=function(t,n,i){for(var a=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToRect([u],!1).tl,f=new nt({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(f)}},e.prototype._renderLines=function(t,n,i,a){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,h=0;f.time<=n.end.time;h++){p(f.formatedDate),h===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var d=f.date;d.setMonth(d.getMonth()+1),f=s.getDateInfo(d)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(v){o._firstDayOfMonth.push(s.getDateInfo(v)),o._firstDayPoints.push(s.dataToRect([v],!1).tl);var m=o._getLinePointsOfOneWeek(t,v,i);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},e.prototype._getEdgesPoints=function(t,n,i){var a=[t[0].slice(),t[t.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},e.prototype._drawSplitline=function(t,n,i){var a=new bn({z2:20,shape:{points:t},style:n});i.add(a)},e.prototype._getLinePointsOfOneWeek=function(t,n,i){for(var a=t.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToRect([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,n){return se(t)&&t?fce(t,n):Te(t)?t(n):n.nameMap},e.prototype._yearTextPositionControl=function(t,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,n,i,a){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,h=i==="horizontal"?0:1,d={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],f],right:[u[h][0],f]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var v=o.get("formatter"),m={start:n.start.y,end:n.end.y,nameMap:p},g=this._formatterLabel(v,m),y=new ot({z2:30,style:Et(o,{text:g}),silent:o.get("silent")});y.attr(this._yearTextPositionControl(y,d[l],i,l,s)),a.add(y)}},e.prototype._monthTextPositionControl=function(t,n,i,a,o){var s="left",l="top",u=t[0],c=t[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,n,i,a){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||se(s))&&(s&&(n=C2(s)||n),s=n.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,d=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",v=o.get("silent"),m=0;m<f[h].length-1;m++){var g=f[h][m].slice(),y=this._firstDayOfMonth[m];if(p){var b=this._firstDayPoints[m];g[d]=(b[d]+f[0][m+1][d])/2}var _=o.get("formatter"),x=s[+y.m-1],w={yyyy:y.y,yy:(y.y+"").slice(2),MM:y.m,M:+y.m,nameMap:x},S=this._formatterLabel(_,w),T=new ot({z2:30,style:W(Et(o,{text:S}),this._monthTextPositionControl(g,p,i,u,l)),silent:v});a.add(T)}}},e.prototype._weekTextPositionControl=function(t,n,i,a,o){var s="center",l="middle",u=t[0],c=t[1],f=i==="start";return n==="horizontal"?(u=u+a+(f?1:-1)*o[0]/2,s=f?"right":"left"):(c=c+a+(f?1:-1)*o[1]/2,l=f?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,n,i,a,o){var s=t.getModel("dayLabel");if(s.get("show")){var l=t.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),f=s.get("margin"),h=l.getFirstDayOfWeek();if(!c||se(c)){c&&(n=C2(c)||n);var d=n.get(["time","dayOfWeekShort"]);c=d||K(n.get(["time","dayOfWeekAbbr"]),function(w){return w[0]})}var p=l.getNextNDay(i.end.time,7-i.lweek).time,v=[l.getCellWidth(),l.getCellHeight()];f=ie(f,Math.min(v[1],v[0])),u==="start"&&(p=l.getNextNDay(i.start.time,-(7+i.fweek)).time,f=-f);for(var m=s.get("silent"),g=0;g<7;g++){var y=l.getNextNDay(p,g),b=l.dataToRect([y.time],!1).center,_=g;_=Math.abs((g+h)%7);var x=new ot({z2:30,style:W(Et(s,{text:c[_]}),this._weekTextPositionControl(b,a,u,f,v)),silent:m});o.add(x)}}},e.type="calendar",e}(zt),yx=864e5,qxe=function(){function r(e,t,n){this.type="calendar",this.dimensions=r.dimensions,this.getDimensionsInfo=r.getDimensionsInfo,this._model=e}return r.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},r.prototype.getRangeInfo=function(){return this._rangeInfo},r.prototype.getModel=function(){return this._model},r.prototype.getRect=function(){return this._rect},r.prototype.getCellWidth=function(){return this._sw},r.prototype.getCellHeight=function(){return this._sh},r.prototype.getOrient=function(){return this._orient},r.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},r.prototype.getDateInfo=function(e){e=Pa(e);var t=e.getFullYear(),n=e.getMonth()+1,i=n<10?"0"+n:""+n,a=e.getDate(),o=a<10?"0"+a:""+a,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:i,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+i+"-"+o,date:e}},r.prototype.getNextNDay=function(e,t){return t=t||0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},r.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,i=["width","height"],a=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[n,7]:[7,n];k([0,1],function(f){c(a,f)&&(o[i[f]]=a[f]*s[f])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=gr(o,l);k([0,1],function(f){c(a,f)||(a[f]=u[i[f]]/s[f])});function c(f,h){return f[h]!=null&&f[h]!=="auto"}this._sw=a[0],this._sh=a[1]},r.prototype.dataToPoint=function(e,t){q(e)&&(e=e[0]),t==null&&(t=!0);var n=this.getDateInfo(e),i=this._rangeInfo,a=n.formatedDate;if(t&&!(n.time>=i.start.time&&n.time<i.end.time+yx))return[NaN,NaN];var o=n.day,s=this._getRangeInfo([i.start.time,a]).nthWeek;return this._orient==="vertical"?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]:[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},r.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},r.prototype.dataToRect=function(e,t){var n=this.dataToPoint(e,t);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},r.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(n,t-1,i):this._getDateByWeeksAndDay(t,n-1,i)},r.prototype.convertToPixel=function(e,t,n){var i=NO(t);return i===this?i.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var i=NO(t);return i===this?i.pointToData(n):null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(q(e)&&e.length===1&&(e=e[0]),q(e))t=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var i=this.getDateInfo(n),a=i.date;a.setMonth(a.getMonth()+1);var o=this.getNextNDay(a,-1);t=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return e;var s=this._getRangeInfo(t);return s.start.time>s.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var i=Math.floor(t[1].time/yx)-Math.floor(t[0].time/yx)+1,a=new Date(t[0].time),o=a.getDate(),s=t[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-t[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-t[1].time)*u>0;)i-=u,a.setDate(l-u);var c=Math.floor((i+t[0].day+6)/7),f=n?-c+1:c-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:c,nthWeek:f,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,n){var i=this._getRangeInfo(n);if(e>i.weeks||e===0&&t<i.fweek||e===i.weeks&&t>i.lweek)return null;var a=(e-1)*7-i.fweek+t,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},r.create=function(e,t){var n=[];return e.eachComponent("calendar",function(i){var a=new r(i);n.push(a),i.coordinateSystem=a}),e.eachSeries(function(i){i.get("coordinateSystem")==="calendar"&&(i.coordinateSystem=n[i.get("calendarIndex")||0])}),n},r.dimensions=["time","value"],r}();function NO(r){var e=r.calendarModel,t=r.seriesModel,n=e?e.coordinateSystem:t?t.coordinateSystem:null;return n}function Xxe(r){r.registerComponentModel(Uxe),r.registerComponentView(Yxe),r.registerCoordinateSystem("calendar",qxe)}function Kxe(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function BO(r,e){var t;return k(e,function(n){r[n]!=null&&r[n]!=="auto"&&(t=!0)}),t}function Zxe(r,e,t){var n=W({},t),i=r[e],a=t.$action||"merge";a==="merge"?i?(Be(i,n,!0),Ls(i,n,{ignoreSize:!0}),d6(t,i),cm(t,i),cm(t,i,"shape"),cm(t,i,"style"),cm(t,i,"extra"),t.clipPath=i.clipPath):r[e]=n:a==="replace"?r[e]=n:a==="remove"&&i&&(r[e]=null)}var _8=["transition","enterFrom","leaveTo"],Jxe=_8.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function cm(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var n=t?_8:Jxe,i=0;i<n.length;i++){var a=n[i];r[a]==null&&e[a]!=null&&(r[a]=e[a])}}function Qxe(r,e){if(r&&(r.hv=e.hv=[BO(e,["left","right"]),BO(e,["top","bottom"])],r.type==="group")){var t=r,n=e;t.width==null&&(t.width=n.width=0),t.height==null&&(t.height=n.height=0)}}var ewe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,n){var i=this.option.elements;this.option.elements=null,r.prototype.mergeOption.call(this,t,n),this.option.elements=i},e.prototype.optionUpdated=function(t,n){var i=this.option,a=(n?i:t).elements,o=i.elements=n?[]:i.elements,s=[];this._flatten(a,s,null);var l=cz(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];k(l,function(c,f){var h=c.newOption;h&&(u.push(h),Kxe(c,h),Zxe(o,f,h),Qxe(o[f],h))},this),i.elements=pt(o,function(c){return c&&delete c.$action,c!=null})},e.prototype._flatten=function(t,n,i){k(t,function(a){if(a){i&&(a.parentOption=i),n.push(a);var o=a.children;o&&o.length&&this._flatten(o,n,a),delete a.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(Qe),zO={path:null,compoundPath:null,group:Ee,image:Lr,text:ot},ei=it(),twe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=ve()},e.prototype.render=function(t,n,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},e.prototype._updateElements=function(t){var n=t.useElOptionsToUpdate();if(n){var i=this._elMap,a=this.group,o=t.get("z"),s=t.get("zlevel");k(n,function(l){var u=vr(l.id,null),c=u!=null?i.get(u):null,f=vr(l.parentId,null),h=f!=null?i.get(f):a,d=l.type,p=l.style;d==="text"&&p&&l.hv&&l.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var v=l.textContent,m=l.textConfig;if(p&&e8(p,d,!!m,!!v)){var g=t8(p,d,!0);!m&&g.textConfig&&(m=l.textConfig=g.textConfig),!v&&g.textContent&&(v=g.textContent)}var y=rwe(l),b=l.$action||"merge",_=b==="merge",x=b==="replace";if(_){var w=!c,S=c;w?S=FO(u,h,l.type,i):(S&&(ei(S).isNew=!1),a8(S)),S&&(Zm(S,y,t,{isInit:w}),VO(S,l,o,s))}else if(x){eg(c,l,i,t);var T=FO(u,h,l.type,i);T&&(Zm(T,y,t,{isInit:!0}),VO(T,l,o,s))}else b==="remove"&&(n8(c,l),eg(c,l,i,t));var C=i.get(u);if(C&&v)if(_){var A=C.getTextContent();A?A.attr(v):C.setTextContent(new ot(v))}else x&&C.setTextContent(new ot(v));if(C){var M=l.clipPath;if(M){var D=M.type,E=void 0,w=!1;if(_){var L=C.getClipPath();w=!L||ei(L).type!==D,E=w?yS(D):L}else x&&(w=!0,E=yS(D));C.setClipPath(E),Zm(E,M,t,{isInit:w}),Wy(E,M.keyframeAnimation,t)}var I=ei(C);C.setTextConfig(m),I.option=l,nwe(C,t,l),Lu({el:C,componentModel:t,itemName:C.name,itemTooltipOption:l.tooltip}),Wy(C,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,n){for(var i=t.option.elements,a=this.group,o=this._elMap,s=n.getWidth(),l=n.getHeight(),u=["x","y"],c=0;c<i.length;c++){var f=i[c],h=vr(f.id,null),d=h!=null?o.get(h):null;if(!(!d||!d.isGroup)){var p=d.parent,v=p===a,m=ei(d),g=ei(p);m.width=ie(m.option.width,v?s:g.width)||0,m.height=ie(m.option.height,v?l:g.height)||0}}for(var c=i.length-1;c>=0;c--){var f=i[c],h=vr(f.id,null),d=h!=null?o.get(h):null;if(d){var p=d.parent,g=ei(p),y=p===a?{width:s,height:l}:{width:g.width,height:g.height},b={},_=t1(d,f,y,null,{hv:f.hv,boundingMode:f.bounding},b);if(!ei(d).isNew&&_){for(var x=f.transition,w={},S=0;S<u.length;S++){var T=u[S],C=b[T];x&&(ou(x)||He(x,T)>=0)?w[T]=C:d[T]=C}ut(d,w,t,0)}else d.attr(b)}}},e.prototype._clear=function(){var t=this,n=this._elMap;n.each(function(i){eg(i,ei(i).option,n,t._lastGraphicModel)}),this._elMap=ve()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(zt);function yS(r){var e=fe(zO,r)?zO[r]:LC(r),t=new e({});return ei(t).type=r,t}function FO(r,e,t,n){var i=yS(t);return e.add(i),n.set(r,i),ei(i).id=r,ei(i).isNew=!0,i}function eg(r,e,t,n){var i=r&&r.parent;i&&(r.type==="group"&&r.traverse(function(a){eg(a,e,t,n)}),g1(r,e,n),t.removeKey(ei(r).id))}function VO(r,e,t,n){r.isGroup||k([["cursor",mi.prototype.cursor],["zlevel",n||0],["z",t||0],["z2",0]],function(i){var a=i[0];fe(e,a)?r[a]=Re(e[a],i[1]):r[a]==null&&(r[a]=i[1])}),k(et(e),function(i){if(i.indexOf("on")===0){var a=e[i];r[i]=Te(a)?a:null}}),fe(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function rwe(r){return r=W({},r),k(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(h6),function(e){delete r[e]}),r}function nwe(r,e,t){var n=Le(r).eventData;!r.silent&&!r.ignore&&!n&&(n=Le(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),n&&(n.info=t.info)}function iwe(r){r.registerComponentModel(ewe),r.registerComponentView(twe),r.registerPreprocessor(function(e){var t=e.graphic;q(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var $O=["x","y","radius","angle","single"],awe=["cartesian2d","polar","singleAxis"];function owe(r){var e=r.get("coordinateSystem");return He(awe,e)>=0}function vs(r){return r+"Axis"}function swe(r,e){var t=ve(),n=[],i=ve();r.eachComponent({mainType:"dataZoom",query:e},function(c){i.get(c.uid)||s(c)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,d){var p=t.get(h);p&&p[d]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(t.get(f)||t.set(f,[]))[h]=!0})}return n}function x8(r){var e=r.ecModel,t={infoList:[],infoMap:ve()};return r.eachTargetAxis(function(n,i){var a=e.getComponent(vs(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(a)}}}),t}var bx=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),sp=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,n,i){var a=HO(t);this.settledOption=a,this.mergeDefaultAndTheme(t,i),this._doInit(a)},e.prototype.mergeOption=function(t){var n=HO(t);Be(this.option,t,!0),Be(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var i=this.settledOption;k([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),n=this._targetAxisInfoMap=ve(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var n=!1;return k($O,function(i){var a=this.getReferringComponents(vs(i),ele);if(a.specified){n=!0;var o=new bx;k(a.models,function(s){o.add(s.componentIndex)}),t.set(i,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(t,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(f){var h=new bx;if(h.add(f.componentIndex),t.set(c,h),a=!1,c==="x"||c==="y"){var d=f.getReferringComponents("grid",lr).models[0];d&&k(u,function(p){f.componentIndex!==p.componentIndex&&d===p.getReferringComponents("grid",lr).models[0]&&h.add(p.componentIndex)})}}}a&&k($O,function(u){if(a){var c=i.findComponents({mainType:vs(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new bx;f.add(c[0].componentIndex),t.set(u,f),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(n){!t&&(t=n)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var n=this._rangePropMode,i=this.get("rangeMode");k([["start","startValue"],["end","endValue"]],function(a,o){var s=t[a[0]]!=null,l=t[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(n,i){t==null&&(t=this.ecModel.getComponent(vs(n),i))},this),t},e.prototype.eachTargetAxis=function(t,n){this._targetAxisInfoMap.each(function(i,a){k(i.indexList,function(o){t.call(n,a,o)})})},e.prototype.getAxisProxy=function(t,n){var i=this.getAxisModel(t,n);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(t,n){var i=this._targetAxisInfoMap.get(t);if(i&&i.indexMap[n])return this.ecModel.getComponent(vs(t),n)},e.prototype.setRawRange=function(t){var n=this.option,i=this.settledOption;k([["start","startValue"],["end","endValue"]],function(a){(t[a[0]]!=null||t[a[1]]!=null)&&(n[a[0]]=i[a[0]]=t[a[0]],n[a[1]]=i[a[1]]=t[a[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var n=this.option;k(["start","startValue","end","endValue"],function(i){n[i]=t[i]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,n){if(t==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(t,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;a<i.length;a++)for(var o=i[a],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;n||(n=u)}return n},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e}(Qe);function HO(r){var e={};return k(["start","end","startValue","endValue","throttle"],function(t){r.hasOwnProperty(t)&&(e[t]=r[t])}),e}var lwe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(sp),QA=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i,a){this.dataZoomModel=t,this.ecModel=n,this.api=i},e.type="dataZoom",e}(zt),uwe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(QA),Tc=k,GO=ci,cwe=function(){function r(e,t,n,i){this._dimName=e,this._axisIndex=t,this.ecModel=i,this._dataZoomModel=n}return r.prototype.hostedBy=function(e){return this._dataZoomModel===e},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(owe(t)){var n=vs(this._dimName),i=t.getReferringComponents(n,lr).models[0];i&&this._axisIndex===i.componentIndex&&e.push(t)}},this),e},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return ke(this._minMaxSpan)},r.prototype.calculateDataWindow=function(e){var t=this._dataExtent,n=this.getAxisModel(),i=n.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;Tc(["start","end"],function(h,d){var p=e[h],v=e[h+"Value"];a[d]==="percent"?(p==null&&(p=o[d]),v=i.parse(bt(p,o,t))):(u=!0,v=v==null?t[d]:i.parse(v),p=bt(v,t,o)),l[d]=v==null||isNaN(v)?t[d]:v,s[d]=p==null||isNaN(p)?o[d]:p}),GO(l),GO(s);var c=this._minMaxSpan;u?f(l,s,t,o,!1):f(s,l,o,t,!0);function f(h,d,p,v,m){var g=m?"Span":"ValueSpan";Nu(0,h,p,"all",c["min"+g],c["max"+g]);for(var y=0;y<2;y++)d[y]=bt(h[y],p,v,!0),m&&(d[y]=i.parse(d[y]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=fwe(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var n=this._dimName,i=this.getTargetSeriesModels(),a=e.get("filterMode"),o=this._valueWindow;if(a==="none")return;Tc(i,function(l){var u=l.getData(),c=u.mapDimensionsAll(n);if(c.length){if(a==="weakFilter"){var f=u.getStore(),h=K(c,function(d){return u.getDimensionIndex(d)},u);u.filterSelf(function(d){for(var p,v,m,g=0;g<c.length;g++){var y=f.get(h[g],d),b=!isNaN(y),_=y<o[0],x=y>o[1];if(b&&!_&&!x)return!0;b&&(m=!0),_&&(p=!0),x&&(v=!0)}return m&&p&&v})}else Tc(c,function(d){if(a==="empty")l.setData(u=u.map(d,function(v){return s(v)?v:NaN}));else{var p={};p[d]=o,u.selectRange(p)}});Tc(c,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;Tc(["min","max"],function(i){var a=t.get(i+"Span"),o=t.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=bt(n[0]+o,n,[0,100],!0):a!=null&&(o=bt(a,[0,100],n,!0)-n[0]),e[i+"Span"]=a,e[i+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var i=rz(n,[0,500]);i=Math.min(i,20);var a=e.axis.scale.rawExtentInfo;t[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),t[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},r}();function fwe(r,e,t){var n=[1/0,-1/0];Tc(t,function(o){Gde(n,o.getData(),e)});var i=r.getAxisModel(),a=zF(i.axis.scale,i,n).calculate();return[a.min,a.max]}var hwe={getTargetSeries:function(r){function e(i){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(vs(o),s);i(o,s,l,a)})})}e(function(i,a,o,s){o.__dzAxisProxy=null});var t=[];e(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new cwe(i,a,s,r),t.push(o.__dzAxisProxy))});var n=ve();return k(t,function(i){k(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(n,i){t.getAxisProxy(n,i).reset(t)}),t.eachTargetAxis(function(n,i){t.getAxisProxy(n,i).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var n=t.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function dwe(r){r.registerAction("dataZoom",function(e,t){var n=swe(t,e);k(n,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var WO=!1;function eM(r){WO||(WO=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,hwe),dwe(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function pwe(r){r.registerComponentModel(lwe),r.registerComponentView(uwe),eM(r)}var ii=function(){function r(){}return r}(),w8={};function Cc(r,e){w8[r]=e}function S8(r){return w8[r]}var vwe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;k(this.option.feature,function(n,i){var a=S8(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(t)),Be(n,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(Qe);function mwe(r,e,t){var n=e.getBoxLayoutParams(),i=e.get("padding"),a={width:t.getWidth(),height:t.getHeight()},o=gr(n,a,i);iu(e.get("orient"),r,e.get("itemGap"),o.width,o.height),t1(r,n,a,i)}function T8(r,e){var t=Sf(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),r=new nt({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1}),r}var gwe=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,i,a){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},c=this._features||(this._features={}),f=[];k(u,function(p,v){f.push(v)}),new To(this._featureNames||[],f).add(h).update(h).remove(Oe(h,null)).execute(),this._featureNames=f;function h(p,v){var m=f[p],g=f[v],y=u[m],b=new _t(y,t,t.ecModel),_;if(a&&a.newTitle!=null&&a.featureName===m&&(y.title=a.newTitle),m&&!g){if(ywe(m))_={onclick:b.option.onclick,featureName:m};else{var x=S8(m);if(!x)return;_=new x}c[m]=_}else if(_=c[g],!_)return;_.uid=wf("toolbox-feature"),_.model=b,_.ecModel=n,_.api=i;var w=_ instanceof ii;if(!m&&g){w&&_.dispose&&_.dispose(n,i);return}if(!b.get("show")||w&&_.unusable){w&&_.remove&&_.remove(n,i);return}d(b,_,m),b.setIconStatus=function(S,T){var C=this.option,A=this.iconPaths;C.iconStatus=C.iconStatus||{},C.iconStatus[S]=T,A[S]&&(T==="emphasis"?wo:So)(A[S])},_ instanceof ii&&_.render&&_.render(b,n,i,a)}function d(p,v,m){var g=p.getModel("iconStyle"),y=p.getModel(["emphasis","iconStyle"]),b=v instanceof ii&&v.getIcons?v.getIcons():p.get("icon"),_=p.get("title")||{},x,w;se(b)?(x={},x[m]=b):x=b,se(_)?(w={},w[m]=_):w=_;var S=p.iconPaths={};k(x,function(T,C){var A=kp(T,{},{x:-s/2,y:-s/2,width:s,height:s});A.setStyle(g.getItemStyle());var M=A.ensureState("emphasis");M.style=y.getItemStyle();var D=new ot({style:{text:w[C],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null,font:IC({fontStyle:y.get("textFontStyle"),fontFamily:y.get("textFontFamily"),fontSize:y.get("textFontSize"),fontWeight:y.get("textFontWeight")},n)},ignore:!0});A.setTextContent(D),Lu({el:A,componentModel:t,itemName:C,formatterParamsExtra:{title:w[C]}}),A.__title=w[C],A.on("mouseover",function(){var E=y.getItemStyle(),L=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";D.setStyle({fill:y.get("textFill")||E.fill||E.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),A.setTextConfig({position:y.get("textPosition")||L}),D.ignore=!t.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",C])!=="emphasis"&&i.leaveEmphasis(this),D.hide()}),(p.get(["iconStatus",C])==="emphasis"?wo:So)(A),o.add(A),A.on("click",ue(v.onclick,v,n,i,C)),S[C]=A})}mwe(o,t,i),o.add(T8(o.getBoundingRect(),t)),l||o.eachChild(function(p){var v=p.__title,m=p.ensureState("emphasis"),g=m.textConfig||(m.textConfig={}),y=p.getTextContent(),b=y&&y.ensureState("emphasis");if(b&&!Te(b)&&v){var _=b.style||(b.style={}),x=xp(v,ot.makeFont(_)),w=p.x+o.x,S=p.y+o.y+s,T=!1;S+x.height>i.getHeight()&&(g.position="top",T=!0);var C=T?-5-x.height:s+10;w+x.width/2>i.getWidth()?(g.position=["100%",C],_.align="right"):w-x.width/2<0&&(g.position=[0,C],_.align="left")}})},e.prototype.updateView=function(t,n,i,a){k(this._features,function(o){o instanceof ii&&o.updateView&&o.updateView(o.model,n,i,a)})},e.prototype.remove=function(t,n){k(this._features,function(i){i instanceof ii&&i.remove&&i.remove(t,n)}),this.group.removeAll()},e.prototype.dispose=function(t,n){k(this._features,function(i){i instanceof ii&&i.dispose&&i.dispose(t,n)})},e.type="toolbox",e}(zt);function ywe(r){return r.indexOf("my")===0}var bwe=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){var i=this.model,a=i.get("name")||t.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Ze.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),d=h[0].indexOf("base64")>-1,p=o?decodeURIComponent(h[1]):h[1];d&&(p=window.atob(p));var v=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=p.length,g=new Uint8Array(m);m--;)g[m]=p.charCodeAt(m);var y=new Blob([g]);window.navigator.msSaveOrOpenBlob(y,v)}else{var b=document.createElement("iframe");document.body.appendChild(b);var _=b.contentWindow,x=_.document;x.open("image/svg+xml","replace"),x.write(p),x.close(),_.focus(),x.execCommand("SaveAs",!0,v),document.body.removeChild(b)}}else{var w=i.get("lang"),S='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(w&&w[0]||"")+'" /></body>',T=window.open();T.document.write(S),T.document.title=a}},e.getDefaultOption=function(t){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(ii),UO="__ec_magicType_stack__",_we=[["line","bar"],["stack"]],xwe=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,n=t.get("icon"),i={};return k(t.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},e.getDefaultOption=function(t){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(t,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(YO[i]){var s={series:[]},l=function(f){var h=f.subType,d=f.id,p=YO[i](h,d,f,a);p&&(Ce(p,f.option),s.series.push(p));var v=f.coordinateSystem;if(v&&v.type==="cartesian2d"&&(i==="line"||i==="bar")){var m=v.getAxesByScale("ordinal")[0];if(m){var g=m.dim,y=g+"Axis",b=f.getReferringComponents(y,lr).models[0],_=b.componentIndex;s[y]=s[y]||[];for(var x=0;x<=_;x++)s[y][_]=s[y][_]||{};s[y][_].boundaryGap=i==="bar"}}};k(_we,function(f){He(f,i)>=0&&k(f,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=Be({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(ii),YO={line:function(r,e,t,n){if(r==="bar")return Be({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,e,t,n){if(r==="line")return Be({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,e,t,n){var i=t.get("stack")===UO;if(r==="line"||r==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),Be({id:e,stack:i?"":UO},n.get(["option","stack"])||{},!0)}};za({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var y1=new Array(60).join("-"),uf=" ";function wwe(r){var e={},t=[],n=[];return r.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else t.push(i)}else t.push(i)}),{seriesGroupByCategoryAxis:e,other:t,meta:n}}function Swe(r){var e=[];return k(r,function(t,n){var i=t.categoryAxis,a=t.valueAxis,o=a.dim,s=[" "].concat(K(t.series,function(d){return d.name})),l=[i.model.getCategories()];k(t.series,function(d){var p=d.getRawData();l.push(d.getRawData().mapArray(p.mapDimension(o),function(v){return v}))});for(var u=[s.join(uf)],c=0;c<l[0].length;c++){for(var f=[],h=0;h<l.length;h++)f.push(l[h][c]);u.push(f.join(uf))}e.push(u.join(`
|
||
`))}),e.join(`
|
||
|
||
`+y1+`
|
||
|
||
`)}function Twe(r){return K(r,function(e){var t=e.getRawData(),n=[e.name],i=[];return t.each(t.dimensions,function(){for(var a=arguments.length,o=arguments[a-1],s=t.getName(o),l=0;l<a-1;l++)i[l]=arguments[l];n.push((s?s+uf:"")+i.join(uf))}),n.join(`
|
||
`)}).join(`
|
||
|
||
`+y1+`
|
||
|
||
`)}function Cwe(r){var e=wwe(r);return{value:pt([Swe(e.seriesGroupByCategoryAxis),Twe(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(`
|
||
|
||
`+y1+`
|
||
|
||
`),meta:e.meta}}function qy(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Awe(r){var e=r.slice(0,r.indexOf(`
|
||
`));if(e.indexOf(uf)>=0)return!0}var bS=new RegExp("["+uf+"]+","g");function Mwe(r){for(var e=r.split(/\n+/g),t=qy(e.shift()).split(bS),n=[],i=K(t,function(l){return{name:l,data:[]}}),a=0;a<e.length;a++){var o=qy(e[a]).split(bS);n.push(o.shift());for(var s=0;s<o.length;s++)i[s]&&(i[s].data[a]=o[s])}return{series:i,categories:n}}function kwe(r){for(var e=r.split(/\n+/g),t=qy(e.shift()),n=[],i=0;i<e.length;i++){var a=qy(e[i]);if(a){var o=a.split(bS),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),n[i]={name:s,value:[]},l=n[i].value):l=n[i]=[];for(var c=0;c<o.length;c++)l.push(+o[c]);l.length===1&&(u?n[i].value=l[0]:n[i]=l[0])}}return{name:t,data:n}}function Dwe(r,e){var t=r.split(new RegExp(`
|
||
*`+y1+`
|
||
*`,"g")),n={series:[]};return k(t,function(i,a){if(Awe(i)){var o=Mwe(i),s=e[a],l=s.axisDim+"Axis";s&&(n[l]=n[l]||[],n[l][s.axisIndex]={data:o.categories},n.series=n.series.concat(o.series))}else{var o=kwe(i);n.series.push(o)}}),n}var Ewe=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){setTimeout(function(){n.dispatchAction({type:"hideTip"})});var i=n.getDom(),a=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=a.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=a.get("lang")||[];s.innerHTML=l[0]||a.get("title"),s.style.cssText="margin:10px 20px",s.style.color=a.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var f=a.get("optionToContent"),h=a.get("contentToOption"),d=Cwe(t);if(Te(f)){var p=f(n.getOption());se(p)?u.innerHTML=p:Jc(p)&&u.appendChild(p)}else{c.readOnly=a.get("readOnly");var v=c.style;v.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",v.color=a.get("textColor"),v.borderColor=a.get("textareaBorderColor"),v.backgroundColor=a.get("textareaColor"),c.value=d.value,u.appendChild(c)}var m=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:5px;left:0;right:0";var y="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",b=document.createElement("div"),_=document.createElement("div");y+=";background-color:"+a.get("buttonColor"),y+=";color:"+a.get("buttonTextColor");var x=this;function w(){i.removeChild(o),x._dom=null}Zw(b,"click",w),Zw(_,"click",function(){if(h==null&&f!=null||h!=null&&f==null){w();return}var S;try{Te(h)?S=h(u,n.getOption()):S=Dwe(c.value,m)}catch(T){throw w(),new Error("Data view format error "+T)}S&&n.dispatchAction({type:"changeDataView",newOption:S}),w()}),b.innerHTML=l[1],_.innerHTML=l[2],_.style.cssText=b.style.cssText=y,!a.get("readOnly")&&g.appendChild(_),g.appendChild(b),o.appendChild(s),o.appendChild(u),o.appendChild(g),u.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},e.prototype.remove=function(t,n){this._dom&&n.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.getDefaultOption=function(t){var n={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return n},e}(ii);function Lwe(r,e){return K(r,function(t,n){var i=e&&e[n];if(Me(i)&&!q(i)){var a=Me(t)&&!q(t);a||(t={value:t});var o=i.name!=null&&t.name==null;return t=Ce(t,i),o&&delete t.name,t}else return t})}za({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,e){var t=[];k(r.newOption.series,function(n){var i=e.getSeriesByName(n.name)[0];if(!i)t.push(W({type:"scatter"},n));else{var a=i.get("data");t.push({name:n.name,data:Lwe(n.data,a)})}}),e.mergeOption(Ce({series:t},r.newOption))});var C8=k,A8=it();function Iwe(r,e){var t=tM(r);C8(e,function(n,i){for(var a=t.length-1;a>=0;a--){var o=t[a];if(o[i])break}if(a<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();t[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),t.push(e)}function Pwe(r){var e=tM(r),t=e[e.length-1];e.length>1&&e.pop();var n={};return C8(t,function(i,a){for(var o=e.length-1;o>=0;o--)if(i=e[o][a],i){n[a]=i;break}}),n}function Rwe(r){A8(r).snapshots=null}function Owe(r){return tM(r).length}function tM(r){var e=A8(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var jwe=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){Rwe(t),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return n},e}(ii);za({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var Nwe=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],rM=function(){function r(e,t,n){var i=this;this._targetInfoList=[];var a=qO(t,e);k(Bwe,function(o,s){(!n||!n.include||He(n.include,s)>=0)&&o(a,i._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=_x[n.brushType](0,a,i);n.__rangeOffset={offset:JO[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,n){k(e,function(i){var a=this.findTargetInfo(i,t);a&&a!==!0&&k(a.coordSyses,function(o){var s=_x[i.brushType](1,o,i.range,!0);n(i,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){k(e,function(n){var i=this.findTargetInfo(n,t);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=_x[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?JO[n.brushType](a.values,o.offset,zwe(a.xyMinMax,o.xyMinMax)):a.values}},this)},r.prototype.makePanelOpts=function(e,t){return K(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:R$(i),isTargetByCursor:j$(i,e,n.coordSysModel),getLinearBrushOtherExtent:O$(i)}})},r.prototype.controlSeries=function(e,t,n){var i=this.findTargetInfo(e,n);return i===!0||i&&He(i.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,i=qO(t,e),a=0;a<n.length;a++){var o=n[a],s=e.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<XO.length;l++)if(XO[l](i,o))return o}return!0},r}();function _S(r){return r[0]>r[1]&&r.reverse(),r}function qO(r,e){return sd(r,e,{includeMainTypes:Nwe})}var Bwe={grid:function(r,e){var t=r.xAxisModels,n=r.yAxisModels,i=r.gridModels,a=ve(),o={},s={};!t&&!n&&!i||(k(t,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),k(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),k(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];k(u.getCartesians(),function(f,h){(He(t,f.getAxis("x").model)>=0||He(n,f.getAxis("y").model)>=0)&&c.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:KO.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){k(r.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:KO.geo})})}},XO=[function(r,e){var t=r.xAxisModel,n=r.yAxisModel,i=r.gridModel;return!i&&t&&(i=t.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],KO={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(nu(r)),e}},_x={lineX:Oe(ZO,0),lineY:Oe(ZO,1),rect:function(r,e,t,n){var i=r?e.pointToData([t[0][0],t[1][0]],n):e.dataToPoint([t[0][0],t[1][0]],n),a=r?e.pointToData([t[0][1],t[1][1]],n):e.dataToPoint([t[0][1],t[1][1]],n),o=[_S([i[0],a[0]]),_S([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=K(t,function(o){var s=r?e.pointToData(o,n):e.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function ZO(r,e,t,n){var i=t.getAxis(["x","y"][r]),a=_S(K([0,1],function(s){return e?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[r]=a,o[1-r]=[NaN,NaN],{values:a,xyMinMax:o}}var JO={lineX:Oe(QO,0),lineY:Oe(QO,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return K(r,function(n,i){return[n[0]-t[0]*e[i][0],n[1]-t[1]*e[i][1]]})}};function QO(r,e,t,n){return[e[0]-n[r]*t[0],e[1]-n[r]*t[1]]}function zwe(r,e){var t=ej(r),n=ej(e),i=[t[0]/n[0],t[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function ej(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var xS=k,Fwe=Xse("toolbox-dataZoom_"),Vwe=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,i,a){this._brushController||(this._brushController=new DA(i.getZr()),this._brushController.on("brush",ue(this._onBrush,this)).mount()),Gwe(t,n,this,a,i),Hwe(t,n)},e.prototype.onclick=function(t,n,i){$we[i].call(this)},e.prototype.remove=function(t,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var n=t.areas;if(!t.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new rM(nM(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,f){if(f.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[h],f,c)}}),Iwe(a,i),this._dispatchZoomAction(i);function s(u,c,f){var h=c.getAxis(u),d=h.model,p=l(u,d,a),v=p.findRepresentativeAxisProxy(d).getMinMaxSpan();(v.minValueSpan!=null||v.maxValueSpan!=null)&&(f=Nu(0,f.slice(),h.scale.getExtent(),0,v.minValueSpan,v.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var h;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var p=d.getAxisModel(u,c.componentIndex);p&&(h=d)}),h}},e.prototype._dispatchZoomAction=function(t){var n=[];xS(t,function(i,a){n.push(ke(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(t){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return n},e}(ii),$we={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(Pwe(this.ecModel))}};function nM(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function Hwe(r,e){r.setIconStatus("back",Owe(e)>1?"emphasis":"normal")}function Gwe(r,e,t,n,i){var a=t._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),t._isZoomActive=a,r.setIconStatus("zoom",a?"emphasis":"normal");var o=new rM(nM(r),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}_ce("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var n=e.getModel(t),i=[],a=nM(n),o=sd(r,a);xS(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),xS(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:Fwe+u+f};h[c]=f,i.push(h)}return i});function Wwe(r){r.registerComponentModel(vwe),r.registerComponentView(gwe),Cc("saveAsImage",bwe),Cc("magicType",xwe),Cc("dataView",Ewe),Cc("dataZoom",Vwe),Cc("restore",jwe),Ue(pwe)}var Uwe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.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}},e}(Qe);function M8(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function k8(r){if(Ze.domSupported){for(var e=document.documentElement.style,t=0,n=r.length;t<n;t++)if(r[t]in e)return r[t]}}var D8=k8(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ywe=k8(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function E8(r,e){if(!r)return e;e=c6(e,!0);var t=r.indexOf(e);return r=t===-1?e:"-"+r.slice(0,t)+"-"+e,r.toLowerCase()}function qwe(r,e){var t=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return t?t[e]:null}var Xwe=E8(Ywe,"transition"),iM=E8(D8,"transform"),Kwe="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Ze.transform3dSupported?"will-change:transform;":"");function Zwe(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function Jwe(r,e,t){if(!se(t)||t==="inside")return"";var n=r.get("backgroundColor"),i=r.get("borderWidth");e=yu(e);var a=Zwe(t),o=Math.max(Math.round(i)*1.5,6),s="",l=iM+":",u;He(["left","right"],a)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+i,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),d=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-f)/2)*100)/100;s+=";"+a+":-"+d+"px";var p=e+" solid "+i+"px;",v=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'<div style="'+v.join("")+'"></div>'}function Qwe(r,e){var t="cubic-bezier(0.23,1,0.32,1)",n=" "+r/2+"s "+t,i="opacity"+n+",visibility"+n;return e||(n=" "+r+"s "+t,i+=Ze.transformSupported?","+iM+n:",left"+n+",top"+n),Xwe+":"+i}function tj(r,e,t){var n=r.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!Ze.transformSupported)return t?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Ze.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return t?"top:0;left:0;"+iM+":"+o+";":[["top",0],["left",0],[D8,o]]}function e2e(r){var e=[],t=r.get("fontSize"),n=r.getTextColor();n&&e.push("color:"+n),e.push("font:"+r.getFont());var i=Re(r.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+i+"px");var a=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return a&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),k(["decoration","align"],function(u){var c=r.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function t2e(r,e,t){var n=[],i=r.get("transitionDuration"),a=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),c=r.getModel("textStyle"),f=G6(r,"html"),h=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+h),e&&i&&n.push(Qwe(i,t)),a&&n.push("background-color:"+a),k(["width","color","radius"],function(d){var p="border-"+d,v=c6(p),m=r.get(v);m!=null&&n.push(p+":"+m+(d==="color"?"":"px"))}),n.push(e2e(c)),f!=null&&n.push("padding:"+Sf(f).join("px ")+"px"),n.join(";")+";"}function rj(r,e,t,n,i){var a=e&&e.painter;if(t){var o=a&&a.getViewportRoot();o&&Moe(r,o,t,n,i)}else{r[0]=n,r[1]=i;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var r2e=function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ze.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),a=t.appendTo,o=a&&(se(a)?document.querySelector(a):Jc(a)?a:Te(a)&&a(e.getDom()));rj(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();Zn(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=qwe(t,"position"),i=t.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=Kwe+t2e(e,!this._firstShow,this._longHide)+tj(a[0],a[1],!0)+("border-color:"+yu(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(se(a)&&n.get("trigger")==="item"&&!M8(n)&&(s=Jwe(n,i,a)),se(e))o.innerHTML=e+s;else if(e){o.innerHTML="",q(e)||(e=[e]);for(var l=0;l<e.length;l++)Jc(e[l])&&e[l].parentNode!==o&&o.appendChild(e[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},r.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(rj(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var i=this.el.style,a=tj(n[0],n[1]);k(a,function(o){i[o[0]]=o[1]})}}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",Ze.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ue(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},r}(),n2e=function(){function r(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),ij(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return r.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(e,t,n,i,a){var o=this;Me(e)&&dt(""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new ot({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:G6(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),k(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),k(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=nj(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},r.prototype.moveTo=function(e,t){var n=this.el;if(n){var i=this._styleCoord;ij(i,this._zr,e,t),e=i[0],t=i[1];var a=n.style,o=qo(a.borderWidth||0),s=nj(a);n.x=e+o+s.left,n.y=t+o+s.top,n.markRedraw()}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ue(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r}();function qo(r){return Math.max(0,r)}function nj(r){var e=qo(r.shadowBlur||0),t=qo(r.shadowOffsetX||0),n=qo(r.shadowOffsetY||0);return{left:qo(e-t),right:qo(e+t),top:qo(e-n),bottom:qo(e+n)}}function ij(r,e,t,n){r[0]=t,r[1]=n,r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var i2e=new nt({shape:{x:-1,y:-1,width:2,height:2}}),a2e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){if(!(Ze.node||!n.getDom())){var i=t.getComponent("tooltip"),a=this._renderMode=rle(i.get("renderMode"));this._tooltipContent=a==="richText"?new n2e(n):new r2e(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},e.prototype.render=function(t,n,i){if(!(Ze.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=n,this._api=i;var a=this._tooltipContent;a.update(t),a.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?Mf(this,"_updatePosition",50,"fixRate"):qd(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,n=t.get("triggerOn");p8("itemTooltip",this._api,ue(function(i,a,o){n!=="none"&&(n.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,n=this._ecModel,i=this._api,a=t.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(t,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,n,i,a){if(!(a.from===this.uid||Ze.node||!i.getDom())){var o=aj(a,i);this._ticket="";var s=a.dataByCoordSys,l=u2e(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=i2e;c.x=a.x,c.y=a.y,c.update(),Le(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},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(t,n,i,a))return;var f=v8(a,n),h=f.point[0],d=f.point[1];h!=null&&d!=null&&this._tryShow({offsetX:h,offsetY:d,target:f.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))}},e.prototype.manuallyHideTip=function(t,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(aj(a,i))},e.prototype._manuallyAxisShowTip=function(t,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),f=vh([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(t,n){var i=t.target,a=this._tooltipModel;if(a){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(i){var s=Le(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Ol(i,function(c){if(Le(c).dataIndex!=null)return l=c,!0;if(Le(c).tooltipConfig!=null)return u=c,!0},!0),l?this._showSeriesItemTooltip(t,l,n):u?this._showComponentItemTooltip(t,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(t,n){var i=t.get("showDelay");n=ue(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(t,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=vh([n.tooltipOption],a),l=this._renderMode,u=[],c=Cr("section",{blocks:[],noHeader:!0}),f=[],h=new o_;k(t,function(y){k(y.dataByAxis,function(b){var _=i.getComponent(b.axisDim+"Axis",b.axisIndex),x=b.value;if(!(!_||x==null)){var w=f8(x,_.axis,i,b.seriesDataIndices,b.valueLabelOpt),S=Cr("section",{header:w,noHeader:!Li(w),sortBlocks:!0,blocks:[]});c.blocks.push(S),k(b.seriesDataIndices,function(T){var C=i.getSeriesByIndex(T.seriesIndex),A=T.dataIndexInside,M=C.getDataParams(A);if(!(M.dataIndex<0)){M.axisDim=b.axisDim,M.axisIndex=b.axisIndex,M.axisType=b.axisType,M.axisId=b.axisId,M.axisValue=nA(_.axis,{value:x}),M.axisValueLabel=w,M.marker=h.makeTooltipMarker("item",yu(M.color),l);var D=UL(C.formatTooltip(A,!0,null)),E=D.frag;if(E){var L=vh([C],a).get("valueFormatter");S.blocks.push(L?W({valueFormatter:L},E):E)}D.text&&f.push(D.text),u.push(M)}})}})}),c.blocks.reverse(),f.reverse();var d=n.position,p=s.get("order"),v=JL(c,h,l,p,i.get("useUTC"),s.get("textStyle"));v&&f.unshift(v);var m=l==="richText"?`
|
||
|
||
`:"<br/>",g=f.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],d,null,h)})},e.prototype._showSeriesItemTooltip=function(t,n,i){var a=this._ecModel,o=Le(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),d=this._renderMode,p=t.positionDefault,v=vh([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),m=v.get("trigger");if(!(m!=null&&m!=="item")){var g=u.getDataParams(c,f),y=new o_;g.marker=y.makeTooltipMarker("item",yu(g.color),d);var b=UL(u.formatTooltip(c,!1,f)),_=v.get("order"),x=v.get("valueFormatter"),w=b.frag,S=w?JL(x?W({valueFormatter:x},w):w,y,d,_,a.get("useUTC"),v.get("textStyle")):b.text,T="item_"+u.name+"_"+c;this._showOrMove(v,function(){this._showTooltipContent(v,S,g,T,t.offsetX,t.offsetY,t.position,t.target,y)}),i({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,n,i){var a=this._renderMode==="html",o=Le(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(se(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=ke(l),l.content=un(l.content));var f=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&f.push(h),f.push({formatter:l.content});var d=t.positionDefault,p=vh(f,this._tooltipModel,d?{position:d}:null),v=p.get("content"),m=Math.random()+"",g=new o_;this._showOrMove(p,function(){var y=ke(p.get("formatterParams")||{});this._showTooltipContent(p,v,y,m,t.offsetX,t.offsetY,t.position,n,g)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,n,i,a,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var h=t.get("formatter");l=l||t.get("position");var d=n,p=this._getNearestPoint([o,s],i,t.get("trigger"),t.get("borderColor")),v=p.color;if(h)if(se(h)){var m=t.ecModel.get("useUTC"),g=q(i)?i[0]:i,y=g&&g.axisType&&g.axisType.indexOf("time")>=0;d=h,y&&(d=K0(g.axisValue,d,m)),d=f6(d,i,!0)}else if(Te(h)){var b=ue(function(_,x){_===this._ticket&&(f.setContent(x,c,t,v,l),this._updatePosition(t,l,o,s,f,i,u))},this);this._ticket=a,d=h(i,a,b)}else d=h;f.setContent(d,c,t,v,l),f.show(t,v),this._updatePosition(t,l,o,s,f,i,u)}},e.prototype._getNearestPoint=function(t,n,i,a){if(i==="axis"||q(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!q(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(t,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||t.get("position");var f=o.getSize(),h=t.get("align"),d=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),Te(n)&&(n=n([i,a],s,o.el,p,{viewSize:[u,c],contentSize:f.slice()})),q(n))i=ie(n[0],u),a=ie(n[1],c);else if(Me(n)){var v=n;v.width=f[0],v.height=f[1];var m=gr(v,{width:u,height:c});i=m.x,a=m.y,h=null,d=null}else if(se(n)&&l){var g=l2e(n,p,f,t.get("borderWidth"));i=g[0],a=g[1]}else{var g=o2e(i,a,o,u,c,h?null:20,d?null:20);i=g[0],a=g[1]}if(h&&(i-=oj(h)?f[0]/2:h==="right"?f[0]:0),d&&(a-=oj(d)?f[1]/2:d==="bottom"?f[1]:0),M8(t)){var g=s2e(i,a,o,u,c);i=g[0],a=g[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(t,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===t.length;return o&&k(i,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&k(u,function(h,d){var p=f[d]||{},v=h.seriesDataIndices||[],m=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&v.length===m.length,o&&k(v,function(g,y){var b=m[y];o=o&&g.seriesIndex===b.seriesIndex&&g.dataIndex===b.dataIndex}),a&&k(h.seriesDataIndices,function(g){var y=g.seriesIndex,b=n[y],_=a[y];b&&_&&_.data!==b.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=n,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,n){Ze.node||!n.getDom()||(qd(this,"_updatePosition"),this._tooltipContent.dispose(),mS("itemTooltip",n))},e.type="tooltip",e}(zt);function vh(r,e,t){var n=e.ecModel,i;t?(i=new _t(t,n,n),i=new _t(e.option,i,n)):i=e;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof _t&&(o=o.get("tooltip",!0)),se(o)&&(o={formatter:o}),o&&(i=new _t(o,i,n)))}return i}function aj(r,e){return r.dispatchAction||ue(e.dispatchAction,e)}function o2e(r,e,t,n,i,a,o){var s=t.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>n?r-=l+a:r+=a),o!=null&&(e+u+o>i?e-=u+o:e+=o),[r,e]}function s2e(r,e,t,n,i){var a=t.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,n)-o,e=Math.min(e+s,i)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function l2e(r,e,t,n){var i=t[0],a=t[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(r){case"inside":s=e.x+u/2-i/2,l=e.y+c/2-a/2;break;case"top":s=e.x+u/2-i/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+c+o;break;case"left":s=e.x-i-o,l=e.y+c/2-a/2;break;case"right":s=e.x+u+o,l=e.y+c/2-a/2}return[s,l]}function oj(r){return r==="center"||r==="middle"}function u2e(r,e,t){var n=bC(r).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=wp(e,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=Le(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function c2e(r){Ue(Vp),r.registerComponentModel(Uwe),r.registerComponentView(a2e),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},tr),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},tr)}var f2e=["rect","polygon","keep","clear"];function h2e(r,e){var t=wt(r?r.brush:[]);if(t.length){var n=[];k(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=r&&r.toolbox;q(i)&&(i=i[0]),i||(i={feature:{}},r.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),d2e(s),e&&!s.length&&s.push.apply(s,f2e)}}function d2e(r){var e={};k(r,function(t){e[t]=1}),r.length=0,k(e,function(t,n){r.push(n)})}var sj=k;function lj(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function wS(r,e,t){var n={};return sj(e,function(a){var o=n[a]=i();sj(r[a],function(s,l){if(Sr.isValidType(l)){var u={type:l,visual:s};t&&t(u,a),o[l]=new Sr(u),l==="opacity"&&(u=ke(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Sr(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function L8(r,e,t){var n;k(t,function(i){e.hasOwnProperty(i)&&lj(e[i])&&(n=!0)}),n&&k(t,function(i){e.hasOwnProperty(i)&&lj(e[i])?r[i]=ke(e[i]):delete r[i]})}function p2e(r,e,t,n,i,a){var o={};k(r,function(f){var h=Sr.prepareVisualTypes(e[f]);o[f]=h});var s;function l(f){return qC(t,s,f)}function u(f,h){eF(t,s,f,h)}t.each(c);function c(f,h){s=f;var d=t.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var p=n.call(i,f),v=e[p],m=o[p],g=0,y=m.length;g<y;g++){var b=m[g];v[b]&&v[b].applyVisual(f,l,u)}}}function v2e(r,e,t,n){var i={};return k(r,function(a){var o=Sr.prepareVisualTypes(e[a]);i[a]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(x){return qC(s,f,x)}function c(x,w){eF(s,f,x,w)}for(var f,h=s.getStore();(f=o.next())!=null;){var d=s.getRawDataItem(f);if(!(d&&d.visualMap===!1))for(var p=n!=null?h.get(l,f):f,v=t(p),m=e[v],g=i[v],y=0,b=g.length;y<b;y++){var _=g[y];m[_]&&m[_].applyVisual(p,u,c)}}}}}function m2e(r){var e=r.brushType,t={point:function(n){return uj[e].point(n,t,r)},rect:function(n){return uj[e].rect(n,t,r)}};return t}var uj={lineX:cj(0),lineY:cj(1),rect:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])},rect:function(r,e,t){return r&&t.boundingRect.intersect(r)}},polygon:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])&&Sl(t.range,r[0],r[1])},rect:function(r,e,t){var n=t.range;if(!r||n.length<=1)return!1;var i=r.x,a=r.y,o=r.width,s=r.height,l=n[0];if(Sl(n,i,a)||Sl(n,i+o,a)||Sl(n,i,a+s)||Sl(n,i+o,a+s)||Ve.create(r).contain(l[0],l[1])||Dh(i,a,i+o,a,n)||Dh(i,a,i,a+s,n)||Dh(i+o,a,i+o,a+s,n)||Dh(i,a+s,i+o,a+s,n))return!0}}};function cj(r){var e=["x","y"],t=["width","height"];return{point:function(n,i,a){if(n){var o=a.range,s=n[r];return mh(s,o)}},rect:function(n,i,a){if(n){var o=a.range,s=[n[e[r]],n[e[r]]+n[t[r]]];return s[1]<s[0]&&s.reverse(),mh(s[0],o)||mh(s[1],o)||mh(o[0],s)||mh(o[1],s)}}}}function mh(r,e){return e[0]<=r&&r<=e[1]}var fj=["inBrush","outOfBrush"],xx="__ecBrushSelect",SS="__ecInBrushSelectEvent";function I8(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new rM(e.option,r);t.setInputRanges(e.areas,r)})}function g2e(r,e,t){var n=[],i,a;r.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),I8(r),r.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:ke(o.areas),selected:[]};n.push(l);var u=o.option,c=u.brushLink,f=[],h=[],d=[],p=!1;s||(i=u.throttleType,a=u.throttleDelay);var v=K(o.areas,function(x){var w=x2e[x.brushType],S=Ce({boundingRect:w?w(x):void 0},x);return S.selectors=m2e(S),S}),m=wS(o.option,fj,function(x){x.mappingMethod="fixed"});q(c)&&k(c,function(x){f[x]=1});function g(x){return c==="all"||!!f[x]}function y(x){return!!x.length}r.eachSeries(function(x,w){var S=d[w]=[];x.subType==="parallel"?b(x,w):_(x,w,S)});function b(x,w){var S=x.coordinateSystem;p=p||S.hasAxisBrushed(),g(w)&&S.eachActiveState(x.getData(),function(T,C){T==="active"&&(h[C]=1)})}function _(x,w,S){if(!(!x.brushSelector||_2e(o,w))&&(k(v,function(C){o.brushTargetManager.controlSeries(C,x,r)&&S.push(C),p=p||y(S)}),g(w)&&y(S))){var T=x.getData();T.each(function(C){hj(x,S,T,C)&&(h[C]=1)})}}r.eachSeries(function(x,w){var S={seriesId:x.id,seriesIndex:w,seriesName:x.name,dataIndex:[]};l.selected.push(S);var T=d[w],C=x.getData(),A=g(w)?function(M){return h[M]?(S.dataIndex.push(C.getRawIndex(M)),"inBrush"):"outOfBrush"}:function(M){return hj(x,T,C,M)?(S.dataIndex.push(C.getRawIndex(M)),"inBrush"):"outOfBrush"};(g(w)?p:y(T))&&p2e(fj,m,C,A)})}),y2e(e,i,a,n,t)}function y2e(r,e,t,n,i){if(i){var a=r.getZr();if(!a[SS]){a[xx]||(a[xx]=b2e);var o=Mf(a,xx,t,e);o(r,n)}}}function b2e(r,e){if(!r.isDisposed()){var t=r.getZr();t[SS]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[SS]=!1}}function hj(r,e,t,n){for(var i=0,a=e.length;i<a;i++){var o=e[i];if(r.brushSelector(n,t,o.selectors,o))return!0}}function _2e(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(q(t)?He(t,e)<0:e!==t)}var x2e={rect:function(r){return dj(r.range)},polygon:function(r){for(var e,t=r.range,n=0,i=t.length;n<i;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=t[n];a[0]<e[0][0]&&(e[0][0]=a[0]),a[0]>e[0][1]&&(e[0][1]=a[0]),a[1]<e[1][0]&&(e[1][0]=a[1]),a[1]>e[1][1]&&(e[1][1]=a[1])}return e&&dj(e)}};function dj(r){return new Ve(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var w2e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n,this.model,(this._brushController=new DA(n.getZr())).on("brush",ue(this._onBrush,this)).mount()},e.prototype.render=function(t,n,i,a){this.model=t,this._updateController(t,n,i,a)},e.prototype.updateTransform=function(t,n,i,a){I8(n),this._updateController(t,n,i,a)},e.prototype.updateVisual=function(t,n,i,a){this.updateTransform(t,n,i,a)},e.prototype.updateView=function(t,n,i,a){this._updateController(t,n,i,a)},e.prototype._updateController=function(t,n,i,a){(!a||a.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:ke(i),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:ke(i),$from:n})},e.type="brush",e}(zt),S2e="#ddd",T2e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,n){var i=this.option;!n&&L8(i,t,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:S2e},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=K(t,function(n){return pj(this.option,n)},this))},e.prototype.setBrushOption=function(t){this.brushOption=pj(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Qe);function pj(r,e){return Be({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new _t(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var C2e=["rect","polygon","lineX","lineY","keep","clear"],A2e=function(r){z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,k(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(t,n,i){this.render(t,n,i)},e.prototype.getIcons=function(){var t=this.model,n=t.get("icon",!0),i={};return k(t.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},e.prototype.onclick=function(t,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var n={show:!0,type:C2e.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return n},e}(ii);function M2e(r){r.registerComponentView(w2e),r.registerComponentModel(T2e),r.registerPreprocessor(h2e),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,g2e),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},tr),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},tr),Cc("brush",A2e)}var k2e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Qe),D2e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){if(this.group.removeAll(),!!t.get("show")){var a=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=Re(t.get("textBaseline"),t.get("textVerticalAlign")),c=new ot({style:Et(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=t.get("subtext"),d=new ot({style:Et(s,{text:h,fill:s.getTextColor(),y:f.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),v=t.get("sublink"),m=t.get("triggerEvent",!0);c.silent=!p&&!m,d.silent=!v&&!m,p&&c.on("click",function(){Sy(p,"_"+t.get("target"))}),v&&d.on("click",function(){Sy(v,"_"+t.get("subtarget"))}),Le(c).eventData=Le(d).eventData=m?{componentType:"title",componentIndex:t.componentIndex}:null,a.add(c),h&&a.add(d);var g=a.getBoundingRect(),y=t.getBoxLayoutParams();y.width=g.width,y.height=g.height;var b=gr(y,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?b.x+=b.width:l==="center"&&(b.x+=b.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?b.y+=b.height:u==="middle"&&(b.y+=b.height/2),u=u||"top"),a.x=b.x,a.y=b.y,a.markRedraw();var _={align:l,verticalAlign:u};c.setStyle(_),d.setStyle(_),g=a.getBoundingRect();var x=b.margin,w=t.getItemStyle(["color","opacity"]);w.fill=t.get("backgroundColor");var S=new nt({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});a.add(S)}},e.type="title",e}(zt);function E2e(r){r.registerComponentModel(k2e),r.registerComponentView(D2e)}var vj=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var n=this._data.count();this.option.loop?t=(t%n+n)%n:(t>=n&&(t=n-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,n=t.data||[],i=t.axisType,a=this._names=[],o;i==="category"?(o=[],k(n,function(u,c){var f=vr(yf(u),""),h;Me(u)?(h=ke(u),h.value=c):h=c,o.push(h),a.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new fn([{name:"value",type:s}],this);l.initData(o,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Qe),P8=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=$s(vj.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(vj);cr(P8,n1.prototype);var L2e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(zt),I2e=function(r){z(e,r);function e(t,n,i,a){var o=r.call(this,t,n,i)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Gi),Sx=Math.PI,mj=it(),P2e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.api=n},e.prototype.render=function(t,n,i){if(this.model=t,this.api=i,this.ecModel=n,this.group.removeAll(),t.get("show",!0)){var a=this._layout(t,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return Cr("nameValue",{noName:!0,value:c})},k(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,t)},this),this._renderAxisLabel(a,s,l,t),this._position(a,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,n){var i=t.get(["label","position"]),a=t.get("orient"),o=O2e(t,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2<n.getHeight()/2?"-":"+":o.x+o.width/2<n.getWidth()/2?"+":"-":se(i)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][i]:s=i;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:Sx/2},f=a==="vertical"?o.height:o.width,h=t.getModel("controlStyle"),d=h.get("show",!0),p=d?h.get("itemSize"):0,v=d?h.get("itemGap"):0,m=p+v,g=t.get(["label","rotate"])||0;g=g*Sx/180;var y,b,_,x=h.get("position",!0),w=d&&h.get("showPlayBtn",!0),S=d&&h.get("showPrevBtn",!0),T=d&&h.get("showNextBtn",!0),C=0,A=f;x==="left"||x==="bottom"?(w&&(y=[0,0],C+=m),S&&(b=[C,0],C+=m),T&&(_=[A-p,0],A-=m)):(w&&(y=[A-p,0],A-=m),S&&(b=[0,0],C+=m),T&&(_=[A-p,0],A-=m));var M=[C,A];return t.get("inverse")&&M.reverse(),{viewRect:o,mainLength:f,orient:a,rotation:c[a],labelRotation:g,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[a],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[a],playPosition:y,prevBtnPosition:b,nextBtnPosition:_,axisExtent:M,controlSize:p,controlGap:v}},e.prototype._position=function(t,n){var i=this._mainGroup,a=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=zn(),l=o.x,u=o.y+o.height;La(s,s,[-l,-u]),Eu(s,s,-Sx/2),La(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=y(o),f=y(i.getBoundingRect()),h=y(a.getBoundingRect()),d=[i.x,i.y],p=[a.x,a.y];p[0]=d[0]=c[0][0];var v=t.labelPosOpt;if(v==null||se(v)){var m=v==="+"?0:1;b(d,f,c,1,m),b(p,h,c,1,1-m)}else{var m=v>=0?0:1;b(d,f,c,1,m),p[1]=d[1]+v}i.setPosition(d),a.setPosition(p),i.rotation=a.rotation=t.rotation,g(i),g(a);function g(_){_.originX=c[0][0]-_.x,_.originY=c[1][0]-_.y}function y(_){return[[_.x,_.x+_.width],[_.y,_.y+_.height]]}function b(_,x,w,S,T){_[S]+=w[S][T]-x[S][T]}},e.prototype._createAxis=function(t,n){var i=n.getData(),a=n.get("axisType"),o=R2e(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new I2e("value",o,t.axisExtent,a);return l.model=n,l},e.prototype._createGroup=function(t){var n=this[t]=new Ee;return this.group.add(n),n},e.prototype._renderAxisLine=function(t,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new xr({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:W({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new xr({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Ce({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(t,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],k(l,function(u){var c=i.dataToCoord(u.value),f=s.getItemModel(u.value),h=f.getModel("itemStyle"),d=f.getModel(["emphasis","itemStyle"]),p=f.getModel(["progress","itemStyle"]),v={x:c,y:0,onclick:ue(o._changeTimeline,o,u.value)},m=gj(f,h,n,v);m.ensureState("emphasis").style=d.getItemStyle(),m.ensureState("progress").style=p.getItemStyle(),ru(m);var g=Le(m);f.get("tooltip")?(g.dataIndex=u.value,g.dataModel=a):g.dataIndex=g.dataModel=null,o._tickSymbols.push(m)})},e.prototype._renderAxisLabel=function(t,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],k(u,function(c){var f=c.tickValue,h=l.getItemModel(f),d=h.getModel("label"),p=h.getModel(["emphasis","label"]),v=h.getModel(["progress","label"]),m=i.dataToCoord(c.tickValue),g=new ot({x:m,y:0,rotation:t.labelRotation-t.rotation,onclick:ue(o._changeTimeline,o,f),silent:!1,style:Et(d,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});g.ensureState("emphasis").style=Et(p),g.ensureState("progress").style=Et(v),n.add(g),ru(g),mj(g).dataIndex=f,o._tickLabels.push(g)})}},e.prototype._renderControl=function(t,n,i,a){var o=t.controlSize,s=t.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),f=a.get("inverse",!0);h(t.nextBtnPosition,"next",ue(this._changeTimeline,this,f?"-":"+")),h(t.prevBtnPosition,"prev",ue(this._changeTimeline,this,f?"+":"-")),h(t.playPosition,c?"stop":"play",ue(this._handlePlayClick,this,!c),!0);function h(d,p,v,m){if(d){var g=Ni(Re(a.get(["controlStyle",p+"BtnSize"]),o),o),y=[0,-g/2,g,g],b=j2e(a,p+"Icon",y,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:v});b.ensureState("emphasis").style=u,n.add(b),ru(b)}}},e.prototype._renderCurrentPointer=function(t,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=ue(u._handlePointerDrag,u),f.ondragend=ue(u._handlePointerDragend,u),yj(f,u._progressLine,s,i,a,!0)},onUpdate:function(f){yj(f,u._progressLine,s,i,a)}};this._currentPointer=gj(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,n){var i=this._toAxisCoord(t)[0],a=this._axis,o=ci(a.getExtent().slice());i>o[1]&&(i=o[1]),i<o[0]&&(i=o[0]),this._currentPointer.x=i,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=i,s.dirty());var l=this._findNearestTick(i),u=this.model;(n||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var n=t.model;t._changeTimeline(n.getCurrentIndex()+(n.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var n=this._mainGroup.getLocalTransform();return Ri(t,n,!0)},e.prototype._findNearestTick=function(t){var n=this.model.getData(),i=1/0,a,o=this._axis;return n.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-t);c<i&&(i=c,a=l)}),a},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var n=this.model.getCurrentIndex();t==="+"?t=n+1:t==="-"&&(t=n-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),n=this._tickSymbols,i=this._tickLabels;if(n)for(var a=0;a<n.length;a++)n&&n[a]&&n[a].toggleState("progress",a<t);if(i)for(var a=0;a<i.length;a++)i&&i[a]&&i[a].toggleState("progress",mj(i[a]).dataIndex<=t)},e.type="timeline.slider",e}(L2e);function R2e(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new u1({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new tA({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new Co}}function O2e(r,e){return gr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},r.get("padding"))}function j2e(r,e,t,n){var i=n.style,a=kp(r.get(["controlStyle",e]),n||{},new Ve(t[0],t[1],t[2],t[3]));return i&&a.setStyle(i),a}function gj(r,e,t,n,i,a){var o=e.get("color");if(i)i.setColor(o),t.add(i),a&&a.onUpdate(i);else{var s=r.get("symbol");i=ur(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),t.add(i),a&&a.onCreate(i)}var l=e.getItemStyle(["color"]);i.setStyle(l),n=Be({rectHover:!0,z2:100},n,!0);var u=kf(r.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=Pu(r.get("symbolOffset"),u);c&&(n.x=(n.x||0)+c[0],n.y=(n.y||0)+c[1]);var f=r.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,i.attr(n),i.updateTransform(),i}function yj(r,e,t,n,i,a){if(!r.dragging){var o=i.getModel("checkpointStyle"),s=n.dataToCoord(i.getData().get("value",t));if(a||!o.get("animation",!0))r.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};r.stopAnimation(null,!0),r.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}function N2e(r){r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,n){var i=t.getComponent("timeline");return i&&e.currentIndex!=null&&(i.setCurrentIndex(e.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),Ce({currentIndex:i.option.currentIndex},e)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var n=t.getComponent("timeline");n&&e.playState!=null&&n.setPlayState(e.playState)})}function B2e(r){var e=r&&r.timeline;q(e)||(e=e?[e]:[]),k(e,function(t){t&&z2e(t)})}function z2e(r){var e=r.type,t={number:"value",time:"time"};if(t[e]&&(r.axisType=t[e],delete r.type),bj(r),Al(r,"controlPosition")){var n=r.controlStyle||(r.controlStyle={});Al(n,"position")||(n.position=r.controlPosition),n.position==="none"&&!Al(n,"show")&&(n.show=!1,delete n.position),delete r.controlPosition}k(r.data||[],function(i){Me(i)&&!q(i)&&(!Al(i,"value")&&Al(i,"name")&&(i.value=i.name),bj(i))})}function bj(r){var e=r.itemStyle||(r.itemStyle={}),t=e.emphasis||(e.emphasis={}),n=r.label||r.label||{},i=n.normal||(n.normal={}),a={normal:1,emphasis:1};k(n,function(o,s){!a[s]&&!Al(i,s)&&(i[s]=o)}),t.label&&!Al(n,"emphasis")&&(n.emphasis=t.label,delete t.label)}function Al(r,e){return r.hasOwnProperty(e)}function F2e(r){r.registerComponentModel(P8),r.registerComponentView(P2e),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),N2e(r),r.registerPreprocessor(B2e)}function aM(r,e){if(!r)return!1;for(var t=q(r)?r:[r],n=0;n<t.length;n++)if(t[n]&&t[n][e])return!0;return!1}function fm(r){pu(r,"label",["show"])}var hm=it(),Mo=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},e.prototype.isAnimationEnabled=function(){if(Ze.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,n){this._mergeOption(t,n,!1,!1)},e.prototype._mergeOption=function(t,n,i,a){var o=this.mainType;i||n.eachSeries(function(s){var l=s.get(this.mainType,!0),u=hm(s)[o];if(!l||!l.data){hm(s)[o]=null;return}u?u._mergeOption(l,n,!0):(a&&fm(l),k(l.data,function(c){c instanceof Array?(fm(c[0]),fm(c[1])):fm(c)}),u=this.createMarkerModelFromSeries(l,this,n),W(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),hm(s)[o]=u},this)},e.prototype.formatTooltip=function(t,n,i){var a=this.getData(),o=this.getRawValue(t),s=a.getName(t);return Cr("section",{header:this.name,blocks:[Cr("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.prototype.getDataParams=function(t,n){var i=n1.prototype.getDataParams.call(this,t,n),a=this.__hostSeries;return a&&(i.seriesId=a.id,i.seriesName=a.name,i.seriesType=a.subType),i},e.getMarkerModelFromSeries=function(t,n){return hm(t)[n]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(Qe);cr(Mo,n1.prototype);var V2e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(Mo);function TS(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function $2e(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function dm(r,e,t,n,i,a){var o=[],s=Is(e,n),l=s?e.getCalculationInfo("stackResultDimension"):n,u=oM(e,l,r),c=e.indicesOfNearest(l,u)[0];o[i]=e.get(t,c),o[a]=e.get(l,c);var f=e.get(n,c),h=pa(e.get(n,c));return h=Math.min(h,20),h>=0&&(o[a]=+o[a].toFixed(h)),[o,f]}var Tx={min:Oe(dm,"min"),max:Oe(dm,"max"),average:Oe(dm,"average"),median:Oe(dm,"median")};function lp(r,e){if(e){var t=r.getData(),n=r.coordinateSystem,i=n&&n.dimensions;if(!$2e(e)&&!q(e.coord)&&q(i)){var a=R8(e,t,n,r);if(e=ke(e),e.type&&Tx[e.type]&&a.baseAxis&&a.valueAxis){var o=He(i,a.baseAxis.dim),s=He(i,a.valueAxis.dim),l=Tx[e.type](t,a.baseDataDim,a.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!q(i))e.coord=[];else for(var u=e.coord,c=0;c<2;c++)Tx[u[c]]&&(u[c]=oM(t,t.mapDimension(i[c]),u[c]));return e}}function R8(r,e,t,n){var i={};return r.valueIndex!=null||r.valueDim!=null?(i.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,i.valueAxis=t.getAxis(H2e(n,i.valueDataDim)),i.baseAxis=t.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=t.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function H2e(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function up(r,e){return r&&r.containData&&e.coord&&!TS(e)?r.containData(e.coord):!0}function G2e(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!TS(e)&&!TS(t)?r.containZone(e.coord,t.coord):!0}function O8(r,e){return r?function(t,n,i,a){var o=a<2?t.coord&&t.coord[a]:t.value;return _s(o,e[a])}:function(t,n,i,a){return _s(t.value,e[a])}}function oM(r,e,t){if(t==="average"){var n=0,i=0;return r.each(e,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var Cx=it(),sM=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=ve()},e.prototype.render=function(t,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){Cx(s).keep=!1}),n.eachSeries(function(s){var l=Mo.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!Cx(s).keep&&a.group.remove(s.group)})},e.prototype.markKeep=function(t){Cx(t).keep=!0},e.prototype.toggleBlurSeries=function(t,n){var i=this;k(t,function(a){var o=Mo.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?kz(l):AC(l))})}})},e.type="marker",e}(zt);function _j(r,e,t){var n=e.coordinateSystem;r.each(function(i){var a=r.getItemModel(i),o,s=ie(a.get("x"),t.getWidth()),l=ie(a.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,i));else if(n){var u=r.get(n.dimensions[0],i),c=r.get(n.dimensions[1],i);o=n.dataToPoint([u,c])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(i,o)})}var W2e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,i){n.eachSeries(function(a){var o=Mo.getMarkerModelFromSeries(a,"markPoint");o&&(_j(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(t,n,i,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Rp),f=U2e(o,t,n);n.setData(f),_j(n.getData(),t,a),f.each(function(h){var d=f.getItemModel(h),p=d.getShallow("symbol"),v=d.getShallow("symbolSize"),m=d.getShallow("symbolRotate"),g=d.getShallow("symbolOffset"),y=d.getShallow("symbolKeepAspect");if(Te(p)||Te(v)||Te(m)||Te(g)){var b=n.getRawValue(h),_=n.getDataParams(h);Te(p)&&(p=p(b,_)),Te(v)&&(v=v(b,_)),Te(m)&&(m=m(b,_)),Te(g)&&(g=g(b,_))}var x=d.getModel("itemStyle").getItemStyle(),w=Ep(l,"color");x.fill||(x.fill=w),f.setItemVisual(h,{symbol:p,symbolSize:v,symbolRotate:m,symbolOffset:g,symbolKeepAspect:y,style:x})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(h){h.traverse(function(d){Le(d).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markPoint",e}(sM);function U2e(r,e,t){var n;r?n=K(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return W(W({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new fn(n,t),a=K(t.get("data"),Oe(lp,e));r&&(a=pt(a,Oe(up,r)));var o=O8(!!r,n);return i.initData(a,null,o),i}function Y2e(r){r.registerComponentModel(V2e),r.registerComponentView(W2e),r.registerPreprocessor(function(e){aM(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var q2e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markLine",e.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"},e}(Mo),pm=it(),X2e=function(r,e,t,n){var i=r.getData(),a;if(q(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=e.getAxis(n.yAxis!=null?"y":"x"),l=kr(n.yAxis,n.xAxis);else{var u=R8(n,i,e,r);s=u.valueAxis;var c=MF(i,u.valueDataDim);l=oM(i,c,o)}var f=s.dim==="x"?0:1,h=1-f,d=ke(n),p={coord:[]};d.type=null,d.coord=[],d.coord[h]=-1/0,p.coord[h]=1/0;var v=t.get("precision");v>=0&<(l)&&(l=+l.toFixed(Math.min(v,20))),d.coord[f]=p.coord[f]=l,a=[d,p,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var m=[lp(r,a[0]),lp(r,a[1]),W({},a[2])];return m[2].type=m[2].type||null,Be(m[2],m[0]),Be(m[2],m[1]),m};function Xy(r){return!isNaN(r)&&!isFinite(r)}function xj(r,e,t,n){var i=1-r,a=n.dimensions[r];return Xy(e[i])&&Xy(t[i])&&e[r]===t[r]&&n.getAxis(a).containData(e[r])}function K2e(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,n=e[1].coord;if(t&&n&&(xj(1,t,n,r)||xj(0,t,n,r)))return!0}return up(r,e[0])&&up(r,e[1])}function Ax(r,e,t,n,i){var a=n.coordinateSystem,o=r.getItemModel(e),s,l=ie(o.get("x"),i.getWidth()),u=ie(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(r.getValues(r.dimensions,e));else{var c=a.dimensions,f=r.get(c[0],e),h=r.get(c[1],e);s=a.dataToPoint([f,h])}if(Ou(a,"cartesian2d")){var d=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;Xy(r.get(c[0],e))?s[0]=d.toGlobalCoord(d.getExtent()[t?0:1]):Xy(r.get(c[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var Z2e=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,i){n.eachSeries(function(a){var o=Mo.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=pm(o).from,u=pm(o).to;l.each(function(c){Ax(l,c,!0,a,i),Ax(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,n,i,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new kA);this.group.add(c.group);var f=J2e(o,t,n),h=f.from,d=f.to,p=f.line;pm(n).from=h,pm(n).to=d,n.setData(p);var v=n.get("symbol"),m=n.get("symbolSize"),g=n.get("symbolRotate"),y=n.get("symbolOffset");q(v)||(v=[v,v]),q(m)||(m=[m,m]),q(g)||(g=[g,g]),q(y)||(y=[y,y]),f.from.each(function(_){b(h,_,!0),b(d,_,!1)}),p.each(function(_){var x=p.getItemModel(_).getModel("lineStyle").getLineStyle();p.setItemLayout(_,[h.getItemLayout(_),d.getItemLayout(_)]),x.stroke==null&&(x.stroke=h.getItemVisual(_,"style").fill),p.setItemVisual(_,{fromSymbolKeepAspect:h.getItemVisual(_,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(_,"symbolOffset"),fromSymbolRotate:h.getItemVisual(_,"symbolRotate"),fromSymbolSize:h.getItemVisual(_,"symbolSize"),fromSymbol:h.getItemVisual(_,"symbol"),toSymbolKeepAspect:d.getItemVisual(_,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(_,"symbolOffset"),toSymbolRotate:d.getItemVisual(_,"symbolRotate"),toSymbolSize:d.getItemVisual(_,"symbolSize"),toSymbol:d.getItemVisual(_,"symbol"),style:x})}),c.updateData(p),f.line.eachItemGraphicEl(function(_){Le(_).dataModel=n,_.traverse(function(x){Le(x).dataModel=n})});function b(_,x,w){var S=_.getItemModel(x);Ax(_,x,w,t,a);var T=S.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=Ep(l,"color")),_.setItemVisual(x,{symbolKeepAspect:S.get("symbolKeepAspect"),symbolOffset:Re(S.get("symbolOffset",!0),y[w?0:1]),symbolRotate:Re(S.get("symbolRotate",!0),g[w?0:1]),symbolSize:Re(S.get("symbolSize"),m[w?0:1]),symbol:Re(S.get("symbol",!0),v[w?0:1]),style:T})}this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markLine",e}(sM);function J2e(r,e,t){var n;r?n=K(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return W(W({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new fn(n,t),a=new fn(n,t),o=new fn([],t),s=K(t.get("data"),Oe(X2e,e,r,t));r&&(s=pt(s,Oe(K2e,r)));var l=O8(!!r,n);return i.initData(K(s,function(u){return u[0]}),null,l),a.initData(K(s,function(u){return u[1]}),null,l),o.initData(K(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function Q2e(r){r.registerComponentModel(q2e),r.registerComponentView(Z2e),r.registerPreprocessor(function(e){aM(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var eSe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Mo),vm=it(),tSe=function(r,e,t,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=lp(r,i),s=lp(r,a),l=o.coord,u=s.coord;l[0]=kr(l[0],-1/0),l[1]=kr(l[1],-1/0),u[0]=kr(u[0],1/0),u[1]=kr(u[1],1/0);var c=lC([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function Ky(r){return!isNaN(r)&&!isFinite(r)}function wj(r,e,t,n){var i=1-r;return Ky(e[i])&&Ky(t[i])}function rSe(r,e){var t=e.coord[0],n=e.coord[1],i={coord:t,x:e.x0,y:e.y0},a={coord:n,x:e.x1,y:e.y1};return Ou(r,"cartesian2d")?t&&n&&(wj(1,t,n)||wj(0,t,n))?!0:G2e(r,i,a):up(r,i)||up(r,a)}function Sj(r,e,t,n,i){var a=n.coordinateSystem,o=r.getItemModel(e),s,l=ie(o.get(t[0]),i.getWidth()),u=ie(o.get(t[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=r.getValues(["x0","y0"],e),f=r.getValues(["x1","y1"],e),h=a.clampData(c),d=a.clampData(f),p=[];t[0]==="x0"?p[0]=h[0]>d[0]?f[0]:c[0]:p[0]=h[0]>d[0]?c[0]:f[0],t[1]==="y0"?p[1]=h[1]>d[1]?f[1]:c[1]:p[1]=h[1]>d[1]?c[1]:f[1],s=n.getMarkerPosition(p,t,!0)}else{var v=r.get(t[0],e),m=r.get(t[1],e),g=[v,m];a.clampData&&a.clampData(g,g),s=a.dataToPoint(g,!0)}if(Ou(a,"cartesian2d")){var y=a.getAxis("x"),b=a.getAxis("y"),v=r.get(t[0],e),m=r.get(t[1],e);Ky(v)?s[0]=y.toGlobalCoord(y.getExtent()[t[0]==="x0"?0:1]):Ky(m)&&(s[1]=b.toGlobalCoord(b.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var Tj=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],nSe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,i){n.eachSeries(function(a){var o=Mo.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=K(Tj,function(f){return Sj(s,l,f,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,n,i,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new Ee});this.group.add(c.group),this.markKeep(c);var f=iSe(o,t,n);n.setData(f),f.each(function(h){var d=K(Tj,function(T){return Sj(f,h,T,t,a)}),p=o.getAxis("x").scale,v=o.getAxis("y").scale,m=p.getExtent(),g=v.getExtent(),y=[p.parse(f.get("x0",h)),p.parse(f.get("x1",h))],b=[v.parse(f.get("y0",h)),v.parse(f.get("y1",h))];ci(y),ci(b);var _=!(m[0]>y[1]||m[1]<y[0]||g[0]>b[1]||g[1]<b[0]),x=!_;f.setItemLayout(h,{points:d,allClipped:x});var w=f.getItemModel(h).getModel("itemStyle").getItemStyle(),S=Ep(l,"color");w.fill||(w.fill=S,se(w.fill)&&(w.fill=fy(w.fill,.4))),w.stroke||(w.stroke=S),f.setItemVisual(h,"style",w)}),f.diff(vm(c).data).add(function(h){var d=f.getItemLayout(h);if(!d.allClipped){var p=new yn({shape:{points:d.points}});f.setItemGraphicEl(h,p),c.group.add(p)}}).update(function(h,d){var p=vm(c).data.getItemGraphicEl(d),v=f.getItemLayout(h);v.allClipped?p&&c.group.remove(p):(p?ut(p,{shape:{points:v.points}},n,h):p=new yn({shape:{points:v.points}}),f.setItemGraphicEl(h,p),c.group.add(p))}).remove(function(h){var d=vm(c).data.getItemGraphicEl(h);c.group.remove(d)}).execute(),f.eachItemGraphicEl(function(h,d){var p=f.getItemModel(d),v=f.getItemVisual(d,"style");h.useStyle(f.getItemVisual(d,"style")),Vr(h,Tr(p),{labelFetcher:n,labelDataIndex:d,defaultText:f.getName(d)||"",inheritColor:se(v.fill)?fy(v.fill,1):"#000"}),Fr(h,p),$t(h,null,null,p.get(["emphasis","disabled"])),Le(h).dataModel=n}),vm(c).data=f,c.group.silent=n.get("silent")||t.get("silent")},e.type="markArea",e}(sM);function iSe(r,e,t){var n,i,a=["x0","y0","x1","y1"];if(r){var o=K(r&&r.dimensions,function(u){var c=e.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return W(W({},f),{name:u,ordinalMeta:null})});i=K(a,function(u,c){return{name:u,type:o[c%2].type}}),n=new fn(i,t)}else i=[{name:"value",type:"float"}],n=new fn(i,t);var s=K(t.get("data"),Oe(tSe,e,r,t));r&&(s=pt(s,Oe(rSe,r)));var l=r?function(u,c,f,h){var d=u.coord[Math.floor(h/2)][h%2];return _s(d,i[h])}:function(u,c,f,h){return _s(u.value,i[h])};return n.initData(s,null,l),n.hasItemOption=!0,n}function aSe(r){r.registerComponentModel(eSe),r.registerComponentView(nSe),r.registerPreprocessor(function(e){aM(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var oSe=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},CS=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},e.prototype._updateSelector=function(t){var n=t.selector,i=this.ecModel;n===!0&&(n=t.selector=["all","inverse"]),q(n)&&k(n,function(a,o){se(a)&&(a={type:a}),n[o]=Be(a,oSe(i,a.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<t.length;i++){var a=t[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var n=[],i=[];t.eachRawSeries(function(l){var u=l.name;i.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,h=f.getAllNames();t.isSeriesFiltered(l)||(i=i.concat(h)),h.length?n=n.concat(h):c=!0}else c=!0;c&&yC(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=ve(),s=K(a,function(l){return(se(l)||lt(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new _t(l,this,this.ecModel))},this);this._data=pt(s,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;k(a,function(o){n[o.get("name")]=!1})}n[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var n=this.option.selected;n.hasOwnProperty(t)||(n[t]=!0),this[n[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,n=this.option.selected;k(t,function(i){n[i.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,n=this.option.selected;k(t,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},e.prototype.isSelected=function(t){var n=this.option.selected;return!(n.hasOwnProperty(t)&&!n[t])&&He(this._availableNames,t)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.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}},e}(Qe),fc=Oe,AS=k,mm=Ee,j8=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new mm),this.group.add(this._selectorGroup=new mm),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,n,i,l,s,u);var c=t.getBoxLayoutParams(),f={width:i.getWidth(),height:i.getHeight()},h=t.get("padding"),d=gr(c,f,h),p=this.layoutInner(t,o,d,a,l,u),v=gr(Ce({width:p.width,height:p.height},c),f,h);this.group.x=v.x-p.x,this.group.y=v.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=T8(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,n,i,a,o,s,l){var u=this.getContentGroup(),c=ve(),f=n.get("selectedMode"),h=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),AS(n.getData(),function(d,p){var v=d.get("name");if(!this.newlineDisabled&&(v===""||v===`
|
||
`)){var m=new mm;m.newline=!0,u.add(m);return}var g=i.getSeriesByName(v)[0];if(!c.get(v))if(g){var y=g.getData(),b=y.getVisual("legendLineStyle")||{},_=y.getVisual("legendIcon"),x=y.getVisual("style"),w=this._createItem(g,v,p,d,n,t,b,x,_,f,a);w.on("click",fc(Cj,v,null,a,h)).on("mouseover",fc(MS,g.name,null,a,h)).on("mouseout",fc(kS,g.name,null,a,h)),i.ssr&&w.eachChild(function(S){var T=Le(S);T.seriesIndex=g.seriesIndex,T.dataIndex=p,T.ssrType="legend"}),c.set(v,!0)}else i.eachRawSeries(function(S){if(!c.get(v)&&S.legendVisualProvider){var T=S.legendVisualProvider;if(!T.containName(v))return;var C=T.indexOfName(v),A=T.getItemVisual(C,"style"),M=T.getItemVisual(C,"legendIcon"),D=Fn(A.fill);D&&D[3]===0&&(D[3]=.2,A=W(W({},A),{fill:ho(D,"rgba")}));var E=this._createItem(S,v,p,d,n,t,{},A,M,f,a);E.on("click",fc(Cj,null,v,a,h)).on("mouseover",fc(MS,null,v,a,h)).on("mouseout",fc(kS,null,v,a,h)),i.ssr&&E.eachChild(function(L){var I=Le(L);I.seriesIndex=S.seriesIndex,I.dataIndex=p,I.ssrType="legend"}),c.set(v,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},e.prototype._createSelector=function(t,n,i,a,o){var s=this.getSelectorGroup();AS(t,function(u){var c=u.type,f=new ot({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(f);var h=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);Vr(f,{normal:h,emphasis:d},{defaultText:u.title}),ru(f)})},e.prototype._createItem=function(t,n,i,a,o,s,l,u,c,f,h){var d=t.visualDrawType,p=o.get("itemWidth"),v=o.get("itemHeight"),m=o.isSelected(n),g=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),b=a.get("icon");c=b||c||"roundRect";var _=sSe(c,a,l,u,d,m,h),x=new mm,w=a.getModel("textStyle");if(Te(t.getLegendIcon)&&(!b||b==="inherit"))x.add(t.getLegendIcon({itemWidth:p,itemHeight:v,icon:c,iconRotate:g,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:y}));else{var S=b==="inherit"&&t.getData().getVisual("symbol")?g==="inherit"?t.getData().getVisual("symbolRotate"):g:0;x.add(lSe({itemWidth:p,itemHeight:v,icon:c,iconRotate:S,itemStyle:_.itemStyle,symbolKeepAspect:y}))}var T=s==="left"?p+5:-5,C=s,A=o.get("formatter"),M=n;se(A)&&A?M=A.replace("{name}",n??""):Te(A)&&(M=A(n));var D=m?w.getTextColor():a.get("inactiveColor");x.add(new ot({style:Et(w,{text:M,x:T,y:v/2,fill:D,align:C,verticalAlign:"middle"},{inheritColor:D})}));var E=new nt({shape:x.getBoundingRect(),style:{fill:"transparent"}}),L=a.getModel("tooltip");return L.get("show")&&Lu({el:E,componentModel:o,itemName:n,itemTooltipOption:L.option}),x.add(E),x.eachChild(function(I){I.silent=!0}),E.silent=!f,this.getContentGroup().add(x),ru(x),x.__legendDataIndex=i,x},e.prototype.layoutInner=function(t,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();iu(t.get("orient"),l,t.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){iu("horizontal",u,t.get("selectorItemGap",!0));var h=u.getBoundingRect(),d=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),v=t.getOrient().index,m=v===0?"width":"height",g=v===0?"height":"width",y=v===0?"y":"x";s==="end"?d[v]+=c[m]+p:f[v]+=h[m]+p,d[1-v]+=c[g]/2-h[g]/2,u.x=d[0],u.y=d[1],l.x=f[0],l.y=f[1];var b={x:0,y:0};return b[m]=c[m]+p+h[m],b[g]=Math.max(c[g],h[g]),b[y]=Math.min(0,h[y]+d[1-v]),b}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(zt);function sSe(r,e,t,n,i,a,o){function s(m,g){m.lineWidth==="auto"&&(m.lineWidth=g.lineWidth>0?2:0),AS(m,function(y,b){m[b]==="inherit"&&(m[b]=g[b])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:rf(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:t).opacity),s(u,n);var h=e.getModel("lineStyle"),d=h.getLineStyle();if(s(d,t),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var p=e.get("inactiveBorderWidth"),v=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&v?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),d.stroke=h.get("inactiveColor"),d.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function lSe(r){var e=r.icon||"roundRect",t=ur(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function Cj(r,e,t,n){kS(r,e,t,n),t.dispatchAction({type:"legendToggleSelect",name:r??e}),MS(r,e,t,n)}function N8(r){for(var e=r.getZr().storage.getDisplayList(),t,n=0,i=e.length;n<i&&!(t=e[n].states.emphasis);)n++;return t&&t.hoverLayer}function MS(r,e,t,n){N8(t)||t.dispatchAction({type:"highlight",seriesName:r,name:e,excludeSeriesId:n})}function kS(r,e,t,n){N8(t)||t.dispatchAction({type:"downplay",seriesName:r,name:e,excludeSeriesId:n})}function uSe(r){var e=r.findComponents({mainType:"legend"});e&&e.length&&r.filterSeries(function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0})}function gh(r,e,t){var n=r==="allSelect"||r==="inverseSelect",i={},a=[];t.eachComponent({mainType:"legend",query:e},function(s){n?s[r]():s[r](e.name),Aj(s,i),a.push(s.componentIndex)});var o={};return t.eachComponent("legend",function(s){k(i,function(l,u){s[l?"select":"unSelect"](u)}),Aj(s,o)}),n?{selected:o,legendIndex:a}:{name:e.name,selected:o}}function Aj(r,e){var t=e||{};return k(r.getData(),function(n){var i=n.get("name");if(!(i===`
|
||
`||i==="")){var a=r.isSelected(i);fe(t,i)?t[i]=t[i]&&a:t[i]=a}}),t}function cSe(r){r.registerAction("legendToggleSelect","legendselectchanged",Oe(gh,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",Oe(gh,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",Oe(gh,"inverseSelect")),r.registerAction("legendSelect","legendselected",Oe(gh,"select")),r.registerAction("legendUnSelect","legendunselected",Oe(gh,"unSelect"))}function B8(r){r.registerComponentModel(CS),r.registerComponentView(j8),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,uSe),r.registerSubTypeDefaulter("legend",function(){return"plain"}),cSe(r)}var fSe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,n,i){var a=Tf(t);r.prototype.init.call(this,t,n,i),Mj(this,t,a)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),Mj(this,this.option,t)},e.type="legend.scroll",e.defaultOption=$s(CS.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}),e}(CS);function Mj(r,e,t){var n=r.getOrient(),i=[1,1];i[n.index]=0,Ls(e,t,{type:"box",ignoreSize:!!i})}var kj=Ee,Mx=["width","height"],kx=["x","y"],hSe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new kj),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new kj)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,n,i,a,o,s,l){var u=this;r.prototype.renderInner.call(this,t,n,i,a,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),h=q(f)?f:[f,f];p("pagePrev",0);var d=n.getModel("pageTextStyle");c.add(new ot({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(v,m){var g=v+"DataIndex",y=kp(n.get("pageIcons",!0)[n.getOrient().name][m],{onclick:ue(u._pageGo,u,g,n,a)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});y.name=v,c.add(y)}},e.prototype.layoutInner=function(t,n,i,a,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,c=Mx[u],f=kx[u],h=Mx[1-u],d=kx[1-u];o&&iu("horizontal",l,t.get("selectorItemGap",!0));var p=t.get("selectorButtonGap",!0),v=l.getBoundingRect(),m=[-v.x,-v.y],g=ke(i);o&&(g[c]=i[c]-v[c]-p);var y=this._layoutContentAndController(t,a,g,u,c,h,d,f);if(o){if(s==="end")m[u]+=y[c]+p;else{var b=v[c]+p;m[u]-=b,y[f]-=b}y[c]+=v[c]+p,m[1-u]+=y[d]+y[h]/2-v[h]/2,y[h]=Math.max(y[h],v[h]),y[d]=Math.min(y[d],v[d]+m[1-u]),l.x=m[0],l.y=m[1],l.markRedraw()}return y},e.prototype._layoutContentAndController=function(t,n,i,a,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,h=this._controllerGroup;iu(t.get("orient"),c,t.get("itemGap"),a?i.width:null,a?null:i.height),iu("horizontal",h,t.get("pageButtonItemGap",!0));var d=c.getBoundingRect(),p=h.getBoundingRect(),v=this._showController=d[o]>i[o],m=[-d.x,-d.y];n||(m[a]=c[u]);var g=[0,0],y=[-p.x,-p.y],b=Re(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(v){var _=t.get("pageButtonPosition",!0);_==="end"?y[a]+=i[o]-p[o]:g[a]+=p[o]+b}y[1-a]+=d[s]/2-p[s]/2,c.setPosition(m),f.setPosition(g),h.setPosition(y);var x={x:0,y:0};if(x[o]=v?i[o]:d[o],x[s]=Math.max(d[s],p[s]),x[l]=Math.min(0,p[l]+y[1-a]),f.__rectSize=i[o],v){var w={x:0,y:0};w[o]=Math.max(i[o]-p[o]-b,0),w[s]=x[s],f.setClipPath(new nt({shape:w})),f.__rectSize=w[o]}else h.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var S=this._getPageInfo(t);return S.pageIndex!=null&&ut(c,{x:S.contentPosition[0],y:S.contentPosition[1]},v?t:null),this._updatePageInfoView(t,S),x},e.prototype._pageGo=function(t,n,i){var a=this._getPageInfo(n)[t];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(t,n){var i=this._controllerGroup;k(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,d=i.childOfName(c);d&&(d.setStyle("fill",h?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),d.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=t.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",se(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=t.getOrient().index,s=Mx[o],l=kx[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],h=c.length,d=h?1:0,p={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return p;var v=_(f);p.contentPosition[o]=-v.s;for(var m=u+1,g=v,y=v,b=null;m<=h;++m)b=_(c[m]),(!b&&y.e>g.s+a||b&&!x(b,g.s))&&(y.i>g.i?g=y:g=b,g&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=g.i),++p.pageCount)),y=b;for(var m=u-1,g=v,y=v,b=null;m>=-1;--m)b=_(c[m]),(!b||!x(y,b.s))&&g.i<y.i&&(y=g,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=g.i),++p.pageCount,++p.pageIndex),g=b;return p;function _(w){if(w){var S=w.getBoundingRect(),T=S[l]+w[l];return{s:T,e:T+S[s],i:w.__legendDataIndex}}}function x(w,S){return w.e>=S&&w.s<=S+a}},e.prototype._findTargetItemIndex=function(t){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===t&&(n=s)}),n??a},e.type="legend.scroll",e}(j8);function dSe(r){r.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function pSe(r){Ue(B8),r.registerComponentModel(fSe),r.registerComponentView(hSe),dSe(r)}function vSe(r){Ue(B8),Ue(pSe)}var mSe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=$s(sp.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(sp),lM=it();function gSe(r,e,t){lM(r).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(e.uid);i&&(i.getRange=t)})}function ySe(r,e){for(var t=lM(r).coordSysRecordMap,n=t.keys(),i=0;i<n.length;i++){var a=n[i],o=t.get(a),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||z8(t,o))}}}function z8(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function bSe(r,e){var t={model:e,containsPoint:Oe(xSe,e),dispatchAction:Oe(_Se,r),dataZoomInfoMap:null,controller:null},n=t.controller=new zp(r.getZr());return k(["pan","zoom","scrollMove"],function(i){n.on(i,function(a){var o=[];t.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,a);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&t.dispatchAction(o)})}),t}function _Se(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function xSe(r,e,t,n){return r.coordinateSystem.containPoint([t,n])}function wSe(r){var e,t="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return r.each(function(a){var o=a.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[t+s]>n[t+e]&&(e=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function SSe(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=lM(t),i=n.coordSysRecordMap||(n.coordSysRecordMap=ve());i.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=x8(a);k(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,bSe(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=ve());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){z8(i,a);return}var c=wSe(l);o.enable(c.controlType,c.opt),o.setPointerChecker(a.containsPoint),Mf(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var TSe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,n,i){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),gSe(i,t,{pan:ue(Dx.pan,this),zoom:ue(Dx.zoom,this),scrollMove:ue(Dx.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){ySe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(QA),Dx={zoom:function(r,e,t,n){var i=this.range,a=i.slice(),o=r.axisModels[0];if(o){var s=Ex[e](null,[n.originX,n.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Nu(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:Dj(function(r,e,t,n,i,a){var o=Ex[n]([a.oldX,a.oldY],[a.newX,a.newY],e,i,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:Dj(function(r,e,t,n,i,a){var o=Ex[n]([0,0],[a.scrollDelta,a.scrollDelta],e,i,t);return o.signal*(r[1]-r[0])*a.scrollDelta})};function Dj(r){return function(e,t,n,i){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,n,i);if(Nu(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var Ex={grid:function(r,e,t,n,i){var a=t.axis,o={},s=i.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(r,e,t,n,i){var a=t.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(r,e,t,n,i){var a=t.axis,o=i.model.coordinateSystem.getRect(),s={};return r=r||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function F8(r){eM(r),r.registerComponentModel(mSe),r.registerComponentView(TSe),SSe(r)}var CSe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=$s(sp.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(sp),yh=nt,Ej=7,ASe=1,Lx=30,MSe=7,bh="horizontal",Lj="vertical",kSe=5,DSe=["line","bar","candlestick","scatter"],ESe={easing:"cubicOut",duration:100,delay:0},LSe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,n){this.api=n,this._onBrush=ue(this._onBrush,this),this._onBrushEnd=ue(this._onBrushEnd,this)},e.prototype.render=function(t,n,i,a){if(r.prototype.render.apply(this,arguments),Mf(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){qd(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new Ee;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,i=t.get("brushSelect"),a=i?MSe:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===bh?{right:s.width-o.x-o.width,top:s.height-Lx-Ej-a,width:o.width,height:Lx}:{right:Ej,top:o.y,width:Lx,height:o.height},u=Tf(t.option);k(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var c=gr(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===Lj&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===bh&&!o?{scaleY:l?1:-1,scaleX:1}:i===bh&&o?{scaleY:l?1:-1,scaleX:-1}:i===Lj&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=n.x-u.x,t.y=n.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=t.get("brushSelect");i.add(new yh({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new yh({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:ue(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var n=this._size,i=this._shadowSize||[],a=t.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var f=o.getDataExtent(l),h=(f[1]-f[0])*.3;f=[f[0]-h,f[1]+h];var d=[0,n[1]],p=[0,n[0]],v=[[n[0],0],[0,0]],m=[],g=p[1]/(o.count()-1),y=0,b=Math.round(o.count()/n[0]),_;o.each([l],function(C,A){if(b>0&&A%b){y+=g;return}var M=C==null||isNaN(C)||C==="",D=M?0:bt(C,f,d,!0);M&&!_&&A?(v.push([v[v.length-1][0],0]),m.push([m[m.length-1][0],0])):!M&&_&&(v.push([y,0]),m.push([y,0])),v.push([y,D]),m.push([y,D]),y+=g,_=M}),u=this._shadowPolygonPts=v,c=this._shadowPolylinePts=m}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var x=this.dataZoomModel;function w(C){var A=x.getModel(C?"selectedDataBackground":"dataBackground"),M=new Ee,D=new yn({shape:{points:u},segmentIgnoreThreshold:1,style:A.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),E=new bn({shape:{points:c},segmentIgnoreThreshold:1,style:A.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return M.add(D),M.add(E),M}for(var S=0;S<3;S++){var T=w(S===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();k(l,function(u){if(!i&&!(n!==!0&&He(DSe,u.get("type"))<0)){var c=a.getComponent(vs(o),s).axis,f=ISe(o),h,d=u.coordinateSystem;f!=null&&d.getOtherAxis&&(h=d.getOtherAxis(c).inverse),f=u.getData().mapDimension(f),i={thisAxis:c,series:u,thisDim:o,otherDim:f,otherAxisInverse:h}}},this)},this),i}},e.prototype._renderHandle=function(){var t=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=n.filler=new yh({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new yh({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:ASe,fill:"rgba(0,0,0,0)"}})),k([0,1],function(b){var _=l.get("handleIcon");!Ay[_]&&_.indexOf("path://")<0&&_.indexOf("image://")<0&&(_="path://"+_);var x=ur(_,-1,0,2,2,null,!0);x.attr({cursor:Ij(this._orient),draggable:!0,drift:ue(this._onDragMove,this,b),ondragend:ue(this._onDragEnd,this),onmouseover:ue(this._showDataInfo,this,!0),onmouseout:ue(this._showDataInfo,this,!1),z2:5});var w=x.getBoundingRect(),S=l.get("handleSize");this._handleHeight=ie(S,this._size[1]),this._handleWidth=w.width/w.height*this._handleHeight,x.setStyle(l.getModel("handleStyle").getItemStyle()),x.style.strokeNoScale=!0,x.rectHover=!0,x.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),ru(x);var T=l.get("handleColor");T!=null&&(x.style.fill=T),o.add(i[b]=x);var C=l.getModel("textStyle"),A=l.get("handleLabel")||{},M=A.show||!1;t.add(a[b]=new ot({silent:!0,invisible:!M,style:Et(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var d=h;if(f){var p=ie(l.get("moveHandleSize"),s[1]),v=n.moveHandle=new nt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),m=p*.8,g=n.moveHandleIcon=ur(l.get("moveHandleIcon"),-m/2,-m/2,m,m,"#fff",!0);g.silent=!0,g.y=s[1]+p/2-.5,v.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(p,10));d=n.moveZone=new nt({invisible:!0,shape:{y:s[1]-y,height:p+y}}),d.on("mouseover",function(){u.enterEmphasis(v)}).on("mouseout",function(){u.leaveEmphasis(v)}),o.add(v),o.add(g),o.add(d)}d.attr({draggable:!0,cursor:Ij(this._orient),drift:ue(this._onDragMove,this,"all"),ondragstart:ue(this._showDataInfo,this,!0),ondragend:ue(this._onDragEnd,this),onmouseover:ue(this._showDataInfo,this,!0),onmouseout:ue(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[bt(t[0],[0,100],n,!0),bt(t[1],[0,100],n,!0)]},e.prototype._updateInterval=function(t,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Nu(n,a,o,i.get("zoomLock")?"all":t,s.minSpan!=null?bt(s.minSpan,l,o,!0):null,s.maxSpan!=null?bt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=ci([bt(a[0],o,l,!0),bt(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var n=this._displayables,i=this._handleEnds,a=ci(i.slice()),o=this._size;k([0,1],function(d){var p=n.handles[d],v=this._handleHeight;p.attr({scaleX:v/2,scaleY:v/2,x:i[d]+(d?-1:1),y:o[1]/2-v/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;c<l.length;c++){var f=l[c],h=f.getClipPath();h||(h=new nt,f.setClipPath(h)),h.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var n=this.dataZoomModel,i=this._displayables,a=i.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,f=t?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var h=ci(this._handleEnds.slice());d.call(this,0),d.call(this,1);function d(p){var v=nu(i.handles[p].parent,this.group),m=q0(p===0?"right":"left",v),g=this._handleWidth/2+kSe,y=Ri([h[p]+(p===0?-g:g),this._size[1]/2],v);a[p].setStyle({x:y[0],y:y[1],verticalAlign:o===bh?"middle":m,align:o===bh?m:"center",text:s[p]})}},e.prototype._formatLabel=function(t,n){var i=this.dataZoomModel,a=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=t==null||isNaN(t)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return Te(a)?a(t,s):se(a)?a.replace("{value}",s):s},e.prototype._showDataInfo=function(t){var n=this.dataZoomModel.get("handleLabel")||{},i=n.show||!1,a=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=a.get("show")||!1,s=t||this._dragging?o:i,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},e.prototype._onDragMove=function(t,n,i,a){this._dragging=!0,_o(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Ri([n,i],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var n=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>n[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var n=t.offsetX,i=t.offsetY;this._brushStart=new ze(n,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=ci([bt(i.x,o,s,!0),bt(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(_o(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new yh({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},e.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?ESe:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=x8(this.dataZoomModel).infoList;if(!t&&n.length){var i=n[0].model.coordinateSystem;t=i.getRect&&i.getRect()}if(!t){var a=this.api.getWidth(),o=this.api.getHeight();t={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(QA);function ISe(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function Ij(r){return r==="vertical"?"ns-resize":"ew-resize"}function V8(r){r.registerComponentModel(CSe),r.registerComponentView(LSe),eM(r)}function PSe(r){Ue(F8),Ue(V8)}var $8={get:function(r,e,t){var n=ke((RSe[r]||{})[e]);return t&&q(n)?n[n.length-1]:n}},RSe={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Pj=Sr.mapVisual,OSe=Sr.eachVisual,jSe=q,Rj=k,NSe=ci,BSe=bt,Zy=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i)},e.prototype.optionUpdated=function(t,n){var i=this.option;!n&&L8(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=ue(t,this),this.controllerVisuals=wS(this.option.controller,n,t),this.targetVisuals=wS(this.option.target,n,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,n=[];return t==null||t==="all"?this.ecModel.eachSeries(function(i,a){n.push(a)}):n=wt(t),n},e.prototype.eachTargetSeries=function(t,n){k(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&t.call(n,a)},this)},e.prototype.isTargetSeries=function(t){var n=!1;return this.eachTargetSeries(function(i){i===t&&(n=!0)}),n},e.prototype.formatValueText=function(t,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],q(t)&&(t=t.slice(),u=!0);var c=n?t:u?[f(t[0]),f(t[1])]:f(t);if(se(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(Te(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?i[0]+" "+c[1]:t[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,n=NSe([t.min,t.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(t){var n=this.option.dimension;if(n!=null)return t.getDimensionIndex(n);for(var i=t.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});Be(a,i),Be(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(f){jSe(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:t.get("gradientColor")}}function u(f,h,d){var p=f[h],v=f[d];p&&!v&&(v=f[d]={},Rj(p,function(m,g){if(Sr.isValidType(g)){var y=$8.get(g,"inactive",s);y!=null&&(v[g]=y,g==="color"&&!v.hasOwnProperty("opacity")&&!v.hasOwnProperty("colorAlpha")&&(v.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,d=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),v=this.getItemSymbol(),m=v||"roundRect";Rj(this.stateList,function(g){var y=this.itemSize,b=f[g];b||(b=f[g]={color:s?p:[p]}),b.symbol==null&&(b.symbol=h&&ke(h)||(s?m:[m])),b.symbolSize==null&&(b.symbolSize=d&&ke(d)||(s?y[0]:[y[0],y[0]])),b.symbol=Pj(b.symbol,function(w){return w==="none"?m:w});var _=b.symbolSize;if(_!=null){var x=-1/0;OSe(_,function(w){w>x&&(x=w)}),b.symbolSize=Pj(_,function(w){return BSe(w,[0,x],[0,y[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Qe),Oj=[20,140],zSe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=Oj[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=Oj[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):q(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],t[0]),n[1]=Math.min(n[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),k(this.stateList,function(t){var n=this.option.controller[t].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),n=ci((this.get("range")||[]).slice());return n[0]>t[1]&&(n[0]=t[1]),n[1]>t[1]&&(n[1]=t[1]),n[0]<t[0]&&(n[0]=t[0]),n[1]<t[0]&&(n[1]=t[0]),n},e.prototype.getValueState=function(t){var n=this.option.range,i=this.getExtent();return(n[0]<=i[0]||n[0]<=t)&&(n[1]>=i[1]||t<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},e.prototype.getVisualMeta=function(t){var n=jj(this,"outOfRange",this.getExtent()),i=jj(this,"inRange",this.option.range.slice()),a=[];function o(d,p){a.push({value:d,color:t(d,p)})}for(var s=0,l=0,u=i.length,c=n.length;l<c&&(!i.length||n[l]<=i[0]);l++)n[l]<i[s]&&o(n[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&a.length&&o(i[s],"outOfRange"),o(i[s],"inRange");for(var f=1;l<c;l++)(!i.length||i[i.length-1]<n[l])&&(f&&(a.length&&o(a[a.length-1].value,"outOfRange"),f=0),o(n[l],"outOfRange"));var h=a.length;return{stops:a,outerColors:[h?a[0].color:"transparent",h?a[h-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=$s(Zy.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(Zy);function jj(r,e,t){if(t[0]===t[1])return t.slice();for(var n=200,i=(t[1]-t[0])/n,a=t[0],o=[],s=0;s<=n&&a<t[1];s++)o.push(a),a+=i;return o.push(t[1]),o}var H8=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n},e.prototype.render=function(t,n,i,a){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,n,i,a)},e.prototype.renderBackground=function(t){var n=this.visualMapModel,i=Sf(n.get("padding")||0),a=t.getBoundingRect();t.add(new nt({z2:-1,silent:!0,shape:{x:a.x-i[3],y:a.y-i[0],width:a.width+i[3]+i[1],height:a.height+i[0]+i[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,n,i){i=i||{};var a=i.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(d){return s[d]}function c(d,p){s[d]=p}var f=o.controllerVisuals[a||o.getValueState(t)],h=Sr.prepareVisualTypes(f);return k(h,function(d){var p=f[d];i.convertOpacityToAlpha&&d==="opacity"&&(d="colorAlpha",p=f.__alphaForOpacity),Sr.dependsOn(d,n)&&p&&p.applyVisual(t,u,c)}),s[n]},e.prototype.positionGroup=function(t){var n=this.visualMapModel,i=this.api;t1(t,n.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},e.prototype.doRender=function(t,n,i,a){},e.type="visualMap",e}(zt),Nj=[["left","right","width"],["top","bottom","height"]];function G8(r,e,t){var n=r.option,i=n.align;if(i!=null&&i!=="auto")return i;for(var a={width:e.getWidth(),height:e.getHeight()},o=n.orient==="horizontal"?1:0,s=Nj[o],l=[0,null,10],u={},c=0;c<3;c++)u[Nj[1-o][c]]=l[c],u[s[c]]=c===2?t[0]:n[s[c]];var f=[["x","width",3],["y","height",0]][o],h=gr(u,a,n.padding);return s[(h.margin[f[2]]||0)+h[f[0]]+h[f[1]]*.5<a[f[1]]*.5?0:1]}function tg(r,e){return k(r||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),r}var ta=bt,FSe=k,Bj=Math.min,Ix=Math.max,VSe=12,$Se=6,HSe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.init=function(t,n){r.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=ue(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=ue(this._hideIndicator,this)},e.prototype.doRender=function(t,n,i,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,n=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(n);var i=t.get("text");this._renderEndsText(n,i,0),this._renderEndsText(n,i,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},e.prototype._renderEndsText=function(t,n,i){if(n){var a=n[1-i];a=a!=null?a+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,i===0?-s:l[1]+s],u),f=this._applyTransform(i===0?"bottom":"top",u),h=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new ot({style:Et(d,{x:c[0],y:c[1],verticalAlign:h==="horizontal"?"middle":f,align:h==="horizontal"?f:"center",text:a})}))}},e.prototype._renderBar=function(t){var n=this.visualMapModel,i=this._shapes,a=n.itemSize,o=this._orient,s=this._useHandle,l=G8(n,this.api,a),u=i.mainGroup=this._createBarGroup(l),c=new Ee;u.add(c),c.add(i.outOfRange=zj()),c.add(i.inRange=zj(null,s?Vj(this._orient):null,ue(this._dragHandle,this,"all",!1),ue(this._dragHandle,this,"all",!0))),c.setClipPath(new nt({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var f=n.textStyleModel.getTextRect("国"),h=Ix(f.width,f.height);s&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(n,u,0,a,h,o),this._createHandle(n,u,1,a,h,o)),this._createIndicator(n,u,a,h,o),t.add(u)},e.prototype._createHandle=function(t,n,i,a,o,s){var l=ue(this._dragHandle,this,i,!1),u=ue(this._dragHandle,this,i,!0),c=Ni(t.get("handleSize"),a[0]),f=ur(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),h=Vj(this._orient);f.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(g){_o(g.event)}}),f.x=a[0]/2,f.useStyle(t.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),Pl(f,!0),n.add(f);var d=this.visualMapModel.textStyleModel,p=new ot({cursor:h,draggable:!0,drift:l,onmousemove:function(g){_o(g.event)},ondragend:u,style:Et(d,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var v=[c,0],m=this._shapes;m.handleThumbs[i]=f,m.handleLabelPoints[i]=v,m.handleLabels[i]=p},e.prototype._createIndicator=function(t,n,i,a,o){var s=Ni(t.get("indicatorSize"),i[0]),l=ur(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof Lr){var c=l.style;l.useStyle(W({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var f=this.visualMapModel.textStyleModel,h=new ot({silent:!0,invisible:!0,style:Et(f,{x:0,y:0,text:""})});this.group.add(h);var d=[(o==="horizontal"?a/2:$Se)+i[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=h,p.indicatorLabelPoint=d,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,n,i,a){if(this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([i,a],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():Fj(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,n=this._dataInterval=t.getSelected(),i=t.getExtent(),a=[0,t.itemSize[1]];this._handleEnds=[ta(n[0],i,a,!0),ta(n[1],i,a,!0)]},e.prototype._updateInterval=function(t,n){n=n||0;var i=this.visualMapModel,a=this._handleEnds,o=[0,i.itemSize[1]];Nu(n,a,o,t,0);var s=i.getExtent();this._dataInterval=[ta(a[0],o,s,!0),ta(a[1],o,s,!0)]},e.prototype._updateView=function(t){var n=this.visualMapModel,i=n.getExtent(),a=this._shapes,o=[0,n.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,i,s,"inRange"),u=this._createBarVisual(i,i,o,"outOfRange");a.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),a.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,n,i,a){var o={forceState:a,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(i,l);return{barColor:new Ap(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,n){var i=100,a=[],o=(t[1]-t[0])/i;a.push({color:this.getControllerVisual(t[0],"color",n),offset:0});for(var s=1;s<i;s++){var l=t[0]+o*s;if(l>t[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(t[1],"color",n),offset:1}),a},e.prototype._createBarPoints=function(t,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-n[1],t[1]]]},e.prototype._createBarGroup=function(t){var n=this._orient,i=this.visualMapModel.get("inverse");return new Ee(n==="horizontal"&&!i?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent(),c=this._applyTransform("left",i.mainGroup);FSe([0,1],function(f){var h=o[f];h.setStyle("fill",n.handlesColor[f]),h.y=t[f];var d=ta(t[f],[0,l[1]],u,!0),p=this.getControllerVisual(d,"symbolSize");h.scaleX=h.scaleY=p/l[0],h.x=l[0]-p/2;var v=Ri(i.handleLabelPoints[f],nu(h,this.group));if(this._orient==="horizontal"){var m=c==="left"||c==="top"?(l[0]-p)/2:(l[0]-p)/-2;v[1]+=m}s[f].setStyle({x:v[0],y:v[1],text:a.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",h),p=this.getControllerVisual(t,"symbolSize"),v=ta(t,s,u,!0),m=l[0]-p/2,g={x:f.x,y:f.y};f.y=v,f.x=m;var y=Ri(c.indicatorLabelPoint,nu(f,this.group)),b=c.indicatorLabel;b.attr("invisible",!1);var _=this._applyTransform("left",c.mainGroup),x=this._orient,w=x==="horizontal";b.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:w?_:"middle",align:w?"center":_});var S={x:m,y:v,style:{fill:d}},T={style:{x:y[0],y:y[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};f.x=g.x,f.y=g.y,f.animateTo(S,C),b.animateTo(T,C)}else f.attr(S),b.attr(T);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var M=0;M<A.length;M++)this.api.enterBlur(A[M])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(n){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,a=t._applyTransform([n.offsetX,n.offsetY],t._shapes.mainGroup,!0,!0);a[1]=Bj(Ix(0,a[1]),i[1]),t._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,n){var i=this.visualMapModel,a=i.itemSize;if(i.option.hoverLink){var o=[0,a[1]],s=i.getExtent();t=Bj(Ix(o[0],t),o[1]);var l=GSe(i,s,o),u=[t-l,t+l],c=ta(t,o,s,!0),f=[ta(u[0],o,s,!0),ta(u[1],o,s,!0)];u[0]<o[0]&&(f[0]=-1/0),u[1]>o[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,d=[];(n||Fj(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var p=Jse(h,d);this._dispatchHighDown("downplay",tg(p[0],i)),this._dispatchHighDown("highlight",tg(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(Ol(t.target,function(l){var u=Le(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i<n.length;i++)this.api.leaveBlur(n[i])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",tg(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,n,i,a){var o=nu(n,a?null:this.group);return q(t)?Ri(t,o,i):q0(t,o,i)},e.prototype._dispatchHighDown=function(t,n){n&&n.length&&this.api.dispatchAction({type:t,batch:n})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(H8);function zj(r,e,t,n){return new yn({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(i){_o(i.event)},ondragend:n})}function GSe(r,e,t){var n=VSe/2,i=r.get("hoverLinkDataSize");return i&&(n=ta(i,e,t,!0)/2),n}function Fj(r){var e=r.get("hoverLinkOnHandle");return!!(e??r.get("realtime"))}function Vj(r){return r==="vertical"?"ns-resize":"ew-resize"}var WSe={type:"selectDataRange",event:"dataRangeSelected",update:"update"},USe=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},YSe=[{createOnAllSeries:!0,reset:function(r,e){var t=[];return e.eachComponent("visualMap",function(n){var i=r.pipelineContext;!n.isTargetSeries(r)||i&&i.large||t.push(v2e(n.stateList,n.targetVisuals,ue(n.getValueState,n),n.getDataDimensionIndex(r.getData())))}),t}},{createOnAllSeries:!0,reset:function(r,e){var t=r.getData(),n=[];e.eachComponent("visualMap",function(i){if(i.isTargetSeries(r)){var a=i.getVisualMeta(ue(qSe,null,r,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(t);o>=0&&(a.dimension=o,n.push(a))}}),r.getData().setVisual("visualMeta",n)}}];function qSe(r,e,t,n){for(var i=e.targetVisuals[n],a=Sr.prepareVisualTypes(i),o={color:Ep(r.getData(),"color")},s=0,l=a.length;s<l;s++){var u=a[s],c=i[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,f,h)}return o.color;function f(d){return o[d]}function h(d,p){o[d]=p}}var $j=k;function XSe(r){var e=r&&r.visualMap;q(e)||(e=e?[e]:[]),$j(e,function(t){if(t){hc(t,"splitList")&&!hc(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var n=t.pieces;n&&q(n)&&$j(n,function(i){Me(i)&&(hc(i,"start")&&!hc(i,"min")&&(i.min=i.start),hc(i,"end")&&!hc(i,"max")&&(i.max=i.end))})}})}function hc(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var Hj=!1;function W8(r){Hj||(Hj=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(WSe,USe),k(YSe,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(XSe))}function U8(r){r.registerComponentModel(zSe),r.registerComponentView(HSe),W8(r)}var KSe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],ZSe[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=ke(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=K(this._pieceList,function(l){return l=ke(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,n={},i=Sr.listVisualTypes(),a=this.isCategory();k(t.pieces,function(s){k(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),k(n,function(s,l){var u=!1;k(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&k(this.stateList,function(c){(t[c]||(t[c]={}))[l]=$8.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,n){var i=this.option,a=this._pieceList,o=(n?i:t).selected||{};if(i.selected=o,k(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;k(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=ke(t)},e.prototype.getValueState=function(t){var n=Sr.findPieceIndex(t,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=Sr.findPieceIndex(l,i);c===t&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(t){var n;if(this.isCategory())n=t.value;else if(t.value!=null)n=t.value;else{var i=t.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,f){var h=a.getRepresentValue({interval:c});f||(f=a.getValueState(h));var d=t(h,f);c[0]===-1/0?i[0]=d:c[1]===1/0?i[1]=d:n.push({value:c[0],color:d},{value:c[1],color:d})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return k(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=$s(Zy.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(Zy),ZSe={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),n=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(t)!==a&&t<5;)t++;e.precision=t,a=+a.toFixed(t),e.minOpen&&r.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<i;s+=a,o++){var l=o===i-1?n[1]:s+a;r.push({interval:[s,l],close:[1,1]})}e.maxOpen&&r.push({interval:[n[1],1/0],close:[0,0]}),BE(r),k(r,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var e=this.option;k(e.categories,function(t){r.push({text:this.formatValueText(t,!0),value:t})},this),Gj(e,r)},pieces:function(r){var e=this.option;k(e.pieces,function(t,n){Me(t)||(t={value:t});var i={text:"",index:n};if(t.label!=null&&(i.text=t.label),t.hasOwnProperty("value")){var a=i.value=t.value;i.interval=[a,a],i.close=[1,1]}else{for(var o=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],f=0;f<2;f++){for(var h=[["gte","gt","min"],["lte","lt","max"]][f],d=0;d<3&&o[f]==null;d++)o[f]=t[h[d]],s[f]=l[d],c[f]=d===2;o[f]==null&&(o[f]=u[f])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=Sr.retrieveVisuals(t),r.push(i)},this),Gj(e,r),BE(r),k(r,function(t){var n=t.close,i=[["<","≤"][n[1]],[">","≥"][n[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,i)},this)}};function Gj(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var JSe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=n.itemSize,c=this._getViewData(),f=c.endsText,h=kr(n.get("showLabel",!0),!f),d=!n.get("selectedMode");f&&this._renderEndsText(t,f[0],u,h,l),k(c.viewPieceList,function(p){var v=p.piece,m=new Ee;m.onclick=ue(this._onItemClick,this,v),this._enableHoverLink(m,p.indexInModelPieceList);var g=n.getRepresentValue(v);if(this._createItemSymbol(m,g,[0,0,u[0],u[1]],d),h){var y=this.visualMapModel.getValueState(g);m.add(new ot({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:v.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1},silent:d}))}t.add(m)},this),f&&this._renderEndsText(t,f[1],u,h,l),iu(n.get("orient"),t,n.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,n){var i=this;t.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:tg(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return G8(t,this.api,t.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(t,n,i,a,o){if(n){var s=new Ee,l=this.visualMapModel.textStyleModel;s.add(new ot({style:Et(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,n=K(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=t.get("text"),a=t.get("orient"),o=t.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},e.prototype._createItemSymbol=function(t,n,i,a){var o=ur(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color"));o.silent=a,t.add(o)},e.prototype._onItemClick=function(t){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=ke(i.selected),s=n.getSelectedMapKey(t);a==="single"||a===!0?(o[s]=!0,k(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(H8);function Y8(r){r.registerComponentModel(KSe),r.registerComponentView(JSe),W8(r)}function QSe(r){Ue(U8),Ue(Y8)}var eTe={label:{enabled:!0},decal:{show:!1}},Wj=it(),tTe={};function rTe(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=ke(eTe);Be(n.label,r.getLocaleModel().get("aria"),!1),Be(t.option,n,!1),i(),a();function i(){var u=t.getModel("decal"),c=u.get("show");if(c){var f=ve();r.eachSeries(function(h){if(!h.isColorBySeries()){var d=f.get(h.type);d||(d={},f.set(h.type,d)),Wj(h).scope=d}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(Te(h.enableAriaDecal)){h.enableAriaDecal();return}var d=h.getData();if(h.isColorBySeries()){var y=k2(h.ecModel,h.name,tTe,r.getSeriesCount()),b=d.getVisual("decal");d.setVisual("decal",_(b,y))}else{var p=h.getRawData(),v={},m=Wj(h).scope;d.each(function(x){var w=d.getRawIndex(x);v[w]=x});var g=p.count();p.each(function(x){var w=v[x],S=p.getName(x)||x+"",T=k2(h.ecModel,S,m,g),C=d.getItemVisual(w,"decal");d.setItemVisual(w,"decal",_(C,T))})}function _(x,w){var S=x?W(W({},w),x):w;return S.dirty=!0,S}})}}function a(){var u=e.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),f=t.getModel("label");if(f.option=Ce(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var h=r.getSeriesCount(),d=f.get(["data","maxCount"])||10,p=f.get(["series","maxCount"])||10,v=Math.min(h,p),m;if(!(h<1)){var g=s();if(g){var y=f.get(["general","withTitle"]);m=o(y,{title:g})}else m=f.get(["general","withoutTitle"]);var b=[],_=h>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);m+=o(_,{seriesCount:h}),r.eachSeries(function(T,C){if(C<v){var A=void 0,M=T.get("name"),D=M?"withName":"withoutName";A=h>1?f.get(["series","multiple",D]):f.get(["series","single",D]),A=o(A,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var E=T.getData();if(E.count()>d){var L=f.get(["data","partialData"]);A+=o(L,{displayCnt:d})}else A+=f.get(["data","allData"]);for(var I=f.get(["data","separator","middle"]),R=f.get(["data","separator","end"]),P=f.get(["data","excludeDimensionId"]),O=[],j=0;j<E.count();j++)if(j<d){var F=E.getName(j),N=P?pt(E.getValues(j),function($,J){return He(P,J)===-1}):E.getValues(j),B=f.get(["data",F?"withName":"withoutName"]);O.push(o(B,{name:F,value:N.join(I)}))}A+=O.join(I)+R,b.push(A)}});var x=f.getModel(["series","multiple","separator"]),w=x.get("middle"),S=x.get("end");m+=b.join(w)+S,u.setAttribute("aria-label",m)}}}}function o(u,c){if(!se(u))return u;var f=u;return k(c,function(h,d){f=f.replace(new RegExp("\\{\\s*"+d+"\\s*\\}","g"),h)}),f}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=r.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function nTe(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},k(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function iTe(r){r.registerPreprocessor(nTe),r.registerVisual(r.PRIORITY.VISUAL.ARIA,rTe)}var Uj={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},aTe=function(){function r(e){var t=this._condVal=se(e)?new RegExp(e):yoe(e)?e:null;if(t==null){var n="";dt(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return se(t)?this._condVal.test(e):lt(t)?this._condVal.test(e+""):!1},r}(),oTe=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),sTe=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r}(),lTe=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r}(),uTe=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),cTe=function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,n=t(this.valueGetterParam),i=e?this.valueParser(n):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(e?i:n))return!1;return!0},r}();function uM(r,e){if(r===!0||r===!1){var t=new oTe;return t.value=r,t}var n="";return q8(r)||dt(n),r.and?Yj("and",r,e):r.or?Yj("or",r,e):r.not?fTe(r,e):hTe(r,e)}function Yj(r,e,t){var n=e[r],i="";q(n)||dt(i),n.length||dt(i);var a=r==="and"?new sTe:new lTe;return a.children=K(n,function(o){return uM(o,t)}),a.children.length||dt(i),a}function fTe(r,e){var t=r.not,n="";q8(t)||dt(n);var i=new uTe;return i.child=uM(t,e),i.child||dt(n),i}function hTe(r,e){for(var t="",n=e.prepareGetValue(r),i=[],a=et(r),o=r.parser,s=o?L6(o):null,l=0;l<a.length;l++){var u=a[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=fe(Uj,u)?Uj[u]:u,f=r[u],h=s?s(f):f,d=tfe(c,h)||c==="reg"&&new aTe(h);d||dt(t),i.push(d)}}i.length||dt(t);var p=new cTe;return p.valueGetterParam=n,p.valueParser=s,p.getValue=e.getValue,p.subCondList=i,p}function q8(r){return Me(r)&&!Zr(r)}var dTe=function(){function r(e,t){this._cond=uM(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function pTe(r,e){return new dTe(r,e)}var vTe={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,n=pTe(r.config,{valueGetterAttrMap:ve({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;fe(s,"dimension")||dt(l);var c=e.getDimensionInfo(u);return c||dt(l),{dimIdx:c.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),i=[],a=0,o=e.count();a<o;a++)t=e.getRawDataItem(a),n.evaluate()&&i.push(t);return{data:i}}},mTe={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,n="",i=wt(t);i.length||dt(n);var a=[];k(i,function(c){var f=c.dimension,h=c.order,d=c.parser,p=c.incomparable;if(f==null&&dt(n),h!=="asc"&&h!=="desc"&&dt(n),p&&p!=="min"&&p!=="max"){var v="";dt(v)}if(h!=="asc"&&h!=="desc"){var m="";dt(m)}var g=e.getDimensionInfo(f);g||dt(n);var y=d?L6(d):null;d&&!y&&dt(n),a.push({dimIdx:g.index,parser:y,comparator:new P6(h,p)})});var o=e.sourceFormat;o!==Jr&&o!==bi&&dt(n);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(c,f){for(var h=0;h<a.length;h++){var d=a[h],p=e.retrieveValueFromItem(c,d.dimIdx),v=e.retrieveValueFromItem(f,d.dimIdx);d.parser&&(p=d.parser(p),v=d.parser(v));var m=d.comparator.evaluate(p,v);if(m!==0)return m}return 0}),{data:s}}};function gTe(r){r.registerTransform(vTe),r.registerTransform(mTe)}var yTe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,n,i){r.prototype.init.call(this,t,n,i),this._sourceManager=new N6(this),KL(this)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),KL(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:xa},e}(Qe),bTe=function(r){z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(zt);function _Te(r){r.registerComponentModel(yTe),r.registerComponentView(bTe)}var Zi=Ra.CMD;function Lc(r,e){return Math.abs(r-e)<1e-5}function DS(r){var e=r.data,t=r.len(),n=[],i,a=0,o=0,s=0,l=0;function u(E,L){i&&i.length>2&&n.push(i),i=[E,L]}function c(E,L,I,R){Lc(E,I)&&Lc(L,R)||i.push(E,L,I,R,I,R)}function f(E,L,I,R,P,O){var j=Math.abs(L-E),F=Math.tan(j/4)*4/3,N=L<E?-1:1,B=Math.cos(E),$=Math.sin(E),J=Math.cos(L),U=Math.sin(L),we=B*P+I,Ye=$*O+R,ge=J*P+I,le=U*O+R,be=P*F*N,re=O*F*N;i.push(we-be*$,Ye+re*B,ge+be*U,le-re*J,ge,le)}for(var h,d,p,v,m=0;m<t;){var g=e[m++],y=m===1;switch(y&&(a=e[m],o=e[m+1],s=a,l=o,(g===Zi.L||g===Zi.C||g===Zi.Q)&&(i=[s,l])),g){case Zi.M:a=s=e[m++],o=l=e[m++],u(s,l);break;case Zi.L:h=e[m++],d=e[m++],c(a,o,h,d),a=h,o=d;break;case Zi.C:i.push(e[m++],e[m++],e[m++],e[m++],a=e[m++],o=e[m++]);break;case Zi.Q:h=e[m++],d=e[m++],p=e[m++],v=e[m++],i.push(a+2/3*(h-a),o+2/3*(d-o),p+2/3*(h-p),v+2/3*(d-v),p,v),a=p,o=v;break;case Zi.A:var b=e[m++],_=e[m++],x=e[m++],w=e[m++],S=e[m++],T=e[m++]+S;m+=1;var C=!e[m++];h=Math.cos(S)*x+b,d=Math.sin(S)*w+_,y?(s=h,l=d,u(s,l)):c(a,o,h,d),a=Math.cos(T)*x+b,o=Math.sin(T)*w+_;for(var A=(C?-1:1)*Math.PI/2,M=S;C?M>T:M<T;M+=A){var D=C?Math.max(M+A,T):Math.min(M+A,T);f(M,D,b,_,x,w)}break;case Zi.R:s=a=e[m++],l=o=e[m++],h=s+e[m++],d=l+e[m++],u(h,l),c(h,l,h,d),c(h,d,s,d),c(s,d,s,l),c(s,l,h,l);break;case Zi.Z:i&&c(a,o,s,l),a=s,o=l;break}}return i&&i.length>2&&n.push(i),n}function ES(r,e,t,n,i,a,o,s,l,u){if(Lc(r,t)&&Lc(e,n)&&Lc(i,o)&&Lc(a,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-r,d=s-e,p=Math.sqrt(h*h+d*d);h/=p,d/=p;var v=t-r,m=n-e,g=i-o,y=a-s,b=v*v+m*m,_=g*g+y*y;if(b<f&&_<f){l.push(o,s);return}var x=h*v+d*m,w=-h*g-d*y,S=b-x*x,T=_-w*w;if(S<f&&x>=0&&T<f&&w>=0){l.push(o,s);return}var C=[],A=[];Ds(r,t,i,o,.5,C),Ds(e,n,a,s,.5,A),ES(C[0],A[0],C[1],A[1],C[2],A[2],C[3],A[3],l,u),ES(C[4],A[4],C[5],A[5],C[6],A[6],C[7],A[7],l,u)}function xTe(r,e){var t=DS(r),n=[];e=e||1;for(var i=0;i<t.length;i++){var a=t[i],o=[],s=a[0],l=a[1];o.push(s,l);for(var u=2;u<a.length;){var c=a[u++],f=a[u++],h=a[u++],d=a[u++],p=a[u++],v=a[u++];ES(s,l,c,f,h,d,p,v,o,e),s=p,l=v}n.push(o)}return n}function X8(r,e,t){var n=r[e],i=r[1-e],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,f=t-c;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function qj(r,e,t){for(var n=r.r0,i=r.r,a=r.startAngle,o=r.endAngle,s=Math.abs(o-a),l=s*i,u=i-n,c=l>Math.abs(u),f=X8([l,u],c?0:1,e),h=(c?s:u)/f.length,d=0;d<f.length;d++)for(var p=(c?u:s)/f[d],v=0;v<f[d];v++){var m={};c?(m.startAngle=a+h*d,m.endAngle=a+h*(d+1),m.r0=n+p*v,m.r=n+p*(v+1)):(m.startAngle=a+p*v,m.endAngle=a+p*(v+1),m.r0=n+h*d,m.r=n+h*(d+1)),m.clockwise=r.clockwise,m.cx=r.cx,m.cy=r.cy,t.push(m)}}function wTe(r,e,t){for(var n=r.width,i=r.height,a=n>i,o=X8([n,i],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",f=r[s]/o.length,h=0;h<o.length;h++)for(var d=r[l]/o[h],p=0;p<o[h];p++){var v={};v[u]=h*f,v[c]=p*d,v[s]=f,v[l]=d,v.x+=r.x,v.y+=r.y,t.push(v)}}function Xj(r,e,t,n){return r*n-t*e}function STe(r,e,t,n,i,a,o,s){var l=t-r,u=n-e,c=o-i,f=s-a,h=Xj(c,f,l,u);if(Math.abs(h)<1e-6)return null;var d=r-i,p=e-a,v=Xj(d,p,c,f)/h;return v<0||v>1?null:new ze(v*l+r,v*u+e)}function TTe(r,e,t){var n=new ze;ze.sub(n,t,e),n.normalize();var i=new ze;ze.sub(i,r,e);var a=i.dot(n);return a}function dc(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function CTe(r,e,t){for(var n=r.length,i=[],a=0;a<n;a++){var o=r[a],s=r[(a+1)%n],l=STe(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&i.push({projPt:TTe(l,e,t),pt:l,idx:a})}if(i.length<2)return[{points:r},{points:r}];i.sort(function(m,g){return m.projPt-g.projPt});var u=i[0],c=i[i.length-1];if(c.idx<u.idx){var f=u;u=c,c=f}for(var h=[u.pt.x,u.pt.y],d=[c.pt.x,c.pt.y],p=[h],v=[d],a=u.idx+1;a<=c.idx;a++)dc(p,r[a].slice());dc(p,d),dc(p,h);for(var a=c.idx+1;a<=u.idx+n;a++)dc(v,r[a%n].slice());return dc(v,h),dc(v,d),[{points:p},{points:v}]}function Kj(r){var e=r.points,t=[],n=[];$0(e,t,n);var i=new Ve(t[0],t[1],n[0]-t[0],n[1]-t[1]),a=i.width,o=i.height,s=i.x,l=i.y,u=new ze,c=new ze;return a>o?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),CTe(e,u,c)}function Jy(r,e,t,n){if(t===1)n.push(e);else{var i=Math.floor(t/2),a=r(e);Jy(r,a[0],i,n),Jy(r,a[1],t-i,n)}return n}function ATe(r,e){for(var t=[],n=0;n<e;n++)t.push(kC(r));return t}function MTe(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function kTe(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function DTe(r,e){var t=[],n=r.shape,i;switch(r.type){case"rect":wTe(n,e,t),i=nt;break;case"sector":qj(n,e,t),i=gn;break;case"circle":qj({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,t),i=gn;break;default:var a=r.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=K(xTe(r.getUpdatedPathProxy(),o),function(g){return kTe(g)}),l=s.length;if(l===0)Jy(Kj,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var c=0,f=K(s,function(g){var y=[],b=[];$0(g,y,b);var _=(b[1]-y[1])*(b[0]-y[0]);return c+=_,{poly:g,area:_}});f.sort(function(g,y){return y.area-g.area});for(var h=e,u=0;u<l;u++){var d=f[u];if(h<=0)break;var p=u===l-1?h:Math.ceil(d.area/c*e);p<0||(Jy(Kj,{points:d.poly},p,t),h-=p)}}i=yn;break}if(!i)return ATe(r,e);for(var v=[],u=0;u<t.length;u++){var m=new i;m.setShape(t[u]),MTe(r,m),v.push(m)}return v}function ETe(r,e){var t=r.length,n=e.length;if(t===n)return[r,e];for(var i=[],a=[],o=t<n?r:e,s=Math.min(t,n),l=Math.abs(n-t)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,f=[o[0],o[1]],h=l,d=2;d<s;){var p=o[d-2],v=o[d-1],m=o[d++],g=o[d++],y=o[d++],b=o[d++],_=o[d++],x=o[d++];if(h<=0){f.push(m,g,y,b,_,x);continue}for(var w=Math.min(h,c-1)+1,S=1;S<=w;S++){var T=S/w;Ds(p,m,y,_,T,i),Ds(v,g,b,x,T,a),p=i[3],v=a[3],f.push(i[1],a[1],i[2],a[2],p,v),m=i[5],g=a[5],y=i[6],b=a[6]}h-=w-1}return o===r?[f,e]:[r,f]}function Zj(r,e){for(var t=r.length,n=r[t-2],i=r[t-1],a=[],o=0;o<e.length;)a[o++]=n,a[o++]=i;return a}function LTe(r,e){for(var t,n,i,a=[],o=[],s=0;s<Math.max(r.length,e.length);s++){var l=r[s],u=e[s],c=void 0,f=void 0;l?u?(t=ETe(l,u),c=t[0],f=t[1],n=c,i=f):(f=Zj(i||l,l),c=l):(c=Zj(n||u,u),f=u),a.push(c),o.push(f)}return[a,o]}function Jj(r){for(var e=0,t=0,n=0,i=r.length,a=0,o=i-2;a<i;o=a,a+=2){var s=r[o],l=r[o+1],u=r[a],c=r[a+1],f=s*c-u*l;e+=f,t+=(s+u)*f,n+=(l+c)*f}return e===0?[r[0]||0,r[1]||0]:[t/e/3,n/e/3,e]}function ITe(r,e,t,n){for(var i=(r.length-2)/6,a=1/0,o=0,s=r.length,l=s-2,u=0;u<i;u++){for(var c=u*6,f=0,h=0;h<s;h+=2){var d=h===0?c:(c+h-2)%l+2,p=r[d]-t[0],v=r[d+1]-t[1],m=e[h]-n[0],g=e[h+1]-n[1],y=m-p,b=g-v;f+=y*y+b*b}f<a&&(a=f,o=u)}return o}function PTe(r){for(var e=[],t=r.length,n=0;n<t;n+=2)e[n]=r[t-n-2],e[n+1]=r[t-n-1];return e}function RTe(r,e,t,n){for(var i=[],a,o=0;o<r.length;o++){var s=r[o],l=e[o],u=Jj(s),c=Jj(l);a==null&&(a=u[2]<0!=c[2]<0);var f=[],h=[],d=0,p=1/0,v=[],m=s.length;a&&(s=PTe(s));for(var g=ITe(s,l,u,c)*6,y=m-2,b=0;b<y;b+=2){var _=(g+b)%y+2;f[b+2]=s[_]-u[0],f[b+3]=s[_+1]-u[1]}f[0]=s[g]-u[0],f[1]=s[g+1]-u[1];for(var x=n/t,w=-n/2;w<=n/2;w+=x){for(var S=Math.sin(w),T=Math.cos(w),C=0,b=0;b<s.length;b+=2){var A=f[b],M=f[b+1],D=l[b]-c[0],E=l[b+1]-c[1],L=D*T-E*S,I=D*S+E*T;v[b]=L,v[b+1]=I;var R=L-A,P=I-M;C+=R*R+P*P}if(C<p){p=C,d=w;for(var O=0;O<v.length;O++)h[O]=v[O]}}i.push({from:f,to:h,fromCp:u,toCp:c,rotation:-d})}return i}function Qy(r){return r.__isCombineMorphing}var K8="__mOriginal_";function e0(r,e,t){var n=K8+e,i=r[n]||r[e];r[n]||(r[n]=r[e]);var a=t.replace,o=t.after,s=t.before;r[e]=function(){var l=arguments,u;return s&&s.apply(this,l),a?u=a.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function vd(r,e){var t=K8+e;r[t]&&(r[e]=r[t],r[t]=null)}function Qj(r,e){for(var t=0;t<r.length;t++)for(var n=r[t],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=e[0]*a+e[2]*o+e[4],n[i++]=e[1]*a+e[3]*o+e[5]}}function Z8(r,e){var t=r.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),i=LTe(DS(t),DS(n)),a=i[0],o=i[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&Qj(a,s),l&&Qj(o,l),e0(e,"updateTransform",{replace:u}),e.transform=null;var c=RTe(a,o,10,Math.PI),f=[];e0(e,"buildPath",{replace:function(h){for(var d=e.__morphT,p=1-d,v=[],m=0;m<c.length;m++){var g=c[m],y=g.from,b=g.to,_=g.rotation*d,x=g.fromCp,w=g.toCp,S=Math.sin(_),T=Math.cos(_);Nm(v,x,w,d);for(var C=0;C<y.length;C+=2){var A=y[C],M=y[C+1],D=b[C],E=b[C+1],L=A*p+D*d,I=M*p+E*d;f[C]=L*T-I*S+v[0],f[C+1]=L*S+I*T+v[1]}var R=f[0],P=f[1];h.moveTo(R,P);for(var C=2;C<y.length;){var D=f[C++],E=f[C++],O=f[C++],j=f[C++],F=f[C++],N=f[C++];R===D&&P===E&&O===F&&j===N?h.lineTo(F,N):h.bezierCurveTo(D,E,O,j,F,N),R=F,P=N}}}})}function cM(r,e,t){if(!r||!e)return e;var n=t.done,i=t.during;Z8(r,e),e.__morphT=0;function a(){vd(e,"buildPath"),vd(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},Ce({during:function(o){e.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},t)),e}function OTe(r,e,t,n,i,a){var o=16;r=i===t?0:Math.round(32767*(r-t)/(i-t)),e=a===n?0:Math.round(32767*(e-n)/(a-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,f=0;(r&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function t0(r){var e=1/0,t=1/0,n=-1/0,i=-1/0,a=K(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(f,t),n=Math.max(c,n),i=Math.max(f,i),[c,f]}),o=K(a,function(s,l){return{cp:s,z:OTe(s[0],s[1],e,t,n,i),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function J8(r){return DTe(r.path,r.count)}function LS(){return{fromIndividuals:[],toIndividuals:[],count:0}}function jTe(r,e,t){var n=[];function i(x){for(var w=0;w<x.length;w++){var S=x[w];Qy(S)?i(S.childrenRef()):S instanceof Xe&&n.push(S)}}i(r);var a=n.length;if(!a)return LS();var o=t.dividePath||J8,s=o({path:e,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),LS();n=t0(n),s=t0(s);for(var l=t.done,u=t.during,c=t.individualDelay,f=new ao,h=0;h<a;h++){var d=n[h],p=s[h];p.parent=e,p.copyTransform(f),c||Z8(d,p)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function v(x){for(var w=0;w<s.length;w++)s[w].addSelfToZr(x)}e0(e,"addSelfToZr",{after:function(x){v(x)}}),e0(e,"removeSelfFromZr",{after:function(x){for(var w=0;w<s.length;w++)s[w].removeSelfFromZr(x)}});function m(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,vd(e,"addSelfToZr"),vd(e,"removeSelfFromZr")}var g=s.length;if(c)for(var y=g,b=function(){y--,y===0&&(m(),l&&l())},h=0;h<g;h++){var _=c?Ce({delay:(t.delay||0)+c(h,g,n[h],s[h]),done:b},t):t;cM(n[h],s[h],_)}else e.__morphT=0,e.animateTo({__morphT:1},Ce({during:function(x){for(var w=0;w<g;w++){var S=s[w];S.__morphT=e.__morphT,S.dirtyShape()}u&&u(x)},done:function(){m();for(var x=0;x<r.length;x++)vd(r[x],"updateTransform");l&&l()}},t));return e.__zr&&v(e.__zr),{fromIndividuals:n,toIndividuals:s,count:g}}function NTe(r,e,t){var n=e.length,i=[],a=t.dividePath||J8;function o(d){for(var p=0;p<d.length;p++){var v=d[p];Qy(v)?o(v.childrenRef()):v instanceof Xe&&i.push(v)}}if(Qy(r)){o(r.childrenRef());var s=i.length;if(s<n)for(var l=0,u=s;u<n;u++)i.push(kC(i[l++%s]));i.length=n}else{i=a({path:r,count:n});for(var c=r.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(c);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),LS()}i=t0(i),e=t0(e);for(var f=t.individualDelay,u=0;u<n;u++){var h=f?Ce({delay:(t.delay||0)+f(u,n,i[u],e[u])},t):t;cM(i[u],e[u],h)}return{fromIndividuals:i,toIndividuals:e,count:e.length}}function e3(r){return q(r[0])}function t3(r,e){for(var t=[],n=r.length,i=0;i<n;i++)t.push({one:r[i],many:[]});for(var i=0;i<e.length;i++){var a=e[i].length,o=void 0;for(o=0;o<a;o++)t[o%n].many.push(e[i][o])}for(var s=0,i=n-1;i>=0;i--)if(!t[i].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var a=l.length,u=Math.ceil(a/2);t[i].many=l.slice(u,a),t[s].many=l.slice(0,u),s++}return t}var BTe={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n<r.count;n++){var i=kC(r.path);i.setStyle("opacity",t),e.push(i)}return e},split:null};function Px(r,e,t,n,i,a){if(!r.length||!e.length)return;var o=_f("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;e3(r)&&(u=r,c=e),e3(e)&&(u=e,c=r);function f(g,y,b,_,x){var w=g.many,S=g.one;if(w.length===1&&!x){var T=y?w[0]:S,C=y?S:w[0];if(Qy(T))f({many:[T],one:C},!0,b,_,!0);else{var A=s?Ce({delay:s(b,_)},l):l;cM(T,C,A),a(T,C,T,C,A)}}else for(var M=Ce({dividePath:BTe[t],individualDelay:s&&function(P,O,j,F){return s(P+b,_)}},l),D=y?jTe(w,S,M):NTe(S,w,M),E=D.fromIndividuals,L=D.toIndividuals,I=E.length,R=0;R<I;R++){var A=s?Ce({delay:s(R,I)},l):l;a(E[R],L[R],y?w[R]:g.one,y?g.one:w[R],A)}}for(var h=u?u===r:r.length>e.length,d=u?t3(c,u):t3(h?e:r,[h?r:e]),p=0,v=0;v<d.length;v++)p+=d[v].many.length;for(var m=0,v=0;v<d.length;v++)f(d[v],h,m,p),m+=d[v].many.length}function xl(r){if(!r)return[];if(q(r)){for(var e=[],t=0;t<r.length;t++)e.push(xl(r[t]));return e}var n=[];return r.traverse(function(i){i instanceof Xe&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var Q8=1e4,zTe=0,r3=1,n3=2,FTe=it();function VTe(r,e){for(var t=r.dimensions,n=0;n<t.length;n++){var i=r.getDimensionInfo(t[n]);if(i&&i.otherDims[e]===0)return t[n]}}function $Te(r,e,t){var n=r.getDimensionInfo(t),i=n&&n.ordinalMeta;if(n){var a=r.get(n.name,e);return i&&i.categories[a]||a+""}}function i3(r,e,t,n){var i=n?"itemChildGroupId":"itemGroupId",a=VTe(r,i);if(a){var o=$Te(r,e,a);return o}var s=r.getRawDataItem(e),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return t||r.getId(e)}function a3(r){var e=[];return k(r,function(t){var n=t.data,i=t.dataGroupId;if(!(n.count()>Q8))for(var a=n.getIndices(),o=0;o<a.length;o++)e.push({data:n,groupId:i3(n,o,i,!1),childGroupId:i3(n,o,i,!0),divide:t.divide,dataIndex:o})}),e}function Rx(r,e,t){r.traverse(function(n){n instanceof Xe&&Ot(n,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function Ox(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function pc(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function HTe(r,e,t){var n=_f("update",t,e);n&&r.traverse(function(i){if(i instanceof mi){var a=Bue(i);a&&i.animateFrom({style:a},n)}})}function GTe(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++){var i=r[n],a=e[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function eH(r,e,t){var n=a3(r),i=a3(e);function a(b,_,x,w,S){(x||b)&&_.animateFrom({style:x&&x!==b?W(W({},x.style),b.style):b.style},S)}var o=!1,s=zTe,l=ve(),u=ve();n.forEach(function(b){b.groupId&&l.set(b.groupId,!0),b.childGroupId&&u.set(b.childGroupId,!0)});for(var c=0;c<i.length;c++){var f=i[c].groupId;if(u.get(f)){s=r3;break}var h=i[c].childGroupId;if(h&&l.get(h)){s=n3;break}}function d(b,_){return function(x){var w=x.data,S=x.dataIndex;return _?w.getId(S):b?s===r3?x.childGroupId:x.groupId:s===n3?x.childGroupId:x.groupId}}var p=GTe(n,i),v={};if(!p)for(var c=0;c<i.length;c++){var m=i[c],g=m.data.getItemGraphicEl(m.dataIndex);g&&(v[g.id]=!0)}function y(b,_){var x=n[_],w=i[b],S=w.data.hostModel,T=x.data.getItemGraphicEl(x.dataIndex),C=w.data.getItemGraphicEl(w.dataIndex);if(T===C){C&&HTe(C,w.dataIndex,S);return}T&&v[T.id]||C&&(pc(C),T?(pc(T),Ox(T),o=!0,Px(xl(T),xl(C),w.divide,S,b,a)):Rx(C,S,b))}new To(n,i,d(!0,p),d(!1,p),null,"multiple").update(y).updateManyToOne(function(b,_){var x=i[b],w=x.data,S=w.hostModel,T=w.getItemGraphicEl(x.dataIndex),C=pt(K(_,function(A){return n[A].data.getItemGraphicEl(n[A].dataIndex)}),function(A){return A&&A!==T&&!v[A.id]});T&&(pc(T),C.length?(k(C,function(A){pc(A),Ox(A)}),o=!0,Px(xl(C),xl(T),x.divide,S,b,a)):Rx(T,S,x.dataIndex))}).updateOneToMany(function(b,_){var x=n[_],w=x.data.getItemGraphicEl(x.dataIndex);if(!(w&&v[w.id])){var S=pt(K(b,function(C){return i[C].data.getItemGraphicEl(i[C].dataIndex)}),function(C){return C&&C!==w}),T=i[b[0]].data.hostModel;S.length&&(k(S,function(C){return pc(C)}),w?(pc(w),Ox(w),o=!0,Px(xl(w),xl(S),x.divide,T,b[0],a)):k(S,function(C){return Rx(C,T,b[0])}))}}).updateManyToMany(function(b,_){new To(_,b,function(x){return n[x].data.getId(n[x].dataIndex)},function(x){return i[x].data.getId(i[x].dataIndex)}).update(function(x,w){y(b[x],_[w])}).execute()}).execute(),o&&k(e,function(b){var _=b.data,x=_.hostModel,w=x&&t.getViewOfSeriesModel(x),S=_f("update",x,0);w&&x.isAnimationEnabled()&&S&&S.duration>0&&w.group.traverse(function(T){T instanceof Xe&&!T.animators.length&&T.animateFrom({style:{opacity:0}},S)})})}function o3(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function s3(r){return q(r)?r.sort().join(","):r}function Qo(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function WTe(r,e){var t=ve(),n=ve(),i=ve();return k(r.oldSeries,function(a,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=o3(a),c=s3(u);n.set(c,{dataGroupId:s,data:l}),q(u)&&k(u,function(f){i.set(f,{key:c,dataGroupId:s,data:l})})}),k(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=o3(a),u=s3(l),c=n.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Qo(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Qo(s),data:s}]});else if(q(l)){var f=[];k(l,function(p){var v=n.get(p);v.data&&f.push({dataGroupId:v.dataGroupId,divide:Qo(v.data),data:v.data})}),f.length&&t.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Qo(s)}]})}else{var h=i.get(l);if(h){var d=t.get(h.key);d||(d={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Qo(h.data)}],newSeries:[]},t.set(h.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:Qo(s)})}}}}),t}function l3(r,e){for(var t=0;t<r.length;t++){var n=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(n)return t}}function UTe(r,e,t,n){var i=[],a=[];k(wt(r.from),function(o){var s=l3(e.oldSeries,o);s>=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Qo(e.oldData[s]),groupIdDim:o.dimension})}),k(wt(r.to),function(o){var s=l3(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Qo(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&eH(i,a,n)}function YTe(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){k(wt(n.seriesTransition),function(i){k(wt(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][qm]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,n){var i=FTe(t);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)k(wt(a),function(d){UTe(d,i,n,t)});else{var o=WTe(i,n);k(o.keys(),function(d){var p=o.get(d);eH(p.oldSeries,p.newSeries,t)})}k(n.updatedSeries,function(d){d[qm]&&(d[qm]=!1)})}for(var s=e.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],c=i.oldData=[],f=0;f<s.length;f++){var h=s[f].getData();h.count()<Q8&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(h))}})}Ue([nve]);Ue([Jpe]);Ue([Sve,Bve,qve,Mme,Bme,Tge,Jge,Oye,n0e,u0e,y0e,h1e,N1e,q1e,cbe,pbe,Tbe,Lbe,$be,qbe,i_e,V_e]);Ue(oxe);Ue(Ixe);Ue(JV);Ue(Wxe);Ue(N$);Ue(Xxe);Ue(iwe);Ue(Wwe);Ue(c2e);Ue(Vp);Ue(M2e);Ue(E2e);Ue(F2e);Ue(Y2e);Ue(Q2e);Ue(aSe);Ue(vSe);Ue(PSe);Ue(F8);Ue(V8);Ue(QSe);Ue(U8);Ue(Y8);Ue(iTe);Ue(gTe);Ue(_Te);Ue(YTe);Ue(ype);const qTe=r=>new Promise((e,t)=>{const n=new FileReader;n.onloadend=()=>{n.result==null?t(new Error("FileReader result is null")):typeof n.result=="string"&&e(n.result)},n.readAsDataURL(r)});function Bu(r){return new Promise((e,t)=>{r.oncomplete=r.onsuccess=()=>e(r.result),r.onabort=r.onerror=()=>t(r.error)})}function XTe(r,e){let t;const n=()=>{if(t)return t;const i=indexedDB.open(r);return i.onupgradeneeded=()=>i.result.createObjectStore(e),t=Bu(i),t.then(a=>{a.onclose=()=>t=void 0},()=>{}),t};return(i,a)=>n().then(o=>a(o.transaction(e,i).objectStore(e)))}let jx;function $p(){return jx||(jx=XTe("keyval-store","keyval")),jx}function KTe(r,e=$p()){return e("readonly",t=>Bu(t.get(r)))}function ZTe(r,e,t=$p()){return t("readwrite",n=>(n.put(e,r),Bu(n.transaction)))}function JTe(r,e=$p()){return e("readwrite",t=>(r.forEach(n=>t.put(n[1],n[0])),Bu(t.transaction)))}function QTe(r,e=$p()){return e("readwrite",t=>(t.delete(r),Bu(t.transaction)))}function eCe(r,e){return r.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},Bu(r.transaction)}function tCe(r=$p()){return r("readonly",e=>{if(e.getAllKeys)return Bu(e.getAllKeys());const t=[];return eCe(e,n=>t.push(n.key)).then(()=>t)})}wu({});wu({});const Oa=Object.create(null);Oa.open="0";Oa.close="1";Oa.ping="2";Oa.pong="3";Oa.message="4";Oa.upgrade="5";Oa.noop="6";const rg=Object.create(null);Object.keys(Oa).forEach(r=>{rg[Oa[r]]=r});const IS={type:"error",data:"parser error"},tH=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",rH=typeof ArrayBuffer=="function",nH=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,fM=({type:r,data:e},t,n)=>tH&&e instanceof Blob?t?n(e):u3(e,n):rH&&(e instanceof ArrayBuffer||nH(e))?t?n(e):u3(new Blob([e]),n):n(Oa[r]+(e||"")),u3=(r,e)=>{const t=new FileReader;return t.onload=function(){const n=t.result.split(",")[1];e("b"+(n||""))},t.readAsDataURL(r)};function c3(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}let Nx;function rCe(r,e){if(tH&&r.data instanceof Blob)return r.data.arrayBuffer().then(c3).then(e);if(rH&&(r.data instanceof ArrayBuffer||nH(r.data)))return e(c3(r.data));fM(r,!1,t=>{Nx||(Nx=new TextEncoder),e(Nx.encode(t))})}const f3="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Nh=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<f3.length;r++)Nh[f3.charCodeAt(r)]=r;const nCe=r=>{let e=r.length*.75,t=r.length,n,i=0,a,o,s,l;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);const u=new ArrayBuffer(e),c=new Uint8Array(u);for(n=0;n<t;n+=4)a=Nh[r.charCodeAt(n)],o=Nh[r.charCodeAt(n+1)],s=Nh[r.charCodeAt(n+2)],l=Nh[r.charCodeAt(n+3)],c[i++]=a<<2|o>>4,c[i++]=(o&15)<<4|s>>2,c[i++]=(s&3)<<6|l&63;return u},iCe=typeof ArrayBuffer=="function",hM=(r,e)=>{if(typeof r!="string")return{type:"message",data:iH(r,e)};const t=r.charAt(0);return t==="b"?{type:"message",data:aCe(r.substring(1),e)}:rg[t]?r.length>1?{type:rg[t],data:r.substring(1)}:{type:rg[t]}:IS},aCe=(r,e)=>{if(iCe){const t=nCe(r);return iH(t,e)}else return{base64:!0,data:r}},iH=(r,e)=>{switch(e){case"blob":return r instanceof Blob?r:new Blob([r]);case"arraybuffer":default:return r instanceof ArrayBuffer?r:r.buffer}},aH="",oCe=(r,e)=>{const t=r.length,n=new Array(t);let i=0;r.forEach((a,o)=>{fM(a,!1,s=>{n[o]=s,++i===t&&e(n.join(aH))})})},sCe=(r,e)=>{const t=r.split(aH),n=[];for(let i=0;i<t.length;i++){const a=hM(t[i],e);if(n.push(a),a.type==="error")break}return n};function lCe(){return new TransformStream({transform(r,e){rCe(r,t=>{const n=t.length;let i;if(n<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,n);else if(n<65536){i=new Uint8Array(3);const a=new DataView(i.buffer);a.setUint8(0,126),a.setUint16(1,n)}else{i=new Uint8Array(9);const a=new DataView(i.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(n))}r.data&&typeof r.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}let Bx;function gm(r){return r.reduce((e,t)=>e+t.length,0)}function ym(r,e){if(r[0].length===e)return r.shift();const t=new Uint8Array(e);let n=0;for(let i=0;i<e;i++)t[i]=r[0][n++],n===r[0].length&&(r.shift(),n=0);return r.length&&n<r[0].length&&(r[0]=r[0].slice(n)),t}function uCe(r,e){Bx||(Bx=new TextDecoder);const t=[];let n=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(t.push(o);;){if(n===0){if(gm(t)<1)break;const l=ym(t,1);a=(l[0]&128)===128,i=l[0]&127,i<126?n=3:i===126?n=1:n=2}else if(n===1){if(gm(t)<2)break;const l=ym(t,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),n=3}else if(n===2){if(gm(t)<8)break;const l=ym(t,8),u=new DataView(l.buffer,l.byteOffset,l.length),c=u.getUint32(0);if(c>Math.pow(2,21)-1){s.enqueue(IS);break}i=c*Math.pow(2,32)+u.getUint32(4),n=3}else{if(gm(t)<i)break;const l=ym(t,i);s.enqueue(hM(a?l:Bx.decode(l),e)),n=0}if(i===0||i>r){s.enqueue(IS);break}}}})}const oH=4;function mr(r){if(r)return cCe(r)}function cCe(r){for(var e in mr.prototype)r[e]=mr.prototype[e];return r}mr.prototype.on=mr.prototype.addEventListener=function(r,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(e),this};mr.prototype.once=function(r,e){function t(){this.off(r,t),e.apply(this,arguments)}return t.fn=e,this.on(r,t),this};mr.prototype.off=mr.prototype.removeListener=mr.prototype.removeAllListeners=mr.prototype.removeEventListener=function(r,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+r];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var n,i=0;i<t.length;i++)if(n=t[i],n===e||n.fn===e){t.splice(i,1);break}return t.length===0&&delete this._callbacks["$"+r],this};mr.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+r],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(t){t=t.slice(0);for(var n=0,i=t.length;n<i;++n)t[n].apply(this,e)}return this};mr.prototype.emitReserved=mr.prototype.emit;mr.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};mr.prototype.hasListeners=function(r){return!!this.listeners(r).length};const b1=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),ai=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),fCe="arraybuffer";function sH(r,...e){return e.reduce((t,n)=>(r.hasOwnProperty(n)&&(t[n]=r[n]),t),{})}const hCe=ai.setTimeout,dCe=ai.clearTimeout;function _1(r,e){e.useNativeTimers?(r.setTimeoutFn=hCe.bind(ai),r.clearTimeoutFn=dCe.bind(ai)):(r.setTimeoutFn=ai.setTimeout.bind(ai),r.clearTimeoutFn=ai.clearTimeout.bind(ai))}const pCe=1.33;function vCe(r){return typeof r=="string"?mCe(r):Math.ceil((r.byteLength||r.size)*pCe)}function mCe(r){let e=0,t=0;for(let n=0,i=r.length;n<i;n++)e=r.charCodeAt(n),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(n++,t+=4);return t}function lH(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function gCe(r){let e="";for(let t in r)r.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(r[t]));return e}function yCe(r){let e={},t=r.split("&");for(let n=0,i=t.length;n<i;n++){let a=t[n].split("=");e[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return e}class bCe extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class dM extends mr{constructor(e){super(),this.writable=!1,_1(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved("error",new bCe(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=hM(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=gCe(e);return t.length?"?"+t:""}}class _Ce extends dM{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||t()})),this.writable||(n++,this.once("drain",function(){--n||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};sCe(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,oCe(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=lH()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}}let uH=!1;try{uH=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const xCe=uH;function wCe(){}class SCe extends _Ce{constructor(e){if(super(e),typeof location<"u"){const t=location.protocol==="https:";let n=location.port;n||(n=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",(i,a)=>{this.onError("xhr post error",i,a)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,n)=>{this.onError("xhr poll error",t,n)}),this.pollXhr=e}}class wa extends mr{constructor(e,t,n){super(),this.createRequest=e,_1(this,n),this._opts=n,this._method=n.method||"GET",this._uri=t,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;const t=sH(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(t);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var i;n.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=wa.requestsCount++,wa.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=wCe,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete wa.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}wa.requestsCount=0;wa.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",h3);else if(typeof addEventListener=="function"){const r="onpagehide"in ai?"pagehide":"unload";addEventListener(r,h3,!1)}}function h3(){for(let r in wa.requests)wa.requests.hasOwnProperty(r)&&wa.requests[r].abort()}const TCe=function(){const r=cH({xdomain:!1});return r&&r.responseType!==null}();class CCe extends SCe{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=TCe&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new wa(cH,this.uri(),e)}}function cH(r){const e=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||xCe))return new XMLHttpRequest}catch{}if(!e)try{return new ai[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const fH=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class ACe extends dM{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,n=fH?{}:sH(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],i=t===e.length-1;fM(n,this.supportsBinary,a=>{try{this.doWrite(n,a)}catch{}i&&b1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=lH()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const zx=ai.WebSocket||ai.MozWebSocket;class MCe extends ACe{createSocket(e,t,n){return fH?new zx(e,t,n):t?new zx(e,t):new zx(e)}doWrite(e,t){this.ws.send(t)}}class kCe extends dM{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=uCe(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),i=lCe();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();const a=()=>{n.read().then(({done:s,value:l})=>{s||(this.onPacket(l),a())}).catch(s=>{})};a();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],i=t===e.length-1;this._writer.write(n).then(()=>{i&&b1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const DCe={websocket:MCe,webtransport:kCe,polling:CCe},ECe=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,LCe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function PS(r){if(r.length>8e3)throw"URI too long";const e=r,t=r.indexOf("["),n=r.indexOf("]");t!=-1&&n!=-1&&(r=r.substring(0,t)+r.substring(t,n).replace(/:/g,";")+r.substring(n,r.length));let i=ECe.exec(r||""),a={},o=14;for(;o--;)a[LCe[o]]=i[o]||"";return t!=-1&&n!=-1&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=ICe(a,a.path),a.queryKey=PCe(a,a.query),a}function ICe(r,e){const t=/\/{2,9}/g,n=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function PCe(r,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,i,a){i&&(t[i]=a)}),t}const RS=typeof addEventListener=="function"&&typeof removeEventListener=="function",ng=[];RS&&addEventListener("offline",()=>{ng.forEach(r=>r())},!1);class ws extends mr{constructor(e,t){if(super(),this.binaryType=fCe,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(t=e,e=null),e){const n=PS(e);t.hostname=n.host,t.secure=n.protocol==="https"||n.protocol==="wss",t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=PS(t.host).host);_1(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(n=>{const i=n.prototype.name;this.transports.push(i),this._transportsByName[i]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=yCe(this.opts.query)),RS&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ng.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=oH,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&ws.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",ws.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let n=0;n<this.writeBuffer.length;n++){const i=this.writeBuffer[n].data;if(i&&(t+=vCe(i)),n>0&&t>this._maxPayload)return this.writeBuffer.slice(0,n);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,b1(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket("message",e,t,n),this}send(e,t,n){return this._sendPacket("message",e,t,n),this}_sendPacket(e,t,n,i){if(typeof t=="function"&&(i=t,t=void 0),typeof n=="function"&&(i=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const a={type:e,data:t,options:n};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(ws.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),RS&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=ng.indexOf(this._offlineEventListener);n!==-1&&ng.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}ws.protocol=oH;class RCe extends ws{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;ws.priorWebsocketSuccess=!1;const i=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",f=>{if(!n)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;ws.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(c(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=t.name,this.emitReserved("upgradeError",h)}}))};function a(){n||(n=!0,c(),t.close(),t=null)}const o=f=>{const h=new Error("probe error: "+f);h.transport=t.name,a(),this.emitReserved("upgradeError",h)};function s(){o("transport closed")}function l(){o("socket closed")}function u(f){t&&f.name!==t.name&&a()}const c=()=>{t.removeListener("open",i),t.removeListener("error",o),t.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};t.once("open",i),t.once("error",o),t.once("close",s),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}let OCe=class extends RCe{constructor(e,t={}){const n=typeof e=="object"?e:t;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(i=>DCe[i]).filter(i=>!!i)),super(e,n)}};function jCe(r,e="",t){let n=r;t=t||typeof location<"u"&&location,r==null&&(r=t.protocol+"//"+t.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=t.protocol+r:r=t.host+r),/^(https?|wss?):\/\//.test(r)||(typeof t<"u"?r=t.protocol+"//"+r:r="https://"+r),n=PS(r)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const a=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port+e,n.href=n.protocol+"://"+a+(t&&t.port===n.port?"":":"+n.port),n}const NCe=typeof ArrayBuffer=="function",BCe=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,hH=Object.prototype.toString,zCe=typeof Blob=="function"||typeof Blob<"u"&&hH.call(Blob)==="[object BlobConstructor]",FCe=typeof File=="function"||typeof File<"u"&&hH.call(File)==="[object FileConstructor]";function pM(r){return NCe&&(r instanceof ArrayBuffer||BCe(r))||zCe&&r instanceof Blob||FCe&&r instanceof File}function ig(r,e){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let t=0,n=r.length;t<n;t++)if(ig(r[t]))return!0;return!1}if(pM(r))return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return ig(r.toJSON(),!0);for(const t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&ig(r[t]))return!0;return!1}function VCe(r){const e=[],t=r.data,n=r;return n.data=OS(t,e),n.attachments=e.length,{packet:n,buffers:e}}function OS(r,e){if(!r)return r;if(pM(r)){const t={_placeholder:!0,num:e.length};return e.push(r),t}else if(Array.isArray(r)){const t=new Array(r.length);for(let n=0;n<r.length;n++)t[n]=OS(r[n],e);return t}else if(typeof r=="object"&&!(r instanceof Date)){const t={};for(const n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=OS(r[n],e));return t}return r}function $Ce(r,e){return r.data=jS(r.data,e),delete r.attachments,r}function jS(r,e){if(!r)return r;if(r&&r._placeholder===!0){if(typeof r.num=="number"&&r.num>=0&&r.num<e.length)return e[r.num];throw new Error("illegal attachments")}else if(Array.isArray(r))for(let t=0;t<r.length;t++)r[t]=jS(r[t],e);else if(typeof r=="object")for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&(r[t]=jS(r[t],e));return r}const HCe=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],GCe=5;var yt;(function(r){r[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK"})(yt||(yt={}));class WCe{constructor(e){this.replacer=e}encode(e){return(e.type===yt.EVENT||e.type===yt.ACK)&&ig(e)?this.encodeAsBinary({type:e.type===yt.EVENT?yt.BINARY_EVENT:yt.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===yt.BINARY_EVENT||e.type===yt.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=VCe(e),n=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(n),i}}function d3(r){return Object.prototype.toString.call(r)==="[object Object]"}class vM extends mr{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===yt.BINARY_EVENT;n||t.type===yt.BINARY_ACK?(t.type=n?yt.EVENT:yt.ACK,this.reconstructor=new UCe(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(pM(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(yt[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===yt.BINARY_EVENT||n.type===yt.BINARY_ACK){const a=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const o=e.substring(a,t);if(o!=Number(o)||e.charAt(t)!=="-")throw new Error("Illegal attachments");n.attachments=Number(o)}if(e.charAt(t+1)==="/"){const a=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););n.nsp=e.substring(a,t)}else n.nsp="/";const i=e.charAt(t+1);if(i!==""&&Number(i)==i){const a=t+1;for(;++t;){const o=e.charAt(t);if(o==null||Number(o)!=o){--t;break}if(t===e.length)break}n.id=Number(e.substring(a,t+1))}if(e.charAt(++t)){const a=this.tryParse(e.substr(t));if(vM.isPayloadValid(n.type,a))n.data=a;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case yt.CONNECT:return d3(t);case yt.DISCONNECT:return t===void 0;case yt.CONNECT_ERROR:return typeof t=="string"||d3(t);case yt.EVENT:case yt.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&HCe.indexOf(t[0])===-1);case yt.ACK:case yt.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class UCe{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=$Ce(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const YCe=Object.freeze(Object.defineProperty({__proto__:null,Decoder:vM,Encoder:WCe,get PacketType(){return yt},protocol:GCe},Symbol.toStringTag,{value:"Module"}));function Mi(r,e,t){return r.on(e,t),function(){r.off(e,t)}}const qCe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class dH extends mr{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Mi(e,"open",this.onopen.bind(this)),Mi(e,"packet",this.onpacket.bind(this)),Mi(e,"error",this.onerror.bind(this)),Mi(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var n,i,a;if(qCe.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const o={type:yt.EVENT,data:t};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const c=this.ids++,f=t.pop();this._registerAckCallback(c,f),o.id=c}const s=(i=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!s||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(e,t){var n;const i=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(i===void 0){this.acks[e]=t;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===e&&this.sendBuffer.splice(s,1);t.call(this,new Error("operation has timed out"))},i),o=(...s)=>{this.io.clearTimeoutFn(a),t.apply(this,s)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise((n,i)=>{const a=(o,s)=>o?i(o):n(s);a.withError=!0,t.push(a),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...a)=>n!==this._queue[0]?void 0:(i!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(this._queue.shift(),t&&t(null,...a)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:yt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case yt.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case yt.EVENT:case yt.BINARY_EVENT:this.onevent(e);break;case yt.ACK:case yt.BINARY_ACK:this.onack(e);break;case yt.DISCONNECT:this.ondisconnect();break;case yt.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...i){n||(n=!0,t.packet({type:yt.ACK,id:e,data:i}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:yt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function Lf(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}Lf.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*r);r=Math.floor(e*10)&1?r+t:r-t}return Math.min(r,this.max)|0};Lf.prototype.reset=function(){this.attempts=0};Lf.prototype.setMin=function(r){this.ms=r};Lf.prototype.setMax=function(r){this.max=r};Lf.prototype.setJitter=function(r){this.jitter=r};class NS extends mr{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,_1(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((n=t.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new Lf({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const i=t.parser||YCe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new OCe(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const i=Mi(t,"open",function(){n.onopen(),e&&e()}),a=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),e?e(s):this.maybeReconnectOnOpen()},o=Mi(t,"error",a);if(this._timeout!==!1){const s=this._timeout,l=this.setTimeoutFn(()=>{i(),a(new Error("timeout")),t.close()},s);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Mi(e,"ping",this.onping.bind(this)),Mi(e,"data",this.ondata.bind(this)),Mi(e,"error",this.onerror.bind(this)),Mi(e,"close",this.onclose.bind(this)),Mi(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){b1(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new dH(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const n of t)if(this.nsps[n].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const _h={};function Fx(r,e){typeof r=="object"&&(e=r,r=void 0),e=e||{};const t=jCe(r,e.path||"/socket.io"),n=t.source,i=t.id,a=t.path,o=_h[i]&&a in _h[i].nsps,s=e.forceNew||e["force new connection"]||e.multiplex===!1||o;let l;return s?l=new NS(n,e):(_h[i]||(_h[i]=new NS(n,e)),l=_h[i]),t.query&&!e.query&&(e.query=t.queryKey),l.socket(t.path,e)}Object.assign(Fx,{Manager:NS,Socket:dH,io:Fx,connect:Fx});class XCe{constructor(){this.memoryStore={},this.useIndexedDB=typeof window<"u"&&!!window.indexedDB}set(e,t){if(!this.validateKey(e))return Promise.resolve(null);try{return this.useIndexedDB?ZTe(e,JSON.stringify(t)):(this.memoryStore[e]=JSON.stringify(t),Promise.resolve())}catch(n){return this.handleError(n,"save to")}}setMany(e){try{if(this.useIndexedDB){let t=[];for(const[n,i]of Object.entries(e))t.push([n,JSON.stringify(i)]);return JTe(t)}for(const[t,n]of Object.entries(e))this.memoryStore[t]=JSON.stringify(n);return Promise.resolve()}catch(t){return this.handleError(t,"save to")}}delete(e){if(!this.validateKey(e))return Promise.resolve(null);try{return this.useIndexedDB?QTe(e):(delete this.memoryStore[e],Promise.resolve())}catch(t){return this.handleError(t,"delete from")}}get(e){if(!this.validateKey(e))return Promise.resolve(null);if(this.useIndexedDB)return KTe(e).then(t=>{if(!t)return null;try{return JSON.parse(t)}catch(n){return this.handleError(n,"parse data from")}});try{const t=this.memoryStore[e];return Promise.resolve(t?JSON.parse(t):null)}catch(t){return this.handleError(t,"parse data from")}}async keys(){try{return this.useIndexedDB?tCe():Promise.resolve(Object.keys(this.memoryStore))}catch(e){return console.error(`Failed to get keys from ${this.useIndexedDB?"IndexedDB":"memory store"}:`,e),Promise.resolve([])}}validateKey(e){return!!e}handleError(e,t){return console.error(`Failed to ${t} ${this.useIndexedDB?"IndexedDB":"memory store"}:`,e),Promise.resolve(null)}}let vc=new XCe;class KCe{constructor(){this.cacheTimeout=5*60*1e3,this.storePrefix="doc:",this.docs=new Map,this.lastFetched=new Map}setCacheTimeout(e){if(e<1)throw new Error("Cache timeout must be at least 1 minute");this.cacheTimeout=e*60*1e3}async setDoc(e){if(!(e!=null&&e.doctype)||!(e!=null&&e.name))throw new Error("Invalid doc: must have doctype and name");e.name=e.name.toString();const t=this.getKey(e.doctype,e.name);try{await vc.set(this.storePrefix+t,e),this.docs.has(t)||this.docs.set(t,te(null));const n=this.docs.get(t);n&&(n.value=e),this.lastFetched.set(t,Date.now())}catch(n){throw console.error("Failed to set doc in IDB:",n),n}}getDoc(e,t){const n=Nr(t);if(!e||!n)throw new Error("doctype and name are required");const i=this.getKey(e,n);return this.docs.has(i)?this.isStale(i)&&this.loadDoc(i,!1):(this.docs.set(i,te(null)),this.loadDoc(i,!0)),this.docs.get(i)}async loadDoc(e,t){try{!t&&this.isStale(e)&&await this.cleanup(e);const n=await vc.get(this.storePrefix+e);if(n){const i=this.docs.get(e);i&&(i.value=n),this.lastFetched.set(e,Date.now())}}catch(n){throw console.error("Failed to load doc from IDB:",n),n}}async setDocs(e){const t={};for(const n of e){if(!(n!=null&&n.doctype)||!(n!=null&&n.name))continue;n.name=n.name.toString();const i=this.getKey(n.doctype,n.name);this.docs.has(i)||this.docs.set(i,te(null));const a=this.docs.get(i);a&&(a.value=n),this.lastFetched.set(i,Date.now()),t[this.storePrefix+i]=n}await vc.setMany(t)}async invalidateDoc(e,t){if(!e||!t)return;const n=this.getKey(e,t);await this.cleanup(n)}removeDoc(e,t){return this.invalidateDoc(e,t)}getKey(e,t){return`${e.trim()}/${t.trim()}`}isStale(e){const t=this.lastFetched.get(e);return t?Date.now()-t>this.cacheTimeout:!0}async cleanup(e){this.docs.delete(e),this.lastFetched.delete(e),await vc.delete(this.storePrefix+e)}async clearAll(){try{const t=(await vc.keys()).filter(n=>n.startsWith(this.storePrefix));await Promise.all(t.map(n=>vc.delete(n))),this.docs.clear(),this.lastFetched.clear()}catch(e){throw console.error("Failed to clear all docs:",e),e}}}const ZCe=new KCe;class JCe{constructor(){this.byDocType={}}addList(e,t){this.ensureList(e),this.byDocType[e].push(t)}updateRows(e){for(let t of e)this.updateRow(t.doctype,t)}updateRow(e,t){this.ensureList(e),this.byDocType[e].forEach(n=>{n.updateRow(t)})}removeRow(e,t){this.ensureList(e),this.byDocType[e].forEach(n=>{n.removeRow(t)})}ensureList(e){this.byDocType[e]||(this.byDocType[e]=[])}}const QCe=new JCe;rU({options:{fetch:(...r)=>fetch(...r),beforeFetch({options:r}){return r.headers=eAe(r.headers||{}),{options:r}},afterFetch(r){let e=JSON.parse(r.data);if(e.debug){let t=r.response.url.replace(window.location.origin,"");console.group(t);for(let n of e.debug)console.log(n==null?void 0:n.message);console.groupEnd()}if(e.docs){let t=e.docs;for(let n of t)n.name=n.name.toString();ZCe.setDocs(t),QCe.updateRows(t)}return r.data=e.data,r},onFetchError(r){var e;if((e=r.response)!=null&&e.ok&&r.error)return console.error(`Fetch request succeeded but there was a programming error:
|
||
|
||
`,r.error),r;try{let i=JSON.parse(r.data).errors[0],a=i.message?`: ${i.message}`:i.exception?" (Traceback)":"",o=new Error(`${i.type}${a}`);return o.title=i.title,o.type=i.type,o.exception=i.exception,r.error=o,r}catch(t){return console.log("Error parsing error response:",t),r}}}});function eAe(r){let e=null,t=null;typeof window<"u"&&(e=window.location.hostname,t=window.csrf_token!=="{{ csrf_token }}"?window.csrf_token:null);const n={Accept:"application/json","Content-Type":"application/json; charset=utf-8"};return e&&(n["X-Frappe-Site-Name"]=e),t&&(n["X-Frappe-CSRF-Token"]=t),{...r,...n}}const tAe={class:"p-8"},rAe={class:"mb-6 p-4 bg-white border rounded shadow"},nAe={class:"space-y-3"},cAe={__name:"SimpleDemo",setup(r){return console.log("SimpleDemo component loaded"),console.log("Button component:",ui),(e,t)=>(Y(),ae("div",tAe,[t[3]||(t[3]=kM('<h1 class="text-2xl font-bold text-gray-900 mb-4">Frappe UI Test</h1><div class="mb-6 p-4 bg-gray-100 rounded"><h2 class="text-lg font-semibold mb-2">Basic HTML + TailwindCSS</h2><p class="text-gray-600">If you can see this styled text, TailwindCSS is working!</p><button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded mt-2"> TailwindCSS Button </button></div>',2)),Z("div",rAe,[t[2]||(t[2]=Z("h2",{class:"text-lg font-semibold mb-2"},"Frappe UI Components",-1)),Z("div",nAe,[Ie(H(ui),null,{default:_e(()=>t[0]||(t[0]=[Di("Simple Frappe Button",-1)])),_:1,__:[0]}),Ie(H(ui),{variant:"solid",theme:"blue"},{default:_e(()=>t[1]||(t[1]=[Di("Blue Button",-1)])),_:1,__:[1]})])]),t[4]||(t[4]=kM('<div class="p-4 bg-primary-50 border border-primary-200 rounded"><h2 class="text-lg font-semibold text-primary-700 mb-2">Theme Colors Test</h2><p class="text-primary-600">Primary color background and text</p><div class="mt-2 grid grid-cols-5 gap-2"><div class="h-8 bg-primary-100 rounded"></div><div class="h-8 bg-primary-300 rounded"></div><div class="h-8 bg-primary-500 rounded"></div><div class="h-8 bg-primary-700 rounded"></div><div class="h-8 bg-primary-900 rounded"></div></div></div>',1))]))}};export{cAe as default};
|