19 lines
1.7 MiB
19 lines
1.7 MiB
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["apaas-custom-mydemo"]=t():e["apaas-custom-mydemo"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function r(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(a,n,function(t){return e[t]}.bind(null,n));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="fb15")}({"0079":function(e,t,r){},"0753":function(e,t,r){"use strict";r("0b3e")},"0a6d":function(e,t,r){},"0b3e":function(e,t,r){},"0b64":function(e,t,r){"use strict";r("5ec1")},"0c69":function(e,t,r){"use strict";r("eb71")},"0c75":function(e,t,r){},"0cf3":function(e,t,r){},1049:function(e,t,r){},"1c38":function(e,t,r){},"1fb5":function(e,t,r){"use strict";t.byteLength=u,t.toByteArray=d,t.fromByteArray=m;for(var a=[],n=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=o.length;s<l;++s)a[s]=o[s],n[o.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var a=r===t?0:4-r%4;return[r,a]}function u(e){var t=c(e),r=t[0],a=t[1];return 3*(r+a)/4-a}function p(e,t,r){return 3*(t+r)/4-r}function d(e){var t,r,a=c(e),o=a[0],s=a[1],l=new i(p(e,o,s)),u=0,d=s>0?o-4:o;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[u++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l}function h(e){return a[e>>18&63]+a[e>>12&63]+a[e>>6&63]+a[63&e]}function f(e,t,r){for(var a,n=[],i=t;i<r;i+=3)a=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),n.push(h(a));return n.join("")}function m(e){for(var t,r=e.length,n=r%3,i=[],o=16383,s=0,l=r-n;s<l;s+=o)i.push(f(e,s,s+o>l?l:s+o));return 1===n?(t=e[r-1],i.push(a[t>>2]+a[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],i.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"=")),i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},"20a2":function(e,t,r){},"22d1":function(e,t,r){"use strict";var a=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),n=function(){function e(){this.browser=new a,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="undefined"!==typeof window}return e}(),i=new n;function o(e,t){var r=t.browser,a=e.match(/Firefox\/([\d.]+)/),n=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),i=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);a&&(r.firefox=!0,r.version=a[1]),n&&(r.ie=!0,r.version=n[1]),i&&(r.edge=!0,r.version=i[1],r.newEdge=+i[1].split(".")[0]>18),o&&(r.weChat=!0),t.svgSupported="undefined"!==typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),t.domSupported="undefined"!==typeof document;var s=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}"object"===typeof wx&&"function"===typeof wx.getSystemInfoSync?(i.wxa=!0,i.touchEventsSupported=!0):"undefined"===typeof document&&"undefined"!==typeof self?i.worker=!0:"undefined"===typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(i.node=!0,i.svgSupported=!0):o(navigator.userAgent,i),t["a"]=i},2335:function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},2757:function(e,t,r){},"277b":function(e,t,r){"use strict";r("1049")},"2e76":function(e,t,r){"use strict";r("0cf3")},"371a":function(e,t,r){},3840:function(e,t,r){"use strict";r("6f87")},"39ad":function(e,t,r){},"3de8":function(e,t,r){"use strict";r("aa43")},"40b5":function(e,t,r){},"41ef":function(e,t,r){"use strict";r.d(t,"h",(function(){return y})),r.d(t,"c",(function(){return x})),r.d(t,"a",(function(){return w})),r.d(t,"b",(function(){return S})),r.d(t,"g",(function(){return D})),r.d(t,"f",(function(){return C})),r.d(t,"i",(function(){return T})),r.d(t,"e",(function(){return I})),r.d(t,"d",(function(){return M}));var a=r("d51b"),n=r("6d8b"),i={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 o(e){return e=Math.round(e),e<0?0:e>255?255:e}function s(e){return e=Math.round(e),e<0?0:e>360?360:e}function l(e){return e<0?0:e>1?1:e}function c(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?o(parseFloat(t)/100*255):o(parseInt(t,10))}function u(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?l(parseFloat(t)/100):l(parseFloat(t))}function p(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function d(e,t,r){return e+(t-e)*r}function h(e,t,r,a,n){return e[0]=t,e[1]=r,e[2]=a,e[3]=n,e}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var m=new a["a"](20),g=null;function v(e,t){g&&f(g,t),g=m.put(e,g||t.slice())}function y(e,t){if(e){t=t||[];var r=m.get(e);if(r)return f(t,r);e+="";var a=e.replace(/ /g,"").toLowerCase();if(a in i)return f(t,i[a]),v(e,t),t;var n=a.length;if("#"!==a.charAt(0)){var o=a.indexOf("("),s=a.indexOf(")");if(-1!==o&&s+1===n){var l=a.substr(0,o),p=a.substr(o+1,s-(o+1)).split(","),d=1;switch(l){case"rgba":if(4!==p.length)return 3===p.length?h(t,+p[0],+p[1],+p[2],1):h(t,0,0,0,1);d=u(p.pop());case"rgb":return p.length>=3?(h(t,c(p[0]),c(p[1]),c(p[2]),3===p.length?d:u(p[3])),v(e,t),t):void h(t,0,0,0,1);case"hsla":return 4!==p.length?void h(t,0,0,0,1):(p[3]=u(p[3]),b(p,t),v(e,t),t);case"hsl":return 3!==p.length?void h(t,0,0,0,1):(b(p,t),v(e,t),t);default:return}}h(t,0,0,0,1)}else{if(4===n||5===n){var g=parseInt(a.slice(1,4),16);return g>=0&&g<=4095?(h(t,(3840&g)>>4|(3840&g)>>8,240&g|(240&g)>>4,15&g|(15&g)<<4,5===n?parseInt(a.slice(4),16)/15:1),v(e,t),t):void h(t,0,0,0,1)}if(7===n||9===n){g=parseInt(a.slice(1,7),16);return g>=0&&g<=16777215?(h(t,(16711680&g)>>16,(65280&g)>>8,255&g,9===n?parseInt(a.slice(7),16)/255:1),v(e,t),t):void h(t,0,0,0,1)}}}}function b(e,t){var r=(parseFloat(e[0])%360+360)%360/360,a=u(e[1]),n=u(e[2]),i=n<=.5?n*(a+1):n+a-n*a,s=2*n-i;return t=t||[],h(t,o(255*p(s,i,r+1/3)),o(255*p(s,i,r)),o(255*p(s,i,r-1/3)),1),4===e.length&&(t[3]=e[3]),t}function _(e){if(e){var t,r,a=e[0]/255,n=e[1]/255,i=e[2]/255,o=Math.min(a,n,i),s=Math.max(a,n,i),l=s-o,c=(s+o)/2;if(0===l)t=0,r=0;else{r=c<.5?l/(s+o):l/(2-s-o);var u=((s-a)/6+l/2)/l,p=((s-n)/6+l/2)/l,d=((s-i)/6+l/2)/l;a===s?t=d-p:n===s?t=1/3+u-d:i===s&&(t=2/3+p-u),t<0&&(t+=1),t>1&&(t-=1)}var h=[360*t,r,c];return null!=e[3]&&h.push(e[3]),h}}function x(e,t){var r=y(e);if(r){for(var a=0;a<3;a++)r[a]=t<0?r[a]*(1-t)|0:(255-r[a])*t+r[a]|0,r[a]>255?r[a]=255:r[a]<0&&(r[a]=0);return T(r,4===r.length?"rgba":"rgb")}}function w(e,t,r){if(t&&t.length&&e>=0&&e<=1){r=r||[];var a=e*(t.length-1),n=Math.floor(a),i=Math.ceil(a),s=t[n],c=t[i],u=a-n;return r[0]=o(d(s[0],c[0],u)),r[1]=o(d(s[1],c[1],u)),r[2]=o(d(s[2],c[2],u)),r[3]=l(d(s[3],c[3],u)),r}}function S(e,t,r){if(t&&t.length&&e>=0&&e<=1){var a=e*(t.length-1),n=Math.floor(a),i=Math.ceil(a),s=y(t[n]),c=y(t[i]),u=a-n,p=T([o(d(s[0],c[0],u)),o(d(s[1],c[1],u)),o(d(s[2],c[2],u)),l(d(s[3],c[3],u))],"rgba");return r?{color:p,leftIndex:n,rightIndex:i,value:a}:p}}function D(e,t,r,a){var n=y(e);if(e)return n=_(n),null!=t&&(n[0]=s(t)),null!=r&&(n[1]=u(r)),null!=a&&(n[2]=u(a)),T(b(n),"rgba")}function C(e,t){var r=y(e);if(r&&null!=t)return r[3]=l(t),T(r,"rgba")}function T(e,t){if(e&&e.length){var r=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(r+=","+e[3]),t+"("+r+")"}}function I(e,t){var r=y(e);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*t:0}var O=new a["a"](100);function M(e){if(Object(n["C"])(e)){var t=O.get(e);return t||(t=x(e,-.1),O.put(e,t)),t}if(Object(n["x"])(e)){var r=Object(n["m"])({},e);return r.colorStops=Object(n["H"])(e.colorStops,(function(e){return{offset:e.offset,color:x(e.color,-.1)}})),r}return e}},4453:function(e,t,r){"use strict";r("2757")},"4e96":function(e,t,r){"use strict";r("f924")},5581:function(e,t,r){"use strict";r("6e70")},"583b":function(e,t,r){"use strict";r("7d57")},"584b":function(e,t,r){"use strict";r("b6bb")},"5a0c":function(e,t,r){!function(t,r){e.exports=r()}(0,(function(){"use strict";var e=1e3,t=6e4,r=36e5,a="millisecond",n="second",i="minute",o="hour",s="day",l="week",c="month",u="quarter",p="year",d="date",h="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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,g={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"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},v=function(e,t,r){var a=String(e);return!a||a.length>=t?e:""+Array(t+1-a.length).join(r)+e},y={s:v,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),a=Math.floor(r/60),n=r%60;return(t<=0?"+":"-")+v(a,2,"0")+":"+v(n,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var a=12*(r.year()-t.year())+(r.month()-t.month()),n=t.clone().add(a,c),i=r-n<0,o=t.clone().add(a+(i?-1:1),c);return+(-(a+(r-n)/(i?n-o:o-n))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:p,w:l,d:s,D:d,h:o,m:i,s:n,ms:a,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",_={};_[b]=g;var x=function(e){return e instanceof C},w=function e(t,r,a){var n;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();_[i]&&(n=i),r&&(_[i]=r,n=i);var o=t.split("-");if(!n&&o.length>1)return e(o[0])}else{var s=t.name;_[s]=t,n=s}return!a&&n&&(b=n),n||!a&&b},S=function(e,t){if(x(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new C(r)},D=y;D.l=w,D.i=x,D.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function g(e){this.$L=w(e.locale,null,!0),this.parse(e)}var v=g.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(D.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var a=t.match(f);if(a){var n=a[2]-1||0,i=(a[7]||"0").substring(0,3);return r?new Date(Date.UTC(a[1],n,a[3]||1,a[4]||0,a[5]||0,a[6]||0,i)):new Date(a[1],n,a[3]||1,a[4]||0,a[5]||0,a[6]||0,i)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return D},v.isValid=function(){return!(this.$d.toString()===h)},v.isSame=function(e,t){var r=S(e);return this.startOf(t)<=r&&r<=this.endOf(t)},v.isAfter=function(e,t){return S(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<S(e)},v.$g=function(e,t,r){return D.u(e)?this[t]:this.set(r,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var r=this,a=!!D.u(t)||t,u=D.p(e),h=function(e,t){var n=D.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return a?n:n.endOf(s)},f=function(e,t){return D.w(r.toDate()[e].apply(r.toDate("s"),(a?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},m=this.$W,g=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(u){case p:return a?h(1,0):h(31,11);case c:return a?h(1,g):h(0,g+1);case l:var b=this.$locale().weekStart||0,_=(m<b?m+7:m)-b;return h(a?v-_:v+(6-_),g);case s:case d:return f(y+"Hours",0);case o:return f(y+"Minutes",1);case i:return f(y+"Seconds",2);case n:return f(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var r,l=D.p(e),u="set"+(this.$u?"UTC":""),h=(r={},r[s]=u+"Date",r[d]=u+"Date",r[c]=u+"Month",r[p]=u+"FullYear",r[o]=u+"Hours",r[i]=u+"Minutes",r[n]=u+"Seconds",r[a]=u+"Milliseconds",r)[l],f=l===s?this.$D+(t-this.$W):t;if(l===c||l===p){var m=this.clone().set(d,1);m.$d[h](f),m.init(),this.$d=m.set(d,Math.min(this.$D,m.daysInMonth())).$d}else h&&this.$d[h](f);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[D.p(e)]()},v.add=function(a,u){var d,h=this;a=Number(a);var f=D.p(u),m=function(e){var t=S(h);return D.w(t.date(t.date()+Math.round(e*a)),h)};if(f===c)return this.set(c,this.$M+a);if(f===p)return this.set(p,this.$y+a);if(f===s)return m(1);if(f===l)return m(7);var g=(d={},d[i]=t,d[o]=r,d[n]=e,d)[f]||1,v=this.$d.getTime()+a*g;return D.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||h;var a=e||"YYYY-MM-DDTHH:mm:ssZ",n=D.z(this),i=this.$H,o=this.$m,s=this.$M,l=r.weekdays,c=r.months,u=function(e,r,n,i){return e&&(e[r]||e(t,a))||n[r].slice(0,i)},p=function(e){return D.s(i%12||12,e,"0")},d=r.meridiem||function(e,t,r){var a=e<12?"AM":"PM";return r?a.toLowerCase():a},f={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:D.s(s+1,2,"0"),MMM:u(r.monthsShort,s,c,3),MMMM:u(c,s),D:this.$D,DD:D.s(this.$D,2,"0"),d:String(this.$W),dd:u(r.weekdaysMin,this.$W,l,2),ddd:u(r.weekdaysShort,this.$W,l,3),dddd:l[this.$W],H:String(i),HH:D.s(i,2,"0"),h:p(1),hh:p(2),a:d(i,o,!0),A:d(i,o,!1),m:String(o),mm:D.s(o,2,"0"),s:String(this.$s),ss:D.s(this.$s,2,"0"),SSS:D.s(this.$ms,3,"0"),Z:n};return a.replace(m,(function(e,t){return t||f[e]||n.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(a,d,h){var f,m=D.p(d),g=S(a),v=(g.utcOffset()-this.utcOffset())*t,y=this-g,b=D.m(this,g);return b=(f={},f[p]=b/12,f[c]=b,f[u]=b/3,f[l]=(y-v)/6048e5,f[s]=(y-v)/864e5,f[o]=y/r,f[i]=y/t,f[n]=y/e,f)[m]||y,h?b:D.a(b)},v.daysInMonth=function(){return this.endOf(c).$D},v.$locale=function(){return _[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),a=w(e,t,!0);return a&&(r.$L=a),r},v.clone=function(){return D.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),T=C.prototype;return S.prototype=T,[["$ms",a],["$s",n],["$m",i],["$H",o],["$W",s],["$M",c],["$y",p],["$D",d]].forEach((function(e){T[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),S.extend=function(e,t){return e.$i||(e(t,C,S),e.$i=!0),S},S.locale=w,S.isDayjs=x,S.unix=function(e){return S(1e3*e)},S.en=_[b],S.Ls=_,S.p={},S}))},"5c7a":function(e,t,r){"use strict";r("40b5")},"5ec1":function(e,t,r){},"5f15":function(e,t,r){"use strict";r("d20c")},6714:function(e,t,r){},"68a3":function(e,t,r){},"6d8b":function(e,t,r){"use strict";r.d(t,"p",(function(){return g})),r.d(t,"G",(function(){return v})),r.d(t,"d",(function(){return y})),r.d(t,"I",(function(){return b})),r.d(t,"J",(function(){return _})),r.d(t,"m",(function(){return x})),r.d(t,"i",(function(){return w})),r.d(t,"r",(function(){return S})),r.d(t,"s",(function(){return D})),r.d(t,"K",(function(){return C})),r.d(t,"u",(function(){return T})),r.d(t,"k",(function(){return I})),r.d(t,"H",(function(){return O})),r.d(t,"N",(function(){return M})),r.d(t,"n",(function(){return A})),r.d(t,"o",(function(){return k})),r.d(t,"F",(function(){return P})),r.d(t,"c",(function(){return E})),r.d(t,"h",(function(){return R})),r.d(t,"t",(function(){return L})),r.d(t,"w",(function(){return j})),r.d(t,"C",(function(){return F})),r.d(t,"D",(function(){return V})),r.d(t,"z",(function(){return z})),r.d(t,"A",(function(){return B})),r.d(t,"E",(function(){return G})),r.d(t,"v",(function(){return U})),r.d(t,"x",(function(){return W})),r.d(t,"y",(function(){return H})),r.d(t,"B",(function(){return q})),r.d(t,"l",(function(){return Y})),r.d(t,"O",(function(){return X})),r.d(t,"P",(function(){return Z})),r.d(t,"Q",(function(){return K})),r.d(t,"S",(function(){return J})),r.d(t,"M",(function(){return Q})),r.d(t,"b",(function(){return ee})),r.d(t,"T",(function(){return te})),r.d(t,"R",(function(){return ae})),r.d(t,"f",(function(){return ce})),r.d(t,"e",(function(){return ue})),r.d(t,"g",(function(){return pe})),r.d(t,"j",(function(){return de})),r.d(t,"q",(function(){return he})),r.d(t,"L",(function(){return fe})),r.d(t,"a",(function(){return me}));var a=r("726e"),n=M(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(e,t){return e["[object "+t+"]"]=!0,e}),{}),i=M(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(e,t){return e["[object "+t+"Array]"]=!0,e}),{}),o=Object.prototype.toString,s=Array.prototype,l=s.forEach,c=s.filter,u=s.slice,p=s.map,d=function(){}.constructor,h=d?d.prototype:null,f="__proto__",m=2311;function g(){return m++}function v(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"undefined"!==typeof console&&console.error.apply(console,e)}function y(e){if(null==e||"object"!==typeof e)return e;var t=e,r=o.call(e);if("[object Array]"===r){if(!ne(e)){t=[];for(var a=0,s=e.length;a<s;a++)t[a]=y(e[a])}}else if(i[r]){if(!ne(e)){var l=e.constructor;if(l.from)t=l.from(e);else{t=new l(e.length);for(a=0,s=e.length;a<s;a++)t[a]=e[a]}}}else if(!n[r]&&!ne(e)&&!U(e))for(var c in t={},e)e.hasOwnProperty(c)&&c!==f&&(t[c]=y(e[c]));return t}function b(e,t,r){if(!B(t)||!B(e))return r?y(t):e;for(var a in t)if(t.hasOwnProperty(a)&&a!==f){var n=e[a],i=t[a];!B(i)||!B(n)||L(i)||L(n)||U(i)||U(n)||$(i)||$(n)||ne(i)||ne(n)?!r&&a in e||(e[a]=y(t[a])):b(n,i,r)}return e}function _(e,t){for(var r=e[0],a=1,n=e.length;a<n;a++)r=b(r,e[a],t);return r}function x(e,t){if(Object.assign)Object.assign(e,t);else for(var r in t)t.hasOwnProperty(r)&&r!==f&&(e[r]=t[r]);return e}function w(e,t,r){for(var a=P(t),n=0;n<a.length;n++){var i=a[n];(r?null!=t[i]:null==e[i])&&(e[i]=t[i])}return e}a["d"].createCanvas;function S(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var r=0,a=e.length;r<a;r++)if(e[r]===t)return r}return-1}function D(e,t){var r=e.prototype;function a(){}for(var n in a.prototype=t.prototype,e.prototype=new a,r)r.hasOwnProperty(n)&&(e.prototype[n]=r[n]);e.prototype.constructor=e,e.superClass=t}function C(e,t,r){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var a=Object.getOwnPropertyNames(t),n=0;n<a.length;n++){var i=a[n];"constructor"!==i&&(r?null!=t[i]:null==e[i])&&(e[i]=t[i])}else w(e,t,r)}function T(e){return!!e&&("string"!==typeof e&&"number"===typeof e.length)}function I(e,t,r){if(e&&t)if(e.forEach&&e.forEach===l)e.forEach(t,r);else if(e.length===+e.length)for(var a=0,n=e.length;a<n;a++)t.call(r,e[a],a,e);else for(var i in e)e.hasOwnProperty(i)&&t.call(r,e[i],i,e)}function O(e,t,r){if(!e)return[];if(!t)return J(e);if(e.map&&e.map===p)return e.map(t,r);for(var a=[],n=0,i=e.length;n<i;n++)a.push(t.call(r,e[n],n,e));return a}function M(e,t,r,a){if(e&&t){for(var n=0,i=e.length;n<i;n++)r=t.call(a,r,e[n],n,e);return r}}function A(e,t,r){if(!e)return[];if(!t)return J(e);if(e.filter&&e.filter===c)return e.filter(t,r);for(var a=[],n=0,i=e.length;n<i;n++)t.call(r,e[n],n,e)&&a.push(e[n]);return a}function k(e,t,r){if(e&&t)for(var a=0,n=e.length;a<n;a++)if(t.call(r,e[a],a,e))return e[a]}function P(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t}function N(e,t){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];return function(){return e.apply(t,r.concat(u.call(arguments)))}}var E=h&&j(h.bind)?h.call.bind(h.bind):N;function R(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return function(){return e.apply(this,t.concat(u.call(arguments)))}}function L(e){return Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)}function j(e){return"function"===typeof e}function F(e){return"string"===typeof e}function V(e){return"[object String]"===o.call(e)}function z(e){return"number"===typeof e}function B(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function $(e){return!!n[o.call(e)]}function G(e){return!!i[o.call(e)]}function U(e){return"object"===typeof e&&"number"===typeof e.nodeType&&"object"===typeof e.ownerDocument}function W(e){return null!=e.colorStops}function H(e){return null!=e.image}function q(e){return"[object RegExp]"===o.call(e)}function Y(e){return e!==e}function X(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,a=e.length;r<a;r++)if(null!=e[r])return e[r]}function Z(e,t){return null!=e?e:t}function K(e,t,r){return null!=e?e:null!=t?t:r}function J(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return u.apply(e,t)}function Q(e){if("number"===typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function ee(e,t){if(!e)throw new Error(t)}function te(e){return null==e?null:"function"===typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var re="__ec_primitive__";function ae(e){e[re]=!0}function ne(e){return e[re]}var ie=function(){function e(){this.data={}}return e.prototype["delete"]=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return P(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var r in t)t.hasOwnProperty(r)&&e(t[r],r)},e}(),oe="function"===typeof Map;function se(){return oe?new Map:new ie}var le=function(){function e(t){var r=L(t);this.data=se();var a=this;function n(e,t){r?a.set(e,t):a.set(t,e)}t instanceof e?t.each(n):t&&I(t,n)}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach((function(r,a){e.call(t,r,a)}))},e.prototype.keys=function(){var e=this.data.keys();return oe?Array.from(e):e},e.prototype.removeKey=function(e){this.data["delete"](e)},e}();function ce(e){return new le(e)}function ue(e,t){for(var r=new e.constructor(e.length+t.length),a=0;a<e.length;a++)r[a]=e[a];var n=e.length;for(a=0;a<t.length;a++)r[a+n]=t[a];return r}function pe(e,t){var r;if(Object.create)r=Object.create(e);else{var a=function(){};a.prototype=e,r=new a}return t&&x(r,t),r}function de(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function he(e,t){return e.hasOwnProperty(t)}function fe(){}var me=180/Math.PI},"6e70":function(e,t,r){},"6f87":function(e,t,r){},"726e":function(e,t,r){"use strict";r.d(t,"c",(function(){return a})),r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return i})),r.d(t,"d",(function(){return p})),r.d(t,"e",(function(){return d}));var a=12,n="sans-serif",i=a+"px "+n,o=20,s=100,l="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function c(e){var t={};if("undefined"===typeof JSON)return t;for(var r=0;r<e.length;r++){var a=String.fromCharCode(r+32),n=(e.charCodeAt(r)-o)/s;t[a]=n}return t}var u=c(l),p={createCanvas:function(){return"undefined"!==typeof document&&document.createElement("canvas")},measureText:function(){var e,t;return function(r,n){if(!e){var o=p.createCanvas();e=o&&o.getContext("2d")}if(e)return t!==n&&(t=e.font=n||i),e.measureText(r);r=r||"",n=n||i;var s=/((?:\d+)?\.?\d*)px/.exec(n),l=s&&+s[1]||a,c=0;if(n.indexOf("mono")>=0)c=l*r.length;else for(var d=0;d<r.length;d++){var h=u[r[d]];c+=null==h?l:h*l}return{width:c}}}(),loadImage:function(e,t,r){var a=new Image;return a.onload=t,a.onerror=r,a.src=e,a}};function d(e){for(var t in p)e[t]&&(p[t]=e[t])}},"7a29":function(e,t,r){"use strict";(function(e){r.d(t,"p",(function(){return s})),r.d(t,"j",(function(){return c})),r.d(t,"q",(function(){return p})),r.d(t,"e",(function(){return d})),r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return f})),r.d(t,"i",(function(){return m})),r.d(t,"h",(function(){return g})),r.d(t,"l",(function(){return v})),r.d(t,"n",(function(){return b})),r.d(t,"m",(function(){return _})),r.d(t,"o",(function(){return x})),r.d(t,"k",(function(){return w})),r.d(t,"d",(function(){return S})),r.d(t,"f",(function(){return D})),r.d(t,"g",(function(){return C})),r.d(t,"c",(function(){return T}));var a=r("6d8b"),n=r("41ef"),i=r("22d1"),o=Math.round;function s(e){var t;if(e&&"transparent"!==e){if("string"===typeof e&&e.indexOf("rgba")>-1){var r=Object(n["h"])(e);r&&(e="rgb("+r[0]+","+r[1]+","+r[2]+")",t=r[3])}}else e="none";return{color:e,opacity:null==t?1:t}}var l=1e-4;function c(e){return e<l&&e>-l}function u(e){return o(1e3*e)/1e3}function p(e){return o(1e4*e)/1e4}function d(e){return"matrix("+u(e[0])+","+u(e[1])+","+u(e[2])+","+u(e[3])+","+p(e[4])+","+p(e[5])+")"}var h={left:"start",right:"end",center:"middle",middle:"middle"};function f(e,t,r){return"top"===r?e+=t/2:"bottom"===r&&(e-=t/2),e}function m(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function g(e){var t=e.style,r=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function v(e){return e&&!!e.image}function y(e){return e&&!!e.svgElement}function b(e){return v(e)||y(e)}function _(e){return"linear"===e.type}function x(e){return"radial"===e.type}function w(e){return e&&("linear"===e.type||"radial"===e.type)}function S(e){return"url(#"+e+")"}function D(e){var t=e.getGlobalScale(),r=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function C(e){var t=e.x||0,r=e.y||0,n=(e.rotation||0)*a["a"],i=Object(a["P"])(e.scaleX,1),s=Object(a["P"])(e.scaleY,1),l=e.skewX||0,c=e.skewY||0,u=[];return(t||r)&&u.push("translate("+t+"px,"+r+"px)"),n&&u.push("rotate("+n+")"),1===i&&1===s||u.push("scale("+i+","+s+")"),(l||c)&&u.push("skew("+o(l*a["a"])+"deg, "+o(c*a["a"])+"deg)"),u.join(" ")}var T=function(){return i["a"].hasGlobalWindow&&Object(a["w"])(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:"undefined"!==typeof e?function(t){return e.from(t).toString("base64")}:function(e){return null}}()}).call(this,r("b639").Buffer)},"7d57":function(e,t,r){},8875:function(e,t,r){var a,n,i;(function(r,o){n=[],a=o,i="function"===typeof a?a.apply(t,n):a,void 0===i||(e.exports=i)})("undefined"!==typeof self&&self,(function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(h){var r,a,n,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,o=/@([^@]*):(\d+):(\d+)\s*$/gi,s=i.exec(h.stack)||o.exec(h.stack),l=s&&s[1]||!1,c=s&&s[2]||!1,u=document.location.href.replace(document.location.hash,""),p=document.getElementsByTagName("script");l===u&&(r=document.documentElement.outerHTML,a=new RegExp("(?:[^\\n]+?\\n){0,"+(c-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),n=r.replace(a,"$1").trim());for(var d=0;d<p.length;d++){if("interactive"===p[d].readyState)return p[d];if(p[d].src===l)return p[d];if(l===u&&p[d].innerHTML&&p[d].innerHTML.trim()===n)return p[d]}return null}}return e}))},"8e43":function(e,t,r){"use strict";r("f3ec")},"8f19":function(e,t,r){"use strict";r("39ad")},"90cd":function(e,t,r){},9152:function(e,t){
|
||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.read=function(e,t,r,a,n){var i,o,s=8*n-a-1,l=(1<<s)-1,c=l>>1,u=-7,p=r?n-1:0,d=r?-1:1,h=e[t+p];for(p+=d,i=h&(1<<-u)-1,h>>=-u,u+=s;u>0;i=256*i+e[t+p],p+=d,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=a;u>0;o=256*o+e[t+p],p+=d,u-=8);if(0===i)i=1-c;else{if(i===l)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,a),i-=c}return(h?-1:1)*o*Math.pow(2,i-a)},t.write=function(e,t,r,a,n,i){var o,s,l,c=8*i-n-1,u=(1<<c)-1,p=u>>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,h=a?0:i-1,f=a?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),t+=o+p>=1?d/l:d*Math.pow(2,1-p),t*l>=2&&(o++,l/=2),o+p>=u?(s=0,o=u):o+p>=1?(s=(t*l-1)*Math.pow(2,n),o+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,n),o=0));n>=8;e[r+h]=255&s,h+=f,s/=256,n-=8);for(o=o<<n|s,c+=n;c>0;e[r+h]=255&o,h+=f,o/=256,c-=8);e[r+h-f]|=128*m}},"9cab":function(e,t,r){"use strict";r("1c38")},a3aa:function(e,t,r){"use strict";r("6714")},a495:function(e,t,r){"use strict";r("0a6d")},a786:function(e,t,r){"use strict";r("cd52")},a795:function(e,t,r){"use strict";r("d9ce")},a879:function(e,t,r){"use strict";r("d8b6")},aa43:function(e,t,r){},adff:function(e,t,r){},ae72:function(e,t,r){"use strict";r("0c75")},b36b:function(e,t,r){},b3b8:function(e,t,r){},b639:function(e,t,r){"use strict";(function(e){
|
||
/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <http://feross.org>
|
||
* @license MIT
|
||
*/
|
||
var a=r("1fb5"),n=r("9152"),i=r("2335");function o(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=c.prototype):(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,r){if(!c.TYPED_ARRAY_SUPPORT&&!(this instanceof c))return new c(e,t,r);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return h(this,e)}return u(this,e,t,r)}function u(e,t,r,a){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?g(e,t,r,a):"string"===typeof t?f(e,t,r):v(e,t)}function p(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t,r,a){return p(t),t<=0?l(e,t):void 0!==r?"string"===typeof a?l(e,t).fill(r,a):l(e,t).fill(r):l(e,t)}function h(e,t){if(p(t),e=l(e,t<0?0:0|y(t)),!c.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function f(e,t,r){if("string"===typeof r&&""!==r||(r="utf8"),!c.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var a=0|_(t,r);e=l(e,a);var n=e.write(t,r);return n!==a&&(e=e.slice(0,n)),e}function m(e,t){var r=t.length<0?0:0|y(t.length);e=l(e,r);for(var a=0;a<r;a+=1)e[a]=255&t[a];return e}function g(e,t,r,a){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(a||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===a?new Uint8Array(t):void 0===a?new Uint8Array(t,r):new Uint8Array(t,r,a),c.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=c.prototype):e=m(e,t),e}function v(e,t){if(c.isBuffer(t)){var r=0|y(t.length);return e=l(e,r),0===e.length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||te(t.length)?l(e,0):m(e,t);if("Buffer"===t.type&&i(t.data))return m(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function y(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function b(e){return+e!=e&&(e=0),c.alloc(+e)}function _(e,t){if(c.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(e).length;default:if(a)return Z(e).length;t=(""+t).toLowerCase(),a=!0}}function x(e,t,r){var a=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";e||(e="utf8");while(1)switch(e){case"hex":return j(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return L(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,r);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function w(e,t,r){var a=e[t];e[t]=e[r],e[r]=a}function S(e,t,r,a,n){if(0===e.length)return-1;if("string"===typeof r?(a=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"===typeof t&&(t=c.from(t,a)),c.isBuffer(t))return 0===t.length?-1:D(e,t,r,a,n);if("number"===typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):D(e,[t],r,a,n);throw new TypeError("val must be string, number or Buffer")}function D(e,t,r,a,n){var i,o=1,s=e.length,l=t.length;if(void 0!==a&&(a=String(a).toLowerCase(),"ucs2"===a||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){var u=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*o}else-1!==u&&(i-=i-u),u=-1}else for(r+l>s&&(r=s-l),i=r;i>=0;i--){for(var p=!0,d=0;d<l;d++)if(c(e,i+d)!==c(t,d)){p=!1;break}if(p)return i}return-1}function C(e,t,r,a){r=Number(r)||0;var n=e.length-r;a?(a=Number(a),a>n&&(a=n)):a=n;var i=t.length;if(i%2!==0)throw new TypeError("Invalid hex string");a>i/2&&(a=i/2);for(var o=0;o<a;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[r+o]=s}return o}function T(e,t,r,a){return ee(Z(t,e.length-r),e,r,a)}function I(e,t,r,a){return ee(K(t),e,r,a)}function O(e,t,r,a){return I(e,t,r,a)}function M(e,t,r,a){return ee(Q(t),e,r,a)}function A(e,t,r,a){return ee(J(t,e.length-r),e,r,a)}function k(e,t,r){return 0===t&&r===e.length?a.fromByteArray(e):a.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);var a=[],n=t;while(n<r){var i,o,s,l,c=e[n],u=null,p=c>239?4:c>223?3:c>191?2:1;if(n+p<=r)switch(p){case 1:c<128&&(u=c);break;case 2:i=e[n+1],128===(192&i)&&(l=(31&c)<<6|63&i,l>127&&(u=l));break;case 3:i=e[n+1],o=e[n+2],128===(192&i)&&128===(192&o)&&(l=(15&c)<<12|(63&i)<<6|63&o,l>2047&&(l<55296||l>57343)&&(u=l));break;case 4:i=e[n+1],o=e[n+2],s=e[n+3],128===(192&i)&&128===(192&o)&&128===(192&s)&&(l=(15&c)<<18|(63&i)<<12|(63&o)<<6|63&s,l>65535&&l<1114112&&(u=l))}null===u?(u=65533,p=1):u>65535&&(u-=65536,a.push(u>>>10&1023|55296),u=56320|1023&u),a.push(u),n+=p}return E(a)}t.Buffer=c,t.SlowBuffer=b,t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:o(),t.kMaxLength=s(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,r){return u(null,e,t,r)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,r){return d(null,e,t,r)},c.allocUnsafe=function(e){return h(null,e)},c.allocUnsafeSlow=function(e){return h(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,a=t.length,n=0,i=Math.min(r,a);n<i;++n)if(e[n]!==t[n]){r=e[n],a=t[n];break}return r<a?-1:a<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var a=c.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){var o=e[r];if(!c.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(a,n),n+=o.length}return a},c.byteLength=_,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)w(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)w(this,t,t+3),w(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)w(this,t,t+7),w(this,t+1,t+6),w(this,t+2,t+5),w(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?P(this,0,e):x.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,r,a,n){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===a&&(a=0),void 0===n&&(n=this.length),t<0||r>e.length||a<0||n>this.length)throw new RangeError("out of range index");if(a>=n&&t>=r)return 0;if(a>=n)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,a>>>=0,n>>>=0,this===e)return 0;for(var i=n-a,o=r-t,s=Math.min(i,o),l=this.slice(a,n),u=e.slice(t,r),p=0;p<s;++p)if(l[p]!==u[p]){i=l[p],o=u[p];break}return i<o?-1:o<i?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return S(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return S(this,e,t,r,!1)},c.prototype.write=function(e,t,r,a){if(void 0===t)a="utf8",r=this.length,t=0;else if(void 0===r&&"string"===typeof t)a=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===a&&(a="utf8")):(a=r,r=void 0)}var n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var i=!1;;)switch(a){case"hex":return C(this,e,t,r);case"utf8":case"utf-8":return T(this,e,t,r);case"ascii":return I(this,e,t,r);case"latin1":case"binary":return O(this,e,t,r);case"base64":return M(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var N=4096;function E(e){var t=e.length;if(t<=N)return String.fromCharCode.apply(String,e);var r="",a=0;while(a<t)r+=String.fromCharCode.apply(String,e.slice(a,a+=N));return r}function R(e,t,r){var a="";r=Math.min(e.length,r);for(var n=t;n<r;++n)a+=String.fromCharCode(127&e[n]);return a}function L(e,t,r){var a="";r=Math.min(e.length,r);for(var n=t;n<r;++n)a+=String.fromCharCode(e[n]);return a}function j(e,t,r){var a=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>a)&&(r=a);for(var n="",i=t;i<r;++i)n+=X(e[i]);return n}function F(e,t,r){for(var a=e.slice(t,r),n="",i=0;i<a.length;i+=2)n+=String.fromCharCode(a[i]+256*a[i+1]);return n}function V(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function z(e,t,r,a,n,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<i)throw new RangeError('"value" argument is out of bounds');if(r+a>e.length)throw new RangeError("Index out of range")}function B(e,t,r,a){t<0&&(t=65535+t+1);for(var n=0,i=Math.min(e.length-r,2);n<i;++n)e[r+n]=(t&255<<8*(a?n:1-n))>>>8*(a?n:1-n)}function $(e,t,r,a){t<0&&(t=4294967295+t+1);for(var n=0,i=Math.min(e.length-r,4);n<i;++n)e[r+n]=t>>>8*(a?n:3-n)&255}function G(e,t,r,a,n,i){if(r+a>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,a,i){return i||G(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,a,23,4),r+4}function W(e,t,r,a,i){return i||G(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,a,52,8),r+8}c.prototype.slice=function(e,t){var r,a=this.length;if(e=~~e,t=void 0===t?a:~~t,e<0?(e+=a,e<0&&(e=0)):e>a&&(e=a),t<0?(t+=a,t<0&&(t=0)):t>a&&(t=a),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=c.prototype;else{var n=t-e;r=new c(n,void 0);for(var i=0;i<n;++i)r[i]=this[i+e]}return r},c.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||V(e,t,this.length);var a=this[e],n=1,i=0;while(++i<t&&(n*=256))a+=this[e+i]*n;return a},c.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||V(e,t,this.length);var a=this[e+--t],n=1;while(t>0&&(n*=256))a+=this[e+--t]*n;return a},c.prototype.readUInt8=function(e,t){return t||V(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||V(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||V(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||V(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||V(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||V(e,t,this.length);var a=this[e],n=1,i=0;while(++i<t&&(n*=256))a+=this[e+i]*n;return n*=128,a>=n&&(a-=Math.pow(2,8*t)),a},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||V(e,t,this.length);var a=t,n=1,i=this[e+--a];while(a>0&&(n*=256))i+=this[e+--a]*n;return n*=128,i>=n&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||V(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||V(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||V(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||V(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||V(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||V(e,4,this.length),n.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||V(e,4,this.length),n.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||V(e,8,this.length),n.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||V(e,8,this.length),n.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,a){if(e=+e,t|=0,r|=0,!a){var n=Math.pow(2,8*r)-1;z(this,e,t,r,n,0)}var i=1,o=0;this[t]=255&e;while(++o<r&&(i*=256))this[t+o]=e/i&255;return t+r},c.prototype.writeUIntBE=function(e,t,r,a){if(e=+e,t|=0,r|=0,!a){var n=Math.pow(2,8*r)-1;z(this,e,t,r,n,0)}var i=r-1,o=1;this[t+i]=255&e;while(--i>=0&&(o*=256))this[t+i]=e/o&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||z(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||z(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||z(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||z(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):$(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||z(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):$(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,a){if(e=+e,t|=0,!a){var n=Math.pow(2,8*r-1);z(this,e,t,r,n-1,-n)}var i=0,o=1,s=0;this[t]=255&e;while(++i<r&&(o*=256))e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},c.prototype.writeIntBE=function(e,t,r,a){if(e=+e,t|=0,!a){var n=Math.pow(2,8*r-1);z(this,e,t,r,n-1,-n)}var i=r-1,o=1,s=0;this[t+i]=255&e;while(--i>=0&&(o*=256))e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||z(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||z(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||z(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||z(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):$(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||z(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):$(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return U(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return U(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return W(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return W(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,a){if(r||(r=0),a||0===a||(a=this.length),t>=e.length&&(t=e.length),t||(t=0),a>0&&a<r&&(a=r),a===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t<a-r&&(a=e.length-t+r);var n,i=a-r;if(this===e&&r<t&&t<a)for(n=i-1;n>=0;--n)e[n+t]=this[n+r];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(n=0;n<i;++n)e[n+t]=this[n+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},c.prototype.fill=function(e,t,r,a){if("string"===typeof e){if("string"===typeof t?(a=t,t=0,r=this.length):"string"===typeof r&&(a=r,r=this.length),1===e.length){var n=e.charCodeAt(0);n<256&&(e=n)}if(void 0!==a&&"string"!==typeof a)throw new TypeError("encoding must be a string");if("string"===typeof a&&!c.isEncoding(a))throw new TypeError("Unknown encoding: "+a)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(i=t;i<r;++i)this[i]=e;else{var o=c.isBuffer(e)?e:Z(new c(e,a).toString()),s=o.length;for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};var H=/[^+\/0-9A-Za-z-_]/g;function q(e){if(e=Y(e).replace(H,""),e.length<2)return"";while(e.length%4!==0)e+="=";return e}function Y(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function X(e){return e<16?"0"+e.toString(16):e.toString(16)}function Z(e,t){var r;t=t||1/0;for(var a=e.length,n=null,i=[],o=0;o<a;++o){if(r=e.charCodeAt(o),r>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===a){(t-=3)>-1&&i.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&i.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function K(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function J(e,t){for(var r,a,n,i=[],o=0;o<e.length;++o){if((t-=2)<0)break;r=e.charCodeAt(o),a=r>>8,n=r%256,i.push(n),i.push(a)}return i}function Q(e){return a.toByteArray(q(e))}function ee(e,t,r,a){for(var n=0;n<a;++n){if(n+r>=t.length||n>=e.length)break;t[n+r]=e[n]}return n}function te(e){return e!==e}}).call(this,r("c8ba"))},b6bb:function(e,t,r){},bc18:function(e,t,r){"use strict";r("68a3")},c77b:function(e,t,r){"use strict";r("adff")},c8ba:function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(a){"object"===typeof window&&(r=window)}e.exports=r},cb20:function(e,t,r){"use strict";r("df65")},cd52:function(e,t,r){},ce9d:function(e,t,r){},d20c:function(e,t,r){},d51b:function(e,t,r){"use strict";var a=function(){function e(e){this.value=e}return e}(),n=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new a(e);return this.insertEntry(t),t},e.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++},e.prototype.remove=function(e){var t=e.prev,r=e.next;t?t.next=r:this.head=r,r?r.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),i=function(){function e(e){this._list=new n,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var r=this._list,n=this._map,i=null;if(null==n[e]){var o=r.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=r.head;r.remove(l),delete n[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new a(t),s.key=e,r.insertEntry(s),n[e]=s}return i},e.prototype.get=function(e){var t=this._map[e],r=this._list;if(null!=t)return t!==r.tail&&(r.remove(t),r.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}();t["a"]=i},d8b6:function(e,t,r){},d906:function(e,t,r){"use strict";r("ce9d")},d911:function(e,t,r){},d9ce:function(e,t,r){},dcc9:function(e,t,r){"use strict";r("b36b")},dcd1:function(e,t,r){"use strict";r("371a")},de90:function(e,t,r){"use strict";r("0079")},df65:function(e,t,r){},e812:function(e,t,r){"use strict";r("20a2")},eb71:function(e,t,r){},eed8:function(e,t,r){"use strict";r("d911")},f3ec:function(e,t,r){},f60e:function(e,t,r){"use strict";r("90cd")},f877:function(e,t,r){"use strict";r("b3b8")},f924:function(e,t,r){},fb15:function(e,t,r){"use strict";r.r(t);var a={};if(r.r(a),r.d(a,"updateProps",(function(){return sh})),r.d(a,"initProps",(function(){return lh})),r.d(a,"removeElement",(function(){return uh})),r.d(a,"removeElementWithFadeOut",(function(){return dh})),r.d(a,"isElementRemoved",(function(){return ch})),r.d(a,"extendShape",(function(){return I_})),r.d(a,"extendPath",(function(){return M_})),r.d(a,"registerShape",(function(){return A_})),r.d(a,"getShapeClass",(function(){return k_})),r.d(a,"makePath",(function(){return P_})),r.d(a,"makeImage",(function(){return N_})),r.d(a,"mergePath",(function(){return R_})),r.d(a,"resizePath",(function(){return L_})),r.d(a,"subPixelOptimizeLine",(function(){return j_})),r.d(a,"subPixelOptimizeRect",(function(){return F_})),r.d(a,"subPixelOptimize",(function(){return V_})),r.d(a,"getTransform",(function(){return z_})),r.d(a,"applyTransform",(function(){return B_})),r.d(a,"transformDirection",(function(){return $_})),r.d(a,"groupTransition",(function(){return W_})),r.d(a,"clipPointsByRect",(function(){return H_})),r.d(a,"clipRectByRect",(function(){return q_})),r.d(a,"createIcon",(function(){return Y_})),r.d(a,"linePolygonIntersect",(function(){return X_})),r.d(a,"lineLineIntersect",(function(){return Z_})),r.d(a,"setTooltipConfig",(function(){return Q_})),r.d(a,"traverseElements",(function(){return tx})),r.d(a,"Group",(function(){return Bs})),r.d(a,"Image",(function(){return gp})),r.d(a,"Text",(function(){return Gp})),r.d(a,"Circle",(function(){return gb})),r.d(a,"Ellipse",(function(){return bb})),r.d(a,"Sector",(function(){return jb})),r.d(a,"Ring",(function(){return zb})),r.d(a,"Polygon",(function(){return Wb})),r.d(a,"Polyline",(function(){return Yb})),r.d(a,"Rect",(function(){return Cp})),r.d(a,"Line",(function(){return Jb})),r.d(a,"BezierCurve",(function(){return a_})),r.d(a,"Arc",(function(){return o_})),r.d(a,"IncrementalDisplayable",(function(){return S_})),r.d(a,"CompoundPath",(function(){return l_})),r.d(a,"LinearGradient",(function(){return d_})),r.d(a,"RadialGradient",(function(){return f_})),r.d(a,"BoundingRect",(function(){return Hn})),r.d(a,"OrientedBoundingRect",(function(){return __})),r.d(a,"Point",(function(){return Ln})),r.d(a,"Path",(function(){return lp})),"undefined"!==typeof window){var n=window.document.currentScript,i=r("8875");n=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var o=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(r.p=o[1])}var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("h2",[e._v("测试自开发页面")])},l=[],c={name:"ApaasCustomMydemo"},u=c;r("e812");function p(e,t,r,a,n,i,o,s){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=r,c._compiled=!0),a&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),o?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},c._ssrRegister=l):n&&(l=s?function(){n.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:n),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,l):[l]}return{exports:e,options:c}}var d=p(u,s,l,!1,null,null,null),h=d.exports,f=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"apaas-custom-page-mydemo custom-page"},[r("div",{staticClass:"page-header"},[r("div",{staticClass:"title"},[e._v(" 自开发界面 ")]),r("div",{staticClass:"operation"},[r("x-svg-icon",{staticClass:"pointer",staticStyle:{cursor:"pointer"},attrs:{name:"refresh-icon"},nativeOn:{click:function(t){return e.handleRefresh()}}})],1)]),r("div",{staticClass:"page-search-panel"},[r("el-form",{staticClass:"search-list"},[e._l(e.searchListConfig,(function(t){return[r(t.component,{key:t.searchKey,tag:"component",attrs:{label:t.label,extraConfig:t.extraConfig,searchKey:t.searchKey,searchValue:e.searchPanelValue[t.searchKey]},on:{change:function(r){return e.handleSearchValueChange(t.searchKey,r)}}})]}))],2),r("div",{staticClass:"search-button-group"},[r("el-button",{attrs:{"native-type":"reset"},on:{click:function(t){return e.resetSearch()}}},[e._v(" 重置 ")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleSearch()}}},[e._v(" 查询 ")])],1)],1),r("div",{staticClass:"page-data-list"},[r("x-vxe-table",{ref:"vxeTable",staticClass:"block-table",attrs:{border:!0,seqWidth:40,colConfigs:e.tableConfig.colConfigs,tableData:e.tableData,rowDraggable:e.tableConfig.rowDraggable,seqType:e.tableConfig.seqType,pagination:e.pagination,layout:e.tableConfig.layout,seqConfig:e.tableConfig.seqConfig,autoSize:e.tableConfig.autoSize,pageConfig:e.tableConfig.pageConfig},on:{"table-row-click":e.rowClickEvent,"size-change":e.pageSizeChange,"current-page-change":e.currentChange,"select-data-change":e.selectDataChange},scopedSlots:e._u([e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customHeadSlot,fn:function(n){var i=n.column;return[t.customHeadSlot?r("div",{key:a},[e._v(" "+e._s(i)+" "+e._s(t)+" ")]):e._e()]}}})),e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customSlot,fn:function(n){var i=n.row,o=n.rowIndex;return["options"===t.customSlot?r("div",{key:a+""+o},[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowDetail(i)}}},[e._v("详情")]),r("span",{staticStyle:{width:"4px",display:"inline-block"}}),r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowEdit(i)}}},[e._v("编辑")])]):e._e(),"status"===t.customSlot?r("div",{key:a+""+o},[i[t.prop]?r("span",{staticStyle:{background:"#67C23A",padding:"4px 8px",color:"white","border-radius":"20px"}},[e._v("生效")]):e._e(),i[t.prop]?e._e():r("span",{staticStyle:{background:"#F56C6C",padding:"4px 8px",color:"white","border-radius":"20px"}},[e._v("失效")])]):e._e()]}}}))],null,!0)},[r("template",{slot:"empty"},[r("div",{staticClass:"table-empty"},[r("x-empty-page")],1)])],2)],1),r("detail-drawer",{ref:"detailDrawer"}),r("edit-modal",{ref:"editModal"})],1)},m=[],g=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"search-component search-input"},[r("el-form-item",[r("template",{slot:"label"},[r("x-ellipsis",{staticClass:"fix-cursor",attrs:{mode:"origin",label:e.label}})],1),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.computedValue,callback:function(t){e.computedValue=t},expression:"computedValue"}})],2)],1)},v=[],y={model:{prop:"searchValue",event:"change"},props:{label:{type:String,required:!0},searchKey:{type:String,required:!0},searchValue:{required:!0},extraConfig:{type:Object,default:function(){return{}}}},computed:{computedValue:{get:function(){return this.searchValue},set:function(e){this.$emit("change",e)}}}},b=y,_={name:"SearchInput",mixins:[b]},x=_,w=p(x,g,v,!1,null,null,null),S=w.exports,D=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"search-component search-date"},[r("el-form-item",[r("template",{slot:"label"},[r("x-ellipsis",{staticClass:"fix-cursor",attrs:{mode:"origin",label:e.label}})],1),r("el-date-picker",{attrs:{type:e.dateDisplayStyle,"range-separator":"~","value-format":e.valueFormat,"start-placeholder":"开始时间","end-placeholder":"结束时间"},model:{value:e.computedValue,callback:function(t){e.computedValue=t},expression:"computedValue"}})],2)],1)},C=[],T={name:"SearchDate",mixins:[b],computed:{dateDisplayStyle:function(){return"DATE_TIME"===this.extraConfig.dateDisplayStyle?"datetimerange":"YEAR_MONTH"===this.extraConfig.dateDisplayStyle?"monthrange":"ONLY_YEAR"===this.extraConfig.dateDisplayStyle?"year":"daterange"},valueFormat:function(){return"DATE_TIME"===this.extraConfig.dateDisplayStyle?"yyyy-MM-dd HH:mm:ss":"YEAR_MONTH"===this.extraConfig.dateDisplayStyle?"yyyy-MM":"ONLY_YEAR"===this.extraConfig.dateDisplayStyle?"yyyy":"yyyy-MM-dd"}}},I=T,O=(r("a879"),p(I,D,C,!1,null,null,null)),M=O.exports,A=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"search-component search-number"},[r("el-form-item",[r("template",{slot:"label"},[r("x-ellipsis",{staticClass:"fix-cursor",attrs:{mode:"origin",label:e.label}})],1),r("div",{staticClass:"range-item"},[r("x-number-input",{staticClass:"form-el-input-number",attrs:{placeholder:"请输入"},model:{value:e.minValue,callback:function(t){e.minValue=t},expression:"minValue"}}),r("div",{staticClass:"range-item-divide"},[e._v(" ~ ")]),r("x-number-input",{staticClass:"form-el-input-number",attrs:{placeholder:"请输入"},model:{value:e.maxValue,callback:function(t){e.maxValue=t},expression:"maxValue"}})],1)],2)],1)},k=[];function P(e){return L(e)||R(e)||E(e)||N()}function N(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function E(e,t){if(e){if("string"===typeof e)return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(e,t):void 0}}function R(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function L(e){if(Array.isArray(e))return j(e)}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}var F={name:"SearchNumber",mixins:[b],computed:{minValue:{get:function(){return this.computedValue&&this.computedValue[0]},set:function(e){var t=this.computedValue?P(this.computedValue):[];t[0]=e,this.computedValue=P(t)}},maxValue:{get:function(){return this.computedValue&&this.computedValue[1]},set:function(e){var t=this.computedValue?P(this.computedValue):[];t[1]=e,this.computedValue=P(t)}}}},V=F,z=(r("0753"),p(V,A,k,!1,null,null,null)),B=z.exports,$=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"search-component search-select"},[r("el-form-item",[r("template",{slot:"label"},[r("x-ellipsis",{staticClass:"fix-cursor",attrs:{mode:"origin",label:e.label}})],1),e.lazyLoad?r("el-select",{directives:[{name:"el-select-loadmore",rawName:"v-el-select-loadmore",value:e.loadMore,expression:"loadMore"}],staticClass:"select-input",attrs:{"filter-method":e.loadFilter,clearable:"",filterable:"",placeholder:"请选择","collapse-tags":"",multiple:e.multiple},on:{"visible-change":e.loadDataOnVisible},model:{value:e.computedValue,callback:function(t){e.computedValue=t},expression:"computedValue"}},e._l(e.options,(function(e){return r("el-option",{key:e.id,attrs:{label:e.label,value:e.id}})})),1):r("el-select",{staticClass:"select-input",attrs:{clearable:"",filterable:"",placeholder:"请选择","collapse-tags":"",multiple:e.multiple},model:{value:e.computedValue,callback:function(t){e.computedValue=t},expression:"computedValue"}},e._l(e.options,(function(e){return r("el-option",{key:e.id,attrs:{label:e.label,value:e.id}})})),1)],2)],1)},G=[];function U(e){return Y(e)||q(e)||H(e)||W()}function W(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function H(e,t){if(e){if("string"===typeof e)return X(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?X(e,t):void 0}}function q(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Y(e){if(Array.isArray(e))return X(e)}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}var Z={name:"SearchSelect",directives:{"el-select-loadmore":{bind:function(e,t){var r=e.querySelector(".el-select-dropdown .el-select-dropdown__wrap");r.addEventListener("scroll",(function(){var e=this.scrollHeight-this.scrollTop<=this.clientHeight;e&&t.value()}))}}},mixins:[b],data:function(){return{pageInfo:{page:1,pageSize:50,keyWord:""},loadingData:!1,options:[]}},computed:{lazyLoad:function(){return this.extraConfig.lazyLoad},multiple:function(){return this.extraConfig.multiple}},watch:{"extraConfig.selectOptions":{handler:function(e,t){this.options=e||[]},immediate:!0}},methods:{loadMore:function(){this.pageInfo.page++,this.loadData()},loadFilter:function(e){this.pageInfo.page=1,this.pageInfo.keyWord=e,this.loadData("replace")},loadData:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"add";this.loadingData=!0,this.extarConfig.loadData(this.pageInfo).then((function(r){"add"===t?e.options=[].concat(U(e.options),U(r)):"replace"===t&&(e.options=r)}),(function(e){})).finally((function(){e.loadingData=!1}))}}},K=Z,J=p(K,$,G,!1,null,null,null),Q=J.exports,ee=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("x-drawer",e._g({attrs:{"append-to-body":!0,"destroy-on-close":!0,drawerVisible:e.visible,"wrapper-class":"detail-draw",title:"自开发详情页",width:"calc(50% + 32px)"},on:{"update:drawerVisible":function(t){e.visible=t},"update:drawer-visible":function(t){e.visible=t}}},e.$listeners))},te=[],re={name:"DetailDrawer",data:function(){return{visible:!1}},created:function(){},methods:{showDrawer:function(){this.visible=!0},closeDrawer:function(){this.visible=!1}}},ae=re,ne=p(ae,ee,te,!1,null,null,null),ie=ne.exports,oe=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("x-modal",e._g({attrs:{"append-to-body":!0,"destroy-on-close":!0,modalVisible:e.visible,"wrapper-class":"edit-modal",title:e.modalTitle,width:500},on:{"update:modalVisible":function(t){e.visible=t},"update:modal-visible":function(t){e.visible=t}},scopedSlots:e._u([{key:"footer",fn:function(){return[r("div",{staticClass:"dialog-footer"},[r("el-button",{on:{click:e.closeModal}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary"},on:{click:e.handleSubmit}},[e._v(" 确定 ")])],1)]},proxy:!0}])},e.$listeners),[r("el-form",{ref:"editForm",attrs:{model:e.formData,rules:e.formRules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"名称:",prop:"name"}},[r("el-input",{attrs:{placeholder:"请输入名称",maxlength:"100",disabled:!e.isNameEditable},model:{value:e.formData.templateName,callback:function(t){e.$set(e.formData,"templateName",t)},expression:"formData.templateName"}})],1)],1)],1)},se=[],le=function(e){return function(t){return Object.prototype.toString.call(t)==="[object ".concat(e,"]")}};le("String"),le("Array"),le("Object"),le("Boolean"),le("Function"),le("Number"),le("Promise");function ce(){try{for(var e=0;e<localStorage.length;e++){var t=localStorage.key(e);if(t&&/^__vuex__\d+__local$/.test(t))return t}var r="__vuex__local";return localStorage.getItem(r)?r:null}catch(a){return console.error("获取 vuex storage key 失败:",a),null}}function ue(){try{var e=ce();if(!e)return console.warn("未找到 vuex storage key"),null;var t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(r){return console.error("获取 vuex storage 数据失败:",r),null}}function pe(){try{var e=localStorage.getItem("logedUser");return console.log(e,"logedUserStr"),e||(console.warn("未找到 logedUser"),null)}catch(t){return console.error("获取用户ID失败:",t),null}}function de(){try{var e=ue();return e&&e.authModule?e.authModule:(console.warn("未找到 authModule"),null)}catch(t){return console.error("获取 authModule 失败:",t),null}}function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}function fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function me(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(r),!0).forEach((function(t){ge(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ge(e,t,r){return t=ve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ve(e){var t=ye(e,"string");return"symbol"===he(t)?t:String(t)}function ye(e,t){if("object"!==he(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==he(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var be={name:"EditModal",data:function(){return{visible:!1,currentRow:null,userData:de(),mode:"add",currentStatus:"",formData:{templateName:"",template_status:"",createdBy:""},formRules:{templateName:[{required:!0,message:"请输入名称",trigger:"blur"}]},statusOptions:[{label:"草稿",value:"草稿"},{label:"已发布",value:"已发布"},{label:"审核中",value:"审核中"}]}},computed:{modalTitle:function(){return"add"===this.mode?"添加模板":"修改"},isNameEditable:function(){if("add"===this.mode)return!0;var e=this.currentStatus||"";return"审核中"!==e&&"APPROVING"!==e&&"REVIEWING"!==e}},methods:{showModal:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"edit",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";this.mode=r,this.currentRow=e,this.currentStatus=a||e&&e.status||"",this.formData="add"===r?{templateName:"",template_status:"草稿"}:{templateName:e.templateName||"",template_status:e.template_status},this.visible=!0,this.$nextTick((function(){t.$refs.editForm&&t.$refs.editForm.clearValidate()}))},closeModal:function(){this.visible=!1,this.currentRow=null,this.currentStatus="",this.formData={templateName:"",template_status:""}},handleSubmit:function(){var e=this;this.$refs.editForm.validate((function(t){if(t){var r={mode:e.mode,formData:me(me({},e.formData),{},{createBy:pe(),userId:pe()}),row:e.currentRow};e.$emit("submit",r),e.closeModal()}}))}}},_e=be,xe=(r("3840"),p(_e,oe,se,!1,null,null,null)),we=xe.exports;function Se(e){return Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Se(e)}function De(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function Ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?De(Object(r),!0).forEach((function(t){Te(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):De(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Te(e,t,r){return t=Ie(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ie(e){var t=Oe(e,"string");return"symbol"===Se(t)?t:String(t)}function Oe(e,t){if("object"!==Se(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==Se(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Me,Ae={name:"ApaasCustomMydemo",components:{SearchInput:S,SearchDate:M,SearchNumber:B,SearchSelect:Q,DetailDrawer:ie,EditModal:we},data:function(){return{searchPanelValue:{},tableData:[],pagination:{currentPage:1,pageSize:10,total:0}}},computed:{searchListConfig:function(){return[{component:"SearchInput",label:"输入框",searchKey:"queryInput"},{component:"SearchDate",label:"日期",searchKey:"queryDate"},{component:"SearchNumber",label:"数字",searchKey:"queryNumber"},{component:"SearchSelect",label:"下拉框",searchKey:"querySelect",extraConfig:{selectOptions:[{id:"1",label:"选项1"},{id:"2",label:"选项2"}]}}]},tableConfig:function(){return{rowDraggable:!1,colConfigs:[{prop:"po_no",showOverflowTooltip:!0,label:"订单"},{prop:"po_title",label:"描述",showOverflowTooltip:!0,minWidth:"350"},{prop:"po_cus_name",label:"客户名称",showOverflowTooltip:!0,minWidth:"350"},{prop:"po_total",label:"订单金额",showOverflowTooltip:!0,width:"120",align:"right"},{prop:"status",customSlot:"status",label:"状态",width:"120",align:"center"},{prop:"options",label:"操作",customSlot:"options",align:"center",width:"80",fixed:"right"}],seqType:"checkbox",seqConfig:{fixed:!0},layout:"total, prev, pager, next, sizes"}}},created:function(){this.loadData()},methods:{pageSizeChange:function(e){this.pagination.pageSize=e},rowClickEvent:function(e){console.warn(e)},handleRowDetail:function(e){this.$refs.detailDrawer.showDrawer()},handleRowEdit:function(e){this.$refs.editModal.showModal()},currentChange:function(e){this.pagination.currentPage=e,this.loadData()},selectDataChange:function(e){this.$emit("select-data-change",e)},handleSearchValueChange:function(e,t){this.$set(this.searchPanelValue,e,t)},resetSearch:function(){this.searchPanelValue={},this.handleSearch()},handleSearch:function(){this.loadData()},handleRefresh:function(){this.pagination.currentPage=1,this.handleSearch()},loadData:function(){var e=this,t={page:this.pagination.currentPage,pageSize:this.pagination.pageSize,ycOrOth:"竞品",queryFilter:Ce({},this.searchPanelValue)};this.$request({url:"https://d6a32490-4355-4e84-b5e6-bf24046a87be.mock.pstmn.io/order-list?page=".concat(this.pagination.currentPage),method:"POST",disableSuccessMsg:!0,params:t}).asyncThen((function(t){e.tableData=t.data,e.pagination.total=t.total}))}}},ke=Ae,Pe=(r("5581"),p(ke,f,m,!1,null,null,null)),Ne=Pe.exports,Ee=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"apaas-custom-page-mydemo custom-page"},[e.showModelDetail?e._e():[r("div",{staticClass:"page-header"},[r("div",{staticClass:"title"},[e._v(" 参数模板管理 ")]),r("div",{staticClass:"operation"},[e.hasTemplateManagementEditPermission()?r("el-button",{attrs:{type:"primary"},on:{click:e.handleDownloadImportTemplate}},[e._v(" 下载导入模板 ")]):e._e(),e.hasTemplateManagementEditPermission()?r("el-button",{staticClass:"import-btn",on:{click:function(t){return e.handleImportTemplate()}}},[e._v(" 导入参数模板 ")]):e._e()],1)]),r("div",{staticClass:"page-search-panel"},[r("div",{staticClass:"search-fields"},[r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("模板名称")]),r("el-select",{staticStyle:{width:"220px"},attrs:{loading:e.templateSelectLoading,placeholder:"请输入或选择模板名称",clearable:"",filterable:"","filter-method":e.filterTemplateOptions},on:{change:e.handleSearch},model:{value:e.searchPanelValue.templateName,callback:function(t){e.$set(e.searchPanelValue,"templateName",t)},expression:"searchPanelValue.templateName"}},e._l(e.filteredTemplateOptions,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)])]),r("div",{staticClass:"page-data-list"},[r("x-vxe-table",{ref:"vxeTable",staticClass:"block-table",attrs:{border:!0,colConfigs:e.tableConfig.colConfigs,tableData:e.tableData,rowDraggable:e.tableConfig.rowDraggable,seqType:e.tableConfig.seqType,pagination:e.pagination,layout:e.tableConfig.layout,autoSize:e.tableConfig.autoSize,pageConfig:e.tableConfig.pageConfig},on:{"table-row-click":e.rowClickEvent,"size-change":e.pageSizeChange,"current-page-change":e.currentChange,"select-data-change":e.selectDataChange},scopedSlots:e._u([e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customHeadSlot,fn:function(n){var i=n.column;return[t.customHeadSlot?r("div",{key:a},[e._v(" "+e._s(i)+" "+e._s(t)+" ")]):e._e()]}}})),e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customSlot,fn:function(n){var i=n.row,o=n.rowIndex;return["options"===t.customSlot?r("div",{key:a+""+o,staticClass:"operation-links"},[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowDetail(i)}}},[e._v(" 查看 ")]),r("span",{staticClass:"link-separator"}),r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowDownload(i)}}},[e._v(" 下载 ")]),r("span",{staticClass:"link-separator"}),r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowVersion(i)}}},[e._v(" 版本 ")]),r("span",{staticClass:"link-separator"}),e.hasTemplateManagementEditPermission()?r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowEdit(i)}}},[e._v(" 修改 ")]):e._e(),r("span",{staticClass:"link-separator"}),e.hasTemplateManagementEditPermission()&&1===i.version&&"DRAFT"===i.status?r("a",{staticClass:"el-link el-link--primary",staticStyle:{color:"red"},attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowDelete(i)}}},[e._v(" 删除 ")]):e._e()]):e._e(),"version"===t.customSlot?r("div",{key:a+""+o},[e._v(" V"+e._s(i[t.prop]||"")+" ")]):e._e(),"status"===t.customSlot?r("div",{key:a+""+o},["已完成"==e.getStatusType(i[t.prop])||"COMPLETE"===i[t.prop]?r("span",{staticClass:"status-tag status-published"},[e._v(" 已发布 ")]):"审核中"==e.getStatusType(i[t.prop])||"APPROVING"===i[t.prop]?r("span",{staticClass:"status-tag status-reviewing"},[e._v(" 审核中 ")]):"历史"==e.getStatusType(i[t.prop])||"HISTORY)"===i[t.prop]?r("span",{staticClass:"status-tag status-history"},[e._v(" 历史 ")]):"草稿"==e.getStatusType(i[t.prop])||"DRAFT"===i[t.prop]?r("span",{staticClass:"status-tag status-draft"},[e._v(" 草稿 ")]):e._e()]):e._e()]}}}))],null,!0)},[r("template",{slot:"empty"},[r("div",{staticClass:"table-empty"},[r("x-empty-page")],1)])],2)],1)],r("detail-drawer",{ref:"detailDrawer"}),r("edit-modal",{ref:"editModal",on:{submit:e.handleTemplateSubmit}}),r("version-modal",{ref:"versionModal",on:{"version-click":e.handleVersionClick}}),e.showModelDetail?r("model-detail",{staticClass:"model-detail-wrapper",attrs:{"template-id":e.currentTemplateId,"change-id":e.currentTemplateRowId,"template-name":e.currentTemplateName,"template-version":e.currentVersion,"version-list":e.versionList,detail:e.currentDetail,"from-todo":e.fromTodo,"template-management-permissions":e.templateManagementPermissions},on:{back:e.handleBackFromDetail}}):e._e(),r("el-dialog",{attrs:{title:"导入模板",visible:e.importDialogVisible,width:"400px","append-to-body":""},on:{"update:visible":function(t){e.importDialogVisible=t},close:e.handleImportDialogClose}},[r("el-upload",{staticClass:"import-uploader",attrs:{drag:"","auto-upload":!1,limit:1,accept:".xls,.xlsx,.csv","file-list":e.importFileList,"on-change":e.handleImportFileChange,"on-remove":e.handleImportFileRemove}},[r("i",{staticClass:"el-icon-upload"}),r("div",{staticClass:"el-upload__text"},[e._v(" 将文件拖到此处,或"),r("em",[e._v("点击上传")])]),r("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v(" 仅支持Excel或CSV模板文件 ")])]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleImportDialogClose}},[e._v("取消")]),r("el-button",{attrs:{type:"primary",loading:e.importing},on:{click:e.handleImportConfirm}},[e._v(" 开始导入 ")])],1)],1),r("el-dialog",{attrs:{title:"错误信息",visible:e.errorDialogVisible,width:"400px","append-to-body":""},on:{"update:visible":function(t){e.errorDialogVisible=t},close:e.handleErrorDialogClose}},[r("div",{staticClass:"error-list"},[e._v(" "+e._s(e.errorList)+" ")])])],2)},Re=[],Le={SEND_PHONE_CODE:{url:"/xdap-admin/user/send/smsCode",method:"post"},SEND_EMAIL_CODE:{url:"/xdap-admin/user/send/emailCode",method:"post"},SAVE_ORG_ID_BY_CHANGE:{url:"/xdap-admin/tenant/switch/tenant",method:"post",disableSuccessMsg:!0}},je={USER_LOGIN:{url:"/xdap-admin/user/login",method:"post"},USER_REGISTER:{url:"/xdap-admin/user/register",method:"post"},USER_MODIFY_PASSWORD_BY_PHONE:{url:"/xdap-admin/user/find/password",method:"post"},CREATE_ORG:{url:"/xdap-admin/tenant/add/newTenant",method:"post"},JOIN_ORG:{url:"/xdap-admin/tenant/join/tenant",method:"get"},SING_OUT:{url:"/xdap-admin/user/signOut",method:"get"},UPDATE_USER_PHONE:{url:"/xdap-admin/user/update/userPhone",method:"post"},UPDATE_USER_EMAIL:{url:"/xdap-admin/user/update/userEmail",method:"post"},IS_BELONG_TO_TENANT:{url:"/xdap-admin/tenant/query/isBelongToTenant",method:"get"}},Fe={QUERY_ORG_LIST_BY_NAME:{url:"/xdap-app/department/query/departmentListByName",method:"post",disableSuccessMsg:!0},QUERY_ORG_TREE:{url:"/xdap-app/department/query/departmentTree",method:"post",disableSuccessMsg:!0},ADD_AND_EDIT_ORG:{url:"/xdap-app/department/edit/department",method:"post"},DELETE_ORG:{url:"/xdap-app/department/remove/department",method:"post"},QUERY_MEMBER_BY_ORG_ID:{url:"/xdap-app/department/query/departmentMembers",method:"post",disableSuccessMsg:!0},QUERY_ALL_MEMBER_BY_ORG_ID:{url:"/xdap-app/department/queryAll/departmentMembers",method:"post",disableSuccessMsg:!0},QUERY_DEPARTMENT_LIST:{url:"/xdap-app/department/query/departmentList",method:"post",disableSuccessMsg:!0},REMOVE_USER_FORM_ORG:{url:"/xdap-app/department/remove/departmentMember",method:"post"},ALL_REMOVE_USER_FORM_ORG:{url:"/xdap-app/department/batchRemove/departmentMember",method:"post"},REMOVE_USER_FORM_TENANT:{url:"/xdap-app/department/remove/tenantMember",method:"post"},ALL_REMOVE_USER_FORM_TENANT:{url:"/xdap-app/department/batchRemove/tenantMember",method:"post"},CHANGE_WORK_STATUS:{url:"/xdap-app/department/update/memberWorkStatus",method:"post"},ALL_CHANGE_WORK_STATUS:{url:"/xdap-app/department/batchUpdate/memberWorkStatus",method:"post"},QUERY_DATA_INVITE:{url:"/xdap-app/invitation/get/invitationCodeInfo",method:"post",disableSuccessMsg:!0},RELOAD_DATA_INVITE:{url:"/xdap-app/invitation/generate/invitationCode",method:"post"},SAVE_INVITE_CONFIG:{url:"/xdap-app/invitation/modify/invitationCode",method:"post",disableSuccessMsg:!0},SHOW_INVITE_BY_STATUS:{url:"/xdap-app/invitation/update/invitationCodeStatus",method:"post",disableSuccessMsg:!0},TREE_NODE_MOVE:{url:"/xdap-app/department/queue/departmentTree",method:"post",disableSuccessMsg:!0},GET_AUDIT_COUNT:{url:"/xdap-app/invitation/count/approvingUsers",method:"post",disableSuccessMsg:!0},QUERY_AUDIT_TABLE_DATA:{url:"/xdap-app/invitation/query/approvingUsers",method:"post",disableSuccessMsg:!0},REFUSE_ADD_USER:{url:"/xdap-app/invitation/refuse/approvingUser",method:"post"},AGREE_ADD_USER:{url:"/xdap-app/invitation/agree/approvingUser",method:"post"},ALL_AGREE_ADD_USER:{url:"/xdap-app/invitation/batchAgree/approvingUser",method:"post"},ALL_REFUSE_ADD_USER:{url:"/xdap-app/invitation/batchRefuse/approvingUser",method:"post"},EDIT_USER_DATA:{url:"/xdap-app/department/update/memberInfo",method:"post"},DEPARTMENT_ADD_USERS:{url:"/xdap-app/department/add/departmentMember",method:"post"},QUERY_SMS_DATA_LIST:{url:"/xdap-app/noticeHistory/query/smsLogHistoryList",method:"post",disableSuccessMsg:!0},QUERY_EMAIL_DATA_LIST:{url:"/xdap-app/noticeHistory/query/emailLogHistoryList",method:"post",disableSuccessMsg:!0},EXPORT_LIST_SMS_DATA:{url:"/xdap-app/noticeHistory/export/smsLogHistory",method:"get"},EXPORT_LIST_EMAIL_DATA:{url:"/xdap-app/noticeHistory/export/emailLogHistory",method:"get"},TRANSFER_USER_WORK:{url:"/xdap-app/work/update/workTransfer",method:"post"}},Ve={QUERY_USER_INFO:{url:"/xdap-admin/user/query/userInfo",method:"post",disableSuccessMsg:!0},UPDATE_USER_INFO:{url:"/xdap-admin/user/update/userInfo",method:"post"},QUERY_ACCOUNT_INFO:{url:"/xdap-admin/user/query/accountInfo",method:"get",disableSuccessMsg:!0},QUERY_ACCOUNT_BIND:{url:"/xdap-admin/user/query/userBind",method:"get",disableSuccessMsg:!0},QUIT_TENANT:{url:"/xdap-admin/tenant/quit/tenant",method:"post"},UPDATE_USER_PASSWORD:{url:"/xdap-admin/user/update/userPassword",method:"post"},UPLOAD_USER_AVATAR:{url:"/xdap-admin/user/upload/userAvatar",method:"post",disableSuccessMsg:!0},BIND_OPNE_WECHAT:{url:"/xdap-admin/user/bind/openWechat",method:"post"},UNBIND_THIRD_PLATFORM:{url:"/xdap-admin/user/unbind/userThirdPlatform",method:"post"}},ze={QUERY_MY_TENANT_LIST:{url:"/xdap-admin/tenant/query/myTenantList",method:"get",disableSuccessMsg:!0},QUERY_HOME_LIST:{url:"/xdap-app/app/query/workspaceHome",method:"get",disableSuccessMsg:!0},QUERY_TENANT_LIST_BY_USER:{url:"/xdap-admin/tenant/query/tenantListByUser",method:"get",disableSuccessMsg:!0},QUERY_USER_TENANT_INFO:{url:"/xdap-admin/tenant/query/userTenantInfo",method:"get",disableSuccessMsg:!0},USER_APP_CONFIG_UPDATE:{url:"/xdap-app/user/config/update",method:"post",disableSuccessMsg:!0}},Be={QUERY_LIST_PAGE_CONFIG_BY_ID:{url:"/xdap-app/form/query/listPageConfigById",method:"get",disableSuccessMsg:!0},QUERY_LIST_PAGE_CONFIG_BY_TAB_ID:{url:"/xdap-app/form/query/listPageViewDetail",method:"get",disableSuccessMsg:!0},QUERY_LIST_BUSINESS_DATA:{url:"/xdap-app/business/query/listPageBusinessData",method:"post",disableSuccessMsg:!0},QUERY_CALC_LIST_BUSINESS_DATA:{url:"/xdap-app/business/query/virtualBusinessData",method:"post",disableSuccessMsg:!0},QUERY_LIST_PAGE_BUTTON:{url:"/xdap-app/form/query/listPageButton",method:"get",disableSuccessMsg:!0},EXPORT_LIST_TO_EXCEL:{url:"xdap-app/excel/export/excelData",method:"post",disableSuccessMsg:!0},STATISTICAL_TABLE:{url:"/xdap-app/business/query/calAggregate",method:"post",disableSuccessMsg:!0},EXPORT_TEMPLATE_TO_EXCEL:{url:"/xdap-app/excel/export/excelTemplate",method:"get",disableSuccessMsg:!0},IMPORT_EXCEL_DATA:{url:"/xdap-app/excel/importExcelData",method:"post",disableSuccessMsg:!0},EXCEL_IMPORT_LOGS:{url:"/xdap-app/excel/query/excelImportLogs",method:"get",disableSuccessMsg:!0},ADD_MENU_COLLECT:{url:"/xdap-app/menu/add/star",method:"post"},REMOVE_MENU_COLLECT:{url:"/xdap-app/menu/remove/star",method:"post"},HAS_MENU_COLLECT:{url:"/xdap-app/menu/has/menuStar",method:"post",disableSuccessMsg:!0},BATCH_DELETE_DATA:{url:"/xdap-app/business/delete/batchDocument",method:"post",timeout:6e4},BATCH_AGREE_DATA:{url:"/xdap-app/process/batch/approve",method:"post",timeout:6e5},BATCH_REJECT_DATA:{url:"/xdap-app/process/batch/reject",method:"post",timeout:6e5},QUERY_STATISTICS_VALUE_COLUME:{url:"/xdap-app/business/query/dataStatisticValue",method:"post",disableSuccessMsg:!0},QUERY_TREE_VIEW_TREE_NODE:{url:"/xdap-app/business/query/treeNodeBusinessData",method:"post",disableSuccessMsg:!0},QUERY_TREE_VIEW_TREE_TABLE_DATA:{url:"/xdap-app/business/query/childNodeListBusinessData",method:"post",disableSuccessMsg:!0},QUERY_OPERATION_COLUMN:{url:"/xdap-app/form/query/listButton",method:"post",disableSuccessMsg:!0},QUERY_COMBINE_LIST_PAGE_VIEW:{url:"/xdap-app/query/combineListPageView",method:"get",disableSuccessMsg:!0},QUERY_COMBINE_LIST_BUSINESSDATA:{url:"/xdap-app/query/queryCombineListBusinessData",method:"post",disableSuccessMsg:!0},QUERY_COMBINE_COMPONENT:{url:"/xdap-app/query/combineComponent",method:"post",disableSuccessMsg:!0},QUERY_COMBINE_LISTBUTTON:{url:"/xdap-app/query/combineListButton",method:"get",disableSuccessMsg:!0},QUERY_ADVANCE_SEARCH:{url:"/xdap-app/dataFilter/query/dataFilter",method:"get",disableSuccessMsg:!0},QUERY_FORM_FIELD_ALL_IN_ONE:{url:"/xdap-app/form/query/formComponent",method:"post",disableSuccessMsg:!0}},$e={DEMO_GET:{url:"/custom/delete/getUserId",method:"get"},SUBMIT_FORM:{url:"/xdap-app/process/submit",method:"post"},DOWNLOAD_FILE:{url:"/xdap-app/attachments/downloadFile",method:"get"},DEMO_GET_PERSON:{url:"/custom/support/demo/getPerson",method:"get"},TEST_FILE_UPLOAD:{url:"/custom/benchmark/uploadFile",method:"post"},SELECT_USER_BY_DEPT:{url:"/custom/responsible/getUserByDepartmentId",method:"get"},SAVE_MANAGER_DATA:{url:"/custom/responsible/saveResponsiblePerson",method:"post"},IS_RESPONSIBLE:{url:"/custom/responsible/isResponsiblePerson",method:"get"},GET_MANAGER_DATA:{url:"/custom/responsible/getDeptResponsible",method:"get"},EDIT_MANAGER_DATA:{url:"/custom/responsible/updateResponsiblePerson",method:"post"},DELETE_MANAGER_DATA:{url:"/custom/responsible/deleteResponsiblePerson",method:"get"},SAVE_FILLER_DATA:{url:"/custom/responsible/saveFilledPerson",method:"post"},UPDATE_FILLER_DATA:{url:"/custom/responsible/updateFilledPerson",method:"post"},GET_SUBSYSTEM_LIST:{url:"/custom/responsible/getAllSubsystem",method:"get"},IS_FILLER:{url:"/custom/filler/isFillerPerson",method:"get"},GET_FILLER_DATA:{url:"/custom/responsible/getDeptFilled",method:"get"},DEL_MODEL:{url:"/custom/template/deleteTemplate",method:"get"},DEL_ENGINE_MODEL:{url:"/custom/dataEntryEngineModel/delete",method:"get"},GET_ALL_DATA_SYSTEAM_LIST:{url:"/custom/common/getSystemAndPara",method:"get"},GET_ALL_SYSTEM_ROLE_LIST:{url:"/custom/responsible/getAllSubsystem",method:"get"},GET_USER_COMMONLY_USED:{url:"/custom/common/getModelCommon",method:"get"},UPDATE_USER_COMMONLY_USED:{url:"/custom/common/updateModelCommon",method:"post"},ADD_USER_COMMONLY_USED:{url:"/custom/common/insertModelCommon",method:"post"},HANDLE_FILLER_BACK:{url:"/custom/todoTaskPojo/todoReturn",method:"post"},GET_ENGINE_DETAIL_QUERY:{url:"/custom/engineParamDetailPojo/selectParamList",method:"get"},GET_TODO_LIST:{url:"/custom/todoTaskPojo/selectByresPersonTodoPage",method:"post"},GET_TODO_LIST_BY_CREATOR:{url:"/custom/todoTaskPojo/selectByPage",method:"post"},UPDATE_PARAM:{url:"/custom/engineParamDetailPojo/updateParamValue?userID=",method:"post"},EXPORT_TEMPLATE:{url:"/custom/engineParamDetailPojo/excelExport",method:"get"},IMPORT_ENGINE_MODEL:{url:"/custom/engineParamDetailPojo/excelImport",method:"post"},HANDLE_RESPONSIBLE_DISPATCH:{url:"/custom/engineParamDetailPojo/updateToInsertFiledBy?userID=",method:"post"},HANDLE_TODO_DISPATCH:{url:"/custom/todoTaskPojo/createResPerson?userID=",method:"post"},GET_ENGINE_VERSIONS:{url:"/custom/engineParamDetailPojo/selectVersionList",method:"post"},TEXT_DEMO:{url:"/custom/delete/submitApproval",method:"get"},GET_CHECK_DATA_CHARTS:{url:"/custom/analysis/showReport",method:"post"},GET_CHECK_LIST:{url:"/custom/analysis/selectModelByLike",method:"post"},GET_CHECK_DATA_COMMON:{url:"/custom/analysis/selectModelByLike",method:"get"},ADD_CHECK_DATA_COMMON:{url:"/custom/analysis/insertModelCommon",method:"post"},EDIT_CHECK_DATA_COMMON:{url:"/custom/analysis/updateModelCommon",method:"post"},GET_CHECK_DATA_Y_DATA:{url:"/custom/analysis/getAvailableParameters",method:"get"},GET_MODEL_QUERY:{url:"/custom/tcDataQuery/tcDataSelectByPartsNames",method:"post"},DOWNLOAD_MODEL_QUERY_DATA:{url:"/custom/tcDataQuery/modelComparisonExport",method:"post"},GET_MY_SEND_LIST:{url:"/custom/todoTaskPojo/selectByPageByCreate",method:"post"},GET_MY_DONE_LIST:{url:"/custom/todoTaskPojo/selectByresPersonCompletedPage",method:"post"},GET_MODEL_QUERT_TABLE_BY_VERSION:{url:"/custom/dataEntryEngineModel/selectVersionByPage",method:"get"},GET_MODEL_QUERT_DETAIL:{url:"/custom/tcDataQuery/tcDataSelectByVersion",method:"post"},DOWNLOAD_MANAGER_DATA:{url:"/custom/responsible/export",method:"get"},UPLOAD_MANAGER_DATA:{url:"/custom/responsible/import",method:"post"},DOWNLOAD_DEMO_MANAGER_DATA:{url:"/custom/responsible/getImportTemplate",method:"get"},EDIT_DATA_PROCESS_TITLE:{url:"/custom/activiti/updateFlowTitle",method:"get"}},Ge={GET_USER_SELF_ROLE:{url:"/custom/permission/selectPersByUser",method:"get"},EDIT_PERMISSION_DATA_ROLE:{url:"/custom/permission/updateRole?userID=",method:"post"},GET_ENGINE_LIST_SELF:{url:"/custom/dataEntryEngineModel/selectByPage",method:"post"},DOWNLOAD_ENGINE_DEMO:{url:"/custom/dataEntryEngineModel/excelExport",method:"get"},ADD_ENGINE_MODEL:{url:"/custom/dataEntryEngineModel/insert",method:"post"},IMPORT_ENGINE_MODEL:{url:"/custom/dataEntryEngineModel/import",method:"post"},GET_PARAM_LIST:{url:"/custom/engineParamDetailPojo/selectParamList",method:"get"},IMPORT_ENGINE_MODEL_PARAM:{url:"/custom/dataEntryEngineModel/excelImport",method:"post"},GET_ENGINE_DETAIL:{url:"/custom/engineParamDetailPojo/selectValueByMoreParam",method:"post"},GET_ENGINE_TABLE_DETAIL:{url:"/custom/engineParamDetailPojo/selectParamListAndModel",method:"get"}},Ue={ADD_MODEL:{url:"/custom/template/insertTemplate",method:"post"},GET_MODEL_LIST:{url:"/custom/template/getTemplateByCondition",method:"get"},IMPORT_MODEL:{url:"/custom/template/import",method:"post"},EDIT_MODEL:{url:"/custom/template/updateTemplate",method:"post"},CHECK_MODEL_VERISON:{url:"/custom/template/getTemplateVersion",method:"get"},DOWNLODE_MODEL:{url:"/custom/template/export",method:"get"},DOWNLODE_ALL_MODEL:{url:"/custom/template/exportMultiple",method:"get"},GET_DEPARTMENT:{url:"/custom/template/getDept",method:"get"},GET_MODEL_DETAIL:{url:"/custom/parameter/getParameterByCondition",method:"get"},ADD_MODEL_PARAM:{url:"/custom/parameter/insertParameter",method:"post"},EDIT_MODEL_PARAM:{url:"/custom/parameter/maintenanceParameters",method:"post"},DELETE_MODEL_PARAM:{url:"/custom/parameter/deleteParameter",method:"get"},START_APPROVAL:{url:"/custom/approval/startApproval",method:"post"},GET_APPROVAL_LIST:{url:"/custom/approval/getApprovalList",method:"get"},HANDLE_APPROVAL:{url:"/custom/approval/handleApproval",method:"post"},GET_ALLUSERS:{url:"/custom/approval/getUsersByCondition",method:"get"},GET_APPROVAL_CHANGE:{url:"/custom/approval/getTemplateChanges",method:"get"},GET_PPROVAL_ALL:{url:"/custom/approval/getApprovalProcess",method:"get"},GET_SUB_DEPT:{url:"/custom/responsible/getSubDepartmentById",method:"get"},RETURN_APPROVAL:{url:"/custom/approval/handleReturn",method:"post"},RETURN_MODEL_APPROVAL:{url:"/custom/approval/handleReturnToNode",method:"post"},RESTART_MODEL_APPROVAL:{url:"/custom/approval/directSendingApproval",method:"get"},GET_MODEL_BY_ID:{url:"/custom/template/getTemplateById",method:"get"},GET_CAN_RETURN_NODE:{url:"/custom/approval/getReturnNodes",method:"get"},GET_RETURN_APPROVAL:{url:"/custom/approval/getApprovalUsers",method:"get"},GET_CAN_RESEND_APPROVAL:{url:"/custom/approval/getIsDirect?",method:"get"},EDIT_APPROVAL_PROCESS_TITLE:{url:"/custom/approval/updateFlowTitle",method:"get"}},We={GET_REPORT_LIST:{url:"/custom/benchmark/getReportAndTodoByCondition",method:"post"},GET_REPORT_LIST_BY_CONDITION:{url:"/custom/benchmark/getApprovalList",method:"post"},ADD_REPORT:{url:"/custom/benchmark/startReportApproval",method:"post"},SAVE_REPORT:{url:"/custom/benchmark/insertReport",method:"post"},EDIT_REPORT:{url:"/custom/benchmark/updateReport",method:"post"},RESTART_REPORT_APPROVAL:{url:"/custom/benchmark/restartReportApproval",method:"post"},START_REPORT_APPROVAL:{url:"/custom/benchmark/handleReportApproval",method:"post"},GET_REPORT_DETAIL:{url:"/custom/benchmark/getReportDetail",method:"get"},GET_REPORT_DETAIL_PROCESS:{url:"/custom/benchmark/getReportProcess",method:"get"},DOWNLOAD_REPORT:{url:"/custom/benchmark/downloadReport",method:"get"},DELETE_REPORT:{url:"/custom/benchmark/deleteReport",method:"get"},RETURN_REPORT:{url:"/custom/benchmark/handleReturn",method:"post"},RESTART_REPORT_TODO:{url:"/custom/benchmark/restartApproval",method:"get"},RESEND_REPORT_APPROVAL:{url:"/custom/benchmark/directSendingApproval",method:"get"},RETURN_REPORT_TODO:{url:"/custom/benchmark/handleReturnToNode",method:"post"},GET_REPORT_APPROVAL_USERS:{url:"/custom/benchmark/getApprovalUsers",method:"get"}},He={ENGINE_CHECK_LIST:{url:"/custom/activiti/showEngReview",method:"post"},START_ENGINE_CHECK:{url:"/custom/activiti/startActiviti",method:"post"},HANDLE_ENGINE_CHECK:{url:"/custom/activiti/handleApproval",method:"post"},RETURN_ENGINE_CHECK:{url:"/custom/activiti/returnApproval",method:"get"},GET_ENGINE_CHECK_DETAIL:{url:"/custom/activiti/showActiviti",method:"post"},CHANGE_ENGINE_DATA:{url:"/custom/activiti/initiateApproval",method:"get"},CHECK_DATA_CAN_RETURN:{url:"/custom/activiti/getIsDirect",method:"get"},GET_DATA_APPROVAL_USERS:{url:"/custom/activiti/getApprovalUsers",method:"get"},RESEND_DATA_APPROVAL:{url:"/custom/activiti/directSendingApproval",method:"get"},GET_CAN_RETURN_DATA_NODE:{url:"/custom/activiti/getReturnNodes",method:"get"},CAN_RETURN_DATA_NODE:{url:"/custom/activiti/handleReturnToNode",method:"post"},RESTART_DATA_APPROVAL:{url:"/custom/activiti/handleReturn",method:"post"}};function qe(e){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(e)}function Ye(e,t,r){return t=Xe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xe(e){var t=Ze(e,"string");return"symbol"===qe(t)?t:String(t)}function Ze(e,t){if("object"!==qe(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==qe(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Ke=(Me={GET_PERMISSION_DATA:{url:"/custom/permission/getUserRoleAndPermission",method:"get"},SAVE_PERMISSION_DATA:{url:"/custom/permission/insertRole",method:"post"},EDIT_PERMISSION_DATA:{url:"/custom/permission/updatePermission",method:"post"},DELETE_PERMISSION_DATA:{url:"/custom/permission/deletePermission",method:"get"},GET_ALL_PERMISSION_LIST:{url:"/custom/permission/getAllPermission",method:"get"}},Ye(Me,"DELETE_PERMISSION_DATA",{url:"/custom/permission/deleteRole",method:"get"}),Ye(Me,"CHECK_ROLE_USER_DEPT",{url:"/custom/permission/selectUserOrDeptByRole",method:"get"}),Ye(Me,"GET_NOW_USER_ROLE",{url:"/custom/permission/selectPermByUserId",method:"get"}),Ye(Me,"ADD_ROLE_PERMISSION",{url:"/custom/permission/addRoles",method:"post"}),Ye(Me,"GET_ROLE_PERMISSION",{url:"/custom/permission/selectRoles",method:"get"}),Ye(Me,"DELETE_ROLE_PERMISSION",{url:"/custom/permission/removeRoles",method:"get"}),Ye(Me,"GET_ROLE_PERMISSION_BING",{url:"/custom/permission/userRoleBinding",method:"post"}),Ye(Me,"GET_SUB_SYSTEM_DATA_LIST",{url:"/custom/permission/getAllParameters",method:"get"}),Ye(Me,"EDIT_ROLE_CONTROL_LIST",{url:"/custom/permission/updatePerForRole",method:"post"}),Ye(Me,"GET_ROLE_CONTROL_LIST",{url:"/custom/permission/selectPersByRole",method:"get"}),Me);function Je(e){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Je(e)}function Qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function et(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(r),!0).forEach((function(t){tt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function tt(e,t,r){return t=rt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rt(e){var t=at(e,"string");return"symbol"===Je(t)?t:String(t)}function at(e,t){if("object"!==Je(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==Je(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var nt=et(et(et(et(et(et(et(et(et(et(et(et({},Le),je),Fe),Ve),ze),Be),$e),Ge),Ue),We),He),Ke),it=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("x-modal",e._g({attrs:{"append-to-body":!0,"destroy-on-close":!0,modalVisible:e.visible,"wrapper-class":"version-modal",title:"版本",width:"500px"},on:{"update:modalVisible":function(t){e.visible=t},"update:modal-visible":function(t){e.visible=t}}},e.$listeners),[r("div",{staticClass:"version-list"},[e.loading?r("div",{staticClass:"version-tip"},[e._v("加载中...")]):[e.versionList.length?e._l(e.versionList,(function(t,a){return r("div",{key:a,staticClass:"version-item"},[r("a",{staticClass:"version-link",attrs:{href:"javascript:void(0)"},on:{click:function(r){return e.handleVersionClick(t)}}},[e._v(" 版本号:V"+e._s(e.getVersionName(t))+" ")]),r("span",{staticClass:"version-status"},[e._v(e._s(e.getVersionStatus(t)))])])})):r("div",{staticClass:"version-tip"},[e._v("暂无版本信息")])]],2)])},ot=[];function st(e){return st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},st(e)}function lt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function ct(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(r),!0).forEach((function(t){ut(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ut(e,t,r){return t=pt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pt(e){var t=dt(e,"string");return"symbol"===st(t)?t:String(t)}function dt(e,t){if("object"!==st(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==st(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var ht={name:"VersionModal",data:function(){return{visible:!1,currentRow:null,versionList:[],loading:!1}},methods:{showModal:function(e){this.currentRow=e,this.visible=!0,this.loadVersionList(e)},closeModal:function(){this.visible=!1},loadVersionList:function(e){var t=this,r=e&&(e.rowId||e.templateRowId||e.id);if(r){this.loading=!0;var a=ct(ct({},nt.CHECK_MODEL_VERISON),{},{params:{templateRowId:r},disableSuccessMsg:!0});this.$request(a,!1).asyncThen((function(e){var r=e&&e.data&&(e.data.result||e.data.list||e.data)||[];t.versionList=Array.isArray(r)?r:[],t.loading=!1})).asyncErrorCatch((function(e){console.error("获取版本列表失败:",e),t.versionList=[],t.loading=!1}))}else this.versionList=[]},handleVersionClick:function(e){console.log("点击版本:",e),this.visible=!1,this.$emit("version-click",{version:e,changeId:e.id,returnNum:e.returnNum,templateId:e.rowId||this.currentRow&&(this.currentRow.rowId||this.currentRow.templateRowId||this.currentRow.id),template:this.currentRow,versionList:this.versionList})},getVersionName:function(e){return e.version},getVersionStatus:function(e){return"DRAFT"===e.status?"草稿":"COMPLETE"===e.status?"已完成":"APPROVING"===e.status?"审核中":"HISTORY"===e.status?"历史":"REVIEWING"===e.status?"校对中":"REJECTED"===e.status?"已退回":e.status}}},ft=ht,mt=(r("ae72"),p(ft,it,ot,!1,null,null,null)),gt=mt.exports,vt=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"apaas-custom-model-detail custom-page"},[r("div",{staticClass:"page-header"},[r("div",{staticClass:"header-left"},[r("el-button",{staticClass:"back-button",attrs:{type:"text",icon:"el-icon-arrow-left"},on:{click:function(t){return t.stopPropagation(),e.handleBack.apply(null,arguments)}}}),r("div",{staticClass:"header-item"},[r("span",{staticClass:"label"},[e._v(e._s(e.isApprovalMode?"发起审批":"模板名称")+":")]),e.isApprovalMode?e._e():r("span",{staticClass:"value"},[e._v(e._s(e.isApprovalMode?"系统参数模板":e.displayTemplateName||"系统参数"))])]),e.isApprovalMode?e._e():r("div",{staticClass:"header-item version-select-item"},[r("span",{staticClass:"label"},[e._v("版本:")]),r("el-select",{staticClass:"version-select",attrs:{placeholder:"请选择版本"},on:{change:e.handleVersionChange},model:{value:e.internalTemplateVersion,callback:function(t){e.internalTemplateVersion=t},expression:"internalTemplateVersion"}},e._l(e.versionOptions,(function(t){return r("el-option",{key:e.getVersionKey(t),attrs:{label:"V"+e.getVersionName(t),value:e.getVersionName(t)}})})),1)],1)],1),r("div",{staticClass:"header-right"},[e.isMaintainMode||e.isApprovalMode?e.isMaintainMode?[r("el-button",{staticClass:"right-button",attrs:{disabled:0===e.selectedRows.length},on:{click:e.handleBatchDelete}},[e._v(" 批量删除 ")]),r("el-button",{staticClass:"right-button-primary",attrs:{type:"primary"},on:{click:e.handleAddParam}},[e._v(" 新增参数 ")])]:e._e():[e.shouldShowButtons?r("el-button",{staticClass:"right-button",on:{click:e.handleImport}},[e._v(" 导入 ")]):e._e(),e.hasTemplateManagementPermission()?r("el-button",{staticClass:"right-button",on:{click:e.handleDownloadTemplate}},[e._v(" 下载导入模板 ")]):e._e(),e.shouldShowButtons?r("el-button",{staticClass:"right-button",on:{click:e.handleMaintainParams}},[e._v(" 维护参数 ")]):e._e(),e.shouldShowButtonsNew&&!e.fromTodo?r("el-button",{staticClass:"right-button-primary",attrs:{type:"primary"},on:{click:e.handleInitiateApproval}},[e._v(" 发起审批 ")]):e._e(),e.shouldShowButtonsNew&&e.fromTodo?r("el-button",{staticClass:"right-button-primary",attrs:{type:"primary"},on:{click:e.handleRestartApproval}},[e._v(" 直送 ")]):e._e(),e.shouldShowButtonsNew&&e.fromTodo?r("el-button",{staticClass:"right-button-primary",attrs:{type:"primary"},on:{click:e.handleResendApproval}},[e._v(" 重新发起 ")]):e._e()]],2)]),e.isMaintainMode||e.isApprovalMode?e._e():r("div",{staticClass:"page-search-panel"},[r("div",{staticClass:"search-fields"},[r("div",{staticClass:"search-row"},[r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("类型")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.parameterType,callback:function(t){e.$set(e.searchPanelValue,"parameterType",t)},expression:"searchPanelValue.parameterType"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("零部件名称")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.partsName,callback:function(t){e.$set(e.searchPanelValue,"partsName",t)},expression:"searchPanelValue.partsName"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("参数名称")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.parameterName,callback:function(t){e.$set(e.searchPanelValue,"parameterName",t)},expression:"searchPanelValue.parameterName"}})],1),r("div",{staticClass:"search-actions"},[r("el-button",{attrs:{type:"primary"},on:{click:e.handleSearch}},[e._v(" 查询 ")]),r("el-button",{on:{click:e.resetSearch}},[e._v(" 重置 ")])],1)])])]),e.isApprovalMode?e._e():r("div",{staticClass:"page-data-list",class:{"has-footer":e.isMaintainMode}},[r("el-table",{key:"table-"+e.isMaintainMode,ref:"vxeTable",staticClass:"block-table search-table",attrs:{data:e.tableData,border:"","row-class-name":e.getRowClassName,"row-key":e.getRowKey,"max-height":e.tableMaxHeight},on:{"row-click":e.rowClickEvent,"selection-change":e.selectDataChange}},[e.isMaintainMode?r("el-table-column",{attrs:{type:"selection",width:"55",fixed:"left",selectable:e.checkRowMethod}}):e._e(),e._l(e.tableConfig.colConfigs,(function(t){return r("el-table-column",{key:t.prop,attrs:{prop:t.prop,label:t.label,width:t.width,"min-width":t.minWidth,align:t.align||"center",fixed:t.fixed,"show-overflow-tooltip":t.showOverflowTooltip},scopedSlots:e._u([{key:"default",fn:function(a){return["options"===t.customSlot&&e.isMaintainMode?[r("div",{staticClass:"operation-links"},["delete"===a.row.operation?[r("span",{staticClass:"deleted-text"},[e._v("已删除")])]:[e.canEditOrDeleteRow(a.row)?[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowEdit(a.row)}}},[e._v(" 修改 ")]),r("span",{staticClass:"link-separator"}),r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowDelete(a.row,a.$index)}}},[e._v(" 删除 ")])]:e._e()]],2)]:t.formatter?[e._v(" "+e._s(t.formatter({cellValue:a.row[t.prop],row:a.row,rowIndex:a.$index}))+" ")]:[e._v(" "+e._s(a.row[t.prop])+" ")]]}}],null,!0)})})),r("template",{slot:"empty"},[r("div",{staticClass:"table-empty"},[r("x-empty-page")],1)])],2),e.isMaintainMode?e._e():r("el-pagination",{staticStyle:{"margin-top":"10px","text-align":"right"},attrs:{"current-page":e.pagination.currentPage,"page-sizes":[10,20,50,100],"page-size":e.pagination.pageSize,total:e.pagination.total,layout:"total, prev, pager, next, sizes, jumper"},on:{"size-change":e.pageSizeChange,"current-change":e.currentChange}}),!e.isMaintainMode&&!e.isApprovalMode&&e.detail&&e.detail.flowId?r("div",{staticClass:"approval-progress-section"},[r("div",{staticClass:"section-title"},[e._v(" 审批流程 ")]),e.timelineNodes&&e.timelineNodes.length>0?r("div",{staticClass:"approval-timeline"},[r("el-timeline",e._l(e.timelineNodes,(function(t,a){return r("el-timeline-item",{key:a,attrs:{color:e.getTimelineColor(t.result||t.status,a,e.timelineNodes.length)}},[r("div",{staticClass:"timeline-item-content"},[r("div",{staticClass:"node-title"},[e._v(" "+e._s(t.title)+" ")]),r("div",{staticClass:"node-content"},[r("div",{staticClass:"node-info"},[r("div",{staticClass:"node-user"},[e._v(" "+e._s(t.userName||"--")+" "),r("span",{staticClass:"node-time"},[e._v(" "+e._s(e.formatTime(t.operateTime))+" ")])])]),r("div",{staticClass:"node-status",class:e.getStatusClass(t.result||t.status)},[e._v(" "+e._s(e.setStatusText(t.result||t.status))+" ")]),t.opinion?r("div",{staticClass:"node-opinion"},[e._v(" 审批意见:"+e._s(t.opinion)+" ")]):e._e()])])])})),1)],1):r("div",{staticClass:"empty-progress"},[r("span",{staticClass:"empty-text"},[e._v("暂无审批流程数据")])])]):e._e()],1),e.isApprovalMode?r("div",{staticClass:"page-approval-content",class:{"has-footer":e.isApprovalMode}},[r("div",{staticClass:"approval-content"},[r("div",{staticClass:"approval-table-section"},[r("el-table",{staticClass:"approval-table",attrs:{data:e.tableData,border:"","max-height":e.approvalTableMaxHeight}},e._l(e.approvalTableConfig.colConfigs,(function(t){return r("el-table-column",{key:t.prop,attrs:{prop:t.prop,label:t.label,width:t.width,"min-width":t.minWidth,align:t.align||"center","show-overflow-tooltip":t.showOverflowTooltip},scopedSlots:e._u([{key:"default",fn:function(r){return[t.formatter?[e._v(" "+e._s(t.formatter({cellValue:r.row[t.prop],row:r.row,rowIndex:r.$index}))+" ")]:[e._v(" "+e._s(r.row[t.prop])+" ")]]}}],null,!0)})})),1),r("el-pagination",{staticStyle:{"margin-top":"20px","text-align":"right"},attrs:{"current-page":e.pagination.currentPage,"page-sizes":[10,20,50,100],"page-size":e.pagination.pageSize,total:e.pagination.total,layout:"total, prev, pager, next, sizes, jumper"},on:{"size-change":e.approvalPageSizeChange,"current-change":e.approvalCurrentPageChange}})],1),r("div",{staticClass:"approval-description"},[r("div",{staticClass:"description-label"},[e._v(" 说明 ")]),r("el-input",{attrs:{type:"textarea",rows:2,placeholder:"请输入"},model:{value:e.approvalFormData.description,callback:function(t){e.$set(e.approvalFormData,"description",t)},expression:"approvalFormData.description"}})],1),r("div",{staticClass:"approval-workflow"},[r("div",{staticClass:"workflow-title"},[e._v(" 审批环节 ")]),r("div",[r("div",{staticClass:"approval-process-title"},[e._m(0),r("el-input",{attrs:{maxlength:"100","show-word-limit":"",placeholder:"请输入流程主题"},model:{value:e.approvalFormData.processTitle,callback:function(t){e.$set(e.approvalFormData,"processTitle",t)},expression:"approvalFormData.processTitle"}})],1)]),r("div",{staticClass:"workflow-table"},[r("table",{staticClass:"workflow-table-content"},[e._m(1),r("tbody",e._l(e.approvalWorkflowSteps,(function(t,a){return r("tr",{key:a,staticClass:"workflow-row"},[r("td",{staticClass:"step-name-cell"},[r("span",{staticClass:"step-name"},[e._v(" "+e._s(t.name)+" "),t.required?r("span",{staticClass:"required-mark"},[e._v("*")]):e._e()])]),r("td",{staticClass:"handler-cell"},[r("el-select",{staticClass:"handler-select",attrs:{multiple:"",filterable:"",remote:"",placeholder:"请选择","remote-method":function(t){return e.handleRemoteSearch(t,a)},loading:t.loading},on:{change:function(t){return e.handleHandlerChange(a,t)}},model:{value:t.handlers,callback:function(r){e.$set(t,"handlers",r)},expression:"step.handlers"}},e._l(t.options,(function(t){return r("el-option",{key:t.userId||t.userNumber,attrs:{value:t.userId,label:t.username}},[r("span",{staticClass:"username-text"},[e._v(e._s(t.username))]),r("span",{staticClass:"user-id-text"},[e._v(e._s(t.userNumber))])])})),1)],1)])})),0)])])])])]):e._e(),e.isMaintainMode?r("div",{staticClass:"page-footer"},[r("div",{staticClass:"footer-buttons"},[r("el-button",{on:{click:e.handleBackFromMaintain}},[e._v(" 返回 ")]),r("el-button",{attrs:{type:"primary",loading:e.submitting},on:{click:e.handleSubmit}},[e._v(" 保存 ")])],1)]):e._e(),e.isApprovalMode?r("div",{staticClass:"page-footer"},[r("div",{staticClass:"footer-buttons"},[r("el-button",{on:{click:e.handleApprovalCancel}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.approvalSubmitting},on:{click:e.handleApprovalFormSubmit}},[e._v(" 确定 ")])],1)]):e._e(),r("el-dialog",{attrs:{title:e.paramModalTitle,visible:e.paramModalVisible,width:"800px","close-on-click-modal":!1,"append-to-body":"",modal:!0,"modal-append-to-body":!0,"custom-class":"param-edit-dialog"},on:{"update:visible":function(t){e.paramModalVisible=t},close:e.handleParamModalClose}},[r("el-form",{ref:"paramForm",attrs:{model:e.paramFormData,rules:e.paramFormRules,"label-width":"120px"}},[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"子系统:",prop:"subsystemName"}},[r("el-input",{attrs:{placeholder:"请输入子系统"},model:{value:e.paramFormData.subsystemName,callback:function(t){e.$set(e.paramFormData,"subsystemName",t)},expression:"paramFormData.subsystemName"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"类型:",prop:"parameterType"}},[r("el-input",{attrs:{placeholder:"请输入类型"},model:{value:e.paramFormData.parameterType,callback:function(t){e.$set(e.paramFormData,"parameterType",t)},expression:"paramFormData.parameterType"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"零部件名称:",prop:"partsName"}},[r("el-input",{attrs:{placeholder:"请输入零部件名称"},model:{value:e.paramFormData.partsName,callback:function(t){e.$set(e.paramFormData,"partsName",t)},expression:"paramFormData.partsName"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"参数名称:",prop:"parameterName"}},[r("el-input",{attrs:{placeholder:"请输入参数名称"},model:{value:e.paramFormData.parameterName,callback:function(t){e.$set(e.paramFormData,"parameterName",t)},expression:"paramFormData.parameterName"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"单位:",prop:"unit"}},[r("el-input",{attrs:{placeholder:"请输入单位"},model:{value:e.paramFormData.unit,callback:function(t){e.$set(e.paramFormData,"unit",t)},expression:"paramFormData.unit"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"参数计划来源:",prop:"parameterSource"}},[r("el-select",{attrs:{placeholder:"请选择参数计划来源"},model:{value:e.paramFormData.parameterSource,callback:function(t){e.$set(e.paramFormData,"parameterSource",t)},expression:"paramFormData.parameterSource"}},[r("el-option",{attrs:{value:"公式计算",label:"公式计算"}}),r("el-option",{attrs:{value:"数据平台手工录入",label:"数据平台手工录入"}}),r("el-option",{attrs:{value:"TC分类表",label:"TC分类表"}})],1)],1)],1)],1),r("el-form-item",{attrs:{label:"填写部门:",prop:"department"}},[r("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择填写部门",readonly:""},nativeOn:{click:function(t){return e.handleOpenDepartmentDialog.apply(null,arguments)}},model:{value:e.paramFormData.departmentName,callback:function(t){e.$set(e.paramFormData,"departmentName",t)},expression:"paramFormData.departmentName"}},[r("i",{staticClass:"el-input__icon el-icon-search",staticStyle:{cursor:"pointer"},attrs:{slot:"suffix"},on:{click:function(t){return t.stopPropagation(),e.handleOpenDepartmentDialog.apply(null,arguments)}},slot:"suffix"})])],1),r("el-form-item",{attrs:{label:"分类编号/公式:",prop:"numberOrFormula"}},[r("el-input",{attrs:{type:"textarea",rows:2,placeholder:"请输入分类编号或公式"},model:{value:e.paramFormData.numberOrFormula,callback:function(t){e.$set(e.paramFormData,"numberOrFormula",t)},expression:"paramFormData.numberOrFormula"}})],1),r("el-form-item",{attrs:{label:"备注:",prop:"remarks"}},[r("el-input",{attrs:{type:"textarea",rows:2,placeholder:"请输入备注"},model:{value:e.paramFormData.remarks,callback:function(t){e.$set(e.paramFormData,"remarks",t)},expression:"paramFormData.remarks"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.paramModalVisible=!1}}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.paramSubmitting},on:{click:e.handleParamFormSubmit}},[e._v(" 确定 ")])],1)],1),r("el-dialog",{attrs:{title:"选择填写部门",visible:e.departmentDialogVisible,width:"500px","append-to-body":"","custom-class":"department-select-dialog"},on:{"update:visible":function(t){e.departmentDialogVisible=t},close:e.handleDepartmentDialogClose}},[r("div",{staticClass:"department-dialog-content"},[r("el-input",{staticClass:"department-search-input",attrs:{placeholder:"请输入部门名称进行搜索",clearable:"","prefix-icon":"el-icon-search"},model:{value:e.departmentSearchText,callback:function(t){e.departmentSearchText=t},expression:"departmentSearchText"}}),r("div",{staticClass:"department-tree-wrapper"},[r("el-tree",{ref:"departmentTree",attrs:{data:e.departmentTreeData,props:{children:"children",label:"name"},"node-key":"id","filter-node-method":e.filterDepartmentNode,"highlight-current":"","expand-on-click-node":!1},on:{"node-click":e.handleDepartmentTreeNodeClick}})],1)],1),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleDepartmentDialogClose}},[e._v("取消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.handleConfirmDepartmentSelect}},[e._v("确定")])],1)]),r("el-dialog",{attrs:{title:"导入参数",visible:e.importDialogVisible,width:"400px","append-to-body":""},on:{"update:visible":function(t){e.importDialogVisible=t},close:e.handleImportDialogClose}},[r("el-upload",{staticClass:"import-uploader",attrs:{drag:"","auto-upload":!1,limit:1,accept:".xls,.xlsx,.csv","file-list":e.importFileList,"on-change":e.handleImportFileChange,"on-remove":e.handleImportFileRemove}},[r("i",{staticClass:"el-icon-upload"}),r("div",{staticClass:"el-upload__text"},[e._v(" 将文件拖到此处,或"),r("em",[e._v("点击上传")])]),r("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v(" 仅支持Excel或CSV模板文件 ")])]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleImportDialogClose}},[e._v("取消")]),r("el-button",{attrs:{type:"primary",loading:e.importing},on:{click:e.handleImportConfirm}},[e._v(" 开始导入 ")])],1)],1)],1)},yt=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"description-label"},[e._v(" 流程主题 "),r("span",{staticClass:"required-mark"},[e._v("*")])])},function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("thead",[r("tr",[r("th",{staticClass:"step-name-col"},[e._v(" 环节名称 ")]),r("th",{staticClass:"handler-col"},[e._v(" 处理人 ")])])])}];function bt(e){return bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bt(e)}function _t(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ot(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function xt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function wt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(r),!0).forEach((function(t){St(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function St(e,t,r){return t=Dt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dt(e){var t=Ct(e,"string");return"symbol"===bt(t)?t:String(t)}function Ct(e,t){if("object"!==bt(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==bt(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Tt(e){return At(e)||Mt(e)||Ot(e)||It()}function It(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ot(e,t){if(e){if("string"===typeof e)return kt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kt(e,t):void 0}}function Mt(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function At(e){if(Array.isArray(e))return kt(e)}function kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}var Pt={name:"ApaasCustomModelDetail",props:{templateId:{type:String,default:""},templateName:{type:String,default:""},templateVersion:{type:String,default:""},versionList:{type:Array,default:function(){return[]}},flowId:{type:String,default:""},changeId:{type:String,default:""},detail:{type:Object,default:function(){return{}}},templateManagementPermissions:{type:Array,default:function(){return[]}},fromTodo:{type:Boolean,default:!1}},data:function(){return{departmentList:[],internalTemplateVersion:"",internalTemplateId:"",internalTemplateName:"",internalChangeId:"",currentStatus:"",searchPanelValue:{parameterType:"",partsName:"",parameterName:""},tableData:[],originalTableData:[],originalTableDataForApproval:[],originalPaginationForApproval:null,pagination:{currentPage:1,pageSize:10,total:0},isMaintainMode:!1,isApprovalMode:!1,paramModalVisible:!1,paramModalMode:"add",paramCurrentRow:null,paramCurrentRowIndex:-1,paramFormData:{subsystemName:"",parameterType:"",partsName:"",parameterName:"",department:"",departmentName:"",departmentId:"",parameterSource:"",numberOrFormula:"",fillDepartment:"",remarks:""},departmentDialogVisible:!1,departmentTreeData:[],selectedDepartmentNode:null,departmentSearchText:"",paramSubmitting:!1,submitting:!1,importing:!1,importDialogVisible:!1,importFileList:[],selectedImportFile:null,approvalFormData:{processTitle:"",description:""},approvalSubmitting:!1,resending:!1,isResendMode:!1,resendApprovalData:null,approvalWorkflowSteps:[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"会签",required:!1,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}],nextLocalId:1,departmentCascaderProps:{value:"id",label:"name",children:"children",checkStrictly:!0,emitPath:!1,multiple:!1},flowNodes:[],progressDetail:{},selectedRows:[]}},computed:{displayTemplateName:function(){return this.templateName||this.internalTemplateName||""},versionOptions:function(){return this.versionList||[]},shouldShowButtonsNew:function(){if(!this.hasTemplateManagementPermission())return!1;if(this.fromTodo&&this.flowId)return!0;var e=this.currentStatus||"";return"DRAFT"===e&&this.isLatestVersion},shouldShowButtons:function(){if(!this.hasTemplateManagementPermission())return!1;var e=this.currentStatus||"";return"DRAFT"===e||"COMPLETE"===e},shouldShowMaintainButton:function(){var e=this.currentStatus||"",t=("DRAFT"===e||"COMPLETE"===e)&&this.isLatestVersion;if(!t)return!1;var r=this.displayTemplateName;if(!r||!this.templateManagementPermissions||0===this.templateManagementPermissions.length)return!1;var a=this.templateManagementPermissions.some((function(e){return e.subsystem===r}));return a},isLatestVersion:function(){var e=this;if(!this.versionList||0===this.versionList.length)return!1;var t=this.internalTemplateVersion||this.templateVersion;if(!t)return!1;var r=this.versionList.map((function(t){var r=e.getVersionName(t),a=parseInt(r,10);return{version:r,versionNum:isNaN(a)?0:a,original:t}})),a=r.reduce((function(e,t){return t.versionNum>e.versionNum?t:e}),r[0]);return a&&a.version===t},tableMaxHeight:function(){var e=window.innerHeight||document.documentElement.clientHeight,t=56,r=this.isApprovalMode||this.isMaintainMode?0:80,a=this.isMaintainMode?0:50,n=this.isMaintainMode?80:0,i=40,o=20,s=e-t-r-a-n-i-o;return Math.max(s,400)},approvalTableMaxHeight:function(){var e=window.innerHeight||document.documentElement.clientHeight,t=56,r=100,a=60,n=200,i=50,o=80,s=100,l=e-t-r-a-n-i-o-s;return Math.max(l,300)},tableConfig:function(){var e=this,t=[];return this.isMaintainMode,t.push({prop:"subsystemName",label:"子系统",showOverflowTooltip:!0,minWidth:"120",align:"center"},{prop:"parameterType",label:"类型",showOverflowTooltip:!0,minWidth:"120",align:"center"},{prop:"partsName",label:"零部件名称",showOverflowTooltip:!0,minWidth:"150",align:"center"},{prop:"parameterName",label:"参数名称",showOverflowTooltip:!0,minWidth:"150",align:"center"},{prop:"unit",label:"单位",showOverflowTooltip:!0,width:"100",align:"center"},{prop:"parameterSource",label:"参数计划来源",showOverflowTooltip:!0,minWidth:"150",align:"center"},{prop:"department",label:"填写部门",showOverflowTooltip:!0,minWidth:"120",align:"center",formatter:function(t){var r=t.cellValue;return e.formatDepartmentDisplay(r)}},{prop:"remarks",label:"备注",showOverflowTooltip:!0,minWidth:"100",align:"center"}),this.isMaintainMode&&t.push({prop:"options",label:"操作",customSlot:"options",align:"center",width:"120",fixed:"right"}),{colConfigs:t}},paramModalTitle:function(){return"add"===this.paramModalMode?"添加参数":"修改参数"},paramFormRules:function(){return{subsystemName:[{required:!0,message:"请输入子系统",trigger:"blur"}],parameterType:[{required:!0,message:"请输入类型",trigger:"blur"}],parameterName:[{required:!0,message:"请输入参数名称",trigger:"blur"}]}},approvalTableConfig:function(){var e=this;return{colConfigs:[{prop:"subsystemName",label:"子系统",showOverflowTooltip:!0,minWidth:"120",align:"center"},{prop:"parameterType",label:"类型",showOverflowTooltip:!0,minWidth:"120",align:"center"},{prop:"partsName",label:"零部件名称",showOverflowTooltip:!0,minWidth:"150",align:"center"},{prop:"parameterName",label:"参数名称",showOverflowTooltip:!0,minWidth:"150",align:"center"},{prop:"unit",label:"单位",showOverflowTooltip:!0,width:"100",align:"center"},{prop:"parameterSource",label:"参数计划来源",showOverflowTooltip:!0,minWidth:"150",align:"center"},{prop:"department",label:"填写部门",showOverflowTooltip:!0,minWidth:"120",align:"center",formatter:function(t){var r=t.cellValue;return e.formatDepartmentDisplay(r)}},{prop:"remarks",label:"备注",showOverflowTooltip:!0,minWidth:"150",align:"center"},{prop:"modifyDetails",label:"变动说明",showOverflowTooltip:!0,minWidth:"150",align:"center"}]}},approvalFormRules:function(){return{name:[{required:!0,message:"请输入名称",trigger:"blur"}],model:[{required:!0,message:"请输入型号",trigger:"blur"}],value:[{required:!0,message:"请输入数值",trigger:"blur"}]}},initiateNode:function(){return this.detail&&this.detail.createBy?{userName:this.detail.createBy,createTime:this.detail.createdTime||this.detail.createTime,status:"INITIATE",result:"INITIATE"}:null},timelineNodes:function(){var e=[];if(this.flowNodes&&this.flowNodes.length>0){var t=Tt(this.flowNodes),r=t.findIndex((function(e){return"待审批"===e.result}));-1!==r&&(t[r]=wt(wt({},t[r]),{},{result:"APPROVING"})),t.forEach((function(t){var r="APPROVING",a="APPROVING";t.result&&("MSG"===t.result?(r="PASS",a="PASS"):"REJECT"===t.result?(r="REJECT",a="REJECT"):"RETURN"===t.result?(r="RETURN",a="RETURN"):"APPROVING"===t.result?(r="APPROVING",a="APPROVING"):"PASS"===t.result?(r="PASS",a="PASS"):"待审批"===t.result&&(r="待审批",a="待审批"));var n=t.opinions&&Array.isArray(t.opinions)&&t.opinions.length>0?t.opinions[0]:null,i=t.todoUserName||t.undoUserName||"--";e.push({title:t.node||"审批节点",userName:i,operateTime:t.approvalTime||"",result:r,status:a,opinion:n})}))}else this.progress&&this.progress.length>0&&this.progress.forEach((function(t){t.steps&&t.steps.length>0&&t.steps.forEach((function(r){e.push({title:t.title||"审批节点",userName:r.userName,operateTime:r.approvalTime||r.handleTime||r.createTime,result:r.result||r.status,status:r.result||r.status,opinion:r.opinion||r.remark||r.comment||null})}))}));return e}},watch:{departmentSearchText:function(e){var t=this;this.$refs.departmentTree&&(this.$refs.departmentTree.filter(e),e&&""!==e.trim()&&this.$nextTick((function(){var e=t.getAllDepartmentNodeKeys(t.departmentTreeData);t.$refs.departmentTree.setExpandedKeys(e)})))},templateId:{handler:function(e){e&&(this.internalTemplateId=e,this.loadTemplateInfo())},immediate:!0},templateName:{handler:function(e){e&&(this.internalTemplateName=e)},immediate:!0},"$route.query.id":{handler:function(e){e&&!this.templateId&&(this.internalTemplateId=e,this.loadTemplateInfo())},immediate:!0},"$route.query.name":{handler:function(e){e&&!this.templateName&&(this.internalTemplateName=e)},immediate:!0},templateVersion:{handler:function(e){e?this.internalTemplateVersion=e:this.loadLatestVersion()},immediate:!0},changeId:{handler:function(e){e&&(this.internalChangeId=e)},immediate:!0},versionList:{handler:function(e){var t=this;if(e&&e.length>0){var r=this.internalTemplateVersion||this.templateVersion,a=e.some((function(e){return t.getVersionName(e)===r}));if(a){this.updateCurrentStatus();var n=e.find((function(e){return t.getVersionName(e)===r}));n&&n.id&&(this.internalChangeId=n.id)}else this.templateVersion&&e.some((function(e){return t.getVersionName(e)===t.templateVersion}))?this.internalTemplateVersion=this.templateVersion:this.internalTemplateVersion=this.getVersionName(e[0]),this.updateCurrentStatus(),this.$nextTick((function(){t.loadData()}))}},immediate:!0},detail:{handler:function(e){var t=this;e&&e.status?this.currentStatus=e.status:this.updateCurrentStatus(),e&&e.changeId&&!this.internalChangeId&&(this.internalChangeId=e.changeId),e&&e.flowId&&this.$nextTick((function(){t.getApprovalSpet()}))},immediate:!0,deep:!0}},created:function(){var e=this;if(this.templateId?(this.internalTemplateId=this.templateId,this.loadTemplateInfo()):this.$route.query.id&&(this.internalTemplateId=this.$route.query.id,this.loadTemplateInfo()),this.templateName?this.internalTemplateName=this.templateName:this.$route.query.name&&(this.internalTemplateName=this.$route.query.name),this.changeId?this.internalChangeId=this.changeId:this.detail&&this.detail.changeId&&(this.internalChangeId=this.detail.changeId),this.templateVersion){if(this.internalTemplateVersion=this.templateVersion,this.versionList&&this.versionList.length>0){var t=this.versionList.find((function(t){return e.getVersionName(t)===e.templateVersion}));t&&t.id&&(this.internalChangeId=t.id)}}else this.loadLatestVersion();this.updateCurrentStatus(),this.loadData()},mounted:function(){this.loadDepartmentList(),this.detail&&this.detail.flowId&&this.getApprovalSpet()},methods:{loadUserSelfRole:function(){var e=wt(wt({},nt.GET_USER_SELF_ROLE),{},{params:{userOrDepID:pe()},disableSuccessMsg:!0});this.$request(e).asyncThen((function(e){if(e&&e.data)try{localStorage.setItem("user_self_role",JSON.stringify(e.data))}catch(t){console.error("存储权限数据到 localStorage 失败:",t)}})).asyncErrorCatch((function(e){console.error("获取用户自身角色失败:",e)}))},checkPermission:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"查看";try{var a=localStorage.getItem("user_self_role");if(!a)return!1;var n=JSON.parse(a);if(!Array.isArray(n))return!1;var i=n.filter((function(a){var n=a.menuPath&&e&&(a.menuPath.includes(e)||e.includes(a.menuPath));return!!n&&((!t||a.subsystem===t)&&a.parameterPer===r)}));return i.length>0}catch(o){return console.error("检查权限失败:",o),!1}},handleResendApproval:function(){var e=this;this.originalTableDataForApproval=JSON.parse(JSON.stringify(this.tableData)),this.originalPaginationForApproval=JSON.parse(JSON.stringify(this.pagination));var t=this.getChangeId();if(t){this.isResendMode=!0;var r=wt(wt({},nt.GET_RETURN_APPROVAL),{},{params:{templateId:t},disableSuccessMsg:!0});this.$request(r).asyncThen((function(t){console.log("获取审批流程信息:",t),e.resendApprovalData=t,e.getApprovalChange()})).asyncErrorCatch((function(t){console.error("获取审批流程信息失败:",t),e.isResendMode=!1,e.resendApprovalData=null,e.getApprovalChange(),e.$message.warning("获取原审批流程信息失败,将使用空的人员列表")}))}else this.$message.error("缺少变更ID,无法重新发起审批")},hasViewPermission:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=e||this.displayTemplateName;return this.checkPermission("模板管理",t,"查看")},hasEditPermission:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=e||this.displayTemplateName;return this.checkPermission("模板管理",t,"编辑")},isAdmin:function(){try{var e=localStorage.getItem("user_self_role");if(!e)return!1;var t=JSON.parse(e);return!!Array.isArray(t)&&t.some((function(e){return 1===e.isAdmin||"1"===e.isAdmin}))}catch(r){return console.error("检查管理员权限失败:",r),!1}},hasTemplateManagementPermission:function(){if(this.isAdmin())return!0;var e=this.displayTemplateName;if(!e)return!1;try{var t=localStorage.getItem("user_self_role");if(!t)return!1;var r=JSON.parse(t);if(!Array.isArray(r))return!1;var a="参数模板管理/".concat(e);return r.some((function(e){var t=e.permissionPath||"";return t===a}))}catch(n){return console.error("检查参数模板管理权限失败:",n),!1}},hasParameterEditPermission:function(e,t){if(this.isAdmin())return!0;if(!e||!t)return!1;if(this.templateManagementPermissions&&this.templateManagementPermissions.length>0){var r=this.templateManagementPermissions.filter((function(r){return r.subsystem===e&&(r.partsName===t&&"编辑"===r.parameterPer)}));return r.length>0}try{var a=localStorage.getItem("user_self_role");if(!a)return!1;var n=JSON.parse(a);if(!Array.isArray(n))return!1;var i=n.filter((function(r){return!(r.menuPath&&""!==r.menuPath.trim()&&!r.menuPath.includes("模板管理"))&&(!(!r.subsystem||r.subsystem!==e)&&(!(!r.partsName||r.partsName!==t)&&"编辑"===r.parameterPer))}));return i.length>0}catch(o){return console.error("检查参数权限失败:",o),!1}},canEditOrDeleteRow:function(e){if(!e)return!1;if(this.isAdmin())return!0;if(e.createdBy===pe())return!0;var t=e.subsystemName||e.subsystem||"",r=e.partsName||"";return!!(t&&r&&this.hasParameterEditPermission(t,r))},loadDepartmentList:function(){var e=this,t=wt(wt({},nt.QUERY_ORG_TREE),{},{disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){var r=[];t&&t.data&&(r=t.data.result||t.data.data||t.data||[]),e.departmentList=e.formatDepartmentTreeData(r),e.departmentTreeData=e.formatDepartmentTreeData(r)})).asyncErrorCatch((function(t){console.error("加载部门列表失败:",t),e.departmentList=[],e.departmentTreeData=[]}))},formatDepartmentTreeData:function(e){if(!Array.isArray(e))return[];var t=function e(t){var r={id:t.id,name:t.name||t.label||"",children:void 0};return t.children&&Array.isArray(t.children)&&t.children.length>0&&(r.children=t.children.map((function(t){return e(t)}))),r};return e.map((function(e){return t(e)}))},handleOpenDepartmentDialog:function(){var e=this;this.departmentDialogVisible=!0,this.departmentSearchText="",this.paramFormData.departmentId&&this.$refs.departmentTree&&this.$nextTick((function(){e.$refs.departmentTree.setCurrentKey(e.paramFormData.departmentId)}))},handleDepartmentDialogClose:function(){this.departmentDialogVisible=!1,this.selectedDepartmentNode=null,this.departmentSearchText=""},filterDepartmentNode:function(e,t){return!e||(t.name||"").toLowerCase().includes(e.toLowerCase())},getAllDepartmentNodeKeys:function(e){var t=this,r=[];return Array.isArray(e)?(e.forEach((function(e){e.id&&r.push(e.id),e.children&&Array.isArray(e.children)&&e.children.length>0&&(r=r.concat(t.getAllDepartmentNodeKeys(e.children)))})),r):r},handleDepartmentTreeNodeClick:function(e){this.selectedDepartmentNode=e},handleConfirmDepartmentSelect:function(){if(this.selectedDepartmentNode){var e=this.getDepartmentPathName(this.selectedDepartmentNode.id);this.paramFormData.departmentId=this.selectedDepartmentNode.id,this.paramFormData.departmentName=e||this.selectedDepartmentNode.name,this.paramFormData.department=e||this.selectedDepartmentNode.name,this.handleDepartmentDialogClose()}else this.$message.warning("请选择一个部门")},getDepartmentPathName:function(e){if(!e||!this.departmentList||0===this.departmentList.length)return"";var t=function e(t,r){var a,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=_t(t);try{for(i.s();!(a=i.n()).done;){var o=a.value,s=[].concat(Tt(n),[o.name]);if(o.id===r)return s.join("-");if(o.children&&o.children.length>0){var l=e(o.children,r,s);if(l)return l}}}catch(c){i.e(c)}finally{i.f()}return null};return t(this.departmentList,e)||""},formatDepartmentDisplay:function(e){if(!e)return"平台部";var t=e.replace(/·/g,"-"),r=t.split("-").filter((function(e){return""!==e.trim()}));return r.length>0?r[r.length-1]:t},handleBack:function(){var e=this;this.isApprovalMode?this.handleApprovalCancel():this.isMaintainMode?this.$confirm("确定要返回吗?未保存的修改将丢失。","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.selectedRows=[],e.$refs.vxeTable&&e.$refs.vxeTable.clearSelection&&e.$refs.vxeTable.clearSelection(),e.originalTableData&&e.originalTableData.length>0&&(e.tableData=JSON.parse(JSON.stringify(e.originalTableData))),e.originalTableData=[],e.isMaintainMode=!1,console.log("已退出维护参数模式"),e.loadData()})).catch((function(){})):(console.log("handleBack called"),this.$emit("back"))},pageSizeChange:function(e){this.$set(this.pagination,"pageSize",e),this.loadData()},rowClickEvent:function(e){console.warn(e)},currentChange:function(e){this.$set(this.pagination,"currentPage",e),this.loadData()},approvalPageSizeChange:function(e){this.$set(this.pagination,"pageSize",e),this.getApprovalChange()},approvalCurrentPageChange:function(e){this.$set(this.pagination,"currentPage",e),this.getApprovalChange()},selectDataChange:function(e){if(this.isMaintainMode){var t=(e||[]).filter((function(e){return"delete"!==e.operation}));this.$set(this,"selectedRows",t),console.log("选中的行:",this.selectedRows.length)}else this.$emit("select-data-change",e)},resetSearch:function(){this.searchPanelValue={parameterType:"",partsName:"",parameterName:""},this.handleSearch()},handleSearch:function(){this.$set(this.pagination,"currentPage",1),this.loadData()},handleImport:function(){this.importing||(this.importDialogVisible=!0)},handleImportFileChange:function(e,t){var r=[".xls",".xlsx",".csv"],a=["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv","application/vnd.ms-excel.sheet.macroEnabled.12"];if(e&&e.raw){var n=e.raw,i=n.name||"",o=i.substring(i.lastIndexOf(".")).toLowerCase(),s=n.type||"",l=r.some((function(e){return o===e})),c=!s||a.some((function(e){return s.includes(e)}));if(!l&&!c)return this.$message.error("文件类型不支持,仅支持 ".concat(r.join("、")," 格式的文件")),this.selectedImportFile=null,this.importFileList=[],!1;this.selectedImportFile=n,this.importFileList=t.slice(-1)}else this.selectedImportFile=null,this.importFileList=t.slice(-1)},handleImportFileRemove:function(){this.selectedImportFile=null,this.importFileList=[]},handleImportDialogClose:function(){this.importing||(this.importDialogVisible=!1,this.selectedImportFile=null,this.importFileList=[])},handleImportConfirm:function(){var e=this;if(!this.importing&&this.selectedImportFile){var t=this.getDetailTemplateId();if(t){var r=this.selectedImportFile,a=[".xls",".xlsx",".csv"],n=r.name||"",i=n.substring(n.lastIndexOf(".")).toLowerCase();if(!a.includes(i))return this.$message.error("文件类型不支持,仅支持 ".concat(a.join("、")," 格式的文件")),this.selectedImportFile=null,void(this.importFileList=[]);var o=function(){e.importing=!1,e.importDialogVisible=!1,e.selectedImportFile=null,e.importFileList=[]},s=new FormData;s.append("file",r),s.append("userId",pe()),s.append("createBy",pe()),s.append("templateRowId",t);var l=wt(wt({},nt.IMPORT_MODEL),{},{params:s});this.importing=!0;var c=this.$loading({lock:!0,text:"正在导入参数,请稍候...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});this.$upload(l,null,!1).asyncThen((function(){c.close(),o(),0===e.tableData.length?e.loadData():e.handleBack()})).asyncErrorCatch((function(t){console.error("导入失败:",t);var r="导入失败";t.data&&t.data.error&&(r=Array.isArray(t.data.error)?t.data.error.join(", "):t.data.error),e.$message({type:"error",message:r}),c.close(),o()})).finally((function(){c&&c.close(),e.importing=!1})),this.importDialogVisible=!1}else this.$message.error("缺少模板ID,无法导入")}else this.selectedImportFile||this.$message.warning("请先选择要导入的文件")},handleDownloadTemplate:function(){var e=this,t=this.getDetailTemplateId();if(t){if(this.downloadingRowId!==t){var r=nt.DOWNLODE_MODEL||{},a=r.url,n=r.method,i=void 0===n?"get":n,o=r.headers,s=void 0===o?{}:o,l={url:a,method:i,params:{templateRowId:t,templateEmpty:!0},responseType:"blob",headers:s};l.url?("post"===(l.method||"").toLowerCase()&&(l.data=l.params,delete l.params),this.downloadingRowId=t,this.$axios(l).then((function(e){var t=e.data;if(t){var r=e.headers&&(e.headers["content-type"]||e.headers["Content-Type"]);if(r&&r.includes("application/json"))try{var a=new FileReader;a.onload=function(){console.log("下载失败: ".concat(a.result))},a.readAsText(t)}catch(u){console.error("解析下载失败响应异常:",u)}else{var n=e.headers&&(e.headers["content-disposition"]||e.headers["Content-Disposition"]),i="导入模板.xlsx";if(n){var o=/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i.exec(n),s=o?o[1]||o[2]:"";if(s)try{i=decodeURIComponent(s)}catch(u){i=s}}var l=window.URL.createObjectURL(t),c=document.createElement("a");c.href=l,c.download=i,document.body.appendChild(c),c.click(),document.body.removeChild(c),window.URL.revokeObjectURL(l),console.log("下载开始,请查看浏览器下载列表")}}else console.log("下载失败,文件内容为空")})).catch((function(e){console.error("下载失败:",e),console.log("下载失败,请稍后重试")})).finally((function(){e.downloadingRowId=""}))):console.log("未配置下载地址")}}else console.log("未找到模板ID,无法下载")},getApprovalChange:function(){var e=this;this.originalTableDataForApproval=JSON.parse(JSON.stringify(this.tableData)),this.originalPaginationForApproval=JSON.parse(JSON.stringify(this.pagination));var t=wt(wt({},nt.GET_APPROVAL_CHANGE),{},{params:{templateId:this.getChangeId(),pageNumber:this.pagination.currentPage,pageSize:this.pagination.pageSize},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){console.log("GET_APPROVAL_CHANGE 接口返回数据:",t);var r=t&&t.data&&t.data.result||[],a=t&&t.data&&(t.data.count||t.data.total||t.data.totalCount)||0,n="number"===typeof a?a:parseInt(a,10)||0,i=r.map((function(t,r){var a=wt(wt({},t),{},{parameterType:t.parameterType||t.type||"",number:t.number||(e.pagination.currentPage-1)*e.pagination.pageSize+r+1});return a}));e.tableData=i,e.$set(e.pagination,"total",n),e.isApprovalMode=!0,e.approvalFormData={processTitle:"",description:""},e.approvalWorkflowSteps=[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"会签",required:!1,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}],e.isResendMode&&e.resendApprovalData&&e.$nextTick((function(){e.fillResendApprovalData(e.resendApprovalData),e.isResendMode=!1,e.resendApprovalData=null}))})).asyncErrorCatch((function(e){console.error("获取审批变更数据失败:",e)}))},handleInitiateApproval:function(){this.getApprovalChange()},handleRestartApproval:function(){var e=this,t=this.getDetailTemplateId();t?this.$confirm("确定要执行直送操作吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.resending=!0;var t=wt(wt({},nt.RESTART_MODEL_APPROVAL),{},{params:{templateId:e.getChangeId(),userId:pe()},disableSuccessMsg:!0});e.$request(t).asyncThen((function(t){e.$message({message:"直送成功",type:"success"}),e.loadData(),e.detail&&e.detail.flowId&&e.getApprovalSpet(),e.$emit("refresh"),e.resending=!1})).asyncErrorCatch((function(t){console.error("直送失败:",t),e.$message({message:t.message||"直送失败,请重试",type:"error"}),e.resending=!1})).finally((function(){e.resending=!1}))})).catch((function(){})):this.$message.error("缺少模板ID,无法执行直送操作")},fillResendApprovalData:function(e){var t,r,a=this;console.log("fillResendApprovalData 接收到的数据:",e);var n=[],i=null;i=Array.isArray(null===e||void 0===e?void 0:e.data)?e.data:Array.isArray(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.data)?e.data.data:Array.isArray(null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.result)?e.data.result:Array.isArray(e)?e:null!==e&&void 0!==e&&e.data&&!Array.isArray(e.data)?e.data:e,Array.isArray(i)?n=i:i&&Array.isArray(i.data)?n=i.data:i&&Array.isArray(i.result)?n=i.result:i&&Array.isArray(i.nodeList)?n=i.nodeList:i&&Array.isArray(i.flowNodes)&&(n=i.flowNodes),console.log("提取的节点列表:",n),console.log("处理后的数据对象:",i);var o=e&&e.data&&!Array.isArray(e.data)&&"object"===bt(e.data)?e.data:i&&!Array.isArray(i)?i:e;o&&!Array.isArray(o)&&((o.progressTitle||o.processTitle)&&(this.approvalFormData.processTitle=o.progressTitle||o.processTitle||"",console.log("填充流程主题:",this.approvalFormData.processTitle)),(o.explanation||o.description)&&(this.approvalFormData.description=o.explanation||o.description||"")),n&&n.length>0?(console.log("开始填充节点人员信息,节点数量:",n.length),n.forEach((function(e){var t=e.nodeName||e.node||"";if(console.log("处理节点:",t,e),t){var r=a.approvalWorkflowSteps.find((function(e){return e.name===t}));if(r){var n=e.assignees||[];if(console.log("节点 assignees:",n),Array.isArray(n)&&0!==n.length){var i=n.map((function(e){var t=e.userId||e.id||"";return{userId:t,username:e.username||e.name||"",userNumber:e.userNumber||e.account||e.userId||e.id||""}})).filter((function(e){return e.userId}));console.log("提取的人员信息:",i),i.length>0&&(r.handlers=i.map((function(e){return e.userId})).filter(Boolean),r.options=i.map((function(e){return{userId:e.userId,username:e.username||"",userNumber:e.userNumber||""}})).filter((function(e){return e.userId})),console.log("填充后的 step:",r.name,"handlers:",r.handlers,"options:",r.options))}else console.log("assignees 为空或不是数组,跳过")}else console.log("未找到对应的审批环节:",t)}else console.log("节点名称为空,跳过")}))):console.log("节点列表为空,无法填充人员信息")},handleApprovalCancel:function(){this.isApprovalMode=!1,this.isResendMode=!1,this.resendApprovalData=null,this.originalTableDataForApproval&&this.originalTableDataForApproval.length>0&&(this.tableData=JSON.parse(JSON.stringify(this.originalTableDataForApproval))),this.originalPaginationForApproval&&(this.$set(this.pagination,"currentPage",this.originalPaginationForApproval.currentPage),this.$set(this.pagination,"pageSize",this.originalPaginationForApproval.pageSize),this.$set(this.pagination,"total",this.originalPaginationForApproval.total)),this.originalTableDataForApproval=[],this.originalPaginationForApproval=null,this.approvalFormData={processTitle:"",description:""},this.approvalWorkflowSteps=[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"会签",required:!1,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}]},handleApprovalFormSubmit:function(){var e=this,t=this.getDetailTemplateId();if(t){var r=(this.approvalFormData.processTitle||"").trim();if(r){var a=this.approvalWorkflowSteps.map((function(e,t){return{nodeName:e.name,assignees:e.handlers,nodeOrder:t+1}})),n={templateRowId:t,nodeList:a,processTitle:r,createBy:pe(),userId:pe()},i=wt(wt({},nt.START_APPROVAL),{},{params:n,disableSuccessMsg:!0});this.approvalSubmitting=!0,this.$request(i).asyncThen((function(t){console.log("审批提交成功"),e.$message({type:"success",message:"审批提交成功"}),e.isApprovalMode=!1,e.approvalSubmitting=!1,e.originalTableDataForApproval=[],e.originalPaginationForApproval=null,e.handleBack()})).asyncErrorCatch((function(t){console.error("审批提交失败:",t),e.$message({type:"error",message:"审批提交失败,请重试"})})).finally((function(){e.approvalSubmitting=!1}))}else this.$message.warning("请填写流程主题")}else this.$message.error("缺少模板ID,无法发起审批")},handleRemoteSearch:function(e,t){var r=this.approvalWorkflowSteps[t];if(e&&""!==e.trim()){r.loading=!0;var a=e.trim(),n=null;n=wt(wt({},nt.GET_ALLUSERS),{},{params:{name:a},disableSuccessMsg:!0}),this.$request(n).asyncThen((function(e){var t=e&&e.data,a=[];Array.isArray(t)?a=t:t&&Array.isArray(t.result)?a=t.result:t&&t.data&&Array.isArray(t.data)&&(a=t.data);var n=a.map((function(e){return{userId:e.userId||e.id,username:e.username||e.name,userNumber:e.userNumber||e.userId||e.id}})).filter((function(e){return e.userId&&e.userNumber})),i=new Set(r.handlers||[]),o=n.filter((function(e){return!i.has(e.userId)})),s=(r.options||[]).filter((function(e){return e.userId&&r.handlers&&r.handlers.includes(e.userId)})),l=new Map;s.forEach((function(e){e.userId&&l.set(e.userId,e)})),o.forEach((function(e){e.userId&&!l.has(e.userId)&&l.set(e.userId,e)})),r.options=Array.from(l.values()),r.loading=!1})).asyncErrorCatch((function(e){if(console.error("搜索人员失败:",e),r.handlers&&r.handlers.length>0){var t=r.options.filter((function(e){return e.userId&&r.handlers.includes(e.userId)}));r.options=t}else r.options=[];r.loading=!1}))}else if(r.handlers&&r.handlers.length>0){var i=r.options.filter((function(e){return e.userId&&r.handlers.includes(e.userId)})),o=r.handlers.filter((function(e){return!i.some((function(t){return t.userId===e}))}));o.length,r.options=i}else r.options=[]},handleHandlerChange:function(e,t){},handleMaintainParams:function(){var e=this;this.isMaintainMode=!this.isMaintainMode,this.isMaintainMode?(this.selectedRows=[],this.$set(this.pagination,"currentPage",1),this.loadAllData().then((function(){e.originalTableData=JSON.parse(JSON.stringify(e.tableData)),console.log("已进入维护参数模式")}))):(this.selectedRows=[],this.$refs.vxeTable&&this.$refs.vxeTable.clearSelection&&this.$refs.vxeTable.clearSelection(),this.tableData=JSON.parse(JSON.stringify(this.originalTableData)),this.originalTableData=[],this.$set(this.pagination,"currentPage",1),console.log("已退出维护参数模式"),this.loadData())},handleCancel:function(){var e=this;this.$confirm("确定要取消维护吗?未保存的修改将丢失。","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.isMaintainMode=!1,e.loadData(),console.log("已取消维护")})).catch((function(){}))},handleBackFromMaintain:function(){var e=this;this.$confirm("确定要返回吗?未保存的修改将丢失。","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.selectedRows=[],e.$refs.vxeTable&&e.$refs.vxeTable.clearSelection&&e.$refs.vxeTable.clearSelection(),e.originalTableData&&e.originalTableData.length>0&&(e.tableData=JSON.parse(JSON.stringify(e.originalTableData))),e.originalTableData=[],e.isMaintainMode=!1,console.log("已退出维护参数模式"),e.loadData()})).catch((function(){}))},handleReset:function(){var e=this;this.$confirm("确定要重置吗?所有未提交的修改将丢失。","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.tableData=JSON.parse(JSON.stringify(e.originalTableData));var t=(e.pagination.currentPage-1)*e.pagination.pageSize;e.tableData=e.tableData.map((function(e,r){var a=wt({},e);return delete a.operation,delete a._rowClassName,wt(wt({},a),{},{number:t+r+1})})),e.$forceUpdate(),console.log("已重置为原始数据")})).catch((function(){}))},handleSubmit:function(){var e=this;this.$confirm("确定要提交修改吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t=e.getDetailTemplateId();if(t){var r=e.tableData.map((function(e){return wt(wt({},e),{},{parameterId:e.id})})),a={templateRowId:t,createBy:pe(),userId:pe(),parameterForms:r};e.submitting=!0;var n=wt(wt({},nt.EDIT_MODEL_PARAM),{},{params:a,disableSuccessMsg:!0});e.$request(n).asyncThen((function(t){e.submitting=!1,console.log("提交成功"),e.isMaintainMode=!1,e.originalTableData=[],e.submitting=!1;var r=t.data&&(t.data.templateId||t.data.templateRowId);if(e.setDetailTemplateId(r),e.internalTemplateVersion=t.data.version,e.templateVersion=t.data.version,console.log(e.templateId,t.data.templateRowId),e.versionList.some((function(e){return e.version===t.data.version}))){var a=e.versionList.find((function(e){return e.version===t.data.version}));a.status="DRAFT",a.rowId=r,a.id=t.data.templateId}else e.versionList.push({version:t.data.version,status:"DRAFT",rowId:r,id:t.data.templateId});e.loadData()})).asyncErrorCatch((function(t){e.submitting=!1,console.error("提交失败:",t)}))}else console.log("缺少模板ID,无法提交")})).catch((function(){e.submitting=!1}))},handleAddParam:function(){var e=this;this.paramModalMode="add",this.paramCurrentRow=null,this.paramCurrentRowIndex=-1,this.paramFormData={subsystemName:"",parameterType:"",partsName:"",parameterName:"",department:"",departmentName:"",departmentId:"",parameterSource:"",numberOrFormula:"",fillDepartment:"",remarks:""},this.paramModalVisible=!0,this.$nextTick((function(){e.$refs.paramForm&&e.$refs.paramForm.clearValidate()}))},handleRowEdit:function(e){var t=this;this.paramModalMode="edit",this.paramCurrentRow=e,this.paramCurrentRowIndex=this.tableData.findIndex((function(t){return t===e}));var r=this.findDepartmentIdByName(e.department||"");this.paramFormData={subsystemName:e.subsystemName||"",parameterType:e.parameterType||"",partsName:e.partsName||"",parameterName:e.parameterName||"",unit:e.unit||"",operation:"update",department:e.department||"",departmentName:e.department||"",departmentId:r||"",parameterSource:e.parameterSource||"",numberOrFormula:e.numberOrFormula||"",fillDepartment:e.fillDepartment||"",remarks:e.remarks||""},this.paramModalVisible=!0,this.$nextTick((function(){t.$refs.paramForm&&t.$refs.paramForm.clearValidate()}))},handleRowDelete:function(e,t){var r=this;this.$confirm("确定要删除该参数吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){r.isMaintainMode&&r.markRowAsDeleted(e)})).catch((function(){}))},markRowAsDeleted:function(e){var t=this;if(!e)return!1;var r=this.tableData.findIndex((function(t){return t.rowId===e.rowId||t.id===e.id||e._localId&&t._localId===e._localId||t===e}));if(-1!==r){var a=this.tableData[r];if("delete"===a.operation)return!1;var n=wt(wt({},a),{},{operation:"delete",_rowClassName:"row-deleted"});return this.$set(this.tableData,r,n),this.selectedRows=this.selectedRows.filter((function(t){return!(t.rowId&&t.rowId===e.rowId||t.id&&t.id===e.id||e._localId&&t._localId&&t._localId===e._localId||t===e)})),this.$nextTick((function(){t.$refs.vxeTable&&t.$refs.vxeTable.toggleRowSelection&&t.$refs.vxeTable.toggleRowSelection(n,!1)})),console.log("已标记为删除"),!0}return!1},handleBatchDelete:function(){var e=this;if(this.selectedRows&&0!==this.selectedRows.length){var t=this.selectedRows.filter((function(e){return"delete"!==e.operation}));0!==t.length?this.$confirm("确定要删除选中的 ".concat(t.length," 个参数吗?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var r=0;t.forEach((function(t){e.markRowAsDeleted(t)&&r++})),e.selectedRows=[],e.$refs.vxeTable&&e.$refs.vxeTable.clearSelection&&e.$refs.vxeTable.clearSelection(),r>0&&e.$message.success("已标记 ".concat(r," 个参数为删除"))})).catch((function(){})):this.$message.warning("选中的参数中已包含已删除的项,请重新选择")}else this.$message.warning("请先选择要删除的参数")},getRowClassName:function(e){var t=e.row;return!this.isMaintainMode||"delete"!==t.operation&&"row-deleted"!==t._rowClassName?"":"row-deleted"},getRowKey:function(e){return e.rowId||e.id||e._localId||null},checkRowMethod:function(e,t){return"delete"!==e.operation&&"row-deleted"!==e._rowClassName},handleParamFormSubmit:function(){var e=this;this.$refs.paramForm.validate((function(t){if(t&&e.isMaintainMode){if("add"===e.paramModalMode){var r=(e.pagination.currentPage-1)*e.pagination.pageSize,a={id:null,rowId:null,subsystemName:e.paramFormData.subsystemName,parameterType:e.paramFormData.parameterType,partsName:e.paramFormData.partsName,parameterName:e.paramFormData.parameterName,department:e.paramFormData.department,parameterSource:e.paramFormData.parameterSource,numberOrFormula:e.paramFormData.numberOrFormula,unit:e.paramFormData.unit,remarks:e.paramFormData.remarks,number:e.tableData.length>0?Math.max.apply(Math,Tt(e.tableData.map((function(e){return e.number||0}))))+1:r+e.tableData.length+1,operation:"insert",_localId:e.nextLocalId++};e.tableData.push(a),e.$set(e.pagination,"total",e.tableData.length)}else{var n=e.tableData.findIndex((function(t){return e.paramCurrentRow&&t.rowId&&e.paramCurrentRow.rowId&&t.rowId===e.paramCurrentRow.rowId||e.paramCurrentRow&&t.id&&e.paramCurrentRow.id&&t.id===e.paramCurrentRow.id}));if(-1===n&&e.paramCurrentRow&&e.paramCurrentRow._localId&&(n=e.tableData.findIndex((function(t){return t._localId&&t._localId===e.paramCurrentRow._localId}))),-1===n&&e.paramCurrentRowIndex>-1&&(n=e.paramCurrentRowIndex),-1===n)return void console.warn("未找到需要更新的行");e.$set(e.tableData,n,wt(wt({},e.tableData[n]),{},{subsystemName:e.paramFormData.subsystemName,parameterType:e.paramFormData.parameterType,partsName:e.paramFormData.partsName,parameterName:e.paramFormData.parameterName,department:e.paramFormData.department,parameterSource:e.paramFormData.parameterSource,numberOrFormula:e.paramFormData.numberOrFormula,unit:e.paramFormData.unit,remarks:e.paramFormData.remarks,operation:"update"}))}e.paramModalVisible=!1,console.log("add"===e.paramModalMode?"已添加到表格":"已更新表格数据"),e.$message({type:"success",message:"保存成功"})}}))},handleParamModalClose:function(){this.paramFormData={subsystemName:"",parameterType:"",partsName:"",parameterName:"",department:"",departmentName:"",departmentId:"",parameterSource:"",numberOrFormula:"",fillDepartment:"",remarks:""},this.paramCurrentRow=null,this.paramCurrentRowIndex=-1,this.paramSubmitting=!1,this.selectedDepartmentNode=null,this.$refs.paramForm&&this.$refs.paramForm.clearValidate()},findDepartmentIdByName:function(e){var t=this;if(!e||!this.departmentList||0===this.departmentList.length)return"";var r=function e(r,a){var n,i=_t(r);try{for(i.s();!(n=i.n()).done;){var o=n.value,s=t.getDepartmentPathName(o.id);if(s===a||o.name===a)return o.id;if(o.children&&o.children.length>0){var l=e(o.children,a);if(l)return l}}}catch(c){i.e(c)}finally{i.f()}return null};return r(this.departmentList,e)||""},extractParameterId:function(e){return e&&(e.id||e.parameterId||e.parameterID||e.parameterid||e.parameterCode||e.code)||null},buildParamPayload:function(e){var t=this.internalTemplateVersion||this.templateVersion;return{templateRowId:e,version:t,subsystemName:this.paramFormData.subsystemName,parameterType:this.paramFormData.parameterType,partsName:this.paramFormData.partsName,parameterName:this.paramFormData.parameterName,parameterSource:this.paramFormData.parameterSource,numberOrFormula:this.paramFormData.numberOrFormula,department:this.paramFormData.department,fillDepartment:this.paramFormData.fillDepartment,remarks:this.paramFormData.remarks}},loadTemplateInfo:function(){this.getDetailTemplateId()},loadLatestVersion:function(){var e=this.getDetailTemplateId();e&&this.internalTemplateVersion,this.internalTemplateVersion},loadAllData:function(){var e=this,t=this.getDetailTemplateId();if(!t)return this.tableData=[],this.$set(this.pagination,"total",0),Promise.resolve();var r=this.internalTemplateVersion||this.templateVersion,a={templateRowId:t,version:r,pageNumber:1,pageSize:999999};this.searchPanelValue.parameterType&&(a.parameterType=this.searchPanelValue.parameterType),this.searchPanelValue.partsName&&(a.partsName=this.searchPanelValue.partsName),this.searchPanelValue.parameterName&&(a.parameterName=this.searchPanelValue.parameterName);var n=wt(wt({},nt.GET_MODEL_DETAIL),{},{params:a,disableSuccessMsg:!0});return this.$request(n).asyncThen((function(t){var r=t&&t.data&&t.data.result||[],a=t&&t.data&&(t.data.count||t.data.total||t.data.totalCount)||0,n="number"===typeof a?a:parseInt(a,10)||0;e.tableData=r.map((function(e,t){return wt(wt({},e),{},{parameterType:e.parameterType||e.type||"",number:e.number||t+1})}));var i=t&&t.data&&(t.data.status||t.data.state)||"",o=r&&r.length>0&&(r[0].status||r[0].state)||"";e.currentStatus=i||o||"",e.$set(e.pagination,"total",n)})).asyncErrorCatch((function(t){console.error("查询失败:",t),e.tableData=[],e.$set(e.pagination,"total",0)}))},getApprovalSpet:function(){var e=this;if(this.detail&&this.detail.flowId){var t=this.getDetailTemplateId();if(t){var r=wt(wt({},nt.GET_PPROVAL_ALL),{},{params:{flowId:this.detail.flowId,templateId:t},disableSuccessMsg:!0});this.$request(r).asyncThen((function(t){console.log("审批流程数据:",t);var r=t.data||t;e.progressDetail={explanation:r.explanation||"",flowStatus:r.flowStatus||"",progressTitle:r.progressTitle||"",templateVersion:r.templateVersion||"",contentName:r.contentName||""},e.flowNodes=r.flowNodes||[]})).asyncErrorCatch((function(t){console.error("获取审批流程数据失败:",t),e.flowNodes=[],e.progressDetail={}}))}}},setStatusText:function(e){var t={PASS:"通过",REJECT:"拒绝",REFUSE:"驳回",APPROVE:"批准",APPROVING:"审批中",PENDING:"待处理",WAITING:"待处理",STAY:"待审批",INITIATE:"发起审批",RETURN:"退回"};return t[e]||e||"待处理"},formatTime:function(e){if(!e)return"--";if("number"===typeof e){var t=new Date(e);return t.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return e},getTimelineColor:function(e,t,r){return"PASS"===e||"APPROVE"===e?"#67C23A":"REJECT"===e||"REFUSE"===e?"#F56C6C":"APPROVING"===e||"PENDING"===e||"WAITING"===e?"#E6A23C":"STAY"===e?"#909399":"#409EFF"},getStatusClass:function(e){var t={PASS:"status-pass",APPROVE:"status-approve",REJECT:"status-reject",REFUSE:"status-reject",APPROVING:"status-approving",PENDING:"status-pending",WAITING:"status-pending",STAY:"status-default",INITIATE:"status-initiate",RETURN:"status-return"};return t[e]||"status-default"},getVersionName:function(e){return e.version||e.name||""},getVersionKey:function(e){return e.version||e.name||e.rowId||""},getDetailTemplateId:function(){return this.internalTemplateId||this.templateId||""},setDetailTemplateId:function(e){e&&(this.internalTemplateId=e,this.templateId=e)},getChangeId:function(){return this.internalChangeId||this.changeId||this.detail&&this.detail.changeId||""},handleVersionChange:function(e){this.internalTemplateVersion=e;var t=this.versionList.find((function(t){return t.version===e}));if(t){this.internalChangeId=t.id||"";var r=t.id||t.rowId||"";this.setDetailTemplateId(r)}else this.internalChangeId="";this.$set(this.pagination,"currentPage",1),this.loadData(),this.updateCurrentStatus()},updateCurrentStatus:function(){var e=this;if(this.detail&&this.detail.status)this.currentStatus=this.detail.status;else{var t=this.internalTemplateVersion||this.templateVersion;if(t&&this.versionList&&this.versionList.length>0){var r=this.versionList.find((function(r){var a=e.getVersionName(r);return a===t}));r&&r.status?this.currentStatus=r.status:this.currentStatus=this.detail&&this.detail.status||""}else this.currentStatus=this.detail&&this.detail.status||""}},loadData:function(){var e=this,t=this.getDetailTemplateId();if(!t)return this.tableData=[],void this.$set(this.pagination,"total",0);var r=this.internalTemplateVersion||this.templateVersion,a={templateRowId:t,version:r,pageNumber:this.pagination.currentPage,pageSize:this.pagination.pageSize};this.searchPanelValue.parameterType&&(a.parameterType=this.searchPanelValue.parameterType),this.searchPanelValue.partsName&&(a.partsName=this.searchPanelValue.partsName),this.searchPanelValue.parameterName&&(a.parameterName=this.searchPanelValue.parameterName);var n=wt(wt({},nt.GET_MODEL_DETAIL),{},{params:a,disableSuccessMsg:!0});this.$request(n).asyncThen((function(t){console.log("GET_MODEL_DETAIL 接口返回数据:",t);var r=t&&t.data&&t.data.result||[],a=t&&t.data&&(t.data.count||t.data.total||t.data.totalCount)||0,n="number"===typeof a?a:parseInt(a,10)||0;console.log("获取到的总数:",a,"转换后的数字:",n);var i=(e.pagination.currentPage-1)*e.pagination.pageSize;e.tableData=r.map((function(e,t){return wt(wt({},e),{},{parameterType:e.parameterType||e.type||"",number:e.number||i+t+1})}));var o=t&&t.data&&(t.data.status||t.data.state)||"",s=r&&r.length>0&&(r[0].status||r[0].state)||"";e.currentStatus=o||s||"",console.log("从 GET_MODEL_DETAIL 接口获取到的状态:",e.currentStatus),e.$set(e.pagination,"total",n),console.log("设置后的 pagination.total:",e.pagination.total)})).asyncErrorCatch((function(t){console.error("查询失败:",t),e.tableData=[],e.$set(e.pagination,"total",0)}))}}},Nt=Pt,Et=(r("0b64"),p(Nt,vt,yt,!1,null,null,null)),Rt=Et.exports;function Lt(e){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lt(e)}function jt(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ft(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function Ft(e,t){if(e){if("string"===typeof e)return Vt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vt(e,t):void 0}}function Vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function zt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function Bt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zt(Object(r),!0).forEach((function(t){$t(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $t(e,t,r){return t=Gt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gt(e){var t=Ut(e,"string");return"symbol"===Lt(t)?t:String(t)}function Ut(e,t){if("object"!==Lt(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==Lt(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Wt=function(){return{templateName:""}},Ht={name:"ApaasCustomMydemo",components:{DetailDrawer:ie,EditModal:we,VersionModal:gt,ModelDetail:Rt},data:function(){return{searchPanelValue:Wt(),templateOptions:[],filteredTemplateOptions:[],templateSelectLoading:!1,tableData:[],errorList:"",pagination:{currentPage:1,pageSize:10,total:0},showModelDetail:!1,currentTemplateId:"",currentTemplateRowId:"",currentTemplateName:"",currentVersion:"",versionList:[],currentDetail:{},importing:!1,importDialogVisible:!1,importFileList:[],selectedImportFile:null,downloadingRowId:"",tenantId:"1764149921900",userId:pe(),errorDialogVisible:!1,templateManagementPermissions:[],fromTodo:!1}},computed:{tableConfig:function(){return{rowDraggable:!1,colConfigs:[{prop:"templateName",label:"模板名称",align:"center"},{prop:"version",label:"版本",customSlot:"version",showOverflowTooltip:!0,minWidth:"150",align:"center"},{prop:"orderNum",label:"排序号",showOverflowTooltip:!0,minWidth:"80",align:"center"},{prop:"status",customSlot:"status",label:"状态",showOverflowTooltip:!0,minWidth:"150",align:"center"},{prop:"createdTime",label:"创建时间",showOverflowTooltip:!0,width:"200",align:"center"},{prop:"publishedTime",label:"发布时间",width:"220",align:"center"},{prop:"createBy",label:"创建人",width:"120",align:"center"},{prop:"options",label:"操作",customSlot:"options",align:"center",width:"180",fixed:"right"}],seqType:!1,layout:"total, prev, pager, next, sizes, jumper"}}},mounted:function(){this.loadUserSelfRole(),this.loadTemplateOptions(),this.loadData()},methods:{isAdmin:function(){try{var e=localStorage.getItem("user_self_role");if(!e)return!1;var t=JSON.parse(e);return!!Array.isArray(t)&&t.some((function(e){return 1===e.isAdmin||"1"===e.isAdmin}))}catch(r){return console.error("检查管理员权限失败:",r),!1}},hasTemplateManagementEditPermission:function(){if(this.isAdmin())return!0;try{var e=localStorage.getItem("user_self_role");if(!e)return!1;var t=JSON.parse(e);return!!Array.isArray(t)&&t.some((function(e){var t=e.permissionPath||"",r=e.parameterPer;return"参数模板管理"===t&&(2===r||"2"===r||"编辑"===r||2===r)}))}catch(r){return console.error("检查参数模板管理编辑权限失败:",r),!1}},loadUserSelfRole:function(){var e=this,t=Bt(Bt({},nt.GET_USER_SELF_ROLE),{},{params:{userOrDepID:pe()},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){if(t&&t.data)try{localStorage.setItem("user_self_role",JSON.stringify(t.data))}catch(r){console.error("存储权限数据到 localStorage 失败:",r)}e.filterTemplateManagementPermissions()})).asyncErrorCatch((function(e){console.error("获取用户自身角色失败:",e)}))},handleRowDelete:function(e){var t=this,r=Bt(Bt({},nt.DEL_MODEL),{},{params:{templateId:e.id},disableSuccessMsg:!0});this.$request(r).asyncThen((function(e){console.log(e,"resp"),t.$message({type:"success",message:"删除成功"}),t.loadData()})).asyncErrorCatch((function(e){console.error("删除模板失败:",e),t.$message({type:"error",message:"删除失败"})}))},filterTemplateManagementPermissions:function(){try{var e=localStorage.getItem("user_self_role");if(!e)return void(this.templateManagementPermissions=[]);var t=JSON.parse(e);if(!Array.isArray(t))return void(this.templateManagementPermissions=[]);this.templateManagementPermissions=t.filter((function(e){return"数据录入/模板管理"===e.menuPath})),console.log("模板管理权限数据:",this.templateManagementPermissions)}catch(r){console.error("过滤模板管理权限失败:",r),this.templateManagementPermissions=[]}},checkPermission:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"查看";try{var a=localStorage.getItem("user_self_role");if(!a)return!1;var n=JSON.parse(a);if(!Array.isArray(n))return!1;var i=n.filter((function(a){var n=a.menuPath&&e&&(a.menuPath.includes(e)||e.includes(a.menuPath));return!!n&&((!t||a.subsystem===t)&&a.parameterPer===r)}));return i.length>0}catch(o){return console.error("检查权限失败:",o),!1}},hasViewPermission:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?this.checkPermission("模板管理",e,"查看"):this.checkPermission("模板管理",null,"查看")},hasEditPermission:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?this.checkPermission("模板管理",e,"编辑"):this.checkPermission("模板管理",null,"编辑")},getStatusType:function(e){if("number"===typeof e)return e;if("string"===typeof e){if("已发布"===e||"COMPLETE"===e)return"已完成";if("审核中"===e||"REVIEWING"===e)return"审核中";if("校对中"===e||"PROOFREADING"===e)return"校对中";if("已批准"===e||"APPROVING"===e)return"已批准";if("草稿"===e||"DRAFT"===e)return"草稿"}return!0===e?"已发布":"草稿"},pageSizeChange:function(e){this.pagination.pageSize=e,this.loadData()},rowClickEvent:function(e){console.warn(e)},handleRowDetail:function(e){this.currentTemplateId=e.rowId,this.currentTemplateRowId=e.id,this.currentTemplateName=e.templateName,e.returnNum>0?this.fromTodo=!0:this.fromTodo=!1,this.currentVersion=e.version,this.currentDetail={status:e.status||""},this.loadVersionList(e),0===this.templateManagementPermissions.length&&this.loadUserSelfRole(),this.showModelDetail=!0},loadVersionList:function(e){var t=this,r=e&&(e.rowId||e.templateRowId||e.id);if(r){var a=Bt(Bt({},nt.CHECK_MODEL_VERISON),{},{params:{templateRowId:r},disableSuccessMsg:!0});this.$request(a,!1).asyncThen((function(e){var r=e&&e.data&&(e.data.result||e.data.list||e.data)||[];t.versionList=Array.isArray(r)?r:[]})).asyncErrorCatch((function(e){console.error("获取版本列表失败:",e),t.versionList=[]}))}else this.versionList=[]},handleBackFromDetail:function(){console.log("handleBackFromDetail called"),this.showModelDetail=!1,this.currentTemplateId="",this.currentTemplateName="",this.currentVersion="",this.versionList=[],this.currentDetail={},this.loadData()},handleRowVersion:function(e){this.$refs.versionModal.showModal(e)},handleDownloadImportTemplate:function(){var e=this,t=nt.DOWNLODE_ALL_MODEL||{},r=t.url,a=t.method,n=void 0===a?"get":a,i=t.headers,o=void 0===i?{}:i,s={url:r,method:n,params:{},responseType:"blob",headers:o};s.url?("get"===(s.method||"").toLowerCase()&&(s.data=s.params,delete s.params),this.$axios(s).then((function(t){var r=t.data;if(r){var a=t.headers&&(t.headers["content-type"]||t.headers["Content-Type"]);if(a&&a.includes("application/json"))try{var n=new FileReader;n.onload=function(){console.log("下载失败: ".concat(n.result))},n.readAsText(r)}catch(p){console.error("解析下载失败响应异常:",p)}else{var i=t.headers&&(t.headers["content-disposition"]||t.headers["Content-Disposition"]),o="导入模板.xlsx";if(i){var s=/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i.exec(i),l=s?s[1]||s[2]:"";if(l)try{o=decodeURIComponent(l)}catch(p){o=l}}var c=window.URL.createObjectURL(r),u=document.createElement("a");u.href=c,u.download=o,document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(c),e.$message({type:"success",message:"下载成功"}),console.log("下载开始,请查看浏览器下载列表")}}else console.log("下载失败,文件内容为空")})).catch((function(t){console.error("下载失败:",t),e.$message.error("下载失败,请稍后重试")}))):console.log("未配置下载地址")},handleVersionClick:function(e){console.log(e,"data");var t=e.version,r=e.templateId,a=e.template,n=e.versionList,i=e.changeId,o=e.returnNum;this.currentTemplateRowId=i,this.currentTemplateId=r,this.currentTemplateName=a.templateName||"",this.fromTodo=o>0||!1,this.currentVersion=t.name||t.version||"",this.currentDetail={status:t.status||a.status||""},n&&n.length>0&&(this.versionList=n),this.showModelDetail=!0},handleRowDownload:function(e){var t=this,r=e.rowId;if(r){if(this.downloadingRowId!==r){var a=nt.DOWNLODE_MODEL||{},n=a.url,i=a.method,o=void 0===i?"get":i,s=a.headers,l=void 0===s?{}:s,c={url:n,method:o,params:{templateRowId:r,templateEmpty:!1},responseType:"blob",headers:l};if(c.url){"post"===(c.method||"").toLowerCase()&&(c.data=c.params,delete c.params);var u=e.templateName?"".concat(e.templateName).concat(e.version?" ".concat(e.version):"",".xlsx"):"文件下载.xlsx";this.downloadingRowId=r,this.$axios(c).then((function(e){var r=e.data;if(r){var a=e.headers&&(e.headers["content-type"]||e.headers["Content-Type"]);if(a&&a.includes("application/json"))try{var n=new FileReader;n.onload=function(){console.log("下载失败: ".concat(n.result))},n.readAsText(r)}catch(d){console.error("解析下载失败响应异常:",d)}else{var i=e.headers&&(e.headers["content-disposition"]||e.headers["Content-Disposition"]),o=u;if(i){var s=/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i.exec(i),l=s?s[1]||s[2]:"";if(l)try{o=decodeURIComponent(l)}catch(d){o=l}}var c=window.URL.createObjectURL(r),p=document.createElement("a");p.href=c,p.download=o,document.body.appendChild(p),p.click(),document.body.removeChild(p),window.URL.revokeObjectURL(c),t.$message({type:"success",message:"下载成功"}),console.log("下载开始,请查看浏览器下载列表")}}else console.log("下载失败,文件内容为空")})).catch((function(e){console.error("下载失败:",e),console.log("下载失败,请稍后重试")})).finally((function(){t.downloadingRowId=""}))}else console.log("未配置下载地址")}}else console.log("未找到模板ID,无法下载")},handleRowEdit:function(e){this.$refs.editModal.showModal(e,"edit",e.status)},currentChange:function(e){this.pagination.currentPage=e,this.loadData()},selectDataChange:function(e){this.$emit("select-data-change",e)},handleAddTemplate:function(){this.$refs.editModal.showModal(null,"add")},handleImportTemplate:function(){this.importing||(this.selectedImportFile=null,this.importFileList=[],this.importDialogVisible=!0)},handleImportFileChange:function(e,t){var r=[".xls",".xlsx",".csv"],a=["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv","application/vnd.ms-excel.sheet.macroEnabled.12"];if(e&&e.raw){var n=e.raw,i=n.name||"",o=i.substring(i.lastIndexOf(".")).toLowerCase(),s=n.type||"",l=r.some((function(e){return o===e})),c=!s||a.some((function(e){return s.includes(e)}));if(!l&&!c)return this.$message.error("文件类型不支持,仅支持 ".concat(r.join("、")," 格式的文件")),this.selectedImportFile=null,this.importFileList=[],!1;this.selectedImportFile=n,this.importFileList=t.slice(-1)}else this.selectedImportFile=null,this.importFileList=t.slice(-1)},handleImportFileRemove:function(){this.selectedImportFile=null,this.importFileList=[]},handleImportDialogClose:function(){this.importing||(this.importDialogVisible=!1,this.selectedImportFile=null,this.importFileList=[])},textDemo:function(){var e=Bt(Bt({},nt.TEXT_DEMO),{},{params:{pageNumber:1,pageSize:10},disableSuccessMsg:!0});this.$request(e).asyncThen((function(e){console.log(e,"resp")})).asyncErrorCatch((function(e){console.error("测试接口失败:",e)}))},handleImportConfirm:function(){var e=this;if(!this.importing&&this.selectedImportFile){var t=this.selectedImportFile,r=[".xls",".xlsx",".csv"],a=t.name||"",n=a.substring(a.lastIndexOf(".")).toLowerCase();if(!r.includes(n))return this.$message.error("文件类型不支持,仅支持 ".concat(r.join("、")," 格式的文件")),this.selectedImportFile=null,void(this.importFileList=[]);var i=new FormData;i.append("file",t),i.append("userId",pe()),i.append("createBy",pe());var o=Bt(Bt({},nt.IMPORT_MODEL),{},{params:i,disableSuccessMsg:!1});this.importing=!0;var s=this.$loading({lock:!0,text:"正在导入模板,请稍候...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});this.$upload(o,null,!1).then((function(t){console.log(t,"resp"),s.close(),e.importing=!1,setTimeout((function(){e.loadData()}),1e3)})).catch((function(t){if(console.log(t,"err"),s.close(),e.importing=!1,e.errorList="",t&&t.data&&t.data.errors&&Array.isArray(t.data.errors)){var r,a=jt(t.data.errors);try{for(a.s();!(r=a.n()).done;){var n=r.value;e.errorList+=n+"\n"}}catch(t){a.e(t)}finally{a.f()}}else e.errorList=t.message||"导入失败,请稍后重试";e.errorDialogVisible=!0})).finally((function(){s&&s.close(),e.importing=!1})),this.importDialogVisible=!1}else this.selectedImportFile||this.$message.warning("请先选择要导入的文件")},handleTemplateSubmit:function(e){var t=this,r=e.mode,a=e.formData,n=e.row;if(console.log(a,"formData"),"add"===r){var i=Bt(Bt({},nt.ADD_MODEL),{},{params:a,disableSuccessMsg:!0});this.$request(i).asyncThen((function(e){t.loadData(),t.$message({type:"success",message:"添加成功"})})).asyncErrorCatch((function(e){console.error("添加失败:",e)}))}else{var o=Bt(Bt({},nt.EDIT_MODEL),{},{params:Bt(Bt({},a),{},{templateRowId:n.rowId,orderNum:n.orderNum||""})});this.$request(o).asyncThen((function(e){t.loadData(),t.$message({type:"success",message:"修改成功"})})).asyncErrorCatch((function(e){console.error("修改失败:",e)}))}},resetSearch:function(){Object.assign(this.searchPanelValue,Wt()),this.handleSearch()},handleSearch:function(){this.pagination.currentPage=1,this.loadData()},handleRefresh:function(){this.pagination.currentPage=1,this.handleSearch()},loadData:function(){var e=this,t=Bt(Bt({},nt.GET_MODEL_LIST),{},{params:{pageNumber:this.pagination.currentPage,pageSize:this.pagination.pageSize,templateName:this.searchPanelValue.templateName},disableSuccessMsg:!0});this.$request(t,!1).asyncThen((function(t){e.tableData=t.data.result,console.log(t.data.count,"resp.data.count"),e.pagination.total=t.data.count})).asyncErrorCatch((function(e){console.error("查询失败:",e)}))},filterTemplateOptions:function(e){if(e&&""!==e.trim()){var t=e.toLowerCase().trim();this.filteredTemplateOptions=this.templateOptions.filter((function(e){return e.label&&e.label.toLowerCase().includes(t)}))}else this.filteredTemplateOptions=this.templateOptions},loadTemplateOptions:function(){var e=this;this.templateSelectLoading=!0;var t=Bt(Bt({},nt.GET_MODEL_LIST),{},{params:{pageNumber:1,pageSize:999},disableSuccessMsg:!0});this.$request(t,!1).asyncThen((function(t){var r=t.data.result||[],a=new Set,n=r.map((function(e){return e.templateName||e.po_name||""})).filter((function(e){return!(!e||a.has(e))&&(a.add(e),!0)})).map((function(e){return{label:e,value:e}}));e.templateOptions=n,e.filteredTemplateOptions=n,e.templateSelectLoading=!1})).asyncErrorCatch((function(t){console.error("加载模板列表失败:",t),e.templateOptions=[],e.filteredTemplateOptions=[],e.templateSelectLoading=!1}))},generateUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0,r="x"===e?t:3&t|8;return r.toString(16)}))}}},qt=Ht,Yt=(r("583b"),p(qt,Ee,Re,!1,null,null,null)),Xt=Yt.exports,Zt=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"apaas-custom-page-mydemo custom-page"},[e.showEngineDetail?e._e():[r("div",{staticClass:"page-header"},[r("div",{staticClass:"title"},[e._v(" 玉柴发动机数据 ")]),r("div",{staticClass:"operation"},[e.hasEngineDataEditPermission()?r("el-button",{attrs:{type:"primary"},on:{click:e.handleDownloadTemplate}},[e._v("下载模板")]):e._e(),e.hasEngineDataEditPermission()?r("el-button",{staticClass:"import-button",on:{click:e.handleImport}},[e._v(" 导入机型 ")]):e._e(),e.hasEngineDataEditPermission()?r("el-button",{staticClass:"add-button",attrs:{type:"primary"},on:{click:e.handleAdd}},[e._v(" 添加机型 ")]):e._e()],1)]),r("div",{staticClass:"page-search-panel"},[r("div",{staticClass:"searched-fields"},[r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("产品型号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.modelName,callback:function(t){e.$set(e.searchPanelValue,"modelName",t)},expression:"searchPanelValue.modelName"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("状态代号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.productNumber,callback:function(t){e.$set(e.searchPanelValue,"productNumber",t)},expression:"searchPanelValue.productNumber"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("板块")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.plate,callback:function(t){e.$set(e.searchPanelValue,"plate",t)},expression:"searchPanelValue.plate"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("平台")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.platform,callback:function(t){e.$set(e.searchPanelValue,"platform",t)},expression:"searchPanelValue.platform"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("系列")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.series,callback:function(t){e.$set(e.searchPanelValue,"series",t)},expression:"searchPanelValue.series"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("细分市场")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.marketSegment,callback:function(t){e.$set(e.searchPanelValue,"marketSegment",t)},expression:"searchPanelValue.marketSegment"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("项目名称")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.projectName,callback:function(t){e.$set(e.searchPanelValue,"projectName",t)},expression:"searchPanelValue.projectName"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("项目编号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.projectNumber,callback:function(t){e.$set(e.searchPanelValue,"projectNumber",t)},expression:"searchPanelValue.projectNumber"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("任务分发状态")]),r("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.searchPanelValue.distributeStatus,callback:function(t){e.$set(e.searchPanelValue,"distributeStatus",t)},expression:"searchPanelValue.distributeStatus"}},[r("el-option",{attrs:{label:"已分发",value:"已分发"}}),r("el-option",{attrs:{label:"部分分发",value:"部分分发"}}),r("el-option",{attrs:{label:"未分发",value:"未分发"}})],1)],1),r("div",{staticClass:"search-actions"},[r("el-button",{attrs:{type:"primary"},on:{click:e.handleSearch}},[e._v(" 查询 ")]),r("el-button",{on:{click:e.resetSearch}},[e._v(" 重置 ")])],1)])]),r("div",{staticClass:"page-data-list"},[r("x-vxe-table",{ref:"vxeTable",staticClass:"block-table",attrs:{border:!0,seqWidth:40,colConfigs:e.tableConfig.colConfigs,tableData:e.tableData,rowDraggable:e.tableConfig.rowDraggable,seqType:e.tableConfig.seqType,pagination:e.pagination,layout:e.tableConfig.layout,seqConfig:e.tableConfig.seqConfig,autoSize:e.tableConfig.autoSize,pageConfig:e.tableConfig.pageConfig},on:{"table-row-click":e.rowClickEvent,"size-change":e.pageSizeChange,"current-page-change":e.currentChange},scopedSlots:e._u([e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customHeadSlot,fn:function(n){var i=n.column;return[t.customHeadSlot?r("div",{key:a},[e._v(" "+e._s(i)+" "+e._s(t)+" ")]):e._e()]}}})),e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customSlot,fn:function(n){var i=n.row,o=n.rowIndex;return["options"===t.customSlot?r("div",{key:a+""+o},[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowDetail(i)}}},[e._v(" 查看 ")]),"已分发"!=i.distributeStatus&&e.hasEngineDataEditPermission()?r("span",{staticClass:"link-separator"}):e._e(),"已分发"!=i.distributeStatus&&e.hasEngineDataEditPermission()?r("a",{staticClass:"el-link el-link--primary",staticStyle:{"margin-left":"5px"},attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowDispatch(i,o)}}},[e._v(" 分发 ")]):e._e(),"未分发"===i.distributeStatus&&e.hasEngineDataEditPermission()&&1===i.versionNumber?r("span",{staticClass:"link-separator"}):e._e(),"未分发"===i.distributeStatus&&e.hasEngineDataEditPermission()&&1===i.versionNumber?r("a",{staticClass:"el-link el-link--primary",staticStyle:{"margin-left":"5px"},attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowDelete(i,o)}}},[e._v(" 删除 ")]):e._e()]):e._e(),"distributeStatus"===t.customSlot?r("div",{key:a+""+o},["已分发"===i[t.prop]?r("span",{staticClass:"status-tag status-done"},[e._v(" 已分发 ")]):"部分分发"===i[t.prop]?r("span",{staticClass:"status-tag status-partial"},[e._v(" 部分分发 ")]):"未分发"===i[t.prop]?r("span",{staticClass:"status-tag status-pending"},[e._v(" 未分发 ")]):e._e()]):e._e(),"versionNumber"===t.customSlot?r("div",{key:a+""+o},[e._v(" V"+e._s(i[t.prop]||"")+" ")]):e._e()]}}}))],null,!0)},[r("template",{slot:"empty"},[r("div",{staticClass:"table-empty"},[r("x-empty-page")],1)])],2)],1)],e.showEngineDetail?r("engine-detail",{staticClass:"engine-detail-wrapper",attrs:{model:e.currentModel,"engine-model-i-d":e.currentEngineModelID,"is-dispatch-mode":e.isDispatchMode,"dispatch-type":e.dispatchType,detail:e.currentEngineDetail},on:{back:e.handleBackFromDetail}}):e._e(),r("add-engine-model-modal",{ref:"addEngineModelModal",on:{success:e.handleAddSuccess}}),r("el-dialog",{attrs:{title:"导入机型",visible:e.importDialogVisible,width:"400px","append-to-body":""},on:{"update:visible":function(t){e.importDialogVisible=t},close:e.handleImportDialogClose}},[r("el-upload",{staticClass:"import-uploader",attrs:{drag:"","auto-upload":!1,limit:1,accept:".xls,.xlsx","file-list":e.importFileList,"on-change":e.handleImportFileChange,"on-remove":e.handleImportFileRemove}},[r("i",{staticClass:"el-icon-upload"}),r("div",{staticClass:"el-upload__text"},[e._v(" 将文件拖到此处,或"),r("em",[e._v("点击上传")])]),r("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v(" 仅支持Excel文件(.xlsx 或 .xls) ")])]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleImportDialogClose}},[e._v("取消")]),r("el-button",{attrs:{type:"primary",loading:e.importing},on:{click:e.handleImportConfirm}},[e._v(" 开始导入 ")])],1)],1)],2)},Kt=[],Jt=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"engine-detail-page custom-page"},[r("div",{staticClass:"page-header"},[r("div",{staticClass:"header-left"},[r("el-button",{staticClass:"back-button",attrs:{type:"text",icon:"el-icon-arrow-left"},on:{click:function(t){return t.stopPropagation(),e.handleBack.apply(null,arguments)}}},[e._v(" 返回 ")]),r("div",{staticClass:"header-item"},[r("span",{staticClass:"label"},[e._v("版本:")]),r("span",{staticClass:"value"},[e._v(e._s(e.currentVersionLabel))])])],1),e.isApprovalMode?e._e():r("div",{staticClass:"operation"},[e.isDispatchMode?[r("el-button",{attrs:{size:"small"},on:{click:e.handleBatchModifyResponsible}},[e._v(" "+e._s("update_param"===e.dispatchType?"批量修改填写人":"批量修改责任人")+" ")]),r("el-button",{attrs:{type:"primary",size:"small",loading:e.dispatchLoading},on:{click:e.handleConfirmDispatch}},[e._v("确认分发")])]:[e.isEditMode||e.isJustCheckMode?e._e():r("el-button",{staticStyle:{"margin-left":"12px"},attrs:{size:"small"},on:{click:e.handleExportTemplate}},[e._v("下载导入模板")]),e.isEditMode||e.isJustCheckMode?e._e():r("el-button",{attrs:{size:"small",disabled:e.importing,loading:e.importing},on:{click:e.handleImport}},[e._v("导入")]),r("input",{ref:"fileInput",staticStyle:{display:"none"},attrs:{type:"file",accept:".xlsx,.xls"},on:{change:e.handleFileChange}}),e.isEditMode||e.isJustCheckMode?e.isEditMode?[r("el-button",{attrs:{size:"small"},on:{click:e.handleSaveEdit}},[e._v("保存编辑")]),r("el-button",{attrs:{size:"small"},on:{click:e.handleCancelEdit}},[e._v("取消")])]:e._e():[r("el-button",{attrs:{size:"small"},on:{click:e.handleEdit}},[e._v("编辑")]),e.shouldShowResendButton?r("el-button",{attrs:{size:"small",loading:e.resending},on:{click:e.handleResend}},[e._v(" 直送 ")]):e._e(),r("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.handleInitiateApproval}},[e._v(" "+e._s(e.shouldShowResendButton?"重新发起":"发起审批")+" ")])]]],2)]),e.isApprovalMode?e._e():r("div",{staticClass:"detail-body"},[r("div",{staticClass:"left-tree-panel"},[r("div",{staticClass:"tree-search-header"},[r("el-radio-group",{staticClass:"search-mode-switch",attrs:{size:"mini"},model:{value:e.treeSearchMode,callback:function(t){e.treeSearchMode=t},expression:"treeSearchMode"}},[r("el-radio-button",{attrs:{label:"subsystem"}},[e._v("子系统")]),r("el-radio-button",{attrs:{label:"parts"}},[e._v("零部件名称")])],1)],1),r("el-input",{staticClass:"tree-search",attrs:{size:"small",placeholder:"subsystem"===e.treeSearchMode?"请输入子系统名称":"请输入零部件名称",clearable:""},model:{value:e.treeFilterText,callback:function(t){e.treeFilterText=t},expression:"treeFilterText"}}),r("el-tree",{ref:"paramTree",attrs:{data:e.treeData,"node-key":"id","show-checkbox":"","checked-keys":e.checkedKeys,"default-expanded-keys":e.defaultExpandedKeys,"expanded-keys":e.expandedKeys,props:{children:"children",label:"label"},"filter-node-method":e.filterTreeNode,draggable:!0,"allow-drop":e.allowDrop,"allow-drag":e.allowDrag},on:{check:e.handleTreeCheck,"node-drop":e.handleNodeDrop,"node-expand":e.handleNodeExpand,"node-collapse":e.handleNodeCollapse},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.data;return r("span",{staticClass:"custom-tree-node"},[r("span",[e._v(e._s(a.label))]),a.tip?r("span",{staticClass:"red-tip"},[e._v(e._s(a.tip))]):e._e()])}}],null,!1,2736833556)})],1),r("div",{staticClass:"right-content"},[e._l(e.wholeEngineParamsData,(function(t,a){return[e.isWholeEngineParamsSelected?r("div",{key:a,staticClass:"section"},[r("div",{staticClass:"section-title"},[e._v(e._s(a))]),r("div",{staticClass:"grid whole-engine-grid"},[e._m(0,!0),e._l(t,(function(t,n){return r("div",{key:a+"-"+n,staticClass:"grid-row whole-engine-row"},[r("div",{staticClass:"cell"},[e._v(e._s(t.parameterName))]),r("div",{staticClass:"cell"},[r("span",[e._v(e._s(t.unit||"-"))])]),r("div",{staticClass:"cell"},[r("span",[e._v(e._s(t.parameterValue||"/"))])])])}))],2)]):e._e()]})),e._l(e.display,(function(t,a){return[e.shouldShowSection(a)?r("div",{key:a,staticClass:"section"},[r("div",{staticClass:"section-title"},[e._v(e._s(e.formatSectionTitle(a,t)))]),r("div",{staticClass:"grid"},[r("div",{staticClass:"grid-header",class:{"edit-mode":e.isEditMode&&!e.isDispatchMode}},[r("div",{staticClass:"cell header-cell"},[e._v("参数名称")]),r("div",{staticClass:"cell header-cell"},[e._v("单位")]),r("div",{staticClass:"cell header-cell"},[e._v("参数值")]),!e.isEditMode||e.isDispatchMode?r("div",{staticClass:"cell header-cell"},[e._v("填写部门")]):e._e(),!e.isEditMode||e.isDispatchMode?r("div",{staticClass:"cell header-cell"},[e._v(" "+e._s(e.isDispatchMode&&"update_param"===e.dispatchType?"填写人":e.isDispatchMode?"责任人":"填写人")+" ")]):e._e()]),e._l(t,(function(t,n){return r("div",{key:a+"-"+n,staticClass:"grid-row",class:{"edit-mode":e.isEditMode&&!e.isDispatchMode}},[r("div",{staticClass:"cell"},[e._v(e._s(t.parameterName))]),r("div",{staticClass:"cell"},[r("span",[e._v(e._s(t.unit||"-"))])]),r("div",{staticClass:"cell"},[e.isEditMode&&!e.isDispatchMode?r("el-input",{staticClass:"param-input",attrs:{size:"small",placeholder:"请输入"},model:{value:t.parameterValue,callback:function(r){e.$set(t,"parameterValue",r)},expression:"row.parameterValue"}}):r("span",[e._v(e._s(t.minorVersion||t.parameterValue||"/"))])],1),!e.isEditMode||e.isDispatchMode?r("div",{staticClass:"cell"},[r("span",[e._v(e._s(e.formatDepartmentDisplay(t.department)))])]):e._e(),e.isDispatchMode&&"update_param"!==e.dispatchType?r("div",{staticClass:"cell"},[r("span",[e._v(e._s(t.owner||"-"))])]):e._e(),e.isDispatchMode&&"update_param"===e.dispatchType?r("div",{staticClass:"cell"},[r("el-select",{staticClass:"responsible-select",attrs:{size:"small",placeholder:"请输入填写人姓名进行搜索",clearable:"",filterable:"",remote:"","remote-method":function(r){return e.handleFillerRemoteSearch(r,t)},loading:e.fillerUserLoading},on:{change:function(r){return e.handleFillerChange(r,t)}},model:{value:t.filledByUserId,callback:function(r){e.$set(t,"filledByUserId",r)},expression:"row.filledByUserId"}},e._l(e.getFillerUserOptions(t),(function(t){return r("el-option",{key:t.userId,attrs:{value:t.userId,label:t.username}},[r("span",{staticClass:"username-text"},[e._v(e._s(t.username))]),r("span",{staticClass:"user-id-text"},[e._v(e._s(t.userNumber))])])})),1)],1):e._e(),e.isDispatchMode||e.isEditMode?e._e():r("div",{staticClass:"cell"},[r("span",[e._v(e._s(t.filledByName||t.filledBy||"-"))])])])}))],2)]):e._e()]}))],2)]),e.isApprovalMode?r("div",{staticClass:"page-approval-content"},[e.detail&&e.detail.flowId?r("section",{staticClass:"block-section"},[r("div",{staticClass:"section-title"},[e._v(" 基础信息 ")]),r("div",{staticClass:"info-grid"},[r("div",{staticClass:"info-item-full"},[r("span",{staticClass:"label"},[e._v("流程主题")]),r("span",{staticClass:"value"},[e._v(e._s(e.progressDetail.progressTitle||e.detail.processTitle||"--"))])]),r("div",{staticClass:"info-row"},[r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("创建人")]),r("span",{staticClass:"value"},[e._v(e._s(e.detail.createBy||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("创建时间")]),r("span",{staticClass:"value"},[e._v(e._s(e.formatTime(e.detail.createdTime||e.detail.createTime)||"--"))])])]),r("div",{staticClass:"info-row"},[r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("当前环节")]),r("span",{staticClass:"value"},[e._v(e._s(e.currentNode||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("当前处理人")]),r("span",{staticClass:"value"},[e._v(e._s(e.currentProcessor||"--"))])])])])]):e._e(),r("div",{staticClass:"approval-content"},[e.approvalChangeData&&e.approvalChangeData.length>0?r("div",{staticClass:"approval-change-table"},[r("div",{staticClass:"change-table-title"},[e._v(" 变更数据 ")]),r("div",{staticClass:"change-table-wrapper"},[r("table",{staticClass:"change-table-content"},[e._m(1),r("tbody",e._l(e.approvalChangeData,(function(t,a){return r("tr",{key:a,staticClass:"change-table-row"},[r("td",{staticClass:"col-engine-model-name"},[e._v(e._s(t.engineModelName||"-"))]),r("td",{staticClass:"col-subsystem-name"},[e._v(e._s(t.subsystemName||"-"))]),r("td",{staticClass:"col-parameter-type"},[e._v(e._s(("/"===t.partsName?t.subsystemName:t.partsName)||"-"))]),r("td",{staticClass:"col-parts-name"},[e._v(e._s(("/"===t.partsName?t.subsystemName:t.partsName)||"-"))]),r("td",{staticClass:"col-parameter-name"},[e._v(e._s(t.parameterName||"-"))]),r("td",{staticClass:"col-parameter-value"},[e._v(e._s(t.parameterValue||"-"))]),r("td",{staticClass:"col-common"},[e._v(e._s(t.changeComment||"-"))])])})),0)])])]):e._e(),r("div",{staticClass:"approval-description"},[r("div",{staticClass:"description-label"},[e._v(" 说明 ")]),r("el-input",{attrs:{type:"textarea",rows:2,placeholder:"请输入"},model:{value:e.approvalFormData.description,callback:function(t){e.$set(e.approvalFormData,"description",t)},expression:"approvalFormData.description"}})],1),r("div",{staticClass:"approval-workflow"},[r("div",{staticClass:"workflow-title"},[e._v(" 审批环节 ")]),r("div",{staticClass:"approval-process-title"},[e._m(2),r("el-input",{attrs:{maxlength:"100","show-word-limit":"",placeholder:"请输入流程主题"},model:{value:e.approvalFormData.processTitle,callback:function(t){e.$set(e.approvalFormData,"processTitle",t)},expression:"approvalFormData.processTitle"}})],1),r("div",{staticClass:"workflow-table"},[r("table",{staticClass:"workflow-table-content"},[e._m(3),r("tbody",e._l(e.approvalWorkflowSteps,(function(t,a){return r("tr",{key:a,staticClass:"workflow-row"},[r("td",{staticClass:"step-name-cell"},[r("span",{staticClass:"step-name"},[e._v(" "+e._s(t.name)+" "),t.required?r("span",{staticClass:"required-mark"},[e._v("*")]):e._e()])]),r("td",{staticClass:"handler-cell"},[r("el-select",{staticClass:"handler-select",attrs:{multiple:"",filterable:"",remote:"",placeholder:"请选择","remote-method":function(t){return e.handleRemoteSearch(t,a)},loading:t.loading},on:{change:function(t){return e.handleHandlerChange(a,t)}},model:{value:t.handlers,callback:function(r){e.$set(t,"handlers",r)},expression:"step.handlers"}},e._l(t.options,(function(t){return r("el-option",{key:t.userNumber,attrs:{value:t.userId,label:t.username}},[r("span",{staticClass:"username-text"},[e._v(e._s(t.username))]),r("span",{staticClass:"user-id-text"},[e._v(e._s(t.userNumber))])])})),1)],1)])})),0)])])])])]):e._e(),e.isApprovalMode?r("div",{staticClass:"page-footer"},[r("div",{staticClass:"footer-buttons"},[r("el-button",{on:{click:e.handleApprovalCancel}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.approvalSubmitting},on:{click:e.handleApprovalFormSubmit}},[e._v(" 确定 ")])],1)]):e._e(),r("batch-modify-responsible-modal",{ref:"batchModifyResponsibleModal",attrs:{"responsible-persons":e.responsiblePersons,"filler-persons":e.fillerPersons,"dispatch-type":e.dispatchType,"version-data":e.versionData,"current-version-id":e.currentVersionId},on:{confirm:e.handleBatchModifyConfirm,"refresh-responsible-persons":e.loadResponsiblePersons}})],1)},Qt=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"grid-header whole-engine-header"},[r("div",{staticClass:"cell header-cell"},[e._v("参数名称")]),r("div",{staticClass:"cell header-cell"},[e._v("单位")]),r("div",{staticClass:"cell header-cell"},[e._v("参数值")])])},function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("thead",[r("tr",[r("th",{staticClass:"col-engine-model-name"},[e._v("机型名称")]),r("th",{staticClass:"col-subsystem-name"},[e._v("子系统名称")]),r("th",{staticClass:"col-parameter-type"},[e._v("参数类型")]),r("th",{staticClass:"col-parts-name"},[e._v("零件名称")]),r("th",{staticClass:"col-parameter-name"},[e._v("参数名称")]),r("th",{staticClass:"col-parameter-value"},[e._v("参数值")]),r("th",{staticClass:"col-common"},[e._v("修改描述")])])])},function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"description-label workflow-title-label"},[e._v(" 流程主题 "),r("span",{staticClass:"required-mark"},[e._v("*")])])},function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("thead",[r("tr",[r("th",{staticClass:"step-name-col"},[e._v(" 环节名称 ")]),r("th",{staticClass:"handler-col"},[e._v(" 处理人 ")])])])}],er=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("x-modal",{attrs:{"append-to-body":!0,"destroy-on-close":!0,modalVisible:e.visible,"wrapper-class":"batch-modify-responsible-modal",title:e.modalTitle,width:680},on:{"update:modalVisible":function(t){e.visible=t},"update:modal-visible":function(t){e.visible=t}},scopedSlots:e._u([{key:"footer",fn:function(){return[r("div",{staticClass:"dialog-footer"},[r("el-button",{on:{click:e.closeModal}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.submitting},on:{click:e.handleSubmit}},[e._v(" 确定 ")])],1)]},proxy:!0}])},[r("div",{staticClass:"batch-modify-content"},[r("el-form",{ref:"form",attrs:{model:e.formData,rules:e.formRules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"子系统:",prop:"subsystem"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择子系统",clearable:""},on:{change:e.handleSubsystemChange},model:{value:e.formData.subsystem,callback:function(t){e.$set(e.formData,"subsystem",t)},expression:"formData.subsystem"}},e._l(e.subsystemList,(function(e){return r("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),"update_param"===e.dispatchType?r("el-form-item",{attrs:{label:"零部件名称:",prop:"partsName"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择零部件名称",clearable:"",multiple:"",disabled:!e.formData.subsystem},on:{change:e.handlePartsNameChange},model:{value:e.formData.partsName,callback:function(t){e.$set(e.formData,"partsName",t)},expression:"formData.partsName"}},e._l(e.availablePartsNames,(function(e){return r("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1):e._e(),r("el-form-item",{attrs:{label:"部门:",prop:"department"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择部门",clearable:"",disabled:"update_param"===e.dispatchType?!e.formData.subsystem||!e.formData.partsName||!Array.isArray(e.formData.partsName)||0===e.formData.partsName.length:!e.formData.subsystem},on:{change:e.handleDepartmentChange},model:{value:e.formData.department,callback:function(t){e.$set(e.formData,"department",t)},expression:"formData.department"}},e._l(e.availableDepartments,(function(t){return r("el-option",{key:t.department,attrs:{label:e.formatDepartmentDisplay(t.department),value:t.department}})})),1)],1),"update_param"!==e.dispatchType?r("el-form-item",{attrs:{label:"现责任人:"}},[r("el-input",{staticStyle:{width:"100%"},attrs:{disabled:"",placeholder:"暂无责任人",readonly:""},model:{value:e.formData.currentResponsibleName,callback:function(t){e.$set(e.formData,"currentResponsibleName",t)},expression:"formData.currentResponsibleName"}})],1):e._e(),r("el-form-item",{attrs:{label:"update_param"===e.dispatchType?"人员:":"责任人:",prop:"userId"}},[r("el-select",{staticClass:"handler-select",staticStyle:{width:"100%"},attrs:{placeholder:"update_param"===e.dispatchType?"请输入人员姓名进行搜索":"请输入责任人姓名进行搜索",clearable:"",disabled:!e.formData.department,filterable:"",remote:"","remote-method":e.handleRemoteSearch,loading:e.userLoading},on:{change:e.handleResponsibleChange},model:{value:e.formData.userId,callback:function(t){e.$set(e.formData,"userId",t)},expression:"formData.userId"}},e._l(e.userOptions,(function(t){return r("el-option",{key:t.userNumber,attrs:{value:t.userId,label:t.username}},[r("span",{staticClass:"username-text"},[e._v(e._s(t.username))]),r("span",{staticClass:"user-id-text"},[e._v(e._s(t.userNumber))])])})),1)],1)],1)],1)])],1)},tr=[];function rr(e){return rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rr(e)}function ar(e){return or(e)||ir(e)||lr(e)||nr()}function nr(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ir(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function or(e){if(Array.isArray(e))return cr(e)}function sr(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=lr(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function lr(e,t){if(e){if("string"===typeof e)return cr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cr(e,t):void 0}}function cr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function ur(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function pr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(r),!0).forEach((function(t){dr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ur(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function dr(e,t,r){return t=hr(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hr(e){var t=fr(e,"string");return"symbol"===rr(t)?t:String(t)}function fr(e,t){if("object"!==rr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==rr(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var mr={name:"BatchModifyResponsibleModal",props:{responsiblePersons:{type:Array,default:function(){return[]}},fillerPersons:{type:Array,default:function(){return[]}},dispatchType:{type:String,default:"todo"},versionData:{type:Object,default:function(){return{}}},currentVersionId:{type:String,default:""}},data:function(){return{visible:!1,submitting:!1,formData:{subsystem:"",partsName:[],department:"",currentResponsibleId:"",currentResponsibleName:"",currentFillerId:"",currentFillerName:"",userId:"",userNumber:"",username:"",rowId:""},subsystemList:[],availablePartsNames:[],availableDepartments:[],allManagerData:[],departmentTreeData:[],userOptions:[],userLoading:!1}},computed:{modalTitle:function(){return"update_param"===this.dispatchType?"批量修改填写人":"批量修改责任人"},formRules:function(){var e={subsystem:[{required:!0,message:"请选择子系统",trigger:"change"}],userId:[{required:!0,message:"update_param"===this.dispatchType?"请选择人员":"请选择责任人",trigger:"change"}],department:[{required:!0,message:"请选择部门",trigger:"change"}]};return"update_param"===this.dispatchType&&(e.partsName=[{required:!0,type:"array",min:1,message:"请至少选择一个零部件名称",trigger:"change"}]),e}},methods:{formatDepartmentDisplay:function(e){if(!e)return"平台部";var t=e.replace(/·/g,"-"),r=t.split("-").filter((function(e){return""!==e.trim()}));return r.length>0?r[r.length-1]:t},showModal:function(){var e=this;this.formData={subsystem:"",partsName:[],department:"",currentResponsibleId:"",currentResponsibleName:"",currentFillerId:"",currentFillerName:"",userId:"",userNumber:"",username:"",rowId:""},this.availablePartsNames=[],this.availableDepartments=[],this.userOptions=[],this.userLoading=!1,this.loadSubsystemList(),this.loadDepartmentTree(),"update_param"!==this.dispatchType&&this.loadAllManagerData(),this.visible=!0,this.$nextTick((function(){e.$refs.form&&e.$refs.form.clearValidate()}))},closeModal:function(){this.visible=!1,this.formData={subsystem:"",partsName:[],department:"",currentResponsibleId:"",currentResponsibleName:"",currentFillerId:"",currentFillerName:"",userId:"",userNumber:"",username:"",rowId:""},this.availablePartsNames=[],this.availableDepartments=[],this.userOptions=[],this.userLoading=!1},loadSubsystemList:function(){var e=this,t=pr(pr({},nt.GET_SUBSYSTEM_LIST),{},{disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){t&&t.data?e.subsystemList=t.data:e.subsystemList=[]})).asyncErrorCatch((function(t){console.error("加载子系统列表失败:",t),e.subsystemList=[]}))},loadAllManagerData:function(){var e=this,t=pr(pr({},nt.GET_MANAGER_DATA),{},{params:{pageNumber:1,pageSize:9999},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){t&&t.data?e.allManagerData=t.data.result||[]:e.allManagerData=[]})).asyncErrorCatch((function(t){console.error("加载责任人数据失败:",t),e.allManagerData=[]}))},handleSubsystemChange:function(e){var t=this;if(this.formData.partsName=[],this.formData.department="",this.formData.currentResponsibleId="",this.formData.currentResponsibleName="",this.formData.currentFillerId="",this.formData.currentFillerName="",this.formData.rowId="",this.formData.userId="",this.formData.userNumber="",this.formData.username="",this.availablePartsNames=[],this.availableDepartments=[],this.userOptions=[],e){var r=this.versionData[this.currentVersionId]||{},a=new Set,n=new Set;if(Object.keys(r).forEach((function(i){var o=r[i]||[];o.forEach((function(r){if(r.subsystemName===e){if("update_param"===t.dispatchType){var o=r.partsName||i;o&&a.add(o)}r.department&&n.add(r.department)}}))})),"update_param"===this.dispatchType){var i=Array.from(a).sort();i.includes("/")||i.unshift("/"),this.availablePartsNames=i,this.availableDepartments=[]}else this.availableDepartments=Array.from(n).map((function(e){return{department:e}}))}else this.availablePartsNames=[],this.availableDepartments=[]},handlePartsNameChange:function(e){this.formData.department="",this.formData.currentFillerId="",this.formData.currentFillerName="",this.formData.userId="",this.formData.userNumber="",this.formData.username="",this.availableDepartments=[],this.userOptions=[],e&&Array.isArray(e)&&e.length>0&&this.formData.subsystem&&this.filterDepartmentsByPartsName()},filterDepartmentsByPartsName:function(){var e=this;if(this.formData.subsystem&&this.formData.partsName&&Array.isArray(this.formData.partsName)&&0!==this.formData.partsName.length){var t=this.versionData[this.currentVersionId]||{},r=new Set;Object.keys(t).forEach((function(a){var n=t[a]||[];n.forEach((function(t){var n=t.partsName||a;t.subsystemName===e.formData.subsystem&&e.formData.partsName.includes(n)&&t.department&&r.add(t.department)}))})),this.availableDepartments=Array.from(r).map((function(e){return{department:e}}))}else this.availableDepartments=[]},handleDepartmentChange:function(e){var t=this;if(this.formData.currentResponsibleId="",this.formData.currentResponsibleName="",this.formData.rowId="",this.formData.userId="",this.formData.userNumber="",this.formData.username="",this.userOptions=[],"update_param"!==this.dispatchType&&e&&this.formData.subsystem){var r=this.allManagerData.find((function(r){var a=r.subsystem?r.subsystem.split(","):[];return a.includes(t.formData.subsystem)&&r.department===e}));r?(this.formData.currentResponsibleId=r.userId||r.userNumber||"",this.formData.currentResponsibleName=r.username||"",this.formData.rowId=r.rowId||""):(this.formData.currentResponsibleId="",this.formData.currentResponsibleName="",this.formData.rowId="")}},handleRemoteSearch:function(e){var t=this;if(this.formData.department)if(e&&""!==e.trim()){this.userLoading=!0;var r=e.trim(),a=pr(pr({},nt.GET_ALLUSERS),{},{params:{name:r},disableSuccessMsg:!0});this.$request(a).asyncThen((function(e){var r=e&&e.data,a=[];Array.isArray(r)?a=r:r&&Array.isArray(r.result)?a=r.result:r&&r.data&&Array.isArray(r.data)&&(a=r.data);var n=a.map((function(e){return{userId:e.userId||e.id,username:e.username||e.name,userNumber:e.userNumber||e.userId||e.id}})).filter((function(e){return e.userId&&e.userNumber})),i=t.formData.userId,o=t.userOptions.filter((function(e){return e.userId&&e.userId===i})),s=new Map;o.forEach((function(e){e.userNumber&&s.set(e.userNumber,e)})),n.forEach((function(e){e.userNumber&&!s.has(e.userNumber)&&s.set(e.userNumber,e)})),t.userOptions=Array.from(s.values()),t.userLoading=!1})).asyncErrorCatch((function(e){if(console.error("搜索责任人失败:",e),t.formData.userId){var r=t.userOptions.filter((function(e){return e.userId===t.formData.userId}));t.userOptions=r}else t.userOptions=[];t.userLoading=!1}))}else if(this.formData.userId){var n=this.userOptions.filter((function(e){return e.userId===t.formData.userId}));this.userOptions=n}else this.userOptions=[];else this.userOptions=[]},handleResponsibleChange:function(e){if(e){var t=this.userOptions.find((function(t){return t.userId===e}));t?(this.formData.userId=t.userId,this.formData.userNumber=t.userNumber||t.userId,this.formData.username=t.username||""):(console.warn("未找到选中的用户选项,userId:",e),this.formData.userId=e,this.formData.userNumber=e,this.formData.username="")}else this.formData.userId="",this.formData.userNumber="",this.formData.username=""},handleSubmit:function(){var e=this;this.$refs.form.validate((function(t){if(t){if(!e.formData.subsystem)return void e.$message.warning("请选择子系统");if(!e.formData.department)return void e.$message.warning("请选择部门");if(!e.formData.userId){var r="update_param"===e.dispatchType?"人员":"责任人";return void e.$message.warning("请选择".concat(r))}if("update_param"===e.dispatchType){if(!e.formData.partsName||!Array.isArray(e.formData.partsName)||0===e.formData.partsName.length)return void e.$message.warning("请至少选择一个零部件名称");var a={subsystem:e.formData.subsystem,partsName:e.formData.partsName,department:e.formData.department,userId:e.formData.userId,userNumber:e.formData.userNumber||e.formData.userId,username:e.formData.username||""};return console.log("批量修改填写人 - 提交数据:",a),e.submitting=!1,e.closeModal(),void e.$emit("confirm",a)}if(e.formData.currentResponsibleId&&e.formData.rowId){var n=pr(pr({},nt.EDIT_MANAGER_DATA),{},{params:{departmentId:e.getDepartmentIdByDepartment(e.formData.department),department:e.formData.department,subsystem:e.formData.subsystem,userId:e.formData.userId,rowId:e.formData.rowId},disableSuccessMsg:!0});e.$request(n).asyncThen((function(t){e.submitting=!1,e.closeModal(),e.$message({type:"success",message:"修改成功"}),e.$emit("refresh-responsible-persons"),e.$emit("confirm",{subsystem:e.formData.subsystem,department:e.formData.department,oldResponsiblePersonId:e.formData.currentResponsibleId,newResponsiblePersonId:e.formData.userNumber,userId:e.formData.userId})})).asyncErrorCatch((function(t){console.error("修改失败:",t),e.$message({type:"error",message:"修改失败,请重试"}),e.submitting=!1}))}else{var i=pr(pr({},nt.SAVE_MANAGER_DATA),{},{params:{departmentId:e.getDepartmentIdByDepartment(e.formData.department),department:e.formData.department,subsystem:e.formData.subsystem,userId:e.formData.userId},disableSuccessMsg:!0});e.$request(i).asyncThen((function(t){e.submitting=!1,e.closeModal(),e.$emit("refresh-responsible-persons"),e.$emit("confirm",{subsystem:e.formData.subsystem,department:e.formData.department,oldResponsiblePersonId:"",newResponsiblePersonId:e.formData.userNumber,userId:e.formData.userId})})).asyncErrorCatch((function(t){console.error("新增失败:",t),e.$message.error("新增失败,请重试"),e.submitting=!1}))}e.submitting=!1}}))},loadDepartmentTree:function(){var e=this,t=pr(pr({},nt.QUERY_ORG_TREE),{},{disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){var r=[];t&&t.data&&(r=t.data.result||t.data.data||t.data||[]),e.departmentTreeData=e.formatDepartmentTreeData(r)})).asyncErrorCatch((function(t){console.error("加载部门树失败:",t),e.departmentTreeData=[]}))},formatDepartmentTreeData:function(e){if(!Array.isArray(e))return[];var t=function e(t){var r={id:t.id,name:t.name||t.label||"",children:void 0};return t.children&&Array.isArray(t.children)&&t.children.length>0&&(r.children=t.children.map((function(t){return e(t)}))),r};return e.map((function(e){return t(e)}))},getDepartmentIdByDepartment:function(e){var t=this;if(!e||!this.departmentTreeData||0===this.departmentTreeData.length){if(this.allManagerData&&this.allManagerData.length>0){var r=this.allManagerData.find((function(t){return t.department===e}));return r&&r.departmentId||""}return""}var a=function e(r,a){var n,i=sr(r);try{for(i.s();!(n=i.n()).done;){var o=n.value,s=t.getDepartmentPathName(o.id);if(s===a||o.name===a)return o.id;if(o.children&&o.children.length>0){var l=e(o.children,a);if(l)return l}}}catch(c){i.e(c)}finally{i.f()}return null},n=a(this.departmentTreeData,e);if(n)return n;if(this.allManagerData&&this.allManagerData.length>0){var i=this.allManagerData.find((function(t){return t.department===e}));return i&&i.departmentId||""}return""},getDepartmentPathName:function(e){if(!e||!this.departmentTreeData||0===this.departmentTreeData.length)return"";var t=function e(t,r){var a,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=sr(t);try{for(i.s();!(a=i.n()).done;){var o=a.value,s=[].concat(ar(n),[o.name]);if(o.id===r)return s.join("-");if(o.children&&o.children.length>0){var l=e(o.children,r,s);if(l)return l}}}catch(c){i.e(c)}finally{i.f()}return null};return t(this.departmentTreeData,e)||""}}},gr=mr,vr=(r("5f15"),p(gr,er,tr,!1,null,null,null)),yr=vr.exports;function br(e){return br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},br(e)}function _r(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Sr(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function xr(e){return Cr(e)||Dr(e)||Sr(e)||wr()}function wr(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Sr(e,t){if(e){if("string"===typeof e)return Tr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Tr(e,t):void 0}}function Dr(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Cr(e){if(Array.isArray(e))return Tr(e)}function Tr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function Ir(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function Or(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ir(Object(r),!0).forEach((function(t){Mr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ir(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Mr(e,t,r){return t=Ar(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ar(e){var t=kr(e,"string");return"symbol"===br(t)?t:String(t)}function kr(e,t){if("object"!==br(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==br(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Pr={name:"EngineDetail",components:{BatchModifyResponsibleModal:yr},props:{model:{type:String,default:""},engineModelID:{type:String,default:""},canResend:{type:Boolean,default:!1},isDispatchMode:{type:Boolean,default:!1},dispatchType:{type:String,default:"todo"},responsiblePersonId:{type:String,default:""},filledBy:{type:String,default:""},lastUpdatedBy:{type:String,default:""},flowId:{type:String,default:""},fromTodo:{type:Boolean,default:!1},detail:{type:Object,default:function(){return{}}}},data:function(){return{isEditMode:!1,originalData:null,dispatchOriginalData:null,savedCheckedKeys:[],savedDefaultExpandedKeys:[],currentVersionId:"v3",treeFilterText:"",treeSearchMode:"subsystem",checkedKeys:[],expandedKeys:[],nodeMap:{},responsiblePersons:[],fillerPersons:[],fillerUserOptions:{},fillerUserLoading:!1,versions:[],treeData:[],defaultExpandedKeys:[],currentEngineModelID:"",versionData:{},changeData:[],importing:!1,isApprovalMode:!1,engineDetailInfo:null,wholeEngineParamsRawData:[],flowNodes:[],progressDetailData:{},approvalFormData:{processTitle:"",description:""},dispatchLoading:!1,approvalSubmitting:!1,approvalChangeData:[],resending:!1,isResendMode:!1,resendApprovalData:null,approvalWorkflowSteps:[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"会签",required:!1,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}]}},computed:{display:function(){var e=this.versionData[this.currentVersionId]||{};return console.log("data",e),e},currentVersionLabel:function(){var e=this,t=this.versions.find((function(t){return t.id===e.currentVersionId}));return t?t.label:"V1"},isJustCheckMode:function(){return"justCheck"===this.dispatchType},isWholeEngineParamsSelected:function(){var e=this;return!(!this.checkedKeys||0===this.checkedKeys.length)&&this.checkedKeys.some((function(t){var r=e.nodeMap[t];return r&&r.isWholeEngineParams&&"整车参数"===r.label}))},wholeEngineParamsData:function(){if(!this.wholeEngineParamsRawData||0===this.wholeEngineParamsRawData.length)return{};var e=this.wholeEngineParamsRawData.map((function(e){var t=e,r="-";if(e&&e.includes(":")){var a=e.split(":");t=a[0]||e,r=a[1]||"-"}else e&&(t=e,r="-");return{parameterName:t,partsName:"整车参数",parameterValue:r,unit:"-",department:"平台部",subsystemName:"整车参数"}}));return{"整车参数":e}},progressDetail:function(){return this.progressDetailData&&Object.keys(this.progressDetailData).length>0?{progressTitle:this.progressDetailData.progressTitle||"",contentName:this.progressDetailData.contentName||"",templateVersion:this.progressDetailData.templateVersion||"",explanation:this.progressDetailData.explanation||"",description:this.progressDetailData.explanation||this.progressDetailData.description||""}:{progressTitle:this.detail.processTitle||"",contentName:"",templateVersion:"",explanation:"",description:""}},currentNode:function(){if(this.flowNodes&&this.flowNodes.length>0){var e=this.flowNodes.find((function(e){return"待审批"===e.result||"APPROVING"===e.result}));if(e)return e.node||"--";var t=this.flowNodes[this.flowNodes.length-1];return t&&t.node||"--"}return"--"},currentProcessor:function(){if(this.flowNodes&&this.flowNodes.length>0){var e=this.flowNodes.find((function(e){return"待审批"===e.result||"APPROVING"===e.result}));if(e)return e.undoUserName||e.todoUserName||"--"}return"--"},shouldShowResendButton:function(){return!!(this.fromTodo&&this.detail&&(this.detail.flowId||this.flowId)&&this.canResend)||(this.canResend||!1)}},watch:{treeFilterText:function(e){this.$refs.paramTree&&this.$refs.paramTree.filter(e)},treeSearchMode:function(){this.$refs.paramTree&&this.treeFilterText&&this.$refs.paramTree.filter(this.treeFilterText)},isDispatchMode:function(e){e&&!this.dispatchOriginalData&&(this.dispatchOriginalData=JSON.parse(JSON.stringify(this.versionData))),e||(this.dispatchOriginalData=null)}},created:function(){var e;this.loadResponsiblePersons(),this.loadFillerPersons(),this.loadTreeData();var t=(null===(e=this.detail)||void 0===e?void 0:e.flowId)||this.flowId;t&&(console.log("flowId",t),this.canResendApproval())},methods:{getversions:function(){var e=this,t=Or(Or({},nt.GET_ENGINE_VERSIONS),{},{params:{modelId:this.currentEngineModelID},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){t&&t.data&&(e.versions=t.data)})).asyncErrorCatch((function(e){console.error("获取版本数据失败:",e)}))},loadUserSelfRole:function(){var e=Or(Or({},nt.GET_USER_SELF_ROLE),{},{params:{userOrDepID:pe()},disableSuccessMsg:!0});this.$request(e).asyncThen((function(e){if(e&&e.data)try{localStorage.setItem("user_self_role",JSON.stringify(e.data))}catch(t){console.error("存储权限数据到 localStorage 失败:",t)}})).asyncErrorCatch((function(e){console.error("获取用户自身角色失败:",e)}))},checkPermission:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"查看";try{var a=localStorage.getItem("user_self_role");if(!a)return!1;var n=JSON.parse(a);if(!Array.isArray(n))return!1;var i=n.filter((function(a){var n=a.menuPath&&e&&(a.menuPath.includes(e)||e.includes(a.menuPath));return!!n&&((!t||a.subsystem===t)&&a.parameterPer===r)}));return i.length>0}catch(o){return console.error("检查权限失败:",o),!1}},getMenuPath:function(){return"玉柴发动机数据"},hasViewPermission:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.getMenuPath();return this.checkPermission(t,e,"查看")},hasEditPermission:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.getMenuPath();return this.checkPermission(t,e,"编辑")},hasParameterEditPermission:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)return!1;try{var r=localStorage.getItem("user_self_role");if(!r)return!1;var a=JSON.parse(r);if(!Array.isArray(a))return!1;var n=this.getMenuPath(),i=a.filter((function(r){var a=r.menuPath&&(r.menuPath.includes(n)||n.includes(r.menuPath));return!!a&&((!t||r.subsystem===t)&&(r.parameterName===e&&"编辑"===r.parameterPer))}));return i.length>0}catch(o){return console.error("检查参数权限失败:",o),!1}},hasAnyViewPermission:function(){try{var e=localStorage.getItem("user_self_role");if(!e)return!1;var t=JSON.parse(e);if(!Array.isArray(t))return!1;var r=this.getMenuPath(),a=t.filter((function(e){var t=e.menuPath&&(e.menuPath.includes(r)||r.includes(e.menuPath));return t&&"查看"===e.parameterPer}));return a.length>0}catch(n){return console.error("检查查看权限失败:",n),!1}},hasAnyEditPermission:function(){try{var e=localStorage.getItem("user_self_role");if(!e)return!1;var t=JSON.parse(e);if(!Array.isArray(t))return!1;var r=this.getMenuPath(),a=t.filter((function(e){var t=e.menuPath&&(e.menuPath.includes(r)||r.includes(e.menuPath));return t&&"编辑"===e.parameterPer}));return a.length>0}catch(n){return console.error("检查编辑权限失败:",n),!1}},loadResponsiblePersons:function(){var e=this,t=Or(Or({},nt.GET_MANAGER_DATA),{},{params:{pageNumber:1,pageSize:9999},disableSuccessMsg:!0});return this.$request(t).asyncThen((function(t){if(t&&t.data){var r=t.data.result||[];e.responsiblePersons=r.map((function(e){return{id:e.userId||e.id,userId:e.userId||e.userNumber||"",userNumber:e.userNumber||e.userId||"",userName:e.username||"",department:e.department||"",subsystem:e.subsystem||""}}))}else e.responsiblePersons=[]})).asyncErrorCatch((function(t){console.error("加载责任人列表失败:",t),e.responsiblePersons=[]}))},loadFillerPersons:function(){var e=this,t=Or(Or({},nt.GET_FILLER_DATA),{},{params:{pageNumber:1,pageSize:9999},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){if(t&&t.data){var r=t.data.result||[];e.fillerPersons=r.map((function(e){return{id:e.userId||e.userNumber||"",userId:e.userId||e.userNumber||"",userNumber:e.userNumber||e.userId||"",userName:e.username||"",department:e.department||"",subsystem:e.subsystem||""}}))}else e.fillerPersons=[]})).asyncErrorCatch((function(t){console.error("加载填写人列表失败:",t),e.fillerPersons=[]}))},getFilteredResponsiblePersons:function(e,t){return e||t?this.responsiblePersons.filter((function(r){if(e&&r.department!==e)return!1;if(t){var a=r.subsystem?r.subsystem.split(","):[];if(!a.includes(t))return!1}return!0})):this.responsiblePersons},getFilteredFillerPersons:function(e,t){return e||t?this.fillerPersons.filter((function(r){if(e&&r.department!==e)return!1;if(t){var a=r.subsystem?r.subsystem.split(","):[];if(!a.includes(t))return!1}return!0})):this.fillerPersons},getFillerUserOptions:function(e){var t=e.id||"".concat(e.subsystemName,"-").concat(e.parameterName);return this.fillerUserOptions[t]||[]},handleFillerRemoteSearch:function(e,t){var r=this,a=t.id||"".concat(t.subsystemName,"-").concat(t.parameterName);if(e&&""!==e.trim()){this.fillerUserLoading=!0;var n=e.trim(),i=Or(Or({},nt.GET_ALLUSERS),{},{params:{name:n},disableSuccessMsg:!0});this.$request(i).asyncThen((function(e){var n=e&&e.data,i=[];Array.isArray(n)?i=n:n&&Array.isArray(n.result)?i=n.result:n&&n.data&&Array.isArray(n.data)&&(i=n.data);var o=i.map((function(e){return{userId:e.userId||e.id,username:e.username||e.name,userNumber:e.userNumber||e.userId||e.id}})).filter((function(e){return e.userId&&e.userNumber})),s=t.filledByUserId,l=(r.fillerUserOptions[a]||[]).filter((function(e){return e.userId&&e.userId===s})),c=new Map;l.forEach((function(e){e.userNumber&&c.set(e.userNumber,e)})),o.forEach((function(e){e.userNumber&&!c.has(e.userNumber)&&c.set(e.userNumber,e)})),r.$set(r.fillerUserOptions,a,Array.from(c.values())),r.fillerUserLoading=!1})).asyncErrorCatch((function(e){if(console.error("搜索填写人失败:",e),t.filledByUserId){var n=(r.fillerUserOptions[a]||[]).filter((function(e){return e.userId===t.filledByUserId}));r.$set(r.fillerUserOptions,a,n)}else r.$set(r.fillerUserOptions,a,[]);r.fillerUserLoading=!1}))}else if(t.filledByUserId){var o=(this.fillerUserOptions[a]||[]).filter((function(e){return e.userId===t.filledByUserId}));this.$set(this.fillerUserOptions,a,o)}else this.$set(this.fillerUserOptions,a,[])},handleFillerChange:function(e,t){e?t.filledBy=e:(t.filledBy="",t.filledByUserId="")},getFilteredPersonsByDepartment:function(e){return e?this.responsiblePersons.filter((function(t){return t.department===e})):this.responsiblePersons},getPersonNameById:function(e){if(!e)return"";var t=this.responsiblePersons.find((function(t){return t.id===e}));return t?t.userName:(t=this.fillerPersons.find((function(t){return t.id===e})),t?t.userName:"")},handleBack:function(){this.isApprovalMode?this.handleApprovalCancel():(console.log("handleBack called"),this.$emit("back"))},formatTime:function(e){if(!e)return"--";if("number"===typeof e){var t=new Date(e);return t.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return e},onVersionChange:function(){this.isEditMode&&this.handleCancelEdit()},onVersionStatusChange:function(e,t,r){console.log("Version changed:",e,t,r)},filterTreeNode:function(e,t){var r=this;if(!e)return!0;var a=e.toLowerCase(),n=this.nodeMap[t.id];if(!n)return(t.label||"").toLowerCase().includes(a);var i=(t.label||"").toLowerCase(),o=null===n.parentLabel,s=null!==n.parentLabel&&!0===n.isParent,l=null!==n.parentLabel&&!1===n.isParent;if("subsystem"===this.treeSearchMode){if(s){if(i.includes(a))return!0}else if(l){var c=Object.values(this.nodeMap).find((function(e){return e.label===n.parentLabel&&!0===e.isParent}));if(c){var u=(c.label||"").toLowerCase();if(u.includes(a))return!0}}else if(o)return!0;return!1}if(l)return i.includes(a);if(s){if(t.children&&Array.isArray(t.children))return t.children.some((function(e){var t=(e.label||"").toLowerCase();return t.includes(a)}))}else if(o){var p=function e(t){return!(!t.children||!Array.isArray(t.children))&&t.children.some((function(t){var n=r.nodeMap[t.id];if(n&&null!==n.parentLabel&&!1===n.isParent){var i=(t.label||"").toLowerCase();if(i.includes(a))return!0}else if(n&&null!==n.parentLabel&&!0===n.isParent)return e(t);return!1}))};return p(t)}return!1},handleTreeCheck:function(e,t){this.checkedKeys=t.checkedKeys,this.loadEngineDetail()},allowDrag:function(e){var t=this.nodeMap[e.data.id];return!!t&&(t.isParent&&!t.isWholeEngineParams&&null!==t.parentLabel)},allowDrop:function(e,t,r){var a=this.nodeMap[e.data.id],n=this.nodeMap[t.data.id];if(!a||!n)return!1;var i=a.isParent&&!a.isWholeEngineParams&&null!==a.parentLabel,o=n.isParent&&!n.isWholeEngineParams&&null!==n.parentLabel,s=null===n.parentLabel&&n.isParent;return"prev"===r||"next"===r?i&&o:"inner"===r&&(i&&s)},handleNodeDrop:function(e,t,r,a){var n=this,i=this.treeData.find((function(t){var r;return t.id===e.data.id||(null===(r=n.nodeMap[e.data.id])||void 0===r?void 0:r.parentLabel)===t.label}));if(i)this.handleSubsystemReorder(i,e,t,r);else if(this.treeData.length>0){var o=this.treeData[0];this.handleSubsystemReorder(o,e,t,r)}},handleSubsystemReorder:function(e,t,r,a){var n=this;if(e&&e.children){var i=e.children||[],o=i.find((function(e){return n.nodeMap[e.id]&&n.nodeMap[e.id].isWholeEngineParams})),s=i.filter((function(e){return!n.nodeMap[e.id]||!n.nodeMap[e.id].isWholeEngineParams})),l=t.data.id,c=r.data.id,u=s.findIndex((function(e){return e.id===l})),p=s.findIndex((function(e){return e.id===c}));if(-1!==u&&-1!==p){var d=s.splice(u,1)[0],h=p;"prev"===a?h=p:"next"===a?h=p+1:"inner"===a&&(h=p),u<p&&(h-=1),s.splice(h,0,d);var f=o?[o].concat(xr(s)):s;e.children=f,this.$forceUpdate()}}},shouldShowSection:function(e){var t=this;if(this.isWholeEngineParamsSelected){var r=this.checkedKeys.some((function(e){var r=t.nodeMap[e];return r&&!r.isWholeEngineParams}));if(!r)return!1}var a=this.versionData[this.currentVersionId]||{};if(!a[e]||0===a[e].length)return!1;var n=!1;return this.checkedKeys.forEach((function(r){var i=t.nodeMap[r];if(i){if(i.isWholeEngineParams)return;if(i.isParent||i.label!==e||(n=!0),i.isParent){var o=a[e]||[],s=o.some((function(e){return e.subsystemName===i.label}));s&&(n=!0)}}})),n},handleEdit:function(){var e=this;this.originalData=JSON.parse(JSON.stringify(this.versionData)),this.savedCheckedKeys=xr(this.checkedKeys),this.savedDefaultExpandedKeys=xr(this.defaultExpandedKeys),this.changeData=[];var t=this.versionData[this.currentVersionId]||{};Object.keys(t).forEach((function(r){var a=t[r]||[];a.forEach((function(t){t.parameterValue&&""!==t.parameterValue||!t.minorVersion||e.$set(t,"parameterValue",t.minorVersion)}))})),this.isEditMode=!0},handleSaveEdit:function(){var e=this;if(this.changeData=[],this.originalData){var t=this.versionData[this.currentVersionId]||{},r=this.originalData[this.currentVersionId]||{};if(Object.keys(t).forEach((function(a){var n=t[a]||[],i=r[a]||[],o=new Map;i.forEach((function(e){var t=e.id||"".concat(e.parameterName,"_").concat(e.subsystemName);o.set(t,e)})),n.forEach((function(t){var r=t.id||"".concat(t.parameterName,"_").concat(t.subsystemName),a=o.get(r);if(a){var n=t.parameterValue||"",i=a.parameterValue||"";n!==i&&e.changeData.push({id:t.id,parameterId:t.parameterId,engineModelId:t.engineModelId,parameterValue:n,operation:"UPDATE",parameterName:t.parameterName,partsName:t.partsName,subsystemName:t.subsystemName,department:t.department,unit:t.unit,majorVersion:t.majorVersion,minorVersion:t.minorVersion,versionStatus:t.versionStatus})}else e.changeData.push({id:t.id,parameterId:t.parameterId,engineModelId:t.engineModelId,parameterValue:t.parameterValue||"",parameterName:t.parameterName,partsName:t.partsName,subsystemName:t.subsystemName,department:t.department,unit:t.unit,majorVersion:t.majorVersion,minorVersion:t.minorVersion,versionStatus:t.versionStatus})}))})),0===this.changeData.length)return this.$message.info("没有数据被修改"),this.isEditMode=!1,void(this.originalData=null);console.log("修改的数据项:",this.changeData);var a,n=_r(this.changeData);try{for(n.s();!(a=n.n()).done;){var i=a.value;i.operation="UPDATE"}}catch(c){n.e(c)}finally{n.f()}var o=nt.UPDATE_PARAM,s=o.url+pe(),l=Or(Or({},o),{},{url:s,params:this.changeData,disableSuccessMsg:!0});this.$request(l).asyncThen((function(t){var r=xr(e.savedCheckedKeys),a=xr(e.savedDefaultExpandedKeys);e.isEditMode=!1,e.originalData=null,e.changeData=[],e.loadEngineDetail(),e.$message({type:"success",message:"保存成功"}),e.$nextTick((function(){e.checkedKeys=r,e.defaultExpandedKeys=a,e.$refs.paramTree&&(e.$refs.paramTree.setCheckedKeys(r),e.expandedKeys=xr(a))}))})).asyncErrorCatch((function(t){console.error("保存失败:",t),e.$message({type:"error",message:"保存失败"})}))}else this.$message({type:"warning",message:"没有原始数据,无法比较"})},handleCancelEdit:function(){this.originalData&&(this.versionData=JSON.parse(JSON.stringify(this.originalData))),this.isEditMode=!1,this.originalData=null,this.changeData=[]},handleBatchModifyResponsible:function(){this.$refs.batchModifyResponsibleModal.showModal()},handleBatchModifyConfirm:function(e){var t=this;if(e){if("update_param"===this.dispatchType){var r=e.subsystem,a=e.partsName,n=e.department,i=e.userId,o=e.userNumber,s=e.username;if(console.log(e,"change",r,a,n,i,o,s),!r||!a||!Array.isArray(a)||0===a.length||!n||!i)return void this.$message({type:"warning",message:"缺少必要参数"});var l=this.versionData[this.currentVersionId]||{},c=0,u={userId:i,username:s||"",userNumber:o||i};return Object.keys(l).forEach((function(e){var p=l[e]||[];p.forEach((function(p,d){var h=p.partsName||e;if(p.subsystemName===r&&a.includes(h)&&p.department===n){p.filledBy=i,p.filledByUserId=i,t.$set(l[e],d,p);var f=p.id||"".concat(p.subsystemName,"-").concat(p.parameterName);t.fillerUserOptions[f]||t.$set(t.fillerUserOptions,f,[]);var m=t.fillerUserOptions[f].find((function(e){return e.userId===i||e.userNumber===o}));m?(m.userId=i,m.userNumber=o||i,m.username=s||m.username||""):t.fillerUserOptions[f].push(u),c++}}))})),this.$nextTick((function(){t.$forceUpdate()})),void(c>0||this.$message.warning("未找到匹配的参数"))}this.loadResponsiblePersons().then((function(){var e=xr(t.checkedKeys);t.loadEngineDetail(),t.$nextTick((function(){t.checkedKeys=e,t.$refs.paramTree&&e.length>0&&t.$refs.paramTree.setCheckedKeys(e)}))}))}},handleConfirmDispatch:function(){var e=this;this.dispatchLoading=!0;var t=[],r=this.versionData[this.currentVersionId]||{},a="update_param"===this.dispatchType;if(Object.keys(r).forEach((function(e){var n=r[e]||[];n.forEach((function(e){var r=!1,n="";if(a?(n=e.filledBy||"",n&&(r=!0)):(n=e.resPersonId||"",n&&(r=!0)),r){var i={id:e.id,parameterId:e.parameterId,engineModelId:e.engineModelId,parameterValue:e.parameterValue||"",parameterName:e.parameterName,partsName:e.partsName,subsystemName:e.subsystemName,department:e.department,unit:e.unit,majorVersion:e.majorVersion,minorVersion:e.minorVersion,versionStatus:e.versionStatus,operation:"UPDATE"};a?i.filledBy=n:(i.resPersonId=n,i.filledBy=""),t.push(i)}}))})),0!==t.length){var n;n="update_param"===this.dispatchType?nt.HANDLE_RESPONSIBLE_DISPATCH:"responsible"===this.dispatchType?nt.UPDATE_PARAM:nt.HANDLE_TODO_DISPATCH;var i=n.url+pe();console.log(this.dispatchType,"this.dispatchType",i,111111);var o=Or(Or({},n),{},{url:i,params:t,disableSuccessMsg:!0});this.$request(o).asyncThen((function(t){e.$message({type:"success",message:"分发成功"}),e.dispatchLoading=!1,e.handleBack()})).asyncErrorCatch((function(t){console.error("分发失败:",t),e.dispatchLoading=!1,e.$message({type:"error",message:t.message||"分发失败"})})).finally((function(){e.dispatchLoading=!1}))}else{var s=a?"填写人":"责任人";this.$message({type:"warning",message:"没有".concat(s,"的数据需要分发")})}},loadEngineDetailInfo:function(){var e=this;console.log(this.detail,"this.detail",this.detail.id);var t=Or(Or({},nt.GET_ENGINE_TABLE_DETAIL),{},{params:{modelID:this.detail.id},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){t&&t.data&&(e.engineDetailInfo=t.data)})).asyncErrorCatch((function(t){console.error("获取机型详情失败:",t),e.$message({type:"error",message:"获取机型详情失败"})}))},loadTreeData:function(){var e=this;if(this.detail&&this.detail.id){var t=Or(Or({},nt.GET_ENGINE_TABLE_DETAIL),{},{params:{modelID:this.detail.id},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){if(t&&t.data){var r=t.data;e.saveWholeEngineParamsData(r),e.treeData=e.convertThreeLevelTree(r);var a=e.getFirstLevelNodeKeys(e.treeData),n=e.getSecondLevelNodeKeys(e.treeData),i=xr(new Set([].concat(xr(a),xr(n)))),o=0===e.expandedKeys.length;o?(e.defaultExpandedKeys=i,e.expandedKeys=xr(i)):e.defaultExpandedKeys=a;var s=e.getAllNodeKeys(e.treeData);e.checkedKeys=s,e.$nextTick((function(){e.$refs.paramTree&&s.length>0&&e.$refs.paramTree.setCheckedKeys(s),o&&e.$nextTick((function(){if(e.$refs.paramTree&&e.$refs.paramTree.store){var t=e.$refs.paramTree.store._getAllNodes();t.forEach((function(t){var r=e.expandedKeys.includes(t.id);r&&!t.expanded?t.expand():!r&&t.expanded&&t.collapse()}))}})),e.detail&&e.detail.id&&s.length>0&&e.loadEngineDetail()}))}})).asyncErrorCatch((function(t){console.error("获取参数列表失败:",t),e.$message({type:"error",message:"获取参数列表失败"})}))}else console.warn("缺少 detail.id,无法加载树数据")},saveWholeEngineParamsData:function(e){var t=this;this.wholeEngineParamsRawData=[],Object.keys(e).forEach((function(r){var a=e[r];"object"!==br(a)||Array.isArray(a)||a["整车参数"]&&Array.isArray(a["整车参数"])&&(t.wholeEngineParamsRawData=a["整车参数"].filter((function(e){return e&&"/"!==e})))}))},convertThreeLevelTree:function(e){var t=this,r=[];return this.nodeMap={},Object.keys(e).forEach((function(a,n){var i="first-".concat(n),o={id:i,label:a,tip:"",children:[]};t.nodeMap[i]={label:a,parentLabel:null,isParent:!0};var s=e[a];"object"!==br(s)||Array.isArray(s)||Object.keys(s).forEach((function(e,r){var n="".concat(i,"-").concat(r),l="整车参数"===e,c=s[e]||[],u=[];if(!l&&Array.isArray(c)){var p=new Set;c.forEach((function(r,a){if(r&&"/"!==r&&!p.has(r)){p.add(r);var i="".concat(n,"-").concat(a);u.push({id:i,label:r,tip:""}),t.nodeMap[i]={label:r,parentLabel:e,isParent:!1}}}))}var d={id:n,label:e,tip:"",children:u};o.children.push(d),t.nodeMap[n]={label:e,parentLabel:a,isParent:!0,isWholeEngineParams:l}})),r.push(o)})),r},addRootLevelToTree:function(e){var t=this,r=this.getRootLabel(),a="root-level",n="whole-engine-params",i={id:n,label:"整机参数",tip:"",children:[]},o={id:a,label:r,tip:"",children:[i].concat(xr(e))};return this.nodeMap[a]={label:r,parentLabel:null,isParent:!0},this.nodeMap[n]={label:"整机参数",parentLabel:r,isParent:!1,isWholeEngineParams:!0},e.forEach((function(e){var a=e.id;t.nodeMap[a]&&(t.nodeMap[a].parentLabel=r),e.children&&e.children.length>0&&t.updateChildrenParentLabel(e.children,e.label)})),[o]},updateChildrenParentLabel:function(e,t){var r=this;e.forEach((function(e){r.nodeMap[e.id]&&(r.nodeMap[e.id].parentLabel=t),e.children&&e.children.length>0&&r.updateChildrenParentLabel(e.children,e.label)}))},getRootLabel:function(){if(this.treeData&&this.treeData.length>0)return this.treeData[0].label||"";if(this.engineDetailInfo){var e=this.engineDetailInfo.modelName||"",t=this.engineDetailInfo.projectNumber||"";if(e&&t)return"".concat(e,"-").concat(t);if(e)return e}return this.model?this.model:"机型详情"},convertObjectToTree:function(e){var t=this,r=[];return this.nodeMap={},Object.keys(e).forEach((function(a,n){var i="parent-".concat(n),o=[],s=new Set;t.nodeMap[i]={label:a,parentLabel:null,isParent:!0},Array.isArray(e[a])&&e[a].forEach((function(e,r){if(!s.has(e)){s.add(e);var n="".concat(i,"-").concat(r);o.push({id:n,label:e,tip:""}),t.nodeMap[n]={label:e,parentLabel:a,isParent:!1}}})),r.push({id:i,label:a,tip:"",children:o})})),r},formatTreeData:function(e){var t=this;return e.map((function(e,r){var a={id:e.id||e.key||"node-".concat(r),label:e.label||e.name||e.title||"",tip:e.tip||""};if(e.children&&e.children.length>0){var n=new Set,i=[];e.children.forEach((function(e){var t=e.label||e.name||e.title||"";n.has(t)||(n.add(t),i.push(e))})),a.children=t.formatTreeData(i)}return a}))},getAllNodeKeys:function(e){var t=this,r=[];return e.forEach((function(e){r.push(e.id),e.children&&e.children.length>0&&(r=r.concat(t.getAllNodeKeys(e.children)))})),r},getFirstLevelNodeKeys:function(e){var t=this,r=[];return e.forEach((function(e){var a=t.nodeMap[e.id];a&&null===a.parentLabel&&r.push(e.id)})),r},getSecondLevelNodeKeys:function(e){var t=this,r=[],a=function e(a){a.forEach((function(a){var n=t.nodeMap[a.id];n&&null!==n.parentLabel&&!0===n.isParent&&r.push(a.id),a.children&&a.children.length>0&&e(a.children)}))};return a(e),r},handleNodeExpand:function(e,t){this.expandedKeys.includes(e.id)||this.expandedKeys.push(e.id)},handleNodeCollapse:function(e,t){var r=this.expandedKeys.indexOf(e.id);r>-1&&this.expandedKeys.splice(r,1)},handleExpandAllSecondLevel:function(){var e=this,t=this.getFirstLevelNodeKeys(this.treeData),r=this.getSecondLevelNodeKeys(this.treeData),a=xr(new Set([].concat(xr(t),xr(r))));this.expandedKeys=xr(a),this.$nextTick((function(){if(e.$refs.paramTree)if("function"!==typeof e.$refs.paramTree.setExpandedKeys){if(console.warn("setExpandedKeys 方法不存在,尝试使用 store 方式"),e.$refs.paramTree.store){var t=e.$refs.paramTree.store._getAllNodes();t.forEach((function(t){var r=e.nodeMap[t.id];r&&(null===r.parentLabel||null!==r.parentLabel&&!0===r.isParent)&&a.includes(t.id)&&!t.expanded&&t.expand()}))}}else e.$refs.paramTree.setExpandedKeys(a);else console.warn("$refs.paramTree 不存在,无法展开节点")}))},handleCollapseAllSecondLevel:function(){var e=this,t=this.getFirstLevelNodeKeys(this.treeData);this.expandedKeys=xr(t),this.$nextTick((function(){if(e.$refs.paramTree)if("function"!==typeof e.$refs.paramTree.setExpandedKeys){if(console.warn("setExpandedKeys 方法不存在,尝试使用 store 方式"),e.$refs.paramTree.store){var r=e.$refs.paramTree.store._getAllNodes();r.forEach((function(t){var r=e.nodeMap[t.id];r&&null!==r.parentLabel&&!0===r.isParent&&t.expanded&&t.collapse()}))}}else e.$refs.paramTree.setExpandedKeys(t);else console.warn("$refs.paramTree 不存在,无法收起节点")}))},getSelectedSubsystemsAndTypes:function(){var e=this,t=[],r=[],a=[],n=new Set,i=new Set;return this.checkedKeys.forEach((function(o){var s=e.nodeMap[o];if(s&&null!==s.parentLabel&&!s.isWholeEngineParams)if(s.isParent){if(s.isWholeEngineParams)return;n.has(s.label)||(t.push(s.label),n.add(s.label));var l="".concat(s.label,"-/");i.has(l)||(a.push(l),i.add(l))}else{if("整车参数"===s.parentLabel)return;if(s.parentLabel&&!n.has(s.parentLabel)&&(t.push(s.parentLabel),n.add(s.parentLabel)),s.label){var c=s.label;if(c.includes(":")&&(c=c.split(":")[0]),r.push(c),s.parentLabel){var u="".concat(s.parentLabel,"-").concat(c);i.has(u)||(a.push(u),i.add(u))}}}})),{subsystemNames:t,parameterTypes:r,subsystemTypes:a}},handleExportTemplate:function(){var e=this,t={url:nt.EXPORT_TEMPLATE.url,method:nt.EXPORT_TEMPLATE.method,params:{engineModelID:this.detail.id,userId:pe()},responseType:"blob"};this.$axios(t).then((function(t){var r=t.data;if(r){var a=t.headers&&(t.headers["content-type"]||t.headers["Content-Type"]);if(a&&a.includes("application/json"))try{var n=new FileReader;n.onload=function(){try{var t=JSON.parse(n.result);e.$message.error(t.message||"下载失败")}catch(r){e.$message.error("下载失败")}},n.readAsText(r)}catch(p){console.error("解析下载失败响应异常:",p),e.$message.error("下载失败")}else{var i=t.headers&&(t.headers["content-disposition"]||t.headers["Content-Disposition"]),o="导入模板.xlsx";if(i){var s=/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i.exec(i),l=s?s[1]||s[2]:"";if(l)try{o=decodeURIComponent(l)}catch(p){o=l}}var c=window.URL.createObjectURL(r),u=document.createElement("a");u.href=c,u.download=o,document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(c)}}else e.$message.error("下载失败,文件内容为空")})).catch((function(t){console.error("导出模板失败:",t),e.$message.error("导出模板失败")}))},handleImport:function(){this.importing||this.$refs.fileInput.click()},handleFileChange:function(e){var t=e.target.files&&e.target.files[0];if(t){var r=t.name.split(".").pop().toLowerCase();if(!["xlsx","xls"].includes(r))return this.$message({type:"warning",message:"请选择 Excel 文件(.xlsx 或 .xls)"}),void(e.target.value="");this.uploadFile(t),e.target.value=""}},uploadFile:function(e){var t=this,r=new FormData;r.append("file",e),r.append("modelId",this.detail.id),r.append("userId",pe());var a=Or(Or({},nt.IMPORT_ENGINE_MODEL),{},{params:r,disableSuccessMsg:!0});this.importing=!0,this.$upload(a,null,!1).then((function(e){console.log("导入成功:",e),t.loadEngineDetail()})).catch((function(e){console.error("导入失败:",e),t.$message({type:"error",message:"导入失败,请稍后重试"})})).finally((function(){t.importing=!1}))},loadEngineDetail:function(){var e=this,t=this.detail&&this.detail.id||this.currentEngineModelID;if(t){var r=this.getSelectedSubsystemsAndTypes(),a=r.subsystemNames,n=r.parameterTypes,i=r.subsystemTypes;if(0!==a.length||0!==n.length){console.log(a,n,i);var o={engineModelID:t,userID:this.lastUpdatedBy||pe(),subsystemParts:i},s=pe();"update_param"===this.dispatchType?o.responsiblePersonId=this.responsiblePersonId||s:!this.isDispatchMode&&this.isEditMode?o.filledById=this.filledBy||s:this.filledBy?o.filledById=this.filledBy:this.fromTodo&&this.canResend&&(o.filledById=s),this.isDispatchMode&&"update_param"!==this.dispatchType&&(o.isRes=1);var l=Or(Or({},nt.GET_ENGINE_DETAIL),{},{params:o,disableSuccessMsg:!0});this.$request(l).asyncThen((function(t){if(console.log("接口返回数据:",t),t&&t.data){console.log("准备处理的数据:",t.data);var r=null;e.isDispatchMode&&!e.dispatchOriginalData&&(r=JSON.parse(JSON.stringify(e.versionData))),e.processDetailData(t.data),e.isDispatchMode&&!e.dispatchOriginalData&&r?e.$nextTick((function(){e.dispatchOriginalData=r})):e.isDispatchMode&&!e.dispatchOriginalData&&e.$nextTick((function(){e.dispatchOriginalData=JSON.parse(JSON.stringify(e.versionData))}))}else console.warn("接口返回数据为空或格式不正确",t)})).asyncErrorCatch((function(t){console.error("获取引擎详情失败:",t),e.$message.error("获取引擎详情失败")}))}}else console.warn("缺少 engineModelID,无法加载详情")},processDetailData:function(e){var t=this;e&&"object"===br(e)?(this.versionData[this.currentVersionId]||this.$set(this.versionData,this.currentVersionId,{}),Object.keys(e).forEach((function(r){var a=e[r];Array.isArray(a)&&a.forEach((function(e){var a=e.partsName||e.parameterType||"其他",n=e.parameterName||"",i="/"===a?r:a;t.versionData[t.currentVersionId][i]||t.$set(t.versionData[t.currentVersionId],i,[]);var o=t.versionData[t.currentVersionId][i].findIndex((function(t){return e.id&&t.id?t.id===e.id:t.parameterName===n&&t.subsystemName===r})),s=e.resPersonId||e.responsiblePersonId||e.filledBy||"",l="",c="",u="";e.filler&&e.filler.id?(l=e.filler.id,c=e.filler.id,u=e.filler.username||""):(l=e.filledBy||e.responsiblePersonId||"",l&&(c=l));var p=(e.department||"平台部").replace(/·/g,"-"),d=e.owner||e.responsiblePerson||e.responsiblePersonName||"",h=s;if(t.responsiblePersons&&t.responsiblePersons.length>0){var f=t.responsiblePersons.find((function(e){var t=!1;if(r&&e.subsystem){var a=e.subsystem.split(",").map((function(e){return e.trim()}));t=a.includes(r)}else r||e.subsystem||(t=!0);var n=!1;if(p&&e.department){var i=p.replace(/·/g,"-"),o=e.department.replace(/·/g,"-");n=o===i||o.startsWith(i+"-")}else p||e.department||(n=!0);return t&&n}));f&&(d=f.userName||"",h=f.userId||f.id||"")}var m={parameterName:n,partsName:a,parameterValue:e.parameterValue||e.value||"",unit:e.unit||"-",department:p,owner:d,subsystemName:r,id:e.id,parameterId:e.parameterId,engineModelId:e.engineModelId,majorVersion:e.majorVersion,minorVersion:e.minorVersion,versionStatus:e.versionStatus,version:t.currentVersionId,resPersonId:h,filledBy:l,filledByUserId:c,filledByName:u};if(e.filler&&e.filler.id&&c){var g=m.id||"".concat(m.subsystemName,"-").concat(m.parameterName);t.fillerUserOptions[g]||t.$set(t.fillerUserOptions,g,[]);var v=t.fillerUserOptions[g].findIndex((function(e){return e.userId===c})),y={userId:c,username:u||e.filler.username||"",userNumber:e.filler.userNumber||e.filler.userId||c};v>=0?t.$set(t.fillerUserOptions[g],v,y):t.fillerUserOptions[g].push(y)}o>=0?t.$set(t.versionData[t.currentVersionId][i],o,m):t.versionData[t.currentVersionId][i].push(m)}))})),console.log("处理后的数据:",this.versionData[this.currentVersionId])):console.warn("processDetailData: 数据格式不正确",e)},handleInitiateApproval:function(){var e=this;if(this.shouldShowResendButton){this.isResendMode=!0;var t=this.engineModelID,r=Or(Or({},nt.GET_DATA_APPROVAL_USERS),{},{params:{templateId:t},disableSuccessMsg:!0});this.$request(r).asyncThen((function(t){console.log("获取审批流程信息:",t),e.resendApprovalData=t,e.getApprovalChange()})).asyncErrorCatch((function(t){console.error("获取审批流程信息失败:",t),e.isResendMode=!1,e.resendApprovalData=null,e.getApprovalChange(),e.$message.warning("获取原审批流程信息失败,将使用空的人员列表")}))}else this.isResendMode=!1,this.resendApprovalData=null,this.isApprovalMode=!0,this.approvalFormData={processTitle:"",description:""},this.approvalChangeData=[],this.getApprovalChange(),this.approvalWorkflowSteps=[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"会签",required:!1,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}]},getApprovalChange:function(){var e=this,t=Or(Or({},nt.CHANGE_ENGINE_DATA),{},{params:{modelID:this.detail.id,userID:pe()},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){console.log("审批变更数据:",t),t&&t.data?Array.isArray(t.data)?e.approvalChangeData=t.data:t.data.result&&Array.isArray(t.data.result)?e.approvalChangeData=t.data.result:t.data.data&&Array.isArray(t.data.data)?e.approvalChangeData=t.data.data:e.approvalChangeData=[]:e.approvalChangeData=[],e.isResendMode&&e.resendApprovalData?(e.isApprovalMode=!0,e.approvalWorkflowSteps=[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"会签",required:!1,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}],e.fillResendApprovalData(e.resendApprovalData),e.isResendMode=!1,e.resendApprovalData=null):(e.isApprovalMode=!0,e.approvalWorkflowSteps=[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"会签",required:!1,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}])})).asyncErrorCatch((function(t){console.error("获取审批变更失败:",t),e.approvalChangeData=[],e.$message({type:"error",message:"获取审批变更数据失败"})}))},handleApprovalCancel:function(){this.isApprovalMode=!1,this.isResendMode=!1,this.resendApprovalData=null,this.approvalFormData={processTitle:"",description:""},this.approvalChangeData=[],this.approvalWorkflowSteps=[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"会签",required:!1,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}]},canResendApproval:function(){var e,t=this,r=(null===(e=this.detail)||void 0===e?void 0:e.flowId)||this.flowId;if(r){var a=Or(Or({},nt.CHECK_DATA_CAN_RETURN),{},{params:{flowId:r},disableSuccessMsg:!0});this.$request(a).asyncThen((function(e){console.log("检查是否可以直送:",e),t.canResend=e.data||!1})).asyncErrorCatch((function(e){console.error("获取是否可以直送失败:",e),t.canResend=!1}))}else this.canResend=!1},handleResend:function(){var e=this;this.detail&&this.detail.id?this.$confirm("确定要执行直送操作吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.resending=!0;var t=Or(Or({},nt.RESEND_DATA_APPROVAL),{},{params:{flowId:e.flowId,userId:pe()},disableSuccessMsg:!0});e.$request(t).asyncThen((function(t){e.$message({message:"直送成功",type:"success"}),e.$emit("refresh"),e.resending=!1,e.canResendApproval()})).asyncErrorCatch((function(t){console.error("直送失败:",t),e.$message({message:t.message||"直送失败,请重试",type:"error"}),e.resending=!1}))})).catch((function(){})):this.$message.error("缺少审批ID,无法执行直送操作")},fillResendApprovalData:function(e){var t=this,r=[],a=e;Array.isArray(e)?r=e:e&&Array.isArray(e.data)?(r=e.data,a=e):e&&Array.isArray(e.result)?(r=e.result,a=e):e&&Array.isArray(e.nodeList)?(r=e.nodeList,a=e):e&&Array.isArray(e.flowNodes)?(r=e.flowNodes,a=e):e&&e.data&&Array.isArray(e.data)&&(r=e.data,a=e),a&&!Array.isArray(a)&&((a.progressTitle||a.processTitle)&&(this.approvalFormData.processTitle=a.progressTitle||a.processTitle||""),(a.explanation||a.description)&&(this.approvalFormData.description=a.explanation||a.description||"")),r&&r.length>0&&r.forEach((function(e){var r=e.nodeName||e.node||"";if(r){var a=t.approvalWorkflowSteps.find((function(e){return e.name===r}));if(a){var n=e.assignees||[];if(Array.isArray(n)&&0!==n.length){var i=n.map((function(e){var t=e.userId||e.id||"";return{userId:t,username:e.username||"",userNumber:e.userNumber||e.account||""}})).filter((function(e){return e.userId}));i.length>0&&(a.handlers=i.map((function(e){return e.userId})).filter(Boolean),a.options=i.map((function(e){return{userId:e.userId,username:e.username||"",userNumber:e.userNumber||""}})).filter((function(e){return e.userId})))}}}}))},handleApprovalFormSubmit:function(){var e=this,t=this.approvalWorkflowSteps.filter((function(e){return e.required&&(!e.handlers||0===e.handlers.length)}));if(t.length>0){var r=t.map((function(e){return e.name})).join("、");this.$message({type:"warning",message:'请为必填环节"'.concat(r,'"选择处理人')})}else{var a=(this.approvalFormData.processTitle||"").trim();if(a){var n=[],i=this.versionData[this.currentVersionId]||{};console.log(this.currentEngineModelID,"this.currentEngineModelID",this.currentData),Object.keys(i).forEach((function(t){var r=i[t]||[];r.forEach((function(r){var a={id:r.id||"",parameterId:r.parameterId||"",engineModelId:r.engineModelId||e.currentEngineModelID,subsystemName:r.subsystemName||"",partsName:r.partsName||t,parameterName:r.parameterName||"",parameterValue:r.parameterValue||"",responsiblePersonId:r.resPersonId||r.responsiblePersonId||"",department:r.department||"平台部",filledBy:r.filledBy||"",createdBy:pe(),majorVersion:r.majorVersion||0,minorVersion:r.minorVersion||"",versionStatus:r.versionStatus||0,approvalId:"",isDelete:"",beforeParamId:"",operation:r.operation||"UPDATE",creationDate:"",lastUpdatedBy:"",lastUpdateDate:""};n.push(a)}))}));var o=this.approvalWorkflowSteps.map((function(e,t){return{nodeName:e.name,assignees:e.handlers,nodeOrder:t+1}})),s={modelId:this.detail.id,paramList:n,comment:this.approvalFormData.description,processTitle:a,nodeList:o,userId:pe()},l=Or(Or({},nt.START_ENGINE_CHECK),{},{flowId:this.flowId||"",params:s,disableSuccessMsg:!0});this.approvalSubmitting=!0,this.$request(l).asyncThen((function(t){console.log("审批提交成功"),e.$message({type:"success",message:"审批提交成功"}),e.approvalSubmitting=!1,e.isApprovalMode=!1,e.handleBack()})).asyncErrorCatch((function(t){console.error("审批提交失败:",t),e.approvalSubmitting=!1,e.$message({type:"error",message:"审批提交失败"})})).finally((function(){e.approvalSubmitting=!1}))}else this.$message.warning("请填写流程主题")}},handleRemoteSearch:function(e,t){var r=this.approvalWorkflowSteps[t];if(e&&""!==e.trim()){r.loading=!0;var a=e.trim(),n=Or(Or({},nt.GET_ALLUSERS),{},{params:{name:a},disableSuccessMsg:!0});this.$request(n).asyncThen((function(e){var t=e&&e.data,a=[];Array.isArray(t)?a=t:t&&Array.isArray(t.result)?a=t.result:t&&t.data&&Array.isArray(t.data)&&(a=t.data);var n=a.map((function(e){return{userId:e.userId||e.id,username:e.username||e.name,userNumber:e.userNumber||e.userId||e.id}})).filter((function(e){return e.userId&&e.userNumber})),i=new Set(r.handlers||[]),o=n.filter((function(e){return!i.has(e.userId)})),s=(r.options||[]).filter((function(e){return e.userId&&r.handlers&&r.handlers.includes(e.userId)})),l=new Map;s.forEach((function(e){e.userNumber&&l.set(e.userNumber,e)})),o.forEach((function(e){e.userNumber&&!l.has(e.userNumber)&&l.set(e.userNumber,e)})),r.options=Array.from(l.values()),r.loading=!1})).asyncErrorCatch((function(e){if(console.error("搜索人员失败:",e),r.handlers&&r.handlers.length>0){var t=r.options.filter((function(e){return r.handlers.includes(e.userId)}));r.options=t}else r.options=[];r.loading=!1}))}else if(r.handlers&&r.handlers.length>0){var i=r.options.filter((function(e){return r.handlers.includes(e.userId)})),o=r.handlers.filter((function(e){return!i.some((function(t){return t.userId===e}))}));o.length,r.options=i}else r.options=[]},handleHandlerChange:function(e,t){},formatDepartmentDisplay:function(e){if(!e)return"平台部";var t=e.replace(/·/g,"-"),r=t.split("-").filter((function(e){return""!==e.trim()}));return r.length>0?r[r.length-1]:t},formatSectionTitle:function(e,t){if(!t||!Array.isArray(t)||0===t.length)return e;var r=t[0],a=r.subsystemName||"",n=r.partsName||"";return n&&"/"!==n?"".concat(a,"-").concat(n):a||e}}},Nr=Pr,Er=(r("bc18"),p(Nr,Jt,Qt,!1,null,null,null)),Rr=Er.exports,Lr=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("x-modal",{attrs:{"append-to-body":!0,"destroy-on-close":!0,modalVisible:e.visible,"wrapper-class":"add-engine-model-modal",title:"添加机型",width:800},on:{"update:modalVisible":function(t){e.visible=t},"update:modal-visible":function(t){e.visible=t}},scopedSlots:e._u([{key:"footer",fn:function(){return[r("div",{staticClass:"dialog-footer"},[r("el-button",{on:{click:e.closeModal}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.submitting},on:{click:e.handleSubmit}},[e._v(" 确定 ")])],1)]},proxy:!0}])},[r("el-form",{ref:"addForm",staticClass:"add-engine-form",attrs:{model:e.formData,rules:e.formRules,"label-width":"100px"}},[r("div",{staticClass:"form-row"},[r("el-form-item",{attrs:{label:"产品型号",prop:"modelName"}},[r("el-input",{attrs:{placeholder:"请输入",maxlength:"100"},model:{value:e.formData.modelName,callback:function(t){e.$set(e.formData,"modelName",t)},expression:"formData.modelName"}})],1),r("el-form-item",{attrs:{label:"竞品"===e.ycOrOth?"产品编号":"状态代号",prop:"productNumber"}},[r("el-input",{attrs:{placeholder:"请输入",maxlength:"100"},model:{value:e.formData.productNumber,callback:function(t){e.$set(e.formData,"productNumber",t)},expression:"formData.productNumber"}})],1)],1),r("div",{staticClass:"form-row"},[r("el-form-item",{attrs:{label:"板块",prop:"plate"}},[r("el-input",{attrs:{placeholder:"请输入",maxlength:"100"},model:{value:e.formData.plate,callback:function(t){e.$set(e.formData,"plate",t)},expression:"formData.plate"}})],1),r("el-form-item",{attrs:{label:"平台",prop:"platform"}},[r("el-input",{attrs:{placeholder:"请输入",maxlength:"100"},model:{value:e.formData.platform,callback:function(t){e.$set(e.formData,"platform",t)},expression:"formData.platform"}})],1)],1),r("div",{staticClass:"form-row"},[r("el-form-item",{attrs:{label:"细分市场",prop:"marketSegment"}},[r("el-input",{attrs:{placeholder:"请输入",maxlength:"100"},model:{value:e.formData.marketSegment,callback:function(t){e.$set(e.formData,"marketSegment",t)},expression:"formData.marketSegment"}})],1),r("el-form-item",{attrs:{label:"系列",prop:"series"}},[r("el-input",{attrs:{placeholder:"请输入",maxlength:"100"},model:{value:e.formData.series,callback:function(t){e.$set(e.formData,"series",t)},expression:"formData.series"}})],1)],1),r("div",{staticClass:"form-row"},[r("el-form-item",{attrs:{label:"项目名称",prop:"projectName"}},[r("el-input",{attrs:{placeholder:"请输入",maxlength:"100"},model:{value:e.formData.projectName,callback:function(t){e.$set(e.formData,"projectName",t)},expression:"formData.projectName"}})],1),r("el-form-item",{attrs:{label:"项目编号",prop:"projectNumber"}},[r("el-input",{attrs:{placeholder:"请输入",maxlength:"100"},model:{value:e.formData.projectNumber,callback:function(t){e.$set(e.formData,"projectNumber",t)},expression:"formData.projectNumber"}})],1)],1),r("div",{staticClass:"form-row"},[r("el-form-item",{attrs:{label:"排放",prop:"emission"}},[r("el-input",{attrs:{placeholder:"请输入",maxlength:"100"},model:{value:e.formData.emission,callback:function(t){e.$set(e.formData,"emission",t)},expression:"formData.emission"}})],1),r("el-form-item",{attrs:{label:"燃烧类型",prop:"burnType"}},[r("el-input",{attrs:{placeholder:"请输入",maxlength:"100"},model:{value:e.formData.burnType,callback:function(t){e.$set(e.formData,"burnType",t)},expression:"formData.burnType"}})],1)],1),r("div",{staticClass:"form-row"},[r("el-form-item",{attrs:{label:"排量",prop:"engineCapacity"}},[r("el-input",{attrs:{placeholder:"请输入",maxlength:"100"},model:{value:e.formData.engineCapacity,callback:function(t){e.$set(e.formData,"engineCapacity",t)},expression:"formData.engineCapacity"}})],1),r("el-form-item",{attrs:{label:"任务分发状态",prop:"dispatchStatus"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{disabled:"",placeholder:"请选择"},model:{value:e.formData.distributeStatus,callback:function(t){e.$set(e.formData,"distributeStatus",t)},expression:"formData.distributeStatus"}},e._l(e.dispatchStatusOptions,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.label}})})),1)],1)],1)])],1)},jr=[];function Fr(e){return Fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fr(e)}function Vr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function zr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vr(Object(r),!0).forEach((function(t){Br(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Br(e,t,r){return t=$r(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $r(e){var t=Gr(e,"string");return"symbol"===Fr(t)?t:String(t)}function Gr(e,t){if("object"!==Fr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==Fr(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Ur={name:"AddEngineModelModal",data:function(){return{visible:!1,submitting:!1,ycOrOth:"竞品",formData:{modelName:"",productNumber:"",plate:"",plate2:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",dispatchStatus:""},formRules:{modelName:[{required:!0,message:"请输入产品型号",trigger:"blur"}],productNumber:[{required:!0,message:"请输入编号",trigger:"blur"}],plate:[{required:!0,message:"请输入板块",trigger:"blur"}],plate2:[{required:!0,message:"请输入版块",trigger:"blur"}],platform:[{required:!0,message:"请输入平台",trigger:"blur"}],series:[{required:!0,message:"请输入系列",trigger:"blur"}],marketSegment:[{required:!0,message:"请输入细分市场",trigger:"blur"}],projectName:[{required:!0,message:"请输入项目名称",trigger:"blur"}],projectNumber:[{required:!0,message:"请输入项目编号",trigger:"blur"}]},dispatchStatusOptions:[{label:"已分发",value:"已分发"},{label:"未分发",value:"未分发"}]}},methods:{showModal:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"竞品";this.ycOrOth=t,this.visible=!0,this.resetForm(t),this.$nextTick((function(){e.$refs.addForm&&e.$refs.addForm.clearValidate()}))},closeModal:function(){this.visible=!1,this.ycOrOth="竞品",this.resetForm("竞品")},resetForm:function(e){this.formData={loginUserId:pe(),ycOrOth:e,modelName:"",productNumber:"",plate:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",distributeStatus:"未分发"}},handleSubmit:function(){var e=this;this.$refs.addForm.validate((function(t){if(t){e.submitting=!0;var r=zr(zr({},nt.ADD_ENGINE_MODEL),{},{params:zr({},e.formData),disableSuccessMsg:!0});e.$request(r).asyncThen((function(t){e.$message({message:"提交成功",type:"success"}),e.closeModal(),e.$emit("success")})).asyncErrorCatch((function(t){console.error("添加失败:",t),e.$message({message:"添加失败",type:"error"})})).finally((function(){e.submitting=!1}))}}))}}},Wr=Ur,Hr=(r("9cab"),p(Wr,Lr,jr,!1,null,null,null)),qr=Hr.exports;function Yr(e){return Yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yr(e)}function Xr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function Zr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xr(Object(r),!0).forEach((function(t){Kr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Kr(e,t,r){return t=Jr(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jr(e){var t=Qr(e,"string");return"symbol"===Yr(t)?t:String(t)}function Qr(e,t){if("object"!==Yr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==Yr(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var ea=function(){return{loginUserId:pe(),modelName:"",statusCode:"",plate:"",block:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",distributeStatus:"",ycOrOth:"玉柴",modelNameSimple:"",productionDate:""}},ta={name:"SelfEngineData",components:{EngineDetail:Rr,AddEngineModelModal:qr},data:function(){return{searchPanelValue:ea(),tableData:[],pagination:{currentPage:1,pageSize:10,total:0},showEngineDetail:!1,currentModel:"",currentEngineModelID:"",currentEngineDetail:null,isDispatchMode:!1,dispatchType:"todo",importDialogVisible:!1,importing:!1,selectedImportFile:null,importFileList:[],downloadingTemplate:!1}},computed:{tableConfig:function(){return{rowDraggable:!1,colConfigs:[{prop:"modelName",label:"产品型号",showOverflowTooltip:!0,minWidth:"120"},{prop:"productNumber",label:"状态代号",showOverflowTooltip:!0,minWidth:"100"},{prop:"plate",label:"板块",showOverflowTooltip:!0,minWidth:"100"},{prop:"platform",label:"平台",showOverflowTooltip:!0,minWidth:"100"},{prop:"series",label:"系列",showOverflowTooltip:!0,minWidth:"100"},{prop:"marketSegment",label:"细分市场",showOverflowTooltip:!0,minWidth:"100"},{prop:"projectName",label:"项目名称",showOverflowTooltip:!0,minWidth:"120"},{prop:"projectNumber",label:"项目编号",showOverflowTooltip:!0,minWidth:"100"},{prop:"parameterNum",label:"标准参数",showOverflowTooltip:!0,minWidth:"100",align:"center"},{prop:"distributeStatus",label:"任务分发状态",customSlot:"distributeStatus",showOverflowTooltip:!0,minWidth:"120",align:"center"},{prop:"versionNumber",label:"版本",customSlot:"versionNumber",showOverflowTooltip:!0,minWidth:"80",align:"center"},{prop:"options",label:"操作",customSlot:"options",align:"center",width:"120",fixed:"right"}],seqType:"seq",layout:"total, prev, pager, next, sizes, jumper"}}},created:function(){this.loadUserSelfRole(),this.loadData()},mounted:function(){this.loadUserSelfRole(),this.loadData()},methods:{isAdmin:function(){try{var e=localStorage.getItem("user_self_role");if(!e)return!1;var t=JSON.parse(e);return!!Array.isArray(t)&&t.some((function(e){return 1===e.isAdmin||"1"===e.isAdmin}))}catch(r){return console.error("检查管理员权限失败:",r),!1}},hasEngineDataEditPermission:function(){if(this.isAdmin())return!0;try{var e=localStorage.getItem("user_self_role");if(!e)return!1;var t=JSON.parse(e);return!!Array.isArray(t)&&t.some((function(e){var t=e.permissionPath||"",r=e.parameterPer;return"玉柴发动机数据"===t&&(2===r||"2"===r||"编辑"===r)}))}catch(r){return console.error("检查玉柴发动机数据编辑权限失败:",r),!1}},loadUserSelfRole:function(){var e=Zr(Zr({},nt.GET_USER_SELF_ROLE),{},{params:{userOrDepID:pe()},disableSuccessMsg:!0});this.$request(e).asyncThen((function(e){if(e&&e.data)try{localStorage.setItem("user_self_role",JSON.stringify(e.data))}catch(t){console.error("存储权限数据到 localStorage 失败:",t)}})).asyncErrorCatch((function(e){console.error("获取用户自身角色失败:",e)}))},handleRowDispatch:function(e,t){this.currentModel=e.productFullName||"",this.currentEngineModelID=e.id||e.rowId||e.engineModelID||"",this.currentEngineDetail=e,this.isDispatchMode=!0,this.dispatchType="todo",this.showEngineDetail=!0},handleRowDelete:function(e,t){var r=this;console.log(e,"row");var a=Zr(Zr({},nt.DEL_ENGINE_MODEL),{},{params:{modelId:e.id},disableSuccessMsg:!0});this.$request(a).asyncThen((function(e){console.log(e,"resp"),r.$message({type:"success",message:"删除成功"}),r.loadData()})).asyncErrorCatch((function(e){console.error("删除机型失败:",e),r.$message({type:"error",message:"删除失败"})}))},pageSizeChange:function(e){this.pagination.pageSize=e,this.pagination.currentPage=1,this.loadData()},rowClickEvent:function(e){console.warn(e)},handleRowDetail:function(e){this.currentModel=e.productFullName||"",this.currentEngineModelID=e.id,this.currentEngineDetail=e,this.isDispatchMode=!1,this.dispatchType="justCheck",this.showEngineDetail=!0},handleBackFromDetail:function(){this.showEngineDetail=!1,this.currentModel="",this.currentEngineModelID="",this.currentEngineDetail=null,this.isDispatchMode=!1,this.dispatchType="todo",this.loadData()},currentChange:function(e){this.pagination.currentPage=e,console.log(this.pagination.currentPage,this.pagination.pageSize,"currentPage"),this.loadData()},selectDataChange:function(e){this.$emit("select-data-change",e)},resetSearch:function(){Object.assign(this.searchPanelValue,ea()),this.handleSearch()},handleSearch:function(){this.loadData()},handleRefresh:function(){this.pagination.currentPage=1,this.handleSearch()},handleImport:function(){this.importing||(this.importDialogVisible=!0)},handleImportFileChange:function(e,t){var r=[".xls",".xlsx"],a=["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel.sheet.macroEnabled.12"];if(e&&e.raw){var n=e.raw,i=n.name||"",o=i.substring(i.lastIndexOf(".")).toLowerCase(),s=n.type||"",l=r.some((function(e){return o===e})),c=!s||a.some((function(e){return s.includes(e)}));if(!l&&!c)return this.$message.error("文件类型不支持,仅支持 ".concat(r.join("、")," 格式的文件")),this.selectedImportFile=null,this.importFileList=[],!1;this.selectedImportFile=n,this.importFileList=t.slice(-1)}else this.selectedImportFile=null,this.importFileList=t.slice(-1)},handleImportFileRemove:function(){this.selectedImportFile=null,this.importFileList=[]},handleImportDialogClose:function(){this.importDialogVisible=!1,this.selectedImportFile=null,this.importFileList=[]},handleImportConfirm:function(){var e=this;if(!this.importing&&this.selectedImportFile){var t=this.selectedImportFile,r=[".xls",".xlsx"],a=t.name||"",n=a.substring(a.lastIndexOf(".")).toLowerCase();if(!r.includes(n))return this.$message.error("文件类型不支持,仅支持 ".concat(r.join("、")," 格式的文件")),this.selectedImportFile=null,void(this.importFileList=[]);var i=new FormData;i.append("file",t),i.append("userId",pe()),i.append("ycOrOt","玉柴");var o=Zr(Zr({},nt.IMPORT_ENGINE_MODEL_PARAM),{},{params:i,disableSuccessMsg:!0});this.importing=!0;var s=this.$loading({lock:!0,text:"正在导入机型,请稍候...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});this.$upload(o,null,!1).then((function(t){console.log("导入成功:",t),s.close(),e.handleImportDialogClose(),e.loadData()})).catch((function(t){console.error("导入失败:",t),s.close(),e.$message.error("导入失败,请稍后重试")})).finally((function(){s&&s.close(),e.importing=!1}))}else this.selectedImportFile||this.$message.warning("请先选择要导入的文件")},handleDownloadTemplate:function(){var e=this;if(!this.downloadingTemplate){var t=nt.DOWNLOAD_ENGINE_DEMO||{},r=t.url,a=t.method,n=void 0===a?"get":a,i=t.headers,o=void 0===i?{}:i,s={url:r,method:n,params:{},responseType:"blob",headers:o};if(s.url){"post"===(s.method||"").toLowerCase()&&(s.data=s.params,delete s.params);var l="机型导入模板.xlsx";this.downloadingTemplate=!0,this.$axios(s).then((function(t){var r=t.data;if(r){var a=t.headers&&(t.headers["content-type"]||t.headers["Content-Type"]);if(a&&a.includes("application/json"))try{var n=new FileReader;n.onload=function(){console.log("下载失败: ".concat(n.result))},n.readAsText(r)}catch(d){console.error("解析下载失败响应异常:",d)}else{var i=t.headers&&(t.headers["content-disposition"]||t.headers["Content-Disposition"]),o=l;if(i){var s=/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i.exec(i),c=s?s[1]||s[2]:"";if(c)try{o=decodeURIComponent(c)}catch(d){o=c}}var u=window.URL.createObjectURL(r),p=document.createElement("a");p.href=u,p.download=o,document.body.appendChild(p),p.click(),document.body.removeChild(p),window.URL.revokeObjectURL(u),e.$message({type:"success",message:"下载成功"}),console.log("下载开始,请查看浏览器下载列表")}}else console.log("下载失败,文件内容为空")})).catch((function(t){console.error("下载失败:",t),e.$message.error("下载失败,请稍后重试")})).finally((function(){e.downloadingTemplate=!1}))}else console.log("未配置下载地址")}},handleAdd:function(){this.$refs.addEngineModelModal.showModal("玉柴")},handleAddSuccess:function(){this.loadData()},loadData:function(){var e=this,t=Zr(Zr({},nt.GET_ENGINE_LIST_SELF),{},{params:Zr({page:this.pagination.currentPage,size:this.pagination.pageSize,ycOrOth:"玉柴"},this.searchPanelValue),disableSuccessMsg:!0});console.log(this.pagination.currentPage,this.pagination.pageSize,"request"),this.$request(t).asyncThen((function(t){e.tableData=t.data.list,e.pagination.total=t.data.totalCount})).asyncErrorCatch((function(e){console.error("查询失败:",e)}))}}},ra=ta,aa=(r("a3aa"),p(ra,Zt,Kt,!1,null,null,null)),na=aa.exports,ia=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"apaas-custom-page-mydemo custom-page"},[e.showEngineDetail?e._e():[r("div",{staticClass:"page-header"},[r("div",{staticClass:"title"},[e._v(" 竞品发动机数据 ")]),r("div",{staticClass:"operation"},[e.hasEngineDataEditPermission()?r("el-button",{attrs:{type:"primary"},on:{click:e.handleDownloadTemplate}},[e._v("下载模板")]):e._e(),e.hasEngineDataEditPermission()?r("el-button",{staticClass:"import-button",on:{click:e.handleImport}},[e._v(" 导入机型 ")]):e._e(),e.hasEngineDataEditPermission()?r("el-button",{staticClass:"add-button",attrs:{type:"primary"},on:{click:e.handleAdd}},[e._v(" 添加机型 ")]):e._e()],1)]),r("div",{staticClass:"page-search-panel"},[r("div",{staticClass:"searched-fields"},[r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("产品型号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.modelName,callback:function(t){e.$set(e.searchPanelValue,"modelName",t)},expression:"searchPanelValue.modelName"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("状态代号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.productNumber,callback:function(t){e.$set(e.searchPanelValue,"productNumber",t)},expression:"searchPanelValue.productNumber"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("板块")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.plate,callback:function(t){e.$set(e.searchPanelValue,"plate",t)},expression:"searchPanelValue.plate"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("平台")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.platform,callback:function(t){e.$set(e.searchPanelValue,"platform",t)},expression:"searchPanelValue.platform"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("系列")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.series,callback:function(t){e.$set(e.searchPanelValue,"series",t)},expression:"searchPanelValue.series"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("细分市场")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.marketSegment,callback:function(t){e.$set(e.searchPanelValue,"marketSegment",t)},expression:"searchPanelValue.marketSegment"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("项目名称")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.projectName,callback:function(t){e.$set(e.searchPanelValue,"projectName",t)},expression:"searchPanelValue.projectName"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("项目编号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.projectNumber,callback:function(t){e.$set(e.searchPanelValue,"projectNumber",t)},expression:"searchPanelValue.projectNumber"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("任务分发状态")]),r("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.searchPanelValue.distributeStatus,callback:function(t){e.$set(e.searchPanelValue,"distributeStatus",t)},expression:"searchPanelValue.distributeStatus"}},[r("el-option",{attrs:{label:"已分发",value:"已分发"}}),r("el-option",{attrs:{label:"部分分发",value:"部分分发"}}),r("el-option",{attrs:{label:"未分发",value:"未分发"}})],1)],1),r("div",{staticClass:"search-actions"},[r("el-button",{attrs:{type:"primary"},on:{click:e.handleSearch}},[e._v(" 查询 ")]),r("el-button",{on:{click:e.resetSearch}},[e._v(" 重置 ")])],1)])]),r("div",{staticClass:"page-data-list"},[r("x-vxe-table",{ref:"vxeTable",staticClass:"block-table",attrs:{border:!0,seqWidth:40,colConfigs:e.tableConfig.colConfigs,tableData:e.tableData,rowDraggable:e.tableConfig.rowDraggable,seqType:e.tableConfig.seqType,pagination:e.pagination,layout:e.tableConfig.layout,seqConfig:e.tableConfig.seqConfig,autoSize:e.tableConfig.autoSize,pageConfig:e.tableConfig.pageConfig},on:{"table-row-click":e.rowClickEvent,"size-change":e.pageSizeChange,"current-page-change":e.currentChange},scopedSlots:e._u([e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customHeadSlot,fn:function(n){var i=n.column;return[t.customHeadSlot?r("div",{key:a},[e._v(" "+e._s(i)+" "+e._s(t)+" ")]):e._e()]}}})),e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customSlot,fn:function(n){var i=n.row,o=n.rowIndex;return["options"===t.customSlot?r("div",{key:a+""+o},[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowDetail(i)}}},[e._v(" 查看 ")]),"已分发"!=i.distributeStatus&&e.hasEngineDataEditPermission()?r("span",{staticClass:"link-separator"}):e._e(),"已分发"!=i.distributeStatus&&e.hasEngineDataEditPermission()?r("a",{staticClass:"el-link el-link--primary",staticStyle:{"margin-left":"5px"},attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowDispatch(i,o)}}},[e._v(" 分发 ")]):e._e(),"未分发"===i.distributeStatus&&e.hasEngineDataEditPermission()&&1===i.versionNumber?r("span",{staticClass:"link-separator"}):e._e(),"未分发"===i.distributeStatus&&e.hasEngineDataEditPermission()&&1===i.versionNumber?r("a",{staticClass:"el-link el-link--primary",staticStyle:{"margin-left":"5px"},attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowDelete(i,o)}}},[e._v(" 删除 ")]):e._e()]):e._e(),"distributeStatus"===t.customSlot?r("div",{key:a+""+o},["已分发"===i[t.prop]?r("span",{staticClass:"status-tag status-done"},[e._v(" 已分发 ")]):"部分分发"===i[t.prop]?r("span",{staticClass:"status-tag status-partial"},[e._v(" 部分分发 ")]):"未分发"===i[t.prop]?r("span",{staticClass:"status-tag status-pending"},[e._v(" 未分发 ")]):e._e()]):e._e(),"versionNumber"===t.customSlot?r("div",{key:a+""+o},[e._v(" V"+e._s(i[t.prop]||"")+" ")]):e._e()]}}}))],null,!0)},[r("template",{slot:"empty"},[r("div",{staticClass:"table-empty"},[r("x-empty-page")],1)])],2)],1)],e.showEngineDetail?r("engine-detail",{staticClass:"engine-detail-wrapper",attrs:{model:e.currentModel,"engine-model-i-d":e.currentEngineModelID,"is-dispatch-mode":e.isDispatchMode,"dispatch-type":e.dispatchType,detail:e.currentEngineDetail},on:{back:e.handleBackFromDetail}}):e._e(),r("add-engine-model-modal",{ref:"addEngineModelModal",on:{success:e.handleAddSuccess}}),r("el-dialog",{attrs:{title:"导入机型",visible:e.importDialogVisible,width:"400px","append-to-body":""},on:{"update:visible":function(t){e.importDialogVisible=t},close:e.handleImportDialogClose}},[r("el-upload",{staticClass:"import-uploader",attrs:{drag:"","auto-upload":!1,limit:1,accept:".xls,.xlsx","file-list":e.importFileList,"on-change":e.handleImportFileChange,"on-remove":e.handleImportFileRemove}},[r("i",{staticClass:"el-icon-upload"}),r("div",{staticClass:"el-upload__text"},[e._v(" 将文件拖到此处,或"),r("em",[e._v("点击上传")])]),r("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v(" 仅支持Excel文件(.xlsx 或 .xls) ")])]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleImportDialogClose}},[e._v("取消")]),r("el-button",{attrs:{type:"primary",loading:e.importing},on:{click:e.handleImportConfirm}},[e._v(" 开始导入 ")])],1)],1)],2)},oa=[];function sa(e){return sa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sa(e)}function la(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function ca(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?la(Object(r),!0).forEach((function(t){ua(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):la(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ua(e,t,r){return t=pa(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pa(e){var t=da(e,"string");return"symbol"===sa(t)?t:String(t)}function da(e,t){if("object"!==sa(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==sa(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var ha=function(){return{loginUserId:pe(),modelName:"",statusCode:"",plate:"",block:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",distributeStatus:"",ycOrOth:"竞品",modelNameSimple:"",productionDate:""}},fa={name:"SelfEngineData",components:{EngineDetail:Rr,AddEngineModelModal:qr},data:function(){return{searchPanelValue:ha(),tableData:[],pagination:{currentPage:1,pageSize:10,total:0},showEngineDetail:!1,currentModel:"",currentEngineModelID:"",currentEngineDetail:null,isDispatchMode:!1,dispatchType:"todo",importDialogVisible:!1,importing:!1,selectedImportFile:null,importFileList:[],downloadingTemplate:!1}},computed:{tableConfig:function(){return{rowDraggable:!1,colConfigs:[{prop:"modelName",label:"产品型号",showOverflowTooltip:!0,minWidth:"120"},{prop:"productNumber",label:"状态代号",showOverflowTooltip:!0,minWidth:"100"},{prop:"plate",label:"板块",showOverflowTooltip:!0,minWidth:"100"},{prop:"platform",label:"平台",showOverflowTooltip:!0,minWidth:"100"},{prop:"series",label:"系列",showOverflowTooltip:!0,minWidth:"100"},{prop:"marketSegment",label:"细分市场",showOverflowTooltip:!0,minWidth:"100"},{prop:"projectName",label:"项目名称",showOverflowTooltip:!0,minWidth:"120"},{prop:"projectNumber",label:"项目编号",showOverflowTooltip:!0,minWidth:"100"},{prop:"parameterNum",label:"标准参数",showOverflowTooltip:!0,minWidth:"100",align:"center"},{prop:"distributeStatus",label:"任务分发状态",customSlot:"distributeStatus",showOverflowTooltip:!0,minWidth:"120",align:"center"},{prop:"versionNumber",label:"版本",customSlot:"versionNumber",showOverflowTooltip:!0,minWidth:"80",align:"center"},{prop:"options",label:"操作",customSlot:"options",align:"center",width:"120",fixed:"right"}],seqType:"seq",layout:"total, prev, pager, next, sizes, jumper"}}},created:function(){this.loadUserSelfRole(),this.loadData()},mounted:function(){this.loadUserSelfRole(),this.loadData()},methods:{isAdmin:function(){try{var e=localStorage.getItem("user_self_role");if(!e)return!1;var t=JSON.parse(e);return!!Array.isArray(t)&&t.some((function(e){return 1===e.isAdmin||"1"===e.isAdmin}))}catch(r){return console.error("检查管理员权限失败:",r),!1}},hasEngineDataEditPermission:function(){if(this.isAdmin())return!0;try{var e=localStorage.getItem("user_self_role");if(!e)return!1;var t=JSON.parse(e);return!!Array.isArray(t)&&t.some((function(e){var t=e.permissionPath||"",r=e.parameterPer;return"竞品发动机数据"===t&&(2===r||"2"===r||"编辑"===r)}))}catch(r){return console.error("检查竞品发动机数据编辑权限失败:",r),!1}},loadUserSelfRole:function(){var e=ca(ca({},nt.GET_USER_SELF_ROLE),{},{params:{userOrDepID:pe()},disableSuccessMsg:!0});this.$request(e).asyncThen((function(e){if(e&&e.data)try{localStorage.setItem("user_self_role",JSON.stringify(e.data))}catch(t){console.error("存储权限数据到 localStorage 失败:",t)}})).asyncErrorCatch((function(e){console.error("获取用户自身角色失败:",e)}))},handleRowDispatch:function(e,t){this.currentModel=e.productFullName||"",this.currentEngineModelID=e.id||e.rowId||e.engineModelID||"",this.currentEngineDetail=e,this.isDispatchMode=!0,this.dispatchType="todo",this.showEngineDetail=!0},handleRowDelete:function(e,t){var r=this;console.log(e,"row");var a=ca(ca({},nt.DEL_ENGINE_MODEL),{},{params:{modelId:e.id},disableSuccessMsg:!0});this.$request(a).asyncThen((function(e){console.log(e,"resp"),r.$message({type:"success",message:"删除成功"}),r.loadData()})).asyncErrorCatch((function(e){console.error("删除机型失败:",e),r.$message({type:"error",message:"删除失败"})}))},pageSizeChange:function(e){this.pagination.pageSize=e,this.pagination.currentPage=1,this.loadData()},rowClickEvent:function(e){console.warn(e)},handleRowDetail:function(e){this.currentModel=e.productFullName||"",this.currentEngineModelID=e.id,this.currentEngineDetail=e,this.isDispatchMode=!1,this.dispatchType="justCheck",this.showEngineDetail=!0},handleBackFromDetail:function(){this.showEngineDetail=!1,this.currentModel="",this.currentEngineModelID="",this.currentEngineDetail=null,this.isDispatchMode=!1,this.dispatchType="todo"},currentChange:function(e){this.pagination.currentPage=e,console.log(this.pagination.currentPage,this.pagination.pageSize,"currentPage"),this.loadData()},selectDataChange:function(e){this.$emit("select-data-change",e)},resetSearch:function(){Object.assign(this.searchPanelValue,ha()),this.handleSearch()},handleSearch:function(){this.loadData()},handleRefresh:function(){this.pagination.currentPage=1,this.handleSearch()},handleImport:function(){this.importing||(this.importDialogVisible=!0)},handleImportFileChange:function(e,t){var r=[".xls",".xlsx"],a=["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel.sheet.macroEnabled.12"];if(e&&e.raw){var n=e.raw,i=n.name||"",o=i.substring(i.lastIndexOf(".")).toLowerCase(),s=n.type||"",l=r.some((function(e){return o===e})),c=!s||a.some((function(e){return s.includes(e)}));if(!l&&!c)return this.$message.error("文件类型不支持,仅支持 ".concat(r.join("、")," 格式的文件")),this.selectedImportFile=null,this.importFileList=[],!1;this.selectedImportFile=n,this.importFileList=t.slice(-1)}else this.selectedImportFile=null,this.importFileList=t.slice(-1)},handleImportFileRemove:function(){this.selectedImportFile=null,this.importFileList=[]},handleImportDialogClose:function(){this.importDialogVisible=!1,this.selectedImportFile=null,this.importFileList=[]},handleImportConfirm:function(){var e=this;if(!this.importing&&this.selectedImportFile){var t=this.selectedImportFile,r=[".xls",".xlsx"],a=t.name||"",n=a.substring(a.lastIndexOf(".")).toLowerCase();if(!r.includes(n))return this.$message.error("文件类型不支持,仅支持 ".concat(r.join("、")," 格式的文件")),this.selectedImportFile=null,void(this.importFileList=[]);var i=new FormData;i.append("file",t),i.append("userId",pe()),i.append("ycOrOt","竞品");var o=ca(ca({},nt.IMPORT_ENGINE_MODEL_PARAM),{},{params:i,disableSuccessMsg:!0});this.importing=!0;var s=this.$loading({lock:!0,text:"正在导入机型,请稍候...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});this.$upload(o,null,!1).then((function(t){console.log("导入成功:",t),s.close(),e.handleImportDialogClose(),e.loadData()})).catch((function(t){console.error("导入失败:",t),s.close(),e.$message.error("导入失败,请稍后重试")})).finally((function(){s&&s.close(),e.importing=!1}))}else this.selectedImportFile||this.$message.warning("请先选择要导入的文件")},handleDownloadTemplate:function(){var e=this;if(!this.downloadingTemplate){var t=nt.DOWNLOAD_ENGINE_DEMO||{},r=t.url,a=t.method,n=void 0===a?"get":a,i=t.headers,o=void 0===i?{}:i,s={url:r,method:n,params:{},responseType:"blob",headers:o};if(s.url){"post"===(s.method||"").toLowerCase()&&(s.data=s.params,delete s.params);var l="机型导入模板.xlsx";this.downloadingTemplate=!0,this.$axios(s).then((function(t){var r=t.data;if(r){var a=t.headers&&(t.headers["content-type"]||t.headers["Content-Type"]);if(a&&a.includes("application/json"))try{var n=new FileReader;n.onload=function(){console.log("下载失败: ".concat(n.result))},n.readAsText(r)}catch(d){console.error("解析下载失败响应异常:",d)}else{var i=t.headers&&(t.headers["content-disposition"]||t.headers["Content-Disposition"]),o=l;if(i){var s=/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i.exec(i),c=s?s[1]||s[2]:"";if(c)try{o=decodeURIComponent(c)}catch(d){o=c}}var u=window.URL.createObjectURL(r),p=document.createElement("a");p.href=u,p.download=o,document.body.appendChild(p),p.click(),document.body.removeChild(p),window.URL.revokeObjectURL(u),e.$message({type:"success",message:"下载成功"}),console.log("下载开始,请查看浏览器下载列表")}}else console.log("下载失败,文件内容为空")})).catch((function(t){console.error("下载失败:",t),e.$message.error("下载失败,请稍后重试")})).finally((function(){e.downloadingTemplate=!1}))}else console.log("未配置下载地址")}},handleAdd:function(){this.$refs.addEngineModelModal.showModal("竞品")},handleAddSuccess:function(){this.loadData()},loadData:function(){var e=this,t=ca(ca({},nt.GET_ENGINE_LIST_SELF),{},{params:ca({page:this.pagination.currentPage,size:this.pagination.pageSize,ycOrOth:"竞品"},this.searchPanelValue),disableSuccessMsg:!0});console.log(this.pagination.currentPage,this.pagination.pageSize,"request"),this.$request(t).asyncThen((function(t){e.tableData=t.data.list,e.pagination.total=t.data.totalCount})).asyncErrorCatch((function(e){console.error("查询失败:",e)}))}}},ma=fa,ga=(r("8e43"),p(ma,ia,oa,!1,null,null,null)),va=ga.exports,ya=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"apaas-custom-check-data custom-page"},[r("div",{staticClass:"tab-header"},[r("el-tabs",{on:{"tab-click":e.handleTabClick},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[r("el-tab-pane",{attrs:{label:"机型参数查询",name:"model-query"}}),r("el-tab-pane",{attrs:{label:"对标报告查询",name:"benchmark-report"}}),r("el-tab-pane",{attrs:{label:"统计分析",name:"statistics"}})],1)],1),r("ModelQuery",{directives:[{name:"show",rawName:"v-show",value:"model-query"===e.activeTab,expression:"activeTab === 'model-query'"}]}),r("BenchmarkReport",{directives:[{name:"show",rawName:"v-show",value:"benchmark-report"===e.activeTab,expression:"activeTab === 'benchmark-report'"}]}),r("div",{directives:[{name:"show",rawName:"v-show",value:"statistics"===e.activeTab,expression:"activeTab === 'statistics'"}],staticClass:"statistics-tab tab-content"},[r("div",{staticClass:"page-search-panel"},[r("div",{staticClass:"search-fields"},[r("div",{staticClass:"search-row"},[r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("产品型号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.modelName,callback:function(t){e.$set(e.searchPanelValue,"modelName",t)},expression:"searchPanelValue.modelName"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("状态代号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.productNumber,callback:function(t){e.$set(e.searchPanelValue,"productNumber",t)},expression:"searchPanelValue.productNumber"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("项目名称")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.projectName,callback:function(t){e.$set(e.searchPanelValue,"projectName",t)},expression:"searchPanelValue.projectName"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("板块")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.plate,callback:function(t){e.$set(e.searchPanelValue,"plate",t)},expression:"searchPanelValue.plate"}})],1)]),r("div",{staticClass:"search-row"},[r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("平台")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.platform,callback:function(t){e.$set(e.searchPanelValue,"platform",t)},expression:"searchPanelValue.platform"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("系列")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.series,callback:function(t){e.$set(e.searchPanelValue,"series",t)},expression:"searchPanelValue.series"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("燃烧类型")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.burnType,callback:function(t){e.$set(e.searchPanelValue,"burnType",t)},expression:"searchPanelValue.burnType"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("排放")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.emission,callback:function(t){e.$set(e.searchPanelValue,"emission",t)},expression:"searchPanelValue.emission"}})],1)]),r("div",{staticClass:"search-row"},[r("div",{staticClass:"search-field range-field"},[r("span",{staticClass:"field-label"},[e._v("排量")]),r("div",{staticClass:"range-input-group"},[r("el-input",{staticClass:"range-input",attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.engineCapacityMin,callback:function(t){e.$set(e.searchPanelValue,"engineCapacityMin",t)},expression:"searchPanelValue.engineCapacityMin"}}),r("span",{staticClass:"range-separator"},[e._v("~")]),r("el-input",{staticClass:"range-input",attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.engineCapacityMax,callback:function(t){e.$set(e.searchPanelValue,"engineCapacityMax",t)},expression:"searchPanelValue.engineCapacityMax"}})],1)]),r("div",{staticClass:"search-actions"},[r("el-button",{attrs:{type:"primary"},on:{click:e.handleSearch}},[e._v(" 查询机型 ")]),r("el-button",{on:{click:e.resetSearch}},[e._v(" 重置 ")])],1)])])]),0===e.chartList.length?r("div",{staticClass:"chart-management-panel"},[r("el-button",{attrs:{type:"primary"},on:{click:e.handleAddChart}},[e._v(" 新增图表 ")])],1):e._e(),e.chartList.length>0?r("div",{staticClass:"floating-panel",class:{expanded:e.floatingPanelExpanded}},[r("div",{staticClass:"floating-panel-toggle",on:{click:e.toggleFloatingPanel}},[r("i",{class:e.floatingPanelExpanded?"el-icon-close":"el-icon-menu"})]),e.floatingPanelExpanded?r("div",{staticClass:"floating-panel-content"},[r("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.handleAddChart}},[r("i",{staticClass:"el-icon-plus"}),e._v(" 新增 ")]),r("el-button",{attrs:{size:"small"},on:{click:e.handleClearAllCharts}},[r("i",{staticClass:"el-icon-delete"}),e._v(" 清空 ")]),r("el-button",{attrs:{size:"small"},on:{click:e.scrollToTop}},[r("i",{staticClass:"el-icon-top"}),e._v(" 回到顶部 ")])],1):e._e()]):e._e(),e._l(e.chartList,(function(t,a){return r("div",{key:t.id,staticClass:"chart-area"},[r("div",{staticClass:"chart-header"},[r("div",{staticClass:"chart-title-section"},[t.isEditingTitle?r("el-input",{ref:"titleInput-"+a,refInFor:!0,staticClass:"title-input",on:{blur:function(e){t.isEditingTitle=!1}},nativeOn:{keyup:function(r){if(!r.type.indexOf("key")&&e._k(r.keyCode,"enter",13,r.key,"Enter"))return null;t.isEditingTitle=!1}},model:{value:t.title,callback:function(r){e.$set(t,"title",r)},expression:"chart.title"}}):r("span",{staticClass:"chart-title",on:{click:function(t){return e.startEditTitle(a)}}},[e._v(e._s(t.title))]),r("i",{staticClass:"el-icon-edit title-edit-icon",on:{click:function(t){return e.startEditTitle(a)}}})],1),r("div",{staticClass:"chart-header-right"},[r("el-select",{staticClass:"model-select",attrs:{placeholder:"选择机型",multiple:"","collapse-tags":"",clearable:""},model:{value:t.selectedModel,callback:function(r){e.$set(t,"selectedModel",r)},expression:"chart.selectedModel"}},e._l(e.availableModels,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),r("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.handleChartModelQuery(a)}}},[e._v(" 查询 ")]),r("el-button",{attrs:{size:"small"},on:{click:function(t){return e.handleChartModelReset(a)}}},[e._v(" 重置 ")])],1)]),r("div",{staticClass:"chart-config"},[r("div",{staticClass:"config-item"},[r("span",{staticClass:"config-label"},[e._v("图表类型:")]),r("el-select",{on:{change:function(t){return e.updateChart(a)}},model:{value:t.chartType,callback:function(r){e.$set(t,"chartType",r)},expression:"chart.chartType"}},[r("el-option",{attrs:{label:"散点图",value:"scatter"}}),r("el-option",{attrs:{label:"折线图",value:"line"}}),r("el-option",{attrs:{label:"柱状图",value:"bar"}})],1)],1),r("div",{staticClass:"config-item"},[r("span",{staticClass:"config-label"},[e._v("X轴:")]),r("el-select",{on:{change:function(t){return e.updateChart(a)}},model:{value:t.xAxis,callback:function(r){e.$set(t,"xAxis",r)},expression:"chart.xAxis"}},e._l(e.xAxisOptions,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),r("div",{staticClass:"config-item canshu"},[r("span",{staticClass:"config-label"},[e._v("Y轴(参数):")]),r("el-select",{staticClass:"y-axis-param-select",attrs:{filterable:"",multiple:"","collapse-tags":"",clearable:"","reserve-keyword":"",placeholder:"请选择或搜索参数"},on:{change:function(t){return e.updateChart(a)}},model:{value:t.yAxisParam,callback:function(r){e.$set(t,"yAxisParam",r)},expression:"chart.yAxisParam"}},e._l(e.yAxisParamOptions,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),r("div",{staticClass:"config-item"},[r("span",{staticClass:"config-label"},[e._v("Y轴(公式):")]),r("el-select",{attrs:{clearable:""},on:{change:function(t){return e.handleFormulaSelectChange(a)}},model:{value:t.yAxisFormula,callback:function(r){e.$set(t,"yAxisFormula",r)},expression:"chart.yAxisFormula"}},e._l(e.savedFormulas,(function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1),r("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.handleEditFormula(a)}}},[e._v(" 添加/修改公式 ")])],1),"pie"!==t.chartType?r("div",{staticClass:"config-item"},[r("span",{staticClass:"config-label"},[e._v("Y轴范围:")]),r("el-input",{staticClass:"y-axis-range-input",attrs:{placeholder:"最小值"},on:{blur:function(t){return e.updateChart(a)}},model:{value:t.yAxisMin,callback:function(r){e.$set(t,"yAxisMin",e._n(r))},expression:"chart.yAxisMin"}}),r("span",{staticClass:"range-separator"},[e._v("~")]),r("el-input",{staticClass:"y-axis-range-input",attrs:{placeholder:"最大值"},on:{blur:function(t){return e.updateChart(a)}},model:{value:t.yAxisMax,callback:function(r){e.$set(t,"yAxisMax",e._n(r))},expression:"chart.yAxisMax"}})],1):e._e(),"pie"!==t.chartType?r("div",{staticClass:"config-item"},[r("span",{staticClass:"config-label"},[e._v("坐标点:")]),r("el-input",{staticClass:"y-axis-range-input",attrs:{placeholder:e.getCustomPointXPlaceholder(t)},on:{blur:function(t){return e.updateChart(a)}},model:{value:t.customPointX,callback:function(r){e.$set(t,"customPointX",e._n(r))},expression:"chart.customPointX"}}),r("span",{staticClass:"range-separator"},[e._v(",")]),r("el-input",{staticClass:"y-axis-range-input",attrs:{placeholder:"Y坐标(百分比)"},on:{blur:function(t){return e.updateChart(a)}},model:{value:t.customPointY,callback:function(r){e.$set(t,"customPointY",e._n(r))},expression:"chart.customPointY"}})],1):e._e()]),r("div",{staticClass:"chart-wrapper"},[r("div",{staticClass:"delete-button",on:{click:function(t){return e.handleDeleteChart(a)}}},[r("i",{staticClass:"el-icon-delete"}),r("span",[e._v("删除")])]),r("div",{ref:"chartContainer-"+a,refInFor:!0,staticClass:"chart-container",style:{height:t.chartHeight+"px"}}),r("div",{staticClass:"chart-resize-handle",on:{mousedown:function(t){return e.startResize(a,t)}}})])])})),r("el-dialog",{staticClass:"formula-dialog",attrs:{title:e.currentFormulaId?"修改公式":"添加公式",visible:e.formulaDialogVisible,width:"600px","close-on-click-modal":!0,modal:!1},on:{"update:visible":function(t){e.formulaDialogVisible=t}}},[r("div",{staticClass:"formula-dialog-content"},[r("el-form",{attrs:{model:e.formulaFormData,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"公式名称:",required:""}},[r("el-input",{attrs:{placeholder:"请输入公式名称",maxlength:"50","show-word-limit":""},model:{value:e.formulaFormData.name,callback:function(t){e.$set(e.formulaFormData,"name",t)},expression:"formulaFormData.name"}})],1),r("el-form-item",{attrs:{label:"参数1:",required:""}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择参数"},model:{value:e.formulaFormData.param1,callback:function(t){e.$set(e.formulaFormData,"param1",t)},expression:"formulaFormData.param1"}},e._l(e.yAxisParamOptions,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),r("el-form-item",{attrs:{label:"运算符:",required:""}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择运算符"},model:{value:e.formulaFormData.operator,callback:function(t){e.$set(e.formulaFormData,"operator",t)},expression:"formulaFormData.operator"}},e._l(e.operatorOptions,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),r("el-form-item",{attrs:{label:"参数2:",required:""}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择参数"},model:{value:e.formulaFormData.param2,callback:function(t){e.$set(e.formulaFormData,"param2",t)},expression:"formulaFormData.param2"}},e._l(e.yAxisParamOptions,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),r("el-form-item",{attrs:{label:"公式预览:"}},[r("div",{staticClass:"formula-preview"},[e._v(" "+e._s(e.getFormulaPreview())+" ")])])],1)],1),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleFormulaDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",disabled:!e.isFormulaValid},on:{click:e.handleSaveFormula}},[e._v(" 确定 ")])],1)])],2),"analysis-report"===e.activeTab?r("AnalysisReport"):e._e()],1)},ba=[],_a=function(e,t){return _a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},_a(e,t)};function xa(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}_a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}Object.create;Object.create;var wa=r("22d1"),Sa=r("6d8b"),Da=function(e,t){return Da=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},Da(e,t)};function Ca(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Da(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}Object.create;Object.create;function Ta(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function Ia(e,t){return e[0]=t[0],e[1]=t[1],e}function Oa(e){return[e[0],e[1]]}function Ma(e,t,r){return e[0]=t,e[1]=r,e}function Aa(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function ka(e,t,r,a){return e[0]=t[0]+r[0]*a,e[1]=t[1]+r[1]*a,e}function Pa(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function Na(e){return Math.sqrt(Ea(e))}function Ea(e){return e[0]*e[0]+e[1]*e[1]}function Ra(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function La(e,t){var r=Na(t);return 0===r?(e[0]=0,e[1]=0):(e[0]=t[0]/r,e[1]=t[1]/r),e}function ja(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Fa=ja;function Va(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var za=Va;function Ba(e,t,r,a){return e[0]=t[0]+a*(r[0]-t[0]),e[1]=t[1]+a*(r[1]-t[1]),e}function $a(e,t,r){var a=t[0],n=t[1];return e[0]=r[0]*a+r[2]*n+r[4],e[1]=r[1]*a+r[3]*n+r[5],e}function Ga(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function Ua(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}var Wa=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),Ha=function(){function e(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(e){var t=e.target;while(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 Wa(t,e),"dragstart",e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var r=e.offsetX,a=e.offsetY,n=r-this._x,i=a-this._y;this._x=r,this._y=a,t.drift(n,i,e),this.handler.dispatchToElement(new Wa(t,e),"drag",e.event);var o=this.handler.findHover(r,a,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new Wa(s,e),"dragleave",e.event),o&&o!==s&&this.handler.dispatchToElement(new Wa(o,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Wa(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Wa(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}(),qa=Ha,Ya=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,r,a){this._$handlers||(this._$handlers={});var n=this._$handlers;if("function"===typeof t&&(a=r,r=t,t=null),!r||!e)return this;var i=this._$eventProcessor;null!=t&&i&&i.normalizeQuery&&(t=i.normalizeQuery(t)),n[e]||(n[e]=[]);for(var o=0;o<n[e].length;o++)if(n[e][o].h===r)return this;var s={h:r,query:t,ctx:a||this,callAtLast:r.zrEventfulCallAtLast},l=n[e].length-1,c=n[e][l];return c&&c.callAtLast?n[e].splice(l,0,s):n[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var r=this._$handlers;if(!r)return this;if(!e)return this._$handlers={},this;if(t){if(r[e]){for(var a=[],n=0,i=r[e].length;n<i;n++)r[e][n].h!==t&&a.push(r[e][n]);r[e]=a}r[e]&&0===r[e].length&&delete r[e]}else delete r[e];return this},e.prototype.trigger=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(!this._$handlers)return this;var a=this._$handlers[e],n=this._$eventProcessor;if(a)for(var i=t.length,o=a.length,s=0;s<o;s++){var l=a[s];if(!n||!n.filter||null==l.query||n.filter(e,l.query))switch(i){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,t[0]);break;case 2:l.h.call(l.ctx,t[0],t[1]);break;default:l.h.apply(l.ctx,t);break}}return n&&n.afterTrigger&&n.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(!this._$handlers)return this;var a=this._$handlers[e],n=this._$eventProcessor;if(a)for(var i=t.length,o=t[i-1],s=a.length,l=0;l<s;l++){var c=a[l];if(!n||!n.filter||null==c.query||n.filter(e,c.query))switch(i){case 0:c.h.call(o);break;case 1:c.h.call(o,t[0]);break;case 2:c.h.call(o,t[0],t[1]);break;default:c.h.apply(o,t.slice(1,i-1));break}}return n&&n.afterTrigger&&n.afterTrigger(e),this},e}(),Xa=Ya,Za=Math.log(2);function Ka(e,t,r,a,n,i){var o=a+"-"+n,s=e.length;if(i.hasOwnProperty(o))return i[o];if(1===t){var l=Math.round(Math.log((1<<s)-1&~n)/Za);return e[r][l]}var c=a|1<<r,u=r+1;while(a&1<<u)u++;for(var p=0,d=0,h=0;d<s;d++){var f=1<<d;f&n||(p+=(h%2?-1:1)*e[r][d]*Ka(e,t-1,u,c,n|f,i),h++)}return i[o]=p,p}function Ja(e,t){var r=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],a={},n=Ka(r,8,0,0,0,a);if(0!==n){for(var i=[],o=0;o<8;o++)for(var s=0;s<8;s++)null==i[s]&&(i[s]=0),i[s]+=((o+s)%2?-1:1)*Ka(r,7,0===o?1:0,1<<o,1<<s,a)/n*t[o];return function(e,t,r){var a=t*i[6]+r*i[7]+1;e[0]=(t*i[0]+r*i[1]+i[2])/a,e[1]=(t*i[3]+r*i[4]+i[5])/a}}}var Qa="___zrEVENTSAVED",en=[];function tn(e,t,r,a,n){return rn(en,t,a,n,!0)&&rn(e,r,en[0],en[1])}function rn(e,t,r,a,n){if(t.getBoundingClientRect&&wa["a"].domSupported&&!on(t)){var i=t[Qa]||(t[Qa]={}),o=an(t,i),s=nn(o,i,n);if(s)return s(e,r,a),!0}return!1}function an(e,t){var r=t.markers;if(r)return r;r=t.markers=[];for(var a=["left","right"],n=["top","bottom"],i=0;i<4;i++){var o=document.createElement("div"),s=o.style,l=i%2,c=(i>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",n[c]+":0",a[1-l]+":auto",n[1-c]+":auto",""].join("!important;"),e.appendChild(o),r.push(o)}return r}function nn(e,t,r){for(var a=r?"invTrans":"trans",n=t[a],i=t.srcCoords,o=[],s=[],l=!0,c=0;c<4;c++){var u=e[c].getBoundingClientRect(),p=2*c,d=u.left,h=u.top;o.push(d,h),l=l&&i&&d===i[p]&&h===i[p+1],s.push(e[c].offsetLeft,e[c].offsetTop)}return l&&n?n:(t.srcCoords=o,t[a]=r?Ja(s,o):Ja(o,s))}function on(e){return"CANVAS"===e.nodeName.toUpperCase()}var sn=/([&<>"'])/g,ln={"&":"&","<":"<",">":">",'"':""","'":"'"};function cn(e){return null==e?"":(e+"").replace(sn,(function(e,t){return ln[t]}))}var un=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,pn=[],dn=wa["a"].browser.firefox&&+wa["a"].browser.version.split(".")[0]<39;function hn(e,t,r,a){return r=r||{},a?fn(e,t,r):dn&&null!=t.layerX&&t.layerX!==t.offsetX?(r.zrX=t.layerX,r.zrY=t.layerY):null!=t.offsetX?(r.zrX=t.offsetX,r.zrY=t.offsetY):fn(e,t,r),r}function fn(e,t,r){if(wa["a"].domSupported&&e.getBoundingClientRect){var a=t.clientX,n=t.clientY;if(on(e)){var i=e.getBoundingClientRect();return r.zrX=a-i.left,void(r.zrY=n-i.top)}if(rn(pn,e,a,n))return r.zrX=pn[0],void(r.zrY=pn[1])}r.zrX=r.zrY=0}function mn(e){return e||window.event}function gn(e,t,r){if(t=mn(t),null!=t.zrX)return t;var a=t.type,n=a&&a.indexOf("touch")>=0;if(n){var i="touchend"!==a?t.targetTouches[0]:t.changedTouches[0];i&&hn(e,i,t,r)}else{hn(e,t,t,r);var o=vn(t);t.zrDelta=o?o/120:-(t.detail||0)/3}var s=t.button;return null==t.which&&void 0!==s&&un.test(t.type)&&(t.which=1&s?1:2&s?3:4&s?2:0),t}function vn(e){var t=e.wheelDelta;if(t)return t;var r=e.deltaX,a=e.deltaY;if(null==r||null==a)return t;var n=0!==a?Math.abs(a):Math.abs(r),i=a>0?-1:a<0?1:r>0?-1:1;return 3*n*i}function yn(e,t,r,a){e.addEventListener(t,r,a)}function bn(e,t,r,a){e.removeEventListener(t,r,a)}var _n=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function xn(e){return 2===e.which||3===e.which}var wn=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,r){return this._doTrack(e,t,r),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,r){var a=e.touches;if(a){for(var n={points:[],touches:[],target:t,event:e},i=0,o=a.length;i<o;i++){var s=a[i],l=hn(r,s,{});n.points.push([l.zrX,l.zrY]),n.touches.push(s)}this._track.push(n)}},e.prototype._recognize=function(e){for(var t in Cn)if(Cn.hasOwnProperty(t)){var r=Cn[t](this._track,e);if(r)return r}},e}();function Sn(e){var t=e[1][0]-e[0][0],r=e[1][1]-e[0][1];return Math.sqrt(t*t+r*r)}function Dn(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var Cn={pinch:function(e,t){var r=e.length;if(r){var a=(e[r-1]||{}).points,n=(e[r-2]||{}).points||a;if(n&&n.length>1&&a&&a.length>1){var i=Sn(a)/Sn(n);!isFinite(i)&&(i=1),t.pinchScale=i;var o=Dn(a);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function Tn(){return[1,0,0,1,0,0]}function In(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function On(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Mn(e,t,r){var a=t[0]*r[0]+t[2]*r[1],n=t[1]*r[0]+t[3]*r[1],i=t[0]*r[2]+t[2]*r[3],o=t[1]*r[2]+t[3]*r[3],s=t[0]*r[4]+t[2]*r[5]+t[4],l=t[1]*r[4]+t[3]*r[5]+t[5];return e[0]=a,e[1]=n,e[2]=i,e[3]=o,e[4]=s,e[5]=l,e}function An(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e}function kn(e,t,r,a){void 0===a&&(a=[0,0]);var n=t[0],i=t[2],o=t[4],s=t[1],l=t[3],c=t[5],u=Math.sin(r),p=Math.cos(r);return e[0]=n*p+s*u,e[1]=-n*u+s*p,e[2]=i*p+l*u,e[3]=-i*u+p*l,e[4]=p*(o-a[0])+u*(c-a[1])+a[0],e[5]=p*(c-a[1])-u*(o-a[0])+a[1],e}function Pn(e,t,r){var a=r[0],n=r[1];return e[0]=t[0]*a,e[1]=t[1]*n,e[2]=t[2]*a,e[3]=t[3]*n,e[4]=t[4]*a,e[5]=t[5]*n,e}function Nn(e,t){var r=t[0],a=t[2],n=t[4],i=t[1],o=t[3],s=t[5],l=r*o-i*a;return l?(l=1/l,e[0]=o*l,e[1]=-i*l,e[2]=-a*l,e[3]=r*l,e[4]=(a*s-o*n)*l,e[5]=(i*n-r*s)*l,e):null}function En(e){var t=Tn();return On(t,e),t}var Rn=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,r=this.y-e.y;return Math.sqrt(t*t+r*r)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,r=this.y-e.y;return t*t+r*r},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,r=this.y;return this.x=e[0]*t+e[2]*r+e[4],this.y=e[1]*t+e[3]*r+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,r){e.x=t,e.y=r},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,r){e.x=t.x+r.x,e.y=t.y+r.y},e.sub=function(e,t,r){e.x=t.x-r.x,e.y=t.y-r.y},e.scale=function(e,t,r){e.x=t.x*r,e.y=t.y*r},e.scaleAndAdd=function(e,t,r,a){e.x=t.x+r.x*a,e.y=t.y+r.y*a},e.lerp=function(e,t,r,a){var n=1-a;e.x=n*t.x+a*r.x,e.y=n*t.y+a*r.y},e}(),Ln=Rn,jn=Math.min,Fn=Math.max,Vn=new Ln,zn=new Ln,Bn=new Ln,$n=new Ln,Gn=new Ln,Un=new Ln,Wn=function(){function e(e,t,r,a){r<0&&(e+=r,r=-r),a<0&&(t+=a,a=-a),this.x=e,this.y=t,this.width=r,this.height=a}return e.prototype.union=function(e){var t=jn(e.x,this.x),r=jn(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Fn(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Fn(e.y+e.height,this.y+this.height)-r:this.height=e.height,this.x=t,this.y=r},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,r=e.width/t.width,a=e.height/t.height,n=Tn();return An(n,n,[-t.x,-t.y]),Pn(n,n,[r,a]),An(n,n,[e.x,e.y]),n},e.prototype.intersect=function(t,r){if(!t)return!1;t instanceof e||(t=e.create(t));var a=this,n=a.x,i=a.x+a.width,o=a.y,s=a.y+a.height,l=t.x,c=t.x+t.width,u=t.y,p=t.y+t.height,d=!(i<l||c<n||s<u||p<o);if(r){var h=1/0,f=0,m=Math.abs(i-l),g=Math.abs(c-n),v=Math.abs(s-u),y=Math.abs(p-o),b=Math.min(m,g),_=Math.min(v,y);i<l||c<n?b>f&&(f=b,m<g?Ln.set(Un,-m,0):Ln.set(Un,g,0)):b<h&&(h=b,m<g?Ln.set(Gn,m,0):Ln.set(Gn,-g,0)),s<u||p<o?_>f&&(f=_,v<y?Ln.set(Un,0,-v):Ln.set(Un,0,y)):b<h&&(h=b,v<y?Ln.set(Gn,0,v):Ln.set(Gn,0,-y))}return r&&Ln.copy(r,d?Gn:Un),d},e.prototype.contain=function(e,t){var r=this;return e>=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return 0===this.width||0===this.height},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,r,a){if(a){if(a[1]<1e-5&&a[1]>-1e-5&&a[2]<1e-5&&a[2]>-1e-5){var n=a[0],i=a[3],o=a[4],s=a[5];return t.x=r.x*n+o,t.y=r.y*i+s,t.width=r.width*n,t.height=r.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}Vn.x=Bn.x=r.x,Vn.y=$n.y=r.y,zn.x=$n.x=r.x+r.width,zn.y=Bn.y=r.y+r.height,Vn.transform(a),$n.transform(a),zn.transform(a),Bn.transform(a),t.x=jn(Vn.x,zn.x,Bn.x,$n.x),t.y=jn(Vn.y,zn.y,Bn.y,$n.y);var l=Fn(Vn.x,zn.x,Bn.x,$n.x),c=Fn(Vn.y,zn.y,Bn.y,$n.y);t.width=l-t.x,t.height=c-t.y}else t!==r&&e.copy(t,r)},e}(),Hn=Wn,qn="silent";function Yn(e,t,r){return{type:e,event:r,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:Xn}}function Xn(){_n(this.event)}var Zn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return Ca(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Xa),Kn=function(){function e(e,t){this.x=e,this.y=t}return e}(),Jn=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Qn=new Hn(0,0,0,0),ei=function(e){function t(t,r,a,n,i){var o=e.call(this)||this;return o._hovered=new Kn(0,0),o.storage=t,o.painter=r,o.painterRoot=n,o._pointerSize=i,a=a||new Zn,o.proxy=null,o.setHandlerProxy(a),o._draggingMgr=new qa(o),o}return Ca(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(Sa["k"](Jn,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,r=e.zrY,a=ai(this,t,r),n=this._hovered,i=n.target;i&&!i.__zr&&(n=this.findHover(n.x,n.y),i=n.target);var o=this._hovered=a?new Kn(t,r):this.findHover(t,r),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),i&&s!==i&&this.dispatchToElement(n,"mouseout",e),this.dispatchToElement(o,"mousemove",e),s&&s!==i&&this.dispatchToElement(o,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new Kn(0,0)},t.prototype.dispatch=function(e,t){var r=this[e];r&&r.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,r){e=e||{};var a=e.target;if(!a||!a.silent){var n="on"+t,i=Yn(t,e,r);while(a)if(a[n]&&(i.cancelBubble=!!a[n].call(a,i)),a.trigger(t,i),a=a.__hostTarget?a.__hostTarget:a.parent,i.cancelBubble)break;i.cancelBubble||(this.trigger(t,i),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(e){"function"===typeof e[n]&&e[n].call(e,i),e.trigger&&e.trigger(t,i)})))}},t.prototype.findHover=function(e,t,r){var a=this.storage.getDisplayList(),n=new Kn(e,t);if(ri(a,n,e,t,r),this._pointerSize&&!n.target){for(var i=[],o=this._pointerSize,s=o/2,l=new Hn(e-s,t-s,o,o),c=a.length-1;c>=0;c--){var u=a[c];u===r||u.ignore||u.ignoreCoarsePointer||u.parent&&u.parent.ignoreCoarsePointer||(Qn.copy(u.getBoundingRect()),u.transform&&Qn.applyTransform(u.transform),Qn.intersect(l)&&i.push(u))}if(i.length)for(var p=4,d=Math.PI/12,h=2*Math.PI,f=0;f<s;f+=p)for(var m=0;m<h;m+=d){var g=e+f*Math.cos(m),v=t+f*Math.sin(m);if(ri(i,n,g,v,r),n.target)return n}}return n},t.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new wn);var r=this._gestureMgr;"start"===t&&r.clear();var a=r.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&r.clear(),a){var n=a.type;e.gestureEvent=n;var i=new Kn;i.target=a.target,this.dispatchToElement(i,n,a.event)}},t}(Xa);function ti(e,t,r){if(e[e.rectHover?"rectContain":"contain"](t,r)){var a=e,n=void 0,i=!1;while(a){if(a.ignoreClip&&(i=!0),!i){var o=a.getClipPath();if(o&&!o.contain(t,r))return!1}a.silent&&(n=!0);var s=a.__hostTarget;a=s||a.parent}return!n||qn}return!1}function ri(e,t,r,a,n){for(var i=e.length-1;i>=0;i--){var o=e[i],s=void 0;if(o!==n&&!o.ignore&&(s=ti(o,r,a))&&(!t.topTarget&&(t.topTarget=o),s!==qn)){t.target=o;break}}}function ai(e,t,r){var a=e.painter;return t<0||t>a.getWidth()||r<0||r>a.getHeight()}Sa["k"](["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){ei.prototype[e]=function(t){var r,a,n=t.zrX,i=t.zrY,o=ai(this,n,i);if("mouseup"===e&&o||(r=this.findHover(n,i),a=r.target),"mousedown"===e)this._downEl=a,this._downPoint=[t.zrX,t.zrY],this._upEl=a;else if("mouseup"===e)this._upEl=a;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||Fa(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(r,e,t)}}));var ni=ei,ii=32,oi=7;function si(e){var t=0;while(e>=ii)t|=1&e,e>>=1;return e+t}function li(e,t,r,a){var n=t+1;if(n===r)return 1;if(a(e[n++],e[t])<0){while(n<r&&a(e[n],e[n-1])<0)n++;ci(e,t,n)}else while(n<r&&a(e[n],e[n-1])>=0)n++;return n-t}function ci(e,t,r){r--;while(t<r){var a=e[t];e[t++]=e[r],e[r--]=a}}function ui(e,t,r,a,n){for(a===t&&a++;a<r;a++){var i,o=e[a],s=t,l=a;while(s<l)i=s+l>>>1,n(o,e[i])<0?l=i:s=i+1;var c=a-s;switch(c){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:while(c>0)e[s+c]=e[s+c-1],c--}e[s]=o}}function pi(e,t,r,a,n,i){var o=0,s=0,l=1;if(i(e,t[r+n])>0){s=a-n;while(l<s&&i(e,t[r+n+l])>0)o=l,l=1+(l<<1),l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{s=n+1;while(l<s&&i(e,t[r+n-l])<=0)o=l,l=1+(l<<1),l<=0&&(l=s);l>s&&(l=s);var c=o;o=n-l,l=n-c}o++;while(o<l){var u=o+(l-o>>>1);i(e,t[r+u])>0?o=u+1:l=u}return l}function di(e,t,r,a,n,i){var o=0,s=0,l=1;if(i(e,t[r+n])<0){s=n+1;while(l<s&&i(e,t[r+n-l])<0)o=l,l=1+(l<<1),l<=0&&(l=s);l>s&&(l=s);var c=o;o=n-l,l=n-c}else{s=a-n;while(l<s&&i(e,t[r+n+l])>=0)o=l,l=1+(l<<1),l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}o++;while(o<l){var u=o+(l-o>>>1);i(e,t[r+u])<0?l=u:o=u+1}return l}function hi(e,t){var r,a,n=oi,i=0,o=[];function s(e,t){r[i]=e,a[i]=t,i+=1}function l(){while(i>1){var e=i-2;if(e>=1&&a[e-1]<=a[e]+a[e+1]||e>=2&&a[e-2]<=a[e]+a[e-1])a[e-1]<a[e+1]&&e--;else if(a[e]>a[e+1])break;u(e)}}function c(){while(i>1){var e=i-2;e>0&&a[e-1]<a[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=a[n],l=r[n+1],c=a[n+1];a[n]=s+c,n===i-3&&(r[n+1]=r[n+2],a[n+1]=a[n+2]),i--;var u=di(e[l],e,o,s,0,t);o+=u,s-=u,0!==s&&(c=pi(e[o+s-1],e,l,c,c-1,t),0!==c&&(s<=c?p(o,s,l,c):d(o,s,l,c)))}function p(r,a,i,s){var l=0;for(l=0;l<a;l++)o[l]=e[r+l];var c=0,u=i,p=r;if(e[p++]=e[u++],0!==--s)if(1!==a){var d,h,f,m=n;while(1){d=0,h=0,f=!1;do{if(t(e[u],o[c])<0){if(e[p++]=e[u++],h++,d=0,0===--s){f=!0;break}}else if(e[p++]=o[c++],d++,h=0,1===--a){f=!0;break}}while((d|h)<m);if(f)break;do{if(d=di(e[u],o,c,a,0,t),0!==d){for(l=0;l<d;l++)e[p+l]=o[c+l];if(p+=d,c+=d,a-=d,a<=1){f=!0;break}}if(e[p++]=e[u++],0===--s){f=!0;break}if(h=pi(o[c],e,u,s,0,t),0!==h){for(l=0;l<h;l++)e[p+l]=e[u+l];if(p+=h,u+=h,s-=h,0===s){f=!0;break}}if(e[p++]=o[c++],1===--a){f=!0;break}m--}while(d>=oi||h>=oi);if(f)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),1===a){for(l=0;l<s;l++)e[p+l]=e[u+l];e[p+s]=o[c]}else{if(0===a)throw new Error;for(l=0;l<a;l++)e[p+l]=o[c+l]}}else{for(l=0;l<s;l++)e[p+l]=e[u+l];e[p+s]=o[c]}else for(l=0;l<a;l++)e[p+l]=o[c+l]}function d(r,a,i,s){var l=0;for(l=0;l<s;l++)o[l]=e[i+l];var c=r+a-1,u=s-1,p=i+s-1,d=0,h=0;if(e[p--]=e[c--],0!==--a)if(1!==s){var f=n;while(1){var m=0,g=0,v=!1;do{if(t(o[u],e[c])<0){if(e[p--]=e[c--],m++,g=0,0===--a){v=!0;break}}else if(e[p--]=o[u--],g++,m=0,1===--s){v=!0;break}}while((m|g)<f);if(v)break;do{if(m=a-di(o[u],e,r,a,a-1,t),0!==m){for(p-=m,c-=m,a-=m,h=p+1,d=c+1,l=m-1;l>=0;l--)e[h+l]=e[d+l];if(0===a){v=!0;break}}if(e[p--]=o[u--],1===--s){v=!0;break}if(g=s-pi(e[c],o,0,s,s-1,t),0!==g){for(p-=g,u-=g,s-=g,h=p+1,d=u+1,l=0;l<g;l++)e[h+l]=o[d+l];if(s<=1){v=!0;break}}if(e[p--]=e[c--],0===--a){v=!0;break}f--}while(m>=oi||g>=oi);if(v)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),1===s){for(p-=a,c-=a,h=p+1,d=c+1,l=a-1;l>=0;l--)e[h+l]=e[d+l];e[p]=o[u]}else{if(0===s)throw new Error;for(d=p-(s-1),l=0;l<s;l++)e[d+l]=o[l]}}else{for(p-=a,c-=a,h=p+1,d=c+1,l=a-1;l>=0;l--)e[h+l]=e[d+l];e[p]=o[u]}else for(d=p-(s-1),l=0;l<s;l++)e[d+l]=o[l]}return r=[],a=[],{mergeRuns:l,forceMergeRuns:c,pushRun:s}}function fi(e,t,r,a){r||(r=0),a||(a=e.length);var n=a-r;if(!(n<2)){var i=0;if(n<ii)return i=li(e,r,a,t),void ui(e,r,a,r+i,t);var o=hi(e,t),s=si(n);do{if(i=li(e,r,a,t),i<s){var l=n;l>s&&(l=s),ui(e,r,r+l,r+i,t),i=l}o.pushRun(r,i),o.mergeRuns(),n-=i,r+=i}while(0!==n);o.forceMergeRuns()}}var mi=1,gi=2,vi=4,yi=!1;function bi(){yi||(yi=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function _i(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var xi,wi=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=_i}return e.prototype.traverse=function(e,t){for(var r=0;r<this._roots.length;r++)this._roots[r].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t=t||!1;var r=this._displayList;return!e&&r.length||this.updateDisplayList(t),r},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,r=this._displayList,a=0,n=t.length;a<n;a++)this._updateAndAddDisplayable(t[a],null,e);r.length=this._displayListLen,fi(r,_i)},e.prototype._updateAndAddDisplayable=function(e,t,r){if(!e.ignore||r){e.beforeUpdate(),e.update(),e.afterUpdate();var a=e.getClipPath();if(e.ignoreClip)t=null;else if(a){t=t?t.slice():[];var n=a,i=e;while(n)n.parent=i,n.updateTransform(),t.push(n),i=n,n=n.getClipPath()}if(e.childrenRef){for(var o=e.childrenRef(),s=0;s<o.length;s++){var l=o[s];e.__dirty&&(l.__dirty|=mi),this._updateAndAddDisplayable(l,t,r)}e.__dirty=0}else{var c=e;t&&t.length?c.__clipPaths=t:c.__clipPaths&&c.__clipPaths.length>0&&(c.__clipPaths=[]),isNaN(c.z)&&(bi(),c.z=0),isNaN(c.z2)&&(bi(),c.z2=0),isNaN(c.zlevel)&&(bi(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var u=e.getDecalElement&&e.getDecalElement();u&&this._updateAndAddDisplayable(u,t,r);var p=e.getTextGuideLine();p&&this._updateAndAddDisplayable(p,t,r);var d=e.getTextContent();d&&this._updateAndAddDisplayable(d,t,r)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,r=e.length;t<r;t++)this.delRoot(e[t]);else{var a=Sa["r"](this._roots,e);a>=0&&this._roots.splice(a,1)}},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Si=wi;xi=wa["a"].hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var Di=xi,Ci={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,r=.1,a=.4;return 0===e?0:1===e?1:(!r||r<1?(r=1,t=a/4):t=a*Math.asin(1/r)/(2*Math.PI),-r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/a))},elasticOut:function(e){var t,r=.1,a=.4;return 0===e?0:1===e?1:(!r||r<1?(r=1,t=a/4):t=a*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/a)+1)},elasticInOut:function(e){var t,r=.1,a=.4;return 0===e?0:1===e?1:(!r||r<1?(r=1,t=a/4):t=a*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/a)*-.5:r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/a)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Ci.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*Ci.bounceIn(2*e):.5*Ci.bounceOut(2*e-1)+.5}},Ti=Ci,Ii=Math.pow,Oi=Math.sqrt,Mi=1e-8,Ai=1e-4,ki=Oi(3),Pi=1/3,Ni=Ta(),Ei=Ta(),Ri=Ta();function Li(e){return e>-Mi&&e<Mi}function ji(e){return e>Mi||e<-Mi}function Fi(e,t,r,a,n){var i=1-n;return i*i*(i*e+3*n*t)+n*n*(n*a+3*i*r)}function Vi(e,t,r,a,n){var i=1-n;return 3*(((t-e)*i+2*(r-t)*n)*i+(a-r)*n*n)}function zi(e,t,r,a,n,i){var o=a+3*(t-r)-e,s=3*(r-2*t+e),l=3*(t-e),c=e-n,u=s*s-3*o*l,p=s*l-9*o*c,d=l*l-3*s*c,h=0;if(Li(u)&&Li(p))if(Li(s))i[0]=0;else{var f=-l/s;f>=0&&f<=1&&(i[h++]=f)}else{var m=p*p-4*u*d;if(Li(m)){var g=p/u,v=(f=-s/o+g,-g/2);f>=0&&f<=1&&(i[h++]=f),v>=0&&v<=1&&(i[h++]=v)}else if(m>0){var y=Oi(m),b=u*s+1.5*o*(-p+y),_=u*s+1.5*o*(-p-y);b=b<0?-Ii(-b,Pi):Ii(b,Pi),_=_<0?-Ii(-_,Pi):Ii(_,Pi);f=(-s-(b+_))/(3*o);f>=0&&f<=1&&(i[h++]=f)}else{var x=(2*u*s-3*o*p)/(2*Oi(u*u*u)),w=Math.acos(x)/3,S=Oi(u),D=Math.cos(w),C=(f=(-s-2*S*D)/(3*o),v=(-s+S*(D+ki*Math.sin(w)))/(3*o),(-s+S*(D-ki*Math.sin(w)))/(3*o));f>=0&&f<=1&&(i[h++]=f),v>=0&&v<=1&&(i[h++]=v),C>=0&&C<=1&&(i[h++]=C)}}return h}function Bi(e,t,r,a,n){var i=6*r-12*t+6*e,o=9*t+3*a-3*e-9*r,s=3*t-3*e,l=0;if(Li(o)){if(ji(i)){var c=-s/i;c>=0&&c<=1&&(n[l++]=c)}}else{var u=i*i-4*o*s;if(Li(u))n[0]=-i/(2*o);else if(u>0){var p=Oi(u),d=(c=(-i+p)/(2*o),(-i-p)/(2*o));c>=0&&c<=1&&(n[l++]=c),d>=0&&d<=1&&(n[l++]=d)}}return l}function $i(e,t,r,a,n,i){var o=(t-e)*n+e,s=(r-t)*n+t,l=(a-r)*n+r,c=(s-o)*n+o,u=(l-s)*n+s,p=(u-c)*n+c;i[0]=e,i[1]=o,i[2]=c,i[3]=p,i[4]=p,i[5]=u,i[6]=l,i[7]=a}function Gi(e,t,r,a,n,i,o,s,l,c,u){var p,d,h,f,m,g=.005,v=1/0;Ni[0]=l,Ni[1]=c;for(var y=0;y<1;y+=.05)Ei[0]=Fi(e,r,n,o,y),Ei[1]=Fi(t,a,i,s,y),f=za(Ni,Ei),f<v&&(p=y,v=f);v=1/0;for(var b=0;b<32;b++){if(g<Ai)break;d=p-g,h=p+g,Ei[0]=Fi(e,r,n,o,d),Ei[1]=Fi(t,a,i,s,d),f=za(Ei,Ni),d>=0&&f<v?(p=d,v=f):(Ri[0]=Fi(e,r,n,o,h),Ri[1]=Fi(t,a,i,s,h),m=za(Ri,Ni),h<=1&&m<v?(p=h,v=m):g*=.5)}return u&&(u[0]=Fi(e,r,n,o,p),u[1]=Fi(t,a,i,s,p)),Oi(v)}function Ui(e,t,r,a,n,i,o,s,l){for(var c=e,u=t,p=0,d=1/l,h=1;h<=l;h++){var f=h*d,m=Fi(e,r,n,o,f),g=Fi(t,a,i,s,f),v=m-c,y=g-u;p+=Math.sqrt(v*v+y*y),c=m,u=g}return p}function Wi(e,t,r,a){var n=1-a;return n*(n*e+2*a*t)+a*a*r}function Hi(e,t,r,a){return 2*((1-a)*(t-e)+a*(r-t))}function qi(e,t,r,a,n){var i=e-2*t+r,o=2*(t-e),s=e-a,l=0;if(Li(i)){if(ji(o)){var c=-s/o;c>=0&&c<=1&&(n[l++]=c)}}else{var u=o*o-4*i*s;if(Li(u)){c=-o/(2*i);c>=0&&c<=1&&(n[l++]=c)}else if(u>0){var p=Oi(u),d=(c=(-o+p)/(2*i),(-o-p)/(2*i));c>=0&&c<=1&&(n[l++]=c),d>=0&&d<=1&&(n[l++]=d)}}return l}function Yi(e,t,r){var a=e+r-2*t;return 0===a?.5:(e-t)/a}function Xi(e,t,r,a,n){var i=(t-e)*a+e,o=(r-t)*a+t,s=(o-i)*a+i;n[0]=e,n[1]=i,n[2]=s,n[3]=s,n[4]=o,n[5]=r}function Zi(e,t,r,a,n,i,o,s,l){var c,u=.005,p=1/0;Ni[0]=o,Ni[1]=s;for(var d=0;d<1;d+=.05){Ei[0]=Wi(e,r,n,d),Ei[1]=Wi(t,a,i,d);var h=za(Ni,Ei);h<p&&(c=d,p=h)}p=1/0;for(var f=0;f<32;f++){if(u<Ai)break;var m=c-u,g=c+u;Ei[0]=Wi(e,r,n,m),Ei[1]=Wi(t,a,i,m);h=za(Ei,Ni);if(m>=0&&h<p)c=m,p=h;else{Ri[0]=Wi(e,r,n,g),Ri[1]=Wi(t,a,i,g);var v=za(Ri,Ni);g<=1&&v<p?(c=g,p=v):u*=.5}}return l&&(l[0]=Wi(e,r,n,c),l[1]=Wi(t,a,i,c)),Oi(p)}function Ki(e,t,r,a,n,i,o){for(var s=e,l=t,c=0,u=1/o,p=1;p<=o;p++){var d=p*u,h=Wi(e,r,n,d),f=Wi(t,a,i,d),m=h-s,g=f-l;c+=Math.sqrt(m*m+g*g),s=h,l=f}return c}var Ji=/cubic-bezier\(([0-9,\.e ]+)\)/;function Qi(e){var t=e&&Ji.exec(e);if(t){var r=t[1].split(","),a=+Object(Sa["T"])(r[0]),n=+Object(Sa["T"])(r[1]),i=+Object(Sa["T"])(r[2]),o=+Object(Sa["T"])(r[3]);if(isNaN(a+n+i+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:zi(0,a,i,1,e,s)&&Fi(0,n,o,1,s[0])}}}var eo=function(){function e(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||Sa["L"],this.ondestroy=e.ondestroy||Sa["L"],this.onrestart=e.onrestart||Sa["L"],e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),!this._paused){var r=this._life,a=e-this._startTime-this._pausedTime,n=a/r;n<0&&(n=0),n=Math.min(n,1);var i=this.easingFunc,o=i?i(n):n;if(this.onframe(o),1===n){if(!this.loop)return!0;var s=a%r;this._startTime=e-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=t},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Object(Sa["w"])(e)?e:Ti[e]||Qi(e)},e}(),to=eo,ro=r("41ef"),ao=r("7a29"),no=Array.prototype.slice;function io(e,t,r){return(t-e)*r+e}function oo(e,t,r,a){for(var n=t.length,i=0;i<n;i++)e[i]=io(t[i],r[i],a);return e}function so(e,t,r,a){for(var n=t.length,i=n&&t[0].length,o=0;o<n;o++){e[o]||(e[o]=[]);for(var s=0;s<i;s++)e[o][s]=io(t[o][s],r[o][s],a)}return e}function lo(e,t,r,a){for(var n=t.length,i=0;i<n;i++)e[i]=t[i]+r[i]*a;return e}function co(e,t,r,a){for(var n=t.length,i=n&&t[0].length,o=0;o<n;o++){e[o]||(e[o]=[]);for(var s=0;s<i;s++)e[o][s]=t[o][s]+r[o][s]*a}return e}function uo(e,t){for(var r=e.length,a=t.length,n=r>a?t:e,i=Math.min(r,a),o=n[i-1]||{color:[0,0,0,0],offset:0},s=i;s<Math.max(r,a);s++)n.push({offset:o.offset,color:o.color.slice()})}function po(e,t,r){var a=e,n=t;if(a.push&&n.push){var i=a.length,o=n.length;if(i!==o){var s=i>o;if(s)a.length=o;else for(var l=i;l<o;l++)a.push(1===r?n[l]:no.call(n[l]))}var c=a[0]&&a[0].length;for(l=0;l<a.length;l++)if(1===r)isNaN(a[l])&&(a[l]=n[l]);else for(var u=0;u<c;u++)isNaN(a[l][u])&&(a[l][u]=n[l][u])}}function ho(e){if(Object(Sa["u"])(e)){var t=e.length;if(Object(Sa["u"])(e[0])){for(var r=[],a=0;a<t;a++)r.push(no.call(e[a]));return r}return no.call(e)}return e}function fo(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=null==e[3]?1:e[3],"rgba("+e.join(",")+")"}function mo(e){return Object(Sa["u"])(e&&e[0])?2:1}var go=0,vo=1,yo=2,bo=3,_o=4,xo=5,wo=6;function So(e){return e===_o||e===xo}function Do(e){return e===vo||e===yo}var Co=[0,0,0,0],To=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,r){this._needsSort=!0;var a=this.keyframes,n=a.length,i=!1,o=wo,s=t;if(Object(Sa["u"])(t)){var l=mo(t);o=l,(1===l&&!Object(Sa["z"])(t[0])||2===l&&!Object(Sa["z"])(t[0][0]))&&(i=!0)}else if(Object(Sa["z"])(t)&&!Object(Sa["l"])(t))o=go;else if(Object(Sa["C"])(t))if(isNaN(+t)){var c=ro["h"](t);c&&(s=c,o=bo)}else o=go;else if(Object(Sa["x"])(t)){var u=Object(Sa["m"])({},s);u.colorStops=Object(Sa["H"])(t.colorStops,(function(e){return{offset:e.offset,color:ro["h"](e.color)}})),Object(ao["m"])(t)?o=_o:Object(ao["o"])(t)&&(o=xo),s=u}0===n?this.valType=o:o===this.valType&&o!==wo||(i=!0),this.discrete=this.discrete||i;var p={time:e,value:s,rawValue:t,percent:0};return r&&(p.easing=r,p.easingFunc=Object(Sa["w"])(r)?r:Ti[r]||Qi(r)),a.push(p),p},e.prototype.prepare=function(e,t){var r=this.keyframes;this._needsSort&&r.sort((function(e,t){return e.time-t.time}));for(var a=this.valType,n=r.length,i=r[n-1],o=this.discrete,s=Do(a),l=So(a),c=0;c<n;c++){var u=r[c],p=u.value,d=i.value;u.percent=u.time/e,o||(s&&c!==n-1?po(p,d,a):l&&uo(p.colorStops,d.colorStops))}if(!o&&a!==xo&&t&&this.needsAnimate()&&t.needsAnimate()&&a===t.valType&&!t._finished){this._additiveTrack=t;var h=r[0].value;for(c=0;c<n;c++)a===go?r[c].additiveValue=r[c].value-h:a===bo?r[c].additiveValue=lo([],r[c].value,h,-1):Do(a)&&(r[c].additiveValue=a===vo?lo([],r[c].value,h,-1):co([],r[c].value,h,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var r,a,n,i=null!=this._additiveTrack,o=i?"additiveValue":"value",s=this.valType,l=this.keyframes,c=l.length,u=this.propName,p=s===bo,d=this._lastFr,h=Math.min;if(1===c)a=n=l[0];else{if(t<0)r=0;else if(t<this._lastFrP){var f=h(d+1,c-1);for(r=f;r>=0;r--)if(l[r].percent<=t)break;r=h(r,c-2)}else{for(r=d;r<c;r++)if(l[r].percent>t)break;r=h(r-1,c-2)}n=l[r+1],a=l[r]}if(a&&n){this._lastFr=r,this._lastFrP=t;var m=n.percent-a.percent,g=0===m?1:h((t-a.percent)/m,1);n.easingFunc&&(g=n.easingFunc(g));var v=i?this._additiveValue:p?Co:e[u];if(!Do(s)&&!p||v||(v=this._additiveValue=[]),this.discrete)e[u]=g<1?a.rawValue:n.rawValue;else if(Do(s))s===vo?oo(v,a[o],n[o],g):so(v,a[o],n[o],g);else if(So(s)){var y=a[o],b=n[o],_=s===_o;e[u]={type:_?"linear":"radial",x:io(y.x,b.x,g),y:io(y.y,b.y,g),colorStops:Object(Sa["H"])(y.colorStops,(function(e,t){var r=b.colorStops[t];return{offset:io(e.offset,r.offset,g),color:fo(oo([],e.color,r.color,g))}})),global:b.global},_?(e[u].x2=io(y.x2,b.x2,g),e[u].y2=io(y.y2,b.y2,g)):e[u].r=io(y.r,b.r,g)}else if(p)oo(v,a[o],n[o],g),i||(e[u]=fo(v));else{var x=io(a[o],n[o],g);i?this._additiveValue=x:e[u]=x}i&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,r=this.propName,a=this._additiveValue;t===go?e[r]=e[r]+a:t===bo?(ro["h"](e[r],Co),lo(Co,Co,a,1),e[r]=fo(Co)):t===vo?lo(e[r],e[r],a,1):t===yo&&co(e[r],e[r],a,1)},e}(),Io=function(){function e(e,t,r,a){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&a?Object(Sa["G"])("Can' use additive animation on looped animation."):(this._additiveAnimators=a,this._allowDiscrete=r)}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,r){return this.whenWithKeys(e,t,Object(Sa["F"])(t),r)},e.prototype.whenWithKeys=function(e,t,r,a){for(var n=this._tracks,i=0;i<r.length;i++){var o=r[i],s=n[o];if(!s){s=n[o]=new To(o);var l=void 0,c=this._getAdditiveTrack(o);if(c){var u=c.keyframes,p=u[u.length-1];l=p&&p.value,c.valType===bo&&l&&(l=fo(l))}else l=this._target[o];if(null==l)continue;e>0&&s.addKeyframe(0,ho(l),a),this._trackKeys.push(o)}s.addKeyframe(e,ho(t[o]),a)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,r=0;r<t;r++)e[r].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var r=0;r<t.length;r++)t[r].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,r=0;r<t.length;r++)e[t[r]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,r=this._additiveAnimators;if(r)for(var a=0;a<r.length;a++){var n=r[a].getTrack(e);n&&(t=n)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,r=[],a=this._maxTime||0,n=0;n<this._trackKeys.length;n++){var i=this._trackKeys[n],o=this._tracks[i],s=this._getAdditiveTrack(i),l=o.keyframes,c=l.length;if(o.prepare(a,s),o.needsAnimate())if(!this._allowDiscrete&&o.discrete){var u=l[c-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else r.push(o)}if(r.length||this._force){var p=new to({life:a,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var a=t._additiveAnimators;if(a){for(var n=!1,i=0;i<a.length;i++)if(a[i]._clip){n=!0;break}n||(t._additiveAnimators=null)}for(i=0;i<r.length;i++)r[i].step(t._target,e);var o=t._onframeCbs;if(o)for(i=0;i<o.length;i++)o[i](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=p,this.animation&&this.animation.addClip(p),e&&p.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return Object(Sa["H"])(this._trackKeys,(function(t){return e._tracks[t]}))},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var r=this._tracks,a=this._trackKeys,n=0;n<e.length;n++){var i=r[e[n]];i&&!i.isFinished()&&(t?i.step(this._target,1):1===this._started&&i.step(this._target,0),i.setFinished())}var o=!0;for(n=0;n<a.length;n++)if(!r[a[n]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,r){if(e){t=t||this._trackKeys;for(var a=0;a<t.length;a++){var n=t[a],i=this._tracks[n];if(i&&!i.isFinished()){var o=i.keyframes,s=o[r?0:o.length-1];s&&(e[n]=ho(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||Object(Sa["F"])(e);for(var r=0;r<t.length;r++){var a=t[r],n=this._tracks[a];if(n){var i=n.keyframes;if(i.length>1){var o=i.pop();n.addKeyframe(o.time,e[a]),n.prepare(this._maxTime,n.getAdditiveTrack())}}}},e}(),Oo=Io;function Mo(){return(new Date).getTime()}var Ao=function(e){function t(t){var r=e.call(this)||this;return r._running=!1,r._time=0,r._pausedTime=0,r._pauseStart=0,r._paused=!1,t=t||{},r.stage=t.stage||{},r}return Ca(t,e),t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,r=e.next;t?t.next=r:this._head=r,r?r.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){var t=Mo()-this._pausedTime,r=t-this._time,a=this._head;while(a){var n=a.next,i=a.step(t,r);i?(a.ondestroy(),this.removeClip(a),a=n):a=n}this._time=t,e||(this.trigger("frame",r),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;function t(){e._running&&(Di(t),!e._paused&&e.update())}this._running=!0,Di(t)},t.prototype.start=function(){this._running||(this._time=Mo(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Mo(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Mo()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){var e=this._head;while(e){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return null==this._head},t.prototype.animate=function(e,t){t=t||{},this.start();var r=new Oo(e,t.loop);return this.addAnimator(r),r},t}(Xa),ko=Ao,Po=300,No=wa["a"].domSupported,Eo=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=Sa["H"](e,(function(e){var t=e.replace("mouse","pointer");return r.hasOwnProperty(t)?t:e}));return{mouse:e,touch:t,pointer:a}}(),Ro={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Lo=!1;function jo(e){var t=e.pointerType;return"pen"===t||"touch"===t}function Fo(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}function Vo(e){e&&(e.zrByTouch=!0)}function zo(e,t){return gn(e.dom,new $o(e,t),!0)}function Bo(e,t){var r=t,a=!1;while(r&&9!==r.nodeType&&!(a=r.domBelongToZr||r!==t&&r===e.painterRoot))r=r.parentNode;return a}var $o=function(){function e(e,t){this.stopPropagation=Sa["L"],this.stopImmediatePropagation=Sa["L"],this.preventDefault=Sa["L"],this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Go={mousedown:function(e){e=gn(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=gn(this.dom,e);var t=this.__mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=gn(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=gn(this.dom,e);var t=e.toElement||e.relatedTarget;Bo(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){Lo=!0,e=gn(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){Lo||(e=gn(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=gn(this.dom,e),Vo(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Go.mousemove.call(this,e),Go.mousedown.call(this,e)},touchmove:function(e){e=gn(this.dom,e),Vo(e),this.handler.processGesture(e,"change"),Go.mousemove.call(this,e)},touchend:function(e){e=gn(this.dom,e),Vo(e),this.handler.processGesture(e,"end"),Go.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<Po&&Go.click.call(this,e)},pointerdown:function(e){Go.mousedown.call(this,e)},pointermove:function(e){jo(e)||Go.mousemove.call(this,e)},pointerup:function(e){Go.mouseup.call(this,e)},pointerout:function(e){jo(e)||Go.mouseout.call(this,e)}};Sa["k"](["click","dblclick","contextmenu"],(function(e){Go[e]=function(t){t=gn(this.dom,t),this.trigger(e,t)}}));var Uo={pointermove:function(e){jo(e)||Uo.mousemove.call(this,e)},pointerup:function(e){Uo.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function Wo(e,t){var r=t.domHandlers;wa["a"].pointerEventsSupported?Sa["k"](Eo.pointer,(function(a){qo(t,a,(function(t){r[a].call(e,t)}))})):(wa["a"].touchEventsSupported&&Sa["k"](Eo.touch,(function(a){qo(t,a,(function(n){r[a].call(e,n),Fo(t)}))})),Sa["k"](Eo.mouse,(function(a){qo(t,a,(function(n){n=mn(n),t.touching||r[a].call(e,n)}))})))}function Ho(e,t){function r(r){function a(a){a=mn(a),Bo(e,a.target)||(a=zo(e,a),t.domHandlers[r].call(e,a))}qo(t,r,a,{capture:!0})}wa["a"].pointerEventsSupported?Sa["k"](Ro.pointer,r):wa["a"].touchEventsSupported||Sa["k"](Ro.mouse,r)}function qo(e,t,r,a){e.mounted[t]=r,e.listenerOpts[t]=a,yn(e.domTarget,t,r,a)}function Yo(e){var t=e.mounted;for(var r in t)t.hasOwnProperty(r)&&bn(e.domTarget,r,t[r],e.listenerOpts[r]);e.mounted={}}var Xo=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),Zo=function(e){function t(t,r){var a=e.call(this)||this;return a.__pointerCapturing=!1,a.dom=t,a.painterRoot=r,a._localHandlerScope=new Xo(t,Go),No&&(a._globalHandlerScope=new Xo(document,Uo)),Wo(a,a._localHandlerScope),a}return Ca(t,e),t.prototype.dispose=function(){Yo(this._localHandlerScope),No&&Yo(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,No&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?Ho(this,t):Yo(t)}},t}(Xa),Ko=Zo,Jo=1;wa["a"].hasGlobalWindow&&(Jo=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Qo=Jo,es=.4,ts="#333",rs="#ccc",as="#eee",ns=In,is=5e-5;function os(e){return e>is||e<-is}var ss=[],ls=[],cs=Tn(),us=Math.abs,ps=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return os(this.rotation)||os(this.x)||os(this.y)||os(this.scaleX-1)||os(this.scaleY-1)||os(this.skewX)||os(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),r=this.transform;t||e?(r=r||Tn(),t?this.getLocalTransform(r):ns(r),e&&(t?Mn(r,e,r):On(r,e)),this.transform=r,this._resolveGlobalScaleRatio(r)):r&&(ns(r),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(ss);var r=ss[0]<0?-1:1,a=ss[1]<0?-1:1,n=((ss[0]-r)*t+r)/ss[0]||0,i=((ss[1]-a)*t+a)/ss[1]||0;e[0]*=n,e[1]*=n,e[2]*=i,e[3]*=i}this.invTransform=this.invTransform||Tn(),Nn(this.invTransform,e)},e.prototype.getComputedTransform=function(){var e=this,t=[];while(e)t.push(e),e=e.parent;while(e=t.pop())e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],r=e[2]*e[2]+e[3]*e[3],a=Math.atan2(e[1],e[0]),n=Math.PI/2+a-Math.atan2(e[3],e[2]);r=Math.sqrt(r)*Math.cos(n),t=Math.sqrt(t),this.skewX=n,this.skewY=0,this.rotation=-a,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=r,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Tn(),Mn(ls,e.invTransform,t),t=ls);var r=this.originX,a=this.originY;(r||a)&&(cs[4]=r,cs[5]=a,Mn(ls,t,cs),ls[4]-=r,ls[5]-=a,t=ls),this.setLocalTransform(t)}},e.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)},e.prototype.transformCoordToLocal=function(e,t){var r=[e,t],a=this.invTransform;return a&&$a(r,r,a),r},e.prototype.transformCoordToGlobal=function(e,t){var r=[e,t],a=this.transform;return a&&$a(r,r,a),r},e.prototype.getLineScale=function(){var e=this.transform;return e&&us(e[0]-1)>1e-10&&us(e[3]-1)>1e-10?Math.sqrt(us(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){hs(this,e)},e.getLocalTransform=function(e,t){t=t||[];var r=e.originX||0,a=e.originY||0,n=e.scaleX,i=e.scaleY,o=e.anchorX,s=e.anchorY,l=e.rotation||0,c=e.x,u=e.y,p=e.skewX?Math.tan(e.skewX):0,d=e.skewY?Math.tan(-e.skewY):0;if(r||a||o||s){var h=r+o,f=a+s;t[4]=-h*n-p*f*i,t[5]=-f*i-d*h*n}else t[4]=t[5]=0;return t[0]=n,t[3]=i,t[1]=d*n,t[2]=p*i,l&&kn(t,t,l),t[4]+=r+c,t[5]+=a+u,t},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),ds=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function hs(e,t){for(var r=0;r<ds.length;r++){var a=ds[r];e[a]=t[a]}}var fs=ps,ms=r("d51b"),gs=r("726e"),vs={};function ys(e,t){t=t||gs["a"];var r=vs[t];r||(r=vs[t]=new ms["a"](500));var a=r.get(e);return null==a&&(a=gs["d"].measureText(e,t).width,r.put(e,a)),a}function bs(e,t,r,a){var n=ys(e,t),i=Ss(t),o=xs(0,n,r),s=ws(0,i,a),l=new Hn(o,s,n,i);return l}function _s(e,t,r,a){var n=((e||"")+"").split("\n"),i=n.length;if(1===i)return bs(n[0],t,r,a);for(var o=new Hn(0,0,0,0),s=0;s<n.length;s++){var l=bs(n[s],t,r,a);0===s?o.copy(l):o.union(l)}return o}function xs(e,t,r){return"right"===r?e-=t:"center"===r&&(e-=t/2),e}function ws(e,t,r){return"middle"===r?e-=t/2:"bottom"===r&&(e-=t),e}function Ss(e){return ys("国",e)}function Ds(e,t){return"string"===typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function Cs(e,t,r){var a=t.position||"inside",n=null!=t.distance?t.distance:5,i=r.height,o=r.width,s=i/2,l=r.x,c=r.y,u="left",p="top";if(a instanceof Array)l+=Ds(a[0],r.width),c+=Ds(a[1],r.height),u=null,p=null;else switch(a){case"left":l-=n,c+=s,u="right",p="middle";break;case"right":l+=n+o,c+=s,p="middle";break;case"top":l+=o/2,c-=n,u="center",p="bottom";break;case"bottom":l+=o/2,c+=i+n,u="center";break;case"inside":l+=o/2,c+=s,u="center",p="middle";break;case"insideLeft":l+=n,c+=s,p="middle";break;case"insideRight":l+=o-n,c+=s,u="right",p="middle";break;case"insideTop":l+=o/2,c+=n,u="center";break;case"insideBottom":l+=o/2,c+=i-n,u="center",p="bottom";break;case"insideTopLeft":l+=n,c+=n;break;case"insideTopRight":l+=o-n,c+=n,u="right";break;case"insideBottomLeft":l+=n,c+=i-n,p="bottom";break;case"insideBottomRight":l+=o-n,c+=i-n,u="right",p="bottom";break}return e=e||{},e.x=l,e.y=c,e.align=u,e.verticalAlign=p,e}var Ts="__zr_normal__",Is=ds.concat(["ignore"]),Os=Object(Sa["N"])(ds,(function(e,t){return e[t]=!0,e}),{ignore:!1}),Ms={},As=new Hn(0,0,0,0),ks=function(){function e(e){this.id=Object(Sa["p"])(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,r){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=e,a[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var r=this.textConfig,a=r.local,n=t.innerTransformable,i=void 0,o=void 0,s=!1;n.parent=a?this:null;var l=!1;if(n.copyTransform(t),null!=r.position){var c=As;r.layoutRect?c.copy(r.layoutRect):c.copy(this.getBoundingRect()),a||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Ms,r,c):Cs(Ms,r,c),n.x=Ms.x,n.y=Ms.y,i=Ms.align,o=Ms.verticalAlign;var u=r.origin;if(u&&null!=r.rotation){var p=void 0,d=void 0;"center"===u?(p=.5*c.width,d=.5*c.height):(p=Ds(u[0],c.width),d=Ds(u[1],c.height)),l=!0,n.originX=-n.x+p+(a?0:c.x),n.originY=-n.y+d+(a?0:c.y)}}null!=r.rotation&&(n.rotation=r.rotation);var h=r.offset;h&&(n.x+=h[0],n.y+=h[1],l||(n.originX=-h[0],n.originY=-h[1]));var f=null==r.inside?"string"===typeof r.position&&r.position.indexOf("inside")>=0:r.inside,m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,v=void 0,y=void 0;f&&this.canBeInsideText()?(g=r.insideFill,v=r.insideStroke,null!=g&&"auto"!==g||(g=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(g),y=!0)):(g=r.outsideFill,v=r.outsideStroke,null!=g&&"auto"!==g||(g=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(g),y=!0)),g=g||"#000",g===m.fill&&v===m.stroke&&y===m.autoStroke&&i===m.align&&o===m.verticalAlign||(s=!0,m.fill=g,m.stroke=v,m.autoStroke=y,m.align=i,m.verticalAlign=o,t.setDefaultTextStyle(m)),t.__dirty|=mi,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?rs:ts},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),r="string"===typeof t&&Object(ro["h"])(t);r||(r=[255,255,255,1]);for(var a=r[3],n=this.__zr.isDarkMode(),i=0;i<3;i++)r[i]=r[i]*a+(n?0:255)*(1-a);return r[3]=1,Object(ro["i"])(r,"rgba")},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){"textConfig"===e?this.setTextConfig(t):"textContent"===e?this.setTextContent(t):"clipPath"===e?this.setClipPath(t):"extra"===e?(this.extra=this.extra||{},Object(Sa["m"])(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if("string"===typeof e)this.attrKV(e,t);else if(Object(Sa["A"])(e))for(var r=e,a=Object(Sa["F"])(r),n=0;n<a.length;n++){var i=a[n];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,r=0;r<this.animators.length;r++){var a=this.animators[r],n=a.__fromStateTransition;if(!(a.getLoop()||n&&n!==Ts)){var i=a.targetName,o=i?t[i]:t;a.saveTo(o)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Is)},e.prototype._savePrimaryToNormal=function(e,t,r){for(var a=0;a<r.length;a++){var n=r[a];null==e[n]||n in t||(t[n]=this[n])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(Ts,!1,e)},e.prototype.useState=function(e,t,r,a){var n=e===Ts,i=this.hasState();if(i||!n){var o=this.currentStates,s=this.stateTransition;if(!(Object(Sa["r"])(o,e)>=0)||!t&&1!==o.length){var l;if(this.stateProxy&&!n&&(l=this.stateProxy(e)),l||(l=this.states&&this.states[e]),l||n){n||this.saveCurrentToNormalState(l);var c=!!(l&&l.hoverLayer||a);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,l,this._normalState,t,!r&&!this.__inHover&&s&&s.duration>0,s);var u=this._textContent,p=this._textGuide;return u&&u.useState(e,t,r,c),p&&p.useState(e,t,r,c),n?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~mi),l}Object(Sa["G"])("State "+e+" not exists.")}}},e.prototype.useStates=function(e,t,r){if(e.length){var a=[],n=this.currentStates,i=e.length,o=i===n.length;if(o)for(var s=0;s<i;s++)if(e[s]!==n[s]){o=!1;break}if(o)return;for(s=0;s<i;s++){var l=e[s],c=void 0;this.stateProxy&&(c=this.stateProxy(l,e)),c||(c=this.states[l]),c&&a.push(c)}var u=a[i-1],p=!!(u&&u.hoverLayer||r);p&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(a),h=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(e.join(","),d,this._normalState,!1,!t&&!this.__inHover&&h&&h.duration>0,h);var f=this._textContent,m=this._textGuide;f&&f.useStates(e,t,p),m&&m.useStates(e,t,p),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!p&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~mi)}else this.clearStates()},e.prototype.isSilent=function(){var e=this.silent,t=this.parent;while(!e&&t){if(t.silent){e=!0;break}t=t.parent}return e},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=Object(Sa["r"])(this.currentStates,e);if(t>=0){var r=this.currentStates.slice();r.splice(t,1),this.useStates(r)}},e.prototype.replaceState=function(e,t,r){var a=this.currentStates.slice(),n=Object(Sa["r"])(a,e),i=Object(Sa["r"])(a,t)>=0;n>=0?i?a.splice(n,1):a[n]=t:r&&!i&&a.push(t),this.useStates(a)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,r={},a=0;a<e.length;a++){var n=e[a];Object(Sa["m"])(r,n),n.textConfig&&(t=t||{},Object(Sa["m"])(t,n.textConfig))}return t&&(r.textConfig=t),r},e.prototype._applyStateObj=function(e,t,r,a,n,i){var o=!(t&&a);t&&t.textConfig?(this.textConfig=Object(Sa["m"])({},a?this.textConfig:r.textConfig),Object(Sa["m"])(this.textConfig,t.textConfig)):o&&r.textConfig&&(this.textConfig=r.textConfig);for(var s={},l=!1,c=0;c<Is.length;c++){var u=Is[c],p=n&&Os[u];t&&null!=t[u]?p?(l=!0,s[u]=t[u]):this[u]=t[u]:o&&null!=r[u]&&(p?(l=!0,s[u]=r[u]):this[u]=r[u])}if(!n)for(c=0;c<this.animators.length;c++){var d=this.animators[c],h=d.targetName;d.getLoop()||d.__changeFinalValue(h?(t||r)[h]:t||r)}l&&this._transitionState(e,s,i)},e.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}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new fs,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),Object(Sa["m"])(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=mi;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,r=this._textGuide;t&&(t.__inHover=e),r&&(r.__inHover=e)},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var r=0;r<t.length;r++)e.animation.addAnimator(t[r]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var r=0;r<t.length;r++)e.animation.removeAnimator(t[r]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,r){var a=e?this[e]:this;var n=new Oo(a,t,r);return e&&(n.targetName=e),this.addAnimator(n,e),n},e.prototype.addAnimator=function(e,t){var r=this.__zr,a=this;e.during((function(){a.updateDuringAnimation(t)})).done((function(){var t=a.animators,r=Object(Sa["r"])(t,e);r>=0&&t.splice(r,1)})),this.animators.push(e),r&&r.animation.addAnimator(e),r&&r.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var r=this.animators,a=r.length,n=[],i=0;i<a;i++){var o=r[i];e&&e!==o.scope?n.push(o):o.stop(t)}return this.animators=n,this},e.prototype.animateTo=function(e,t,r){Ps(this,e,t,r)},e.prototype.animateFrom=function(e,t,r){Ps(this,e,t,r,!0)},e.prototype._transitionState=function(e,t,r,a){for(var n=Ps(this,t,r,a),i=0;i<n.length;i++)n[i].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=function(){var t=e.prototype;t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=mi;function r(e,r,a,n){function i(e,t){Object.defineProperty(t,0,{get:function(){return e[a]},set:function(t){e[a]=t}}),Object.defineProperty(t,1,{get:function(){return e[n]},set:function(t){e[n]=t}})}Object.defineProperty(t,e,{get:function(){if(!this[r]){var e=this[r]=[];i(this,e)}return this[r]},set:function(e){this[a]=e[0],this[n]=e[1],this[r]=e,i(this,e)}})}Object.defineProperty&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))}(),e}();function Ps(e,t,r,a,n){r=r||{};var i=[];Fs(e,"",e,t,r,a,i,n);var o=i.length,s=!1,l=r.done,c=r.aborted,u=function(){s=!0,o--,o<=0&&(s?l&&l():c&&c())},p=function(){o--,o<=0&&(s?l&&l():c&&c())};o||l&&l(),i.length>0&&r.during&&i[0].during((function(e,t){r.during(t)}));for(var d=0;d<i.length;d++){var h=i[d];u&&h.done(u),p&&h.aborted(p),r.force&&h.duration(r.duration),h.start(r.easing)}return i}function Ns(e,t,r){for(var a=0;a<r;a++)e[a]=t[a]}function Es(e){return Object(Sa["u"])(e[0])}function Rs(e,t,r){if(Object(Sa["u"])(t[r]))if(Object(Sa["u"])(e[r])||(e[r]=[]),Object(Sa["E"])(t[r])){var a=t[r].length;e[r].length!==a&&(e[r]=new t[r].constructor(a),Ns(e[r],t[r],a))}else{var n=t[r],i=e[r],o=n.length;if(Es(n))for(var s=n[0].length,l=0;l<o;l++)i[l]?Ns(i[l],n[l],s):i[l]=Array.prototype.slice.call(n[l]);else Ns(i,n,o);i.length=n.length}else e[r]=t[r]}function Ls(e,t){return e===t||Object(Sa["u"])(e)&&Object(Sa["u"])(t)&&js(e,t)}function js(e,t){var r=e.length;if(r!==t.length)return!1;for(var a=0;a<r;a++)if(e[a]!==t[a])return!1;return!0}function Fs(e,t,r,a,n,i,o,s){for(var l=Object(Sa["F"])(a),c=n.duration,u=n.delay,p=n.additive,d=n.setToFinal,h=!Object(Sa["A"])(i),f=e.animators,m=[],g=0;g<l.length;g++){var v=l[g],y=a[v];if(null!=y&&null!=r[v]&&(h||i[v]))if(!Object(Sa["A"])(y)||Object(Sa["u"])(y)||Object(Sa["x"])(y))m.push(v);else{if(t){s||(r[v]=y,e.updateDuringAnimation(t));continue}Fs(e,v,r[v],y,n,i&&i[v],o,s)}else s||(r[v]=y,e.updateDuringAnimation(t),m.push(v))}var b=m.length;if(!p&&b)for(var _=0;_<f.length;_++){var x=f[_];if(x.targetName===t){var w=x.stopTracks(m);if(w){var S=Object(Sa["r"])(f,x);f.splice(S,1)}}}if(n.force||(m=Object(Sa["n"])(m,(function(e){return!Ls(a[e],r[e])})),b=m.length),b>0||n.force&&!o.length){var D=void 0,C=void 0,T=void 0;if(s){C={},d&&(D={});for(_=0;_<b;_++){v=m[_];C[v]=r[v],d?D[v]=a[v]:r[v]=a[v]}}else if(d){T={};for(_=0;_<b;_++){v=m[_];T[v]=ho(r[v]),Rs(r,a,v)}}x=new Oo(r,!1,!1,p?Object(Sa["n"])(f,(function(e){return e.targetName===t})):null);x.targetName=t,n.scope&&(x.scope=n.scope),d&&D&&x.whenWithKeys(0,D,m),T&&x.whenWithKeys(0,T,m),x.whenWithKeys(null==c?500:c,s?C:a,m).delay(u||0),e.addAnimator(x,t),o.push(x)}}Object(Sa["K"])(ks,Xa),Object(Sa["K"])(ks,fs);var Vs=ks,zs=function(e){function t(t){var r=e.call(this)||this;return r.isGroup=!0,r._children=[],r.attr(t),r}return Ca(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,r=0;r<t.length;r++)if(t[r].name===e)return t[r]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var r=this._children,a=r.indexOf(t);a>=0&&(r.splice(a,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var r=Sa["r"](this._children,e);return r>=0&&this.replaceAt(t,r),this},t.prototype.replaceAt=function(e,t){var r=this._children,a=r[t];if(e&&e!==this&&e.parent!==this&&e!==a){r[t]=e,a.parent=null;var n=this.__zr;n&&a.removeSelfFromZr(n),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,r=this._children,a=Sa["r"](r,e);return a<0||(r.splice(a,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,r=0;r<e.length;r++){var a=e[r];t&&a.removeSelfFromZr(t),a.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var r=this._children,a=0;a<r.length;a++){var n=r[a];e.call(t,n,a)}return this},t.prototype.traverse=function(e,t){for(var r=0;r<this._children.length;r++){var a=this._children[r],n=e.call(t,a);a.isGroup&&!n&&a.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var r=0;r<this._children.length;r++){var a=this._children[r];a.addSelfToZr(t)}},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var r=0;r<this._children.length;r++){var a=this._children[r];a.removeSelfFromZr(t)}},t.prototype.getBoundingRect=function(e){for(var t=new Hn(0,0,0,0),r=e||this._children,a=[],n=null,i=0;i<r.length;i++){var o=r[i];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(a);l?(Hn.applyTransform(t,s,l),n=n||t.clone(),n.union(t)):(n=n||s.clone(),n.union(s))}}return n||t},t}(Vs);zs.prototype.type="group";var Bs=zs,$s={},Gs={};
|
||
/*!
|
||
* 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
|
||
*/function Us(e){delete Gs[e]}function Ws(e){if(!e)return!1;if("string"===typeof e)return Object(ro["e"])(e,1)<es;if(e.colorStops){for(var t=e.colorStops,r=0,a=t.length,n=0;n<a;n++)r+=Object(ro["e"])(t[n].color,1);return r/=a,r<es}return!1}var Hs,qs=function(){function e(e,t,r){var a=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,r=r||{},this.dom=t,this.id=e;var n=new Si,i=r.renderer||"canvas";$s[i]||(i=Sa["F"]($s)[0]),r.useDirtyRect=null!=r.useDirtyRect&&r.useDirtyRect;var o=new $s[i](t,n,r,e),s=r.ssr||o.ssrOnly;this.storage=n,this.painter=o;var l,c=wa["a"].node||wa["a"].worker||s?null:new Ko(o.getViewportRoot(),o.root),u=r.useCoarsePointer,p=null==u||"auto"===u?wa["a"].touchEventsSupported:!!u,d=44;p&&(l=Sa["P"](r.pointerSize,d)),this.handler=new ni(n,o,c,o.root,l),this.animation=new ko({stage:{update:s?null:function(){return a._flush(!0)}}}),s||this.animation.start()}return e.prototype.add=function(e){!this._disposed&&e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){!this._disposed&&e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=Ws(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(e){var t,r=Mo();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var a=Mo();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:a-r})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,r){return this._disposed||this.handler.on(e,t,r),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Bs&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,Us(this.id))},e}();function Ys(e,t){var r=new qs(Sa["p"](),e,t);return Gs[r.id]=r,r}function Xs(e,t){$s[e]=t}function Zs(e){if("function"===typeof Hs)return Hs(e)}function Ks(e){Hs=e}var Js=1e-4,Qs=20;function el(e){return e.replace(/^\s+|\s+$/g,"")}function tl(e,t,r,a){var n=t[0],i=t[1],o=r[0],s=r[1],l=i-n,c=s-o;if(0===l)return 0===c?o:(o+s)/2;if(a)if(l>0){if(e<=n)return o;if(e>=i)return s}else{if(e>=n)return o;if(e<=i)return s}else{if(e===n)return o;if(e===i)return s}return(e-n)/l*c+o}function rl(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return Sa["C"](e)?el(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e}function al(e,t,r){return null==t&&(t=10),t=Math.min(Math.max(0,t),Qs),e=(+e).toFixed(t),r?e:+e}function nl(e){return e.sort((function(e,t){return e-t})),e}function il(e){if(e=+e,isNaN(e))return 0;if(e>1e-14)for(var t=1,r=0;r<15;r++,t*=10)if(Math.round(e*t)/t===e)return r;return ol(e)}function ol(e){var t=e.toString().toLowerCase(),r=t.indexOf("e"),a=r>0?+t.slice(r+1):0,n=r>0?r:t.length,i=t.indexOf("."),o=i<0?0:n-1-i;return Math.max(0,o-a)}function sl(e,t){var r=Math.log,a=Math.LN10,n=Math.floor(r(e[1]-e[0])/a),i=Math.round(r(Math.abs(t[1]-t[0]))/a),o=Math.min(Math.max(-n+i,0),20);return isFinite(o)?o:20}function ll(e,t){var r=Sa["N"](e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===r)return[];var a=Math.pow(10,t),n=Sa["H"](e,(function(e){return(isNaN(e)?0:e)/r*a*100})),i=100*a,o=Sa["H"](n,(function(e){return Math.floor(e)})),s=Sa["N"](o,(function(e,t){return e+t}),0),l=Sa["H"](n,(function(e,t){return e-o[t]}));while(s<i){for(var c=Number.NEGATIVE_INFINITY,u=null,p=0,d=l.length;p<d;++p)l[p]>c&&(c=l[p],u=p);++o[u],l[u]=0,++s}return Sa["H"](o,(function(e){return e/a}))}function cl(e,t){var r=Math.max(il(e),il(t)),a=e+t;return r>Qs?a:al(a,r)}var ul=9007199254740991;function pl(e){var t=2*Math.PI;return(e%t+t)%t}function dl(e){return e>-Js&&e<Js}var hl=/^(?:(\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 fl(e){if(e instanceof Date)return e;if(Sa["C"](e)){var t=hl.exec(e);if(!t)return new Date(NaN);if(t[8]){var r=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(r-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,r,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return null==e?new Date(NaN):new Date(Math.round(e))}function ml(e){return Math.pow(10,gl(e))}function gl(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function vl(e,t){var r,a=gl(e),n=Math.pow(10,a),i=e/n;return r=t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10,e=r*n,a>=-20?+e.toFixed(a<0?-a:0):e}function yl(e,t){var r=(e.length-1)*t+1,a=Math.floor(r),n=+e[a-1],i=r-a;return i?n+i*(e[a]-n):n}function bl(e){e.sort((function(e,t){return s(e,t,0)?-1:1}));for(var t=-1/0,r=1,a=0;a<e.length;){for(var n=e[a].interval,i=e[a].close,o=0;o<2;o++)n[o]<=t&&(n[o]=t,i[o]=o?1:1-r),t=n[o],r=i[o];n[0]===n[1]&&i[0]*i[1]!==1?e.splice(a,1):a++}return e;function s(e,t,r){return e.interval[r]<t.interval[r]||e.interval[r]===t.interval[r]&&(e.close[r]-t.close[r]===(r?-1:1)||!r&&s(e,t,1))}}function _l(e){var t=parseFloat(e);return t==e&&(0!==t||!Sa["C"](e)||e.indexOf("x")<=0)?t:NaN}function xl(e){return!isNaN(_l(e))}function wl(){return Math.round(9*Math.random())}function Sl(e,t){return 0===t?e:Sl(t,e%t)}function Dl(e,t){return null==e?t:null==t?e:e*t/Sl(e,t)}function Cl(e,t,r){return(t-e)*r+e}var Tl="series\0",Il="\0_ec_\0";function Ol(e){return e instanceof Array?e:null==e?[]:[e]}function Ml(e,t,r){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var a=0,n=r.length;a<n;a++){var i=r[a];!e.emphasis[t].hasOwnProperty(i)&&e[t].hasOwnProperty(i)&&(e.emphasis[t][i]=e[t][i])}}}var Al=["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 kl(e){return!Object(Sa["A"])(e)||Object(Sa["t"])(e)||e instanceof Date?e:e.value}function Pl(e){return Object(Sa["A"])(e)&&!(e instanceof Array)}function Nl(e,t,r){var a="normalMerge"===r,n="replaceMerge"===r,i="replaceAll"===r;e=e||[],t=(t||[]).slice();var o=Object(Sa["f"])();Object(Sa["k"])(t,(function(e,r){Object(Sa["A"])(e)||(t[r]=null)}));var s=El(e,o,r);return(a||n)&&Rl(s,e,o,t),a&&Ll(s,t),a||n?jl(s,t,n):i&&Fl(s,t),Vl(s),s}function El(e,t,r){var a=[];if("replaceAll"===r)return a;for(var n=0;n<e.length;n++){var i=e[n];i&&null!=i.id&&t.set(i.id,n),a.push({existing:"replaceMerge"===r||Ul(i)?null:i,newOption:null,keyInfo:null,brandNew:null})}return a}function Rl(e,t,r,a){Object(Sa["k"])(a,(function(n,i){if(n&&null!=n.id){var o=Bl(n.id),s=r.get(o);if(null!=s){var l=e[s];Object(Sa["b"])(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=n,l.existing=t[s],a[i]=null}}}))}function Ll(e,t){Object(Sa["k"])(t,(function(r,a){if(r&&null!=r.name)for(var n=0;n<e.length;n++){var i=e[n].existing;if(!e[n].newOption&&i&&(null==i.id||null==r.id)&&!Ul(r)&&!Ul(i)&&zl("name",i,r))return e[n].newOption=r,void(t[a]=null)}}))}function jl(e,t,r){Object(Sa["k"])(t,(function(t){if(t){var a,n=0;while((a=e[n])&&(a.newOption||Ul(a.existing)||a.existing&&null!=t.id&&!zl("id",t,a.existing)))n++;a?(a.newOption=t,a.brandNew=r):e.push({newOption:t,brandNew:r,existing:null,keyInfo:null}),n++}}))}function Fl(e,t){Object(Sa["k"])(t,(function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})}))}function Vl(e){var t=Object(Sa["f"])();Object(Sa["k"])(e,(function(e){var r=e.existing;r&&t.set(r.id,e)})),Object(Sa["k"])(e,(function(e){var r=e.newOption;Object(Sa["b"])(!r||null==r.id||!t.get(r.id)||t.get(r.id)===e,"id duplicates: "+(r&&r.id)),r&&null!=r.id&&t.set(r.id,e),!e.keyInfo&&(e.keyInfo={})})),Object(Sa["k"])(e,(function(e,r){var a=e.existing,n=e.newOption,i=e.keyInfo;if(Object(Sa["A"])(n)){if(i.name=null!=n.name?Bl(n.name):a?a.name:Tl+r,a)i.id=Bl(a.id);else if(null!=n.id)i.id=Bl(n.id);else{var o=0;do{i.id="\0"+i.name+"\0"+o++}while(t.get(i.id))}t.set(i.id,e)}}))}function zl(e,t,r){var a=$l(t[e],null),n=$l(r[e],null);return null!=a&&null!=n&&a===n}function Bl(e){return $l(e,"")}function $l(e,t){return null==e?t:Object(Sa["C"])(e)?e:Object(Sa["z"])(e)||Object(Sa["D"])(e)?e+"":t}function Gl(e){var t=e.name;return!(!t||!t.indexOf(Tl))}function Ul(e){return e&&null!=e.id&&0===Bl(e.id).indexOf(Il)}function Wl(e){return Il+e}function Hl(e,t,r){Object(Sa["k"])(e,(function(e){var a=e.newOption;Object(Sa["A"])(a)&&(e.keyInfo.mainType=t,e.keyInfo.subType=ql(t,a,e.existing,r))}))}function ql(e,t,r,a){var n=t.type?t.type:r?r.subType:a.determineSubType(e,t);return n}function Yl(e,t){var r={},a={};return n(e||[],r),n(t||[],a,r),[i(r),i(a)];function n(e,t,r){for(var a=0,n=e.length;a<n;a++){var i=$l(e[a].seriesId,null);if(null==i)return;for(var o=Ol(e[a].dataIndex),s=r&&r[i],l=0,c=o.length;l<c;l++){var u=o[l];s&&s[u]?s[u]=null:(t[i]||(t[i]={}))[u]=1}}}function i(e,t){var r=[];for(var a in e)if(e.hasOwnProperty(a)&&null!=e[a])if(t)r.push(+a);else{var n=i(e[a],!0);n.length&&r.push({seriesId:a,dataIndex:n})}return r}}function Xl(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?Object(Sa["t"])(t.dataIndex)?Object(Sa["H"])(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?Object(Sa["t"])(t.name)?Object(Sa["H"])(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0}function Zl(){var e="__ec_inner_"+Kl++;return function(t){return t[e]||(t[e]={})}}var Kl=wl();function Jl(e,t,r){var a=Ql(t,r),n=a.mainTypeSpecified,i=a.queryOptionMap,o=a.others,s=o,l=r?r.defaultMainType:null;return!n&&l&&i.set(l,{}),i.each((function(t,a){var n=rc(e,a,t,{useDefault:l===a,enableAll:!r||null==r.enableAll||r.enableAll,enableNone:!r||null==r.enableNone||r.enableNone});s[a+"Models"]=n.models,s[a+"Model"]=n.models[0]})),s}function Ql(e,t){var r;if(Object(Sa["C"])(e)){var a={};a[e+"Index"]=0,r=a}else r=e;var n=Object(Sa["f"])(),i={},o=!1;return Object(Sa["k"])(r,(function(e,r){if("dataIndex"!==r&&"dataIndexInside"!==r){var a=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=a[1],l=(a[2]||"").toLowerCase();if(s&&l&&!(t&&t.includeMainTypes&&Object(Sa["r"])(t.includeMainTypes,s)<0)){o=o||!!s;var c=n.get(s)||n.set(s,{});c[l]=e}}else i[r]=e})),{mainTypeSpecified:o,queryOptionMap:n,others:i}}var ec={useDefault:!0,enableAll:!1,enableNone:!1},tc={useDefault:!1,enableAll:!0,enableNone:!0};function rc(e,t,r,a){a=a||ec;var n=r.index,i=r.id,o=r.name,s={models:null,specified:null!=n||null!=i||null!=o};if(!s.specified){var l=void 0;return s.models=a.useDefault&&(l=e.getComponent(t))?[l]:[],s}return"none"===n||!1===n?(Object(Sa["b"])(a.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):("all"===n&&(Object(Sa["b"])(a.enableAll,'`"all"` is not a valid value on index option.'),n=i=o=null),s.models=e.queryComponents({mainType:t,index:n,id:i,name:o}),s)}function ac(e,t,r){e.setAttribute?e.setAttribute(t,r):e[t]=r}function nc(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function ic(e){return"auto"===e?wa["a"].domSupported?"html":"richText":e||"html"}function oc(e,t){var r=Object(Sa["f"])(),a=[];return Object(Sa["k"])(e,(function(e){var n=t(e);(r.get(n)||(a.push(n),r.set(n,[]))).push(e)})),{keys:a,buckets:r}}function sc(e,t,r,a,n){var i=null==t||"auto"===t;if(null==a)return a;if(Object(Sa["z"])(a)){var o=Cl(r||0,a,n);return al(o,i?Math.max(il(r||0),il(a)):t)}if(Object(Sa["C"])(a))return n<1?r:a;for(var s=[],l=r,c=a,u=Math.max(l?l.length:0,c.length),p=0;p<u;++p){var d=e.getDimensionInfo(p);if(d&&"ordinal"===d.type)s[p]=(n<1&&l?l:c)[p];else{var h=l&&l[p]?l[p]:0,f=c[p];o=Cl(h,f,n);s[p]=al(o,i?Math.max(il(h),il(f)):t)}}return s}var lc=".",cc="___EC__COMPONENT__CONTAINER___",uc="___EC__EXTENDED_CLASS___";function pc(e){var t={main:"",sub:""};if(e){var r=e.split(lc);t.main=r[0]||"",t.sub=r[1]||""}return t}function dc(e){Sa["b"](/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}function hc(e){return!(!e||!e[uc])}function fc(e,t){e.$constructor=e,e.extend=function(e){var t,r=this;return mc(r)?t=function(e){function t(){return e.apply(this,arguments)||this}return xa(t,e),t}(r):(t=function(){(e.$constructor||r).apply(this,arguments)},Sa["s"](t,this)),Sa["m"](t.prototype,e),t[uc]=!0,t.extend=this.extend,t.superCall=bc,t.superApply=_c,t.superClass=r,t}}function mc(e){return Sa["w"](e)&&/^class\s/.test(Function.prototype.toString.call(e))}function gc(e,t){e.extend=t.extend}var vc=Math.round(10*Math.random());function yc(e){var t=["__\0is_clz",vc++].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!(!e||!e[t])}}function bc(e,t){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];return this.superClass.prototype[t].apply(e,r)}function _c(e,t,r){return this.superClass.prototype[t].apply(e,r)}function xc(e){var t={};function r(e){var r=t[e.main];return r&&r[cc]||(r=t[e.main]={},r[cc]=!0),r}e.registerClass=function(e){var a=e.type||e.prototype.type;if(a){dc(a),e.prototype.type=a;var n=pc(a);if(n.sub){if(n.sub!==cc){var i=r(n);i[n.sub]=e}}else t[n.main]=e}return e},e.getClass=function(e,r,a){var n=t[e];if(n&&n[cc]&&(n=r?n[r]:null),a&&!n)throw new Error(r?"Component "+e+"."+(r||"")+" is used but not imported.":e+".type should be specified.");return n},e.getClassesByMainType=function(e){var r=pc(e),a=[],n=t[r.main];return n&&n[cc]?Sa["k"](n,(function(e,t){t!==cc&&a.push(e)})):a.push(n),a},e.hasClass=function(e){var r=pc(e);return!!t[r.main]},e.getAllClassMainTypes=function(){var e=[];return Sa["k"](t,(function(t,r){e.push(r)})),e},e.hasSubTypes=function(e){var r=pc(e),a=t[r.main];return a&&a[cc]}}function wc(e,t){for(var r=0;r<e.length;r++)e[r][1]||(e[r][1]=e[r][0]);return t=t||!1,function(r,a,n){for(var i={},o=0;o<e.length;o++){var s=e[o][1];if(!(a&&Sa["r"](a,s)>=0||n&&Sa["r"](n,s)<0)){var l=r.getShallow(s,t);null!=l&&(i[e[o][0]]=l)}}return i}}var Sc=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Dc=wc(Sc),Cc=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Dc(this,e,t)},e}(),Tc=new ms["a"](50);function Ic(e){if("string"===typeof e){var t=Tc.get(e);return t&&t.image}return e}function Oc(e,t,r,a,n){if(e){if("string"===typeof e){if(t&&t.__zrImageSrc===e||!r)return t;var i=Tc.get(e),o={hostEl:r,cb:a,cbPayload:n};return i?(t=i.image,!Ac(t)&&i.pending.push(o)):(t=gs["d"].loadImage(e,Mc,Mc),t.__zrImageSrc=e,Tc.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}return t}function Mc(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var r=e.pending[t],a=r.cb;a&&a(this,r.cbPayload),r.hostEl.dirty()}e.pending.length=0}function Ac(e){return e&&e.width&&e.height}var kc=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Pc(e,t,r,a,n){if(!t)return"";var i=(e+"").split("\n");n=Nc(t,r,a,n);for(var o=0,s=i.length;o<s;o++)i[o]=Ec(i[o],n);return i.join("\n")}function Nc(e,t,r,a){a=a||{};var n=Object(Sa["m"])({},a);n.font=t,r=Object(Sa["P"])(r,"..."),n.maxIterations=Object(Sa["P"])(a.maxIterations,2);var i=n.minChar=Object(Sa["P"])(a.minChar,0);n.cnCharWidth=ys("国",t);var o=n.ascCharWidth=ys("a",t);n.placeholder=Object(Sa["P"])(a.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<i&&s>=o;l++)s-=o;var c=ys(r,t);return c>s&&(r="",c=0),s=e-c,n.ellipsis=r,n.ellipsisWidth=c,n.contentWidth=s,n.containerWidth=e,n}function Ec(e,t){var r=t.containerWidth,a=t.font,n=t.contentWidth;if(!r)return"";var i=ys(e,a);if(i<=r)return e;for(var o=0;;o++){if(i<=n||o>=t.maxIterations){e+=t.ellipsis;break}var s=0===o?Rc(e,n,t.ascCharWidth,t.cnCharWidth):i>0?Math.floor(e.length*n/i):0;e=e.substr(0,s),i=ys(e,a)}return""===e&&(e=t.placeholder),e}function Rc(e,t,r,a){for(var n=0,i=0,o=e.length;i<o&&n<t;i++){var s=e.charCodeAt(i);n+=0<=s&&s<=127?r:a}return i}function Lc(e,t){null!=e&&(e+="");var r,a=t.overflow,n=t.padding,i=t.font,o="truncate"===a,s=Ss(i),l=Object(Sa["P"])(t.lineHeight,s),c=!!t.backgroundColor,u="truncate"===t.lineOverflow,p=t.width;r=null==p||"break"!==a&&"breakAll"!==a?e?e.split("\n"):[]:e?Wc(e,t.font,p,"breakAll"===a,0).lines:[];var d=r.length*l,h=Object(Sa["P"])(t.height,d);if(d>h&&u){var f=Math.floor(h/l);r=r.slice(0,f)}if(e&&o&&null!=p)for(var m=Nc(p,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),g=0;g<r.length;g++)r[g]=Ec(r[g],m);var v=h,y=0;for(g=0;g<r.length;g++)y=Math.max(ys(r[g],i),y);null==p&&(p=y);var b=y;return n&&(v+=n[0]+n[2],b+=n[1]+n[3],p+=n[1]+n[3]),c&&(b=p),{lines:r,height:h,outerWidth:b,outerHeight:v,lineHeight:l,calculatedLineHeight:s,contentWidth:y,contentHeight:d,width:p}}var jc=function(){function e(){}return e}(),Fc=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Vc=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]}return e}();function zc(e,t){var r=new Vc;if(null!=e&&(e+=""),!e)return r;var a,n=t.width,i=t.height,o=t.overflow,s="break"!==o&&"breakAll"!==o||null==n?null:{width:n,accumWidth:0,breakAll:"breakAll"===o},l=kc.lastIndex=0;while(null!=(a=kc.exec(e))){var c=a.index;c>l&&Bc(r,e.substring(l,c),t,s),Bc(r,a[2],t,s,a[1]),l=kc.lastIndex}l<e.length&&Bc(r,e.substring(l,e.length),t,s);var u=[],p=0,d=0,h=t.padding,f="truncate"===o,m="truncate"===t.lineOverflow;function g(e,t,r){e.width=t,e.lineHeight=r,p+=r,d=Math.max(d,t)}e:for(var v=0;v<r.lines.length;v++){for(var y=r.lines[v],b=0,_=0,x=0;x<y.tokens.length;x++){var w=y.tokens[x],S=w.styleName&&t.rich[w.styleName]||{},D=w.textPadding=S.padding,C=D?D[1]+D[3]:0,T=w.font=S.font||t.font;w.contentHeight=Ss(T);var I=Object(Sa["P"])(S.height,w.contentHeight);if(w.innerHeight=I,D&&(I+=D[0]+D[2]),w.height=I,w.lineHeight=Object(Sa["Q"])(S.lineHeight,t.lineHeight,I),w.align=S&&S.align||t.align,w.verticalAlign=S&&S.verticalAlign||"middle",m&&null!=i&&p+w.lineHeight>i){x>0?(y.tokens=y.tokens.slice(0,x),g(y,_,b),r.lines=r.lines.slice(0,v+1)):r.lines=r.lines.slice(0,v);break e}var O=S.width,M=null==O||"auto"===O;if("string"===typeof O&&"%"===O.charAt(O.length-1))w.percentWidth=O,u.push(w),w.contentWidth=ys(w.text,T);else{if(M){var A=S.backgroundColor,k=A&&A.image;k&&(k=Ic(k),Ac(k)&&(w.width=Math.max(w.width,k.width*I/k.height)))}var P=f&&null!=n?n-_:null;null!=P&&P<w.width?!M||P<C?(w.text="",w.width=w.contentWidth=0):(w.text=Pc(w.text,P-C,T,t.ellipsis,{minChar:t.truncateMinChar}),w.width=w.contentWidth=ys(w.text,T)):w.contentWidth=ys(w.text,T)}w.width+=C,_+=w.width,S&&(b=Math.max(b,w.lineHeight))}g(y,_,b)}r.outerWidth=r.width=Object(Sa["P"])(n,d),r.outerHeight=r.height=Object(Sa["P"])(i,p),r.contentHeight=p,r.contentWidth=d,h&&(r.outerWidth+=h[1]+h[3],r.outerHeight+=h[0]+h[2]);for(v=0;v<u.length;v++){w=u[v];var N=w.percentWidth;w.width=parseInt(N,10)/100*r.width}return r}function Bc(e,t,r,a,n){var i,o,s=""===t,l=n&&r.rich[n]||{},c=e.lines,u=l.font||r.font,p=!1;if(a){var d=l.padding,h=d?d[1]+d[3]:0;if(null!=l.width&&"auto"!==l.width){var f=Ds(l.width,a.width)+h;c.length>0&&f+a.accumWidth>a.width&&(i=t.split("\n"),p=!0),a.accumWidth=f}else{var m=Wc(t,u,a.width,a.breakAll,a.accumWidth);a.accumWidth=m.accumWidth+h,o=m.linesWidths,i=m.lines}}else i=t.split("\n");for(var g=0;g<i.length;g++){var v=i[g],y=new jc;if(y.styleName=n,y.text=v,y.isLineHolder=!v&&!s,"number"===typeof l.width?y.width=l.width:y.width=o?o[g]:ys(v,u),g||p)c.push(new Fc([y]));else{var b=(c[c.length-1]||(c[0]=new Fc)).tokens,_=b.length;1===_&&b[0].isLineHolder?b[0]=y:(v||!_||s)&&b.push(y)}}}function $c(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Gc=Object(Sa["N"])(",&?/;] ".split(""),(function(e,t){return e[t]=!0,e}),{});function Uc(e){return!$c(e)||!!Gc[e]}function Wc(e,t,r,a,n){for(var i=[],o=[],s="",l="",c=0,u=0,p=0;p<e.length;p++){var d=e.charAt(p);if("\n"!==d){var h=ys(d,t),f=!a&&!Uc(d);(i.length?u+h>r:n+u+h>r)?u?(s||l)&&(f?(s||(s=l,l="",c=0,u=c),i.push(s),o.push(u-c),l+=d,c+=h,s="",u=c):(l&&(s+=l,l="",c=0),i.push(s),o.push(u),s=d,u=h)):f?(i.push(l),o.push(c),l=d,c=h):(i.push(d),o.push(h)):(u+=h,f?(l+=d,c+=h):(l&&(s+=l,l="",c=0),s+=d))}else l&&(s+=l,u+=c),i.push(s),o.push(u),s="",l="",c=0,u=0}return i.length||s||(s=e,l="",c=0),l&&(s+=l),s&&(i.push(s),o.push(u)),1===i.length&&(u+=n),{accumWidth:u,lines:i,linesWidths:o}}var Hc="__zr_style_"+Math.round(10*Math.random()),qc={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Yc={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};qc[Hc]=!0;var Xc=["z","z2","invisible"],Zc=["invisible"],Kc=function(e){function t(t){return e.call(this,t)||this}return Ca(t,e),t.prototype._init=function(t){for(var r=Object(Sa["F"])(t),a=0;a<r.length;a++){var n=r[a];"style"===n?this.useStyle(t[n]):e.prototype.attrKV.call(this,n,t[n])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,r,a){var n=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&eu(this,e,t)||n&&!n[0]&&!n[3])return!1;if(r&&this.__clipPaths)for(var i=0;i<this.__clipPaths.length;++i)if(this.__clipPaths[i].isZeroArea())return!1;if(a&&this.parent){var o=this.parent;while(o){if(o.ignore)return!1;o=o.parent}}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var r=this.transformCoordToLocal(e,t),a=this.getBoundingRect();return a.contain(r[0],r[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,r=this.getBoundingRect(),a=this.style,n=a.shadowBlur||0,i=a.shadowOffsetX||0,o=a.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new Hn(0,0,0,0)),t?Hn.applyTransform(e,r,t):e.copy(r),(n||i||o)&&(e.width+=2*n+Math.abs(i),e.height+=2*n+Math.abs(o),e.x=Math.min(e.x,e.x+i-n),e.y=Math.min(e.y,e.y+o-n));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+2*s),e.height=Math.ceil(e.height+1+2*s))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new Hn(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,r){"style"!==t?e.prototype.attrKV.call(this,t,r):this.style?this.setStyle(r):this.useStyle(r)},t.prototype.setStyle=function(e,t){return"string"===typeof e?this.style[e]=t:Object(Sa["m"])(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=gi,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&gi)},t.prototype.styleUpdated=function(){this.__dirty&=~gi},t.prototype.createStyle=function(e){return Object(Sa["g"])(qc,e)},t.prototype.useStyle=function(e){e[Hc]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[Hc]},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var r=this._normalState;t.style&&!r.style&&(r.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,r,Xc)},t.prototype._applyStateObj=function(t,r,a,n,i,o){e.prototype._applyStateObj.call(this,t,r,a,n,i,o);var s,l=!(r&&n);if(r&&r.style?i?n?s=r.style:(s=this._mergeStyle(this.createStyle(),a.style),this._mergeStyle(s,r.style)):(s=this._mergeStyle(this.createStyle(),n?this.style:a.style),this._mergeStyle(s,r.style)):l&&(s=a.style),s)if(i){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var u=Object(Sa["F"])(c),p=0;p<u.length;p++){var d=u[p];d in s&&(s[d]=s[d],this.style[d]=c[d])}var h=Object(Sa["F"])(s);for(p=0;p<h.length;p++){d=h[p];this.style[d]=this.style[d]}this._transitionState(t,{style:s},o,this.getAnimationStyleProps())}else this.useStyle(s);var f=this.__inHover?Zc:Xc;for(p=0;p<f.length;p++){d=f[p];r&&null!=r[d]?this[d]=r[d]:l&&null!=a[d]&&(this[d]=a[d])}},t.prototype._mergeStates=function(t){for(var r,a=e.prototype._mergeStates.call(this,t),n=0;n<t.length;n++){var i=t[n];i.style&&(r=r||{},this._mergeStyle(r,i.style))}return r&&(a.style=r),a},t.prototype._mergeStyle=function(e,t){return Object(Sa["m"])(e,t),e},t.prototype.getAnimationStyleProps=function(){return Yc},t.initDefaultProps=function(){var e=t.prototype;e.type="displayable",e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor="pointer",e.rectHover=!1,e.incremental=!1,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=mi|gi}(),t}(Vs),Jc=new Hn(0,0,0,0),Qc=new Hn(0,0,0,0);function eu(e,t,r){return Jc.copy(e.getBoundingRect()),e.transform&&Jc.applyTransform(e.transform),Qc.width=t,Qc.height=r,!Jc.intersect(Qc)}var tu=Kc,ru=Math.min,au=Math.max,nu=Math.sin,iu=Math.cos,ou=2*Math.PI,su=Ta(),lu=Ta(),cu=Ta();function uu(e,t,r){if(0!==e.length){for(var a=e[0],n=a[0],i=a[0],o=a[1],s=a[1],l=1;l<e.length;l++)a=e[l],n=ru(n,a[0]),i=au(i,a[0]),o=ru(o,a[1]),s=au(s,a[1]);t[0]=n,t[1]=o,r[0]=i,r[1]=s}}function pu(e,t,r,a,n,i){n[0]=ru(e,r),n[1]=ru(t,a),i[0]=au(e,r),i[1]=au(t,a)}var du=[],hu=[];function fu(e,t,r,a,n,i,o,s,l,c){var u=Bi,p=Fi,d=u(e,r,n,o,du);l[0]=1/0,l[1]=1/0,c[0]=-1/0,c[1]=-1/0;for(var h=0;h<d;h++){var f=p(e,r,n,o,du[h]);l[0]=ru(f,l[0]),c[0]=au(f,c[0])}d=u(t,a,i,s,hu);for(h=0;h<d;h++){var m=p(t,a,i,s,hu[h]);l[1]=ru(m,l[1]),c[1]=au(m,c[1])}l[0]=ru(e,l[0]),c[0]=au(e,c[0]),l[0]=ru(o,l[0]),c[0]=au(o,c[0]),l[1]=ru(t,l[1]),c[1]=au(t,c[1]),l[1]=ru(s,l[1]),c[1]=au(s,c[1])}function mu(e,t,r,a,n,i,o,s){var l=Yi,c=Wi,u=au(ru(l(e,r,n),1),0),p=au(ru(l(t,a,i),1),0),d=c(e,r,n,u),h=c(t,a,i,p);o[0]=ru(e,n,d),o[1]=ru(t,i,h),s[0]=au(e,n,d),s[1]=au(t,i,h)}function gu(e,t,r,a,n,i,o,s,l){var c=Ga,u=Ua,p=Math.abs(n-i);if(p%ou<1e-4&&p>1e-4)return s[0]=e-r,s[1]=t-a,l[0]=e+r,void(l[1]=t+a);if(su[0]=iu(n)*r+e,su[1]=nu(n)*a+t,lu[0]=iu(i)*r+e,lu[1]=nu(i)*a+t,c(s,su,lu),u(l,su,lu),n%=ou,n<0&&(n+=ou),i%=ou,i<0&&(i+=ou),n>i&&!o?i+=ou:n<i&&o&&(n+=ou),o){var d=i;i=n,n=d}for(var h=0;h<i;h+=Math.PI/2)h>n&&(cu[0]=iu(h)*r+e,cu[1]=nu(h)*a+t,c(s,cu,s),u(l,cu,l))}var vu={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},yu=[],bu=[],_u=[],xu=[],wu=[],Su=[],Du=Math.min,Cu=Math.max,Tu=Math.cos,Iu=Math.sin,Ou=Math.abs,Mu=Math.PI,Au=2*Mu,ku="undefined"!==typeof Float32Array,Pu=[];function Nu(e){var t=Math.round(e/Mu*1e8)/1e8;return t%2*Mu}function Eu(e,t){var r=Nu(e[0]);r<0&&(r+=Au);var a=r-e[0],n=e[1];n+=a,!t&&n-r>=Au?n=r+Au:t&&r-n>=Au?n=r-Au:!t&&r>n?n=r+(Au-Nu(r-n)):t&&r<n&&(n=r-(Au-Nu(n-r))),e[0]=r,e[1]=n}var Ru=function(){function e(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 e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,r){r=r||0,r>0&&(this._ux=Ou(r/Qo/e)||0,this._uy=Ou(r/Qo/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(vu.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var r=Ou(e-this._xi),a=Ou(t-this._yi),n=r>this._ux||a>this._uy;if(this.addData(vu.L,e,t),this._ctx&&n&&this._ctx.lineTo(e,t),n)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var i=r*r+a*a;i>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=i)}return this},e.prototype.bezierCurveTo=function(e,t,r,a,n,i){return this._drawPendingPt(),this.addData(vu.C,e,t,r,a,n,i),this._ctx&&this._ctx.bezierCurveTo(e,t,r,a,n,i),this._xi=n,this._yi=i,this},e.prototype.quadraticCurveTo=function(e,t,r,a){return this._drawPendingPt(),this.addData(vu.Q,e,t,r,a),this._ctx&&this._ctx.quadraticCurveTo(e,t,r,a),this._xi=r,this._yi=a,this},e.prototype.arc=function(e,t,r,a,n,i){this._drawPendingPt(),Pu[0]=a,Pu[1]=n,Eu(Pu,i),a=Pu[0],n=Pu[1];var o=n-a;return this.addData(vu.A,e,t,r,r,a,o,0,i?0:1),this._ctx&&this._ctx.arc(e,t,r,a,n,i),this._xi=Tu(n)*r+e,this._yi=Iu(n)*r+t,this},e.prototype.arcTo=function(e,t,r,a,n){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,r,a,n),this},e.prototype.rect=function(e,t,r,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,r,a),this.addData(vu.R,e,t,r,a),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(vu.Z);var e=this._ctx,t=this._x0,r=this._y0;return e&&e.closePath(),this._xi=t,this._yi=r,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){var t=e.length;this.data&&this.data.length===t||!ku||(this.data=new Float32Array(t));for(var r=0;r<t;r++)this.data[r]=e[r];this._len=t},e.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,r=0,a=this._len,n=0;n<t;n++)r+=e[n].len();ku&&this.data instanceof Float32Array&&(this.data=new Float32Array(a+r));for(n=0;n<t;n++)for(var i=e[n].data,o=0;o<i.length;o++)this.data[a++]=i[o];this._len=a},e.prototype.addData=function(e,t,r,a,n,i,o,s,l){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var u=0;u<arguments.length;u++)c[this._len++]=arguments[u]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,ku&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){_u[0]=_u[1]=wu[0]=wu[1]=Number.MAX_VALUE,xu[0]=xu[1]=Su[0]=Su[1]=-Number.MAX_VALUE;var e,t=this.data,r=0,a=0,n=0,i=0;for(e=0;e<this._len;){var o=t[e++],s=1===e;switch(s&&(r=t[e],a=t[e+1],n=r,i=a),o){case vu.M:r=n=t[e++],a=i=t[e++],wu[0]=n,wu[1]=i,Su[0]=n,Su[1]=i;break;case vu.L:pu(r,a,t[e],t[e+1],wu,Su),r=t[e++],a=t[e++];break;case vu.C:fu(r,a,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],wu,Su),r=t[e++],a=t[e++];break;case vu.Q:mu(r,a,t[e++],t[e++],t[e],t[e+1],wu,Su),r=t[e++],a=t[e++];break;case vu.A:var l=t[e++],c=t[e++],u=t[e++],p=t[e++],d=t[e++],h=t[e++]+d;e+=1;var f=!t[e++];s&&(n=Tu(d)*u+l,i=Iu(d)*p+c),gu(l,c,u,p,d,h,f,wu,Su),r=Tu(h)*u+l,a=Iu(h)*p+c;break;case vu.R:n=r=t[e++],i=a=t[e++];var m=t[e++],g=t[e++];pu(n,i,n+m,i+g,wu,Su);break;case vu.Z:r=n,a=i;break}Ga(_u,_u,wu),Ua(xu,xu,Su)}return 0===e&&(_u[0]=_u[1]=xu[0]=xu[1]=0),new Hn(_u[0],_u[1],xu[0]-_u[0],xu[1]-_u[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,r=this._ux,a=this._uy,n=0,i=0,o=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,c=0,u=0,p=0;p<t;){var d=e[p++],h=1===p;h&&(n=e[p],i=e[p+1],o=n,s=i);var f=-1;switch(d){case vu.M:n=o=e[p++],i=s=e[p++];break;case vu.L:var m=e[p++],g=e[p++],v=m-n,y=g-i;(Ou(v)>r||Ou(y)>a||p===t-1)&&(f=Math.sqrt(v*v+y*y),n=m,i=g);break;case vu.C:var b=e[p++],_=e[p++],x=(m=e[p++],g=e[p++],e[p++]),w=e[p++];f=Ui(n,i,b,_,m,g,x,w,10),n=x,i=w;break;case vu.Q:b=e[p++],_=e[p++],m=e[p++],g=e[p++];f=Ki(n,i,b,_,m,g,10),n=m,i=g;break;case vu.A:var S=e[p++],D=e[p++],C=e[p++],T=e[p++],I=e[p++],O=e[p++],M=O+I;p+=1,h&&(o=Tu(I)*C+S,s=Iu(I)*T+D),f=Cu(C,T)*Du(Au,Math.abs(O)),n=Tu(M)*C+S,i=Iu(M)*T+D;break;case vu.R:o=n=e[p++],s=i=e[p++];var A=e[p++],k=e[p++];f=2*A+2*k;break;case vu.Z:v=o-n,y=s-i;f=Math.sqrt(v*v+y*y),n=o,i=s;break}f>=0&&(l[u++]=f,c+=f)}return this._pathLen=c,c},e.prototype.rebuildPath=function(e,t){var r,a,n,i,o,s,l,c,u,p,d,h=this.data,f=this._ux,m=this._uy,g=this._len,v=t<1,y=0,b=0,_=0;if(!v||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,c=this._pathLen,u=t*c,u))e:for(var x=0;x<g;){var w=h[x++],S=1===x;switch(S&&(n=h[x],i=h[x+1],r=n,a=i),w!==vu.L&&_>0&&(e.lineTo(p,d),_=0),w){case vu.M:r=n=h[x++],a=i=h[x++],e.moveTo(n,i);break;case vu.L:o=h[x++],s=h[x++];var D=Ou(o-n),C=Ou(s-i);if(D>f||C>m){if(v){var T=l[b++];if(y+T>u){var I=(u-y)/T;e.lineTo(n*(1-I)+o*I,i*(1-I)+s*I);break e}y+=T}e.lineTo(o,s),n=o,i=s,_=0}else{var O=D*D+C*C;O>_&&(p=o,d=s,_=O)}break;case vu.C:var M=h[x++],A=h[x++],k=h[x++],P=h[x++],N=h[x++],E=h[x++];if(v){T=l[b++];if(y+T>u){I=(u-y)/T;$i(n,M,k,N,I,yu),$i(i,A,P,E,I,bu),e.bezierCurveTo(yu[1],bu[1],yu[2],bu[2],yu[3],bu[3]);break e}y+=T}e.bezierCurveTo(M,A,k,P,N,E),n=N,i=E;break;case vu.Q:M=h[x++],A=h[x++],k=h[x++],P=h[x++];if(v){T=l[b++];if(y+T>u){I=(u-y)/T;Xi(n,M,k,I,yu),Xi(i,A,P,I,bu),e.quadraticCurveTo(yu[1],bu[1],yu[2],bu[2]);break e}y+=T}e.quadraticCurveTo(M,A,k,P),n=k,i=P;break;case vu.A:var R=h[x++],L=h[x++],j=h[x++],F=h[x++],V=h[x++],z=h[x++],B=h[x++],$=!h[x++],G=j>F?j:F,U=Ou(j-F)>.001,W=V+z,H=!1;if(v){T=l[b++];y+T>u&&(W=V+z*(u-y)/T,H=!0),y+=T}if(U&&e.ellipse?e.ellipse(R,L,j,F,B,V,W,$):e.arc(R,L,G,V,W,$),H)break e;S&&(r=Tu(V)*j+R,a=Iu(V)*F+L),n=Tu(W)*j+R,i=Iu(W)*F+L;break;case vu.R:r=n=h[x],a=i=h[x+1],o=h[x++],s=h[x++];var q=h[x++],Y=h[x++];if(v){T=l[b++];if(y+T>u){var X=u-y;e.moveTo(o,s),e.lineTo(o+Du(X,q),s),X-=q,X>0&&e.lineTo(o+q,s+Du(X,Y)),X-=Y,X>0&&e.lineTo(o+Cu(q-X,0),s+Y),X-=q,X>0&&e.lineTo(o,s+Cu(Y-X,0));break e}y+=T}e.rect(o,s,q,Y);break;case vu.Z:if(v){T=l[b++];if(y+T>u){I=(u-y)/T;e.lineTo(n*(1-I)+r*I,i*(1-I)+a*I);break e}y+=T}e.closePath(),n=r,i=a}}},e.prototype.clone=function(){var t=new e,r=this.data;return t.data=r.slice?r.slice():Array.prototype.slice.call(r),t._len=this._len,t},e.CMD=vu,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}(),Lu=Ru;function ju(e,t,r,a,n,i,o){if(0===n)return!1;var s=n,l=0,c=e;if(o>t+s&&o>a+s||o<t-s&&o<a-s||i>e+s&&i>r+s||i<e-s&&i<r-s)return!1;if(e===r)return Math.abs(i-e)<=s/2;l=(t-a)/(e-r),c=(e*a-r*t)/(e-r);var u=l*i-o+c,p=u*u/(l*l+1);return p<=s/2*s/2}function Fu(e,t,r,a,n,i,o,s,l,c,u){if(0===l)return!1;var p=l;if(u>t+p&&u>a+p&&u>i+p&&u>s+p||u<t-p&&u<a-p&&u<i-p&&u<s-p||c>e+p&&c>r+p&&c>n+p&&c>o+p||c<e-p&&c<r-p&&c<n-p&&c<o-p)return!1;var d=Gi(e,t,r,a,n,i,o,s,c,u,null);return d<=p/2}function Vu(e,t,r,a,n,i,o,s,l){if(0===o)return!1;var c=o;if(l>t+c&&l>a+c&&l>i+c||l<t-c&&l<a-c&&l<i-c||s>e+c&&s>r+c&&s>n+c||s<e-c&&s<r-c&&s<n-c)return!1;var u=Zi(e,t,r,a,n,i,s,l,null);return u<=c/2}var zu=2*Math.PI;function Bu(e){return e%=zu,e<0&&(e+=zu),e}var $u=2*Math.PI;function Gu(e,t,r,a,n,i,o,s,l){if(0===o)return!1;var c=o;s-=e,l-=t;var u=Math.sqrt(s*s+l*l);if(u-c>r||u+c<r)return!1;if(Math.abs(a-n)%$u<1e-4)return!0;if(i){var p=a;a=Bu(n),n=Bu(p)}else a=Bu(a),n=Bu(n);a>n&&(n+=$u);var d=Math.atan2(l,s);return d<0&&(d+=$u),d>=a&&d<=n||d+$u>=a&&d+$u<=n}function Uu(e,t,r,a,n,i){if(i>t&&i>a||i<t&&i<a)return 0;if(a===t)return 0;var o=(i-t)/(a-t),s=a<t?1:-1;1!==o&&0!==o||(s=a<t?.5:-.5);var l=o*(r-e)+e;return l===n?1/0:l>n?s:0}var Wu=Lu.CMD,Hu=2*Math.PI,qu=1e-4;function Yu(e,t){return Math.abs(e-t)<qu}var Xu=[-1,-1,-1],Zu=[-1,-1];function Ku(){var e=Zu[0];Zu[0]=Zu[1],Zu[1]=e}function Ju(e,t,r,a,n,i,o,s,l,c){if(c>t&&c>a&&c>i&&c>s||c<t&&c<a&&c<i&&c<s)return 0;var u=zi(t,a,i,s,c,Xu);if(0===u)return 0;for(var p=0,d=-1,h=void 0,f=void 0,m=0;m<u;m++){var g=Xu[m],v=0===g||1===g?.5:1,y=Fi(e,r,n,o,g);y<l||(d<0&&(d=Bi(t,a,i,s,Zu),Zu[1]<Zu[0]&&d>1&&Ku(),h=Fi(t,a,i,s,Zu[0]),d>1&&(f=Fi(t,a,i,s,Zu[1]))),2===d?g<Zu[0]?p+=h<t?v:-v:g<Zu[1]?p+=f<h?v:-v:p+=s<f?v:-v:g<Zu[0]?p+=h<t?v:-v:p+=s<h?v:-v)}return p}function Qu(e,t,r,a,n,i,o,s){if(s>t&&s>a&&s>i||s<t&&s<a&&s<i)return 0;var l=qi(t,a,i,s,Xu);if(0===l)return 0;var c=Yi(t,a,i);if(c>=0&&c<=1){for(var u=0,p=Wi(t,a,i,c),d=0;d<l;d++){var h=0===Xu[d]||1===Xu[d]?.5:1,f=Wi(e,r,n,Xu[d]);f<o||(Xu[d]<c?u+=p<t?h:-h:u+=i<p?h:-h)}return u}h=0===Xu[0]||1===Xu[0]?.5:1,f=Wi(e,r,n,Xu[0]);return f<o?0:i<t?h:-h}function ep(e,t,r,a,n,i,o,s){if(s-=t,s>r||s<-r)return 0;var l=Math.sqrt(r*r-s*s);Xu[0]=-l,Xu[1]=l;var c=Math.abs(a-n);if(c<1e-4)return 0;if(c>=Hu-1e-4){a=0,n=Hu;var u=i?1:-1;return o>=Xu[0]+e&&o<=Xu[1]+e?u:0}if(a>n){var p=a;a=n,n=p}a<0&&(a+=Hu,n+=Hu);for(var d=0,h=0;h<2;h++){var f=Xu[h];if(f+e>o){var m=Math.atan2(s,f);u=i?1:-1;m<0&&(m=Hu+m),(m>=a&&m<=n||m+Hu>=a&&m+Hu<=n)&&(m>Math.PI/2&&m<1.5*Math.PI&&(u=-u),d+=u)}}return d}function tp(e,t,r,a,n){for(var i,o,s=e.data,l=e.len(),c=0,u=0,p=0,d=0,h=0,f=0;f<l;){var m=s[f++],g=1===f;switch(m===Wu.M&&f>1&&(r||(c+=Uu(u,p,d,h,a,n))),g&&(u=s[f],p=s[f+1],d=u,h=p),m){case Wu.M:d=s[f++],h=s[f++],u=d,p=h;break;case Wu.L:if(r){if(ju(u,p,s[f],s[f+1],t,a,n))return!0}else c+=Uu(u,p,s[f],s[f+1],a,n)||0;u=s[f++],p=s[f++];break;case Wu.C:if(r){if(Fu(u,p,s[f++],s[f++],s[f++],s[f++],s[f],s[f+1],t,a,n))return!0}else c+=Ju(u,p,s[f++],s[f++],s[f++],s[f++],s[f],s[f+1],a,n)||0;u=s[f++],p=s[f++];break;case Wu.Q:if(r){if(Vu(u,p,s[f++],s[f++],s[f],s[f+1],t,a,n))return!0}else c+=Qu(u,p,s[f++],s[f++],s[f],s[f+1],a,n)||0;u=s[f++],p=s[f++];break;case Wu.A:var v=s[f++],y=s[f++],b=s[f++],_=s[f++],x=s[f++],w=s[f++];f+=1;var S=!!(1-s[f++]);i=Math.cos(x)*b+v,o=Math.sin(x)*_+y,g?(d=i,h=o):c+=Uu(u,p,i,o,a,n);var D=(a-v)*_/b+v;if(r){if(Gu(v,y,_,x,x+w,S,t,D,n))return!0}else c+=ep(v,y,_,x,x+w,S,D,n);u=Math.cos(x+w)*b+v,p=Math.sin(x+w)*_+y;break;case Wu.R:d=u=s[f++],h=p=s[f++];var C=s[f++],T=s[f++];if(i=d+C,o=h+T,r){if(ju(d,h,i,h,t,a,n)||ju(i,h,i,o,t,a,n)||ju(i,o,d,o,t,a,n)||ju(d,o,d,h,t,a,n))return!0}else c+=Uu(i,h,i,o,a,n),c+=Uu(d,o,d,h,a,n);break;case Wu.Z:if(r){if(ju(u,p,d,h,t,a,n))return!0}else c+=Uu(u,p,d,h,a,n);u=d,p=h;break}}return r||Yu(p,h)||(c+=Uu(u,p,d,h,a,n)||0),0!==c}function rp(e,t,r){return tp(e,0,!1,t,r)}function ap(e,t,r,a){return tp(e,t,!0,r,a)}var np=Object(Sa["i"])({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},qc),ip={style:Object(Sa["i"])({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Yc.style)},op=ds.concat(["invisible","culling","z","z2","zlevel","parent"]),sp=function(e){function t(t){return e.call(this,t)||this}return Ca(t,e),t.prototype.update=function(){var r=this;e.prototype.update.call(this);var a=this.style;if(a.decal){var n=this._decalEl=this._decalEl||new t;n.buildPath===t.prototype.buildPath&&(n.buildPath=function(e){r.buildPath(e,r.shape)}),n.silent=!0;var i=n.style;for(var o in a)i[o]!==a[o]&&(i[o]=a[o]);i.fill=a.fill?a.decal:null,i.decal=null,i.shadowColor=null,a.strokeFirst&&(i.stroke=null);for(var s=0;s<op.length;++s)n[op[s]]=this[op[s]];n.__dirty|=mi}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var r=Object(Sa["F"])(t);this.shape=this.getDefaultShape();var a=this.getDefaultStyle();a&&this.useStyle(a);for(var n=0;n<r.length;n++){var i=r[n],o=t[i];"style"===i?this.style?Object(Sa["m"])(this.style,o):this.useStyle(o):"shape"===i?Object(Sa["m"])(this.shape,o):e.prototype.attrKV.call(this,i,o)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if("none"!==e){if(Object(Sa["C"])(e)){var t=Object(ro["e"])(e,0);return t>.5?ts:t>.2?as:rs}if(e)return rs}return ts},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(Object(Sa["C"])(t)){var r=this.__zr,a=!(!r||!r.isDarkMode()),n=Object(ro["e"])(e,0)<es;if(a===n)return t}},t.prototype.buildPath=function(e,t,r){},t.prototype.pathUpdated=function(){this.__dirty&=~vi},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Lu(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style,t=e.fill;return null!=t&&"none"!==t},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,r=!e;if(r){var a=!1;this.path||(a=!0,this.createPathProxy());var n=this.path;(a||this.__dirty&vi)&&(n.beginPath(),this.buildPath(n,this.shape,!1),this.pathUpdated()),e=n.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var i=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||r){i.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}o>1e-10&&(i.width+=s/o,i.height+=s/o,i.x-=s/o/2,i.y-=s/o/2)}return i}return e},t.prototype.contain=function(e,t){var r=this.transformCoordToLocal(e,t),a=this.getBoundingRect(),n=this.style;if(e=r[0],t=r[1],a.contain(e,t)){var i=this.path;if(this.hasStroke()){var o=n.lineWidth,s=n.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),ap(i,o/s,e,t)))return!0}if(this.hasFill())return rp(i,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=vi,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,r){"shape"===t?this.setShape(r):e.prototype.attrKV.call(this,t,r)},t.prototype.setShape=function(e,t){var r=this.shape;return r||(r=this.shape={}),"string"===typeof e?r[e]=t:Object(Sa["m"])(r,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&vi)},t.prototype.createStyle=function(e){return Object(Sa["g"])(np,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var r=this._normalState;t.shape&&!r.shape&&(r.shape=Object(Sa["m"])({},this.shape))},t.prototype._applyStateObj=function(t,r,a,n,i,o){e.prototype._applyStateObj.call(this,t,r,a,n,i,o);var s,l=!(r&&n);if(r&&r.shape?i?n?s=r.shape:(s=Object(Sa["m"])({},a.shape),Object(Sa["m"])(s,r.shape)):(s=Object(Sa["m"])({},n?this.shape:a.shape),Object(Sa["m"])(s,r.shape)):l&&(s=a.shape),s)if(i){this.shape=Object(Sa["m"])({},this.shape);for(var c={},u=Object(Sa["F"])(s),p=0;p<u.length;p++){var d=u[p];"object"===typeof s[d]?this.shape[d]=s[d]:c[d]=s[d]}this._transitionState(t,{shape:c},o)}else this.shape=s,this.dirtyShape()},t.prototype._mergeStates=function(t){for(var r,a=e.prototype._mergeStates.call(this,t),n=0;n<t.length;n++){var i=t[n];i.shape&&(r=r||{},this._mergeStyle(r,i.shape))}return r&&(a.shape=r),a},t.prototype.getAnimationStyleProps=function(){return ip},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var r=function(t){function r(r){var a=t.call(this,r)||this;return e.init&&e.init.call(a,r),a}return Ca(r,t),r.prototype.getDefaultStyle=function(){return Object(Sa["d"])(e.style)},r.prototype.getDefaultShape=function(){return Object(Sa["d"])(e.shape)},r}(t);for(var a in e)"function"===typeof e[a]&&(r.prototype[a]=e[a]);return r},t.initDefaultProps=function(){var e=t.prototype;e.type="path",e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=mi|gi|vi}(),t}(tu),lp=sp,cp=Object(Sa["i"])({strokeFirst:!0,font:gs["a"],x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},np),up=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ca(t,e),t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style,t=e.fill;return null!=t&&"none"!==t},t.prototype.createStyle=function(e){return Object(Sa["g"])(cp,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var t=e.text;null!=t?t+="":t="";var r=_s(t,e.font,e.textAlign,e.textBaseline);if(r.x+=e.x||0,r.y+=e.y||0,this.hasStroke()){var a=e.lineWidth;r.x-=a/2,r.y-=a/2,r.width+=a,r.height+=a}this._rect=r}return this._rect},t.initDefaultProps=function(){var e=t.prototype;e.dirtyRectTolerance=10}(),t}(tu);up.prototype.type="tspan";var pp=up,dp=Object(Sa["i"])({x:0,y:0},qc),hp={style:Object(Sa["i"])({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Yc.style)};function fp(e){return!!(e&&"string"!==typeof e&&e.width&&e.height)}var mp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ca(t,e),t.prototype.createStyle=function(e){return Object(Sa["g"])(dp,e)},t.prototype._getSize=function(e){var t=this.style,r=t[e];if(null!=r)return r;var a=fp(t.image)?t.image:this.__image;if(!a)return 0;var n="width"===e?"height":"width",i=t[n];return null==i?a[e]:a[e]/a[n]*i},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return hp},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new Hn(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(tu);mp.prototype.type="image";var gp=mp;function vp(e,t){var r,a,n,i,o,s=t.x,l=t.y,c=t.width,u=t.height,p=t.r;c<0&&(s+=c,c=-c),u<0&&(l+=u,u=-u),"number"===typeof p?r=a=n=i=p:p instanceof Array?1===p.length?r=a=n=i=p[0]:2===p.length?(r=n=p[0],a=i=p[1]):3===p.length?(r=p[0],a=i=p[1],n=p[2]):(r=p[0],a=p[1],n=p[2],i=p[3]):r=a=n=i=0,r+a>c&&(o=r+a,r*=c/o,a*=c/o),n+i>c&&(o=n+i,n*=c/o,i*=c/o),a+n>u&&(o=a+n,a*=u/o,n*=u/o),r+i>u&&(o=r+i,r*=u/o,i*=u/o),e.moveTo(s+r,l),e.lineTo(s+c-a,l),0!==a&&e.arc(s+c-a,l+a,a,-Math.PI/2,0),e.lineTo(s+c,l+u-n),0!==n&&e.arc(s+c-n,l+u-n,n,0,Math.PI/2),e.lineTo(s+i,l+u),0!==i&&e.arc(s+i,l+u-i,i,Math.PI/2,Math.PI),e.lineTo(s,l+r),0!==r&&e.arc(s+r,l+r,r,Math.PI,1.5*Math.PI)}var yp=Math.round;function bp(e,t,r){if(t){var a=t.x1,n=t.x2,i=t.y1,o=t.y2;e.x1=a,e.x2=n,e.y1=i,e.y2=o;var s=r&&r.lineWidth;return s?(yp(2*a)===yp(2*n)&&(e.x1=e.x2=xp(a,s,!0)),yp(2*i)===yp(2*o)&&(e.y1=e.y2=xp(i,s,!0)),e):e}}function _p(e,t,r){if(t){var a=t.x,n=t.y,i=t.width,o=t.height;e.x=a,e.y=n,e.width=i,e.height=o;var s=r&&r.lineWidth;return s?(e.x=xp(a,s,!0),e.y=xp(n,s,!0),e.width=Math.max(xp(a+i,s,!1)-e.x,0===i?0:1),e.height=Math.max(xp(n+o,s,!1)-e.y,0===o?0:1),e):e}}function xp(e,t,r){if(!t)return e;var a=yp(2*e);return(a+yp(t))%2===0?a/2:(a+(r?1:-1))/2}var wp=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Sp={},Dp=function(e){function t(t){return e.call(this,t)||this}return Ca(t,e),t.prototype.getDefaultShape=function(){return new wp},t.prototype.buildPath=function(e,t){var r,a,n,i;if(this.subPixelOptimize){var o=_p(Sp,t,this.style);r=o.x,a=o.y,n=o.width,i=o.height,o.r=t.r,t=o}else r=t.x,a=t.y,n=t.width,i=t.height;t.r?vp(e,t):e.rect(r,a,n,i)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(lp);Dp.prototype.type="rect";var Cp=Dp,Tp={fill:"#000"},Ip=2,Op={style:Object(Sa["i"])({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},Yc.style)},Mp=function(e){function t(t){var r=e.call(this)||this;return r.type="text",r._children=[],r._defaultStyle=Tp,r.attr(t),r}return Ca(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var r=this._children[t];r.zlevel=this.zlevel,r.z=this.z,r.z2=this.z2,r.culling=this.culling,r.cursor=this.cursor,r.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var r=this.innerTransformable;return r?r.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,Lp(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var r=0;r<this._children.length;r++)this._children[r].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var r=0;r<this._children.length;r++)this._children[r].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new Hn(0,0,0,0),t=this._children,r=[],a=null,n=0;n<t.length;n++){var i=t[n],o=i.getBoundingRect(),s=i.getLocalTransform(r);s?(e.copy(o),e.applyTransform(s),a=a||e.clone(),a.union(e)):(a=a||o.clone(),a.union(o))}this._rect=a||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||Tp},t.prototype.setTextContent=function(e){0},t.prototype._mergeStyle=function(e,t){if(!t)return e;var r=t.rich,a=e.rich||r&&{};return Object(Sa["m"])(e,t),r&&a?(this._mergeRich(a,r),e.rich=a):a&&(e.rich=a),e},t.prototype._mergeRich=function(e,t){for(var r=Object(Sa["F"])(t),a=0;a<r.length;a++){var n=r[a];e[n]=e[n]||{},Object(Sa["m"])(e[n],t[n])}},t.prototype.getAnimationStyleProps=function(){return Op},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||gs["a"],r=e.padding,a=Bp(e),n=Lc(a,e),i=$p(e),o=!!e.backgroundColor,s=n.outerHeight,l=n.outerWidth,c=n.contentWidth,u=n.lines,p=n.lineHeight,d=this._defaultStyle,h=e.x||0,f=e.y||0,m=e.align||d.align||"left",g=e.verticalAlign||d.verticalAlign||"top",v=h,y=ws(f,n.contentHeight,g);if(i||r){var b=xs(h,l,m),_=ws(f,s,g);i&&this._renderBackground(e,e,b,_,l,s)}y+=p/2,r&&(v=zp(h,m,r),"top"===g?y+=r[0]:"bottom"===g&&(y-=r[2]));for(var x=0,w=!1,S=(Vp("fill"in e?e.fill:(w=!0,d.fill))),D=(Fp("stroke"in e?e.stroke:o||d.autoStroke&&!w?null:(x=Ip,d.stroke))),C=e.textShadowBlur>0,T=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),I=n.calculatedLineHeight,O=0;O<u.length;O++){var M=this._getOrCreateChild(pp),A=M.createStyle();M.useStyle(A),A.text=u[O],A.x=v,A.y=y,m&&(A.textAlign=m),A.textBaseline="middle",A.opacity=e.opacity,A.strokeFirst=!0,C&&(A.shadowBlur=e.textShadowBlur||0,A.shadowColor=e.textShadowColor||"transparent",A.shadowOffsetX=e.textShadowOffsetX||0,A.shadowOffsetY=e.textShadowOffsetY||0),A.stroke=D,A.fill=S,D&&(A.lineWidth=e.lineWidth||x,A.lineDash=e.lineDash,A.lineDashOffset=e.lineDashOffset||0),A.font=t,Ep(A,e),y+=p,T&&M.setBoundingRect(new Hn(xs(A.x,e.width,A.textAlign),ws(A.y,I,A.textBaseline),c,I))}},t.prototype._updateRichTexts=function(){var e=this.style,t=Bp(e),r=zc(t,e),a=r.width,n=r.outerWidth,i=r.outerHeight,o=e.padding,s=e.x||0,l=e.y||0,c=this._defaultStyle,u=e.align||c.align,p=e.verticalAlign||c.verticalAlign,d=xs(s,n,u),h=ws(l,i,p),f=d,m=h;o&&(f+=o[3],m+=o[0]);var g=f+a;$p(e)&&this._renderBackground(e,e,d,h,n,i);for(var v=!!e.backgroundColor,y=0;y<r.lines.length;y++){var b=r.lines[y],_=b.tokens,x=_.length,w=b.lineHeight,S=b.width,D=0,C=f,T=g,I=x-1,O=void 0;while(D<x&&(O=_[D],!O.align||"left"===O.align))this._placeToken(O,e,w,m,C,"left",v),S-=O.width,C+=O.width,D++;while(I>=0&&(O=_[I],"right"===O.align))this._placeToken(O,e,w,m,T,"right",v),S-=O.width,T-=O.width,I--;C+=(a-(C-f)-(g-T)-S)/2;while(D<=I)O=_[D],this._placeToken(O,e,w,m,C+O.width/2,"center",v),C+=O.width,D++;m+=w}},t.prototype._placeToken=function(e,t,r,a,n,i,o){var s=t.rich[e.styleName]||{};s.text=e.text;var l=e.verticalAlign,c=a+r/2;"top"===l?c=a+e.height/2:"bottom"===l&&(c=a+r-e.height/2);var u=!e.isLineHolder&&$p(s);u&&this._renderBackground(s,t,"right"===i?n-e.width:"center"===i?n-e.width/2:n,c-e.height/2,e.width,e.height);var p=!!s.backgroundColor,d=e.textPadding;d&&(n=zp(n,i,d),c-=e.height/2-d[0]-e.innerHeight/2);var h=this._getOrCreateChild(pp),f=h.createStyle();h.useStyle(f);var m=this._defaultStyle,g=!1,v=0,y=Vp("fill"in s?s.fill:"fill"in t?t.fill:(g=!0,m.fill)),b=Fp("stroke"in s?s.stroke:"stroke"in t?t.stroke:p||o||m.autoStroke&&!g?null:(v=Ip,m.stroke)),_=s.textShadowBlur>0||t.textShadowBlur>0;f.text=e.text,f.x=n,f.y=c,_&&(f.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,f.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",f.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,f.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),f.textAlign=i,f.textBaseline="middle",f.font=e.font||gs["a"],f.opacity=Object(Sa["Q"])(s.opacity,t.opacity,1),Ep(f,s),b&&(f.lineWidth=Object(Sa["Q"])(s.lineWidth,t.lineWidth,v),f.lineDash=Object(Sa["P"])(s.lineDash,t.lineDash),f.lineDashOffset=t.lineDashOffset||0,f.stroke=b),y&&(f.fill=y);var x=e.contentWidth,w=e.contentHeight;h.setBoundingRect(new Hn(xs(f.x,x,f.textAlign),ws(f.y,w,f.textBaseline),x,w))},t.prototype._renderBackground=function(e,t,r,a,n,i){var o,s,l=e.backgroundColor,c=e.borderWidth,u=e.borderColor,p=l&&l.image,d=l&&!p,h=e.borderRadius,f=this;if(d||e.lineHeight||c&&u){o=this._getOrCreateChild(Cp),o.useStyle(o.createStyle()),o.style.fill=null;var m=o.shape;m.x=r,m.y=a,m.width=n,m.height=i,m.r=h,o.dirtyShape()}if(d){var g=o.style;g.fill=l||null,g.fillOpacity=Object(Sa["P"])(e.fillOpacity,1)}else if(p){s=this._getOrCreateChild(gp),s.onload=function(){f.dirtyStyle()};var v=s.style;v.image=l.image,v.x=r,v.y=a,v.width=n,v.height=i}if(c&&u){g=o.style;g.lineWidth=c,g.stroke=u,g.strokeOpacity=Object(Sa["P"])(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,o.strokeContainThreshold=0,o.hasFill()&&o.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var y=(o||s).style;y.shadowBlur=e.shadowBlur||0,y.shadowColor=e.shadowColor||"transparent",y.shadowOffsetX=e.shadowOffsetX||0,y.shadowOffsetY=e.shadowOffsetY||0,y.opacity=Object(Sa["Q"])(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return Rp(e)&&(t=[e.fontStyle,e.fontWeight,Np(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&Object(Sa["T"])(t)||e.textFont||e.font},t}(tu),Ap={left:!0,right:1,center:1},kp={top:1,bottom:1,middle:1},Pp=["fontStyle","fontWeight","fontSize","fontFamily"];function Np(e){return"string"!==typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?gs["c"]+"px":e+"px":e}function Ep(e,t){for(var r=0;r<Pp.length;r++){var a=Pp[r],n=t[a];null!=n&&(e[a]=n)}}function Rp(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}function Lp(e){return jp(e),Object(Sa["k"])(e.rich,jp),e}function jp(e){if(e){e.font=Mp.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||Ap[t]?t:"left";var r=e.verticalAlign;"center"===r&&(r="middle"),e.verticalAlign=null==r||kp[r]?r:"top";var a=e.padding;a&&(e.padding=Object(Sa["M"])(e.padding))}}function Fp(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function Vp(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function zp(e,t,r){return"right"===t?e-r[1]:"center"===t?e+r[3]/2-r[1]/2:e+r[3]}function Bp(e){var t=e.text;return null!=t&&(t+=""),t}function $p(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var Gp=Mp,Up=Zl(),Wp=function(e,t,r,a){if(a){var n=Up(a);n.dataIndex=r,n.dataType=t,n.seriesIndex=e,n.ssrType="chart","group"===a.type&&a.traverse((function(a){var n=Up(a);n.seriesIndex=e,n.dataIndex=r,n.dataType=t,n.ssrType="chart"}))}},Hp=1,qp={},Yp=Zl(),Xp=Zl(),Zp=0,Kp=1,Jp=2,Qp=["emphasis","blur","select"],ed=["normal","emphasis","blur","select"],td=10,rd=9,ad="highlight",nd="downplay",id="select",od="unselect",sd="toggleSelect";function ld(e){return null!=e&&"none"!==e}function cd(e,t,r){e.onHoverStateChange&&(e.hoverState||0)!==r&&e.onHoverStateChange(t),e.hoverState=r}function ud(e){cd(e,"emphasis",Jp)}function pd(e){e.hoverState===Jp&&cd(e,"normal",Zp)}function dd(e){cd(e,"blur",Kp)}function hd(e){e.hoverState===Kp&&cd(e,"normal",Zp)}function fd(e){e.selected=!0}function md(e){e.selected=!1}function gd(e,t,r){t(e,r)}function vd(e,t,r){gd(e,t,r),e.isGroup&&e.traverse((function(e){gd(e,t,r)}))}function yd(e,t){switch(t){case"emphasis":e.hoverState=Jp;break;case"normal":e.hoverState=Zp;break;case"blur":e.hoverState=Kp;break;case"select":e.selected=!0}}function bd(e,t,r,a){for(var n=e.style,i={},o=0;o<t.length;o++){var s=t[o],l=n[s];i[s]=null==l?a&&a[s]:l}for(o=0;o<e.animators.length;o++){var c=e.animators[o];c.__fromStateTransition&&c.__fromStateTransition.indexOf(r)<0&&"style"===c.targetName&&c.saveTo(i,t)}return i}function _d(e,t,r,a){var n=r&&Object(Sa["r"])(r,"select")>=0,i=!1;if(e instanceof lp){var o=Yp(e),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(ld(s)||ld(l)){a=a||{};var c=a.style||{};"inherit"===c.fill?(i=!0,a=Object(Sa["m"])({},a),c=Object(Sa["m"])({},c),c.fill=s):!ld(c.fill)&&ld(s)?(i=!0,a=Object(Sa["m"])({},a),c=Object(Sa["m"])({},c),c.fill=Object(ro["d"])(s)):!ld(c.stroke)&&ld(l)&&(i||(a=Object(Sa["m"])({},a),c=Object(Sa["m"])({},c)),c.stroke=Object(ro["d"])(l)),a.style=c}}if(a&&null==a.z2){i||(a=Object(Sa["m"])({},a));var u=e.z2EmphasisLift;a.z2=e.z2+(null!=u?u:td)}return a}function xd(e,t,r){if(r&&null==r.z2){r=Object(Sa["m"])({},r);var a=e.z2SelectLift;r.z2=e.z2+(null!=a?a:rd)}return r}function wd(e,t,r){var a=Object(Sa["r"])(e.currentStates,t)>=0,n=e.style.opacity,i=a?null:bd(e,["opacity"],t,{opacity:1});r=r||{};var o=r.style||{};return null==o.opacity&&(r=Object(Sa["m"])({},r),o=Object(Sa["m"])({opacity:a?n:.1*i.opacity},o),r.style=o),r}function Sd(e,t){var r=this.states[e];if(this.style){if("emphasis"===e)return _d(this,e,t,r);if("blur"===e)return wd(this,e,r);if("select"===e)return xd(this,e,r)}return r}function Dd(e){e.stateProxy=Sd;var t=e.getTextContent(),r=e.getTextGuideLine();t&&(t.stateProxy=Sd),r&&(r.stateProxy=Sd)}function Cd(e,t){!Nd(e,t)&&!e.__highByOuter&&vd(e,ud)}function Td(e,t){!Nd(e,t)&&!e.__highByOuter&&vd(e,pd)}function Id(e,t){e.__highByOuter|=1<<(t||0),vd(e,ud)}function Od(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&vd(e,pd)}function Md(e){vd(e,dd)}function Ad(e){vd(e,hd)}function kd(e){vd(e,fd)}function Pd(e){vd(e,md)}function Nd(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Ed(e){var t=e.getModel(),r=[],a=[];t.eachComponent((function(t,n){var i=Xp(n),o="series"===t,s=o?e.getViewOfSeriesModel(n):e.getViewOfComponentModel(n);!o&&a.push(s),i.isBlured&&(s.group.traverse((function(e){hd(e)})),o&&r.push(n)),i.isBlured=!1})),Object(Sa["k"])(a,(function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(r,!1,t)}))}function Rd(e,t,r,a){var n=a.getModel();function i(e,t){for(var r=0;r<t.length;r++){var a=e.getItemGraphicEl(t[r]);a&&Ad(a)}}if(r=r||"coordinateSystem",null!=e&&t&&"none"!==t){var o=n.getSeriesByIndex(e),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];n.eachSeries((function(e){var n=o===e,c=e.coordinateSystem;c&&c.master&&(c=c.master);var u=c&&s?c===s:n;if(!("series"===r&&!n||"coordinateSystem"===r&&!u||"series"===t&&n)){var p=a.getViewOfSeriesModel(e);if(p.group.traverse((function(e){e.__highByOuter&&n&&"self"===t||dd(e)})),Object(Sa["u"])(t))i(e.getData(),t);else if(Object(Sa["A"])(t))for(var d=Object(Sa["F"])(t),h=0;h<d.length;h++)i(e.getData(d[h]),t[d[h]]);l.push(e),Xp(e).isBlured=!0}})),n.eachComponent((function(e,t){if("series"!==e){var r=a.getViewOfComponentModel(t);r&&r.toggleBlurSeries&&r.toggleBlurSeries(l,!0,n)}}))}}function Ld(e,t,r){if(null!=e&&null!=t){var a=r.getModel().getComponent(e,t);if(a){Xp(a).isBlured=!0;var n=r.getViewOfComponentModel(a);n&&n.focusBlurEnabled&&n.group.traverse((function(e){dd(e)}))}}}function jd(e,t,r){var a=e.seriesIndex,n=e.getData(t.dataType);if(n){var i=Xl(n,t);i=(Object(Sa["t"])(i)?i[0]:i)||0;var o=n.getItemGraphicEl(i);if(!o){var s=n.count(),l=0;while(!o&&l<s)o=n.getItemGraphicEl(l++)}if(o){var c=Up(o);Rd(a,c.focus,c.blurScope,r)}else{var u=e.get(["emphasis","focus"]),p=e.get(["emphasis","blurScope"]);null!=u&&Rd(a,u,p,r)}}}function Fd(e,t,r,a){var n={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==r)return n;var i=a.getModel().getComponent(e,t);if(!i)return n;var o=a.getViewOfComponentModel(i);if(!o||!o.findHighDownDispatchers)return n;for(var s,l=o.findHighDownDispatchers(r),c=0;c<l.length;c++)if("self"===Up(l[c]).focus){s=!0;break}return{focusSelf:s,dispatchers:l}}function Vd(e,t,r){var a=Up(e),n=Fd(a.componentMainType,a.componentIndex,a.componentHighDownName,r),i=n.dispatchers,o=n.focusSelf;i?(o&&Ld(a.componentMainType,a.componentIndex,r),Object(Sa["k"])(i,(function(e){return Cd(e,t)}))):(Rd(a.seriesIndex,a.focus,a.blurScope,r),"self"===a.focus&&Ld(a.componentMainType,a.componentIndex,r),Cd(e,t))}function zd(e,t,r){Ed(r);var a=Up(e),n=Fd(a.componentMainType,a.componentIndex,a.componentHighDownName,r).dispatchers;n?Object(Sa["k"])(n,(function(e){return Td(e,t)})):Td(e,t)}function Bd(e,t,r){if(th(t)){var a=t.dataType,n=e.getData(a),i=Xl(n,t);Object(Sa["t"])(i)||(i=[i]),e[t.type===sd?"toggleSelect":t.type===id?"select":"unselect"](i,a)}}function $d(e){var t=e.getAllData();Object(Sa["k"])(t,(function(t){var r=t.data,a=t.type;r.eachItemGraphicEl((function(t,r){e.isSelected(r,a)?kd(t):Pd(t)}))}))}function Gd(e){var t=[];return e.eachSeries((function(e){var r=e.getAllData();Object(Sa["k"])(r,(function(r){r.data;var a=r.type,n=e.getSelectedDataIndices();if(n.length>0){var i={dataIndex:n,seriesIndex:e.seriesIndex};null!=a&&(i.dataType=a),t.push(i)}}))})),t}function Ud(e,t,r){Kd(e,!0),vd(e,Dd),qd(e,t,r)}function Wd(e){Kd(e,!1)}function Hd(e,t,r,a){a?Wd(e):Ud(e,t,r)}function qd(e,t,r){var a=Up(e);null!=t?(a.focus=t,a.blurScope=r):a.focus&&(a.focus=null)}var Yd=["emphasis","blur","select"],Xd={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Zd(e,t,r,a){r=r||"itemStyle";for(var n=0;n<Yd.length;n++){var i=Yd[n],o=t.getModel([i,r]),s=e.ensureState(i);s.style=a?a(o):o[Xd[r]]()}}function Kd(e,t){var r=!1===t,a=e;e.highDownSilentOnTouch&&(a.__highDownSilentOnTouch=e.highDownSilentOnTouch),r&&!a.__highDownDispatcher||(a.__highByOuter=a.__highByOuter||0,a.__highDownDispatcher=!r)}function Jd(e){return!(!e||!e.__highDownDispatcher)}function Qd(e,t,r){var a=Up(e);a.componentMainType=t.mainType,a.componentIndex=t.componentIndex,a.componentHighDownName=r}function eh(e){var t=qp[e];return null==t&&Hp<=32&&(t=qp[e]=Hp++),t}function th(e){var t=e.type;return t===id||t===od||t===sd}function rh(e){var t=e.type;return t===ad||t===nd}function ah(e){var t=Yp(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var r=e.states.select||{};t.selectFill=r.style&&r.style.fill||null,t.selectStroke=r.style&&r.style.stroke||null}var nh=Zl();function ih(e,t,r,a,n){var i;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();i=o&&o.animation}var s=t&&t.isAnimationEnabled(),l="update"===e;if(s){var c=void 0,u=void 0,p=void 0;a?(c=Object(Sa["P"])(a.duration,200),u=Object(Sa["P"])(a.easing,"cubicOut"),p=0):(c=t.getShallow(l?"animationDurationUpdate":"animationDuration"),u=t.getShallow(l?"animationEasingUpdate":"animationEasing"),p=t.getShallow(l?"animationDelayUpdate":"animationDelay")),i&&(null!=i.duration&&(c=i.duration),null!=i.easing&&(u=i.easing),null!=i.delay&&(p=i.delay)),Object(Sa["w"])(p)&&(p=p(r,n)),Object(Sa["w"])(c)&&(c=c(r));var d={duration:c||0,delay:p,easing:u};return d}return null}function oh(e,t,r,a,n,i,o){var s,l=!1;Object(Sa["w"])(n)?(o=i,i=n,n=null):Object(Sa["A"])(n)&&(i=n.cb,o=n.during,l=n.isFrom,s=n.removeOpt,n=n.dataIndex);var c="leave"===e;c||t.stopAnimation("leave");var u=ih(e,a,n,c?s||{}:null,a&&a.getAnimationDelayParams?a.getAnimationDelayParams(t,n):null);if(u&&u.duration>0){var p=u.duration,d=u.delay,h=u.easing,f={duration:p,delay:d||0,easing:h,done:i,force:!!i||!!o,setToFinal:!c,scope:e,during:o};l?t.animateFrom(r,f):t.animateTo(r,f)}else t.stopAnimation(),!l&&t.attr(r),o&&o(1),i&&i()}function sh(e,t,r,a,n,i){oh("update",e,t,r,a,n,i)}function lh(e,t,r,a,n,i){oh("enter",e,t,r,a,n,i)}function ch(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++){var r=e.animators[t];if("leave"===r.scope)return!0}return!1}function uh(e,t,r,a,n,i){ch(e)||oh("leave",e,t,r,a,n,i)}function ph(e,t,r,a){e.removeTextContent(),e.removeTextGuideLine(),uh(e,{style:{opacity:0}},t,r,a)}function dh(e,t,r){function a(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse((function(e){e.isGroup||ph(e,t,r,a)})):ph(e,t,r,a)}function hh(e){nh(e).oldStyle=e.style}function fh(e){return nh(e).oldStyle}var mh={};function gh(e,t){for(var r=0;r<Qp.length;r++){var a=Qp[r],n=t[a],i=e.ensureState(a);i.style=i.style||{},i.style.text=n}var o=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(o,!0)}function vh(e,t,r){var a,n=e.labelFetcher,i=e.labelDataIndex,o=e.labelDimIndex,s=t.normal;n&&(a=n.getFormattedLabel(i,"normal",null,o,s&&s.get("formatter"),null!=r?{interpolatedValue:r}:null)),null==a&&(a=Object(Sa["w"])(e.defaultText)?e.defaultText(i,e,r):e.defaultText);for(var l={normal:a},c=0;c<Qp.length;c++){var u=Qp[c],p=t[u];l[u]=Object(Sa["P"])(n?n.getFormattedLabel(i,u,null,o,p&&p.get("formatter")):null,a)}return l}function yh(e,t,r,a){r=r||mh;for(var n=e instanceof Gp,i=!1,o=0;o<ed.length;o++){var s=t[ed[o]];if(s&&s.getShallow("show")){i=!0;break}}var l=n?e:e.getTextContent();if(i){n||(l||(l=new Gp,e.setTextContent(l)),e.stateProxy&&(l.stateProxy=e.stateProxy));var c=vh(r,t),u=t.normal,p=!!u.getShallow("show"),d=_h(u,a&&a.normal,r,!1,!n);d.text=c.normal,n||e.setTextConfig(xh(u,r,!1));for(o=0;o<Qp.length;o++){var h=Qp[o];s=t[h];if(s){var f=l.ensureState(h),m=!!Object(Sa["P"])(s.getShallow("show"),p);if(m!==p&&(f.ignore=!m),f.style=_h(s,a&&a[h],r,!0,!n),f.style.text=c[h],!n){var g=e.ensureState(h);g.textConfig=xh(s,r,!0)}}}l.silent=!!u.getShallow("silent"),null!=l.style.x&&(d.x=l.style.x),null!=l.style.y&&(d.y=l.style.y),l.ignore=!p,l.useStyle(d),l.dirty(),r.enableTextSetter&&(Mh(l).setLabelText=function(e){var a=vh(r,t,e);gh(l,a)})}else l&&(l.ignore=!0);e.dirty()}function bh(e,t){t=t||"label";for(var r={normal:e.getModel(t)},a=0;a<Qp.length;a++){var n=Qp[a];r[n]=e.getModel([n,t])}return r}function _h(e,t,r,a,n){var i={};return wh(i,e,r,a,n),t&&Object(Sa["m"])(i,t),i}function xh(e,t,r){t=t||{};var a,n={},i=e.getShallow("rotate"),o=Object(Sa["P"])(e.getShallow("distance"),r?null:5),s=e.getShallow("offset");return a=e.getShallow("position")||(r?null:"inside"),"outside"===a&&(a=t.defaultOutsidePosition||"top"),null!=a&&(n.position=a),null!=s&&(n.offset=s),null!=i&&(i*=Math.PI/180,n.rotation=i),null!=o&&(n.distance=o),n.outsideFill="inherit"===e.get("color")?t.inheritColor||null:"auto",n}function wh(e,t,r,a,n){r=r||mh;var i,o=t.ecModel,s=o&&o.option.textStyle,l=Sh(t);if(l)for(var c in i={},l)if(l.hasOwnProperty(c)){var u=t.getModel(["rich",c]);Ih(i[c]={},u,s,r,a,n,!1,!0)}i&&(e.rich=i);var p=t.get("overflow");p&&(e.overflow=p);var d=t.get("minMargin");null!=d&&(e.margin=d),Ih(e,t,s,r,a,n,!0,!1)}function Sh(e){var t;while(e&&e!==e.ecModel){var r=(e.option||mh).rich;if(r){t=t||{};for(var a=Object(Sa["F"])(r),n=0;n<a.length;n++){var i=a[n];t[i]=1}}e=e.parentModel}return t}var Dh=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Ch=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Th=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Ih(e,t,r,a,n,i,o,s){r=!n&&r||mh;var l=a&&a.inheritColor,c=t.getShallow("color"),u=t.getShallow("textBorderColor"),p=Object(Sa["P"])(t.getShallow("opacity"),r.opacity);"inherit"!==c&&"auto"!==c||(c=l||null),"inherit"!==u&&"auto"!==u||(u=l||null),i||(c=c||r.color,u=u||r.textBorderColor),null!=c&&(e.fill=c),null!=u&&(e.stroke=u);var d=Object(Sa["P"])(t.getShallow("textBorderWidth"),r.textBorderWidth);null!=d&&(e.lineWidth=d);var h=Object(Sa["P"])(t.getShallow("textBorderType"),r.textBorderType);null!=h&&(e.lineDash=h);var f=Object(Sa["P"])(t.getShallow("textBorderDashOffset"),r.textBorderDashOffset);null!=f&&(e.lineDashOffset=f),n||null!=p||s||(p=a&&a.defaultOpacity),null!=p&&(e.opacity=p),n||i||null==e.fill&&a.inheritColor&&(e.fill=a.inheritColor);for(var m=0;m<Dh.length;m++){var g=Dh[m],v=Object(Sa["P"])(t.getShallow(g),r[g]);null!=v&&(e[g]=v)}for(m=0;m<Ch.length;m++){g=Ch[m],v=t.getShallow(g);null!=v&&(e[g]=v)}if(null==e.verticalAlign){var y=t.getShallow("baseline");null!=y&&(e.verticalAlign=y)}if(!o||!a.disableBox){for(m=0;m<Th.length;m++){g=Th[m],v=t.getShallow(g);null!=v&&(e[g]=v)}var b=t.getShallow("borderType");null!=b&&(e.borderDash=b),"auto"!==e.backgroundColor&&"inherit"!==e.backgroundColor||!l||(e.backgroundColor=l),"auto"!==e.borderColor&&"inherit"!==e.borderColor||!l||(e.borderColor=l)}}function Oh(e,t){var r=t&&t.getModel("textStyle");return Object(Sa["T"])([e.fontStyle||r&&r.getShallow("fontStyle")||"",e.fontWeight||r&&r.getShallow("fontWeight")||"",(e.fontSize||r&&r.getShallow("fontSize")||12)+"px",e.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))}var Mh=Zl();function Ah(e,t,r,a){if(e){var n=Mh(e);n.prevValue=n.value,n.value=r;var i=t.normal;n.valueAnimation=i.get("valueAnimation"),n.valueAnimation&&(n.precision=i.get("precision"),n.defaultInterpolatedText=a,n.statesModels=t)}}function kh(e,t,r,a,n){var i=Mh(e);if(i.valueAnimation&&i.prevValue!==i.value){var o=i.defaultInterpolatedText,s=Object(Sa["P"])(i.interpolatedValue,i.prevValue),l=i.value;e.percent=0,(null==i.prevValue?lh:sh)(e,{percent:1},a,t,null,c)}function c(a){var c=sc(r,i.precision,s,l,a);i.interpolatedValue=1===a?null:c;var u=vh({labelDataIndex:t,labelFetcher:n,defaultText:o?o(c):c+""},i.statesModels,c);gh(e,u)}}var Ph=["textStyle","color"],Nh=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Eh=new Gp,Rh=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(Ph):null)},e.prototype.getFont=function(){return Oh({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},r=0;r<Nh.length;r++)t[Nh[r]]=this.getShallow(Nh[r]);return Eh.useStyle(t),Eh.update(),Eh.getBoundingRect()},e}(),Lh=Rh,jh=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],Fh=wc(jh),Vh=function(){function e(){}return e.prototype.getLineStyle=function(e){return Fh(this,e)},e}(),zh=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],Bh=wc(zh),$h=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return Bh(this,e,t)},e}(),Gh=function(){function e(e,t,r){this.parentModel=t,this.ecModel=r,this.option=e}return e.prototype.init=function(e,t,r){for(var a=[],n=3;n<arguments.length;n++)a[n-3]=arguments[n]},e.prototype.mergeOption=function(e,t){Object(Sa["I"])(this.option,e,!0)},e.prototype.get=function(e,t){return null==e?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var r=this.option,a=null==r?r:r[e];if(null==a&&!t){var n=this.parentModel;n&&(a=n.getShallow(e))}return a},e.prototype.getModel=function(t,r){var a=null!=t,n=a?this.parsePath(t):null,i=a?this._doGet(n):this.option;return r=r||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(n)),new e(i,r,this.ecModel)},e.prototype.isEmpty=function(){return null==this.option},e.prototype.restoreData=function(){},e.prototype.clone=function(){var e=this.constructor;return new e(Object(Sa["d"])(this.option))},e.prototype.parsePath=function(e){return"string"===typeof e?e.split("."):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!wa["a"].node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var r=this.option;if(!e)return r;for(var a=0;a<e.length;a++)if(e[a]&&(r=r&&"object"===typeof r?r[e[a]]:null,null==r))break;return null==r&&t&&(r=t._doGet(this.resolveParentPath(e),t.parentModel)),r},e}();fc(Gh),yc(Gh),Object(Sa["K"])(Gh,Vh),Object(Sa["K"])(Gh,$h),Object(Sa["K"])(Gh,Cc),Object(Sa["K"])(Gh,Lh);var Uh=Gh,Wh=Math.round(10*Math.random());function Hh(e){return[e||"",Wh++].join("_")}function qh(e){var t={};e.registerSubTypeDefaulter=function(e,r){var a=pc(e);t[a.main]=r},e.determineSubType=function(r,a){var n=a.type;if(!n){var i=pc(r).main;e.hasSubTypes(r)&&t[i]&&(n=t[i](a))}return n}}function Yh(e,t){function r(e){var r={},i=[];return Sa["k"](e,(function(o){var s=a(r,o),l=s.originalDeps=t(o),c=n(l,e);s.entryCount=c.length,0===s.entryCount&&i.push(o),Sa["k"](c,(function(e){Sa["r"](s.predecessor,e)<0&&s.predecessor.push(e);var t=a(r,e);Sa["r"](t.successor,e)<0&&t.successor.push(o)}))})),{graph:r,noEntryList:i}}function a(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}function n(e,t){var r=[];return Sa["k"](e,(function(e){Sa["r"](t,e)>=0&&r.push(e)})),r}e.topologicalTravel=function(e,t,a,n){if(e.length){var i=r(t),o=i.graph,s=i.noEntryList,l={};Sa["k"](e,(function(e){l[e]=!0}));while(s.length){var c=s.pop(),u=o[c],p=!!l[c];p&&(a.call(n,c,u.originalDeps.slice()),delete l[c]),Sa["k"](u.successor,p?h:d)}Sa["k"](l,(function(){var e="";throw new Error(e)}))}function d(e){o[e].entryCount--,0===o[e].entryCount&&s.push(e)}function h(e){l[e]=!0,d(e)}}}function Xh(e,t){return Sa["I"](Sa["I"]({},e,!0),t,!0)}var Zh={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:". "}}}},Kh={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:""}}}},Jh="ZH",Qh="EN",ef=Qh,tf={},rf={},af=wa["a"].domSupported?function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage||ef).toUpperCase();return e.indexOf(Jh)>-1?Jh:ef}():ef;function nf(e,t){e=e.toUpperCase(),rf[e]=new Uh(t),tf[e]=t}function of(e){if(Object(Sa["C"])(e)){var t=tf[e.toUpperCase()]||{};return e===Jh||e===Qh?Object(Sa["d"])(t):Object(Sa["I"])(Object(Sa["d"])(t),Object(Sa["d"])(tf[ef]),!1)}return Object(Sa["I"])(Object(Sa["d"])(e),Object(Sa["d"])(tf[ef]),!1)}function sf(e){return rf[e]}function lf(){return rf[ef]}nf(Qh,Zh),nf(Jh,Kh);var cf=1e3,uf=60*cf,pf=60*uf,df=24*pf,hf=365*df,ff={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}"},mf="{yyyy}-{MM}-{dd}",gf={year:"{yyyy}",month:"{yyyy}-{MM}",day:mf,hour:mf+" "+ff.hour,minute:mf+" "+ff.minute,second:mf+" "+ff.second,millisecond:ff.none},vf=["year","month","day","hour","minute","second","millisecond"],yf=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function bf(e,t){return e+="","0000".substr(0,t-e.length)+e}function _f(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function xf(e){return e===_f(e)}function wf(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Sf(e,t,r,a){var n=fl(e),i=n[If(r)](),o=n[Of(r)]()+1,s=Math.floor((o-1)/3)+1,l=n[Mf(r)](),c=n["get"+(r?"UTC":"")+"Day"](),u=n[Af(r)](),p=(u-1)%12+1,d=n[kf(r)](),h=n[Pf(r)](),f=n[Nf(r)](),m=u>=12?"pm":"am",g=m.toUpperCase(),v=a instanceof Uh?a:sf(a||af)||lf(),y=v.getModel("time"),b=y.get("month"),_=y.get("monthAbbr"),x=y.get("dayOfWeek"),w=y.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,m+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,bf(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,b[o-1]).replace(/{MMM}/g,_[o-1]).replace(/{MM}/g,bf(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,bf(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[c]).replace(/{ee}/g,w[c]).replace(/{e}/g,c+"").replace(/{HH}/g,bf(u,2)).replace(/{H}/g,u+"").replace(/{hh}/g,bf(p+"",2)).replace(/{h}/g,p+"").replace(/{mm}/g,bf(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,bf(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,bf(f,3)).replace(/{S}/g,f+"")}function Df(e,t,r,a,n){var i=null;if(Sa["C"](r))i=r;else if(Sa["w"](r))i=r(e.value,t,{level:e.level});else{var o=Sa["m"]({},ff);if(e.level>0)for(var s=0;s<vf.length;++s)o[vf[s]]="{primary|"+o[vf[s]]+"}";var l=r?!1===r.inherit?r:Sa["i"](r,o):o,c=Cf(e.value,n);if(l[c])i=l[c];else if(l.inherit){var u=yf.indexOf(c);for(s=u-1;s>=0;--s)if(l[c]){i=l[c];break}i=i||o.none}if(Sa["t"](i)){var p=null==e.level?0:e.level>=0?e.level:i.length+e.level;p=Math.min(p,i.length-1),i=i[p]}}return Sf(new Date(e.value),i,n,a)}function Cf(e,t){var r=fl(e),a=r[Of(t)]()+1,n=r[Mf(t)](),i=r[Af(t)](),o=r[kf(t)](),s=r[Pf(t)](),l=r[Nf(t)](),c=0===l,u=c&&0===s,p=u&&0===o,d=p&&0===i,h=d&&1===n,f=h&&1===a;return f?"year":h?"month":d?"day":p?"hour":u?"minute":c?"second":"millisecond"}function Tf(e,t,r){var a=Sa["z"](e)?fl(e):e;switch(t=t||Cf(e,r),t){case"year":return a[If(r)]();case"half-year":return a[Of(r)]()>=6?1:0;case"quarter":return Math.floor((a[Of(r)]()+1)/4);case"month":return a[Of(r)]();case"day":return a[Mf(r)]();case"half-day":return a[Af(r)]()/24;case"hour":return a[Af(r)]();case"minute":return a[kf(r)]();case"second":return a[Pf(r)]();case"millisecond":return a[Nf(r)]()}}function If(e){return e?"getUTCFullYear":"getFullYear"}function Of(e){return e?"getUTCMonth":"getMonth"}function Mf(e){return e?"getUTCDate":"getDate"}function Af(e){return e?"getUTCHours":"getHours"}function kf(e){return e?"getUTCMinutes":"getMinutes"}function Pf(e){return e?"getUTCSeconds":"getSeconds"}function Nf(e){return e?"getUTCMilliseconds":"getMilliseconds"}function Ef(e){return e?"setUTCFullYear":"setFullYear"}function Rf(e){return e?"setUTCMonth":"setMonth"}function Lf(e){return e?"setUTCDate":"setDate"}function jf(e){return e?"setUTCHours":"setHours"}function Ff(e){return e?"setUTCMinutes":"setMinutes"}function Vf(e){return e?"setUTCSeconds":"setSeconds"}function zf(e){return e?"setUTCMilliseconds":"setMilliseconds"}function Bf(e){if(!xl(e))return Sa["C"](e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function $f(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var Gf=Sa["M"];function Uf(e,t,r){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(e){return e&&Sa["T"](e)?e:"-"}function i(e){return!(null==e||isNaN(e)||!isFinite(e))}var o="time"===t,s=e instanceof Date;if(o||s){var l=o?fl(e):e;if(!isNaN(+l))return Sf(l,a,r);if(s)return"-"}if("ordinal"===t)return Sa["D"](e)?n(e):Sa["z"](e)&&i(e)?e+"":"-";var c=_l(e);return i(c)?Bf(c):Sa["D"](e)?n(e):"boolean"===typeof e?e+"":"-"}var Wf=["a","b","c","d","e","f","g"],Hf=function(e,t){return"{"+e+(null==t?"":t)+"}"};function qf(e,t,r){Sa["t"](t)||(t=[t]);var a=t.length;if(!a)return"";for(var n=t[0].$vars||[],i=0;i<n.length;i++){var o=Wf[i];e=e.replace(Hf(o),Hf(o,0))}for(var s=0;s<a;s++)for(var l=0;l<n.length;l++){var c=t[s][n[l]];e=e.replace(Hf(Wf[l],s),r?cn(c):c)}return e}function Yf(e,t,r){return Sa["k"](t,(function(t,a){e=e.replace("{"+a+"}",r?cn(t):t)})),e}function Xf(e,t){var r=Sa["C"](e)?{color:e,extraCssText:t}:e||{},a=r.color,n=r.type;t=r.extraCssText;var i=r.renderMode||"html";if(!a)return"";if("html"===i)return"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+cn(a)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+cn(a)+";"+(t||"")+'"></span>';var o=r.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:"subItem"===n?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}}function Zf(e,t){return t=t||"transparent",Sa["C"](e)?e:Sa["A"](e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function Kf(e,t){if("_blank"===t||"blank"===t){var r=window.open();r.opener=null,r.location.href=e}else window.open(e,t)}var Jf=Sa["k"],Qf=["left","right","top","bottom","width","height"],em=[["width","left","right"],["height","top","bottom"]];function tm(e,t,r,a,n){var i=0,o=0;null==a&&(a=1/0),null==n&&(n=1/0);var s=0;t.eachChild((function(l,c){var u,p,d=l.getBoundingRect(),h=t.childAt(c+1),f=h&&h.getBoundingRect();if("horizontal"===e){var m=d.width+(f?-f.x+d.x:0);u=i+m,u>a||l.newline?(i=0,u=m,o+=s+r,s=d.height):s=Math.max(s,d.height)}else{var g=d.height+(f?-f.y+d.y:0);p=o+g,p>n||l.newline?(i+=s+r,o=0,p=g,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),"horizontal"===e?i=u+r:o=p+r)}))}var rm=tm;Sa["h"](tm,"vertical"),Sa["h"](tm,"horizontal");function am(e,t,r){var a=t.width,n=t.height,i=rl(e.left,a),o=rl(e.top,n),s=rl(e.right,a),l=rl(e.bottom,n);return(isNaN(i)||isNaN(parseFloat(e.left)))&&(i=0),(isNaN(s)||isNaN(parseFloat(e.right)))&&(s=a),(isNaN(o)||isNaN(parseFloat(e.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(e.bottom)))&&(l=n),r=Gf(r||0),{width:Math.max(s-i-r[1]-r[3],0),height:Math.max(l-o-r[0]-r[2],0)}}function nm(e,t,r){r=Gf(r||0);var a=t.width,n=t.height,i=rl(e.left,a),o=rl(e.top,n),s=rl(e.right,a),l=rl(e.bottom,n),c=rl(e.width,a),u=rl(e.height,n),p=r[2]+r[0],d=r[1]+r[3],h=e.aspect;switch(isNaN(c)&&(c=a-s-d-i),isNaN(u)&&(u=n-l-p-o),null!=h&&(isNaN(c)&&isNaN(u)&&(h>a/n?c=.8*a:u=.8*n),isNaN(c)&&(c=h*u),isNaN(u)&&(u=c/h)),isNaN(i)&&(i=a-s-c-d),isNaN(o)&&(o=n-l-u-p),e.left||e.right){case"center":i=a/2-c/2-r[3];break;case"right":i=a-c-d;break}switch(e.top||e.bottom){case"middle":case"center":o=n/2-u/2-r[0];break;case"bottom":o=n-u-p;break}i=i||0,o=o||0,isNaN(c)&&(c=a-d-i-(s||0)),isNaN(u)&&(u=n-p-o-(l||0));var f=new Hn(i+r[3],o+r[0],c,u);return f.margin=r,f}function im(e,t,r,a,n,i){var o,s=!n||!n.hv||n.hv[0],l=!n||!n.hv||n.hv[1],c=n&&n.boundingMode||"all";if(i=i||e,i.x=e.x,i.y=e.y,!s&&!l)return!1;if("raw"===c)o="group"===e.type?new Hn(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(o=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();o=o.clone(),o.applyTransform(u)}var p=nm(Sa["i"]({width:o.width,height:o.height},t),r,a),d=s?p.x-o.x:0,h=l?p.y-o.y:0;return"raw"===c?(i.x=d,i.y=h):(i.x+=d,i.y+=h),i===e&&e.markRedraw(),!0}function om(e,t){return null!=e[em[t][0]]||null!=e[em[t][1]]&&null!=e[em[t][2]]}function sm(e){var t=e.layoutMode||e.constructor.layoutMode;return Sa["A"](t)?t:t?{type:t}:null}function lm(e,t,r){var a=r&&r.ignoreSize;!Sa["t"](a)&&(a=[a,a]);var n=o(em[0],0),i=o(em[1],1);function o(r,n){var i={},o=0,c={},u=0,p=2;if(Jf(r,(function(t){c[t]=e[t]})),Jf(r,(function(e){s(t,e)&&(i[e]=c[e]=t[e]),l(i,e)&&o++,l(c,e)&&u++})),a[n])return l(t,r[1])?c[r[2]]=null:l(t,r[2])&&(c[r[1]]=null),c;if(u!==p&&o){if(o>=p)return i;for(var d=0;d<r.length;d++){var h=r[d];if(!s(i,h)&&s(e,h)){i[h]=e[h];break}}return i}return c}function s(e,t){return e.hasOwnProperty(t)}function l(e,t){return null!=e[t]&&"auto"!==e[t]}function c(e,t,r){Jf(e,(function(e){t[e]=r[e]}))}c(em[0],e,n),c(em[1],e,i)}function cm(e){return um({},e)}function um(e,t){return t&&e&&Jf(Qf,(function(r){t.hasOwnProperty(r)&&(e[r]=t[r])})),e}var pm=Zl(),dm=function(e){function t(t,r,a){var n=e.call(this,t,r,a)||this;return n.uid=Hh("ec_cpt_model"),n}return xa(t,e),t.prototype.init=function(e,t,r){this.mergeDefaultAndTheme(e,r)},t.prototype.mergeDefaultAndTheme=function(e,t){var r=sm(this),a=r?cm(e):{},n=t.getTheme();Sa["I"](e,n.get(this.mainType)),Sa["I"](e,this.getDefaultOption()),r&&lm(e,a,r)},t.prototype.mergeOption=function(e,t){Sa["I"](this.option,e,!0);var r=sm(this);r&&lm(this.option,e,r)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!hc(e))return e.defaultOption;var t=pm(this);if(!t.defaultOption){var r=[],a=e;while(a){var n=a.prototype.defaultOption;n&&r.push(n),a=a.superClass}for(var i={},o=r.length-1;o>=0;o--)i=Sa["I"](i,r[o],!0);t.defaultOption=i}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var r=e+"Index",a=e+"Id";return rc(this.ecModel,e,{index:this.get(r,!0),id:this.get(a,!0)},t)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(Uh);function hm(e){var t=[];return Sa["k"](dm.getClassesByMainType(e),(function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])})),t=Sa["H"](t,(function(e){return pc(e).main})),"dataset"!==e&&Sa["r"](t,"dataset")<=0&&t.unshift("dataset"),t}gc(dm,Uh),xc(dm),qh(dm),Yh(dm,hm);var fm=dm,mm="";"undefined"!==typeof navigator&&(mm=navigator.platform||"");var gm="rgba(0, 0, 0, 0.2)",vm={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:gm,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:gm,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:gm,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:gm,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:gm,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:gm,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:mm.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},ym=Object(Sa["f"])(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),bm="original",_m="arrayRows",xm="objectRows",wm="keyedColumns",Sm="typedArray",Dm="unknown",Cm="column",Tm="row",Im={Must:1,Might:2,Not:3},Om=Zl();function Mm(e){Om(e).datasetMap=Object(Sa["f"])()}function Am(e,t,r){var a={},n=Pm(t);if(!n||!e)return a;var i,o,s=[],l=[],c=t.ecModel,u=Om(c).datasetMap,p=n.uid+"_"+r.seriesLayoutBy;e=e.slice(),Object(Sa["k"])(e,(function(t,r){var n=Object(Sa["A"])(t)?t:e[r]={name:t};"ordinal"===n.type&&null==i&&(i=r,o=f(n)),a[n.name]=[]}));var d=u.get(p)||u.set(p,{categoryWayDim:o,valueWayDim:0});function h(e,t,r){for(var a=0;a<r;a++)e.push(t+a)}function f(e){var t=e.dimsDef;return t?t.length:1}return Object(Sa["k"])(e,(function(e,t){var r=e.name,n=f(e);if(null==i){var o=d.valueWayDim;h(a[r],o,n),h(l,o,n),d.valueWayDim+=n}else if(i===t)h(a[r],0,n),h(s,0,n);else{o=d.categoryWayDim;h(a[r],o,n),h(l,o,n),d.categoryWayDim+=n}})),s.length&&(a.itemName=s),l.length&&(a.seriesName=l),a}function km(e,t,r){var a={},n=Pm(e);if(!n)return a;var i,o=t.sourceFormat,s=t.dimensionsDefine;o!==xm&&o!==wm||Object(Sa["k"])(s,(function(e,t){"name"===(Object(Sa["A"])(e)?e.name:e)&&(i=t)}));var l=function(){for(var e={},a={},n=[],l=0,c=Math.min(5,r);l<c;l++){var u=Rm(t.data,o,t.seriesLayoutBy,s,t.startIndex,l);n.push(u);var p=u===Im.Not;if(p&&null==e.v&&l!==i&&(e.v=l),(null==e.n||e.n===e.v||!p&&n[e.n]===Im.Not)&&(e.n=l),d(e)&&n[e.n]!==Im.Not)return e;p||(u===Im.Might&&null==a.v&&l!==i&&(a.v=l),null!=a.n&&a.n!==a.v||(a.n=l))}function d(e){return null!=e.v&&null!=e.n}return d(e)?e:d(a)?a:null}();if(l){a.value=[l.v];var c=null!=i?i:l.n;a.itemName=[c],a.seriesName=[c]}return a}function Pm(e){var t=e.get("data",!0);if(!t)return rc(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},ec).models[0]}function Nm(e){return e.get("transform",!0)||e.get("fromTransformResult",!0)?rc(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},ec).models:[]}function Em(e,t){return Rm(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function Rm(e,t,r,a,n,i){var o,s,l,c=5;if(Object(Sa["E"])(e))return Im.Not;if(a){var u=a[i];Object(Sa["A"])(u)?(s=u.name,l=u.type):Object(Sa["C"])(u)&&(s=u)}if(null!=l)return"ordinal"===l?Im.Must:Im.Not;if(t===_m){var p=e;if(r===Tm){for(var d=p[i],h=0;h<(d||[]).length&&h<c;h++)if(null!=(o=_(d[n+h])))return o}else for(h=0;h<p.length&&h<c;h++){var f=p[n+h];if(f&&null!=(o=_(f[i])))return o}}else if(t===xm){var m=e;if(!s)return Im.Not;for(h=0;h<m.length&&h<c;h++){var g=m[h];if(g&&null!=(o=_(g[s])))return o}}else if(t===wm){var v=e;if(!s)return Im.Not;d=v[s];if(!d||Object(Sa["E"])(d))return Im.Not;for(h=0;h<d.length&&h<c;h++)if(null!=(o=_(d[h])))return o}else if(t===bm){var y=e;for(h=0;h<y.length&&h<c;h++){g=y[h];var b=kl(g);if(!Object(Sa["t"])(b))return Im.Not;if(null!=(o=_(b[i])))return o}}function _(e){var t=Object(Sa["C"])(e);return null!=e&&Number.isFinite(Number(e))&&""!==e?t?Im.Might:Im.Not:t&&"-"!==e?Im.Must:void 0}return Im.Not}var Lm=Object(Sa["f"])();function jm(e,t){Object(Sa["b"])(null==Lm.get(e)&&t),Lm.set(e,t)}function Fm(e,t,r){var a=Lm.get(t);if(!a)return r;var n=a(e);return n?r.concat(n):r}var Vm=Zl(),zm=Zl(),Bm=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,r){var a=Ol(this.get("color",!0)),n=this.get("colorLayer",!0);return Um(this,Vm,a,n,e,t,r)},e.prototype.clearColorPalette=function(){Wm(this,Vm)},e}();function $m(e,t,r,a){var n=Ol(e.get(["aria","decal","decals"]));return Um(e,zm,n,null,t,r,a)}function Gm(e,t){for(var r=e.length,a=0;a<r;a++)if(e[a].length>t)return e[a];return e[r-1]}function Um(e,t,r,a,n,i,o){i=i||e;var s=t(i),l=s.paletteIdx||0,c=s.paletteNameMap=s.paletteNameMap||{};if(c.hasOwnProperty(n))return c[n];var u=null!=o&&a?Gm(a,o):r;if(u=u||r,u&&u.length){var p=u[l];return n&&(c[n]=p),s.paletteIdx=(l+1)%u.length,p}}function Wm(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Hm,qm,Ym;"undefined"!==typeof console&&console.warn&&console.log;function Xm(e){0}function Zm(e){throw new Error(e)}var Km="\0_ec_inner",Jm=1;var Qm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t.prototype.init=function(e,t,r,a,n,i){a=a||{},this.option=null,this._theme=new Uh(a),this._locale=new Uh(n),this._optionManager=i},t.prototype.setOption=function(e,t,r){var a=ng(t);this._optionManager.setOption(e,r,a),this._resetOption(null,a)},t.prototype.resetOption=function(e,t){return this._resetOption(e,ng(t))},t.prototype._resetOption=function(e,t){var r=!1,a=this._optionManager;if(!e||"recreate"===e){var n=a.mountOption("recreate"===e);0,this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(n,t)):Ym(this,n),r=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var i=a.getTimelineOption(this);i&&(r=!0,this._mergeOption(i,t))}if(!e||"recreate"===e||"media"===e){var o=a.getMediaOption(this);o.length&&Object(Sa["k"])(o,(function(e){r=!0,this._mergeOption(e,t)}),this)}return r},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var r=this.option,a=this._componentsMap,n=this._componentsCount,i=[],o=Object(Sa["f"])(),s=t&&t.replaceMergeMainTypeMap;function l(t){var i=Fm(this,t,Ol(e[t])),o=a.get(t),l=o?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",c=Nl(o,i,l);Hl(c,t,fm),r[t]=null,a.set(t,null),n.set(t,0);var u,p=[],d=[],h=0;Object(Sa["k"])(c,(function(e,r){var a=e.existing,n=e.newOption;if(n){var i="series"===t,o=fm.getClass(t,e.keyInfo.subType,!i);if(!o)return;if("tooltip"===t){if(u)return void 0;u=!0}if(a&&a.constructor===o)a.name=e.keyInfo.name,a.mergeOption(n,this),a.optionUpdated(n,!1);else{var s=Object(Sa["m"])({componentIndex:r},e.keyInfo);a=new o(n,this,this,s),Object(Sa["m"])(a,s),e.brandNew&&(a.__requireNewView=!0),a.init(n,this,this),a.optionUpdated(null,!0)}}else a&&(a.mergeOption({},this),a.optionUpdated({},!1));a?(p.push(a.option),d.push(a),h++):(p.push(void 0),d.push(void 0))}),this),r[t]=p,a.set(t,d),n.set(t,h),"series"===t&&Hm(this)}Mm(this),Object(Sa["k"])(e,(function(e,t){null!=e&&(fm.hasClass(t)?t&&(i.push(t),o.set(t,!0)):r[t]=null==r[t]?Object(Sa["d"])(e):Object(Sa["I"])(r[t],e,!0))})),s&&s.each((function(e,t){fm.hasClass(t)&&!o.get(t)&&(i.push(t),o.set(t,!0))})),fm.topologicalTravel(i,fm.getAllClassMainTypes(),l,this),this._seriesIndices||Hm(this)},t.prototype.getOption=function(){var e=Object(Sa["d"])(this.option);return Object(Sa["k"])(e,(function(t,r){if(fm.hasClass(r)){for(var a=Ol(t),n=a.length,i=!1,o=n-1;o>=0;o--)a[o]&&!Ul(a[o])?i=!0:(a[o]=null,!i&&n--);a.length=n,e[r]=a}})),delete e[Km],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var r=this._componentsMap.get(e);if(r){var a=r[t||0];if(a)return a;if(null==t)for(var n=0;n<r.length;n++)if(r[n])return r[n]}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var r,a=e.index,n=e.id,i=e.name,o=this._componentsMap.get(t);return o&&o.length?(null!=a?(r=[],Object(Sa["k"])(Ol(a),(function(e){o[e]&&r.push(o[e])}))):r=null!=n?rg("id",n,o):null!=i?rg("name",i,o):Object(Sa["n"])(o,(function(e){return!!e})),ag(r,e)):[]},t.prototype.findComponents=function(e){var t=e.query,r=e.mainType,a=i(t),n=a?this.queryComponents(a):Object(Sa["n"])(this._componentsMap.get(r),(function(e){return!!e}));return o(ag(n,e));function i(e){var t=r+"Index",a=r+"Id",n=r+"Name";return!e||null==e[t]&&null==e[a]&&null==e[n]?null:{mainType:r,index:e[t],id:e[a],name:e[n]}}function o(t){return e.filter?Object(Sa["n"])(t,e.filter):t}},t.prototype.eachComponent=function(e,t,r){var a=this._componentsMap;if(Object(Sa["w"])(e)){var n=t,i=e;a.each((function(e,t){for(var r=0;e&&r<e.length;r++){var a=e[r];a&&i.call(n,t,a,a.componentIndex)}}))}else for(var o=Object(Sa["C"])(e)?a.get(e):Object(Sa["A"])(e)?this.findComponents(e):null,s=0;o&&s<o.length;s++){var l=o[s];l&&t.call(r,l,l.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=$l(e,null);return Object(Sa["n"])(this._componentsMap.get("series"),(function(e){return!!e&&null!=t&&e.name===t}))},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return Object(Sa["n"])(this._componentsMap.get("series"),(function(t){return!!t&&t.subType===e}))},t.prototype.getSeries=function(){return Object(Sa["n"])(this._componentsMap.get("series"),(function(e){return!!e}))},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){qm(this),Object(Sa["k"])(this._seriesIndices,(function(r){var a=this._componentsMap.get("series")[r];e.call(t,a,r)}),this)},t.prototype.eachRawSeries=function(e,t){Object(Sa["k"])(this._componentsMap.get("series"),(function(r){r&&e.call(t,r,r.componentIndex)}))},t.prototype.eachSeriesByType=function(e,t,r){qm(this),Object(Sa["k"])(this._seriesIndices,(function(a){var n=this._componentsMap.get("series")[a];n.subType===e&&t.call(r,n,a)}),this)},t.prototype.eachRawSeriesByType=function(e,t,r){return Object(Sa["k"])(this.getSeriesByType(e),t,r)},t.prototype.isSeriesFiltered=function(e){return qm(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){qm(this);var r=[];Object(Sa["k"])(this._seriesIndices,(function(a){var n=this._componentsMap.get("series")[a];e.call(t,n,a)&&r.push(a)}),this),this._seriesIndices=r,this._seriesIndicesMap=Object(Sa["f"])(r)},t.prototype.restoreData=function(e){Hm(this);var t=this._componentsMap,r=[];t.each((function(e,t){fm.hasClass(t)&&r.push(t)})),fm.topologicalTravel(r,fm.getAllClassMainTypes(),(function(r){Object(Sa["k"])(t.get(r),(function(t){!t||"series"===r&&eg(t,e)||t.restoreData()}))}))},t.internalField=function(){Hm=function(e){var t=e._seriesIndices=[];Object(Sa["k"])(e._componentsMap.get("series"),(function(e){e&&t.push(e.componentIndex)})),e._seriesIndicesMap=Object(Sa["f"])(t)},qm=function(e){0},Ym=function(e,t){e.option={},e.option[Km]=Jm,e._componentsMap=Object(Sa["f"])({series:[]}),e._componentsCount=Object(Sa["f"])();var r=t.aria;Object(Sa["A"])(r)&&null==r.enabled&&(r.enabled=!0),tg(t,e._theme.option),Object(Sa["I"])(t,vm,!1),e._mergeOption(t,null)}}(),t}(Uh);function eg(e,t){if(t){var r=t.seriesIndex,a=t.seriesId,n=t.seriesName;return null!=r&&e.componentIndex!==r||null!=a&&e.id!==a||null!=n&&e.name!==n}}function tg(e,t){var r=e.color&&!e.colorLayer;Object(Sa["k"])(t,(function(t,a){"colorLayer"===a&&r||fm.hasClass(a)||("object"===typeof t?e[a]=e[a]?Object(Sa["I"])(e[a],t,!1):Object(Sa["d"])(t):null==e[a]&&(e[a]=t))}))}function rg(e,t,r){if(Object(Sa["t"])(t)){var a=Object(Sa["f"])();return Object(Sa["k"])(t,(function(e){if(null!=e){var t=$l(e,null);null!=t&&a.set(e,!0)}})),Object(Sa["n"])(r,(function(t){return t&&a.get(t[e])}))}var n=$l(t,null);return Object(Sa["n"])(r,(function(t){return t&&null!=n&&t[e]===n}))}function ag(e,t){return t.hasOwnProperty("subType")?Object(Sa["n"])(e,(function(e){return e&&e.subType===t.subType})):e}function ng(e){var t=Object(Sa["f"])();return e&&Object(Sa["k"])(Ol(e.replaceMerge),(function(e){t.set(e,!0)})),{replaceMergeMainTypeMap:t}}Object(Sa["K"])(Qm,Bm);var ig=Qm,og=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],sg=function(){function e(e){Sa["k"](og,(function(t){this[t]=Sa["c"](e[t],e)}),this)}return e}(),lg=sg,cg={},ug=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var r=[];Sa["k"](cg,(function(a,n){var i=a.create(e,t);r=r.concat(i||[])})),this._coordinateSystems=r},e.prototype.update=function(e,t){Sa["k"](this._coordinateSystems,(function(r){r.update&&r.update(e,t)}))},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){cg[e]=t},e.get=function(e){return cg[e]},e}(),pg=ug,dg=/^(min|max)?(.+)$/,hg=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,r){e&&(Object(Sa["k"])(Ol(e.series),(function(e){e&&e.data&&Object(Sa["E"])(e.data)&&Object(Sa["R"])(e.data)})),Object(Sa["k"])(Ol(e.dataset),(function(e){e&&e.source&&Object(Sa["E"])(e.source)&&Object(Sa["R"])(e.source)}))),e=Object(Sa["d"])(e);var a=this._optionBackup,n=fg(e,t,!a);this._newBaseOption=n.baseOption,a?(n.timelineOptions.length&&(a.timelineOptions=n.timelineOptions),n.mediaList.length&&(a.mediaList=n.mediaList),n.mediaDefault&&(a.mediaDefault=n.mediaDefault)):this._optionBackup=n},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],Object(Sa["d"])(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,r=this._timelineOptions;if(r.length){var a=e.getComponent("timeline");a&&(t=Object(Sa["d"])(r[a.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t=this._api.getWidth(),r=this._api.getHeight(),a=this._mediaList,n=this._mediaDefault,i=[],o=[];if(!a.length&&!n)return o;for(var s=0,l=a.length;s<l;s++)mg(a[s].query,t,r)&&i.push(s);return!i.length&&n&&(i=[-1]),i.length&&!vg(i,this._currentMediaIndices)&&(o=Object(Sa["H"])(i,(function(e){return Object(Sa["d"])(-1===e?n.option:a[e].option)}))),this._currentMediaIndices=i,o},e}();function fg(e,t,r){var a,n,i=[],o=e.baseOption,s=e.timeline,l=e.options,c=e.media,u=!!e.media,p=!!(l||s||o&&o.timeline);function d(e){Object(Sa["k"])(t,(function(t){t(e,r)}))}return o?(n=o,n.timeline||(n.timeline=s)):((p||u)&&(e.options=e.media=null),n=e),u&&Object(Sa["t"])(c)&&Object(Sa["k"])(c,(function(e){e&&e.option&&(e.query?i.push(e):a||(a=e))})),d(n),Object(Sa["k"])(l,(function(e){return d(e)})),Object(Sa["k"])(i,(function(e){return d(e.option)})),{baseOption:n,timelineOptions:l||[],mediaDefault:a,mediaList:i}}function mg(e,t,r){var a={width:t,height:r,aspectratio:t/r},n=!0;return Object(Sa["k"])(e,(function(e,t){var r=t.match(dg);if(r&&r[1]&&r[2]){var i=r[1],o=r[2].toLowerCase();gg(a[o],e,i)||(n=!1)}})),n}function gg(e,t,r){return"min"===r?e>=t:"max"===r?e<=t:e===t}function vg(e,t){return e.join(",")===t.join(",")}var yg=hg,bg=Sa["k"],_g=Sa["A"],xg=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function wg(e){var t=e&&e.itemStyle;if(t)for(var r=0,a=xg.length;r<a;r++){var n=xg[r],i=t.normal,o=t.emphasis;i&&i[n]&&(e[n]=e[n]||{},e[n].normal?Sa["I"](e[n].normal,i[n]):e[n].normal=i[n],i[n]=null),o&&o[n]&&(e[n]=e[n]||{},e[n].emphasis?Sa["I"](e[n].emphasis,o[n]):e[n].emphasis=o[n],o[n]=null)}}function Sg(e,t,r){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var a=e[t].normal,n=e[t].emphasis;a&&(r?(e[t].normal=e[t].emphasis=null,Sa["i"](e[t],a)):e[t]=a),n&&(e.emphasis=e.emphasis||{},e.emphasis[t]=n,n.focus&&(e.emphasis.focus=n.focus),n.blurScope&&(e.emphasis.blurScope=n.blurScope))}}function Dg(e){Sg(e,"itemStyle"),Sg(e,"lineStyle"),Sg(e,"areaStyle"),Sg(e,"label"),Sg(e,"labelLine"),Sg(e,"upperLabel"),Sg(e,"edgeLabel")}function Cg(e,t){var r=_g(e)&&e[t],a=_g(r)&&r.textStyle;if(a){0;for(var n=0,i=Al.length;n<i;n++){var o=Al[n];a.hasOwnProperty(o)&&(r[o]=a[o])}}}function Tg(e){e&&(Dg(e),Cg(e,"label"),e.emphasis&&Cg(e.emphasis,"label"))}function Ig(e){if(_g(e)){wg(e),Dg(e),Cg(e,"label"),Cg(e,"upperLabel"),Cg(e,"edgeLabel"),e.emphasis&&(Cg(e.emphasis,"label"),Cg(e.emphasis,"upperLabel"),Cg(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(wg(t),Tg(t));var r=e.markLine;r&&(wg(r),Tg(r));var a=e.markArea;a&&Tg(a);var n=e.data;if("graph"===e.type){n=n||e.nodes;var i=e.links||e.edges;if(i&&!Sa["E"](i))for(var o=0;o<i.length;o++)Tg(i[o]);Sa["k"](e.categories,(function(e){Dg(e)}))}if(n&&!Sa["E"](n))for(o=0;o<n.length;o++)Tg(n[o]);if(t=e.markPoint,t&&t.data){var s=t.data;for(o=0;o<s.length;o++)Tg(s[o])}if(r=e.markLine,r&&r.data){var l=r.data;for(o=0;o<l.length;o++)Sa["t"](l[o])?(Tg(l[o][0]),Tg(l[o][1])):Tg(l[o])}"gauge"===e.type?(Cg(e,"axisLabel"),Cg(e,"title"),Cg(e,"detail")):"treemap"===e.type?(Sg(e.breadcrumb,"itemStyle"),Sa["k"](e.levels,(function(e){Dg(e)}))):"tree"===e.type&&Dg(e.leaves)}}function Og(e){return Sa["t"](e)?e:e?[e]:[]}function Mg(e){return(Sa["t"](e)?e[0]:e)||{}}function Ag(e,t){bg(Og(e.series),(function(e){_g(e)&&Ig(e)}));var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),bg(r,(function(t){bg(Og(e[t]),(function(e){e&&(Cg(e,"axisLabel"),Cg(e.axisPointer,"label"))}))})),bg(Og(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;Cg(t,"axisLabel"),Cg(t&&t.axisPointer,"label")})),bg(Og(e.calendar),(function(e){Sg(e,"itemStyle"),Cg(e,"dayLabel"),Cg(e,"monthLabel"),Cg(e,"yearLabel")})),bg(Og(e.radar),(function(e){Cg(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name),null!=e.nameGap&&null==e.axisNameGap&&(e.axisNameGap=e.nameGap,delete e.nameGap)})),bg(Og(e.geo),(function(e){_g(e)&&(Tg(e),bg(Og(e.regions),(function(e){Tg(e)})))})),bg(Og(e.timeline),(function(e){Tg(e),Sg(e,"label"),Sg(e,"itemStyle"),Sg(e,"controlStyle",!0);var t=e.data;Sa["t"](t)&&Sa["k"](t,(function(e){Sa["A"](e)&&(Sg(e,"label"),Sg(e,"itemStyle"))}))})),bg(Og(e.toolbox),(function(e){Sg(e,"iconStyle"),bg(e.feature,(function(e){Sg(e,"iconStyle")}))})),Cg(Mg(e.axisPointer),"label"),Cg(Mg(e.tooltip).axisPointer,"label")}function kg(e,t){for(var r=t.split(","),a=e,n=0;n<r.length;n++)if(a=a&&a[r[n]],null==a)break;return a}function Pg(e,t,r,a){for(var n,i=t.split(","),o=e,s=0;s<i.length-1;s++)n=i[s],null==o[n]&&(o[n]={}),o=o[n];(a||null==o[i[s]])&&(o[i[s]]=r)}function Ng(e){e&&Object(Sa["k"])(Eg,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var Eg=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Rg=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Lg=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function jg(e){var t=e&&e.itemStyle;if(t)for(var r=0;r<Lg.length;r++){var a=Lg[r][1],n=Lg[r][0];null!=t[a]&&(t[n]=t[a])}}function Fg(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function Vg(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function zg(e){e&&null!=e.focusNodeAdjacency&&(e.emphasis=e.emphasis||{},null==e.emphasis.focus&&(e.emphasis.focus="adjacency"))}function Bg(e,t){if(e)for(var r=0;r<e.length;r++)t(e[r]),e[r]&&Bg(e[r].children,t)}function $g(e,t){Ag(e,t),e.series=Ol(e.series),Object(Sa["k"])(e.series,(function(e){if(Object(Sa["A"])(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t){null!=e.clockWise&&(e.clockwise=e.clockWise),Fg(e.label);var r=e.data;if(r&&!Object(Sa["E"])(r))for(var a=0;a<r.length;a++)Fg(r[a]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if("gauge"===t){var n=kg(e,"pointer.color");null!=n&&Pg(e,"itemStyle.color",n)}else if("bar"===t){jg(e),jg(e.backgroundStyle),jg(e.emphasis);r=e.data;if(r&&!Object(Sa["E"])(r))for(a=0;a<r.length;a++)"object"===typeof r[a]&&(jg(r[a]),jg(r[a]&&r[a].emphasis))}else if("sunburst"===t){var i=e.highlightPolicy;i&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=i)),Vg(e),Bg(e.data,Vg)}else"graph"===t||"sankey"===t?zg(e):"map"===t&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&Object(Sa["i"])(e,e.mapLocation));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),Ng(e)}})),e.dataRange&&(e.visualMap=e.dataRange),Object(Sa["k"])(Rg,(function(t){var r=e[t];r&&(Object(Sa["t"])(r)||(r=[r]),Object(Sa["k"])(r,(function(e){Ng(e)})))}))}function Gg(e){var t=Object(Sa["f"])();e.eachSeries((function(e){var r=e.get("stack");if(r){var a=t.get(r)||t.set(r,[]),n=e.getData(),i={stackResultDimension:n.getCalculationInfo("stackResultDimension"),stackedOverDimension:n.getCalculationInfo("stackedOverDimension"),stackedDimension:n.getCalculationInfo("stackedDimension"),stackedByDimension:n.getCalculationInfo("stackedByDimension"),isStackedByIndex:n.getCalculationInfo("isStackedByIndex"),data:n,seriesModel:e};if(!i.stackedDimension||!i.isStackedByIndex&&!i.stackedByDimension)return;a.length&&n.setCalculationInfo("stackedOnSeries",a[a.length-1].seriesModel),a.push(i)}})),t.each(Ug)}function Ug(e){Object(Sa["k"])(e,(function(t,r){var a=[],n=[NaN,NaN],i=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(i,(function(i,c,u){var p,d,h=o.get(t.stackedDimension,u);if(isNaN(h))return n;s?d=o.getRawIndex(u):p=o.get(t.stackedByDimension,u);for(var f=NaN,m=r-1;m>=0;m--){var g=e[m];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,p)),d>=0){var v=g.data.getByRawIndex(g.stackResultDimension,d);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&h>=0&&v>0||"samesign"===l&&h<=0&&v<0){h=cl(h,v),f=v;break}}}return a[0]=h,a[1]=f,a}))}))}var Wg,Hg,qg,Yg,Xg,Zg=function(){function e(e){this.data=e.data||(e.sourceFormat===wm?{}:[]),this.sourceFormat=e.sourceFormat||Dm,this.seriesLayoutBy=e.seriesLayoutBy||Cm,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var r=0;r<t.length;r++){var a=t[r];null==a.type&&Em(this,r)===Im.Must&&(a.type="ordinal")}}return e}();function Kg(e){return e instanceof Zg}function Jg(e,t,r){r=r||tv(e);var a=t.seriesLayoutBy,n=rv(e,r,a,t.sourceHeader,t.dimensions),i=new Zg({data:e,sourceFormat:r,seriesLayoutBy:a,dimensionsDefine:n.dimensionsDefine,startIndex:n.startIndex,dimensionsDetectedCount:n.dimensionsDetectedCount,metaRawOption:Object(Sa["d"])(t)});return i}function Qg(e){return new Zg({data:e,sourceFormat:Object(Sa["E"])(e)?Sm:bm})}function ev(e){return new Zg({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:Object(Sa["d"])(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function tv(e){var t=Dm;if(Object(Sa["E"])(e))t=Sm;else if(Object(Sa["t"])(e)){0===e.length&&(t=_m);for(var r=0,a=e.length;r<a;r++){var n=e[r];if(null!=n){if(Object(Sa["t"])(n)||Object(Sa["E"])(n)){t=_m;break}if(Object(Sa["A"])(n)){t=xm;break}}}}else if(Object(Sa["A"])(e))for(var i in e)if(Object(Sa["q"])(e,i)&&Object(Sa["u"])(e[i])){t=wm;break}return t}function rv(e,t,r,a,n){var i,o;if(!e)return{dimensionsDefine:nv(n),startIndex:o,dimensionsDetectedCount:i};if(t===_m){var s=e;"auto"===a||null==a?iv((function(e){null!=e&&"-"!==e&&(Object(Sa["C"])(e)?null==o&&(o=1):o=0)}),r,s,10):o=Object(Sa["z"])(a)?a:a?1:0,n||1!==o||(n=[],iv((function(e,t){n[t]=null!=e?e+"":""}),r,s,1/0)),i=n?n.length:r===Tm?s.length:s[0]?s[0].length:null}else if(t===xm)n||(n=av(e));else if(t===wm)n||(n=[],Object(Sa["k"])(e,(function(e,t){n.push(t)})));else if(t===bm){var l=kl(e[0]);i=Object(Sa["t"])(l)&&l.length||1}return{startIndex:o,dimensionsDefine:nv(n),dimensionsDetectedCount:i}}function av(e){var t,r=0;while(r<e.length&&!(t=e[r++]));if(t)return Object(Sa["F"])(t)}function nv(e){if(e){var t=Object(Sa["f"])();return Object(Sa["H"])(e,(function(e,r){e=Object(Sa["A"])(e)?e:{name:e};var a={name:e.name,displayName:e.displayName,type:e.type};if(null==a.name)return a;a.name+="",null==a.displayName&&(a.displayName=a.name);var n=t.get(a.name);return n?a.name+="-"+n.count++:t.set(a.name,{count:1}),a}))}}function iv(e,t,r,a){if(t===Tm)for(var n=0;n<r.length&&n<a;n++)e(r[n]?r[n][0]:null,n);else{var i=r[0]||[];for(n=0;n<i.length&&n<a;n++)e(i[n],n)}}function ov(e){var t=e.sourceFormat;return t===xm||t===wm}var sv=function(){function e(e,t){var r=Kg(e)?e:Qg(e);this._source=r;var a=this._data=r.data;r.sourceFormat===Sm&&(this._offset=0,this._dimSize=t,this._data=a),Xg(this,a,r)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var e;Xg=function(e,n,i){var o=i.sourceFormat,s=i.seriesLayoutBy,l=i.startIndex,c=i.dimensionsDefine,u=Yg[vv(o,s)];if(Object(Sa["m"])(e,u),o===Sm)e.getItem=t,e.count=a,e.fillStorage=r;else{var p=uv(o,s);e.getItem=Object(Sa["c"])(p,null,n,l,c);var d=hv(o,s);e.count=Object(Sa["c"])(d,null,n,l,c)}};var t=function(e,t){e-=this._offset,t=t||[];for(var r=this._data,a=this._dimSize,n=a*e,i=0;i<a;i++)t[i]=r[n+i];return t},r=function(e,t,r,a){for(var n=this._data,i=this._dimSize,o=0;o<i;o++){for(var s=a[o],l=null==s[0]?1/0:s[0],c=null==s[1]?-1/0:s[1],u=t-e,p=r[o],d=0;d<u;d++){var h=n[d*i+o];p[e+d]=h,h<l&&(l=h),h>c&&(c=h)}s[0]=l,s[1]=c}},a=function(){return this._data?this._data.length/this._dimSize:0};function n(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}e={},e[_m+"_"+Cm]={pure:!0,appendData:n},e[_m+"_"+Tm]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[xm]={pure:!0,appendData:n},e[wm]={pure:!0,appendData:function(e){var t=this._data;Object(Sa["k"])(e,(function(e,r){for(var a=t[r]||(t[r]=[]),n=0;n<(e||[]).length;n++)a.push(e[n])}))}},e[bm]={appendData:n},e[Sm]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},Yg=e}(),e}(),lv=function(e,t,r,a){return e[a]},cv=(Wg={},Wg[_m+"_"+Cm]=function(e,t,r,a){return e[a+t]},Wg[_m+"_"+Tm]=function(e,t,r,a,n){a+=t;for(var i=n||[],o=e,s=0;s<o.length;s++){var l=o[s];i[s]=l?l[a]:null}return i},Wg[xm]=lv,Wg[wm]=function(e,t,r,a,n){for(var i=n||[],o=0;o<r.length;o++){var s=r[o].name;0;var l=e[s];i[o]=l?l[a]:null}return i},Wg[bm]=lv,Wg);function uv(e,t){var r=cv[vv(e,t)];return r}var pv=function(e,t,r){return e.length},dv=(Hg={},Hg[_m+"_"+Cm]=function(e,t,r){return Math.max(0,e.length-t)},Hg[_m+"_"+Tm]=function(e,t,r){var a=e[0];return a?Math.max(0,a.length-t):0},Hg[xm]=pv,Hg[wm]=function(e,t,r){var a=r[0].name;var n=e[a];return n?n.length:0},Hg[bm]=pv,Hg);function hv(e,t){var r=dv[vv(e,t)];return r}var fv=function(e,t,r){return e[t]},mv=(qg={},qg[_m]=fv,qg[xm]=function(e,t,r){return e[r]},qg[wm]=fv,qg[bm]=function(e,t,r){var a=kl(e);return a instanceof Array?a[t]:a},qg[Sm]=fv,qg);function gv(e){var t=mv[e];return t}function vv(e,t){return e===_m?e+"_"+t:e}function yv(e,t,r){if(e){var a=e.getRawDataItem(t);if(null!=a){var n=e.getStore(),i=n.getSource().sourceFormat;if(null!=r){var o=e.getDimensionIndex(r),s=n.getDimensionProperty(o);return gv(i)(a,o,s)}var l=a;return i===bm&&(l=kl(a)),l}}}var bv=/\{@(.+?)\}/g,_v=function(){function e(){}return e.prototype.getDataParams=function(e,t){var r=this.getData(t),a=this.getRawValue(e,t),n=r.getRawIndex(e),i=r.getName(e),o=r.getRawDataItem(e),s=r.getItemVisual(e,"style"),l=s&&s[r.getItemVisual(e,"drawType")||"fill"],c=s&&s.stroke,u=this.mainType,p="series"===u,d=r.userOutput&&r.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:p?this.subType:null,seriesIndex:this.seriesIndex,seriesId:p?this.id:null,seriesName:p?this.name:null,name:i,dataIndex:n,data:o,dataType:t,value:a,color:l,borderColor:c,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(e,t,r,a,n,i){t=t||"normal";var o=this.getData(r),s=this.getDataParams(e,r);if(i&&(s.value=i.interpolatedValue),null!=a&&Sa["t"](s.value)&&(s.value=s.value[a]),!n){var l=o.getItemModel(e);n=l.get("normal"===t?["label","formatter"]:[t,"label","formatter"])}if(Sa["w"](n))return s.status=t,s.dimensionIndex=a,n(s);if(Sa["C"](n)){var c=qf(n,s);return c.replace(bv,(function(t,r){var a=r.length,n=r;"["===n.charAt(0)&&"]"===n.charAt(a-1)&&(n=+n.slice(1,a-1));var s=yv(o,e,n);if(i&&Sa["t"](i.interpolatedValue)){var l=o.getDimensionIndex(n);l>=0&&(s=i.interpolatedValue[l])}return null!=s?s+"":""}))}},e.prototype.getRawValue=function(e,t){return yv(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,r){},e}();function xv(e){var t,r;return Sa["A"](e)?e.type&&(r=e):t=e,{text:t,frag:r}}function wv(e){return new Sv(e)}var Sv=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,r=this._upstream,a=e&&e.skip;if(this._dirty&&r){var n=this.context;n.data=n.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!a&&(t=this._plan(this.context));var i,o=u(this._modBy),s=this._modDataCount||0,l=u(e&&e.modBy),c=e&&e.modDataCount||0;function u(e){return!(e>=1)&&(e=1),e}o===l&&s===c||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,i=this._doReset(a)),this._modBy=l,this._modDataCount=c;var p=e&&e.step;if(this._dueEnd=r?r._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,h=Math.min(null!=p?this._dueIndex+p:1/0,this._dueEnd);if(!a&&(i||d<h)){var f=this._progress;if(Object(Sa["t"])(f))for(var m=0;m<f.length;m++)this._doProgress(f[m],d,h,l,c);else this._doProgress(f,d,h,l,c)}this._dueIndex=h;var g=null!=this._settedOutputEnd?this._settedOutputEnd:h;0,this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,r,a,n){Dv.reset(t,r,a,n),this._callingProgress=e,this._callingProgress({start:t,end:r,count:r-t,next:Dv.next},this.context)},e.prototype._doReset=function(e){var t,r;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(r=t.forceFirstProgress,t=t.progress),Object(Sa["t"])(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var a=this._downstream;return a&&a.dirty(),r},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),Dv=function(){var e,t,r,a,n,i={reset:function(l,c,u,p){t=l,e=c,r=u,a=p,n=Math.ceil(a/r),i.next=r>1&&a>0?s:o}};return i;function o(){return t<e?t++:null}function s(){var i=t%n*r+Math.ceil(t/n),o=t>=e?null:i<a?i:t;return t++,o}}();function Cv(e,t){var r=t&&t.type;return"ordinal"===r?e:("time"!==r||Object(Sa["z"])(e)||null==e||"-"===e||(e=+fl(e)),null==e||""===e?NaN:Number(e))}var Tv=Object(Sa["f"])({number:function(e){return parseFloat(e)},time:function(e){return+fl(e)},trim:function(e){return Object(Sa["C"])(e)?Object(Sa["T"])(e):e}});function Iv(e){return Tv.get(e)}var Ov={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}},Mv=function(){function e(e,t){if(!Object(Sa["z"])(t)){var r="";0,Zm(r)}this._opFn=Ov[e],this._rvalFloat=_l(t)}return e.prototype.evaluate=function(e){return Object(Sa["z"])(e)?this._opFn(e,this._rvalFloat):this._opFn(_l(e),this._rvalFloat)},e}(),Av=function(){function e(e,t){var r="desc"===e;this._resultLT=r?1:-1,null==t&&(t=r?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var r=Object(Sa["z"])(e)?e:_l(e),a=Object(Sa["z"])(t)?t:_l(t),n=isNaN(r),i=isNaN(a);if(n&&(r=this._incomparable),i&&(a=this._incomparable),n&&i){var o=Object(Sa["C"])(e),s=Object(Sa["C"])(t);o&&(r=s?e:0),s&&(a=o?t:0)}return r<a?this._resultLT:r>a?-this._resultLT:0},e}(),kv=function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=_l(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var r=typeof e;r===this._rvalTypeof||"number"!==r&&"number"!==this._rvalTypeof||(t=_l(e)===this._rvalFloat)}return this._isEQ?t:!t},e}();function Pv(e,t){return"eq"===e||"ne"===e?new kv("eq"===e,t):Object(Sa["q"])(Ov,e)?new Mv(e,t):null}var Nv=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return Cv(e,t)},e}();function Ev(e,t){var r=new Nv,a=e.data,n=r.sourceFormat=e.sourceFormat,i=e.startIndex,o="";e.seriesLayoutBy!==Cm&&Zm(o);var s=[],l={},c=e.dimensionsDefine;if(c)Object(Sa["k"])(c,(function(e,t){var r=e.name,a={index:t,name:r,displayName:e.displayName};if(s.push(a),null!=r){var n="";Object(Sa["q"])(l,r)&&Zm(n),l[r]=a}}));else for(var u=0;u<e.dimensionsDetectedCount;u++)s.push({index:u});var p=uv(n,Cm);t.__isBuiltIn&&(r.getRawDataItem=function(e){return p(a,i,s,e)},r.getRawData=Object(Sa["c"])(Rv,null,e)),r.cloneRawData=Object(Sa["c"])(Lv,null,e);var d=hv(n,Cm);r.count=Object(Sa["c"])(d,null,a,i,s);var h=gv(n);r.retrieveValue=function(e,t){var r=p(a,i,s,e);return f(r,t)};var f=r.retrieveValueFromItem=function(e,t){if(null!=e){var r=s[t];return r?h(e,t,r.name):void 0}};return r.getDimensionInfo=Object(Sa["c"])(jv,null,s,l),r.cloneAllDimensionInfo=Object(Sa["c"])(Fv,null,s),r}function Rv(e){var t=e.sourceFormat;if(!Gv(t)){var r="";0,Zm(r)}return e.data}function Lv(e){var t=e.sourceFormat,r=e.data;if(!Gv(t)){var a="";0,Zm(a)}if(t===_m){for(var n=[],i=0,o=r.length;i<o;i++)n.push(r[i].slice());return n}if(t===xm){for(n=[],i=0,o=r.length;i<o;i++)n.push(Object(Sa["m"])({},r[i]));return n}}function jv(e,t,r){if(null!=r)return Object(Sa["z"])(r)||!isNaN(r)&&!Object(Sa["q"])(t,r)?e[r]:Object(Sa["q"])(t,r)?t[r]:void 0}function Fv(e){return Object(Sa["d"])(e)}var Vv=Object(Sa["f"])();function zv(e){e=Object(Sa["d"])(e);var t=e.type,r="";t||Zm(r);var a=t.split(":");2!==a.length&&Zm(r);var n=!1;"echarts"===a[0]&&(t=a[1],n=!0),e.__isBuiltIn=n,Vv.set(t,e)}function Bv(e,t,r){var a=Ol(e),n=a.length,i="";n||Zm(i);for(var o=0,s=n;o<s;o++){var l=a[o];t=$v(l,t,r,1===n?null:o),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function $v(e,t,r,a){var n="";t.length||Zm(n),Object(Sa["A"])(e)||Zm(n);var i=e.type,o=Vv.get(i);o||Zm(n);var s=Object(Sa["H"])(t,(function(e){return Ev(e,o)})),l=Ol(o.transform({upstream:s[0],upstreamList:s,config:Object(Sa["d"])(e.config)}));return Object(Sa["H"])(l,(function(e,r){var a="";Object(Sa["A"])(e)||Zm(a),e.data||Zm(a);var n,i=tv(e.data);Gv(i)||Zm(a);var o=t[0];if(o&&0===r&&!e.dimensions){var s=o.startIndex;s&&(e.data=o.data.slice(0,s).concat(e.data)),n={seriesLayoutBy:Cm,sourceHeader:s,dimensions:o.metaRawOption.dimensions}}else n={seriesLayoutBy:Cm,sourceHeader:0,dimensions:e.dimensions};return Jg(e.data,n,null)}))}function Gv(e){return e===_m||e===xm}var Uv,Wv="undefined",Hv=typeof Uint32Array===Wv?Array:Uint32Array,qv=typeof Uint16Array===Wv?Array:Uint16Array,Yv=typeof Int32Array===Wv?Array:Int32Array,Xv=typeof Float64Array===Wv?Array:Float64Array,Zv={float:Xv,int:Yv,ordinal:Array,number:Array,time:Xv};function Kv(e){return e>65535?Hv:qv}function Jv(){return[1/0,-1/0]}function Qv(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function ey(e,t,r,a,n){var i=Zv[r||"float"];if(n){var o=e[t],s=o&&o.length;if(s!==a){for(var l=new i(a),c=0;c<s;c++)l[c]=o[c];e[t]=l}}else e[t]=new i(a)}var ty=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Object(Sa["f"])()}return e.prototype.initData=function(e,t,r){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var a=e.getSource(),n=this.defaultDimValueGetter=Uv[a.sourceFormat];this._dimValueGetter=r||n,this._rawExtent=[];ov(a);this._dimensions=Object(Sa["H"])(t,(function(e){return{type:e.type,property:e.property}})),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var r=this._calcDimNameToIdx,a=this._dimensions,n=r.get(e);if(null!=n){if(a[n].type===t)return n}else n=a.length;return a[n]={type:t},r.set(e,n),this._chunks[n]=new Zv[t||"float"](this._rawCount),this._rawExtent[n]=Jv(),n},e.prototype.collectOrdinalMeta=function(e,t){var r=this._chunks[e],a=this._dimensions[e],n=this._rawExtent,i=a.ordinalOffset||0,o=r.length;0===i&&(n[e]=Jv());for(var s=n[e],l=i;l<o;l++){var c=r[l]=t.parseAndCollect(r[l]);isNaN(c)||(s[0]=Math.min(c,s[0]),s[1]=Math.max(c,s[1]))}a.ordinalMeta=t,a.ordinalOffset=o,a.type="ordinal"},e.prototype.getOrdinalMeta=function(e){var t=this._dimensions[e],r=t.ordinalMeta;return r},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,r=this.count();t.appendData(e);var a=t.count();return t.persistent||(a+=r),r<a&&this._initDataFromProvider(r,a,!0),[r,a]},e.prototype.appendValues=function(e,t){for(var r=this._chunks,a=this._dimensions,n=a.length,i=this._rawExtent,o=this.count(),s=o+Math.max(e.length,t||0),l=0;l<n;l++){var c=a[l];ey(r,l,c.type,s,!0)}for(var u=[],p=o;p<s;p++)for(var d=p-o,h=0;h<n;h++){c=a[h];var f=Uv.arrayRows.call(this,e[d]||u,c.property,d,h);r[h][p]=f;var m=i[h];f<m[0]&&(m[0]=f),f>m[1]&&(m[1]=f)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,r){for(var a=this._provider,n=this._chunks,i=this._dimensions,o=i.length,s=this._rawExtent,l=Object(Sa["H"])(i,(function(e){return e.property})),c=0;c<o;c++){var u=i[c];s[c]||(s[c]=Jv()),ey(n,c,u.type,t,r)}if(a.fillStorage)a.fillStorage(e,t,n,s);else for(var p=[],d=e;d<t;d++){p=a.getItem(d,p);for(var h=0;h<o;h++){var f=n[h],m=this._dimValueGetter(p,l[h],d,h);f[d]=m;var g=s[h];m<g[0]&&(g[0]=m),m>g[1]&&(g[1]=m)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var r=this._chunks[e];return r?r[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var r=[],a=[];if(null==t){t=e,e=[];for(var n=0;n<this._dimensions.length;n++)a.push(n)}else a=e;n=0;for(var i=a.length;n<i;n++)r.push(this.get(a[n],t));return r},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var r=this._chunks[e];return r?r[t]:NaN},e.prototype.getSum=function(e){var t=this._chunks[e],r=0;if(t)for(var a=0,n=this.count();a<n;a++){var i=this.get(e,a);isNaN(i)||(r+=i)}return r},e.prototype.getMedian=function(e){var t=[];this.each([e],(function(e){isNaN(e)||t.push(e)}));var r=t.sort((function(e,t){return e-t})),a=this.count();return 0===a?0:a%2===1?r[(a-1)/2]:(r[a/2]+r[a/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,r=t[e];if(null!=r&&r<this._count&&r===e)return e;var a=0,n=this._count-1;while(a<=n){var i=(a+n)/2|0;if(t[i]<e)a=i+1;else{if(!(t[i]>e))return i;n=i-1}}return-1},e.prototype.indicesOfNearest=function(e,t,r){var a=this._chunks,n=a[e],i=[];if(!n)return i;null==r&&(r=1/0);for(var o=1/0,s=-1,l=0,c=0,u=this.count();c<u;c++){var p=this.getRawIndex(c),d=t-n[p],h=Math.abs(d);h<=r&&((h<o||h===o&&d>=0&&s<0)&&(o=h,s=d,l=0),d===s&&(i[l++]=c))}return i.length=l,i},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var r=t.constructor,a=this._count;if(r===Array){e=new r(a);for(var n=0;n<a;n++)e[n]=t[n]}else e=new r(t.buffer,0,a)}else{r=Kv(this._rawCount);e=new r(this.count());for(n=0;n<e.length;n++)e[n]=n}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var r=this.clone(),a=r.count(),n=Kv(r._rawCount),i=new n(a),o=[],s=e.length,l=0,c=e[0],u=r._chunks,p=0;p<a;p++){var d=void 0,h=r.getRawIndex(p);if(0===s)d=t(p);else if(1===s){var f=u[c][h];d=t(f,p)}else{for(var m=0;m<s;m++)o[m]=u[e[m]][h];o[m]=p,d=t.apply(null,o)}d&&(i[l++]=h)}return l<a&&(r._indices=i),r._count=l,r._extent=[],r._updateGetRawIdx(),r},e.prototype.selectRange=function(e){var t=this.clone(),r=t._count;if(!r)return this;var a=Object(Sa["F"])(e),n=a.length;if(!n)return this;var i=t.count(),o=Kv(t._rawCount),s=new o(i),l=0,c=a[0],u=e[c][0],p=e[c][1],d=t._chunks,h=!1;if(!t._indices){var f=0;if(1===n){for(var m=d[a[0]],g=0;g<r;g++){var v=m[g];(v>=u&&v<=p||isNaN(v))&&(s[l++]=f),f++}h=!0}else if(2===n){m=d[a[0]];var y=d[a[1]],b=e[a[1]][0],_=e[a[1]][1];for(g=0;g<r;g++){v=m[g];var x=y[g];(v>=u&&v<=p||isNaN(v))&&(x>=b&&x<=_||isNaN(x))&&(s[l++]=f),f++}h=!0}}if(!h)if(1===n)for(g=0;g<i;g++){var w=t.getRawIndex(g);v=d[a[0]][w];(v>=u&&v<=p||isNaN(v))&&(s[l++]=w)}else for(g=0;g<i;g++){for(var S=!0,D=(w=t.getRawIndex(g),0);D<n;D++){var C=a[D];v=d[C][w];(v<e[C][0]||v>e[C][1])&&(S=!1)}S&&(s[l++]=t.getRawIndex(g))}return l<i&&(t._indices=s),t._count=l,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var r=this.clone(e);return this._updateDims(r,e,t),r},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,r){for(var a=e._chunks,n=[],i=t.length,o=e.count(),s=[],l=e._rawExtent,c=0;c<t.length;c++)l[t[c]]=Jv();for(var u=0;u<o;u++){for(var p=e.getRawIndex(u),d=0;d<i;d++)s[d]=a[t[d]][p];s[i]=u;var h=r&&r.apply(null,s);if(null!=h){"object"!==typeof h&&(n[0]=h,h=n);for(c=0;c<h.length;c++){var f=t[c],m=h[c],g=l[f],v=a[f];v&&(v[p]=m),m<g[0]&&(g[0]=m),m>g[1]&&(g[1]=m)}}}},e.prototype.lttbDownSample=function(e,t){var r,a,n,i=this.clone([e],!0),o=i._chunks,s=o[e],l=this.count(),c=0,u=Math.floor(1/t),p=this.getRawIndex(0),d=new(Kv(this._rawCount))(Math.min(2*(Math.ceil(l/u)+2),l));d[c++]=p;for(var h=1;h<l-1;h+=u){for(var f=Math.min(h+u,l-1),m=Math.min(h+2*u,l),g=(m+f)/2,v=0,y=f;y<m;y++){var b=this.getRawIndex(y),_=s[b];isNaN(_)||(v+=_)}v/=m-f;var x=h,w=Math.min(h+u,l),S=h-1,D=s[p];r=-1,n=x;var C=-1,T=0;for(y=x;y<w;y++){b=this.getRawIndex(y),_=s[b];isNaN(_)?(T++,C<0&&(C=b)):(a=Math.abs((S-g)*(_-D)-(S-y)*(v-D)),a>r&&(r=a,n=b))}T>0&&T<w-x&&(d[c++]=Math.min(C,n),n=Math.max(C,n)),d[c++]=n,p=n}return d[c++]=this.getRawIndex(l-1),i._count=c,i._indices=d,i.getRawIndex=this._getRawIdx,i},e.prototype.downSample=function(e,t,r,a){for(var n=this.clone([e],!0),i=n._chunks,o=[],s=Math.floor(1/t),l=i[e],c=this.count(),u=n._rawExtent[e]=Jv(),p=new(Kv(this._rawCount))(Math.ceil(c/s)),d=0,h=0;h<c;h+=s){s>c-h&&(s=c-h,o.length=s);for(var f=0;f<s;f++){var m=this.getRawIndex(h+f);o[f]=l[m]}var g=r(o),v=this.getRawIndex(Math.min(h+a(o,g)||0,c-1));l[v]=g,g<u[0]&&(u[0]=g),g>u[1]&&(u[1]=g),p[d++]=v}return n._count=d,n._indices=p,n._updateGetRawIdx(),n},e.prototype.each=function(e,t){if(this._count)for(var r=e.length,a=this._chunks,n=0,i=this.count();n<i;n++){var o=this.getRawIndex(n);switch(r){case 0:t(n);break;case 1:t(a[e[0]][o],n);break;case 2:t(a[e[0]][o],a[e[1]][o],n);break;default:for(var s=0,l=[];s<r;s++)l[s]=a[e[s]][o];l[s]=n,t.apply(null,l)}}},e.prototype.getDataExtent=function(e){var t=this._chunks[e],r=Jv();if(!t)return r;var a,n=this.count(),i=!this._indices;if(i)return this._rawExtent[e].slice();if(a=this._extent[e],a)return a.slice();a=r;for(var o=a[0],s=a[1],l=0;l<n;l++){var c=this.getRawIndex(l),u=t[c];u<o&&(o=u),u>s&&(s=u)}return a=[o,s],this._extent[e]=a,a},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var r=[],a=this._chunks,n=0;n<a.length;n++)r.push(a[n][t]);return r},e.prototype.clone=function(t,r){var a=new e,n=this._chunks,i=t&&Object(Sa["N"])(t,(function(e,t){return e[t]=!0,e}),{});if(i)for(var o=0;o<n.length;o++)a._chunks[o]=i[o]?Qv(n[o]):n[o];else a._chunks=n;return this._copyCommonProps(a),r||(a._indices=this._cloneIndices()),a._updateGetRawIdx(),a},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=Object(Sa["d"])(this._extent),e._rawExtent=Object(Sa["d"])(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var r=this._indices.length;t=new e(r);for(var a=0;a<r;a++)t[a]=this._indices[a]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,r,a){return Cv(e[a],this._dimensions[a])}Uv={arrayRows:e,objectRows:function(e,t,r,a){return Cv(e[t],this._dimensions[a])},keyedColumns:e,original:function(e,t,r,a){var n=e&&(null==e.value?e:e.value);return Cv(n instanceof Array?n[a]:n,this._dimensions[a])},typedArray:function(e,t,r,a){return e[a]}}}(),e}(),ry=ty,ay=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,r=this._sourceHost,a=this._getUpstreamSourceManagers(),n=!!a.length;if(iy(r)){var i=r,o=void 0,s=void 0,l=void 0;if(n){var c=a[0];c.prepareSource(),l=c.getSource(),o=l.data,s=l.sourceFormat,t=[c._getVersionSign()]}else o=i.get("data",!0),s=Object(Sa["E"])(o)?Sm:bm,t=[];var u=this._getSourceMetaRawOption()||{},p=l&&l.metaRawOption||{},d=Object(Sa["P"])(u.seriesLayoutBy,p.seriesLayoutBy)||null,h=Object(Sa["P"])(u.sourceHeader,p.sourceHeader),f=Object(Sa["P"])(u.dimensions,p.dimensions),m=d!==p.seriesLayoutBy||!!h!==!!p.sourceHeader||f;e=m?[Jg(o,{seriesLayoutBy:d,sourceHeader:h,dimensions:f},s)]:[]}else{var g=r;if(n){var v=this._applyTransform(a);e=v.sourceList,t=v.upstreamSignList}else{var y=g.get("source",!0);e=[Jg(y,this._getSourceMetaRawOption(),null)],t=[]}}this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,r=this._sourceHost,a=r.get("transform",!0),n=r.get("fromTransformResult",!0);if(null!=n){var i="";1!==e.length&&oy(i)}var o=[],s=[];return Object(Sa["k"])(e,(function(e){e.prepareSource();var t=e.getSource(n||0),r="";null==n||t||oy(r),o.push(t),s.push(e._getVersionSign())})),a?t=Bv(a,o,{datasetIndex:r.componentIndex}):null!=n&&(t=[ev(o[0])]),{sourceList:t,upstreamSignList:s}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var r=e[t];if(r._isDirty()||this._upstreamSignList[t]!==r._getVersionSign())return!0}},e.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var r=this._getUpstreamSourceManagers();return r[0]&&r[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,r){var a=0,n=this._storeList,i=n[a];i||(i=n[a]={});var o=i[r];if(!o){var s=this._getUpstreamSourceManagers()[0];iy(this._sourceHost)&&s?o=s._innerGetDataStore(e,t,r):(o=new ry,o.initData(new sv(t,e.length),e)),i[r]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(iy(e)){var t=Pm(e);return t?[t.getSourceManager()]:[]}return Object(Sa["H"])(Nm(e),(function(e){return e.getSourceManager()}))},e.prototype._getSourceMetaRawOption=function(){var e,t,r,a=this._sourceHost;if(iy(a))e=a.get("seriesLayoutBy",!0),t=a.get("sourceHeader",!0),r=a.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var n=a;e=n.get("seriesLayoutBy",!0),t=n.get("sourceHeader",!0),r=n.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:t,dimensions:r}},e}();function ny(e){var t=e.option.transform;t&&Object(Sa["R"])(e.option.transform)}function iy(e){return"series"===e.mainType}function oy(e){throw new Error(e)}var sy="line-height:1";function ly(e,t){var r=e.color||"#6e7079",a=e.fontSize||12,n=e.fontWeight||"400",i=e.color||"#464646",o=e.fontSize||14,s=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+cn(a+"")+"px;color:"+cn(r)+";font-weight:"+cn(n+""),valueStyle:"font-size:"+cn(o+"")+"px;color:"+cn(i)+";font-weight:"+cn(s+"")}:{nameStyle:{fontSize:a,fill:r,fontWeight:n},valueStyle:{fontSize:o,fill:i,fontWeight:s}}}var cy=[0,10,20,30],uy=["","\n","\n\n","\n\n\n"];function py(e,t){return t.type=e,t}function dy(e){return"section"===e.type}function hy(e){return dy(e)?my:gy}function fy(e){if(dy(e)){var t=0,r=e.blocks.length,a=r>1||r>0&&!e.noHeader;return Object(Sa["k"])(e.blocks,(function(e){var r=fy(e);r>=t&&(t=r+ +(a&&(!r||dy(e)&&!e.noHeader)))})),t}return 0}function my(e,t,r,a){var n=t.noHeader,i=yy(fy(t)),o=[],s=t.blocks||[];Object(Sa["b"])(!s||Object(Sa["t"])(s)),s=s||[];var l=e.orderMode;if(t.sortBlocks&&l){s=s.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(Object(Sa["q"])(c,l)){var u=new Av(c[l],null);s.sort((function(e,t){return u.evaluate(e.sortParam,t.sortParam)}))}else"seriesDesc"===l&&s.reverse()}Object(Sa["k"])(s,(function(r,n){var s=t.valueFormatter,l=hy(r)(s?Object(Sa["m"])(Object(Sa["m"])({},e),{valueFormatter:s}):e,r,n>0?i.html:0,a);null!=l&&o.push(l)}));var p="richText"===e.renderMode?o.join(i.richText):by(o.join(""),n?r:i.html);if(n)return p;var d=Uf(t.header,"ordinal",e.useUTC),h=ly(a,e.renderMode).nameStyle;return"richText"===e.renderMode?wy(e,d,h)+i.richText+p:by('<div style="'+h+";"+sy+';">'+cn(d)+"</div>"+p,r)}function gy(e,t,r,a){var n=e.renderMode,i=t.noName,o=t.noValue,s=!t.markerType,l=t.name,c=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=Object(Sa["t"])(e)?e:[e],Object(Sa["H"])(e,(function(e,t){return Uf(e,Object(Sa["t"])(h)?h[t]:h,c)}))};if(!i||!o){var p=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",n),d=i?"":Uf(l,"ordinal",c),h=t.valueType,f=o?[]:u(t.value,t.dataIndex),m=!s||!i,g=!s&&i,v=ly(a,n),y=v.nameStyle,b=v.valueStyle;return"richText"===n?(s?"":p)+(i?"":wy(e,d,y))+(o?"":Sy(e,f,m,g,b)):by((s?"":p)+(i?"":_y(d,!s,y))+(o?"":xy(f,m,g,b)),r)}}function vy(e,t,r,a,n,i){if(e){var o=hy(e),s={useUTC:n,renderMode:r,orderMode:a,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,i)}}function yy(e){return{html:cy[e],richText:uy[e]}}function by(e,t){var r='<div style="clear:both"></div>',a="margin: "+t+"px 0 0";return'<div style="'+a+";"+sy+';">'+e+r+"</div>"}function _y(e,t,r){var a=t?"margin-left:2px":"";return'<span style="'+r+";"+a+'">'+cn(e)+"</span>"}function xy(e,t,r,a){var n=r?"10px":"20px",i=t?"float:right;margin-left:"+n:"";return e=Object(Sa["t"])(e)?e:[e],'<span style="'+i+";"+a+'">'+Object(Sa["H"])(e,(function(e){return cn(e)})).join(" ")+"</span>"}function wy(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function Sy(e,t,r,a,n){var i=[n],o=a?10:20;return r&&i.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(Object(Sa["t"])(t)?t.join(" "):t,i)}function Dy(e,t){var r=e.getData().getItemVisual(t,"style"),a=r[e.visualDrawType];return Zf(a)}function Cy(e,t){var r=e.get("padding");return null!=r?r:"richText"===t?[8,10]:10}var Ty=function(){function e(){this.richTextStyles={},this._nextStyleNameId=wl()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,r){var a="richText"===r?this._generateStyleName():null,n=Xf({color:t,type:e,renderMode:r,markerId:a});return Object(Sa["C"])(n)?n:(this.richTextStyles[a]=n.style,n.content)},e.prototype.wrapRichTextStyle=function(e,t){var r={};Object(Sa["t"])(t)?Object(Sa["k"])(t,(function(e){return Object(Sa["m"])(r,e)})):Object(Sa["m"])(r,t);var a=this._generateStyleName();return this.richTextStyles[a]=r,"{"+a+"|"+e+"}"},e}();function Iy(e){var t,r,a,n,i=e.series,o=e.dataIndex,s=e.multipleSeries,l=i.getData(),c=l.mapDimensionsAll("defaultedTooltip"),u=c.length,p=i.getRawValue(o),d=Object(Sa["t"])(p),h=Dy(i,o);if(u>1||d&&!u){var f=Oy(p,i,o,c,h);t=f.inlineValues,r=f.inlineValueTypes,a=f.blocks,n=f.inlineValues[0]}else if(u){var m=l.getDimensionInfo(c[0]);n=t=yv(l,o,c[0]),r=m.type}else n=t=d?p[0]:p;var g=Gl(i),v=g&&i.name||"",y=l.getName(o),b=s?v:y;return py("section",{header:v,noHeader:s||!g,sortParam:n,blocks:[py("nameValue",{markerType:"item",markerColor:h,name:b,noName:!Object(Sa["T"])(b),value:t,valueType:r,dataIndex:o})].concat(a||[])})}function Oy(e,t,r,a,n){var i=t.getData(),o=Object(Sa["N"])(e,(function(e,t,r){var a=i.getDimensionInfo(r);return e||a&&!1!==a.tooltip&&null!=a.displayName}),!1),s=[],l=[],c=[];function u(e,t){var r=i.getDimensionInfo(t);r&&!1!==r.otherDims.tooltip&&(o?c.push(py("nameValue",{markerType:"subItem",markerColor:n,name:r.displayName,value:e,valueType:r.type})):(s.push(e),l.push(r.type)))}return a.length?Object(Sa["k"])(a,(function(e){u(yv(i,r,e),e)})):Object(Sa["k"])(e,u),{inlineValues:s,inlineValueTypes:l,blocks:c}}var My=Zl();function Ay(e,t){return e.getName(t)||e.getId(t)}var ky="__universalTransitionEnabled",Py=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return xa(t,e),t.prototype.init=function(e,t,r){this.seriesIndex=this.componentIndex,this.dataTask=wv({count:Ry,reset:Ly}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,r);var a=My(this).sourceManager=new ay(this);a.prepareSource();var n=this.getInitialData(e,r);Fy(n,this),this.dataTask.context.data=n,My(this).dataBeforeProcessed=n,Ny(this),this._initSelectedMapFromData(n)},t.prototype.mergeDefaultAndTheme=function(e,t){var r=sm(this),a=r?cm(e):{},n=this.subType;fm.hasClass(n)&&(n+="Series"),Sa["I"](e,t.getTheme().get(this.subType)),Sa["I"](e,this.getDefaultOption()),Ml(e,"label",["show"]),this.fillDataTextStyle(e.data),r&&lm(e,a,r)},t.prototype.mergeOption=function(e,t){e=Sa["I"](this.option,e,!0),this.fillDataTextStyle(e.data);var r=sm(this);r&&lm(this.option,e,r);var a=My(this).sourceManager;a.dirty(),a.prepareSource();var n=this.getInitialData(e,t);Fy(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,My(this).dataBeforeProcessed=n,Ny(this),this._initSelectedMapFromData(n)},t.prototype.fillDataTextStyle=function(e){if(e&&!Sa["E"](e))for(var t=["show"],r=0;r<e.length;r++)e[r]&&e[r].label&&Ml(e[r],"label",t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){var t=this.getRawData();t.appendData(e.data)},t.prototype.getData=function(e){var t=zy(this);if(t){var r=t.context.data;return null!=e&&r.getLinkedData?r.getLinkedData(e):r}return My(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=zy(this);if(t){var r=t.context;r.outputData=e,t!==this.dataTask&&(r.data=e)}My(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return Sa["f"](e)},t.prototype.getSourceManager=function(){return My(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return My(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var e=this.get("colorBy");return e||"series"},t.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,t,r){return Iy({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(wa["a"].node&&(!e||!e.ssr))return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,r){var a=this.ecModel,n=Bm.prototype.getColorFromPalette.call(this,e,t,r);return n||(n=a.getColorFromPalette(e,t,r)),n},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var r=this.option.selectedMap;if(r){var a=this.option.selectedMode,n=this.getData(t);if("series"===a||"all"===r)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var i=0;i<e.length;i++){var o=e[i],s=Ay(n,o);r[s]=!1,this._selectedDataIndicesMap[s]=-1}}},t.prototype.toggleSelect=function(e,t){for(var r=[],a=0;a<e.length;a++)r[0]=e[a],this.isSelected(e[a],t)?this.unselect(r,t):this.select(r,t)},t.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=Sa["F"](e),r=[],a=0;a<t.length;a++){var n=e[t[a]];n>=0&&r.push(n)}return r},t.prototype.isSelected=function(e,t){var r=this.option.selectedMap;if(!r)return!1;var a=this.getData(t);return("all"===r||r[Ay(a,e)])&&!a.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[ky])return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},t.prototype._innerSelect=function(e,t){var r,a,n=this.option,i=n.selectedMode,o=t.length;if(i&&o)if("series"===i)n.selectedMap="all";else if("multiple"===i){Sa["A"](n.selectedMap)||(n.selectedMap={});for(var s=n.selectedMap,l=0;l<o;l++){var c=t[l],u=Ay(e,c);s[u]=!0,this._selectedDataIndicesMap[u]=e.getRawIndex(c)}}else if("single"===i||!0===i){var p=t[o-1];u=Ay(e,p);n.selectedMap=(r={},r[u]=!0,r),this._selectedDataIndicesMap=(a={},a[u]=e.getRawIndex(p),a)}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each((function(r){var a=e.getRawDataItem(r);a&&a.selected&&t.push(r)})),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return fm.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(fm);function Ny(e){var t=e.name;Gl(e)||(e.name=Ey(e)||t)}function Ey(e){var t=e.getRawData(),r=t.mapDimensionsAll("seriesName"),a=[];return Sa["k"](r,(function(e){var r=t.getDimensionInfo(e);r.displayName&&a.push(r.displayName)})),a.join(" ")}function Ry(e){return e.model.getRawData().count()}function Ly(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),jy}function jy(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Fy(e,t){Sa["k"](Sa["e"](e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),(function(r){e.wrapMethod(r,Sa["h"](Vy,t))}))}function Vy(e,t){var r=zy(e);return r&&r.setOutputEnd((t||this).count()),t}function zy(e){var t=(e.ecModel||{}).scheduler,r=t&&t.getPipeline(e.uid);if(r){var a=r.currentTask;if(a){var n=a.agentStubMap;n&&(a=n.get(e.uid))}return a}}Sa["K"](Py,_v),Sa["K"](Py,Bm),gc(Py,fm);var By=Py,$y=function(){function e(){this.group=new Bs,this.uid=Hh("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,r,a){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,r,a){},e.prototype.updateLayout=function(e,t,r,a){},e.prototype.updateVisual=function(e,t,r,a){},e.prototype.toggleBlurSeries=function(e,t,r){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();fc($y),xc($y);var Gy=$y;function Uy(){var e=Zl();return function(t){var r=e(t),a=t.pipelineContext,n=!!r.large,i=!!r.progressiveRender,o=r.large=!(!a||!a.large),s=r.progressiveRender=!(!a||!a.progressiveRender);return!(n===o&&i===s)&&"reset"}}var Wy=Lu.CMD,Hy=[[],[],[]],qy=Math.sqrt,Yy=Math.atan2;function Xy(e,t){if(t){var r,a,n,i,o,s,l=e.data,c=e.len(),u=Wy.M,p=Wy.C,d=Wy.L,h=Wy.R,f=Wy.A,m=Wy.Q;for(n=0,i=0;n<c;){switch(r=l[n++],i=n,a=0,r){case u:a=1;break;case d:a=1;break;case p:a=3;break;case m:a=2;break;case f:var g=t[4],v=t[5],y=qy(t[0]*t[0]+t[1]*t[1]),b=qy(t[2]*t[2]+t[3]*t[3]),_=Yy(-t[1]/b,t[0]/y);l[n]*=y,l[n++]+=g,l[n]*=b,l[n++]+=v,l[n++]*=y,l[n++]*=b,l[n++]+=_,l[n++]+=_,n+=2,i=n;break;case h:s[0]=l[n++],s[1]=l[n++],$a(s,s,t),l[i++]=s[0],l[i++]=s[1],s[0]+=l[n++],s[1]+=l[n++],$a(s,s,t),l[i++]=s[0],l[i++]=s[1]}for(o=0;o<a;o++){var x=Hy[o];x[0]=l[n++],x[1]=l[n++],$a(x,x,t),l[i++]=x[0],l[i++]=x[1]}}e.increaseVersion()}}var Zy=Math.sqrt,Ky=Math.sin,Jy=Math.cos,Qy=Math.PI;function eb(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function tb(e,t){return(e[0]*t[0]+e[1]*t[1])/(eb(e)*eb(t))}function rb(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(tb(e,t))}function ab(e,t,r,a,n,i,o,s,l,c,u){var p=l*(Qy/180),d=Jy(p)*(e-r)/2+Ky(p)*(t-a)/2,h=-1*Ky(p)*(e-r)/2+Jy(p)*(t-a)/2,f=d*d/(o*o)+h*h/(s*s);f>1&&(o*=Zy(f),s*=Zy(f));var m=(n===i?-1:1)*Zy((o*o*(s*s)-o*o*(h*h)-s*s*(d*d))/(o*o*(h*h)+s*s*(d*d)))||0,g=m*o*h/s,v=m*-s*d/o,y=(e+r)/2+Jy(p)*g-Ky(p)*v,b=(t+a)/2+Ky(p)*g+Jy(p)*v,_=rb([1,0],[(d-g)/o,(h-v)/s]),x=[(d-g)/o,(h-v)/s],w=[(-1*d-g)/o,(-1*h-v)/s],S=rb(x,w);if(tb(x,w)<=-1&&(S=Qy),tb(x,w)>=1&&(S=0),S<0){var D=Math.round(S/Qy*1e6)/1e6;S=2*Qy+D%2*Qy}u.addData(c,y,b,o,s,_,S,p,i)}var nb=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,ib=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function ob(e){var t=new Lu;if(!e)return t;var r,a=0,n=0,i=a,o=n,s=Lu.CMD,l=e.match(nb);if(!l)return t;for(var c=0;c<l.length;c++){for(var u=l[c],p=u.charAt(0),d=void 0,h=u.match(ib)||[],f=h.length,m=0;m<f;m++)h[m]=parseFloat(h[m]);var g=0;while(g<f){var v=void 0,y=void 0,b=void 0,_=void 0,x=void 0,w=void 0,S=void 0,D=a,C=n,T=void 0,I=void 0;switch(p){case"l":a+=h[g++],n+=h[g++],d=s.L,t.addData(d,a,n);break;case"L":a=h[g++],n=h[g++],d=s.L,t.addData(d,a,n);break;case"m":a+=h[g++],n+=h[g++],d=s.M,t.addData(d,a,n),i=a,o=n,p="l";break;case"M":a=h[g++],n=h[g++],d=s.M,t.addData(d,a,n),i=a,o=n,p="L";break;case"h":a+=h[g++],d=s.L,t.addData(d,a,n);break;case"H":a=h[g++],d=s.L,t.addData(d,a,n);break;case"v":n+=h[g++],d=s.L,t.addData(d,a,n);break;case"V":n=h[g++],d=s.L,t.addData(d,a,n);break;case"C":d=s.C,t.addData(d,h[g++],h[g++],h[g++],h[g++],h[g++],h[g++]),a=h[g-2],n=h[g-1];break;case"c":d=s.C,t.addData(d,h[g++]+a,h[g++]+n,h[g++]+a,h[g++]+n,h[g++]+a,h[g++]+n),a+=h[g-2],n+=h[g-1];break;case"S":v=a,y=n,T=t.len(),I=t.data,r===s.C&&(v+=a-I[T-4],y+=n-I[T-3]),d=s.C,D=h[g++],C=h[g++],a=h[g++],n=h[g++],t.addData(d,v,y,D,C,a,n);break;case"s":v=a,y=n,T=t.len(),I=t.data,r===s.C&&(v+=a-I[T-4],y+=n-I[T-3]),d=s.C,D=a+h[g++],C=n+h[g++],a+=h[g++],n+=h[g++],t.addData(d,v,y,D,C,a,n);break;case"Q":D=h[g++],C=h[g++],a=h[g++],n=h[g++],d=s.Q,t.addData(d,D,C,a,n);break;case"q":D=h[g++]+a,C=h[g++]+n,a+=h[g++],n+=h[g++],d=s.Q,t.addData(d,D,C,a,n);break;case"T":v=a,y=n,T=t.len(),I=t.data,r===s.Q&&(v+=a-I[T-4],y+=n-I[T-3]),a=h[g++],n=h[g++],d=s.Q,t.addData(d,v,y,a,n);break;case"t":v=a,y=n,T=t.len(),I=t.data,r===s.Q&&(v+=a-I[T-4],y+=n-I[T-3]),a+=h[g++],n+=h[g++],d=s.Q,t.addData(d,v,y,a,n);break;case"A":b=h[g++],_=h[g++],x=h[g++],w=h[g++],S=h[g++],D=a,C=n,a=h[g++],n=h[g++],d=s.A,ab(D,C,a,n,w,S,b,_,x,d,t);break;case"a":b=h[g++],_=h[g++],x=h[g++],w=h[g++],S=h[g++],D=a,C=n,a+=h[g++],n+=h[g++],d=s.A,ab(D,C,a,n,w,S,b,_,x,d,t);break}}"z"!==p&&"Z"!==p||(d=s.Z,t.addData(d),a=i,n=o),r=d}return t.toStatic(),t}var sb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ca(t,e),t.prototype.applyTransform=function(e){},t}(lp);function lb(e){return null!=e.setData}function cb(e,t){var r=ob(e),a=Object(Sa["m"])({},t);return a.buildPath=function(e){if(lb(e)){e.setData(r.data);var t=e.getContext();t&&e.rebuildPath(t,1)}else{t=e;r.rebuildPath(t,1)}},a.applyTransform=function(e){Xy(r,e),this.dirtyShape()},a}function ub(e,t){return new sb(cb(e,t))}function pb(e,t){var r=cb(e,t),a=function(e){function t(t){var a=e.call(this,t)||this;return a.applyTransform=r.applyTransform,a.buildPath=r.buildPath,a}return Ca(t,e),t}(sb);return a}function db(e,t){for(var r=[],a=e.length,n=0;n<a;n++){var i=e[n];r.push(i.getUpdatedPathProxy(!0))}var o=new lp(t);return o.createPathProxy(),o.buildPath=function(e){if(lb(e)){e.appendPath(r);var t=e.getContext();t&&e.rebuildPath(t,1)}},o}function hb(e,t){t=t||{};var r=new lp;return e.shape&&r.setShape(e.shape),r.setStyle(e.style),t.bakeTransform?Xy(r.path,e.getComputedTransform()):t.toLocal?r.setLocalTransform(e.getComputedTransform()):r.copyTransform(e),r.buildPath=e.buildPath,r.applyTransform=r.applyTransform,r.z=e.z,r.z2=e.z2,r.zlevel=e.zlevel,r}var fb=function(){function e(){this.cx=0,this.cy=0,this.r=0}return e}(),mb=function(e){function t(t){return e.call(this,t)||this}return Ca(t,e),t.prototype.getDefaultShape=function(){return new fb},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI)},t}(lp);mb.prototype.type="circle";var gb=mb,vb=function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e}(),yb=function(e){function t(t){return e.call(this,t)||this}return Ca(t,e),t.prototype.getDefaultShape=function(){return new vb},t.prototype.buildPath=function(e,t){var r=.5522848,a=t.cx,n=t.cy,i=t.rx,o=t.ry,s=i*r,l=o*r;e.moveTo(a-i,n),e.bezierCurveTo(a-i,n-l,a-s,n-o,a,n-o),e.bezierCurveTo(a+s,n-o,a+i,n-l,a+i,n),e.bezierCurveTo(a+i,n+l,a+s,n+o,a,n+o),e.bezierCurveTo(a-s,n+o,a-i,n+l,a-i,n),e.closePath()},t}(lp);yb.prototype.type="ellipse";var bb=yb,_b=Math.PI,xb=2*_b,wb=Math.sin,Sb=Math.cos,Db=Math.acos,Cb=Math.atan2,Tb=Math.abs,Ib=Math.sqrt,Ob=Math.max,Mb=Math.min,Ab=1e-4;function kb(e,t,r,a,n,i,o,s){var l=r-e,c=a-t,u=o-n,p=s-i,d=p*l-u*c;if(!(d*d<Ab))return d=(u*(t-i)-p*(e-n))/d,[e+d*l,t+d*c]}function Pb(e,t,r,a,n,i,o){var s=e-r,l=t-a,c=(o?i:-i)/Ib(s*s+l*l),u=c*l,p=-c*s,d=e+u,h=t+p,f=r+u,m=a+p,g=(d+f)/2,v=(h+m)/2,y=f-d,b=m-h,_=y*y+b*b,x=n-i,w=d*m-f*h,S=(b<0?-1:1)*Ib(Ob(0,x*x*_-w*w)),D=(w*b-y*S)/_,C=(-w*y-b*S)/_,T=(w*b+y*S)/_,I=(-w*y+b*S)/_,O=D-g,M=C-v,A=T-g,k=I-v;return O*O+M*M>A*A+k*k&&(D=T,C=I),{cx:D,cy:C,x0:-u,y0:-p,x1:D*(n/x-1),y1:C*(n/x-1)}}function Nb(e){var t;if(Object(Sa["t"])(e)){var r=e.length;if(!r)return e;t=1===r?[e[0],e[0],0,0]:2===r?[e[0],e[0],e[1],e[1]]:3===r?e.concat(e[2]):e}else t=[e,e,e,e];return t}function Eb(e,t){var r,a=Ob(t.r,0),n=Ob(t.r0||0,0),i=a>0,o=n>0;if(i||o){if(i||(a=n,n=0),n>a){var s=a;a=n,n=s}var l=t.startAngle,c=t.endAngle;if(!isNaN(l)&&!isNaN(c)){var u=t.cx,p=t.cy,d=!!t.clockwise,h=Tb(c-l),f=h>xb&&h%xb;if(f>Ab&&(h=f),a>Ab)if(h>xb-Ab)e.moveTo(u+a*Sb(l),p+a*wb(l)),e.arc(u,p,a,l,c,!d),n>Ab&&(e.moveTo(u+n*Sb(c),p+n*wb(c)),e.arc(u,p,n,c,l,d));else{var m=void 0,g=void 0,v=void 0,y=void 0,b=void 0,_=void 0,x=void 0,w=void 0,S=void 0,D=void 0,C=void 0,T=void 0,I=void 0,O=void 0,M=void 0,A=void 0,k=a*Sb(l),P=a*wb(l),N=n*Sb(c),E=n*wb(c),R=h>Ab;if(R){var L=t.cornerRadius;L&&(r=Nb(L),m=r[0],g=r[1],v=r[2],y=r[3]);var j=Tb(a-n)/2;if(b=Mb(j,v),_=Mb(j,y),x=Mb(j,m),w=Mb(j,g),C=S=Ob(b,_),T=D=Ob(x,w),(S>Ab||D>Ab)&&(I=a*Sb(c),O=a*wb(c),M=n*Sb(l),A=n*wb(l),h<_b)){var F=kb(k,P,M,A,I,O,N,E);if(F){var V=k-F[0],z=P-F[1],B=I-F[0],$=O-F[1],G=1/wb(Db((V*B+z*$)/(Ib(V*V+z*z)*Ib(B*B+$*$)))/2),U=Ib(F[0]*F[0]+F[1]*F[1]);C=Mb(S,(a-U)/(G+1)),T=Mb(D,(n-U)/(G-1))}}}if(R)if(C>Ab){var W=Mb(v,C),H=Mb(y,C),q=Pb(M,A,k,P,a,W,d),Y=Pb(I,O,N,E,a,H,d);e.moveTo(u+q.cx+q.x0,p+q.cy+q.y0),C<S&&W===H?e.arc(u+q.cx,p+q.cy,C,Cb(q.y0,q.x0),Cb(Y.y0,Y.x0),!d):(W>0&&e.arc(u+q.cx,p+q.cy,W,Cb(q.y0,q.x0),Cb(q.y1,q.x1),!d),e.arc(u,p,a,Cb(q.cy+q.y1,q.cx+q.x1),Cb(Y.cy+Y.y1,Y.cx+Y.x1),!d),H>0&&e.arc(u+Y.cx,p+Y.cy,H,Cb(Y.y1,Y.x1),Cb(Y.y0,Y.x0),!d))}else e.moveTo(u+k,p+P),e.arc(u,p,a,l,c,!d);else e.moveTo(u+k,p+P);if(n>Ab&&R)if(T>Ab){W=Mb(m,T),H=Mb(g,T),q=Pb(N,E,I,O,n,-H,d),Y=Pb(k,P,M,A,n,-W,d);e.lineTo(u+q.cx+q.x0,p+q.cy+q.y0),T<D&&W===H?e.arc(u+q.cx,p+q.cy,T,Cb(q.y0,q.x0),Cb(Y.y0,Y.x0),!d):(H>0&&e.arc(u+q.cx,p+q.cy,H,Cb(q.y0,q.x0),Cb(q.y1,q.x1),!d),e.arc(u,p,n,Cb(q.cy+q.y1,q.cx+q.x1),Cb(Y.cy+Y.y1,Y.cx+Y.x1),d),W>0&&e.arc(u+Y.cx,p+Y.cy,W,Cb(Y.y1,Y.x1),Cb(Y.y0,Y.x0),!d))}else e.lineTo(u+N,p+E),e.arc(u,p,n,c,l,d);else e.lineTo(u+N,p+E)}else e.moveTo(u,p);e.closePath()}}}var Rb=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0}return e}(),Lb=function(e){function t(t){return e.call(this,t)||this}return Ca(t,e),t.prototype.getDefaultShape=function(){return new Rb},t.prototype.buildPath=function(e,t){Eb(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(lp);Lb.prototype.type="sector";var jb=Lb,Fb=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),Vb=function(e){function t(t){return e.call(this,t)||this}return Ca(t,e),t.prototype.getDefaultShape=function(){return new Fb},t.prototype.buildPath=function(e,t){var r=t.cx,a=t.cy,n=2*Math.PI;e.moveTo(r+t.r,a),e.arc(r,a,t.r,0,n,!1),e.moveTo(r+t.r0,a),e.arc(r,a,t.r0,0,n,!0)},t}(lp);Vb.prototype.type="ring";var zb=Vb;function Bb(e,t,r,a){var n,i,o,s,l=[],c=[],u=[],p=[];if(a){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,h=e.length;d<h;d++)Ga(o,o,e[d]),Ua(s,s,e[d]);Ga(o,o,a[0]),Ua(s,s,a[1])}for(d=0,h=e.length;d<h;d++){var f=e[d];if(r)n=e[d?d-1:h-1],i=e[(d+1)%h];else{if(0===d||d===h-1){l.push(Oa(e[d]));continue}n=e[d-1],i=e[d+1]}Pa(c,i,n),Ra(c,c,t);var m=ja(f,n),g=ja(f,i),v=m+g;0!==v&&(m/=v,g/=v),Ra(u,c,-m),Ra(p,c,g);var y=Aa([],f,u),b=Aa([],f,p);a&&(Ua(y,y,o),Ga(y,y,s),Ua(b,b,o),Ga(b,b,s)),l.push(y),l.push(b)}return r&&l.push(l.shift()),l}function $b(e,t,r){var a=t.smooth,n=t.points;if(n&&n.length>=2){if(a){var i=Bb(n,a,r,t.smoothConstraint);e.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(r?o:o-1);s++){var l=i[2*s],c=i[2*s+1],u=n[(s+1)%o];e.bezierCurveTo(l[0],l[1],c[0],c[1],u[0],u[1])}}else{e.moveTo(n[0][0],n[0][1]);s=1;for(var p=n.length;s<p;s++)e.lineTo(n[s][0],n[s][1])}r&&e.closePath()}}var Gb=function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e}(),Ub=function(e){function t(t){return e.call(this,t)||this}return Ca(t,e),t.prototype.getDefaultShape=function(){return new Gb},t.prototype.buildPath=function(e,t){$b(e,t,!0)},t}(lp);Ub.prototype.type="polygon";var Wb=Ub,Hb=function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e}(),qb=function(e){function t(t){return e.call(this,t)||this}return Ca(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Hb},t.prototype.buildPath=function(e,t){$b(e,t,!1)},t}(lp);qb.prototype.type="polyline";var Yb=qb,Xb={},Zb=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),Kb=function(e){function t(t){return e.call(this,t)||this}return Ca(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Zb},t.prototype.buildPath=function(e,t){var r,a,n,i;if(this.subPixelOptimize){var o=bp(Xb,t,this.style);r=o.x1,a=o.y1,n=o.x2,i=o.y2}else r=t.x1,a=t.y1,n=t.x2,i=t.y2;var s=t.percent;0!==s&&(e.moveTo(r,a),s<1&&(n=r*(1-s)+n*s,i=a*(1-s)+i*s),e.lineTo(n,i))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(lp);Kb.prototype.type="line";var Jb=Kb,Qb=[],e_=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return e}();function t_(e,t,r){var a=e.cpx2,n=e.cpy2;return null!=a||null!=n?[(r?Vi:Fi)(e.x1,e.cpx1,e.cpx2,e.x2,t),(r?Vi:Fi)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(r?Hi:Wi)(e.x1,e.cpx1,e.x2,t),(r?Hi:Wi)(e.y1,e.cpy1,e.y2,t)]}var r_=function(e){function t(t){return e.call(this,t)||this}return Ca(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new e_},t.prototype.buildPath=function(e,t){var r=t.x1,a=t.y1,n=t.x2,i=t.y2,o=t.cpx1,s=t.cpy1,l=t.cpx2,c=t.cpy2,u=t.percent;0!==u&&(e.moveTo(r,a),null==l||null==c?(u<1&&(Xi(r,o,n,u,Qb),o=Qb[1],n=Qb[2],Xi(a,s,i,u,Qb),s=Qb[1],i=Qb[2]),e.quadraticCurveTo(o,s,n,i)):(u<1&&($i(r,o,l,n,u,Qb),o=Qb[1],l=Qb[2],n=Qb[3],$i(a,s,c,i,u,Qb),s=Qb[1],c=Qb[2],i=Qb[3]),e.bezierCurveTo(o,s,l,c,n,i)))},t.prototype.pointAt=function(e){return t_(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=t_(this.shape,e,!0);return La(t,t)},t}(lp);r_.prototype.type="bezier-curve";var a_=r_,n_=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0}return e}(),i_=function(e){function t(t){return e.call(this,t)||this}return Ca(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new n_},t.prototype.buildPath=function(e,t){var r=t.cx,a=t.cy,n=Math.max(t.r,0),i=t.startAngle,o=t.endAngle,s=t.clockwise,l=Math.cos(i),c=Math.sin(i);e.moveTo(l*n+r,c*n+a),e.arc(r,a,n,i,o,!s)},t}(lp);i_.prototype.type="arc";var o_=i_,s_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return Ca(t,e),t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),r=0;r<e.length;r++)t=t||e[r].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),r=0;r<e.length;r++)e[r].path||e[r].createPathProxy(),e[r].path.setScale(t[0],t[1],e[r].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var r=t.paths||[],a=0;a<r.length;a++)r[a].buildPath(e,r[a].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),lp.prototype.getBoundingRect.call(this)},t}(lp),l_=s_,c_=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),u_=c_,p_=function(e){function t(t,r,a,n,i,o){var s=e.call(this,i)||this;return s.x=null==t?0:t,s.y=null==r?0:r,s.x2=null==a?1:a,s.y2=null==n?0:n,s.type="linear",s.global=o||!1,s}return Ca(t,e),t}(u_),d_=p_,h_=function(e){function t(t,r,a,n,i){var o=e.call(this,n)||this;return o.x=null==t?.5:t,o.y=null==r?.5:r,o.r=null==a?.5:a,o.type="radial",o.global=i||!1,o}return Ca(t,e),t}(u_),f_=h_,m_=[0,0],g_=[0,0],v_=new Ln,y_=new Ln,b_=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var r=0;r<4;r++)this._corners[r]=new Ln;for(r=0;r<2;r++)this._axes[r]=new Ln;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var r=this._corners,a=this._axes,n=e.x,i=e.y,o=n+e.width,s=i+e.height;if(r[0].set(n,i),r[1].set(o,i),r[2].set(o,s),r[3].set(n,s),t)for(var l=0;l<4;l++)r[l].transform(t);Ln.sub(a[0],r[1],r[0]),Ln.sub(a[1],r[3],r[0]),a[0].normalize(),a[1].normalize();for(l=0;l<2;l++)this._origin[l]=a[l].dot(r[0])},e.prototype.intersect=function(e,t){var r=!0,a=!t;return v_.set(1/0,1/0),y_.set(0,0),!this._intersectCheckOneSide(this,e,v_,y_,a,1)&&(r=!1,a)||!this._intersectCheckOneSide(e,this,v_,y_,a,-1)&&(r=!1,a)||a||Ln.copy(t,r?v_:y_),r},e.prototype._intersectCheckOneSide=function(e,t,r,a,n,i){for(var o=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,e._corners,m_),this._getProjMinMaxOnAxis(s,t._corners,g_),m_[1]<g_[0]||m_[0]>g_[1]){if(o=!1,n)return o;var c=Math.abs(g_[0]-m_[1]),u=Math.abs(m_[0]-g_[1]);Math.min(c,u)>a.len()&&(c<u?Ln.scale(a,l,-c*i):Ln.scale(a,l,u*i))}else if(r){c=Math.abs(g_[0]-m_[1]),u=Math.abs(m_[0]-g_[1]);Math.min(c,u)<r.len()&&(c<u?Ln.scale(r,l,c*i):Ln.scale(r,l,-u*i))}}return o},e.prototype._getProjMinMaxOnAxis=function(e,t,r){for(var a=this._axes[e],n=this._origin,i=t[0].dot(a)+n[e],o=i,s=i,l=1;l<t.length;l++){var c=t[l].dot(a)+n[e];o=Math.min(c,o),s=Math.max(c,s)}r[0]=o,r[1]=s},e}(),__=b_,x_=[],w_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return Ca(t,e),t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t=t||!1;for(var r=0;r<e.length;r++)this.addDisplayable(e[r],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var t=this._displayables[e];t.parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){t=this._temporaryDisplayables[e];t.parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new Hn(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var r=this._displayables[t],a=r.getBoundingRect().clone();r.needLocalTransform()&&a.applyTransform(r.getLocalTransform(x_)),e.union(a)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var r=this.transformCoordToLocal(e,t),a=this.getBoundingRect();if(a.contain(r[0],r[1]))for(var n=0;n<this._displayables.length;n++){var i=this._displayables[n];if(i.contain(e,t))return!0}return!1},t}(tu),S_=w_,D_=Math.max,C_=Math.min,T_={};function I_(e){return lp.extend(e)}var O_=pb;function M_(e,t){return O_(e,t)}function A_(e,t){T_[e]=t}function k_(e){if(T_.hasOwnProperty(e))return T_[e]}function P_(e,t,r,a){var n=ub(e,t);return r&&("center"===a&&(r=E_(r,n.getBoundingRect())),L_(n,r)),n}function N_(e,t,r){var a=new gp({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===r){var n={width:e.width,height:e.height};a.setStyle(E_(t,n))}}});return a}function E_(e,t){var r,a=t.width/t.height,n=e.height*a;n<=e.width?r=e.height:(n=e.width,r=n/a);var i=e.x+e.width/2,o=e.y+e.height/2;return{x:i-n/2,y:o-r/2,width:n,height:r}}var R_=db;function L_(e,t){if(e.applyTransform){var r=e.getBoundingRect(),a=r.calculateTransform(t);e.applyTransform(a)}}function j_(e,t){return bp(e,e,{lineWidth:t}),e}function F_(e){return _p(e.shape,e.shape,e.style),e}var V_=xp;function z_(e,t){var r=In([]);while(e&&e!==t)Mn(r,e.getLocalTransform(),r),e=e.parent;return r}function B_(e,t,r){return t&&!Object(Sa["u"])(t)&&(t=fs.getLocalTransform(t)),r&&(t=Nn([],t)),$a([],e,t)}function $_(e,t,r){var a=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),n=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),i=["left"===e?-a:"right"===e?a:0,"top"===e?-n:"bottom"===e?n:0];return i=B_(i,t,r),Math.abs(i[0])>Math.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function G_(e){return!e.isGroup}function U_(e){return null!=e.shape}function W_(e,t,r){if(e&&t){var a=n(e);t.traverse((function(e){if(G_(e)&&e.anid){var t=a[e.anid];if(t){var n=i(e);e.attr(i(t)),sh(e,n,r,Up(e).dataIndex)}}}))}function n(e){var t={};return e.traverse((function(e){G_(e)&&e.anid&&(t[e.anid]=e)})),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return U_(e)&&(t.shape=Object(Sa["m"])({},e.shape)),t}}function H_(e,t){return Object(Sa["H"])(e,(function(e){var r=e[0];r=D_(r,t.x),r=C_(r,t.x+t.width);var a=e[1];return a=D_(a,t.y),a=C_(a,t.y+t.height),[r,a]}))}function q_(e,t){var r=D_(e.x,t.x),a=C_(e.x+e.width,t.x+t.width),n=D_(e.y,t.y),i=C_(e.y+e.height,t.y+t.height);if(a>=r&&i>=n)return{x:r,y:n,width:a-r,height:i-n}}function Y_(e,t,r){var a=Object(Sa["m"])({rectHover:!0},t),n=a.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(n.image=e.slice(8),Object(Sa["i"])(n,r),new gp(a)):P_(e.replace("path://",""),a,r,"center")}function X_(e,t,r,a,n){for(var i=0,o=n[n.length-1];i<n.length;i++){var s=n[i];if(Z_(e,t,r,a,s[0],s[1],o[0],o[1]))return!0;o=s}}function Z_(e,t,r,a,n,i,o,s){var l=r-e,c=a-t,u=o-n,p=s-i,d=K_(u,p,l,c);if(J_(d))return!1;var h=e-n,f=t-i,m=K_(h,f,l,c)/d;if(m<0||m>1)return!1;var g=K_(h,f,u,p)/d;return!(g<0||g>1)}function K_(e,t,r,a){return e*a-r*t}function J_(e){return e<=1e-6&&e>=-1e-6}function Q_(e){var t=e.itemTooltipOption,r=e.componentModel,a=e.itemName,n=Object(Sa["C"])(t)?{formatter:t}:t,i=r.mainType,o=r.componentIndex,s={componentType:i,name:a,$vars:["name"]};s[i+"Index"]=o;var l=e.formatterParamsExtra;l&&Object(Sa["k"])(Object(Sa["F"])(l),(function(e){Object(Sa["q"])(s,e)||(s[e]=l[e],s.$vars.push(e))}));var c=Up(e.el);c.componentMainType=i,c.componentIndex=o,c.tooltipConfig={name:a,option:Object(Sa["i"])({content:a,encodeHTMLContent:!0,formatterParams:s},n)}}function ex(e,t){var r;e.isGroup&&(r=t(e)),r||e.traverse(t)}function tx(e,t){if(e)if(Object(Sa["t"])(e))for(var r=0;r<e.length;r++)ex(e[r],t);else ex(e,t)}A_("circle",gb),A_("ellipse",bb),A_("sector",jb),A_("ring",zb),A_("polygon",Wb),A_("polyline",Yb),A_("rect",Cp),A_("line",Jb),A_("bezierCurve",a_),A_("arc",o_);var rx=Zl(),ax=Uy(),nx=function(){function e(){this.group=new Bs,this.uid=Hh("viewChart"),this.renderTask=wv({plan:sx,reset:lx}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,r,a){0},e.prototype.highlight=function(e,t,r,a){var n=e.getData(a&&a.dataType);n&&ox(n,a,"emphasis")},e.prototype.downplay=function(e,t,r,a){var n=e.getData(a&&a.dataType);n&&ox(n,a,"normal")},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,r,a){this.render(e,t,r,a)},e.prototype.updateLayout=function(e,t,r,a){this.render(e,t,r,a)},e.prototype.updateVisual=function(e,t,r,a){this.render(e,t,r,a)},e.prototype.eachRendered=function(e){tx(this.group,e)},e.markUpdateMethod=function(e,t){rx(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type="chart"}(),e}();function ix(e,t,r){e&&Jd(e)&&("emphasis"===t?Id:Od)(e,r)}function ox(e,t,r){var a=Xl(e,t),n=t&&null!=t.highlightKey?eh(t.highlightKey):null;null!=a?Object(Sa["k"])(Ol(a),(function(t){ix(e.getItemGraphicEl(t),r,n)})):e.eachItemGraphicEl((function(e){ix(e,r,n)}))}function sx(e){return ax(e.model)}function lx(e){var t=e.model,r=e.ecModel,a=e.api,n=e.payload,i=t.pipelineContext.progressiveRender,o=e.view,s=n&&rx(n).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](t,r,a,n),cx[l]}fc(nx,["dispose"]),xc(nx);var cx={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},ux=nx,px="\0__throttleOriginMethod",dx="\0__throttleRate",hx="\0__throttleType";function fx(e,t,r){var a,n,i,o,s,l=0,c=0,u=null;function p(){c=(new Date).getTime(),u=null,e.apply(i,o||[])}t=t||0;var d=function(){for(var e=[],d=0;d<arguments.length;d++)e[d]=arguments[d];a=(new Date).getTime(),i=this,o=e;var h=s||t,f=s||r;s=null,n=a-(f?l:c)-h,clearTimeout(u),f?u=setTimeout(p,h):n>=0?p():u=setTimeout(p,-n),l=a};return d.clear=function(){u&&(clearTimeout(u),u=null)},d.debounceNextCall=function(e){s=e},d}function mx(e,t,r,a){var n=e[t];if(n){var i=n[px]||n,o=n[hx],s=n[dx];if(s!==r||o!==a){if(null==r||!a)return e[t]=i;n=e[t]=fx(i,r,"debounce"===a),n[px]=i,n[hx]=a,n[dx]=r}return n}}function gx(e,t){var r=e[t];r&&r[px]&&(r.clear&&r.clear(),e[t]=r[px])}var vx=Zl(),yx={itemStyle:wc(zh,!0),lineStyle:wc(jh,!0)},bx={lineStyle:"stroke",itemStyle:"fill"};function _x(e,t){var r=e.visualStyleMapper||yx[t];return r||(console.warn("Unknown style type '"+t+"'."),yx.itemStyle)}function xx(e,t){var r=e.visualDrawType||bx[t];return r||(console.warn("Unknown style type '"+t+"'."),"fill")}var wx={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),a=e.visualStyleAccessPath||"itemStyle",n=e.getModel(a),i=_x(e,a),o=i(n),s=n.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=xx(e,a),c=o[l],u=Object(Sa["w"])(c)?c:null,p="auto"===o.fill||"auto"===o.stroke;if(!o[l]||u||p){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[l]||(o[l]=d,r.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||Object(Sa["w"])(o.fill)?d:o.fill,o.stroke="auto"===o.stroke||Object(Sa["w"])(o.stroke)?d:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!t.isSeriesFiltered(e)&&u)return r.setVisual("colorFromPalette",!1),{dataEach:function(t,r){var a=e.getDataParams(r),n=Object(Sa["m"])({},o);n[l]=u(a),t.setItemVisual(r,"style",n)}}}},Sx=new Uh,Dx={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var r=e.getData(),a=e.visualStyleAccessPath||"itemStyle",n=_x(e,a),i=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(e,t){var r=e.getRawDataItem(t);if(r&&r[a]){Sx.option=r[a];var o=n(Sx),s=e.ensureUniqueItemVisual(t,"style");Object(Sa["m"])(s,o),Sx.option.decal&&(e.setItemVisual(t,"decal",Sx.option.decal),Sx.option.decal.dirty=!0),i in o&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},Cx={performRawSeries:!0,overallReset:function(e){var t=Object(Sa["f"])();e.eachSeries((function(e){var r=e.getColorBy();if(!e.isColorBySeries()){var a=e.type+"-"+r,n=t.get(a);n||(n={},t.set(a,n)),vx(e).scope=n}})),e.eachSeries((function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var r=t.getRawData(),a={},n=t.getData(),i=vx(t).scope,o=t.visualStyleAccessPath||"itemStyle",s=xx(t,o);n.each((function(e){var t=n.getRawIndex(e);a[t]=e})),r.each((function(e){var o=a[e],l=n.getItemVisual(o,"colorFromPalette");if(l){var c=n.ensureUniqueItemVisual(o,"style"),u=r.getName(e)||e+"",p=r.count();c[s]=t.getColorFromPalette(u,i,p)}}))}}))}},Tx=Math.PI;function Ix(e,t){t=t||{},Sa["i"](t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new Bs,a=new Cp({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(a);var n,i=new Gp({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),o=new Cp({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return r.add(o),t.showSpinner&&(n=new o_({shape:{startAngle:-Tx/2,endAngle:-Tx/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),n.animateShape(!0).when(1e3,{endAngle:3*Tx/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*Tx/2}).delay(300).start("circularInOut"),r.add(n)),r.resize=function(){var r=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&r?10:0)-r)/2-(t.showSpinner&&r?0:5+r/2)+(t.showSpinner?0:r/2)+(r?0:s),c=e.getHeight()/2;t.showSpinner&&n.setShape({cx:l,cy:c}),o.setShape({x:l-s,y:c-s,width:2*s,height:2*s}),a.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r}var Ox=function(){function e(e,t,r,a){this._stageTaskMap=Object(Sa["f"])(),this.ecInstance=e,this.api=t,r=this._dataProcessorHandlers=r.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=r.concat(a)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var r=this._pipelineMap.get(e.__pipeline.id),a=r.context,n=!t&&r.progressiveEnabled&&(!a||a.progressiveRender)&&e.__idxInPipeline>r.blockIndex,i=n?r.step:null,o=a&&a.modDataCount,s=null!=o?Math.ceil(o/i):null;return{step:i,modBy:s,modDataCount:o}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var r=this._pipelineMap.get(e.uid),a=e.getData(),n=a.count(),i=r.progressiveEnabled&&t.incrementalPrepareRender&&n>=r.threshold,o=e.get("large")&&n>=e.get("largeThreshold"),s="mod"===e.get("progressiveChunkMode")?n:null;e.pipelineContext=r.context={progressiveRender:i,modDataCount:s,large:o}},e.prototype.restorePipelines=function(e){var t=this,r=t._pipelineMap=Object(Sa["f"])();e.eachSeries((function(e){var a=e.getProgressive(),n=e.uid;r.set(n,{id:n,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:a&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),t._pipe(e,e.dataTask)}))},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),r=this.api;Object(Sa["k"])(this._allHandlers,(function(a){var n=e.get(a.uid)||e.set(a.uid,{}),i="";Object(Sa["b"])(!(a.reset&&a.overallReset),i),a.reset&&this._createSeriesStageTask(a,n,t,r),a.overallReset&&this._createOverallStageTask(a,n,t,r)}),this)},e.prototype.prepareView=function(e,t,r,a){var n=e.renderTask,i=n.context;i.model=t,i.ecModel=r,i.api=a,n.__block=!e.incrementalPrepareRender,this._pipe(t,n)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,r){this._performStageTasks(this._visualHandlers,e,t,r)},e.prototype._performStageTasks=function(e,t,r,a){a=a||{};var n=!1,i=this;function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}Object(Sa["k"])(e,(function(e,s){if(!a.visualType||a.visualType===e.visualType){var l=i._stageTaskMap.get(e.uid),c=l.seriesTaskMap,u=l.overallTask;if(u){var p,d=u.agentStubMap;d.each((function(e){o(a,e)&&(e.dirty(),p=!0)})),p&&u.dirty(),i.updatePayload(u,r);var h=i.getPerformArgs(u,a.block);d.each((function(e){e.perform(h)})),u.perform(h)&&(n=!0)}else c&&c.each((function(s,l){o(a,s)&&s.dirty();var c=i.getPerformArgs(s,a.block);c.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),i.updatePayload(s,r),s.perform(c)&&(n=!0)}))}})),this.unfinished=n||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t=e.dataTask.perform()||t})),this.unfinished=t||this.unfinished},e.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)}))},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,r,a){var n=this,i=t.seriesTaskMap,o=t.seriesTaskMap=Object(Sa["f"])(),s=e.seriesType,l=e.getTargetSeries;function c(t){var s=t.uid,l=o.set(s,i&&i.get(s)||wv({plan:Nx,reset:Ex,count:jx}));l.context={model:t,ecModel:r,api:a,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:n},n._pipe(t,l)}e.createOnAllSeries?r.eachRawSeries(c):s?r.eachRawSeriesByType(s,c):l&&l(r,a).each(c)},e.prototype._createOverallStageTask=function(e,t,r,a){var n=this,i=t.overallTask=t.overallTask||wv({reset:Mx});i.context={ecModel:r,api:a,overallReset:e.overallReset,scheduler:n};var o=i.agentStubMap,s=i.agentStubMap=Object(Sa["f"])(),l=e.seriesType,c=e.getTargetSeries,u=!0,p=!1,d="";function h(e){var t=e.uid,r=s.set(t,o&&o.get(t)||(p=!0,wv({reset:Ax,onDirty:Px})));r.context={model:e,overallProgress:u},r.agent=i,r.__block=u,n._pipe(e,r)}Object(Sa["b"])(!e.createOnAllSeries,d),l?r.eachRawSeriesByType(l,h):c?c(r,a).each(h):(u=!1,Object(Sa["k"])(r.getSeries(),h)),p&&i.dirty()},e.prototype._pipe=function(e,t){var r=e.uid,a=this._pipelineMap.get(r);!a.head&&(a.head=t),a.tail&&a.tail.pipe(t),a.tail=t,t.__idxInPipeline=a.count++,t.__pipeline=a},e.wrapStageHandler=function(e,t){return Object(Sa["w"])(e)&&(e={overallReset:e,seriesType:Fx(e)}),e.uid=Hh("stageHandler"),t&&(e.visualType=t),e},e}();function Mx(e){e.overallReset(e.ecModel,e.api,e.payload)}function Ax(e){return e.overallProgress&&kx}function kx(){this.agent.dirty(),this.getDownstream().dirty()}function Px(){this.agent&&this.agent.dirty()}function Nx(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Ex(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Ol(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?Object(Sa["H"])(t,(function(e,t){return Lx(t)})):Rx}var Rx=Lx(0);function Lx(e){return function(t,r){var a=r.data,n=r.resetDefines[e];if(n&&n.dataEach)for(var i=t.start;i<t.end;i++)n.dataEach(a,i);else n&&n.progress&&n.progress(t,a)}}function jx(e){return e.data.count()}function Fx(e){Vx=null;try{e(zx,Bx)}catch(t){}return Vx}var Vx,zx={},Bx={};function $x(e,t){for(var r in t.prototype)e[r]=Sa["L"]}$x(zx,ig),$x(Bx,lg),zx.eachSeriesByType=zx.eachRawSeriesByType=function(e){Vx=e},zx.eachComponent=function(e){"series"===e.mainType&&e.subType&&(Vx=e.subType)};var Gx=Ox,Ux=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Wx={color:Ux,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Ux]},Hx="#B9B8CE",qx="#100C2A",Yx=function(){return{axisLine:{lineStyle:{color:Hx}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},Xx=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],Zx={darkMode:!0,color:Xx,backgroundColor:qx,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Hx}},textStyle:{color:Hx},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Hx}},dataZoom:{borderColor:"#71708A",textStyle:{color:Hx},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:Hx}},timeline:{lineStyle:{color:Hx},label:{color:Hx},controlStyle:{color:Hx,borderColor:Hx}},calendar:{itemStyle:{color:qx},dayLabel:{color:Hx},monthLabel:{color:Hx},yearLabel:{color:Hx}},timeAxis:Yx(),logAxis:Yx(),valueAxis:Yx(),categoryAxis:Yx(),line:{symbol:"circle"},graph:{color:Xx},gauge:{title:{color:Hx},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Hx},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};Zx.categoryAxis.splitLine.show=!1;var Kx=Zx,Jx=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},r={},a={};if(Sa["C"](e)){var n=pc(e);t.mainType=n.main||null,t.subType=n.sub||null}else{var i=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};Sa["k"](e,(function(e,n){for(var s=!1,l=0;l<i.length;l++){var c=i[l],u=n.lastIndexOf(c);if(u>0&&u===n.length-c.length){var p=n.slice(0,u);"data"!==p&&(t.mainType=p,t[c.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(n)&&(r[n]=e,s=!0),s||(a[n]=e)}))}return{cptQuery:t,dataQuery:r,otherQuery:a}},e.prototype.filter=function(e,t){var r=this.eventInfo;if(!r)return!0;var a=r.targetEl,n=r.packedEvent,i=r.model,o=r.view;if(!i||!o)return!0;var s=t.cptQuery,l=t.dataQuery;return c(s,i,"mainType")&&c(s,i,"subType")&&c(s,i,"index","componentIndex")&&c(s,i,"name")&&c(s,i,"id")&&c(l,n,"name")&&c(l,n,"dataIndex")&&c(l,n,"dataType")&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,a,n));function c(e,t,r,a){return null==e[r]||t[a||r]===e[r]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),Qx=["symbol","symbolSize","symbolRotate","symbolOffset"],ew=Qx.concat(["symbolKeepAspect"]),tw={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData();if(e.legendIcon&&r.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var a={},n={},i=!1,o=0;o<Qx.length;o++){var s=Qx[o],l=e.get(s);Object(Sa["w"])(l)?(i=!0,n[s]=l):a[s]=l}if(a.symbol=a.symbol||e.defaultSymbol,r.setVisual(Object(Sa["m"])({legendIcon:e.legendIcon||a.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},a)),!t.isSeriesFiltered(e)){var c=Object(Sa["F"])(n);return{dataEach:i?u:null}}}function u(t,r){for(var a=e.getRawValue(r),i=e.getDataParams(r),o=0;o<c.length;o++){var s=c[o];t.setItemVisual(r,s,n[s](a,i))}}}},rw={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(e.hasSymbolVisual&&!t.isSeriesFiltered(e)){var r=e.getData();return{dataEach:r.hasItemOption?a:null}}function a(e,t){for(var r=e.getItemModel(t),a=0;a<ew.length;a++){var n=ew[a],i=r.getShallow(n,!0);null!=i&&e.setItemVisual(t,n,i)}}}};function aw(e,t,r){switch(r){case"color":var a=e.getItemVisual(t,"style");return a[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,r);default:0}}function nw(e,t){switch(t){case"color":var r=e.getVisual("style");return r[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t);default:0}}function iw(e,t,r,a){switch(r){case"color":var n=e.ensureUniqueItemVisual(t,"style");n[e.getVisual("drawType")]=a,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=a;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,r,a);break;default:0}}function ow(e,t){function r(t,r){var a=[];return t.eachComponent({mainType:"series",subType:e,query:r},(function(e){a.push(e.seriesIndex)})),a}Object(Sa["k"])([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],(function(e){t(e[0],(function(t,a,n){t=Object(Sa["m"])({},t),n.dispatchAction(Object(Sa["m"])(t,{type:e[1],seriesIndex:r(a,t)}))}))}))}function sw(e,t,r,a,n){var i=e+t;r.isSilent(i)||a.eachComponent({mainType:"series",subType:"pie"},(function(e){for(var t=e.seriesIndex,a=e.option.selectedMap,o=n.selected,s=0;s<o.length;s++)if(o[s].seriesIndex===t){var l=e.getData(),c=Xl(l,n.fromActionPayload);r.trigger(i,{type:i,seriesId:e.id,name:Object(Sa["t"])(c)?l.getName(c[0]):l.getName(c),selected:Object(Sa["C"])(a)?a:Object(Sa["m"])({},a)})}}))}function lw(e,t,r){e.on("selectchanged",(function(e){var a=r.getModel();e.isFromClick?(sw("map","selectchanged",t,a,e),sw("pie","selectchanged",t,a,e)):"select"===e.fromAction?(sw("map","selected",t,a,e),sw("pie","selected",t,a,e)):"unselect"===e.fromAction&&(sw("map","unselected",t,a,e),sw("pie","unselected",t,a,e))}))}function cw(e,t,r){var a;while(e){if(t(e)&&(a=e,r))break;e=e.__hostTarget||e.parent}return a}var uw=Math.round(9*Math.random()),pw="function"===typeof Object.defineProperty,dw=function(){function e(){this._id="__ec_inner_"+uw++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var r=this._guard(e);return pw?Object.defineProperty(r,this._id,{value:t,enumerable:!1,configurable:!0}):r[this._id]=t,this},e.prototype["delete"]=function(e){return!!this.has(e)&&(delete this._guard(e)[this._id],!0)},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},e}(),hw=dw,fw=lp.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var r=t.cx,a=t.cy,n=t.width/2,i=t.height/2;e.moveTo(r,a-i),e.lineTo(r+n,a+i),e.lineTo(r-n,a+i),e.closePath()}}),mw=lp.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var r=t.cx,a=t.cy,n=t.width/2,i=t.height/2;e.moveTo(r,a-i),e.lineTo(r+n,a),e.lineTo(r,a+i),e.lineTo(r-n,a),e.closePath()}}),gw=lp.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var r=t.x,a=t.y,n=t.width/5*3,i=Math.max(n,t.height),o=n/2,s=o*o/(i-o),l=a-i+o+s,c=Math.asin(s/o),u=Math.cos(c)*o,p=Math.sin(c),d=Math.cos(c),h=.6*o,f=.7*o;e.moveTo(r-u,l+s),e.arc(r,l,o,Math.PI-c,2*Math.PI+c),e.bezierCurveTo(r+u-p*h,l+s+d*h,r,a-f,r,a),e.bezierCurveTo(r,a-f,r-u+p*h,l+s+d*h,r-u,l+s),e.closePath()}}),vw=lp.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var r=t.height,a=t.width,n=t.x,i=t.y,o=a/3*2;e.moveTo(n,i),e.lineTo(n+o,i+r),e.lineTo(n,i+r/4*3),e.lineTo(n-o,i+r),e.lineTo(n,i),e.closePath()}}),yw={line:Jb,rect:Cp,roundRect:Cp,square:Cp,circle:gb,diamond:mw,pin:gw,arrow:vw,triangle:fw},bw={line:function(e,t,r,a,n){n.x1=e,n.y1=t+a/2,n.x2=e+r,n.y2=t+a/2},rect:function(e,t,r,a,n){n.x=e,n.y=t,n.width=r,n.height=a},roundRect:function(e,t,r,a,n){n.x=e,n.y=t,n.width=r,n.height=a,n.r=Math.min(r,a)/4},square:function(e,t,r,a,n){var i=Math.min(r,a);n.x=e,n.y=t,n.width=i,n.height=i},circle:function(e,t,r,a,n){n.cx=e+r/2,n.cy=t+a/2,n.r=Math.min(r,a)/2},diamond:function(e,t,r,a,n){n.cx=e+r/2,n.cy=t+a/2,n.width=r,n.height=a},pin:function(e,t,r,a,n){n.x=e+r/2,n.y=t+a/2,n.width=r,n.height=a},arrow:function(e,t,r,a,n){n.x=e+r/2,n.y=t+a/2,n.width=r,n.height=a},triangle:function(e,t,r,a,n){n.cx=e+r/2,n.cy=t+a/2,n.width=r,n.height=a}},_w={};Object(Sa["k"])(yw,(function(e,t){_w[t]=new e}));var xw=lp.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,r){var a=Cs(e,t,r),n=this.shape;return n&&"pin"===n.symbolType&&"inside"===t.position&&(a.y=r.y+.4*r.height),a},buildPath:function(e,t,r){var a=t.symbolType;if("none"!==a){var n=_w[a];n||(a="rect",n=_w[a]),bw[a](t.x,t.y,t.width,t.height,n.shape),n.buildPath(e,n.shape,r)}}});function ww(e,t){if("image"!==this.type){var r=this.style;this.__isEmptyBrush?(r.stroke=e,r.fill=t||"#fff",r.lineWidth=2):"line"===this.shape.symbolType?r.stroke=e:r.fill=e,this.markRedraw()}}function Sw(e,t,r,a,n,i,o){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),s=0===e.indexOf("image://")?N_(e.slice(8),new Hn(t,r,a,n),o?"center":"cover"):0===e.indexOf("path://")?P_(e.slice(7),{},new Hn(t,r,a,n),o?"center":"cover"):new xw({shape:{symbolType:e,x:t,y:r,width:a,height:n}}),s.__isEmptyBrush=l,s.setColor=ww,i&&s.setColor(i),s}function Dw(e){return Object(Sa["t"])(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Cw(e,t){if(null!=e)return Object(Sa["t"])(e)||(e=[e,e]),[rl(e[0],t[0])||0,rl(Object(Sa["P"])(e[1],e[0]),t[1])||0]}function Tw(e){return isFinite(e)}function Iw(e,t,r){var a=null==t.x?0:t.x,n=null==t.x2?1:t.x2,i=null==t.y?0:t.y,o=null==t.y2?0:t.y2;t.global||(a=a*r.width+r.x,n=n*r.width+r.x,i=i*r.height+r.y,o=o*r.height+r.y),a=Tw(a)?a:0,n=Tw(n)?n:1,i=Tw(i)?i:0,o=Tw(o)?o:0;var s=e.createLinearGradient(a,i,n,o);return s}function Ow(e,t,r){var a=r.width,n=r.height,i=Math.min(a,n),o=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;t.global||(o=o*a+r.x,s=s*n+r.y,l*=i),o=Tw(o)?o:.5,s=Tw(s)?s:.5,l=l>=0&&Tw(l)?l:.5;var c=e.createRadialGradient(o,s,0,o,s,l);return c}function Mw(e,t,r){for(var a="radial"===t.type?Ow(e,t,r):Iw(e,t,r),n=t.colorStops,i=0;i<n.length;i++)a.addColorStop(n[i].offset,n[i].color);return a}function Aw(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!0;return!1}function kw(e){return parseInt(e,10)}function Pw(e,t,r){var a=["width","height"][t],n=["clientWidth","clientHeight"][t],i=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=r[a]&&"auto"!==r[a])return parseFloat(r[a]);var s=document.defaultView.getComputedStyle(e);return(e[n]||kw(s[a])||kw(e.style[a]))-(kw(s[i])||0)-(kw(s[o])||0)|0}function Nw(e,t){return e&&"solid"!==e&&t>0?"dashed"===e?[4*t,2*t]:"dotted"===e?[t]:Object(Sa["z"])(e)?[e]:Object(Sa["t"])(e)?e:null:null}function Ew(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&Nw(t.lineDash,t.lineWidth),a=t.lineDashOffset;if(r){var n=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;n&&1!==n&&(r=Object(Sa["H"])(r,(function(e){return e/n})),a/=n)}return[r,a]}var Rw=new Lu(!0);function Lw(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function jw(e){return"string"===typeof e&&"none"!==e}function Fw(e){var t=e.fill;return null!=t&&"none"!==t}function Vw(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var r=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=r}else e.fill()}function zw(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var r=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=r}else e.stroke()}function Bw(e,t,r){var a=Oc(t.image,t.__image,r);if(Ac(a)){var n=e.createPattern(a,t.repeat||"repeat");if("function"===typeof DOMMatrix&&n&&n.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*Sa["a"]),i.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(i)}return n}}function $w(e,t,r,a){var n,i=Lw(r),o=Fw(r),s=r.strokePercent,l=s<1,c=!t.path;t.silent&&!l||!c||t.createPathProxy();var u=t.path||Rw,p=t.__dirty;if(!a){var d=r.fill,h=r.stroke,f=o&&!!d.colorStops,m=i&&!!h.colorStops,g=o&&!!d.image,v=i&&!!h.image,y=void 0,b=void 0,_=void 0,x=void 0,w=void 0;(f||m)&&(w=t.getBoundingRect()),f&&(y=p?Mw(e,d,w):t.__canvasFillGradient,t.__canvasFillGradient=y),m&&(b=p?Mw(e,h,w):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),g&&(_=p||!t.__canvasFillPattern?Bw(e,d,t):t.__canvasFillPattern,t.__canvasFillPattern=_),v&&(x=p||!t.__canvasStrokePattern?Bw(e,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=_),f?e.fillStyle=y:g&&(_?e.fillStyle=_:o=!1),m?e.strokeStyle=b:v&&(x?e.strokeStyle=x:i=!1)}var S,D,C=t.getGlobalScale();u.setScale(C[0],C[1],t.segmentIgnoreThreshold),e.setLineDash&&r.lineDash&&(n=Ew(t),S=n[0],D=n[1]);var T=!0;(c||p&vi)&&(u.setDPR(e.dpr),l?u.setContext(null):(u.setContext(e),T=!1),u.reset(),t.buildPath(u,t.shape,a),u.toStatic(),t.pathUpdated()),T&&u.rebuildPath(e,l?s:1),S&&(e.setLineDash(S),e.lineDashOffset=D),a||(r.strokeFirst?(i&&zw(e,r),o&&Vw(e,r)):(o&&Vw(e,r),i&&zw(e,r))),S&&e.setLineDash([])}function Gw(e,t,r){var a=t.__image=Oc(r.image,t.__image,t,t.onload);if(a&&Ac(a)){var n=r.x||0,i=r.y||0,o=t.getWidth(),s=t.getHeight(),l=a.width/a.height;if(null==o&&null!=s?o=s*l:null==s&&null!=o?s=o/l:null==o&&null==s&&(o=a.width,s=a.height),r.sWidth&&r.sHeight){var c=r.sx||0,u=r.sy||0;e.drawImage(a,c,u,r.sWidth,r.sHeight,n,i,o,s)}else if(r.sx&&r.sy){c=r.sx,u=r.sy;var p=o-c,d=s-u;e.drawImage(a,c,u,p,d,n,i,o,s)}else e.drawImage(a,n,i,o,s)}}function Uw(e,t,r){var a,n=r.text;if(null!=n&&(n+=""),n){e.font=r.font||gs["a"],e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var i=void 0,o=void 0;e.setLineDash&&r.lineDash&&(a=Ew(t),i=a[0],o=a[1]),i&&(e.setLineDash(i),e.lineDashOffset=o),r.strokeFirst?(Lw(r)&&e.strokeText(n,r.x,r.y),Fw(r)&&e.fillText(n,r.x,r.y)):(Fw(r)&&e.fillText(n,r.x,r.y),Lw(r)&&e.strokeText(n,r.x,r.y)),i&&e.setLineDash([])}}var Ww=["shadowBlur","shadowOffsetX","shadowOffsetY"],Hw=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function qw(e,t,r,a,n){var i=!1;if(!a&&(r=r||{},t===r))return!1;if(a||t.opacity!==r.opacity){nS(e,n),i=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?qc.opacity:o}(a||t.blend!==r.blend)&&(i||(nS(e,n),i=!0),e.globalCompositeOperation=t.blend||qc.blend);for(var s=0;s<Ww.length;s++){var l=Ww[s];(a||t[l]!==r[l])&&(i||(nS(e,n),i=!0),e[l]=e.dpr*(t[l]||0))}return(a||t.shadowColor!==r.shadowColor)&&(i||(nS(e,n),i=!0),e.shadowColor=t.shadowColor||qc.shadowColor),i}function Yw(e,t,r,a,n){var i=iS(t,n.inHover),o=a?null:r&&iS(r,n.inHover)||{};if(i===o)return!1;var s=qw(e,i,o,a,n);if((a||i.fill!==o.fill)&&(s||(nS(e,n),s=!0),jw(i.fill)&&(e.fillStyle=i.fill)),(a||i.stroke!==o.stroke)&&(s||(nS(e,n),s=!0),jw(i.stroke)&&(e.strokeStyle=i.stroke)),(a||i.opacity!==o.opacity)&&(s||(nS(e,n),s=!0),e.globalAlpha=null==i.opacity?1:i.opacity),t.hasStroke()){var l=i.lineWidth,c=l/(i.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==c&&(s||(nS(e,n),s=!0),e.lineWidth=c)}for(var u=0;u<Hw.length;u++){var p=Hw[u],d=p[0];(a||i[d]!==o[d])&&(s||(nS(e,n),s=!0),e[d]=i[d]||p[1])}return s}function Xw(e,t,r,a,n){return qw(e,iS(t,n.inHover),r&&iS(r,n.inHover),a,n)}function Zw(e,t){var r=t.transform,a=e.dpr||1;r?e.setTransform(a*r[0],a*r[1],a*r[2],a*r[3],a*r[4],a*r[5]):e.setTransform(a,0,0,a,0,0)}function Kw(e,t,r){for(var a=!1,n=0;n<e.length;n++){var i=e[n];a=a||i.isZeroArea(),Zw(t,i),t.beginPath(),i.buildPath(t,i.shape),t.clip()}r.allClipped=a}function Jw(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var Qw=1,eS=2,tS=3,rS=4;function aS(e){var t=Fw(e),r=Lw(e);return!(e.lineDash||!(+t^+r)||t&&"string"!==typeof e.fill||r&&"string"!==typeof e.stroke||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function nS(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function iS(e,t){return t&&e.__hoverStyle||e.style}function oS(e,t){sS(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function sS(e,t,r,a){var n=t.transform;if(!t.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1))return t.__dirty&=~mi,void(t.__isRendered=!1);var i=t.__clipPaths,o=r.prevElClipPaths,s=!1,l=!1;if(o&&!Aw(i,o)||(o&&o.length&&(nS(e,r),e.restore(),l=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),i&&i.length&&(nS(e,r),e.save(),Kw(i,e,r),s=!0),r.prevElClipPaths=i),r.allClipped)t.__isRendered=!1;else{t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var c=r.prevEl;c||(l=s=!0);var u=t instanceof lp&&t.autoBatch&&aS(t.style);s||Jw(n,c.transform)?(nS(e,r),Zw(e,t)):u||nS(e,r);var p=iS(t,r.inHover);t instanceof lp?(r.lastDrawType!==Qw&&(l=!0,r.lastDrawType=Qw),Yw(e,t,c,l,r),u&&(r.batchFill||r.batchStroke)||e.beginPath(),$w(e,t,p,u),u&&(r.batchFill=p.fill||"",r.batchStroke=p.stroke||"")):t instanceof pp?(r.lastDrawType!==tS&&(l=!0,r.lastDrawType=tS),Yw(e,t,c,l,r),Uw(e,t,p)):t instanceof gp?(r.lastDrawType!==eS&&(l=!0,r.lastDrawType=eS),Xw(e,t,c,l,r),Gw(e,t,p)):t.getTemporalDisplayables&&(r.lastDrawType!==rS&&(l=!0,r.lastDrawType=rS),lS(e,t,r)),u&&a&&nS(e,r),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),r.prevEl=t,t.__dirty=0,t.__isRendered=!0}}function lS(e,t,r){var a=t.getDisplayables(),n=t.getTemporalDisplayables();e.save();var i,o,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover};for(i=t.getCursor(),o=a.length;i<o;i++){var l=a[i];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),sS(e,l,s,i===o-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),s.prevEl=l}for(var c=0,u=n.length;c<u;c++){l=n[c];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),sS(e,l,s,c===u-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),s.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var cS=new hw,uS=new ms["a"](100),pS=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function dS(e,t){if("none"===e)return null;var r=t.getDevicePixelRatio(),a=t.getZr(),n="svg"===a.painter.type;e.dirty&&cS["delete"](e);var i=cS.get(e);if(i)return i;var o=Object(Sa["i"])(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===o.backgroundColor&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=n?1:1/r,cS.set(e,s),e.dirty=!1,s;function l(e){for(var t,i=[r],s=!0,l=0;l<pS.length;++l){var c=o[pS[l]];if(null!=c&&!Object(Sa["t"])(c)&&!Object(Sa["C"])(c)&&!Object(Sa["z"])(c)&&"boolean"!==typeof c){s=!1;break}i.push(c)}if(s){t=i.join(",")+(n?"-svg":"");var u=uS.get(t);u&&(n?e.svgElement=u:e.image=u)}var p,d=fS(o.dashArrayX),h=mS(o.dashArrayY),f=hS(o.symbol),m=gS(d),g=vS(h),v=!n&&gs["d"].createCanvas(),y=n&&{tag:"g",attrs:{},key:"dcl",children:[]},b=_();function _(){for(var e=1,t=0,r=m.length;t<r;++t)e=Dl(e,m[t]);var a=1;for(t=0,r=f.length;t<r;++t)a=Dl(a,f[t].length);e*=a;var n=g*m.length*f.length;return{width:Math.max(1,Math.min(e,o.maxTileWidth)),height:Math.max(1,Math.min(n,o.maxTileHeight))}}function x(){p&&(p.clearRect(0,0,v.width,v.height),o.backgroundColor&&(p.fillStyle=o.backgroundColor,p.fillRect(0,0,v.width,v.height)));for(var e=0,t=0;t<h.length;++t)e+=h[t];if(!(e<=0)){var i=-g,s=0,l=0,c=0;while(i<b.height){if(s%2===0){var u=l/2%f.length,m=0,_=0,x=0;while(m<2*b.width){var w=0;for(t=0;t<d[c].length;++t)w+=d[c][t];if(w<=0)break;if(_%2===0){var S=.5*(1-o.symbolSize),D=m+d[c][_]*S,C=i+h[s]*S,T=d[c][_]*o.symbolSize,I=h[s]*o.symbolSize,O=x/2%f[u].length;M(D,C,T,I,f[u][O])}m+=d[c][_],++x,++_,_===d[c].length&&(_=0)}++c,c===d.length&&(c=0)}i+=h[s],++l,++s,s===h.length&&(s=0)}}function M(e,t,i,s,l){var c=n?1:r,u=Sw(l,e*c,t*c,i*c,s*c,o.color,o.symbolKeepAspect);if(n){var d=a.painter.renderOneToVNode(u);d&&y.children.push(d)}else oS(p,u)}}v&&(v.width=b.width*r,v.height=b.height*r,p=v.getContext("2d")),x(),s&&uS.put(t,v||y),e.image=v,e.svgElement=y,e.svgWidth=b.width,e.svgHeight=b.height}}function hS(e){if(!e||0===e.length)return[["rect"]];if(Object(Sa["C"])(e))return[[e]];for(var t=!0,r=0;r<e.length;++r)if(!Object(Sa["C"])(e[r])){t=!1;break}if(t)return hS([e]);var a=[];for(r=0;r<e.length;++r)Object(Sa["C"])(e[r])?a.push([e[r]]):a.push(e[r]);return a}function fS(e){if(!e||0===e.length)return[[0,0]];if(Object(Sa["z"])(e)){var t=Math.ceil(e);return[[t,t]]}for(var r=!0,a=0;a<e.length;++a)if(!Object(Sa["z"])(e[a])){r=!1;break}if(r)return fS([e]);var n=[];for(a=0;a<e.length;++a)if(Object(Sa["z"])(e[a])){t=Math.ceil(e[a]);n.push([t,t])}else{t=Object(Sa["H"])(e[a],(function(e){return Math.ceil(e)}));t.length%2===1?n.push(t.concat(t)):n.push(t)}return n}function mS(e){if(!e||"object"===typeof e&&0===e.length)return[0,0];if(Object(Sa["z"])(e)){var t=Math.ceil(e);return[t,t]}var r=Object(Sa["H"])(e,(function(e){return Math.ceil(e)}));return e.length%2?r.concat(r):r}function gS(e){return Object(Sa["H"])(e,(function(e){return vS(e)}))}function vS(e){for(var t=0,r=0;r<e.length;++r)t+=e[r];return e.length%2===1?2*t:t}function yS(e,t){e.eachRawSeries((function(r){if(!e.isSeriesFiltered(r)){var a=r.getData();a.hasItemVisual()&&a.each((function(e){var r=a.getItemVisual(e,"decal");if(r){var n=a.ensureUniqueItemVisual(e,"style");n.decal=dS(r,t)}}));var n=a.getVisual("decal");if(n){var i=a.getVisual("style");i.decal=dS(n,t)}}}))}var bS=new Xa,_S=bS,xS={};function wS(e,t){xS[e]=t}function SS(e){return xS[e]}var DS=1,CS=800,TS=900,IS=1e3,OS=2e3,MS=5e3,AS=1e3,kS=1100,PS=2e3,NS=3e3,ES=4e3,RS=4500,LS=4600,jS=5e3,FS=6e3,VS=7e3,zS={PROCESSOR:{FILTER:IS,SERIES_FILTER:CS,STATISTIC:MS},VISUAL:{LAYOUT:AS,PROGRESSIVE_LAYOUT:kS,GLOBAL:PS,CHART:NS,POST_CHART_LAYOUT:LS,COMPONENT:ES,BRUSH:jS,CHART_ITEM:RS,ARIA:FS,DECAL:VS}},BS="__flagInMainProcess",$S="__pendingUpdate",GS="__needsUpdateStatus",US=/^[a-zA-Z0-9_]+$/,WS="__connectUpdateStatus",HS=0,qS=1,YS=2;function XS(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(!this.isDisposed())return KS(this,e,t);xD(this.id)}}function ZS(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return KS(this,e,t)}}function KS(e,t,r){return r[0]=r[0]&&r[0].toLowerCase(),Xa.prototype[t].apply(e,r)}var JS,QS,eD,tD,rD,aD,nD,iD,oD,sD,lD,cD,uD,pD,dD,hD,fD,mD,gD=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t}(Xa),vD=gD.prototype;vD.on=ZS("on"),vD.off=ZS("off");var yD=function(e){function t(t,r,a){var n=e.call(this,new Jx)||this;n._chartsViews=[],n._chartsMap={},n._componentsViews=[],n._componentsMap={},n._pendingActions=[],a=a||{},Object(Sa["C"])(r)&&(r=ID[r]),n._dom=t;var i="canvas",o="auto",s=!1;a.ssr&&Ks((function(e){var t=Up(e),r=t.dataIndex;if(null!=r){var a=Object(Sa["f"])();return a.set("series_index",t.seriesIndex),a.set("data_index",r),t.ssrType&&a.set("ssr_type",t.ssrType),a}}));var l=n._zr=Ys(t,{renderer:a.renderer||i,devicePixelRatio:a.devicePixelRatio,width:a.width,height:a.height,ssr:a.ssr,useDirtyRect:Object(Sa["P"])(a.useDirtyRect,s),useCoarsePointer:Object(Sa["P"])(a.useCoarsePointer,o),pointerSize:a.pointerSize});n._ssr=a.ssr,n._throttledZrFlush=fx(Object(Sa["c"])(l.flush,l),17),r=Object(Sa["d"])(r),r&&$g(r,!0),n._theme=r,n._locale=of(a.locale||af),n._coordSysMgr=new pg;var c=n._api=dD(n);function u(e,t){return e.__prio-t.__prio}return fi(TD,u),fi(DD,u),n._scheduler=new Gx(n,c,DD,TD),n._messageCenter=new gD,n._initEvents(),n.resize=Object(Sa["c"])(n.resize,n),l.animation.on("frame",n._onframe,n),sD(l,n),lD(l,n),Object(Sa["R"])(n),n}return xa(t,e),t.prototype._onframe=function(){if(!this._disposed){mD(this);var e=this._scheduler;if(this[$S]){var t=this[$S].silent;this[BS]=!0;try{JS(this),tD.update.call(this,null,this[$S].updateParams)}catch(o){throw this[BS]=!1,this[$S]=null,o}this._zr.flush(),this[BS]=!1,this[$S]=null,iD.call(this,t),oD.call(this,t)}else if(e.unfinished){var r=DS,a=this._model,n=this._api;e.unfinished=!1;do{var i=+new Date;e.performSeriesTasks(a),e.performDataProcessorTasks(a),aD(this,a),e.performVisualTasks(a),pD(this,this._model,n,"remain",{}),r-=+new Date-i}while(r>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,r){if(!this[BS])if(this._disposed)xD(this.id);else{var a,n,i;if(Object(Sa["A"])(t)&&(r=t.lazyUpdate,a=t.silent,n=t.replaceMerge,i=t.transition,t=t.notMerge),this[BS]=!0,!this._model||t){var o=new yg(this._api),s=this._theme,l=this._model=new ig;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:n},CD);var c={seriesTransition:i,optionChanged:!0};if(r)this[$S]={silent:a,updateParams:c},this[BS]=!1,this.getZr().wakeUp();else{try{JS(this),tD.update.call(this,null,c)}catch(u){throw this[$S]=null,this[BS]=!1,u}this._ssr||this._zr.flush(),this[$S]=null,this[BS]=!1,iD.call(this,a),oD.call(this,a)}}},t.prototype.setTheme=function(){Xm("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||wa["a"].hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var t=this._zr.painter;return t.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var t=this._zr.painter;return t.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(wa["a"].svgSupported){var e=this._zr,t=e.storage.getDisplayList();return Object(Sa["k"])(t,(function(e){e.stopAnimation(null,!0)})),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){e=e||{};var t=e.excludeComponents,r=this._model,a=[],n=this;Object(Sa["k"])(t,(function(e){r.eachComponent({mainType:e},(function(e){var t=n._componentsMap[e.__viewId];t.group.ignore||(a.push(t),t.group.ignore=!0)}))}));var i="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return Object(Sa["k"])(a,(function(e){e.group.ignore=!1})),i}xD(this.id)},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,r=this.group,a=Math.min,n=Math.max,i=1/0;if(AD[r]){var o=i,s=i,l=-i,c=-i,u=[],p=e&&e.pixelRatio||this.getDevicePixelRatio();Object(Sa["k"])(MD,(function(i,p){if(i.group===r){var d=t?i.getZr().painter.getSvgDom().innerHTML:i.renderToCanvas(Object(Sa["d"])(e)),h=i.getDom().getBoundingClientRect();o=a(h.left,o),s=a(h.top,s),l=n(h.right,l),c=n(h.bottom,c),u.push({dom:d,left:h.left,top:h.top})}})),o*=p,s*=p,l*=p,c*=p;var d=l-o,h=c-s,f=gs["d"].createCanvas(),m=Ys(f,{renderer:t?"svg":"canvas"});if(m.resize({width:d,height:h}),t){var g="";return Object(Sa["k"])(u,(function(e){var t=e.left-o,r=e.top-s;g+='<g transform="translate('+t+","+r+')">'+e.dom+"</g>"})),m.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&m.painter.setBackgroundColor(e.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}return e.connectedBackgroundColor&&m.add(new Cp({shape:{x:0,y:0,width:d,height:h},style:{fill:e.connectedBackgroundColor}})),Object(Sa["k"])(u,(function(e){var t=new gp({style:{x:e.left*p-o,y:e.top*p-s,image:e.dom}});m.add(t)})),m.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}xD(this.id)},t.prototype.convertToPixel=function(e,t){return rD(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return rD(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){if(!this._disposed){var r,a=this._model,n=Jl(a,e);return Object(Sa["k"])(n,(function(e,a){a.indexOf("Models")>=0&&Object(Sa["k"])(e,(function(e){var n=e.coordinateSystem;if(n&&n.containPoint)r=r||!!n.containPoint(t);else if("seriesModels"===a){var i=this._chartsMap[e.__viewId];i&&i.containPoint&&(r=r||i.containPoint(t,e))}else 0}),this)}),this),!!r}xD(this.id)},t.prototype.getVisual=function(e,t){var r=this._model,a=Jl(r,e,{defaultMainType:"series"}),n=a.seriesModel;var i=n.getData(),o=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?i.indexOfRawIndex(a.dataIndex):null;return null!=o?aw(i,o,t):nw(i,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;Object(Sa["k"])(_D,(function(t){var r=function(r){var a,n=e.getModel(),i=r.target,o="globalout"===t;if(o?a={}:i&&cw(i,(function(e){var t=Up(e);if(t&&null!=t.dataIndex){var r=t.dataModel||n.getSeriesByIndex(t.seriesIndex);return a=r&&r.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=Object(Sa["m"])({},t.eventData),!0}),!0),a){var s=a.componentType,l=a.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=a.seriesIndex);var c=s&&null!=l&&n.getComponent(s,l),u=c&&e["series"===c.mainType?"_chartsMap":"_componentsMap"][c.__viewId];0,a.event=r,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:u},e.trigger(t,a)}};r.zrEventfulCallAtLast=!0,e._zr.on(t,r,e)})),Object(Sa["k"])(SD,(function(t,r){e._messageCenter.on(r,(function(e){this.trigger(r,e)}),e)})),Object(Sa["k"])(["selectchanged"],(function(t){e._messageCenter.on(t,(function(e){this.trigger(t,e)}),e)})),lw(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?xD(this.id):this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)xD(this.id);else{this._disposed=!0;var e=this.getDom();e&&ac(this.getDom(),PD,"");var t=this,r=t._api,a=t._model;Object(Sa["k"])(t._componentsViews,(function(e){e.dispose(a,r)})),Object(Sa["k"])(t._chartsViews,(function(e){e.dispose(a,r)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete MD[t.id]}},t.prototype.resize=function(e){if(!this[BS])if(this._disposed)xD(this.id);else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var r=t.resetOption("media"),a=e&&e.silent;this[$S]&&(null==a&&(a=this[$S].silent),r=!0,this[$S]=null),this[BS]=!0;try{r&&JS(this),tD.update.call(this,{type:"resize",animation:Object(Sa["m"])({duration:0},e&&e.animation)})}catch(n){throw this[BS]=!1,n}this[BS]=!1,iD.call(this,a),oD.call(this,a)}}},t.prototype.showLoading=function(e,t){if(this._disposed)xD(this.id);else if(Object(Sa["A"])(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),OD[e]){var r=OD[e](this._api,t),a=this._zr;this._loadingFX=r,a.add(r)}},t.prototype.hideLoading=function(){this._disposed?xD(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=Object(Sa["m"])({},e);return t.type=SD[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)xD(this.id);else if(Object(Sa["A"])(t)||(t={silent:!!t}),wD[e.type]&&this._model)if(this[BS])this._pendingActions.push(e);else{var r=t.silent;nD.call(this,e,r);var a=t.flush;a?this._zr.flush():!1!==a&&wa["a"].browser.weChat&&this._throttledZrFlush(),iD.call(this,r),oD.call(this,r)}},t.prototype.updateLabelLayout=function(){_S.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)xD(this.id);else{var t=e.seriesIndex,r=this.getModel(),a=r.getSeriesByIndex(t);0,a.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function t(e){var t=[],r=[],a=!1;if(e.eachComponent((function(e,n){var i=n.get("zlevel")||0,o=n.get("z")||0,s=n.getZLevelKey();a=a||!!s,("series"===e?r:t).push({zlevel:i,z:o,idx:n.componentIndex,type:e,key:s})})),a){var n,i,o=t.concat(r);fi(o,(function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel})),Object(Sa["k"])(o,(function(t){var r=e.getComponent(t.type,t.idx),a=t.zlevel,o=t.key;null!=n&&(a=Math.max(n,a)),o?(a===n&&o!==i&&a++,i=o):i&&(a===n&&a++,i=""),n=a,r.setZLevel(a)}))}}function r(e){for(var t=[],r=e.currentStates,a=0;a<r.length;a++){var n=r[a];"emphasis"!==n&&"blur"!==n&&"select"!==n&&t.push(n)}e.selected&&e.states.select&&t.push("select"),e.hoverState===Jp&&e.states.emphasis?t.push("emphasis"):e.hoverState===Kp&&e.states.blur&&t.push("blur"),e.useStates(t)}function a(e,t){var r=e._zr,a=r.storage,n=0;a.traverse((function(e){e.isGroup||n++})),n>t.get("hoverLayerThreshold")&&!wa["a"].node&&!wa["a"].worker&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var r=e._chartsMap[t.__viewId];r.__alive&&r.eachRendered((function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)}))}}))}function n(e,t){var r=e.get("blendMode")||null;t.eachRendered((function(e){e.isGroup||(e.style.blend=r)}))}function i(e,t){if(!e.preventAutoZ){var r=e.get("z")||0,a=e.get("zlevel")||0;t.eachRendered((function(e){return o(e,r,a,-1/0),!0}))}}function o(e,t,r,a){var n=e.getTextContent(),i=e.getTextGuideLine(),s=e.isGroup;if(s)for(var l=e.childrenRef(),c=0;c<l.length;c++)a=Math.max(o(l[c],t,r,a),a);else e.z=t,e.zlevel=r,a=Math.max(e.z2,a);if(n&&(n.z=t,n.zlevel=r,isFinite(a)&&(n.z2=a+2)),i){var u=e.textGuideLineConfig;i.z=t,i.zlevel=r,isFinite(a)&&(i.z2=a+(u&&u.showAbove?1:-1))}return a}function s(e,t){t.eachRendered((function(e){if(!ch(e)){var t=e.getTextContent(),r=e.getTextGuideLine();e.stateTransition&&(e.stateTransition=null),t&&t.stateTransition&&(t.stateTransition=null),r&&r.stateTransition&&(r.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&(e.prevStates=null)}}))}function l(e,t){var a=e.getModel("stateAnimation"),n=e.isAnimationEnabled(),i=a.get("duration"),o=i>0?{duration:i,delay:a.get("delay"),easing:a.get("easing")}:null;t.eachRendered((function(e){if(e.states&&e.states.emphasis){if(ch(e))return;if(e instanceof lp&&ah(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(n){e.stateTransition=o;var a=e.getTextContent(),i=e.getTextGuideLine();a&&(a.stateTransition=o),i&&(i.stateTransition=o)}e.__dirty&&r(e)}}))}JS=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),QS(e,!0),QS(e,!1),t.plan()},QS=function(e,t){for(var r=e._model,a=e._scheduler,n=t?e._componentsViews:e._chartsViews,i=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,l=0;l<n.length;l++)n[l].__alive=!1;function c(e){var l=e.__requireNewView;e.__requireNewView=!1;var c="_ec_"+e.id+"_"+e.type,u=!l&&i[c];if(!u){var p=pc(e.type),d=t?Gy.getClass(p.main,p.sub):ux.getClass(p.sub);0,u=new d,u.init(r,s),i[c]=u,n.push(u),o.add(u.group)}e.__viewId=u.__id=c,u.__alive=!0,u.__model=e,u.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&a.prepareView(u,e,r,s)}t?r.eachComponent((function(e,t){"series"!==e&&c(t)})):r.eachSeries(c);for(l=0;l<n.length;){var u=n[l];u.__alive?l++:(!t&&u.renderTask.dispose(),o.remove(u.group),u.dispose(r,s),n.splice(l,1),i[u.__id]===u&&delete i[u.__id],u.__id=u.group.__ecComponentInfo=null)}},eD=function(e,t,r,a,n){var i=e._model;if(i.setUpdatePayload(r),a){var o={};o[a+"Id"]=r[a+"Id"],o[a+"Index"]=r[a+"Index"],o[a+"Name"]=r[a+"Name"];var s={mainType:a,query:o};n&&(s.subType=n);var l,c=r.excludeSeriesId;null!=c&&(l=Object(Sa["f"])(),Object(Sa["k"])(Ol(c),(function(e){var t=$l(e,null);null!=t&&l.set(t,!0)}))),i&&i.eachComponent(s,(function(t){var a=l&&null!=l.get(t.id);if(!a)if(rh(r))if(t instanceof By)r.type!==ad||r.notBlur||t.get(["emphasis","disabled"])||jd(t,r,e._api);else{var n=Fd(t.mainType,t.componentIndex,r.name,e._api),i=n.focusSelf,o=n.dispatchers;r.type===ad&&i&&!r.notBlur&&Ld(t.mainType,t.componentIndex,e._api),o&&Object(Sa["k"])(o,(function(e){r.type===ad?Id(e):Od(e)}))}else th(r)&&t instanceof By&&(Bd(t,r,e._api),$d(t),fD(e))}),e),i&&i.eachComponent(s,(function(t){var r=l&&null!=l.get(t.id);r||u(e["series"===a?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else Object(Sa["k"])([].concat(e._componentsViews).concat(e._chartsViews),u);function u(a){a&&a.__alive&&a[t]&&a[t](a.__model,i,e._api,r)}},tD={prepareAndUpdate:function(e){JS(this),tD.update.call(this,e,{optionChanged:null!=e.newOption})},update:function(t,r){var a=this._model,n=this._api,i=this._zr,o=this._coordSysMgr,s=this._scheduler;if(a){a.setUpdatePayload(t),s.restoreData(a,t),s.performSeriesTasks(a),o.create(a,n),s.performDataProcessorTasks(a,t),aD(this,a),o.update(a,n),e(a),s.performVisualTasks(a,t),cD(this,a,n,t,r);var l=a.get("backgroundColor")||"transparent",c=a.get("darkMode");i.setBackgroundColor(l),null!=c&&"auto"!==c&&i.setDarkMode(c),_S.trigger("afterupdate",a,n)}},updateTransform:function(t){var r=this,a=this._model,n=this._api;if(a){a.setUpdatePayload(t);var i=[];a.eachComponent((function(e,o){if("series"!==e){var s=r.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,a,n,t);l&&l.update&&i.push(s)}else i.push(s)}}));var o=Object(Sa["f"])();a.eachSeries((function(e){var i=r._chartsMap[e.__viewId];if(i.updateTransform){var s=i.updateTransform(e,a,n,t);s&&s.update&&o.set(e.uid,1)}else o.set(e.uid,1)})),e(a),this._scheduler.performVisualTasks(a,t,{setDirty:!0,dirtyMap:o}),pD(this,a,n,t,{},o),_S.trigger("afterupdate",a,n)}},updateView:function(t){var r=this._model;r&&(r.setUpdatePayload(t),ux.markUpdateMethod(t,"updateView"),e(r),this._scheduler.performVisualTasks(r,t,{setDirty:!0}),cD(this,r,this._api,t,{}),_S.trigger("afterupdate",r,this._api))},updateVisual:function(t){var r=this,a=this._model;a&&(a.setUpdatePayload(t),a.eachSeries((function(e){e.getData().clearAllVisual()})),ux.markUpdateMethod(t,"updateVisual"),e(a),this._scheduler.performVisualTasks(a,t,{visualType:"visual",setDirty:!0}),a.eachComponent((function(e,n){if("series"!==e){var i=r.getViewOfComponentModel(n);i&&i.__alive&&i.updateVisual(n,a,r._api,t)}})),a.eachSeries((function(e){var n=r._chartsMap[e.__viewId];n.updateVisual(e,a,r._api,t)})),_S.trigger("afterupdate",a,this._api))},updateLayout:function(e){tD.update.call(this,e)}},rD=function(e,t,r,a){if(e._disposed)xD(e.id);else{for(var n,i=e._model,o=e._coordSysMgr.getCoordinateSystems(),s=Jl(i,r),l=0;l<o.length;l++){var c=o[l];if(c[t]&&null!=(n=c[t](i,s,a)))return n}0}},aD=function(e,t){var r=e._chartsMap,a=e._scheduler;t.eachSeries((function(e){a.updateStreamModes(e,r[e.__viewId])}))},nD=function(e,t){var r=this,a=this.getModel(),n=e.type,i=e.escapeConnect,o=wD[n],s=o.actionInfo,l=(s.update||"update").split(":"),c=l.pop(),u=null!=l[0]&&pc(l[0]);this[BS]=!0;var p=[e],d=!1;e.batch&&(d=!0,p=Object(Sa["H"])(e.batch,(function(t){return t=Object(Sa["i"])(Object(Sa["m"])({},t),e),t.batch=null,t})));var h,f=[],m=th(e),g=rh(e);if(g&&Ed(this._api),Object(Sa["k"])(p,(function(t){if(h=o.action(t,r._model,r._api),h=h||Object(Sa["m"])({},t),h.type=s.event||h.type,f.push(h),g){var a=Ql(e),n=a.queryOptionMap,i=a.mainTypeSpecified,l=i?n.keys()[0]:"series";eD(r,c,t,l),fD(r)}else m?(eD(r,c,t,"series"),fD(r)):u&&eD(r,c,t,u.main,u.sub)})),"none"!==c&&!g&&!m&&!u)try{this[$S]?(JS(this),tD.update.call(this,e),this[$S]=null):tD[c].call(this,e)}catch(b){throw this[BS]=!1,b}if(h=d?{type:s.event||n,escapeConnect:i,batch:f}:f[0],this[BS]=!1,!t){var v=this._messageCenter;if(v.trigger(h.type,h),m){var y={type:"selectchanged",escapeConnect:i,selected:Gd(a),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e};v.trigger(y.type,y)}}},iD=function(e){var t=this._pendingActions;while(t.length){var r=t.shift();nD.call(this,r,e)}},oD=function(e){!e&&this.trigger("updated")},sD=function(e,t){e.on("rendered",(function(r){t.trigger("rendered",r),!e.animation.isFinished()||t[$S]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))},lD=function(e,t){e.on("mouseover",(function(e){var r=e.target,a=cw(r,Jd);a&&(Vd(a,e,t._api),fD(t))})).on("mouseout",(function(e){var r=e.target,a=cw(r,Jd);a&&(zd(a,e,t._api),fD(t))})).on("click",(function(e){var r=e.target,a=cw(r,(function(e){return null!=Up(e).dataIndex}),!0);if(a){var n=a.selected?"unselect":"select",i=Up(a);t._api.dispatchAction({type:n,dataType:i.dataType,dataIndexInside:i.dataIndex,seriesIndex:i.seriesIndex,isFromClick:!0})}}))},cD=function(e,r,a,n,i){t(r),uD(e,r,a,n,i),Object(Sa["k"])(e._chartsViews,(function(e){e.__alive=!1})),pD(e,r,a,n,i),Object(Sa["k"])(e._chartsViews,(function(e){e.__alive||e.remove(r,a)}))},uD=function(e,t,r,a,n,o){Object(Sa["k"])(o||e._componentsViews,(function(e){var n=e.__model;s(n,e),e.render(n,t,r,a),i(n,e),l(n,e)}))},pD=function(e,t,r,o,c,u){var p=e._scheduler;c=Object(Sa["m"])(c||{},{updatedSeries:t.getSeries()}),_S.trigger("series:beforeupdate",t,r,c);var d=!1;t.eachSeries((function(t){var r=e._chartsMap[t.__viewId];r.__alive=!0;var a=r.renderTask;p.updatePayload(a,o),s(t,r),u&&u.get(t.uid)&&a.dirty(),a.perform(p.getPerformArgs(a))&&(d=!0),r.group.silent=!!t.get("silent"),n(t,r),$d(t)})),p.unfinished=d||p.unfinished,_S.trigger("series:layoutlabels",t,r,c),_S.trigger("series:transition",t,r,c),t.eachSeries((function(t){var r=e._chartsMap[t.__viewId];i(t,r),l(t,r)})),a(e,t),_S.trigger("series:afterupdate",t,r,c)},fD=function(e){e[GS]=!0,e.getZr().wakeUp()},mD=function(e){e[GS]&&(e.getZr().storage.traverse((function(e){ch(e)||r(e)})),e[GS]=!1)},dD=function(e){return new(function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return xa(r,t),r.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},r.prototype.getComponentByElement=function(t){while(t){var r=t.__ecComponentInfo;if(null!=r)return e._model.getComponent(r.mainType,r.index);t=t.parent}},r.prototype.enterEmphasis=function(t,r){Id(t,r),fD(e)},r.prototype.leaveEmphasis=function(t,r){Od(t,r),fD(e)},r.prototype.enterBlur=function(t){Md(t),fD(e)},r.prototype.leaveBlur=function(t){Ad(t),fD(e)},r.prototype.enterSelect=function(t){kd(t),fD(e)},r.prototype.leaveSelect=function(t){Pd(t),fD(e)},r.prototype.getModel=function(){return e.getModel()},r.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},r.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},r}(lg))(e)},hD=function(e){function t(e,t){for(var r=0;r<e.length;r++){var a=e[r];a[WS]=t}}Object(Sa["k"])(SD,(function(r,a){e._messageCenter.on(a,(function(r){if(AD[e.group]&&e[WS]!==HS){if(r&&r.escapeConnect)return;var a=e.makeActionFromEvent(r),n=[];Object(Sa["k"])(MD,(function(t){t!==e&&t.group===e.group&&n.push(t)})),t(n,HS),Object(Sa["k"])(n,(function(e){e[WS]!==qS&&e.dispatchAction(a)})),t(n,YS)}}))}))}}(),t}(Xa),bD=yD.prototype;bD.on=XS("on"),bD.off=XS("off"),bD.one=function(e,t,r){var a=this;function n(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];t&&t.apply&&t.apply(this,r),a.off(e,n)}Xm("ECharts#one is deprecated."),this.on.call(this,e,n,r)};var _D=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function xD(e){0}var wD={},SD={},DD=[],CD=[],TD=[],ID={},OD={},MD={},AD={},kD=+new Date-0,PD=(new Date,"_echarts_instance_");function ND(e,t,r){var a=!(r&&r.ssr);if(a){0;var n=ED(e);if(n)return n;0}var i=new yD(e,t,r);return i.id="ec_"+kD++,MD[i.id]=i,a&&ac(e,PD,i.id),hD(i),_S.trigger("afterinit",i),i}function ED(e){return MD[nc(e,PD)]}function RD(e,t){ID[e]=t}function LD(e){Object(Sa["r"])(CD,e)<0&&CD.push(e)}function jD(e,t){HD(DD,e,t,OS)}function FD(e){zD("afterinit",e)}function VD(e){zD("afterupdate",e)}function zD(e,t){_S.on(e,t)}function BD(e,t,r){Object(Sa["w"])(t)&&(r=t,t="");var a=Object(Sa["A"])(e)?e.type:[e,e={event:t}][0];e.event=(e.event||a).toLowerCase(),t=e.event,SD[t]||(Object(Sa["b"])(US.test(a)&&US.test(t)),wD[a]||(wD[a]={action:r,actionInfo:e}),SD[t]=a)}function $D(e,t){pg.register(e,t)}function GD(e,t){HD(TD,e,t,AS,"layout")}function UD(e,t){HD(TD,e,t,NS,"visual")}var WD=[];function HD(e,t,r,a,n){if((Object(Sa["w"])(t)||Object(Sa["A"])(t))&&(r=t,t=a),!(Object(Sa["r"])(WD,r)>=0)){WD.push(r);var i=Gx.wrapStageHandler(r,n);i.__prio=t,i.__raw=r,e.push(i)}}function qD(e,t){OD[e]=t}function YD(e,t,r){var a=SS("registerMap");a&&a(e,t,r)}var XD=zv;UD(PS,wx),UD(RS,Dx),UD(RS,Cx),UD(PS,tw),UD(RS,rw),UD(VS,yS),LD($g),jD(TS,Gg),qD("default",Ix),BD({type:ad,event:ad,update:ad},Sa["L"]),BD({type:nd,event:nd,update:nd},Sa["L"]),BD({type:id,event:id,update:id},Sa["L"]),BD({type:od,event:od,update:od},Sa["L"]),BD({type:sd,event:sd,update:sd},Sa["L"]),RD("light",Wx),RD("dark",Kx);var ZD=[],KD={registerPreprocessor:LD,registerProcessor:jD,registerPostInit:FD,registerPostUpdate:VD,registerUpdateLifecycle:zD,registerAction:BD,registerCoordinateSystem:$D,registerLayout:GD,registerVisual:UD,registerTransform:XD,registerLoading:qD,registerMap:YD,registerImpl:wS,PRIORITY:zS,ComponentModel:fm,ComponentView:Gy,SeriesModel:By,ChartView:ux,registerComponentModel:function(e){fm.registerClass(e)},registerComponentView:function(e){Gy.registerClass(e)},registerSeriesModel:function(e){By.registerClass(e)},registerChartView:function(e){ux.registerClass(e)},registerSubTypeDefaulter:function(e,t){fm.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Xs(e,t)}};function JD(e){Object(Sa["t"])(e)?Object(Sa["k"])(e,(function(e){JD(e)})):Object(Sa["r"])(ZD,e)>=0||(ZD.push(e),Object(Sa["w"])(e)&&(e={install:e}),e.install(KD))}var QD=2*Math.PI,eC=Lu.CMD,tC=["top","right","bottom","left"];function rC(e,t,r,a,n){var i=r.width,o=r.height;switch(e){case"top":a.set(r.x+i/2,r.y-t),n.set(0,-1);break;case"bottom":a.set(r.x+i/2,r.y+o+t),n.set(0,1);break;case"left":a.set(r.x-t,r.y+o/2),n.set(-1,0);break;case"right":a.set(r.x+i+t,r.y+o/2),n.set(1,0);break}}function aC(e,t,r,a,n,i,o,s,l){o-=e,s-=t;var c=Math.sqrt(o*o+s*s);o/=c,s/=c;var u=o*r+e,p=s*r+t;if(Math.abs(a-n)%QD<1e-4)return l[0]=u,l[1]=p,c-r;if(i){var d=a;a=Bu(n),n=Bu(d)}else a=Bu(a),n=Bu(n);a>n&&(n+=QD);var h=Math.atan2(s,o);if(h<0&&(h+=QD),h>=a&&h<=n||h+QD>=a&&h+QD<=n)return l[0]=u,l[1]=p,c-r;var f=r*Math.cos(a)+e,m=r*Math.sin(a)+t,g=r*Math.cos(n)+e,v=r*Math.sin(n)+t,y=(f-o)*(f-o)+(m-s)*(m-s),b=(g-o)*(g-o)+(v-s)*(v-s);return y<b?(l[0]=f,l[1]=m,Math.sqrt(y)):(l[0]=g,l[1]=v,Math.sqrt(b))}function nC(e,t,r,a,n,i,o,s){var l=n-e,c=i-t,u=r-e,p=a-t,d=Math.sqrt(u*u+p*p);u/=d,p/=d;var h=l*u+c*p,f=h/d;s&&(f=Math.min(Math.max(f,0),1)),f*=d;var m=o[0]=e+f*u,g=o[1]=t+f*p;return Math.sqrt((m-n)*(m-n)+(g-i)*(g-i))}function iC(e,t,r,a,n,i,o){r<0&&(e+=r,r=-r),a<0&&(t+=a,a=-a);var s=e+r,l=t+a,c=o[0]=Math.min(Math.max(n,e),s),u=o[1]=Math.min(Math.max(i,t),l);return Math.sqrt((c-n)*(c-n)+(u-i)*(u-i))}var oC=[];function sC(e,t,r){var a=iC(t.x,t.y,t.width,t.height,e.x,e.y,oC);return r.set(oC[0],oC[1]),a}function lC(e,t,r){for(var a,n,i=0,o=0,s=0,l=0,c=1/0,u=t.data,p=e.x,d=e.y,h=0;h<u.length;){var f=u[h++];1===h&&(i=u[h],o=u[h+1],s=i,l=o);var m=c;switch(f){case eC.M:s=u[h++],l=u[h++],i=s,o=l;break;case eC.L:m=nC(i,o,u[h],u[h+1],p,d,oC,!0),i=u[h++],o=u[h++];break;case eC.C:m=Gi(i,o,u[h++],u[h++],u[h++],u[h++],u[h],u[h+1],p,d,oC),i=u[h++],o=u[h++];break;case eC.Q:m=Zi(i,o,u[h++],u[h++],u[h],u[h+1],p,d,oC),i=u[h++],o=u[h++];break;case eC.A:var g=u[h++],v=u[h++],y=u[h++],b=u[h++],_=u[h++],x=u[h++];h+=1;var w=!!(1-u[h++]);a=Math.cos(_)*y+g,n=Math.sin(_)*b+v,h<=1&&(s=a,l=n);var S=(p-g)*b/y+g;m=aC(g,v,b,_,_+x,w,S,d,oC),i=Math.cos(_+x)*y+g,o=Math.sin(_+x)*b+v;break;case eC.R:s=i=u[h++],l=o=u[h++];var D=u[h++],C=u[h++];m=iC(s,l,D,C,p,d,oC);break;case eC.Z:m=nC(i,o,s,l,p,d,oC,!0),i=s,o=l;break}m<c&&(c=m,r.set(oC[0],oC[1]))}return c}var cC=new Ln,uC=new Ln,pC=new Ln,dC=new Ln,hC=new Ln;function fC(e,t){if(e){var r=e.getTextGuideLine(),a=e.getTextContent();if(a&&r){var n=e.textGuideLineConfig||{},i=[[0,0],[0,0],[0,0]],o=n.candidates||tC,s=a.getBoundingRect().clone();s.applyTransform(a.getComputedTransform());var l=1/0,c=n.anchor,u=e.getComputedTransform(),p=u&&Nn([],u),d=t.get("length2")||0;c&&pC.copy(c);for(var h=0;h<o.length;h++){var f=o[h];rC(f,0,s,cC,dC),Ln.scaleAndAdd(uC,cC,dC,d),uC.transform(p);var m=e.getBoundingRect(),g=c?c.distance(uC):e instanceof lp?lC(uC,e.path,pC):sC(uC,m,pC);g<l&&(l=g,uC.transform(u),pC.transform(u),pC.toArray(i[0]),uC.toArray(i[1]),cC.toArray(i[2]))}vC(i,t.get("minTurnAngle")),r.setShape({points:i})}}}var mC=[],gC=new Ln;function vC(e,t){if(t<=180&&t>0){t=t/180*Math.PI,cC.fromArray(e[0]),uC.fromArray(e[1]),pC.fromArray(e[2]),Ln.sub(dC,cC,uC),Ln.sub(hC,pC,uC);var r=dC.len(),a=hC.len();if(!(r<.001||a<.001)){dC.scale(1/r),hC.scale(1/a);var n=dC.dot(hC),i=Math.cos(t);if(i<n){var o=nC(uC.x,uC.y,pC.x,pC.y,cC.x,cC.y,mC,!1);gC.fromArray(mC),gC.scaleAndAdd(hC,o/Math.tan(Math.PI-t));var s=pC.x!==uC.x?(gC.x-uC.x)/(pC.x-uC.x):(gC.y-uC.y)/(pC.y-uC.y);if(isNaN(s))return;s<0?Ln.copy(gC,uC):s>1&&Ln.copy(gC,pC),gC.toArray(e[1])}}}}function yC(e,t,r){if(r<=180&&r>0){r=r/180*Math.PI,cC.fromArray(e[0]),uC.fromArray(e[1]),pC.fromArray(e[2]),Ln.sub(dC,uC,cC),Ln.sub(hC,pC,uC);var a=dC.len(),n=hC.len();if(!(a<.001||n<.001)){dC.scale(1/a),hC.scale(1/n);var i=dC.dot(t),o=Math.cos(r);if(i<o){var s=nC(uC.x,uC.y,pC.x,pC.y,cC.x,cC.y,mC,!1);gC.fromArray(mC);var l=Math.PI/2,c=Math.acos(hC.dot(t)),u=l+c-r;if(u>=l)Ln.copy(gC,pC);else{gC.scaleAndAdd(hC,s/Math.tan(Math.PI/2-u));var p=pC.x!==uC.x?(gC.x-uC.x)/(pC.x-uC.x):(gC.y-uC.y)/(pC.y-uC.y);if(isNaN(p))return;p<0?Ln.copy(gC,uC):p>1&&Ln.copy(gC,pC)}gC.toArray(e[1])}}}}function bC(e,t,r,a){var n="normal"===r,i=n?e:e.ensureState(r);i.ignore=t;var o=a.get("smooth");o&&!0===o&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();n?e.useStyle(s):i.style=s}function _C(e,t){var r=t.smooth,a=t.points;if(a)if(e.moveTo(a[0][0],a[0][1]),r>0&&a.length>=3){var n=Fa(a[0],a[1]),i=Fa(a[1],a[2]);if(!n||!i)return e.lineTo(a[1][0],a[1][1]),void e.lineTo(a[2][0],a[2][1]);var o=Math.min(n,i)*r,s=Ba([],a[1],a[0],o/n),l=Ba([],a[1],a[2],o/i),c=Ba([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],c[0],c[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],a[2][0],a[2][1])}else for(var u=1;u<a.length;u++)e.lineTo(a[u][0],a[u][1])}function xC(e,t,r){var a=e.getTextGuideLine(),n=e.getTextContent();if(n){for(var i=t.normal,o=i.get("show"),s=n.ignore,l=0;l<ed.length;l++){var c=ed[l],u=t[c],p="normal"===c;if(u){var d=u.get("show"),h=p?s:Object(Sa["P"])(n.states[c]&&n.states[c].ignore,s);if(h||!Object(Sa["P"])(d,o)){var f=p?a:a&&a.states[c];f&&(f.ignore=!0),a&&bC(a,!0,c,u);continue}a||(a=new Yb,e.setTextGuideLine(a),p||!s&&o||bC(a,!0,"normal",t.normal),e.stateProxy&&(a.stateProxy=e.stateProxy)),bC(a,!1,c,u)}}if(a){Object(Sa["i"])(a.style,r),a.style.fill=null;var m=i.get("showAbove"),g=e.textGuideLineConfig=e.textGuideLineConfig||{};g.showAbove=m||!1,a.buildPath=_C}}else a&&e.removeTextGuideLine()}function wC(e,t){t=t||"labelLine";for(var r={normal:e.getModel(t)},a=0;a<Qp.length;a++){var n=Qp[a];r[n]=e.getModel([n,t])}return r}function SC(e){for(var t=[],r=0;r<e.length;r++){var a=e[r];if(!a.defaultAttr.ignore){var n=a.label,i=n.getComputedTransform(),o=n.getBoundingRect(),s=!i||i[1]<1e-5&&i[2]<1e-5,l=n.style.margin||0,c=o.clone();c.applyTransform(i),c.x-=l/2,c.y-=l/2,c.width+=l,c.height+=l;var u=s?new __(o,i):null;t.push({label:n,labelLine:a.labelLine,rect:c,localRect:o,obb:u,priority:a.priority,defaultAttr:a.defaultAttr,layoutOption:a.computedLayoutOption,axisAligned:s,transform:i})}}return t}function DC(e,t,r,a,n,i){var o=e.length;if(!(o<2)){e.sort((function(e,r){return e.rect[t]-r.rect[t]}));for(var s,l=0,c=!1,u=[],p=0,d=0;d<o;d++){var h=e[d],f=h.rect;s=f[t]-l,s<0&&(f[t]-=s,h.label[t]-=s,c=!0);var m=Math.max(-s,0);u.push(m),p+=m,l=f[t]+f[r]}p>0&&i&&w(-p/o,0,o);var g,v,y=e[0],b=e[o-1];return _(),g<0&&S(-g,.8),v<0&&S(v,.8),_(),x(g,v,1),x(v,g,-1),_(),g<0&&D(-g),v<0&&D(v),c}function _(){g=y.rect[t]-a,v=n-b.rect[t]-b.rect[r]}function x(e,t,r){if(e<0){var a=Math.min(t,-e);if(a>0){w(a*r,0,o);var n=a+e;n<0&&S(-n*r,1)}else S(-e*r,1)}}function w(r,a,n){0!==r&&(c=!0);for(var i=a;i<n;i++){var o=e[i],s=o.rect;s[t]+=r,o.label[t]+=r}}function S(a,n){for(var i=[],s=0,l=1;l<o;l++){var c=e[l-1].rect,u=Math.max(e[l].rect[t]-c[t]-c[r],0);i.push(u),s+=u}if(s){var p=Math.min(Math.abs(a)/s,n);if(a>0)for(l=0;l<o-1;l++){var d=i[l]*p;w(d,0,l+1)}else for(l=o-1;l>0;l--){d=i[l-1]*p;w(-d,l,o)}}}function D(e){var t=e<0?-1:1;e=Math.abs(e);for(var r=Math.ceil(e/(o-1)),a=0;a<o-1;a++)if(t>0?w(r,0,a+1):w(-r,o-a-1,o),e-=r,e<=0)return}}function CC(e,t,r,a){return DC(e,"x","width",t,r,a)}function TC(e,t,r,a){return DC(e,"y","height",t,r,a)}function IC(e){var t=[];e.sort((function(e,t){return t.priority-e.priority}));var r=new Hn(0,0,0,0);function a(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}for(var n=0;n<e.length;n++){var i=e[n],o=i.axisAligned,s=i.localRect,l=i.transform,c=i.label,u=i.labelLine;r.copy(i.rect),r.width-=.1,r.height-=.1,r.x+=.05,r.y+=.05;for(var p=i.obb,d=!1,h=0;h<t.length;h++){var f=t[h];if(r.intersect(f.rect)){if(o&&f.axisAligned){d=!0;break}if(f.obb||(f.obb=new __(f.localRect,f.transform)),p||(p=new __(s,l)),p.intersect(f.obb)){d=!0;break}}}d?(a(c),u&&a(u)):(c.attr("ignore",i.defaultAttr.ignore),u&&u.attr("ignore",i.defaultAttr.labelGuideIgnore),t.push(i))}}function OC(e){if(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].slice());return t}}function MC(e,t){var r=e.label,a=t&&t.getTextGuideLine();return{dataIndex:e.dataIndex,dataType:e.dataType,seriesIndex:e.seriesModel.seriesIndex,text:e.label.style.text,rect:e.hostRect,labelRect:e.rect,align:r.style.align,verticalAlign:r.style.verticalAlign,labelLinePoints:OC(a&&a.shape.points)}}var AC=["align","verticalAlign","width","height","fontSize"],kC=new fs,PC=Zl(),NC=Zl();function EC(e,t,r){for(var a=0;a<r.length;a++){var n=r[a];null!=t[n]&&(e[n]=t[n])}}var RC=["x","y","rotation"],LC=function(){function e(){this._labelList=[],this._chartViewList=[]}return e.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},e.prototype._addLabel=function(e,t,r,a,n){var i=a.style,o=a.__hostTarget,s=o.textConfig||{},l=a.getComputedTransform(),c=a.getBoundingRect().plain();Hn.applyTransform(c,c,l),l?kC.setLocalTransform(l):(kC.x=kC.y=kC.rotation=kC.originX=kC.originY=0,kC.scaleX=kC.scaleY=1),kC.rotation=Bu(kC.rotation);var u,p=a.__hostTarget;if(p){u=p.getBoundingRect().plain();var d=p.getComputedTransform();Hn.applyTransform(u,u,d)}var h=u&&p.getTextGuideLine();this._labelList.push({label:a,labelLine:h,seriesModel:r,dataIndex:e,dataType:t,layoutOption:n,computedLayoutOption:null,rect:c,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:a.ignore,labelGuideIgnore:h&&h.ignore,x:kC.x,y:kC.y,scaleX:kC.scaleX,scaleY:kC.scaleY,rotation:kC.rotation,style:{x:i.x,y:i.y,align:i.align,verticalAlign:i.verticalAlign,width:i.width,height:i.height,fontSize:i.fontSize},cursor:a.cursor,attachedPos:s.position,attachedRot:s.rotation}})},e.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var r=e.__model,a=r.get("labelLayout");(Object(Sa["w"])(a)||Object(Sa["F"])(a).length)&&e.group.traverse((function(e){if(e.ignore)return!0;var n=e.getTextContent(),i=Up(e);n&&!n.disableLabelLayout&&t._addLabel(i.dataIndex,i.dataType,r,n,a)}))},e.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),r=e.getHeight();function a(e,t){return function(){fC(e,t)}}for(var n=0;n<this._labelList.length;n++){var i=this._labelList[n],o=i.label,s=o.__hostTarget,l=i.defaultAttr,c=void 0;c=Object(Sa["w"])(i.layoutOption)?i.layoutOption(MC(i,s)):i.layoutOption,c=c||{},i.computedLayoutOption=c;var u=Math.PI/180;s&&s.setTextConfig({local:!1,position:null!=c.x||null!=c.y?null:l.attachedPos,rotation:null!=c.rotate?c.rotate*u:l.attachedRot,offset:[c.dx||0,c.dy||0]});var p=!1;if(null!=c.x?(o.x=rl(c.x,t),o.setStyle("x",0),p=!0):(o.x=l.x,o.setStyle("x",l.style.x)),null!=c.y?(o.y=rl(c.y,r),o.setStyle("y",0),p=!0):(o.y=l.y,o.setStyle("y",l.style.y)),c.labelLinePoints){var d=s.getTextGuideLine();d&&(d.setShape({points:c.labelLinePoints}),p=!1)}var h=PC(o);h.needsUpdateLabelLine=p,o.rotation=null!=c.rotate?c.rotate*u:l.rotation,o.scaleX=l.scaleX,o.scaleY=l.scaleY;for(var f=0;f<AC.length;f++){var m=AC[f];o.setStyle(m,null!=c[m]?c[m]:l.style[m])}if(c.draggable){if(o.draggable=!0,o.cursor="move",s){var g=i.seriesModel;if(null!=i.dataIndex){var v=i.seriesModel.getData(i.dataType);g=v.getItemModel(i.dataIndex)}o.on("drag",a(s,g.getModel("labelLine")))}}else o.off("drag"),o.cursor=l.cursor}},e.prototype.layout=function(e){var t=e.getWidth(),r=e.getHeight(),a=SC(this._labelList),n=Object(Sa["n"])(a,(function(e){return"shiftX"===e.layoutOption.moveOverlap})),i=Object(Sa["n"])(a,(function(e){return"shiftY"===e.layoutOption.moveOverlap}));CC(n,0,t),TC(i,0,r);var o=Object(Sa["n"])(a,(function(e){return e.layoutOption.hideOverlap}));IC(o)},e.prototype.processLabelsOverall=function(){var e=this;Object(Sa["k"])(this._chartViewList,(function(t){var r=t.__model,a=t.ignoreLabelLineUpdate,n=r.isAnimationEnabled();t.group.traverse((function(t){if(t.ignore&&!t.forceLabelAnimation)return!0;var i=!a,o=t.getTextContent();!i&&o&&(i=PC(o).needsUpdateLabelLine),i&&e._updateLabelLine(t,r),n&&e._animateLabels(t,r)}))}))},e.prototype._updateLabelLine=function(e,t){var r=e.getTextContent(),a=Up(e),n=a.dataIndex;if(r&&null!=n){var i=t.getData(a.dataType),o=i.getItemModel(n),s={},l=i.getItemVisual(n,"style");if(l){var c=i.getVisual("drawType");s.stroke=l[c]}var u=o.getModel("labelLine");xC(e,wC(o),s),fC(e,u)}},e.prototype._animateLabels=function(e,t){var r=e.getTextContent(),a=e.getTextGuideLine();if(r&&(e.forceLabelAnimation||!r.ignore&&!r.invisible&&!e.disableLabelAnimation&&!ch(e))){var n=PC(r),i=n.oldLayout,o=Up(e),s=o.dataIndex,l={x:r.x,y:r.y,rotation:r.rotation},c=t.getData(o.dataType);if(i){r.attr(i);var u=e.prevStates;u&&(Object(Sa["r"])(u,"select")>=0&&r.attr(n.oldLayoutSelect),Object(Sa["r"])(u,"emphasis")>=0&&r.attr(n.oldLayoutEmphasis)),sh(r,l,t,s)}else if(r.attr(l),!Mh(r).valueAnimation){var p=Object(Sa["P"])(r.style.opacity,1);r.style.opacity=0,lh(r,{style:{opacity:p}},t,s)}if(n.oldLayout=l,r.states.select){var d=n.oldLayoutSelect={};EC(d,l,RC),EC(d,r.states.select,RC)}if(r.states.emphasis){var h=n.oldLayoutEmphasis={};EC(h,l,RC),EC(h,r.states.emphasis,RC)}kh(r,s,c,t,t)}if(a&&!a.ignore&&!a.invisible){n=NC(a),i=n.oldLayout;var f={points:a.shape.points};i?(a.attr({shape:i}),sh(a,{shape:f},t)):(a.setShape(f),a.style.strokePercent=0,lh(a,{style:{strokePercent:1}},t)),n.oldLayout=f}},e}(),jC=LC,FC=Zl();function VC(e){e.registerUpdateLifecycle("series:beforeupdate",(function(e,t,r){var a=FC(t).labelManager;a||(a=FC(t).labelManager=new jC),a.clearLabels()})),e.registerUpdateLifecycle("series:layoutlabels",(function(e,t,r){var a=FC(t).labelManager;r.updatedSeries.forEach((function(e){a.addLabelsOfSeries(t.getViewOfSeriesModel(e))})),a.updateLayoutConfig(t),a.layout(t),a.processLabelsOverall()}))}function zC(e,t,r){var a=gs["d"].createCanvas(),n=t.getWidth(),i=t.getHeight(),o=a.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=n+"px",o.height=i+"px",a.setAttribute("data-zr-dom-id",e)),a.width=n*r,a.height=i*r,a}JD(VC);var BC=function(e){function t(t,r,a){var n,i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null,a=a||Qo,"string"===typeof t?n=zC(t,r,a):Sa["A"](t)&&(n=t,t=n.id),i.id=t,i.dom=n;var o=n.style;return o&&(Sa["j"](n),n.onselectstart=function(){return!1},o.padding="0",o.margin="0",o.borderWidth="0"),i.painter=r,i.dpr=a,i}return Ca(t,e),t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=zC("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,r,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var n,i=[],o=this.maxRepaintRectCount,s=!1,l=new Hn(0,0,0,0);function c(e){if(e.isFinite()&&!e.isZero())if(0===i.length){var t=new Hn(0,0,0,0);t.copy(e),i.push(t)}else{for(var r=!1,a=1/0,n=0,c=0;c<i.length;++c){var u=i[c];if(u.intersect(e)){var p=new Hn(0,0,0,0);p.copy(u),p.union(e),i[c]=p,r=!0;break}if(s){l.copy(e),l.union(u);var d=e.width*e.height,h=u.width*u.height,f=l.width*l.height,m=f-d-h;m<a&&(a=m,n=c)}}if(s&&(i[n].union(e),r=!0),!r){t=new Hn(0,0,0,0);t.copy(e),i.push(t)}s||(s=i.length>=o)}}for(var u=this.__startIndex;u<this.__endIndex;++u){var p=e[u];if(p){var d=p.shouldBePainted(r,a,!0,!0),h=p.__isRendered&&(p.__dirty&mi||!d)?p.getPrevPaintRect():null;h&&c(h);var f=d&&(p.__dirty&mi||!p.__isRendered)?p.getPaintRect():null;f&&c(f)}}for(u=this.__prevStartIndex;u<this.__prevEndIndex;++u){p=t[u],d=p&&p.shouldBePainted(r,a,!0,!0);if(p&&(!d||!p.__zr)&&p.__isRendered){h=p.getPrevPaintRect();h&&c(h)}}do{n=!1;for(u=0;u<i.length;)if(i[u].isZero())i.splice(u,1);else{for(var m=u+1;m<i.length;)i[u].intersect(i[m])?(n=!0,i[u].union(i[m]),i.splice(m,1)):m++;u++}}while(n);return this._paintRects=i,i},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var r=this.dpr,a=this.dom,n=a.style,i=this.domBack;n&&(n.width=e+"px",n.height=t+"px"),a.width=e*r,a.height=t*r,i&&(i.width=e*r,i.height=t*r,1!==r&&this.ctxBack.scale(r,r))},t.prototype.clear=function(e,t,r){var a=this.dom,n=this.ctx,i=a.width,o=a.height;t=t||this.clearColor;var s=this.motionBlur&&!e,l=this.lastFrameAlpha,c=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,i/c,o/c));var p=this.domBack;function d(e,r,a,i){if(n.clearRect(e,r,a,i),t&&"transparent"!==t){var o=void 0;if(Sa["x"](t)){var d=t.global||t.__width===a&&t.__height===i;o=d&&t.__canvasGradient||Mw(n,t,{x:0,y:0,width:a,height:i}),t.__canvasGradient=o,t.__width=a,t.__height=i}else Sa["y"](t)&&(t.scaleX=t.scaleX||c,t.scaleY=t.scaleY||c,o=Bw(n,t,{dirty:function(){u.setUnpainted(),u.painter.refresh()}}));n.save(),n.fillStyle=o||t,n.fillRect(e,r,a,i),n.restore()}s&&(n.save(),n.globalAlpha=l,n.drawImage(p,e,r,a,i),n.restore())}!r||s?d(0,0,i,o):r.length&&Sa["k"](r,(function(e){d(e.x*c,e.y*c,e.width*c,e.height*c)}))},t}(Xa),$C=BC,GC=1e5,UC=314159,WC=.01,HC=.001;function qC(e){return!!e&&(!!e.__builtin__||"function"===typeof e.resize&&"function"===typeof e.refresh)}function YC(e,t){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var XC=function(){function e(e,t,r,a){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var n=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=r=Sa["m"]({},r||{}),this.dpr=r.devicePixelRatio||Qo,this._singleCanvas=n,this.root=e;var i=e.style;i&&(Sa["j"](e),e.innerHTML=""),this.storage=t;var o=this._zlevelList;this._prevDisplayList=[];var s=this._layers;if(n){var l=e,c=l.width,u=l.height;null!=r.width&&(c=r.width),null!=r.height&&(u=r.height),this.dpr=r.devicePixelRatio||1,l.width=c*this.dpr,l.height=u*this.dpr,this._width=c,this._height=u;var p=new $C(l,this,this.dpr);p.__builtin__=!0,p.initContext(),s[UC]=p,p.zlevel=UC,o.push(UC),this._domRoot=e}else{this._width=Pw(e,0,r),this._height=Pw(e,1,r);var d=this._domRoot=YC(this._width,this._height);e.appendChild(d)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),r=this._prevDisplayList,a=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,r,e,this._redrawId);for(var n=0;n<a.length;n++){var i=a[n],o=this._layers[i];if(!o.__builtin__&&o.refresh){var s=0===n?this._backgroundColor:null;o.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(e){var t=e.length,r=this._hoverlayer;if(r&&r.clear(),t){for(var a,n={inHover:!0,viewWidth:this._width,viewHeight:this._height},i=0;i<t;i++){var o=e[i];o.__inHover&&(r||(r=this._hoverlayer=this.getLayer(GC)),a||(a=r.ctx,a.save()),sS(a,o,n,i===t-1))}a&&a.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(GC)},e.prototype.paintOne=function(e,t){oS(e,t)},e.prototype._paintList=function(e,t,r,a){if(this._redrawId===a){r=r||!1,this._updateLayerStatus(e);var n=this._doPaintList(e,t,r),i=n.finished,o=n.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),o&&this._paintHoverList(e),i)this.eachLayer((function(e){e.afterBrush&&e.afterBrush()}));else{var s=this;Di((function(){s._paintList(e,t,r,a)}))}}},e.prototype._compositeManually=function(){var e=this.getLayer(UC).ctx,t=this._domRoot.width,r=this._domRoot.height;e.clearRect(0,0,t,r),this.eachBuiltinLayer((function(a){a.virtual&&e.drawImage(a.dom,0,0,t,r)}))},e.prototype._doPaintList=function(e,t,r){for(var a=this,n=[],i=this._opts.useDirtyRect,o=0;o<this._zlevelList.length;o++){var s=this._zlevelList[o],l=this._layers[s];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||r)&&n.push(l)}for(var c=!0,u=!1,p=function(o){var s,l=n[o],p=l.ctx,h=i&&l.createRepaintRects(e,t,d._width,d._height),f=r?l.__startIndex:l.__drawIndex,m=!r&&l.incremental&&Date.now,g=m&&Date.now(),v=l.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,v,h);else if(f===l.__startIndex){var y=e[f];y.incremental&&y.notClear&&!r||l.clear(!1,v,h)}-1===f&&(console.error("For some unknown reason. drawIndex is -1"),f=l.__startIndex);var b=function(t){var r={inHover:!1,allClipped:!1,prevEl:null,viewWidth:a._width,viewHeight:a._height};for(s=f;s<l.__endIndex;s++){var n=e[s];if(n.__inHover&&(u=!0),a._doPaintEl(n,l,i,t,r,s===l.__endIndex-1),m){var o=Date.now()-g;if(o>15)break}}r.prevElClipPaths&&p.restore()};if(h)if(0===h.length)s=l.__endIndex;else for(var _=d.dpr,x=0;x<h.length;++x){var w=h[x];p.save(),p.beginPath(),p.rect(w.x*_,w.y*_,w.width*_,w.height*_),p.clip(),b(w),p.restore()}else p.save(),b(),p.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(c=!1)},d=this,h=0;h<n.length;h++)p(h);return wa["a"].wxa&&Sa["k"](this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),{finished:c,needsRefreshHover:u}},e.prototype._doPaintEl=function(e,t,r,a,n,i){var o=t.ctx;if(r){var s=e.getPaintRect();(!a||s&&s.intersect(a))&&(sS(o,e,n,i),e.setPrevPaintRect(s))}else sS(o,e,n,i)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=UC);var r=this._layers[e];return r||(r=new $C("zr_"+e,this,this.dpr),r.zlevel=e,r.__builtin__=!0,this._layerConfig[e]?Sa["I"](r,this._layerConfig[e],!0):this._layerConfig[e-WC]&&Sa["I"](r,this._layerConfig[e-WC],!0),t&&(r.virtual=t),this.insertLayer(e,r),r.initContext()),r},e.prototype.insertLayer=function(e,t){var r=this._layers,a=this._zlevelList,n=a.length,i=this._domRoot,o=null,s=-1;if(!r[e]&&qC(t)){if(n>0&&e>a[0]){for(s=0;s<n-1;s++)if(a[s]<e&&a[s+1]>e)break;o=r[a[s]]}if(a.splice(s+1,0,e),r[e]=t,!t.virtual)if(o){var l=o.dom;l.nextSibling?i.insertBefore(t.dom,l.nextSibling):i.appendChild(t.dom)}else i.firstChild?i.insertBefore(t.dom,i.firstChild):i.appendChild(t.dom);t.painter||(t.painter=this)}},e.prototype.eachLayer=function(e,t){for(var r=this._zlevelList,a=0;a<r.length;a++){var n=r[a];e.call(t,this._layers[n],n)}},e.prototype.eachBuiltinLayer=function(e,t){for(var r=this._zlevelList,a=0;a<r.length;a++){var n=r[a],i=this._layers[n];i.__builtin__&&e.call(t,i,n)}},e.prototype.eachOtherLayer=function(e,t){for(var r=this._zlevelList,a=0;a<r.length;a++){var n=r[a],i=this._layers[n];i.__builtin__||e.call(t,i,n)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(e){function t(e){o&&(o.__endIndex!==e&&(o.__dirty=!0),o.__endIndex=e)}if(this.eachBuiltinLayer((function(e,t){e.__dirty=e.__used=!1})),this._singleCanvas)for(var r=1;r<e.length;r++){var a=e[r];if(a.zlevel!==e[r-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}}var n,i,o=null,s=0;for(i=0;i<e.length;i++){a=e[i];var l=a.zlevel,c=void 0;n!==l&&(n=l,s=0),a.incremental?(c=this.getLayer(l+HC,this._needsManuallyCompositing),c.incremental=!0,s=1):c=this.getLayer(l+(s>0?WC:0),this._needsManuallyCompositing),c.__builtin__||Sa["G"]("ZLevel "+l+" has been used by unkown layer "+c.id),c!==o&&(c.__used=!0,c.__startIndex!==i&&(c.__dirty=!0),c.__startIndex=i,c.incremental?c.__drawIndex=-1:c.__drawIndex=i,t(i),o=c),a.__dirty&mi&&!a.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=i))}t(i),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,Sa["k"](this._layers,(function(e){e.setUnpainted()}))},e.prototype.configLayer=function(e,t){if(t){var r=this._layerConfig;r[e]?Sa["I"](r[e],t,!0):r[e]=t;for(var a=0;a<this._zlevelList.length;a++){var n=this._zlevelList[a];if(n===e||n===e+WC){var i=this._layers[n];Sa["I"](i,r[e],!0)}}}},e.prototype.delLayer=function(e){var t=this._layers,r=this._zlevelList,a=t[e];a&&(a.dom.parentNode.removeChild(a.dom),delete t[e],r.splice(Sa["r"](r,e),1))},e.prototype.resize=function(e,t){if(this._domRoot.style){var r=this._domRoot;r.style.display="none";var a=this._opts,n=this.root;if(null!=e&&(a.width=e),null!=t&&(a.height=t),e=Pw(n,0,a),t=Pw(n,1,a),r.style.display="",this._width!==e||t!==this._height){for(var i in r.style.width=e+"px",r.style.height=t+"px",this._layers)this._layers.hasOwnProperty(i)&&this._layers[i].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(UC).resize(e,t)}return this},e.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[UC].dom;var t=new $C("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var r=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var a=t.dom.width,n=t.dom.height;this.eachLayer((function(e){e.__builtin__?r.drawImage(e.dom,0,0,a,n):e.renderToCanvas&&(r.save(),e.renderToCanvas(r),r.restore())}))}else for(var i={inHover:!1,viewWidth:this._width,viewHeight:this._height},o=this.storage.getDisplayList(!0),s=0,l=o.length;s<l;s++){var c=o[s];sS(r,c,i,s===l-1)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}(),ZC=XC;function KC(e){e.registerPainter("canvas",ZC)}var JC=Math.sin,QC=Math.cos,eT=Math.PI,tT=2*Math.PI,rT=180/eT,aT=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},e.prototype.moveTo=function(e,t){this._add("M",e,t)},e.prototype.lineTo=function(e,t){this._add("L",e,t)},e.prototype.bezierCurveTo=function(e,t,r,a,n,i){this._add("C",e,t,r,a,n,i)},e.prototype.quadraticCurveTo=function(e,t,r,a){this._add("Q",e,t,r,a)},e.prototype.arc=function(e,t,r,a,n,i){this.ellipse(e,t,r,r,0,a,n,i)},e.prototype.ellipse=function(e,t,r,a,n,i,o,s){var l=o-i,c=!s,u=Math.abs(l),p=Object(ao["j"])(u-tT)||(c?l>=tT:-l>=tT),d=l>0?l%tT:l%tT+tT,h=!1;h=!!p||!Object(ao["j"])(u)&&d>=eT===!!c;var f=e+r*QC(i),m=t+a*JC(i);this._start&&this._add("M",f,m);var g=Math.round(n*rT);if(p){var v=1/this._p,y=(c?1:-1)*(tT-v);this._add("A",r,a,g,1,+c,e+r*QC(i+y),t+a*JC(i+y)),v>.01&&this._add("A",r,a,g,0,+c,f,m)}else{var b=e+r*QC(o),_=t+a*JC(o);this._add("A",r,a,g,+h,+c,b,_)}},e.prototype.rect=function(e,t,r,a){this._add("M",e,t),this._add("l",r,0),this._add("l",0,a),this._add("l",-r,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(e,t,r,a,n,i,o,s,l){for(var c=[],u=this._p,p=1;p<arguments.length;p++){var d=arguments[p];if(isNaN(d))return void(this._invalid=!0);c.push(Math.round(d*u)/u)}this._d.push(e+c.join(" ")),this._start="Z"===e},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),nT=aT,iT="none",oT=Math.round;function sT(e){var t=e.fill;return null!=t&&t!==iT}function lT(e){var t=e.stroke;return null!=t&&t!==iT}var cT=["lineCap","miterLimit","lineJoin"],uT=Object(Sa["H"])(cT,(function(e){return"stroke-"+e.toLowerCase()}));function pT(e,t,r,a){var n=null==t.opacity?1:t.opacity;if(r instanceof gp)e("opacity",n);else{if(sT(t)){var i=Object(ao["p"])(t.fill);e("fill",i.color);var o=null!=t.fillOpacity?t.fillOpacity*i.opacity*n:i.opacity*n;(a||o<1)&&e("fill-opacity",o)}else e("fill",iT);if(lT(t)){var s=Object(ao["p"])(t.stroke);e("stroke",s.color);var l=t.strokeNoScale?r.getLineScale():1,c=l?(t.lineWidth||0)/l:0,u=null!=t.strokeOpacity?t.strokeOpacity*s.opacity*n:s.opacity*n,p=t.strokeFirst;if((a||1!==c)&&e("stroke-width",c),(a||p)&&e("paint-order",p?"stroke":"fill"),(a||u<1)&&e("stroke-opacity",u),t.lineDash){var d=Ew(r),h=d[0],f=d[1];h&&(f=oT(f||0),e("stroke-dasharray",h.join(",")),(f||a)&&e("stroke-dashoffset",f))}else a&&e("stroke-dasharray",iT);for(var m=0;m<cT.length;m++){var g=cT[m];if(a||t[g]!==np[g]){var v=t[g]||np[g];v&&e(uT[m],v)}}}else a&&e("stroke",iT)}}var dT="http://www.w3.org/2000/svg",hT="http://www.w3.org/1999/xlink",fT="http://www.w3.org/2000/xmlns/",mT="http://www.w3.org/XML/1998/namespace",gT="ecmeta_";function vT(e){return document.createElementNS(dT,e)}function yT(e,t,r,a,n){return{tag:e,attrs:r||{},children:a,text:n,key:t}}function bT(e,t){var r=[];if(t)for(var a in t){var n=t[a],i=a;!1!==n&&(!0!==n&&null!=n&&(i+='="'+n+'"'),r.push(i))}return"<"+e+" "+r.join(" ")+">"}function _T(e){return"</"+e+">"}function xT(e,t){t=t||{};var r=t.newline?"\n":"";function a(e){var t=e.children,n=e.tag,i=e.attrs,o=e.text;return bT(n,i)+("style"!==n?cn(o):o||"")+(t?""+r+Object(Sa["H"])(t,(function(e){return a(e)})).join(r)+r:"")+_T(n)}return a(e)}function wT(e,t,r){r=r||{};var a=r.newline?"\n":"",n=" {"+a,i=a+"}",o=Object(Sa["H"])(Object(Sa["F"])(e),(function(t){return t+n+Object(Sa["H"])(Object(Sa["F"])(e[t]),(function(r){return r+":"+e[t][r]+";"})).join(a)+i})).join(a),s=Object(Sa["H"])(Object(Sa["F"])(t),(function(e){return"@keyframes "+e+n+Object(Sa["H"])(Object(Sa["F"])(t[e]),(function(r){return r+n+Object(Sa["H"])(Object(Sa["F"])(t[e][r]),(function(a){var n=t[e][r][a];return"d"===a&&(n='path("'+n+'")'),a+":"+n+";"})).join(a)+i})).join(a)+i})).join(a);return o||s?["<![CDATA[",o,s,"]]>"].join(a):""}function ST(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function DT(e,t,r,a){return yT("svg","root",{width:e,height:t,xmlns:dT,"xmlns:xlink":hT,version:"1.1",baseProfile:"full",viewBox:!!a&&"0 0 "+e+" "+t},r)}var CT=0;function TT(){return CT++}var IT={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"},OT="transform-origin";function MT(e,t,r){var a=Object(Sa["m"])({},e.shape);Object(Sa["m"])(a,t),e.buildPath(r,a);var n=new nT;return n.reset(Object(ao["f"])(e)),r.rebuildPath(n,1),n.generateStr(),n.getStr()}function AT(e,t){var r=t.originX,a=t.originY;(r||a)&&(e[OT]=r+"px "+a+"px")}var kT={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function PT(e,t){var r=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[r]=e,r}function NT(e,t,r){var a,n,i=e.shape.paths,o={};if(Object(Sa["k"])(i,(function(e){var t=ST(r.zrId);t.animation=!0,RT(e,{},t,!0);var i=t.cssAnims,s=t.cssNodes,l=Object(Sa["F"])(i),c=l.length;if(c){n=l[c-1];var u=i[n];for(var p in u){var d=u[p];o[p]=o[p]||{d:""},o[p].d+=d.d||""}for(var h in s){var f=s[h].animation;f.indexOf(n)>=0&&(a=f)}}})),a){t.d=!1;var s=PT(o,r);return a.replace(n,s)}}function ET(e){return Object(Sa["C"])(e)?IT[e]?"cubic-bezier("+IT[e]+")":Qi(e)?e:"":""}function RT(e,t,r,a){var n=e.animators,i=n.length,o=[];if(e instanceof l_){var s=NT(e,t,r);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},c=0;c<i;c++){var u=n[c],p=[u.getMaxTime()/1e3+"s"],d=ET(u.getClip().easing),h=u.getDelay();d?p.push(d):p.push("linear"),h&&p.push(h/1e3+"s"),u.getLoop()&&p.push("infinite");var f=p.join(" ");l[f]=l[f]||[f,[]],l[f][1].push(u)}function m(n){var i,o=n[1],s=o.length,l={},c={},u={},p="animation-timing-function";function d(e,t,r){for(var a=e.getTracks(),n=e.getMaxTime(),i=0;i<a.length;i++){var o=a[i];if(o.needsAnimate()){var s=o.keyframes,l=o.propName;if(r&&(l=r(l)),l)for(var c=0;c<s.length;c++){var u=s[c],d=Math.round(u.time/n*100)+"%",h=ET(u.easing),f=u.rawValue;(Object(Sa["C"])(f)||Object(Sa["z"])(f))&&(t[d]=t[d]||{},t[d][l]=u.rawValue,h&&(t[d][p]=h))}}}}for(var h=0;h<s;h++){var f=o[h],m=f.targetName;m?"shape"===m&&d(f,c):!a&&d(f,l)}for(var g in l){var v={};hs(v,e),Object(Sa["m"])(v,l[g]);var y=Object(ao["g"])(v),b=l[g][p];u[g]=y?{transform:y}:{},AT(u[g],v),b&&(u[g][p]=b)}var _=!0;for(var g in c){u[g]=u[g]||{};var x=!i;b=c[g][p];x&&(i=new Lu);var w=i.len();i.reset(),u[g].d=MT(e,c[g],i);var S=i.len();if(!x&&w!==S){_=!1;break}b&&(u[g][p]=b)}if(!_)for(var g in u)delete u[g].d;if(!a)for(h=0;h<s;h++){f=o[h],m=f.targetName;"style"===m&&d(f,u,(function(e){return kT[e]}))}var D,C=Object(Sa["F"])(u),T=!0;for(h=1;h<C.length;h++){var I=C[h-1],O=C[h];if(u[I][OT]!==u[O][OT]){T=!1;break}D=u[I][OT]}if(T&&D){for(var g in u)u[g][OT]&&delete u[g][OT];t[OT]=D}if(Object(Sa["n"])(C,(function(e){return Object(Sa["F"])(u[e]).length>0})).length){var M=PT(u,r);return M+" "+n[0]+" both"}}for(var g in l){s=m(l[g]);s&&o.push(s)}if(o.length){var v=r.zrId+"-cls-"+TT();r.cssNodes["."+v]={animation:o.join(",")},t["class"]=v}}function LT(e,t,r){if(!e.ignore)if(e.isSilent()){var a={"pointer-events":"none"};jT(a,t,r,!0)}else{var n=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},i=n.fill;if(!i){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,l=e.currentStates.indexOf("select")>=0&&s||o;l&&(i=Object(ro["d"])(l))}var c=n.lineWidth;if(c){var u=!n.strokeNoScale&&e.transform?e.transform[0]:1;c/=u}a={cursor:"pointer"};i&&(a.fill=i),n.stroke&&(a.stroke=n.stroke),c&&(a["stroke-width"]=c),jT(a,t,r,!0)}}function jT(e,t,r,a){var n=JSON.stringify(e),i=r.cssStyleCache[n];i||(i=r.zrId+"-cls-"+TT(),r.cssStyleCache[n]=i,r.cssNodes["."+i+(a?":hover":"")]=e),t["class"]=t["class"]?t["class"]+" "+i:i}var FT=Math.round;function VT(e){return e&&Object(Sa["C"])(e.src)}function zT(e){return e&&Object(Sa["w"])(e.toDataURL)}function BT(e,t,r,a){pT((function(n,i){var o="fill"===n||"stroke"===n;o&&Object(ao["k"])(i)?rI(t,e,n,a):o&&Object(ao["n"])(i)?aI(r,e,n,a):e[n]=o&&"none"===i?"transparent":i}),t,r,!1),tI(r,e,a)}function $T(e,t){var r=Zs(t);r&&(r.each((function(t,r){null!=t&&(e[(gT+r).toLowerCase()]=t+"")})),t.isSilent()&&(e[gT+"silent"]="true"))}function GT(e){return Object(ao["j"])(e[0]-1)&&Object(ao["j"])(e[1])&&Object(ao["j"])(e[2])&&Object(ao["j"])(e[3]-1)}function UT(e){return Object(ao["j"])(e[4])&&Object(ao["j"])(e[5])}function WT(e,t,r){if(t&&(!UT(t)||!GT(t))){var a=r?10:1e4;e.transform=GT(t)?"translate("+FT(t[4]*a)/a+" "+FT(t[5]*a)/a+")":Object(ao["e"])(t)}}function HT(e,t,r){for(var a=e.points,n=[],i=0;i<a.length;i++)n.push(FT(a[i][0]*r)/r),n.push(FT(a[i][1]*r)/r);t.points=n.join(" ")}function qT(e){return!e.smooth}function YT(e){var t=Object(Sa["H"])(e,(function(e){return"string"===typeof e?[e,e]:e}));return function(e,r,a){for(var n=0;n<t.length;n++){var i=t[n],o=e[i[0]];null!=o&&(r[i[1]]=FT(o*a)/a)}}}var XT={circle:[YT(["cx","cy","r"])],polyline:[HT,qT],polygon:[HT,qT]};function ZT(e){for(var t=e.animators,r=0;r<t.length;r++)if("shape"===t[r].targetName)return!0;return!1}function KT(e,t){var r=e.style,a=e.shape,n=XT[e.type],i={},o=t.animation,s="path",l=e.style.strokePercent,c=t.compress&&Object(ao["f"])(e)||4;if(!n||t.willUpdate||n[1]&&!n[1](a)||o&&ZT(e)||l<1){var u=!e.path||e.shapeChanged();e.path||e.createPathProxy();var p=e.path;u&&(p.beginPath(),e.buildPath(p,e.shape),e.pathUpdated());var d=p.getVersion(),h=e,f=h.__svgPathBuilder;h.__svgPathVersion===d&&f&&l===h.__svgPathStrokePercent||(f||(f=h.__svgPathBuilder=new nT),f.reset(c),p.rebuildPath(f,l),f.generateStr(),h.__svgPathVersion=d,h.__svgPathStrokePercent=l),i.d=f.getStr()}else{s=e.type;var m=Math.pow(10,c);n[0](a,i,m)}return WT(i,e.transform),BT(i,r,e,t),$T(i,e),t.animation&&RT(e,i,t),t.emphasis&<(e,i,t),yT(s,e.id+"",i)}function JT(e,t){var r=e.style,a=r.image;if(a&&!Object(Sa["C"])(a)&&(VT(a)?a=a.src:zT(a)&&(a=a.toDataURL())),a){var n=r.x||0,i=r.y||0,o=r.width,s=r.height,l={href:a,width:o,height:s};return n&&(l.x=n),i&&(l.y=i),WT(l,e.transform),BT(l,r,e,t),$T(l,e),t.animation&&RT(e,l,t),yT("image",e.id+"",l)}}function QT(e,t){var r=e.style,a=r.text;if(null!=a&&(a+=""),a&&!isNaN(r.x)&&!isNaN(r.y)){var n=r.font||gs["a"],i=r.x||0,o=Object(ao["b"])(r.y||0,Ss(n),r.textBaseline),s=ao["a"][r.textAlign]||r.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(Rp(r)){var c="",u=r.fontStyle,p=Np(r.fontSize);if(!parseFloat(p))return;var d=r.fontFamily||gs["b"],h=r.fontWeight;c+="font-size:"+p+";font-family:"+d+";",u&&"normal"!==u&&(c+="font-style:"+u+";"),h&&"normal"!==h&&(c+="font-weight:"+h+";"),l.style=c}else l.style="font: "+n;return a.match(/\s/)&&(l["xml:space"]="preserve"),i&&(l.x=i),o&&(l.y=o),WT(l,e.transform),BT(l,r,e,t),$T(l,e),t.animation&&RT(e,l,t),yT("text",e.id+"",l,void 0,a)}}function eI(e,t){return e instanceof lp?KT(e,t):e instanceof gp?JT(e,t):e instanceof pp?QT(e,t):void 0}function tI(e,t,r){var a=e.style;if(Object(ao["i"])(a)){var n=Object(ao["h"])(e),i=r.shadowCache,o=i[n];if(!o){var s=e.getGlobalScale(),l=s[0],c=s[1];if(!l||!c)return;var u=a.shadowOffsetX||0,p=a.shadowOffsetY||0,d=a.shadowBlur,h=Object(ao["p"])(a.shadowColor),f=h.opacity,m=h.color,g=d/2/l,v=d/2/c,y=g+" "+v;o=r.zrId+"-s"+r.shadowIdx++,r.defs[o]=yT("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[yT("feDropShadow","",{dx:u/l,dy:p/c,stdDeviation:y,"flood-color":m,"flood-opacity":f})]),i[n]=o}t.filter=Object(ao["d"])(o)}}function rI(e,t,r,a){var n,i=e[r],o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(Object(ao["m"])(i))n="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else{if(!Object(ao["o"])(i))return void 0;n="radialGradient",o.cx=Object(Sa["P"])(i.x,.5),o.cy=Object(Sa["P"])(i.y,.5),o.r=Object(Sa["P"])(i.r,.5)}for(var s=i.colorStops,l=[],c=0,u=s.length;c<u;++c){var p=100*Object(ao["q"])(s[c].offset)+"%",d=s[c].color,h=Object(ao["p"])(d),f=h.color,m=h.opacity,g={offset:p};g["stop-color"]=f,m<1&&(g["stop-opacity"]=m),l.push(yT("stop",c+"",g))}var v=yT(n,"",o,l),y=xT(v),b=a.gradientCache,_=b[y];_||(_=a.zrId+"-g"+a.gradientIdx++,b[y]=_,o.id=_,a.defs[_]=yT(n,_,o,l)),t[r]=Object(ao["d"])(_)}function aI(e,t,r,a){var n,i=e.style[r],o=e.getBoundingRect(),s={},l=i.repeat,c="no-repeat"===l,u="repeat-x"===l,p="repeat-y"===l;if(Object(ao["l"])(i)){var d=i.imageWidth,h=i.imageHeight,f=void 0,m=i.image;if(Object(Sa["C"])(m)?f=m:VT(m)?f=m.src:zT(m)&&(f=m.toDataURL()),"undefined"===typeof Image){var g="Image width/height must been given explictly in svg-ssr renderer.";Object(Sa["b"])(d,g),Object(Sa["b"])(h,g)}else if(null==d||null==h){var v=function(e,t){if(e){var r=e.elm,a=d||t.width,n=h||t.height;"pattern"===e.tag&&(u?(n=1,a/=o.width):p&&(a=1,n/=o.height)),e.attrs.width=a,e.attrs.height=n,r&&(r.setAttribute("width",a),r.setAttribute("height",n))}},y=Oc(f,null,e,(function(e){c||v(w,e),v(n,e)}));y&&y.width&&y.height&&(d=d||y.width,h=h||y.height)}n=yT("image","img",{href:f,width:d,height:h}),s.width=d,s.height=h}else i.svgElement&&(n=Object(Sa["d"])(i.svgElement),s.width=i.svgWidth,s.height=i.svgHeight);if(n){var b,_;c?b=_=1:u?(_=1,b=s.width/o.width):p?(b=1,_=s.height/o.height):s.patternUnits="userSpaceOnUse",null==b||isNaN(b)||(s.width=b),null==_||isNaN(_)||(s.height=_);var x=Object(ao["g"])(i);x&&(s.patternTransform=x);var w=yT("pattern","",s,[n]),S=xT(w),D=a.patternCache,C=D[S];C||(C=a.zrId+"-p"+a.patternIdx++,D[S]=C,s.id=C,w=a.defs[C]=yT("pattern",C,s,[n])),t[r]=Object(ao["d"])(C)}}function nI(e,t,r){var a=r.clipPathCache,n=r.defs,i=a[e.id];if(!i){i=r.zrId+"-c"+r.clipPathIdx++;var o={id:i};a[e.id]=i,n[i]=yT("clipPath",i,o,[KT(e,r)])}t["clip-path"]=Object(ao["d"])(i)}function iI(e){return document.createTextNode(e)}function oI(e,t,r){e.insertBefore(t,r)}function sI(e,t){e.removeChild(t)}function lI(e,t){e.appendChild(t)}function cI(e){return e.parentNode}function uI(e){return e.nextSibling}function pI(e,t){e.textContent=t}var dI=58,hI=120,fI=yT("","");function mI(e){return void 0===e}function gI(e){return void 0!==e}function vI(e,t,r){for(var a={},n=t;n<=r;++n){var i=e[n].key;void 0!==i&&(a[i]=n)}return a}function yI(e,t){var r=e.key===t.key,a=e.tag===t.tag;return a&&r}function bI(e){var t,r=e.children,a=e.tag;if(gI(a)){var n=e.elm=vT(a);if(wI(fI,e),Object(Sa["t"])(r))for(t=0;t<r.length;++t){var i=r[t];null!=i&&lI(n,bI(i))}else gI(e.text)&&!Object(Sa["A"])(e.text)&&lI(n,iI(e.text))}else e.elm=iI(e.text);return e.elm}function _I(e,t,r,a,n){for(;a<=n;++a){var i=r[a];null!=i&&oI(e,bI(i),t)}}function xI(e,t,r,a){for(;r<=a;++r){var n=t[r];if(null!=n)if(gI(n.tag)){var i=cI(n.elm);sI(i,n.elm)}else sI(e,n.elm)}}function wI(e,t){var r,a=t.elm,n=e&&e.attrs||{},i=t.attrs||{};if(n!==i){for(r in i){var o=i[r],s=n[r];s!==o&&(!0===o?a.setAttribute(r,""):!1===o?a.removeAttribute(r):"style"===r?a.style.cssText=o:r.charCodeAt(0)!==hI?a.setAttribute(r,o):"xmlns:xlink"===r||"xmlns"===r?a.setAttributeNS(fT,r,o):r.charCodeAt(3)===dI?a.setAttributeNS(mT,r,o):r.charCodeAt(5)===dI?a.setAttributeNS(hT,r,o):a.setAttribute(r,o))}for(r in n)r in i||a.removeAttribute(r)}}function SI(e,t,r){var a,n,i,o,s=0,l=0,c=t.length-1,u=t[0],p=t[c],d=r.length-1,h=r[0],f=r[d];while(s<=c&&l<=d)null==u?u=t[++s]:null==p?p=t[--c]:null==h?h=r[++l]:null==f?f=r[--d]:yI(u,h)?(DI(u,h),u=t[++s],h=r[++l]):yI(p,f)?(DI(p,f),p=t[--c],f=r[--d]):yI(u,f)?(DI(u,f),oI(e,u.elm,uI(p.elm)),u=t[++s],f=r[--d]):yI(p,h)?(DI(p,h),oI(e,p.elm,u.elm),p=t[--c],h=r[++l]):(mI(a)&&(a=vI(t,s,c)),n=a[h.key],mI(n)?oI(e,bI(h),u.elm):(i=t[n],i.tag!==h.tag?oI(e,bI(h),u.elm):(DI(i,h),t[n]=void 0,oI(e,i.elm,u.elm))),h=r[++l]);(s<=c||l<=d)&&(s>c?(o=null==r[d+1]?null:r[d+1].elm,_I(e,o,r,l,d)):xI(e,t,s,c))}function DI(e,t){var r=t.elm=e.elm,a=e.children,n=t.children;e!==t&&(wI(e,t),mI(t.text)?gI(a)&&gI(n)?a!==n&&SI(r,a,n):gI(n)?(gI(e.text)&&pI(r,""),_I(r,null,n,0,n.length-1)):gI(a)?xI(r,a,0,a.length-1):gI(e.text)&&pI(r,""):e.text!==t.text&&(gI(a)&&xI(r,a,0,a.length-1),pI(r,t.text)))}function CI(e,t){if(yI(e,t))DI(e,t);else{var r=e.elm,a=cI(r);bI(t),null!==a&&(oI(a,t.elm,uI(r)),xI(a,[e],0,0))}return t}var TI=0,II=function(){function e(e,t,r){if(this.type="svg",this.refreshHover=OI("refreshHover"),this.configLayer=OI("configLayer"),this.storage=t,this._opts=r=Object(Sa["m"])({},r),this.root=e,this._id="zr"+TI++,this._oldVNode=DT(r.width,r.height),e&&!r.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var n=this._svgDom=this._oldVNode.elm=vT("svg");wI(null,this._oldVNode),a.appendChild(n),e.appendChild(a)}this.resize(r.width,r.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",CI(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return eI(e,ST(this._id))},e.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),r=this._width,a=this._height,n=ST(this._id);n.animation=e.animation,n.willUpdate=e.willUpdate,n.compress=e.compress,n.emphasis=e.emphasis;var i=[],o=this._bgVNode=MI(r,a,this._backgroundColor,n);o&&i.push(o);var s=e.compress?null:this._mainVNode=yT("g","main",{},[]);this._paintList(t,n,s?s.children:i),s&&i.push(s);var l=Object(Sa["H"])(Object(Sa["F"])(n.defs),(function(e){return n.defs[e]}));if(l.length&&i.push(yT("defs","defs",{},l)),e.animation){var c=wT(n.cssNodes,n.cssAnims,{newline:!0});if(c){var u=yT("style","stl",{},[],c);i.push(u)}}return DT(r,a,i,e.useViewBox)},e.prototype.renderToString=function(e){return e=e||{},xT(this.renderToVNode({animation:Object(Sa["P"])(e.cssAnimation,!0),emphasis:Object(Sa["P"])(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Object(Sa["P"])(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,r){for(var a,n,i=e.length,o=[],s=0,l=0,c=0;c<i;c++){var u=e[c];if(!u.invisible){var p=u.__clipPaths,d=p&&p.length||0,h=n&&n.length||0,f=void 0;for(f=Math.max(d-1,h-1);f>=0;f--)if(p&&n&&p[f]===n[f])break;for(var m=h-1;m>f;m--)s--,a=o[s-1];for(var g=f+1;g<d;g++){var v={};nI(p[g],v,t);var y=yT("g","clip-g-"+l++,v,[]);(a?a.children:r).push(y),o[s++]=y,a=y}n=p;var b=eI(u,t);b&&(a?a.children:r).push(b)}}},e.prototype.resize=function(e,t){var r=this._opts,a=this.root,n=this._viewport;if(null!=e&&(r.width=e),null!=t&&(r.height=t),a&&n&&(n.style.display="none",e=Pw(a,0,r),t=Pw(a,1,r),n.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,n){var i=n.style;i.width=e+"px",i.height=t+"px"}if(Object(ao["n"])(this._backgroundColor))this.refresh();else{var o=this._svgDom;o&&(o.setAttribute("width",e),o.setAttribute("height",t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute("width",e),s.setAttribute("height",t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),r="data:image/svg+xml;";return e?(t=Object(ao["c"])(t),t&&r+"base64,"+t):r+"charset=UTF-8,"+encodeURIComponent(t)},e}();function OI(e){return function(){0}}function MI(e,t,r,a){var n;if(r&&"none"!==r)if(n=yT("rect","bg",{width:e,height:t,x:"0",y:"0"}),Object(ao["k"])(r))rI({fill:r},n.attrs,"fill",a);else if(Object(ao["n"])(r))aI({style:{fill:r},dirty:Sa["L"],getBoundingRect:function(){return{width:e,height:t}}},n.attrs,"fill",a);else{var i=Object(ao["p"])(r),o=i.color,s=i.opacity;n.attrs.fill=o,s<1&&(n.attrs["fill-opacity"]=s)}return n}var AI=II;function kI(e){e.registerPainter("svg",AI)}function PI(e){return null==e?0:e.length||1}function NI(e){return e}var EI=function(){function e(e,t,r,a,n,i){this._old=e,this._new=t,this._oldKeyGetter=r||NI,this._newKeyGetter=a||NI,this.context=n,this._diffModeMultiple="multiple"===i}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,r={},a=new Array(e.length),n=new Array(t.length);this._initIndexMap(e,null,a,"_oldKeyGetter"),this._initIndexMap(t,r,n,"_newKeyGetter");for(var i=0;i<e.length;i++){var o=a[i],s=r[o],l=PI(s);if(l>1){var c=s.shift();1===s.length&&(r[o]=s[0]),this._update&&this._update(c,i)}else 1===l?(r[o]=null,this._update&&this._update(s,i)):this._remove&&this._remove(i)}this._performRestAdd(n,r)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,r={},a={},n=[],i=[];this._initIndexMap(e,r,n,"_oldKeyGetter"),this._initIndexMap(t,a,i,"_newKeyGetter");for(var o=0;o<n.length;o++){var s=n[o],l=r[s],c=a[s],u=PI(l),p=PI(c);if(u>1&&1===p)this._updateManyToOne&&this._updateManyToOne(c,l),a[s]=null;else if(1===u&&p>1)this._updateOneToMany&&this._updateOneToMany(c,l),a[s]=null;else if(1===u&&1===p)this._update&&this._update(c,l),a[s]=null;else if(u>1&&p>1)this._updateManyToMany&&this._updateManyToMany(c,l),a[s]=null;else if(u>1)for(var d=0;d<u;d++)this._remove&&this._remove(l[d]);else this._remove&&this._remove(l)}this._performRestAdd(i,a)},e.prototype._performRestAdd=function(e,t){for(var r=0;r<e.length;r++){var a=e[r],n=t[a],i=PI(n);if(i>1)for(var o=0;o<i;o++)this._add&&this._add(n[o]);else 1===i&&this._add&&this._add(n);t[a]=null}},e.prototype._initIndexMap=function(e,t,r,a){for(var n=this._diffModeMultiple,i=0;i<e.length;i++){var o="_ec_"+this[a](e[i],i);if(n||(r[i]=o),t){var s=t[o],l=PI(s);0===l?(t[o]=i,n&&r.push(o)):1===l?t[o]=[s,i]:s.push(i)}}},e}(),RI=EI,LI=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function jI(e,t){var r={},a=r.encode={},n=Object(Sa["f"])(),i=[],o=[],s={};Object(Sa["k"])(e.dimensions,(function(t){var r=e.getDimensionInfo(t),l=r.coordDim;if(l){0;var c=r.coordDimIndex;FI(a,l)[c]=t,r.isExtraCoord||(n.set(l,1),zI(r.type)&&(i[0]=t),FI(s,l)[c]=e.getDimensionIndex(r.name)),r.defaultTooltip&&o.push(t)}ym.each((function(e,t){var n=FI(a,t),i=r.otherDims[t];null!=i&&!1!==i&&(n[i]=r.name)}))}));var l=[],c={};n.each((function(e,t){var r=a[t];c[t]=r[0],l=l.concat(r)})),r.dataDimsOnCoord=l,r.dataDimIndicesOnCoord=Object(Sa["H"])(l,(function(t){return e.getDimensionInfo(t).storeDimIndex})),r.encodeFirstDimNotExtra=c;var u=a.label;u&&u.length&&(i=u.slice());var p=a.tooltip;return p&&p.length?o=p.slice():o.length||(o=i.slice()),a.defaultedLabel=i,a.defaultedTooltip=o,r.userOutput=new LI(s,t),r}function FI(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function VI(e){return"category"===e?"ordinal":"time"===e?"time":"float"}function zI(e){return!("ordinal"===e||"time"===e)}var BI=function(){function e(e){this.otherDims={},null!=e&&Sa["m"](this,e)}return e}(),$I=BI,GI=Zl(),UI={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},WI=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=YI(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return Object(Sa["P"])(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=ov(this.source),r=!XI(e),a="",n=[],i=0,o=0;i<e;i++){var s=void 0,l=void 0,c=void 0,u=this.dimensions[o];if(u&&u.storeDimIndex===i)s=t?u.name:null,l=u.type,c=u.ordinalMeta,o++;else{var p=this.getSourceDimension(i);p&&(s=t?p.name:null,l=p.type)}n.push({property:s,type:l,ordinalMeta:c}),!t||null==s||u&&u.isCalculationCoord||(a+=r?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),a+="$",a+=UI[l]||"f",c&&(a+=c.uid),a+="$"}var d=this.source,h=[d.seriesLayoutBy,d.startIndex,a].join("$$");return{dimensions:n,hash:h}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,r=0;t<this._fullDimCount;t++){var a=void 0,n=this.dimensions[r];if(n&&n.storeDimIndex===t)n.isCalculationCoord||(a=n.name),r++;else{var i=this.getSourceDimension(t);i&&(a=i.name)}e.push(a)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function HI(e){return e instanceof WI}function qI(e){for(var t=Object(Sa["f"])(),r=0;r<(e||[]).length;r++){var a=e[r],n=Object(Sa["A"])(a)?a.name:a;null!=n&&null==t.get(n)&&t.set(n,r)}return t}function YI(e){var t=GI(e);return t.dimNameMap||(t.dimNameMap=qI(e.dimensionsDefine))}function XI(e){return e>30}var ZI,KI,JI,QI,eO,tO,rO,aO=Sa["A"],nO=Sa["H"],iO="undefined"===typeof Int32Array?Array:Int32Array,oO="e\0\0",sO=-1,lO=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],cO=["_approximateExtent"],uO=function(){function e(e,t){var r;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var a=!1;HI(e)?(r=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(a=!0,r=e),r=r||["x","y"];for(var n={},i=[],o={},s=!1,l={},c=0;c<r.length;c++){var u=r[c],p=Sa["C"](u)?new $I({name:u}):u instanceof $I?u:new $I(u),d=p.name;p.type=p.type||"float",p.coordDim||(p.coordDim=d,p.coordDimIndex=0);var h=p.otherDims=p.otherDims||{};i.push(d),n[d]=p,null!=l[d]&&(s=!0),p.createInvertedIndices&&(o[d]=[]),0===h.itemName&&(this._nameDimIdx=c),0===h.itemId&&(this._idDimIdx=c),a&&(p.storeDimIndex=c)}if(this.dimensions=i,this._dimInfos=n,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){var f=this._dimIdxToName=Sa["f"]();Sa["k"](i,(function(e){f.set(n[e].storeDimIndex,e)}))}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(null==t)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var r=this._dimIdxToName.get(t);if(null!=r)return r;var a=this._schema.getSourceDimension(t);return a?a.name:void 0},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(null!=t)return t;if(null==e)return-1;var r=this._getDimInfo(e);return r?r.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(Sa["z"](e)||null!=e&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);return t},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var r=this._dimSummary;if(null==t)return r.encodeFirstDimNotExtra[e];var a=r.encode[e];return a?a[t]:null},e.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,r=t.encode[e];return(r||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,r){var a,n=this;if(e instanceof ry&&(a=e),!a){var i=this.dimensions,o=Kg(e)||Sa["u"](e)?new sv(e,i.length):e;a=new ry;var s=nO(i,(function(e){return{type:n._dimInfos[e].type,property:e}}));a.initData(o,s,r)}this._store=a,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=jI(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var r=this._store.appendValues(e,t.length),a=r.start,n=r.end,i=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var o=a;o<n;o++){var s=o-a;this._nameList[o]=t[s],i&&rO(this,o)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,r=0;r<t.length;r++){var a=this._dimInfos[t[r]];a.ordinalMeta&&e.collectOrdinalMeta(a.storeDimIndex,a.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return null==this._idDimIdx&&e.getSource().sourceFormat!==Sm&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var r=this._store,a=r.getProvider();this._updateOrdinalMeta();var n=this._nameList,i=this._idList,o=a.getSource().sourceFormat,s=o===bm;if(s&&!a.pure)for(var l=[],c=e;c<t;c++){var u=a.getItem(c,l);if(!this.hasItemOption&&Pl(u)&&(this.hasItemOption=!0),u){var p=u.name;null==n[c]&&null!=p&&(n[c]=$l(p,null));var d=u.id;null==i[c]&&null!=d&&(i[c]=$l(d,null))}}if(this._shouldMakeIdFromName())for(c=e;c<t;c++)rO(this,c);ZI(this)}},e.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){aO(e)?Sa["m"](this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),r=this._nameList[t];return null==r&&null!=this._nameDimIdx&&(r=JI(this,this._nameDimIdx,t)),null==r&&(r=""),r},e.prototype._getCategory=function(e,t){var r=this._store.get(e,t),a=this._store.getOrdinalMeta(e);return a?a.categories[r]:r},e.prototype.getId=function(e){return KI(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var r=this._store,a=this._dimInfos[e];if(a)return r.get(a.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var r=this._store,a=this._dimInfos[e];if(a)return r.getByRawIndex(a.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var r=this,a=this._store;return Sa["t"](e)?a.getValues(nO(e,(function(e){return r._getStoreDimIndex(e)})),t):a.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,r=0,a=t.length;r<a;r++)if(isNaN(this._store.get(t[r],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,r=this._store.count();t<r;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var r=e&&this._invertedIndicesMap[e];var a=r[t];return null==a||isNaN(a)?sO:a},e.prototype.indicesOfNearest=function(e,t,r){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,r)},e.prototype.each=function(e,t,r){Sa["w"](e)&&(r=t,t=e,e=[]);var a=r||this,n=nO(QI(e),this._getStoreDimIndex,this);this._store.each(n,a?Sa["c"](t,a):t)},e.prototype.filterSelf=function(e,t,r){Sa["w"](e)&&(r=t,t=e,e=[]);var a=r||this,n=nO(QI(e),this._getStoreDimIndex,this);return this._store=this._store.filter(n,a?Sa["c"](t,a):t),this},e.prototype.selectRange=function(e){var t=this,r={},a=Sa["F"](e),n=[];return Sa["k"](a,(function(a){var i=t._getStoreDimIndex(a);r[i]=e[a],n.push(i)})),this._store=this._store.selectRange(r),this},e.prototype.mapArray=function(e,t,r){Sa["w"](e)&&(r=t,t=e,e=[]),r=r||this;var a=[];return this.each(e,(function(){a.push(t&&t.apply(this,arguments))}),r),a},e.prototype.map=function(e,t,r,a){var n=r||a||this,i=nO(QI(e),this._getStoreDimIndex,this),o=tO(this);return o._store=this._store.map(i,n?Sa["c"](t,n):t),o},e.prototype.modify=function(e,t,r,a){var n=r||a||this;var i=nO(QI(e),this._getStoreDimIndex,this);this._store.modify(i,n?Sa["c"](t,n):t)},e.prototype.downSample=function(e,t,r,a){var n=tO(this);return n._store=this._store.downSample(this._getStoreDimIndex(e),t,r,a),n},e.prototype.lttbDownSample=function(e,t){var r=tO(this);return r._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),r},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel,r=this.getRawDataItem(e);return new Uh(r,t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new RI(e?e.getStore().getIndices():[],this.getStore().getIndices(),(function(t){return KI(e,t)}),(function(e){return KI(t,e)}))},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},aO(e)?Sa["m"](this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var r=this._itemVisuals[e],a=r&&r[t];return null==a?this.getVisual(t):a},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var r=this._itemVisuals,a=r[e];a||(a=r[e]={});var n=a[t];return null==n&&(n=this.getVisual(t),Sa["t"](n)?n=n.slice():aO(n)&&(n=Sa["m"]({},n)),a[t]=n),n},e.prototype.setItemVisual=function(e,t,r){var a=this._itemVisuals[e]||{};this._itemVisuals[e]=a,aO(t)?Sa["m"](a,t):a[t]=r},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){aO(e)?Sa["m"](this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,r){this._itemLayouts[e]=r?Sa["m"](this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){var r=this.hostModel&&this.hostModel.seriesIndex;Wp(r,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){Sa["k"](this._graphicEls,(function(r,a){r&&e&&e.call(t,r,a)}))},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:nO(this.dimensions,this._getDimInfo,this),this.hostModel)),eO(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var r=this[e];Sa["w"](r)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=r.apply(this,arguments);return t.apply(this,[e].concat(Sa["S"](arguments)))})},e.internalField=function(){ZI=function(e){var t=e._invertedIndicesMap;Sa["k"](t,(function(r,a){var n=e._dimInfos[a],i=n.ordinalMeta,o=e._store;if(i){r=t[a]=new iO(i.categories.length);for(var s=0;s<r.length;s++)r[s]=sO;for(s=0;s<o.count();s++)r[o.get(n.storeDimIndex,s)]=s}}))},JI=function(e,t,r){return $l(e._getCategory(t,r),null)},KI=function(e,t){var r=e._idList[t];return null==r&&null!=e._idDimIdx&&(r=JI(e,e._idDimIdx,t)),null==r&&(r=oO+t),r},QI=function(e){return Sa["t"](e)||(e=null!=e?[e]:[]),e},tO=function(t){var r=new e(t._schema?t._schema:nO(t.dimensions,t._getDimInfo,t),t.hostModel);return eO(r,t),r},eO=function(e,t){Sa["k"](lO.concat(t.__wrappedMethods||[]),(function(r){t.hasOwnProperty(r)&&(e[r]=t[r])})),e.__wrappedMethods=t.__wrappedMethods,Sa["k"](cO,(function(r){e[r]=Sa["d"](t[r])})),e._calculationInfo=Sa["m"]({},t._calculationInfo)},rO=function(e,t){var r=e._nameList,a=e._idList,n=e._nameDimIdx,i=e._idDimIdx,o=r[t],s=a[t];if(null==o&&null!=n&&(r[t]=o=JI(e,n,t)),null==s&&null!=i&&(a[t]=s=JI(e,i,t)),null==s&&null!=o){var l=e._nameRepeatCount,c=l[o]=(l[o]||0)+1;s=o,c>1&&(s+="__ec__"+c),a[t]=s}}}(),e}(),pO=uO;function dO(e,t){Kg(e)||(e=Qg(e)),t=t||{};var r=t.coordDimensions||[],a=t.dimensionsDefine||e.dimensionsDefine||[],n=Object(Sa["f"])(),i=[],o=fO(e,r,a,t.dimensionsCount),s=t.canOmitUnusedDimensions&&XI(o),l=a===e.dimensionsDefine,c=l?YI(e):qI(a),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var p=Object(Sa["f"])(u),d=new Yv(o),h=0;h<d.length;h++)d[h]=-1;function f(e){var t=d[e];if(t<0){var r=a[e],n=Object(Sa["A"])(r)?r:{name:r},o=new $I,s=n.name;null!=s&&null!=c.get(s)&&(o.name=o.displayName=s),null!=n.type&&(o.type=n.type),null!=n.displayName&&(o.displayName=n.displayName);var l=i.length;return d[e]=l,o.storeDimIndex=e,i.push(o),o}return i[t]}if(!s)for(h=0;h<o;h++)f(h);p.each((function(e,t){var r=Ol(e).slice();if(1===r.length&&!Object(Sa["C"])(r[0])&&r[0]<0)p.set(t,!1);else{var a=p.set(t,[]);Object(Sa["k"])(r,(function(e,r){var n=Object(Sa["C"])(e)?c.get(e):e;null!=n&&n<o&&(a[r]=n,g(f(n),t,r))}))}}));var m=0;function g(e,t,r){null!=ym.get(t)?e.otherDims[t]=r:(e.coordDim=t,e.coordDimIndex=r,n.set(t,!0))}Object(Sa["k"])(r,(function(e){var t,r,a,n;if(Object(Sa["C"])(e))t=e,n={};else{n=e,t=n.name;var i=n.ordinalMeta;n.ordinalMeta=null,n=Object(Sa["m"])({},n),n.ordinalMeta=i,r=n.dimsDef,a=n.otherDims,n.name=n.coordDim=n.coordDimIndex=n.dimsDef=n.otherDims=null}var s=p.get(t);if(!1!==s){if(s=Ol(s),!s.length)for(var c=0;c<(r&&r.length||1);c++){while(m<o&&null!=f(m).coordDim)m++;m<o&&s.push(m++)}Object(Sa["k"])(s,(function(e,i){var o=f(e);if(l&&null!=n.type&&(o.type=n.type),g(Object(Sa["i"])(o,n),t,i),null==o.name&&r){var s=r[i];!Object(Sa["A"])(s)&&(s={name:s}),o.name=o.displayName=s.name,o.defaultTooltip=s.defaultTooltip}a&&Object(Sa["i"])(o.otherDims,a)}))}}));var v=t.generateCoord,y=t.generateCoordCount,b=null!=y;y=v?y||1:0;var _=v||"value";function x(e){null==e.name&&(e.name=e.coordDim)}if(s)Object(Sa["k"])(i,(function(e){x(e)})),i.sort((function(e,t){return e.storeDimIndex-t.storeDimIndex}));else for(var w=0;w<o;w++){var S=f(w),D=S.coordDim;null==D&&(S.coordDim=mO(_,n,b),S.coordDimIndex=0,(!v||y<=0)&&(S.isExtraCoord=!0),y--),x(S),null!=S.type||Em(e,w)!==Im.Must&&(!S.isExtraCoord||null==S.otherDims.itemName&&null==S.otherDims.seriesName)||(S.type="ordinal")}return hO(i),new WI({source:e,dimensions:i,fullDimensionCount:o,dimensionOmitted:s})}function hO(e){for(var t=Object(Sa["f"])(),r=0;r<e.length;r++){var a=e[r],n=a.name,i=t.get(n)||0;i>0&&(a.name=n+(i-1)),i++,t.set(n,i)}}function fO(e,t,r,a){var n=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,a||0);return Object(Sa["k"])(t,(function(e){var t;Object(Sa["A"])(e)&&(t=e.dimsDef)&&(n=Math.max(n,t.length))})),n}function mO(e,t,r){if(r||t.hasKey(e)){var a=0;while(t.hasKey(e+a))a++;e+=a}return t.set(e,!0),e}var gO=function(){function e(e){this.coordSysDims=[],this.axisMap=Object(Sa["f"])(),this.categoryAxisMap=Object(Sa["f"])(),this.coordSysName=e}return e}();function vO(e){var t=e.get("coordinateSystem"),r=new gO(t),a=yO[t];if(a)return a(e,r,r.axisMap,r.categoryAxisMap),r}var yO={cartesian2d:function(e,t,r,a){var n=e.getReferringComponents("xAxis",ec).models[0],i=e.getReferringComponents("yAxis",ec).models[0];t.coordSysDims=["x","y"],r.set("x",n),r.set("y",i),bO(n)&&(a.set("x",n),t.firstCategoryDimIndex=0),bO(i)&&(a.set("y",i),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,a){var n=e.getReferringComponents("singleAxis",ec).models[0];t.coordSysDims=["single"],r.set("single",n),bO(n)&&(a.set("single",n),t.firstCategoryDimIndex=0)},polar:function(e,t,r,a){var n=e.getReferringComponents("polar",ec).models[0],i=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],r.set("radius",i),r.set("angle",o),bO(i)&&(a.set("radius",i),t.firstCategoryDimIndex=0),bO(o)&&(a.set("angle",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,r,a){t.coordSysDims=["lng","lat"]},parallel:function(e,t,r,a){var n=e.ecModel,i=n.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=i.dimensions.slice();Object(Sa["k"])(i.parallelAxisIndex,(function(e,i){var s=n.getComponent("parallelAxis",e),l=o[i];r.set(l,s),bO(s)&&(a.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=i))}))}};function bO(e){return"category"===e.get("type")}function _O(e,t,r){r=r||{};var a,n,i,o=r.byIndex,s=r.stackedCoordDimension;xO(t)?a=t:(n=t.schema,a=n.dimensions,i=t.store);var l,c,u,p,d=!(!e||!e.get("stack"));if(Object(Sa["k"])(a,(function(e,t){Object(Sa["C"])(e)&&(a[t]=e={name:e}),d&&!e.isExtraCoord&&(o||l||!e.ordinalMeta||(l=e),c||"ordinal"===e.type||"time"===e.type||s&&s!==e.coordDim||(c=e))})),!c||o||l||(o=!0),c){u="__\0ecstackresult_"+e.id,p="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var h=c.coordDim,f=c.type,m=0;Object(Sa["k"])(a,(function(e){e.coordDim===h&&m++}));var g={name:u,coordDim:h,coordDimIndex:m,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},v={name:p,coordDim:p,coordDimIndex:m+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};n?(i&&(g.storeDimIndex=i.ensureCalculationDimension(p,f),v.storeDimIndex=i.ensureCalculationDimension(u,f)),n.appendCalculationDimension(g),n.appendCalculationDimension(v)):(a.push(g),a.push(v))}return{stackedDimension:c&&c.name,stackedByDimension:l&&l.name,isStackedByIndex:o,stackedOverDimension:p,stackResultDimension:u}}function xO(e){return!HI(e.schema)}function wO(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function SO(e,t){return wO(e,t)?e.getCalculationInfo("stackResultDimension"):t}function DO(e,t){var r,a=e.get("coordinateSystem"),n=pg.get(a);return t&&t.coordSysDims&&(r=Sa["H"](t.coordSysDims,(function(e){var r={name:e},a=t.axisMap.get(e);if(a){var n=a.get("type");r.type=VI(n)}return r}))),r||(r=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),r}function CO(e,t,r){var a,n;return r&&Sa["k"](e,(function(e,i){var o=e.coordDim,s=r.categoryAxisMap.get(o);s&&(null==a&&(a=i),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(n=!0)})),n||null==a||(e[a].otherDims.itemName=0),a}function TO(e,t,r){r=r||{};var a,n=t.getSourceManager(),i=!1;e?(i=!0,a=Qg(e)):(a=n.getSource(),i=a.sourceFormat===bm);var o=vO(t),s=DO(t,o),l=r.useEncodeDefaulter,c=Sa["w"](l)?l:l?Sa["h"](Am,s,t):null,u={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:c,canOmitUnusedDimensions:!i},p=dO(a,u),d=CO(p.dimensions,r.createInvertedIndices,o),h=i?null:n.getSharedDataStore(p),f=_O(t,{schema:p,store:h}),m=new pO(p,t);m.setCalculationInfo(f);var g=null!=d&&IO(a)?function(e,t,r,a){return a===d?r:this.defaultDimValueGetter(e,t,r,a)}:null;return m.hasItemOption=!1,m.initData(i?a:h,null,g),m}function IO(e){if(e.sourceFormat===bm){var t=OO(e.data||[]);return!Sa["t"](kl(t))}}function OO(e){var t=0;while(t<e.length&&null==e[t])t++;return e[t]}var MO=TO,AO=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return xa(t,e),t.prototype.getInitialData=function(e){return MO(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Bs,r=Sw("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(r),r.setStyle(e.lineStyle);var a=this.getData().getVisual("symbol"),n=this.getData().getVisual("symbolRotate"),i="none"===a?"circle":a,o=.8*e.itemHeight,s=Sw(i,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);t.add(s),s.setStyle(e.itemStyle);var l="inherit"===e.iconRotate?n:e.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),i.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),t},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(By),kO=AO;function PO(e,t){var r=e.mapDimensionsAll("defaultedLabel"),a=r.length;if(1===a){var n=yv(e,t,r[0]);return null!=n?n+"":null}if(a){for(var i=[],o=0;o<r.length;o++)i.push(yv(e,t,r[o]));return i.join(" ")}}function NO(e,t){var r=e.mapDimensionsAll("defaultedLabel");if(!Object(Sa["t"])(t))return t+"";for(var a=[],n=0;n<r.length;n++){var i=e.getDimensionIndex(r[n]);i>=0&&a.push(t[i])}return a.join(" ")}var EO=function(e){function t(t,r,a,n){var i=e.call(this)||this;return i.updateData(t,r,a,n),i}return xa(t,e),t.prototype._createSymbol=function(e,t,r,a,n){this.removeAll();var i=Sw(e,-1,-1,2,2,null,n);i.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),i.drift=RO,this._symbolType=e,this.add(i)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Id(this.childAt(0))},t.prototype.downplay=function(){Od(this.childAt(0))},t.prototype.setZ=function(e,t){var r=this.childAt(0);r.zlevel=e,r.z=t},t.prototype.setDraggable=function(e,t){var r=this.childAt(0);r.draggable=e,r.cursor=!t&&e?"move":r.cursor},t.prototype.updateData=function(e,r,a,n){this.silent=!1;var i=e.getItemVisual(r,"symbol")||"circle",o=e.hostModel,s=t.getSymbolSize(e,r),l=i!==this._symbolType,c=n&&n.disableAnimation;if(l){var u=e.getItemVisual(r,"symbolKeepAspect");this._createSymbol(i,e,r,s,u)}else{var p=this.childAt(0);p.silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};c?p.attr(d):sh(p,d,o,r),hh(p)}if(this._updateCommon(e,r,s,a,n),l){p=this.childAt(0);if(!c){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,lh(p,d,o,r)}}c&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,r,a,n){var i,o,s,l,c,u,p,d,h,f=this.childAt(0),m=e.hostModel;if(a&&(i=a.emphasisItemStyle,o=a.blurItemStyle,s=a.selectItemStyle,l=a.focus,c=a.blurScope,p=a.labelStatesModels,d=a.hoverScale,h=a.cursorStyle,u=a.emphasisDisabled),!a||e.hasItemOption){var g=a&&a.itemModel?a.itemModel:e.getItemModel(t),v=g.getModel("emphasis");i=v.getModel("itemStyle").getItemStyle(),s=g.getModel(["select","itemStyle"]).getItemStyle(),o=g.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),c=v.get("blurScope"),u=v.get("disabled"),p=bh(g),d=v.getShallow("scale"),h=g.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var b=Cw(e.getItemVisual(t,"symbolOffset"),r);b&&(f.x=b[0],f.y=b[1]),h&&f.attr("cursor",h);var _=e.getItemVisual(t,"style"),x=_.fill;if(f instanceof gp){var w=f.style;f.useStyle(Object(Sa["m"])({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},_))}else f.__isEmptyBrush?f.useStyle(Object(Sa["m"])({},_)):f.useStyle(_),f.style.decal=null,f.setColor(x,n&&n.symbolInnerColor),f.style.strokeNoScale=!0;var S=e.getItemVisual(t,"liftZ"),D=this._z2;null!=S?null==D&&(this._z2=f.z2,f.z2+=S):null!=D&&(f.z2=D,this._z2=null);var C=n&&n.useNameLabel;function T(t){return C?e.getName(t):PO(e,t)}yh(f,p,{labelFetcher:m,labelDataIndex:t,defaultText:T,inheritColor:x,defaultOpacity:_.opacity}),this._sizeX=r[0]/2,this._sizeY=r[1]/2;var I=f.ensureState("emphasis");I.style=i,f.ensureState("select").style=s,f.ensureState("blur").style=o;var O=null==d||!0===d?Math.max(1.1,3/this._sizeY):isFinite(d)&&d>0?+d:1;I.scaleX=this._sizeX*O,I.scaleY=this._sizeY*O,this.setSymbolScale(1),Hd(this,l,c,u)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,r){var a=this.childAt(0),n=Up(this).dataIndex,i=r&&r.animation;if(this.silent=a.silent=!0,r&&r.fadeLabel){var o=a.getTextContent();o&&uh(o,{style:{opacity:0}},t,{dataIndex:n,removeOpt:i,cb:function(){a.removeTextContent()}})}else a.removeTextContent();uh(a,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:n,cb:e,removeOpt:i})},t.getSymbolSize=function(e,t){return Dw(e.getItemVisual(t,"symbolSize"))},t}(Bs);function RO(e,t){this.parent.drift(e,t)}var LO=EO;function jO(e,t,r,a){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(a.isIgnore&&a.isIgnore(r))&&!(a.clipShape&&!a.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(r,"symbol")}function FO(e){return null==e||Object(Sa["A"])(e)||(e={isIgnore:e}),e||{}}function VO(e){var t=e.hostModel,r=t.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:bh(t),cursorStyle:t.get("cursor")}}var zO=function(){function e(e){this.group=new Bs,this._SymbolCtor=e||LO}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=FO(t);var r=this.group,a=e.hostModel,n=this._data,i=this._SymbolCtor,o=t.disableAnimation,s=VO(e),l={disableAnimation:o},c=t.getSymbolPoint||function(t){return e.getItemLayout(t)};n||r.removeAll(),e.diff(n).add((function(a){var n=c(a);if(jO(e,n,a,t)){var o=new i(e,a,s,l);o.setPosition(n),e.setItemGraphicEl(a,o),r.add(o)}})).update((function(u,p){var d=n.getItemGraphicEl(p),h=c(u);if(jO(e,h,u,t)){var f=e.getItemVisual(u,"symbol")||"circle",m=d&&d.getSymbolType&&d.getSymbolType();if(!d||m&&m!==f)r.remove(d),d=new i(e,u,s,l),d.setPosition(h);else{d.updateData(e,u,s,l);var g={x:h[0],y:h[1]};o?d.attr(g):sh(d,g,a)}r.add(d),e.setItemGraphicEl(u,d)}else r.remove(d)})).remove((function(e){var t=n.getItemGraphicEl(e);t&&t.fadeOut((function(){r.remove(t)}),a)})).execute(),this._getSymbolPoint=c,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl((function(t,r){var a=e._getSymbolPoint(r);t.setPosition(a),t.markRedraw()}))},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=VO(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,r){function a(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],r=FO(r);for(var n=e.start;n<e.end;n++){var i=t.getItemLayout(n);if(jO(t,i,n,r)){var o=new this._SymbolCtor(t,n,this._seriesScope);o.traverse(a),o.setPosition(i),this.group.add(o),t.setItemGraphicEl(n,o),this._progressiveEls.push(o)}}},e.prototype.eachRendered=function(e){tx(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,r=this._data;r&&e?r.eachItemGraphicEl((function(e){e.fadeOut((function(){t.remove(e)}),r.hostModel)})):t.removeAll()},e}(),BO=zO;function $O(e,t,r){var a=e.getBaseAxis(),n=e.getOtherAxis(a),i=GO(n,r),o=a.dim,s=n.dim,l=t.mapDimension(s),c=t.mapDimension(o),u="x"===s||"radius"===s?1:0,p=Object(Sa["H"])(e.dimensions,(function(e){return t.mapDimension(e)})),d=!1,h=t.getCalculationInfo("stackResultDimension");return wO(t,p[0])&&(d=!0,p[0]=h),wO(t,p[1])&&(d=!0,p[1]=h),{dataDimsForPoint:p,valueStart:i,valueAxisDim:s,baseAxisDim:o,stacked:!!d,valueDim:l,baseDim:c,baseDataOffset:u,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function GO(e,t){var r=0,a=e.scale.getExtent();return"start"===t?r=a[0]:"end"===t?r=a[1]:Object(Sa["z"])(t)&&!isNaN(t)?r=t:a[0]>0?r=a[0]:a[1]<0&&(r=a[1]),r}function UO(e,t,r,a){var n=NaN;e.stacked&&(n=r.get(r.getCalculationInfo("stackedOverDimension"),a)),isNaN(n)&&(n=e.valueStart);var i=e.baseDataOffset,o=[];return o[i]=r.get(e.baseDim,a),o[1-i]=n,t.dataToPoint(o)}var WO="undefined"!==typeof Float32Array,HO=WO?Float32Array:Array;function qO(e){return Object(Sa["t"])(e)?WO?new Float32Array(e):e:new HO(e)}function YO(e,t){var r=[];return t.diff(e).add((function(e){r.push({cmd:"+",idx:e})})).update((function(e,t){r.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){r.push({cmd:"-",idx:e})})).execute(),r}function XO(e,t,r,a,n,i,o,s){for(var l=YO(e,t),c=[],u=[],p=[],d=[],h=[],f=[],m=[],g=$O(n,t,o),v=e.getLayout("points")||[],y=t.getLayout("points")||[],b=0;b<l.length;b++){var _=l[b],x=!0,w=void 0,S=void 0;switch(_.cmd){case"=":w=2*_.idx,S=2*_.idx1;var D=v[w],C=v[w+1],T=y[S],I=y[S+1];(isNaN(D)||isNaN(C))&&(D=T,C=I),c.push(D,C),u.push(T,I),p.push(r[w],r[w+1]),d.push(a[S],a[S+1]),m.push(t.getRawIndex(_.idx1));break;case"+":var O=_.idx,M=g.dataDimsForPoint,A=n.dataToPoint([t.get(M[0],O),t.get(M[1],O)]);S=2*O,c.push(A[0],A[1]),u.push(y[S],y[S+1]);var k=UO(g,n,t,O);p.push(k[0],k[1]),d.push(a[S],a[S+1]),m.push(t.getRawIndex(O));break;case"-":x=!1}x&&(h.push(_),f.push(f.length))}f.sort((function(e,t){return m[e]-m[t]}));var P=c.length,N=qO(P),E=qO(P),R=qO(P),L=qO(P),j=[];for(b=0;b<f.length;b++){var F=f[b],V=2*b,z=2*F;N[V]=c[z],N[V+1]=c[z+1],E[V]=u[z],E[V+1]=u[z+1],R[V]=p[z],R[V+1]=p[z+1],L[V]=d[z],L[V+1]=d[z+1],j[b]=h[F]}return{current:N,next:E,stackedOnCurrent:R,stackedOnNext:L,status:j}}var ZO=Math.min,KO=Math.max;function JO(e,t){return isNaN(e)||isNaN(t)}function QO(e,t,r,a,n,i,o,s,l){for(var c,u,p,d,h,f,m=r,g=0;g<a;g++){var v=t[2*m],y=t[2*m+1];if(m>=n||m<0)break;if(JO(v,y)){if(l){m+=i;continue}break}if(m===r)e[i>0?"moveTo":"lineTo"](v,y),p=v,d=y;else{var b=v-c,_=y-u;if(b*b+_*_<.5){m+=i;continue}if(o>0){var x=m+i,w=t[2*x],S=t[2*x+1];while(w===v&&S===y&&g<a)g++,x+=i,m+=i,w=t[2*x],S=t[2*x+1],v=t[2*m],y=t[2*m+1],b=v-c,_=y-u;var D=g+1;if(l)while(JO(w,S)&&D<a)D++,x+=i,w=t[2*x],S=t[2*x+1];var C=.5,T=0,I=0,O=void 0,M=void 0;if(D>=a||JO(w,S))h=v,f=y;else{T=w-c,I=S-u;var A=v-c,k=w-v,P=y-u,N=S-y,E=void 0,R=void 0;if("x"===s){E=Math.abs(A),R=Math.abs(k);var L=T>0?1:-1;h=v-L*E*o,f=y,O=v+L*R*o,M=y}else if("y"===s){E=Math.abs(P),R=Math.abs(N);var j=I>0?1:-1;h=v,f=y-j*E*o,O=v,M=y+j*R*o}else E=Math.sqrt(A*A+P*P),R=Math.sqrt(k*k+N*N),C=R/(R+E),h=v-T*o*(1-C),f=y-I*o*(1-C),O=v+T*o*C,M=y+I*o*C,O=ZO(O,KO(w,v)),M=ZO(M,KO(S,y)),O=KO(O,ZO(w,v)),M=KO(M,ZO(S,y)),T=O-v,I=M-y,h=v-T*E/R,f=y-I*E/R,h=ZO(h,KO(c,v)),f=ZO(f,KO(u,y)),h=KO(h,ZO(c,v)),f=KO(f,ZO(u,y)),T=v-h,I=y-f,O=v+T*R/E,M=y+I*R/E}e.bezierCurveTo(p,d,h,f,v,y),p=O,d=M}else e.lineTo(v,y)}c=v,u=y,m+=i}return g}var eM=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),tM=function(e){function t(t){var r=e.call(this,t)||this;return r.type="ec-polyline",r}return xa(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new eM},t.prototype.buildPath=function(e,t){var r=t.points,a=0,n=r.length/2;if(t.connectNulls){for(;n>0;n--)if(!JO(r[2*n-2],r[2*n-1]))break;for(;a<n;a++)if(!JO(r[2*a],r[2*a+1]))break}while(a<n)a+=QO(e,r,a,n,n,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var r,a,n=this.path,i=n.data,o=Lu.CMD,s="x"===t,l=[],c=0;c<i.length;){var u=i[c++],p=void 0,d=void 0,h=void 0,f=void 0,m=void 0,g=void 0,v=void 0;switch(u){case o.M:r=i[c++],a=i[c++];break;case o.L:if(p=i[c++],d=i[c++],v=s?(e-r)/(p-r):(e-a)/(d-a),v<=1&&v>=0){var y=s?(d-a)*v+a:(p-r)*v+r;return s?[e,y]:[y,e]}r=p,a=d;break;case o.C:p=i[c++],d=i[c++],h=i[c++],f=i[c++],m=i[c++],g=i[c++];var b=s?zi(r,p,h,m,e,l):zi(a,d,f,g,e,l);if(b>0)for(var _=0;_<b;_++){var x=l[_];if(x<=1&&x>=0){y=s?Fi(a,d,f,g,x):Fi(r,p,h,m,x);return s?[e,y]:[y,e]}}r=m,a=g;break}}},t}(lp),rM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t}(eM),aM=function(e){function t(t){var r=e.call(this,t)||this;return r.type="ec-polygon",r}return xa(t,e),t.prototype.getDefaultShape=function(){return new rM},t.prototype.buildPath=function(e,t){var r=t.points,a=t.stackedOnPoints,n=0,i=r.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;i>0;i--)if(!JO(r[2*i-2],r[2*i-1]))break;for(;n<i;n++)if(!JO(r[2*n],r[2*n+1]))break}while(n<i){var s=QO(e,r,n,i,i,1,t.smooth,o,t.connectNulls);QO(e,a,n+s-1,s,i,-1,t.stackedOnSmooth,o,t.connectNulls),n+=s+1,e.closePath()}},t}(lp);function nM(e,t,r,a,n){var i=e.getArea(),o=i.x,s=i.y,l=i.width,c=i.height,u=r.get(["lineStyle","width"])||2;o-=u/2,s-=u/2,l+=u,c+=u,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var p=new Cp({shape:{x:o,y:s,width:l,height:c}});if(t){var d=e.getBaseAxis(),h=d.isHorizontal(),f=d.inverse;h?(f&&(p.shape.x+=l),p.shape.width=0):(f||(p.shape.y+=c),p.shape.height=0);var m=Object(Sa["w"])(n)?function(e){n(e,p)}:null;lh(p,{shape:{width:l,height:c,x:o,y:s}},r,null,a,m)}return p}function iM(e,t,r){var a=e.getArea(),n=al(a.r0,1),i=al(a.r,1),o=new jb({shape:{cx:al(e.cx,1),cy:al(e.cy,1),r0:n,r:i,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}});if(t){var s="angle"===e.getBaseAxis().dim;s?o.shape.endAngle=a.startAngle:o.shape.r=n,lh(o,{shape:{endAngle:a.endAngle,r:i}},r)}return o}function oM(e,t,r,a,n){return e?"polar"===e.type?iM(e,t,r):"cartesian2d"===e.type?nM(e,t,r,a,n):null:null}function sM(e,t){return e.type===t}function lM(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function cM(e){for(var t=1/0,r=1/0,a=-1/0,n=-1/0,i=0;i<e.length;){var o=e[i++],s=e[i++];isNaN(o)||(t=Math.min(o,t),a=Math.max(o,a)),isNaN(s)||(r=Math.min(s,r),n=Math.max(s,n))}return[[t,r],[a,n]]}function uM(e,t){var r=cM(e),a=r[0],n=r[1],i=cM(t),o=i[0],s=i[1];return Math.max(Math.abs(a[0]-o[0]),Math.abs(a[1]-o[1]),Math.abs(n[0]-s[0]),Math.abs(n[1]-s[1]))}function pM(e){return Sa["z"](e)?e:e?.5:0}function dM(e,t,r){if(!r.valueDim)return[];for(var a=t.count(),n=qO(2*a),i=0;i<a;i++){var o=UO(r,e,t,i);n[2*i]=o[0],n[2*i+1]=o[1]}return n}function hM(e,t,r,a){var n=t.getBaseAxis(),i="x"===n.dim||"radius"===n.dim?0:1,o=[],s=0,l=[],c=[],u=[],p=[];if(a){for(s=0;s<e.length;s+=2)isNaN(e[s])||isNaN(e[s+1])||p.push(e[s],e[s+1]);e=p}for(s=0;s<e.length-2;s+=2)switch(u[0]=e[s+2],u[1]=e[s+3],c[0]=e[s],c[1]=e[s+1],o.push(c[0],c[1]),r){case"end":l[i]=u[i],l[1-i]=c[1-i],o.push(l[0],l[1]);break;case"middle":var d=(c[i]+u[i])/2,h=[];l[i]=h[i]=d,l[1-i]=c[1-i],h[1-i]=u[1-i],o.push(l[0],l[1]),o.push(h[0],h[1]);break;default:l[i]=c[i],l[1-i]=u[1-i],o.push(l[0],l[1])}return o.push(e[s++],e[s++]),o}function fM(e,t){var r,a,n=[],i=e.length;function o(e,t,r){var a=e.coord,n=(r-a)/(t.coord-a),i=Object(ro["b"])(n,[e.color,t.color]);return{coord:r,color:i}}for(var s=0;s<i;s++){var l=e[s],c=l.coord;if(c<0)r=l;else{if(c>t){a?n.push(o(a,l,t)):r&&n.push(o(r,l,0),o(r,l,t));break}r&&(n.push(o(r,l,0)),r=null),n.push(l),a=l}}return n}function mM(e,t,r){var a=e.getVisual("visualMeta");if(a&&a.length&&e.count()&&"cartesian2d"===t.type){for(var n,i,o=a.length-1;o>=0;o--){var s=e.getDimensionInfo(a[o].dimension);if(n=s&&s.coordDim,"x"===n||"y"===n){i=a[o];break}}if(i){var l=t.getAxis(n),c=Sa["H"](i.stops,(function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}})),u=c.length,p=i.outerColors.slice();u&&c[0].coord>c[u-1].coord&&(c.reverse(),p.reverse());var d=fM(c,"x"===n?r.getWidth():r.getHeight()),h=d.length;if(!h&&u)return c[0].coord<0?p[1]?p[1]:c[u-1].color:p[0]?p[0]:c[0].color;var f=10,m=d[0].coord-f,g=d[h-1].coord+f,v=g-m;if(v<.001)return"transparent";Sa["k"](d,(function(e){e.offset=(e.coord-m)/v})),d.push({offset:h?d[h-1].offset:.5,color:p[1]||"transparent"}),d.unshift({offset:h?d[0].offset:.5,color:p[0]||"transparent"});var y=new d_(0,0,0,0,d,!0);return y[n]=m,y[n+"2"]=g,y}}}function gM(e,t,r){var a=e.get("showAllSymbol"),n="auto"===a;if(!a||n){var i=r.getAxesByScale("ordinal")[0];if(i&&(!n||!vM(i,t))){var o=t.mapDimension(i.dim),s={};return Sa["k"](i.getViewLabels(),(function(e){var t=i.scale.getRawOrdinalNumber(e.tickValue);s[t]=1})),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function vM(e,t){var r=e.getExtent(),a=Math.abs(r[1]-r[0])/e.scale.count();isNaN(a)&&(a=0);for(var n=t.count(),i=Math.max(1,Math.round(n/5)),o=0;o<n;o+=i)if(1.5*LO.getSymbolSize(t,o)[e.isHorizontal()?1:0]>a)return!1;return!0}function yM(e,t){return isNaN(e)||isNaN(t)}function bM(e){for(var t=e.length/2;t>0;t--)if(!yM(e[2*t-2],e[2*t-1]))break;return t-1}function _M(e,t){return[e[2*t],e[2*t+1]]}function xM(e,t,r){for(var a,n,i=e.length/2,o="x"===r?0:1,s=0,l=-1,c=0;c<i;c++)if(n=e[2*c+o],!isNaN(n)&&!isNaN(e[2*c+1-o]))if(0!==c){if(a<=t&&n>=t||a>=t&&n<=t){l=c;break}s=c,a=n}else a=n;return{range:[s,l],t:(t-a)/(n-a)}}function wM(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<Qp.length;t++)if(e.get([Qp[t],"endLabel","show"]))return!0;return!1}function SM(e,t,r,a){if(sM(t,"cartesian2d")){var n=a.getModel("endLabel"),i=n.get("valueAnimation"),o=a.getData(),s={lastFrameIndex:0},l=wM(a)?function(r,a){e._endLabelOnDuring(r,a,o,s,i,n,t)}:null,c=t.getBaseAxis().isHorizontal(),u=nM(t,r,a,(function(){var t=e._endLabel;t&&r&&null!=s.originalX&&t.attr({x:s.originalX,y:s.originalY})}),l);if(!a.get("clip",!0)){var p=u.shape,d=Math.max(p.width,p.height);c?(p.y-=d,p.height+=2*d):(p.x-=d,p.width+=2*d)}return l&&l(1,u),u}return iM(t,r,a)}function DM(e,t){var r=t.getBaseAxis(),a=r.isHorizontal(),n=r.inverse,i=a?n?"right":"left":"center",o=a?"middle":n?"top":"bottom";return{normal:{align:e.get("align")||i,verticalAlign:e.get("verticalAlign")||o}}}var CM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t.prototype.init=function(){var e=new Bs,t=new BO;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},t.prototype.render=function(e,t,r){var a=this,n=e.coordinateSystem,i=this.group,o=e.getData(),s=e.getModel("lineStyle"),l=e.getModel("areaStyle"),c=o.getLayout("points")||[],u="polar"===n.type,p=this._coordSys,d=this._symbolDraw,h=this._polyline,f=this._polygon,m=this._lineGroup,g=!t.ssr&&e.get("animation"),v=!l.isEmpty(),y=l.get("origin"),b=$O(n,o,y),_=v&&dM(n,o,b),x=e.get("showSymbol"),w=e.get("connectNulls"),S=x&&!u&&gM(e,o,n),D=this._data;D&&D.eachItemGraphicEl((function(e,t){e.__temp&&(i.remove(e),D.setItemGraphicEl(t,null))})),x||d.remove(),i.add(m);var C,T=!u&&e.get("step");n&&n.getArea&&e.get("clip",!0)&&(C=n.getArea(),null!=C.width?(C.x-=.1,C.y-=.1,C.width+=.2,C.height+=.2):C.r0&&(C.r0-=.5,C.r+=.5)),this._clipShapeForSymbol=C;var I=mM(o,n,r)||o.getVisual("style")[o.getVisual("drawType")];if(h&&p.type===n.type&&T===this._step){v&&!f?f=this._newPolygon(c,_):f&&!v&&(m.remove(f),f=this._polygon=null),u||this._initOrUpdateEndLabel(e,n,Zf(I));var O=m.getClipPath();if(O){var M=SM(this,n,!1,e);lh(O,{shape:M.shape},e)}else m.setClipPath(SM(this,n,!0,e));x&&d.updateData(o,{isIgnore:S,clipShape:C,disableAnimation:!0,getSymbolPoint:function(e){return[c[2*e],c[2*e+1]]}}),lM(this._stackedOnPoints,_)&&lM(this._points,c)||(g?this._doUpdateAnimation(o,_,n,r,T,y,w):(T&&(c=hM(c,n,T,w),_&&(_=hM(_,n,T,w))),h.setShape({points:c}),f&&f.setShape({points:c,stackedOnPoints:_})))}else x&&d.updateData(o,{isIgnore:S,clipShape:C,disableAnimation:!0,getSymbolPoint:function(e){return[c[2*e],c[2*e+1]]}}),g&&this._initSymbolLabelAnimation(o,n,C),T&&(c=hM(c,n,T,w),_&&(_=hM(_,n,T,w))),h=this._newPolyline(c),v?f=this._newPolygon(c,_):f&&(m.remove(f),f=this._polygon=null),u||this._initOrUpdateEndLabel(e,n,Zf(I)),m.setClipPath(SM(this,n,!0,e));var A=e.getModel("emphasis"),k=A.get("focus"),P=A.get("blurScope"),N=A.get("disabled");if(h.useStyle(Sa["i"](s.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"})),Zd(h,e,"lineStyle"),h.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"])){var E=h.getState("emphasis").style;E.lineWidth=+h.style.lineWidth+1}Up(h).seriesIndex=e.seriesIndex,Hd(h,k,P,N);var R=pM(e.get("smooth")),L=e.get("smoothMonotone");if(h.setShape({smooth:R,smoothMonotone:L,connectNulls:w}),f){var j=o.getCalculationInfo("stackedOnSeries"),F=0;f.useStyle(Sa["i"](l.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:o.getVisual("style").decal})),j&&(F=pM(j.get("smooth"))),f.setShape({smooth:R,stackedOnSmooth:F,smoothMonotone:L,connectNulls:w}),Zd(f,e,"areaStyle"),Up(f).seriesIndex=e.seriesIndex,Hd(f,k,P,N)}var V=function(e){a._changePolyState(e)};o.eachItemGraphicEl((function(e){e&&(e.onHoverStateChange=V)})),this._polyline.onHoverStateChange=V,this._data=o,this._coordSys=n,this._stackedOnPoints=_,this._points=c,this._step=T,this._valueOrigin=y,e.get("triggerLineEvent")&&(this.packEventData(e,h),f&&this.packEventData(e,f))},t.prototype.packEventData=function(e,t){Up(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,t,r,a){var n=e.getData(),i=Xl(n,a);if(this._changePolyState("emphasis"),!(i instanceof Array)&&null!=i&&i>=0){var o=n.getLayout("points"),s=n.getItemGraphicEl(i);if(!s){var l=o[2*i],c=o[2*i+1];if(isNaN(l)||isNaN(c))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,c))return;var u=e.get("zlevel")||0,p=e.get("z")||0;s=new LO(n,i),s.x=l,s.y=c,s.setZ(u,p);var d=s.getSymbolPath().getTextContent();d&&(d.zlevel=u,d.z=p,d.z2=this._polyline.z2+1),s.__temp=!0,n.setItemGraphicEl(i,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else ux.prototype.highlight.call(this,e,t,r,a)},t.prototype.downplay=function(e,t,r,a){var n=e.getData(),i=Xl(n,a);if(this._changePolyState("normal"),null!=i&&i>=0){var o=n.getItemGraphicEl(i);o&&(o.__temp?(n.setItemGraphicEl(i,null),this.group.remove(o)):o.downplay())}else ux.prototype.downplay.call(this,e,t,r,a)},t.prototype._changePolyState=function(e){var t=this._polygon;yd(this._polyline,e),t&&yd(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new tM({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var r=this._polygon;return r&&this._lineGroup.remove(r),r=new aM({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(r),this._polygon=r,r},t.prototype._initSymbolLabelAnimation=function(e,t,r){var a,n,i=t.getBaseAxis(),o=i.inverse;"cartesian2d"===t.type?(a=i.isHorizontal(),n=!1):"polar"===t.type&&(a="angle"===i.dim,n=!0);var s=e.hostModel,l=s.get("animationDuration");Sa["w"](l)&&(l=l(null));var c=s.get("animationDelay")||0,u=Sa["w"](c)?c(null):c;e.eachItemGraphicEl((function(e,i){var s=e;if(s){var p=[e.x,e.y],d=void 0,h=void 0,f=void 0;if(r)if(n){var m=r,g=t.pointToCoord(p);a?(d=m.startAngle,h=m.endAngle,f=-g[1]/180*Math.PI):(d=m.r0,h=m.r,f=g[0])}else{var v=r;a?(d=v.x,h=v.x+v.width,f=e.x):(d=v.y+v.height,h=v.y,f=e.y)}var y=h===d?0:(f-d)/(h-d);o&&(y=1-y);var b=Sa["w"](c)?c(i):l*y+u,_=s.getSymbolPath(),x=_.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:b}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:b}),_.disableLabelAnimation=!0}}))},t.prototype._initOrUpdateEndLabel=function(e,t,r){var a=e.getModel("endLabel");if(wM(e)){var n=e.getData(),i=this._polyline,o=n.getLayout("points");if(!o)return i.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||(s=this._endLabel=new Gp({z2:200}),s.ignoreClip=!0,i.setTextContent(this._endLabel),i.disableLabelAnimation=!0);var l=bM(o);l>=0&&(yh(i,bh(e,"endLabel"),{inheritColor:r,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,r){return null!=r?NO(n,r):PO(n,e)},enableTextSetter:!0},DM(a,t)),i.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,r,a,n,i,o){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==a.originalX&&(a.originalX=s.x,a.originalY=s.y);var c=r.getLayout("points"),u=r.hostModel,p=u.get("connectNulls"),d=i.get("precision"),h=i.get("distance")||0,f=o.getBaseAxis(),m=f.isHorizontal(),g=f.inverse,v=t.shape,y=g?m?v.x:v.y+v.height:m?v.x+v.width:v.y,b=(m?h:0)*(g?-1:1),_=(m?0:-h)*(g?-1:1),x=m?"x":"y",w=xM(c,y,x),S=w.range,D=S[1]-S[0],C=void 0;if(D>=1){if(D>1&&!p){var T=_M(c,S[0]);s.attr({x:T[0]+b,y:T[1]+_}),n&&(C=u.getRawValue(S[0]))}else{T=l.getPointOn(y,x);T&&s.attr({x:T[0]+b,y:T[1]+_});var I=u.getRawValue(S[0]),O=u.getRawValue(S[1]);n&&(C=sc(r,d,I,O,w.t))}a.lastFrameIndex=S[0]}else{var M=1===e||a.lastFrameIndex>0?S[0]:0;T=_M(c,M);n&&(C=u.getRawValue(M)),s.attr({x:T[0]+b,y:T[1]+_})}if(n){var A=Mh(s);"function"===typeof A.setLabelText&&A.setLabelText(C)}}},t.prototype._doUpdateAnimation=function(e,t,r,a,n,i,o){var s=this._polyline,l=this._polygon,c=e.hostModel,u=XO(this._data,e,this._stackedOnPoints,t,this._coordSys,r,this._valueOrigin,i),p=u.current,d=u.stackedOnCurrent,h=u.next,f=u.stackedOnNext;if(n&&(p=hM(u.current,r,n,o),d=hM(u.stackedOnCurrent,r,n,o),h=hM(u.next,r,n,o),f=hM(u.stackedOnNext,r,n,o)),uM(p,h)>3e3||l&&uM(d,f)>3e3)return s.stopAnimation(),s.setShape({points:h}),void(l&&(l.stopAnimation(),l.setShape({points:h,stackedOnPoints:f})));s.shape.__points=u.current,s.shape.points=p;var m={shape:{points:h}};u.current!==p&&(m.shape.__points=u.next),s.stopAnimation(),sh(s,m,c),l&&(l.setShape({points:p,stackedOnPoints:d}),l.stopAnimation(),sh(l,{shape:{stackedOnPoints:f}},c),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var g=[],v=u.status,y=0;y<v.length;y++){var b=v[y].cmd;if("="===b){var _=e.getItemGraphicEl(v[y].idx1);_&&g.push({el:_,ptIdx:y})}}s.animators&&s.animators.length&&s.animators[0].during((function(){l&&l.dirtyShape();for(var e=s.shape.__points,t=0;t<g.length;t++){var r=g[t].el,a=2*g[t].ptIdx;r.x=e[a],r.y=e[a+1],r.markRedraw()}}))},t.prototype.remove=function(e){var t=this.group,r=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),r&&r.eachItemGraphicEl((function(e,a){e.__temp&&(t.remove(e),r.setItemGraphicEl(a,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(ux),TM=CM;function IM(e,t){return{seriesType:e,plan:Uy(),reset:function(e){var r=e.getData(),a=e.coordinateSystem,n=e.pipelineContext,i=t||n.large;if(a){var o=Object(Sa["H"])(a.dimensions,(function(e){return r.mapDimension(e)})).slice(0,2),s=o.length,l=r.getCalculationInfo("stackResultDimension");wO(r,o[0])&&(o[0]=l),wO(r,o[1])&&(o[1]=l);var c=r.getStore(),u=r.getDimensionIndex(o[0]),p=r.getDimensionIndex(o[1]);return s&&{progress:function(e,t){for(var r=e.end-e.start,n=i&&qO(r*s),o=[],l=[],d=e.start,h=0;d<e.end;d++){var f=void 0;if(1===s){var m=c.get(u,d);f=a.dataToPoint(m,null,l)}else o[0]=c.get(u,d),o[1]=c.get(p,d),f=a.dataToPoint(o,null,l);i?(n[h++]=f[0],n[h++]=f[1]):t.setItemLayout(d,f.slice())}i&&t.setLayout("points",n)}}}}}}var OM={average:function(e){for(var t=0,r=0,a=0;a<e.length;a++)isNaN(e[a])||(t+=e[a],r++);return 0===r?NaN:t/r},sum:function(e){for(var t=0,r=0;r<e.length;r++)t+=e[r]||0;return t},max:function(e){for(var t=-1/0,r=0;r<e.length;r++)e[r]>t&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r<e.length;r++)e[r]<t&&(t=e[r]);return isFinite(t)?t:NaN},minmax:function(e){for(var t=-1/0,r=-1/0,a=0;a<e.length;a++){var n=e[a],i=Math.abs(n);i>t&&(t=i,r=n)}return isFinite(r)?r:NaN},nearest:function(e){return e[0]}},MM=function(e){return Math.round(e.length/2)};function AM(e){return{seriesType:e,reset:function(e,t,r){var a=e.getData(),n=e.get("sampling"),i=e.coordinateSystem,o=a.count();if(o>10&&"cartesian2d"===i.type&&n){var s=i.getBaseAxis(),l=i.getOtherAxis(s),c=s.getExtent(),u=r.getDevicePixelRatio(),p=Math.abs(c[1]-c[0])*(u||1),d=Math.round(o/p);if(isFinite(d)&&d>1){"lttb"===n&&e.setData(a.lttbDownSample(a.mapDimension(l.dim),1/d));var h=void 0;Object(Sa["C"])(n)?h=OM[n]:Object(Sa["w"])(n)&&(h=n),h&&e.setData(a.downSample(a.mapDimension(l.dim),1/d,h,MM))}}}}}function kM(e){e.registerChartView(TM),e.registerSeriesModel(kO),e.registerLayout(IM("line",!0)),e.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),r=e.getModel("lineStyle").getLineStyle();r&&!r.stroke&&(r.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",r)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,AM("line"))}var PM="__ec_stack_";function NM(e){return e.get("stack")||PM+e.seriesIndex}function EM(e){return e.dim+e.index}function RM(e){var t=[],r=e.axis,a="axis0";if("category"===r.type){for(var n=r.getBandWidth(),i=0;i<e.count;i++)t.push(Object(Sa["i"])({bandWidth:n,axisKey:a,stackId:PM+i},e));var o=VM(t),s=[];for(i=0;i<e.count;i++){var l=o[a][PM+i];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function LM(e,t){var r=[];return t.eachSeriesByType(e,(function(e){GM(e)&&r.push(e)})),r}function jM(e){var t={};Object(Sa["k"])(e,(function(e){var r=e.coordinateSystem,a=r.getBaseAxis();if("time"===a.type||"value"===a.type)for(var n=e.getData(),i=a.dim+"_"+a.index,o=n.getDimensionIndex(n.mapDimension(a.dim)),s=n.getStore(),l=0,c=s.count();l<c;++l){var u=s.get(o,l);t[i]?t[i].push(u):t[i]=[u]}}));var r={};for(var a in t)if(t.hasOwnProperty(a)){var n=t[a];if(n){n.sort((function(e,t){return e-t}));for(var i=null,o=1;o<n.length;++o){var s=n[o]-n[o-1];s>0&&(i=null===i?s:Math.min(i,s))}r[a]=i}}return r}function FM(e){var t=jM(e),r=[];return Object(Sa["k"])(e,(function(e){var a,n=e.coordinateSystem,i=n.getBaseAxis(),o=i.getExtent();if("category"===i.type)a=i.getBandWidth();else if("value"===i.type||"time"===i.type){var s=i.dim+"_"+i.index,l=t[s],c=Math.abs(o[1]-o[0]),u=i.scale.getExtent(),p=Math.abs(u[1]-u[0]);a=l?c/p*l:c}else{var d=e.getData();a=Math.abs(o[1]-o[0])/d.count()}var h=rl(e.get("barWidth"),a),f=rl(e.get("barMaxWidth"),a),m=rl(e.get("barMinWidth")||(UM(e)?.5:1),a),g=e.get("barGap"),v=e.get("barCategoryGap");r.push({bandWidth:a,barWidth:h,barMaxWidth:f,barMinWidth:m,barGap:g,barCategoryGap:v,axisKey:EM(i),stackId:NM(e)})})),VM(r)}function VM(e){var t={};Object(Sa["k"])(e,(function(e,r){var a=e.axisKey,n=e.bandWidth,i=t[a]||{bandWidth:n,remainedWidth:n,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},o=i.stacks;t[a]=i;var s=e.stackId;o[s]||i.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(i.remainedWidth,l),i.remainedWidth-=l);var c=e.barMaxWidth;c&&(o[s].maxWidth=c);var u=e.barMinWidth;u&&(o[s].minWidth=u);var p=e.barGap;null!=p&&(i.gap=p);var d=e.barCategoryGap;null!=d&&(i.categoryGap=d)}));var r={};return Object(Sa["k"])(t,(function(e,t){r[t]={};var a=e.stacks,n=e.bandWidth,i=e.categoryGap;if(null==i){var o=Object(Sa["F"])(a).length;i=Math.max(35-4*o,15)+"%"}var s=rl(i,n),l=rl(e.gap,1),c=e.remainedWidth,u=e.autoWidthCount,p=(c-s)/(u+(u-1)*l);p=Math.max(p,0),Object(Sa["k"])(a,(function(e){var t=e.maxWidth,r=e.minWidth;if(e.width){a=e.width;t&&(a=Math.min(a,t)),r&&(a=Math.max(a,r)),e.width=a,c-=a+l*a,u--}else{var a=p;t&&t<a&&(a=Math.min(t,c)),r&&r>a&&(a=r),a!==p&&(e.width=a,c-=a+l*a,u--)}})),p=(c-s)/(u+(u-1)*l),p=Math.max(p,0);var d,h=0;Object(Sa["k"])(a,(function(e,t){e.width||(e.width=p),d=e,h+=e.width*(1+l)})),d&&(h-=d.width*l);var f=-h/2;Object(Sa["k"])(a,(function(e,a){r[t][a]=r[t][a]||{bandWidth:n,offset:f,width:e.width},f+=e.width*(1+l)}))})),r}function zM(e,t,r){if(e&&t){var a=e[EM(t)];return null!=a&&null!=r?a[NM(r)]:a}}function BM(e,t){var r=LM(e,t),a=FM(r);Object(Sa["k"])(r,(function(e){var t=e.getData(),r=e.coordinateSystem,n=r.getBaseAxis(),i=NM(e),o=a[EM(n)][i],s=o.offset,l=o.width;t.setLayout({bandWidth:o.bandWidth,offset:s,size:l})}))}function $M(e){return{seriesType:e,plan:Uy(),reset:function(e){if(GM(e)){var t=e.getData(),r=e.coordinateSystem,a=r.getBaseAxis(),n=r.getOtherAxis(a),i=t.getDimensionIndex(t.mapDimension(n.dim)),o=t.getDimensionIndex(t.mapDimension(a.dim)),s=e.get("showBackground",!0),l=t.mapDimension(n.dim),c=t.getCalculationInfo("stackResultDimension"),u=wO(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),p=n.isHorizontal(),d=WM(a,n),h=UM(e),f=e.get("barMinHeight")||0,m=c&&t.getDimensionIndex(c),g=t.getLayout("size"),v=t.getLayout("offset");return{progress:function(e,t){var a,n=e.count,l=h&&qO(3*n),c=h&&s&&qO(3*n),y=h&&qO(n),b=r.master.getRect(),_=p?b.width:b.height,x=t.getStore(),w=0;while(null!=(a=e.next())){var S=x.get(u?m:i,a),D=x.get(o,a),C=d,T=void 0;u&&(T=+S-x.get(i,a));var I=void 0,O=void 0,M=void 0,A=void 0;if(p){var k=r.dataToPoint([S,D]);if(u){var P=r.dataToPoint([T,D]);C=P[0]}I=C,O=k[1]+v,M=k[0]-C,A=g,Math.abs(M)<f&&(M=(M<0?-1:1)*f)}else{k=r.dataToPoint([D,S]);if(u){P=r.dataToPoint([D,T]);C=P[1]}I=k[0]+v,O=C,M=g,A=k[1]-C,Math.abs(A)<f&&(A=(A<=0?-1:1)*f)}h?(l[w]=I,l[w+1]=O,l[w+2]=p?M:A,c&&(c[w]=p?b.x:I,c[w+1]=p?O:b.y,c[w+2]=_),y[a]=a):t.setItemLayout(a,{x:I,y:O,width:M,height:A}),w+=3}h&&t.setLayout({largePoints:l,largeDataIndices:y,largeBackgroundPoints:c,valueAxisHorizontal:p})}}}}}}function GM(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function UM(e){return e.pipelineContext&&e.pipelineContext.large}function WM(e,t){var r=t.model.get("startValue");return r||(r=0),t.toGlobalCoord(t.dataToCoord("log"===t.type?r>0?r:1:r))}var HM=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.getInitialData=function(e,t){return MO(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,r){var a=this.coordinateSystem;if(a&&a.clampData){var n=a.clampData(e),i=a.dataToPoint(n);if(r)Object(Sa["k"])(a.getAxes(),(function(e,r){if("category"===e.type&&null!=t){var a=e.getTicksCoords(),o=e.getTickModel().get("alignWithLabel"),s=n[r],l="x1"===t[r]||"y1"===t[r];if(l&&!o&&(s+=1),a.length<2)return;if(2===a.length)return void(i[r]=e.toGlobalCoord(e.getExtent()[l?1:0]));for(var c=void 0,u=void 0,p=1,d=0;d<a.length;d++){var h=a[d].coord,f=d===a.length-1?a[d-1].tickValue+p:a[d].tickValue;if(f===s){u=h;break}if(f<s)c=h;else if(null!=c&&f>s){u=(h+c)/2;break}1===d&&(p=f-a[0].tickValue)}null==u&&(c?c&&(u=a[a.length-1].coord):u=a[0].coord),i[r]=e.toGlobalCoord(u)}}));else{var o=this.getData(),s=o.getLayout("offset"),l=o.getLayout("size"),c=a.getBaseAxis().isHorizontal()?0:1;i[c]+=s+l/2}return i}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(By);By.registerClass(HM);var qM=HM,YM=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.getInitialData=function(){return MO(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,r){return r.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Xh(qM.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(qM),XM=YM,ZM=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0}return e}(),KM=function(e){function t(t){var r=e.call(this,t)||this;return r.type="sausage",r}return xa(t,e),t.prototype.getDefaultShape=function(){return new ZM},t.prototype.buildPath=function(e,t){var r=t.cx,a=t.cy,n=Math.max(t.r0||0,0),i=Math.max(t.r,0),o=.5*(i-n),s=n+o,l=t.startAngle,c=t.endAngle,u=t.clockwise,p=2*Math.PI,d=u?c-l<p:l-c<p;d||(l=c-(u?p:-p));var h=Math.cos(l),f=Math.sin(l),m=Math.cos(c),g=Math.sin(c);d?(e.moveTo(h*n+r,f*n+a),e.arc(h*s+r,f*s+a,o,-Math.PI+l,l,!u)):e.moveTo(h*i+r,f*i+a),e.arc(r,a,i,l,c,!u),e.arc(m*s+r,g*s+a,o,c-2*Math.PI,c-Math.PI,!u),0!==n&&e.arc(r,a,n,c,l,u)},t}(lp),JM=KM;function QM(e,t){t=t||{};var r=t.isRoundCap;return function(t,a,n){var i=a.position;if(!i||i instanceof Array)return Cs(t,a,n);var o=e(i),s=null!=a.distance?a.distance:5,l=this.shape,c=l.cx,u=l.cy,p=l.r,d=l.r0,h=(p+d)/2,f=l.startAngle,m=l.endAngle,g=(f+m)/2,v=r?Math.abs(p-d)/2:0,y=Math.cos,b=Math.sin,_=c+p*y(f),x=u+p*b(f),w="left",S="top";switch(o){case"startArc":_=c+(d-s)*y(g),x=u+(d-s)*b(g),w="center",S="top";break;case"insideStartArc":_=c+(d+s)*y(g),x=u+(d+s)*b(g),w="center",S="bottom";break;case"startAngle":_=c+h*y(f)+tA(f,s+v,!1),x=u+h*b(f)+rA(f,s+v,!1),w="right",S="middle";break;case"insideStartAngle":_=c+h*y(f)+tA(f,-s+v,!1),x=u+h*b(f)+rA(f,-s+v,!1),w="left",S="middle";break;case"middle":_=c+h*y(g),x=u+h*b(g),w="center",S="middle";break;case"endArc":_=c+(p+s)*y(g),x=u+(p+s)*b(g),w="center",S="bottom";break;case"insideEndArc":_=c+(p-s)*y(g),x=u+(p-s)*b(g),w="center",S="top";break;case"endAngle":_=c+h*y(m)+tA(m,s+v,!0),x=u+h*b(m)+rA(m,s+v,!0),w="left",S="middle";break;case"insideEndAngle":_=c+h*y(m)+tA(m,-s+v,!0),x=u+h*b(m)+rA(m,-s+v,!0),w="right",S="middle";break;default:return Cs(t,a,n)}return t=t||{},t.x=_,t.y=x,t.align=w,t.verticalAlign=S,t}}function eA(e,t,r,a){if(Object(Sa["z"])(a))e.setTextConfig({rotation:a});else if(Object(Sa["t"])(t))e.setTextConfig({rotation:0});else{var n,i=e.shape,o=i.clockwise?i.startAngle:i.endAngle,s=i.clockwise?i.endAngle:i.startAngle,l=(o+s)/2,c=r(t);switch(c){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":n=l;break;case"startAngle":case"insideStartAngle":n=o;break;case"endAngle":case"insideEndAngle":n=s;break;default:return void e.setTextConfig({rotation:0})}var u=1.5*Math.PI-n;"middle"===c&&u>Math.PI/2&&u<1.5*Math.PI&&(u-=Math.PI),e.setTextConfig({rotation:u})}}function tA(e,t,r){return t*Math.sin(e)*(r?-1:1)}function rA(e,t,r){return t*Math.cos(e)*(r?1:-1)}function aA(e,t,r){var a=e.get("borderRadius");if(null==a)return r?{cornerRadius:0}:null;Object(Sa["t"])(a)||(a=[a,a,a,a]);var n=Math.abs(t.r||0-t.r0||0);return{cornerRadius:Object(Sa["H"])(a,(function(e){return Ds(e,n)}))}}var nA=Math.max,iA=Math.min;function oA(e,t){var r=e.getArea&&e.getArea();if(sM(e,"cartesian2d")){var a=e.getBaseAxis();if("category"!==a.type||!a.onBand){var n=t.getLayout("bandWidth");a.isHorizontal()?(r.x-=n,r.width+=2*n):(r.y-=n,r.height+=2*n)}}return r}var sA=function(e){function t(){var r=e.call(this)||this;return r.type=t.type,r._isFirstFrame=!0,r}return xa(t,e),t.prototype.render=function(e,t,r,a){this._model=e,this._removeOnRenderedListener(r),this._updateDrawMode(e);var n=e.get("coordinateSystem");("cartesian2d"===n||"polar"===n)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,r):this._renderNormal(e,t,r,a))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){tx(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,r,a){var n,i=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,c=l.getBaseAxis();"cartesian2d"===l.type?n=c.isHorizontal():"polar"===l.type&&(n="angle"===c.dim);var u=e.isAnimationEnabled()?e:null,p=uA(e,l);p&&this._enableRealtimeSort(p,o,r);var d=e.get("clip",!0)||p,h=oA(l,o);i.removeClipPath();var f=e.get("roundCap",!0),m=e.get("showBackground",!0),g=e.getModel("backgroundStyle"),v=g.get("borderRadius")||0,y=[],b=this._backgroundEls,_=a&&a.isInitSort,x=a&&"changeAxisOrder"===a.type;function w(e){var t=gA[l.type](o,e),r=IA(l,n,t);return r.useStyle(g.getItemStyle()),"cartesian2d"===l.type?r.setShape("r",v):r.setShape("cornerRadius",v),y[e]=r,r}o.diff(s).add((function(t){var r=o.getItemModel(t),a=gA[l.type](o,t,r);if(m&&w(t),o.hasValue(t)&&mA[l.type](a)){var s=!1;d&&(s=lA[l.type](h,a));var g=cA[l.type](e,o,t,a,n,u,c.model,!1,f);p&&(g.forceLabelAnimation=!0),bA(g,o,t,r,a,e,n,"polar"===l.type),_?g.attr({shape:a}):p?pA(p,u,g,a,t,n,!1,!1):lh(g,{shape:a},e,t),o.setItemGraphicEl(t,g),i.add(g),g.ignore=s}})).update((function(t,r){var a=o.getItemModel(t),S=gA[l.type](o,t,a);if(m){var D=void 0;0===b.length?D=w(r):(D=b[r],D.useStyle(g.getItemStyle()),"cartesian2d"===l.type?D.setShape("r",v):D.setShape("cornerRadius",v),y[t]=D);var C=gA[l.type](o,t),T=TA(n,C,l);sh(D,{shape:T},u,t)}var I=s.getItemGraphicEl(r);if(o.hasValue(t)&&mA[l.type](S)){var O=!1;if(d&&(O=lA[l.type](h,S),O&&i.remove(I)),I?hh(I):I=cA[l.type](e,o,t,S,n,u,c.model,!!I,f),p&&(I.forceLabelAnimation=!0),x){var M=I.getTextContent();if(M){var A=Mh(M);null!=A.prevValue&&(A.prevValue=A.value)}}else bA(I,o,t,a,S,e,n,"polar"===l.type);_?I.attr({shape:S}):p?pA(p,u,I,S,t,n,!0,x):sh(I,{shape:S},e,t,null),o.setItemGraphicEl(t,I),I.ignore=O,i.add(I)}else i.remove(I)})).remove((function(t){var r=s.getItemGraphicEl(t);r&&dh(r,e,t)})).execute();var S=this._backgroundGroup||(this._backgroundGroup=new Bs);S.removeAll();for(var D=0;D<y.length;++D)S.add(y[D]);i.add(S),this._backgroundEls=y,this._data=o},t.prototype._renderLarge=function(e,t,r){this._clear(),SA(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),SA(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&oM(e.coordinateSystem,!1,e),r=this.group;t?r.setClipPath(t):r.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,r){var a=this;if(t.count()){var n=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,r),this._isFirstFrame=!1;else{var i=function(e){var r=t.getItemGraphicEl(e),a=r&&r.shape;return a&&Math.abs(n.isHorizontal()?a.height:a.width)||0};this._onRendered=function(){a._updateSortWithinSameData(t,i,n,r)},r.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,t,r){var a=[];return e.each(e.mapDimension(t.dim),(function(e,t){var n=r(t);n=null==n?NaN:n,a.push({dataIndex:t,mappedValue:n,ordinalNumber:e})})),a.sort((function(e,t){return t.mappedValue-e.mappedValue})),{ordinalNumbers:Object(Sa["H"])(a,(function(e){return e.ordinalNumber}))}},t.prototype._isOrderChangedWithinSameData=function(e,t,r){for(var a=r.scale,n=e.mapDimension(r.dim),i=Number.MAX_VALUE,o=0,s=a.getOrdinalMeta().categories.length;o<s;++o){var l=e.rawIndexOf(n,a.getRawOrdinalNumber(o)),c=l<0?Number.MIN_VALUE:t(e.indexOfRawIndex(l));if(c>i)return!0;i=c}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var r=t.scale,a=r.getExtent(),n=Math.max(0,a[0]),i=Math.min(a[1],r.getOrdinalMeta().categories.length-1);n<=i;++n)if(e.ordinalNumbers[n]!==r.getRawOrdinalNumber(n))return!0},t.prototype._updateSortWithinSameData=function(e,t,r,a){if(this._isOrderChangedWithinSameData(e,t,r)){var n=this._dataSort(e,r,t);this._isOrderDifferentInView(n,r)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",axisId:r.index,sortInfo:n}))}},t.prototype._dispatchInitSort=function(e,t,r){var a=t.baseAxis,n=this._dataSort(e,a,(function(r){return e.get(e.mapDimension(t.otherAxis.dim),r)}));r.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:n})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,r=this._data;e&&e.isAnimationEnabled()&&r&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],r.eachItemGraphicEl((function(t){dh(t,e,Up(t).dataIndex)}))):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(ux),lA={cartesian2d:function(e,t){var r=t.width<0?-1:1,a=t.height<0?-1:1;r<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height);var n=e.x+e.width,i=e.y+e.height,o=nA(t.x,e.x),s=iA(t.x+t.width,n),l=nA(t.y,e.y),c=iA(t.y+t.height,i),u=s<o,p=c<l;return t.x=u&&o>n?s:o,t.y=p&&l>i?c:l,t.width=u?0:s-o,t.height=p?0:c-l,r<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height),u||p},polar:function(e,t){var r=t.r0<=t.r?1:-1;if(r<0){var a=t.r;t.r=t.r0,t.r0=a}var n=iA(t.r,e.r),i=nA(t.r0,e.r0);t.r=n,t.r0=i;var o=n-i<0;if(r<0){a=t.r;t.r=t.r0,t.r0=a}return o}},cA={cartesian2d:function(e,t,r,a,n,i,o,s,l){var c=new Cp({shape:Object(Sa["m"])({},a),z2:1});if(c.__dataIndex=r,c.name="item",i){var u=c.shape,p=n?"height":"width";u[p]=0}return c},polar:function(e,t,r,a,n,i,o,s,l){var c=!n&&l?JM:jb,u=new c({shape:a,z2:1});u.name="item";var p=yA(n);if(u.calculateTextPosition=QM(p,{isRoundCap:c===JM}),i){var d=u.shape,h=n?"r":"endAngle",f={};d[h]=n?a.r0:a.startAngle,f[h]=a[h],(s?sh:lh)(u,{shape:f},i)}return u}};function uA(e,t){var r=e.get("realtimeSort",!0),a=t.getBaseAxis();if(r&&"category"===a.type&&"cartesian2d"===t.type)return{baseAxis:a,otherAxis:t.getOtherAxis(a)}}function pA(e,t,r,a,n,i,o,s){var l,c;i?(c={x:a.x,width:a.width},l={y:a.y,height:a.height}):(c={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?sh:lh)(r,{shape:l},t,n,null);var u=t?e.baseAxis.model:null;(o?sh:lh)(r,{shape:c},u,n)}function dA(e,t){for(var r=0;r<t.length;r++)if(!isFinite(e[t[r]]))return!0;return!1}var hA=["x","y","width","height"],fA=["cx","cy","r","startAngle","endAngle"],mA={cartesian2d:function(e){return!dA(e,hA)},polar:function(e){return!dA(e,fA)}},gA={cartesian2d:function(e,t,r){var a=e.getItemLayout(t),n=r?_A(r,a):0,i=a.width>0?1:-1,o=a.height>0?1:-1;return{x:a.x+i*n/2,y:a.y+o*n/2,width:a.width-i*n,height:a.height-o*n}},polar:function(e,t,r){var a=e.getItemLayout(t);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function vA(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}function yA(e){return function(e){var t=e?"Arc":"Angle";return function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}(e)}function bA(e,t,r,a,n,i,o,s){var l=t.getItemVisual(r,"style");if(s){if(!i.get("roundCap")){var c=e.shape,u=aA(a.getModel("itemStyle"),c,!0);Object(Sa["m"])(c,u),e.setShape(c)}}else{var p=a.get(["itemStyle","borderRadius"])||0;e.setShape("r",p)}e.useStyle(l);var d=a.getShallow("cursor");d&&e.attr("cursor",d);var h=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",f=bh(a);yh(e,f,{labelFetcher:i,labelDataIndex:r,defaultText:PO(i.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var m=e.getTextContent();if(s&&m){var g=a.get(["label","position"]);e.textConfig.inside="middle"===g||null,eA(e,"outside"===g?h:g,yA(o),a.get(["label","rotate"]))}Ah(m,f,i.getRawValue(r),(function(e){return NO(t,e)}));var v=a.getModel(["emphasis"]);Hd(e,v.get("focus"),v.get("blurScope"),v.get("disabled")),Zd(e,a),vA(n)&&(e.style.fill="none",e.style.stroke="none",Object(Sa["k"])(e.states,(function(e){e.style&&(e.style.fill=e.style.stroke="none")})))}function _A(e,t){var r=e.get(["itemStyle","borderColor"]);if(!r||"none"===r)return 0;var a=e.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(a,n,i)}var xA=function(){function e(){}return e}(),wA=function(e){function t(t){var r=e.call(this,t)||this;return r.type="largeBar",r}return xa(t,e),t.prototype.getDefaultShape=function(){return new xA},t.prototype.buildPath=function(e,t){for(var r=t.points,a=this.baseDimIdx,n=1-this.baseDimIdx,i=[],o=[],s=this.barWidth,l=0;l<r.length;l+=3)o[a]=s,o[n]=r[l+2],i[a]=r[l+a],i[n]=r[l+n],e.rect(i[0],i[1],o[0],o[1])},t}(lp);function SA(e,t,r,a){var n=e.getData(),i=n.getLayout("valueAxisHorizontal")?1:0,o=n.getLayout("largeDataIndices"),s=n.getLayout("size"),l=e.getModel("backgroundStyle"),c=n.getLayout("largeBackgroundPoints");if(c){var u=new wA({shape:{points:c},incremental:!!a,silent:!0,z2:0});u.baseDimIdx=i,u.largeDataIndices=o,u.barWidth=s,u.useStyle(l.getItemStyle()),t.add(u),r&&r.push(u)}var p=new wA({shape:{points:n.getLayout("largePoints")},incremental:!!a,ignoreCoarsePointer:!0,z2:1});p.baseDimIdx=i,p.largeDataIndices=o,p.barWidth=s,t.add(p),p.useStyle(n.getVisual("style")),Up(p).seriesIndex=e.seriesIndex,e.get("silent")||(p.on("mousedown",DA),p.on("mousemove",DA)),r&&r.push(p)}var DA=fx((function(e){var t=this,r=CA(t,e.offsetX,e.offsetY);Up(t).dataIndex=r>=0?r:null}),30,!1);function CA(e,t,r){for(var a=e.baseDimIdx,n=1-a,i=e.shape.points,o=e.largeDataIndices,s=[],l=[],c=e.barWidth,u=0,p=i.length/3;u<p;u++){var d=3*u;if(l[a]=c,l[n]=i[d+2],s[a]=i[d+a],s[n]=i[d+n],l[n]<0&&(s[n]+=l[n],l[n]=-l[n]),t>=s[0]&&t<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[u]}return-1}function TA(e,t,r){if(sM(r,"cartesian2d")){var a=t,n=r.getArea();return{x:e?a.x:n.x,y:e?n.y:a.y,width:e?a.width:n.width,height:e?n.height:a.height}}n=r.getArea();var i=t;return{cx:n.cx,cy:n.cy,r0:e?n.r0:i.r0,r:e?n.r:i.r,startAngle:e?i.startAngle:0,endAngle:e?i.endAngle:2*Math.PI}}function IA(e,t,r){var a="polar"===e.type?jb:Cp;return new a({shape:TA(t,r,e),silent:!0,z2:0})}var OA=sA;function MA(e){e.registerChartView(OA),e.registerSeriesModel(XM),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Sa["h"](BM,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,$M("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,AM("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(e,t){var r=e.componentType||"series";t.eachComponent({mainType:r,query:e},(function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)}))}))}var AA=2*Math.PI,kA=Math.PI/180;function PA(e,t){return nm(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function NA(e,t){var r=PA(e,t),a=e.get("center"),n=e.get("radius");Sa["t"](n)||(n=[0,n]);var i,o,s=rl(r.width,t.getWidth()),l=rl(r.height,t.getHeight()),c=Math.min(s,l),u=rl(n[0],c/2),p=rl(n[1],c/2),d=e.coordinateSystem;if(d){var h=d.dataToPoint(a);i=h[0]||0,o=h[1]||0}else Sa["t"](a)||(a=[a,a]),i=rl(a[0],s)+r.x,o=rl(a[1],l)+r.y;return{cx:i,cy:o,r0:u,r:p}}function EA(e,t,r){t.eachSeriesByType(e,(function(e){var t=e.getData(),a=t.mapDimension("value"),n=PA(e,r),i=NA(e,r),o=i.cx,s=i.cy,l=i.r,c=i.r0,u=-e.get("startAngle")*kA,p=e.get("endAngle"),d=e.get("padAngle")*kA;p="auto"===p?u-AA:-p*kA;var h=e.get("minAngle")*kA,f=h+d,m=0;t.each(a,(function(e){!isNaN(e)&&m++}));var g=t.getSum(a),v=Math.PI/(g||m)*2,y=e.get("clockwise"),b=e.get("roseType"),_=e.get("stillShowZeroSum"),x=t.getDataExtent(a);x[0]=0;var w=y?1:-1,S=[u,p],D=w*d/2;Eu(S,!y),u=S[0],p=S[1];var C=RA(e);C.startAngle=u,C.endAngle=p,C.clockwise=y;var T=Math.abs(p-u),I=T,O=0,M=u;if(t.setLayout({viewRect:n,r:l}),t.each(a,(function(e,r){var a;if(isNaN(e))t.setItemLayout(r,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:o,cy:s,r0:c,r:b?NaN:l});else{a="area"!==b?0===g&&_?v:e*v:T/m,a<f?(a=f,I-=f):O+=e;var n=M+w*a,i=0,u=0;d>a?(i=M+w*a/2,u=i):(i=M+D,u=n-D),t.setItemLayout(r,{angle:a,startAngle:i,endAngle:u,clockwise:y,cx:o,cy:s,r0:c,r:b?tl(e,x,[c,l]):l}),M=n}})),I<AA&&m)if(I<=.001){var A=T/m;t.each(a,(function(e,r){if(!isNaN(e)){var a=t.getItemLayout(r);a.angle=A;var n=0,i=0;A<d?(n=u+w*(r+.5)*A,i=n):(n=u+w*r*A+D,i=u+w*(r+1)*A-D),a.startAngle=n,a.endAngle=i}}))}else v=I/O,M=u,t.each(a,(function(e,r){if(!isNaN(e)){var a=t.getItemLayout(r),n=a.angle===f?f:e*v,i=0,o=0;n<d?(i=M+w*n/2,o=i):(i=M+D,o=M+w*n-D),a.startAngle=i,a.endAngle=o,M+=w*n}}))}))}var RA=Zl();function LA(e){return{seriesType:e,reset:function(e,t){var r=t.findComponents({mainType:"legend"});if(r&&r.length){var a=e.getData();a.filterSelf((function(e){for(var t=a.getName(e),n=0;n<r.length;n++)if(!r[n].isSelected(t))return!1;return!0}))}}}}var jA=Math.PI/180;function FA(e,t,r,a,n,i,o,s,l,c){if(!(e.length<2)){for(var u=e.length,p=0;p<u;p++)if("outer"===e[p].position&&"labelLine"===e[p].labelAlignTo){var d=e[p].label.x-c;e[p].linePoints[1][0]+=d,e[p].label.x=c}TC(e,l,l+o)&&f(e)}function h(e){for(var i=e.rB,o=i*i,s=0;s<e.list.length;s++){var l=e.list[s],c=Math.abs(l.label.y-r),u=a+l.len,p=u*u,d=Math.sqrt((1-Math.abs(c*c/o))*p),h=t+(d+l.len2)*n,f=h-l.label.x,m=l.targetTextWidth-f*n;zA(l,m,!0),l.label.x=h}}function f(e){for(var i={list:[],maxY:0},o={list:[],maxY:0},s=0;s<e.length;s++)if("none"===e[s].labelAlignTo){var l=e[s],c=l.label.y>r?o:i,u=Math.abs(l.label.y-r);if(u>=c.maxY){var p=l.label.x-t-l.len2*n,d=a+l.len,f=Math.abs(p)<d?Math.sqrt(u*u/(1-p*p/d/d)):d;c.rB=f,c.maxY=u}c.list.push(l)}h(i),h(o)}}function VA(e,t,r,a,n,i,o,s){for(var l=[],c=[],u=Number.MAX_VALUE,p=-Number.MAX_VALUE,d=0;d<e.length;d++){var h=e[d].label;BA(e[d])||(h.x<t?(u=Math.min(u,h.x),l.push(e[d])):(p=Math.max(p,h.x),c.push(e[d])))}for(d=0;d<e.length;d++){var f=e[d];if(!BA(f)&&f.linePoints){if(null!=f.labelStyleWidth)continue;h=f.label;var m=f.linePoints,g=void 0;g="edge"===f.labelAlignTo?h.x<t?m[2][0]-f.labelDistance-o-f.edgeDistance:o+n-f.edgeDistance-m[2][0]-f.labelDistance:"labelLine"===f.labelAlignTo?h.x<t?u-o-f.bleedMargin:o+n-p-f.bleedMargin:h.x<t?h.x-o-f.bleedMargin:o+n-h.x-f.bleedMargin,f.targetTextWidth=g,zA(f,g)}}FA(c,t,r,a,1,n,i,o,s,p),FA(l,t,r,a,-1,n,i,o,s,u);for(d=0;d<e.length;d++){f=e[d];if(!BA(f)&&f.linePoints){h=f.label,m=f.linePoints;var v="edge"===f.labelAlignTo,y=h.style.padding,b=y?y[1]+y[3]:0,_=h.style.backgroundColor?0:b,x=f.rect.width+_,w=m[1][0]-m[2][0];v?h.x<t?m[2][0]=o+f.edgeDistance+x+f.labelDistance:m[2][0]=o+n-f.edgeDistance-x-f.labelDistance:(h.x<t?m[2][0]=h.x+f.labelDistance:m[2][0]=h.x-f.labelDistance,m[1][0]=m[2][0]+w),m[1][1]=m[2][1]=h.y}}}function zA(e,t,r){if(void 0===r&&(r=!1),null==e.labelStyleWidth){var a=e.label,n=a.style,i=e.rect,o=n.backgroundColor,s=n.padding,l=s?s[1]+s[3]:0,c=n.overflow,u=i.width+(o?0:l);if(t<u||r){var p=i.height;if(c&&c.match("break")){a.setStyle("backgroundColor",null),a.setStyle("width",t-l);var d=a.getBoundingRect();a.setStyle("width",Math.ceil(d.width)),a.setStyle("backgroundColor",o)}else{var h=t-l,f=t<u?h:r?h>e.unconstrainedWidth?null:h:null;a.setStyle("width",f)}var m=a.getBoundingRect();i.width=m.width;var g=(a.style.margin||0)+2.1;i.height=m.height+g,i.y-=(i.height-p)/2}}}function BA(e){return"center"===e.position}function $A(e){var t,r,a=e.getData(),n=[],i=!1,o=(e.get("minShowLabelAngle")||0)*jA,s=a.getLayout("viewRect"),l=a.getLayout("r"),c=s.width,u=s.x,p=s.y,d=s.height;function h(e){e.ignore=!0}function f(e){if(!e.ignore)return!0;for(var t in e.states)if(!1===e.states[t].ignore)return!0;return!1}a.each((function(e){var s=a.getItemGraphicEl(e),p=s.shape,d=s.getTextContent(),m=s.getTextGuideLine(),g=a.getItemModel(e),v=g.getModel("label"),y=v.get("position")||g.get(["emphasis","label","position"]),b=v.get("distanceToLabelLine"),_=v.get("alignTo"),x=rl(v.get("edgeDistance"),c),w=v.get("bleedMargin"),S=g.getModel("labelLine"),D=S.get("length");D=rl(D,c);var C=S.get("length2");if(C=rl(C,c),Math.abs(p.endAngle-p.startAngle)<o)return Object(Sa["k"])(d.states,h),d.ignore=!0,void(m&&(Object(Sa["k"])(m.states,h),m.ignore=!0));if(f(d)){var T,I,O,M,A=(p.startAngle+p.endAngle)/2,k=Math.cos(A),P=Math.sin(A);t=p.cx,r=p.cy;var N="inside"===y||"inner"===y;if("center"===y)T=p.cx,I=p.cy,M="center";else{var E=(N?(p.r+p.r0)/2*k:p.r*k)+t,R=(N?(p.r+p.r0)/2*P:p.r*P)+r;if(T=E+3*k,I=R+3*P,!N){var L=E+k*(D+l-p.r),j=R+P*(D+l-p.r),F=L+(k<0?-1:1)*C,V=j;T="edge"===_?k<0?u+x:u+c-x:F+(k<0?-b:b),I=V,O=[[E,R],[L,j],[F,V]]}M=N?"center":"edge"===_?k>0?"right":"left":k>0?"left":"right"}var z=Math.PI,B=0,$=v.get("rotate");if(Object(Sa["z"])($))B=$*(z/180);else if("center"===y)B=0;else if("radial"===$||!0===$){var G=k<0?-A+z:-A;B=G}else if("tangential"===$&&"outside"!==y&&"outer"!==y){var U=Math.atan2(k,P);U<0&&(U=2*z+U);var W=P>0;W&&(U=z+U),B=U-z}if(i=!!B,d.x=T,d.y=I,d.rotation=B,d.setStyle({verticalAlign:"middle"}),N){d.setStyle({align:M});var H=d.states.select;H&&(H.x+=d.x,H.y+=d.y)}else{var q=d.getBoundingRect().clone();q.applyTransform(d.getComputedTransform());var Y=(d.style.margin||0)+2.1;q.y-=Y/2,q.height+=Y,n.push({label:d,labelLine:m,position:y,len:D,len2:C,minTurnAngle:S.get("minTurnAngle"),maxSurfaceAngle:S.get("maxSurfaceAngle"),surfaceNormal:new Ln(k,P),linePoints:O,textAlign:M,labelDistance:b,labelAlignTo:_,edgeDistance:x,bleedMargin:w,rect:q,unconstrainedWidth:q.width,labelStyleWidth:d.style.width})}s.setTextConfig({inside:N})}})),!i&&e.get("avoidLabelOverlap")&&VA(n,t,r,l,c,d,u,p);for(var m=0;m<n.length;m++){var g=n[m],v=g.label,y=g.labelLine,b=isNaN(v.x)||isNaN(v.y);if(v){v.setStyle({align:g.textAlign}),b&&(Object(Sa["k"])(v.states,h),v.ignore=!0);var _=v.states.select;_&&(_.x+=v.x,_.y+=v.y)}if(y){var x=g.linePoints;b||!x?(Object(Sa["k"])(y.states,h),y.ignore=!0):(vC(x,g.minTurnAngle),yC(x,g.surfaceNormal,g.maxSurfaceAngle),y.setShape({points:x}),v.__hostTarget.textGuideLineConfig={anchor:new Ln(x[0][0],x[0][1])})}}}var GA=function(e){function t(t,r,a){var n=e.call(this)||this;n.z2=2;var i=new Gp;return n.setTextContent(i),n.updateData(t,r,a,!0),n}return xa(t,e),t.prototype.updateData=function(e,t,r,a){var n=this,i=e.hostModel,o=e.getItemModel(t),s=o.getModel("emphasis"),l=e.getItemLayout(t),c=Object(Sa["m"])(aA(o.getModel("itemStyle"),l,!0),l);if(isNaN(c.startAngle))n.setShape(c);else{if(a){n.setShape(c);var u=i.getShallow("animationType");i.ecModel.ssr?(lh(n,{scaleX:0,scaleY:0},i,{dataIndex:t,isFrom:!0}),n.originX=c.cx,n.originY=c.cy):"scale"===u?(n.shape.r=l.r0,lh(n,{shape:{r:l.r}},i,t)):null!=r?(n.setShape({startAngle:r,endAngle:r}),lh(n,{shape:{startAngle:l.startAngle,endAngle:l.endAngle}},i,t)):(n.shape.endAngle=l.startAngle,sh(n,{shape:{endAngle:l.endAngle}},i,t))}else hh(n),sh(n,{shape:c},i,t);n.useStyle(e.getItemVisual(t,"style")),Zd(n,o);var p=(l.startAngle+l.endAngle)/2,d=i.get("selectedOffset"),h=Math.cos(p)*d,f=Math.sin(p)*d,m=o.getShallow("cursor");m&&n.attr("cursor",m),this._updateLabel(i,e,t),n.ensureState("emphasis").shape=Object(Sa["m"])({r:l.r+(s.get("scale")&&s.get("scaleSize")||0)},aA(s.getModel("itemStyle"),l)),Object(Sa["m"])(n.ensureState("select"),{x:h,y:f,shape:aA(o.getModel(["select","itemStyle"]),l)}),Object(Sa["m"])(n.ensureState("blur"),{shape:aA(o.getModel(["blur","itemStyle"]),l)});var g=n.getTextGuideLine(),v=n.getTextContent();g&&Object(Sa["m"])(g.ensureState("select"),{x:h,y:f}),Object(Sa["m"])(v.ensureState("select"),{x:h,y:f}),Hd(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))}},t.prototype._updateLabel=function(e,t,r){var a=this,n=t.getItemModel(r),i=n.getModel("labelLine"),o=t.getItemVisual(r,"style"),s=o&&o.fill,l=o&&o.opacity;yh(a,bh(n),{labelFetcher:t.hostModel,labelDataIndex:r,inheritColor:s,defaultOpacity:l,defaultText:e.getFormattedLabel(r,"normal")||t.getName(r)});var c=a.getTextContent();a.setTextConfig({position:null,rotation:null}),c.attr({z2:10});var u=e.get(["label","position"]);if("outside"!==u&&"outer"!==u)a.removeTextGuideLine();else{var p=this.getTextGuideLine();p||(p=new Yb,this.setTextGuideLine(p)),xC(this,wC(n),{stroke:s,opacity:Object(Sa["Q"])(i.get(["lineStyle","opacity"]),l,1)})}},t}(jb),UA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return xa(t,e),t.prototype.render=function(e,t,r,a){var n,i=e.getData(),o=this._data,s=this.group;if(!o&&i.count()>0){for(var l=i.getItemLayout(0),c=1;isNaN(l&&l.startAngle)&&c<i.count();++c)l=i.getItemLayout(c);l&&(n=l.startAngle)}if(this._emptyCircleSector&&s.remove(this._emptyCircleSector),0===i.count()&&e.get("showEmptyCircle")){var u=RA(e),p=new jb({shape:Object(Sa["m"])(NA(e,r),u)});p.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=p,s.add(p)}i.diff(o).add((function(e){var t=new GA(i,e,n);i.setItemGraphicEl(e,t),s.add(t)})).update((function(e,t){var r=o.getItemGraphicEl(t);r.updateData(i,e,n),r.off("click"),s.add(r),i.setItemGraphicEl(e,r)})).remove((function(t){var r=o.getItemGraphicEl(t);dh(r,e,t)})).execute(),$A(e),"expansion"!==e.get("animationTypeUpdate")&&(this._data=i)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,t){var r=t.getData(),a=r.getItemLayout(0);if(a){var n=e[0]-a.cx,i=e[1]-a.cy,o=Math.sqrt(n*n+i*i);return o<=a.r&&o>=a.r0}},t.type="pie",t}(ux),WA=UA;function HA(e,t,r){t=Object(Sa["t"])(t)&&{coordDimensions:t}||Object(Sa["m"])({encodeDefine:e.getEncode()},t);var a=e.getSource(),n=dO(a,t).dimensions,i=new pO(n,e);return i.initData(a,r),i}var qA=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},e.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},e.prototype.getItemVisual=function(e,t){var r=this._getDataWithEncodedVisual();return r.getItemVisual(e,t)},e}(),YA=qA,XA=Zl(),ZA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new YA(Sa["c"](this.getData,this),Sa["c"](this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return HA(this,{coordDimensions:["value"],encodeDefaulter:Sa["h"](km,this)})},t.prototype.getDataParams=function(t){var r=this.getData(),a=XA(r),n=a.seats;if(!n){var i=[];r.each(r.mapDimension("value"),(function(e){i.push(e)})),n=a.seats=ll(i,r.hostModel.get("percentPrecision"))}var o=e.prototype.getDataParams.call(this,t);return o.percent=n[t]||0,o.$vars.push("percent"),o},t.prototype._defaultLabelLine=function(e){Ml(e,"labelLine",["show"]);var t=e.labelLine,r=e.emphasis.labelLine;t.show=t.show&&e.label.show,r.show=r.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(By),KA=ZA;function JA(e){return{seriesType:e,reset:function(e,t){var r=e.getData();r.filterSelf((function(e){var t=r.mapDimension("value"),a=r.get(t,e);return!(Object(Sa["z"])(a)&&!isNaN(a)&&a<0)}))}}}function QA(e){e.registerChartView(WA),e.registerSeriesModel(KA),ow("pie",e.registerAction),e.registerLayout(Object(Sa["h"])(EA,"pie")),e.registerProcessor(LA("pie")),e.registerProcessor(JA("pie"))}var ek=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return xa(t,e),t.prototype.getInitialData=function(e,t){return MO(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},t.prototype.brushSelector=function(e,t,r){return r.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.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"}},t}(By),tk=ek,rk=4,ak=function(){function e(){}return e}(),nk=function(e){function t(t){var r=e.call(this,t)||this;return r._off=0,r.hoverDataIdx=-1,r}return xa(t,e),t.prototype.getDefaultShape=function(){return new ak},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,t){var r,a=t.points,n=t.size,i=this.symbolProxy,o=i.shape,s=e.getContext?e.getContext():e,l=s&&n[0]<rk,c=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,r=this._off;r<a.length;){var u=a[r++],p=a[r++];isNaN(u)||isNaN(p)||(c&&!c.contain(u,p)||(o.x=u-n[0]/2,o.y=p-n[1]/2,o.width=n[0],o.height=n[1],i.buildPath(e,o,!0)))}this.incremental&&(this._off=r,this.notClear=!0)}},t.prototype.afterBrush=function(){var e,t=this.shape,r=t.points,a=t.size,n=this._ctx,i=this.softClipShape;if(n){for(e=this._off;e<r.length;){var o=r[e++],s=r[e++];isNaN(o)||isNaN(s)||(i&&!i.contain(o,s)||n.fillRect(o-a[0]/2,s-a[1]/2,a[0],a[1]))}this.incremental&&(this._off=e,this.notClear=!0)}},t.prototype.findDataIndex=function(e,t){for(var r=this.shape,a=r.points,n=r.size,i=Math.max(n[0],4),o=Math.max(n[1],4),s=a.length/2-1;s>=0;s--){var l=2*s,c=a[l]-i/2,u=a[l+1]-o/2;if(e>=c&&t>=u&&e<=c+i&&t<=u+o)return s}return-1},t.prototype.contain=function(e,t){var r=this.transformCoordToLocal(e,t),a=this.getBoundingRect();if(e=r[0],t=r[1],a.contain(e,t)){var n=this.hoverDataIdx=this.findDataIndex(e,t);return n>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,r=t.points,a=t.size,n=a[0],i=a[1],o=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<r.length;){var p=r[u++],d=r[u++];o=Math.min(p,o),l=Math.max(p,l),s=Math.min(d,s),c=Math.max(d,c)}e=this._rect=new Hn(o-n/2,s-i/2,l-o+n,c-s+i)}return e},t}(lp),ik=function(){function e(){this.group=new Bs}return e.prototype.updateData=function(e,t){this._clear();var r=this._create();r.setShape({points:e.getLayout("points")}),this._setCommon(r,e,t)},e.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild((function(e){if(null!=e.startIndex){var r=2*(e.endIndex-e.startIndex),a=4*e.startIndex*2;t=new Float32Array(t.buffer,a,r)}e.setShape("points",t),e.reset()}))},e.prototype.incrementalPrepareUpdate=function(e){this._clear()},e.prototype.incrementalUpdate=function(e,t,r){var a=this._newAdded[0],n=t.getLayout("points"),i=a&&a.shape.points;if(i&&i.length<2e4){var o=i.length,s=new Float32Array(o+n.length);s.set(i),s.set(n,o),a.endIndex=e.end,a.setShape({points:s})}else{this._newAdded=[];var l=this._create();l.startIndex=e.start,l.endIndex=e.end,l.incremental=!0,l.setShape({points:n}),this._setCommon(l,t,r)}},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new nk({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},e.prototype._setCommon=function(e,t,r){var a=t.hostModel;r=r||{};var n=t.getVisual("symbolSize");e.setShape("size",n instanceof Array?n:[n,n]),e.softClipShape=r.clipShape||null,e.symbolProxy=Sw(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var i=e.shape.size[0]<rk;e.useStyle(a.getModel("itemStyle").getItemStyle(i?["color","shadowBlur","shadowColor"]:["color"]));var o=t.getVisual("style"),s=o&&o.fill;s&&e.setColor(s);var l=Up(e);l.seriesIndex=a.seriesIndex,e.on("mousemove",(function(t){l.dataIndex=null;var r=e.hoverDataIdx;r>=0&&(l.dataIndex=r+(e.startIndex||0))}))},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),ok=ik,sk=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(e,t,r){var a=e.getData(),n=this._updateSymbolDraw(a,e);n.updateData(a,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,r){var a=e.getData(),n=this._updateSymbolDraw(a,e);n.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(e,t,r){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,r){var a=e.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var n=IM("").reset(e,t,r);n.progress&&n.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var t=e.coordinateSystem;return t&&t.getArea&&t.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,t){var r=this._symbolDraw,a=t.pipelineContext,n=a.large;return r&&n===this._isLargeDraw||(r&&r.remove(),r=this._symbolDraw=n?new ok:new BO,this._isLargeDraw=n,this.group.removeAll()),this.group.add(r.group),r},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(ux),lk=sk,ck=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(fm),uk=ck,pk=function(){function e(){}return e.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},e.prototype.getCoordSysModel=function(){},e}(),dk=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",ec).models[0]},t.type="cartesian2dAxis",t}(fm);Sa["K"](dk,pk);var hk={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,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},fk=Sa["I"]({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},hk),mk=Sa["I"]({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}}},hk),gk=Sa["I"]({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},mk),vk=Sa["i"]({logBase:10},mk),yk={category:fk,value:mk,time:gk,log:vk},bk=0,_k=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++bk}return e.createByAxisModel=function(t){var r=t.option,a=r.data,n=a&&Object(Sa["H"])(a,xk);return new e({categories:n,needCollect:!n,deduplication:!1!==r.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,r=this._needCollect;if(!Object(Sa["C"])(e)&&!r)return e;if(r&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var a=this._getOrCreateMap();return t=a.get(e),null==t&&(r?(t=this.categories.length,this.categories[t]=e,a.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Object(Sa["f"])(this.categories))},e}();function xk(e){return Object(Sa["A"])(e)&&null!=e.value?e.value:e+""}var wk=_k,Sk={value:1,category:1,time:1,log:1};function Dk(e,t,r,a){Object(Sa["k"])(Sk,(function(n,i){var o=Object(Sa["I"])(Object(Sa["I"])({},yk[i],!0),a,!0),s=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t+"Axis."+i,r}return xa(r,e),r.prototype.mergeDefaultAndTheme=function(e,t){var r=sm(this),a=r?cm(e):{},n=t.getTheme();Object(Sa["I"])(e,n.get(i+"Axis")),Object(Sa["I"])(e,this.getDefaultOption()),e.type=Ck(e),r&&lm(e,a,r)},r.prototype.optionUpdated=function(){var e=this.option;"category"===e.type&&(this.__ordinalMeta=wk.createByAxisModel(this))},r.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},r.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},r.type=t+"Axis."+i,r.defaultOption=o,r}(r);e.registerComponentModel(s)})),e.registerSubTypeDefaulter(t+"Axis",Ck)}function Ck(e){return e.type||(e.data?"category":"value")}var Tk=function(){function e(e){this._setting=e||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var r=this._extent;isNaN(e)||(r[0]=e),isNaN(t)||(r[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();xc(Tk);var Ik=Tk;function Ok(e){return"interval"===e.type||"log"===e.type}function Mk(e,t,r,a){var n={},i=e[1]-e[0],o=n.interval=vl(i/t,!0);null!=r&&o<r&&(o=n.interval=r),null!=a&&o>a&&(o=n.interval=a);var s=n.intervalPrecision=kk(o),l=n.niceTickExtent=[al(Math.ceil(e[0]/o)*o,s),al(Math.floor(e[1]/o)*o,s)];return Nk(l,e),n}function Ak(e){var t=Math.pow(10,gl(e)),r=e/t;return r?2===r?r=3:3===r?r=5:r*=2:r=1,al(r*t)}function kk(e){return il(e)+2}function Pk(e,t,r){e[t]=Math.max(Math.min(e[t],r[1]),r[0])}function Nk(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),Pk(e,0,t),Pk(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function Ek(e,t){return e>=t[0]&&e<=t[1]}function Rk(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function Lk(e,t){return e*(t[1]-t[0])+t[0]}var jk=function(e){function t(t){var r=e.call(this,t)||this;r.type="ordinal";var a=r.getSetting("ordinalMeta");return a||(a=new wk({})),Object(Sa["t"])(a)&&(a=new wk({categories:Object(Sa["H"])(a,(function(e){return Object(Sa["A"])(e)?e.value:e}))})),r._ordinalMeta=a,r._extent=r.getSetting("extent")||[0,a.categories.length-1],r}return xa(t,e),t.prototype.parse=function(e){return null==e?NaN:Object(Sa["C"])(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),Ek(e,this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),Rk(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(Lk(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){var e=[],t=this._extent,r=t[0];while(r<=t[1])e.push({value:r}),r++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,r=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],n=0,i=this._ordinalMeta.categories.length,o=Math.min(i,t.length);n<o;++n){var s=t[n];r[n]=s,a[s]=n}for(var l=0;n<i;++n){while(null!=a[l])l++;r.push(l),a[l]=n}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),r=this._ordinalMeta.categories[t];return null==r?"":r+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(Ik);Ik.registerClass(jk);var Fk=jk,Vk=al,zk=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return xa(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Ek(e,this._extent)},t.prototype.normalize=function(e){return Rk(e,this._extent)},t.prototype.scale=function(e){return Lk(e,this._extent)},t.prototype.setExtent=function(e,t){var r=this._extent;isNaN(e)||(r[0]=parseFloat(e)),isNaN(t)||(r[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=kk(e)},t.prototype.getTicks=function(e){var t=this._interval,r=this._extent,a=this._niceExtent,n=this._intervalPrecision,i=[];if(!t)return i;var o=1e4;r[0]<a[0]&&(e?i.push({value:Vk(a[0]-t,n)}):i.push({value:r[0]}));var s=a[0];while(s<=a[1]){if(i.push({value:s}),s=Vk(s+t,n),s===i[i.length-1].value)break;if(i.length>o)return[]}var l=i.length?i[i.length-1].value:a[1];return r[1]>l&&(e?i.push({value:Vk(l+t,n)}):i.push({value:r[1]})),i},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),r=[],a=this.getExtent(),n=1;n<t.length;n++){var i=t[n],o=t[n-1],s=0,l=[],c=i.value-o.value,u=c/e;while(s<e-1){var p=Vk(o.value+(s+1)*u);p>a[0]&&p<a[1]&&l.push(p),s++}r.push(l)}return r},t.prototype.getLabel=function(e,t){if(null==e)return"";var r=t&&t.precision;null==r?r=il(e.value)||0:"auto"===r&&(r=this._intervalPrecision);var a=Vk(e.value,r,!0);return Bf(a)},t.prototype.calcNiceTicks=function(e,t,r){e=e||5;var a=this._extent,n=a[1]-a[0];if(isFinite(n)){n<0&&(n=-n,a.reverse());var i=Mk(a,e,t,r);this._intervalPrecision=i.intervalPrecision,this._interval=i.interval,this._niceExtent=i.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var r=Math.abs(t[0]);e.fixMax||(t[1]+=r/2),t[0]-=r/2}else t[1]=1;var a=t[1]-t[0];isFinite(a)||(t[0]=0,t[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var n=this._interval;e.fixMin||(t[0]=Vk(Math.floor(t[0]/n)*n)),e.fixMax||(t[1]=Vk(Math.ceil(t[1]/n)*n))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}(Ik);Ik.registerClass(zk);var Bk=zk,$k=function(e,t,r,a){while(r<a){var n=r+a>>>1;e[n][1]<t?r=n+1:a=n}return r},Gk=function(e){function t(t){var r=e.call(this,t)||this;return r.type="time",r}return xa(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return Sf(e.value,gf[wf(_f(this._minLevelUnit))]||gf.second,t,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,t,r){var a=this.getSetting("useUTC"),n=this.getSetting("locale");return Df(e,t,r,n,a)},t.prototype.getTicks=function(){var e=this._interval,t=this._extent,r=[];if(!e)return r;r.push({value:t[0],level:0});var a=this.getSetting("useUTC"),n=Jk(this._minLevelUnit,this._approxInterval,a,t);return r=r.concat(n),r.push({value:t[1],level:0}),r},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=df,t[1]+=df),t[1]===-1/0&&t[0]===1/0){var r=new Date;t[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),t[0]=t[1]-df}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,t,r){e=e||10;var a=this._extent,n=a[1]-a[0];this._approxInterval=n/e,null!=t&&this._approxInterval<t&&(this._approxInterval=t),null!=r&&this._approxInterval>r&&(this._approxInterval=r);var i=Uk.length,o=Math.min($k(Uk,this._approxInterval,0,i),i-1);this._interval=Uk[o][1],this._minLevelUnit=Uk[Math.max(o-1,0)][0]},t.prototype.parse=function(e){return Object(Sa["z"])(e)?e:+fl(e)},t.prototype.contain=function(e){return Ek(this.parse(e),this._extent)},t.prototype.normalize=function(e){return Rk(this.parse(e),this._extent)},t.prototype.scale=function(e){return Lk(e,this._extent)},t.type="time",t}(Bk),Uk=[["second",cf],["minute",uf],["hour",pf],["quarter-day",6*pf],["half-day",12*pf],["day",1.2*df],["half-week",3.5*df],["week",7*df],["month",31*df],["quarter",95*df],["half-year",hf/2],["year",hf]];function Wk(e,t,r,a){var n=fl(t),i=fl(r),o=function(e){return Tf(n,e,a)===Tf(i,e,a)},s=function(){return o("year")},l=function(){return s()&&o("month")},c=function(){return l()&&o("day")},u=function(){return c()&&o("hour")},p=function(){return u()&&o("minute")},d=function(){return p()&&o("second")},h=function(){return d()&&o("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return c();case"hour":return u();case"minute":return p();case"second":return d();case"millisecond":return h()}}function Hk(e,t){return e/=df,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function qk(e){var t=30*df;return e/=t,e>6?6:e>3?3:e>2?2:1}function Yk(e){return e/=pf,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function Xk(e,t){return e/=t?uf:cf,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function Zk(e){return vl(e,!0)}function Kk(e,t,r){var a=new Date(e);switch(_f(t)){case"year":case"month":a[Rf(r)](0);case"day":a[Lf(r)](1);case"hour":a[jf(r)](0);case"minute":a[Ff(r)](0);case"second":a[Vf(r)](0),a[zf(r)](0)}return a.getTime()}function Jk(e,t,r,a){var n=1e4,i=yf,o=0;function s(e,t,r,n,i,o,s){var l=new Date(t),c=t,u=l[n]();while(c<r&&c<=a[1])s.push({value:c}),u+=e,l[i](u),c=l.getTime();s.push({value:c,notAdd:!0})}function l(e,n,i){var o=[],l=!n.length;if(!Wk(_f(e),a[0],a[1],r)){l&&(n=[{value:Kk(new Date(a[0]),e,r)},{value:a[1]}]);for(var c=0;c<n.length-1;c++){var u=n[c].value,p=n[c+1].value;if(u!==p){var d=void 0,h=void 0,f=void 0,m=!1;switch(e){case"year":d=Math.max(1,Math.round(t/df/365)),h=If(r),f=Ef(r);break;case"half-year":case"quarter":case"month":d=qk(t),h=Of(r),f=Rf(r);break;case"week":case"half-week":case"day":d=Hk(t,31),h=Mf(r),f=Lf(r),m=!0;break;case"half-day":case"quarter-day":case"hour":d=Yk(t),h=Af(r),f=jf(r);break;case"minute":d=Xk(t,!0),h=kf(r),f=Ff(r);break;case"second":d=Xk(t,!1),h=Pf(r),f=Vf(r);break;case"millisecond":d=Zk(t),h=Nf(r),f=zf(r);break}s(d,u,p,h,f,m,o),"year"===e&&i.length>1&&0===c&&i.unshift({value:i[0].value-d})}}for(c=0;c<o.length;c++)i.push(o[c]);return o}}for(var c=[],u=[],p=0,d=0,h=0;h<i.length&&o++<n;++h){var f=_f(i[h]);if(xf(i[h])){l(i[h],c[c.length-1]||[],u);var m=i[h+1]?_f(i[h+1]):null;if(f!==m){if(u.length){d=p,u.sort((function(e,t){return e.value-t.value}));for(var g=[],v=0;v<u.length;++v){var y=u[v].value;0!==v&&u[v-1].value===y||(g.push(u[v]),y>=a[0]&&y<=a[1]&&p++)}var b=(a[1]-a[0])/t;if(p>1.5*b&&d>b/1.5)break;if(c.push(g),p>b||e===i[h])break}u=[]}}}var _=Object(Sa["n"])(Object(Sa["H"])(c,(function(e){return Object(Sa["n"])(e,(function(e){return e.value>=a[0]&&e.value<=a[1]&&!e.notAdd}))})),(function(e){return e.length>0})),x=[],w=_.length-1;for(h=0;h<_.length;++h)for(var S=_[h],D=0;D<S.length;++D)x.push({value:S[D].value,level:w-h});x.sort((function(e,t){return e.value-t.value}));var C=[];for(h=0;h<x.length;++h)0!==h&&x[h].value===x[h-1].value||C.push(x[h]);return C}Ik.registerClass(Gk);var Qk=Gk,eP=Ik.prototype,tP=Bk.prototype,rP=al,aP=Math.floor,nP=Math.ceil,iP=Math.pow,oP=Math.log,sP=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new Bk,t._interval=0,t}return xa(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,r=this._extent,a=t.getExtent(),n=tP.getTicks.call(this,e);return Sa["H"](n,(function(e){var t=e.value,n=al(iP(this.base,t));return n=t===r[0]&&this._fixMin?cP(n,a[0]):n,n=t===r[1]&&this._fixMax?cP(n,a[1]):n,{value:n}}),this)},t.prototype.setExtent=function(e,t){var r=oP(this.base);e=oP(Math.max(0,e))/r,t=oP(Math.max(0,t))/r,tP.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=eP.getExtent.call(this);t[0]=iP(e,t[0]),t[1]=iP(e,t[1]);var r=this._originalScale,a=r.getExtent();return this._fixMin&&(t[0]=cP(t[0],a[0])),this._fixMax&&(t[1]=cP(t[1],a[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=oP(e[0])/oP(t),e[1]=oP(e[1])/oP(t),eP.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent,r=t[1]-t[0];if(!(r===1/0||r<=0)){var a=ml(r),n=e/r*a;n<=.5&&(a*=10);while(!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0)a*=10;var i=[al(nP(t[0]/a)*a),al(aP(t[1]/a)*a)];this._interval=a,this._niceExtent=i}},t.prototype.calcNiceExtent=function(e){tP.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return e=oP(e)/oP(this.base),Ek(e,this._extent)},t.prototype.normalize=function(e){return e=oP(e)/oP(this.base),Rk(e,this._extent)},t.prototype.scale=function(e){return e=Lk(e,this._extent),iP(this.base,e)},t.type="log",t}(Ik),lP=sP.prototype;function cP(e,t){return rP(e,il(t))}lP.getMinorTicks=tP.getMinorTicks,lP.getLabel=tP.getLabel,Ik.registerClass(sP);var uP=sP,pP=function(){function e(e,t,r){this._prepareParams(e,t,r)}return e.prototype._prepareParams=function(e,t,r){r[1]<r[0]&&(r=[NaN,NaN]),this._dataMin=r[0],this._dataMax=r[1];var a=this._isOrdinal="ordinal"===e.type;this._needCrossZero="interval"===e.type&&t.getNeedCrossZero&&t.getNeedCrossZero();var n=t.get("min",!0);null==n&&(n=t.get("startValue",!0));var i=this._modelMinRaw=n;Object(Sa["w"])(i)?this._modelMinNum=mP(e,i({min:r[0],max:r[1]})):"dataMin"!==i&&(this._modelMinNum=mP(e,i));var o=this._modelMaxRaw=t.get("max",!0);if(Object(Sa["w"])(o)?this._modelMaxNum=mP(e,o({min:r[0],max:r[1]})):"dataMax"!==o&&(this._modelMaxNum=mP(e,o)),a)this._axisDataLen=t.getCategories().length;else{var s=t.get("boundaryGap"),l=Object(Sa["t"])(s)?s:[s||0,s||0];"boolean"===typeof l[0]||"boolean"===typeof l[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Ds(l[0],1),Ds(l[1],1)]}},e.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,r=this._dataMax,a=this._axisDataLen,n=this._boundaryGapInner,i=e?null:r-t||Math.abs(t),o="dataMin"===this._modelMinRaw?t:this._modelMinNum,s="dataMax"===this._modelMaxRaw?r:this._modelMaxNum,l=null!=o,c=null!=s;null==o&&(o=e?a?0:NaN:t-n[0]*i),null==s&&(s=e?a?a-1:NaN:r+n[1]*i),(null==o||!isFinite(o))&&(o=NaN),(null==s||!isFinite(s))&&(s=NaN);var u=Object(Sa["l"])(o)||Object(Sa["l"])(s)||e&&!a;this._needCrossZero&&(o>0&&s>0&&!l&&(o=0),o<0&&s<0&&!c&&(s=0));var p=this._determinedMin,d=this._determinedMax;return null!=p&&(o=p,l=!0),null!=d&&(s=d,c=!0),{min:o,max:s,minFixed:l,maxFixed:c,isBlank:u}},e.prototype.modifyDataMinMax=function(e,t){this[hP[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){var r=dP[e];this[r]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),dP={min:"_determinedMin",max:"_determinedMax"},hP={min:"_dataMin",max:"_dataMax"};function fP(e,t,r){var a=e.rawExtentInfo;return a||(a=new pP(e,t,r),e.rawExtentInfo=a,a)}function mP(e,t){return null==t?null:Object(Sa["l"])(t)?NaN:e.parse(t)}function gP(e,t){var r=e.type,a=fP(e,t,e.getExtent()).calculate();e.setBlank(a.isBlank);var n=a.min,i=a.max,o=t.ecModel;if(o&&"time"===r){var s=LM("bar",o),l=!1;if(Sa["k"](s,(function(e){l=l||e.getBaseAxis()===t.axis})),l){var c=FM(s),u=vP(n,i,t,c);n=u.min,i=u.max}}return{extent:[n,i],fixMin:a.minFixed,fixMax:a.maxFixed}}function vP(e,t,r,a){var n=r.axis.getExtent(),i=n[1]-n[0],o=zM(a,r.axis);if(void 0===o)return{min:e,max:t};var s=1/0;Sa["k"](o,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;Sa["k"](o,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var c=s+l,u=t-e,p=1-(s+l)/i,d=u/p-u;return t+=d*(l/c),e-=d*(s/c),{min:e,max:t}}function yP(e,t){var r=t,a=gP(e,r),n=a.extent,i=r.get("splitNumber");e instanceof uP&&(e.base=r.get("logBase"));var o=e.type,s=r.get("interval"),l="interval"===o||"time"===o;e.setExtent(n[0],n[1]),e.calcNiceExtent({splitNumber:i,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),null!=s&&e.setInterval&&e.setInterval(s)}function bP(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new Fk({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new Qk({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(Ik.getClass(t)||Bk)}}function _P(e){var t=e.scale.getExtent(),r=t[0],a=t[1];return!(r>0&&a>0||r<0&&a<0)}function xP(e){var t=e.getLabelModel().get("formatter"),r="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?function(t){return function(r,a){return e.scale.getFormattedLabel(r,a,t)}}(t):Sa["C"](t)?function(t){return function(r){var a=e.scale.getLabel(r),n=t.replace("{value}",null!=a?a:"");return n}}(t):Sa["w"](t)?function(t){return function(a,n){return null!=r&&(n=a.value-r),t(wP(e,a),n,null!=a.level?{level:a.level}:null)}}(t):function(t){return e.scale.getLabel(t)}}function wP(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function SP(e){var t=e.model,r=e.scale;if(t.get(["axisLabel","show"])&&!r.isBlank()){var a,n,i=r.getExtent();r instanceof Fk?n=r.count():(a=r.getTicks(),n=a.length);var o,s=e.getLabelModel(),l=xP(e),c=1;n>40&&(c=Math.ceil(n/40));for(var u=0;u<n;u+=c){var p=a?a[u]:{value:i[0]+u},d=l(p,u),h=s.getTextRect(d),f=DP(h,s.get("rotate")||0);o?o.union(f):o=f}return o}}function DP(e,t){var r=t*Math.PI/180,a=e.width,n=e.height,i=a*Math.abs(Math.cos(r))+Math.abs(n*Math.sin(r)),o=a*Math.abs(Math.sin(r))+Math.abs(n*Math.cos(r)),s=new Hn(e.x,e.y,i,o);return s}function CP(e){var t=e.get("interval");return null==t?"auto":t}function TP(e){return"category"===e.type&&0===CP(e.getLabelModel())}function IP(e,t){var r={};return Sa["k"](e.mapDimensionsAll(t),(function(t){r[SO(e,t)]=!0})),Sa["F"](r)}function OP(e,t,r){t&&Sa["k"](IP(t,r),(function(r){var a=t.getApproximateExtent(r);a[0]<e[0]&&(e[0]=a[0]),a[1]>e[1]&&(e[1]=a[1])}))}var MP=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return Sa["H"](this._dimList,(function(e){return this._axes[e]}),this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Sa["n"](this.getAxes(),(function(t){return t.scale.type===e}))},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),AP=MP,kP=["x","y"];function PP(e){return"interval"===e.type||"time"===e.type}var NP=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=kP,t}return xa(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(PP(e)&&PP(t)){var r=e.getExtent(),a=t.getExtent(),n=this.dataToPoint([r[0],a[0]]),i=this.dataToPoint([r[1],a[1]]),o=r[1]-r[0],s=a[1]-a[0];if(o&&s){var l=(i[0]-n[0])/o,c=(i[1]-n[1])/s,u=n[0]-r[0]*l,p=n[1]-a[0]*c,d=this._transform=[l,0,0,c,u,p];this._invTransform=Nn([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),r=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&r.contain(r.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var r=this.dataToPoint(e),a=this.dataToPoint(t),n=this.getArea(),i=new Hn(r[0],r[1],a[0]-r[0],a[1]-r[1]);return n.intersect(i)},t.prototype.dataToPoint=function(e,t,r){r=r||[];var a=e[0],n=e[1];if(this._transform&&null!=a&&isFinite(a)&&null!=n&&isFinite(n))return $a(r,e,this._transform);var i=this.getAxis("x"),o=this.getAxis("y");return r[0]=i.toGlobalCoord(i.dataToCoord(a,t)),r[1]=o.toGlobalCoord(o.dataToCoord(n,t)),r},t.prototype.clampData=function(e,t){var r=this.getAxis("x").scale,a=this.getAxis("y").scale,n=r.getExtent(),i=a.getExtent(),o=r.parse(e[0]),s=a.parse(e[1]);return t=t||[],t[0]=Math.min(Math.max(Math.min(n[0],n[1]),o),Math.max(n[0],n[1])),t[1]=Math.min(Math.max(Math.min(i[0],i[1]),s),Math.max(i[0],i[1])),t},t.prototype.pointToData=function(e,t){var r=[];if(this._invTransform)return $a(r,e,this._invTransform);var a=this.getAxis("x"),n=this.getAxis("y");return r[0]=a.coordToData(a.toLocalCoord(e[0]),t),r[1]=n.coordToData(n.toLocalCoord(e[1]),t),r},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(e){e=e||0;var t=this.getAxis("x").getGlobalExtent(),r=this.getAxis("y").getGlobalExtent(),a=Math.min(t[0],t[1])-e,n=Math.min(r[0],r[1])-e,i=Math.max(t[0],t[1])-a+e,o=Math.max(r[0],r[1])-n+e;return new Hn(a,n,i,o)},t}(AP),EP=NP,RP=Zl();function LP(e,t){var r=Sa["H"](t,(function(t){return e.scale.parse(t)}));return"time"===e.type&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function jP(e){var t=e.getLabelModel().get("customValues");if(t){var r=xP(e);return{labels:LP(e,t).map((function(t){var a={value:t};return{formattedLabel:r(a),rawLabel:e.scale.getLabel(a),tickValue:t}}))}}return"category"===e.type?VP(e):$P(e)}function FP(e,t){var r=e.getTickModel().get("customValues");return r?{ticks:LP(e,r)}:"category"===e.type?BP(e,t):{ticks:Sa["H"](e.scale.getTicks(),(function(e){return e.value}))}}function VP(e){var t=e.getLabelModel(),r=zP(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function zP(e,t){var r,a,n=GP(e,"labels"),i=CP(t),o=UP(n,i);return o||(Sa["w"](i)?r=ZP(e,i):(a="auto"===i?HP(e):i,r=XP(e,a)),WP(n,i,{labels:r,labelCategoryInterval:a}))}function BP(e,t){var r,a,n=GP(e,"ticks"),i=CP(t),o=UP(n,i);if(o)return o;if(t.get("show")&&!e.scale.isBlank()||(r=[]),Sa["w"](i))r=ZP(e,i,!0);else if("auto"===i){var s=zP(e,e.getLabelModel());a=s.labelCategoryInterval,r=Sa["H"](s.labels,(function(e){return e.tickValue}))}else a=i,r=XP(e,a,!0);return WP(n,i,{ticks:r,tickCategoryInterval:a})}function $P(e){var t=e.scale.getTicks(),r=xP(e);return{labels:Sa["H"](t,(function(t,a){return{level:t.level,formattedLabel:r(t,a),rawLabel:e.scale.getLabel(t),tickValue:t.value}}))}}function GP(e,t){return RP(e)[t]||(RP(e)[t]=[])}function UP(e,t){for(var r=0;r<e.length;r++)if(e[r].key===t)return e[r].value}function WP(e,t,r){return e.push({key:t,value:r}),r}function HP(e){var t=RP(e).autoInterval;return null!=t?t:RP(e).autoInterval=e.calculateCategoryInterval()}function qP(e){var t=YP(e),r=xP(e),a=(t.axisRotate-t.labelRotate)/180*Math.PI,n=e.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=i[0],c=e.dataToCoord(l+1)-e.dataToCoord(l),u=Math.abs(c*Math.cos(a)),p=Math.abs(c*Math.sin(a)),d=0,h=0;l<=i[1];l+=s){var f=0,m=0,g=_s(r({value:l}),t.font,"center","top");f=1.3*g.width,m=1.3*g.height,d=Math.max(d,f,7),h=Math.max(h,m,7)}var v=d/u,y=h/p;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var b=Math.max(0,Math.floor(Math.min(v,y))),_=RP(e.model),x=e.getExtent(),w=_.lastAutoInterval,S=_.lastTickCount;return null!=w&&null!=S&&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 YP(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function XP(e,t,r){var a=xP(e),n=e.scale,i=n.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),c=i[0],u=n.count();0!==c&&l>1&&u/l>2&&(c=Math.round(Math.ceil(c/l)*l));var p=TP(e),d=o.get("showMinLabel")||p,h=o.get("showMaxLabel")||p;d&&c!==i[0]&&m(i[0]);for(var f=c;f<=i[1];f+=l)m(f);function m(e){var t={value:e};s.push(r?e:{formattedLabel:a(t),rawLabel:n.getLabel(t),tickValue:e})}return h&&f-l!==i[1]&&m(i[1]),s}function ZP(e,t,r){var a=e.scale,n=xP(e),i=[];return Sa["k"](a.getTicks(),(function(e){var o=a.getLabel(e),s=e.value;t(e.value,o)&&i.push(r?s:{formattedLabel:n(e),rawLabel:o,tickValue:s})})),i}var KP=[0,1],JP=function(){function e(e,t,r){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=r||[0,0]}return e.prototype.contain=function(e){var t=this._extent,r=Math.min(t[0],t[1]),a=Math.max(t[0],t[1]);return e>=r&&e<=a},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return sl(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var r=this._extent;r[0]=e,r[1]=t},e.prototype.dataToCoord=function(e,t){var r=this._extent,a=this.scale;return e=a.normalize(e),this.onBand&&"ordinal"===a.type&&(r=r.slice(),QP(r,a.count())),tl(e,KP,r,t)},e.prototype.coordToData=function(e,t){var r=this._extent,a=this.scale;this.onBand&&"ordinal"===a.type&&(r=r.slice(),QP(r,a.count()));var n=tl(e,r,KP,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),r=FP(this,t),a=r.ticks,n=Object(Sa["H"])(a,(function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}}),this),i=t.get("alignWithLabel");return eN(this,n,i,e.clamp),n},e.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var r=this.scale.getMinorTicks(t),a=Object(Sa["H"])(r,(function(e){return Object(Sa["H"])(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this);return a},e.prototype.getViewLabels=function(){return jP(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),r=t[1]-t[0]+(this.onBand?1:0);0===r&&(r=1);var a=Math.abs(e[1]-e[0]);return Math.abs(a)/r},e.prototype.calculateCategoryInterval=function(){return qP(this)},e}();function QP(e,t){var r=e[1]-e[0],a=t,n=r/a/2;e[0]+=n,e[1]-=n}function eN(e,t,r,a){var n=t.length;if(e.onBand&&!r&&n){var i,o,s=e.getExtent();if(1===n)t[0].coord=s[0],i=t[1]={coord:s[1]};else{var l=t[n-1].tickValue-t[0].tickValue,c=(t[n-1].coord-t[0].coord)/l;Object(Sa["k"])(t,(function(e){e.coord-=c/2}));var u=e.scale.getExtent();o=1+u[1]-t[n-1].tickValue,i={coord:t[n-1].coord+c*o},t.push(i)}var p=s[0]>s[1];d(t[0].coord,s[0])&&(a?t[0].coord=s[0]:t.shift()),a&&d(s[0],t[0].coord)&&t.unshift({coord:s[0]}),d(s[1],i.coord)&&(a?i.coord=s[1]:t.pop()),a&&d(i.coord,s[1])&&t.push({coord:s[1]})}function d(e,t){return e=al(e),t=al(t),p?e>t:e<t}}var tN=JP,rN=function(e){function t(t,r,a,n,i){var o=e.call(this,t,r,a)||this;return o.index=0,o.type=n||"value",o.position=i||"bottom",o}return xa(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(tN),aN=rN;function nN(e,t,r){r=r||{};var a=e.coordinateSystem,n=t.axis,i={},o=n.getAxesOnZeroOf()[0],s=n.position,l=o?"onZero":s,c=n.dim,u=a.getRect(),p=[u.x,u.x+u.width,u.y,u.y+u.height],d={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,f="x"===c?[p[2]-h,p[3]+h]:[p[0]-h,p[1]+h];if(o){var m=o.toGlobalCoord(o.dataToCoord(0));f[d.onZero]=Math.max(Math.min(m,f[1]),f[0])}i.position=["y"===c?f[d[l]]:p[0],"x"===c?f[d[l]]:p[3]],i.rotation=Math.PI/2*("x"===c?0:1);var g={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=g[s],i.labelOffset=o?f[d[s]]-f[d.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Sa["O"](r.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var v=t.get(["axisLabel","rotate"]);return i.labelRotate="top"===l?-v:v,i.z2=1,i}function iN(e){return"cartesian2d"===e.get("coordinateSystem")}function oN(e){var t={xAxisModel:null,yAxisModel:null};return Sa["k"](t,(function(r,a){var n=a.replace(/Model$/,""),i=e.getReferringComponents(n,ec).models[0];t[a]=i})),t}var sN=Math.log;function lN(e,t,r){var a=Bk.prototype,n=a.getTicks.call(r),i=a.getTicks.call(r,!0),o=n.length-1,s=a.getInterval.call(r),l=gP(e,t),c=l.extent,u=l.fixMin,p=l.fixMax;if("log"===e.type){var d=sN(e.base);c=[sN(c[0])/d,sN(c[1])/d]}e.setExtent(c[0],c[1]),e.calcNiceExtent({splitNumber:o,fixMin:u,fixMax:p});var h=a.getExtent.call(e);u&&(c[0]=h[0]),p&&(c[1]=h[1]);var f=a.getInterval.call(e),m=c[0],g=c[1];if(u&&p)f=(g-m)/o;else if(u){g=c[0]+f*o;while(g<c[1]&&isFinite(g)&&isFinite(c[1]))f=Ak(f),g=c[0]+f*o}else if(p){m=c[1]-f*o;while(m>c[0]&&isFinite(m)&&isFinite(c[0]))f=Ak(f),m=c[1]-f*o}else{var v=e.getTicks().length-1;v>o&&(f=Ak(f));var y=f*o;g=Math.ceil(c[1]/f)*f,m=al(g-y),m<0&&c[0]>=0?(m=0,g=al(y)):g>0&&c[1]<=0&&(g=0,m=-al(y))}var b=(n[0].value-i[0].value)/s,_=(n[o].value-i[o].value)/s;a.setExtent.call(e,m+f*b,g+f*_),a.setInterval.call(e,f),(b||_)&&a.setNiceExtent.call(e,m+f,g-f)}var cN=function(){function e(e,t,r){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=kP,this._initCartesian(e,t,r),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var r=this._axesMap;function a(e){var t,r=Object(Sa["F"])(e),a=r.length;if(a){for(var n=[],i=a-1;i>=0;i--){var o=+r[i],s=e[o],l=s.model,c=s.scale;Ok(c)&&l.get("alignTicks")&&null==l.get("interval")?n.push(s):(yP(c,l),Ok(c)&&(t=s))}n.length&&(t||(t=n.pop(),yP(t.scale,t.model)),Object(Sa["k"])(n,(function(e){lN(e.scale,e.model,t.scale)})))}}this._updateScale(e,this.model),a(r.x),a(r.y);var n={};Object(Sa["k"])(r.x,(function(e){pN(r,"y",e,n)})),Object(Sa["k"])(r.y,(function(e){pN(r,"x",e,n)})),this.resize(this.model,t)},e.prototype.resize=function(e,t,r){var a=e.getBoxLayoutParams(),n=!r&&e.get("containLabel"),i=nm(a,{width:t.getWidth(),height:t.getHeight()});this._rect=i;var o=this._axesList;function s(){Object(Sa["k"])(o,(function(e){var t=e.isHorizontal(),r=t?[0,i.width]:[0,i.height],a=e.inverse?1:0;e.setExtent(r[a],r[1-a]),hN(e,t?i.x:i.y)}))}s(),n&&(Object(Sa["k"])(o,(function(e){if(!e.model.get(["axisLabel","inside"])){var t=SP(e);if(t){var r=e.isHorizontal()?"height":"width",a=e.model.get(["axisLabel","margin"]);i[r]-=t[r]+a,"top"===e.position?i.y+=t.height+a:"left"===e.position&&(i.x+=t.width+a)}}})),s()),Object(Sa["k"])(this._coordsList,(function(e){e.calcAffineTransform()}))},e.prototype.getAxis=function(e,t){var r=this._axesMap[e];if(null!=r)return r[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(null!=e&&null!=t){var r="x"+e+"y"+t;return this._coordsMap[r]}Object(Sa["A"])(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var a=0,n=this._coordsList;a<n.length;a++)if(n[a].getAxis("x").index===e||n[a].getAxis("y").index===t)return n[a]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,r){var a=this._findConvertTarget(t);return a.cartesian?a.cartesian.dataToPoint(r):a.axis?a.axis.toGlobalCoord(a.axis.dataToCoord(r)):null},e.prototype.convertFromPixel=function(e,t,r){var a=this._findConvertTarget(t);return a.cartesian?a.cartesian.pointToData(r):a.axis?a.axis.coordToData(a.axis.toLocalCoord(r)):null},e.prototype._findConvertTarget=function(e){var t,r,a=e.seriesModel,n=e.xAxisModel||a&&a.getReferringComponents("xAxis",ec).models[0],i=e.yAxisModel||a&&a.getReferringComponents("yAxis",ec).models[0],o=e.gridModel,s=this._coordsList;if(a)t=a.coordinateSystem,Object(Sa["r"])(s,t)<0&&(t=null);else if(n&&i)t=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)r=this.getAxis("x",n.componentIndex);else if(i)r=this.getAxis("y",i.componentIndex);else if(o){var l=o.coordinateSystem;l===this&&(t=this._coordsList[0])}return{cartesian:t,axis:r}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,r){var a=this,n=this,i={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},s={x:0,y:0};if(t.eachComponent("xAxis",l("x"),this),t.eachComponent("yAxis",l("y"),this),!s.x||!s.y)return this._axesMap={},void(this._axesList=[]);function l(t){return function(r,a){if(uN(r,e)){var l=r.get("position");"x"===t?"top"!==l&&"bottom"!==l&&(l=i.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=i.left?"right":"left"),i[l]=!0;var c=new aN(t,bP(r),[0,0],r.get("type"),l),u="category"===c.type;c.onBand=u&&r.get("boundaryGap"),c.inverse=r.get("inverse"),r.axis=c,c.model=r,c.grid=n,c.index=a,n._axesList.push(c),o[t][a]=c,s[t]++}}}this._axesMap=o,Object(Sa["k"])(o.x,(function(t,r){Object(Sa["k"])(o.y,(function(n,i){var o="x"+r+"y"+i,s=new EP(o);s.master=a,s.model=e,a._coordsMap[o]=s,a._coordsList.push(s),s.addAxis(t),s.addAxis(n)}))}))},e.prototype._updateScale=function(e,t){function r(e,t){Object(Sa["k"])(IP(e,t.dim),(function(r){t.scale.unionExtentFromData(e,r)}))}Object(Sa["k"])(this._axesList,(function(e){if(e.scale.setExtent(1/0,-1/0),"category"===e.type){var t=e.model.get("categorySortInfo");e.scale.setSortInfo(t)}})),e.eachSeries((function(e){if(iN(e)){var a=oN(e),n=a.xAxisModel,i=a.yAxisModel;if(!uN(n,t)||!uN(i,t))return;var o=this.getCartesian(n.componentIndex,i.componentIndex),s=e.getData(),l=o.getAxis("x"),c=o.getAxis("y");r(s,l),r(s,c)}}),this)},e.prototype.getTooltipAxes=function(e){var t=[],r=[];return Object(Sa["k"])(this.getCartesians(),(function(a){var n=null!=e&&"auto"!==e?a.getAxis(e):a.getBaseAxis(),i=a.getOtherAxis(n);Object(Sa["r"])(t,n)<0&&t.push(n),Object(Sa["r"])(r,i)<0&&r.push(i)})),{baseAxes:t,otherAxes:r}},e.create=function(t,r){var a=[];return t.eachComponent("grid",(function(n,i){var o=new e(n,t,r);o.name="grid_"+i,o.resize(n,r,!0),n.coordinateSystem=o,a.push(o)})),t.eachSeries((function(e){if(iN(e)){var t=oN(e),r=t.xAxisModel,a=t.yAxisModel,n=r.getCoordSysModel();0;var i=n.coordinateSystem;e.coordinateSystem=i.getCartesian(r.componentIndex,a.componentIndex)}})),a},e.dimensions=kP,e}();function uN(e,t){return e.getCoordSysModel()===t}function pN(e,t,r,a){r.getAxesOnZeroOf=function(){return n?[n]:[]};var n,i=e[t],o=r.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)dN(i[l])&&(n=i[l]);else for(var c in i)if(i.hasOwnProperty(c)&&dN(i[c])&&!a[u(i[c])]){n=i[c];break}n&&(a[u(n)]=!0)}function u(e){return e.dim+"_"+e.index}}function dN(e){return e&&"category"!==e.type&&"time"!==e.type&&_P(e)}function hN(e,t){var r=e.getExtent(),a=r[0]+r[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return a-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return a-e+t}}var fN=cN,mN=Math.PI,gN=function(){function e(e,t){this.group=new Bs,this.opt=t,this.axisModel=e,Object(Sa["i"])(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var r=new Bs({x:t.position[0],y:t.position[1],rotation:t.rotation});r.updateTransform(),this._transformGroup=r}return e.prototype.hasBuilder=function(e){return!!vN[e]},e.prototype.add=function(e){vN[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,r){var a,n,i=pl(t-e);return dl(i)?(n=r>0?"top":"bottom",a="center"):dl(i-mN)?(n=r>0?"bottom":"top",a="center"):(n="middle",a=i>0&&i<mN?r>0?"right":"left":r>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:n}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),vN={axisLine:function(e,t,r,a){var n=t.get(["axisLine","show"]);if("auto"===n&&e.handleAutoShown&&(n=e.handleAutoShown("axisLine")),n){var i=t.axis.getExtent(),o=a.transform,s=[i[0],0],l=[i[1],0],c=s[0]>l[0];o&&($a(s,s,o),$a(l,l,o));var u=Object(Sa["m"])({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),p=new Jb({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});j_(p.shape,p.style.lineWidth),p.anid="line",r.add(p);var d=t.get(["axisLine","symbol"]);if(null!=d){var h=t.get(["axisLine","symbolSize"]);Object(Sa["C"])(d)&&(d=[d,d]),(Object(Sa["C"])(h)||Object(Sa["z"])(h))&&(h=[h,h]);var f=Cw(t.get(["axisLine","symbolOffset"])||0,h),m=h[0],g=h[1];Object(Sa["k"])([{rotate:e.rotation+Math.PI/2,offset:f[0],r:0},{rotate:e.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(t,a){if("none"!==d[a]&&null!=d[a]){var n=Sw(d[a],-m/2,-g/2,m,g,u.stroke,!0),i=t.r+t.offset,o=c?l:s;n.attr({rotation:t.rotate,x:o[0]+i*Math.cos(e.rotation),y:o[1]-i*Math.sin(e.rotation),silent:!0,z2:11}),r.add(n)}}))}}},axisTickLabel:function(e,t,r,a){var n=DN(r,a,t,e),i=TN(r,a,t,e);if(bN(t,i,n),CN(r,a,t,e.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=SC(Object(Sa["H"])(i,(function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}})));IC(o)}},axisName:function(e,t,r,a){var n=Object(Sa["O"])(e.axisName,t.get("name"));if(n){var i,o,s=t.get("nameLocation"),l=e.nameDirection,c=t.getModel("nameTextStyle"),u=t.get("nameGap")||0,p=t.axis.getExtent(),d=p[0]>p[1]?-1:1,h=["start"===s?p[0]-d*u:"end"===s?p[1]+d*u:(p[0]+p[1])/2,wN(s)?e.labelOffset+l*u:0],f=t.get("nameRotate");null!=f&&(f=f*mN/180),wN(s)?i=gN.innerTextLayout(e.rotation,null!=f?f:e.rotation,l):(i=yN(e.rotation,s,f||0,p),o=e.axisNameAvailableWidth,null!=o&&(o=Math.abs(o/Math.sin(i.rotation)),!isFinite(o)&&(o=null)));var m=c.getFont(),g=t.get("nameTruncate",!0)||{},v=g.ellipsis,y=Object(Sa["O"])(e.nameTruncateMaxWidth,g.maxWidth,o),b=new Gp({x:h[0],y:h[1],rotation:i.rotation,silent:gN.isLabelSilent(t),style:_h(c,{text:n,font:m,overflow:"truncate",width:y,ellipsis:v,fill:c.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:c.get("align")||i.textAlign,verticalAlign:c.get("verticalAlign")||i.textVerticalAlign}),z2:1});if(Q_({el:b,componentModel:t,itemName:n}),b.__fullText=n,b.anid="name",t.get("triggerEvent")){var _=gN.makeAxisEventDataBase(t);_.targetType="axisName",_.name=n,Up(b).eventData=_}a.add(b),b.updateTransform(),r.add(b),b.decomposeTransform()}}};function yN(e,t,r,a){var n,i,o=pl(r-e),s=a[0]>a[1],l="start"===t&&!s||"start"!==t&&s;return dl(o-mN/2)?(i=l?"bottom":"top",n="center"):dl(o-1.5*mN)?(i=l?"top":"bottom",n="center"):(i="middle",n=o<1.5*mN&&o>mN/2?l?"left":"right":l?"right":"left"),{rotation:o,textAlign:n,textVerticalAlign:i}}function bN(e,t,r){if(!TP(e.axis)){var a=e.get(["axisLabel","showMinLabel"]),n=e.get(["axisLabel","showMaxLabel"]);t=t||[],r=r||[];var i=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],c=r[0],u=r[1],p=r[r.length-1],d=r[r.length-2];!1===a?(_N(i),_N(c)):xN(i,o)&&(a?(_N(o),_N(u)):(_N(i),_N(c))),!1===n?(_N(s),_N(p)):xN(l,s)&&(n?(_N(l),_N(d)):(_N(s),_N(p)))}}function _N(e){e&&(e.ignore=!0)}function xN(e,t){var r=e&&e.getBoundingRect().clone(),a=t&&t.getBoundingRect().clone();if(r&&a){var n=In([]);return kn(n,n,-e.rotation),r.applyTransform(Mn([],n,e.getLocalTransform())),a.applyTransform(Mn([],n,t.getLocalTransform())),r.intersect(a)}}function wN(e){return"middle"===e||"center"===e}function SN(e,t,r,a,n){for(var i=[],o=[],s=[],l=0;l<e.length;l++){var c=e[l].coord;o[0]=c,o[1]=0,s[0]=c,s[1]=r,t&&($a(o,o,t),$a(s,s,t));var u=new Jb({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:a,z2:2,autoBatch:!0,silent:!0});j_(u.shape,u.style.lineWidth),u.anid=n+"_"+e[l].tickValue,i.push(u)}return i}function DN(e,t,r,a){var n=r.axis,i=r.getModel("axisTick"),o=i.get("show");if("auto"===o&&a.handleAutoShown&&(o=a.handleAutoShown("axisTick")),o&&!n.scale.isBlank()){for(var s=i.getModel("lineStyle"),l=a.tickDirection*i.get("length"),c=n.getTicksCoords(),u=SN(c,t.transform,l,Object(Sa["i"])(s.getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])}),"ticks"),p=0;p<u.length;p++)e.add(u[p]);return u}}function CN(e,t,r,a){var n=r.axis,i=r.getModel("minorTick");if(i.get("show")&&!n.scale.isBlank()){var o=n.getMinorTicksCoords();if(o.length)for(var s=i.getModel("lineStyle"),l=a*i.get("length"),c=Object(Sa["i"])(s.getLineStyle(),Object(Sa["i"])(r.getModel("axisTick").getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])})),u=0;u<o.length;u++)for(var p=SN(o[u],t.transform,l,c,"minorticks_"+u),d=0;d<p.length;d++)e.add(p[d])}}function TN(e,t,r,a){var n=r.axis,i=Object(Sa["O"])(a.axisLabelShow,r.get(["axisLabel","show"]));if(i&&!n.scale.isBlank()){var o=r.getModel("axisLabel"),s=o.get("margin"),l=n.getViewLabels(),c=(Object(Sa["O"])(a.labelRotate,o.get("rotate"))||0)*mN/180,u=gN.innerTextLayout(a.rotation,c,a.labelDirection),p=r.getCategories&&r.getCategories(!0),d=[],h=gN.isLabelSilent(r),f=r.get("triggerEvent");return Object(Sa["k"])(l,(function(i,c){var m="ordinal"===n.scale.type?n.scale.getRawOrdinalNumber(i.tickValue):i.tickValue,g=i.formattedLabel,v=i.rawLabel,y=o;if(p&&p[m]){var b=p[m];Object(Sa["A"])(b)&&b.textStyle&&(y=new Uh(b.textStyle,o,r.ecModel))}var _=y.getTextColor()||r.get(["axisLine","lineStyle","color"]),x=n.dataToCoord(m),w=y.getShallow("align",!0)||u.textAlign,S=Object(Sa["P"])(y.getShallow("alignMinLabel",!0),w),D=Object(Sa["P"])(y.getShallow("alignMaxLabel",!0),w),C=y.getShallow("verticalAlign",!0)||y.getShallow("baseline",!0)||u.textVerticalAlign,T=Object(Sa["P"])(y.getShallow("verticalAlignMinLabel",!0),C),I=Object(Sa["P"])(y.getShallow("verticalAlignMaxLabel",!0),C),O=new Gp({x:x,y:a.labelOffset+a.labelDirection*s,rotation:u.rotation,silent:h,z2:10+(i.level||0),style:_h(y,{text:g,align:0===c?S:c===l.length-1?D:w,verticalAlign:0===c?T:c===l.length-1?I:C,fill:Object(Sa["w"])(_)?_("category"===n.type?v:"value"===n.type?m+"":m,c):_})});if(O.anid="label_"+m,f){var M=gN.makeAxisEventDataBase(r);M.targetType="axisLabel",M.value=v,M.tickIndex=c,"category"===n.type&&(M.dataIndex=m),Up(O).eventData=M}t.add(O),O.updateTransform(),d.push(O),e.add(O),O.decomposeTransform()})),d}}var IN=gN;function ON(e,t){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return MN(r,e,t),r.seriesInvolved&&kN(r,e),r}function MN(e,t,r){var a=t.getComponent("tooltip"),n=t.getComponent("axisPointer"),i=n.get("link",!0)||[],o=[];Object(Sa["k"])(r.getCoordinateSystems(),(function(r){if(r.axisPointerEnabled){var s=FN(r.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=r;var c=r.model,u=c.getModel("tooltip",a);if(Object(Sa["k"])(r.getAxes(),Object(Sa["h"])(f,!1,null)),r.getTooltipAxes&&a&&u.get("show")){var p="axis"===u.get("trigger"),d="cross"===u.get(["axisPointer","type"]),h=r.getTooltipAxes(u.get(["axisPointer","axis"]));(p||d)&&Object(Sa["k"])(h.baseAxes,Object(Sa["h"])(f,!d||"cross",p)),d&&Object(Sa["k"])(h.otherAxes,Object(Sa["h"])(f,"cross",!1))}}function f(a,s,c){var p=c.model.getModel("axisPointer",n),d=p.get("show");if(d&&("auto"!==d||a||jN(p))){null==s&&(s=p.get("triggerTooltip")),p=a?AN(c,u,n,t,a,s):p;var h=p.get("snap"),f=p.get("triggerEmphasis"),m=FN(c.model),g=s||h||"category"===c.type,v=e.axesInfo[m]={key:m,axis:c,coordSys:r,axisPointerModel:p,triggerTooltip:s,triggerEmphasis:f,involveSeries:g,snap:h,useHandle:jN(p),seriesModels:[],linkGroup:null};l[m]=v,e.seriesInvolved=e.seriesInvolved||g;var y=PN(i,c);if(null!=y){var b=o[y]||(o[y]={axesInfo:{}});b.axesInfo[m]=v,b.mapper=i[y].mapper,v.linkGroup=b}}}}))}function AN(e,t,r,a,n,i){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};Object(Sa["k"])(s,(function(e){l[e]=Object(Sa["d"])(o.get(e))})),l.snap="category"!==e.type&&!!i,"cross"===o.get("type")&&(l.type="line");var c=l.label||(l.label={});if(null==c.show&&(c.show=!1),"cross"===n){var u=o.get(["label","show"]);if(c.show=null==u||u,!i){var p=l.lineStyle=o.get("crossStyle");p&&Object(Sa["i"])(c,p.textStyle)}}return e.model.getModel("axisPointer",new Uh(l,r,a))}function kN(e,t){t.eachSeries((function(t){var r=t.coordinateSystem,a=t.get(["tooltip","trigger"],!0),n=t.get(["tooltip","show"],!0);r&&"none"!==a&&!1!==a&&"item"!==a&&!1!==n&&!1!==t.get(["axisPointer","show"],!0)&&Object(Sa["k"])(e.coordSysAxesInfo[FN(r.model)],(function(e){var a=e.axis;r.getAxis(a.dim)===a&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())}))}))}function PN(e,t){for(var r=t.model,a=t.dim,n=0;n<e.length;n++){var i=e[n]||{};if(NN(i[a+"AxisId"],r.id)||NN(i[a+"AxisIndex"],r.componentIndex)||NN(i[a+"AxisName"],r.name))return n}}function NN(e,t){return"all"===e||Object(Sa["t"])(e)&&Object(Sa["r"])(e,t)>=0||e===t}function EN(e){var t=RN(e);if(t){var r=t.axisPointerModel,a=t.axis.scale,n=r.option,i=r.get("status"),o=r.get("value");null!=o&&(o=a.parse(o));var s=jN(r);null==i&&(n.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),n.value=o,s&&(n.status=t.axis.scale.isBlank()?"hide":"show")}}function RN(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[FN(e)]}function LN(e){var t=RN(e);return t&&t.axisPointerModel}function jN(e){return!!e.get(["handle","show"])}function FN(e){return e.type+"||"+e.id}var VN={},zN=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(t,r,a,n){this.axisPointerClass&&EN(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,a,!0)},t.prototype.updateAxisPointer=function(e,t,r,a){this._doUpdateAxisPointerClass(e,r,!1)},t.prototype.remove=function(e,t){var r=this._axisPointer;r&&r.remove(t)},t.prototype.dispose=function(t,r){this._disposeAxisPointer(r),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,r,a){var n=t.getAxisPointerClass(this.axisPointerClass);if(n){var i=LN(e);i?(this._axisPointer||(this._axisPointer=new n)).render(e,i,r,a):this._disposeAxisPointer(r)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){VN[e]=t},t.getAxisPointerClass=function(e){return e&&VN[e]},t.type="axis",t}(Gy),BN=zN,$N=Zl();function GN(e,t,r,a){var n=r.axis;if(!n.scale.isBlank()){var i=r.getModel("splitArea"),o=i.getModel("areaStyle"),s=o.get("color"),l=a.coordinateSystem.getRect(),c=n.getTicksCoords({tickModel:i,clamp:!0});if(c.length){var u=s.length,p=$N(e).splitAreaColors,d=Sa["f"](),h=0;if(p)for(var f=0;f<c.length;f++){var m=p.get(c[f].tickValue);if(null!=m){h=(m+(u-1)*f)%u;break}}var g=n.toGlobalCoord(c[0].coord),v=o.getAreaStyle();s=Sa["t"](s)?s:[s];for(f=1;f<c.length;f++){var y=n.toGlobalCoord(c[f].coord),b=void 0,_=void 0,x=void 0,w=void 0;n.isHorizontal()?(b=g,_=l.y,x=y-b,w=l.height,g=b+x):(b=l.x,_=g,x=l.width,w=y-_,g=_+w);var S=c[f-1].tickValue;null!=S&&d.set(S,h),t.add(new Cp({anid:null!=S?"area_"+S:null,shape:{x:b,y:_,width:x,height:w},style:Sa["i"]({fill:s[h]},v),autoBatch:!0,silent:!0})),h=(h+1)%u}$N(e).splitAreaColors=d}}}function UN(e){$N(e).splitAreaColors=null}var WN=["axisLine","axisTickLabel","axisName"],HN=["splitArea","splitLine","minorSplitLine"],qN=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="CartesianAxisPointer",r}return xa(t,e),t.prototype.render=function(t,r,a,n){this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new Bs,this.group.add(this._axisGroup),t.get("show")){var o=t.getCoordSysModel(),s=nN(o,t),l=new IN(t,Sa["m"]({handleAutoShown:function(e){for(var r=o.coordinateSystem.getCartesians(),a=0;a<r.length;a++)if(Ok(r[a].getOtherAxis(t.axis).scale))return!0;return!1}},s));Sa["k"](WN,l.add,l),this._axisGroup.add(l.getGroup()),Sa["k"](HN,(function(e){t.get([e,"show"])&&YN[e](this,this._axisGroup,t,o)}),this);var c=n&&"changeAxisOrder"===n.type&&n.isInitSort;c||W_(i,this._axisGroup,t),e.prototype.render.call(this,t,r,a,n)}},t.prototype.remove=function(){UN(this)},t.type="cartesianAxis",t}(BN),YN={splitLine:function(e,t,r,a){var n=r.axis;if(!n.scale.isBlank()){var i=r.getModel("splitLine"),o=i.getModel("lineStyle"),s=o.get("color");s=Sa["t"](s)?s:[s];for(var l=a.coordinateSystem.getRect(),c=n.isHorizontal(),u=0,p=n.getTicksCoords({tickModel:i}),d=[],h=[],f=o.getLineStyle(),m=0;m<p.length;m++){var g=n.toGlobalCoord(p[m].coord);c?(d[0]=g,d[1]=l.y,h[0]=g,h[1]=l.y+l.height):(d[0]=l.x,d[1]=g,h[0]=l.x+l.width,h[1]=g);var v=u++%s.length,y=p[m].tickValue,b=new Jb({anid:null!=y?"line_"+p[m].tickValue:null,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:h[0],y2:h[1]},style:Sa["i"]({stroke:s[v]},f),silent:!0});j_(b.shape,f.lineWidth),t.add(b)}}},minorSplitLine:function(e,t,r,a){var n=r.axis,i=r.getModel("minorSplitLine"),o=i.getModel("lineStyle"),s=a.coordinateSystem.getRect(),l=n.isHorizontal(),c=n.getMinorTicksCoords();if(c.length)for(var u=[],p=[],d=o.getLineStyle(),h=0;h<c.length;h++)for(var f=0;f<c[h].length;f++){var m=n.toGlobalCoord(c[h][f].coord);l?(u[0]=m,u[1]=s.y,p[0]=m,p[1]=s.y+s.height):(u[0]=s.x,u[1]=m,p[0]=s.x+s.width,p[1]=m);var g=new Jb({anid:"minor_line_"+c[h][f].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:p[0],y2:p[1]},style:d,silent:!0});j_(g.shape,d.lineWidth),t.add(g)}},splitArea:function(e,t,r,a){GN(e,t,r,a)}},XN=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.type="xAxis",t}(qN),ZN=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=XN.type,t}return xa(t,e),t.type="yAxis",t}(qN),KN=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return xa(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new Cp({shape:e.coordinateSystem.getRect(),style:Object(Sa["i"])({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(Gy),JN={offset:0};function QN(e){e.registerComponentView(KN),e.registerComponentModel(uk),e.registerCoordinateSystem("cartesian2d",fN),Dk(e,"x",dk,JN),Dk(e,"y",dk,JN),e.registerComponentView(XN),e.registerComponentView(ZN),e.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})}))}function eE(e){JD(QN),e.registerSeriesModel(tk),e.registerChartView(lk),e.registerLayout(IM("scatter"))}function tE(e){e.eachSeriesByType("radar",(function(e){var t=e.getData(),r=[],a=e.coordinateSystem;if(a){var n=a.getIndicatorAxes();Sa["k"](n,(function(e,i){t.each(t.mapDimension(n[i].dim),(function(e,t){r[t]=r[t]||[];var n=a.dataToPoint(e,i);r[t][i]=rE(n)?n:aE(a)}))})),t.each((function(e){var n=Sa["o"](r[e],(function(e){return rE(e)}))||aE(a);r[e].push(n.slice()),t.setItemLayout(e,r[e])}))}}))}function rE(e){return!isNaN(e[0])&&!isNaN(e[1])}function aE(e){return[e.cx,e.cy]}function nE(e){var t=e.polar;if(t){Sa["t"](t)||(t=[t]);var r=[];Sa["k"](t,(function(t,a){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],Sa["t"](e.radar)||(e.radar=[e.radar]),e.radar.push(t)):r.push(t)})),e.polar=r}Sa["k"](e.series,(function(e){e&&"radar"===e.type&&e.polarIndex&&(e.radarIndex=e.polarIndex)}))}var iE=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(e,t,r){var n=e.coordinateSystem,i=this.group,o=e.getData(),s=this._data;function l(e,t){var r=e.getItemVisual(t,"symbol")||"circle";if("none"!==r){var a=Dw(e.getItemVisual(t,"symbolSize")),n=Sw(r,-1,-1,2,2),i=e.getItemVisual(t,"symbolRotate")||0;return n.attr({style:{strokeNoScale:!0},z2:100,scaleX:a[0]/2,scaleY:a[1]/2,rotation:i*Math.PI/180||0}),n}}function c(t,r,n,i,o,s){n.removeAll();for(var c=0;c<r.length-1;c++){var u=l(i,o);u&&(u.__dimIdx=c,t[c]?(u.setPosition(t[c]),a[s?"initProps":"updateProps"](u,{x:r[c][0],y:r[c][1]},e,o)):u.setPosition(r[c]),n.add(u))}}function u(e){return Sa["H"](e,(function(e){return[n.cx,n.cy]}))}o.diff(s).add((function(t){var r=o.getItemLayout(t);if(r){var a=new Wb,n=new Yb,i={shape:{points:r}};a.shape.points=u(r),n.shape.points=u(r),lh(a,i,e,t),lh(n,i,e,t);var s=new Bs,l=new Bs;s.add(n),s.add(a),s.add(l),c(n.shape.points,r,l,o,t,!0),o.setItemGraphicEl(t,s)}})).update((function(t,r){var a=s.getItemGraphicEl(r),n=a.childAt(0),i=a.childAt(1),l=a.childAt(2),u={shape:{points:o.getItemLayout(t)}};u.shape.points&&(c(n.shape.points,u.shape.points,l,o,t,!1),hh(i),hh(n),sh(n,u,e),sh(i,u,e),o.setItemGraphicEl(t,a))})).remove((function(e){i.remove(s.getItemGraphicEl(e))})).execute(),o.eachItemGraphicEl((function(e,t){var r=o.getItemModel(t),a=e.childAt(0),n=e.childAt(1),s=e.childAt(2),l=o.getItemVisual(t,"style"),c=l.fill;i.add(e),a.useStyle(Sa["i"](r.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:c})),Zd(a,r,"lineStyle"),Zd(n,r,"areaStyle");var u=r.getModel("areaStyle"),p=u.isEmpty()&&u.parentModel.isEmpty();n.ignore=p,Sa["k"](["emphasis","select","blur"],(function(e){var t=r.getModel([e,"areaStyle"]),a=t.isEmpty()&&t.parentModel.isEmpty();n.ensureState(e).ignore=a&&p})),n.useStyle(Sa["i"](u.getAreaStyle(),{fill:c,opacity:.7,decal:l.decal}));var d=r.getModel("emphasis"),h=d.getModel("itemStyle").getItemStyle();s.eachChild((function(e){if(e instanceof gp){var a=e.style;e.useStyle(Sa["m"]({image:a.image,x:a.x,y:a.y,width:a.width,height:a.height},l))}else e.useStyle(l),e.setColor(c),e.style.strokeNoScale=!0;var n=e.ensureState("emphasis");n.style=Sa["d"](h);var i=o.getStore().get(o.getDimensionIndex(e.__dimIdx),t);(null==i||isNaN(i))&&(i=""),yh(e,bh(r),{labelFetcher:o.hostModel,labelDataIndex:t,labelDimIndex:e.__dimIdx,defaultText:i,inheritColor:c,defaultOpacity:l.opacity})})),Hd(e,d.get("focus"),d.get("blurScope"),d.get("disabled"))})),this._data=o},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t}(ux),oE=iE,sE=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return xa(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new YA(Sa["c"](this.getData,this),Sa["c"](this.getRawData,this))},t.prototype.getInitialData=function(e,t){return HA(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(e,t,r){var a=this.getData(),n=this.coordinateSystem,i=n.getIndicatorAxes(),o=this.getData().getName(e),s=""===o?this.name:o,l=Dy(this,e);return py("section",{header:s,sortBlocks:!0,blocks:Sa["H"](i,(function(t){var r=a.get(a.mapDimension(t.dim),e);return py("nameValue",{markerType:"subItem",markerColor:l,name:t.name,value:r,sortParam:r})}))})},t.prototype.getTooltipPosition=function(e){if(null!=e)for(var t=this.getData(),r=this.coordinateSystem,a=t.getValues(Sa["H"](r.dimensions,(function(e){return t.mapDimension(e)})),e),n=0,i=a.length;n<i;n++)if(!isNaN(a[n])){var o=r.getIndicatorAxes();return r.coordToPoint(o[n].dataToCoord(a[n]),n)}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t}(By),lE=sE,cE=yk.value;function uE(e,t){return Sa["i"]({show:t},e)}var pE=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.optionUpdated=function(){var e=this.get("boundaryGap"),t=this.get("splitNumber"),r=this.get("scale"),a=this.get("axisLine"),n=this.get("axisTick"),i=this.get("axisLabel"),o=this.get("axisName"),s=this.get(["axisName","show"]),l=this.get(["axisName","formatter"]),c=this.get("axisNameGap"),u=this.get("triggerEvent"),p=Sa["H"](this.get("indicator")||[],(function(p){null!=p.max&&p.max>0&&!p.min?p.min=0:null!=p.min&&p.min<0&&!p.max&&(p.max=0);var d=o;null!=p.color&&(d=Sa["i"]({color:p.color},o));var h=Sa["I"](Sa["d"](p),{boundaryGap:e,splitNumber:t,scale:r,axisLine:a,axisTick:n,axisLabel:i,name:p.text,showName:s,nameLocation:"end",nameGap:c,nameTextStyle:d,triggerEvent:u},!1);if(Sa["C"](l)){var f=h.name;h.name=l.replace("{value}",null!=f?f:"")}else Sa["w"](l)&&(h.name=l(h.name,h));var m=new Uh(h,null,this.ecModel);return Sa["K"](m,pk.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m}),this);this._indicatorModels=p},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.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:Sa["I"]({lineStyle:{color:"#bbb"}},cE.axisLine),axisLabel:uE(cE.axisLabel,!1),axisTick:uE(cE.axisTick,!1),splitLine:uE(cE.splitLine,!0),splitArea:uE(cE.splitArea,!0),indicator:[]},t}(fm),dE=pE,hE=["axisLine","axisTickLabel","axisName"],fE=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(e,t,r){var a=this.group;a.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var t=e.coordinateSystem,r=t.getIndicatorAxes(),a=Sa["H"](r,(function(e){var r=e.model.get("showName")?e.name:"",a=new IN(e.model,{axisName:r,position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return a}));Sa["k"](a,(function(e){Sa["k"](hE,e.add,e),this.group.add(e.getGroup())}),this)},t.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,r=t.getIndicatorAxes();if(r.length){var a=e.get("shape"),n=e.getModel("splitLine"),i=e.getModel("splitArea"),o=n.getModel("lineStyle"),s=i.getModel("areaStyle"),l=n.get("show"),c=i.get("show"),u=o.get("color"),p=s.get("color"),d=Sa["t"](u)?u:[u],h=Sa["t"](p)?p:[p],f=[],m=[];if("circle"===a)for(var g=r[0].getTicksCoords(),v=t.cx,y=t.cy,b=0;b<g.length;b++){if(l){var _=O(f,d,b);f[_].push(new gb({shape:{cx:v,cy:y,r:g[b].coord}}))}if(c&&b<g.length-1){_=O(m,h,b);m[_].push(new zb({shape:{cx:v,cy:y,r0:g[b].coord,r:g[b+1].coord}}))}}else{var x,w=Sa["H"](r,(function(e,r){var a=e.getTicksCoords();return x=null==x?a.length-1:Math.min(a.length-1,x),Sa["H"](a,(function(e){return t.coordToPoint(e.coord,r)}))})),S=[];for(b=0;b<=x;b++){for(var D=[],C=0;C<r.length;C++)D.push(w[C][b]);if(D[0]&&D.push(D[0].slice()),l){_=O(f,d,b);f[_].push(new Yb({shape:{points:D}}))}if(c&&S){_=O(m,h,b-1);m[_].push(new Wb({shape:{points:D.concat(S)}}))}S=D.slice().reverse()}}var T=o.getLineStyle(),I=s.getAreaStyle();Sa["k"](m,(function(e,t){this.group.add(R_(e,{style:Sa["i"]({stroke:"none",fill:h[t%h.length]},I),silent:!0}))}),this),Sa["k"](f,(function(e,t){this.group.add(R_(e,{style:Sa["i"]({fill:"none",stroke:d[t%d.length]},T),silent:!0}))}),this)}function O(e,t,r){var a=r%t.length;return e[a]=e[a]||[],a}},t.type="radar",t}(Gy),mE=fE,gE=function(e){function t(t,r,a){var n=e.call(this,t,r,a)||this;return n.type="value",n.angle=0,n.name="",n}return xa(t,e),t}(tN),vE=gE,yE=function(){function e(e,t,r){this.dimensions=[],this._model=e,this._indicatorAxes=Object(Sa["H"])(e.getIndicatorModels(),(function(e,t){var r="indicator_"+t,a=new vE(r,new Bk);return a.name=e.get("name"),a.model=e,e.axis=a,this.dimensions.push(r),a}),this),this.resize(e,r)}return e.prototype.getIndicatorAxes=function(){return this._indicatorAxes},e.prototype.dataToPoint=function(e,t){var r=this._indicatorAxes[t];return this.coordToPoint(r.dataToCoord(e),t)},e.prototype.coordToPoint=function(e,t){var r=this._indicatorAxes[t],a=r.angle,n=this.cx+e*Math.cos(a),i=this.cy-e*Math.sin(a);return[n,i]},e.prototype.pointToData=function(e){var t=e[0]-this.cx,r=e[1]-this.cy,a=Math.sqrt(t*t+r*r);t/=a,r/=a;for(var n,i=Math.atan2(-r,t),o=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var c=this._indicatorAxes[l],u=Math.abs(i-c.angle);u<o&&(n=c,s=l,o=u)}return[s,+(n&&n.coordToData(a))]},e.prototype.resize=function(e,t){var r=e.get("center"),a=t.getWidth(),n=t.getHeight(),i=Math.min(a,n)/2;this.cx=rl(r[0],a),this.cy=rl(r[1],n),this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");(Object(Sa["C"])(o)||Object(Sa["z"])(o))&&(o=[0,o]),this.r0=rl(o[0],i),this.r=rl(o[1],i),Object(Sa["k"])(this._indicatorAxes,(function(e,t){e.setExtent(this.r0,this.r);var r=this.startAngle+t*Math.PI*2/this._indicatorAxes.length;r=Math.atan2(Math.sin(r),Math.cos(r)),e.angle=r}),this)},e.prototype.update=function(e,t){var r=this._indicatorAxes,a=this._model;Object(Sa["k"])(r,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeriesByType("radar",(function(t,n){if("radar"===t.get("coordinateSystem")&&e.getComponent("radar",t.get("radarIndex"))===a){var i=t.getData();Object(Sa["k"])(r,(function(e){e.scale.unionExtentFromData(i,i.mapDimension(e.dim))}))}}),this);var n=a.get("splitNumber"),i=new Bk;i.setExtent(0,n),i.setInterval(1),Object(Sa["k"])(r,(function(e,t){lN(e.scale,e.model,i)}))},e.prototype.convertToPixel=function(e,t,r){return console.warn("Not implemented."),null},e.prototype.convertFromPixel=function(e,t,r){return console.warn("Not implemented."),null},e.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},e.create=function(t,r){var a=[];return t.eachComponent("radar",(function(n){var i=new e(n,t,r);a.push(i),n.coordinateSystem=i})),t.eachSeriesByType("radar",(function(e){"radar"===e.get("coordinateSystem")&&(e.coordinateSystem=a[e.get("radarIndex")||0])})),a},e.dimensions=[],e}(),bE=yE;function _E(e){e.registerCoordinateSystem("radar",bE),e.registerComponentModel(dE),e.registerComponentView(mE),e.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each((function(e){t.setItemVisual(e,"legendIcon","roundRect")})),t.setVisual("legendIcon","roundRect")}})}function xE(e){JD(_E),e.registerChartView(oE),e.registerSeriesModel(lE),e.registerLayout(tE),e.registerProcessor(LA("radar")),e.registerPreprocessor(nE)}var wE="\0_ec_interaction_mutex";function SE(e,t,r){var a=TE(e);a[t]=r}function DE(e,t,r){var a=TE(e),n=a[t];n===r&&(a[t]=null)}function CE(e,t){return!!TE(e)[t]}function TE(e){return e[wE]||(e[wE]={})}BD({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Sa["L"]);var IE=function(e){function t(t){var r=e.call(this)||this;r._zr=t;var a=Object(Sa["c"])(r._mousedownHandler,r),n=Object(Sa["c"])(r._mousemoveHandler,r),i=Object(Sa["c"])(r._mouseupHandler,r),o=Object(Sa["c"])(r._mousewheelHandler,r),s=Object(Sa["c"])(r._pinchHandler,r);return r.enable=function(e,r){this.disable(),this._opt=Object(Sa["i"])(Object(Sa["d"])(r)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",a),t.on("mousemove",n),t.on("mouseup",i)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",o),t.on("pinch",s))},r.disable=function(){t.off("mousedown",a),t.off("mousemove",n),t.off("mouseup",i),t.off("mousewheel",o),t.off("pinch",s)},r}return xa(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!xn(e)){var t=e.target;while(t){if(t.draggable)return;t=t.__hostTarget||t.parent}var r=e.offsetX,a=e.offsetY;this.pointerChecker&&this.pointerChecker(e,r,a)&&(this._x=r,this._y=a,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(this._dragging&&AE("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!CE(this._zr,"globalPan")){var t=e.offsetX,r=e.offsetY,a=this._x,n=this._y,i=t-a,o=r-n;this._x=t,this._y=r,this._opt.preventDefaultMouseMove&&_n(e.event),ME(this,"pan","moveOnMouseMove",e,{dx:i,dy:o,oldX:a,oldY:n,newX:t,newY:r,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){xn(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=AE("zoomOnMouseWheel",e,this._opt),r=AE("moveOnMouseWheel",e,this._opt),a=e.wheelDelta,n=Math.abs(a),i=e.offsetX,o=e.offsetY;if(0!==a&&(t||r)){if(t){var s=n>3?1.4:n>1?1.2:1.1,l=a>0?s:1/s;OE(this,"zoom","zoomOnMouseWheel",e,{scale:l,originX:i,originY:o,isAvailableBehavior:null})}if(r){var c=Math.abs(a),u=(a>0?1:-1)*(c>3?.4:c>1?.15:.05);OE(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:u,originX:i,originY:o,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!CE(this._zr,"globalPan")){var t=e.pinchScale>1?1.1:1/1.1;OE(this,"zoom",null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t}(Xa);function OE(e,t,r,a,n){e.pointerChecker&&e.pointerChecker(a,n.originX,n.originY)&&(_n(a.event),ME(e,t,r,a,n))}function ME(e,t,r,a,n){n.isAvailableBehavior=Object(Sa["c"])(AE,null,r,a),e.trigger(t,n)}function AE(e,t,r){var a=r[e];return!e||a&&(!Object(Sa["C"])(a)||t.event[a+"Key"])}var kE=IE;function PE(e,t,r){var a=e.target;a.x+=t,a.y+=r,a.dirty()}function NE(e,t,r,a){var n=e.target,i=e.zoomLimit,o=e.zoom=e.zoom||1;if(o*=t,i){var s=i.min||0,l=i.max||1/0;o=Math.max(Math.min(l,o),s)}var c=o/e.zoom;e.zoom=o,n.x-=(r-n.x)*(c-1),n.y-=(a-n.y)*(c-1),n.scaleX*=c,n.scaleY*=c,n.dirty()}var EE,RE={axisPointer:1,tooltip:1,brush:1};function LE(e,t,r){var a=t.getComponentByElement(e.topTarget),n=a&&a.coordinateSystem;return a&&a!==r&&!RE.hasOwnProperty(a.mainType)&&n&&n.model!==r}function jE(e){if(Object(Sa["C"])(e)){var t=new DOMParser;e=t.parseFromString(e,"text/xml")}var r=e;9===r.nodeType&&(r=r.firstChild);while("svg"!==r.nodeName.toLowerCase()||1!==r.nodeType)r=r.nextSibling;return r}var FE={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"},VE=Object(Sa["F"])(FE),zE={"alignment-baseline":"textBaseline","stop-color":"stopColor"},BE=Object(Sa["F"])(zE),$E=function(){function e(){this._defs={},this._root=null}return e.prototype.parse=function(e,t){t=t||{};var r=jE(e);this._defsUsePending=[];var a=new Bs;this._root=a;var n=[],i=r.getAttribute("viewBox")||"",o=parseFloat(r.getAttribute("width")||t.width),s=parseFloat(r.getAttribute("height")||t.height);isNaN(o)&&(o=null),isNaN(s)&&(s=null),YE(r,a,null,!0,!1);var l,c,u=r.firstChild;while(u)this._parseNode(u,a,n,null,!1,!1),u=u.nextSibling;if(JE(this._defs,this._defsUsePending),this._defsUsePending=[],i){var p=eR(i);p.length>=4&&(l={x:parseFloat(p[0]||0),y:parseFloat(p[1]||0),width:parseFloat(p[2]),height:parseFloat(p[3])})}if(l&&null!=o&&null!=s&&(c=sR(l,{x:0,y:0,width:o,height:s}),!t.ignoreViewBox)){var d=a;a=new Bs,a.add(d),d.scaleX=d.scaleY=c.scale,d.x=c.x,d.y=c.y}return t.ignoreRootClip||null==o||null==s||a.setClipPath(new Cp({shape:{x:0,y:0,width:o,height:s}})),{root:a,width:o,height:s,viewBoxRect:l,viewBoxTransform:c,named:n}},e.prototype._parseNode=function(e,t,r,a,n,i){var o,s=e.nodeName.toLowerCase(),l=a;if("defs"===s&&(n=!0),"text"===s&&(i=!0),"defs"===s||"switch"===s)o=t;else{if(!n){var c=EE[s];if(c&&Object(Sa["q"])(EE,s)){o=c.call(this,e,t);var u=e.getAttribute("name");if(u){var p={name:u,namedFrom:null,svgNodeTagLower:s,el:o};r.push(p),"g"===s&&(l=p)}else a&&r.push({name:a.name,namedFrom:a,svgNodeTagLower:s,el:o});t.add(o)}}var d=GE[s];if(d&&Object(Sa["q"])(GE,s)){var h=d.call(this,e),f=e.getAttribute("id");f&&(this._defs[f]=h)}}if(o&&o.isGroup){var m=e.firstChild;while(m)1===m.nodeType?this._parseNode(m,o,r,l,n,i):3===m.nodeType&&i&&this._parseText(m,o),m=m.nextSibling}},e.prototype._parseText=function(e,t){var r=new pp({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});HE(t,r),YE(e,r,this._defsUsePending,!1,!1),XE(r,t);var a=r.style,n=a.fontSize;n&&n<9&&(a.fontSize=9,r.scaleX*=n/9,r.scaleY*=n/9);var i=(a.fontSize||a.fontFamily)&&[a.fontStyle,a.fontWeight,(a.fontSize||12)+"px",a.fontFamily||"sans-serif"].join(" ");a.font=i;var o=r.getBoundingRect();return this._textX+=o.width,t.add(r),r},e.internalField=function(){EE={g:function(e,t){var r=new Bs;return HE(t,r),YE(e,r,this._defsUsePending,!1,!1),r},rect:function(e,t){var r=new Cp;return HE(t,r),YE(e,r,this._defsUsePending,!1,!1),r.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")}),r.silent=!0,r},circle:function(e,t){var r=new gb;return HE(t,r),YE(e,r,this._defsUsePending,!1,!1),r.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),r.silent=!0,r},line:function(e,t){var r=new Jb;return HE(t,r),YE(e,r,this._defsUsePending,!1,!1),r.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")}),r.silent=!0,r},ellipse:function(e,t){var r=new bb;return HE(t,r),YE(e,r,this._defsUsePending,!1,!1),r.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")}),r.silent=!0,r},polygon:function(e,t){var r,a=e.getAttribute("points");a&&(r=qE(a));var n=new Wb({shape:{points:r||[]},silent:!0});return HE(t,n),YE(e,n,this._defsUsePending,!1,!1),n},polyline:function(e,t){var r,a=e.getAttribute("points");a&&(r=qE(a));var n=new Yb({shape:{points:r||[]},silent:!0});return HE(t,n),YE(e,n,this._defsUsePending,!1,!1),n},image:function(e,t){var r=new gp;return HE(t,r),YE(e,r,this._defsUsePending,!1,!1),r.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")}),r.silent=!0,r},text:function(e,t){var r=e.getAttribute("x")||"0",a=e.getAttribute("y")||"0",n=e.getAttribute("dx")||"0",i=e.getAttribute("dy")||"0";this._textX=parseFloat(r)+parseFloat(n),this._textY=parseFloat(a)+parseFloat(i);var o=new Bs;return HE(t,o),YE(e,o,this._defsUsePending,!1,!0),o},tspan:function(e,t){var r=e.getAttribute("x"),a=e.getAttribute("y");null!=r&&(this._textX=parseFloat(r)),null!=a&&(this._textY=parseFloat(a));var n=e.getAttribute("dx")||"0",i=e.getAttribute("dy")||"0",o=new Bs;return HE(t,o),YE(e,o,this._defsUsePending,!1,!0),this._textX+=parseFloat(n),this._textY+=parseFloat(i),o},path:function(e,t){var r=e.getAttribute("d")||"",a=ub(r);return HE(t,a),YE(e,a,this._defsUsePending,!1,!1),a.silent=!0,a}}}(),e}(),GE={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||"0",10),r=parseInt(e.getAttribute("y1")||"0",10),a=parseInt(e.getAttribute("x2")||"10",10),n=parseInt(e.getAttribute("y2")||"0",10),i=new d_(t,r,a,n);return UE(e,i),WE(e,i),i},radialgradient:function(e){var t=parseInt(e.getAttribute("cx")||"0",10),r=parseInt(e.getAttribute("cy")||"0",10),a=parseInt(e.getAttribute("r")||"0",10),n=new f_(t,r,a);return UE(e,n),WE(e,n),n}};function UE(e,t){var r=e.getAttribute("gradientUnits");"userSpaceOnUse"===r&&(t.global=!0)}function WE(e,t){var r=e.firstChild;while(r){if(1===r.nodeType&&"stop"===r.nodeName.toLocaleLowerCase()){var a=r.getAttribute("offset"),n=void 0;n=a&&a.indexOf("%")>0?parseInt(a,10)/100:a?parseFloat(a):0;var i={};iR(r,i,i);var o=i.stopColor||r.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:n,color:o})}r=r.nextSibling}}function HE(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),Object(Sa["i"])(t.__inheritedStyle,e.__inheritedStyle))}function qE(e){for(var t=eR(e),r=[],a=0;a<t.length;a+=2){var n=parseFloat(t[a]),i=parseFloat(t[a+1]);r.push([n,i])}return r}function YE(e,t,r,a,n){var i=t,o=i.__inheritedStyle=i.__inheritedStyle||{},s={};1===e.nodeType&&(aR(e,t),iR(e,o,s),a||oR(e,o,s)),i.style=i.style||{},null!=o.fill&&(i.style.fill=KE(i,"fill",o.fill,r)),null!=o.stroke&&(i.style.stroke=KE(i,"stroke",o.stroke,r)),Object(Sa["k"])(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(e){null!=o[e]&&(i.style[e]=parseFloat(o[e]))})),Object(Sa["k"])(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],(function(e){null!=o[e]&&(i.style[e]=o[e])})),n&&(i.__selfStyle=s),o.lineDash&&(i.style.lineDash=Object(Sa["H"])(eR(o.lineDash),(function(e){return parseFloat(e)}))),"hidden"!==o.visibility&&"collapse"!==o.visibility||(i.invisible=!0),"none"===o.display&&(i.ignore=!0)}function XE(e,t){var r=t.__selfStyle;if(r){var a=r.textBaseline,n=a;a&&"auto"!==a?"baseline"===a?n="alphabetic":"before-edge"===a||"text-before-edge"===a?n="top":"after-edge"===a||"text-after-edge"===a?n="bottom":"central"!==a&&"mathematical"!==a||(n="middle"):n="alphabetic",e.style.textBaseline=n}var i=t.__inheritedStyle;if(i){var o=i.textAlign,s=o;o&&("middle"===o&&(s="center"),e.style.textAlign=s)}}var ZE=/^url\(\s*#(.*?)\)/;function KE(e,t,r,a){var n=r&&r.match(ZE);if(!n)return"none"===r&&(r=null),r;var i=Object(Sa["T"])(n[1]);a.push([e,t,i])}function JE(e,t){for(var r=0;r<t.length;r++){var a=t[r];a[0].style[a[1]]=e[a[2]]}}var QE=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function eR(e){return e.match(QE)||[]}var tR=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,rR=Math.PI/180;function aR(e,t){var r=e.getAttribute("transform");if(r){r=r.replace(/,/g," ");var a=[],n=null;r.replace(tR,(function(e,t,r){return a.push(t,r),""}));for(var i=a.length-1;i>0;i-=2){var o=a[i],s=a[i-1],l=eR(o);switch(n=n||Tn(),s){case"translate":An(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Pn(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":kn(n,n,-parseFloat(l[0])*rR,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var c=Math.tan(parseFloat(l[0])*rR);Mn(n,[1,0,c,1,0,0],n);break;case"skewY":var u=Math.tan(parseFloat(l[0])*rR);Mn(n,[1,u,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}t.setLocalTransform(n)}}var nR=/([^\s:;]+)\s*:\s*([^:;]+)/g;function iR(e,t,r){var a=e.getAttribute("style");if(a){var n;nR.lastIndex=0;while(null!=(n=nR.exec(a))){var i=n[1],o=Object(Sa["q"])(FE,i)?FE[i]:null;o&&(t[o]=n[2]);var s=Object(Sa["q"])(zE,i)?zE[i]:null;s&&(r[s]=n[2])}}}function oR(e,t,r){for(var a=0;a<VE.length;a++){var n=VE[a],i=e.getAttribute(n);null!=i&&(t[FE[n]]=i)}for(a=0;a<BE.length;a++){n=BE[a],i=e.getAttribute(n);null!=i&&(r[zE[n]]=i)}}function sR(e,t){var r=t.width/e.width,a=t.height/e.height,n=Math.min(r,a);return{scale:n,x:-(e.x+e.width/2)*n+(t.x+t.width/2),y:-(e.y+e.height/2)*n+(t.y+t.height/2)}}function lR(e,t){var r=new $E;return r.parse(e,t)}var cR=1e-8;function uR(e,t){return Math.abs(e-t)<cR}function pR(e,t,r){var a=0,n=e[0];if(!n)return!1;for(var i=1;i<e.length;i++){var o=e[i];a+=Uu(n[0],n[1],o[0],o[1],t,r),n=o}var s=e[0];return uR(n[0],s[0])&&uR(n[1],s[1])||(a+=Uu(n[0],n[1],s[0],s[1],t,r)),0!==a}var dR=[];function hR(e,t){for(var r=0;r<e.length;r++)$a(e[r],e[r],t)}function fR(e,t,r,a){for(var n=0;n<e.length;n++){var i=e[n];a&&(i=a.project(i)),i&&isFinite(i[0])&&isFinite(i[1])&&(Ga(t,t,i),Ua(r,r,i))}}function mR(e){for(var t=0,r=0,a=0,n=e.length,i=e[n-1][0],o=e[n-1][1],s=0;s<n;s++){var l=e[s][0],c=e[s][1],u=i*c-l*o;t+=u,r+=(i+l)*u,a+=(o+c)*u,i=l,o=c}return t?[r/t/3,a/t/3,t]:[e[0][0]||0,e[0][1]||0]}var gR=function(){function e(e){this.name=e}return e.prototype.setCenter=function(e){this._center=e},e.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},e}(),vR=function(){function e(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return e}(),yR=function(){function e(e){this.type="linestring",this.points=e}return e}(),bR=function(e){function t(t,r,a){var n=e.call(this,t)||this;return n.type="geoJSON",n.geometries=r,n._center=a&&[a[0],a[1]],n}return xa(t,e),t.prototype.calcCenter=function(){for(var e,t=this.geometries,r=0,a=0;a<t.length;a++){var n=t[a],i=n.exterior,o=i&&i.length;o>r&&(e=n,r=o)}if(e)return mR(e.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},t.prototype.getBoundingRect=function(e){var t=this._rect;if(t&&!e)return t;var r=[1/0,1/0],a=[-1/0,-1/0],n=this.geometries;return Object(Sa["k"])(n,(function(t){"polygon"===t.type?fR(t.exterior,r,a,e):Object(Sa["k"])(t.points,(function(t){fR(t,r,a,e)}))})),isFinite(r[0])&&isFinite(r[1])&&isFinite(a[0])&&isFinite(a[1])||(r[0]=r[1]=a[0]=a[1]=0),t=new Hn(r[0],r[1],a[0]-r[0],a[1]-r[1]),e||(this._rect=t),t},t.prototype.contain=function(e){var t=this.getBoundingRect(),r=this.geometries;if(!t.contain(e[0],e[1]))return!1;e:for(var a=0,n=r.length;a<n;a++){var i=r[a];if("polygon"===i.type){var o=i.exterior,s=i.interiors;if(pR(o,e[0],e[1])){for(var l=0;l<(s?s.length:0);l++)if(pR(s[l],e[0],e[1]))continue e;return!0}}}return!1},t.prototype.transformTo=function(e,t,r,a){var n=this.getBoundingRect(),i=n.width/n.height;r?a||(a=r/i):r=i*a;for(var o=new Hn(e,t,r,a),s=n.calculateTransform(o),l=this.geometries,c=0;c<l.length;c++){var u=l[c];"polygon"===u.type?(hR(u.exterior,s),Object(Sa["k"])(u.interiors,(function(e){hR(e,s)}))):Object(Sa["k"])(u.points,(function(e){hR(e,s)}))}n=this._rect,n.copy(o),this._center=[n.x+n.width/2,n.y+n.height/2]},t.prototype.cloneShallow=function(e){null==e&&(e=this.name);var r=new t(e,this.geometries,this._center);return r._rect=this._rect,r.transformTo=null,r},t}(gR),_R=function(e){function t(t,r){var a=e.call(this,t)||this;return a.type="geoSVG",a._elOnlyForCalculate=r,a}return xa(t,e),t.prototype.calcCenter=function(){var e=this._elOnlyForCalculate,t=e.getBoundingRect(),r=[t.x+t.width/2,t.y+t.height/2],a=In(dR),n=e;while(n&&!n.isGeoSVGGraphicRoot)Mn(a,n.getLocalTransform(),a),n=n.parent;return Nn(a,a),$a(r,r,a),r},t}(gR),xR=Object(Sa["f"])(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),wR=function(){function e(e,t){this.type="geoSVG",this._usedGraphicMap=Object(Sa["f"])(),this._freedGraphics=[],this._mapName=e,this._parsedXML=jE(t)}return e.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=DR(e.named),r=t.regions,a=t.regionsMap;this._regions=r,this._regionsMap=a}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},e.prototype._buildGraphic=function(e){var t,r;try{t=e&&lR(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},r=t.root,Object(Sa["b"])(null!=r)}catch(m){throw new Error("Invalid svg format\n"+m.message)}var a=new Bs;a.add(r),a.isGeoSVGGraphicRoot=!0;var n=t.width,i=t.height,o=t.viewBoxRect,s=this._boundingRect;if(!s){var l=void 0,c=void 0,u=void 0,p=void 0;if(null!=n?(l=0,u=n):o&&(l=o.x,u=o.width),null!=i?(c=0,p=i):o&&(c=o.y,p=o.height),null==l||null==c){var d=r.getBoundingRect();null==l&&(l=d.x,u=d.width),null==c&&(c=d.y,p=d.height)}s=this._boundingRect=new Hn(l,c,u,p)}if(o){var h=sR(o,s);r.scaleX=r.scaleY=h.scale,r.x=h.x,r.y=h.y}a.setClipPath(new Cp({shape:s.plain()}));var f=[];return Object(Sa["k"])(t.named,(function(e){null!=xR.get(e.svgNodeTagLower)&&(f.push(e),SR(e.el))})),{root:a,boundingRect:s,named:f}},e.prototype.useGraphic=function(e){var t=this._usedGraphicMap,r=t.get(e);return r||(r=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,r),r)},e.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,r=t.get(e);r&&(t.removeKey(e),this._freedGraphics.push(r))},e}();function SR(e){e.silent=!1,e.isGroup&&e.traverse((function(e){e.silent=!1}))}function DR(e){var t=[],r=Object(Sa["f"])();return Object(Sa["k"])(e,(function(e){if(null==e.namedFrom){var a=new _R(e.name,e.el);t.push(a),r.set(e.name,a)}})),{regions:t,regionsMap:r}}function CR(e){if(!e.UTF8Encoding)return e;var t=e,r=t.UTF8Scale;null==r&&(r=1024);var a=t.features;return Sa["k"](a,(function(e){var t=e.geometry,a=t.encodeOffsets,n=t.coordinates;if(a)switch(t.type){case"LineString":t.coordinates=IR(n,a,r);break;case"Polygon":TR(n,a,r);break;case"MultiLineString":TR(n,a,r);break;case"MultiPolygon":Sa["k"](n,(function(e,t){return TR(e,a[t],r)}))}})),t.UTF8Encoding=!1,t}function TR(e,t,r){for(var a=0;a<e.length;a++)e[a]=IR(e[a],t[a],r)}function IR(e,t,r){for(var a=[],n=t[0],i=t[1],o=0;o<e.length;o+=2){var s=e.charCodeAt(o)-64,l=e.charCodeAt(o+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),s+=n,l+=i,n=s,i=l,a.push([s/r,l/r])}return a}function OR(e,t){return e=CR(e),Sa["H"](Sa["n"](e.features,(function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0})),(function(e){var r=e.properties,a=e.geometry,n=[];switch(a.type){case"Polygon":var i=a.coordinates;n.push(new vR(i[0],i.slice(1)));break;case"MultiPolygon":Sa["k"](a.coordinates,(function(e){e[0]&&n.push(new vR(e[0],e.slice(1)))}));break;case"LineString":n.push(new yR([a.coordinates]));break;case"MultiLineString":n.push(new yR(a.coordinates))}var o=new bR(r[t||"name"],n,r.cp);return o.properties=r,o}))}for(var MR=[126,25],AR="南海诸岛",kR=[[[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]]],PR=0;PR<kR.length;PR++)for(var NR=0;NR<kR[PR].length;NR++)kR[PR][NR][0]/=10.5,kR[PR][NR][1]/=-14,kR[PR][NR][0]+=MR[0],kR[PR][NR][1]+=MR[1];function ER(e,t){if("china"===e){for(var r=0;r<t.length;r++)if(t[r].name===AR)return;t.push(new bR(AR,Sa["H"](kR,(function(e){return{type:"polygon",exterior:e}})),MR))}}var RR={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};function LR(e,t){if("china"===e){var r=RR[t.name];if(r){var a=t.getCenter();a[0]+=r[0]/10.5,a[1]+=-r[1]/14,t.setCenter(a)}}}var jR=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function FR(e,t){"china"===e&&"台湾"===t.name&&t.geometries.push({type:"polygon",exterior:jR[0]})}var VR="name",zR=function(){function e(e,t,r){this.type="geoJSON",this._parsedMap=Object(Sa["f"])(),this._mapName=e,this._specialAreas=r,this._geoJSON=$R(t)}return e.prototype.load=function(e,t){t=t||VR;var r=this._parsedMap.get(t);if(!r){var a=this._parseToRegions(t);r=this._parsedMap.set(t,{regions:a,boundingRect:BR(a)})}var n=Object(Sa["f"])(),i=[];return Object(Sa["k"])(r.regions,(function(t){var r=t.name;e&&Object(Sa["q"])(e,r)&&(t=t.cloneShallow(r=e[r])),i.push(t),n.set(r,t)})),{regions:i,boundingRect:r.boundingRect||new Hn(0,0,0,0),regionsMap:n}},e.prototype._parseToRegions=function(e){var t,r=this._mapName,a=this._geoJSON;try{t=a?OR(a,e):[]}catch(n){throw new Error("Invalid geoJson format\n"+n.message)}return ER(r,t),Object(Sa["k"])(t,(function(e){var t=e.name;LR(r,e),FR(r,e);var a=this._specialAreas&&this._specialAreas[t];a&&e.transformTo(a.left,a.top,a.width,a.height)}),this),t},e.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},e}();function BR(e){for(var t,r=0;r<e.length;r++){var a=e[r].getBoundingRect();t=t||a.clone(),t.union(a)}return t}function $R(e){return Object(Sa["C"])(e)?"undefined"!==typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e}var GR=Object(Sa["f"])(),UR={registerMap:function(e,t,r){if(t.svg){var a=new wR(e,t.svg);GR.set(e,a)}else{var n=t.geoJson||t.geoJSON;n&&!t.features?r=t.specialAreas:n=t;a=new zR(e,n,r);GR.set(e,a)}},getGeoResource:function(e){return GR.get(e)},getMapForUser:function(e){var t=GR.get(e);return t&&"geoJSON"===t.type&&t.getMapForUser()},load:function(e,t,r){var a=GR.get(e);if(a)return a.load(t,r)}},WR=["rect","circle","line","ellipse","polygon","polyline","path"],HR=Sa["f"](WR),qR=Sa["f"](WR.concat(["g"])),YR=Sa["f"](WR.concat(["g"])),XR=Zl();function ZR(e){var t=e.getItemStyle(),r=e.get("areaColor");return null!=r&&(t.fill=r),t}function KR(e){var t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var JR=function(){function e(e){var t=new Bs;this.uid=Hh("ec_map_draw"),this._controller=new kE(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new Bs),t.add(this._svgGroup=new Bs)}return e.prototype.draw=function(e,t,r,a,n){var i="geo"===e.mainType,o=e.getData&&e.getData();i&&t.eachComponent({mainType:"series",subType:"map"},(function(t){o||t.getHostGeoModel()!==e||(o=t.getData())}));var s=e.coordinateSystem,l=this._regionsGroup,c=this.group,u=s.getTransformInfo(),p=u.raw,d=u.roam,h=!l.childAt(0)||n;h?(c.x=d.x,c.y=d.y,c.scaleX=d.scaleX,c.scaleY=d.scaleY,c.dirty()):sh(c,d,e);var f=o&&o.getVisual("visualMeta")&&o.getVisual("visualMeta").length>0,m={api:r,geo:s,mapOrGeoModel:e,data:o,isVisualEncodedByVisualMap:f,isGeo:i,transformInfoRaw:p};"geoJSON"===s.resourceType?this._buildGeoJSON(m):"geoSVG"===s.resourceType&&this._buildSVG(m),this._updateController(e,t,r),this._updateMapSelectHandler(e,l,r,a)},e.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=Sa["f"](),r=Sa["f"](),a=this._regionsGroup,n=e.transformInfoRaw,i=e.mapOrGeoModel,o=e.data,s=e.geo.projection,l=s&&s.stream;function c(e,t){return t&&(e=t(e)),e&&[e[0]*n.scaleX+n.x,e[1]*n.scaleY+n.y]}function u(e){for(var t=[],r=!l&&s&&s.project,a=0;a<e.length;++a){var n=c(e[a],r);n&&t.push(n)}return t}function p(e){return{shape:{points:u(e)}}}a.removeAll(),Sa["k"](e.geo.regions,(function(n){var u=n.name,d=t.get(u),h=r.get(u)||{},f=h.dataIdx,m=h.regionModel;d||(d=t.set(u,new Bs),a.add(d),f=o?o.indexOfName(u):null,m=e.isGeo?i.getRegionModel(u):o?o.getItemModel(f):null,r.set(u,{dataIdx:f,regionModel:m}));var g=[],v=[];Sa["k"](n.geometries,(function(e){if("polygon"===e.type){var t=[e.exterior].concat(e.interiors||[]);l&&(t=nL(t,l)),Sa["k"](t,(function(e){g.push(new Wb(p(e)))}))}else{var r=e.points;l&&(r=nL(r,l,!0)),Sa["k"](r,(function(e){v.push(new Yb(p(e)))}))}}));var y=c(n.getCenter(),s&&s.project);function b(t,r){if(t.length){var a=new l_({culling:!0,segmentIgnoreThreshold:1,shape:{paths:t}});d.add(a),QR(e,a,f,m),eL(e,a,u,m,i,f,y),r&&(KR(a),Sa["k"](a.states,KR))}}b(g),b(v,!0)})),t.each((function(t,a){var n=r.get(a),o=n.dataIdx,s=n.regionModel;tL(e,t,a,s,i,o),rL(e,t,a,s,i),aL(e,t,a,s,i)}),this)},e.prototype._buildSVG=function(e){var t=e.geo.map,r=e.transformInfoRaw;this._svgGroup.x=r.x,this._svgGroup.y=r.y,this._svgGroup.scaleX=r.scaleX,this._svgGroup.scaleY=r.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var a=this._svgDispatcherMap=Sa["f"](),n=!1;Sa["k"](this._svgGraphicRecord.named,(function(t){var r=t.name,i=e.mapOrGeoModel,o=e.data,s=t.svgNodeTagLower,l=t.el,c=o?o.indexOfName(r):null,u=i.getRegionModel(r);if(null!=HR.get(s)&&l instanceof tu&&QR(e,l,c,u),l instanceof tu&&(l.culling=!0),l.z2EmphasisLift=0,!t.namedFrom&&(null!=YR.get(s)&&eL(e,l,r,u,i,c,null),tL(e,l,r,u,i,c),rL(e,l,r,u,i),null!=qR.get(s))){var p=aL(e,l,r,u,i);"self"===p&&(n=!0);var d=a.get(r)||a.set(r,[]);d.push(l)}}),this),this._enableBlurEntireSVG(n,e)},e.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var r=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),a=r.opacity;this._svgGraphicRecord.root.traverse((function(e){if(!e.isGroup){Dd(e);var t=e.ensureState("blur").style||{};null==t.opacity&&null!=a&&(t.opacity=a),e.ensureState("emphasis")}}))}},e.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},e.prototype.findHighDownDispatchers=function(e,t){if(null==e)return[];var r=t.coordinateSystem;if("geoJSON"===r.resourceType){var a=this._regionsGroupByName;if(a){var n=a.get(e);return n?[n]:[]}}else if("geoSVG"===r.resourceType)return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},e.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},e.prototype._useSVG=function(e){var t=UR.getGeoResource(e);if(t&&"geoSVG"===t.type){var r=t.useGraphic(this.uid);this._svgGroup.add(r.root),this._svgGraphicRecord=r,this._svgMapName=e}},e.prototype._freeSVG=function(){var e=this._svgMapName;if(null!=e){var t=UR.getGeoResource(e);t&&"geoSVG"===t.type&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},e.prototype._updateController=function(e,t,r){var a=e.coordinateSystem,n=this._controller,i=this._controllerHost;i.zoomLimit=e.get("scaleLimit"),i.zoom=a.getZoom(),n.enable(e.get("roam")||!1);var o=e.mainType;function s(){var t={type:"geoRoam",componentType:o};return t[o+"Id"]=e.id,t}n.off("pan").on("pan",(function(e){this._mouseDownFlag=!1,PE(i,e.dx,e.dy),r.dispatchAction(Sa["m"](s(),{dx:e.dx,dy:e.dy,animation:{duration:0}}))}),this),n.off("zoom").on("zoom",(function(e){this._mouseDownFlag=!1,NE(i,e.scale,e.originX,e.originY),r.dispatchAction(Sa["m"](s(),{totalZoom:i.zoom,zoom:e.scale,originX:e.originX,originY:e.originY,animation:{duration:0}}))}),this),n.setPointerChecker((function(t,n,i){return a.containPoint([n,i])&&!LE(t,r,e)}))},e.prototype.resetForLabelLayout=function(){this.group.traverse((function(e){var t=e.getTextContent();t&&(t.ignore=XR(t).ignore)}))},e.prototype._updateMapSelectHandler=function(e,t,r,a){var n=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",(function(){n._mouseDownFlag=!0})),t.on("click",(function(e){n._mouseDownFlag&&(n._mouseDownFlag=!1)})))},e}();function QR(e,t,r,a){var n=a.getModel("itemStyle"),i=a.getModel(["emphasis","itemStyle"]),o=a.getModel(["blur","itemStyle"]),s=a.getModel(["select","itemStyle"]),l=ZR(n),c=ZR(i),u=ZR(s),p=ZR(o),d=e.data;if(d){var h=d.getItemVisual(r,"style"),f=d.getItemVisual(r,"decal");e.isVisualEncodedByVisualMap&&h.fill&&(l.fill=h.fill),f&&(l.decal=dS(f,e.api))}t.setStyle(l),t.style.strokeNoScale=!0,t.ensureState("emphasis").style=c,t.ensureState("select").style=u,t.ensureState("blur").style=p,Dd(t)}function eL(e,t,r,a,n,i,o){var s=e.data,l=e.isGeo,c=s&&isNaN(s.get(s.mapDimension("value"),i)),u=s&&s.getItemLayout(i);if(l||c||u&&u.showLabel){var p=l?r:i,d=void 0;(!s||i>=0)&&(d=n);var h=o?{normal:{align:"center",verticalAlign:"middle"}}:null;yh(t,bh(a),{labelFetcher:d,labelDataIndex:p,defaultText:r},h);var f=t.getTextContent();if(f&&(XR(f).ignore=f.ignore,t.textConfig&&o)){var m=t.getBoundingRect().clone();t.textConfig.layoutRect=m,t.textConfig.position=[(o[0]-m.x)/m.width*100+"%",(o[1]-m.y)/m.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function tL(e,t,r,a,n,i){e.data?e.data.setItemGraphicEl(i,t):Up(t).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:r,region:a&&a.option||{}}}function rL(e,t,r,a,n){e.data||Q_({el:t,componentModel:n,itemName:r,itemTooltipOption:a.get("tooltip")})}function aL(e,t,r,a,n){t.highDownSilentOnTouch=!!n.get("selectedMode");var i=a.getModel("emphasis"),o=i.get("focus");return Hd(t,o,i.get("blurScope"),i.get("disabled")),e.isGeo&&Qd(t,n,r),o}function nL(e,t,r){var a,n=[];function i(){a=[]}function o(){a.length&&(n.push(a),a=[])}var s=t({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(e,t){isFinite(e)&&isFinite(t)&&a.push([e,t])},sphere:function(){}});return!r&&s.polygonStart(),Sa["k"](e,(function(e){s.lineStart();for(var t=0;t<e.length;t++)s.point(e[t][0],e[t][1]);s.lineEnd()})),!r&&s.polygonEnd(),n}var iL=JR,oL=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(e,t,r,a){if(!a||"mapToggleSelect"!==a.type||a.from!==this.uid){var n=this.group;if(n.removeAll(),!e.getHostGeoModel()){if(this._mapDraw&&a&&"geoRoam"===a.type&&this._mapDraw.resetForLabelLayout(),a&&"geoRoam"===a.type&&"series"===a.componentType&&a.seriesId===e.id){i=this._mapDraw;i&&n.add(i.group)}else if(e.needsDrawMap){var i=this._mapDraw||new iL(r);n.add(i.group),i.draw(e,t,r,this,a),this._mapDraw=i}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&t.getComponent("legend")&&this._renderSymbols(e,t,r)}}},t.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e,t,r){var a=e.originalData,n=this.group;a.each(a.mapDimension("value"),(function(t,r){if(!isNaN(t)){var i=a.getItemLayout(r);if(i&&i.point){var o=i.point,s=i.offset,l=new gb({style:{fill:e.getData().getVisual("style").fill},shape:{cx:o[0]+9*s,cy:o[1],r:3},silent:!0,z2:8+(s?0:td+1)});if(!s){var c=e.mainSeries.getData(),u=a.getName(r),p=c.indexOfName(u),d=a.getItemModel(r),h=d.getModel("label"),f=c.getItemGraphicEl(p);yh(l,bh(d),{labelFetcher:{getFormattedLabel:function(t,r){return e.getFormattedLabel(p,r)}},defaultText:u}),l.disableLabelAnimation=!0,h.get("position")||l.setTextConfig({position:"bottom"}),f.onHoverStateChange=function(e){yd(l,e)}}n.add(l)}}}))},t.type="map",t}(ux),sL=oL,lL=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.needsDrawMap=!1,r.seriesGroup=[],r.getTooltipPosition=function(e){if(null!=e){var t=this.getData().getName(e),r=this.coordinateSystem,a=r.getRegion(t);return a&&r.dataToPoint(a.getCenter())}},r}return xa(t,e),t.prototype.getInitialData=function(e){for(var t=HA(this,{coordDimensions:["value"],encodeDefaulter:Sa["h"](km,this)}),r=Sa["f"](),a=[],n=0,i=t.count();n<i;n++){var o=t.getName(n);r.set(o,!0)}var s=UR.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return Sa["k"](s.regions,(function(e){var t=e.name;r.get(t)||a.push(t)})),t.appendValues([],a),t},t.prototype.getHostGeoModel=function(){var e=this.option.geoIndex;return null!=e?this.ecModel.getComponent("geo",e):null},t.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},t.prototype.getRawValue=function(e){var t=this.getData();return t.get(t.mapDimension("value"),e)},t.prototype.getRegionModel=function(e){var t=this.getData();return t.getItemModel(t.indexOfName(e))},t.prototype.formatTooltip=function(e,t,r){for(var a=this.getData(),n=this.getRawValue(e),i=a.getName(e),o=this.seriesGroup,s=[],l=0;l<o.length;l++){var c=o[l].originalData.indexOfName(i),u=a.mapDimension("value");isNaN(o[l].originalData.get(u,c))||s.push(o[l].name)}return py("section",{header:s.join(", "),noHeader:!s.length,blocks:[py("nameValue",{name:i,value:n})]})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.getLegendIcon=function(e){var t=e.icon||"roundRect",r=Sw(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill);return r.setStyle(e.itemStyle),r.style.stroke="none",t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.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"},t}(By),cL=lL;function uL(e,t){var r={};return Sa["k"](e,(function(e){e.each(e.mapDimension("value"),(function(t,a){var n="ec-"+e.getName(a);r[n]=r[n]||[],isNaN(t)||r[n].push(t)}))})),e[0].map(e[0].mapDimension("value"),(function(a,n){for(var i,o="ec-"+e[0].getName(n),s=0,l=1/0,c=-1/0,u=r[o].length,p=0;p<u;p++)l=Math.min(l,r[o][p]),c=Math.max(c,r[o][p]),s+=r[o][p];return i="min"===t?l:"max"===t?c:"average"===t?s/u:s,0===u?NaN:i}))}function pL(e){var t={};e.eachSeriesByType("map",(function(e){var r=e.getHostGeoModel(),a=r?"o"+r.id:"i"+e.getMapType();(t[a]=t[a]||[]).push(e)})),Sa["k"](t,(function(e,t){for(var r=uL(Sa["H"](e,(function(e){return e.getData()})),e[0].get("mapValueCalculation")),a=0;a<e.length;a++)e[a].originalData=e[a].getData();for(a=0;a<e.length;a++)e[a].seriesGroup=e,e[a].needsDrawMap=0===a&&!e[a].getHostGeoModel(),e[a].setData(r.cloneShallow()),e[a].mainSeries=e[0]}))}function dL(e){var t={};e.eachSeriesByType("map",(function(r){var a=r.getMapType();if(!r.getHostGeoModel()&&!t[a]){var n={};Sa["k"](r.seriesGroup,(function(t){var r=t.coordinateSystem,a=t.originalData;t.get("showLegendSymbol")&&e.getComponent("legend")&&a.each(a.mapDimension("value"),(function(e,t){var i=a.getName(t),o=r.getRegion(i);if(o&&!isNaN(e)){var s=n[i]||0,l=r.dataToPoint(o.getCenter());n[i]=s+1,a.setItemLayout(t,{point:l,offset:s})}}))}));var i=r.getData();i.each((function(e){var t=i.getName(e),r=i.getItemLayout(e)||{};r.showLabel=!n[t],i.setItemLayout(e,r)})),t[a]=!0}}))}var hL=$a,fL=function(e){function t(t){var r=e.call(this)||this;return r.type="view",r.dimensions=["x","y"],r._roamTransformable=new fs,r._rawTransformable=new fs,r.name=t,r}return xa(t,e),t.prototype.setBoundingRect=function(e,t,r,a){return this._rect=new Hn(e,t,r,a),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(e,t,r,a){this._transformTo(e,t,r,a),this._viewRect=new Hn(e,t,r,a)},t.prototype._transformTo=function(e,t,r,a){var n=this.getBoundingRect(),i=this._rawTransformable;i.transform=n.calculateTransform(new Hn(e,t,r,a));var o=i.parent;i.parent=null,i.decomposeTransform(),i.parent=o,this._updateTransform()},t.prototype.setCenter=function(e,t){e&&(this._center=[rl(e[0],t.getWidth()),rl(e[1],t.getHeight())],this._updateCenterAndZoom())},t.prototype.setZoom=function(e){e=e||1;var t=this.zoomLimit;t&&(null!=t.max&&(e=Math.min(t.max,e)),null!=t.min&&(e=Math.max(t.min,e))),this._zoom=e,this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var e=this.getBoundingRect(),t=e.x+e.width/2,r=e.y+e.height/2;return[t,r]},t.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},t.prototype.getZoom=function(){return this._zoom||1},t.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},t.prototype._updateCenterAndZoom=function(){var e=this._rawTransformable.getLocalTransform(),t=this._roamTransformable,r=this.getDefaultCenter(),a=this.getCenter(),n=this.getZoom();a=$a([],a,e),r=$a([],r,e),t.originX=a[0],t.originY=a[1],t.x=r[0]-a[0],t.y=r[1]-a[1],t.scaleX=t.scaleY=n,this._updateTransform()},t.prototype._updateTransform=function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),On(this.transform||(this.transform=[]),t.transform||Tn()),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],Nn(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var e=this._rawTransformable,t=this._roamTransformable,r=new fs;return r.transform=t.transform,r.decomposeTransform(),{roam:{x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},t.prototype.dataToPoint=function(e,t,r){var a=t?this._rawTransform:this.transform;return r=r||[],a?hL(r,e,a):Ia(r,e)},t.prototype.pointToData=function(e){var t=this.invTransform;return t?hL([],e,t):[e[0],e[1]]},t.prototype.convertToPixel=function(e,t,r){var a=mL(t);return a===this?a.dataToPoint(r):null},t.prototype.convertFromPixel=function(e,t,r){var a=mL(t);return a===this?a.pointToData(r):null},t.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},t.dimensions=["x","y"],t}(fs);function mL(e){var t=e.seriesModel;return t?t.coordinateSystem:null}var gL=fL,vL={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},yL=["lng","lat"],bL=function(e){function t(t,r,a){var n=e.call(this,t)||this;n.dimensions=yL,n.type="geo",n._nameCoordMap=Sa["f"](),n.map=r;var i,o=a.projection,s=UR.load(r,a.nameMap,a.nameProperty),l=UR.getGeoResource(r),c=(n.resourceType=l?l.type:null,n.regions=s.regions),u=vL[l.type];if(n._regionsMap=s.regionsMap,n.regions=s.regions,n.projection=o,o)for(var p=0;p<c.length;p++){var d=c[p].getBoundingRect(o);i=i||d.clone(),i.union(d)}else i=s.boundingRect;return n.setBoundingRect(i.x,i.y,i.width,i.height),n.aspectScale=o?1:Sa["P"](a.aspectScale,u.aspectScale),n._invertLongitute=!o&&u.invertLongitute,n}return xa(t,e),t.prototype._transformTo=function(e,t,r,a){var n=this.getBoundingRect(),i=this._invertLongitute;n=n.clone(),i&&(n.y=-n.y-n.height);var o=this._rawTransformable;o.transform=n.calculateTransform(new Hn(e,t,r,a));var s=o.parent;o.parent=null,o.decomposeTransform(),o.parent=s,i&&(o.scaleY=-o.scaleY),this._updateTransform()},t.prototype.getRegion=function(e){return this._regionsMap.get(e)},t.prototype.getRegionByCoord=function(e){for(var t=this.regions,r=0;r<t.length;r++){var a=t[r];if("geoJSON"===a.type&&a.contain(e))return t[r]}},t.prototype.addGeoCoord=function(e,t){this._nameCoordMap.set(e,t)},t.prototype.getGeoCoord=function(e){var t=this._regionsMap.get(e);return this._nameCoordMap.get(e)||t&&t.getCenter()},t.prototype.dataToPoint=function(e,t,r){if(Sa["C"](e)&&(e=this.getGeoCoord(e)),e){var a=this.projection;return a&&(e=a.project(e)),e&&this.projectedToPoint(e,t,r)}},t.prototype.pointToData=function(e){var t=this.projection;return t&&(e=t.unproject(e)),e&&this.pointToProjected(e)},t.prototype.pointToProjected=function(t){return e.prototype.pointToData.call(this,t)},t.prototype.projectedToPoint=function(t,r,a){return e.prototype.dataToPoint.call(this,t,r,a)},t.prototype.convertToPixel=function(e,t,r){var a=_L(t);return a===this?a.dataToPoint(r):null},t.prototype.convertFromPixel=function(e,t,r){var a=_L(t);return a===this?a.pointToData(r):null},t}(gL);function _L(e){var t=e.geoModel,r=e.seriesModel;return t?t.coordinateSystem:r?r.coordinateSystem||(r.getReferringComponents("geo",ec).models[0]||{}).coordinateSystem:null}Sa["K"](bL,gL);var xL=bL;function wL(e,t){var r=e.get("boundingCoords");if(null!=r){var a=r[0],n=r[1];if(isFinite(a[0])&&isFinite(a[1])&&isFinite(n[0])&&isFinite(n[1])){var i=this.projection;if(i){var o=a[0],s=a[1],l=n[0],c=n[1];a=[1/0,1/0],n=[-1/0,-1/0];var u=function(e,t,r,o){for(var s=r-e,l=o-t,c=0;c<=100;c++){var u=c/100,p=i.project([e+s*u,t+l*u]);Ga(a,a,p),Ua(n,n,p)}};u(o,s,l,s),u(l,s,l,c),u(l,c,o,c),u(o,c,l,s)}this.setBoundingRect(a[0],a[1],n[0]-a[0],n[1]-a[1])}else 0}var p,d,h,f=this.getBoundingRect(),m=e.get("layoutCenter"),g=e.get("layoutSize"),v=t.getWidth(),y=t.getHeight(),b=f.width/f.height*this.aspectScale,_=!1;if(m&&g&&(p=[rl(m[0],v),rl(m[1],y)],d=rl(g,Math.min(v,y)),isNaN(p[0])||isNaN(p[1])||isNaN(d)||(_=!0)),_)h={},b>1?(h.width=d,h.height=d/b):(h.height=d,h.width=d*b),h.y=p[1]-h.height/2,h.x=p[0]-h.width/2;else{var x=e.getBoxLayoutParams();x.aspect=b,h=nm(x,{width:v,height:y})}this.setViewRect(h.x,h.y,h.width,h.height),this.setCenter(e.get("center"),t),this.setZoom(e.get("zoom"))}function SL(e,t){Sa["k"](t.get("geoCoord"),(function(t,r){e.addGeoCoord(r,t)}))}var DL=function(){function e(){this.dimensions=yL}return e.prototype.create=function(e,t){var r=[];function a(e){return{nameProperty:e.get("nameProperty"),aspectScale:e.get("aspectScale"),projection:e.get("projection")}}e.eachComponent("geo",(function(e,n){var i=e.get("map"),o=new xL(i+n,i,Sa["m"]({nameMap:e.get("nameMap")},a(e)));o.zoomLimit=e.get("scaleLimit"),r.push(o),e.coordinateSystem=o,o.model=e,o.resize=wL,o.resize(e,t)})),e.eachSeries((function(e){var t=e.get("coordinateSystem");if("geo"===t){var a=e.get("geoIndex")||0;e.coordinateSystem=r[a]}}));var n={};return e.eachSeriesByType("map",(function(e){if(!e.getHostGeoModel()){var t=e.getMapType();n[t]=n[t]||[],n[t].push(e)}})),Sa["k"](n,(function(e,n){var i=Sa["H"](e,(function(e){return e.get("nameMap")})),o=new xL(n,n,Sa["m"]({nameMap:Sa["J"](i)},a(e[0])));o.zoomLimit=Sa["O"].apply(null,Sa["H"](e,(function(e){return e.get("scaleLimit")}))),r.push(o),o.resize=wL,o.resize(e[0],t),Sa["k"](e,(function(e){e.coordinateSystem=o,SL(o,e)}))})),r},e.prototype.getFilledRegions=function(e,t,r,a){for(var n=(e||[]).slice(),i=Sa["f"](),o=0;o<n.length;o++)i.set(n[o].name,n[o]);var s=UR.load(t,r,a);return Sa["k"](s.regions,(function(e){var t=e.name;!i.get(t)&&n.push({name:t})})),n},e}(),CL=new DL,TL=CL,IL=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.init=function(e,t,r){var a=UR.getGeoResource(e.map);if(a&&"geoJSON"===a.type){var n=e.itemStyle=e.itemStyle||{};"color"in n||(n.color="#eee")}this.mergeDefaultAndTheme(e,r),Ml(e,"label",["show"])},t.prototype.optionUpdated=function(){var e=this,t=this.option;t.regions=TL.getFilledRegions(t.regions,t.map,t.nameMap,t.nameProperty);var r={};this._optionModelMap=Sa["N"](t.regions||[],(function(t,a){var n=a.name;return n&&(t.set(n,new Uh(a,e,e.ecModel)),a.selected&&(r[n]=!0)),t}),Sa["f"]()),t.selectedMap||(t.selectedMap=r)},t.prototype.getRegionModel=function(e){return this._optionModelMap.get(e)||new Uh(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(e,t){var r=this.getRegionModel(e),a="normal"===t?r.get(["label","formatter"]):r.get(["emphasis","label","formatter"]),n={name:e};return Sa["w"](a)?(n.status=t,a(n)):Sa["C"](a)?a.replace("{a}",null!=e?e:""):void 0},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.select=function(e){var t=this.option,r=t.selectedMode;if(r){"multiple"!==r&&(t.selectedMap=null);var a=t.selectedMap||(t.selectedMap={});a[e]=!0}},t.prototype.unSelect=function(e){var t=this.option.selectedMap;t&&(t[e]=!1)},t.prototype.toggleSelected=function(e){this[this.isSelected(e)?"unSelect":"select"](e)},t.prototype.isSelected=function(e){var t=this.option.selectedMap;return!(!t||!t[e])},t.type="geo",t.layoutMode="box",t.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:[]},t}(fm),OL=IL;function ML(e,t){return e.pointToProjected?e.pointToProjected(t):e.pointToData(t)}function AL(e,t,r,a){var n=e.getZoom(),i=e.getCenter(),o=t.zoom,s=e.projectedToPoint?e.projectedToPoint(i):e.dataToPoint(i);if(null!=t.dx&&null!=t.dy&&(s[0]-=t.dx,s[1]-=t.dy,e.setCenter(ML(e,s),a)),null!=o){if(r){var l=r.min||0,c=r.max||1/0;o=Math.max(Math.min(n*o,c),l)/n}e.scaleX*=o,e.scaleY*=o;var u=(t.originX-e.x)*(o-1),p=(t.originY-e.y)*(o-1);e.x-=u,e.y-=p,e.updateTransform(),e.setCenter(ML(e,s),a),e.setZoom(o*n)}return{center:e.getCenter(),zoom:e.getZoom()}}var kL=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.focusBlurEnabled=!0,r}return xa(t,e),t.prototype.init=function(e,t){this._api=t},t.prototype.render=function(e,t,r,a){if(this._model=e,!e.get("show"))return this._mapDraw&&this._mapDraw.remove(),void(this._mapDraw=null);this._mapDraw||(this._mapDraw=new iL(r));var n=this._mapDraw;n.draw(e,t,r,this,a),n.group.on("click",this._handleRegionClick,this),n.group.silent=e.get("silent"),this.group.add(n.group),this.updateSelectStatus(e,t,r)},t.prototype._handleRegionClick=function(e){var t;cw(e.target,(function(e){return null!=(t=Up(e).eventData)}),!0),t&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:t.name})},t.prototype.updateSelectStatus=function(e,t,r){var a=this;this._mapDraw.group.traverse((function(e){var t=Up(e).eventData;if(t)return a._model.isSelected(t.name)?r.enterSelect(e):r.leaveSelect(e),!0}))},t.prototype.findHighDownDispatchers=function(e){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(e,this._model)},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},t.type="geo",t}(Gy),PL=kL;function NL(e,t,r){UR.registerMap(e,t,r)}function EL(e){function t(t,r){r.update="geo:updateSelectStatus",e.registerAction(r,(function(e,r){var a={},n=[];return r.eachComponent({mainType:"geo",query:e},(function(r){r[t](e.name);var i=r.coordinateSystem;Object(Sa["k"])(i.regions,(function(e){a[e.name]=r.isSelected(e.name)||!1}));var o=[];Object(Sa["k"])(a,(function(e,t){a[t]&&o.push(t)})),n.push({geoIndex:r.componentIndex,name:o})})),{selected:a,allSelected:n,name:e.name}}))}e.registerCoordinateSystem("geo",TL),e.registerComponentModel(OL),e.registerComponentView(PL),e.registerImpl("registerMap",NL),e.registerImpl("getMap",(function(e){return UR.getMapForUser(e)})),t("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),t("select",{type:"geoSelect",event:"geoselected"}),t("unSelect",{type:"geoUnSelect",event:"geounselected"}),e.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(e,t,r){var a=e.componentType||"series";t.eachComponent({mainType:a,query:e},(function(t){var n=t.coordinateSystem;if("geo"===n.type){var i=AL(n,e,t.get("scaleLimit"),r);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom),"series"===a&&Object(Sa["k"])(t.seriesGroup,(function(e){e.setCenter(i.center),e.setZoom(i.zoom)}))}}))}))}function RL(e){JD(EL),e.registerChartView(sL),e.registerSeriesModel(cL),e.registerLayout(dL),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,pL),ow("map",e.registerAction)}function LL(e){var t=e;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};var r,a,n=[t];while(r=n.pop())if(a=r.children,r.isExpand&&a.length)for(var i=a.length,o=i-1;o>=0;o--){var s=a[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},n.push(s)}}function jL(e,t){var r=e.isExpand?e.children:[],a=e.parentNode.children,n=e.hierNode.i?a[e.hierNode.i-1]:null;if(r.length){$L(e);var i=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;n?(e.hierNode.prelim=n.hierNode.prelim+t(e,n),e.hierNode.modifier=e.hierNode.prelim-i):e.hierNode.prelim=i}else n&&(e.hierNode.prelim=n.hierNode.prelim+t(e,n));e.parentNode.hierNode.defaultAncestor=GL(e,n,e.parentNode.hierNode.defaultAncestor||a[0],t)}function FL(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function VL(e){return arguments.length?e:YL}function zL(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function BL(e,t){return nm(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function $L(e){var t=e.children,r=t.length,a=0,n=0;while(--r>=0){var i=t[r];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function GL(e,t,r,a){if(t){var n=e,i=e,o=i.parentNode.children[0],s=t,l=n.hierNode.modifier,c=i.hierNode.modifier,u=o.hierNode.modifier,p=s.hierNode.modifier;while(s=UL(s),i=WL(i),s&&i){n=UL(n),o=WL(o),n.hierNode.ancestor=e;var d=s.hierNode.prelim+p-i.hierNode.prelim-c+a(s,i);d>0&&(qL(HL(s,e,r),e,d),c+=d,l+=d),p+=s.hierNode.modifier,c+=i.hierNode.modifier,l+=n.hierNode.modifier,u+=o.hierNode.modifier}s&&!UL(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=p-l),i&&!WL(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=c-u,r=e)}return r}function UL(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function WL(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function HL(e,t,r){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:r}function qL(e,t,r){var a=r/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=a,t.hierNode.shift+=r,t.hierNode.modifier+=r,t.hierNode.prelim+=r,e.hierNode.change+=a}function YL(e,t){return e.parentNode===t.parentNode?1:2}var XL=function(){function e(){this.parentPoint=[],this.childPoints=[]}return e}(),ZL=function(e){function t(t){return e.call(this,t)||this}return xa(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new XL},t.prototype.buildPath=function(e,t){var r=t.childPoints,a=r.length,n=t.parentPoint,i=r[0],o=r[a-1];if(1===a)return e.moveTo(n[0],n[1]),void e.lineTo(i[0],i[1]);var s=t.orient,l="TB"===s||"BT"===s?0:1,c=1-l,u=rl(t.forkPosition,1),p=[];p[l]=n[l],p[c]=n[c]+(o[c]-n[c])*u,e.moveTo(n[0],n[1]),e.lineTo(p[0],p[1]),e.moveTo(i[0],i[1]),p[l]=i[l],e.lineTo(p[0],p[1]),p[l]=o[l],e.lineTo(p[0],p[1]),e.lineTo(o[0],o[1]);for(var d=1;d<a-1;d++){var h=r[d];e.moveTo(h[0],h[1]),p[l]=h[l],e.lineTo(p[0],p[1])}},t}(lp),KL=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r._mainGroup=new Bs,r}return xa(t,e),t.prototype.init=function(e,t){this._controller=new kE(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,t,r){var a=e.getData(),n=e.layoutInfo,i=this._mainGroup,o=e.get("layout");"radial"===o?(i.x=n.x+n.width/2,i.y=n.y+n.height/2):(i.x=n.x,i.y=n.y),this._updateViewCoordSys(e,r),this._updateController(e,t,r);var s=this._data;a.diff(s).add((function(t){JL(a,t)&&QL(a,t,null,i,e)})).update((function(t,r){var n=s.getItemGraphicEl(r);JL(a,t)?QL(a,t,n,i,e):n&&aj(s,r,n,i,e)})).remove((function(t){var r=s.getItemGraphicEl(t);r&&aj(s,t,r,i,e)})).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),!0===e.get("expandAndCollapse")&&a.eachItemGraphicEl((function(t,a){t.off("click").on("click",(function(){r.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:a})}))})),this._data=a},t.prototype._updateViewCoordSys=function(e,t){var r=e.getData(),a=[];r.each((function(e){var t=r.getItemLayout(e);!t||isNaN(t.x)||isNaN(t.y)||a.push([+t.x,+t.y])}));var n=[],i=[];uu(a,n,i);var o=this._min,s=this._max;i[0]-n[0]===0&&(n[0]=o?o[0]:n[0]-1,i[0]=s?s[0]:i[0]+1),i[1]-n[1]===0&&(n[1]=o?o[1]:n[1]-1,i[1]=s?s[1]:i[1]+1);var l=e.coordinateSystem=new gL;l.zoomLimit=e.get("scaleLimit"),l.setBoundingRect(n[0],n[1],i[0]-n[0],i[1]-n[1]),l.setCenter(e.get("center"),t),l.setZoom(e.get("zoom")),this.group.attr({x:l.x,y:l.y,scaleX:l.scaleX,scaleY:l.scaleY}),this._min=n,this._max=i},t.prototype._updateController=function(e,t,r){var a=this,n=this._controller,i=this._controllerHost,o=this.group;n.setPointerChecker((function(t,a,n){var i=o.getBoundingRect();return i.applyTransform(o.transform),i.contain(a,n)&&!LE(t,r,e)})),n.enable(e.get("roam")),i.zoomLimit=e.get("scaleLimit"),i.zoom=e.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",(function(t){PE(i,t.dx,t.dy),r.dispatchAction({seriesId:e.id,type:"treeRoam",dx:t.dx,dy:t.dy})})).on("zoom",(function(t){NE(i,t.scale,t.originX,t.originY),r.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),a._updateNodeAndLinkScale(e),r.updateLabelLayout()}))},t.prototype._updateNodeAndLinkScale=function(e){var t=e.getData(),r=this._getNodeGlobalScale(e);t.eachItemGraphicEl((function(e,t){e.setSymbolScale(r)}))},t.prototype._getNodeGlobalScale=function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var r=this._nodeScaleRatio,a=t.scaleX||1,n=t.getZoom(),i=(n-1)*r+1;return i/a},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type="tree",t}(ux);function JL(e,t){var r=e.getItemLayout(t);return r&&!isNaN(r.x)&&!isNaN(r.y)}function QL(e,t,r,a,n){var i=!r,o=e.tree.getNodeByDataIndex(t),s=o.getModel(),l=o.getVisual("style").fill,c=!1===o.isExpand&&0!==o.children.length?l:"#fff",u=e.tree.root,p=o.parentNode===u?o:o.parentNode||o,d=e.getItemGraphicEl(p.dataIndex),h=p.getLayout(),f=d?{x:d.__oldX,y:d.__oldY,rawX:d.__radialOldRawX,rawY:d.__radialOldRawY}:h,m=o.getLayout();i?(r=new LO(e,t,null,{symbolInnerColor:c,useNameLabel:!0}),r.x=f.x,r.y=f.y):r.updateData(e,t,null,{symbolInnerColor:c,useNameLabel:!0}),r.__radialOldRawX=r.__radialRawX,r.__radialOldRawY=r.__radialRawY,r.__radialRawX=m.rawX,r.__radialRawY=m.rawY,a.add(r),e.setItemGraphicEl(t,r),r.__oldX=r.x,r.__oldY=r.y,sh(r,{x:m.x,y:m.y},n);var g=r.getSymbolPath();if("radial"===n.get("layout")){var v=u.children[0],y=v.getLayout(),b=v.children.length,_=void 0,x=void 0;if(m.x===y.x&&!0===o.isExpand&&v.children.length){var w={x:(v.children[0].getLayout().x+v.children[b-1].getLayout().x)/2,y:(v.children[0].getLayout().y+v.children[b-1].getLayout().y)/2};_=Math.atan2(w.y-y.y,w.x-y.x),_<0&&(_=2*Math.PI+_),x=w.x<y.x,x&&(_-=Math.PI)}else _=Math.atan2(m.y-y.y,m.x-y.x),_<0&&(_=2*Math.PI+_),0===o.children.length||0!==o.children.length&&!1===o.isExpand?(x=m.x<y.x,x&&(_-=Math.PI)):(x=m.x>y.x,x||(_-=Math.PI));var S=x?"left":"right",D=s.getModel("label"),C=D.get("rotate"),T=C*(Math.PI/180),I=g.getTextContent();I&&(g.setTextConfig({position:D.get("position")||S,rotation:null==C?-_:T,origin:"center"}),I.setStyle("verticalAlign","middle"))}var O=s.get(["emphasis","focus"]),M="relative"===O?Sa["e"](o.getAncestorsIndices(),o.getDescendantIndices()):"ancestor"===O?o.getAncestorsIndices():"descendant"===O?o.getDescendantIndices():null;M&&(Up(r).focus=M),ej(n,o,u,r,f,h,m,a),r.__edge&&(r.onHoverStateChange=function(t){if("blur"!==t){var a=o.parentNode&&e.getItemGraphicEl(o.parentNode.dataIndex);a&&a.hoverState===Kp||yd(r.__edge,t)}})}function ej(e,t,r,a,n,i,o,s){var l=t.getModel(),c=e.get("edgeShape"),u=e.get("layout"),p=e.getOrient(),d=e.get(["lineStyle","curveness"]),h=e.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),m=a.__edge;if("curve"===c)t.parentNode&&t.parentNode!==r&&(m||(m=a.__edge=new a_({shape:nj(u,p,d,n,n)})),sh(m,{shape:nj(u,p,d,i,o)},e));else if("polyline"===c)if("orthogonal"===u){if(t!==r&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var g=t.children,v=[],y=0;y<g.length;y++){var b=g[y].getLayout();v.push([b.x,b.y])}m||(m=a.__edge=new ZL({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:p,forkPosition:h}})),sh(m,{shape:{parentPoint:[o.x,o.y],childPoints:v}},e)}}else 0;m&&("polyline"!==c||t.isExpand)&&(m.useStyle(Sa["i"]({strokeNoScale:!0,fill:null},f)),Zd(m,l,"lineStyle"),Dd(m),s.add(m))}function tj(e,t,r,a,n){var i=t.tree.root,o=rj(i,e),s=o.source,l=o.sourceLayout,c=t.getItemGraphicEl(e.dataIndex);if(c){var u=t.getItemGraphicEl(s.dataIndex),p=u.__edge,d=c.__edge||(!1===s.isExpand||1===s.children.length?p:void 0),h=a.get("edgeShape"),f=a.get("layout"),m=a.get("orient"),g=a.get(["lineStyle","curveness"]);d&&("curve"===h?uh(d,{shape:nj(f,m,g,l,l),style:{opacity:0}},a,{cb:function(){r.remove(d)},removeOpt:n}):"polyline"===h&&"orthogonal"===a.get("layout")&&uh(d,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},a,{cb:function(){r.remove(d)},removeOpt:n}))}}function rj(e,t){var r,a=t.parentNode===e?t:t.parentNode||t;while(r=a.getLayout(),null==r)a=a.parentNode===e?a:a.parentNode||a;return{source:a,sourceLayout:r}}function aj(e,t,r,a,n){var i=e.tree.getNodeByDataIndex(t),o=e.tree.root,s=rj(o,i).sourceLayout,l={duration:n.get("animationDurationUpdate"),easing:n.get("animationEasingUpdate")};uh(r,{x:s.x+1,y:s.y+1},n,{cb:function(){a.remove(r),e.setItemGraphicEl(t,null)},removeOpt:l}),r.fadeOut(null,e.hostModel,{fadeLabel:!0,animation:l}),i.children.forEach((function(t){tj(t,e,a,n,l)})),tj(i,e,a,n,l)}function nj(e,t,r,a,n){var i,o,s,l,c,u,p,d;if("radial"===e){c=a.rawX,p=a.rawY,u=n.rawX,d=n.rawY;var h=zL(c,p),f=zL(c,p+(d-p)*r),m=zL(u,d+(p-d)*r),g=zL(u,d);return{x1:h.x||0,y1:h.y||0,x2:g.x||0,y2:g.y||0,cpx1:f.x||0,cpy1:f.y||0,cpx2:m.x||0,cpy2:m.y||0}}return c=a.x,p=a.y,u=n.x,d=n.y,"LR"!==t&&"RL"!==t||(i=c+(u-c)*r,o=p,s=u+(c-u)*r,l=d),"TB"!==t&&"BT"!==t||(i=c,o=p+(d-p)*r,s=u,l=d+(p-d)*r),{x1:c,y1:p,x2:u,y2:d,cpx1:i,cpy1:o,cpx2:s,cpy2:l}}var ij=KL,oj=Zl();function sj(e){var t=e.mainData,r=e.datas;r||(r={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,fj(t,r,e),Object(Sa["k"])(r,(function(r){Object(Sa["k"])(t.TRANSFERABLE_METHODS,(function(t){r.wrapMethod(t,Object(Sa["h"])(lj,e))}))})),t.wrapMethod("cloneShallow",Object(Sa["h"])(uj,e)),Object(Sa["k"])(t.CHANGABLE_METHODS,(function(r){t.wrapMethod(r,Object(Sa["h"])(cj,e))})),Object(Sa["b"])(r[t.dataType]===t)}function lj(e,t){if(hj(this)){var r=Object(Sa["m"])({},oj(this).datas);r[this.dataType]=t,fj(t,r,e)}else mj(t,this.dataType,oj(this).mainData,e);return t}function cj(e,t){return e.struct&&e.struct.update(),t}function uj(e,t){return Object(Sa["k"])(oj(t).datas,(function(r,a){r!==t&&mj(r.cloneShallow(),a,t,e)})),t}function pj(e){var t=oj(this).mainData;return null==e||null==t?t:oj(t).datas[e]}function dj(){var e=oj(this).mainData;return null==e?[{data:e}]:Object(Sa["H"])(Object(Sa["F"])(oj(e).datas),(function(t){return{type:t,data:oj(e).datas[t]}}))}function hj(e){return oj(e).mainData===e}function fj(e,t,r){oj(e).datas={},Object(Sa["k"])(t,(function(t,a){mj(t,a,e,r)}))}function mj(e,t,r,a){oj(r).datas[t]=e,oj(e).mainData=r,e.dataType=t,a.struct&&(e[a.structAttr]=a.struct,a.struct[a.datasAttr[t]]=e),e.getLinkedData=pj,e.getLinkedDataAll=dj}var gj=sj,vj=function(){function e(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 e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,r){Sa["w"](e)&&(r=t,t=e,e=null),e=e||{},Sa["C"](e)&&(e={order:e});var a,n=e.order||"preorder",i=this[e.attr||"children"];"preorder"===n&&(a=t.call(r,this));for(var o=0;!a&&o<i.length;o++)i[o].eachNode(e,t,r);"postorder"===n&&t.call(r,this)},e.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var r=0;r<this.children.length;r++){var a=this.children[r];a.updateDepthAndHeight(e+1),a.height>t&&(t=a.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,r=this.children,a=r.length;t<a;t++){var n=r[t].getNodeById(e);if(n)return n}},e.prototype.contains=function(e){if(e===this)return!0;for(var t=0,r=this.children,a=r.length;t<a;t++){var n=r[t].contains(e);if(n)return n}},e.prototype.getAncestors=function(e){var t=[],r=e?this:this.parentNode;while(r)t.push(r),r=r.parentNode;return t.reverse(),t},e.prototype.getAncestorsIndices=function(){var e=[],t=this;while(t)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},e.prototype.getDescendantIndices=function(){var e=[];return this.eachNode((function(t){e.push(t.dataIndex)})),e},e.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},e.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,r=t.data.getItemModel(this.dataIndex);return r.getModel(e)}},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.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},e.prototype.isAncestorOf=function(e){var t=e.parentNode;while(t){if(t===this)return!0;t=t.parentNode}return!1},e.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},e}(),yj=function(){function e(e){this.type="tree",this._nodes=[],this.hostModel=e}return e.prototype.eachNode=function(e,t,r){this.root.eachNode(e,t,r)},e.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},e.prototype.getNodeById=function(e){return this.root.getNodeById(e)},e.prototype.update=function(){for(var e=this.data,t=this._nodes,r=0,a=t.length;r<a;r++)t[r].dataIndex=-1;for(r=0,a=e.count();r<a;r++)t[e.getRawIndex(r)].dataIndex=r},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,r,a){var n=new e(r),i=[],o=1;function s(e,t){var r=e.value;o=Math.max(o,Sa["t"](r)?r.length:1),i.push(e);var a=new vj($l(e.name,""),n);t?bj(a,t):n.root=a,n._nodes.push(a);var l=e.children;if(l)for(var c=0;c<l.length;c++)s(l[c],a)}s(t),n.root.updateDepthAndHeight(0);var l=dO(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,c=new pO(l,r);return c.initData(i),a&&a(c),gj({mainData:c,struct:n,structAttr:"tree"}),n.update(),n},e}();function bj(e,t){var r=t.children;e.parentNode!==t&&(r.push(e),e.parentNode=t)}var _j=yj;function xj(e,t,r){if(e&&Sa["r"](t,e.type)>=0){var a=r.getData().tree.root,n=e.targetNode;if(Sa["C"](n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=e.targetNodeId;if(null!=i&&(n=a.getNodeById(i)))return{node:n}}}function wj(e){var t=[];while(e)e=e.parentNode,e&&t.push(e);return t.reverse()}function Sj(e,t){var r=wj(e);return Sa["r"](r,t)>=0}function Dj(e,t){var r=[];while(e){var a=e.dataIndex;r.push({name:e.name,dataIndex:a,value:t.getRawValue(a)}),e=e.parentNode}return r.reverse(),r}var Cj=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return xa(t,e),t.prototype.getInitialData=function(e){var t={name:e.name,children:e.data},r=e.leaves||{},a=new Uh(r,this,this.ecModel),n=_j.createTree(t,this,i);function i(e){e.wrapMethod("getItemModel",(function(e,t){var r=n.getNodeByDataIndex(t);return r&&r.children.length&&r.isExpand||(e.parentModel=a),e}))}var o=0;n.eachNode("preorder",(function(e){e.depth>o&&(o=e.depth)}));var s=e.expandAndCollapse,l=s&&e.initialTreeDepth>=0?e.initialTreeDepth:o;return n.root.eachNode("preorder",(function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=l})),n.data},t.prototype.getOrient=function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,t,r){var a=this.getData().tree,n=a.root.children[0],i=a.getNodeByDataIndex(e),o=i.getValue(),s=i.name;while(i&&i!==n)s=i.parentNode.name+"."+s,i=i.parentNode;return py("nameValue",{name:s,value:o,noValue:isNaN(o)||null==o})},t.prototype.getDataParams=function(t){var r=e.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=Dj(a,this),r.collapsed=!a.isExpand,r},t.type="series.tree",t.layoutMode="box",t.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},t}(By),Tj=Cj;function Ij(e,t,r){var a,n=[e],i=[];while(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])}while(a=i.pop())t(a,r)}function Oj(e,t){var r,a=[e];while(r=a.pop())if(t(r),r.isExpand){var n=r.children;if(n.length)for(var i=n.length-1;i>=0;i--)a.push(n[i])}}function Mj(e,t){e.eachSeriesByType("tree",(function(e){Aj(e,t)}))}function Aj(e,t){var r=BL(e,t);e.layoutInfo=r;var a=e.get("layout"),n=0,i=0,o=null;"radial"===a?(n=2*Math.PI,i=Math.min(r.height,r.width)/2,o=VL((function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth}))):(n=r.width,i=r.height,o=VL());var s=e.getData().tree.root,l=s.children[0];if(l){LL(s),Ij(l,jL,o),s.hierNode.modifier=-l.hierNode.prelim,Oj(l,FL);var c=l,u=l,p=l;Oj(l,(function(e){var t=e.getLayout().x;t<c.getLayout().x&&(c=e),t>u.getLayout().x&&(u=e),e.depth>p.depth&&(p=e)}));var d=c===u?1:o(c,u)/2,h=d-c.getLayout().x,f=0,m=0,g=0,v=0;if("radial"===a)f=n/(u.getLayout().x+d+h),m=i/(p.depth-1||1),Oj(l,(function(e){g=(e.getLayout().x+h)*f,v=(e.depth-1)*m;var t=zL(g,v);e.setLayout({x:t.x,y:t.y,rawX:g,rawY:v},!0)}));else{var y=e.getOrient();"RL"===y||"LR"===y?(m=i/(u.getLayout().x+d+h),f=n/(p.depth-1||1),Oj(l,(function(e){v=(e.getLayout().x+h)*m,g="LR"===y?(e.depth-1)*f:n-(e.depth-1)*f,e.setLayout({x:g,y:v},!0)}))):"TB"!==y&&"BT"!==y||(f=n/(u.getLayout().x+d+h),m=i/(p.depth-1||1),Oj(l,(function(e){g=(e.getLayout().x+h)*f,v="TB"===y?(e.depth-1)*m:i-(e.depth-1)*m,e.setLayout({x:g,y:v},!0)})))}}}function kj(e){e.eachSeriesByType("tree",(function(e){var t=e.getData(),r=t.tree;r.eachNode((function(e){var r=e.getModel(),a=r.getModel("itemStyle").getItemStyle(),n=t.ensureUniqueItemVisual(e.dataIndex,"style");Object(Sa["m"])(n,a)}))}))}function Pj(e){e.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var r=e.dataIndex,a=t.getData().tree,n=a.getNodeByDataIndex(r);n.isExpand=!n.isExpand}))})),e.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(e,t,r){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var a=t.coordinateSystem,n=AL(a,e,void 0,r);t.setCenter&&t.setCenter(n.center),t.setZoom&&t.setZoom(n.zoom)}))}))}function Nj(e){e.registerChartView(ij),e.registerSeriesModel(Tj),e.registerLayout(Mj),e.registerVisual(kj),Pj(e)}var Ej=["treemapZoomToNode","treemapRender","treemapMove"];function Rj(e){for(var t=0;t<Ej.length;t++)e.registerAction({type:Ej[t],update:"updateView"},Sa["L"]);e.registerAction({type:"treemapRootToNode",update:"updateView"},(function(e,t){function r(t,r){var a=["treemapZoomToNode","treemapRootToNode"],n=xj(e,a,t);if(n){var i=t.getViewRoot();i&&(e.direction=Sj(i,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node)}}t.eachComponent({mainType:"series",subType:"treemap",query:e},r)}))}function Lj(e){var t=e.getData(),r=t.tree,a={};r.eachNode((function(t){var r=t;while(r&&r.depth>1)r=r.parentNode;var n=$m(e.ecModel,r.name||r.dataIndex+"",a);t.setVisual("decal",n)}))}var jj=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.preventUsingHoverLayer=!0,r}return xa(t,e),t.prototype.getInitialData=function(e,t){var r={name:e.name,children:e.data};Fj(r);var a=e.levels||[],n=this.designatedVisualItemStyle={},i=new Uh({itemStyle:n},this,t);a=e.levels=Vj(a,t);var o=Sa["H"](a||[],(function(e){return new Uh(e,i,t)}),this),s=_j.createTree(r,this,l);function l(e){e.wrapMethod("getItemModel",(function(e,t){var r=s.getNodeByDataIndex(t),a=r?o[r.depth]:null;return e.parentModel=a||i,e}))}return s.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,r){var a=this.getData(),n=this.getRawValue(e),i=a.getName(e);return py("nameValue",{name:i,value:n})},t.prototype.getDataParams=function(t){var r=e.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return r.treeAncestors=Dj(a,this),r.treePathInfo=r.treeAncestors,r},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},Sa["m"](this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=Sa["f"](),this._idIndexMapCount=0);var r=t.get(e);return null==r&&t.set(e,r=this._idIndexMapCount++),r},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){Lj(this)},t.type="series.treemap",t.layoutMode="box",t.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:.1024,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:[]},t}(By);function Fj(e){var t=0;Sa["k"](e.children,(function(e){Fj(e);var r=e.value;Sa["t"](r)&&(r=r[0]),t+=r}));var r=e.value;Sa["t"](r)&&(r=r[0]),(null==r||isNaN(r))&&(r=t),r<0&&(r=0),Sa["t"](e.value)?e.value[0]=r:e.value=r}function Vj(e,t){var r=Ol(t.get("color")),a=Ol(t.get(["aria","decal","decals"]));if(r){var n,i;e=e||[],Sa["k"](e,(function(e){var t=new Uh(e),r=t.get("color"),a=t.get("decal");(t.get(["itemStyle","color"])||r&&"none"!==r)&&(n=!0),(t.get(["itemStyle","decal"])||a&&"none"!==a)&&(i=!0)}));var o=e[0]||(e[0]={});return n||(o.color=r.slice()),!i&&a&&(o.decal=a.slice()),e}}var zj=jj,Bj=8,$j=8,Gj=5,Uj=function(){function e(e){this.group=new Bs,e.add(this.group)}return e.prototype.render=function(e,t,r,a){var n=e.getModel("breadcrumb"),i=this.group;if(i.removeAll(),n.get("show")&&r){var o=n.getModel("itemStyle"),s=n.getModel("emphasis"),l=o.getModel("textStyle"),c=s.getModel(["itemStyle","textStyle"]),u={pos:{left:n.get("left"),right:n.get("right"),top:n.get("top"),bottom:n.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:n.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(r,u,l),this._renderContent(e,u,o,s,l,c,a),im(i,u.pos,u.box)}},e.prototype._prepare=function(e,t,r){for(var a=e;a;a=a.parentNode){var n=$l(a.getModel().get("name"),""),i=r.getTextRect(n),o=Math.max(i.width+2*Bj,t.emptyItemWidth);t.totalWidth+=o+$j,t.renderList.push({node:a,text:n,width:o})}},e.prototype._renderContent=function(e,t,r,a,n,i,o){for(var s=0,l=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),u=am(t.pos,t.box),p=t.totalWidth,d=t.renderList,h=a.getModel("itemStyle").getItemStyle(),f=d.length-1;f>=0;f--){var m=d[f],g=m.node,v=m.width,y=m.text;p>u.width&&(p-=v-l,v=l,y=null);var b=new Wb({shape:{points:Wj(s,0,v,c,f===d.length-1,0===f)},style:Object(Sa["i"])(r.getItemStyle(),{lineJoin:"bevel"}),textContent:new Gp({style:_h(n,{text:y})}),textConfig:{position:"inside"},z2:1e4*td,onclick:Object(Sa["h"])(o,g)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=_h(i,{text:y}),b.ensureState("emphasis").style=h,Hd(b,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(b),Hj(b,e,g),s+=v+$j}},e.prototype.remove=function(){this.group.removeAll()},e}();function Wj(e,t,r,a,n,i){var o=[[n?e:e-Gj,t],[e+r,t],[e+r,t+a],[n?e:e-Gj,t+a]];return!i&&o.splice(2,0,[e+r+Gj,t+a/2]),!n&&o.push([e,t+a/2]),o}function Hj(e,t,r){Up(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&Dj(r,t)}}var qj=Uj,Yj=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,r,a,n){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:r,delay:a,easing:n}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,r=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},a=0,n=this._storage.length;a<n;a++){var i=this._storage[a];i.el.animateTo(i.target,{duration:i.duration,delay:i.delay,easing:i.easing,setToFinal:!0,done:r,aborted:r})}return this},e}();function Xj(){return new Yj}var Zj=Bs,Kj=Cp,Jj=3,Qj="label",eF="upperLabel",tF=10*td,rF=2*td,aF=3*td,nF=wc([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),iF=function(e){var t=nF(e);return t.stroke=t.fill=t.lineWidth=null,t},oF=Zl(),sF=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r._state="ready",r._storage=lF(),r}return xa(t,e),t.prototype.render=function(e,t,r,a){var n=t.findComponents({mainType:"series",subType:"treemap",query:a});if(!(Object(Sa["r"])(n,e)<0)){this.seriesModel=e,this.api=r,this.ecModel=t;var i=["treemapZoomToNode","treemapRootToNode"],o=xj(a,i,e),s=a&&a.type,l=e.layoutInfo,c=!this._oldTree,u=this._storage,p="treemapRootToNode"===s&&o&&u?{rootNodeGroup:u.nodeGroup[o.node.getRawIndex()],direction:a.direction}:null,d=this._giveContainerGroup(l),h=e.get("animation"),f=this._doRender(d,e,p);!h||c||s&&"treemapZoomToNode"!==s&&"treemapRootToNode"!==s?f.renderFinally():this._doAnimation(d,f,e,p),this._resetController(r),this._renderBreadcrumb(e,r,o)}},t.prototype._giveContainerGroup=function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new Zj,this._initEvents(t),this.group.add(t)),t.x=e.x,t.y=e.y,t},t.prototype._doRender=function(e,t,r){var a=t.getData().tree,n=this._oldTree,i=lF(),o=lF(),s=this._storage,l=[];function c(e,a,n,c){return cF(t,o,s,r,i,l,e,a,n,c)}h(a.root?[a.root]:[],n&&n.root?[n.root]:[],e,a===n||!n,0);var u=f(s);if(this._oldTree=a,this._storage=o,this._controllerHost){var p=this.seriesModel.layoutInfo,d=a.root.getLayout();d.width===p.width&&d.height===p.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:i,willDeleteEls:u,renderFinally:m};function h(e,t,r,a,n){function i(e){return e.getId()}function o(i,o){var s=null!=i?e[i]:null,l=null!=o?t[o]:null,u=c(s,l,r,n);u&&h(s&&s.viewChildren||[],l&&l.viewChildren||[],u,a,n+1)}a?(t=e,Object(Sa["k"])(e,(function(e,t){!e.isRemoved()&&o(t,t)}))):new RI(t,e,i,i).add(o).update(o).remove(Object(Sa["h"])(o,null)).execute()}function f(e){var t=lF();return e&&Object(Sa["k"])(e,(function(e,r){var a=t[r];Object(Sa["k"])(e,(function(e){e&&(a.push(e),oF(e).willDelete=!0)}))})),t}function m(){Object(Sa["k"])(u,(function(e){Object(Sa["k"])(e,(function(e){e.parent&&e.parent.remove(e)}))})),Object(Sa["k"])(l,(function(e){e.invisible=!0,e.dirty()}))}},t.prototype._doAnimation=function(e,t,r,a){var n=r.get("animationDurationUpdate"),i=r.get("animationEasing"),o=(Object(Sa["w"])(n)?0:n)||0,s=(Object(Sa["w"])(i)?null:i)||"cubicOut",l=Xj();Object(Sa["k"])(t.willDeleteEls,(function(e,t){Object(Sa["k"])(e,(function(e,r){if(!e.invisible){var n,i=e.parent,c=oF(i);if(a&&"drillDown"===a.direction)n=i===a.rootNodeGroup?{shape:{x:0,y:0,width:c.nodeWidth,height:c.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,p=0;c.willDelete||(u=c.nodeWidth/2,p=c.nodeHeight/2),n="nodeGroup"===t?{x:u,y:p,style:{opacity:0}}:{shape:{x:u,y:p,width:0,height:0},style:{opacity:0}}}n&&l.add(e,n,o,0,s)}}))})),Object(Sa["k"])(this._storage,(function(e,r){Object(Sa["k"])(e,(function(e,a){var n=t.lastsForAnimation[r][a],i={};n&&(e instanceof Bs?null!=n.oldX&&(i.x=e.x,i.y=e.y,e.x=n.oldX,e.y=n.oldY):(n.oldShape&&(i.shape=Object(Sa["m"])({},e.shape),e.setShape(n.oldShape)),n.fadein?(e.setStyle("opacity",0),i.style={opacity:1}):1!==e.style.opacity&&(i.style={opacity:1})),l.add(e,i,o,0,s))}))}),this),this._state="animating",l.finished(Object(Sa["c"])((function(){this._state="ready",t.renderFinally()}),this)).start()},t.prototype._resetController=function(e){var t=this._controller,r=this._controllerHost;r||(this._controllerHost={target:this.group},r=this._controllerHost),t||(t=this._controller=new kE(e.getZr()),t.enable(this.seriesModel.get("roam")),r.zoomLimit=this.seriesModel.get("scaleLimit"),r.zoom=this.seriesModel.get("zoom"),t.on("pan",Object(Sa["c"])(this._onPan,this)),t.on("zoom",Object(Sa["c"])(this._onZoom,this)));var a=new Hn(0,0,e.getWidth(),e.getHeight());t.setPointerChecker((function(e,t,r){return a.contain(t,r)}))},t.prototype._clearController=function(){var e=this._controller;this._controllerHost=null,e&&(e.dispose(),e=null)},t.prototype._onPan=function(e){if("animating"!==this._state&&(Math.abs(e.dx)>Jj||Math.abs(e.dy)>Jj)){var t=this.seriesModel.getData().tree.root;if(!t)return;var r=t.getLayout();if(!r)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x+e.dx,y:r.y+e.dy,width:r.width,height:r.height}})}},t.prototype._onZoom=function(e){var t=e.originX,r=e.originY,a=e.scale;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;var o=new Hn(i.x,i.y,i.width,i.height),s=null,l=this._controllerHost;s=l.zoomLimit;var c=l.zoom=l.zoom||1;if(c*=a,s){var u=s.min||0,p=s.max||1/0;c=Math.max(Math.min(p,c),u)}var d=c/l.zoom;l.zoom=c;var h=this.seriesModel.layoutInfo;t-=h.x,r-=h.y;var f=Tn();An(f,f,[-t,-r]),Pn(f,f,[d,d]),An(f,f,[t,r]),o.applyTransform(f),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},t.prototype._initEvents=function(e){var t=this;e.on("click",(function(e){if("ready"===t._state){var r=t.seriesModel.get("nodeClick",!0);if(r){var a=t.findTarget(e.offsetX,e.offsetY);if(a){var n=a.node;if(n.getLayout().isLeafRoot)t._rootToNode(a);else if("zoomToNode"===r)t._zoomToNode(a);else if("link"===r){var i=n.hostTree.data.getItemModel(n.dataIndex),o=i.get("link",!0),s=i.get("target",!0)||"blank";o&&Kf(o,s)}}}}}),this)},t.prototype._renderBreadcrumb=function(e,t,r){var a=this;r||(r=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2),r||(r={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new qj(this.group))).render(e,t,r.node,(function(t){"animating"!==a._state&&(Sj(e.getViewRoot(),t)?a._rootToNode({node:t}):a._zoomToNode({node:t}))}))},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=lF(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var r,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},(function(a){var n=this._storage.background[a.getRawIndex()];if(n){var i=n.transformCoordToLocal(e,t),o=n.shape;if(!(o.x<=i[0]&&i[0]<=o.x+o.width&&o.y<=i[1]&&i[1]<=o.y+o.height))return!1;r={node:a,offsetX:i[0],offsetY:i[1]}}}),this),r},t.type="treemap",t}(ux);function lF(){return{nodeGroup:[],background:[],content:[]}}function cF(e,t,r,a,n,i,o,s,l,c){if(o){var u=o.getLayout(),p=e.getData(),d=o.getModel();if(p.setItemGraphicEl(o.dataIndex,null),u&&u.isInView){var h=u.width,f=u.height,m=u.borderWidth,g=u.invisible,v=o.getRawIndex(),y=s&&s.getRawIndex(),b=o.viewChildren,_=u.upperHeight,x=b&&b.length,w=d.getModel("itemStyle"),S=d.getModel(["emphasis","itemStyle"]),D=d.getModel(["blur","itemStyle"]),C=d.getModel(["select","itemStyle"]),T=w.get("borderRadius")||0,I=z("nodeGroup",Zj);if(I){if(l.add(I),I.x=u.x||0,I.y=u.y||0,I.markRedraw(),oF(I).nodeWidth=h,oF(I).nodeHeight=f,u.isAboveViewRoot)return I;var O=z("background",Kj,c,rF);O&&R(I,O,x&&u.upperLabelHeight);var M=d.getModel("emphasis"),A=M.get("focus"),k=M.get("blurScope"),P=M.get("disabled"),N="ancestor"===A?o.getAncestorsIndices():"descendant"===A?o.getDescendantIndices():A;if(x)Jd(I)&&Kd(I,!1),O&&(Kd(O,!P),p.setItemGraphicEl(o.dataIndex,O),qd(O,N,k));else{var E=z("content",Kj,c,aF);E&&L(I,E),O.disableMorphing=!0,O&&Jd(O)&&Kd(O,!1),Kd(I,!P),p.setItemGraphicEl(o.dataIndex,I),qd(I,N,k)}return I}}}function R(t,r,a){var n=Up(r);if(n.dataIndex=o.dataIndex,n.seriesIndex=e.seriesIndex,r.setShape({x:0,y:0,width:h,height:f,r:T}),g)j(r);else{r.invisible=!1;var i=o.getVisual("style"),s=i.stroke,l=iF(w);l.fill=s;var c=nF(S);c.fill=S.get("borderColor");var u=nF(D);u.fill=D.get("borderColor");var p=nF(C);if(p.fill=C.get("borderColor"),a){var d=h-2*m;F(r,s,i.opacity,{x:m,y:0,width:d,height:_})}else r.removeTextContent();r.setStyle(l),r.ensureState("emphasis").style=c,r.ensureState("blur").style=u,r.ensureState("select").style=p,Dd(r)}t.add(r)}function L(t,r){var a=Up(r);a.dataIndex=o.dataIndex,a.seriesIndex=e.seriesIndex;var n=Math.max(h-2*m,0),i=Math.max(f-2*m,0);if(r.culling=!0,r.setShape({x:m,y:m,width:n,height:i,r:T}),g)j(r);else{r.invisible=!1;var s=o.getVisual("style"),l=s.fill,c=iF(w);c.fill=l,c.decal=s.decal;var u=nF(S),p=nF(D),d=nF(C);F(r,l,s.opacity,null),r.setStyle(c),r.ensureState("emphasis").style=u,r.ensureState("blur").style=p,r.ensureState("select").style=d,Dd(r)}t.add(r)}function j(e){!e.invisible&&i.push(e)}function F(t,r,a,n){var i=d.getModel(n?eF:Qj),s=$l(d.get("name"),null),l=i.getShallow("show");yh(t,bh(d,n?eF:Qj),{defaultText:l?s:null,inheritColor:r,defaultOpacity:a,labelFetcher:e,labelDataIndex:o.dataIndex});var c=t.getTextContent();if(c){var p=c.style,h=Object(Sa["M"])(p.padding||0);n&&(t.setTextConfig({layoutRect:n}),c.disableLabelLayout=!0),c.beforeUpdate=function(){var e=Math.max((n?n.width:t.shape.width)-h[1]-h[3],0),r=Math.max((n?n.height:t.shape.height)-h[0]-h[2],0);p.width===e&&p.height===r||c.setStyle({width:e,height:r})},p.truncateMinChar=2,p.lineOverflow="truncate",V(p,n,u);var f=c.getState("emphasis");V(f?f.style:null,n,u)}}function V(t,r,a){var n=t?t.text:null;if(!r&&a.isLeafRoot&&null!=n){var i=e.get("drillDownIcon",!0);t.text=i?i+" "+n:n}}function z(e,a,i,o){var s=null!=y&&r[e][y],l=n[e];return s?(r[e][y]=null,B(l,s)):g||(s=new a,s instanceof tu&&(s.z2=uF(i,o)),$(l,s)),t[e][v]=s}function B(e,t){var r=e[v]={};t instanceof Zj?(r.oldX=t.x,r.oldY=t.y):r.oldShape=Object(Sa["m"])({},t.shape)}function $(e,t){var r=e[v]={},i=o.parentNode,s=t instanceof Bs;if(i&&(!a||"drillDown"===a.direction)){var l=0,c=0,u=n.background[i.getRawIndex()];!a&&u&&u.oldShape&&(l=u.oldShape.width,c=u.oldShape.height),s?(r.oldX=0,r.oldY=c):r.oldShape={x:l,y:c,width:0,height:0}}r.fadein=!s}}function uF(e,t){return e*tF+t}var pF=sF,dF=Sa["k"],hF=Sa["A"],fF=-1,mF=function(){function e(t){var r=t.mappingMethod,a=t.type,n=this.option=Sa["d"](t);this.type=a,this.mappingMethod=r,this._normalizeData=IF[r];var i=e.visualHandlers[a];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[r],"piecewise"===r?(yF(n),gF(n)):"category"===r?n.categories?vF(n):yF(n,!0):(Sa["b"]("linear"!==r||n.dataExtent),yF(n))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return Sa["c"](this._normalizeData,this)},e.listVisualTypes=function(){return Sa["F"](e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,r){Sa["A"](e)?Sa["k"](e,t,r):t.call(r,e)},e.mapVisual=function(t,r,a){var n,i=Sa["t"](t)?[]:Sa["A"](t)?{}:(n=!0,null);return e.eachVisual(t,(function(e,t){var o=r.call(a,e,t);n?i=o:i[t]=o})),i},e.retrieveVisuals=function(t){var r,a={};return t&&dF(e.visualHandlers,(function(e,n){t.hasOwnProperty(n)&&(a[n]=t[n],r=!0)})),r?a:null},e.prepareVisualTypes=function(e){if(Sa["t"](e))e=e.slice();else{if(!hF(e))return[];var t=[];dF(e,(function(e,r){t.push(r)})),e=t}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},e.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,r){for(var a,n=1/0,i=0,o=t.length;i<o;i++){var s=t[i].value;if(null!=s){if(s===e||Sa["C"](s)&&s===e+"")return i;r&&p(s,i)}}for(i=0,o=t.length;i<o;i++){var l=t[i],c=l.interval,u=l.close;if(c){if(c[0]===-1/0){if(OF(u[1],e,c[1]))return i}else if(c[1]===1/0){if(OF(u[0],c[0],e))return i}else if(OF(u[0],c[0],e)&&OF(u[1],e,c[1]))return i;r&&p(c[0],i),r&&p(c[1],i)}}if(r)return e===1/0?t.length-1:e===-1/0?0:a;function p(t,r){var i=Math.abs(t-e);i<n&&(n=i,a=r)}},e.visualHandlers={color:{applyVisual:xF("color"),getColorMapper:function(){var e=this.option;return Sa["c"]("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),wF.call(this,e)}:function(t,r,a){var n=!!a;return!r&&(t=this._normalizeData(t)),a=ro["a"](t,e.parsedVisual,a),n?a:ro["i"](a,"rgba")},this)},_normalizedToVisual:{linear:function(e){return ro["i"](ro["a"](e,this.option.parsedVisual),"rgba")},category:wF,piecewise:function(e,t){var r=CF.call(this,t);return null==r&&(r=ro["i"](ro["a"](e,this.option.parsedVisual),"rgba")),r},fixed:SF}},colorHue:bF((function(e,t){return ro["g"](e,t)})),colorSaturation:bF((function(e,t){return ro["g"](e,null,t)})),colorLightness:bF((function(e,t){return ro["g"](e,null,null,t)})),colorAlpha:bF((function(e,t){return ro["f"](e,t)})),decal:{applyVisual:xF("decal"),_normalizedToVisual:{linear:null,category:wF,piecewise:null,fixed:null}},opacity:{applyVisual:xF("opacity"),_normalizedToVisual:DF([0,1])},liftZ:{applyVisual:xF("liftZ"),_normalizedToVisual:{linear:SF,category:SF,piecewise:SF,fixed:SF}},symbol:{applyVisual:function(e,t,r){var a=this.mapValueToVisual(e);r("symbol",a)},_normalizedToVisual:{linear:_F,category:wF,piecewise:function(e,t){var r=CF.call(this,t);return null==r&&(r=_F.call(this,e)),r},fixed:SF}},symbolSize:{applyVisual:xF("symbolSize"),_normalizedToVisual:DF([0,1])}},e}();function gF(e){var t=e.pieceList;e.hasSpecialVisual=!1,Sa["k"](t,(function(t,r){t.originIndex=r,null!=t.visual&&(e.hasSpecialVisual=!0)}))}function vF(e){var t=e.categories,r=e.categoryMap={},a=e.visual;if(dF(t,(function(e,t){r[e]=t})),!Sa["t"](a)){var n=[];Sa["A"](a)?dF(a,(function(e,t){var a=r[t];n[null!=a?a:fF]=e})):n[fF]=a,a=TF(e,n)}for(var i=t.length-1;i>=0;i--)null==a[i]&&(delete r[t[i]],t.pop())}function yF(e,t){var r=e.visual,a=[];Sa["A"](r)?dF(r,(function(e){a.push(e)})):null!=r&&a.push(r);var n={color:1,symbol:1};t||1!==a.length||n.hasOwnProperty(e.type)||(a[1]=a[0]),TF(e,a)}function bF(e){return{applyVisual:function(t,r,a){var n=this.mapValueToVisual(t);a("color",e(r("color"),n))},_normalizedToVisual:DF([0,1])}}function _F(e){var t=this.option.visual;return t[Math.round(tl(e,[0,1],[0,t.length-1],!0))]||{}}function xF(e){return function(t,r,a){a(e,this.mapValueToVisual(t))}}function wF(e){var t=this.option.visual;return t[this.option.loop&&e!==fF?e%t.length:e]}function SF(){return this.option.visual[0]}function DF(e){return{linear:function(t){return tl(t,e,this.option.visual,!0)},category:wF,piecewise:function(t,r){var a=CF.call(this,r);return null==a&&(a=tl(t,e,this.option.visual,!0)),a},fixed:SF}}function CF(e){var t=this.option,r=t.pieceList;if(t.hasSpecialVisual){var a=mF.findPieceIndex(e,r),n=r[a];if(n&&n.visual)return n.visual[this.type]}}function TF(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=Sa["H"](t,(function(e){var t=ro["h"](e);return t||[0,0,0,1]}))),t}var IF={linear:function(e){return tl(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,r=mF.findPieceIndex(e,t,!0);if(null!=r)return tl(r,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?fF:t},fixed:Sa["L"]};function OF(e,t,r){return e?t<=r:t<r}var MF=mF,AF="itemStyle",kF=Zl(),PF={seriesType:"treemap",reset:function(e){var t=e.getData().tree,r=t.root;r.isRemoved()||NF(r,{},e.getViewRoot().getAncestors(),e)}};function NF(e,t,r,a){var n=e.getModel(),i=e.getLayout(),o=e.hostTree.data;if(i&&!i.invisible&&i.isInView){var s,l=n.getModel(AF),c=EF(l,t,a),u=o.ensureUniqueItemVisual(e.dataIndex,"style"),p=l.get("borderColor"),d=l.get("borderColorSaturation");null!=d&&(s=RF(c),p=LF(d,s)),u.stroke=p;var h=e.viewChildren;if(h&&h.length){var f=FF(e,n,i,l,c,h);Object(Sa["k"])(h,(function(e,t){if(e.depth>=r.length||e===r[e.depth]){var i=zF(n,c,e,t,f,a);NF(e,i,r,a)}}))}else s=RF(c),u.fill=s}}function EF(e,t,r){var a=Object(Sa["m"])({},t),n=r.designatedVisualItemStyle;return Object(Sa["k"])(["color","colorAlpha","colorSaturation"],(function(r){n[r]=t[r];var i=e.get(r);n[r]=null,null!=i&&(a[r]=i)})),a}function RF(e){var t=jF(e,"color");if(t){var r=jF(e,"colorAlpha"),a=jF(e,"colorSaturation");return a&&(t=Object(ro["g"])(t,null,null,a)),r&&(t=Object(ro["f"])(t,r)),t}}function LF(e,t){return null!=t?Object(ro["g"])(t,null,null,e):null}function jF(e,t){var r=e[t];if(null!=r&&"none"!==r)return r}function FF(e,t,r,a,n,i){if(i&&i.length){var o=VF(t,"color")||null!=n.color&&"none"!==n.color&&(VF(t,"colorAlpha")||VF(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),c=r.dataExtent.slice();null!=s&&s<c[0]&&(c[0]=s),null!=l&&l>c[1]&&(c[1]=l);var u=t.get("colorMappingBy"),p={type:o.name,dataExtent:c,visual:o.range};"color"!==p.type||"index"!==u&&"id"!==u?p.mappingMethod="linear":(p.mappingMethod="category",p.loop=!0);var d=new MF(p);return kF(d).drColorMappingBy=u,d}}}function VF(e,t){var r=e.get(t);return Object(Sa["t"])(r)&&r.length?{name:t,range:r}:null}function zF(e,t,r,a,n,i){var o=Object(Sa["m"])({},t);if(n){var s=n.type,l="color"===s&&kF(n).drColorMappingBy,c="index"===l?a:"id"===l?i.mapIdToIndex(r.getId()):r.getValue(e.get("visualDimension"));o[s]=n.mapValueToVisual(c)}return o}var BF=Math.max,$F=Math.min,GF=Sa["O"],UF=Sa["k"],WF=["itemStyle","borderWidth"],HF=["itemStyle","gapWidth"],qF=["upperLabel","show"],YF=["upperLabel","height"],XF={seriesType:"treemap",reset:function(e,t,r,a){var n=r.getWidth(),i=r.getHeight(),o=e.option,s=nm(e.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),l=o.size||[],c=rl(GF(s.width,l[0]),n),u=rl(GF(s.height,l[1]),i),p=a&&a.type,d=["treemapZoomToNode","treemapRootToNode"],h=xj(a,d,e),f="treemapRender"===p||"treemapMove"===p?a.rootRect:null,m=e.getViewRoot(),g=wj(m);if("treemapMove"!==p){var v="treemapZoomToNode"===p?aV(e,h,m,c,u):f?[f.width,f.height]:[c,u],y=o.sort;y&&"asc"!==y&&"desc"!==y&&(y="desc");var b={squareRatio:o.squareRatio,sort:y,leafDepth:o.leafDepth};m.hostTree.clearLayouts();var _={x:0,y:0,width:v[0],height:v[1],area:v[0]*v[1]};m.setLayout(_),ZF(m,b,!1,0),_=m.getLayout(),UF(g,(function(e,t){var r=(g[t+1]||m).getValue();e.setLayout(Sa["m"]({dataExtent:[r,r],borderWidth:0,upperHeight:0},_))}))}var x=e.getData().tree.root;x.setLayout(nV(s,f,h),!0),e.setLayoutInfo(s),iV(x,new Hn(-s.x,-s.y,n,i),g,m,0)}};function ZF(e,t,r,a){var n,i;if(!e.isRemoved()){var o=e.getLayout();n=o.width,i=o.height;var s=e.getModel(),l=s.get(WF),c=s.get(HF)/2,u=oV(s),p=Math.max(l,u),d=l-c,h=p-c;e.setLayout({borderWidth:l,upperHeight:p,upperLabelHeight:u},!0),n=BF(n-2*d,0),i=BF(i-d-h,0);var f=n*i,m=KF(e,s,f,t,r,a);if(m.length){var g={x:d,y:h,width:n,height:i},v=$F(n,i),y=1/0,b=[];b.area=0;for(var _=0,x=m.length;_<x;){var w=m[_];b.push(w),b.area+=w.getLayout().area;var S=tV(b,v,t.squareRatio);S<=y?(_++,y=S):(b.area-=b.pop().getLayout().area,rV(b,v,g,c,!1),v=$F(g.width,g.height),b.length=b.area=0,y=1/0)}if(b.length&&rV(b,v,g,c,!0),!r){var D=s.get("childrenVisibleMin");null!=D&&f<D&&(r=!0)}for(_=0,x=m.length;_<x;_++)ZF(m[_],t,r,a+1)}}}function KF(e,t,r,a,n,i){var o=e.children||[],s=a.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=a.leafDepth&&a.leafDepth<=i;if(n&&!l)return e.viewChildren=[];o=Sa["n"](o,(function(e){return!e.isRemoved()})),QF(o,s);var c=eV(t,o,s);if(0===c.sum)return e.viewChildren=[];if(c.sum=JF(t,r,c.sum,s,o),0===c.sum)return e.viewChildren=[];for(var u=0,p=o.length;u<p;u++){var d=o[u].getValue()/c.sum*r;o[u].setLayout({area:d})}return l&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:c.dataExtent},!0),o}function JF(e,t,r,a,n){if(!a)return r;for(var i=e.get("visibleMin"),o=n.length,s=o,l=o-1;l>=0;l--){var c=n["asc"===a?o-l-1:l].getValue();c/r*t<i&&(s=l,r-=c)}return"asc"===a?n.splice(0,o-s):n.splice(s,o-s),r}function QF(e,t){return t&&e.sort((function(e,r){var a="asc"===t?e.getValue()-r.getValue():r.getValue()-e.getValue();return 0===a?"asc"===t?e.dataIndex-r.dataIndex:r.dataIndex-e.dataIndex:a})),e}function eV(e,t,r){for(var a=0,n=0,i=t.length;n<i;n++)a+=t[n].getValue();var o,s=e.get("visualDimension");return t&&t.length?"value"===s&&r?(o=[t[t.length-1].getValue(),t[0].getValue()],"asc"===r&&o.reverse()):(o=[1/0,-1/0],UF(t,(function(e){var t=e.getValue(s);t<o[0]&&(o[0]=t),t>o[1]&&(o[1]=t)}))):o=[NaN,NaN],{sum:a,dataExtent:o}}function tV(e,t,r){for(var a=0,n=1/0,i=0,o=void 0,s=e.length;i<s;i++)o=e[i].getLayout().area,o&&(o<n&&(n=o),o>a&&(a=o));var l=e.area*e.area,c=t*t*r;return l?BF(c*a/l,l/(c*n)):1/0}function rV(e,t,r,a,n){var i=t===r.width?0:1,o=1-i,s=["x","y"],l=["width","height"],c=r[s[i]],u=t?e.area/t:0;(n||u>r[l[o]])&&(u=r[l[o]]);for(var p=0,d=e.length;p<d;p++){var h=e[p],f={},m=u?h.getLayout().area/u:0,g=f[l[o]]=BF(u-2*a,0),v=r[s[i]]+r[l[i]]-c,y=p===d-1||v<m?v:m,b=f[l[i]]=BF(y-2*a,0);f[s[o]]=r[s[o]]+$F(a,g/2),f[s[i]]=c+$F(a,b/2),c+=y,h.setLayout(f,!0)}r[s[o]]+=u,r[l[o]]-=u}function aV(e,t,r,a,n){var i,o=(t||{}).node,s=[a,n];if(!o||o===r)return s;var l=a*n,c=l*e.option.zoomToNodeRatio;while(i=o.parentNode){for(var u=0,p=i.children,d=0,h=p.length;d<h;d++)u+=p[d].getValue();var f=o.getValue();if(0===f)return s;c*=u/f;var m=i.getModel(),g=m.get(WF),v=Math.max(g,oV(m));c+=4*g*g+(3*g+v)*Math.pow(c,.5),c>ul&&(c=ul),o=i}c<l&&(c=l);var y=Math.pow(c/l,.5);return[a*y,n*y]}function nV(e,t,r){if(t)return{x:t.x,y:t.y};var a={x:0,y:0};if(!r)return a;var n=r.node,i=n.getLayout();if(!i)return a;var o=[i.width/2,i.height/2],s=n;while(s){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}function iV(e,t,r,a,n){var i=e.getLayout(),o=r[n],s=o&&o===e;if(!(o&&!s||n===r.length&&e!==a)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(i),isAboveViewRoot:s},!0);var l=new Hn(t.x-i.x,t.y-i.y,t.width,t.height);UF(e.viewChildren||[],(function(e){iV(e,l,r,a,n+1)}))}}function oV(e){return e.get(qF)?e.get(YF):0}function sV(e){e.registerSeriesModel(zj),e.registerChartView(pF),e.registerVisual(PF),e.registerLayout(XF),Rj(e)}function lV(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.eachSeriesByType("graph",(function(e){var r=e.getCategoriesData(),a=e.getGraph(),n=a.data,i=r.mapArray(r.getName);n.filterSelf((function(e){var r=n.getItemModel(e),a=r.getShallow("category");if(null!=a){Object(Sa["z"])(a)&&(a=i[a]);for(var o=0;o<t.length;o++)if(!t[o].isSelected(a))return!1}return!0}))}))}function cV(e){var t={};e.eachSeriesByType("graph",(function(e){var r=e.getCategoriesData(),a=e.getData(),n={};r.each((function(a){var i=r.getName(a);n["ec-"+i]=a;var o=r.getItemModel(a),s=o.getModel("itemStyle").getItemStyle();s.fill||(s.fill=e.getColorFromPalette(i,t)),r.setItemVisual(a,"style",s);for(var l=["symbol","symbolSize","symbolKeepAspect"],c=0;c<l.length;c++){var u=o.getShallow(l[c],!0);null!=u&&r.setItemVisual(a,l[c],u)}})),r.count()&&a.each((function(e){var t=a.getItemModel(e),i=t.getShallow("category");if(null!=i){Object(Sa["C"])(i)&&(i=n["ec-"+i]);var o=r.getItemVisual(i,"style"),s=a.ensureUniqueItemVisual(e,"style");Object(Sa["m"])(s,o);for(var l=["symbol","symbolSize","symbolKeepAspect"],c=0;c<l.length;c++)a.setItemVisual(e,l[c],r.getItemVisual(i,l[c]))}}))}))}function uV(e){return e instanceof Array||(e=[e,e]),e}function pV(e){e.eachSeriesByType("graph",(function(e){var t=e.getGraph(),r=e.getEdgeData(),a=uV(e.get("edgeSymbol")),n=uV(e.get("edgeSymbolSize"));r.setVisual("fromSymbol",a&&a[0]),r.setVisual("toSymbol",a&&a[1]),r.setVisual("fromSymbolSize",n&&n[0]),r.setVisual("toSymbolSize",n&&n[1]),r.setVisual("style",e.getModel("lineStyle").getLineStyle()),r.each((function(e){var a=r.getItemModel(e),n=t.getEdgeByIndex(e),i=uV(a.getShallow("symbol",!0)),o=uV(a.getShallow("symbolSize",!0)),s=a.getModel("lineStyle").getLineStyle(),l=r.ensureUniqueItemVisual(e,"style");switch(Object(Sa["m"])(l,s),l.stroke){case"source":var c=n.node1.getVisual("style");l.stroke=c&&c.fill;break;case"target":c=n.node2.getVisual("style");l.stroke=c&&c.fill;break}i[0]&&n.setVisual("fromSymbol",i[0]),i[1]&&n.setVisual("toSymbol",i[1]),o[0]&&n.setVisual("fromSymbolSize",o[0]),o[1]&&n.setVisual("toSymbolSize",o[1])}))}))}var dV="--\x3e",hV=function(e){return e.get("autoCurveness")||null},fV=function(e,t){var r=hV(e),a=20,n=[];if(Sa["z"](r))a=r;else if(Sa["t"](r))return void(e.__curvenessList=r);t>a&&(a=t);var i=a%2?a+2:a+3;n=[];for(var o=0;o<i;o++)n.push((o%2?o+1:o)/10*(o%2?-1:1));e.__curvenessList=n},mV=function(e,t,r){var a=[e.id,e.dataIndex].join("."),n=[t.id,t.dataIndex].join(".");return[r.uid,a,n].join(dV)},gV=function(e){var t=e.split(dV);return[t[0],t[2],t[1]].join(dV)},vV=function(e,t){var r=mV(e.node1,e.node2,t);return t.__edgeMap[r]},yV=function(e,t){var r=bV(mV(e.node1,e.node2,t),t),a=bV(mV(e.node2,e.node1,t),t);return r+a},bV=function(e,t){var r=t.__edgeMap;return r[e]?r[e].length:0};function _V(e){hV(e)&&(e.__curvenessList=[],e.__edgeMap={},fV(e))}function xV(e,t,r,a){if(hV(r)){var n=mV(e,t,r),i=r.__edgeMap,o=i[gV(n)];i[n]&&!o?i[n].isForward=!0:o&&i[n]&&(o.isForward=!0,i[n].isForward=!1),i[n]=i[n]||[],i[n].push(a)}}function wV(e,t,r,a){var n=hV(t),i=Sa["t"](n);if(!n)return null;var o=vV(e,t);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===r){s=l;break}var c=yV(e,t);fV(t,c),e.lineStyle=e.lineStyle||{};var u=mV(e.node1,e.node2,t),p=t.__curvenessList,d=i||c%2?0:1;if(o.isForward)return p[d+s];var h=gV(u),f=bV(h,t),m=p[s+f+d];return a?i?n&&0===n[0]?(f+d)%2?m:-m:((f%2?0:1)+d)%2?m:-m:(f+d)%2?m:-m:p[s+f+d]}function SV(e){var t=e.coordinateSystem;if(!t||"view"===t.type){var r=e.getGraph();r.eachNode((function(e){var t=e.getModel();e.setLayout([+t.get("x"),+t.get("y")])})),DV(r,e)}}function DV(e,t){e.eachEdge((function(e,r){var a=Sa["Q"](e.getModel().get(["lineStyle","curveness"]),-wV(e,t,r,!0),0),n=Oa(e.node1.getLayout()),i=Oa(e.node2.getLayout()),o=[n,i];+a&&o.push([(n[0]+i[0])/2-(n[1]-i[1])*a,(n[1]+i[1])/2-(i[0]-n[0])*a]),e.setLayout(o)}))}function CV(e,t){e.eachSeriesByType("graph",(function(e){var t=e.get("layout"),r=e.coordinateSystem;if(r&&"view"!==r.type){var a=e.getData(),n=[];Object(Sa["k"])(r.dimensions,(function(e){n=n.concat(a.mapDimensionsAll(e))}));for(var i=0;i<a.count();i++){for(var o=[],s=!1,l=0;l<n.length;l++){var c=a.get(n[l],i);isNaN(c)||(s=!0),o.push(c)}s?a.setItemLayout(i,r.dataToPoint(o)):a.setItemLayout(i,[NaN,NaN])}DV(a.graph,e)}else t&&"none"!==t||SV(e)}))}function TV(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var r=e.option.nodeScaleRatio,a=t.scaleX,n=t.getZoom(),i=(n-1)*r+1;return i/a}function IV(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var OV=Math.PI,MV=[];function AV(e,t,r,a){var n=e.coordinateSystem;if(!n||"view"===n.type){var i=n.getBoundingRect(),o=e.getData(),s=o.graph,l=i.width/2+i.x,c=i.height/2+i.y,u=Math.min(i.width,i.height)/2,p=o.count();if(o.setLayout({cx:l,cy:c}),p){if(r){var d=n.pointToData(a),h=d[0],f=d[1],m=[h-l,f-c];La(m,m),Ra(m,m,u),r.setLayout([l+m[0],c+m[1]],!0);var g=e.get(["circular","rotateLabel"]);PV(r,g,l,c)}kV[t](e,s,o,u,l,c,p),s.eachEdge((function(t,r){var a,n=Sa["Q"](t.getModel().get(["lineStyle","curveness"]),wV(t,e,r),0),i=Oa(t.node1.getLayout()),o=Oa(t.node2.getLayout()),s=(i[0]+o[0])/2,u=(i[1]+o[1])/2;+n&&(n*=3,a=[l*n+s*(1-n),c*n+u*(1-n)]),t.setLayout([i,o,a])}))}}}var kV={value:function(e,t,r,a,n,i,o){var s=0,l=r.getSum("value"),c=2*Math.PI/(l||o);t.eachNode((function(e){var t=e.getValue("value"),r=c*(l?t:1)/2;s+=r,e.setLayout([a*Math.cos(s)+n,a*Math.sin(s)+i]),s+=r}))},symbolSize:function(e,t,r,a,n,i,o){var s=0;MV.length=o;var l=TV(e);t.eachNode((function(e){var t=IV(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=l;var r=Math.asin(t/2/a);isNaN(r)&&(r=OV/2),MV[e.dataIndex]=r,s+=2*r}));var c=(2*OV-s)/o/2,u=0;t.eachNode((function(e){var t=c+MV[e.dataIndex];u+=t,(!e.getLayout()||!e.getLayout().fixed)&&e.setLayout([a*Math.cos(u)+n,a*Math.sin(u)+i]),u+=t}))}};function PV(e,t,r,a){var n=e.getGraphicEl();if(n){var i=e.getModel(),o=i.get(["label","rotate"])||0,s=n.getSymbolPath();if(t){var l=e.getLayout(),c=Math.atan2(l[1]-a,l[0]-r);c<0&&(c=2*Math.PI+c);var u=l[0]<r;u&&(c-=Math.PI);var p=u?"left":"right";s.setTextConfig({rotation:-c,position:p,origin:"center"});var d=s.ensureState("emphasis");Sa["m"](d.textConfig||(d.textConfig={}),{position:p})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function NV(e){e.eachSeriesByType("graph",(function(e){"circular"===e.get("layout")&&AV(e,"symbolSize")}))}var EV=ka;function RV(e,t,r){for(var a=e,n=t,i=r.rect,o=i.width,s=i.height,l=[i.x+o/2,i.y+s/2],c=null==r.gravity?.1:r.gravity,u=0;u<a.length;u++){var p=a[u];p.p||(p.p=Ta(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),p.pp=Oa(p.p),p.edges=null}var d,h,f=null==r.friction?.6:r.friction,m=f;return{warmUp:function(){m=.8*f},setFixed:function(e){a[e].fixed=!0},setUnfixed:function(e){a[e].fixed=!1},beforeStep:function(e){d=e},afterStep:function(e){h=e},step:function(e){d&&d(a,n);for(var t=[],r=a.length,i=0;i<n.length;i++){var o=n[i];if(!o.ignoreForceLayout){var s=o.n1,u=o.n2;Pa(t,u.p,s.p);var p=Na(t)-o.d,f=u.w/(s.w+u.w);isNaN(f)&&(f=0),La(t,t),!s.fixed&&EV(s.p,s.p,t,f*p*m),!u.fixed&&EV(u.p,u.p,t,-(1-f)*p*m)}}for(i=0;i<r;i++){var g=a[i];g.fixed||(Pa(t,l,g.p),EV(g.p,g.p,t,c*m))}for(i=0;i<r;i++){s=a[i];for(var v=i+1;v<r;v++){u=a[v];Pa(t,u.p,s.p);p=Na(t);0===p&&(Ma(t,Math.random()-.5,Math.random()-.5),p=1);var y=(s.rep+u.rep)/p/p;!s.fixed&&EV(s.pp,s.pp,t,y),!u.fixed&&EV(u.pp,u.pp,t,-y)}}var b=[];for(i=0;i<r;i++){g=a[i];g.fixed||(Pa(b,g.p,g.pp),EV(g.p,g.p,b,m),Ia(g.pp,g.p))}m*=.992;var _=m<.01;h&&h(a,n,_),e&&e(_)}}}function LV(e){e.eachSeriesByType("graph",(function(e){var t=e.coordinateSystem;if(!t||"view"===t.type)if("force"===e.get("layout")){var r=e.preservedPoints||{},a=e.getGraph(),n=a.data,i=a.edgeData,o=e.getModel("force"),s=o.get("initLayout");e.preservedPoints?n.each((function(e){var t=n.getId(e);n.setItemLayout(e,r[t]||[NaN,NaN])})):s&&"none"!==s?"circular"===s&&AV(e,"value"):SV(e);var l=n.getDataExtent("value"),c=i.getDataExtent("value"),u=o.get("repulsion"),p=o.get("edgeLength"),d=Sa["t"](u)?u:[u,u],h=Sa["t"](p)?p:[p,p];h=[h[1],h[0]];var f=n.mapArray("value",(function(e,t){var r=n.getItemLayout(t),a=tl(e,l,d);return isNaN(a)&&(a=(d[0]+d[1])/2),{w:a,rep:a,fixed:n.getItemModel(t).get("fixed"),p:!r||isNaN(r[0])||isNaN(r[1])?null:r}})),m=i.mapArray("value",(function(t,r){var n=a.getEdgeByIndex(r),i=tl(t,c,h);isNaN(i)&&(i=(h[0]+h[1])/2);var o=n.getModel(),s=Sa["Q"](n.getModel().get(["lineStyle","curveness"]),-wV(n,e,r,!0),0);return{n1:f[n.node1.dataIndex],n2:f[n.node2.dataIndex],d:i,curveness:s,ignoreForceLayout:o.get("ignoreForceLayout")}})),g=t.getBoundingRect(),v=RV(f,m,{rect:g,gravity:o.get("gravity"),friction:o.get("friction")});v.beforeStep((function(e,t){for(var r=0,n=e.length;r<n;r++)e[r].fixed&&Ia(e[r].p,a.getNodeByIndex(r).getLayout())})),v.afterStep((function(e,t,i){for(var o=0,s=e.length;o<s;o++)e[o].fixed||a.getNodeByIndex(o).setLayout(e[o].p),r[n.getId(o)]=e[o].p;for(o=0,s=t.length;o<s;o++){var l=t[o],c=a.getEdgeByIndex(o),u=l.n1.p,p=l.n2.p,d=c.getLayout();d=d?d.slice():[],d[0]=d[0]||[],d[1]=d[1]||[],Ia(d[0],u),Ia(d[1],p),+l.curveness&&(d[2]=[(u[0]+p[0])/2-(u[1]-p[1])*l.curveness,(u[1]+p[1])/2-(p[0]-u[0])*l.curveness]),c.setLayout(d)}})),e.forceLayout=v,e.preservedPoints=r,v.step()}else e.forceLayout=null}))}function jV(e,t,r){var a=Object(Sa["m"])(e.getBoxLayoutParams(),{aspect:r});return nm(a,{width:t.getWidth(),height:t.getHeight()})}function FV(e,t){var r=[];return e.eachSeriesByType("graph",(function(e){var a=e.get("coordinateSystem");if(!a||"view"===a){var n=e.getData(),i=n.mapArray((function(e){var t=n.getItemModel(e);return[+t.get("x"),+t.get("y")]})),o=[],s=[];uu(i,o,s),s[0]-o[0]===0&&(s[0]+=1,o[0]-=1),s[1]-o[1]===0&&(s[1]+=1,o[1]-=1);var l=(s[0]-o[0])/(s[1]-o[1]),c=jV(e,t,l);isNaN(l)&&(o=[c.x,c.y],s=[c.x+c.width,c.y+c.height]);var u=s[0]-o[0],p=s[1]-o[1],d=c.width,h=c.height,f=e.coordinateSystem=new gL;f.zoomLimit=e.get("scaleLimit"),f.setBoundingRect(o[0],o[1],u,p),f.setViewRect(c.x,c.y,d,h),f.setCenter(e.get("center"),t),f.setZoom(e.get("zoom")),r.push(f)}})),r}var VV=Jb.prototype,zV=a_.prototype,BV=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}();(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xa(t,e)})(BV);function $V(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var GV=function(e){function t(t){var r=e.call(this,t)||this;return r.type="ec-line",r}return xa(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new BV},t.prototype.buildPath=function(e,t){$V(t)?VV.buildPath.call(this,e,t):zV.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return $V(this.shape)?VV.pointAt.call(this,e):zV.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,r=$V(t)?[t.x2-t.x1,t.y2-t.y1]:zV.tangentAt.call(this,e);return La(r,r)},t}(lp),UV=GV,WV=["fromSymbol","toSymbol"];function HV(e){return"_"+e+"Type"}function qV(e,t,r){var a=t.getItemVisual(r,e);if(!a||"none"===a)return a;var n=t.getItemVisual(r,e+"Size"),i=t.getItemVisual(r,e+"Rotate"),o=t.getItemVisual(r,e+"Offset"),s=t.getItemVisual(r,e+"KeepAspect"),l=Dw(n),c=Cw(o||0,l);return a+l+c+(i||"")+(s||"")}function YV(e,t,r){var a=t.getItemVisual(r,e);if(a&&"none"!==a){var n=t.getItemVisual(r,e+"Size"),i=t.getItemVisual(r,e+"Rotate"),o=t.getItemVisual(r,e+"Offset"),s=t.getItemVisual(r,e+"KeepAspect"),l=Dw(n),c=Cw(o||0,l),u=Sw(a,-l[0]/2+c[0],-l[1]/2+c[1],l[0],l[1],null,s);return u.__specifiedRotation=null==i||isNaN(i)?void 0:+i*Math.PI/180||0,u.name=e,u}}function XV(e){var t=new UV({name:"line",subPixelOptimize:!0});return ZV(t.shape,e),t}function ZV(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var r=t[2];r?(e.cpx1=r[0],e.cpy1=r[1]):(e.cpx1=NaN,e.cpy1=NaN)}var KV=function(e){function t(t,r,a){var n=e.call(this)||this;return n._createLine(t,r,a),n}return xa(t,e),t.prototype._createLine=function(e,t,r){var a=e.hostModel,n=e.getItemLayout(t),i=XV(n);i.shape.percent=0,lh(i,{shape:{percent:1}},a,t),this.add(i),Object(Sa["k"])(WV,(function(r){var a=YV(r,e,t);this.add(a),this[HV(r)]=qV(r,e,t)}),this),this._updateCommonStl(e,t,r)},t.prototype.updateData=function(e,t,r){var a=e.hostModel,n=this.childOfName("line"),i=e.getItemLayout(t),o={shape:{}};ZV(o.shape,i),sh(n,o,a,t),Object(Sa["k"])(WV,(function(r){var a=qV(r,e,t),n=HV(r);if(this[n]!==a){this.remove(this.childOfName(r));var i=YV(r,e,t);this.add(i)}this[n]=a}),this),this._updateCommonStl(e,t,r)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,t,r){var a=e.hostModel,n=this.childOfName("line"),i=r&&r.emphasisLineStyle,o=r&&r.blurLineStyle,s=r&&r.selectLineStyle,l=r&&r.labelStatesModels,c=r&&r.emphasisDisabled,u=r&&r.focus,p=r&&r.blurScope;if(!r||e.hasItemOption){var d=e.getItemModel(t),h=d.getModel("emphasis");i=h.getModel("lineStyle").getLineStyle(),o=d.getModel(["blur","lineStyle"]).getLineStyle(),s=d.getModel(["select","lineStyle"]).getLineStyle(),c=h.get("disabled"),u=h.get("focus"),p=h.get("blurScope"),l=bh(d)}var f=e.getItemVisual(t,"style"),m=f.stroke;n.useStyle(f),n.style.fill=null,n.style.strokeNoScale=!0,n.ensureState("emphasis").style=i,n.ensureState("blur").style=o,n.ensureState("select").style=s,Object(Sa["k"])(WV,(function(e){var t=this.childOfName(e);if(t){t.setColor(m),t.style.opacity=f.opacity;for(var r=0;r<Qp.length;r++){var a=Qp[r],i=n.getState(a);if(i){var o=i.style||{},s=t.ensureState(a),l=s.style||(s.style={});null!=o.stroke&&(l[t.__isEmptyBrush?"stroke":"fill"]=o.stroke),null!=o.opacity&&(l.opacity=o.opacity)}}t.markRedraw()}}),this);var g=a.getRawValue(t);yh(this,l,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,r){return a.getFormattedLabel(t,r,e.dataType)}},inheritColor:m||"#000",defaultOpacity:f.opacity,defaultText:(null==g?e.getName(t):isFinite(g)?al(g):g)+""});var v=this.getTextContent();if(v){var y=l.normal;v.__align=v.style.align,v.__verticalAlign=v.style.verticalAlign,v.__position=y.get("position")||"middle";var b=y.get("distance");Object(Sa["t"])(b)||(b=[b,b]),v.__labelDistance=b}this.setTextConfig({position:null,local:!0,inside:!1}),Hd(this,u,p,c)},t.prototype.highlight=function(){Id(this)},t.prototype.downplay=function(){Od(this)},t.prototype.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName("line");ZV(t.shape,e),t.dirty()},t.prototype.beforeUpdate=function(){var e=this,t=e.childOfName("fromSymbol"),r=e.childOfName("toSymbol"),a=e.getTextContent();if(t||r||a&&!a.ignore){var n=1,i=this.parent;while(i)i.scaleX&&(n/=i.scaleX),i=i.parent;var o=e.childOfName("line");if(this.__dirty||o.__dirty){var s=o.shape.percent,l=o.pointAt(0),c=o.pointAt(s),u=Pa([],c,l);if(La(u,u),t&&(t.setPosition(l),S(t,0),t.scaleX=t.scaleY=n*s,t.markRedraw()),r&&(r.setPosition(c),S(r,1),r.scaleX=r.scaleY=n*s,r.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var p=void 0,d=void 0,h=a.__labelDistance,f=h[0]*n,m=h[1]*n,g=s/2,v=o.tangentAt(g),y=[v[1],-v[0]],b=o.pointAt(g);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var _=v[0]<0?-1:1;if("start"!==a.__position&&"end"!==a.__position){var x=-Math.atan2(v[1],v[0]);c[0]<l[0]&&(x=Math.PI+x),a.rotation=x}var w=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":w=-m,d="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":w=m,d="top";break;default:w=0,d="middle"}switch(a.__position){case"end":a.x=u[0]*f+c[0],a.y=u[1]*m+c[1],p=u[0]>.8?"left":u[0]<-.8?"right":"center",d=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";break;case"start":a.x=-u[0]*f+l[0],a.y=-u[1]*m+l[1],p=u[0]>.8?"right":u[0]<-.8?"left":"center",d=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=f*_+l[0],a.y=l[1]+w,p=v[0]<0?"right":"left",a.originX=-f*_,a.originY=-w;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=b[0],a.y=b[1]+w,p="center",a.originY=-w;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-f*_+c[0],a.y=c[1]+w,p=v[0]>=0?"right":"left",a.originX=f*_,a.originY=-w;break}a.scaleX=a.scaleY=n,a.setStyle({verticalAlign:a.__verticalAlign||d,align:a.__align||p})}}}function S(e,t){var r=e.__specifiedRotation;if(null==r){var a=o.tangentAt(t);e.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(a[1],a[0]))}else e.attr("rotation",r)}},t}(Bs),JV=KV,QV=function(){function e(e){this.group=new Bs,this._LineCtor=e||JV}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var r=this,a=r.group,n=r._lineData;r._lineData=e,n||a.removeAll();var i=tz(e);e.diff(n).add((function(r){t._doAdd(e,r,i)})).update((function(r,a){t._doUpdate(n,e,a,r,i)})).remove((function(e){a.remove(n.getItemGraphicEl(e))})).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl((function(t,r){t.updateLayout(e,r)}),this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=tz(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t){function r(e){e.isGroup||ez(e)||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var a=e.start;a<e.end;a++){var n=t.getItemLayout(a);if(az(n)){var i=new this._LineCtor(t,a,this._seriesScope);i.traverse(r),this.group.add(i),t.setItemGraphicEl(a,i),this._progressiveEls.push(i)}}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){tx(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,r){var a=e.getItemLayout(t);if(az(a)){var n=new this._LineCtor(e,t,r);e.setItemGraphicEl(t,n),this.group.add(n)}},e.prototype._doUpdate=function(e,t,r,a,n){var i=e.getItemGraphicEl(r);az(t.getItemLayout(a))?(i?i.updateData(t,a,n):i=new this._LineCtor(t,a,n),t.setItemGraphicEl(a,i),this.group.add(i)):this.group.remove(i)},e}();function ez(e){return e.animators&&e.animators.length>0}function tz(e){var t=e.hostModel,r=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:bh(t)}}function rz(e){return isNaN(e[0])||isNaN(e[1])}function az(e){return e&&!rz(e[0])&&!rz(e[1])}var nz=QV,iz=[],oz=[],sz=[],lz=Wi,cz=za,uz=Math.abs;function pz(e,t,r){for(var a,n=e[0],i=e[1],o=e[2],s=1/0,l=r*r,c=.1,u=.1;u<=.9;u+=.1){iz[0]=lz(n[0],i[0],o[0],u),iz[1]=lz(n[1],i[1],o[1],u);var p=uz(cz(iz,t)-l);p<s&&(s=p,a=u)}for(var d=0;d<32;d++){var h=a+c;oz[0]=lz(n[0],i[0],o[0],a),oz[1]=lz(n[1],i[1],o[1],a),sz[0]=lz(n[0],i[0],o[0],h),sz[1]=lz(n[1],i[1],o[1],h);p=cz(oz,t)-l;if(uz(p)<.01)break;var f=cz(sz,t)-l;c/=2,p<0?f>=0?a+=c:a-=c:f>=0?a-=c:a+=c}return a}function dz(e,t){var r=[],a=Xi,n=[[],[],[]],i=[[],[]],o=[];t/=2,e.eachEdge((function(e,s){var l=e.getLayout(),c=e.getVisual("fromSymbol"),u=e.getVisual("toSymbol");l.__original||(l.__original=[Oa(l[0]),Oa(l[1])],l[2]&&l.__original.push(Oa(l[2])));var p=l.__original;if(null!=l[2]){if(Ia(n[0],p[0]),Ia(n[1],p[2]),Ia(n[2],p[1]),c&&"none"!==c){var d=IV(e.node1),h=pz(n,p[0],d*t);a(n[0][0],n[1][0],n[2][0],h,r),n[0][0]=r[3],n[1][0]=r[4],a(n[0][1],n[1][1],n[2][1],h,r),n[0][1]=r[3],n[1][1]=r[4]}if(u&&"none"!==u){d=IV(e.node2),h=pz(n,p[1],d*t);a(n[0][0],n[1][0],n[2][0],h,r),n[1][0]=r[1],n[2][0]=r[2],a(n[0][1],n[1][1],n[2][1],h,r),n[1][1]=r[1],n[2][1]=r[2]}Ia(l[0],n[0]),Ia(l[1],n[2]),Ia(l[2],n[1])}else{if(Ia(i[0],p[0]),Ia(i[1],p[1]),Pa(o,i[1],i[0]),La(o,o),c&&"none"!==c){d=IV(e.node1);ka(i[0],i[0],o,d*t)}if(u&&"none"!==u){d=IV(e.node2);ka(i[1],i[1],o,-d*t)}Ia(l[0],i[0]),Ia(l[1],i[1])}}))}function hz(e){return"view"===e.type}var fz=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.init=function(e,t){var r=new BO,a=new nz,n=this.group;this._controller=new kE(t.getZr()),this._controllerHost={target:n},n.add(r.group),n.add(a.group),this._symbolDraw=r,this._lineDraw=a,this._firstRender=!0},t.prototype.render=function(e,t,r){var a=this,n=e.coordinateSystem;this._model=e;var i=this._symbolDraw,o=this._lineDraw,s=this.group;if(hz(n)){var l={x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY};this._firstRender?s.attr(l):sh(s,l,e)}dz(e.getGraph(),TV(e));var c=e.getData();i.updateData(c);var u=e.getEdgeData();o.updateData(u),this._updateNodeAndLinkScale(),this._updateController(e,t,r),clearTimeout(this._layoutTimeout);var p=e.forceLayout,d=e.get(["force","layoutAnimation"]);p&&this._startForceLayoutIteration(p,d);var h=e.get("layout");c.graph.eachNode((function(t){var r=t.dataIndex,n=t.getGraphicEl(),i=t.getModel();if(n){n.off("drag").off("dragend");var o=i.get("draggable");o&&n.on("drag",(function(i){switch(h){case"force":p.warmUp(),!a._layouting&&a._startForceLayoutIteration(p,d),p.setFixed(r),c.setItemLayout(r,[n.x,n.y]);break;case"circular":c.setItemLayout(r,[n.x,n.y]),t.setLayout({fixed:!0},!0),AV(e,"symbolSize",t,[i.offsetX,i.offsetY]),a.updateLayout(e);break;case"none":default:c.setItemLayout(r,[n.x,n.y]),DV(e.getGraph(),e),a.updateLayout(e);break}})).on("dragend",(function(){p&&p.setUnfixed(r)})),n.setDraggable(o,!!i.get("cursor"));var s=i.get(["emphasis","focus"]);"adjacency"===s&&(Up(n).focus=t.getAdjacentDataIndices())}})),c.graph.eachEdge((function(e){var t=e.getGraphicEl(),r=e.getModel().get(["emphasis","focus"]);t&&"adjacency"===r&&(Up(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})}));var f="circular"===e.get("layout")&&e.get(["circular","rotateLabel"]),m=c.getLayout("cx"),g=c.getLayout("cy");c.graph.eachNode((function(e){PV(e,f,m,g)})),this._firstRender=!1},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,t){var r=this;(function a(){e.step((function(e){r.updateLayout(r._model),(r._layouting=!e)&&(t?r._layoutTimeout=setTimeout(a,16):a())}))})()},t.prototype._updateController=function(e,t,r){var a=this,n=this._controller,i=this._controllerHost,o=this.group;n.setPointerChecker((function(t,a,n){var i=o.getBoundingRect();return i.applyTransform(o.transform),i.contain(a,n)&&!LE(t,r,e)})),hz(e.coordinateSystem)?(n.enable(e.get("roam")),i.zoomLimit=e.get("scaleLimit"),i.zoom=e.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",(function(t){PE(i,t.dx,t.dy),r.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})})).on("zoom",(function(t){NE(i,t.scale,t.originX,t.originY),r.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),a._updateNodeAndLinkScale(),dz(e.getGraph(),TV(e)),a._lineDraw.updateLayout(),r.updateLabelLayout()}))):n.disable()},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),r=TV(e);t.eachItemGraphicEl((function(e,t){e&&e.setSymbolScale(r)}))},t.prototype.updateLayout=function(e){dz(e.getGraph(),TV(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},t.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},t.type="graph",t}(ux),mz=fz;function gz(e){return"_EC_"+e}var vz=function(){function e(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(e,t){e=null==e?""+t:""+e;var r=this._nodesMap;if(!r[gz(e)]){var a=new yz(e,t);return a.hostGraph=this,this.nodes.push(a),r[gz(e)]=a,a}},e.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},e.prototype.getNodeById=function(e){return this._nodesMap[gz(e)]},e.prototype.addEdge=function(e,t,r){var a=this._nodesMap,n=this._edgesMap;if(Sa["z"](e)&&(e=this.nodes[e]),Sa["z"](t)&&(t=this.nodes[t]),e instanceof yz||(e=a[gz(e)]),t instanceof yz||(t=a[gz(t)]),e&&t){var i=e.id+"-"+t.id,o=new bz(e,t,r);return o.hostGraph=this,this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),n[i]=o,o}},e.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},e.prototype.getEdge=function(e,t){e instanceof yz&&(e=e.id),t instanceof yz&&(t=t.id);var r=this._edgesMap;return this._directed?r[e+"-"+t]:r[e+"-"+t]||r[t+"-"+e]},e.prototype.eachNode=function(e,t){for(var r=this.nodes,a=r.length,n=0;n<a;n++)r[n].dataIndex>=0&&e.call(t,r[n],n)},e.prototype.eachEdge=function(e,t){for(var r=this.edges,a=r.length,n=0;n<a;n++)r[n].dataIndex>=0&&r[n].node1.dataIndex>=0&&r[n].node2.dataIndex>=0&&e.call(t,r[n],n)},e.prototype.breadthFirstTraverse=function(e,t,r,a){if(t instanceof yz||(t=this._nodesMap[gz(t)]),t){for(var n="out"===r?"outEdges":"in"===r?"inEdges":"edges",i=0;i<this.nodes.length;i++)this.nodes[i].__visited=!1;if(!e.call(a,t,null)){var o=[t];while(o.length){var s=o.shift(),l=s[n];for(i=0;i<l.length;i++){var c=l[i],u=c.node1===s?c.node2:c.node1;if(!u.__visited){if(e.call(a,u,s))return;o.push(u),u.__visited=!0}}}}}},e.prototype.update=function(){for(var e=this.data,t=this.edgeData,r=this.nodes,a=this.edges,n=0,i=r.length;n<i;n++)r[n].dataIndex=-1;for(n=0,i=e.count();n<i;n++)r[e.getRawIndex(n)].dataIndex=n;t.filterSelf((function(e){var r=a[t.getRawIndex(e)];return r.node1.dataIndex>=0&&r.node2.dataIndex>=0}));for(n=0,i=a.length;n<i;n++)a[n].dataIndex=-1;for(n=0,i=t.count();n<i;n++)a[t.getRawIndex(n)].dataIndex=n},e.prototype.clone=function(){for(var t=new e(this._directed),r=this.nodes,a=this.edges,n=0;n<r.length;n++)t.addNode(r[n].id,r[n].dataIndex);for(n=0;n<a.length;n++){var i=a[n];t.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return t},e}(),yz=function(){function e(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=null==e?"":e,this.dataIndex=null==t?-1:t}return e.prototype.degree=function(){return this.edges.length},e.prototype.inDegree=function(){return this.inEdges.length},e.prototype.outDegree=function(){return this.outEdges.length},e.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,r=t.data.getItemModel(this.dataIndex);return r.getModel(e)}},e.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var r=this.edges[t];r.dataIndex<0||(e.edge.push(r.dataIndex),e.node.push(r.node1.dataIndex,r.node2.dataIndex))}return e},e.prototype.getTrajectoryDataIndices=function(){for(var e=Sa["f"](),t=Sa["f"](),r=0;r<this.edges.length;r++){var a=this.edges[r];if(!(a.dataIndex<0)){e.set(a.dataIndex,!0);var n=[a.node1],i=[a.node2],o=0;while(o<n.length){var s=n[o];o++,t.set(s.dataIndex,!0);for(var l=0;l<s.inEdges.length;l++)e.set(s.inEdges[l].dataIndex,!0),n.push(s.inEdges[l].node1)}o=0;while(o<i.length){var c=i[o];o++,t.set(c.dataIndex,!0);for(l=0;l<c.outEdges.length;l++)e.set(c.outEdges[l].dataIndex,!0),i.push(c.outEdges[l].node2)}}}return{edge:e.keys(),node:t.keys()}},e}(),bz=function(){function e(e,t,r){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=null==r?-1:r}return e.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,r=t.edgeData.getItemModel(this.dataIndex);return r.getModel(e)}},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=Sa["f"](),t=Sa["f"]();e.set(this.dataIndex,!0);var r=[this.node1],a=[this.node2],n=0;while(n<r.length){var i=r[n];n++,t.set(i.dataIndex,!0);for(var o=0;o<i.inEdges.length;o++)e.set(i.inEdges[o].dataIndex,!0),r.push(i.inEdges[o].node1)}n=0;while(n<a.length){var s=a[n];n++,t.set(s.dataIndex,!0);for(o=0;o<s.outEdges.length;o++)e.set(s.outEdges[o].dataIndex,!0),a.push(s.outEdges[o].node2)}return{edge:e.keys(),node:t.keys()}},e}();function _z(e,t){return{getValue:function(r){var a=this[e][t];return a.getStore().get(a.getDimensionIndex(r||"value"),this.dataIndex)},setVisual:function(r,a){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,r,a)},getVisual:function(r){return this[e][t].getItemVisual(this.dataIndex,r)},setLayout:function(r,a){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,r,a)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}Sa["K"](yz,_z("hostGraph","data")),Sa["K"](bz,_z("hostGraph","edgeData"));var xz=vz;function wz(e,t,r,a,n){for(var i=new xz(a),o=0;o<e.length;o++)i.addNode(Sa["O"](e[o].id,e[o].name,o),o);var s=[],l=[],c=0;for(o=0;o<t.length;o++){var u=t[o],p=u.source,d=u.target;i.addEdge(p,d,c)&&(l.push(u),s.push(Sa["O"]($l(u.id,null),p+" > "+d)),c++)}var h,f=r.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)h=MO(e,r);else{var m=pg.get(f),g=m&&m.dimensions||[];Sa["r"](g,"value")<0&&g.concat(["value"]);var v=dO(e,{coordDimensions:g,encodeDefine:r.getEncode()}).dimensions;h=new pO(v,r),h.initData(e)}var y=new pO(["value"],r);return y.initData(l,s),n&&n(h,y),gj({mainData:h,struct:i,structAttr:"graph",datas:{node:h,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var Sz=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return xa(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments);var r=this;function a(){return r._categoriesData}this.legendVisualProvider=new YA(a,a),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(t){e.prototype.mergeDefaultAndTheme.apply(this,arguments),Ml(t,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,t){var r=e.edges||e.links||[],a=e.data||e.nodes||[],n=this;if(a&&r){_V(this);var i=wz(a,r,this,!0,o);return Sa["k"](i.edges,(function(e){xV(e.node1,e.node2,this,e.dataIndex)}),this),i.data}function o(e,t){e.wrapMethod("getItemModel",(function(e){var t=n._categoriesModels,r=e.getShallow("category"),a=t[r];return a&&(a.parentModel=e.parentModel,e.parentModel=a),e}));var r=Uh.prototype.getModel;function a(e,t){var a=r.call(this,e,t);return a.resolveParentPath=i,a}function i(e){if(e&&("label"===e[0]||"label"===e[1])){var t=e.slice();return"label"===e[0]?t[0]="edgeLabel":"label"===e[1]&&(t[1]="edgeLabel"),t}return e}t.wrapMethod("getItemModel",(function(e){return e.resolveParentPath=i,e.getModel=a,e}))}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,t,r){if("edge"===r){var a=this.getData(),n=this.getDataParams(e,r),i=a.graph.getEdgeByIndex(e),o=a.getName(i.node1.dataIndex),s=a.getName(i.node2.dataIndex),l=[];return null!=o&&l.push(o),null!=s&&l.push(s),py("nameValue",{name:l.join(" > "),value:n.value,noValue:null==n.value})}var c=Iy({series:this,dataIndex:e,multipleSeries:t});return c},t.prototype._updateCategoriesData=function(){var e=Sa["H"](this.option.categories||[],(function(e){return null!=e.value?e:Sa["m"]({value:0},e)})),t=new pO(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray((function(e){return t.getItemModel(e)}))},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.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"}}},t}(By),Dz=Sz,Cz={type:"graphRoam",event:"graphRoam",update:"none"};function Tz(e){e.registerChartView(mz),e.registerSeriesModel(Dz),e.registerProcessor(lV),e.registerVisual(cV),e.registerVisual(pV),e.registerLayout(CV),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,NV),e.registerLayout(LV),e.registerCoordinateSystem("graphView",{dimensions:gL.dimensions,create:FV}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Sa["L"]),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Sa["L"]),e.registerAction(Cz,(function(e,t,r){t.eachComponent({mainType:"series",query:e},(function(t){var a=t.coordinateSystem,n=AL(a,e,void 0,r);t.setCenter&&t.setCenter(n.center),t.setZoom&&t.setZoom(n.zoom)}))}))}var Iz=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),Oz=function(e){function t(t){var r=e.call(this,t)||this;return r.type="pointer",r}return xa(t,e),t.prototype.getDefaultShape=function(){return new Iz},t.prototype.buildPath=function(e,t){var r=Math.cos,a=Math.sin,n=t.r,i=t.width,o=t.angle,s=t.x-r(o)*i*(i>=n/3?1:2),l=t.y-a(o)*i*(i>=n/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+r(o)*i,t.y+a(o)*i),e.lineTo(t.x+r(t.angle)*n,t.y+a(t.angle)*n),e.lineTo(t.x-r(o)*i,t.y-a(o)*i),e.lineTo(s,l)},t}(lp),Mz=Oz;function Az(e,t){var r=e.get("center"),a=t.getWidth(),n=t.getHeight(),i=Math.min(a,n),o=rl(r[0],t.getWidth()),s=rl(r[1],t.getHeight()),l=rl(e.get("radius"),i/2);return{cx:o,cy:s,r:l}}function kz(e,t){var r=null==e?"":e+"";return t&&(Object(Sa["C"])(t)?r=t.replace("{value}",r):Object(Sa["w"])(t)&&(r=t(e))),r}var Pz=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(e,t,r){this.group.removeAll();var a=e.get(["axisLine","lineStyle","color"]),n=Az(e,r);this._renderMain(e,t,r,a,n),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,r,a,n){var i=this.group,o=e.get("clockwise"),s=-e.get("startAngle")/180*Math.PI,l=-e.get("endAngle")/180*Math.PI,c=e.getModel("axisLine"),u=c.get("roundCap"),p=u?JM:jb,d=c.get("show"),h=c.getModel("lineStyle"),f=h.get("width"),m=[s,l];Eu(m,!o),s=m[0],l=m[1];for(var g=l-s,v=s,y=[],b=0;d&&b<a.length;b++){var _=Math.min(Math.max(a[b][0],0),1);l=s+g*_;var x=new p({shape:{startAngle:v,endAngle:l,cx:n.cx,cy:n.cy,clockwise:o,r0:n.r-f,r:n.r},silent:!0});x.setStyle({fill:a[b][1]}),x.setStyle(h.getLineStyle(["color","width"])),y.push(x),v=l}y.reverse(),Object(Sa["k"])(y,(function(e){return i.add(e)}));var w=function(e){if(e<=0)return a[0][1];var t;for(t=0;t<a.length;t++)if(a[t][0]>=e&&(0===t?0:a[t-1][0])<e)return a[t][1];return a[t-1][1]};this._renderTicks(e,t,r,w,n,s,l,o,f),this._renderTitleAndDetail(e,t,r,w,n),this._renderAnchor(e,n),this._renderPointer(e,t,r,w,n,s,l,o,f)},t.prototype._renderTicks=function(e,t,r,a,n,i,o,s,l){for(var c,u,p=this.group,d=n.cx,h=n.cy,f=n.r,m=+e.get("min"),g=+e.get("max"),v=e.getModel("splitLine"),y=e.getModel("axisTick"),b=e.getModel("axisLabel"),_=e.get("splitNumber"),x=y.get("splitNumber"),w=rl(v.get("length"),f),S=rl(y.get("length"),f),D=i,C=(o-i)/_,T=C/x,I=v.getModel("lineStyle").getLineStyle(),O=y.getModel("lineStyle").getLineStyle(),M=v.get("distance"),A=0;A<=_;A++){if(c=Math.cos(D),u=Math.sin(D),v.get("show")){var k=M?M+l:l,P=new Jb({shape:{x1:c*(f-k)+d,y1:u*(f-k)+h,x2:c*(f-w-k)+d,y2:u*(f-w-k)+h},style:I,silent:!0});"auto"===I.stroke&&P.setStyle({stroke:a(A/_)}),p.add(P)}if(b.get("show")){k=b.get("distance")+M;var N=kz(al(A/_*(g-m)+m),b.get("formatter")),E=a(A/_),R=c*(f-w-k)+d,L=u*(f-w-k)+h,j=b.get("rotate"),F=0;"radial"===j?(F=-D+2*Math.PI,F>Math.PI/2&&(F+=Math.PI)):"tangential"===j?F=-D-Math.PI/2:Object(Sa["z"])(j)&&(F=j*Math.PI/180),0===F?p.add(new Gp({style:_h(b,{text:N,x:R,y:L,verticalAlign:u<-.8?"top":u>.8?"bottom":"middle",align:c<-.4?"left":c>.4?"right":"center"},{inheritColor:E}),silent:!0})):p.add(new Gp({style:_h(b,{text:N,x:R,y:L,verticalAlign:"middle",align:"center"},{inheritColor:E}),silent:!0,originX:R,originY:L,rotation:F}))}if(y.get("show")&&A!==_){k=y.get("distance");k=k?k+l:l;for(var V=0;V<=x;V++){c=Math.cos(D),u=Math.sin(D);var z=new Jb({shape:{x1:c*(f-k)+d,y1:u*(f-k)+h,x2:c*(f-S-k)+d,y2:u*(f-S-k)+h},silent:!0,style:O});"auto"===O.stroke&&z.setStyle({stroke:a((A+V/x)/_)}),p.add(z),D+=T}D-=T}else D+=C}},t.prototype._renderPointer=function(e,t,r,a,n,i,o,s,l){var c=this.group,u=this._data,p=this._progressEls,d=[],h=e.get(["pointer","show"]),f=e.getModel("progress"),m=f.get("show"),g=e.getData(),v=g.mapDimension("value"),y=+e.get("min"),b=+e.get("max"),_=[y,b],x=[i,o];function w(t,r){var a,i=g.getItemModel(t),o=i.getModel("pointer"),s=rl(o.get("width"),n.r),l=rl(o.get("length"),n.r),c=e.get(["pointer","icon"]),u=o.get("offsetCenter"),p=rl(u[0],n.r),d=rl(u[1],n.r),h=o.get("keepAspect");return a=c?Sw(c,p-s/2,d-l,s,l,null,h):new Mz({shape:{angle:-Math.PI/2,width:s,r:l,x:p,y:d}}),a.rotation=-(r+Math.PI/2),a.x=n.cx,a.y=n.cy,a}function S(e,t){var r=f.get("roundCap"),a=r?JM:jb,o=f.get("overlap"),c=o?f.get("width"):l/g.count(),u=o?n.r-c:n.r-(e+1)*c,p=o?n.r:n.r-e*c,d=new a({shape:{startAngle:i,endAngle:t,cx:n.cx,cy:n.cy,clockwise:s,r0:u,r:p}});return o&&(d.z2=b-g.get(v,e)%b),d}(m||h)&&(g.diff(u).add((function(t){var r=g.get(v,t);if(h){var a=w(t,i);lh(a,{rotation:-((isNaN(+r)?x[0]:tl(r,_,x,!0))+Math.PI/2)},e),c.add(a),g.setItemGraphicEl(t,a)}if(m){var n=S(t,i),o=f.get("clip");lh(n,{shape:{endAngle:tl(r,_,x,o)}},e),c.add(n),Wp(e.seriesIndex,g.dataType,t,n),d[t]=n}})).update((function(t,r){var a=g.get(v,t);if(h){var n=u.getItemGraphicEl(r),o=n?n.rotation:i,s=w(t,o);s.rotation=o,sh(s,{rotation:-((isNaN(+a)?x[0]:tl(a,_,x,!0))+Math.PI/2)},e),c.add(s),g.setItemGraphicEl(t,s)}if(m){var l=p[r],y=l?l.shape.endAngle:i,b=S(t,y),D=f.get("clip");sh(b,{shape:{endAngle:tl(a,_,x,D)}},e),c.add(b),Wp(e.seriesIndex,g.dataType,t,b),d[t]=b}})).execute(),g.each((function(e){var t=g.getItemModel(e),r=t.getModel("emphasis"),n=r.get("focus"),i=r.get("blurScope"),o=r.get("disabled");if(h){var s=g.getItemGraphicEl(e),l=g.getItemVisual(e,"style"),c=l.fill;if(s instanceof gp){var u=s.style;s.useStyle(Object(Sa["m"])({image:u.image,x:u.x,y:u.y,width:u.width,height:u.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(c);s.setStyle(t.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",a(tl(g.get(v,e),_,[0,1],!0))),s.z2EmphasisLift=0,Zd(s,t),Hd(s,n,i,o)}if(m){var p=d[e];p.useStyle(g.getItemVisual(e,"style")),p.setStyle(t.getModel(["progress","itemStyle"]).getItemStyle()),p.z2EmphasisLift=0,Zd(p,t),Hd(p,n,i,o)}})),this._progressEls=d)},t.prototype._renderAnchor=function(e,t){var r=e.getModel("anchor"),a=r.get("show");if(a){var n=r.get("size"),i=r.get("icon"),o=r.get("offsetCenter"),s=r.get("keepAspect"),l=Sw(i,t.cx-n/2+rl(o[0],t.r),t.cy-n/2+rl(o[1],t.r),n,n,null,s);l.z2=r.get("showAbove")?1:0,l.setStyle(r.getModel("itemStyle").getItemStyle()),this.group.add(l)}},t.prototype._renderTitleAndDetail=function(e,t,r,a,n){var i=this,o=e.getData(),s=o.mapDimension("value"),l=+e.get("min"),c=+e.get("max"),u=new Bs,p=[],d=[],h=e.isAnimationEnabled(),f=e.get(["pointer","showAbove"]);o.diff(this._data).add((function(e){p[e]=new Gp({silent:!0}),d[e]=new Gp({silent:!0})})).update((function(e,t){p[e]=i._titleEls[t],d[e]=i._detailEls[t]})).execute(),o.each((function(t){var r=o.getItemModel(t),i=o.get(s,t),m=new Bs,g=a(tl(i,[l,c],[0,1],!0)),v=r.getModel("title");if(v.get("show")){var y=v.get("offsetCenter"),b=n.cx+rl(y[0],n.r),_=n.cy+rl(y[1],n.r),x=p[t];x.attr({z2:f?0:2,style:_h(v,{x:b,y:_,text:o.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:g})}),m.add(x)}var w=r.getModel("detail");if(w.get("show")){var S=w.get("offsetCenter"),D=n.cx+rl(S[0],n.r),C=n.cy+rl(S[1],n.r),T=rl(w.get("width"),n.r),I=rl(w.get("height"),n.r),O=e.get(["progress","show"])?o.getItemVisual(t,"style").fill:g,M=(x=d[t],w.get("formatter"));x.attr({z2:f?0:2,style:_h(w,{x:D,y:C,text:kz(i,M),width:isNaN(T)?null:T,height:isNaN(I)?null:I,align:"center",verticalAlign:"middle"},{inheritColor:O})}),Ah(x,{normal:w},i,(function(e){return kz(e,M)})),h&&kh(x,t,o,e,{getFormattedLabel:function(e,t,r,a,n,o){return kz(o?o.interpolatedValue:i,M)}}),m.add(x)}u.add(m)})),this.group.add(u),this._titleEls=p,this._detailEls=d},t.type="gauge",t}(ux),Nz=Pz,Ez=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="itemStyle",r}return xa(t,e),t.prototype.getInitialData=function(e,t){return HA(this,["value"])},t.type="series.gauge",t.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}},t}(By),Rz=Ez;function Lz(e){e.registerChartView(Nz),e.registerSeriesModel(Rz)}var jz=["itemStyle","opacity"],Fz=function(e){function t(t,r){var a=e.call(this)||this,n=a,i=new Yb,o=new Gp;return n.setTextContent(o),a.setTextGuideLine(i),a.updateData(t,r,!0),a}return xa(t,e),t.prototype.updateData=function(e,t,r){var a=this,n=e.hostModel,i=e.getItemModel(t),o=e.getItemLayout(t),s=i.getModel("emphasis"),l=i.get(jz);l=null==l?1:l,r||hh(a),a.useStyle(e.getItemVisual(t,"style")),a.style.lineJoin="round",r?(a.setShape({points:o.points}),a.style.opacity=0,lh(a,{style:{opacity:l}},n,t)):sh(a,{style:{opacity:l},shape:{points:o.points}},n,t),Zd(a,i),this._updateLabel(e,t),Hd(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},t.prototype._updateLabel=function(e,t){var r=this,a=this.getTextGuideLine(),n=r.getTextContent(),i=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t),l=s.label,c=e.getItemVisual(t,"style"),u=c.fill;yh(n,bh(o),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:c.opacity,defaultText:e.getName(t)},{normal:{align:l.textAlign,verticalAlign:l.verticalAlign}}),r.setTextConfig({local:!0,inside:!!l.inside,insideStroke:u,outsideFill:u});var p=l.linePoints;a.setShape({points:p}),r.textGuideLineConfig={anchor:p?new Ln(p[0][0],p[0][1]):null},sh(n,{style:{x:l.x,y:l.y}},i,t),n.attr({rotation:l.rotation,originX:l.x,originY:l.y,z2:10}),xC(r,wC(o),{stroke:u})},t}(Wb),Vz=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreLabelLineUpdate=!0,r}return xa(t,e),t.prototype.render=function(e,t,r){var a=e.getData(),n=this._data,i=this.group;a.diff(n).add((function(e){var t=new Fz(a,e);a.setItemGraphicEl(e,t),i.add(t)})).update((function(e,t){var r=n.getItemGraphicEl(t);r.updateData(a,e),i.add(r),a.setItemGraphicEl(e,r)})).remove((function(t){var r=n.getItemGraphicEl(t);dh(r,e,t)})).execute(),this._data=a},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(ux),zz=Vz,Bz=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new YA(Sa["c"](this.getData,this),Sa["c"](this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return HA(this,{coordDimensions:["value"],encodeDefaulter:Sa["h"](km,this)})},t.prototype._defaultLabelLine=function(e){Ml(e,"labelLine",["show"]);var t=e.labelLine,r=e.emphasis.labelLine;t.show=t.show&&e.label.show,r.show=r.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var r=this.getData(),a=e.prototype.getDataParams.call(this,t),n=r.mapDimension("value"),i=r.getSum(n);return a.percent=i?+(r.get(n,t)/i*100).toFixed(2):0,a.$vars.push("percent"),a},t.type="series.funnel",t.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"}}},t}(By),$z=Bz;function Gz(e,t){return nm(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function Uz(e,t){for(var r=e.mapDimension("value"),a=e.mapArray(r,(function(e){return e})),n=[],i="ascending"===t,o=0,s=e.count();o<s;o++)n[o]=o;return Object(Sa["w"])(t)?n.sort(t):"none"!==t&&n.sort((function(e,t){return i?a[e]-a[t]:a[t]-a[e]})),n}function Wz(e){var t=e.hostModel,r=t.get("orient");e.each((function(t){var a,n,i,o,s=e.getItemModel(t),l=s.getModel("label"),c=l.get("position"),u=s.getModel("labelLine"),p=e.getItemLayout(t),d=p.points,h="inner"===c||"inside"===c||"center"===c||"insideLeft"===c||"insideRight"===c;if(h)"insideLeft"===c?(n=(d[0][0]+d[3][0])/2+5,i=(d[0][1]+d[3][1])/2,a="left"):"insideRight"===c?(n=(d[1][0]+d[2][0])/2-5,i=(d[1][1]+d[2][1])/2,a="right"):(n=(d[0][0]+d[1][0]+d[2][0]+d[3][0])/4,i=(d[0][1]+d[1][1]+d[2][1]+d[3][1])/4,a="center"),o=[[n,i],[n,i]];else{var f=void 0,m=void 0,g=void 0,v=void 0,y=u.get("length");0,"left"===c?(f=(d[3][0]+d[0][0])/2,m=(d[3][1]+d[0][1])/2,g=f-y,n=g-5,a="right"):"right"===c?(f=(d[1][0]+d[2][0])/2,m=(d[1][1]+d[2][1])/2,g=f+y,n=g+5,a="left"):"top"===c?(f=(d[3][0]+d[0][0])/2,m=(d[3][1]+d[0][1])/2,v=m-y,i=v-5,a="center"):"bottom"===c?(f=(d[1][0]+d[2][0])/2,m=(d[1][1]+d[2][1])/2,v=m+y,i=v+5,a="center"):"rightTop"===c?(f="horizontal"===r?d[3][0]:d[1][0],m="horizontal"===r?d[3][1]:d[1][1],"horizontal"===r?(v=m-y,i=v-5,a="center"):(g=f+y,n=g+5,a="top")):"rightBottom"===c?(f=d[2][0],m=d[2][1],"horizontal"===r?(v=m+y,i=v+5,a="center"):(g=f+y,n=g+5,a="bottom")):"leftTop"===c?(f=d[0][0],m="horizontal"===r?d[0][1]:d[1][1],"horizontal"===r?(v=m-y,i=v-5,a="center"):(g=f-y,n=g-5,a="right")):"leftBottom"===c?(f="horizontal"===r?d[1][0]:d[3][0],m="horizontal"===r?d[1][1]:d[2][1],"horizontal"===r?(v=m+y,i=v+5,a="center"):(g=f-y,n=g-5,a="right")):(f=(d[1][0]+d[2][0])/2,m=(d[1][1]+d[2][1])/2,"horizontal"===r?(v=m+y,i=v+5,a="center"):(g=f+y,n=g+5,a="left")),"horizontal"===r?(g=f,n=g):(v=m,i=v),o=[[f,m],[g,v]]}p.label={linePoints:o,x:n,y:i,verticalAlign:"middle",textAlign:a,inside:h}}))}function Hz(e,t){e.eachSeriesByType("funnel",(function(e){var r=e.getData(),a=r.mapDimension("value"),n=e.get("sort"),i=Gz(e,t),o=e.get("orient"),s=i.width,l=i.height,c=Uz(r,n),u=i.x,p=i.y,d="horizontal"===o?[rl(e.get("minSize"),l),rl(e.get("maxSize"),l)]:[rl(e.get("minSize"),s),rl(e.get("maxSize"),s)],h=r.getDataExtent(a),f=e.get("min"),m=e.get("max");null==f&&(f=Math.min(h[0],0)),null==m&&(m=h[1]);var g=e.get("funnelAlign"),v=e.get("gap"),y="horizontal"===o?s:l,b=(y-v*(r.count()-1))/r.count(),_=function(e,t){if("horizontal"===o){var n=r.get(a,e)||0,i=tl(n,[f,m],d,!0),c=void 0;switch(g){case"top":c=p;break;case"center":c=p+(l-i)/2;break;case"bottom":c=p+(l-i);break}return[[t,c],[t,c+i]]}var h,v=r.get(a,e)||0,y=tl(v,[f,m],d,!0);switch(g){case"left":h=u;break;case"center":h=u+(s-y)/2;break;case"right":h=u+s-y;break}return[[h,t],[h+y,t]]};"ascending"===n&&(b=-b,v=-v,"horizontal"===o?u+=s:p+=l,c=c.reverse());for(var x=0;x<c.length;x++){var w=c[x],S=c[x+1],D=r.getItemModel(w);if("horizontal"===o){var C=D.get(["itemStyle","width"]);null==C?C=b:(C=rl(C,s),"ascending"===n&&(C=-C));var T=_(w,u),I=_(S,u+C);u+=C+v,r.setItemLayout(w,{points:T.concat(I.slice().reverse())})}else{var O=D.get(["itemStyle","height"]);null==O?O=b:(O=rl(O,l),"ascending"===n&&(O=-O));T=_(w,p),I=_(S,p+O);p+=O+v,r.setItemLayout(w,{points:T.concat(I.slice().reverse())})}}Wz(r)}))}function qz(e){e.registerChartView(zz),e.registerSeriesModel($z),e.registerLayout(Hz),e.registerProcessor(LA("funnel"))}var Yz=.3,Xz=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r._dataGroup=new Bs,r._initialized=!1,r}return xa(t,e),t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(e,t,r,a){this._progressiveEls=null;var n=this._dataGroup,i=e.getData(),o=this._data,s=e.coordinateSystem,l=s.dimensions,c=Qz(e);function u(e){var t=Jz(i,n,e,l,s);eB(t,i,e,c)}function p(t,r){var a=o.getItemGraphicEl(r),n=Kz(i,t,l,s);i.setItemGraphicEl(t,a),sh(a,{shape:{points:n}},e,t),hh(a),eB(a,i,t,c)}function d(e){var t=o.getItemGraphicEl(e);n.remove(t)}if(i.diff(o).add(u).update(p).remove(d).execute(),!this._initialized){this._initialized=!0;var h=Zz(s,e,(function(){setTimeout((function(){n.removeClipPath()}))}));n.setClipPath(h)}this._data=i},t.prototype.incrementalPrepareRender=function(e,t,r){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(e,t,r){for(var a=t.getData(),n=t.coordinateSystem,i=n.dimensions,o=Qz(t),s=this._progressiveEls=[],l=e.start;l<e.end;l++){var c=Jz(a,this._dataGroup,l,i,n);c.incremental=!0,eB(c,a,l,o),s.push(c)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t}(ux);function Zz(e,t,r){var a=e.model,n=e.getRect(),i=new Cp({shape:{x:n.x,y:n.y,width:n.width,height:n.height}}),o="horizontal"===a.get("layout")?"width":"height";return i.setShape(o,0),lh(i,{shape:{width:n.width,height:n.height}},t,r),i}function Kz(e,t,r,a){for(var n=[],i=0;i<r.length;i++){var o=r[i],s=e.get(e.mapDimension(o),t);tB(s,a.getAxis(o).type)||n.push(a.dataToPoint(s,o))}return n}function Jz(e,t,r,a,n){var i=Kz(e,r,a,n),o=new Yb({shape:{points:i},z2:10});return t.add(o),e.setItemGraphicEl(r,o),o}function Qz(e){var t=e.get("smooth",!0);return!0===t&&(t=Yz),t=_l(t),Object(Sa["l"])(t)&&(t=0),{smooth:t}}function eB(e,t,r,a){e.useStyle(t.getItemVisual(r,"style")),e.style.fill=null,e.setShape("smooth",a.smooth);var n=t.getItemModel(r),i=n.getModel("emphasis");Zd(e,n,"lineStyle"),Hd(e,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function tB(e,t){return"category"===t?null==e:null==e||isNaN(e)}var rB=Xz,aB=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return xa(t,e),t.prototype.getInitialData=function(e,t){return MO(null,this,{useEncodeDefaulter:Object(Sa["c"])(nB,null,this)})},t.prototype.getRawIndicesByActiveState=function(e){var t=this.coordinateSystem,r=this.getData(),a=[];return t.eachActiveState(r,(function(t,n){e===t&&a.push(r.getRawIndex(n))})),a},t.type="series.parallel",t.dependencies=["parallel"],t.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"},t}(By);function nB(e){var t=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(t){var r={};return Object(Sa["k"])(t.dimensions,(function(e){var t=iB(e);r[e]=t})),r}}function iB(e){return+e.replace("dim","")}var oB=aB,sB=["lineStyle","opacity"],lB={seriesType:"parallel",reset:function(e,t){var r=e.coordinateSystem,a={normal:e.get(["lineStyle","opacity"]),active:e.get("activeOpacity"),inactive:e.get("inactiveOpacity")};return{progress:function(e,t){r.eachActiveState(t,(function(e,r){var n=a[e];if("normal"===e&&t.hasItemOption){var i=t.getItemModel(r).get(sB,!0);null!=i&&(n=i)}var o=t.ensureUniqueItemVisual(r,"style");o.opacity=n}),e.start,e.end)}}}},cB=lB;function uB(e){pB(e),dB(e)}function pB(e){if(!e.parallel){var t=!1;Sa["k"](e.series,(function(e){e&&"parallel"===e.type&&(t=!0)})),t&&(e.parallel=[{}])}}function dB(e){var t=Ol(e.parallelAxis);Sa["k"](t,(function(t){if(Sa["A"](t)){var r=t.parallelIndex||0,a=Ol(e.parallel)[r];a&&a.parallelAxisDefault&&Sa["I"](t,a.parallelAxisDefault,!1)}}))}var hB=5,fB=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(e,t,r){this._model=e,this._api=r,this._handlers||(this._handlers={},Object(Sa["k"])(mB,(function(e,t){r.getZr().on(t,this._handlers[t]=Object(Sa["c"])(e,this))}),this)),mx(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(e,t){gx(this,"_throttledDispatchExpand"),Object(Sa["k"])(this._handlers,(function(e,r){t.getZr().off(r,e)})),this._handlers=null},t.prototype._throttledDispatchExpand=function(e){this._dispatchExpand(e)},t.prototype._dispatchExpand=function(e){e&&this._api.dispatchAction(Object(Sa["m"])({type:"parallelAxisExpand"},e))},t.type="parallel",t}(Gy),mB={mousedown:function(e){gB(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(gB(this,"click")&&t){var r=[e.offsetX,e.offsetY],a=Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2);if(a>hB)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&gB(this,"mousemove")){var t=this._model,r=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),a=r.behavior;"jump"===a&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===a?null:{axisExpandWindow:r.axisExpandWindow,animation:"jump"===a?null:{duration:0}})}}};function gB(e,t){var r=e._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===t}var vB=fB,yB=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var t=this.option;e&&Sa["I"](t,e,!0),this._initDimensions()},t.prototype.contains=function(e,t){var r=e.get("parallelIndex");return null!=r&&t.getComponent("parallel",r)===this},t.prototype.setAxisExpand=function(e){Sa["k"](["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])}),this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[],r=Sa["n"](this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(e){return(e.get("parallelIndex")||0)===this.componentIndex}),this);Sa["k"](r,(function(r){e.push("dim"+r.get("dim")),t.push(r.componentIndex)}))},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.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},t}(fm),bB=yB,_B=function(e){function t(t,r,a,n,i){var o=e.call(this,t,r,a)||this;return o.type=n||"value",o.axisIndex=i,o}return xa(t,e),t.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},t}(tN),xB=_B;function wB(e,t,r,a,n,i){e=e||0;var o=r[1]-r[0];if(null!=n&&(n=DB(n,[0,o])),null!=i&&(i=Math.max(i,null!=n?n:0)),"all"===a){var s=Math.abs(t[1]-t[0]);s=DB(s,[0,o]),n=i=DB(s,[n,i]),a=0}t[0]=DB(t[0],r),t[1]=DB(t[1],r);var l=SB(t,a);t[a]+=e;var c,u=n||0,p=r.slice();return l.sign<0?p[0]+=u:p[1]-=u,t[a]=DB(t[a],p),c=SB(t,a),null!=n&&(c.sign!==l.sign||c.span<n)&&(t[1-a]=t[a]+l.sign*n),c=SB(t,a),null!=i&&c.span>i&&(t[1-a]=t[a]+c.sign*i),t}function SB(e,t){var r=e[t]-e[1-t];return{span:Math.abs(r),sign:r>0?-1:r<0?1:t?-1:1}}function DB(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var CB=Sa["k"],TB=Math.min,IB=Math.max,OB=Math.floor,MB=Math.ceil,AB=al,kB=Math.PI,PB=function(){function e(e,t,r){this.type="parallel",this._axesMap=Sa["f"](),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,r)}return e.prototype._init=function(e,t,r){var a=e.dimensions,n=e.parallelAxisIndex;CB(a,(function(e,r){var a=n[r],i=t.getComponent("parallelAxis",a),o=this._axesMap.set(e,new xB(e,bP(i),[0,0],i.get("type"),a)),s="category"===o.type;o.onBand=s&&i.get("boundaryGap"),o.inverse=i.get("inverse"),i.axis=o,o.model=i,o.coordinateSystem=i.coordinateSystem=this}),this)},e.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},e.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),r=t.axisBase,a=t.layoutBase,n=t.pixelDimIndex,i=e[1-n],o=e[n];return i>=r&&i<=r+t.axisLength&&o>=a&&o<=a+t.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(e,t){t.eachSeries((function(r){if(e.contains(r,t)){var a=r.getData();CB(this.dimensions,(function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(a,a.mapDimension(e)),yP(t.scale,t.model)}),this)}}),this)},e.prototype.resize=function(e,t){this._rect=nm(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var e,t=this._model,r=this._rect,a=["x","y"],n=["width","height"],i=t.get("layout"),o="horizontal"===i?0:1,s=r[n[o]],l=[0,s],c=this.dimensions.length,u=NB(t.get("axisExpandWidth"),l),p=NB(t.get("axisExpandCount")||0,[0,c]),d=t.get("axisExpandable")&&c>3&&c>p&&p>1&&u>0&&s>0,h=t.get("axisExpandWindow");if(h)e=NB(h[1]-h[0],l),h[1]=h[0]+e;else{e=NB(u*(p-1),l);var f=t.get("axisExpandCenter")||OB(c/2);h=[u*f-e/2],h[1]=h[0]+e}var m=(s-e)/(c-p);m<3&&(m=0);var g=[OB(AB(h[0]/u,1))+1,MB(AB(h[1]/u,1))-1],v=m/u*h[0];return{layout:i,pixelDimIndex:o,layoutBase:r[a[o]],layoutLength:s,axisBase:r[a[1-o]],axisLength:r[n[1-o]],axisExpandable:d,axisExpandWidth:u,axisCollapseWidth:m,axisExpandWindow:h,axisCount:c,winInnerIndices:g,axisExpandWindow0Pos:v}},e.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,r=this.dimensions,a=this._makeLayoutInfo(),n=a.layout;t.each((function(e){var t=[0,a.axisLength],r=e.inverse?1:0;e.setExtent(t[r],t[1-r])})),CB(r,(function(t,r){var i=(a.axisExpandable?RB:EB)(r,a),o={horizontal:{x:i.position,y:a.axisLength},vertical:{x:0,y:i.position}},s={horizontal:kB/2,vertical:0},l=[o[n].x+e.x,o[n].y+e.y],c=s[n],u=Tn();kn(u,u,c),An(u,u,l),this._axesLayout[t]={position:l,rotation:c,transform:u,axisNameAvailableWidth:i.axisNameAvailableWidth,axisLabelShow:i.axisLabelShow,nameTruncateMaxWidth:i.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},e.prototype.getAxis=function(e){return this._axesMap.get(e)},e.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},e.prototype.eachActiveState=function(e,t,r,a){null==r&&(r=0),null==a&&(a=e.count());var n=this._axesMap,i=this.dimensions,o=[],s=[];Sa["k"](i,(function(t){o.push(e.mapDimension(t)),s.push(n.get(t).model)}));for(var l=this.hasAxisBrushed(),c=r;c<a;c++){var u=void 0;if(l){u="active";for(var p=e.getValues(o,c),d=0,h=i.length;d<h;d++){var f=s[d].getActiveState(p[d]);if("inactive"===f){u="inactive";break}}}else u="normal";t(u,c)}},e.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,r=!1,a=0,n=e.length;a<n;a++)"normal"!==t.get(e[a]).model.getActiveState()&&(r=!0);return r},e.prototype.axisCoordToPoint=function(e,t){var r=this._axesLayout[t];return B_([e,0],r.transform)},e.prototype.getAxisLayout=function(e){return Sa["d"](this._axesLayout[e])},e.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),r=t.pixelDimIndex,a=t.axisExpandWindow.slice(),n=a[1]-a[0],i=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:a};var o,s=e[r]-t.layoutBase-t.axisExpandWindow0Pos,l="slide",c=t.axisCollapseWidth,u=this._model.get("axisExpandSlideTriggerArea"),p=null!=u[0];if(c)p&&c&&s<n*u[0]?(l="jump",o=s-n*u[2]):p&&c&&s>n*(1-u[0])?(l="jump",o=s-n*(1-u[2])):(o=s-n*u[1])>=0&&(o=s-n*(1-u[1]))<=0&&(o=0),o*=t.axisExpandWidth/c,o?wB(o,a,i,"all"):l="none";else{var d=a[1]-a[0],h=i[1]*s/d;a=[IB(0,h-d/2)],a[1]=TB(i[1],a[0]+d),a[0]=a[1]-d}return{axisExpandWindow:a,behavior:l}},e}();function NB(e,t){return TB(IB(e,t[0]),t[1])}function EB(e,t){var r=t.layoutLength/(t.axisCount-1);return{position:r*e,axisNameAvailableWidth:r,axisLabelShow:!0}}function RB(e,t){var r,a,n=t.layoutLength,i=t.axisExpandWidth,o=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,c=s,u=!1;return e<l[0]?(r=e*s,a=s):e<=l[1]?(r=t.axisExpandWindow0Pos+e*i-t.axisExpandWindow[0],c=i,u=!0):(r=n-(o-1-e)*s,a=s),{position:r,axisNameAvailableWidth:c,axisLabelShow:u,nameTruncateMaxWidth:a}}var LB=PB;function jB(e,t){var r=[];return e.eachComponent("parallel",(function(a,n){var i=new LB(a,e,t);i.name="parallel_"+n,i.resize(a,t),a.coordinateSystem=i,i.model=a,r.push(i)})),e.eachSeries((function(e){if("parallel"===e.get("coordinateSystem")){var t=e.getReferringComponents("parallel",ec).models[0];e.coordinateSystem=t.coordinateSystem}})),r}var FB={create:jB},VB=FB,zB=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.activeIntervals=[],r}return xa(t,e),t.prototype.getAreaSelectStyle=function(){return wc([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(e){var t=this.activeIntervals=Sa["d"](e);if(t)for(var r=t.length-1;r>=0;r--)nl(t[r])},t.prototype.getActiveState=function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(+e))return"inactive";if(1===t.length){var r=t[0];if(r[0]<=e&&e<=r[1])return"active"}else for(var a=0,n=t.length;a<n;a++)if(t[a][0]<=e&&e<=t[a][1])return"active";return"inactive"},t}(fm);Sa["K"](zB,pk);var BB=zB,$B=!0,GB=Math.min,UB=Math.max,WB=Math.pow,HB=1e4,qB=6,YB=6,XB="globalPan",ZB={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},KB={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},JB={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},QB=0,e$=function(e){function t(t){var r=e.call(this)||this;return r._track=[],r._covers=[],r._handlers={},r._zr=t,r.group=new Bs,r._uid="brushController_"+QB++,Object(Sa["k"])(P$,(function(e,t){this._handlers[t]=Object(Sa["c"])(e,this)}),r),r}return xa(t,e),t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var t=this._zr;this._enableGlobalPan||SE(t,XB,this._uid),Object(Sa["k"])(this._handlers,(function(e,r){t.on(r,e)})),this._brushType=e.brushType,this._brushOption=Object(Sa["I"])(Object(Sa["d"])(JB),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;DE(e,XB,this._uid),Object(Sa["k"])(this._handlers,(function(t,r){e.off(r,t)})),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var t=this._panels={};Object(Sa["k"])(e,(function(e){t[e.panelId]=Object(Sa["d"])(e)}))}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=t.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=Object(Sa["H"])(e,(function(e){return Object(Sa["I"])(Object(Sa["d"])(JB),e,!0)}));var t="\0-brush-index-",r=this._covers,a=this._covers=[],n=this,i=this._creatingCover;return new RI(r,e,s,o).add(l).update(l).remove(c).execute(),this;function o(e,r){return(null!=e.id?e.id:t+r)+"-"+e.brushType}function s(e,t){return o(e.__brushOption,t)}function l(t,o){var s=e[t];if(null!=o&&r[o]===i)a[t]=r[o];else{var l=a[t]=null!=o?(r[o].__brushOption=s,r[o]):r$(n,t$(n,s));i$(n,l)}}function c(e){r[e]!==i&&n.group.remove(r[e])}},t.prototype.unmount=function(){return this.enableBrush(!1),c$(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(Xa);function t$(e,t){var r=R$[t.brushType].createCover(e,t);return r.__brushOption=t,n$(r,t),e.group.add(r),r}function r$(e,t){var r=o$(t);return r.endCreating&&(r.endCreating(e,t),n$(t,t.__brushOption)),t}function a$(e,t){var r=t.__brushOption;o$(t).updateCoverShape(e,t,r.range,r)}function n$(e,t){var r=t.z;null==r&&(r=HB),e.traverse((function(e){e.z=r,e.z2=r}))}function i$(e,t){o$(t).updateCommon(e,t),a$(e,t)}function o$(e){return R$[e.__brushOption.brushType]}function s$(e,t,r){var a,n=e._panels;if(!n)return $B;var i=e._transform;return Object(Sa["k"])(n,(function(e){e.isTargetByCursor(t,r,i)&&(a=e)})),a}function l$(e,t){var r=e._panels;if(!r)return $B;var a=t.__brushOption.panelId;return null!=a?r[a]:$B}function c$(e){var t=e._covers,r=t.length;return Object(Sa["k"])(t,(function(t){e.group.remove(t)}),e),t.length=0,!!r}function u$(e,t){var r=Object(Sa["H"])(e._covers,(function(e){var t=e.__brushOption,r=Object(Sa["d"])(t.range);return{brushType:t.brushType,panelId:t.panelId,range:r}}));e.trigger("brush",{areas:r,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function p$(e){var t=e._track;if(!t.length)return!1;var r=t[t.length-1],a=t[0],n=r[0]-a[0],i=r[1]-a[1],o=WB(n*n+i*i,.5);return o>qB}function d$(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function h$(e,t,r,a){var n=new Bs;return n.add(new Cp({name:"main",style:v$(r),silent:!0,draggable:!0,cursor:"move",drift:Object(Sa["h"])(w$,e,t,n,["n","s","w","e"]),ondragend:Object(Sa["h"])(u$,t,{isEnd:!0})})),Object(Sa["k"])(a,(function(r){n.add(new Cp({name:r.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Object(Sa["h"])(w$,e,t,n,r),ondragend:Object(Sa["h"])(u$,t,{isEnd:!0})}))})),n}function f$(e,t,r,a){var n=a.brushStyle.lineWidth||0,i=UB(n,YB),o=r[0][0],s=r[1][0],l=o-n/2,c=s-n/2,u=r[0][1],p=r[1][1],d=u-i+n/2,h=p-i+n/2,f=u-o,m=p-s,g=f+n,v=m+n;g$(e,t,"main",o,s,f,m),a.transformable&&(g$(e,t,"w",l,c,i,v),g$(e,t,"e",d,c,i,v),g$(e,t,"n",l,c,g,i),g$(e,t,"s",l,h,g,i),g$(e,t,"nw",l,c,i,i),g$(e,t,"ne",d,c,i,i),g$(e,t,"sw",l,h,i,i),g$(e,t,"se",d,h,i,i))}function m$(e,t){var r=t.__brushOption,a=r.transformable,n=t.childAt(0);n.useStyle(v$(r)),n.attr({silent:!a,cursor:a?"move":"default"}),Object(Sa["k"])([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(r){var n=t.childOfName(r.join("")),i=1===r.length?_$(e,r[0]):x$(e,r);n&&n.attr({silent:!a,invisible:!a,cursor:a?KB[i]+"-resize":null})}))}function g$(e,t,r,a,n,i,o){var s=t.childOfName(r);s&&s.setShape(T$(C$(e,t,[[a,n],[a+i,n+o]])))}function v$(e){return Object(Sa["i"])({strokeNoScale:!0},e.brushStyle)}function y$(e,t,r,a){var n=[GB(e,r),GB(t,a)],i=[UB(e,r),UB(t,a)];return[[n[0],i[0]],[n[1],i[1]]]}function b$(e){return z_(e.group)}function _$(e,t){var r={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=$_(r[t],b$(e));return a[n]}function x$(e,t){var r=[_$(e,t[0]),_$(e,t[1])];return("e"===r[0]||"w"===r[0])&&r.reverse(),r.join("")}function w$(e,t,r,a,n,i){var o=r.__brushOption,s=e.toRectRange(o.range),l=D$(t,n,i);Object(Sa["k"])(a,(function(e){var t=ZB[e];s[t[0]][t[1]]+=l[t[0]]})),o.range=e.fromRectRange(y$(s[0][0],s[1][0],s[0][1],s[1][1])),i$(t,r),u$(t,{isEnd:!1})}function S$(e,t,r,a){var n=t.__brushOption.range,i=D$(e,r,a);Object(Sa["k"])(n,(function(e){e[0]+=i[0],e[1]+=i[1]})),i$(e,t),u$(e,{isEnd:!1})}function D$(e,t,r){var a=e.group,n=a.transformCoordToLocal(t,r),i=a.transformCoordToLocal(0,0);return[n[0]-i[0],n[1]-i[1]]}function C$(e,t,r){var a=l$(e,t);return a&&a!==$B?a.clipPath(r,e._transform):Object(Sa["d"])(r)}function T$(e){var t=GB(e[0][0],e[1][0]),r=GB(e[0][1],e[1][1]),a=UB(e[0][0],e[1][0]),n=UB(e[0][1],e[1][1]);return{x:t,y:r,width:a-t,height:n-r}}function I$(e,t,r){if(e._brushType&&!E$(e,t.offsetX,t.offsetY)){var a=e._zr,n=e._covers,i=s$(e,t,r);if(!e._dragging)for(var o=0;o<n.length;o++){var s=n[o].__brushOption;if(i&&(i===$B||s.panelId===i.panelId)&&R$[s.brushType].contain(n[o],r[0],r[1]))return}i&&a.setCursorStyle("crosshair")}}function O$(e){var t=e.event;t.preventDefault&&t.preventDefault()}function M$(e,t,r){return e.childOfName("main").contain(t,r)}function A$(e,t,r,a){var n,i=e._creatingCover,o=e._creatingPanel,s=e._brushOption;if(e._track.push(r.slice()),p$(e)||i){if(o&&!i){"single"===s.brushMode&&c$(e);var l=Object(Sa["d"])(s);l.brushType=k$(l.brushType,o),l.panelId=o===$B?null:o.panelId,i=e._creatingCover=t$(e,l),e._covers.push(i)}if(i){var c=R$[k$(e._brushType,o)],u=i.__brushOption;u.range=c.getCreatingRange(C$(e,i,e._track)),a&&(r$(e,i),c.updateCommon(e,i)),a$(e,i),n={isEnd:a}}}else a&&"single"===s.brushMode&&s.removeOnClick&&s$(e,t,r)&&c$(e)&&(n={isEnd:a,removeOnClick:!0});return n}function k$(e,t){return"auto"===e?t.defaultBrushType:e}var P$={mousedown:function(e){if(this._dragging)N$(this,e);else if(!e.target||!e.target.draggable){O$(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null;var r=this._creatingPanel=s$(this,e,t);r&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,r=e.offsetY,a=this.group.transformCoordToLocal(t,r);if(I$(this,e,a),this._dragging){O$(e);var n=A$(this,e,a,!1);n&&u$(this,n)}},mouseup:function(e){N$(this,e)}};function N$(e,t){if(e._dragging){O$(t);var r=t.offsetX,a=t.offsetY,n=e.group.transformCoordToLocal(r,a),i=A$(e,t,n,!0);e._dragging=!1,e._track=[],e._creatingCover=null,i&&u$(e,i)}}function E$(e,t,r){var a=e._zr;return t<0||t>a.getWidth()||r<0||r>a.getHeight()}var R$={lineX:L$(0),lineY:L$(1),rect:{createCover:function(e,t){function r(e){return e}return h$({toRectRange:r,fromRectRange:r},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=d$(e);return y$(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,r,a){f$(e,t,r,a)},updateCommon:m$,contain:M$},polygon:{createCover:function(e,t){var r=new Bs;return r.add(new Yb({name:"main",style:v$(t),silent:!0})),r},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Wb({name:"main",draggable:!0,drift:Object(Sa["h"])(S$,e,t),ondragend:Object(Sa["h"])(u$,e,{isEnd:!0})}))},updateCoverShape:function(e,t,r,a){t.childAt(0).setShape({points:C$(e,t,r)})},updateCommon:m$,contain:M$}};function L$(e){return{createCover:function(t,r){return h$({toRectRange:function(t){var r=[t,[0,100]];return e&&r.reverse(),r},fromRectRange:function(t){return t[e]}},t,r,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var r=d$(t),a=GB(r[0][e],r[1][e]),n=UB(r[0][e],r[1][e]);return[a,n]},updateCoverShape:function(t,r,a,n){var i,o=l$(t,r);if(o!==$B&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(e);else{var s=t._zr;i=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[a,i];e&&l.reverse(),f$(t,r,l,n)},updateCommon:m$,contain:M$}}var j$=e$;function F$(e){return e=B$(e),function(t){return H_(t,e)}}function V$(e,t){return e=B$(e),function(r){var a=null!=t?t:r,n=a?e.width:e.height,i=a?e.x:e.y;return[i,i+(n||0)]}}function z$(e,t,r){var a=B$(e);return function(e,n){return a.contain(n[0],n[1])&&!LE(e,t,r)}}function B$(e){return Hn.create(e)}var $$=["axisLine","axisTickLabel","axisName"],G$=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.init=function(t,r){e.prototype.init.apply(this,arguments),(this._brushController=new j$(r.getZr())).on("brush",Sa["c"](this._onBrush,this))},t.prototype.render=function(e,t,r,a){if(!U$(e,t,a)){this.axisModel=e,this.api=r,this.group.removeAll();var n=this._axisGroup;if(this._axisGroup=new Bs,this.group.add(this._axisGroup),e.get("show")){var i=H$(e,t),o=i.coordinateSystem,s=e.getAreaSelectStyle(),l=s.width,c=e.axis.dim,u=o.getAxisLayout(c),p=Sa["m"]({strokeContainThreshold:l},u),d=new IN(e,p);Sa["k"]($$,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(p,s,e,i,l,r),W_(n,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,t,r,a,n,i){var o=r.axis.getExtent(),s=o[1]-o[0],l=Math.min(30,.1*Math.abs(s)),c=Hn.create({x:o[0],y:-n/2,width:s,height:n});c.x-=l,c.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:F$(c),isTargetByCursor:z$(c,i,a),getLinearBrushOtherExtent:V$(c,0)}]).enableBrush({brushType:"lineX",brushStyle:t,removeOnClick:!0}).updateCovers(W$(r))},t.prototype._onBrush=function(e){var t=e.areas,r=this.axisModel,a=r.axis,n=Sa["H"](t,(function(e){return[a.coordToData(e.range[0],!0),a.coordToData(e.range[1],!0)]}));(!r.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:r.id,intervals:n})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(Gy);function U$(e,t,r){return r&&"axisAreaSelect"===r.type&&t.findComponents({mainType:"parallelAxis",query:r})[0]===e}function W$(e){var t=e.axis;return Sa["H"](e.activeIntervals,(function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}}))}function H$(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}var q$=G$,Y$={type:"axisAreaSelect",event:"axisAreaSelected"};function X$(e){e.registerAction(Y$,(function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},(function(t){t.axis.model.setActiveIntervals(e.intervals)}))})),e.registerAction("parallelAxisExpand",(function(e,t){t.eachComponent({mainType:"parallel",query:e},(function(t){t.setAxisExpand(e)}))}))}var Z$={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function K$(e){e.registerComponentView(vB),e.registerComponentModel(bB),e.registerCoordinateSystem("parallel",VB),e.registerPreprocessor(uB),e.registerComponentModel(BB),e.registerComponentView(q$),Dk(e,"parallel",BB,Z$),X$(e)}function J$(e){JD(K$),e.registerChartView(rB),e.registerSeriesModel(oB),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,cB)}var Q$=function(){function e(){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 e}(),eG=function(e){function t(t){return e.call(this,t)||this}return xa(t,e),t.prototype.getDefaultShape=function(){return new Q$},t.prototype.buildPath=function(e,t){var r=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),"vertical"===t.orient?(e.lineTo(t.x2+r,t.y2),e.bezierCurveTo(t.cpx2+r,t.cpy2,t.cpx1+r,t.cpy1,t.x1+r,t.y1)):(e.lineTo(t.x2,t.y2+r),e.bezierCurveTo(t.cpx2,t.cpy2+r,t.cpx1,t.cpy1+r,t.x1,t.y1+r)),e.closePath()},t.prototype.highlight=function(){Id(this)},t.prototype.downplay=function(){Od(this)},t}(lp),tG=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r._focusAdjacencyDisabled=!1,r}return xa(t,e),t.prototype.render=function(e,t,r){var a=this,n=e.getGraph(),i=this.group,o=e.layoutInfo,s=o.width,l=o.height,c=e.getData(),u=e.getData("edge"),p=e.get("orient");this._model=e,i.removeAll(),i.x=o.x,i.y=o.y,n.eachEdge((function(t){var r=new eG,a=Up(r);a.dataIndex=t.dataIndex,a.seriesIndex=e.seriesIndex,a.dataType="edge";var n,o,c,d,h,f,m,g,v=t.getModel(),y=v.getModel("lineStyle"),b=y.get("curveness"),_=t.node1.getLayout(),x=t.node1.getModel(),w=x.get("localX"),S=x.get("localY"),D=t.node2.getLayout(),C=t.node2.getModel(),T=C.get("localX"),I=C.get("localY"),O=t.getLayout();r.shape.extent=Math.max(1,O.dy),r.shape.orient=p,"vertical"===p?(n=(null!=w?w*s:_.x)+O.sy,o=(null!=S?S*l:_.y)+_.dy,c=(null!=T?T*s:D.x)+O.ty,d=null!=I?I*l:D.y,h=n,f=o*(1-b)+d*b,m=c,g=o*b+d*(1-b)):(n=(null!=w?w*s:_.x)+_.dx,o=(null!=S?S*l:_.y)+O.sy,c=null!=T?T*s:D.x,d=(null!=I?I*l:D.y)+O.ty,h=n*(1-b)+c*b,f=o,m=n*b+c*(1-b),g=d),r.setShape({x1:n,y1:o,x2:c,y2:d,cpx1:h,cpy1:f,cpx2:m,cpy2:g}),r.useStyle(y.getItemStyle()),rG(r.style,p,t);var M=""+v.get("value"),A=bh(v,"edgeLabel");yh(r,A,{labelFetcher:{getFormattedLabel:function(t,r,a,n,i,o){return e.getFormattedLabel(t,r,"edge",n,Object(Sa["Q"])(i,A.normal&&A.normal.get("formatter"),M),o)}},labelDataIndex:t.dataIndex,defaultText:M}),r.setTextConfig({position:"inside"});var k=v.getModel("emphasis");Zd(r,v,"lineStyle",(function(e){var r=e.getItemStyle();return rG(r,p,t),r})),i.add(r),u.setItemGraphicEl(t.dataIndex,r);var P=k.get("focus");Hd(r,"adjacency"===P?t.getAdjacentDataIndices():"trajectory"===P?t.getTrajectoryDataIndices():P,k.get("blurScope"),k.get("disabled"))})),n.eachNode((function(t){var r=t.getLayout(),a=t.getModel(),n=a.get("localX"),o=a.get("localY"),u=a.getModel("emphasis"),p=a.get(["itemStyle","borderRadius"])||0,d=new Cp({shape:{x:null!=n?n*s:r.x,y:null!=o?o*l:r.y,width:r.dx,height:r.dy,r:p},style:a.getModel("itemStyle").getItemStyle(),z2:10});yh(d,bh(a),{labelFetcher:{getFormattedLabel:function(t,r){return e.getFormattedLabel(t,r,"node")}},labelDataIndex:t.dataIndex,defaultText:t.id}),d.disableLabelAnimation=!0,d.setStyle("fill",t.getVisual("color")),d.setStyle("decal",t.getVisual("style").decal),Zd(d,a),i.add(d),c.setItemGraphicEl(t.dataIndex,d),Up(d).dataType="node";var h=u.get("focus");Hd(d,"adjacency"===h?t.getAdjacentDataIndices():"trajectory"===h?t.getTrajectoryDataIndices():h,u.get("blurScope"),u.get("disabled"))})),c.eachItemGraphicEl((function(t,n){var i=c.getItemModel(n);i.get("draggable")&&(t.drift=function(t,i){a._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=i,this.dirty(),r.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:c.getRawIndex(n),localX:this.shape.x/s,localY:this.shape.y/l})},t.ondragend=function(){a._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move")})),!this._data&&e.isAnimationEnabled()&&i.setClipPath(aG(i.getBoundingRect(),e,(function(){i.removeClipPath()}))),this._data=e.getData()},t.prototype.dispose=function(){},t.type="sankey",t}(ux);function rG(e,t,r){switch(e.fill){case"source":e.fill=r.node1.getVisual("color"),e.decal=r.node1.getVisual("style").decal;break;case"target":e.fill=r.node2.getVisual("color"),e.decal=r.node2.getVisual("style").decal;break;case"gradient":var a=r.node1.getVisual("color"),n=r.node2.getVisual("color");Object(Sa["C"])(a)&&Object(Sa["C"])(n)&&(e.fill=new d_(0,0,+("horizontal"===t),+("vertical"===t),[{color:a,offset:0},{color:n,offset:1}]))}}function aG(e,t,r){var a=new Cp({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return lh(a,{shape:{width:e.width+20}},t,r),a}var nG=tG,iG=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.getInitialData=function(e,t){var r=e.edges||e.links,a=e.data||e.nodes,n=e.levels;this.levelModels=[];for(var i=this.levelModels,o=0;o<n.length;o++)null!=n[o].depth&&n[o].depth>=0&&(i[n[o].depth]=new Uh(n[o],this,t));if(a&&r){var s=wz(a,r,this,!0,l);return s.data}function l(e,t){e.wrapMethod("getItemModel",(function(e,t){var r=e.parentModel,a=r.getData().getItemLayout(t);if(a){var n=a.depth,i=r.levelModels[n];i&&(e.parentModel=i)}return e})),t.wrapMethod("getItemModel",(function(e,t){var r=e.parentModel,a=r.getGraph().getEdgeByIndex(t),n=a.node1.getLayout();if(n){var i=n.depth,o=r.levelModels[i];o&&(e.parentModel=o)}return e}))}},t.prototype.setNodePosition=function(e,t){var r=this.option.data||this.option.nodes,a=r[e];a.localX=t[0],a.localY=t[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,r){function a(e){return isNaN(e)||null==e}if("edge"===r){var n=this.getDataParams(e,r),i=n.data,o=n.value,s=i.source+" -- "+i.target;return py("nameValue",{name:s,value:o,noValue:a(o)})}var l=this.getGraph().getNodeByIndex(e),c=l.getLayout().value,u=this.getDataParams(e,r).data.name;return py("nameValue",{name:null!=u?u+"":null,value:c,noValue:a(c)})},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(t,r){var a=e.prototype.getDataParams.call(this,t,r);if(null==a.value&&"node"===r){var n=this.getGraph().getNodeByIndex(t),i=n.getLayout().value;a.value=i}return a},t.type="series.sankey",t.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},t}(By),oG=iG;function sG(e,t){e.eachSeriesByType("sankey",(function(e){var r=e.get("nodeWidth"),a=e.get("nodeGap"),n=lG(e,t);e.layoutInfo=n;var i=n.width,o=n.height,s=e.getGraph(),l=s.nodes,c=s.edges;uG(l);var u=Sa["n"](l,(function(e){return 0===e.getLayout().value})),p=0!==u.length?0:e.get("layoutIterations"),d=e.get("orient"),h=e.get("nodeAlign");cG(l,c,r,a,i,o,p,d,h)}))}function lG(e,t){return nm(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function cG(e,t,r,a,n,i,o,s,l){pG(e,t,r,n,i,s,l),gG(e,t,i,n,a,o,s),MG(e,s)}function uG(e){Sa["k"](e,(function(e){var t=IG(e.outEdges,TG),r=IG(e.inEdges,TG),a=e.getValue()||0,n=Math.max(t,r,a);e.setLayout({value:n},!0)}))}function pG(e,t,r,a,n,i,o){for(var s=[],l=[],c=[],u=[],p=0,d=0;d<t.length;d++)s[d]=1;for(d=0;d<e.length;d++)l[d]=e[d].inEdges.length,0===l[d]&&c.push(e[d]);var h=-1;while(c.length){for(var f=0;f<c.length;f++){var m=c[f],g=m.hostGraph.data.getRawDataItem(m.dataIndex),v=null!=g.depth&&g.depth>=0;v&&g.depth>h&&(h=g.depth),m.setLayout({depth:v?g.depth:p},!0),"vertical"===i?m.setLayout({dy:r},!0):m.setLayout({dx:r},!0);for(var y=0;y<m.outEdges.length;y++){var b=m.outEdges[y],_=t.indexOf(b);s[_]=0;var x=b.node2,w=e.indexOf(x);0===--l[w]&&u.indexOf(x)<0&&u.push(x)}}++p,c=u,u=[]}for(d=0;d<s.length;d++)if(1===s[d])throw new Error("Sankey is a DAG, the original data has cycle!");var S=h>p-1?h:p-1;o&&"left"!==o&&hG(e,o,i,S);var D="vertical"===i?(n-r)/S:(a-r)/S;mG(e,D,i)}function dG(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function hG(e,t,r,a){if("right"===t){var n=[],i=e,o=0;while(i.length){for(var s=0;s<i.length;s++){var l=i[s];l.setLayout({skNodeHeight:o},!0);for(var c=0;c<l.inEdges.length;c++){var u=l.inEdges[c];n.indexOf(u.node1)<0&&n.push(u.node1)}}i=n,n=[],++o}Sa["k"](e,(function(e){dG(e)||e.setLayout({depth:Math.max(0,a-e.getLayout().skNodeHeight)},!0)}))}else"justify"===t&&fG(e,a)}function fG(e,t){Sa["k"](e,(function(e){dG(e)||e.outEdges.length||e.setLayout({depth:t},!0)}))}function mG(e,t,r){Sa["k"](e,(function(e){var a=e.getLayout().depth*t;"vertical"===r?e.setLayout({y:a},!0):e.setLayout({x:a},!0)}))}function gG(e,t,r,a,n,i,o){var s=vG(e,o);yG(s,t,r,a,n,o),bG(s,n,r,a,o);for(var l=1;i>0;i--)l*=.99,_G(s,l,o),bG(s,n,r,a,o),OG(s,l,o),bG(s,n,r,a,o)}function vG(e,t){var r=[],a="vertical"===t?"y":"x",n=oc(e,(function(e){return e.getLayout()[a]}));return n.keys.sort((function(e,t){return e-t})),Sa["k"](n.keys,(function(e){r.push(n.buckets.get(e))})),r}function yG(e,t,r,a,n,i){var o=1/0;Sa["k"](e,(function(e){var t=e.length,s=0;Sa["k"](e,(function(e){s+=e.getLayout().value}));var l="vertical"===i?(a-(t-1)*n)/s:(r-(t-1)*n)/s;l<o&&(o=l)})),Sa["k"](e,(function(e){Sa["k"](e,(function(e,t){var r=e.getLayout().value*o;"vertical"===i?(e.setLayout({x:t},!0),e.setLayout({dx:r},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:r},!0))}))})),Sa["k"](t,(function(e){var t=+e.getValue()*o;e.setLayout({dy:t},!0)}))}function bG(e,t,r,a,n){var i="vertical"===n?"x":"y";Sa["k"](e,(function(e){var o,s,l;e.sort((function(e,t){return e.getLayout()[i]-t.getLayout()[i]}));for(var c=0,u=e.length,p="vertical"===n?"dx":"dy",d=0;d<u;d++)s=e[d],l=c-s.getLayout()[i],l>0&&(o=s.getLayout()[i]+l,"vertical"===n?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),c=s.getLayout()[i]+s.getLayout()[p]+t;var h="vertical"===n?a:r;if(l=c-t-h,l>0){o=s.getLayout()[i]-l,"vertical"===n?s.setLayout({x:o},!0):s.setLayout({y:o},!0),c=o;for(d=u-2;d>=0;--d)s=e[d],l=s.getLayout()[i]+s.getLayout()[p]+t-c,l>0&&(o=s.getLayout()[i]-l,"vertical"===n?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),c=s.getLayout()[i]}}))}function _G(e,t,r){Sa["k"](e.slice().reverse(),(function(e){Sa["k"](e,(function(e){if(e.outEdges.length){var a=IG(e.outEdges,xG,r)/IG(e.outEdges,TG);if(isNaN(a)){var n=e.outEdges.length;a=n?IG(e.outEdges,wG,r)/n:0}if("vertical"===r){var i=e.getLayout().x+(a-CG(e,r))*t;e.setLayout({x:i},!0)}else{var o=e.getLayout().y+(a-CG(e,r))*t;e.setLayout({y:o},!0)}}}))}))}function xG(e,t){return CG(e.node2,t)*e.getValue()}function wG(e,t){return CG(e.node2,t)}function SG(e,t){return CG(e.node1,t)*e.getValue()}function DG(e,t){return CG(e.node1,t)}function CG(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function TG(e){return e.getValue()}function IG(e,t,r){var a=0,n=e.length,i=-1;while(++i<n){var o=+t(e[i],r);isNaN(o)||(a+=o)}return a}function OG(e,t,r){Sa["k"](e,(function(e){Sa["k"](e,(function(e){if(e.inEdges.length){var a=IG(e.inEdges,SG,r)/IG(e.inEdges,TG);if(isNaN(a)){var n=e.inEdges.length;a=n?IG(e.inEdges,DG,r)/n:0}if("vertical"===r){var i=e.getLayout().x+(a-CG(e,r))*t;e.setLayout({x:i},!0)}else{var o=e.getLayout().y+(a-CG(e,r))*t;e.setLayout({y:o},!0)}}}))}))}function MG(e,t){var r="vertical"===t?"x":"y";Sa["k"](e,(function(e){e.outEdges.sort((function(e,t){return e.node2.getLayout()[r]-t.node2.getLayout()[r]})),e.inEdges.sort((function(e,t){return e.node1.getLayout()[r]-t.node1.getLayout()[r]}))})),Sa["k"](e,(function(e){var t=0,r=0;Sa["k"](e.outEdges,(function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy})),Sa["k"](e.inEdges,(function(e){e.setLayout({ty:r},!0),r+=e.getLayout().dy}))}))}function AG(e){e.eachSeriesByType("sankey",(function(e){var t=e.getGraph(),r=t.nodes,a=t.edges;if(r.length){var n=1/0,i=-1/0;Sa["k"](r,(function(e){var t=e.getLayout().value;t<n&&(n=t),t>i&&(i=t)})),Sa["k"](r,(function(t){var r=new MF({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:e.get("color")}),a=r.mapValueToVisual(t.getLayout().value),o=t.getModel().get(["itemStyle","color"]);null!=o?(t.setVisual("color",o),t.setVisual("style",{fill:o})):(t.setVisual("color",a),t.setVisual("style",{fill:a}))}))}a.length&&Sa["k"](a,(function(e){var t=e.getModel().get("lineStyle");e.setVisual("style",t)}))}))}function kG(e){e.registerChartView(nG),e.registerSeriesModel(oG),e.registerLayout(sG),e.registerVisual(AG),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},(function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])}))}))}var PG=function(){function e(){}return e.prototype.getInitialData=function(e,t){var r,a,n=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=i.get("type");"category"===o?(e.layout="horizontal",r=n.getOrdinalMeta(),a=!0):"category"===s?(e.layout="vertical",r=i.getOrdinalMeta(),a=!0):e.layout=e.layout||"horizontal";var l=["x","y"],c="horizontal"===e.layout?0:1,u=this._baseAxisDim=l[c],p=l[1-c],d=[n,i],h=d[c].get("type"),f=d[1-c].get("type"),m=e.data;if(m&&a){var g=[];Sa["k"](m,(function(e,t){var r;Sa["t"](e)?(r=e.slice(),e.unshift(t)):Sa["t"](e.value)?(r=Sa["m"]({},e),r.value=r.value.slice(),e.value.unshift(t)):r=e,g.push(r)})),e.data=g}var v=this.defaultValueDimensions,y=[{name:u,type:VI(h),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:p,type:VI(f),dimsDef:v.slice()}];return HA(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:Sa["h"](Am,y,this)})},e.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},e}(),NG=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return xa(t,e),t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.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},t}(By);Object(Sa["K"])(NG,PG,!0);var EG=NG,RG=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(e,t,r){var a=e.getData(),n=this.group,i=this._data;this._data||n.removeAll();var o="horizontal"===e.get("layout")?1:0;a.diff(i).add((function(e){if(a.hasValue(e)){var t=a.getItemLayout(e),r=FG(t,a,e,o,!0);a.setItemGraphicEl(e,r),n.add(r)}})).update((function(e,t){var r=i.getItemGraphicEl(t);if(a.hasValue(e)){var s=a.getItemLayout(e);r?(hh(r),VG(s,r,a,e)):r=FG(s,a,e,o),n.add(r),a.setItemGraphicEl(e,r)}else n.remove(r)})).remove((function(e){var t=i.getItemGraphicEl(e);t&&n.remove(t)})).execute(),this._data=a},t.prototype.remove=function(e){var t=this.group,r=this._data;this._data=null,r&&r.eachItemGraphicEl((function(e){e&&t.remove(e)}))},t.type="boxplot",t}(ux),LG=function(){function e(){}return e}(),jG=function(e){function t(t){var r=e.call(this,t)||this;return r.type="boxplotBoxPath",r}return xa(t,e),t.prototype.getDefaultShape=function(){return new LG},t.prototype.buildPath=function(e,t){var r=t.points,a=0;for(e.moveTo(r[a][0],r[a][1]),a++;a<4;a++)e.lineTo(r[a][0],r[a][1]);for(e.closePath();a<r.length;a++)e.moveTo(r[a][0],r[a][1]),a++,e.lineTo(r[a][0],r[a][1])},t}(lp);function FG(e,t,r,a,n){var i=e.ends,o=new jG({shape:{points:n?zG(i,a,e):i}});return VG(e,o,t,r,n),o}function VG(e,t,r,n,i){var o=r.hostModel,s=a[i?"initProps":"updateProps"];s(t,{shape:{points:e.ends}},o,n),t.useStyle(r.getItemVisual(n,"style")),t.style.strokeNoScale=!0,t.z2=100;var l=r.getItemModel(n),c=l.getModel("emphasis");Zd(t,l),Hd(t,c.get("focus"),c.get("blurScope"),c.get("disabled"))}function zG(e,t,r){return Sa["H"](e,(function(e){return e=e.slice(),e[t]=r.initBaseline,e}))}var BG=RG,$G=Sa["k"];function GG(e){var t=UG(e);$G(t,(function(e){var t=e.seriesModels;t.length&&(WG(e),$G(t,(function(t,r){HG(t,e.boxOffsetList[r],e.boxWidthList[r])})))}))}function UG(e){var t=[],r=[];return e.eachSeriesByType("boxplot",(function(e){var a=e.getBaseAxis(),n=Sa["r"](r,a);n<0&&(n=r.length,r[n]=a,t[n]={axis:a,seriesModels:[]}),t[n].seriesModels.push(e)})),t}function WG(e){var t,r=e.axis,a=e.seriesModels,n=a.length,i=e.boxWidthList=[],o=e.boxOffsetList=[],s=[];if("category"===r.type)t=r.getBandWidth();else{var l=0;$G(a,(function(e){l=Math.max(l,e.getData().count())}));var c=r.getExtent();t=Math.abs(c[1]-c[0])/l}$G(a,(function(e){var r=e.get("boxWidth");Sa["t"](r)||(r=[r,r]),s.push([rl(r[0],t)||0,rl(r[1],t)||0])}));var u=.8*t-2,p=u/n*.3,d=(u-p*(n-1))/n,h=d/2-u/2;$G(a,(function(e,t){o.push(h),h+=p+d,i.push(Math.min(Math.max(d,s[t][0]),s[t][1]))}))}function HG(e,t,r){var a=e.coordinateSystem,n=e.getData(),i=r/2,o="horizontal"===e.get("layout")?0:1,s=1-o,l=["x","y"],c=n.mapDimension(l[o]),u=n.mapDimensionsAll(l[s]);if(!(null==c||u.length<5))for(var p=0;p<n.count();p++){var d=n.get(c,p),h=b(d,u[2],p),f=b(d,u[0],p),m=b(d,u[1],p),g=b(d,u[3],p),v=b(d,u[4],p),y=[];_(y,m,!1),_(y,g,!0),y.push(f,m,v,g),x(y,f),x(y,v),x(y,h),n.setItemLayout(p,{initBaseline:h[s],ends:y})}function b(e,r,i){var l,c=n.get(r,i),u=[];return u[o]=e,u[s]=c,isNaN(e)||isNaN(c)?l=[NaN,NaN]:(l=a.dataToPoint(u),l[o]+=t),l}function _(e,t,r){var a=t.slice(),n=t.slice();a[o]+=i,n[o]-=i,r?e.push(a,n):e.push(n,a)}function x(e,t){var r=t.slice(),a=t.slice();r[o]-=i,a[o]+=i,e.push(r,a)}}function qG(e,t){t=t||{};for(var r=[],a=[],n=t.boundIQR,i="none"===n||0===n,o=0;o<e.length;o++){var s=nl(e[o].slice()),l=yl(s,.25),c=yl(s,.5),u=yl(s,.75),p=s[0],d=s[s.length-1],h=(null==n?1.5:n)*(u-l),f=i?p:Math.max(p,l-h),m=i?d:Math.min(d,u+h),g=t.itemNameFormatter,v=Object(Sa["w"])(g)?g({value:o}):Object(Sa["C"])(g)?g.replace("{value}",o+""):o+"";r.push([v,f,l,c,u,m]);for(var y=0;y<s.length;y++){var b=s[y];if(b<f||b>m){var _=[v,b];a.push(_)}}}return{boxData:r,outliers:a}}var YG={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==_m){var r="";0,Zm(r)}var a=qG(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:a.boxData},{data:a.outliers}]}};function XG(e){e.registerSeriesModel(EG),e.registerChartView(BG),e.registerLayout(GG),e.registerTransform(YG)}var ZG=["color","borderColor"],KG=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(e,t,r){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,t,r){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,t,r,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},t.prototype.eachRendered=function(e){tx(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e){var t=e.getData(),r=this._data,a=this.group,n=t.getLayout("isSimpleBox"),i=e.get("clip",!0),o=e.coordinateSystem,s=o.getArea&&o.getArea();this._data||a.removeAll(),t.diff(r).add((function(r){if(t.hasValue(r)){var o=t.getItemLayout(r);if(i&&tU(s,o))return;var l=eU(o,r,!0);lh(l,{shape:{points:o.ends}},e,r),rU(l,t,r,n),a.add(l),t.setItemGraphicEl(r,l)}})).update((function(o,l){var c=r.getItemGraphicEl(l);if(t.hasValue(o)){var u=t.getItemLayout(o);i&&tU(s,u)?a.remove(c):(c?(sh(c,{shape:{points:u.ends}},e,o),hh(c)):c=eU(u,o),rU(c,t,o,n),a.add(c),t.setItemGraphicEl(o,c))}else a.remove(c)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&a.remove(t)})).execute(),this._data=t},t.prototype._renderLarge=function(e){this._clear(),oU(e,this.group);var t=e.get("clip",!0)?oM(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,t){var r,a=t.getData(),n=a.getLayout("isSimpleBox");while(null!=(r=e.next())){var i=a.getItemLayout(r),o=eU(i,r);rU(o,a,r,n),o.incremental=!0,this.group.add(o),this._progressiveEls.push(o)}},t.prototype._incrementalRenderLarge=function(e,t){oU(t,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(ux),JG=function(){function e(){}return e}(),QG=function(e){function t(t){var r=e.call(this,t)||this;return r.type="normalCandlestickBox",r}return xa(t,e),t.prototype.getDefaultShape=function(){return new JG},t.prototype.buildPath=function(e,t){var r=t.points;this.__simpleBox?(e.moveTo(r[4][0],r[4][1]),e.lineTo(r[6][0],r[6][1])):(e.moveTo(r[0][0],r[0][1]),e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]),e.lineTo(r[3][0],r[3][1]),e.closePath(),e.moveTo(r[4][0],r[4][1]),e.lineTo(r[5][0],r[5][1]),e.moveTo(r[6][0],r[6][1]),e.lineTo(r[7][0],r[7][1]))},t}(lp);function eU(e,t,r){var a=e.ends;return new QG({shape:{points:r?aU(a,e):a},z2:100})}function tU(e,t){for(var r=!0,a=0;a<t.ends.length;a++)if(e.contain(t.ends[a][0],t.ends[a][1])){r=!1;break}return r}function rU(e,t,r,a){var n=t.getItemModel(r);e.useStyle(t.getItemVisual(r,"style")),e.style.strokeNoScale=!0,e.__simpleBox=a,Zd(e,n)}function aU(e,t){return Sa["H"](e,(function(e){return e=e.slice(),e[1]=t.initBaseline,e}))}var nU=function(){function e(){}return e}(),iU=function(e){function t(t){var r=e.call(this,t)||this;return r.type="largeCandlestickBox",r}return xa(t,e),t.prototype.getDefaultShape=function(){return new nU},t.prototype.buildPath=function(e,t){for(var r=t.points,a=0;a<r.length;)if(this.__sign===r[a++]){var n=r[a++];e.moveTo(n,r[a++]),e.lineTo(n,r[a++])}else a+=3},t}(lp);function oU(e,t,r,a){var n=e.getData(),i=n.getLayout("largePoints"),o=new iU({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});t.add(o);var s=new iU({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});t.add(s);var l=new iU({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});t.add(l),sU(1,o,e,n),sU(-1,s,e,n),sU(0,l,e,n),a&&(o.incremental=!0,s.incremental=!0),r&&r.push(o,s)}function sU(e,t,r,a){var n=r.get(["itemStyle",e>0?"borderColor":"borderColor0"])||r.get(["itemStyle",e>0?"color":"color0"]);0===e&&(n=r.get(["itemStyle","borderColorDoji"]));var i=r.getModel("itemStyle").getItemStyle(ZG);t.useStyle(i),t.style.fill=null,t.style.stroke=n}var lU=KG,cU=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],r}return xa(t,e),t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,t,r){var a=t.getItemLayout(e);return a&&r.rect(a.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.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:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(By);Object(Sa["K"])(cU,PG,!0);var uU=cU;function pU(e){e&&Sa["t"](e.series)&&Sa["k"](e.series,(function(e){Sa["A"](e)&&"k"===e.type&&(e.type="candlestick")}))}var dU=["itemStyle","borderColor"],hU=["itemStyle","borderColor0"],fU=["itemStyle","borderColorDoji"],mU=["itemStyle","color"],gU=["itemStyle","color0"],vU={seriesType:"candlestick",plan:Uy(),performRawSeries:!0,reset:function(e,t){function r(e,t){return t.get(e>0?mU:gU)}function a(e,t){return t.get(0===e?fU:e>0?dU:hU)}if(!t.isSeriesFiltered(e)){var n=e.pipelineContext.large;return!n&&{progress:function(e,t){var n;while(null!=(n=e.next())){var i=t.getItemModel(n),o=t.getItemLayout(n).sign,s=i.getItemStyle();s.fill=r(o,i),s.stroke=a(o,i)||s.fill;var l=t.ensureUniqueItemVisual(n,"style");Object(Sa["m"])(l,s)}}}}}},yU=vU,bU={seriesType:"candlestick",plan:Uy(),reset:function(e){var t=e.coordinateSystem,r=e.getData(),a=xU(e,r),n=0,i=1,o=["x","y"],s=r.getDimensionIndex(r.mapDimension(o[n])),l=Object(Sa["H"])(r.mapDimensionsAll(o[i]),r.getDimensionIndex,r),c=l[0],u=l[1],p=l[2],d=l[3];if(r.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),!(s<0||l.length<4))return{progress:e.pipelineContext.large?f:h};function h(e,r){var o,l=r.getStore();while(null!=(o=e.next())){var h=l.get(s,o),f=l.get(c,o),m=l.get(u,o),g=l.get(p,o),v=l.get(d,o),y=Math.min(f,m),b=Math.max(f,m),_=I(y,h),x=I(b,h),w=I(g,h),S=I(v,h),D=[];O(D,x,0),O(D,_,1),D.push(A(S),A(x),A(w),A(_));var C=r.getItemModel(o),T=!!C.get(["itemStyle","borderColorDoji"]);r.setItemLayout(o,{sign:_U(l,o,f,m,u,T),initBaseline:f>m?x[i]:_[i],ends:D,brushRect:M(g,v,h)})}function I(e,r){var a=[];return a[n]=r,a[i]=e,isNaN(r)||isNaN(e)?[NaN,NaN]:t.dataToPoint(a)}function O(e,t,r){var i=t.slice(),o=t.slice();i[n]=V_(i[n]+a/2,1,!1),o[n]=V_(o[n]-a/2,1,!0),r?e.push(i,o):e.push(o,i)}function M(e,t,r){var o=I(e,r),s=I(t,r);return o[n]-=a/2,s[n]-=a/2,{x:o[0],y:o[1],width:i?a:s[0]-o[0],height:i?s[1]-o[1]:a}}function A(e){return e[n]=V_(e[n],1),e}}function f(r,a){var o,l,h=qO(4*r.count),f=0,m=[],g=[],v=a.getStore(),y=!!e.get(["itemStyle","borderColorDoji"]);while(null!=(l=r.next())){var b=v.get(s,l),_=v.get(c,l),x=v.get(u,l),w=v.get(p,l),S=v.get(d,l);isNaN(b)||isNaN(w)||isNaN(S)?(h[f++]=NaN,f+=3):(h[f++]=_U(v,l,_,x,u,y),m[n]=b,m[i]=w,o=t.dataToPoint(m,null,g),h[f++]=o?o[0]:NaN,h[f++]=o?o[1]:NaN,m[i]=S,o=t.dataToPoint(m,null,g),h[f++]=o?o[1]:NaN)}a.setLayout("largePoints",h)}}};function _U(e,t,r,a,n,i){var o;return o=r>a?-1:r<a?1:i?0:t>0?e.get(n,t-1)<=a?1:-1:1,o}function xU(e,t){var r,a=e.getBaseAxis(),n="category"===a.type?a.getBandWidth():(r=a.getExtent(),Math.abs(r[1]-r[0])/t.count()),i=rl(Object(Sa["P"])(e.get("barMaxWidth"),n),n),o=rl(Object(Sa["P"])(e.get("barMinWidth"),1),n),s=e.get("barWidth");return null!=s?rl(s,n):Math.max(Math.min(n/2,i),o)}var wU=bU;function SU(e){e.registerChartView(lU),e.registerSeriesModel(uU),e.registerPreprocessor(pU),e.registerVisual(yU),e.registerLayout(wU)}function DU(e,t){var r=t.rippleEffectColor||t.color;e.eachChild((function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?r:null,fill:"fill"===t.brushType?r:null}})}))}var CU=function(e){function t(t,r){var a=e.call(this)||this,n=new LO(t,r),i=new Bs;return a.add(n),a.add(i),a.updateData(t,r),a}return xa(t,e),t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var t=e.symbolType,r=e.color,a=e.rippleNumber,n=this.childAt(1),i=0;i<a;i++){var o=Sw(t,-1,-1,2,2,r);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var s=-i/a*e.period+e.effectOffset;o.animate("",!0).when(e.period,{scaleX:e.rippleScale/2,scaleY:e.rippleScale/2}).delay(s).start(),o.animateStyle(!0).when(e.period,{opacity:0}).delay(s).start(),n.add(o)}DU(n,e)},t.prototype.updateEffectAnimation=function(e){for(var t=this._effectCfg,r=this.childAt(1),a=["symbolType","period","rippleScale","rippleNumber"],n=0;n<a.length;n++){var i=a[n];if(t[i]!==e[i])return this.stopEffectAnimation(),void this.startEffectAnimation(e)}DU(r,e)},t.prototype.highlight=function(){Id(this)},t.prototype.downplay=function(){Od(this)},t.prototype.getSymbolType=function(){var e=this.childAt(0);return e&&e.getSymbolType()},t.prototype.updateData=function(e,t){var r=this,a=e.hostModel;this.childAt(0).updateData(e,t);var n=this.childAt(1),i=e.getItemModel(t),o=e.getItemVisual(t,"symbol"),s=Dw(e.getItemVisual(t,"symbolSize")),l=e.getItemVisual(t,"style"),c=l&&l.fill,u=i.getModel("emphasis");n.setScale(s),n.traverse((function(e){e.setStyle("fill",c)}));var p=Cw(e.getItemVisual(t,"symbolOffset"),s);p&&(n.x=p[0],n.y=p[1]);var d=e.getItemVisual(t,"symbolRotate");n.rotation=(d||0)*Math.PI/180||0;var h={};h.showEffectOn=a.get("showEffectOn"),h.rippleScale=i.get(["rippleEffect","scale"]),h.brushType=i.get(["rippleEffect","brushType"]),h.period=1e3*i.get(["rippleEffect","period"]),h.effectOffset=t/e.count(),h.z=a.getShallow("z")||0,h.zlevel=a.getShallow("zlevel")||0,h.symbolType=o,h.color=c,h.rippleEffectColor=i.get(["rippleEffect","color"]),h.rippleNumber=i.get(["rippleEffect","number"]),"render"===h.showEffectOn?(this._effectCfg?this.updateEffectAnimation(h):this.startEffectAnimation(h),this._effectCfg=h):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(e){"emphasis"===e?"render"!==h.showEffectOn&&r.startEffectAnimation(h):"normal"===e&&"render"!==h.showEffectOn&&r.stopEffectAnimation()}),this._effectCfg=h,Hd(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype.fadeOut=function(e){e&&e()},t}(Bs),TU=CU,IU=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.init=function(){this._symbolDraw=new BO(TU)},t.prototype.render=function(e,t,r){var a=e.getData(),n=this._symbolDraw;n.updateData(a,{clipShape:this._getClipShape(e)}),this.group.add(n.group)},t.prototype._getClipShape=function(e){var t=e.coordinateSystem,r=t&&t.getArea&&t.getArea();return e.get("clip",!0)?r:null},t.prototype.updateTransform=function(e,t,r){var a=e.getData();this.group.dirty();var n=IM("").reset(e,t,r);n.progress&&n.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(e){var t=e.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=En(t.getRoamTransform()),this.group.decomposeTransform())},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t}(ux),OU=IU,MU=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return xa(t,e),t.prototype.getInitialData=function(e,t){return MO(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(e,t,r){return r.point(t.getItemLayout(e))},t.type="series.effectScatter",t.dependencies=["grid","polar"],t.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},t}(By),AU=MU;function kU(e){e.registerChartView(OU),e.registerSeriesModel(AU),e.registerLayout(IM("effectScatter"))}var PU=function(e){function t(t,r,a){var n=e.call(this)||this;return n.add(n.createLine(t,r,a)),n._updateEffectSymbol(t,r),n}return xa(t,e),t.prototype.createLine=function(e,t,r){return new JV(e,t,r)},t.prototype._updateEffectSymbol=function(e,t){var r=e.getItemModel(t),a=r.getModel("effect"),n=a.get("symbolSize"),i=a.get("symbol");Sa["t"](n)||(n=[n,n]);var o=e.getItemVisual(t,"style"),s=a.get("color")||o&&o.stroke,l=this.childAt(1);this._symbolType!==i&&(this.remove(l),l=Sw(i,-.5,-.5,1,1,s),l.z2=100,l.culling=!0,this.add(l)),l&&(l.setStyle("shadowColor",s),l.setStyle(a.getItemStyle(["color"])),l.scaleX=n[0],l.scaleY=n[1],l.setColor(s),this._symbolType=i,this._symbolScale=n,this._updateEffectAnimation(e,a,t))},t.prototype._updateEffectAnimation=function(e,t,r){var a=this.childAt(1);if(a){var n=e.getItemLayout(r),i=1e3*t.get("period"),o=t.get("loop"),s=t.get("roundTrip"),l=t.get("constantSpeed"),c=Sa["O"](t.get("delay"),(function(t){return t/e.count()*i/3}));if(a.ignore=!0,this._updateAnimationPoints(a,n),l>0&&(i=this._getLineLength(a)/l*1e3),i!==this._period||o!==this._loop||s!==this._roundTrip){a.stopAnimation();var u=void 0;u=Sa["w"](c)?c(r):c,a.__t>0&&(u=-i*a.__t),this._animateSymbol(a,i,u,o,s)}this._period=i,this._loop=o,this._roundTrip=s}},t.prototype._animateSymbol=function(e,t,r,a,n){if(t>0){e.__t=0;var i=this,o=e.animate("",a).when(n?2*t:t,{__t:n?2:1}).delay(r).during((function(){i._updateSymbolPosition(e)}));a||o.done((function(){i.remove(e)})),o.start()}},t.prototype._getLineLength=function(e){return Fa(e.__p1,e.__cp1)+Fa(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},t.prototype.updateData=function(e,t,r){this.childAt(0).updateData(e,t,r),this._updateEffectSymbol(e,t)},t.prototype._updateSymbolPosition=function(e){var t=e.__p1,r=e.__p2,a=e.__cp1,n=e.__t<1?e.__t:2-e.__t,i=[e.x,e.y],o=i.slice(),s=Wi,l=Hi;i[0]=s(t[0],a[0],r[0],n),i[1]=s(t[1],a[1],r[1],n);var c=e.__t<1?l(t[0],a[0],r[0],n):l(r[0],a[0],t[0],1-n),u=e.__t<1?l(t[1],a[1],r[1],n):l(r[1],a[1],t[1],1-n);e.rotation=-Math.atan2(u,c)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==e.__lastT&&e.__lastT<e.__t?(e.scaleY=1.05*Fa(o,i),1===n&&(i[0]=o[0]+(i[0]-o[0])/2,i[1]=o[1]+(i[1]-o[1])/2)):1===e.__lastT?e.scaleY=2*Fa(t,i):e.scaleY=this._symbolScale[1]),e.__lastT=e.__t,e.ignore=!1,e.x=i[0],e.y=i[1]},t.prototype.updateLayout=function(e,t){this.childAt(0).updateLayout(e,t);var r=e.getItemModel(t).getModel("effect");this._updateEffectAnimation(e,r,t)},t}(Bs),NU=PU,EU=function(e){function t(t,r,a){var n=e.call(this)||this;return n._createPolyline(t,r,a),n}return xa(t,e),t.prototype._createPolyline=function(e,t,r){var a=e.getItemLayout(t),n=new Yb({shape:{points:a}});this.add(n),this._updateCommonStl(e,t,r)},t.prototype.updateData=function(e,t,r){var a=e.hostModel,n=this.childAt(0),i={shape:{points:e.getItemLayout(t)}};sh(n,i,a,t),this._updateCommonStl(e,t,r)},t.prototype._updateCommonStl=function(e,t,r){var a=this.childAt(0),n=e.getItemModel(t),i=r&&r.emphasisLineStyle,o=r&&r.focus,s=r&&r.blurScope,l=r&&r.emphasisDisabled;if(!r||e.hasItemOption){var c=n.getModel("emphasis");i=c.getModel("lineStyle").getLineStyle(),l=c.get("disabled"),o=c.get("focus"),s=c.get("blurScope")}a.useStyle(e.getItemVisual(t,"style")),a.style.fill=null,a.style.strokeNoScale=!0;var u=a.ensureState("emphasis");u.style=i,Hd(this,o,s,l)},t.prototype.updateLayout=function(e,t){var r=this.childAt(0);r.setShape("points",e.getItemLayout(t))},t}(Bs),RU=EU,LU=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return xa(t,e),t.prototype.createLine=function(e,t,r){return new RU(e,t,r)},t.prototype._updateAnimationPoints=function(e,t){this._points=t;for(var r=[0],a=0,n=1;n<t.length;n++){var i=t[n-1],o=t[n];a+=Fa(i,o),r.push(a)}if(0!==a){for(n=0;n<r.length;n++)r[n]/=a;this._offsets=r,this._length=a}else this._length=0},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(e){var t=e.__t<1?e.__t:2-e.__t,r=this._points,a=this._offsets,n=r.length;if(a){var i,o=this._lastFrame;if(t<this._lastFramePercent){var s=Math.min(o+1,n-1);for(i=s;i>=0;i--)if(a[i]<=t)break;i=Math.min(i,n-2)}else{for(i=o;i<n;i++)if(a[i]>t)break;i=Math.min(i-1,n-2)}var l=(t-a[i])/(a[i+1]-a[i]),c=r[i],u=r[i+1];e.x=c[0]*(1-l)+l*u[0],e.y=c[1]*(1-l)+l*u[1];var p=e.__t<1?u[0]-c[0]:c[0]-u[0],d=e.__t<1?u[1]-c[1]:c[1]-u[1];e.rotation=-Math.atan2(d,p)-Math.PI/2,this._lastFrame=i,this._lastFramePercent=t,e.ignore=!1}},t}(NU),jU=LU,FU=function(){function e(){this.polyline=!1,this.curveness=0,this.segs=[]}return e}(),VU=function(e){function t(t){var r=e.call(this,t)||this;return r._off=0,r.hoverDataIdx=-1,r}return xa(t,e),t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new FU},t.prototype.buildPath=function(e,t){var r,a=t.segs,n=t.curveness;if(t.polyline)for(r=this._off;r<a.length;){var i=a[r++];if(i>0){e.moveTo(a[r++],a[r++]);for(var o=1;o<i;o++)e.lineTo(a[r++],a[r++])}}else for(r=this._off;r<a.length;){var s=a[r++],l=a[r++],c=a[r++],u=a[r++];if(e.moveTo(s,l),n>0){var p=(s+c)/2-(l-u)*n,d=(l+u)/2-(c-s)*n;e.quadraticCurveTo(p,d,c,u)}else e.lineTo(c,u)}this.incremental&&(this._off=r,this.notClear=!0)},t.prototype.findDataIndex=function(e,t){var r=this.shape,a=r.segs,n=r.curveness,i=this.style.lineWidth;if(r.polyline)for(var o=0,s=0;s<a.length;){var l=a[s++];if(l>0)for(var c=a[s++],u=a[s++],p=1;p<l;p++){var d=a[s++],h=a[s++];if(ju(c,u,d,h,i,e,t))return o}o++}else for(o=0,s=0;s<a.length;){c=a[s++],u=a[s++],d=a[s++],h=a[s++];if(n>0){var f=(c+d)/2-(u-h)*n,m=(u+h)/2-(d-c)*n;if(Vu(c,u,f,m,d,h,i,e,t))return o}else if(ju(c,u,d,h,i,e,t))return o;o++}return-1},t.prototype.contain=function(e,t){var r=this.transformCoordToLocal(e,t),a=this.getBoundingRect();if(e=r[0],t=r[1],a.contain(e,t)){var n=this.hoverDataIdx=this.findDataIndex(e,t);return n>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,r=t.segs,a=1/0,n=1/0,i=-1/0,o=-1/0,s=0;s<r.length;){var l=r[s++],c=r[s++];a=Math.min(l,a),i=Math.max(l,i),n=Math.min(c,n),o=Math.max(c,o)}e=this._rect=new Hn(a,n,i,o)}return e},t}(lp),zU=function(){function e(){this.group=new Bs}return e.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},e.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},e.prototype.incrementalUpdate=function(e,t){var r=this._newAdded[0],a=t.getLayout("linesPoints"),n=r&&r.shape.segs;if(n&&n.length<2e4){var i=n.length,o=new Float32Array(i+a.length);o.set(n),o.set(a,i),r.setShape({segs:o})}else{this._newAdded=[];var s=this._create();s.incremental=!0,s.setShape({segs:a}),this._setCommon(s,t),s.__startIndex=e.start}},e.prototype.remove=function(){this._clear()},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new VU({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},e.prototype._setCommon=function(e,t,r){var a=t.hostModel;e.setShape({polyline:a.get("polyline"),curveness:a.get(["lineStyle","curveness"])}),e.useStyle(a.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var n=t.getVisual("style");n&&n.stroke&&e.setStyle("stroke",n.stroke),e.setStyle("fill",null);var i=Up(e);i.seriesIndex=a.seriesIndex,e.on("mousemove",(function(t){i.dataIndex=null;var r=e.hoverDataIdx;r>0&&(i.dataIndex=r+e.__startIndex)}))},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),BU=zU,$U={seriesType:"lines",plan:Uy(),reset:function(e){var t=e.coordinateSystem;if(t){var r=e.get("polyline"),a=e.pipelineContext.large;return{progress:function(n,i){var o=[];if(a){var s=void 0,l=n.end-n.start;if(r){for(var c=0,u=n.start;u<n.end;u++)c+=e.getLineCoordsCount(u);s=new Float32Array(l+2*c)}else s=new Float32Array(4*l);var p=0,d=[];for(u=n.start;u<n.end;u++){var h=e.getLineCoords(u,o);r&&(s[p++]=h);for(var f=0;f<h;f++)d=t.dataToPoint(o[f],!1,d),s[p++]=d[0],s[p++]=d[1]}i.setLayout("linesPoints",s)}else for(u=n.start;u<n.end;u++){var m=i.getItemModel(u),g=(h=e.getLineCoords(u,o),[]);if(r)for(var v=0;v<h;v++)g.push(t.dataToPoint(o[v]));else{g[0]=t.dataToPoint(o[0]),g[1]=t.dataToPoint(o[1]);var y=m.get(["lineStyle","curveness"]);+y&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*y,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*y])}i.setItemLayout(u,g)}}}}}},GU=$U,UU=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(e,t,r){var a=e.getData(),n=this._updateLineDraw(a,e),i=e.get("zlevel"),o=e.get(["effect","trailLength"]),s=r.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(i).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&o>0&&(l||s.configLayer(i,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)})),n.updateData(a);var c=e.get("clip",!0)&&oM(e.coordinateSystem,!1,e);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=i,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,r){var a=e.getData(),n=this._updateLineDraw(a,e);n.incrementalPrepareUpdate(a),this._clearLayer(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,r){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,t,r){var a=e.getData(),n=e.pipelineContext;if(!this._finished||n.large||n.progressiveRender)return{update:!0};var i=GU.reset(e,t,r);i.progress&&i.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(r)},t.prototype._updateLineDraw=function(e,t){var r=this._lineDraw,a=this._showEffect(t),n=!!t.get("polyline"),i=t.pipelineContext,o=i.large;return r&&a===this._hasEffet&&n===this._isPolyline&&o===this._isLargeDraw||(r&&r.remove(),r=this._lineDraw=o?new BU:new nz(n?a?jU:RU:a?NU:JV),this._hasEffet=a,this._isPolyline=n,this._isLargeDraw=o),this.group.add(r.group),r},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var t=e.getZr(),r="svg"===t.painter.getType();r||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.type="lines",t}(ux),WU=UU,HU="undefined"===typeof Uint32Array?Array:Uint32Array,qU="undefined"===typeof Float64Array?Array:Float64Array;function YU(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=Object(Sa["H"])(t,(function(e){var t=[e[0].coord,e[1].coord],r={coords:t};return e[0].name&&(r.fromName=e[0].name),e[1].name&&(r.toName=e[1].name),Object(Sa["J"])([r,e[0],e[1]])})))}var XU=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return xa(t,e),t.prototype.init=function(t){t.data=t.data||[],YU(t);var r=this._processFlatCoordsArray(t.data);this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset,r.flatCoords&&(t.data=new Float32Array(r.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(t){if(YU(t),t.data){var r=this._processFlatCoordsArray(t.data);this._flatCoords=r.flatCoords,this._flatCoordsOffset=r.flatCoordsOffset,r.flatCoords&&(t.data=new Float32Array(r.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=Object(Sa["e"])(this._flatCoords,t.flatCoords),this._flatCoordsOffset=Object(Sa["e"])(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var t=this.getData().getItemModel(e),r=t.option instanceof Array?t.option:t.getShallow("coords");return r},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,t){if(this._flatCoordsOffset){for(var r=this._flatCoordsOffset[2*e],a=this._flatCoordsOffset[2*e+1],n=0;n<a;n++)t[n]=t[n]||[],t[n][0]=this._flatCoords[r+2*n],t[n][1]=this._flatCoords[r+2*n+1];return a}var i=this._getCoordsFromItemModel(e);for(n=0;n<i.length;n++)t[n]=t[n]||[],t[n][0]=i[n][0],t[n][1]=i[n][1];return i.length},t.prototype._processFlatCoordsArray=function(e){var t=0;if(this._flatCoords&&(t=this._flatCoords.length),Object(Sa["z"])(e[0])){for(var r=e.length,a=new HU(r),n=new qU(r),i=0,o=0,s=0,l=0;l<r;){s++;var c=e[l++];a[o++]=i+t,a[o++]=c;for(var u=0;u<c;u++){var p=e[l++],d=e[l++];n[i++]=p,n[i++]=d}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,o),flatCoords:n,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},t.prototype.getInitialData=function(e,t){var r=new pO(["value"],this);return r.hasItemOption=!1,r.initData(e.data,[],(function(e,t,a,n){if(e instanceof Array)return NaN;r.hasItemOption=!0;var i=e.value;return null!=i?i instanceof Array?i[n]:i:void 0})),r},t.prototype.formatTooltip=function(e,t,r){var a=this.getData(),n=a.getItemModel(e),i=n.get("name");if(i)return i;var o=n.get("fromName"),s=n.get("toName"),l=[];return null!=o&&l.push(o),null!=s&&l.push(s),py("nameValue",{name:l.join(" > ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?1e4:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?2e4:this.get("progressiveThreshold"):e},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),t=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&t>0?t+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.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}},t}(By),ZU=XU;function KU(e){return e instanceof Array||(e=[e,e]),e}var JU={seriesType:"lines",reset:function(e){var t=KU(e.get("symbol")),r=KU(e.get("symbolSize")),a=e.getData();function n(e,t){var r=e.getItemModel(t),a=KU(r.getShallow("symbol",!0)),n=KU(r.getShallow("symbolSize",!0));a[0]&&e.setItemVisual(t,"fromSymbol",a[0]),a[1]&&e.setItemVisual(t,"toSymbol",a[1]),n[0]&&e.setItemVisual(t,"fromSymbolSize",n[0]),n[1]&&e.setItemVisual(t,"toSymbolSize",n[1])}return a.setVisual("fromSymbol",t&&t[0]),a.setVisual("toSymbol",t&&t[1]),a.setVisual("fromSymbolSize",r&&r[0]),a.setVisual("toSymbolSize",r&&r[1]),{dataEach:a.hasItemOption?n:null}}},QU=JU;function eW(e){e.registerChartView(WU),e.registerSeriesModel(ZU),e.registerLayout(GU),e.registerVisual(QU)}var tW=256,rW=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=gs["d"].createCanvas();this.canvas=e}return e.prototype.update=function(e,t,r,a,n,i){var o=this._getBrush(),s=this._getGradient(n,"inRange"),l=this._getGradient(n,"outOfRange"),c=this.pointSize+this.blurSize,u=this.canvas,p=u.getContext("2d"),d=e.length;u.width=t,u.height=r;for(var h=0;h<d;++h){var f=e[h],m=f[0],g=f[1],v=f[2],y=a(v);p.globalAlpha=y,p.drawImage(o,m-c,g-c)}if(!u.width||!u.height)return u;var b=p.getImageData(0,0,u.width,u.height),_=b.data,x=0,w=_.length,S=this.minOpacity,D=this.maxOpacity,C=D-S;while(x<w){y=_[x+3]/256;var T=4*Math.floor(y*(tW-1));if(y>0){var I=i(y)?s:l;y>0&&(y=y*C+S),_[x++]=I[T],_[x++]=I[T+1],_[x++]=I[T+2],_[x++]=I[T+3]*y*256}else x+=4}return p.putImageData(b,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=gs["d"].createCanvas()),t=this.pointSize+this.blurSize,r=2*t;e.width=r,e.height=r;var a=e.getContext("2d");return a.clearRect(0,0,r,r),a.shadowOffsetX=r,a.shadowBlur=this.blurSize,a.shadowColor="#000",a.beginPath(),a.arc(-t,t,this.pointSize,0,2*Math.PI,!0),a.closePath(),a.fill(),e},e.prototype._getGradient=function(e,t){for(var r=this._gradientPixels,a=r[t]||(r[t]=new Uint8ClampedArray(1024)),n=[0,0,0,0],i=0,o=0;o<256;o++)e[t](o/255,!0,n),a[i++]=n[0],a[i++]=n[1],a[i++]=n[2],a[i++]=n[3];return a},e}(),aW=rW;function nW(e,t,r){var a=e[1]-e[0];t=Sa["H"](t,(function(t){return{interval:[(t.interval[0]-e[0])/a,(t.interval[1]-e[0])/a]}}));var n=t.length,i=0;return function(e){var a;for(a=i;a<n;a++){var o=t[a].interval;if(o[0]<=e&&e<=o[1]){i=a;break}}if(a===n)for(a=i-1;a>=0;a--){o=t[a].interval;if(o[0]<=e&&e<=o[1]){i=a;break}}return a>=0&&a<n&&r[a]}}function iW(e,t){var r=e[1]-e[0];return t=[(t[0]-e[0])/r,(t[1]-e[0])/r],function(e){return e>=t[0]&&e<=t[1]}}function oW(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var sW=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(e,t,r){var a;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(r){r===e&&(a=t)}))})),this._progressiveEls=null,this.group.removeAll();var n=e.coordinateSystem;"cartesian2d"===n.type||"calendar"===n.type?this._renderOnCartesianAndCalendar(e,r,0,e.getData().count()):oW(n)&&this._renderOnGeo(n,e,a,r)},t.prototype.incrementalPrepareRender=function(e,t,r){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,r,a){var n=t.coordinateSystem;n&&(oW(n)?this.render(t,r,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(t,a,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){tx(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,t,r,a,n){var i,o,s,l,c=e.coordinateSystem,u=sM(c,"cartesian2d");if(u){var p=c.getAxis("x"),d=c.getAxis("y");0,i=p.getBandWidth()+.5,o=d.getBandWidth()+.5,s=p.scale.getExtent(),l=d.scale.getExtent()}for(var h=this.group,f=e.getData(),m=e.getModel(["emphasis","itemStyle"]).getItemStyle(),g=e.getModel(["blur","itemStyle"]).getItemStyle(),v=e.getModel(["select","itemStyle"]).getItemStyle(),y=e.get(["itemStyle","borderRadius"]),b=bh(e),_=e.getModel("emphasis"),x=_.get("focus"),w=_.get("blurScope"),S=_.get("disabled"),D=u?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],C=r;C<a;C++){var T=void 0,I=f.getItemVisual(C,"style");if(u){var O=f.get(D[0],C),M=f.get(D[1],C);if(isNaN(f.get(D[2],C))||isNaN(O)||isNaN(M)||O<s[0]||O>s[1]||M<l[0]||M>l[1])continue;var A=c.dataToPoint([O,M]);T=new Cp({shape:{x:A[0]-i/2,y:A[1]-o/2,width:i,height:o},style:I})}else{if(isNaN(f.get(D[1],C)))continue;T=new Cp({z2:1,shape:c.dataToRect([f.get(D[0],C)]).contentShape,style:I})}if(f.hasItemOption){var k=f.getItemModel(C),P=k.getModel("emphasis");m=P.getModel("itemStyle").getItemStyle(),g=k.getModel(["blur","itemStyle"]).getItemStyle(),v=k.getModel(["select","itemStyle"]).getItemStyle(),y=k.get(["itemStyle","borderRadius"]),x=P.get("focus"),w=P.get("blurScope"),S=P.get("disabled"),b=bh(k)}T.shape.r=y;var N=e.getRawValue(C),E="-";N&&null!=N[2]&&(E=N[2]+""),yh(T,b,{labelFetcher:e,labelDataIndex:C,defaultOpacity:I.opacity,defaultText:E}),T.ensureState("emphasis").style=m,T.ensureState("blur").style=g,T.ensureState("select").style=v,Hd(T,x,w,S),T.incremental=n,n&&(T.states.emphasis.hoverLayer=!0),h.add(T),f.setItemGraphicEl(C,T),this._progressiveEls&&this._progressiveEls.push(T)}},t.prototype._renderOnGeo=function(e,t,r,a){var n=r.targetVisuals.inRange,i=r.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new aW;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=e.getViewRect().clone(),c=e.getRoamTransform();l.applyTransform(c);var u=Math.max(l.x,0),p=Math.max(l.y,0),d=Math.min(l.width+l.x,a.getWidth()),h=Math.min(l.height+l.y,a.getHeight()),f=d-u,m=h-p,g=[o.mapDimension("lng"),o.mapDimension("lat"),o.mapDimension("value")],v=o.mapArray(g,(function(t,r,a){var n=e.dataToPoint([t,r]);return n[0]-=u,n[1]-=p,n.push(a),n})),y=r.getExtent(),b="visualMap.continuous"===r.type?iW(y,r.option.range):nW(y,r.getPieceList(),r.option.selected);s.update(v,f,m,n.color.getNormalizer(),{inRange:n.color.getColorMapper(),outOfRange:i.color.getColorMapper()},b);var _=new gp({style:{width:f,height:m,x:u,y:p,image:s.canvas},silent:!0});this.group.add(_)},t.type="heatmap",t}(ux),lW=sW,cW=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.getInitialData=function(e,t){return MO(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=pg.get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},t.type="series.heatmap",t.dependencies=["grid","geo","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(By),uW=cW;function pW(e){e.registerChartView(lW),e.registerSeriesModel(uW)}var dW=["itemStyle","borderWidth"],hW=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],fW=new gb,mW=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(e,t,r){var a=this.group,n=e.getData(),i=this._data,o=e.coordinateSystem,s=o.getBaseAxis(),l=s.isHorizontal(),c=o.master.getRect(),u={ecSize:{width:r.getWidth(),height:r.getHeight()},seriesModel:e,coordSys:o,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:l,valueDim:hW[+l],categoryDim:hW[1-+l]};n.diff(i).add((function(e){if(n.hasValue(e)){var t=IW(n,e),r=gW(n,e,t,u),i=AW(n,u,r);n.setItemGraphicEl(e,i),a.add(i),LW(i,u,r)}})).update((function(e,t){var r=i.getItemGraphicEl(t);if(n.hasValue(e)){var o=IW(n,e),s=gW(n,e,o,u),l=NW(n,s);r&&l!==r.__pictorialShapeStr&&(a.remove(r),n.setItemGraphicEl(e,null),r=null),r?kW(r,u,s):r=AW(n,u,s,!0),n.setItemGraphicEl(e,r),r.__pictorialSymbolMeta=s,a.add(r),LW(r,u,s)}else a.remove(r)})).remove((function(e){var t=i.getItemGraphicEl(e);t&&PW(i,e,t.__pictorialSymbolMeta.animationModel,t)})).execute();var p=e.get("clip",!0)?oM(e.coordinateSystem,!1,e):null;return p?a.setClipPath(p):a.removeClipPath(),this._data=n,this.group},t.prototype.remove=function(e,t){var r=this.group,a=this._data;e.get("animation")?a&&a.eachItemGraphicEl((function(t){PW(a,Up(t).dataIndex,e,t)})):r.removeAll()},t.type="pictorialBar",t}(ux);function gW(e,t,r,a){var n=e.getItemLayout(t),i=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),c=(l||0)*Math.PI/180||0,u=r.get("symbolPatternSize")||2,p=r.isAnimationEnabled(),d={dataIndex:t,layout:n,itemModel:r,symbolType:e.getItemVisual(t,"symbol")||"circle",style:e.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:c,animationModel:p?r:null,hoverScale:p&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};vW(r,i,n,a,d),bW(e,t,n,i,o,d.boundingLength,d.pxSign,u,a,d),_W(r,d.symbolScale,c,a,d);var h=d.symbolSize,f=Cw(r.get("symbolOffset"),h);return xW(r,h,n,i,o,f,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,a,d),d}function vW(e,t,r,a,n){var i,o=a.valueDim,s=e.get("symbolBoundingData"),l=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),c=l.toGlobalCoord(l.dataToCoord(0)),u=1-+(r[o.wh]<=0);if(Sa["t"](s)){var p=[yW(l,s[0])-c,yW(l,s[1])-c];p[1]<p[0]&&p.reverse(),i=p[u]}else i=null!=s?yW(l,s)-c:t?a.coordSysExtent[o.index][u]-c:r[o.wh];n.boundingLength=i,t&&(n.repeatCutLength=r[o.wh]),n.pxSign=i>0?1:-1}function yW(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function bW(e,t,r,a,n,i,o,s,l,c){var u,p=l.valueDim,d=l.categoryDim,h=Math.abs(r[d.wh]),f=e.getItemVisual(t,"symbolSize");u=Sa["t"](f)?f.slice():null==f?["100%","100%"]:[f,f],u[d.index]=rl(u[d.index],h),u[p.index]=rl(u[p.index],a?h:Math.abs(i)),c.symbolSize=u;var m=c.symbolScale=[u[0]/s,u[1]/s];m[p.index]*=(l.isHorizontal?-1:1)*o}function _W(e,t,r,a,n){var i=e.get(dW)||0;i&&(fW.attr({scaleX:t[0],scaleY:t[1],rotation:r}),fW.updateTransform(),i/=fW.getLineScale(),i*=t[a.valueDim.index]),n.valueLineWidth=i||0}function xW(e,t,r,a,n,i,o,s,l,c,u,p){var d=u.categoryDim,h=u.valueDim,f=p.pxSign,m=Math.max(t[h.index]+s,0),g=m;if(a){var v=Math.abs(l),y=Sa["O"](e.get("symbolMargin"),"15%")+"",b=!1;y.lastIndexOf("!")===y.length-1&&(b=!0,y=y.slice(0,y.length-1));var _=rl(y,t[h.index]),x=Math.max(m+2*_,0),w=b?0:2*_,S=xl(a),D=S?a:jW((v+w)/x),C=v-D*m;_=C/2/(b?D:Math.max(D-1,1)),x=m+2*_,w=b?0:2*_,S||"fixed"===a||(D=c?jW((Math.abs(c)+w)/x):0),g=D*x-w,p.repeatTimes=D,p.symbolMargin=_}var T=f*(g/2),I=p.pathPosition=[];I[d.index]=r[d.wh]/2,I[h.index]="start"===o?T:"end"===o?l-T:l/2,i&&(I[0]+=i[0],I[1]+=i[1]);var O=p.bundlePosition=[];O[d.index]=r[d.xy],O[h.index]=r[h.xy];var M=p.barRectShape=Sa["m"]({},r);M[h.wh]=f*Math.max(Math.abs(r[h.wh]),Math.abs(I[h.index]+T)),M[d.wh]=r[d.wh];var A=p.clipShape={};A[d.xy]=-r[d.xy],A[d.wh]=u.ecSize[d.wh],A[h.xy]=0,A[h.wh]=r[h.wh]}function wW(e){var t=e.symbolPatternSize,r=Sw(e.symbolType,-t/2,-t/2,t,t);return r.attr({culling:!0}),"image"!==r.type&&r.setStyle({strokeNoScale:!0}),r}function SW(e,t,r,a){var n=e.__pictorialBundle,i=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=t.valueDim,c=r.repeatTimes||0,u=0,p=i[t.valueDim.index]+o+2*r.symbolMargin;for(EW(e,(function(e){e.__pictorialAnimationIndex=u,e.__pictorialRepeatTimes=c,u<c?RW(e,null,f(u),r,a):RW(e,null,{scaleX:0,scaleY:0},r,a,(function(){n.remove(e)})),u++}));u<c;u++){var d=wW(r);d.__pictorialAnimationIndex=u,d.__pictorialRepeatTimes=c,n.add(d);var h=f(u);RW(d,{x:h.x,y:h.y,scaleX:0,scaleY:0},{scaleX:h.scaleX,scaleY:h.scaleY,rotation:h.rotation},r,a)}function f(e){var t=s.slice(),a=r.pxSign,n=e;return("start"===r.symbolRepeatDirection?a>0:a<0)&&(n=c-1-e),t[l.index]=p*(n-c/2+.5)+s[l.index],{x:t[0],y:t[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function DW(e,t,r,a){var n=e.__pictorialBundle,i=e.__pictorialMainPath;i?RW(i,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,a):(i=e.__pictorialMainPath=wW(r),n.add(i),RW(i,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,a))}function CW(e,t,r){var a=Sa["m"]({},t.barRectShape),n=e.__pictorialBarRect;n?RW(n,null,{shape:a},t,r):(n=e.__pictorialBarRect=new Cp({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,e.add(n))}function TW(e,t,r,n){if(r.symbolClip){var i=e.__pictorialClipPath,o=Sa["m"]({},r.clipShape),s=t.valueDim,l=r.animationModel,c=r.dataIndex;if(i)sh(i,{shape:o},l,c);else{o[s.wh]=0,i=new Cp({shape:o}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;var u={};u[s.wh]=r.clipShape[s.wh],a[n?"updateProps":"initProps"](i,{shape:u},l,c)}}}function IW(e,t){var r=e.getItemModel(t);return r.getAnimationDelayParams=OW,r.isAnimationEnabled=MW,r}function OW(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function MW(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function AW(e,t,r,a){var n=new Bs,i=new Bs;return n.add(i),n.__pictorialBundle=i,i.x=r.bundlePosition[0],i.y=r.bundlePosition[1],r.symbolRepeat?SW(n,t,r):DW(n,t,r),CW(n,r,a),TW(n,t,r,a),n.__pictorialShapeStr=NW(e,r),n.__pictorialSymbolMeta=r,n}function kW(e,t,r){var a=r.animationModel,n=r.dataIndex,i=e.__pictorialBundle;sh(i,{x:r.bundlePosition[0],y:r.bundlePosition[1]},a,n),r.symbolRepeat?SW(e,t,r,!0):DW(e,t,r,!0),CW(e,r,!0),TW(e,t,r,!0)}function PW(e,t,r,a){var n=a.__pictorialBarRect;n&&n.removeTextContent();var i=[];EW(a,(function(e){i.push(e)})),a.__pictorialMainPath&&i.push(a.__pictorialMainPath),a.__pictorialClipPath&&(r=null),Sa["k"](i,(function(e){uh(e,{scaleX:0,scaleY:0},r,t,(function(){a.parent&&a.parent.remove(a)}))})),e.setItemGraphicEl(t,null)}function NW(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function EW(e,t,r){Sa["k"](e.__pictorialBundle.children(),(function(a){a!==e.__pictorialBarRect&&t.call(r,a)}))}function RW(e,t,r,n,i,o){t&&e.attr(t),n.symbolClip&&!i?r&&e.attr(r):r&&a[i?"updateProps":"initProps"](e,r,n.animationModel,n.dataIndex,o)}function LW(e,t,r){var a=r.dataIndex,n=r.itemModel,i=n.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),c=n.getShallow("cursor"),u=i.get("focus"),p=i.get("blurScope"),d=i.get("scale");EW(e,(function(e){if(e instanceof gp){var t=e.style;e.useStyle(Sa["m"]({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},r.style))}else e.useStyle(r.style);var a=e.ensureState("emphasis");a.style=o,d&&(a.scaleX=1.1*e.scaleX,a.scaleY=1.1*e.scaleY),e.ensureState("blur").style=s,e.ensureState("select").style=l,c&&(e.cursor=c),e.z2=r.z2}));var h=t.valueDim.posDesc[+(r.boundingLength>0)],f=e.__pictorialBarRect;f.ignoreClip=!0,yh(f,bh(n),{labelFetcher:t.seriesModel,labelDataIndex:a,defaultText:PO(t.seriesModel.getData(),a),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:h}),Hd(e,u,p,i.get("disabled"))}function jW(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var FW=mW,VW=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return xa(t,e),t.prototype.getInitialData=function(t){return t.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=Xh(qM.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"}}}),t}(qM),zW=VW;function BW(e){e.registerChartView(FW),e.registerSeriesModel(zW),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Object(Sa["h"])(BM,"pictorialBar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,$M("pictorialBar"))}var $W=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r._layers=[],r}return xa(t,e),t.prototype.render=function(e,t,r){var a=e.getData(),n=this,i=this.group,o=e.getLayerSeries(),s=a.getLayout("layoutInfo"),l=s.rect,c=s.boundaryGap;function u(e){return e.name}i.x=0,i.y=l.y+c[0];var p=new RI(this._layersSeries||[],o,u,u),d=[];function h(t,r,s){var l=n._layers;if("remove"!==t){for(var c,u,p=[],h=[],f=o[r].indices,m=0;m<f.length;m++){var g=a.getItemLayout(f[m]),v=g.x,y=g.y0,b=g.y;p.push(v,y),h.push(v,y+b),c=a.getItemVisual(f[m],"style")}var _=a.getItemLayout(f[0]),x=e.getModel("label"),w=x.get("margin"),S=e.getModel("emphasis");if("add"===t){var D=d[r]=new Bs;u=new aM({shape:{points:p,stackedOnPoints:h,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),D.add(u),i.add(D),e.isAnimationEnabled()&&u.setClipPath(GW(u.getBoundingRect(),e,(function(){u.removeClipPath()})))}else{D=l[s];u=D.childAt(0),i.add(D),d[r]=D,sh(u,{shape:{points:p,stackedOnPoints:h}},e),hh(u)}yh(u,bh(e),{labelDataIndex:f[m-1],defaultText:a.getName(f[m-1]),inheritColor:c.fill},{normal:{verticalAlign:"middle"}}),u.setTextConfig({position:null,local:!0});var C=u.getTextContent();C&&(C.x=_.x-w,C.y=_.y0+_.y/2),u.useStyle(c),a.setItemGraphicEl(r,u),Zd(u,e),Hd(u,S.get("focus"),S.get("blurScope"),S.get("disabled"))}else i.remove(l[r])}p.add(Object(Sa["c"])(h,this,"add")).update(Object(Sa["c"])(h,this,"update")).remove(Object(Sa["c"])(h,this,"remove")).execute(),this._layersSeries=o,this._layers=d},t.type="themeRiver",t}(ux);function GW(e,t,r){var a=new Cp({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return lh(a,{shape:{x:e.x-50,width:e.width+100,height:e.height+20}},t,r),a}var UW=$W,WW=2,HW=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new YA(Sa["c"](this.getData,this),Sa["c"](this.getRawData,this))},t.prototype.fixData=function(e){var t=e.length,r={},a=oc(e,(function(e){return r.hasOwnProperty(e[0]+"")||(r[e[0]+""]=-1),e[2]})),n=[];a.buckets.each((function(e,t){n.push({name:t,dataList:e})}));for(var i=n.length,o=0;o<i;++o){for(var s=n[o].name,l=0;l<n[o].dataList.length;++l){var c=n[o].dataList[l][0]+"";r[c]=o}for(var c in r)r.hasOwnProperty(c)&&r[c]!==o&&(r[c]=o,e[t]=[c,0,s],t++)}return e},t.prototype.getInitialData=function(e,t){for(var r=this.getReferringComponents("singleAxis",ec).models[0],a=r.get("type"),n=Sa["n"](e.data,(function(e){return void 0!==e[2]})),i=this.fixData(n||[]),o=[],s=this.nameMap=Sa["f"](),l=0,c=0;c<i.length;++c)o.push(i[c][WW]),s.get(i[c][WW])||(s.set(i[c][WW],l),l++);var u=dO(i,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:VI(a)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,p=new pO(u,this);return p.initData(i),p},t.prototype.getLayerSeries=function(){for(var e=this.getData(),t=e.count(),r=[],a=0;a<t;++a)r[a]=a;var n=e.mapDimension("single"),i=oc(r,(function(t){return e.get("name",t)})),o=[];return i.buckets.each((function(t,r){t.sort((function(t,r){return e.get(n,t)-e.get(n,r)})),o.push({name:r,indices:t})})),o},t.prototype.getAxisTooltipData=function(e,t,r){Sa["t"](e)||(e=e?[e]:[]);for(var a,n=this.getData(),i=this.getLayerSeries(),o=[],s=i.length,l=0;l<s;++l){for(var c=Number.MAX_VALUE,u=-1,p=i[l].indices.length,d=0;d<p;++d){var h=n.get(e[0],i[l].indices[d]),f=Math.abs(h-t);f<=c&&(a=h,c=f,u=i[l].indices[d])}o.push(u)}return{dataIndices:o,nestestValue:a}},t.prototype.formatTooltip=function(e,t,r){var a=this.getData(),n=a.getName(e),i=a.get(a.mapDimension("value"),e);return py("nameValue",{name:n,value:i})},t.type="series.themeRiver",t.dependencies=["singleAxis"],t.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}}},t}(By),qW=HW;function YW(e,t){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),r=e.coordinateSystem,a={},n=r.getRect();a.rect=n;var i=e.get("boundaryGap"),o=r.getAxis();if(a.boundaryGap=i,"horizontal"===o.orient){i[0]=rl(i[0],n.height),i[1]=rl(i[1],n.height);var s=n.height-i[0]-i[1];XW(t,e,s)}else{i[0]=rl(i[0],n.width),i[1]=rl(i[1],n.width);var l=n.width-i[0]-i[1];XW(t,e,l)}t.setLayout("layoutInfo",a)}))}function XW(e,t,r){if(e.count())for(var a,n=t.coordinateSystem,i=t.getLayerSeries(),o=e.mapDimension("single"),s=e.mapDimension("value"),l=Sa["H"](i,(function(t){return Sa["H"](t.indices,(function(t){var r=n.dataToPoint(e.get(o,t));return r[1]=e.get(s,t),r}))})),c=ZW(l),u=c.y0,p=r/c.max,d=i.length,h=i[0].indices.length,f=0;f<h;++f){a=u[f]*p,e.setItemLayout(i[0].indices[f],{layerIndex:0,x:l[0][f][0],y0:a,y:l[0][f][1]*p});for(var m=1;m<d;++m)a+=l[m-1][f][1]*p,e.setItemLayout(i[m].indices[f],{layerIndex:m,x:l[m][f][0],y0:a,y:l[m][f][1]*p})}}function ZW(e){for(var t=e.length,r=e[0].length,a=[],n=[],i=0,o=0;o<r;++o){for(var s=0,l=0;l<t;++l)s+=e[l][o][1];s>i&&(i=s),a.push(s)}for(var c=0;c<r;++c)n[c]=(i-a[c])/2;i=0;for(var u=0;u<r;++u){var p=a[u]+n[u];p>i&&(i=p)}return{y0:n,max:i}}function KW(e){e.registerChartView(UW),e.registerSeriesModel(qW),e.registerLayout(YW),e.registerProcessor(LA("themeRiver"))}var JW=2,QW=4,eH=function(e){function t(t,r,a,n){var i=e.call(this)||this;i.z2=JW,i.textConfig={inside:!0},Up(i).seriesIndex=r.seriesIndex;var o=new Gp({z2:QW,silent:t.getModel().get(["label","silent"])});return i.setTextContent(o),i.updateData(!0,t,r,a,n),i}return xa(t,e),t.prototype.updateData=function(e,t,r,a,n){this.node=t,t.piece=this,r=r||this._seriesModel,a=a||this._ecModel;var i=this;Up(i).dataIndex=t.dataIndex;var o=t.getModel(),s=o.getModel("emphasis"),l=t.getLayout(),c=Sa["m"]({},l);c.label=null;var u=t.getVisual("style");u.lineJoin="bevel";var p=t.getVisual("decal");p&&(u.decal=dS(p,n));var d=aA(o.getModel("itemStyle"),c,!0);Sa["m"](c,d),Sa["k"](Qp,(function(e){var t=i.ensureState(e),r=o.getModel([e,"itemStyle"]);t.style=r.getItemStyle();var a=aA(r,c);a&&(t.shape=a)})),e?(i.setShape(c),i.shape.r=l.r0,lh(i,{shape:{r:l.r}},r,t.dataIndex)):(sh(i,{shape:c},r),hh(i)),i.useStyle(u),this._updateLabel(r);var h=o.getShallow("cursor");h&&i.attr("cursor",h),this._seriesModel=r||this._seriesModel,this._ecModel=a||this._ecModel;var f=s.get("focus"),m="ancestor"===f?t.getAncestorsIndices():"descendant"===f?t.getDescendantIndices():f;Hd(this,m,s.get("blurScope"),s.get("disabled"))},t.prototype._updateLabel=function(e){var t=this,r=this.node.getModel(),a=r.getModel("label"),n=this.node.getLayout(),i=n.endAngle-n.startAngle,o=(n.startAngle+n.endAngle)/2,s=Math.cos(o),l=Math.sin(o),c=this,u=c.getTextContent(),p=this.node.dataIndex,d=a.get("minAngle")/180*Math.PI,h=a.get("show")&&!(null!=d&&Math.abs(i)<d);function f(e,t){var r=e.get(t);return null==r?a.get(t):r}u.ignore=!h,Sa["k"](ed,(function(a){var d="normal"===a?r.getModel("label"):r.getModel([a,"label"]),h="normal"===a,m=h?u:u.ensureState(a),g=e.getFormattedLabel(p,a);h&&(g=g||t.node.name),m.style=_h(d,{},null,"normal"!==a,!0),g&&(m.style.text=g);var v=d.get("show");null==v||h||(m.ignore=!v);var y,b=f(d,"position"),_=h?c:c.states[a],x=_.style.fill;_.textConfig={outsideFill:"inherit"===d.get("color")?x:null,inside:"outside"!==b};var w=f(d,"distance")||0,S=f(d,"align"),D=f(d,"rotate"),C=.5*Math.PI,T=1.5*Math.PI,I=Bu("tangential"===D?Math.PI/2-o:o),O=I>C&&!dl(I-C)&&I<T;"outside"===b?(y=n.r+w,S=O?"right":"left"):S&&"center"!==S?"left"===S?(y=n.r0+w,S=O?"right":"left"):"right"===S&&(y=n.r-w,S=O?"left":"right"):(y=i===2*Math.PI&&0===n.r0?0:(n.r+n.r0)/2,S="center"),m.style.align=S,m.style.verticalAlign=f(d,"verticalAlign")||"middle",m.x=y*s+n.cx,m.y=y*l+n.cy;var M=0;"radial"===D?M=Bu(-o)+(O?Math.PI:0):"tangential"===D?M=Bu(Math.PI/2-o)+(O?Math.PI:0):Sa["z"](D)&&(M=D*Math.PI/180),m.rotation=Bu(M)})),u.dirtyStyle()},t}(jb),tH=eH,rH="sunburstRootToNode",aH="sunburstHighlight",nH="sunburstUnhighlight";function iH(e){e.registerAction({type:rH,update:"updateView"},(function(e,t){function r(t,r){var a=xj(e,[rH],t);if(a){var n=t.getViewRoot();n&&(e.direction=Sj(n,a.node)?"rollUp":"drillDown"),t.resetViewRoot(a.node)}}t.eachComponent({mainType:"series",subType:"sunburst",query:e},r)})),e.registerAction({type:aH,update:"none"},(function(e,t,r){function a(t){var r=xj(e,[aH],t);r&&(e.dataIndex=r.node.dataIndex)}e=Object(Sa["m"])({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},a),r.dispatchAction(Object(Sa["m"])(e,{type:"highlight"}))})),e.registerAction({type:nH,update:"updateView"},(function(e,t,r){e=Object(Sa["m"])({},e),r.dispatchAction(Object(Sa["m"])(e,{type:"downplay"}))}))}var oH=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(e,t,r,a){var n=this;this.seriesModel=e,this.api=r,this.ecModel=t;var i=e.getData(),o=i.tree.root,s=e.getViewRoot(),l=this.group,c=e.get("renderLabelForZeroData"),u=[];s.eachNode((function(e){u.push(e)}));var p=this._oldChildren||[];function d(e,t){function r(e){return e.getId()}function a(r,a){var n=null==r?null:e[r],i=null==a?null:t[a];h(n,i)}0===e.length&&0===t.length||new RI(t,e,r,r).add(a).update(a).remove(Sa["h"](a,null)).execute()}function h(a,n){if(c||!a||a.getValue()||(a=null),a!==o&&n!==o)if(n&&n.piece)a?(n.piece.updateData(!1,a,e,t,r),i.setItemGraphicEl(a.dataIndex,n.piece)):f(n);else if(a){var s=new tH(a,e,t,r);l.add(s),i.setItemGraphicEl(a.dataIndex,s)}}function f(e){e&&e.piece&&(l.remove(e.piece),e.piece=null)}function m(a,i){i.depth>0?(n.virtualPiece?n.virtualPiece.updateData(!1,a,e,t,r):(n.virtualPiece=new tH(a,e,t,r),l.add(n.virtualPiece)),i.piece.off("click"),n.virtualPiece.on("click",(function(e){n._rootToNode(i.parentNode)}))):n.virtualPiece&&(l.remove(n.virtualPiece),n.virtualPiece=null)}d(u,p),m(o,s),this._initEvents(),this._oldChildren=u},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",(function(t){var r=!1,a=e.seriesModel.getViewRoot();a.eachNode((function(a){if(!r&&a.piece&&a.piece===t.target){var n=a.getModel().get("nodeClick");if("rootToNode"===n)e._rootToNode(a);else if("link"===n){var i=a.getModel(),o=i.get("link");if(o){var s=i.get("target",!0)||"_blank";Kf(o,s)}}r=!0}}))}))},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:rH,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,t){var r=t.getData(),a=r.getItemLayout(0);if(a){var n=e[0]-a.cx,i=e[1]-a.cy,o=Math.sqrt(n*n+i*i);return o<=a.r&&o>=a.r0}},t.type="sunburst",t}(ux),sH=oH,lH=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreStyleOnData=!0,r}return xa(t,e),t.prototype.getInitialData=function(e,t){var r={name:e.name,children:e.data};cH(r);var a=this._levelModels=Sa["H"](e.levels||[],(function(e){return new Uh(e,this,t)}),this),n=_j.createTree(r,this,i);function i(e){e.wrapMethod("getItemModel",(function(e,t){var r=n.getNodeByDataIndex(t),i=a[r.depth];return i&&(e.parentModel=i),e}))}return n.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(t){var r=e.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return r.treePathInfo=Dj(a,this),r},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){Lj(this)},t.type="series.sunburst",t.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"},t}(By);function cH(e){var t=0;Sa["k"](e.children,(function(e){cH(e);var r=e.value;Sa["t"](r)&&(r=r[0]),t+=r}));var r=e.value;Sa["t"](r)&&(r=r[0]),(null==r||isNaN(r))&&(r=t),r<0&&(r=0),Sa["t"](e.value)?e.value[0]=r:e.value=r}var uH=lH,pH=Math.PI/180;function dH(e,t,r){t.eachSeriesByType(e,(function(e){var t=e.get("center"),a=e.get("radius");Sa["t"](a)||(a=[0,a]),Sa["t"](t)||(t=[t,t]);var n=r.getWidth(),i=r.getHeight(),o=Math.min(n,i),s=rl(t[0],n),l=rl(t[1],i),c=rl(a[0],o/2),u=rl(a[1],o/2),p=-e.get("startAngle")*pH,d=e.get("minAngle")*pH,h=e.getData().tree.root,f=e.getViewRoot(),m=f.depth,g=e.get("sort");null!=g&&hH(f,g);var v=0;Sa["k"](f.children,(function(e){!isNaN(e.getValue())&&v++}));var y=f.getValue(),b=Math.PI/(y||v)*2,_=f.depth>0,x=f.height-(_?-1:1),w=(u-c)/(x||1),S=e.get("clockwise"),D=e.get("stillShowZeroSum"),C=S?1:-1,T=function(t,r){if(t){var a=r;if(t!==h){var n=t.getValue(),i=0===y&&D?b:n*b;i<d&&(i=d),a=r+C*i;var u=t.depth-m-(_?-1:1),p=c+w*u,f=c+w*(u+1),g=e.getLevelModel(t);if(g){var v=g.get("r0",!0),x=g.get("r",!0),I=g.get("radius",!0);null!=I&&(v=I[0],x=I[1]),null!=v&&(p=rl(v,o/2)),null!=x&&(f=rl(x,o/2))}t.setLayout({angle:i,startAngle:r,endAngle:a,clockwise:S,cx:s,cy:l,r0:p,r:f})}if(t.children&&t.children.length){var O=0;Sa["k"](t.children,(function(e){O+=T(e,r+O)}))}return a-r}};if(_){var I=c,O=c+w,M=2*Math.PI;h.setLayout({angle:M,startAngle:p,endAngle:p+M,clockwise:S,cx:s,cy:l,r0:I,r:O})}T(f,p)}))}function hH(e,t){var r=e.children||[];e.children=fH(r,t),r.length&&Sa["k"](e.children,(function(e){hH(e,t)}))}function fH(e,t){if(Sa["w"](t)){var r=Sa["H"](e,(function(e,t){var r=e.getValue();return{params:{depth:e.depth,height:e.height,dataIndex:e.dataIndex,getValue:function(){return r}},index:t}}));return r.sort((function(e,r){return t(e.params,r.params)})),Sa["H"](r,(function(t){return e[t.index]}))}var a="asc"===t;return e.sort((function(e,t){var r=(e.getValue()-t.getValue())*(a?1:-1);return 0===r?(e.dataIndex-t.dataIndex)*(a?-1:1):r}))}function mH(e){var t={};function r(e,r,a){var n=e;while(n&&n.depth>1)n=n.parentNode;var i=r.getColorFromPalette(n.name||n.dataIndex+"",t);return e.depth>1&&Object(Sa["C"])(i)&&(i=Object(ro["c"])(i,(e.depth-1)/(a-1)*.5)),i}e.eachSeriesByType("sunburst",(function(e){var t=e.getData(),a=t.tree;a.eachNode((function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle();o.fill||(o.fill=r(n,e,a.root.height));var s=t.ensureUniqueItemVisual(n.dataIndex,"style");Object(Sa["m"])(s,o)}))}))}function gH(e){e.registerChartView(sH),e.registerSeriesModel(uH),e.registerLayout(Object(Sa["h"])(dH,"sunburst")),e.registerProcessor(Object(Sa["h"])(LA,"sunburst")),e.registerVisual(mH),iH(e)}var vH={color:"fill",borderColor:"stroke"},yH={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},bH=Zl(),_H=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,t){return MO(null,this)},t.prototype.getDataParams=function(t,r,a){var n=e.prototype.getDataParams.call(this,t,r);return a&&(n.info=bH(a).info),n},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(By),xH=_H;function wH(e,t){return t=t||[0,0],Sa["H"](["x","y"],(function(r,a){var n=this.getAxis(r),i=t[a],o=e[a]/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))}),this)}function SH(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:Sa["c"](wH,e)}}}function DH(e,t){return t=t||[0,0],Sa["H"]([0,1],(function(r){var a=t[r],n=e[r]/2,i=[],o=[];return i[r]=a-n,o[r]=a+n,i[1-r]=o[1-r]=t[1-r],Math.abs(this.dataToPoint(i)[r]-this.dataToPoint(o)[r])}),this)}function CH(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:Sa["c"](DH,e)}}}function TH(e,t){var r=this.getAxis(),a=t instanceof Array?t[0]:t,n=(e instanceof Array?e[0]:e)/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(a-n)-r.dataToCoord(a+n))}function IH(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:Object(Sa["c"])(TH,e)}}}function OH(e,t){return t=t||[0,0],Sa["H"](["Radius","Angle"],(function(r,a){var n="get"+r+"Axis",i=this[n](),o=t[a],s=e[a]/2,l="category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return"Angle"===r&&(l=l*Math.PI/180),l}),this)}function MH(e){var t=e.getRadiusAxis(),r=e.getAngleAxis(),a=t.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:a[1],r0:a[0]},api:{coord:function(a){var n=t.dataToRadius(a[0]),i=r.dataToAngle(a[1]),o=e.coordToPoint([n,i]);return o.push(n,i*Math.PI/180),o},size:Sa["c"](OH,e)}}}function AH(e){var t=e.getRect(),r=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(t,r){return e.dataToPoint(t,r)}}}}function kH(e,t,r,a){return e&&(e.legacy||!1!==e.legacy&&!r&&!a&&"tspan"!==t&&("text"===t||Object(Sa["q"])(e,"text")))}function PH(e,t,r){var a,n,i,o=e;if("text"===t)i=o;else{i={},Object(Sa["q"])(o,"text")&&(i.text=o.text),Object(Sa["q"])(o,"rich")&&(i.rich=o.rich),Object(Sa["q"])(o,"textFill")&&(i.fill=o.textFill),Object(Sa["q"])(o,"textStroke")&&(i.stroke=o.textStroke),Object(Sa["q"])(o,"fontFamily")&&(i.fontFamily=o.fontFamily),Object(Sa["q"])(o,"fontSize")&&(i.fontSize=o.fontSize),Object(Sa["q"])(o,"fontStyle")&&(i.fontStyle=o.fontStyle),Object(Sa["q"])(o,"fontWeight")&&(i.fontWeight=o.fontWeight),n={type:"text",style:i,silent:!0},a={};var s=Object(Sa["q"])(o,"textPosition");r?a.position=s?o.textPosition:"inside":s&&(a.position=o.textPosition),Object(Sa["q"])(o,"textPosition")&&(a.position=o.textPosition),Object(Sa["q"])(o,"textOffset")&&(a.offset=o.textOffset),Object(Sa["q"])(o,"textRotation")&&(a.rotation=o.textRotation),Object(Sa["q"])(o,"textDistance")&&(a.distance=o.textDistance)}return NH(i,e),Object(Sa["k"])(i.rich,(function(e){NH(e,e)})),{textConfig:a,textContent:n}}function NH(e,t){t&&(t.font=t.textFont||t.font,Object(Sa["q"])(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),Object(Sa["q"])(t,"textAlign")&&(e.align=t.textAlign),Object(Sa["q"])(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),Object(Sa["q"])(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),Object(Sa["q"])(t,"textWidth")&&(e.width=t.textWidth),Object(Sa["q"])(t,"textHeight")&&(e.height=t.textHeight),Object(Sa["q"])(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),Object(Sa["q"])(t,"textPadding")&&(e.padding=t.textPadding),Object(Sa["q"])(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),Object(Sa["q"])(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),Object(Sa["q"])(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),Object(Sa["q"])(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),Object(Sa["q"])(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),Object(Sa["q"])(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),Object(Sa["q"])(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function EH(e,t,r){var a=e;a.textPosition=a.textPosition||r.position||"inside",null!=r.offset&&(a.textOffset=r.offset),null!=r.rotation&&(a.textRotation=r.rotation),null!=r.distance&&(a.textDistance=r.distance);var n=a.textPosition.indexOf("inside")>=0,i=e.fill||"#000";RH(a,t);var o=null==a.textFill;return n?o&&(a.textFill=r.insideFill||"#fff",!a.textStroke&&r.insideStroke&&(a.textStroke=r.insideStroke),!a.textStroke&&(a.textStroke=i),null==a.textStrokeWidth&&(a.textStrokeWidth=2)):(o&&(a.textFill=e.fill||r.outsideFill||"#000"),!a.textStroke&&r.outsideStroke&&(a.textStroke=r.outsideStroke)),a.text=t.text,a.rich=t.rich,Object(Sa["k"])(t.rich,(function(e){RH(e,e)})),a}function RH(e,t){t&&(Object(Sa["q"])(t,"fill")&&(e.textFill=t.fill),Object(Sa["q"])(t,"stroke")&&(e.textStroke=t.fill),Object(Sa["q"])(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),Object(Sa["q"])(t,"font")&&(e.font=t.font),Object(Sa["q"])(t,"fontStyle")&&(e.fontStyle=t.fontStyle),Object(Sa["q"])(t,"fontWeight")&&(e.fontWeight=t.fontWeight),Object(Sa["q"])(t,"fontSize")&&(e.fontSize=t.fontSize),Object(Sa["q"])(t,"fontFamily")&&(e.fontFamily=t.fontFamily),Object(Sa["q"])(t,"align")&&(e.textAlign=t.align),Object(Sa["q"])(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),Object(Sa["q"])(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),Object(Sa["q"])(t,"width")&&(e.textWidth=t.width),Object(Sa["q"])(t,"height")&&(e.textHeight=t.height),Object(Sa["q"])(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),Object(Sa["q"])(t,"padding")&&(e.textPadding=t.padding),Object(Sa["q"])(t,"borderColor")&&(e.textBorderColor=t.borderColor),Object(Sa["q"])(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),Object(Sa["q"])(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),Object(Sa["q"])(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),Object(Sa["q"])(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),Object(Sa["q"])(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),Object(Sa["q"])(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),Object(Sa["q"])(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),Object(Sa["q"])(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),Object(Sa["q"])(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),Object(Sa["q"])(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var LH={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},jH=Object(Sa["F"])(LH),FH=(Object(Sa["N"])(ds,(function(e,t){return e[t]=1,e}),{}),ds.join(", "),["","style","shape","extra"]),VH=Zl();function zH(e,t,r,a,n){var i=e+"Animation",o=ih(e,a,n)||{},s=VH(t).userDuring;return o.duration>0&&(o.during=s?Object(Sa["c"])(ZH,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),Object(Sa["m"])(o,r[i]),o}function BH(e,t,r,a){a=a||{};var n=a.dataIndex,i=a.isInit,o=a.clearStyle,s=r.isAnimationEnabled(),l=VH(e),c=t.style;l.userDuring=t.during;var u={},p={};if(eq(e,t,p),JH("shape",t,p),JH("extra",t,p),!i&&s&&(QH(e,t,u),KH("shape",e,t,u),KH("extra",e,t,u),tq(e,t,c,u)),p.style=c,WH(e,p,o),qH(e,t),s)if(i){var d={};Object(Sa["k"])(FH,(function(e){var r=e?t[e]:t;r&&r.enterFrom&&(e&&(d[e]=d[e]||{}),Object(Sa["m"])(e?d[e]:d,r.enterFrom))}));var h=zH("enter",e,t,r,n);h.duration>0&&e.animateFrom(d,h)}else HH(e,t,n||0,r,u);$H(e,t),c?e.dirty():e.markRedraw()}function $H(e,t){for(var r=VH(e).leaveToProps,a=0;a<FH.length;a++){var n=FH[a],i=n?t[n]:t;i&&i.leaveTo&&(r||(r=VH(e).leaveToProps={}),n&&(r[n]=r[n]||{}),Object(Sa["m"])(n?r[n]:r,i.leaveTo))}}function GH(e,t,r,a){if(e){var n=e.parent,i=VH(e).leaveToProps;if(i){var o=zH("update",e,t,r,0);o.done=function(){n.remove(e),a&&a()},e.animateTo(i,o)}else n.remove(e),a&&a()}}function UH(e){return"all"===e}function WH(e,t,r){var a=t.style;if(!e.isGroup&&a){if(r){e.useStyle({});for(var n=e.animators,i=0;i<n.length;i++){var o=n[i];"style"===o.targetName&&o.changeTarget(e.style)}}e.setStyle(a)}t&&(t.style=null,t&&e.attr(t),t.style=a)}function HH(e,t,r,a,n){if(n){var i=zH("update",e,t,a,r);i.duration>0&&e.animateFrom(n,i)}}function qH(e,t){Object(Sa["q"])(t,"silent")&&(e.silent=t.silent),Object(Sa["q"])(t,"ignore")&&(e.ignore=t.ignore),e instanceof tu&&Object(Sa["q"])(t,"invisible")&&(e.invisible=t.invisible),e instanceof lp&&Object(Sa["q"])(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}var YH={},XH={setTransform:function(e,t){return YH.el[e]=t,this},getTransform:function(e){return YH.el[e]},setShape:function(e,t){var r=YH.el,a=r.shape||(r.shape={});return a[e]=t,r.dirtyShape&&r.dirtyShape(),this},getShape:function(e){var t=YH.el.shape;if(t)return t[e]},setStyle:function(e,t){var r=YH.el,a=r.style;return a&&(a[e]=t,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(e){var t=YH.el.style;if(t)return t[e]},setExtra:function(e,t){var r=YH.el.extra||(YH.el.extra={});return r[e]=t,this},getExtra:function(e){var t=YH.el.extra;if(t)return t[e]}};function ZH(){var e=this,t=e.el;if(t){var r=VH(t).userDuring,a=e.userDuring;r===a?(YH.el=t,a(XH)):e.el=e.userDuring=null}}function KH(e,t,r,a){var n=r[e];if(n){var i,o=t[e];if(o){var s=r.transition,l=n.transition;if(l)if(!i&&(i=a[e]={}),UH(l))Object(Sa["m"])(i,o);else for(var c=Ol(l),u=0;u<c.length;u++){var p=c[u],d=o[p];i[p]=d}else if(UH(s)||Object(Sa["r"])(s,e)>=0){!i&&(i=a[e]={});var h=Object(Sa["F"])(o);for(u=0;u<h.length;u++){p=h[u],d=o[p];rq(n[p],d)&&(i[p]=d)}}}}}function JH(e,t,r){var a=t[e];if(a)for(var n=r[e]={},i=Object(Sa["F"])(a),o=0;o<i.length;o++){var s=i[o];n[s]=ho(a[s])}}function QH(e,t,r){for(var a=t.transition,n=UH(a)?ds:Ol(a||[]),i=0;i<n.length;i++){var o=n[i];if("style"!==o&&"shape"!==o&&"extra"!==o){var s=e[o];0,r[o]=s}}}function eq(e,t,r){for(var a=0;a<jH.length;a++){var n=jH[a],i=LH[n],o=t[n];o&&(r[i[0]]=o[0],r[i[1]]=o[1])}for(a=0;a<ds.length;a++){var s=ds[a];null!=t[s]&&(r[s]=t[s])}}function tq(e,t,r,a){if(r){var n,i=e.style;if(i){var o=r.transition,s=t.transition;if(o&&!UH(o)){var l=Ol(o);!n&&(n=a.style={});for(var c=0;c<l.length;c++){var u=l[c],p=i[u];n[u]=p}}else if(e.getAnimationStyleProps&&(UH(s)||UH(o)||Object(Sa["r"])(s,"style")>=0)){var d=e.getAnimationStyleProps(),h=d?d.style:null;if(h){!n&&(n=a.style={});var f=Object(Sa["F"])(r);for(c=0;c<f.length;c++){u=f[c];if(h[u]){p=i[u];n[u]=p}}}}}}}function rq(e,t){return Object(Sa["u"])(e)?e!==t:null!=e&&isFinite(e)}var aq=Zl(),nq=["percent","easing","shape","style","extra"];function iq(e){e.stopAnimation("keyframe"),e.attr(aq(e))}function oq(e,t,r){if(r.isAnimationEnabled()&&t)if(Object(Sa["t"])(t))Object(Sa["k"])(t,(function(t){oq(e,t,r)}));else{var a=t.keyframes,n=t.duration;if(r&&null==n){var i=ih("enter",r,0);n=i&&i.duration}if(a&&n){var o=aq(e);Object(Sa["k"])(FH,(function(r){if(!r||e[r]){var i;a.sort((function(e,t){return e.percent-t.percent})),Object(Sa["k"])(a,(function(a){var s=e.animators,l=r?a[r]:a;if(l){var c=Object(Sa["F"])(l);if(r||(c=Object(Sa["n"])(c,(function(e){return Object(Sa["r"])(nq,e)<0}))),c.length){i||(i=e.animate(r,t.loop,!0),i.scope="keyframe");for(var u=0;u<s.length;u++)s[u]!==i&&s[u].targetName===i.targetName&&s[u].stopTracks(c);r&&(o[r]=o[r]||{});var p=r?o[r]:o;Object(Sa["k"])(c,(function(t){p[t]=((r?e[r]:e)||{})[t]})),i.whenWithKeys(n*a.percent,l,c,a.easing)}}})),i&&i.delay(t.delay||0).duration(n).start(t.easing)}}))}}}var sq="emphasis",lq="normal",cq="blur",uq="select",pq=[lq,sq,cq,uq],dq={normal:["itemStyle"],emphasis:[sq,"itemStyle"],blur:[cq,"itemStyle"],select:[uq,"itemStyle"]},hq={normal:["label"],emphasis:[sq,"label"],blur:[cq,"label"],select:[uq,"label"]},fq=["x","y"],mq="e\0\0",gq={normal:{},emphasis:{},blur:{},select:{}},vq={cartesian2d:SH,geo:CH,single:IH,polar:MH,calendar:AH};function yq(e){return e instanceof lp}function bq(e){return e instanceof tu}function _q(e,t){t.copyTransform(e),bq(t)&&bq(e)&&(t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel,t.invisible=e.invisible,t.ignore=e.ignore,yq(t)&&yq(e)&&t.setShape(e.shape))}var xq=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(e,t,r,a){this._progressiveEls=null;var n=this._data,i=e.getData(),o=this.group,s=Oq(e,i,t,r);n||o.removeAll(),i.diff(n).add((function(t){Aq(r,null,t,s(t,a),e,o,i)})).remove((function(t){var r=n.getItemGraphicEl(t);r&&GH(r,bH(r).option,e)})).update((function(t,l){var c=n.getItemGraphicEl(l);Aq(r,c,t,s(t,a),e,o,i)})).execute();var l=e.get("clip",!0)?oM(e.coordinateSystem,!1,e):null;l?o.setClipPath(l):o.removeClipPath(),this._data=i},t.prototype.incrementalPrepareRender=function(e,t,r){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,t,r,a,n){var i=t.getData(),o=Oq(t,i,r,a),s=this._progressiveEls=[];function l(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}for(var c=e.start;c<e.end;c++){var u=Aq(null,null,c,o(c,n),t,this.group,i);u&&(u.traverse(l),s.push(u))}},t.prototype.eachRendered=function(e){tx(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,t,r,a){var n=t.element;if(null==n||r.name===n)return!0;while((r=r.__hostTarget||r.parent)&&r!==this.group)if(r.name===n)return!0;return!1},t.type="custom",t}(ux),wq=xq;function Sq(e){var t,r=e.type;if("path"===r){var a=e.shape,n=null!=a.width&&null!=a.height?{x:a.x||0,y:a.y||0,width:a.width,height:a.height}:null,i=Uq(a);t=P_(i,null,n,a.layout||"center"),bH(t).customPathData=i}else if("image"===r)t=new gp({}),bH(t).customImagePath=e.style.image;else if("text"===r)t=new Gp({});else if("group"===r)t=new Bs;else{if("compoundPath"===r)throw new Error('"compoundPath" is not supported yet.');var o=k_(r);if(!o){var s="";0,Zm(s)}t=new o}return bH(t).customGraphicType=r,t.name=e.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function Dq(e,t,r,a,n,i,o){iq(t);var s=n&&n.normal.cfg;s&&t.setTextConfig(s),a&&null==a.transition&&(a.transition=fq);var l=a&&a.style;if(l){if("text"===t.type){var c=l;Object(Sa["q"])(c,"textFill")&&(c.fill=c.textFill),Object(Sa["q"])(c,"textStroke")&&(c.stroke=c.textStroke)}var u=void 0,p=yq(t)?l.decal:null;e&&p&&(p.dirty=!0,u=dS(p,e)),l.__decalPattern=u}if(bq(t)&&l){u=l.__decalPattern;u&&(l.decal=u)}BH(t,a,i,{dataIndex:r,isInit:o,clearStyle:!0}),oq(t,a.keyframeAnimation,i)}function Cq(e,t,r,a,n){var i=t.isGroup?null:t,o=n&&n[e].cfg;if(i){var s=i.ensureState(e);if(!1===a){var l=i.getState(e);l&&(l.style=null)}else s.style=a||null;o&&(s.textConfig=o),Dd(i)}}function Tq(e,t,r){if(!e.isGroup){var a=e,n=r.currentZ,i=r.currentZLevel;a.z=n,a.zlevel=i;var o=t.z2;null!=o&&(a.z2=o||0);for(var s=0;s<pq.length;s++)Iq(a,t,pq[s])}}function Iq(e,t,r){var a,n=r===lq,i=n?t:Lq(t,r),o=i?i.z2:null;null!=o&&(a=n?e:e.ensureState(r),a.z2=o||0)}function Oq(e,t,r,a){var n=e.get("renderItem"),i=e.coordinateSystem,o={};i&&(o=i.prepareCustoms?i.prepareCustoms(i):vq[i.type](i));for(var s,l,c=Object(Sa["i"])({getWidth:a.getWidth,getHeight:a.getHeight,getZr:a.getZr,getDevicePixelRatio:a.getDevicePixelRatio,value:_,style:w,ordinalRawValue:x,styleEmphasis:S,visual:T,barLayout:I,currentSeriesIndices:O,font:M},o.api||{}),u={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:o.coordSys,dataInsideLength:t.count(),encode:Mq(e.getData())},p={},d={},h={},f={},m=0;m<pq.length;m++){var g=pq[m];h[g]=e.getModel(dq[g]),f[g]=e.getModel(hq[g])}function v(e){return e===s?l||(l=t.getItemModel(e)):t.getItemModel(e)}function y(e,r){return t.hasItemOption?e===s?p[r]||(p[r]=v(e).getModel(dq[r])):v(e).getModel(dq[r]):h[r]}function b(e,r){return t.hasItemOption?e===s?d[r]||(d[r]=v(e).getModel(hq[r])):v(e).getModel(hq[r]):f[r]}return function(e,r){return s=e,l=null,p={},d={},n&&n(Object(Sa["i"])({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:r?r.type:null},u),c)};function _(e,r){return null==r&&(r=s),t.getStore().get(t.getDimensionIndex(e||0),r)}function x(e,r){null==r&&(r=s),e=e||0;var a=t.getDimensionInfo(e);if(!a){var n=t.getDimensionIndex(e);return n>=0?t.getStore().get(n,r):void 0}var i=t.get(a.name,r),o=a&&a.ordinalMeta;return o?o.categories[i]:i}function w(r,a){null==a&&(a=s);var n=t.getItemVisual(a,"style"),i=n&&n.fill,o=n&&n.opacity,l=y(a,lq).getItemStyle();null!=i&&(l.fill=i),null!=o&&(l.opacity=o);var c={inheritColor:Object(Sa["C"])(i)?i:"#000"},u=b(a,lq),p=_h(u,null,c,!1,!0);p.text=u.getShallow("show")?Object(Sa["P"])(e.getFormattedLabel(a,lq),PO(t,a)):null;var d=xh(u,c,!1);return C(r,l),l=EH(l,p,d),r&&D(l,r),l.legacy=!0,l}function S(r,a){null==a&&(a=s);var n=y(a,sq).getItemStyle(),i=b(a,sq),o=_h(i,null,null,!0,!0);o.text=i.getShallow("show")?Object(Sa["Q"])(e.getFormattedLabel(a,sq),e.getFormattedLabel(a,lq),PO(t,a)):null;var l=xh(i,null,!0);return C(r,n),n=EH(n,o,l),r&&D(n,r),n.legacy=!0,n}function D(e,t){for(var r in t)Object(Sa["q"])(t,r)&&(e[r]=t[r])}function C(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}function T(e,r){if(null==r&&(r=s),Object(Sa["q"])(vH,e)){var a=t.getItemVisual(r,"style");return a?a[vH[e]]:null}if(Object(Sa["q"])(yH,e))return t.getItemVisual(r,e)}function I(e){if("cartesian2d"===i.type){var t=i.getBaseAxis();return RM(Object(Sa["i"])({axis:t},e))}}function O(){return r.getCurrentSeriesIndices()}function M(e){return Oh(e,r)}}function Mq(e){var t={};return Object(Sa["k"])(e.dimensions,(function(r){var a=e.getDimensionInfo(r);if(!a.isExtraCoord){var n=a.coordDim,i=t[n]=t[n]||[];i[a.coordDimIndex]=e.getDimensionIndex(r)}})),t}function Aq(e,t,r,a,n,i,o){if(a){var s=kq(e,t,r,a,n,i);return s&&o.setItemGraphicEl(r,s),s&&Hd(s,a.focus,a.blurScope,a.emphasisDisabled),s}i.remove(t)}function kq(e,t,r,a,n,i){var o=-1,s=t;t&&Pq(t,a,n)&&(o=Object(Sa["r"])(i.childrenRef(),t),t=null);var l=!t,c=t;c?c.clearStates():(c=Sq(a),s&&_q(s,c)),!1===a.morph?c.disableMorphing=!0:c.disableMorphing&&(c.disableMorphing=!1),gq.normal.cfg=gq.normal.conOpt=gq.emphasis.cfg=gq.emphasis.conOpt=gq.blur.cfg=gq.blur.conOpt=gq.select.cfg=gq.select.conOpt=null,gq.isLegacy=!1,Eq(c,r,a,n,l,gq),Nq(c,r,a,n,l),Dq(e,c,r,a,gq,n,l),Object(Sa["q"])(a,"info")&&(bH(c).info=a.info);for(var u=0;u<pq.length;u++){var p=pq[u];if(p!==lq){var d=Lq(a,p),h=jq(a,d,p);Cq(p,c,d,h,gq)}}return Tq(c,a,n),"group"===a.type&&Fq(e,c,r,a,n),o>=0?i.replaceAt(c,o):i.add(c),c}function Pq(e,t,r){var a=bH(e),n=t.type,i=t.shape,o=t.style;return r.isUniversalTransitionEnabled()||null!=n&&n!==a.customGraphicType||"path"===n&&Wq(i)&&Uq(i)!==a.customPathData||"image"===n&&Object(Sa["q"])(o,"image")&&o.image!==a.customImagePath}function Nq(e,t,r,a,n){var i=r.clipPath;if(!1===i)e&&e.getClipPath()&&e.removeClipPath();else if(i){var o=e.getClipPath();o&&Pq(o,i,a)&&(o=null),o||(o=Sq(i),e.setClipPath(o)),Dq(null,o,t,i,null,a,n)}}function Eq(e,t,r,a,n,i){if(!e.isGroup){Rq(r,null,i),Rq(r,sq,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,c=i.select.conOpt;if(null!=o||null!=s||null!=c||null!=l){var u=e.getTextContent();if(!1===o)u&&e.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},u?u.clearStates():(u=Sq(o),e.setTextContent(u)),Dq(null,u,t,o,null,a,n);for(var p=o&&o.style,d=0;d<pq.length;d++){var h=pq[d];if(h!==lq){var f=i[h].conOpt;Cq(h,u,f,jq(o,f,h),null)}}p?u.dirty():u.markRedraw()}}}}function Rq(e,t,r){var a=t?Lq(e,t):e,n=t?jq(e,a,sq):e.style,i=e.type,o=a?a.textConfig:null,s=e.textContent,l=s?t?Lq(s,t):s:null;if(n&&(r.isLegacy||kH(n,i,!!o,!!l))){r.isLegacy=!0;var c=PH(n,i,!t);!o&&c.textConfig&&(o=c.textConfig),!l&&c.textContent&&(l=c.textContent)}if(!t&&l){var u=l;!u.type&&(u.type="text")}var p=t?r[t]:r.normal;p.cfg=o,p.conOpt=l}function Lq(e,t){return t?e?e[t]:null:e}function jq(e,t,r){var a=t&&t.style;return null==a&&r===sq&&e&&(a=e.styleEmphasis),a}function Fq(e,t,r,a,n){var i=a.children,o=i?i.length:0,s=a.$mergeChildren,l="byName"===s||a.diffChildrenByName,c=!1===s;if(o||l||c)if(l)zq({api:e,oldChildren:t.children()||[],newChildren:i||[],dataIndex:r,seriesModel:n,group:t});else{c&&t.removeAll();for(var u=0;u<o;u++){var p=i[u],d=t.childAt(u);p?(null==p.ignore&&(p.ignore=!1),kq(e,d,r,p,n,t)):d.ignore=!0}for(var h=t.childCount()-1;h>=u;h--){var f=t.childAt(h);Vq(t,f,n)}}}function Vq(e,t,r){t&&GH(t,bH(e).option,r)}function zq(e){new RI(e.oldChildren,e.newChildren,Bq,Bq,e).add($q).update($q).remove(Gq).execute()}function Bq(e,t){var r=e&&e.name;return null!=r?r:mq+t}function $q(e,t){var r=this.context,a=null!=e?r.newChildren[e]:null,n=null!=t?r.oldChildren[t]:null;kq(r.api,n,r.dataIndex,a,r.seriesModel,r.group)}function Gq(e){var t=this.context,r=t.oldChildren[e];r&&GH(r,bH(r).option,t.seriesModel)}function Uq(e){return e&&(e.pathData||e.d)}function Wq(e){return e&&(Object(Sa["q"])(e,"pathData")||Object(Sa["q"])(e,"d"))}function Hq(e){e.registerChartView(wq),e.registerSeriesModel(xH)}var qq=Zl(),Yq=Sa["d"],Xq=Sa["c"],Zq=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,r,a){var n=t.get("value"),i=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=r,a||this._lastValue!==n||this._lastStatus!==i){this._lastValue=n,this._lastStatus=i;var o=this._group,s=this._handle;if(!i||"hide"===i)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,n,e,t,r);var c=l.graphicKey;c!==this._lastGraphicKey&&this.clear(r),this._lastGraphicKey=c;var u=this._moveAnimation=this.determineAnimation(e,t);if(o){var p=Sa["h"](Kq,t,u);this.updatePointerEl(o,l,p),this.updateLabelEl(o,l,p,t)}else o=this._group=new Bs,this.createPointerEl(o,l,e,t),this.createLabelEl(o,l,e,t),r.getZr().add(o);tY(o,t,!0),this._renderHandle(n)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var r=t.get("animation"),a=e.axis,n="category"===a.type,i=t.get("snap");if(!i&&!n)return!1;if("auto"===r||null==r){var o=this.animationThreshold;if(n&&a.getBandWidth()>o)return!0;if(i){var s=RN(e).seriesDataCount,l=a.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return!0===r},e.prototype.makeElOption=function(e,t,r,a,n){},e.prototype.createPointerEl=function(e,t,r,n){var i=t.pointer;if(i){var o=qq(e).pointerEl=new a[i.type](Yq(t.pointer));e.add(o)}},e.prototype.createLabelEl=function(e,t,r,a){if(t.label){var n=qq(e).labelEl=new Gp(Yq(t.label));e.add(n),Qq(n,a)}},e.prototype.updatePointerEl=function(e,t,r){var a=qq(e).pointerEl;a&&t.pointer&&(a.setStyle(t.pointer.style),r(a,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,r,a){var n=qq(e).labelEl;n&&(n.setStyle(t.label.style),r(n,{x:t.label.x,y:t.label.y}),Qq(n,a))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,r=this._axisPointerModel,a=this._api.getZr(),n=this._handle,i=r.getModel("handle"),o=r.get("status");if(!i.get("show")||!o||"hide"===o)return n&&a.remove(n),void(this._handle=null);this._handle||(t=!0,n=this._handle=Y_(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){_n(e.event)},onmousedown:Xq(this._onHandleDragMove,this,0,0),drift:Xq(this._onHandleDragMove,this),ondragend:Xq(this._onHandleDragEnd,this)}),a.add(n)),tY(n,r,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=i.get("size");Sa["t"](s)||(s=[s,s]),n.scaleX=s[0]/2,n.scaleY=s[1]/2,mx(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){Kq(this._axisPointerModel,!t&&this._moveAnimation,this._handle,eY(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var r=this._handle;if(r){this._dragging=!0;var a=this.updateHandleTransform(eY(r),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=a,r.stopAnimation(),r.attr(eY(a)),qq(r).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,r=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:r.axis.dim,axisIndex:r.componentIndex}]})}},e.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"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),r=this._group,a=this._handle;t&&r&&(this._lastGraphicKey=null,r&&t.remove(r),a&&t.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),gx(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}},e}();function Kq(e,t,r,a){Jq(qq(r).lastProp,a)||(qq(r).lastProp=a,t?sh(r,a,e):(r.stopAnimation(),r.attr(a)))}function Jq(e,t){if(Sa["A"](e)&&Sa["A"](t)){var r=!0;return Sa["k"](t,(function(t,a){r=r&&Jq(e[a],t)})),!!r}return e===t}function Qq(e,t){e[t.get(["label","show"])?"show":"hide"]()}function eY(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function tY(e,t,r){var a=t.get("z"),n=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=a&&(e.z=a),null!=n&&(e.zlevel=n),e.silent=r)}))}var rY=Zq;function aY(e){var t,r=e.get("type"),a=e.getModel(r+"Style");return"line"===r?(t=a.getLineStyle(),t.fill=null):"shadow"===r&&(t=a.getAreaStyle(),t.stroke=null),t}function nY(e,t,r,a,n){var i=r.get("value"),o=oY(i,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=Gf(s.get("padding")||0),c=s.getFont(),u=_s(o,c),p=n.position,d=u.width+l[1]+l[3],h=u.height+l[0]+l[2],f=n.align;"right"===f&&(p[0]-=d),"center"===f&&(p[0]-=d/2);var m=n.verticalAlign;"bottom"===m&&(p[1]-=h),"middle"===m&&(p[1]-=h/2),iY(p,d,h,a);var g=s.get("backgroundColor");g&&"auto"!==g||(g=t.get(["axisLine","lineStyle","color"])),e.label={x:p[0],y:p[1],style:_h(s,{text:o,font:c,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function iY(e,t,r,a){var n=a.getWidth(),i=a.getHeight();e[0]=Math.min(e[0]+t,n)-t,e[1]=Math.min(e[1]+r,i)-r,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function oY(e,t,r,a,n){e=t.scale.parse(e);var i=t.scale.getLabel({value:e},{precision:n.precision}),o=n.formatter;if(o){var s={value:wP(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};Sa["k"](a,(function(e){var t=r.getSeriesByIndex(e.seriesIndex),a=e.dataIndexInside,n=t&&t.getDataParams(a);n&&s.seriesData.push(n)})),Sa["C"](o)?i=o.replace("{value}",i):Sa["w"](o)&&(i=o(s))}return i}function sY(e,t,r){var a=Tn();return kn(a,a,r.rotation),An(a,a,r.position),B_([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],a)}function lY(e,t,r,a,n,i){var o=IN.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=n.get(["label","margin"]),nY(t,a,n,i,{position:sY(a.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function cY(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function uY(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}function pY(e,t,r,a,n,i){return{cx:e,cy:t,r0:r,r:a,startAngle:n,endAngle:i,clockwise:!0}}var dY=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t.prototype.makeElOption=function(e,t,r,a,n){var i=r.axis,o=i.grid,s=a.get("type"),l=hY(o,i).getOtherAxis(i).getGlobalExtent(),c=i.toGlobalCoord(i.dataToCoord(t,!0));if(s&&"none"!==s){var u=aY(a),p=fY[s](i,c,l);p.style=u,e.graphicKey=p.type,e.pointer=p}var d=nN(o.model,r);lY(t,e,d,r,a,n)},t.prototype.getHandleTransform=function(e,t,r){var a=nN(t.axis.grid.model,t,{labelInside:!1});a.labelMargin=r.get(["handle","margin"]);var n=sY(t.axis,e,a);return{x:n[0],y:n[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,r,a){var n=r.axis,i=n.grid,o=n.getGlobalExtent(!0),s=hY(i,n).getOtherAxis(n).getGlobalExtent(),l="x"===n.dim?0:1,c=[e.x,e.y];c[l]+=t[l],c[l]=Math.min(o[1],c[l]),c[l]=Math.max(o[0],c[l]);var u=(s[1]+s[0])/2,p=[u,u];p[l]=c[l];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:p,tooltipOption:d[l]}},t}(rY);function hY(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var fY={line:function(e,t,r){var a=cY([t,r[0]],[t,r[1]],mY(e));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(e,t,r){var a=Math.max(1,e.getBandWidth()),n=r[1]-r[0];return{type:"Rect",shape:uY([t-a/2,r[0]],[a,n],mY(e))}}};function mY(e){return"x"===e.dim?0:1}var gY=dY,vY=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(fm),yY=vY,bY=Zl(),_Y=Sa["k"];function xY(e,t,r){if(!wa["a"].node){var a=t.getZr();bY(a).records||(bY(a).records={}),wY(a,t);var n=bY(a).records[e]||(bY(a).records[e]={});n.handler=r}}function wY(e,t){function r(r,a){e.on(r,(function(r){var n=TY(t);_Y(bY(e).records,(function(e){e&&a(e,r,n.dispatchAction)})),SY(n.pendings,t)}))}bY(e).initialized||(bY(e).initialized=!0,r("click",Sa["h"](CY,"click")),r("mousemove",Sa["h"](CY,"mousemove")),r("globalout",DY))}function SY(e,t){var r,a=e.showTip.length,n=e.hideTip.length;a?r=e.showTip[a-1]:n&&(r=e.hideTip[n-1]),r&&(r.dispatchAction=null,t.dispatchAction(r))}function DY(e,t,r){e.handler("leave",null,r)}function CY(e,t,r,a){t.handler(e,r,a)}function TY(e){var t={showTip:[],hideTip:[]},r=function(a){var n=t[a.type];n?n.push(a):(a.dispatchAction=r,e.dispatchAction(a))};return{dispatchAction:r,pendings:t}}function IY(e,t){if(!wa["a"].node){var r=t.getZr(),a=(bY(r).records||{})[e];a&&(bY(r).records[e]=null)}}var OY=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(e,t,r){var a=t.getComponent("tooltip"),n=e.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";xY("axisPointer",r,(function(e,t,r){"none"!==n&&("leave"===e||n.indexOf(e)>=0)&&r({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},t.prototype.remove=function(e,t){IY("axisPointer",t)},t.prototype.dispose=function(e,t){IY("axisPointer",t)},t.type="axisPointer",t}(Gy),MY=OY;function AY(e,t){var r,a=[],n=e.seriesIndex;if(null==n||!(r=t.getSeriesByIndex(n)))return{point:[]};var i=r.getData(),o=Xl(i,e);if(null==o||o<0||Sa["t"](o))return{point:[]};var s=i.getItemGraphicEl(o),l=r.coordinateSystem;if(r.getTooltipPosition)a=r.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(e.isStacked){var c=l.getBaseAxis(),u=l.getOtherAxis(c),p=u.dim,d=c.dim,h="x"===p||"radius"===p?1:0,f=i.mapDimension(d),m=[];m[h]=i.get(f,o),m[1-h]=i.get(i.getCalculationInfo("stackResultDimension"),o),a=l.dataToPoint(m)||[]}else a=l.dataToPoint(i.getValues(Sa["H"](l.dimensions,(function(e){return i.mapDimension(e)})),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),a=[g.x+g.width/2,g.y+g.height/2]}return{point:a,el:s}}var kY=Zl();function PY(e,t,r){var a=e.currTrigger,n=[e.x,e.y],i=e,o=e.dispatchAction||Object(Sa["c"])(r.dispatchAction,r),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){$Y(n)&&(n=AY({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=$Y(n),c=i.axesInfo,u=s.axesInfo,p="leave"===a||$Y(n),d={},h={},f={list:[],map:{}},m={showPointer:Object(Sa["h"])(RY,h),showTooltip:Object(Sa["h"])(LY,f)};Object(Sa["k"])(s.coordSysMap,(function(e,t){var r=l||e.containPoint(n);Object(Sa["k"])(s.coordSysAxesInfo[t],(function(e,t){var a=e.axis,i=zY(c,e);if(!p&&r&&(!c||i)){var o=i&&i.value;null!=o||l||(o=a.pointToData(n)),null!=o&&NY(e,o,m,!1,d)}}))}));var g={};return Object(Sa["k"])(u,(function(e,t){var r=e.linkGroup;r&&!h[t]&&Object(Sa["k"])(r.axesInfo,(function(t,a){var n=h[a];if(t!==e&&n){var i=n.value;r.mapper&&(i=e.axis.scale.parse(r.mapper(i,BY(t),BY(e)))),g[e.key]=i}}))})),Object(Sa["k"])(g,(function(e,t){NY(u[t],e,m,!0,d)})),jY(h,u,d),FY(f,n,e,o),VY(u,o,r),d}}function NY(e,t,r,a,n){var i=e.axis;if(!i.scale.isBlank()&&i.containData(t))if(e.involveSeries){var o=EY(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&null==n.seriesIndex&&Object(Sa["m"])(n,s[0]),!a&&e.snap&&i.containData(l)&&null!=l&&(t=l),r.showPointer(e,t,s),r.showTooltip(e,o,l)}else r.showPointer(e,t)}function EY(e,t){var r=t.axis,a=r.dim,n=e,i=[],o=Number.MAX_VALUE,s=-1;return Object(Sa["k"])(t.seriesModels,(function(t,l){var c,u,p=t.getData().mapDimensionsAll(a);if(t.getAxisTooltipData){var d=t.getAxisTooltipData(p,e,r);u=d.dataIndices,c=d.nestestValue}else{if(u=t.getData().indicesOfNearest(p[0],e,"category"===r.type?.5:null),!u.length)return;c=t.getData().get(p[0],u[0])}if(null!=c&&isFinite(c)){var h=e-c,f=Math.abs(h);f<=o&&((f<o||h>=0&&s<0)&&(o=f,s=h,n=c,i.length=0),Object(Sa["k"])(u,(function(e){i.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:i,snapToValue:n}}function RY(e,t,r,a){e[t.key]={value:r,payloadBatch:a}}function LY(e,t,r,a){var n=r.payloadBatch,i=t.axis,o=i.model,s=t.axisPointerModel;if(t.triggerTooltip&&n.length){var l=t.coordSys.model,c=FN(l),u=e.map[c];u||(u=e.map[c]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function jY(e,t,r){var a=r.axesInfo=[];Object(Sa["k"])(t,(function(t,r){var n=t.axisPointerModel.option,i=e[r];i?(!t.useHandle&&(n.status="show"),n.value=i.value,n.seriesDataIndices=(i.payloadBatch||[]).slice()):!t.useHandle&&(n.status="hide"),"show"===n.status&&a.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}))}function FY(e,t,r,a){if(!$Y(t)&&e.list.length){var n=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:e.list})}else a({type:"hideTip"})}function VY(e,t,r){var a=r.getZr(),n="axisPointerLastHighlights",i=kY(a)[n]||{},o=kY(a)[n]={};Object(Sa["k"])(e,(function(e,t){var r=e.axisPointerModel.option;"show"===r.status&&e.triggerEmphasis&&Object(Sa["k"])(r.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;o[t]=e}))}));var s=[],l=[];Object(Sa["k"])(i,(function(e,t){!o[t]&&l.push(e)})),Object(Sa["k"])(o,(function(e,t){!i[t]&&s.push(e)})),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function zY(e,t){for(var r=0;r<(e||[]).length;r++){var a=e[r];if(t.axis.dim===a.axisDim&&t.axis.model.componentIndex===a.axisIndex)return a}}function BY(e){var t=e.axis.model,r={},a=r.axisDim=e.axis.dim;return r.axisIndex=r[a+"AxisIndex"]=t.componentIndex,r.axisName=r[a+"AxisName"]=t.name,r.axisId=r[a+"AxisId"]=t.id,r}function $Y(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function GY(e){BN.registerAxisPointerClass("CartesianAxisPointer",gY),e.registerComponentModel(yY),e.registerComponentView(MY),e.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!Object(Sa["t"])(t)&&(e.axisPointer.link=[t])}})),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=ON(e,t)})),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},PY)}function UY(e){JD(QN),JD(GY)}var WY=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t.prototype.makeElOption=function(e,t,r,a,n){var i=r.axis;"angle"===i.dim&&(this.animationThreshold=Math.PI/18);var o=i.polar,s=o.getOtherAxis(i),l=s.getExtent(),c=i.dataToCoord(t),u=a.get("type");if(u&&"none"!==u){var p=aY(a),d=qY[u](i,o,c,l);d.style=p,e.graphicKey=d.type,e.pointer=d}var h=a.get(["label","margin"]),f=HY(t,r,a,o,h);nY(e,r,a,n,f)},t}(rY);function HY(e,t,r,a,n){var i=t.axis,o=i.dataToCoord(e),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,c,u,p=a.getRadiusAxis().getExtent();if("radius"===i.dim){var d=Tn();kn(d,d,s),An(d,d,[a.cx,a.cy]),l=B_([o,-n],d);var h=t.getModel("axisLabel").get("rotate")||0,f=IN.innerTextLayout(s,h*Math.PI/180,-1);c=f.textAlign,u=f.textVerticalAlign}else{var m=p[1];l=a.coordToPoint([m+n,o]);var g=a.cx,v=a.cy;c=Math.abs(l[0]-g)/m<.3?"center":l[0]>g?"left":"right",u=Math.abs(l[1]-v)/m<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:c,verticalAlign:u}}var qY={line:function(e,t,r,a){return"angle"===e.dim?{type:"Line",shape:cY(t.coordToPoint([a[0],r]),t.coordToPoint([a[1],r]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:r}}},shadow:function(e,t,r,a){var n=Math.max(1,e.getBandWidth()),i=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:pY(t.cx,t.cy,a[0],a[1],(-r-n/2)*i,(n/2-r)*i)}:{type:"Sector",shape:pY(t.cx,t.cy,r-n/2,r+n/2,0,2*Math.PI)}}},YY=WY,XY=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.findAxisModel=function(e){var t,r=this.ecModel;return r.eachComponent(e,(function(e){e.getCoordSysModel()===this&&(t=e)}),this),t},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(fm),ZY=XY,KY=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",ec).models[0]},t.type="polarAxis",t}(fm);Sa["K"](KY,pk);var JY=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.type="angleAxis",t}(KY),QY=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.type="radiusAxis",t}(KY),eX=function(e){function t(t,r){return e.call(this,"radius",t,r)||this}return xa(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t}(tN);eX.prototype.dataToRadius=tN.prototype.dataToCoord,eX.prototype.radiusToData=tN.prototype.coordToData;var tX=eX,rX=Zl(),aX=function(e){function t(t,r){return e.call(this,"angle",t,r||[0,360])||this}return xa(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,t=e.getLabelModel(),r=e.scale,a=r.getExtent(),n=r.count();if(a[1]-a[0]<1)return 0;var i=a[0],o=e.dataToCoord(i+1)-e.dataToCoord(i),s=Math.abs(o),l=_s(null==i?"":i+"",t.getFont(),"center","top"),c=Math.max(l.height,7),u=c/s;isNaN(u)&&(u=1/0);var p=Math.max(0,Math.floor(u)),d=rX(e.model),h=d.lastAutoInterval,f=d.lastTickCount;return null!=h&&null!=f&&Math.abs(h-p)<=1&&Math.abs(f-n)<=1&&h>p?p=h:(d.lastTickCount=n,d.lastAutoInterval=p),p},t}(tN);aX.prototype.dataToAngle=tN.prototype.dataToCoord,aX.prototype.angleToData=tN.prototype.coordToData;var nX=aX,iX=["radius","angle"],oX=function(){function e(e){this.dimensions=iX,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new tX,this._angleAxis=new nX,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},e.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},e.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(e){var t=[],r=this._angleAxis,a=this._radiusAxis;return r.scale.type===e&&t.push(r),a.scale.type===e&&t.push(a),t},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(e){var t=null!=e&&"auto"!==e?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},e.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},e.prototype.pointToData=function(e,t){var r=this.pointToCoord(e);return[this._radiusAxis.radiusToData(r[0],t),this._angleAxis.angleToData(r[1],t)]},e.prototype.pointToCoord=function(e){var t=e[0]-this.cx,r=e[1]-this.cy,a=this.getAngleAxis(),n=a.getExtent(),i=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);a.inverse?i=o-360:o=i+360;var s=Math.sqrt(t*t+r*r);t/=s,r/=s;var l=Math.atan2(-r,t)/Math.PI*180,c=l<i?1:-1;while(l<i||l>o)l+=360*c;return[s,l]},e.prototype.coordToPoint=function(e){var t=e[0],r=e[1]/180*Math.PI,a=Math.cos(r)*t+this.cx,n=-Math.sin(r)*t+this.cy;return[a,n]},e.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),r=t.getExtent().slice();r[0]>r[1]&&r.reverse();var a=e.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:r[0],r:r[1],startAngle:-a[0]*n,endAngle:-a[1]*n,clockwise:e.inverse,contain:function(e,t){var r=e-this.cx,a=t-this.cy,n=r*r+a*a-1e-4,i=this.r,o=this.r0;return n<=i*i&&n>=o*o}}},e.prototype.convertToPixel=function(e,t,r){var a=sX(t);return a===this?this.dataToPoint(r):null},e.prototype.convertFromPixel=function(e,t,r){var a=sX(t);return a===this?this.pointToData(r):null},e}();function sX(e){var t=e.seriesModel,r=e.polarModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}var lX=oX;function cX(e,t,r){var a=t.get("center"),n=r.getWidth(),i=r.getHeight();e.cx=rl(a[0],n),e.cy=rl(a[1],i);var o=e.getRadiusAxis(),s=Math.min(n,i)/2,l=t.get("radius");null==l?l=[0,"100%"]:Sa["t"](l)||(l=[0,l]);var c=[rl(l[0],s),rl(l[1],s)];o.inverse?o.setExtent(c[1],c[0]):o.setExtent(c[0],c[1])}function uX(e,t){var r=this,a=r.getAngleAxis(),n=r.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),e.eachSeries((function(e){if(e.coordinateSystem===r){var t=e.getData();Sa["k"](IP(t,"radius"),(function(e){n.scale.unionExtentFromData(t,e)})),Sa["k"](IP(t,"angle"),(function(e){a.scale.unionExtentFromData(t,e)}))}})),yP(a.scale,a.model),yP(n.scale,n.model),"category"===a.type&&!a.onBand){var i=a.getExtent(),o=360/a.scale.count();a.inverse?i[1]+=o:i[1]-=o,a.setExtent(i[0],i[1])}}function pX(e){return"angleAxis"===e.mainType}function dX(e,t){var r;if(e.type=t.get("type"),e.scale=bP(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),pX(t)){e.inverse=e.inverse!==t.get("clockwise");var a=t.get("startAngle"),n=null!==(r=t.get("endAngle"))&&void 0!==r?r:a+(e.inverse?-360:360);e.setExtent(a,n)}t.axis=e,e.model=t}var hX={dimensions:iX,create:function(e,t){var r=[];return e.eachComponent("polar",(function(e,a){var n=new lX(a+"");n.update=uX;var i=n.getRadiusAxis(),o=n.getAngleAxis(),s=e.findAxisModel("radiusAxis"),l=e.findAxisModel("angleAxis");dX(i,s),dX(o,l),cX(n,e,t),r.push(n),e.coordinateSystem=n,n.model=e})),e.eachSeries((function(e){if("polar"===e.get("coordinateSystem")){var t=e.getReferringComponents("polar",ec).models[0];0,e.coordinateSystem=t.coordinateSystem}})),r}},fX=hX,mX=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function gX(e,t,r){t[1]>t[0]&&(t=t.slice().reverse());var a=e.coordToPoint([t[0],r]),n=e.coordToPoint([t[1],r]);return{x1:a[0],y1:a[1],x2:n[0],y2:n[1]}}function vX(e){var t=e.getRadiusAxis();return t.inverse?0:1}function yX(e){var t=e[0],r=e[e.length-1];t&&r&&Math.abs(Math.abs(t.coord-r.coord)-360)<1e-4&&e.pop()}var bX=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="PolarAxisPointer",r}return xa(t,e),t.prototype.render=function(e,t){if(this.group.removeAll(),e.get("show")){var r=e.axis,a=r.polar,n=a.getRadiusAxis().getExtent(),i=r.getTicksCoords(),o=r.getMinorTicksCoords(),s=Sa["H"](r.getViewLabels(),(function(e){e=Sa["d"](e);var t=r.scale,a="ordinal"===t.type?t.getRawOrdinalNumber(e.tickValue):e.tickValue;return e.coord=r.dataToCoord(a),e}));yX(s),yX(i),Sa["k"](mX,(function(t){!e.get([t,"show"])||r.scale.isBlank()&&"axisLine"!==t||_X[t](this.group,e,a,i,o,n,s)}),this)}},t.type="angleAxis",t}(BN),_X={axisLine:function(e,t,r,n,i,o){var s,l=t.getModel(["axisLine","lineStyle"]),c=r.getAngleAxis(),u=Math.PI/180,p=c.getExtent(),d=vX(r),h=d?0:1,f=360===Math.abs(p[1]-p[0])?"Circle":"Arc";s=0===o[h]?new a[f]({shape:{cx:r.cx,cy:r.cy,r:o[d],startAngle:-p[0]*u,endAngle:-p[1]*u,clockwise:c.inverse},style:l.getLineStyle(),z2:1,silent:!0}):new zb({shape:{cx:r.cx,cy:r.cy,r:o[d],r0:o[h]},style:l.getLineStyle(),z2:1,silent:!0}),s.style.fill=null,e.add(s)},axisTick:function(e,t,r,a,n,i){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[vX(r)],c=Sa["H"](a,(function(e){return new Jb({shape:gX(r,[l,l+s],e.coord)})}));e.add(R_(c,{style:Sa["i"](o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,r,a,n,i){if(n.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),c=i[vX(r)],u=[],p=0;p<n.length;p++)for(var d=0;d<n[p].length;d++)u.push(new Jb({shape:gX(r,[c,c+l],n[p][d].coord)}));e.add(R_(u,{style:Sa["i"](s.getModel("lineStyle").getLineStyle(),Sa["i"](o.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(e,t,r,a,n,i,o){var s=t.getCategories(!0),l=t.getModel("axisLabel"),c=l.get("margin"),u=t.get("triggerEvent");Sa["k"](o,(function(a,n){var o=l,p=a.tickValue,d=i[vX(r)],h=r.coordToPoint([d+c,a.coord]),f=r.cx,m=r.cy,g=Math.abs(h[0]-f)/d<.3?"center":h[0]>f?"left":"right",v=Math.abs(h[1]-m)/d<.3?"middle":h[1]>m?"top":"bottom";if(s&&s[p]){var y=s[p];Sa["A"](y)&&y.textStyle&&(o=new Uh(y.textStyle,l,l.ecModel))}var b=new Gp({silent:IN.isLabelSilent(t),style:_h(o,{x:h[0],y:h[1],fill:o.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:a.formattedLabel,align:g,verticalAlign:v})});if(e.add(b),u){var _=IN.makeAxisEventDataBase(t);_.targetType="axisLabel",_.value=a.rawLabel,Up(b).eventData=_}}),this)},splitLine:function(e,t,r,a,n,i){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),c=0;l=l instanceof Array?l:[l];for(var u=[],p=0;p<a.length;p++){var d=c++%l.length;u[d]=u[d]||[],u[d].push(new Jb({shape:gX(r,i,a[p].coord)}))}for(p=0;p<u.length;p++)e.add(R_(u[p],{style:Sa["i"]({stroke:l[p%l.length]},s.getLineStyle()),silent:!0,z:t.get("z")}))},minorSplitLine:function(e,t,r,a,n,i){if(n.length){for(var o=t.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],c=0;c<n.length;c++)for(var u=0;u<n[c].length;u++)l.push(new Jb({shape:gX(r,i,n[c][u].coord)}));e.add(R_(l,{style:s.getLineStyle(),silent:!0,z:t.get("z")}))}},splitArea:function(e,t,r,a,n,i){if(a.length){var o=t.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),c=0;l=l instanceof Array?l:[l];for(var u=[],p=Math.PI/180,d=-a[0].coord*p,h=Math.min(i[0],i[1]),f=Math.max(i[0],i[1]),m=t.get("clockwise"),g=1,v=a.length;g<=v;g++){var y=g===v?a[0].coord:a[g].coord,b=c++%l.length;u[b]=u[b]||[],u[b].push(new jb({shape:{cx:r.cx,cy:r.cy,r0:h,r:f,startAngle:d,endAngle:-y*p,clockwise:m},silent:!0})),d=-y*p}for(g=0;g<u.length;g++)e.add(R_(u[g],{style:Sa["i"]({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}},xX=bX,wX=["axisLine","axisTickLabel","axisName"],SX=["splitLine","splitArea","minorSplitLine"],DX=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="PolarAxisPointer",r}return xa(t,e),t.prototype.render=function(e,t){if(this.group.removeAll(),e.get("show")){var r=this._axisGroup,a=this._axisGroup=new Bs;this.group.add(a);var n=e.axis,i=n.polar,o=i.getAngleAxis(),s=n.getTicksCoords(),l=n.getMinorTicksCoords(),c=o.getExtent()[0],u=n.getExtent(),p=TX(i,e,c),d=new IN(e,p);Sa["k"](wX,d.add,d),a.add(d.getGroup()),W_(r,a,e),Sa["k"](SX,(function(t){e.get([t,"show"])&&!n.scale.isBlank()&&CX[t](this.group,e,i,c,u,s,l)}),this)}},t.type="radiusAxis",t}(BN),CX={splitLine:function(e,t,r,n,i,o){var s=t.getModel("splitLine"),l=s.getModel("lineStyle"),c=l.get("color"),u=0,p=r.getAngleAxis(),d=Math.PI/180,h=p.getExtent(),f=360===Math.abs(h[1]-h[0])?"Circle":"Arc";c=c instanceof Array?c:[c];for(var m=[],g=0;g<o.length;g++){var v=u++%c.length;m[v]=m[v]||[],m[v].push(new a[f]({shape:{cx:r.cx,cy:r.cy,r:Math.max(o[g].coord,0),startAngle:-h[0]*d,endAngle:-h[1]*d,clockwise:p.inverse}}))}for(g=0;g<m.length;g++)e.add(R_(m[g],{style:Sa["i"]({stroke:c[g%c.length],fill:null},l.getLineStyle()),silent:!0}))},minorSplitLine:function(e,t,r,a,n,i,o){if(o.length){for(var s=t.getModel("minorSplitLine"),l=s.getModel("lineStyle"),c=[],u=0;u<o.length;u++)for(var p=0;p<o[u].length;p++)c.push(new gb({shape:{cx:r.cx,cy:r.cy,r:o[u][p].coord}}));e.add(R_(c,{style:Sa["i"]({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(e,t,r,a,n,i){if(i.length){var o=t.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),c=0;l=l instanceof Array?l:[l];for(var u=[],p=i[0].coord,d=1;d<i.length;d++){var h=c++%l.length;u[h]=u[h]||[],u[h].push(new jb({shape:{cx:r.cx,cy:r.cy,r0:p,r:i[d].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),p=i[d].coord}for(d=0;d<u.length;d++)e.add(R_(u[d],{style:Sa["i"]({fill:l[d%l.length]},s.getAreaStyle()),silent:!0}))}}};function TX(e,t,r){return{position:[e.cx,e.cy],rotation:r/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}var IX=DX;function OX(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function MX(e,t){return t.dim+e.model.componentIndex}function AX(e,t,r){var a={},n=kX(Sa["n"](t.getSeriesByType(e),(function(e){return!t.isSeriesFiltered(e)&&e.coordinateSystem&&"polar"===e.coordinateSystem.type})));t.eachSeriesByType(e,(function(e){if("polar"===e.coordinateSystem.type){var t=e.getData(),r=e.coordinateSystem,i=r.getBaseAxis(),o=MX(r,i),s=OX(e),l=n[o][s],c=l.offset,u=l.width,p=r.getOtherAxis(i),d=e.coordinateSystem.cx,h=e.coordinateSystem.cy,f=e.get("barMinHeight")||0,m=e.get("barMinAngle")||0;a[s]=a[s]||[];for(var g=t.mapDimension(p.dim),v=t.mapDimension(i.dim),y=wO(t,g),b="radius"!==i.dim||!e.get("roundCap",!0),_=p.model,x=_.get("startValue"),w=p.dataToCoord(x||0),S=0,D=t.count();S<D;S++){var C=t.get(g,S),T=t.get(v,S),I=C>=0?"p":"n",O=w;y&&(a[s][T]||(a[s][T]={p:w,n:w}),O=a[s][T][I]);var M=void 0,A=void 0,k=void 0,P=void 0;if("radius"===p.dim){var N=p.dataToCoord(C)-w,E=i.dataToCoord(T);Math.abs(N)<f&&(N=(N<0?-1:1)*f),M=O,A=O+N,k=E-c,P=k-u,y&&(a[s][T][I]=A)}else{var R=p.dataToCoord(C,b)-w,L=i.dataToCoord(T);Math.abs(R)<m&&(R=(R<0?-1:1)*m),M=L+c,A=M+u,k=O,P=O+R,y&&(a[s][T][I]=P)}t.setItemLayout(S,{cx:d,cy:h,r0:M,r:A,startAngle:-k*Math.PI/180,endAngle:-P*Math.PI/180,clockwise:k>=P})}}}))}function kX(e){var t={};Sa["k"](e,(function(e,r){var a=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),o=MX(n,i),s=i.getExtent(),l="category"===i.type?i.getBandWidth():Math.abs(s[1]-s[0])/a.count(),c=t[o]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=c.stacks;t[o]=c;var p=OX(e);u[p]||c.autoWidthCount++,u[p]=u[p]||{width:0,maxWidth:0};var d=rl(e.get("barWidth"),l),h=rl(e.get("barMaxWidth"),l),f=e.get("barGap"),m=e.get("barCategoryGap");d&&!u[p].width&&(d=Math.min(c.remainedWidth,d),u[p].width=d,c.remainedWidth-=d),h&&(u[p].maxWidth=h),null!=f&&(c.gap=f),null!=m&&(c.categoryGap=m)}));var r={};return Sa["k"](t,(function(e,t){r[t]={};var a=e.stacks,n=e.bandWidth,i=rl(e.categoryGap,n),o=rl(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,c=(s-i)/(l+(l-1)*o);c=Math.max(c,0),Sa["k"](a,(function(e,t){var r=e.maxWidth;r&&r<c&&(r=Math.min(r,s),e.width&&(r=Math.min(r,e.width)),s-=r,e.width=r,l--)})),c=(s-i)/(l+(l-1)*o),c=Math.max(c,0);var u,p=0;Sa["k"](a,(function(e,t){e.width||(e.width=c),u=e,p+=e.width*(1+o)})),u&&(p-=u.width*o);var d=-p/2;Sa["k"](a,(function(e,a){r[t][a]=r[t][a]||{offset:d,width:e.width},d+=e.width*(1+o)}))})),r}var PX=AX,NX={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},EX={splitNumber:5},RX=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.type="polar",t}(Gy);function LX(e){JD(GY),BN.registerAxisPointerClass("PolarAxisPointer",YY),e.registerCoordinateSystem("polar",fX),e.registerComponentModel(ZY),e.registerComponentView(RX),Dk(e,"angle",JY,NX),Dk(e,"radius",QY,EX),e.registerComponentView(xX),e.registerComponentView(IX),e.registerLayout(Object(Sa["h"])(PX,"bar"))}function jX(e,t){t=t||{};var r=e.coordinateSystem,a=e.axis,n={},i=a.position,o=a.orient,s=r.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],c={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};n.position=["vertical"===o?c.vertical[i]:l[0],"horizontal"===o?c.horizontal[i]:l[3]];var u={horizontal:0,vertical:1};n.rotation=Math.PI/2*u[o];var p={top:-1,bottom:1,right:1,left:-1};n.labelDirection=n.tickDirection=n.nameDirection=p[i],e.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),Sa["O"](t.labelInside,e.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var d=t.rotate;return null==d&&(d=e.get(["axisLabel","rotate"])),n.labelRotation="top"===i?-d:d,n.z2=1,n}var FX=["axisLine","axisTickLabel","axisName"],VX=["splitArea","splitLine"],zX=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="SingleAxisPointer",r}return xa(t,e),t.prototype.render=function(t,r,a,n){var i=this.group;i.removeAll();var o=this._axisGroup;this._axisGroup=new Bs;var s=jX(t),l=new IN(t,s);Sa["k"](FX,l.add,l),i.add(this._axisGroup),i.add(l.getGroup()),Sa["k"](VX,(function(e){t.get([e,"show"])&&BX[e](this,this.group,this._axisGroup,t)}),this),W_(o,this._axisGroup,t),e.prototype.render.call(this,t,r,a,n)},t.prototype.remove=function(){UN(this)},t.type="singleAxis",t}(BN),BX={splitLine:function(e,t,r,a){var n=a.axis;if(!n.scale.isBlank()){var i=a.getModel("splitLine"),o=i.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),c=a.coordinateSystem.getRect(),u=n.isHorizontal(),p=[],d=0,h=n.getTicksCoords({tickModel:i}),f=[],m=[],g=0;g<h.length;++g){var v=n.toGlobalCoord(h[g].coord);u?(f[0]=v,f[1]=c.y,m[0]=v,m[1]=c.y+c.height):(f[0]=c.x,f[1]=v,m[0]=c.x+c.width,m[1]=v);var y=new Jb({shape:{x1:f[0],y1:f[1],x2:m[0],y2:m[1]},silent:!0});j_(y.shape,l);var b=d++%s.length;p[b]=p[b]||[],p[b].push(y)}var _=o.getLineStyle(["color"]);for(g=0;g<p.length;++g)t.add(R_(p[g],{style:Sa["i"]({stroke:s[g%s.length]},_),silent:!0}))}},splitArea:function(e,t,r,a){GN(e,r,a,a)}},$X=zX,GX=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.getCoordSysModel=function(){return this},t.type="singleAxis",t.layoutMode="box",t.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}}},t}(fm);Object(Sa["K"])(GX,pk.prototype);var UX=GX,WX=function(e){function t(t,r,a,n,i){var o=e.call(this,t,r,a)||this;return o.type=n||"value",o.position=i||"bottom",o}return xa(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.pointToData=function(e,t){return this.coordinateSystem.pointToData(e)[0]},t}(tN),HX=WX,qX=["single"],YX=function(){function e(e,t,r){this.type="single",this.dimension="single",this.dimensions=qX,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,r)}return e.prototype._init=function(e,t,r){var a=this.dimension,n=new HX(a,bP(e),[0,0],e.get("type"),e.get("position")),i="category"===n.type;n.onBand=i&&e.get("boundaryGap"),n.inverse=e.get("inverse"),n.orient=e.get("orient"),e.axis=n,n.model=e,n.coordinateSystem=this,this._axis=n},e.prototype.update=function(e,t){e.eachSeries((function(e){if(e.coordinateSystem===this){var t=e.getData();Object(Sa["k"])(t.mapDimensionsAll(this.dimension),(function(e){this._axis.scale.unionExtentFromData(t,e)}),this),yP(this._axis.scale,this._axis.model)}}),this)},e.prototype.resize=function(e,t){this._rect=nm({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()},e.prototype.getRect=function(){return this._rect},e.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,r=t.isHorizontal(),a=r?[0,e.width]:[0,e.height],n=t.inverse?1:0;t.setExtent(a[n],a[1-n]),this._updateAxisTransform(t,r?e.x:e.y)},e.prototype._updateAxisTransform=function(e,t){var r=e.getExtent(),a=r[0]+r[1],n=e.isHorizontal();e.toGlobalCoord=n?function(e){return e+t}:function(e){return a-e+t},e.toLocalCoord=n?function(e){return e-t}:function(e){return a-e+t}},e.prototype.getAxis=function(){return this._axis},e.prototype.getBaseAxis=function(){return this._axis},e.prototype.getAxes=function(){return[this._axis]},e.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},e.prototype.containPoint=function(e){var t=this.getRect(),r=this.getAxis(),a=r.orient;return"horizontal"===a?r.contain(r.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:r.contain(r.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},e.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e["horizontal"===t.orient?0:1]))]},e.prototype.dataToPoint=function(e){var t=this.getAxis(),r=this.getRect(),a=[],n="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),a[n]=t.toGlobalCoord(t.dataToCoord(+e)),a[1-n]=0===n?r.y+r.height/2:r.x+r.width/2,a},e.prototype.convertToPixel=function(e,t,r){var a=XX(t);return a===this?this.dataToPoint(r):null},e.prototype.convertFromPixel=function(e,t,r){var a=XX(t);return a===this?this.pointToData(r):null},e}();function XX(e){var t=e.seriesModel,r=e.singleAxisModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}var ZX=YX;function KX(e,t){var r=[];return e.eachComponent("singleAxis",(function(a,n){var i=new ZX(a,e,t);i.name="single_"+n,i.resize(a,t),a.coordinateSystem=i,r.push(i)})),e.eachSeries((function(e){if("singleAxis"===e.get("coordinateSystem")){var t=e.getReferringComponents("singleAxis",ec).models[0];e.coordinateSystem=t&&t.coordinateSystem}})),r}var JX={create:KX,dimensions:qX},QX=JX,eZ=["x","y"],tZ=["width","height"],rZ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t.prototype.makeElOption=function(e,t,r,a,n){var i=r.axis,o=i.coordinateSystem,s=iZ(o,1-nZ(i)),l=o.dataToPoint(t)[0],c=a.get("type");if(c&&"none"!==c){var u=aY(a),p=aZ[c](i,l,s);p.style=u,e.graphicKey=p.type,e.pointer=p}var d=jX(r);lY(t,e,d,r,a,n)},t.prototype.getHandleTransform=function(e,t,r){var a=jX(t,{labelInside:!1});a.labelMargin=r.get(["handle","margin"]);var n=sY(t.axis,e,a);return{x:n[0],y:n[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,r,a){var n=r.axis,i=n.coordinateSystem,o=nZ(n),s=iZ(i,o),l=[e.x,e.y];l[o]+=t[o],l[o]=Math.min(s[1],l[o]),l[o]=Math.max(s[0],l[o]);var c=iZ(i,1-o),u=(c[1]+c[0])/2,p=[u,u];return p[o]=l[o],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:p,tooltipOption:{verticalAlign:"middle"}}},t}(rY),aZ={line:function(e,t,r){var a=cY([t,r[0]],[t,r[1]],nZ(e));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(e,t,r){var a=e.getBandWidth(),n=r[1]-r[0];return{type:"Rect",shape:uY([t-a/2,r[0]],[a,n],nZ(e))}}};function nZ(e){return e.isHorizontal()?0:1}function iZ(e,t){var r=e.getRect();return[r[eZ[t]],r[eZ[t]]+r[tZ[t]]]}var oZ=rZ,sZ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.type="single",t}(Gy);function lZ(e){JD(GY),BN.registerAxisPointerClass("SingleAxisPointer",oZ),e.registerComponentView(sZ),e.registerComponentView($X),e.registerComponentModel(UX),Dk(e,"single",UX,UX.defaultOption),e.registerCoordinateSystem("single",QX)}var cZ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.init=function(t,r,a){var n=cm(t);e.prototype.init.apply(this,arguments),uZ(t,n)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),uZ(this.option,t)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.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}},t}(fm);function uZ(e,t){var r,a=e.cellSize;r=Sa["t"](a)?a:e.cellSize=[a,a],1===r.length&&(r[1]=r[0]);var n=Sa["H"]([0,1],(function(e){return om(t,e)&&(r[e]="auto"),null!=r[e]&&"auto"!==r[e]}));lm(e,t,{type:"box",ignoreSize:n})}var pZ=cZ,dZ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(e,t,r){var a=this.group;a.removeAll();var n=e.coordinateSystem,i=n.getRangeInfo(),o=n.getOrient(),s=t.getLocaleModel();this._renderDayRect(e,i,a),this._renderLines(e,i,o,a),this._renderYearText(e,i,o,a),this._renderMonthText(e,s,o,a),this._renderWeekText(e,s,i,o,a)},t.prototype._renderDayRect=function(e,t,r){for(var a=e.coordinateSystem,n=e.getModel("itemStyle").getItemStyle(),i=a.getCellWidth(),o=a.getCellHeight(),s=t.start.time;s<=t.end.time;s=a.getNextNDay(s,1).time){var l=a.dataToRect([s],!1).tl,c=new Cp({shape:{x:l[0],y:l[1],width:i,height:o},cursor:"default",style:n});r.add(c)}},t.prototype._renderLines=function(e,t,r,a){var n=this,i=e.coordinateSystem,o=e.getModel(["splitLine","lineStyle"]).getLineStyle(),s=e.get(["splitLine","show"]),l=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var c=t.start,u=0;c.time<=t.end.time;u++){d(c.formatedDate),0===u&&(c=i.getDateInfo(t.start.y+"-"+t.start.m));var p=c.date;p.setMonth(p.getMonth()+1),c=i.getDateInfo(p)}function d(t){n._firstDayOfMonth.push(i.getDateInfo(t)),n._firstDayPoints.push(i.dataToRect([t],!1).tl);var l=n._getLinePointsOfOneWeek(e,t,r);n._tlpoints.push(l[0]),n._blpoints.push(l[l.length-1]),s&&n._drawSplitline(l,o,a)}d(i.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(n._getEdgesPoints(n._tlpoints,l,r),o,a),s&&this._drawSplitline(n._getEdgesPoints(n._blpoints,l,r),o,a)},t.prototype._getEdgesPoints=function(e,t,r){var a=[e[0].slice(),e[e.length-1].slice()],n="horizontal"===r?0:1;return a[0][n]=a[0][n]-t/2,a[1][n]=a[1][n]+t/2,a},t.prototype._drawSplitline=function(e,t,r){var a=new Yb({z2:20,shape:{points:e},style:t});r.add(a)},t.prototype._getLinePointsOfOneWeek=function(e,t,r){for(var a=e.coordinateSystem,n=a.getDateInfo(t),i=[],o=0;o<7;o++){var s=a.getNextNDay(n.time,o),l=a.dataToRect([s.time],!1);i[2*s.day]=l.tl,i[2*s.day+1]=l["horizontal"===r?"bl":"tr"]}return i},t.prototype._formatterLabel=function(e,t){return Object(Sa["C"])(e)&&e?Yf(e,t):Object(Sa["w"])(e)?e(t):t.nameMap},t.prototype._yearTextPositionControl=function(e,t,r,a,n){var i=t[0],o=t[1],s=["center","bottom"];"bottom"===a?(o+=n,s=["center","top"]):"left"===a?i-=n:"right"===a?(i+=n,s=["center","top"]):o-=n;var l=0;return"left"!==a&&"right"!==a||(l=Math.PI/2),{rotation:l,x:i,y:o,style:{align:s[0],verticalAlign:s[1]}}},t.prototype._renderYearText=function(e,t,r,a){var n=e.getModel("yearLabel");if(n.get("show")){var i=n.get("margin"),o=n.get("position");o||(o="horizontal"!==r?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,c=(s[0][1]+s[1][1])/2,u="horizontal"===r?0:1,p={top:[l,s[u][1]],bottom:[l,s[1-u][1]],left:[s[1-u][0],c],right:[s[u][0],c]},d=t.start.y;+t.end.y>+t.start.y&&(d=d+"-"+t.end.y);var h=n.get("formatter"),f={start:t.start.y,end:t.end.y,nameMap:d},m=this._formatterLabel(h,f),g=new Gp({z2:30,style:_h(n,{text:m})});g.attr(this._yearTextPositionControl(g,p[o],r,o,i)),a.add(g)}},t.prototype._monthTextPositionControl=function(e,t,r,a,n){var i="left",o="top",s=e[0],l=e[1];return"horizontal"===r?(l+=n,t&&(i="center"),"start"===a&&(o="bottom")):(s+=n,t&&(o="middle"),"start"===a&&(i="right")),{x:s,y:l,align:i,verticalAlign:o}},t.prototype._renderMonthText=function(e,t,r,a){var n=e.getModel("monthLabel");if(n.get("show")){var i=n.get("nameMap"),o=n.get("margin"),s=n.get("position"),l=n.get("align"),c=[this._tlpoints,this._blpoints];i&&!Object(Sa["C"])(i)||(i&&(t=sf(i)||t),i=t.get(["time","monthAbbr"])||[]);var u="start"===s?0:1,p="horizontal"===r?0:1;o="start"===s?-o:o;for(var d="center"===l,h=0;h<c[u].length-1;h++){var f=c[u][h].slice(),m=this._firstDayOfMonth[h];if(d){var g=this._firstDayPoints[h];f[p]=(g[p]+c[0][h+1][p])/2}var v=n.get("formatter"),y=i[+m.m-1],b={yyyy:m.y,yy:(m.y+"").slice(2),MM:m.m,M:+m.m,nameMap:y},_=this._formatterLabel(v,b),x=new Gp({z2:30,style:Object(Sa["m"])(_h(n,{text:_}),this._monthTextPositionControl(f,d,r,s,o))});a.add(x)}}},t.prototype._weekTextPositionControl=function(e,t,r,a,n){var i="center",o="middle",s=e[0],l=e[1],c="start"===r;return"horizontal"===t?(s=s+a+(c?1:-1)*n[0]/2,i=c?"right":"left"):(l=l+a+(c?1:-1)*n[1]/2,o=c?"bottom":"top"),{x:s,y:l,align:i,verticalAlign:o}},t.prototype._renderWeekText=function(e,t,r,a,n){var i=e.getModel("dayLabel");if(i.get("show")){var o=e.coordinateSystem,s=i.get("position"),l=i.get("nameMap"),c=i.get("margin"),u=o.getFirstDayOfWeek();if(!l||Object(Sa["C"])(l)){l&&(t=sf(l)||t);var p=t.get(["time","dayOfWeekShort"]);l=p||Object(Sa["H"])(t.get(["time","dayOfWeekAbbr"]),(function(e){return e[0]}))}var d=o.getNextNDay(r.end.time,7-r.lweek).time,h=[o.getCellWidth(),o.getCellHeight()];c=rl(c,Math.min(h[1],h[0])),"start"===s&&(d=o.getNextNDay(r.start.time,-(7+r.fweek)).time,c=-c);for(var f=0;f<7;f++){var m=o.getNextNDay(d,f),g=o.dataToRect([m.time],!1).center,v=f;v=Math.abs((f+u)%7);var y=new Gp({z2:30,style:Object(Sa["m"])(_h(i,{text:l[v]}),this._weekTextPositionControl(g,a,s,c,h))});n.add(y)}}},t.type="calendar",t}(Gy),hZ=dZ,fZ=864e5,mZ=function(){function e(t,r,a){this.type="calendar",this.dimensions=e.dimensions,this.getDimensionsInfo=e.getDimensionsInfo,this._model=t}return e.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},e.prototype.getRangeInfo=function(){return this._rangeInfo},e.prototype.getModel=function(){return this._model},e.prototype.getRect=function(){return this._rect},e.prototype.getCellWidth=function(){return this._sw},e.prototype.getCellHeight=function(){return this._sh},e.prototype.getOrient=function(){return this._orient},e.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},e.prototype.getDateInfo=function(e){e=fl(e);var t=e.getFullYear(),r=e.getMonth()+1,a=r<10?"0"+r:""+r,n=e.getDate(),i=n<10?"0"+n:""+n,o=e.getDay();return o=Math.abs((o+7-this.getFirstDayOfWeek())%7),{y:t+"",m:a,d:i,day:o,time:e.getTime(),formatedDate:t+"-"+a+"-"+i,date:e}},e.prototype.getNextNDay=function(e,t){return t=t||0,0===t||(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t)),this.getDateInfo(e)},e.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 r=this._rangeInfo.weeks||1,a=["width","height"],n=this._model.getCellSize().slice(),i=this._model.getBoxLayoutParams(),o="horizontal"===this._orient?[r,7]:[7,r];Sa["k"]([0,1],(function(e){c(n,e)&&(i[a[e]]=n[e]*o[e])}));var s={width:t.getWidth(),height:t.getHeight()},l=this._rect=nm(i,s);function c(e,t){return null!=e[t]&&"auto"!==e[t]}Sa["k"]([0,1],(function(e){c(n,e)||(n[e]=l[a[e]]/o[e])})),this._sw=n[0],this._sh=n[1]},e.prototype.dataToPoint=function(e,t){Sa["t"](e)&&(e=e[0]),null==t&&(t=!0);var r=this.getDateInfo(e),a=this._rangeInfo,n=r.formatedDate;if(t&&!(r.time>=a.start.time&&r.time<a.end.time+fZ))return[NaN,NaN];var i=r.day,o=this._getRangeInfo([a.start.time,n]).nthWeek;return"vertical"===this._orient?[this._rect.x+i*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]:[this._rect.x+o*this._sw+this._sw/2,this._rect.y+i*this._sh+this._sh/2]},e.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},e.prototype.dataToRect=function(e,t){var r=this.dataToPoint(e,t);return{contentShape:{x:r[0]-(this._sw-this._lineWidth)/2,y:r[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:r,tl:[r[0]-this._sw/2,r[1]-this._sh/2],tr:[r[0]+this._sw/2,r[1]-this._sh/2],br:[r[0]+this._sw/2,r[1]+this._sh/2],bl:[r[0]-this._sw/2,r[1]+this._sh/2]}},e.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,r=Math.floor((e[1]-this._rect.y)/this._sh)+1,a=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(r,t-1,a):this._getDateByWeeksAndDay(t,r-1,a)},e.prototype.convertToPixel=function(e,t,r){var a=gZ(t);return a===this?a.dataToPoint(r):null},e.prototype.convertFromPixel=function(e,t,r){var a=gZ(t);return a===this?a.pointToData(r):null},e.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},e.prototype._initRangeOption=function(){var e,t=this._model.get("range");if(Sa["t"](t)&&1===t.length&&(t=t[0]),Sa["t"](t))e=t;else{var r=t.toString();if(/^\d{4}$/.test(r)&&(e=[r+"-01-01",r+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(r)){var a=this.getDateInfo(r),n=a.date;n.setMonth(n.getMonth()+1);var i=this.getNextNDay(n,-1);e=[a.formatedDate,i.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(r)&&(e=[r,r])}if(!e)return t;var o=this._getRangeInfo(e);return o.start.time>o.end.time&&e.reverse(),e},e.prototype._getRangeInfo=function(e){var t,r=[this.getDateInfo(e[0]),this.getDateInfo(e[1])];r[0].time>r[1].time&&(t=!0,r.reverse());var a=Math.floor(r[1].time/fZ)-Math.floor(r[0].time/fZ)+1,n=new Date(r[0].time),i=n.getDate(),o=r[1].date.getDate();n.setDate(i+a-1);var s=n.getDate();if(s!==o){var l=n.getTime()-r[1].time>0?1:-1;while((s=n.getDate())!==o&&(n.getTime()-r[1].time)*l>0)a-=l,n.setDate(s-l)}var c=Math.floor((a+r[0].day+6)/7),u=t?1-c:c-1;return t&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:a,weeks:c,nthWeek:u,fweek:r[0].day,lweek:r[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,r){var a=this._getRangeInfo(r);if(e>a.weeks||0===e&&t<a.fweek||e===a.weeks&&t>a.lweek)return null;var n=7*(e-1)-a.fweek+t,i=new Date(a.start.time);return i.setDate(+a.start.d+n),this.getDateInfo(i)},e.create=function(t,r){var a=[];return t.eachComponent("calendar",(function(n){var i=new e(n,t,r);a.push(i),n.coordinateSystem=i})),t.eachSeries((function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=a[e.get("calendarIndex")||0])})),a},e.dimensions=["time","value"],e}();function gZ(e){var t=e.calendarModel,r=e.seriesModel,a=t?t.coordinateSystem:r?r.coordinateSystem:null;return a}var vZ=mZ;function yZ(e){e.registerComponentModel(pZ),e.registerComponentView(hZ),e.registerCoordinateSystem("calendar",vZ)}function bZ(e,t){var r=e.existing;if(t.id=e.keyInfo.id,!t.type&&r&&(t.type=r.type),null==t.parentId){var a=t.parentOption;a?t.parentId=a.id:r&&(t.parentId=r.parentId)}t.parentOption=null}function _Z(e,t){var r;return Sa["k"](t,(function(t){null!=e[t]&&"auto"!==e[t]&&(r=!0)})),r}function xZ(e,t,r){var a=Sa["m"]({},r),n=e[t],i=r.$action||"merge";"merge"===i?n?(Sa["I"](n,a,!0),lm(n,a,{ignoreSize:!0}),um(r,n),DZ(r,n),DZ(r,n,"shape"),DZ(r,n,"style"),DZ(r,n,"extra"),r.clipPath=n.clipPath):e[t]=a:"replace"===i?e[t]=a:"remove"===i&&n&&(e[t]=null)}var wZ=["transition","enterFrom","leaveTo"],SZ=wZ.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function DZ(e,t,r){if(r&&(!e[r]&&t[r]&&(e[r]={}),e=e[r],t=t[r]),e&&t)for(var a=r?wZ:SZ,n=0;n<a.length;n++){var i=a[n];null==e[i]&&null!=t[i]&&(e[i]=t[i])}}function CZ(e,t){if(e&&(e.hv=t.hv=[_Z(t,["left","right"]),_Z(t,["top","bottom"])],"group"===e.type)){var r=e,a=t;null==r.width&&(r.width=a.width=0),null==r.height&&(r.height=a.height=0)}}var TZ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.preventAutoZ=!0,r}return xa(t,e),t.prototype.mergeOption=function(t,r){var a=this.option.elements;this.option.elements=null,e.prototype.mergeOption.call(this,t,r),this.option.elements=a},t.prototype.optionUpdated=function(e,t){var r=this.option,a=(t?r:e).elements,n=r.elements=t?[]:r.elements,i=[];this._flatten(a,i,null);var o=Nl(n,i,"normalMerge"),s=this._elOptionsToUpdate=[];Sa["k"](o,(function(e,t){var r=e.newOption;r&&(s.push(r),bZ(e,r),xZ(n,t,r),CZ(n[t],r))}),this),r.elements=Sa["n"](n,(function(e){return e&&delete e.$action,null!=e}))},t.prototype._flatten=function(e,t,r){Sa["k"](e,(function(e){if(e){r&&(e.parentOption=r),t.push(e);var a=e.children;a&&a.length&&this._flatten(a,t,e),delete e.children}}),this)},t.prototype.useElOptionsToUpdate=function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e},t.type="graphic",t.defaultOption={elements:[]},t}(fm),IZ={path:null,compoundPath:null,group:Bs,image:gp,text:Gp},OZ=Zl(),MZ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.init=function(){this._elMap=Sa["f"]()},t.prototype.render=function(e,t,r){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,r)},t.prototype._updateElements=function(e){var t=e.useElOptionsToUpdate();if(t){var r=this._elMap,a=this.group,n=e.get("z"),i=e.get("zlevel");Sa["k"](t,(function(t){var o=$l(t.id,null),s=null!=o?r.get(o):null,l=$l(t.parentId,null),c=null!=l?r.get(l):a,u=t.type,p=t.style;"text"===u&&p&&t.hv&&t.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var d=t.textContent,h=t.textConfig;if(p&&kH(p,u,!!h,!!d)){var f=PH(p,u,!0);!h&&f.textConfig&&(h=t.textConfig=f.textConfig),!d&&f.textContent&&(d=f.textContent)}var m=EZ(t);var g=t.$action||"merge",v="merge"===g,y="replace"===g;if(v){var b=!s,_=s;b?_=kZ(o,c,t.type,r):(_&&(OZ(_).isNew=!1),iq(_)),_&&(BH(_,m,e,{isInit:b}),NZ(_,t,n,i))}else if(y){PZ(s,t,r,e);var x=kZ(o,c,t.type,r);x&&(BH(x,m,e,{isInit:!0}),NZ(x,t,n,i))}else"remove"===g&&($H(s,t),PZ(s,t,r,e));var w=r.get(o);if(w&&d)if(v){var S=w.getTextContent();S?S.attr(d):w.setTextContent(new Gp(d))}else y&&w.setTextContent(new Gp(d));if(w){var D=t.clipPath;if(D){var C=D.type,T=void 0;b=!1;if(v){var I=w.getClipPath();b=!I||OZ(I).type!==C,T=b?AZ(C):I}else y&&(b=!0,T=AZ(C));w.setClipPath(T),BH(T,D,e,{isInit:b}),oq(T,D.keyframeAnimation,e)}var O=OZ(w);w.setTextConfig(h),O.option=t,RZ(w,e,t),Q_({el:w,componentModel:e,itemName:w.name,itemTooltipOption:t.tooltip}),oq(w,t.keyframeAnimation,e)}}))}},t.prototype._relocate=function(e,t){for(var r=e.option.elements,a=this.group,n=this._elMap,i=t.getWidth(),o=t.getHeight(),s=["x","y"],l=0;l<r.length;l++){var c=r[l],u=$l(c.id,null),p=null!=u?n.get(u):null;if(p&&p.isGroup){var d=p.parent,h=d===a,f=OZ(p),m=OZ(d);f.width=rl(f.option.width,h?i:m.width)||0,f.height=rl(f.option.height,h?o:m.height)||0}}for(l=r.length-1;l>=0;l--){c=r[l],u=$l(c.id,null),p=null!=u?n.get(u):null;if(p){d=p.parent,m=OZ(d);var g=d===a?{width:i,height:o}:{width:m.width,height:m.height},v={},y=im(p,c,g,null,{hv:c.hv,boundingMode:c.bounding},v);if(!OZ(p).isNew&&y){for(var b=c.transition,_={},x=0;x<s.length;x++){var w=s[x],S=v[w];b&&(UH(b)||Sa["r"](b,w)>=0)?_[w]=S:p[w]=S}sh(p,_,e,0)}else p.attr(v)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each((function(r){PZ(r,OZ(r).option,t,e._lastGraphicModel)})),this._elMap=Sa["f"]()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(Gy);function AZ(e){var t=Sa["q"](IZ,e)?IZ[e]:k_(e);var r=new t({});return OZ(r).type=e,r}function kZ(e,t,r,a){var n=AZ(r);return t.add(n),a.set(e,n),OZ(n).id=e,OZ(n).isNew=!0,n}function PZ(e,t,r,a){var n=e&&e.parent;n&&("group"===e.type&&e.traverse((function(e){PZ(e,t,r,a)})),GH(e,t,a),r.removeKey(OZ(e).id))}function NZ(e,t,r,a){e.isGroup||Sa["k"]([["cursor",tu.prototype.cursor],["zlevel",a||0],["z",r||0],["z2",0]],(function(r){var a=r[0];Sa["q"](t,a)?e[a]=Sa["P"](t[a],r[1]):null==e[a]&&(e[a]=r[1])})),Sa["k"](Sa["F"](t),(function(r){if(0===r.indexOf("on")){var a=t[r];e[r]=Sa["w"](a)?a:null}})),Sa["q"](t,"draggable")&&(e.draggable=t.draggable),null!=t.name&&(e.name=t.name),null!=t.id&&(e.id=t.id)}function EZ(e){return e=Sa["m"]({},e),Sa["k"](["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(Qf),(function(t){delete e[t]})),e}function RZ(e,t,r){var a=Up(e).eventData;e.silent||e.ignore||a||(a=Up(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name}),a&&(a.info=r.info)}function LZ(e){e.registerComponentModel(TZ),e.registerComponentView(MZ),e.registerPreprocessor((function(e){var t=e.graphic;Object(Sa["t"])(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])}))}var jZ=["x","y","radius","angle","single"],FZ=["cartesian2d","polar","singleAxis"];function VZ(e){var t=e.get("coordinateSystem");return Object(Sa["r"])(FZ,t)>=0}function zZ(e){return e+"Axis"}function BZ(e,t){var r,a=Object(Sa["f"])(),n=[],i=Object(Sa["f"])();e.eachComponent({mainType:"dataZoom",query:t},(function(e){i.get(e.uid)||s(e)}));do{r=!1,e.eachComponent("dataZoom",o)}while(r);function o(e){!i.get(e.uid)&&l(e)&&(s(e),r=!0)}function s(e){i.set(e.uid,!0),n.push(e),c(e)}function l(e){var t=!1;return e.eachTargetAxis((function(e,r){var n=a.get(e);n&&n[r]&&(t=!0)})),t}function c(e){e.eachTargetAxis((function(e,t){(a.get(e)||a.set(e,[]))[t]=!0}))}return n}function $Z(e){var t=e.ecModel,r={infoList:[],infoMap:Object(Sa["f"])()};return e.eachTargetAxis((function(e,a){var n=t.getComponent(zZ(e),a);if(n){var i=n.getCoordSysModel();if(i){var o=i.uid,s=r.infoMap.get(o);s||(s={model:i,axisModels:[]},r.infoList.push(s),r.infoMap.set(o,s)),s.axisModels.push(n)}}})),r}var GZ=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),UZ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return xa(t,e),t.prototype.init=function(e,t,r){var a=WZ(e);this.settledOption=a,this.mergeDefaultAndTheme(e,r),this._doInit(a)},t.prototype.mergeOption=function(e){var t=WZ(e);Object(Sa["I"])(this.option,e,!0),Object(Sa["I"])(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var r=this.settledOption;Object(Sa["k"])([["start","startValue"],["end","endValue"]],(function(e,a){"value"===this._rangePropMode[a]&&(t[e[0]]=r[e[0]]=null)}),this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=Object(Sa["f"])(),r=this._fillSpecifiedTargetAxis(t);r?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each((function(e){e.indexList.length&&(this._noTarget=!1)}),this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return Object(Sa["k"])(jZ,(function(r){var a=this.getReferringComponents(zZ(r),tc);if(a.specified){t=!0;var n=new GZ;Object(Sa["k"])(a.models,(function(e){n.add(e.componentIndex)})),e.set(r,n)}}),this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var r=this.ecModel,a=!0;if(a){var n="vertical"===t?"y":"x",i=r.findComponents({mainType:n+"Axis"});o(i,n)}if(a){i=r.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}});o(i,"single")}function o(t,r){var n=t[0];if(n){var i=new GZ;if(i.add(n.componentIndex),e.set(r,i),a=!1,"x"===r||"y"===r){var o=n.getReferringComponents("grid",ec).models[0];o&&Object(Sa["k"])(t,(function(e){n.componentIndex!==e.componentIndex&&o===e.getReferringComponents("grid",ec).models[0]&&i.add(e.componentIndex)}))}}}a&&Object(Sa["k"])(jZ,(function(t){if(a){var n=r.findComponents({mainType:zZ(t),filter:function(e){return"category"===e.get("type",!0)}});if(n[0]){var i=new GZ;i.add(n[0].componentIndex),e.set(t,i),a=!1}}}),this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis((function(t){!e&&(e=t)}),this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,r=this.get("rangeMode");Object(Sa["k"])([["start","startValue"],["end","endValue"]],(function(a,n){var i=null!=e[a[0]],o=null!=e[a[1]];i&&!o?t[n]="percent":!i&&o?t[n]="value":r?t[n]=r[n]:i&&(t[n]="percent")}))},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis((function(t,r){null==e&&(e=this.ecModel.getComponent(zZ(t),r))}),this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each((function(r,a){Object(Sa["k"])(r.indexList,(function(r){e.call(t,a,r)}))}))},t.prototype.getAxisProxy=function(e,t){var r=this.getAxisModel(e,t);if(r)return r.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){var r=this._targetAxisInfoMap.get(e);if(r&&r.indexMap[t])return this.ecModel.getComponent(zZ(e),t)},t.prototype.setRawRange=function(e){var t=this.option,r=this.settledOption;Object(Sa["k"])([["start","startValue"],["end","endValue"]],(function(a){null==e[a[0]]&&null==e[a[1]]||(t[a[0]]=r[a[0]]=e[a[0]],t[a[1]]=r[a[1]]=e[a[1]])}),this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;Object(Sa["k"])(["start","startValue","end","endValue"],(function(r){t[r]=e[r]}))},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var r=this.findRepresentativeAxisProxy();return r?r.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,r=this._targetAxisInfoMap.keys(),a=0;a<r.length;a++)for(var n=r[a],i=this._targetAxisInfoMap.get(n),o=0;o<i.indexList.length;o++){var s=this.getAxisProxy(n,i.indexList[o]);if(s.hostedBy(this))return s;t||(t=s)}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(fm);function WZ(e){var t={};return Object(Sa["k"])(["start","end","startValue","endValue","throttle"],(function(r){e.hasOwnProperty(r)&&(t[r]=e[r])})),t}var HZ=UZ,qZ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.type="dataZoom.select",t}(HZ),YZ=qZ,XZ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(e,t,r,a){this.dataZoomModel=e,this.ecModel=t,this.api=r},t.type="dataZoom",t}(Gy),ZZ=XZ,KZ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.type="dataZoom.select",t}(ZZ),JZ=KZ,QZ=Sa["k"],eK=nl,tK=function(){function e(e,t,r,a){this._dimName=e,this._axisIndex=t,this.ecModel=a,this._dataZoomModel=r}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries((function(t){if(VZ(t)){var r=zZ(this._dimName),a=t.getReferringComponents(r,ec).models[0];a&&this._axisIndex===a.componentIndex&&e.push(t)}}),this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return Sa["d"](this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,r=this._dataExtent,a=this.getAxisModel(),n=a.axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[];QZ(["start","end"],(function(a,c){var u=e[a],p=e[a+"Value"];"percent"===i[c]?(null==u&&(u=o[c]),p=n.parse(tl(u,o,r))):(t=!0,p=null==p?r[c]:n.parse(p),u=tl(p,r,o)),l[c]=null==p||isNaN(p)?r[c]:p,s[c]=null==u||isNaN(u)?o[c]:u})),eK(l),eK(s);var c=this._minMaxSpan;function u(e,t,r,a,i){var o=i?"Span":"ValueSpan";wB(0,e,r,"all",c["min"+o],c["max"+o]);for(var s=0;s<2;s++)t[s]=tl(e[s],r,a,!0),i&&(t[s]=n.parse(t[s]))}return t?u(l,s,r,o,!1):u(s,l,o,r,!0),{valueWindow:l,percentWindow:s}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=rK(this,this._dimName,t),this._updateMinMaxSpan();var r=this.calculateDataWindow(e.settledOption);this._valueWindow=r.valueWindow,this._percentWindow=r.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var r=this._dimName,a=this.getTargetSeriesModels(),n=e.get("filterMode"),i=this._valueWindow;"none"!==n&&QZ(a,(function(e){var t=e.getData(),a=t.mapDimensionsAll(r);if(a.length){if("weakFilter"===n){var s=t.getStore(),l=Sa["H"](a,(function(e){return t.getDimensionIndex(e)}),t);t.filterSelf((function(e){for(var t,r,n,o=0;o<a.length;o++){var c=s.get(l[o],e),u=!isNaN(c),p=c<i[0],d=c>i[1];if(u&&!p&&!d)return!0;u&&(n=!0),p&&(t=!0),d&&(r=!0)}return n&&t&&r}))}else QZ(a,(function(r){if("empty"===n)e.setData(t=t.map(r,(function(e){return o(e)?e:NaN})));else{var a={};a[r]=i,t.selectRange(a)}}));QZ(a,(function(e){t.setApproximateExtent(i,e)}))}}))}function o(e){return e>=i[0]&&e<=i[1]}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,r=this._dataExtent;QZ(["min","max"],(function(a){var n=t.get(a+"Span"),i=t.get(a+"ValueSpan");null!=i&&(i=this.getAxisModel().axis.scale.parse(i)),null!=i?n=tl(r[0]+i,r,[0,100],!0):null!=n&&(i=tl(n,[0,100],r,!0)-r[0]),e[a+"Span"]=n,e[a+"ValueSpan"]=i}),this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,r=this._valueWindow;if(t){var a=sl(r,[0,500]);a=Math.min(a,20);var n=e.axis.scale.rawExtentInfo;0!==t[0]&&n.setDeterminedMinMax("min",+r[0].toFixed(a)),100!==t[1]&&n.setDeterminedMinMax("max",+r[1].toFixed(a)),n.freeze()}},e}();function rK(e,t,r){var a=[1/0,-1/0];QZ(r,(function(e){OP(a,e.getData(),t)}));var n=e.getAxisModel(),i=fP(n.axis.scale,n,a).calculate();return[i.min,i.max]}var aK=tK,nK={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",(function(r){r.eachTargetAxis((function(a,n){var i=e.getComponent(zZ(a),n);t(a,n,i,r)}))}))}t((function(e,t,r,a){r.__dzAxisProxy=null}));var r=[];t((function(t,a,n,i){n.__dzAxisProxy||(n.__dzAxisProxy=new aK(t,a,i,e),r.push(n.__dzAxisProxy))}));var a=Object(Sa["f"])();return Object(Sa["k"])(r,(function(e){Object(Sa["k"])(e.getTargetSeriesModels(),(function(e){a.set(e.uid,e)}))})),a},overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(t,r){e.getAxisProxy(t,r).reset(e)})),e.eachTargetAxis((function(r,a){e.getAxisProxy(r,a).filterData(e,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy();if(t){var r=t.getDataPercentWindow(),a=t.getDataValueWindow();e.setCalculatedRange({start:r[0],end:r[1],startValue:a[0],endValue:a[1]})}}))}},iK=nK;function oK(e){e.registerAction("dataZoom",(function(e,t){var r=BZ(t,e);Object(Sa["k"])(r,(function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}))}var sK=!1;function lK(e){sK||(sK=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,iK),oK(e),e.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function cK(e){e.registerComponentModel(YZ),e.registerComponentView(JZ),lK(e)}var uK=function(){function e(){}return e}(),pK={};function dK(e,t){pK[e]=t}function hK(e){return pK[e]}var fK=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;Sa["k"](this.option.feature,(function(e,r){var a=hK(r);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(t)),Sa["I"](e,a.defaultOption))}))},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.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"}},t}(fm),mK=fK;function gK(e,t,r){var a=t.getBoxLayoutParams(),n=t.get("padding"),i={width:r.getWidth(),height:r.getHeight()},o=nm(a,i,n);rm(t.get("orient"),e,t.get("itemGap"),o.width,o.height),im(e,a,i,n)}function vK(e,t){var r=Gf(t.get("padding")),a=t.getItemStyle(["color","opacity"]);return a.fill=t.get("backgroundColor"),e=new Cp({shape:{x:e.x-r[3],y:e.y-r[0],width:e.width+r[1]+r[3],height:e.height+r[0]+r[2],r:t.get("borderRadius")},style:a,silent:!0,z2:-1}),e}var yK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t.prototype.render=function(e,t,r,a){var n=this.group;if(n.removeAll(),e.get("show")){var i=+e.get("itemSize"),o="vertical"===e.get("orient"),s=e.get("feature")||{},l=this._features||(this._features={}),c=[];Sa["k"](s,(function(e,t){c.push(t)})),new RI(this._featureNames||[],c).add(u).update(u).remove(Sa["h"](u,null)).execute(),this._featureNames=c,gK(n,e,r),n.add(vK(n.getBoundingRect(),e)),o||n.eachChild((function(e){var t=e.__title,a=e.ensureState("emphasis"),o=a.textConfig||(a.textConfig={}),s=e.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!Sa["w"](l)&&t){var c=l.style||(l.style={}),u=_s(t,Gp.makeFont(c)),p=e.x+n.x,d=e.y+n.y+i,h=!1;d+u.height>r.getHeight()&&(o.position="top",h=!0);var f=h?-5-u.height:i+10;p+u.width/2>r.getWidth()?(o.position=["100%",f],c.align="right"):p-u.width/2<0&&(o.position=[0,f],c.align="left")}}))}function u(n,i){var o,u=c[n],d=c[i],h=s[u],f=new Uh(h,e,e.ecModel);if(a&&null!=a.newTitle&&a.featureName===u&&(h.title=a.newTitle),u&&!d){if(bK(u))o={onclick:f.option.onclick,featureName:u};else{var m=hK(u);if(!m)return;o=new m}l[u]=o}else if(o=l[d],!o)return;o.uid=Hh("toolbox-feature"),o.model=f,o.ecModel=t,o.api=r;var g=o instanceof uK;u||!d?!f.get("show")||g&&o.unusable?g&&o.remove&&o.remove(t,r):(p(f,o,u),f.setIconStatus=function(e,t){var r=this.option,a=this.iconPaths;r.iconStatus=r.iconStatus||{},r.iconStatus[e]=t,a[e]&&("emphasis"===t?Id:Od)(a[e])},o instanceof uK&&o.render&&o.render(f,t,r,a)):g&&o.dispose&&o.dispose(t,r)}function p(a,s,l){var c,u,p=a.getModel("iconStyle"),d=a.getModel(["emphasis","iconStyle"]),h=s instanceof uK&&s.getIcons?s.getIcons():a.get("icon"),f=a.get("title")||{};Sa["C"](h)?(c={},c[l]=h):c=h,Sa["C"](f)?(u={},u[l]=f):u=f;var m=a.iconPaths={};Sa["k"](c,(function(l,c){var h=Y_(l,{},{x:-i/2,y:-i/2,width:i,height:i});h.setStyle(p.getItemStyle());var f=h.ensureState("emphasis");f.style=d.getItemStyle();var g=new Gp({style:{text:u[c],align:d.get("textAlign"),borderRadius:d.get("textBorderRadius"),padding:d.get("textPadding"),fill:null,font:Oh({fontStyle:d.get("textFontStyle"),fontFamily:d.get("textFontFamily"),fontSize:d.get("textFontSize"),fontWeight:d.get("textFontWeight")},t)},ignore:!0});h.setTextContent(g),Q_({el:h,componentModel:e,itemName:c,formatterParamsExtra:{title:u[c]}}),h.__title=u[c],h.on("mouseover",(function(){var t=d.getItemStyle(),a=o?null==e.get("right")&&"right"!==e.get("left")?"right":"left":null==e.get("bottom")&&"bottom"!==e.get("top")?"bottom":"top";g.setStyle({fill:d.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:d.get("textBackgroundColor")}),h.setTextConfig({position:d.get("textPosition")||a}),g.ignore=!e.get("showTitle"),r.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==a.get(["iconStatus",c])&&r.leaveEmphasis(this),g.hide()})),("emphasis"===a.get(["iconStatus",c])?Id:Od)(h),n.add(h),h.on("click",Sa["c"](s.onclick,s,t,r,c)),m[c]=h}))}},t.prototype.updateView=function(e,t,r,a){Sa["k"](this._features,(function(e){e instanceof uK&&e.updateView&&e.updateView(e.model,t,r,a)}))},t.prototype.remove=function(e,t){Sa["k"](this._features,(function(r){r instanceof uK&&r.remove&&r.remove(e,t)})),this.group.removeAll()},t.prototype.dispose=function(e,t){Sa["k"](this._features,(function(r){r instanceof uK&&r.dispose&&r.dispose(e,t)}))},t.type="toolbox",t}(Gy);function bK(e){return 0===e.indexOf("my")}var _K=yK,xK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t.prototype.onclick=function(e,t){var r=this.model,a=r.get("name")||e.get("title.0.text")||"echarts",n="svg"===t.getZr().painter.getType(),i=n?"svg":r.get("type",!0)||"png",o=t.getConnectedDataURL({type:i,backgroundColor:r.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:r.get("connectedBackgroundColor"),excludeComponents:r.get("excludeComponents"),pixelRatio:r.get("pixelRatio")}),s=wa["a"].browser;if("function"!==typeof MouseEvent||!s.newEdge&&(s.ie||s.edge))if(window.navigator.msSaveOrOpenBlob||n){var l=o.split(","),c=l[0].indexOf("base64")>-1,u=n?decodeURIComponent(l[1]):l[1];c&&(u=window.atob(u));var p=a+"."+i;if(window.navigator.msSaveOrOpenBlob){var d=u.length,h=new Uint8Array(d);while(d--)h[d]=u.charCodeAt(d);var f=new Blob([h]);window.navigator.msSaveOrOpenBlob(f,p)}else{var m=document.createElement("iframe");document.body.appendChild(m);var g=m.contentWindow,v=g.document;v.open("image/svg+xml","replace"),v.write(u),v.close(),g.focus(),v.execCommand("SaveAs",!0,p),document.body.removeChild(m)}}else{var y=r.get("lang"),b='<body style="margin:0;"><img src="'+o+'" style="max-width:100%;" title="'+(y&&y[0]||"")+'" /></body>',_=window.open();_.document.write(b),_.document.title=a}else{var x=document.createElement("a");x.download=a+"."+i,x.target="_blank",x.href=o;var w=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});x.dispatchEvent(w)}},t.getDefaultOption=function(e){var t={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:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return t},t}(uK),wK=xK,SK="__ec_magicType_stack__",DK=[["line","bar"],["stack"]],CK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),r={};return Sa["k"](e.get("type"),(function(e){t[e]&&(r[e]=t[e])})),r},t.getDefaultOption=function(e){var t={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:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return t},t.prototype.onclick=function(e,t,r){var a=this.model,n=a.get(["seriesIndex",r]);if(TK[r]){var i,o={series:[]},s=function(e){var t=e.subType,n=e.id,i=TK[r](t,n,e,a);i&&(Sa["i"](i,e.option),o.series.push(i));var s=e.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===r||"bar"===r)){var l=s.getAxesByScale("ordinal")[0];if(l){var c=l.dim,u=c+"Axis",p=e.getReferringComponents(u,ec).models[0],d=p.componentIndex;o[u]=o[u]||[];for(var h=0;h<=d;h++)o[u][d]=o[u][d]||{};o[u][d].boundaryGap="bar"===r}}};Sa["k"](DK,(function(e){Sa["r"](e,r)>=0&&Sa["k"](e,(function(e){a.setIconStatus(e,"normal")}))})),a.setIconStatus(r,"emphasis"),e.eachComponent({mainType:"series",query:null==n?null:{seriesIndex:n}},s);var l=r;"stack"===r&&(i=Sa["I"]({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),"emphasis"!==a.get(["iconStatus",r])&&(l="tiled")),t.dispatchAction({type:"changeMagicType",currentType:l,newOption:o,newTitle:i,featureName:"magicType"})}},t}(uK),TK={line:function(e,t,r,a){if("bar"===e)return Sa["I"]({id:t,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(e,t,r,a){if("line"===e)return Sa["I"]({id:t,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(e,t,r,a){var n=r.get("stack")===SK;if("line"===e||"bar"===e)return a.setIconStatus("stack",n?"normal":"emphasis"),Sa["I"]({id:t,stack:n?"":SK},a.get(["option","stack"])||{},!0)}};BD({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)}));var IK=CK,OK=new Array(60).join("-"),MK="\t";function AK(e){var t={},r=[],a=[];return e.eachRawSeries((function(e){var n=e.coordinateSystem;if(!n||"cartesian2d"!==n.type&&"polar"!==n.type)r.push(e);else{var i=n.getBaseAxis();if("category"===i.type){var o=i.dim+"_"+i.index;t[o]||(t[o]={categoryAxis:i,valueAxis:n.getOtherAxis(i),series:[]},a.push({axisDim:i.dim,axisIndex:i.index})),t[o].series.push(e)}else r.push(e)}})),{seriesGroupByCategoryAxis:t,other:r,meta:a}}function kK(e){var t=[];return Sa["k"](e,(function(e,r){var a=e.categoryAxis,n=e.valueAxis,i=n.dim,o=[" "].concat(Sa["H"](e.series,(function(e){return e.name}))),s=[a.model.getCategories()];Sa["k"](e.series,(function(e){var t=e.getRawData();s.push(e.getRawData().mapArray(t.mapDimension(i),(function(e){return e})))}));for(var l=[o.join(MK)],c=0;c<s[0].length;c++){for(var u=[],p=0;p<s.length;p++)u.push(s[p][c]);l.push(u.join(MK))}t.push(l.join("\n"))})),t.join("\n\n"+OK+"\n\n")}function PK(e){return Sa["H"](e,(function(e){var t=e.getRawData(),r=[e.name],a=[];return t.each(t.dimensions,(function(){for(var e=arguments.length,n=arguments[e-1],i=t.getName(n),o=0;o<e-1;o++)a[o]=arguments[o];r.push((i?i+MK:"")+a.join(MK))})),r.join("\n")})).join("\n\n"+OK+"\n\n")}function NK(e){var t=AK(e);return{value:Sa["n"]([kK(t.seriesGroupByCategoryAxis),PK(t.other)],(function(e){return!!e.replace(/[\n\t\s]/g,"")})).join("\n\n"+OK+"\n\n"),meta:t.meta}}function EK(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function RK(e){var t=e.slice(0,e.indexOf("\n"));if(t.indexOf(MK)>=0)return!0}var LK=new RegExp("["+MK+"]+","g");function jK(e){for(var t=e.split(/\n+/g),r=EK(t.shift()).split(LK),a=[],n=Sa["H"](r,(function(e){return{name:e,data:[]}})),i=0;i<t.length;i++){var o=EK(t[i]).split(LK);a.push(o.shift());for(var s=0;s<o.length;s++)n[s]&&(n[s].data[i]=o[s])}return{series:n,categories:a}}function FK(e){for(var t=e.split(/\n+/g),r=EK(t.shift()),a=[],n=0;n<t.length;n++){var i=EK(t[n]);if(i){var o=i.split(LK),s="",l=void 0,c=!1;isNaN(o[0])?(c=!0,s=o[0],o=o.slice(1),a[n]={name:s,value:[]},l=a[n].value):l=a[n]=[];for(var u=0;u<o.length;u++)l.push(+o[u]);1===l.length&&(c?a[n].value=l[0]:a[n]=l[0])}}return{name:r,data:a}}function VK(e,t){var r=e.split(new RegExp("\n*"+OK+"\n*","g")),a={series:[]};return Sa["k"](r,(function(e,r){if(RK(e)){var n=jK(e),i=t[r],o=i.axisDim+"Axis";i&&(a[o]=a[o]||[],a[o][i.axisIndex]={data:n.categories},a.series=a.series.concat(n.series))}else{n=FK(e);a.series.push(n)}})),a}var zK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t.prototype.onclick=function(e,t){setTimeout((function(){t.dispatchAction({type:"hideTip"})}));var r=t.getDom(),a=this.model;this._dom&&r.removeChild(this._dom);var n=document.createElement("div");n.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",n.style.backgroundColor=a.get("backgroundColor")||"#fff";var i=document.createElement("h4"),o=a.get("lang")||[];i.innerHTML=o[0]||a.get("title"),i.style.cssText="margin:10px 20px",i.style.color=a.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="overflow:auto";var c=a.get("optionToContent"),u=a.get("contentToOption"),p=NK(e);if(Sa["w"](c)){var d=c(t.getOption());Sa["C"](d)?s.innerHTML=d:Sa["v"](d)&&s.appendChild(d)}else{l.readOnly=a.get("readOnly");var h=l.style;h.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",h.color=a.get("textColor"),h.borderColor=a.get("textareaBorderColor"),h.backgroundColor=a.get("textareaColor"),l.value=p.value,s.appendChild(l)}var f=p.meta,m=document.createElement("div");m.style.cssText="position:absolute;bottom:5px;left:0;right:0";var g="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");g+=";background-color:"+a.get("buttonColor"),g+=";color:"+a.get("buttonTextColor");var b=this;function _(){r.removeChild(n),b._dom=null}yn(v,"click",_),yn(y,"click",(function(){if(null==u&&null!=c||null!=u&&null==c)_();else{var e;try{e=Sa["w"](u)?u(s,t.getOption()):VK(l.value,f)}catch(r){throw _(),new Error("Data view format error "+r)}e&&t.dispatchAction({type:"changeDataView",newOption:e}),_()}})),v.innerHTML=o[1],y.innerHTML=o[2],y.style.cssText=v.style.cssText=g,!a.get("readOnly")&&m.appendChild(y),m.appendChild(v),n.appendChild(i),n.appendChild(s),n.appendChild(m),s.style.height=r.clientHeight-80+"px",r.appendChild(n),this._dom=n},t.prototype.remove=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.getDefaultOption=function(e){var t={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:e.getLocaleModel().get(["toolbox","dataView","title"]),lang:e.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return t},t}(uK);function BK(e,t){return Sa["H"](e,(function(e,r){var a=t&&t[r];if(Sa["A"](a)&&!Sa["t"](a)){var n=Sa["A"](e)&&!Sa["t"](e);n||(e={value:e});var i=null!=a.name&&null==e.name;return e=Sa["i"](e,a),i&&delete e.name,e}return e}))}BD({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(e,t){var r=[];Sa["k"](e.newOption.series,(function(e){var a=t.getSeriesByName(e.name)[0];if(a){var n=a.get("data");r.push({name:e.name,data:BK(e.data,n)})}else r.push(Sa["m"]({type:"scatter"},e))})),t.mergeOption(Sa["i"]({series:r},e.newOption))}));var $K=zK,GK=Sa["k"],UK=Zl();function WK(e,t){var r=XK(e);GK(t,(function(t,a){for(var n=r.length-1;n>=0;n--){var i=r[n];if(i[a])break}if(n<0){var o=e.queryComponents({mainType:"dataZoom",subType:"select",id:a})[0];if(o){var s=o.getPercentRange();r[0][a]={dataZoomId:a,start:s[0],end:s[1]}}}})),r.push(t)}function HK(e){var t=XK(e),r=t[t.length-1];t.length>1&&t.pop();var a={};return GK(r,(function(e,r){for(var n=t.length-1;n>=0;n--)if(e=t[n][r],e){a[r]=e;break}})),a}function qK(e){UK(e).snapshots=null}function YK(e){return XK(e).length}function XK(e){var t=UK(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var ZK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t.prototype.onclick=function(e,t){qK(e),t.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var t={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:e.getLocaleModel().get(["toolbox","restore","title"])};return t},t}(uK);BD({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(e,t){t.resetOption("recreate")}));var KK=ZK,JK=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],QK=function(){function e(e,t,r){var a=this;this._targetInfoList=[];var n=tJ(t,e);Object(Sa["k"])(rJ,(function(e,t){(!r||!r.include||Object(Sa["r"])(r.include,t)>=0)&&e(n,a._targetInfoList)}))}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,(function(e,t,r){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var a=iJ[e.brushType](0,r,t);e.__rangeOffset={offset:sJ[e.brushType](a.values,e.range,[1,1]),xyMinMax:a.xyMinMax}}})),e},e.prototype.matchOutputRanges=function(e,t,r){Object(Sa["k"])(e,(function(e){var a=this.findTargetInfo(e,t);a&&!0!==a&&Object(Sa["k"])(a.coordSyses,(function(a){var n=iJ[e.brushType](1,a,e.range,!0);r(e,n.values,a,t)}))}),this)},e.prototype.setInputRanges=function(e,t){Object(Sa["k"])(e,(function(e){var r=this.findTargetInfo(e,t);if(e.range=e.range||[],r&&!0!==r){e.panelId=r.panelId;var a=iJ[e.brushType](0,r.coordSys,e.coordRange),n=e.__rangeOffset;e.range=n?sJ[e.brushType](a.values,n.offset,cJ(a.xyMinMax,n.xyMinMax)):a.values}}),this)},e.prototype.makePanelOpts=function(e,t){return Object(Sa["H"])(this._targetInfoList,(function(r){var a=r.getPanelRect();return{panelId:r.panelId,defaultBrushType:t?t(r):null,clipPath:F$(a),isTargetByCursor:z$(a,e,r.coordSysModel),getLinearBrushOtherExtent:V$(a)}}))},e.prototype.controlSeries=function(e,t,r){var a=this.findTargetInfo(e,r);return!0===a||a&&Object(Sa["r"])(a.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var r=this._targetInfoList,a=tJ(t,e),n=0;n<r.length;n++){var i=r[n],o=e.panelId;if(o){if(i.panelId===o)return i}else for(var s=0;s<aJ.length;s++)if(aJ[s](a,i))return i}return!0},e}();function eJ(e){return e[0]>e[1]&&e.reverse(),e}function tJ(e,t){return Jl(e,t,{includeMainTypes:JK})}var rJ={grid:function(e,t){var r=e.xAxisModels,a=e.yAxisModels,n=e.gridModels,i=Object(Sa["f"])(),o={},s={};(r||a||n)&&(Object(Sa["k"])(r,(function(e){var t=e.axis.grid.model;i.set(t.id,t),o[t.id]=!0})),Object(Sa["k"])(a,(function(e){var t=e.axis.grid.model;i.set(t.id,t),s[t.id]=!0})),Object(Sa["k"])(n,(function(e){i.set(e.id,e),o[e.id]=!0,s[e.id]=!0})),i.each((function(e){var n=e.coordinateSystem,i=[];Object(Sa["k"])(n.getCartesians(),(function(e,t){(Object(Sa["r"])(r,e.getAxis("x").model)>=0||Object(Sa["r"])(a,e.getAxis("y").model)>=0)&&i.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:i[0],coordSyses:i,getPanelRect:nJ.grid,xAxisDeclared:o[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){Object(Sa["k"])(e.geoModels,(function(e){var r=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:r,coordSyses:[r],getPanelRect:nJ.geo})}))}},aJ=[function(e,t){var r=e.xAxisModel,a=e.yAxisModel,n=e.gridModel;return!n&&r&&(n=r.axis.grid.model),!n&&a&&(n=a.axis.grid.model),n&&n===t.gridModel},function(e,t){var r=e.geoModel;return r&&r===t.geoModel}],nJ={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(z_(e)),t}},iJ={lineX:Object(Sa["h"])(oJ,0),lineY:Object(Sa["h"])(oJ,1),rect:function(e,t,r,a){var n=e?t.pointToData([r[0][0],r[1][0]],a):t.dataToPoint([r[0][0],r[1][0]],a),i=e?t.pointToData([r[0][1],r[1][1]],a):t.dataToPoint([r[0][1],r[1][1]],a),o=[eJ([n[0],i[0]]),eJ([n[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,r,a){var n=[[1/0,-1/0],[1/0,-1/0]],i=Object(Sa["H"])(r,(function(r){var i=e?t.pointToData(r,a):t.dataToPoint(r,a);return n[0][0]=Math.min(n[0][0],i[0]),n[1][0]=Math.min(n[1][0],i[1]),n[0][1]=Math.max(n[0][1],i[0]),n[1][1]=Math.max(n[1][1],i[1]),i}));return{values:i,xyMinMax:n}}};function oJ(e,t,r,a){var n=r.getAxis(["x","y"][e]),i=eJ(Object(Sa["H"])([0,1],(function(e){return t?n.coordToData(n.toLocalCoord(a[e]),!0):n.toGlobalCoord(n.dataToCoord(a[e]))}))),o=[];return o[e]=i,o[1-e]=[NaN,NaN],{values:i,xyMinMax:o}}var sJ={lineX:Object(Sa["h"])(lJ,0),lineY:Object(Sa["h"])(lJ,1),rect:function(e,t,r){return[[e[0][0]-r[0]*t[0][0],e[0][1]-r[0]*t[0][1]],[e[1][0]-r[1]*t[1][0],e[1][1]-r[1]*t[1][1]]]},polygon:function(e,t,r){return Object(Sa["H"])(e,(function(e,a){return[e[0]-r[0]*t[a][0],e[1]-r[1]*t[a][1]]}))}};function lJ(e,t,r,a){return[t[0]-a[e]*r[0],t[1]-a[e]*r[1]]}function cJ(e,t){var r=uJ(e),a=uJ(t),n=[r[0]/a[0],r[1]/a[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function uJ(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var pJ=QK,dJ=Sa["k"],hJ=Wl("toolbox-dataZoom_"),fJ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t.prototype.render=function(e,t,r,a){this._brushController||(this._brushController=new j$(r.getZr()),this._brushController.on("brush",Sa["c"](this._onBrush,this)).mount()),yJ(e,t,this,a,r),vJ(e,t)},t.prototype.onclick=function(e,t,r){mJ[r].call(this)},t.prototype.remove=function(e,t){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(e.isEnd&&t.length){var r={},a=this.ecModel;this._brushController.updateCovers([]);var n=new pJ(gJ(this.model),a,{include:["grid"]});n.matchOutputRanges(t,a,(function(e,t,r){if("cartesian2d"===r.type){var a=e.brushType;"rect"===a?(i("x",r,t[0]),i("y",r,t[1])):i({lineX:"x",lineY:"y"}[a],r,t)}})),WK(a,r),this._dispatchZoomAction(r)}function i(e,t,n){var i=t.getAxis(e),s=i.model,l=o(e,s,a),c=l.findRepresentativeAxisProxy(s).getMinMaxSpan();null==c.minValueSpan&&null==c.maxValueSpan||(n=wB(0,n.slice(),i.scale.getExtent(),0,c.minValueSpan,c.maxValueSpan)),l&&(r[l.id]={dataZoomId:l.id,startValue:n[0],endValue:n[1]})}function o(e,t,r){var a;return r.eachComponent({mainType:"dataZoom",subType:"select"},(function(r){var n=r.getAxisModel(e,t.componentIndex);n&&(a=r)})),a}},t.prototype._dispatchZoomAction=function(e){var t=[];dJ(e,(function(e,r){t.push(Sa["d"](e))})),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},t.getDefaultOption=function(e){var t={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:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return t},t}(uK),mJ={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(HK(this.ecModel))}};function gJ(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}function vJ(e,t){e.setIconStatus("back",YK(t)>1?"emphasis":"normal")}function yJ(e,t,r,a,n){var i=r._isZoomActive;a&&"takeGlobalCursor"===a.type&&(i="dataZoomSelect"===a.key&&a.dataZoomSelectActive),r._isZoomActive=i,e.setIconStatus("zoom",i?"emphasis":"normal");var o=new pJ(gJ(e),t,{include:["grid"]}),s=o.makePanelOpts(n,(function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}));r._brushController.setPanels(s).enableBrush(!(!i||!s.length)&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}jm("dataZoom",(function(e){var t=e.getComponent("toolbox",0),r=["feature","dataZoom"];if(t&&null!=t.get(r)){var a=t.getModel(r),n=[],i=gJ(a),o=Jl(e,i);return dJ(o.xAxisModels,(function(e){return s(e,"xAxis","xAxisIndex")})),dJ(o.yAxisModels,(function(e){return s(e,"yAxis","yAxisIndex")})),n}function s(e,t,r){var i=e.componentIndex,o={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:hJ+t+i};o[r]=i,n.push(o)}}));var bJ=fJ;function _J(e){e.registerComponentModel(mK),e.registerComponentView(_K),dK("saveAsImage",wK),dK("magicType",IK),dK("dataView",$K),dK("dataZoom",bJ),dK("restore",KK),JD(cK)}var xJ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(fm),wJ=xJ;function SJ(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function DJ(e){if(wa["a"].domSupported)for(var t=document.documentElement.style,r=0,a=e.length;r<a;r++)if(e[r]in t)return e[r]}var CJ=DJ(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),TJ=DJ(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function IJ(e,t){if(!e)return t;t=$f(t,!0);var r=e.indexOf(t);return e=-1===r?t:"-"+e.slice(0,r)+"-"+t,e.toLowerCase()}function OJ(e,t){var r=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return r?t?r[t]:r:null}var MJ=IJ(TJ,"transition"),AJ=IJ(CJ,"transform"),kJ="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(wa["a"].transform3dSupported?"will-change:transform;":"");function PJ(e){return e="left"===e?"right":"right"===e?"left":"top"===e?"bottom":"top",e}function NJ(e,t,r){if(!Object(Sa["C"])(r)||"inside"===r)return"";var a=e.get("backgroundColor"),n=e.get("borderWidth");t=Zf(t);var i,o=PJ(r),s=Math.max(1.5*Math.round(n),6),l="",c=AJ+":";Object(Sa["r"])(["left","right"],o)>-1?(l+="top:50%",c+="translateY(-50%) rotate("+(i="left"===o?-225:-45)+"deg)"):(l+="left:50%",c+="translateX(-50%) rotate("+(i="top"===o?225:45)+"deg)");var u=i*Math.PI/180,p=s+n,d=p*Math.abs(Math.cos(u))+p*Math.abs(Math.sin(u)),h=Math.round(100*((d-Math.SQRT2*n)/2+Math.SQRT2*n-(d-p)/2))/100;l+=";"+o+":-"+h+"px";var f=t+" solid "+n+"px;",m=["position:absolute;width:"+s+"px;height:"+s+"px;z-index:-1;",l+";"+c+";","border-bottom:"+f,"border-right:"+f,"background-color:"+a+";"];return'<div style="'+m.join("")+'"></div>'}function EJ(e,t){var r="cubic-bezier(0.23,1,0.32,1)",a=" "+e/2+"s "+r,n="opacity"+a+",visibility"+a;return t||(a=" "+e+"s "+r,n+=wa["a"].transformSupported?","+AJ+a:",left"+a+",top"+a),MJ+":"+n}function RJ(e,t,r){var a=e.toFixed(0)+"px",n=t.toFixed(0)+"px";if(!wa["a"].transformSupported)return r?"top:"+n+";left:"+a+";":[["top",n],["left",a]];var i=wa["a"].transform3dSupported,o="translate"+(i?"3d":"")+"("+a+","+n+(i?",0":"")+")";return r?"top:0;left:0;"+AJ+":"+o+";":[["top",0],["left",0],[CJ,o]]}function LJ(e){var t=[],r=e.get("fontSize"),a=e.getTextColor();a&&t.push("color:"+a),t.push("font:"+e.getFont()),r&&t.push("line-height:"+Math.round(3*r/2)+"px");var n=e.get("textShadowColor"),i=e.get("textShadowBlur")||0,o=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return n&&i&&t.push("text-shadow:"+o+"px "+s+"px "+i+"px "+n),Object(Sa["k"])(["decoration","align"],(function(r){var a=e.get(r);a&&t.push("text-"+r+":"+a)})),t.join(";")}function jJ(e,t,r){var a=[],n=e.get("transitionDuration"),i=e.get("backgroundColor"),o=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),c=e.get("shadowOffsetY"),u=e.getModel("textStyle"),p=Cy(e,"html"),d=l+"px "+c+"px "+o+"px "+s;return a.push("box-shadow:"+d),t&&n&&a.push(EJ(n,r)),i&&a.push("background-color:"+i),Object(Sa["k"])(["width","color","radius"],(function(t){var r="border-"+t,n=$f(r),i=e.get(n);null!=i&&a.push(r+":"+i+("color"===t?"":"px"))})),a.push(LJ(u)),null!=p&&a.push("padding:"+Gf(p).join("px ")+"px"),a.join(";")+";"}function FJ(e,t,r,a,n){var i=t&&t.painter;if(r){var o=i&&i.getViewportRoot();o&&tn(e,o,r,a,n)}else{e[0]=a,e[1]=n;var s=i&&i.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var VJ=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,wa["a"].wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var a=this._zr=e.getZr(),n=t.appendTo,i=n&&(Object(Sa["C"])(n)?document.querySelector(n):Object(Sa["v"])(n)?n:Object(Sa["w"])(n)&&n(e.getDom()));FJ(this._styleCoord,a,i,e.getWidth()/2,e.getHeight()/2),(i||e.getDom()).appendChild(r),this._api=e,this._container=i;var o=this;r.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},r.onmousemove=function(e){if(e=e||window.event,!o._enterable){var t=a.handler,r=a.painter.getViewportRoot();gn(r,e,!0),t.dispatch("mousemove",e)}},r.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),r=OJ(t,"position"),a=t.style;"absolute"!==a.position&&"absolute"!==r&&(a.position="relative")}var n=e.get("alwaysShowContent");n&&this._moveIfResized(),this._alwaysShowContent=n,this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var r=this.el,a=r.style,n=this._styleCoord;r.innerHTML?a.cssText=kJ+jJ(e,!this._firstShow,this._longHide)+RJ(n[0],n[1],!0)+"border-color:"+Zf(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,r,a,n){var i=this.el;if(null!=e){var o="";if(Object(Sa["C"])(n)&&"item"===r.get("trigger")&&!SJ(r)&&(o=NJ(r,a,n)),Object(Sa["C"])(e))i.innerHTML=e+o;else if(e){i.innerHTML="",Object(Sa["t"])(e)||(e=[e]);for(var s=0;s<e.length;s++)Object(Sa["v"])(e[s])&&e[s].parentNode!==i&&i.appendChild(e[s]);if(o&&i.childNodes.length){var l=document.createElement("div");l.innerHTML=o,i.appendChild(l)}}}else i.innerHTML=""},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},e.prototype.moveTo=function(e,t){var r=this._styleCoord;if(FJ(r,this._zr,this._container,e,t),null!=r[0]&&null!=r[1]){var a=this.el.style,n=RJ(r[0],r[1]);Object(Sa["k"])(n,(function(e){a[e[0]]=e[1]}))}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",wa["a"].transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout((function(){return e._longHide=!0}),500)},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Object(Sa["c"])(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},e}(),zJ=VJ,BJ=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),UJ(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,r,a,n){var i=this;Sa["A"](e)&&Zm(""),this.el&&this._zr.remove(this.el);var o=r.getModel("textStyle");this.el=new Gp({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:a,textShadowColor:o.get("textShadowColor"),fill:r.get(["textStyle","color"]),padding:Cy(r,"richText"),verticalAlign:"top",align:"left"},z:r.get("z")}),Sa["k"](["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],(function(e){i.el.style[e]=r.get(e)})),Sa["k"](["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],(function(e){i.el.style[e]=o.get(e)||0})),this._zr.add(this.el);var s=this;this.el.on("mouseover",(function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0})),this.el.on("mouseout",(function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1}))},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),r=GJ(e.style);return[t.width+r.left+r.right,t.height+r.top+r.bottom]},e.prototype.moveTo=function(e,t){var r=this.el;if(r){var a=this._styleCoord;UJ(a,this._zr,e,t),e=a[0],t=a[1];var n=r.style,i=$J(n.borderWidth||0),o=GJ(n);r.x=e+i+o.left,r.y=t+i+o.top,r.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Sa["c"](this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function $J(e){return Math.max(0,e)}function GJ(e){var t=$J(e.shadowBlur||0),r=$J(e.shadowOffsetX||0),a=$J(e.shadowOffsetY||0);return{left:$J(t-r),right:$J(t+r),top:$J(t-a),bottom:$J(t+a)}}function UJ(e,t,r,a){e[0]=r,e[1]=a,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var WJ=BJ,HJ=new Cp({shape:{x:-1,y:-1,width:2,height:2}}),qJ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.init=function(e,t){if(!wa["a"].node&&t.getDom()){var r=e.getComponent("tooltip"),a=this._renderMode=ic(r.get("renderMode"));this._tooltipContent="richText"===a?new WJ(t):new zJ(t,{appendTo:r.get("appendToBody",!0)?"body":r.get("appendTo",!0)})}},t.prototype.render=function(e,t,r){if(!wa["a"].node&&r.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=r;var a=this._tooltipContent;a.update(e),a.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?mx(this,"_updatePosition",50,"fixRate"):gx(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel,t=e.get("triggerOn");xY("itemTooltip",this._api,Object(Sa["c"])((function(e,r,a){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(r,a):"leave"===e&&this._hide(a))}),this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,r=this._api,a=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==a&&"click"!==a){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!r.isDisposed()&&n.manuallyShowTip(e,t,r,{x:n._lastX,y:n._lastY,dataByCoordSys:n._lastDataByCoordSys})}))}},t.prototype.manuallyShowTip=function(e,t,r,a){if(a.from!==this.uid&&!wa["a"].node&&r.getDom()){var n=XJ(a,r);this._ticket="";var i=a.dataByCoordSys,o=eQ(a,t,r);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:a.position,positionDefault:"bottom"},n)}else if(a.tooltip&&null!=a.x&&null!=a.y){var l=HJ;l.x=a.x,l.y=a.y,l.update(),Up(l).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:l},n)}else if(i)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:i,tooltipOption:a.tooltipOption},n);else if(null!=a.seriesIndex){if(this._manuallyAxisShowTip(e,t,r,a))return;var c=AY(a,t),u=c.point[0],p=c.point[1];null!=u&&null!=p&&this._tryShow({offsetX:u,offsetY:p,target:c.el,position:a.position,positionDefault:"bottom"},n)}else null!=a.x&&null!=a.y&&(r.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:r.getZr().findHover(a.x,a.y).target},n))}},t.prototype.manuallyHideTip=function(e,t,r,a){var n=this._tooltipContent;this._tooltipModel&&n.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(XJ(a,r))},t.prototype._manuallyAxisShowTip=function(e,t,r,a){var n=a.seriesIndex,i=a.dataIndex,o=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=n&&null!=i&&null!=o){var s=t.getSeriesByIndex(n);if(s){var l=s.getData(),c=YJ([l.getItemModel(i),s,(s.coordinateSystem||{}).model],this._tooltipModel);if("axis"===c.get("trigger"))return r.dispatchAction({type:"updateAxisPointer",seriesIndex:n,dataIndex:i,position:a.position}),!0}}},t.prototype._tryShow=function(e,t){var r=e.target,a=this._tooltipModel;if(a){this._lastX=e.offsetX,this._lastY=e.offsetY;var n=e.dataByCoordSys;if(n&&n.length)this._showAxisTooltip(n,e);else if(r){var i,o,s=Up(r);if("legend"===s.ssrType)return;this._lastDataByCoordSys=null,cw(r,(function(e){return null!=Up(e).dataIndex?(i=e,!0):null!=Up(e).tooltipConfig?(o=e,!0):void 0}),!0),i?this._showSeriesItemTooltip(e,i,t):o?this._showComponentItemTooltip(e,o,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var r=e.get("showDelay");t=Object(Sa["c"])(t,this),clearTimeout(this._showTimout),r>0?this._showTimout=setTimeout(t,r):t()},t.prototype._showAxisTooltip=function(e,t){var r=this._ecModel,a=this._tooltipModel,n=[t.offsetX,t.offsetY],i=YJ([t.tooltipOption],a),o=this._renderMode,s=[],l=py("section",{blocks:[],noHeader:!0}),c=[],u=new Ty;Object(Sa["k"])(e,(function(e){Object(Sa["k"])(e.dataByAxis,(function(e){var t=r.getComponent(e.axisDim+"Axis",e.axisIndex),n=e.value;if(t&&null!=n){var i=oY(n,t.axis,r,e.seriesDataIndices,e.valueLabelOpt),p=py("section",{header:i,noHeader:!Object(Sa["T"])(i),sortBlocks:!0,blocks:[]});l.blocks.push(p),Object(Sa["k"])(e.seriesDataIndices,(function(l){var d=r.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,f=d.getDataParams(h);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=wP(t.axis,{value:n}),f.axisValueLabel=i,f.marker=u.makeTooltipMarker("item",Zf(f.color),o);var m=xv(d.formatTooltip(h,!0,null)),g=m.frag;if(g){var v=YJ([d],a).get("valueFormatter");p.blocks.push(v?Object(Sa["m"])({valueFormatter:v},g):g)}m.text&&c.push(m.text),s.push(f)}}))}}))})),l.blocks.reverse(),c.reverse();var p=t.position,d=i.get("order"),h=vy(l,u,o,d,r.get("useUTC"),i.get("textStyle"));h&&c.unshift(h);var f="richText"===o?"\n\n":"<br/>",m=c.join(f);this._showOrMove(i,(function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(i,p,n[0],n[1],this._tooltipContent,s):this._showTooltipContent(i,m,s,Math.random()+"",n[0],n[1],p,null,u)}))},t.prototype._showSeriesItemTooltip=function(e,t,r){var a=this._ecModel,n=Up(t),i=n.seriesIndex,o=a.getSeriesByIndex(i),s=n.dataModel||o,l=n.dataIndex,c=n.dataType,u=s.getData(c),p=this._renderMode,d=e.positionDefault,h=YJ([u.getItemModel(l),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),f=h.get("trigger");if(null==f||"item"===f){var m=s.getDataParams(l,c),g=new Ty;m.marker=g.makeTooltipMarker("item",Zf(m.color),p);var v=xv(s.formatTooltip(l,!1,c)),y=h.get("order"),b=h.get("valueFormatter"),_=v.frag,x=_?vy(b?Object(Sa["m"])({valueFormatter:b},_):_,g,p,y,a.get("useUTC"),h.get("textStyle")):v.text,w="item_"+s.name+"_"+l;this._showOrMove(h,(function(){this._showTooltipContent(h,x,m,w,e.offsetX,e.offsetY,e.position,e.target,g)})),r({type:"showTip",dataIndexInside:l,dataIndex:u.getRawIndex(l),seriesIndex:i,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,r){var a="html"===this._renderMode,n=Up(t),i=n.tooltipConfig,o=i.option||{},s=o.encodeHTMLContent;if(Object(Sa["C"])(o)){var l=o;o={content:l,formatter:l},s=!0}s&&a&&o.content&&(o=Object(Sa["d"])(o),o.content=cn(o.content));var c=[o],u=this._ecModel.getComponent(n.componentMainType,n.componentIndex);u&&c.push(u),c.push({formatter:o.content});var p=e.positionDefault,d=YJ(c,this._tooltipModel,p?{position:p}:null),h=d.get("content"),f=Math.random()+"",m=new Ty;this._showOrMove(d,(function(){var r=Object(Sa["d"])(d.get("formatterParams")||{});this._showTooltipContent(d,h,r,f,e.offsetX,e.offsetY,e.position,t,m)})),r({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,r,a,n,i,o,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var c=this._tooltipContent;c.setEnterable(e.get("enterable"));var u=e.get("formatter");o=o||e.get("position");var p=t,d=this._getNearestPoint([n,i],r,e.get("trigger"),e.get("borderColor")),h=d.color;if(u)if(Object(Sa["C"])(u)){var f=e.ecModel.get("useUTC"),m=Object(Sa["t"])(r)?r[0]:r,g=m&&m.axisType&&m.axisType.indexOf("time")>=0;p=u,g&&(p=Sf(m.axisValue,p,f)),p=qf(p,r,!0)}else if(Object(Sa["w"])(u)){var v=Object(Sa["c"])((function(t,a){t===this._ticket&&(c.setContent(a,l,e,h,o),this._updatePosition(e,o,n,i,c,r,s))}),this);this._ticket=a,p=u(r,a,v)}else p=u;c.setContent(p,l,e,h,o),c.show(e,h),this._updatePosition(e,o,n,i,c,r,s)}},t.prototype._getNearestPoint=function(e,t,r,a){return"axis"===r||Object(Sa["t"])(t)?{color:a||("html"===this._renderMode?"#fff":"none")}:Object(Sa["t"])(t)?void 0:{color:a||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,r,a,n,i,o){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var c=n.getSize(),u=e.get("align"),p=e.get("verticalAlign"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),Object(Sa["w"])(t)&&(t=t([r,a],i,n.el,d,{viewSize:[s,l],contentSize:c.slice()})),Object(Sa["t"])(t))r=rl(t[0],s),a=rl(t[1],l);else if(Object(Sa["A"])(t)){var h=t;h.width=c[0],h.height=c[1];var f=nm(h,{width:s,height:l});r=f.x,a=f.y,u=null,p=null}else if(Object(Sa["C"])(t)&&o){var m=JJ(t,d,c,e.get("borderWidth"));r=m[0],a=m[1]}else{m=ZJ(r,a,n,s,l,u?null:20,p?null:20);r=m[0],a=m[1]}if(u&&(r-=QJ(u)?c[0]/2:"right"===u?c[0]:0),p&&(a-=QJ(p)?c[1]/2:"bottom"===p?c[1]:0),SJ(e)){m=KJ(r,a,n,s,l);r=m[0],a=m[1]}n.moveTo(r,a)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var r=this._lastDataByCoordSys,a=this._cbParamsList,n=!!r&&r.length===e.length;return n&&Object(Sa["k"])(r,(function(r,i){var o=r.dataByAxis||[],s=e[i]||{},l=s.dataByAxis||[];n=n&&o.length===l.length,n&&Object(Sa["k"])(o,(function(e,r){var i=l[r]||{},o=e.seriesDataIndices||[],s=i.seriesDataIndices||[];n=n&&e.value===i.value&&e.axisType===i.axisType&&e.axisId===i.axisId&&o.length===s.length,n&&Object(Sa["k"])(o,(function(e,t){var r=s[t];n=n&&e.seriesIndex===r.seriesIndex&&e.dataIndex===r.dataIndex})),a&&Object(Sa["k"])(e.seriesDataIndices,(function(e){var r=e.seriesIndex,i=t[r],o=a[r];i&&o&&o.data!==i.data&&(n=!1)}))}))})),this._lastDataByCoordSys=e,this._cbParamsList=t,!!n},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!wa["a"].node&&t.getDom()&&(gx(this,"_updatePosition"),this._tooltipContent.dispose(),IY("itemTooltip",t))},t.type="tooltip",t}(Gy);function YJ(e,t,r){var a,n=t.ecModel;r?(a=new Uh(r,n,n),a=new Uh(t.option,a,n)):a=t;for(var i=e.length-1;i>=0;i--){var o=e[i];o&&(o instanceof Uh&&(o=o.get("tooltip",!0)),Object(Sa["C"])(o)&&(o={formatter:o}),o&&(a=new Uh(o,a,n)))}return a}function XJ(e,t){return e.dispatchAction||Object(Sa["c"])(t.dispatchAction,t)}function ZJ(e,t,r,a,n,i,o){var s=r.getSize(),l=s[0],c=s[1];return null!=i&&(e+l+i+2>a?e-=l+i:e+=i),null!=o&&(t+c+o>n?t-=c+o:t+=o),[e,t]}function KJ(e,t,r,a,n){var i=r.getSize(),o=i[0],s=i[1];return e=Math.min(e+o,a)-o,t=Math.min(t+s,n)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function JJ(e,t,r,a){var n=r[0],i=r[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,c=t.width,u=t.height;switch(e){case"inside":s=t.x+c/2-n/2,l=t.y+u/2-i/2;break;case"top":s=t.x+c/2-n/2,l=t.y-i-o;break;case"bottom":s=t.x+c/2-n/2,l=t.y+u+o;break;case"left":s=t.x-n-o,l=t.y+u/2-i/2;break;case"right":s=t.x+c+o,l=t.y+u/2-i/2}return[s,l]}function QJ(e){return"center"===e||"middle"===e}function eQ(e,t,r){var a=Ql(e).queryOptionMap,n=a.keys()[0];if(n&&"series"!==n){var i=rc(t,n,a.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s,l=r.getViewOfComponentModel(o);return l.group.traverse((function(t){var r=Up(t).tooltipConfig;if(r&&r.name===e.name)return s=t,!0})),s?{componentMainType:n,componentIndex:o.componentIndex,el:s}:void 0}}}var tQ=qJ;function rQ(e){JD(GY),e.registerComponentModel(wJ),e.registerComponentView(tQ),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Sa["L"]),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Sa["L"])}var aQ=["rect","polygon","keep","clear"];function nQ(e,t){var r=Ol(e?e.brush:[]);if(r.length){var a=[];Sa["k"](r,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(a=a.concat(t))}));var n=e&&e.toolbox;Sa["t"](n)&&(n=n[0]),n||(n={feature:{}},e.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),iQ(s),t&&!s.length&&s.push.apply(s,aQ)}}function iQ(e){var t={};Sa["k"](e,(function(e){t[e]=1})),e.length=0,Sa["k"](t,(function(t,r){e.push(r)}))}var oQ=Sa["k"];function sQ(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}function lQ(e,t,r){var a={};return oQ(t,(function(t){var i=a[t]=n();oQ(e[t],(function(e,a){if(MF.isValidType(a)){var n={type:a,visual:e};r&&r(n,t),i[a]=new MF(n),"opacity"===a&&(n=Sa["d"](n),n.type="colorAlpha",i.__hidden.__alphaForOpacity=new MF(n))}}))})),a;function n(){var e=function(){};e.prototype.__hidden=e.prototype;var t=new e;return t}}function cQ(e,t,r){var a;Sa["k"](r,(function(e){t.hasOwnProperty(e)&&sQ(t[e])&&(a=!0)})),a&&Sa["k"](r,(function(r){t.hasOwnProperty(r)&&sQ(t[r])?e[r]=Sa["d"](t[r]):delete e[r]}))}function uQ(e,t,r,a,n,i){var o,s={};function l(e){return aw(r,o,e)}function c(e,t){iw(r,o,e,t)}function u(e,u){o=null==i?e:u;var p=r.getRawDataItem(o);if(!p||!1!==p.visualMap)for(var d=a.call(n,e),h=t[d],f=s[d],m=0,g=f.length;m<g;m++){var v=f[m];h[v]&&h[v].applyVisual(e,l,c)}}Sa["k"](e,(function(e){var r=MF.prepareVisualTypes(t[e]);s[e]=r})),null==i?r.each(u):r.each([i],u)}function pQ(e,t,r,a){var n={};return Sa["k"](e,(function(e){var r=MF.prepareVisualTypes(t[e]);n[e]=r})),{progress:function(e,i){var o,s;function l(e){return aw(i,s,e)}function c(e,t){iw(i,s,e,t)}null!=a&&(o=i.getDimensionIndex(a));var u=i.getStore();while(null!=(s=e.next())){var p=i.getRawDataItem(s);if(!p||!1!==p.visualMap)for(var d=null!=a?u.get(o,s):s,h=r(d),f=t[h],m=n[h],g=0,v=m.length;g<v;g++){var y=m[g];f[y]&&f[y].applyVisual(d,l,c)}}}}}function dQ(e){var t=e.brushType,r={point:function(a){return hQ[t].point(a,r,e)},rect:function(a){return hQ[t].rect(a,r,e)}};return r}var hQ={lineX:fQ(0),lineY:fQ(1),rect:{point:function(e,t,r){return e&&r.boundingRect.contain(e[0],e[1])},rect:function(e,t,r){return e&&r.boundingRect.intersect(e)}},polygon:{point:function(e,t,r){return e&&r.boundingRect.contain(e[0],e[1])&&pR(r.range,e[0],e[1])},rect:function(e,t,r){var a=r.range;if(!e||a.length<=1)return!1;var n=e.x,i=e.y,o=e.width,s=e.height,l=a[0];return!!(pR(a,n,i)||pR(a,n+o,i)||pR(a,n,i+s)||pR(a,n+o,i+s)||Hn.create(e).contain(l[0],l[1])||X_(n,i,n+o,i,a)||X_(n,i,n,i+s,a)||X_(n+o,i,n+o,i+s,a)||X_(n,i+s,n+o,i+s,a))||void 0}}};function fQ(e){var t=["x","y"],r=["width","height"];return{point:function(t,r,a){if(t){var n=a.range,i=t[e];return mQ(i,n)}},rect:function(a,n,i){if(a){var o=i.range,s=[a[t[e]],a[t[e]]+a[r[e]]];return s[1]<s[0]&&s.reverse(),mQ(s[0],o)||mQ(s[1],o)||mQ(o[0],s)||mQ(o[1],s)}}}}function mQ(e,t){return t[0]<=e&&e<=t[1]}var gQ=["inBrush","outOfBrush"],vQ="__ecBrushSelect",yQ="__ecInBrushSelectEvent";function bQ(e){e.eachComponent({mainType:"brush"},(function(t){var r=t.brushTargetManager=new pJ(t.option,e);r.setInputRanges(t.areas,e)}))}function _Q(e,t,r){var a,n,i=[];e.eachComponent({mainType:"brush"},(function(e){r&&"takeGlobalCursor"===r.type&&e.setBrushOption("brush"===r.key?r.brushOption:{brushType:!1})})),bQ(e),e.eachComponent({mainType:"brush"},(function(t,r){var o={brushId:t.id,brushIndex:r,brushName:t.name,areas:Sa["d"](t.areas),selected:[]};i.push(o);var s=t.option,l=s.brushLink,c=[],u=[],p=[],d=!1;r||(a=s.throttleType,n=s.throttleDelay);var h=Sa["H"](t.areas,(function(e){var t=CQ[e.brushType],r=Sa["i"]({boundingRect:t?t(e):void 0},e);return r.selectors=dQ(r),r})),f=lQ(t.option,gQ,(function(e){e.mappingMethod="fixed"}));function m(e){return"all"===l||!!c[e]}function g(e){return!!e.length}function v(e,t){var r=e.coordinateSystem;d=d||r.hasAxisBrushed(),m(t)&&r.eachActiveState(e.getData(),(function(e,t){"active"===e&&(u[t]=1)}))}function y(r,a,n){if(r.brushSelector&&!DQ(t,a)&&(Sa["k"](h,(function(a){t.brushTargetManager.controlSeries(a,r,e)&&n.push(a),d=d||g(n)})),m(a)&&g(n))){var i=r.getData();i.each((function(e){SQ(r,n,i,e)&&(u[e]=1)}))}}Sa["t"](l)&&Sa["k"](l,(function(e){c[e]=1})),e.eachSeries((function(e,t){var r=p[t]=[];"parallel"===e.subType?v(e,t):y(e,t,r)})),e.eachSeries((function(e,t){var r={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};o.selected.push(r);var a=p[t],n=e.getData(),i=m(t)?function(e){return u[e]?(r.dataIndex.push(n.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(t){return SQ(e,a,n,t)?(r.dataIndex.push(n.getRawIndex(t)),"inBrush"):"outOfBrush"};(m(t)?d:g(a))&&uQ(gQ,f,n,i)}))})),xQ(t,a,n,i,r)}function xQ(e,t,r,a,n){if(n){var i=e.getZr();if(!i[yQ]){i[vQ]||(i[vQ]=wQ);var o=mx(i,vQ,r,t);o(e,a)}}}function wQ(e,t){if(!e.isDisposed()){var r=e.getZr();r[yQ]=!0,e.dispatchAction({type:"brushSelect",batch:t}),r[yQ]=!1}}function SQ(e,t,r,a){for(var n=0,i=t.length;n<i;n++){var o=t[n];if(e.brushSelector(a,r,o.selectors,o))return!0}}function DQ(e,t){var r=e.option.seriesIndex;return null!=r&&"all"!==r&&(Sa["t"](r)?Sa["r"](r,t)<0:t!==r)}var CQ={rect:function(e){return TQ(e.range)},polygon:function(e){for(var t,r=e.range,a=0,n=r.length;a<n;a++){t=t||[[1/0,-1/0],[1/0,-1/0]];var i=r[a];i[0]<t[0][0]&&(t[0][0]=i[0]),i[0]>t[0][1]&&(t[0][1]=i[0]),i[1]<t[1][0]&&(t[1][0]=i[1]),i[1]>t[1][1]&&(t[1][1]=i[1])}return t&&TQ(t)}};function TQ(e){return new Hn(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var IQ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new j$(t.getZr())).on("brush",Sa["c"](this._onBrush,this)).mount()},t.prototype.render=function(e,t,r,a){this.model=e,this._updateController(e,t,r,a)},t.prototype.updateTransform=function(e,t,r,a){bQ(t),this._updateController(e,t,r,a)},t.prototype.updateVisual=function(e,t,r,a){this.updateTransform(e,t,r,a)},t.prototype.updateView=function(e,t,r,a){this._updateController(e,t,r,a)},t.prototype._updateController=function(e,t,r,a){(!a||a.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(r)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,r=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:t,areas:Sa["d"](r),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:Sa["d"](r),$from:t})},t.type="brush",t}(Gy),OQ=IQ,MQ="#ddd",AQ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.areas=[],r.brushOption={},r}return xa(t,e),t.prototype.optionUpdated=function(e,t){var r=this.option;!t&&cQ(r,e,["inBrush","outOfBrush"]);var a=r.inBrush=r.inBrush||{};r.outOfBrush=r.outOfBrush||{color:MQ},a.hasOwnProperty("liftZ")||(a.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=Sa["H"](e,(function(e){return kQ(this.option,e)}),this))},t.prototype.setBrushOption=function(e){this.brushOption=kQ(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.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},t}(fm);function kQ(e,t){return Sa["I"]({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new Uh(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var PQ=AQ,NQ=["rect","polygon","lineX","lineY","keep","clear"],EQ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xa(t,e),t.prototype.render=function(e,t,r){var a,n,i;t.eachComponent({mainType:"brush"},(function(e){a=e.brushType,n=e.brushOption.brushMode||"single",i=i||!!e.areas.length})),this._brushType=a,this._brushMode=n,Sa["k"](e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===n:"clear"===t?i:t===a)?"emphasis":"normal")}))},t.prototype.updateView=function(e,t,r){this.render(e,t,r)},t.prototype.getIcons=function(){var e=this.model,t=e.get("icon",!0),r={};return Sa["k"](e.get("type",!0),(function(e){t[e]&&(r[e]=t[e])})),r},t.prototype.onclick=function(e,t,r){var a=this._brushType,n=this._brushMode;"clear"===r?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===r?a:a!==r&&r,brushMode:"keep"===r?"multiple"===n?"single":"multiple":n}})},t.getDefaultOption=function(e){var t={show:!0,type:NQ.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:e.getLocaleModel().get(["toolbox","brush","title"])};return t},t}(uK),RQ=EQ;function LQ(e){e.registerComponentView(OQ),e.registerComponentModel(PQ),e.registerPreprocessor(nQ),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,_Q),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Sa["L"]),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Sa["L"]),dK("brush",RQ)}var jQ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return xa(t,e),t.type="title",t.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"}},t}(fm),FQ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.render=function(e,t,r){if(this.group.removeAll(),e.get("show")){var a=this.group,n=e.getModel("textStyle"),i=e.getModel("subtextStyle"),o=e.get("textAlign"),s=Sa["P"](e.get("textBaseline"),e.get("textVerticalAlign")),l=new Gp({style:_h(n,{text:e.get("text"),fill:n.getTextColor()},{disableBox:!0}),z2:10}),c=l.getBoundingRect(),u=e.get("subtext"),p=new Gp({style:_h(i,{text:u,fill:i.getTextColor(),y:c.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),h=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!d&&!f,p.silent=!h&&!f,d&&l.on("click",(function(){Kf(d,"_"+e.get("target"))})),h&&p.on("click",(function(){Kf(h,"_"+e.get("subtarget"))})),Up(l).eventData=Up(p).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,a.add(l),u&&a.add(p);var m=a.getBoundingRect(),g=e.getBoxLayoutParams();g.width=m.width,g.height=m.height;var v=nm(g,{width:r.getWidth(),height:r.getHeight()},e.get("padding"));o||(o=e.get("left")||e.get("right"),"middle"===o&&(o="center"),"right"===o?v.x+=v.width:"center"===o&&(v.x+=v.width/2)),s||(s=e.get("top")||e.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),a.x=v.x,a.y=v.y,a.markRedraw();var y={align:o,verticalAlign:s};l.setStyle(y),p.setStyle(y),m=a.getBoundingRect();var b=v.margin,_=e.getItemStyle(["color","opacity"]);_.fill=e.get("backgroundColor");var x=new Cp({shape:{x:m.x-b[3],y:m.y-b[0],width:m.width+b[1]+b[3],height:m.height+b[0]+b[2],r:e.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});a.add(x)}},t.type="title",t}(Gy);function VQ(e){e.registerComponentModel(jQ),e.registerComponentView(FQ)}var zQ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode="box",r}return xa(t,e),t.prototype.init=function(e,t,r){this.mergeDefaultAndTheme(e,r),this._initData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){null==e&&(e=this.option.currentIndex);var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e,t=this.option,r=t.data||[],a=t.axisType,n=this._names=[];"category"===a?(e=[],Object(Sa["k"])(r,(function(t,r){var a,i=$l(kl(t),"");Object(Sa["A"])(t)?(a=Object(Sa["d"])(t),a.value=r):a=r,e.push(a),n.push(i)}))):e=r;var i={category:"ordinal",time:"time",value:"number"}[a]||"number",o=this._data=new pO([{name:"value",type:i}],this);o.initData(e,n)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},t.type="timeline",t.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:[]},t}(fm),BQ=zQ,$Q=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.type="timeline.slider",t.defaultOption=Xh(BQ.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:[]}),t}(BQ);Object(Sa["K"])($Q,_v.prototype);var GQ=$Q,UQ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.type="timeline",t}(Gy),WQ=UQ,HQ=function(e){function t(t,r,a,n){var i=e.call(this,t,r,a)||this;return i.type=n||"value",i}return xa(t,e),t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},t}(tN),qQ=HQ,YQ=Math.PI,XQ=Zl(),ZQ=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.init=function(e,t){this.api=t},t.prototype.render=function(e,t,r){if(this.model=e,this.api=r,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var a=this._layout(e,r),n=this._createGroup("_mainGroup"),i=this._createGroup("_labelGroup"),o=this._axis=this._createAxis(a,e);e.formatTooltip=function(e){var t=o.scale.getLabel({value:e});return py("nameValue",{noName:!0,value:t})},Object(Sa["k"])(["AxisLine","AxisTick","Control","CurrentPointer"],(function(t){this["_render"+t](a,n,o,e)}),this),this._renderAxisLabel(a,i,o,e),this._position(a,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,t){var r,a=e.get(["label","position"]),n=e.get("orient"),i=JQ(e,t);r=null==a||"auto"===a?"horizontal"===n?i.y+i.height/2<t.getHeight()/2?"-":"+":i.x+i.width/2<t.getWidth()/2?"+":"-":Object(Sa["C"])(a)?{horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][a]:a;var o,s,l,c={horizontal:"center",vertical:r>=0||"+"===r?"left":"right"},u={horizontal:r>=0||"+"===r?"top":"bottom",vertical:"middle"},p={horizontal:0,vertical:YQ/2},d="vertical"===n?i.height:i.width,h=e.getModel("controlStyle"),f=h.get("show",!0),m=f?h.get("itemSize"):0,g=f?h.get("itemGap"):0,v=m+g,y=e.get(["label","rotate"])||0;y=y*YQ/180;var b=h.get("position",!0),_=f&&h.get("showPlayBtn",!0),x=f&&h.get("showPrevBtn",!0),w=f&&h.get("showNextBtn",!0),S=0,D=d;"left"===b||"bottom"===b?(_&&(o=[0,0],S+=v),x&&(s=[S,0],S+=v),w&&(l=[D-m,0],D-=v)):(_&&(o=[D-m,0],D-=v),x&&(s=[0,0],S+=v),w&&(l=[D-m,0],D-=v));var C=[S,D];return e.get("inverse")&&C.reverse(),{viewRect:i,mainLength:d,orient:n,rotation:p[n],labelRotation:y,labelPosOpt:r,labelAlign:e.get(["label","align"])||c[n],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||u[n],playPosition:o,prevBtnPosition:s,nextBtnPosition:l,axisExtent:C,controlSize:m,controlGap:g}},t.prototype._position=function(e,t){var r=this._mainGroup,a=this._labelGroup,n=e.viewRect;if("vertical"===e.orient){var i=Tn(),o=n.x,s=n.y+n.height;An(i,i,[-o,-s]),kn(i,i,-YQ/2),An(i,i,[o,s]),n=n.clone(),n.applyTransform(i)}var l=g(n),c=g(r.getBoundingRect()),u=g(a.getBoundingRect()),p=[r.x,r.y],d=[a.x,a.y];d[0]=p[0]=l[0][0];var h=e.labelPosOpt;if(null==h||Object(Sa["C"])(h)){var f="+"===h?0:1;v(p,c,l,1,f),v(d,u,l,1,1-f)}else{f=h>=0?0:1;v(p,c,l,1,f),d[1]=p[1]+h}function m(e){e.originX=l[0][0]-e.x,e.originY=l[1][0]-e.y}function g(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function v(e,t,r,a,n){e[a]+=r[a][n]-t[a][n]}r.setPosition(p),a.setPosition(d),r.rotation=a.rotation=e.rotation,m(r),m(a)},t.prototype._createAxis=function(e,t){var r=t.getData(),a=t.get("axisType"),n=KQ(t,a);n.getTicks=function(){return r.mapArray(["value"],(function(e){return{value:e}}))};var i=r.getDataExtent("value");n.setExtent(i[0],i[1]),n.calcNiceTicks();var o=new qQ("value",n,e.axisExtent,a);return o.model=t,o},t.prototype._createGroup=function(e){var t=this[e]=new Bs;return this.group.add(t),t},t.prototype._renderAxisLine=function(e,t,r,a){var n=r.getExtent();if(a.get(["lineStyle","show"])){var i=new Jb({shape:{x1:n[0],y1:0,x2:n[1],y2:0},style:Object(Sa["m"])({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});t.add(i);var o=this._progressLine=new Jb({shape:{x1:n[0],x2:this._currentPointer?this._currentPointer.x:n[0],y1:0,y2:0},style:Object(Sa["i"])({lineCap:"round",lineWidth:i.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});t.add(o)}},t.prototype._renderAxisTick=function(e,t,r,a){var n=this,i=a.getData(),o=r.scale.getTicks();this._tickSymbols=[],Object(Sa["k"])(o,(function(e){var o=r.dataToCoord(e.value),s=i.getItemModel(e.value),l=s.getModel("itemStyle"),c=s.getModel(["emphasis","itemStyle"]),u=s.getModel(["progress","itemStyle"]),p={x:o,y:0,onclick:Object(Sa["c"])(n._changeTimeline,n,e.value)},d=e0(s,l,t,p);d.ensureState("emphasis").style=c.getItemStyle(),d.ensureState("progress").style=u.getItemStyle(),Ud(d);var h=Up(d);s.get("tooltip")?(h.dataIndex=e.value,h.dataModel=a):h.dataIndex=h.dataModel=null,n._tickSymbols.push(d)}))},t.prototype._renderAxisLabel=function(e,t,r,a){var n=this,i=r.getLabelModel();if(i.get("show")){var o=a.getData(),s=r.getViewLabels();this._tickLabels=[],Object(Sa["k"])(s,(function(a){var i=a.tickValue,s=o.getItemModel(i),l=s.getModel("label"),c=s.getModel(["emphasis","label"]),u=s.getModel(["progress","label"]),p=r.dataToCoord(a.tickValue),d=new Gp({x:p,y:0,rotation:e.labelRotation-e.rotation,onclick:Object(Sa["c"])(n._changeTimeline,n,i),silent:!1,style:_h(l,{text:a.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});d.ensureState("emphasis").style=_h(c),d.ensureState("progress").style=_h(u),t.add(d),Ud(d),XQ(d).dataIndex=i,n._tickLabels.push(d)}))}},t.prototype._renderControl=function(e,t,r,a){var n=e.controlSize,i=e.rotation,o=a.getModel("controlStyle").getItemStyle(),s=a.getModel(["emphasis","controlStyle"]).getItemStyle(),l=a.getPlayState(),c=a.get("inverse",!0);function u(e,r,l,c){if(e){var u=Ds(Object(Sa["P"])(a.get(["controlStyle",r+"BtnSize"]),n),n),p=[0,-u/2,u,u],d=QQ(a,r+"Icon",p,{x:e[0],y:e[1],originX:n/2,originY:0,rotation:c?-i:0,rectHover:!0,style:o,onclick:l});d.ensureState("emphasis").style=s,t.add(d),Ud(d)}}u(e.nextBtnPosition,"next",Object(Sa["c"])(this._changeTimeline,this,c?"-":"+")),u(e.prevBtnPosition,"prev",Object(Sa["c"])(this._changeTimeline,this,c?"+":"-")),u(e.playPosition,l?"stop":"play",Object(Sa["c"])(this._handlePlayClick,this,!l),!0)},t.prototype._renderCurrentPointer=function(e,t,r,a){var n=a.getData(),i=a.getCurrentIndex(),o=n.getItemModel(i).getModel("checkpointStyle"),s=this,l={onCreate:function(e){e.draggable=!0,e.drift=Object(Sa["c"])(s._handlePointerDrag,s),e.ondragend=Object(Sa["c"])(s._handlePointerDragend,s),t0(e,s._progressLine,i,r,a,!0)},onUpdate:function(e){t0(e,s._progressLine,i,r,a)}};this._currentPointer=e0(o,o,this._mainGroup,{},this._currentPointer,l)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,t,r){this._clearTimer(),this._pointerChangeTimeline([r.offsetX,r.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,t){var r=this._toAxisCoord(e)[0],a=this._axis,n=nl(a.getExtent().slice());r>n[1]&&(r=n[1]),r<n[0]&&(r=n[0]),this._currentPointer.x=r,this._currentPointer.markRedraw();var i=this._progressLine;i&&(i.shape.x2=r,i.dirty());var o=this._findNearestTick(r),s=this.model;(t||o!==s.getCurrentIndex()&&s.get("realtime"))&&this._changeTimeline(o)},t.prototype._doPlayStop=function(){var e=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout((function(){var t=e.model;e._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))}),this.model.get("playInterval")))},t.prototype._toAxisCoord=function(e){var t=this._mainGroup.getLocalTransform();return B_(e,t,!0)},t.prototype._findNearestTick=function(e){var t,r=this.model.getData(),a=1/0,n=this._axis;return r.each(["value"],(function(r,i){var o=n.dataToCoord(r),s=Math.abs(o-e);s<a&&(a=s,t=i)})),t},t.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},t.prototype._changeTimeline=function(e){var t=this.model.getCurrentIndex();"+"===e?e=t+1:"-"===e&&(e=t-1),this.api.dispatchAction({type:"timelineChange",currentIndex:e,from:this.uid})},t.prototype._updateTicksStatus=function(){var e=this.model.getCurrentIndex(),t=this._tickSymbols,r=this._tickLabels;if(t)for(var a=0;a<t.length;a++)t&&t[a]&&t[a].toggleState("progress",a<e);if(r)for(a=0;a<r.length;a++)r&&r[a]&&r[a].toggleState("progress",XQ(r[a]).dataIndex<=e)},t.type="timeline.slider",t}(WQ);function KQ(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new Fk({ordinalMeta:e.getCategories(),extent:[1/0,-1/0]});case"time":return new Qk({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new Bk}}function JQ(e,t){return nm(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}function QQ(e,t,r,a){var n=a.style,i=Y_(e.get(["controlStyle",t]),a||{},new Hn(r[0],r[1],r[2],r[3]));return n&&i.setStyle(n),i}function e0(e,t,r,a,n,i){var o=t.get("color");if(n)n.setColor(o),r.add(n),i&&i.onUpdate(n);else{var s=e.get("symbol");n=Sw(s,-1,-1,2,2,o),n.setStyle("strokeNoScale",!0),r.add(n),i&&i.onCreate(n)}var l=t.getItemStyle(["color"]);n.setStyle(l),a=Object(Sa["I"])({rectHover:!0,z2:100},a,!0);var c=Dw(e.get("symbolSize"));a.scaleX=c[0]/2,a.scaleY=c[1]/2;var u=Cw(e.get("symbolOffset"),c);u&&(a.x=(a.x||0)+u[0],a.y=(a.y||0)+u[1]);var p=e.get("symbolRotate");return a.rotation=(p||0)*Math.PI/180||0,n.attr(a),n.updateTransform(),n}function t0(e,t,r,a,n,i){if(!e.dragging){var o=n.getModel("checkpointStyle"),s=a.dataToCoord(n.getData().get("value",r));if(i||!o.get("animation",!0))e.attr({x:s,y:0}),t&&t.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};e.stopAnimation(null,!0),e.animateTo({x:s,y:0},l),t&&t.animateTo({shape:{x2:s}},l)}}}var r0=ZQ;function a0(e){e.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},(function(e,t,r){var a=t.getComponent("timeline");return a&&null!=e.currentIndex&&(a.setCurrentIndex(e.currentIndex),!a.get("loop",!0)&&a.isIndexMax()&&a.getPlayState()&&(a.setPlayState(!1),r.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:a.get("replaceMerge",!0)}),Object(Sa["i"])({currentIndex:a.option.currentIndex},e)})),e.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(e,t){var r=t.getComponent("timeline");r&&null!=e.playState&&r.setPlayState(e.playState)}))}function n0(e){var t=e&&e.timeline;Sa["t"](t)||(t=t?[t]:[]),Sa["k"](t,(function(e){e&&i0(e)}))}function i0(e){var t=e.type,r={number:"value",time:"time"};if(r[t]&&(e.axisType=r[t],delete e.type),o0(e),s0(e,"controlPosition")){var a=e.controlStyle||(e.controlStyle={});s0(a,"position")||(a.position=e.controlPosition),"none"!==a.position||s0(a,"show")||(a.show=!1,delete a.position),delete e.controlPosition}Sa["k"](e.data||[],(function(e){Sa["A"](e)&&!Sa["t"](e)&&(!s0(e,"value")&&s0(e,"name")&&(e.value=e.name),o0(e))}))}function o0(e){var t=e.itemStyle||(e.itemStyle={}),r=t.emphasis||(t.emphasis={}),a=e.label||e.label||{},n=a.normal||(a.normal={}),i={normal:1,emphasis:1};Sa["k"](a,(function(e,t){i[t]||s0(n,t)||(n[t]=e)})),r.label&&!s0(a,"emphasis")&&(a.emphasis=r.label,delete r.label)}function s0(e,t){return e.hasOwnProperty(t)}function l0(e){e.registerComponentModel(GQ),e.registerComponentView(r0),e.registerSubTypeDefaulter("timeline",(function(){return"slider"})),a0(e),e.registerPreprocessor(n0)}function c0(e,t){if(!e)return!1;for(var r=Object(Sa["t"])(e)?e:[e],a=0;a<r.length;a++)if(r[a]&&r[a][t])return!0;return!1}function u0(e){Ml(e,"label",["show"])}var p0=Zl(),d0=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.createdBySelf=!1,r}return xa(t,e),t.prototype.init=function(e,t,r){this.mergeDefaultAndTheme(e,r),this._mergeOption(e,r,!1,!0)},t.prototype.isAnimationEnabled=function(){if(wa["a"].node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,r,a){var n=this.mainType;r||t.eachSeries((function(e){var r=e.get(this.mainType,!0),i=p0(e)[n];r&&r.data?(i?i._mergeOption(r,t,!0):(a&&u0(r),Sa["k"](r.data,(function(e){e instanceof Array?(u0(e[0]),u0(e[1])):u0(e)})),i=this.createMarkerModelFromSeries(r,this,t),Sa["m"](i,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),i.__hostSeries=e),p0(e)[n]=i):p0(e)[n]=null}),this)},t.prototype.formatTooltip=function(e,t,r){var a=this.getData(),n=this.getRawValue(e),i=a.getName(e);return py("section",{header:this.name,blocks:[py("nameValue",{name:i,value:n,noName:!i,noValue:null==n})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var r=_v.prototype.getDataParams.call(this,e,t),a=this.__hostSeries;return a&&(r.seriesId=a.id,r.seriesName=a.name,r.seriesType=a.subType),r},t.getMarkerModelFromSeries=function(e,t){return p0(e)[t]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(fm);Sa["K"](d0,_v.prototype);var h0=d0,f0=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.createMarkerModelFromSeries=function(e,r,a){return new t(e,r,a)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(h0),m0=f0;function g0(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function v0(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function y0(e,t,r,a,n,i){var o=[],s=wO(t,a),l=s?t.getCalculationInfo("stackResultDimension"):a,c=T0(t,l,e),u=t.indicesOfNearest(l,c)[0];o[n]=t.get(r,u),o[i]=t.get(l,u);var p=t.get(a,u),d=il(t.get(a,u));return d=Math.min(d,20),d>=0&&(o[i]=+o[i].toFixed(d)),[o,p]}var b0={min:Object(Sa["h"])(y0,"min"),max:Object(Sa["h"])(y0,"max"),average:Object(Sa["h"])(y0,"average"),median:Object(Sa["h"])(y0,"median")};function _0(e,t){if(t){var r=e.getData(),a=e.coordinateSystem,n=a&&a.dimensions;if(!v0(t)&&!Object(Sa["t"])(t.coord)&&Object(Sa["t"])(n)){var i=x0(t,r,a,e);if(t=Object(Sa["d"])(t),t.type&&b0[t.type]&&i.baseAxis&&i.valueAxis){var o=Object(Sa["r"])(n,i.baseAxis.dim),s=Object(Sa["r"])(n,i.valueAxis.dim),l=b0[t.type](r,i.baseDataDim,i.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis]}if(null!=t.coord&&Object(Sa["t"])(n))for(var c=t.coord,u=0;u<2;u++)b0[c[u]]&&(c[u]=T0(r,r.mapDimension(n[u]),c[u]));else t.coord=[];return t}}function x0(e,t,r,a){var n={};return null!=e.valueIndex||null!=e.valueDim?(n.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,n.valueAxis=r.getAxis(w0(a,n.valueDataDim)),n.baseAxis=r.getOtherAxis(n.valueAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=r.getOtherAxis(n.baseAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim),n.valueDataDim=t.mapDimension(n.valueAxis.dim)),n}function w0(e,t){var r=e.getData().getDimensionInfo(t);return r&&r.coordDim}function S0(e,t){return!(e&&e.containData&&t.coord&&!g0(t))||e.containData(t.coord)}function D0(e,t,r){return!(e&&e.containZone&&t.coord&&r.coord&&!g0(t)&&!g0(r))||e.containZone(t.coord,r.coord)}function C0(e,t){return e?function(e,r,a,n){var i=n<2?e.coord&&e.coord[n]:e.value;return Cv(i,t[n])}:function(e,r,a,n){return Cv(e.value,t[n])}}function T0(e,t,r){if("average"===r){var a=0,n=0;return e.each(t,(function(e,t){isNaN(e)||(a+=e,n++)})),a/n}return"median"===r?e.getMedian(t):e.getDataExtent(t)["max"===r?1:0]}var I0=Zl(),O0=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.init=function(){this.markerGroupMap=Object(Sa["f"])()},t.prototype.render=function(e,t,r){var a=this,n=this.markerGroupMap;n.each((function(e){I0(e).keep=!1})),t.eachSeries((function(e){var n=h0.getMarkerModelFromSeries(e,a.type);n&&a.renderSeries(e,n,t,r)})),n.each((function(e){!I0(e).keep&&a.group.remove(e.group)}))},t.prototype.markKeep=function(e){I0(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var r=this;Object(Sa["k"])(e,(function(e){var a=h0.getMarkerModelFromSeries(e,r.type);if(a){var n=a.getData();n.eachItemGraphicEl((function(e){e&&(t?Md(e):Ad(e))}))}}))},t.type="marker",t}(Gy),M0=O0;function A0(e,t,r){var a=t.coordinateSystem;e.each((function(n){var i,o=e.getItemModel(n),s=rl(o.get("x"),r.getWidth()),l=rl(o.get("y"),r.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)i=t.getMarkerPosition(e.getValues(e.dimensions,n));else if(a){var c=e.get(a.dimensions[0],n),u=e.get(a.dimensions[1],n);i=a.dataToPoint([c,u])}}else i=[s,l];isNaN(s)||(i[0]=s),isNaN(l)||(i[1]=l),e.setItemLayout(n,i)}))}var k0=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.updateTransform=function(e,t,r){t.eachSeries((function(e){var t=h0.getMarkerModelFromSeries(e,"markPoint");t&&(A0(t.getData(),e,r),this.markerGroupMap.get(e.id).updateLayout())}),this)},t.prototype.renderSeries=function(e,t,r,a){var n=e.coordinateSystem,i=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,new BO),c=P0(n,e,t);t.setData(c),A0(t.getData(),e,a),c.each((function(e){var r=c.getItemModel(e),a=r.getShallow("symbol"),n=r.getShallow("symbolSize"),i=r.getShallow("symbolRotate"),s=r.getShallow("symbolOffset"),l=r.getShallow("symbolKeepAspect");if(Object(Sa["w"])(a)||Object(Sa["w"])(n)||Object(Sa["w"])(i)||Object(Sa["w"])(s)){var u=t.getRawValue(e),p=t.getDataParams(e);Object(Sa["w"])(a)&&(a=a(u,p)),Object(Sa["w"])(n)&&(n=n(u,p)),Object(Sa["w"])(i)&&(i=i(u,p)),Object(Sa["w"])(s)&&(s=s(u,p))}var d=r.getModel("itemStyle").getItemStyle(),h=nw(o,"color");d.fill||(d.fill=h),c.setItemVisual(e,{symbol:a,symbolSize:n,symbolRotate:i,symbolOffset:s,symbolKeepAspect:l,style:d})})),l.updateData(c),this.group.add(l.group),c.eachItemGraphicEl((function(e){e.traverse((function(e){Up(e).dataModel=t}))})),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markPoint",t}(M0);function P0(e,t,r){var a;a=e?Object(Sa["H"])(e&&e.dimensions,(function(e){var r=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return Object(Sa["m"])(Object(Sa["m"])({},r),{name:e,ordinalMeta:null})})):[{name:"value",type:"float"}];var n=new pO(a,r),i=Object(Sa["H"])(r.get("data"),Object(Sa["h"])(_0,t));e&&(i=Object(Sa["n"])(i,Object(Sa["h"])(S0,e)));var o=C0(!!e,a);return n.initData(i,null,o),n}var N0=k0;function E0(e){e.registerComponentModel(m0),e.registerComponentView(N0),e.registerPreprocessor((function(e){c0(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})}))}var R0=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.createMarkerModelFromSeries=function(e,r,a){return new t(e,r,a)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(h0),L0=R0,j0=Zl(),F0=function(e,t,r,a){var n,i=e.getData();if(Object(Sa["t"])(a))n=a;else{var o=a.type;if("min"===o||"max"===o||"average"===o||"median"===o||null!=a.xAxis||null!=a.yAxis){var s=void 0,l=void 0;if(null!=a.yAxis||null!=a.xAxis)s=t.getAxis(null!=a.yAxis?"y":"x"),l=Object(Sa["O"])(a.yAxis,a.xAxis);else{var c=x0(a,i,t,e);s=c.valueAxis;var u=SO(i,c.valueDataDim);l=T0(i,u,o)}var p="x"===s.dim?0:1,d=1-p,h=Object(Sa["d"])(a),f={coord:[]};h.type=null,h.coord=[],h.coord[d]=-1/0,f.coord[d]=1/0;var m=r.get("precision");m>=0&&Object(Sa["z"])(l)&&(l=+l.toFixed(Math.min(m,20))),h.coord[p]=f.coord[p]=l,n=[h,f,{type:o,valueIndex:a.valueIndex,value:l}]}else n=[]}var g=[_0(e,n[0]),_0(e,n[1]),Object(Sa["m"])({},n[2])];return g[2].type=g[2].type||null,Object(Sa["I"])(g[2],g[0]),Object(Sa["I"])(g[2],g[1]),g};function V0(e){return!isNaN(e)&&!isFinite(e)}function z0(e,t,r,a){var n=1-e,i=a.dimensions[e];return V0(t[n])&&V0(r[n])&&t[e]===r[e]&&a.getAxis(i).containData(t[e])}function B0(e,t){if("cartesian2d"===e.type){var r=t[0].coord,a=t[1].coord;if(r&&a&&(z0(1,r,a,e)||z0(0,r,a,e)))return!0}return S0(e,t[0])&&S0(e,t[1])}function $0(e,t,r,a,n){var i,o=a.coordinateSystem,s=e.getItemModel(t),l=rl(s.get("x"),n.getWidth()),c=rl(s.get("y"),n.getHeight());if(isNaN(l)||isNaN(c)){if(a.getMarkerPosition)i=a.getMarkerPosition(e.getValues(e.dimensions,t));else{var u=o.dimensions,p=e.get(u[0],t),d=e.get(u[1],t);i=o.dataToPoint([p,d])}if(sM(o,"cartesian2d")){var h=o.getAxis("x"),f=o.getAxis("y");u=o.dimensions;V0(e.get(u[0],t))?i[0]=h.toGlobalCoord(h.getExtent()[r?0:1]):V0(e.get(u[1],t))&&(i[1]=f.toGlobalCoord(f.getExtent()[r?0:1]))}isNaN(l)||(i[0]=l),isNaN(c)||(i[1]=c)}else i=[l,c];e.setItemLayout(t,i)}var G0=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.updateTransform=function(e,t,r){t.eachSeries((function(e){var t=h0.getMarkerModelFromSeries(e,"markLine");if(t){var a=t.getData(),n=j0(t).from,i=j0(t).to;n.each((function(t){$0(n,t,!0,e,r),$0(i,t,!1,e,r)})),a.each((function(e){a.setItemLayout(e,[n.getItemLayout(e),i.getItemLayout(e)])})),this.markerGroupMap.get(e.id).updateLayout()}}),this)},t.prototype.renderSeries=function(e,t,r,a){var n=e.coordinateSystem,i=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,new nz);this.group.add(l.group);var c=U0(n,e,t),u=c.from,p=c.to,d=c.line;j0(t).from=u,j0(t).to=p,t.setData(d);var h=t.get("symbol"),f=t.get("symbolSize"),m=t.get("symbolRotate"),g=t.get("symbolOffset");function v(t,r,n){var i=t.getItemModel(r);$0(t,r,n,e,a);var s=i.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=nw(o,"color")),t.setItemVisual(r,{symbolKeepAspect:i.get("symbolKeepAspect"),symbolOffset:Object(Sa["P"])(i.get("symbolOffset",!0),g[n?0:1]),symbolRotate:Object(Sa["P"])(i.get("symbolRotate",!0),m[n?0:1]),symbolSize:Object(Sa["P"])(i.get("symbolSize"),f[n?0:1]),symbol:Object(Sa["P"])(i.get("symbol",!0),h[n?0:1]),style:s})}Object(Sa["t"])(h)||(h=[h,h]),Object(Sa["t"])(f)||(f=[f,f]),Object(Sa["t"])(m)||(m=[m,m]),Object(Sa["t"])(g)||(g=[g,g]),c.from.each((function(e){v(u,e,!0),v(p,e,!1)})),d.each((function(e){var t=d.getItemModel(e).getModel("lineStyle").getLineStyle();d.setItemLayout(e,[u.getItemLayout(e),p.getItemLayout(e)]),null==t.stroke&&(t.stroke=u.getItemVisual(e,"style").fill),d.setItemVisual(e,{fromSymbolKeepAspect:u.getItemVisual(e,"symbolKeepAspect"),fromSymbolOffset:u.getItemVisual(e,"symbolOffset"),fromSymbolRotate:u.getItemVisual(e,"symbolRotate"),fromSymbolSize:u.getItemVisual(e,"symbolSize"),fromSymbol:u.getItemVisual(e,"symbol"),toSymbolKeepAspect:p.getItemVisual(e,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(e,"symbolOffset"),toSymbolRotate:p.getItemVisual(e,"symbolRotate"),toSymbolSize:p.getItemVisual(e,"symbolSize"),toSymbol:p.getItemVisual(e,"symbol"),style:t})})),l.updateData(d),c.line.eachItemGraphicEl((function(e){Up(e).dataModel=t,e.traverse((function(e){Up(e).dataModel=t}))})),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markLine",t}(M0);function U0(e,t,r){var a;a=e?Object(Sa["H"])(e&&e.dimensions,(function(e){var r=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return Object(Sa["m"])(Object(Sa["m"])({},r),{name:e,ordinalMeta:null})})):[{name:"value",type:"float"}];var n=new pO(a,r),i=new pO(a,r),o=new pO([],r),s=Object(Sa["H"])(r.get("data"),Object(Sa["h"])(F0,t,e,r));e&&(s=Object(Sa["n"])(s,Object(Sa["h"])(B0,e)));var l=C0(!!e,a);return n.initData(Object(Sa["H"])(s,(function(e){return e[0]})),null,l),i.initData(Object(Sa["H"])(s,(function(e){return e[1]})),null,l),o.initData(Object(Sa["H"])(s,(function(e){return e[2]}))),o.hasItemOption=!0,{from:n,to:i,line:o}}var W0=G0;function H0(e){e.registerComponentModel(L0),e.registerComponentView(W0),e.registerPreprocessor((function(e){c0(e.series,"markLine")&&(e.markLine=e.markLine||{})}))}var q0=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.createMarkerModelFromSeries=function(e,r,a){return new t(e,r,a)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(h0),Y0=q0,X0=Zl(),Z0=function(e,t,r,a){var n=a[0],i=a[1];if(n&&i){var o=_0(e,n),s=_0(e,i),l=o.coord,c=s.coord;l[0]=Object(Sa["O"])(l[0],-1/0),l[1]=Object(Sa["O"])(l[1],-1/0),c[0]=Object(Sa["O"])(c[0],1/0),c[1]=Object(Sa["O"])(c[1],1/0);var u=Object(Sa["J"])([{},o,s]);return u.coord=[o.coord,s.coord],u.x0=o.x,u.y0=o.y,u.x1=s.x,u.y1=s.y,u}};function K0(e){return!isNaN(e)&&!isFinite(e)}function J0(e,t,r,a){var n=1-e;return K0(t[n])&&K0(r[n])}function Q0(e,t){var r=t.coord[0],a=t.coord[1],n={coord:r,x:t.x0,y:t.y0},i={coord:a,x:t.x1,y:t.y1};return sM(e,"cartesian2d")?!(!r||!a||!J0(1,r,a,e)&&!J0(0,r,a,e))||D0(e,n,i):S0(e,n)||S0(e,i)}function e1(e,t,r,a,n){var i,o=a.coordinateSystem,s=e.getItemModel(t),l=rl(s.get(r[0]),n.getWidth()),c=rl(s.get(r[1]),n.getHeight());if(isNaN(l)||isNaN(c)){if(a.getMarkerPosition){var u=e.getValues(["x0","y0"],t),p=e.getValues(["x1","y1"],t),d=o.clampData(u),h=o.clampData(p),f=[];"x0"===r[0]?f[0]=d[0]>h[0]?p[0]:u[0]:f[0]=d[0]>h[0]?u[0]:p[0],"y0"===r[1]?f[1]=d[1]>h[1]?p[1]:u[1]:f[1]=d[1]>h[1]?u[1]:p[1],i=a.getMarkerPosition(f,r,!0)}else{var m=e.get(r[0],t),g=e.get(r[1],t),v=[m,g];o.clampData&&o.clampData(v,v),i=o.dataToPoint(v,!0)}if(sM(o,"cartesian2d")){var y=o.getAxis("x"),b=o.getAxis("y");m=e.get(r[0],t),g=e.get(r[1],t);K0(m)?i[0]=y.toGlobalCoord(y.getExtent()["x0"===r[0]?0:1]):K0(g)&&(i[1]=b.toGlobalCoord(b.getExtent()["y0"===r[1]?0:1]))}isNaN(l)||(i[0]=l),isNaN(c)||(i[1]=c)}else i=[l,c];return i}var t1=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],r1=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.updateTransform=function(e,t,r){t.eachSeries((function(e){var t=h0.getMarkerModelFromSeries(e,"markArea");if(t){var a=t.getData();a.each((function(t){var n=Object(Sa["H"])(t1,(function(n){return e1(a,t,n,e,r)}));a.setItemLayout(t,n);var i=a.getItemGraphicEl(t);i.setShape("points",n)}))}}),this)},t.prototype.renderSeries=function(e,t,r,a){var n=e.coordinateSystem,i=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,{group:new Bs});this.group.add(l.group),this.markKeep(l);var c=a1(n,e,t);t.setData(c),c.each((function(t){var r=Object(Sa["H"])(t1,(function(r){return e1(c,t,r,e,a)})),i=n.getAxis("x").scale,s=n.getAxis("y").scale,l=i.getExtent(),u=s.getExtent(),p=[i.parse(c.get("x0",t)),i.parse(c.get("x1",t))],d=[s.parse(c.get("y0",t)),s.parse(c.get("y1",t))];nl(p),nl(d);var h=!(l[0]>p[1]||l[1]<p[0]||u[0]>d[1]||u[1]<d[0]),f=!h;c.setItemLayout(t,{points:r,allClipped:f});var m=c.getItemModel(t).getModel("itemStyle").getItemStyle(),g=nw(o,"color");m.fill||(m.fill=g,Object(Sa["C"])(m.fill)&&(m.fill=ro["f"](m.fill,.4))),m.stroke||(m.stroke=g),c.setItemVisual(t,"style",m)})),c.diff(X0(l).data).add((function(e){var t=c.getItemLayout(e);if(!t.allClipped){var r=new Wb({shape:{points:t.points}});c.setItemGraphicEl(e,r),l.group.add(r)}})).update((function(e,r){var a=X0(l).data.getItemGraphicEl(r),n=c.getItemLayout(e);n.allClipped?a&&l.group.remove(a):(a?sh(a,{shape:{points:n.points}},t,e):a=new Wb({shape:{points:n.points}}),c.setItemGraphicEl(e,a),l.group.add(a))})).remove((function(e){var t=X0(l).data.getItemGraphicEl(e);l.group.remove(t)})).execute(),c.eachItemGraphicEl((function(e,r){var a=c.getItemModel(r),n=c.getItemVisual(r,"style");e.useStyle(c.getItemVisual(r,"style")),yh(e,bh(a),{labelFetcher:t,labelDataIndex:r,defaultText:c.getName(r)||"",inheritColor:Object(Sa["C"])(n.fill)?ro["f"](n.fill,1):"#000"}),Zd(e,a),Hd(e,null,null,a.get(["emphasis","disabled"])),Up(e).dataModel=t})),X0(l).data=c,l.group.silent=t.get("silent")||e.get("silent")},t.type="markArea",t}(M0);function a1(e,t,r){var a,n,i=["x0","y0","x1","y1"];if(e){var o=Object(Sa["H"])(e&&e.dimensions,(function(e){var r=t.getData(),a=r.getDimensionInfo(r.mapDimension(e))||{};return Object(Sa["m"])(Object(Sa["m"])({},a),{name:e,ordinalMeta:null})}));n=Object(Sa["H"])(i,(function(e,t){return{name:e,type:o[t%2].type}})),a=new pO(n,r)}else n=[{name:"value",type:"float"}],a=new pO(n,r);var s=Object(Sa["H"])(r.get("data"),Object(Sa["h"])(Z0,t,e,r));e&&(s=Object(Sa["n"])(s,Object(Sa["h"])(Q0,e)));var l=e?function(e,t,r,a){var i=e.coord[Math.floor(a/2)][a%2];return Cv(i,n[a])}:function(e,t,r,a){return Cv(e.value,n[a])};return a.initData(s,null,l),a.hasItemOption=!0,a}var n1=r1;function i1(e){e.registerComponentModel(Y0),e.registerComponentView(n1),e.registerPreprocessor((function(e){c0(e.series,"markArea")&&(e.markArea=e.markArea||{})}))}var o1=function(e,t){return"all"===t?{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}:void 0},s1=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return xa(t,e),t.prototype.init=function(e,t,r){this.mergeDefaultAndTheme(e,r),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,r){e.prototype.mergeOption.call(this,t,r),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,r=this.ecModel;!0===t&&(t=e.selector=["all","inverse"]),Sa["t"](t)&&Sa["k"](t,(function(e,a){Sa["C"](e)&&(e={type:e}),t[a]=Sa["I"](e,o1(r,e.type))}))},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,r=0;r<e.length;r++){var a=e[r].get("name");if(this.isSelected(a)){this.select(a),t=!0;break}}!t&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var t=[],r=[];e.eachRawSeries((function(a){var n,i=a.name;if(r.push(i),a.legendVisualProvider){var o=a.legendVisualProvider,s=o.getAllNames();e.isSeriesFiltered(a)||(r=r.concat(s)),s.length?t=t.concat(s):n=!0}else n=!0;n&&Gl(a)&&t.push(a.name)})),this._availableNames=r;var a=this.get("data")||t,n=Sa["f"](),i=Sa["H"](a,(function(e){return(Sa["C"](e)||Sa["z"](e))&&(e={name:e}),n.get(e.name)?null:(n.set(e.name,!0),new Uh(e,this,this.ecModel))}),this);this._data=Sa["n"](i,(function(e){return!!e}))},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected,r=this.get("selectedMode");if("single"===r){var a=this._data;Sa["k"](a,(function(e){t[e.get("name")]=!1}))}t[e]=!0},t.prototype.unSelect=function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;Sa["k"](e,(function(e){t[e.get("name",!0)]=!0}))},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;Sa["k"](e,(function(e){var r=e.get("name",!0);t.hasOwnProperty(r)||(t[r]=!0),t[r]=!t[r]}))},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&Sa["r"](this._availableNames,e)>=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(fm),l1=s1,c1=Sa["h"],u1=Sa["k"],p1=Bs,d1=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return xa(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new p1),this.group.add(this._selectorGroup=new p1),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,r){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var n=e.get("align"),i=e.get("orient");n&&"auto"!==n||(n="right"===e.get("left")&&"vertical"===i?"right":"left");var o=e.get("selector",!0),s=e.get("selectorPosition",!0);!o||s&&"auto"!==s||(s="horizontal"===i?"end":"start"),this.renderInner(n,e,t,r,o,i,s);var l=e.getBoxLayoutParams(),c={width:r.getWidth(),height:r.getHeight()},u=e.get("padding"),p=nm(l,c,u),d=this.layoutInner(e,n,p,a,o,s),h=nm(Sa["i"]({width:d.width,height:d.height},l),c,u);this.group.x=h.x-d.x,this.group.y=h.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=vK(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,r,a,n,i,o){var s=this.getContentGroup(),l=Sa["f"](),c=t.get("selectedMode"),u=[];r.eachRawSeries((function(e){!e.get("legendHoverLink")&&u.push(e.id)})),u1(t.getData(),(function(n,i){var o=n.get("name");if(!this.newlineDisabled&&(""===o||"\n"===o)){var p=new p1;return p.newline=!0,void s.add(p)}var d=r.getSeriesByName(o)[0];if(!l.get(o)){if(d){var h=d.getData(),f=h.getVisual("legendLineStyle")||{},m=h.getVisual("legendIcon"),g=h.getVisual("style"),v=this._createItem(d,o,i,n,t,e,f,g,m,c,a);v.on("click",c1(m1,o,null,a,u)).on("mouseover",c1(v1,d.name,null,a,u)).on("mouseout",c1(y1,d.name,null,a,u)),r.ssr&&v.eachChild((function(e){var t=Up(e);t.seriesIndex=d.seriesIndex,t.dataIndex=i,t.ssrType="legend"})),l.set(o,!0)}else r.eachRawSeries((function(s){if(!l.get(o)&&s.legendVisualProvider){var p=s.legendVisualProvider;if(!p.containName(o))return;var d=p.indexOfName(o),h=p.getItemVisual(d,"style"),f=p.getItemVisual(d,"legendIcon"),m=Object(ro["h"])(h.fill);m&&0===m[3]&&(m[3]=.2,h=Sa["m"](Sa["m"]({},h),{fill:Object(ro["i"])(m,"rgba")}));var g=this._createItem(s,o,i,n,t,e,{},h,f,c,a);g.on("click",c1(m1,null,o,a,u)).on("mouseover",c1(v1,null,o,a,u)).on("mouseout",c1(y1,null,o,a,u)),r.ssr&&g.eachChild((function(e){var t=Up(e);t.seriesIndex=s.seriesIndex,t.dataIndex=i,t.ssrType="legend"})),l.set(o,!0)}}),this);0}}),this),n&&this._createSelector(n,t,a,i,o)},t.prototype._createSelector=function(e,t,r,a,n){var i=this.getSelectorGroup();u1(e,(function(e){var a=e.type,n=new Gp({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){r.dispatchAction({type:"all"===a?"legendAllSelect":"legendInverseSelect"})}});i.add(n);var o=t.getModel("selectorLabel"),s=t.getModel(["emphasis","selectorLabel"]);yh(n,{normal:o,emphasis:s},{defaultText:e.title}),Ud(n)}))},t.prototype._createItem=function(e,t,r,a,n,i,o,s,l,c,u){var p=e.visualDrawType,d=n.get("itemWidth"),h=n.get("itemHeight"),f=n.isSelected(t),m=a.get("symbolRotate"),g=a.get("symbolKeepAspect"),v=a.get("icon");l=v||l||"roundRect";var y=h1(l,a,o,s,p,f,u),b=new p1,_=a.getModel("textStyle");if(!Sa["w"](e.getLegendIcon)||v&&"inherit"!==v){var x="inherit"===v&&e.getData().getVisual("symbol")?"inherit"===m?e.getData().getVisual("symbolRotate"):m:0;b.add(f1({itemWidth:d,itemHeight:h,icon:l,iconRotate:x,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:g}))}else b.add(e.getLegendIcon({itemWidth:d,itemHeight:h,icon:l,iconRotate:m,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:g}));var w="left"===i?d+5:-5,S=i,D=n.get("formatter"),C=t;Sa["C"](D)&&D?C=D.replace("{name}",null!=t?t:""):Sa["w"](D)&&(C=D(t));var T=f?_.getTextColor():a.get("inactiveColor");b.add(new Gp({style:_h(_,{text:C,x:w,y:h/2,fill:T,align:S,verticalAlign:"middle"},{inheritColor:T})}));var I=new Cp({shape:b.getBoundingRect(),style:{fill:"transparent"}}),O=a.getModel("tooltip");return O.get("show")&&Q_({el:I,componentModel:n,itemName:t,itemTooltipOption:O.option}),b.add(I),b.eachChild((function(e){e.silent=!0})),I.silent=!c,this.getContentGroup().add(b),Ud(b),b.__legendDataIndex=r,b},t.prototype.layoutInner=function(e,t,r,a,n,i){var o=this.getContentGroup(),s=this.getSelectorGroup();rm(e.get("orient"),o,e.get("itemGap"),r.width,r.height);var l=o.getBoundingRect(),c=[-l.x,-l.y];if(s.markRedraw(),o.markRedraw(),n){rm("horizontal",s,e.get("selectorItemGap",!0));var u=s.getBoundingRect(),p=[-u.x,-u.y],d=e.get("selectorButtonGap",!0),h=e.getOrient().index,f=0===h?"width":"height",m=0===h?"height":"width",g=0===h?"y":"x";"end"===i?p[h]+=l[f]+d:c[h]+=u[f]+d,p[1-h]+=l[m]/2-u[m]/2,s.x=p[0],s.y=p[1],o.x=c[0],o.y=c[1];var v={x:0,y:0};return v[f]=l[f]+d+u[f],v[m]=Math.max(l[m],u[m]),v[g]=Math.min(0,u[g]+p[1-h]),v}return o.x=c[0],o.y=c[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Gy);function h1(e,t,r,a,n,i,o){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),u1(e,(function(r,a){"inherit"===e[a]&&(e[a]=t[a])}))}var l=t.getModel("itemStyle"),c=l.getItemStyle(),u=0===e.lastIndexOf("empty",0)?"fill":"stroke",p=l.getShallow("decal");c.decal=p&&"inherit"!==p?dS(p,o):a.decal,"inherit"===c.fill&&(c.fill=a[n]),"inherit"===c.stroke&&(c.stroke=a[u]),"inherit"===c.opacity&&(c.opacity=("fill"===n?a:r).opacity),s(c,a);var d=t.getModel("lineStyle"),h=d.getLineStyle();if(s(h,r),"auto"===c.fill&&(c.fill=a.fill),"auto"===c.stroke&&(c.stroke=a.fill),"auto"===h.stroke&&(h.stroke=a.fill),!i){var f=t.get("inactiveBorderWidth"),m=c[u];c.lineWidth="auto"===f?a.lineWidth>0&&m?2:0:c.lineWidth,c.fill=t.get("inactiveColor"),c.stroke=t.get("inactiveBorderColor"),h.stroke=d.get("inactiveColor"),h.lineWidth=d.get("inactiveWidth")}return{itemStyle:c,lineStyle:h}}function f1(e){var t=e.icon||"roundRect",r=Sw(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function m1(e,t,r,a){y1(e,t,r,a),r.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),v1(e,t,r,a)}function g1(e){var t,r=e.getZr().storage.getDisplayList(),a=0,n=r.length;while(a<n&&!(t=r[a].states.emphasis))a++;return t&&t.hoverLayer}function v1(e,t,r,a){g1(r)||r.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:a})}function y1(e,t,r,a){g1(r)||r.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:a})}var b1=d1;function _1(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var r=0;r<t.length;r++)if(!t[r].isSelected(e.name))return!1;return!0}))}function x1(e,t,r){var a,n={},i="toggleSelected"===e;return r.eachComponent("legend",(function(r){i&&null!=a?r[a?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?r[e]():(r[e](t.name),a=r.isSelected(t.name));var o=r.getData();Object(Sa["k"])(o,(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var a=r.isSelected(t);n.hasOwnProperty(t)?n[t]=n[t]&&a:n[t]=a}}))})),"allSelect"===e||"inverseSelect"===e?{selected:n}:{name:t.name,selected:n}}function w1(e){e.registerAction("legendToggleSelect","legendselectchanged",Object(Sa["h"])(x1,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Object(Sa["h"])(x1,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Object(Sa["h"])(x1,"inverseSelect")),e.registerAction("legendSelect","legendselected",Object(Sa["h"])(x1,"select")),e.registerAction("legendUnSelect","legendunselected",Object(Sa["h"])(x1,"unSelect"))}function S1(e){e.registerComponentModel(l1),e.registerComponentView(b1),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,_1),e.registerSubTypeDefaulter("legend",(function(){return"plain"})),w1(e)}var D1=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,r,a){var n=cm(t);e.prototype.init.call(this,t,r,a),C1(this,t,n)},t.prototype.mergeOption=function(t,r){e.prototype.mergeOption.call(this,t,r),C1(this,this.option,t)},t.type="legend.scroll",t.defaultOption=Xh(l1.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(l1);function C1(e,t,r){var a=e.getOrient(),n=[1,1];n[a.index]=0,lm(t,r,{type:"box",ignoreSize:!!n})}var T1=D1,I1=Bs,O1=["width","height"],M1=["x","y"],A1=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!0,r._currentIndex=0,r}return xa(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new I1),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new I1)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,r,a,n,i,o,s){var l=this;e.prototype.renderInner.call(this,t,r,a,n,i,o,s);var c=this._controllerGroup,u=r.get("pageIconSize",!0),p=Sa["t"](u)?u:[u,u];h("pagePrev",0);var d=r.getModel("pageTextStyle");function h(e,t){var a=e+"DataIndex",i=Y_(r.get("pageIcons",!0)[r.getOrient().name][t],{onclick:Sa["c"](l._pageGo,l,a,r,n)},{x:-p[0]/2,y:-p[1]/2,width:p[0],height:p[1]});i.name=e,c.add(i)}c.add(new Gp({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),h("pageNext",1)},t.prototype.layoutInner=function(e,t,r,a,n,i){var o=this.getSelectorGroup(),s=e.getOrient().index,l=O1[s],c=M1[s],u=O1[1-s],p=M1[1-s];n&&rm("horizontal",o,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),h=o.getBoundingRect(),f=[-h.x,-h.y],m=Sa["d"](r);n&&(m[l]=r[l]-h[l]-d);var g=this._layoutContentAndController(e,a,m,s,l,u,p,c);if(n){if("end"===i)f[s]+=g[l]+d;else{var v=h[l]+d;f[s]-=v,g[c]-=v}g[l]+=h[l]+d,f[1-s]+=g[p]+g[u]/2-h[u]/2,g[u]=Math.max(g[u],h[u]),g[p]=Math.min(g[p],h[p]+f[1-s]),o.x=f[0],o.y=f[1],o.markRedraw()}return g},t.prototype._layoutContentAndController=function(e,t,r,a,n,i,o,s){var l=this.getContentGroup(),c=this._containerGroup,u=this._controllerGroup;rm(e.get("orient"),l,e.get("itemGap"),a?r.width:null,a?null:r.height),rm("horizontal",u,e.get("pageButtonItemGap",!0));var p=l.getBoundingRect(),d=u.getBoundingRect(),h=this._showController=p[n]>r[n],f=[-p.x,-p.y];t||(f[a]=l[s]);var m=[0,0],g=[-d.x,-d.y],v=Sa["P"](e.get("pageButtonGap",!0),e.get("itemGap",!0));if(h){var y=e.get("pageButtonPosition",!0);"end"===y?g[a]+=r[n]-d[n]:m[a]+=d[n]+v}g[1-a]+=p[i]/2-d[i]/2,l.setPosition(f),c.setPosition(m),u.setPosition(g);var b={x:0,y:0};if(b[n]=h?r[n]:p[n],b[i]=Math.max(p[i],d[i]),b[o]=Math.min(0,d[o]+g[1-a]),c.__rectSize=r[n],h){var _={x:0,y:0};_[n]=Math.max(r[n]-d[n]-v,0),_[i]=b[i],c.setClipPath(new Cp({shape:_})),c.__rectSize=_[n]}else u.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(e);return null!=x.pageIndex&&sh(l,{x:x.contentPosition[0],y:x.contentPosition[1]},h?e:null),this._updatePageInfoView(e,x),b},t.prototype._pageGo=function(e,t,r){var a=this._getPageInfo(t)[e];null!=a&&r.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var r=this._controllerGroup;Sa["k"](["pagePrev","pageNext"],(function(a){var n=a+"DataIndex",i=null!=t[n],o=r.childOfName(a);o&&(o.setStyle("fill",i?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),o.cursor=i?"pointer":"default")}));var a=r.childOfName("pageText"),n=e.get("pageFormatter"),i=t.pageIndex,o=null!=i?i+1:0,s=t.pageCount;a&&n&&a.setStyle("text",Sa["C"](n)?n.replace("{current}",null==o?"":o+"").replace("{total}",null==s?"":s+""):n({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),r=this.getContentGroup(),a=this._containerGroup.__rectSize,n=e.getOrient().index,i=O1[n],o=M1[n],s=this._findTargetItemIndex(t),l=r.children(),c=l[s],u=l.length,p=u?1:0,d={contentPosition:[r.x,r.y],pageCount:p,pageIndex:p-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return d;var h=y(c);d.contentPosition[n]=-h.s;for(var f=s+1,m=h,g=h,v=null;f<=u;++f)v=y(l[f]),(!v&&g.e>m.s+a||v&&!b(v,m.s))&&(m=g.i>m.i?g:v,m&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=m.i),++d.pageCount)),g=v;for(f=s-1,m=h,g=h,v=null;f>=-1;--f)v=y(l[f]),v&&b(g,v.s)||!(m.i<g.i)||(g=m,null==d.pagePrevDataIndex&&(d.pagePrevDataIndex=m.i),++d.pageCount,++d.pageIndex),m=v;return d;function y(e){if(e){var t=e.getBoundingRect(),r=t[o]+e[o];return{s:r,e:r+t[i],i:e.__legendDataIndex}}}function b(e,t){return e.e>=t&&e.s<=t+a}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,r,a=this.getContentGroup();return a.eachChild((function(a,n){var i=a.__legendDataIndex;null==r&&null!=i&&(r=n),i===e&&(t=n)})),null!=t?t:r},t.type="legend.scroll",t}(b1),k1=A1;function P1(e){e.registerAction("legendScroll","legendscroll",(function(e,t){var r=e.scrollDataIndex;null!=r&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(r)}))}))}function N1(e){JD(S1),e.registerComponentModel(T1),e.registerComponentView(k1),P1(e)}function E1(e){JD(S1),JD(N1)}var R1=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.type="dataZoom.inside",t.defaultOption=Xh(HZ.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(HZ),L1=R1,j1=Zl();function F1(e,t,r){j1(e).coordSysRecordMap.each((function(e){var a=e.dataZoomInfoMap.get(t.uid);a&&(a.getRange=r)}))}function V1(e,t){for(var r=j1(e).coordSysRecordMap,a=r.keys(),n=0;n<a.length;n++){var i=a[n],o=r.get(i),s=o.dataZoomInfoMap;if(s){var l=t.uid,c=s.get(l);c&&(s.removeKey(l),s.keys().length||z1(r,o))}}}function z1(e,t){if(t){e.removeKey(t.model.uid);var r=t.controller;r&&r.dispose()}}function B1(e,t){var r={model:t,containsPoint:Object(Sa["h"])(G1,t),dispatchAction:Object(Sa["h"])($1,e),dataZoomInfoMap:null,controller:null},a=r.controller=new kE(e.getZr());return Object(Sa["k"])(["pan","zoom","scrollMove"],(function(e){a.on(e,(function(t){var a=[];r.dataZoomInfoMap.each((function(n){if(t.isAvailableBehavior(n.model.option)){var i=(n.getRange||{})[e],o=i&&i(n.dzReferCoordSysInfo,r.model.mainType,r.controller,t);!n.model.get("disabled",!0)&&o&&a.push({dataZoomId:n.model.id,start:o[0],end:o[1]})}})),a.length&&r.dispatchAction(a)}))})),r}function $1(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function G1(e,t,r,a){return e.coordinateSystem.containPoint([r,a])}function U1(e){var t,r="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},n=!0;return e.each((function(e){var i=e.model,o=!i.get("disabled",!0)&&(!i.get("zoomLock",!0)||"move");a[r+o]>a[r+t]&&(t=o),n=n&&i.get("preventDefaultMouseMove",!0)})),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function W1(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,(function(e,t){var r=j1(t),a=r.coordSysRecordMap||(r.coordSysRecordMap=Object(Sa["f"])());a.each((function(e){e.dataZoomInfoMap=null})),e.eachComponent({mainType:"dataZoom",subType:"inside"},(function(e){var r=$Z(e);Object(Sa["k"])(r.infoList,(function(r){var n=r.model.uid,i=a.get(n)||a.set(n,B1(t,r.model)),o=i.dataZoomInfoMap||(i.dataZoomInfoMap=Object(Sa["f"])());o.set(e.uid,{dzReferCoordSysInfo:r,model:e,getRange:null})}))})),a.each((function(e){var t,r=e.controller,n=e.dataZoomInfoMap;if(n){var i=n.keys()[0];null!=i&&(t=n.get(i))}if(t){var o=U1(n);r.enable(o.controlType,o.opt),r.setPointerChecker(e.containsPoint),mx(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else z1(a,e)}))}))}var H1=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return xa(t,e),t.prototype.render=function(t,r,a){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),F1(a,t,{pan:Object(Sa["c"])(q1.pan,this),zoom:Object(Sa["c"])(q1.zoom,this),scrollMove:Object(Sa["c"])(q1.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){V1(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(ZZ),q1={zoom:function(e,t,r,a){var n=this.range,i=n.slice(),o=e.axisModels[0];if(o){var s=X1[t](null,[a.originX,a.originY],o,r,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],c=Math.max(1/a.scale,0);i[0]=(i[0]-l)*c+l,i[1]=(i[1]-l)*c+l;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return wB(0,i,[0,100],0,u.minSpan,u.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1]?i:void 0}},pan:Y1((function(e,t,r,a,n,i){var o=X1[a]([i.oldX,i.oldY],[i.newX,i.newY],t,n,r);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength})),scrollMove:Y1((function(e,t,r,a,n,i){var o=X1[a]([0,0],[i.scrollDelta,i.scrollDelta],t,n,r);return o.signal*(e[1]-e[0])*i.scrollDelta}))};function Y1(e){return function(t,r,a,n){var i=this.range,o=i.slice(),s=t.axisModels[0];if(s){var l=e(o,s,t,r,a,n);return wB(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1]?o:void 0}}}var X1={grid:function(e,t,r,a,n){var i=r.axis,o={},s=n.model.coordinateSystem.getRect();return e=e||[0,0],"x"===i.dim?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(e,t,r,a,n){var i=r.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),c=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===r.mainType?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=i.inverse?-1:1),o},singleAxis:function(e,t,r,a,n){var i=r.axis,o=n.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===i.orient?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}},Z1=H1;function K1(e){lK(e),e.registerComponentModel(L1),e.registerComponentView(Z1),W1(e)}var J1=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Xh(HZ.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:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(HZ),Q1=J1,e2=Cp,t2=7,r2=1,a2=30,n2=7,i2="horizontal",o2="vertical",s2=5,l2=["line","bar","candlestick","scatter"],c2={easing:"cubicOut",duration:100,delay:0},u2=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r._displayables={},r}return xa(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=Object(Sa["c"])(this._onBrush,this),this._onBrushEnd=Object(Sa["c"])(this._onBrushEnd,this)},t.prototype.render=function(t,r,a,n){if(e.prototype.render.apply(this,arguments),mx(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){gx(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new Bs;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,r=e.get("brushSelect"),a=r?n2:0,n=this._findCoordRect(),i={width:t.getWidth(),height:t.getHeight()},o=this._orient===i2?{right:i.width-n.x-n.width,top:i.height-a2-t2-a,width:n.width,height:a2}:{right:t2,top:n.y,width:a2,height:n.height},s=cm(e.option);Object(Sa["k"])(["right","top","width","height"],(function(e){"ph"===s[e]&&(s[e]=o[e])}));var l=nm(s,i);this._location={x:l.x,y:l.y},this._size=[l.width,l.height],this._orient===o2&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,r=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),n=a&&a.get("inverse"),i=this._displayables.sliderGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;i.attr(r!==i2||n?r===i2&&n?{scaleY:o?1:-1,scaleX:-1}:r!==o2||n?{scaleY:o?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:o?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:o?1:-1,scaleX:1});var s=e.getBoundingRect([i]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,r=this._displayables.sliderGroup,a=e.get("brushSelect");r.add(new e2({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var n=new e2({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:Object(Sa["c"])(this._onClickPanel,this)}),i=this.api.getZr();a?(n.on("mousedown",this._onBrushStart,this),n.cursor="crosshair",i.on("mousemove",this._onBrush),i.on("mouseup",this._onBrushEnd)):(i.off("mousemove",this._onBrush),i.off("mouseup",this._onBrushEnd)),r.add(n)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,r=this._shadowSize||[],a=e.series,n=a.getRawData(),i=a.getShadowDim&&a.getShadowDim(),o=i&&n.getDimensionInfo(i)?a.getShadowDim():e.otherDim;if(null!=o){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(n!==this._shadowData||o!==this._shadowDim||t[0]!==r[0]||t[1]!==r[1]){var c=n.getDataExtent(o),u=.3*(c[1]-c[0]);c=[c[0]-u,c[1]+u];var p,d=[0,t[1]],h=[0,t[0]],f=[[t[0],0],[0,0]],m=[],g=h[1]/(n.count()-1),v=0,y=Math.round(n.count()/t[0]);n.each([o],(function(e,t){if(y>0&&t%y)v+=g;else{var r=null==e||isNaN(e)||""===e,a=r?0:tl(e,c,d,!0);r&&!p&&t?(f.push([f[f.length-1][0],0]),m.push([m[m.length-1][0],0])):!r&&p&&(f.push([v,0]),m.push([v,0])),f.push([v,a]),m.push([v,a]),v+=g,p=r}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=m}this._shadowData=n,this._shadowDim=o,this._shadowSize=[t[0],t[1]];for(var b=this.dataZoomModel,_=0;_<3;_++){var x=w(1===_);this._displayables.sliderGroup.add(x),this._displayables.dataShadowSegs.push(x)}}}function w(e){var t=b.getModel(e?"selectedDataBackground":"dataBackground"),r=new Bs,a=new Wb({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),n=new Yb({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return r.add(a),r.add(n),r}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var r,a=this.ecModel;return e.eachTargetAxis((function(n,i){var o=e.getAxisProxy(n,i).getTargetSeriesModels();Object(Sa["k"])(o,(function(e){if(!r&&!(!0!==t&&Object(Sa["r"])(l2,e.get("type"))<0)){var o,s=a.getComponent(zZ(n),i).axis,l=p2(n),c=e.coordinateSystem;null!=l&&c.getOtherAxis&&(o=c.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),r={thisAxis:s,series:e,thisDim:n,otherDim:l,otherAxisInverse:o}}}),this)}),this),r}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,r=t.handles=[null,null],a=t.handleLabels=[null,null],n=this._displayables.sliderGroup,i=this._size,o=this.dataZoomModel,s=this.api,l=o.get("borderRadius")||0,c=o.get("brushSelect"),u=t.filler=new e2({silent:c,style:{fill:o.get("fillerColor")},textConfig:{position:"inside"}});n.add(u),n.add(new e2({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:i[0],height:i[1],r:l},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:r2,fill:"rgba(0,0,0,0)"}})),Object(Sa["k"])([0,1],(function(t){var i=o.get("handleIcon");!_w[i]&&i.indexOf("path://")<0&&i.indexOf("image://")<0&&(i="path://"+i);var s=Sw(i,-1,0,2,2,null,!0);s.attr({cursor:d2(this._orient),draggable:!0,drift:Object(Sa["c"])(this._onDragMove,this,t),ondragend:Object(Sa["c"])(this._onDragEnd,this),onmouseover:Object(Sa["c"])(this._showDataInfo,this,!0),onmouseout:Object(Sa["c"])(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),c=o.get("handleSize");this._handleHeight=rl(c,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(o.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=o.getModel(["emphasis","handleStyle"]).getItemStyle(),Ud(s);var u=o.get("handleColor");null!=u&&(s.style.fill=u),n.add(r[t]=s);var p=o.getModel("textStyle");e.add(a[t]=new Gp({silent:!0,invisible:!0,style:_h(p,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:p.getTextColor(),font:p.getFont()}),z2:10}))}),this);var p=u;if(c){var d=rl(o.get("moveHandleSize"),i[1]),h=t.moveHandle=new Cp({style:o.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:i[1]-.5,height:d}}),f=.8*d,m=t.moveHandleIcon=Sw(o.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);m.silent=!0,m.y=i[1]+d/2-.5,h.ensureState("emphasis").style=o.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var g=Math.min(i[1]/2,Math.max(d,10));p=t.moveZone=new Cp({invisible:!0,shape:{y:i[1]-g,height:d+g}}),p.on("mouseover",(function(){s.enterEmphasis(h)})).on("mouseout",(function(){s.leaveEmphasis(h)})),n.add(h),n.add(m),n.add(p)}p.attr({draggable:!0,cursor:d2(this._orient),drift:Object(Sa["c"])(this._onDragMove,this,"all"),ondragstart:Object(Sa["c"])(this._showDataInfo,this,!0),ondragend:Object(Sa["c"])(this._onDragEnd,this),onmouseover:Object(Sa["c"])(this._showDataInfo,this,!0),onmouseout:Object(Sa["c"])(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[tl(e[0],[0,100],t,!0),tl(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var r=this.dataZoomModel,a=this._handleEnds,n=this._getViewExtent(),i=r.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];wB(t,a,n,r.get("zoomLock")?"all":e,null!=i.minSpan?tl(i.minSpan,o,n,!0):null,null!=i.maxSpan?tl(i.maxSpan,o,n,!0):null);var s=this._range,l=this._range=nl([tl(a[0],n,o,!0),tl(a[1],n,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,r=this._handleEnds,a=nl(r.slice()),n=this._size;Object(Sa["k"])([0,1],(function(e){var a=t.handles[e],i=this._handleHeight;a.attr({scaleX:i/2,scaleY:i/2,x:r[e]+(e?-1:1),y:n[1]/2-i/2})}),this),t.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:n[1]});var i={x:a[0],width:a[1]-a[0]};t.moveHandle&&(t.moveHandle.setShape(i),t.moveZone.setShape(i),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",i.x+i.width/2));for(var o=t.dataShadowSegs,s=[0,a[0],a[1],n[0]],l=0;l<o.length;l++){var c=o[l],u=c.getClipPath();u||(u=new Cp,c.setClipPath(u)),u.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:n[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,r=this._displayables,a=r.handleLabels,n=this._orient,i=["",""];if(t.get("showDetail")){var o=t.findRepresentativeAxisProxy();if(o){var s=o.getAxisModel().axis,l=this._range,c=e?o.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:o.getDataValueWindow();i=[this._formatLabel(c[0],s),this._formatLabel(c[1],s)]}}var u=nl(this._handleEnds.slice());function p(e){var t=z_(r.handles[e].parent,this.group),o=$_(0===e?"right":"left",t),s=this._handleWidth/2+s2,l=B_([u[e]+(0===e?-s:s),this._size[1]/2],t);a[e].setStyle({x:l[0],y:l[1],verticalAlign:n===i2?"middle":o,align:n===i2?o:"center",text:i[e]})}p.call(this,0),p.call(this,1)},t.prototype._formatLabel=function(e,t){var r=this.dataZoomModel,a=r.get("labelFormatter"),n=r.get("labelPrecision");null!=n&&"auto"!==n||(n=t.getPixelPrecision());var i=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(n,20));return Object(Sa["w"])(a)?a(e,i):Object(Sa["C"])(a)?a.replace("{value}",i):i},t.prototype._showDataInfo=function(e){e=this._dragging||e;var t=this._displayables,r=t.handleLabels;r[0].attr("invisible",!e),r[1].attr("invisible",!e),t.moveHandle&&this.api[e?"enterEmphasis":"leaveEmphasis"](t.moveHandle,1)},t.prototype._onDragMove=function(e,t,r,a){this._dragging=!0,_n(a.event);var n=this._displayables.sliderGroup.getLocalTransform(),i=B_([t,r],n,!0),o=this._updateInterval(e,i[0]),s=this.dataZoomModel.get("realtime");this._updateView(!s),o&&s&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var e=this.dataZoomModel.get("realtime");!e&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,r=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(r[0]<0||r[0]>t[0]||r[1]<0||r[1]>t[1])){var a=this._handleEnds,n=(a[0]+a[1])/2,i=this._updateInterval("all",r[0]-n);this._updateView(),i&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,r=e.offsetY;this._brushStart=new Ln(t,r),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var r=t.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(r.width)<5)){var n=this._getViewExtent(),i=[0,100];this._range=nl([tl(r.x,n,i,!0),tl(r.x+r.width,n,i,!0)]),this._handleEnds=[r.x,r.x+r.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(_n(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var r=this._displayables,a=this.dataZoomModel,n=r.brushRect;n||(n=r.brushRect=new e2({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),r.sliderGroup.add(n)),n.attr("ignore",!1);var i=this._brushStart,o=this._displayables.sliderGroup,s=o.transformCoordToLocal(e,t),l=o.transformCoordToLocal(i.x,i.y),c=this._size;s[0]=Math.max(Math.min(c[0],s[0]),0),n.setShape({x:l[0],y:0,width:s[0]-l[0],height:c[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?c2:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=$Z(this.dataZoomModel).infoList;if(!e&&t.length){var r=t[0].model.coordinateSystem;e=r.getRect&&r.getRect()}if(!e){var a=this.api.getWidth(),n=this.api.getHeight();e={x:.2*a,y:.2*n,width:.6*a,height:.6*n}}return e},t.type="dataZoom.slider",t}(ZZ);function p2(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}function d2(e){return"vertical"===e?"ns-resize":"ew-resize"}var h2=u2;function f2(e){e.registerComponentModel(Q1),e.registerComponentView(h2),lK(e)}function m2(e){JD(K1),JD(f2)}var g2={get:function(e,t,r){var a=Sa["d"]((v2[e]||{})[t]);return r&&Sa["t"](a)?a[a.length-1]:a}},v2={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]}},y2=g2,b2=MF.mapVisual,_2=MF.eachVisual,x2=Sa["t"],w2=Sa["k"],S2=nl,D2=tl,C2=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return xa(t,e),t.prototype.init=function(e,t,r){this.mergeDefaultAndTheme(e,r)},t.prototype.optionUpdated=function(e,t){var r=this.option;!t&&cQ(r,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=Sa["c"](e,this),this.controllerVisuals=lQ(this.option.controller,t,e),this.targetVisuals=lQ(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries((function(e,r){t.push(r)})):t=Ol(e),t},t.prototype.eachTargetSeries=function(e,t){Sa["k"](this.getTargetSeriesIndices(),(function(r){var a=this.ecModel.getSeriesByIndex(r);a&&e.call(t,a)}),this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries((function(r){r===e&&(t=!0)})),t},t.prototype.formatValueText=function(e,t,r){var a,n=this.option,i=n.precision,o=this.dataBound,s=n.formatter;r=r||["<",">"],Sa["t"](e)&&(e=e.slice(),a=!0);var l=t?e:a?[c(e[0]),c(e[1])]:c(e);return Sa["C"](s)?s.replace("{value}",a?l[0]:l).replace("{value2}",a?l[1]:l):Sa["w"](s)?a?s(e[0],e[1]):s(e):a?e[0]===o[0]?r[0]+" "+l[1]:e[1]===o[1]?r[1]+" "+l[0]:l[0]+" - "+l[1]:l;function c(e){return e===o[0]?"min":e===o[1]?"max":(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=S2([e.min,e.max]);this._dataExtent=t},t.prototype.getDataDimensionIndex=function(e){var t=this.option.dimension;if(null!=t)return e.getDimensionIndex(t);for(var r=e.dimensions,a=r.length-1;a>=0;a--){var n=r[a],i=e.getDimensionInfo(n);if(!i.isCalculationCoord)return i.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,r={inRange:t.inRange,outOfRange:t.outOfRange},a=t.target||(t.target={}),n=t.controller||(t.controller={});Sa["I"](a,r),Sa["I"](n,r);var i=this.isCategory();function o(r){x2(t.color)&&!r.inRange&&(r.inRange={color:t.color.slice().reverse()}),r.inRange=r.inRange||{color:e.get("gradientColor")}}function s(e,t,r){var a=e[t],n=e[r];a&&!n&&(n=e[r]={},w2(a,(function(e,t){if(MF.isValidType(t)){var r=y2.get(t,"inactive",i);null!=r&&(n[t]=r,"color"!==t||n.hasOwnProperty("opacity")||n.hasOwnProperty("colorAlpha")||(n.opacity=[0,0]))}})))}function l(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,r=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,a=this.get("inactiveColor"),n=this.getItemSymbol(),o=n||"roundRect";w2(this.stateList,(function(n){var s=this.itemSize,l=e[n];l||(l=e[n]={color:i?a:[a]}),null==l.symbol&&(l.symbol=t&&Sa["d"](t)||(i?o:[o])),null==l.symbolSize&&(l.symbolSize=r&&Sa["d"](r)||(i?s[0]:[s[0],s[0]])),l.symbol=b2(l.symbol,(function(e){return"none"===e?o:e}));var c=l.symbolSize;if(null!=c){var u=-1/0;_2(c,(function(e){e>u&&(u=e)})),l.symbolSize=b2(c,(function(e){return D2(e,[0,u],[0,s[0]],!0)}))}}),this)}o.call(this,a),o.call(this,n),s.call(this,a,"inRange","outOfRange"),l.call(this,n)},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.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"}},t}(fm),T2=C2,I2=[20,140],O2=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.optionUpdated=function(t,r){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()})),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(null==t[0]||isNaN(t[0]))&&(t[0]=I2[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=I2[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):Sa["t"](t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),Sa["k"](this.stateList,(function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)}),this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=nl((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},t.prototype.getValueState=function(e){var t=this.option.range,r=this.getExtent();return(t[0]<=r[0]||t[0]<=e)&&(t[1]>=r[1]||e<=t[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries((function(r){var a=[],n=r.getData();n.each(this.getDataDimensionIndex(n),(function(t,r){e[0]<=t&&t<=e[1]&&a.push(r)}),this),t.push({seriesId:r.id,dataIndex:a})}),this),t},t.prototype.getVisualMeta=function(e){var t=M2(this,"outOfRange",this.getExtent()),r=M2(this,"inRange",this.option.range.slice()),a=[];function n(t,r){a.push({value:t,color:e(t,r)})}for(var i=0,o=0,s=r.length,l=t.length;o<l&&(!r.length||t[o]<=r[0]);o++)t[o]<r[i]&&n(t[o],"outOfRange");for(var c=1;i<s;i++,c=0)c&&a.length&&n(r[i],"outOfRange"),n(r[i],"inRange");for(c=1;o<l;o++)(!r.length||r[r.length-1]<t[o])&&(c&&(a.length&&n(a[a.length-1].value,"outOfRange"),c=0),n(t[o],"outOfRange"));var u=a.length;return{stops:a,outerColors:[u?a[0].color:"transparent",u?a[u-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=Xh(T2.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)"}}),t}(T2);function M2(e,t,r){if(r[0]===r[1])return r.slice();for(var a=200,n=(r[1]-r[0])/a,i=r[0],o=[],s=0;s<=a&&i<r[1];s++)o.push(i),i+=n;return o.push(r[1]),o}var A2=O2,k2=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r.autoPositionValues={left:1,right:1,top:1,bottom:1},r}return xa(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,r,a){this.visualMapModel=e,!1!==e.get("show")?this.doRender(e,t,r,a):this.group.removeAll()},t.prototype.renderBackground=function(e){var t=this.visualMapModel,r=Gf(t.get("padding")||0),a=e.getBoundingRect();e.add(new Cp({z2:-1,silent:!0,shape:{x:a.x-r[3],y:a.y-r[0],width:a.width+r[3]+r[1],height:a.height+r[0]+r[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,t,r){r=r||{};var a=r.forceState,n=this.visualMapModel,i={};if("color"===t){var o=n.get("contentColor");i.color=o}function s(e){return i[e]}function l(e,t){i[e]=t}var c=n.controllerVisuals[a||n.getValueState(e)],u=MF.prepareVisualTypes(c);return Sa["k"](u,(function(a){var n=c[a];r.convertOpacityToAlpha&&"opacity"===a&&(a="colorAlpha",n=c.__alphaForOpacity),MF.dependsOn(a,t)&&n&&n.applyVisual(e,s,l)})),i[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,r=this.api;im(e,t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()})},t.prototype.doRender=function(e,t,r,a){},t.type="visualMap",t}(Gy),P2=k2,N2=[["left","right","width"],["top","bottom","height"]];function E2(e,t,r){var a=e.option,n=a.align;if(null!=n&&"auto"!==n)return n;for(var i={width:t.getWidth(),height:t.getHeight()},o="horizontal"===a.orient?1:0,s=N2[o],l=[0,null,10],c={},u=0;u<3;u++)c[N2[1-o][u]]=l[u],c[s[u]]=2===u?r[0]:a[s[u]];var p=[["x","width",3],["y","height",0]][o],d=nm(c,i,a.padding);return s[(d.margin[p[2]]||0)+d[p[0]]+.5*d[p[1]]<.5*i[p[1]]?0:1]}function R2(e,t){return Sa["k"](e||[],(function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")})),e}var L2=tl,j2=Sa["k"],F2=Math.min,V2=Math.max,z2=12,B2=6,$2=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r._shapes={},r._dataInterval=[],r._handleEnds=[],r._hoverLinkDataIndices=[],r}return xa(t,e),t.prototype.init=function(t,r){e.prototype.init.call(this,t,r),this._hoverLinkFromSeriesMouseOver=Sa["c"](this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Sa["c"](this._hideIndicator,this)},t.prototype.doRender=function(e,t,r,a){a&&"selectDataRange"===a.type&&a.from===this.uid||this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var r=e.get("text");this._renderEndsText(t,r,0),this._renderEndsText(t,r,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},t.prototype._renderEndsText=function(e,t,r){if(t){var a=t[1-r];a=null!=a?a+"":"";var n=this.visualMapModel,i=n.get("textGap"),o=n.itemSize,s=this._shapes.mainGroup,l=this._applyTransform([o[0]/2,0===r?-i:o[1]+i],s),c=this._applyTransform(0===r?"bottom":"top",s),u=this._orient,p=this.visualMapModel.textStyleModel;this.group.add(new Gp({style:_h(p,{x:l[0],y:l[1],verticalAlign:"horizontal"===u?"middle":c,align:"horizontal"===u?c:"center",text:a})}))}},t.prototype._renderBar=function(e){var t=this.visualMapModel,r=this._shapes,a=t.itemSize,n=this._orient,i=this._useHandle,o=E2(t,this.api,a),s=r.mainGroup=this._createBarGroup(o),l=new Bs;s.add(l),l.add(r.outOfRange=G2()),l.add(r.inRange=G2(null,i?H2(this._orient):null,Sa["c"](this._dragHandle,this,"all",!1),Sa["c"](this._dragHandle,this,"all",!0))),l.setClipPath(new Cp({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var c=t.textStyleModel.getTextRect("国"),u=V2(c.width,c.height);i&&(r.handleThumbs=[],r.handleLabels=[],r.handleLabelPoints=[],this._createHandle(t,s,0,a,u,n),this._createHandle(t,s,1,a,u,n)),this._createIndicator(t,s,a,u,n),e.add(s)},t.prototype._createHandle=function(e,t,r,a,n,i){var o=Sa["c"](this._dragHandle,this,r,!1),s=Sa["c"](this._dragHandle,this,r,!0),l=Ds(e.get("handleSize"),a[0]),c=Sw(e.get("handleIcon"),-l/2,-l/2,l,l,null,!0),u=H2(this._orient);c.attr({cursor:u,draggable:!0,drift:o,ondragend:s,onmousemove:function(e){_n(e.event)}}),c.x=a[0]/2,c.useStyle(e.getModel("handleStyle").getItemStyle()),c.setStyle({strokeNoScale:!0,strokeFirst:!0}),c.style.lineWidth*=2,c.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),Kd(c,!0),t.add(c);var p=this.visualMapModel.textStyleModel,d=new Gp({cursor:u,draggable:!0,drift:o,onmousemove:function(e){_n(e.event)},ondragend:s,style:_h(p,{x:0,y:0,text:""})});d.ensureState("blur").style={opacity:.1},d.stateTransition={duration:200},this.group.add(d);var h=[l,0],f=this._shapes;f.handleThumbs[r]=c,f.handleLabelPoints[r]=h,f.handleLabels[r]=d},t.prototype._createIndicator=function(e,t,r,a,n){var i=Ds(e.get("indicatorSize"),r[0]),o=Sw(e.get("indicatorIcon"),-i/2,-i/2,i,i,null,!0);o.attr({cursor:"move",invisible:!0,silent:!0,x:r[0]/2});var s=e.getModel("indicatorStyle").getItemStyle();if(o instanceof gp){var l=o.style;o.useStyle(Sa["m"]({image:l.image,x:l.x,y:l.y,width:l.width,height:l.height},s))}else o.useStyle(s);t.add(o);var c=this.visualMapModel.textStyleModel,u=new Gp({silent:!0,invisible:!0,style:_h(c,{x:0,y:0,text:""})});this.group.add(u);var p=[("horizontal"===n?a/2:B2)+r[0]/2,0],d=this._shapes;d.indicator=o,d.indicatorLabel=u,d.indicatorLabelPoint=p,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,t,r,a){if(this._useHandle){if(this._dragging=!t,!t){var n=this._applyTransform([r,a],this._shapes.mainGroup,!0);this._updateInterval(e,n[1]),this._hideIndicator(),this._updateView()}t===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():W2(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),r=e.getExtent(),a=[0,e.itemSize[1]];this._handleEnds=[L2(t[0],r,a,!0),L2(t[1],r,a,!0)]},t.prototype._updateInterval=function(e,t){t=t||0;var r=this.visualMapModel,a=this._handleEnds,n=[0,r.itemSize[1]];wB(t,a,n,e,0);var i=r.getExtent();this._dataInterval=[L2(a[0],n,i,!0),L2(a[1],n,i,!0)]},t.prototype._updateView=function(e){var t=this.visualMapModel,r=t.getExtent(),a=this._shapes,n=[0,t.itemSize[1]],i=e?n:this._handleEnds,o=this._createBarVisual(this._dataInterval,r,i,"inRange"),s=this._createBarVisual(r,r,n,"outOfRange");a.inRange.setStyle({fill:o.barColor}).setShape("points",o.barPoints),a.outOfRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),this._updateHandle(i,o)},t.prototype._createBarVisual=function(e,t,r,a){var n={forceState:a,convertOpacityToAlpha:!0},i=this._makeColorGradient(e,n),o=[this.getControllerVisual(e[0],"symbolSize",n),this.getControllerVisual(e[1],"symbolSize",n)],s=this._createBarPoints(r,o);return{barColor:new d_(0,0,0,1,i),barPoints:s,handlesColor:[i[0].color,i[i.length-1].color]}},t.prototype._makeColorGradient=function(e,t){var r=100,a=[],n=(e[1]-e[0])/r;a.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var i=1;i<r;i++){var o=e[0]+n*i;if(o>e[1])break;a.push({color:this.getControllerVisual(o,"color",t),offset:i/r})}return a.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),a},t.prototype._createBarPoints=function(e,t){var r=this.visualMapModel.itemSize;return[[r[0]-t[0],e[0]],[r[0],e[0]],[r[0],e[1]],[r[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,r=this.visualMapModel.get("inverse");return new Bs("horizontal"!==t||r?"horizontal"===t&&r?{scaleX:"bottom"===e?-1:1,rotation:-Math.PI/2}:"vertical"!==t||r?{scaleX:"left"===e?1:-1}:{scaleX:"left"===e?1:-1,scaleY:-1}:{scaleX:"bottom"===e?1:-1,rotation:Math.PI/2})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var r=this._shapes,a=this.visualMapModel,n=r.handleThumbs,i=r.handleLabels,o=a.itemSize,s=a.getExtent();j2([0,1],(function(l){var c=n[l];c.setStyle("fill",t.handlesColor[l]),c.y=e[l];var u=L2(e[l],[0,o[1]],s,!0),p=this.getControllerVisual(u,"symbolSize");c.scaleX=c.scaleY=p/o[0],c.x=o[0]-p/2;var d=B_(r.handleLabelPoints[l],z_(c,this.group));i[l].setStyle({x:d[0],y:d[1],text:a.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",r.mainGroup):"center"})}),this)}},t.prototype._showIndicator=function(e,t,r,a){var n=this.visualMapModel,i=n.getExtent(),o=n.itemSize,s=[0,o[1]],l=this._shapes,c=l.indicator;if(c){c.attr("invisible",!1);var u={convertOpacityToAlpha:!0},p=this.getControllerVisual(e,"color",u),d=this.getControllerVisual(e,"symbolSize"),h=L2(e,i,s,!0),f=o[0]-d/2,m={x:c.x,y:c.y};c.y=h,c.x=f;var g=B_(l.indicatorLabelPoint,z_(c,this.group)),v=l.indicatorLabel;v.attr("invisible",!1);var y=this._applyTransform("left",l.mainGroup),b=this._orient,_="horizontal"===b;v.setStyle({text:(r||"")+n.formatValueText(t),verticalAlign:_?y:"middle",align:_?"center":y});var x={x:f,y:h,style:{fill:p}},w={style:{x:g[0],y:g[1]}};if(n.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var S={duration:100,easing:"cubicInOut",additive:!0};c.x=m.x,c.y=m.y,c.animateTo(x,S),v.animateTo(w,S)}else c.attr(x),v.attr(w);this._firstShowIndicator=!1;var D=this._shapes.handleLabels;if(D)for(var C=0;C<D.length;C++)this.api.enterBlur(D[C])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",(function(t){if(e._hovering=!0,!e._dragging){var r=e.visualMapModel.itemSize,a=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);a[1]=F2(V2(0,a[1]),r[1]),e._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=r[0])}})).on("mouseout",(function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()}))},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,t){var r=this.visualMapModel,a=r.itemSize;if(r.option.hoverLink){var n=[0,a[1]],i=r.getExtent();e=F2(V2(n[0],e),n[1]);var o=U2(r,i,n),s=[e-o,e+o],l=L2(e,n,i,!0),c=[L2(s[0],n,i,!0),L2(s[1],n,i,!0)];s[0]<n[0]&&(c[0]=-1/0),s[1]>n[1]&&(c[1]=1/0),t&&(c[0]===-1/0?this._showIndicator(l,c[1],"< ",o):c[1]===1/0?this._showIndicator(l,c[0],"> ",o):this._showIndicator(l,l,"≈ ",o));var u=this._hoverLinkDataIndices,p=[];(t||W2(r))&&(p=this._hoverLinkDataIndices=r.findTargetDataIndices(c));var d=Yl(u,p);this._dispatchHighDown("downplay",R2(d[0],r)),this._dispatchHighDown("highlight",R2(d[1],r))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(cw(e.target,(function(e){var r=Up(e);if(null!=r.dataIndex)return t=r,!0}),!0),t){var r=this.ecModel.getSeriesByIndex(t.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(r)){var n=r.getData(t.dataType),i=n.getStore().get(a.getDataDimensionIndex(n),t.dataIndex);isNaN(i)||this._showIndicator(i,i)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var t=this._shapes.handleLabels;if(t)for(var r=0;r<t.length;r++)this.api.leaveBlur(t[r])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",R2(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,t,r,a){var n=z_(t,a?null:this.group);return Sa["t"](e)?B_(e,n,r):$_(e,n,r)},t.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(P2);function G2(e,t,r,a){return new Wb({shape:{points:e},draggable:!!r,cursor:t,drift:r,onmousemove:function(e){_n(e.event)},ondragend:a})}function U2(e,t,r){var a=z2/2,n=e.get("hoverLinkDataSize");return n&&(a=L2(n,t,r,!0)/2),a}function W2(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function H2(e){return"vertical"===e?"ns-resize":"ew-resize"}var q2=$2,Y2={type:"selectDataRange",event:"dataRangeSelected",update:"update"},X2=function(e,t){t.eachComponent({mainType:"visualMap",query:e},(function(t){t.setSelected(e.selected)}))},Z2=[{createOnAllSeries:!0,reset:function(e,t){var r=[];return t.eachComponent("visualMap",(function(t){var a=e.pipelineContext;!t.isTargetSeries(e)||a&&a.large||r.push(pQ(t.stateList,t.targetVisuals,Sa["c"](t.getValueState,t),t.getDataDimensionIndex(e.getData())))})),r}},{createOnAllSeries:!0,reset:function(e,t){var r=e.getData(),a=[];t.eachComponent("visualMap",(function(t){if(t.isTargetSeries(e)){var n=t.getVisualMeta(Sa["c"](K2,null,e,t))||{stops:[],outerColors:[]},i=t.getDataDimensionIndex(r);i>=0&&(n.dimension=i,a.push(n))}})),e.getData().setVisual("visualMeta",a)}}];function K2(e,t,r,a){for(var n=t.targetVisuals[a],i=MF.prepareVisualTypes(n),o={color:nw(e.getData(),"color")},s=0,l=i.length;s<l;s++){var c=i[s],u=n["opacity"===c?"__alphaForOpacity":c];u&&u.applyVisual(r,p,d)}return o.color;function p(e){return o[e]}function d(e,t){o[e]=t}}var J2=Sa["k"];function Q2(e){var t=e&&e.visualMap;Sa["t"](t)||(t=t?[t]:[]),J2(t,(function(e){if(e){e5(e,"splitList")&&!e5(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&Sa["t"](t)&&J2(t,(function(e){Sa["A"](e)&&(e5(e,"start")&&!e5(e,"min")&&(e.min=e.start),e5(e,"end")&&!e5(e,"max")&&(e.max=e.end))}))}}))}function e5(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var t5=!1;function r5(e){t5||(t5=!0,e.registerSubTypeDefaulter("visualMap",(function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"})),e.registerAction(Y2,X2),Object(Sa["k"])(Z2,(function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)})),e.registerPreprocessor(Q2))}function a5(e){e.registerComponentModel(A2),e.registerComponentView(q2),r5(e)}var n5=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r._pieceList=[],r}return xa(t,e),t.prototype.optionUpdated=function(t,r){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],i5[this._mode].call(this,this._pieceList),this._resetSelected(t,r);var n=this.option.categories;this.resetVisual((function(e,t){"categories"===a?(e.mappingMethod="category",e.categories=Sa["d"](n)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=Sa["H"](this._pieceList,(function(e){return e=Sa["d"](e),"inRange"!==t&&(e.visual=null),e})))}))},t.prototype.completeVisualOption=function(){var t=this.option,r={},a=MF.listVisualTypes(),n=this.isCategory();function i(e,t,r){return e&&e[t]&&e[t].hasOwnProperty(r)}Sa["k"](t.pieces,(function(e){Sa["k"](a,(function(t){e.hasOwnProperty(t)&&(r[t]=1)}))})),Sa["k"](r,(function(e,r){var a=!1;Sa["k"](this.stateList,(function(e){a=a||i(t,e,r)||i(t.target,e,r)}),this),!a&&Sa["k"](this.stateList,(function(e){(t[e]||(t[e]={}))[r]=y2.get(r,"inRange"===e?"active":"inactive",n)}))}),this),e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var r=this.option,a=this._pieceList,n=(t?r:e).selected||{};if(r.selected=n,Sa["k"](a,(function(e,t){var r=this.getSelectedMapKey(e);n.hasOwnProperty(r)||(n[r]=!0)}),this),"single"===r.selectedMode){var i=!1;Sa["k"](a,(function(e,t){var r=this.getSelectedMapKey(e);n[r]&&(i?n[r]=!1:i=!0)}),this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return"categories"===this._mode?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=Sa["d"](e)},t.prototype.getValueState=function(e){var t=MF.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[],r=this._pieceList;return this.eachTargetSeries((function(a){var n=[],i=a.getData();i.each(this.getDataDimensionIndex(i),(function(t,a){var i=MF.findPieceIndex(t,r);i===e&&n.push(a)}),this),t.push({seriesId:a.id,dataIndex:n})}),this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var r=e.interval||[];t=r[0]===-1/0&&r[1]===1/0?0:(r[0]+r[1])/2}return t},t.prototype.getVisualMeta=function(e){if(!this.isCategory()){var t=[],r=["",""],a=this,n=this._pieceList.slice();if(n.length){var i=n[0].interval[0];i!==-1/0&&n.unshift({interval:[-1/0,i]}),i=n[n.length-1].interval[1],i!==1/0&&n.push({interval:[i,1/0]})}else n.push({interval:[-1/0,1/0]});var o=-1/0;return Sa["k"](n,(function(e){var t=e.interval;t&&(t[0]>o&&s([o,t[0]],"outOfRange"),s(t.slice()),o=t[1])}),this),{stops:t,outerColors:r}}function s(n,i){var o=a.getRepresentValue({interval:n});i||(i=a.getValueState(o));var s=e(o,i);n[0]===-1/0?r[0]=s:n[1]===1/0?r[1]=s:t.push({value:n[0],color:s},{value:n[1],color:s})}},t.type="visualMap.piecewise",t.defaultOption=Xh(T2.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}),t}(T2),i5={splitNumber:function(e){var t=this.option,r=Math.min(t.precision,20),a=this.getExtent(),n=t.splitNumber;n=Math.max(parseInt(n,10),1),t.splitNumber=n;var i=(a[1]-a[0])/n;while(+i.toFixed(r)!==i&&r<5)r++;t.precision=r,i=+i.toFixed(r),t.minOpen&&e.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o<n;s+=i,o++){var l=o===n-1?a[1]:s+i;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[a[1],1/0],close:[0,0]}),bl(e),Sa["k"](e,(function(e,t){e.index=t,e.text=this.formatValueText(e.interval)}),this)},categories:function(e){var t=this.option;Sa["k"](t.categories,(function(t){e.push({text:this.formatValueText(t,!0),value:t})}),this),o5(t,e)},pieces:function(e){var t=this.option;Sa["k"](t.pieces,(function(t,r){Sa["A"](t)||(t={value:t});var a={text:"",index:r};if(null!=t.label&&(a.text=t.label),t.hasOwnProperty("value")){var n=a.value=t.value;a.interval=[n,n],a.close=[1,1]}else{for(var i=a.interval=[],o=a.close=[0,0],s=[1,0,1],l=[-1/0,1/0],c=[],u=0;u<2;u++){for(var p=[["gte","gt","min"],["lte","lt","max"]][u],d=0;d<3&&null==i[u];d++)i[u]=t[p[d]],o[u]=s[d],c[u]=2===d;null==i[u]&&(i[u]=l[u])}c[0]&&i[1]===1/0&&(o[0]=0),c[1]&&i[0]===-1/0&&(o[1]=0),i[0]===i[1]&&o[0]&&o[1]&&(a.value=i[0])}a.visual=MF.retrieveVisuals(t),e.push(a)}),this),o5(t,e),bl(e),Sa["k"](e,(function(e){var t=e.close,r=[["<","≤"][t[1]],[">","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,r)}),this)}};function o5(e,t){var r=e.inverse;("vertical"===e.orient?!r:r)&&t.reverse()}var s5=n5,l5=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.type,r}return xa(t,e),t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,r=t.get("textGap"),a=t.textStyleModel,n=a.getFont(),i=a.getTextColor(),o=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),c=l.endsText,u=Sa["O"](t.get("showLabel",!0),!c);c&&this._renderEndsText(e,c[0],s,u,o),Sa["k"](l.viewPieceList,(function(a){var l=a.piece,c=new Bs;c.onclick=Sa["c"](this._onItemClick,this,l),this._enableHoverLink(c,a.indexInModelPieceList);var p=t.getRepresentValue(l);if(this._createItemSymbol(c,p,[0,0,s[0],s[1]]),u){var d=this.visualMapModel.getValueState(p);c.add(new Gp({style:{x:"right"===o?-r:s[0]+r,y:s[1]/2,text:l.text,verticalAlign:"middle",align:o,font:n,fill:i,opacity:"outOfRange"===d?.5:1}}))}e.add(c)}),this),c&&this._renderEndsText(e,c[1],s,u,o),rm(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var r=this;e.on("mouseover",(function(){return a("highlight")})).on("mouseout",(function(){return a("downplay")}));var a=function(e){var a=r.visualMapModel;a.option.hoverLink&&r.api.dispatchAction({type:e,batch:R2(a.findTargetDataIndices(t),a)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return E2(e,this.api,e.itemSize);var r=t.align;return r&&"auto"!==r||(r="left"),r},t.prototype._renderEndsText=function(e,t,r,a,n){if(t){var i=new Bs,o=this.visualMapModel.textStyleModel;i.add(new Gp({style:_h(o,{x:a?"right"===n?r[0]:0:r[0]/2,y:r[1]/2,verticalAlign:"middle",align:a?n:"center",text:t})})),e.add(i)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=Sa["H"](e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),r=e.get("text"),a=e.get("orient"),n=e.get("inverse");return("horizontal"===a?n:!n)?t.reverse():r&&(r=r.slice().reverse()),{viewPieceList:t,endsText:r}},t.prototype._createItemSymbol=function(e,t,r){e.add(Sw(this.getControllerVisual(t,"symbol"),r[0],r[1],r[2],r[3],this.getControllerVisual(t,"color")))},t.prototype._onItemClick=function(e){var t=this.visualMapModel,r=t.option,a=r.selectedMode;if(a){var n=Sa["d"](r.selected),i=t.getSelectedMapKey(e);"single"===a||!0===a?(n[i]=!0,Sa["k"](n,(function(e,t){n[t]=t===i}))):n[i]=!n[i],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}},t.type="visualMap.piecewise",t}(P2),c5=l5;function u5(e){e.registerComponentModel(s5),e.registerComponentView(c5),r5(e)}function p5(e){JD(a5),JD(u5)}var d5={label:{enabled:!0},decal:{show:!1}},h5=Zl(),f5={};function m5(e,t){var r=e.getModel("aria");if(r.get("enabled")){var a=Sa["d"](d5);Sa["I"](a.label,e.getLocaleModel().get("aria"),!1),Sa["I"](r.option,a,!1),n(),i()}function n(){var t=r.getModel("decal"),a=t.get("show");if(a){var n=Sa["f"]();e.eachSeries((function(e){if(!e.isColorBySeries()){var t=n.get(e.type);t||(t={},n.set(e.type,t)),h5(e).scope=t}})),e.eachRawSeries((function(t){if(!e.isSeriesFiltered(t))if(Sa["w"](t.enableAriaDecal))t.enableAriaDecal();else{var r=t.getData();if(t.isColorBySeries()){var a=$m(t.ecModel,t.name,f5,e.getSeriesCount()),n=r.getVisual("decal");r.setVisual("decal",c(n,a))}else{var i=t.getRawData(),o={},s=h5(t).scope;r.each((function(e){var t=r.getRawIndex(e);o[t]=e}));var l=i.count();i.each((function(e){var a=o[e],n=i.getName(e)||e+"",u=$m(t.ecModel,n,s,l),p=r.getItemVisual(a,"decal");r.setItemVisual(a,"decal",c(p,u))}))}}function c(e,t){var r=e?Sa["m"](Sa["m"]({},t),e):t;return r.dirty=!0,r}}))}}function i(){var a=t.getZr().dom;if(a){var n=e.getLocaleModel().get("aria"),i=r.getModel("label");if(i.option=Sa["i"](i.option,n),i.get("enabled"))if(i.get("description"))a.setAttribute("aria-label",i.get("description"));else{var c,u=e.getSeriesCount(),p=i.get(["data","maxCount"])||10,d=i.get(["series","maxCount"])||10,h=Math.min(u,d);if(!(u<1)){var f=s();if(f){var m=i.get(["general","withTitle"]);c=o(m,{title:f})}else c=i.get(["general","withoutTitle"]);var g=[],v=u>1?i.get(["series","multiple","prefix"]):i.get(["series","single","prefix"]);c+=o(v,{seriesCount:u}),e.eachSeries((function(e,t){if(t<h){var r=void 0,a=e.get("name"),n=a?"withName":"withoutName";r=u>1?i.get(["series","multiple",n]):i.get(["series","single",n]),r=o(r,{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:l(e.subType)});var s=e.getData();if(s.count()>p){var c=i.get(["data","partialData"]);r+=o(c,{displayCnt:p})}else r+=i.get(["data","allData"]);for(var d=i.get(["data","separator","middle"]),f=i.get(["data","separator","end"]),m=[],v=0;v<s.count();v++)if(v<p){var y=s.getName(v),b=s.getValues(v),_=i.get(["data",y?"withName":"withoutName"]);m.push(o(_,{name:y,value:b.join(d)}))}r+=m.join(d)+f,g.push(r)}}));var y=i.getModel(["series","multiple","separator"]),b=y.get("middle"),_=y.get("end");c+=g.join(b)+_,a.setAttribute("aria-label",c)}}}}function o(e,t){if(!Sa["C"](e))return e;var r=e;return Sa["k"](t,(function(e,t){r=r.replace(new RegExp("\\{\\s*"+t+"\\s*\\}","g"),e)})),r}function s(){var t=e.get("title");return t&&t.length&&(t=t[0]),t&&t.text}function l(t){var r=e.getLocaleModel().get(["series","typeNames"]);return r[t]||r.chart}}function g5(e){if(e&&e.aria){var t=e.aria;null!=t.show&&(t.enabled=t.show),t.label=t.label||{},Sa["k"](["description","general","series","data"],(function(e){null!=t[e]&&(t.label[e]=t[e])}))}}function v5(e){e.registerPreprocessor(g5),e.registerVisual(e.PRIORITY.VISUAL.ARIA,m5)}var y5={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},b5=function(){function e(e){var t=this._condVal=Object(Sa["C"])(e)?new RegExp(e):Object(Sa["B"])(e)?e:null;if(null==t){var r="";0,Zm(r)}}return e.prototype.evaluate=function(e){var t=typeof e;return Object(Sa["C"])(t)?this._condVal.test(e):!!Object(Sa["z"])(t)&&this._condVal.test(e+"")},e}(),_5=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),x5=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},e}(),w5=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},e}(),S5=function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e}(),D5=function(){function e(){}return e.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,r=t(this.valueGetterParam),a=e?this.valueParser(r):null,n=0;n<this.subCondList.length;n++)if(!this.subCondList[n].evaluate(e?a:r))return!1;return!0},e}();function C5(e,t){if(!0===e||!1===e){var r=new _5;return r.value=e,r}var a="";return M5(e)||Zm(a),e.and?T5("and",e,t):e.or?T5("or",e,t):e.not?I5(e,t):O5(e,t)}function T5(e,t,r){var a=t[e],n="";Object(Sa["t"])(a)||Zm(n),a.length||Zm(n);var i="and"===e?new x5:new w5;return i.children=Object(Sa["H"])(a,(function(e){return C5(e,r)})),i.children.length||Zm(n),i}function I5(e,t){var r=e.not,a="";M5(r)||Zm(a);var n=new S5;return n.child=C5(r,t),n.child||Zm(a),n}function O5(e,t){for(var r="",a=t.prepareGetValue(e),n=[],i=Object(Sa["F"])(e),o=e.parser,s=o?Iv(o):null,l=0;l<i.length;l++){var c=i[l];if("parser"!==c&&!t.valueGetterAttrMap.get(c)){var u=Object(Sa["q"])(y5,c)?y5[c]:c,p=e[c],d=s?s(p):p,h=Pv(u,d)||"reg"===u&&new b5(d);h||Zm(r),n.push(h)}}n.length||Zm(r);var f=new D5;return f.valueGetterParam=a,f.valueParser=s,f.getValue=t.getValue,f.subCondList=n,f}function M5(e){return Object(Sa["A"])(e)&&!Object(Sa["u"])(e)}var A5=function(){function e(e,t){this._cond=C5(e,t)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e}();function k5(e,t){return new A5(e,t)}var P5={type:"echarts:filter",transform:function(e){for(var t,r=e.upstream,a=k5(e.config,{valueGetterAttrMap:Object(Sa["f"])({dimension:!0}),prepareGetValue:function(e){var t="",a=e.dimension;Object(Sa["q"])(e,"dimension")||Zm(t);var n=r.getDimensionInfo(a);return n||Zm(t),{dimIdx:n.index}},getValue:function(e){return r.retrieveValueFromItem(t,e.dimIdx)}}),n=[],i=0,o=r.count();i<o;i++)t=r.getRawDataItem(i),a.evaluate()&&n.push(t);return{data:n}}};var N5={type:"echarts:sort",transform:function(e){var t=e.upstream,r=e.config,a="",n=Ol(r);n.length||Zm(a);var i=[];Object(Sa["k"])(n,(function(e){var r=e.dimension,n=e.order,o=e.parser,s=e.incomparable;if(null==r&&Zm(a),"asc"!==n&&"desc"!==n&&Zm(a),s&&"min"!==s&&"max"!==s){var l="";0,Zm(l)}if("asc"!==n&&"desc"!==n){var c="";0,Zm(c)}var u=t.getDimensionInfo(r);u||Zm(a);var p=o?Iv(o):null;o&&!p&&Zm(a),i.push({dimIdx:u.index,parser:p,comparator:new Av(n,s)})}));var o=t.sourceFormat;o!==_m&&o!==xm&&Zm(a);for(var s=[],l=0,c=t.count();l<c;l++)s.push(t.getRawDataItem(l));return s.sort((function(e,r){for(var a=0;a<i.length;a++){var n=i[a],o=t.retrieveValueFromItem(e,n.dimIdx),s=t.retrieveValueFromItem(r,n.dimIdx);n.parser&&(o=n.parser(o),s=n.parser(s));var l=n.comparator.evaluate(o,s);if(0!==l)return l}return 0})),{data:s}}};function E5(e){e.registerTransform(P5),e.registerTransform(N5)}var R5=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return xa(t,e),t.prototype.init=function(t,r,a){e.prototype.init.call(this,t,r,a),this._sourceManager=new ay(this),ny(this)},t.prototype.mergeOption=function(t,r){e.prototype.mergeOption.call(this,t,r),ny(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:Cm},t}(fm),L5=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return xa(t,e),t.type="dataset",t}(Gy);function j5(e){e.registerComponentModel(R5),e.registerComponentView(L5)}var F5=Lu.CMD;function V5(e,t){return Math.abs(e-t)<1e-5}function z5(e){var t,r,a,n,i,o=e.data,s=e.len(),l=[],c=0,u=0,p=0,d=0;function h(e,r){t&&t.length>2&&l.push(t),t=[e,r]}function f(e,r,a,n){V5(e,a)&&V5(r,n)||t.push(e,r,a,n,a,n)}function m(e,r,a,n,i,o){var s=Math.abs(r-e),l=4*Math.tan(s/4)/3,c=r<e?-1:1,u=Math.cos(e),p=Math.sin(e),d=Math.cos(r),h=Math.sin(r),f=u*i+a,m=p*o+n,g=d*i+a,v=h*o+n,y=i*l*c,b=o*l*c;t.push(f-y*p,m+b*u,g+y*h,v-b*d,g,v)}for(var g=0;g<s;){var v=o[g++],y=1===g;switch(y&&(c=o[g],u=o[g+1],p=c,d=u,v!==F5.L&&v!==F5.C&&v!==F5.Q||(t=[p,d])),v){case F5.M:c=p=o[g++],u=d=o[g++],h(p,d);break;case F5.L:r=o[g++],a=o[g++],f(c,u,r,a),c=r,u=a;break;case F5.C:t.push(o[g++],o[g++],o[g++],o[g++],c=o[g++],u=o[g++]);break;case F5.Q:r=o[g++],a=o[g++],n=o[g++],i=o[g++],t.push(c+2/3*(r-c),u+2/3*(a-u),n+2/3*(r-n),i+2/3*(a-i),n,i),c=n,u=i;break;case F5.A:var b=o[g++],_=o[g++],x=o[g++],w=o[g++],S=o[g++],D=o[g++]+S;g+=1;var C=!o[g++];r=Math.cos(S)*x+b,a=Math.sin(S)*w+_,y?(p=r,d=a,h(p,d)):f(c,u,r,a),c=Math.cos(D)*x+b,u=Math.sin(D)*w+_;for(var T=(C?-1:1)*Math.PI/2,I=S;C?I>D:I<D;I+=T){var O=C?Math.max(I+T,D):Math.min(I+T,D);m(I,O,b,_,x,w)}break;case F5.R:p=c=o[g++],d=u=o[g++],r=p+o[g++],a=d+o[g++],h(r,d),f(r,d,r,a),f(r,a,p,a),f(p,a,p,d),f(p,d,r,d);break;case F5.Z:t&&f(c,u,p,d),c=p,u=d;break}}return t&&t.length>2&&l.push(t),l}function B5(e,t,r,a,n,i,o,s,l,c){if(V5(e,r)&&V5(t,a)&&V5(n,o)&&V5(i,s))l.push(o,s);else{var u=2/c,p=u*u,d=o-e,h=s-t,f=Math.sqrt(d*d+h*h);d/=f,h/=f;var m=r-e,g=a-t,v=n-o,y=i-s,b=m*m+g*g,_=v*v+y*y;if(b<p&&_<p)l.push(o,s);else{var x=d*m+h*g,w=-d*v-h*y,S=b-x*x,D=_-w*w;if(S<p&&x>=0&&D<p&&w>=0)l.push(o,s);else{var C=[],T=[];$i(e,r,n,o,.5,C),$i(t,a,i,s,.5,T),B5(C[0],T[0],C[1],T[1],C[2],T[2],C[3],T[3],l,c),B5(C[4],T[4],C[5],T[5],C[6],T[6],C[7],T[7],l,c)}}}}function $5(e,t){var r=z5(e),a=[];t=t||1;for(var n=0;n<r.length;n++){var i=r[n],o=[],s=i[0],l=i[1];o.push(s,l);for(var c=2;c<i.length;){var u=i[c++],p=i[c++],d=i[c++],h=i[c++],f=i[c++],m=i[c++];B5(s,l,u,p,d,h,f,m,o,t),s=f,l=m}a.push(o)}return a}function G5(e,t,r){var a=e[t],n=e[1-t],i=Math.abs(a/n),o=Math.ceil(Math.sqrt(i*r)),s=Math.floor(r/o);0===s&&(s=1,o=r);for(var l=[],c=0;c<o;c++)l.push(s);var u=o*s,p=r-u;if(p>0)for(c=0;c<p;c++)l[c%o]+=1;return l}function U5(e,t,r){for(var a=e.r0,n=e.r,i=e.startAngle,o=e.endAngle,s=Math.abs(o-i),l=s*n,c=n-a,u=l>Math.abs(c),p=G5([l,c],u?0:1,t),d=(u?s:c)/p.length,h=0;h<p.length;h++)for(var f=(u?c:s)/p[h],m=0;m<p[h];m++){var g={};u?(g.startAngle=i+d*h,g.endAngle=i+d*(h+1),g.r0=a+f*m,g.r=a+f*(m+1)):(g.startAngle=i+f*m,g.endAngle=i+f*(m+1),g.r0=a+d*h,g.r=a+d*(h+1)),g.clockwise=e.clockwise,g.cx=e.cx,g.cy=e.cy,r.push(g)}}function W5(e,t,r){for(var a=e.width,n=e.height,i=a>n,o=G5([a,n],i?0:1,t),s=i?"width":"height",l=i?"height":"width",c=i?"x":"y",u=i?"y":"x",p=e[s]/o.length,d=0;d<o.length;d++)for(var h=e[l]/o[d],f=0;f<o[d];f++){var m={};m[c]=d*p,m[u]=f*h,m[s]=p,m[l]=h,m.x+=e.x,m.y+=e.y,r.push(m)}}function H5(e,t,r,a){return e*a-r*t}function q5(e,t,r,a,n,i,o,s){var l=r-e,c=a-t,u=o-n,p=s-i,d=H5(u,p,l,c);if(Math.abs(d)<1e-6)return null;var h=e-n,f=t-i,m=H5(h,f,u,p)/d;return m<0||m>1?null:new Ln(m*l+e,m*c+t)}function Y5(e,t,r){var a=new Ln;Ln.sub(a,r,t),a.normalize();var n=new Ln;Ln.sub(n,e,t);var i=n.dot(a);return i}function X5(e,t){var r=e[e.length-1];r&&r[0]===t[0]&&r[1]===t[1]||e.push(t)}function Z5(e,t,r){for(var a=e.length,n=[],i=0;i<a;i++){var o=e[i],s=e[(i+1)%a],l=q5(o[0],o[1],s[0],s[1],t.x,t.y,r.x,r.y);l&&n.push({projPt:Y5(l,t,r),pt:l,idx:i})}if(n.length<2)return[{points:e},{points:e}];n.sort((function(e,t){return e.projPt-t.projPt}));var c=n[0],u=n[n.length-1];if(u.idx<c.idx){var p=c;c=u,u=p}var d=[c.pt.x,c.pt.y],h=[u.pt.x,u.pt.y],f=[d],m=[h];for(i=c.idx+1;i<=u.idx;i++)X5(f,e[i].slice());X5(f,h),X5(f,d);for(i=u.idx+1;i<=c.idx+a;i++)X5(m,e[i%a].slice());return X5(m,d),X5(m,h),[{points:f},{points:m}]}function K5(e){var t=e.points,r=[],a=[];uu(t,r,a);var n=new Hn(r[0],r[1],a[0]-r[0],a[1]-r[1]),i=n.width,o=n.height,s=n.x,l=n.y,c=new Ln,u=new Ln;return i>o?(c.x=u.x=s+i/2,c.y=l,u.y=l+o):(c.y=u.y=l+o/2,c.x=s,u.x=s+i),Z5(t,c,u)}function J5(e,t,r,a){if(1===r)a.push(t);else{var n=Math.floor(r/2),i=e(t);J5(e,i[0],n,a),J5(e,i[1],r-n,a)}return a}function Q5(e,t){for(var r=[],a=0;a<t;a++)r.push(hb(e));return r}function e3(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function t3(e){for(var t=[],r=0;r<e.length;)t.push([e[r++],e[r++]]);return t}function r3(e,t){var r,a=[],n=e.shape;switch(e.type){case"rect":W5(n,t,a),r=Cp;break;case"sector":U5(n,t,a),r=jb;break;case"circle":U5({r0:0,r:n.r,startAngle:0,endAngle:2*Math.PI,cx:n.cx,cy:n.cy},t,a),r=jb;break;default:var i=e.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=Object(Sa["H"])($5(e.getUpdatedPathProxy(),o),(function(e){return t3(e)})),l=s.length;if(0===l)J5(K5,{points:s[0]},t,a);else if(l===t)for(var c=0;c<l;c++)a.push({points:s[c]});else{var u=0,p=Object(Sa["H"])(s,(function(e){var t=[],r=[];uu(e,t,r);var a=(r[1]-t[1])*(r[0]-t[0]);return u+=a,{poly:e,area:a}}));p.sort((function(e,t){return t.area-e.area}));var d=t;for(c=0;c<l;c++){var h=p[c];if(d<=0)break;var f=c===l-1?d:Math.ceil(h.area/u*t);f<0||(J5(K5,{points:h.poly},f,a),d-=f)}}r=Wb;break}if(!r)return Q5(e,t);var m=[];for(c=0;c<a.length;c++){var g=new r;g.setShape(a[c]),e3(e,g),m.push(g)}return m}function a3(e,t){var r=e.length,a=t.length;if(r===a)return[e,t];for(var n=[],i=[],o=r<a?e:t,s=Math.min(r,a),l=Math.abs(a-r)/6,c=(s-2)/6,u=Math.ceil(l/c)+1,p=[o[0],o[1]],d=l,h=2;h<s;){var f=o[h-2],m=o[h-1],g=o[h++],v=o[h++],y=o[h++],b=o[h++],_=o[h++],x=o[h++];if(d<=0)p.push(g,v,y,b,_,x);else{for(var w=Math.min(d,u-1)+1,S=1;S<=w;S++){var D=S/w;$i(f,g,y,_,D,n),$i(m,v,b,x,D,i),f=n[3],m=i[3],p.push(n[1],i[1],n[2],i[2],f,m),g=n[5],v=i[5],y=n[6],b=i[6]}d-=w-1}}return o===e?[p,t]:[e,p]}function n3(e,t){for(var r=e.length,a=e[r-2],n=e[r-1],i=[],o=0;o<t.length;)i[o++]=a,i[o++]=n;return i}function i3(e,t){for(var r,a,n,i=[],o=[],s=0;s<Math.max(e.length,t.length);s++){var l=e[s],c=t[s],u=void 0,p=void 0;l?c?(r=a3(l,c),u=r[0],p=r[1],a=u,n=p):(p=n3(n||l,l),u=l):(u=n3(a||c,c),p=c),i.push(u),o.push(p)}return[i,o]}function o3(e){for(var t=0,r=0,a=0,n=e.length,i=0,o=n-2;i<n;o=i,i+=2){var s=e[o],l=e[o+1],c=e[i],u=e[i+1],p=s*u-c*l;t+=p,r+=(s+c)*p,a+=(l+u)*p}return 0===t?[e[0]||0,e[1]||0]:[r/t/3,a/t/3,t]}function s3(e,t,r,a){for(var n=(e.length-2)/6,i=1/0,o=0,s=e.length,l=s-2,c=0;c<n;c++){for(var u=6*c,p=0,d=0;d<s;d+=2){var h=0===d?u:(u+d-2)%l+2,f=e[h]-r[0],m=e[h+1]-r[1],g=t[d]-a[0],v=t[d+1]-a[1],y=g-f,b=v-m;p+=y*y+b*b}p<i&&(i=p,o=c)}return o}function l3(e){for(var t=[],r=e.length,a=0;a<r;a+=2)t[a]=e[r-a-2],t[a+1]=e[r-a-1];return t}function c3(e,t,r,a){for(var n,i=[],o=0;o<e.length;o++){var s=e[o],l=t[o],c=o3(s),u=o3(l);null==n&&(n=c[2]<0!==u[2]<0);var p=[],d=[],h=0,f=1/0,m=[],g=s.length;n&&(s=l3(s));for(var v=6*s3(s,l,c,u),y=g-2,b=0;b<y;b+=2){var _=(v+b)%y+2;p[b+2]=s[_]-c[0],p[b+3]=s[_+1]-c[1]}if(p[0]=s[v]-c[0],p[1]=s[v+1]-c[1],r>0)for(var x=a/r,w=-a/2;w<=a/2;w+=x){var S=Math.sin(w),D=Math.cos(w),C=0;for(b=0;b<s.length;b+=2){var T=p[b],I=p[b+1],O=l[b]-u[0],M=l[b+1]-u[1],A=O*D-M*S,k=O*S+M*D;m[b]=A,m[b+1]=k;var P=A-T,N=k-I;C+=P*P+N*N}if(C<f){f=C,h=w;for(var E=0;E<m.length;E++)d[E]=m[E]}}else for(var R=0;R<g;R+=2)d[R]=l[R]-u[0],d[R+1]=l[R+1]-u[1];i.push({from:p,to:d,fromCp:c,toCp:u,rotation:-h})}return i}function u3(e){return e.__isCombineMorphing}var p3="__mOriginal_";function d3(e,t,r){var a=p3+t,n=e[a]||e[t];e[a]||(e[a]=e[t]);var i=r.replace,o=r.after,s=r.before;e[t]=function(){var e,t=arguments;return s&&s.apply(this,t),e=i?i.apply(this,t):n.apply(this,t),o&&o.apply(this,t),e}}function h3(e,t){var r=p3+t;e[r]&&(e[t]=e[r],e[r]=null)}function f3(e,t){for(var r=0;r<e.length;r++)for(var a=e[r],n=0;n<a.length;){var i=a[n],o=a[n+1];a[n++]=t[0]*i+t[2]*o+t[4],a[n++]=t[1]*i+t[3]*o+t[5]}}function m3(e,t){var r=e.getUpdatedPathProxy(),a=t.getUpdatedPathProxy(),n=i3(z5(r),z5(a)),i=n[0],o=n[1],s=e.getComputedTransform(),l=t.getComputedTransform();function c(){this.transform=null}s&&f3(i,s),l&&f3(o,l),d3(t,"updateTransform",{replace:c}),t.transform=null;var u=c3(i,o,10,Math.PI),p=[];d3(t,"buildPath",{replace:function(e){for(var r=t.__morphT,a=1-r,n=[],i=0;i<u.length;i++){var o=u[i],s=o.from,l=o.to,c=o.rotation*r,d=o.fromCp,h=o.toCp,f=Math.sin(c),m=Math.cos(c);Ba(n,d,h,r);for(var g=0;g<s.length;g+=2){var v=s[g],y=s[g+1],b=l[g],_=l[g+1],x=v*a+b*r,w=y*a+_*r;p[g]=x*m-w*f+n[0],p[g+1]=x*f+w*m+n[1]}var S=p[0],D=p[1];e.moveTo(S,D);for(g=2;g<s.length;){b=p[g++],_=p[g++];var C=p[g++],T=p[g++],I=p[g++],O=p[g++];S===b&&D===_&&C===I&&T===O?e.lineTo(I,O):e.bezierCurveTo(b,_,C,T,I,O),S=I,D=O}}}})}function g3(e,t,r){if(!e||!t)return t;var a=r.done,n=r.during;function i(){h3(t,"buildPath"),h3(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return m3(e,t),t.__morphT=0,t.animateTo({__morphT:1},Object(Sa["i"])({during:function(e){t.dirtyShape(),n&&n(e)},done:function(){i(),a&&a()}},r)),t}function v3(e,t,r,a,n,i){var o=16;e=n===r?0:Math.round(32767*(e-r)/(n-r)),t=i===a?0:Math.round(32767*(t-a)/(i-a));for(var s,l=0,c=(1<<o)/2;c>0;c/=2){var u=0,p=0;(e&c)>0&&(u=1),(t&c)>0&&(p=1),l+=c*c*(3*u^p),0===p&&(1===u&&(e=c-1-e,t=c-1-t),s=e,e=t,t=s)}return l}function y3(e){var t=1/0,r=1/0,a=-1/0,n=-1/0,i=Object(Sa["H"])(e,(function(e){var i=e.getBoundingRect(),o=e.getComputedTransform(),s=i.x+i.width/2+(o?o[4]:0),l=i.y+i.height/2+(o?o[5]:0);return t=Math.min(s,t),r=Math.min(l,r),a=Math.max(s,a),n=Math.max(l,n),[s,l]})),o=Object(Sa["H"])(i,(function(i,o){return{cp:i,z:v3(i[0],i[1],t,r,a,n),path:e[o]}}));return o.sort((function(e,t){return e.z-t.z})).map((function(e){return e.path}))}function b3(e){return r3(e.path,e.count)}function _3(){return{fromIndividuals:[],toIndividuals:[],count:0}}function x3(e,t,r){var a=[];function n(e){for(var t=0;t<e.length;t++){var r=e[t];u3(r)?n(r.childrenRef()):r instanceof lp&&a.push(r)}}n(e);var i=a.length;if(!i)return _3();var o=r.dividePath||b3,s=o({path:t,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),_3();a=y3(a),s=y3(s);for(var l=r.done,c=r.during,u=r.individualDelay,p=new fs,d=0;d<i;d++){var h=a[d],f=s[d];f.parent=t,f.copyTransform(p),u||m3(h,f)}function m(e){for(var t=0;t<s.length;t++)s[t].addSelfToZr(e)}function g(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,h3(t,"addSelfToZr"),h3(t,"removeSelfFromZr")}t.__isCombineMorphing=!0,t.childrenRef=function(){return s},d3(t,"addSelfToZr",{after:function(e){m(e)}}),d3(t,"removeSelfFromZr",{after:function(e){for(var t=0;t<s.length;t++)s[t].removeSelfFromZr(e)}});var v=s.length;if(u){var y=v,b=function(){y--,0===y&&(g(),l&&l())};for(d=0;d<v;d++){var _=u?Object(Sa["i"])({delay:(r.delay||0)+u(d,v,a[d],s[d]),done:b},r):r;g3(a[d],s[d],_)}}else t.__morphT=0,t.animateTo({__morphT:1},Object(Sa["i"])({during:function(e){for(var r=0;r<v;r++){var a=s[r];a.__morphT=t.__morphT,a.dirtyShape()}c&&c(e)},done:function(){g();for(var t=0;t<e.length;t++)h3(e[t],"updateTransform");l&&l()}},r));return t.__zr&&m(t.__zr),{fromIndividuals:a,toIndividuals:s,count:v}}function w3(e,t,r){var a=t.length,n=[],i=r.dividePath||b3;function o(e){for(var t=0;t<e.length;t++){var r=e[t];u3(r)?o(r.childrenRef()):r instanceof lp&&n.push(r)}}if(u3(e)){o(e.childrenRef());var s=n.length;if(s<a)for(var l=0,c=s;c<a;c++)n.push(hb(n[l++%s]));n.length=a}else{n=i({path:e,count:a});var u=e.getComputedTransform();for(c=0;c<n.length;c++)n[c].setLocalTransform(u);if(n.length!==a)return console.error("Invalid morphing: unmatched splitted path"),_3()}n=y3(n),t=y3(t);var p=r.individualDelay;for(c=0;c<a;c++){var d=p?Object(Sa["i"])({delay:(r.delay||0)+p(c,a,n[c],t[c])},r):r;g3(n[c],t[c],d)}return{fromIndividuals:n,toIndividuals:t,count:t.length}}function S3(e){return Object(Sa["t"])(e[0])}function D3(e,t){for(var r=[],a=e.length,n=0;n<a;n++)r.push({one:e[n],many:[]});for(n=0;n<t.length;n++){var i=t[n].length,o=void 0;for(o=0;o<i;o++)r[o%a].many.push(t[n][o])}var s=0;for(n=a-1;n>=0;n--)if(!r[n].many.length){var l=r[s].many;if(l.length<=1){if(!s)return r;s=0}i=l.length;var c=Math.ceil(i/2);r[n].many=l.slice(c,i),r[s].many=l.slice(0,c),s++}return r}var C3={clone:function(e){for(var t=[],r=1-Math.pow(1-e.path.style.opacity,1/e.count),a=0;a<e.count;a++){var n=hb(e.path);n.setStyle("opacity",r),t.push(n)}return t},split:null};function T3(e,t,r,a,n,i){if(e.length&&t.length){var o=ih("update",a,n);if(o&&o.duration>0){var s,l,c=a.getModel("universalTransition").get("delay"),u=Object.assign({setToFinal:!0},o);S3(e)&&(s=e,l=t),S3(t)&&(s=t,l=e);for(var p=s?s===e:e.length>t.length,d=s?D3(l,s):D3(p?t:e,[p?e:t]),h=0,f=0;f<d.length;f++)h+=d[f].many.length;var m=0;for(f=0;f<d.length;f++)g(d[f],p,m,h),m+=d[f].many.length}}function g(e,t,a,n,o){var s=e.many,l=e.one;if(1!==s.length||o)for(var p=Object(Sa["i"])({dividePath:C3[r],individualDelay:c&&function(e,t,r,i){return c(e+a,n)}},u),d=t?x3(s,l,p):w3(l,s,p),h=d.fromIndividuals,f=d.toIndividuals,m=h.length,v=0;v<m;v++){_=c?Object(Sa["i"])({delay:c(v,m)},u):u;i(h[v],f[v],t?s[v]:e.one,t?e.one:s[v],_)}else{var y=t?s[0]:l,b=t?l:s[0];if(u3(y))g({many:[y],one:b},!0,a,n,!0);else{var _=c?Object(Sa["i"])({delay:c(a,n)},u):u;g3(y,b,_),i(y,b,y,b,_)}}}}function I3(e){if(!e)return[];if(Object(Sa["t"])(e)){for(var t=[],r=0;r<e.length;r++)t.push(I3(e[r]));return t}var a=[];return e.traverse((function(e){e instanceof lp&&!e.disableMorphing&&!e.invisible&&!e.ignore&&a.push(e)})),a}var O3=1e4,M3=0,A3=1,k3=2,P3=Zl();function N3(e,t){for(var r=e.dimensions,a=0;a<r.length;a++){var n=e.getDimensionInfo(r[a]);if(n&&0===n.otherDims[t])return r[a]}}function E3(e,t,r){var a=e.getDimensionInfo(r),n=a&&a.ordinalMeta;if(a){var i=e.get(a.name,t);return n&&n.categories[i]||i+""}}function R3(e,t,r,a){var n=a?"itemChildGroupId":"itemGroupId",i=N3(e,n);if(i){var o=E3(e,t,i);return o}var s=e.getRawDataItem(t),l=a?"childGroupId":"groupId";return s&&s[l]?s[l]+"":a?void 0:r||e.getId(t)}function L3(e){var t=[];return Object(Sa["k"])(e,(function(e){var r=e.data,a=e.dataGroupId;if(!(r.count()>O3))for(var n=r.getIndices(),i=0;i<n.length;i++)t.push({data:r,groupId:R3(r,i,a,!1),childGroupId:R3(r,i,a,!0),divide:e.divide,dataIndex:i})})),t}function j3(e,t,r){e.traverse((function(e){e instanceof lp&&lh(e,{style:{opacity:0}},t,{dataIndex:r,isFrom:!0})}))}function F3(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function V3(e){e.stopAnimation(),e.isGroup&&e.traverse((function(e){e.stopAnimation()}))}function z3(e,t,r){var a=ih("update",r,t);a&&e.traverse((function(e){if(e instanceof tu){var t=fh(e);t&&e.animateFrom({style:t},a)}}))}function B3(e,t){var r=e.length;if(r!==t.length)return!1;for(var a=0;a<r;a++){var n=e[a],i=t[a];if(n.data.getId(n.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function $3(e,t,r){var a=L3(e),n=L3(t);function i(e,t,r,a,n){(r||e)&&t.animateFrom({style:r&&r!==e?Object(Sa["m"])(Object(Sa["m"])({},r.style),e.style):e.style},n)}var o=!1,s=M3,l=Object(Sa["f"])(),c=Object(Sa["f"])();a.forEach((function(e){e.groupId&&l.set(e.groupId,!0),e.childGroupId&&c.set(e.childGroupId,!0)}));for(var u=0;u<n.length;u++){var p=n[u].groupId;if(c.get(p)){s=A3;break}var d=n[u].childGroupId;if(d&&l.get(d)){s=k3;break}}function h(e,t){return function(r){var a=r.data,n=r.dataIndex;return t?a.getId(n):e?s===A3?r.childGroupId:r.groupId:s===k3?r.childGroupId:r.groupId}}var f=B3(a,n),m={};if(!f)for(u=0;u<n.length;u++){var g=n[u],v=g.data.getItemGraphicEl(g.dataIndex);v&&(m[v.id]=!0)}function y(e,t){var r=a[t],s=n[e],l=s.data.hostModel,c=r.data.getItemGraphicEl(r.dataIndex),u=s.data.getItemGraphicEl(s.dataIndex);c!==u?c&&m[c.id]||u&&(V3(u),c?(V3(c),F3(c),o=!0,T3(I3(c),I3(u),s.divide,l,e,i)):j3(u,l,e)):u&&z3(u,s.dataIndex,l)}new RI(a,n,h(!0,f),h(!1,f),null,"multiple").update(y).updateManyToOne((function(e,t){var r=n[e],s=r.data,l=s.hostModel,c=s.getItemGraphicEl(r.dataIndex),u=Object(Sa["n"])(Object(Sa["H"])(t,(function(e){return a[e].data.getItemGraphicEl(a[e].dataIndex)})),(function(e){return e&&e!==c&&!m[e.id]}));c&&(V3(c),u.length?(Object(Sa["k"])(u,(function(e){V3(e),F3(e)})),o=!0,T3(I3(u),I3(c),r.divide,l,e,i)):j3(c,l,r.dataIndex))})).updateOneToMany((function(e,t){var r=a[t],s=r.data.getItemGraphicEl(r.dataIndex);if(!s||!m[s.id]){var l=Object(Sa["n"])(Object(Sa["H"])(e,(function(e){return n[e].data.getItemGraphicEl(n[e].dataIndex)})),(function(e){return e&&e!==s})),c=n[e[0]].data.hostModel;l.length&&(Object(Sa["k"])(l,(function(e){return V3(e)})),s?(V3(s),F3(s),o=!0,T3(I3(s),I3(l),r.divide,c,e[0],i)):Object(Sa["k"])(l,(function(t){return j3(t,c,e[0])})))}})).updateManyToMany((function(e,t){new RI(t,e,(function(e){return a[e].data.getId(a[e].dataIndex)}),(function(e){return n[e].data.getId(n[e].dataIndex)})).update((function(r,a){y(e[r],t[a])})).execute()})).execute(),o&&Object(Sa["k"])(t,(function(e){var t=e.data,a=t.hostModel,n=a&&r.getViewOfSeriesModel(a),i=ih("update",a,0);n&&a.isAnimationEnabled()&&i&&i.duration>0&&n.group.traverse((function(e){e instanceof lp&&!e.animators.length&&e.animateFrom({style:{opacity:0}},i)}))}))}function G3(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function U3(e){return Object(Sa["t"])(e)?e.sort().join(","):e}function W3(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function H3(e,t){var r=Object(Sa["f"])(),a=Object(Sa["f"])(),n=Object(Sa["f"])();return Object(Sa["k"])(e.oldSeries,(function(t,r){var i=e.oldDataGroupIds[r],o=e.oldData[r],s=G3(t),l=U3(s);a.set(l,{dataGroupId:i,data:o}),Object(Sa["t"])(s)&&Object(Sa["k"])(s,(function(e){n.set(e,{key:l,dataGroupId:i,data:o})}))})),Object(Sa["k"])(t.updatedSeries,(function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.get("dataGroupId"),i=e.getData(),o=G3(e),s=U3(o),l=a.get(s);if(l)r.set(s,{oldSeries:[{dataGroupId:l.dataGroupId,divide:W3(l.data),data:l.data}],newSeries:[{dataGroupId:t,divide:W3(i),data:i}]});else if(Object(Sa["t"])(o)){0;var c=[];Object(Sa["k"])(o,(function(e){var t=a.get(e);t.data&&c.push({dataGroupId:t.dataGroupId,divide:W3(t.data),data:t.data})})),c.length&&r.set(s,{oldSeries:c,newSeries:[{dataGroupId:t,data:i,divide:W3(i)}]})}else{var u=n.get(o);if(u){var p=r.get(u.key);p||(p={oldSeries:[{dataGroupId:u.dataGroupId,data:u.data,divide:W3(u.data)}],newSeries:[]},r.set(u.key,p)),p.newSeries.push({dataGroupId:t,data:i,divide:W3(i)})}}}})),r}function q3(e,t){for(var r=0;r<e.length;r++){var a=null!=t.seriesIndex&&t.seriesIndex===e[r].seriesIndex||null!=t.seriesId&&t.seriesId===e[r].id;if(a)return r}}function Y3(e,t,r,a){var n=[],i=[];Object(Sa["k"])(Ol(e.from),(function(e){var r=q3(t.oldSeries,e);r>=0&&n.push({dataGroupId:t.oldDataGroupIds[r],data:t.oldData[r],divide:W3(t.oldData[r]),groupIdDim:e.dimension})})),Object(Sa["k"])(Ol(e.to),(function(e){var a=q3(r.updatedSeries,e);if(a>=0){var n=r.updatedSeries[a].getData();i.push({dataGroupId:t.oldDataGroupIds[a],data:n,divide:W3(n),groupIdDim:e.dimension})}})),n.length>0&&i.length>0&&$3(n,i,a)}function X3(e){e.registerUpdateLifecycle("series:beforeupdate",(function(e,t,r){Object(Sa["k"])(Ol(r.seriesTransition),(function(e){Object(Sa["k"])(Ol(e.to),(function(e){for(var t=r.updatedSeries,a=0;a<t.length;a++)(null!=e.seriesIndex&&e.seriesIndex===t[a].seriesIndex||null!=e.seriesId&&e.seriesId===t[a].id)&&(t[a][ky]=!0)}))}))})),e.registerUpdateLifecycle("series:transition",(function(e,t,r){var a=P3(t);if(a.oldSeries&&r.updatedSeries&&r.optionChanged){var n=r.seriesTransition;if(n)Object(Sa["k"])(Ol(n),(function(e){Y3(e,a,r,t)}));else{var i=H3(a,r);Object(Sa["k"])(i.keys(),(function(e){var r=i.get(e);$3(r.oldSeries,r.newSeries,t)}))}Object(Sa["k"])(r.updatedSeries,(function(e){e[ky]&&(e[ky]=!1)}))}for(var o=e.getSeries(),s=a.oldSeries=[],l=a.oldDataGroupIds=[],c=a.oldData=[],u=0;u<o.length;u++){var p=o[u].getData();p.count()<O3&&(s.push(o[u]),l.push(o[u].get("dataGroupId")),c.push(p))}}))}JD([KC]),JD([kI]),JD([kM,MA,QA,eE,xE,RL,Nj,sV,Tz,Lz,qz,J$,kG,XG,SU,kU,eW,pW,BW,KW,gH,Hq]),JD(UY),JD(LX),JD(EL),JD(lZ),JD(K$),JD(yZ),JD(LZ),JD(_J),JD(rQ),JD(GY),JD(LQ),JD(VQ),JD(l0),JD(E0),JD(H0),JD(i1),JD(E1),JD(m2),JD(K1),JD(f2),JD(p5),JD(a5),JD(u5),JD(v5),JD(E5),JD(j5),JD(X3),JD(VC);var Z3=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"model-query-tab tab-content"},[r("div",{staticClass:"page-search-panel check-data-panel"},[r("div",{staticClass:"panel-header"},[r("div",{staticClass:"header-right"},[r("span",{staticClass:"favorites-label"},[e._v("我的常用:")]),r("el-select",{staticClass:"favorites-select",attrs:{placeholder:"请选择",clearable:""},on:{change:e.handleFavoriteChange},model:{value:e.favoritesValue,callback:function(t){e.favoritesValue=t},expression:"favoritesValue"}},e._l(e.favoritesOptions,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),r("el-button",{staticClass:"update-favorite-button",on:{click:e.handleUpdateFavorite}},[e._v("更新常用")]),r("el-button",{staticClass:"add-favorite-button",attrs:{type:"primary"},on:{click:e.handleAddFavorite}},[e._v("新增常用")]),r("el-button",{staticClass:"hidden-params-button",on:{click:e.handleShowHiddenParams}},[e._v(" 已隐藏参数 "),e.hiddenParams.length>0?r("span",{staticClass:"hidden-count"},[e._v("("+e._s(e.hiddenParams.length)+")")]):e._e()]),r("el-button",{staticClass:"download-comparison-data-button",on:{click:e.handleDownloadComparisonData}},[e._v(" 下载对比数据 ")])],1)])]),r("div",{staticClass:"model-query-content"},[r("div",{staticClass:"left-param-panel"},[r("div",{staticClass:"tree-search-header"},[r("el-radio-group",{staticClass:"search-mode-switch",attrs:{size:"mini"},model:{value:e.treeSearchMode,callback:function(t){e.treeSearchMode=t},expression:"treeSearchMode"}},[r("el-radio-button",{attrs:{label:"subsystem"}},[e._v("子系统")]),r("el-radio-button",{attrs:{label:"parts"}},[e._v("零部件名称")])],1)],1),r("el-input",{staticClass:"tree-search",attrs:{size:"small",placeholder:"subsystem"===e.treeSearchMode?"请输入子系统名称":"请输入零部件名称",clearable:""},model:{value:e.treeFilterText,callback:function(t){e.treeFilterText=t},expression:"treeFilterText"}}),r("el-tree",{ref:"paramTree",attrs:{data:e.treeData,"node-key":"id","show-checkbox":"","checked-keys":e.checkedKeys,"default-expanded-keys":[],props:{children:"children",label:"label"},"filter-node-method":e.filterTreeNode},on:{check:e.handleTreeCheck},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.data;return r("span",{staticClass:"custom-tree-node"},[r("span",[e._v(e._s(a.label))]),a.tip?r("span",{staticClass:"red-tip"},[e._v(e._s(a.tip))]):e._e()])}}])})],1),r("div",{staticClass:"right-comparison-panel"},[r("div",{staticClass:"comparison-table-wrapper"},[r("table",{staticClass:"comparison-table"},[r("thead",[r("tr",[r("th",{staticClass:"subsystem-column"},[e._v("子系统名称")]),r("th",{staticClass:"parts-column"},[e._v("零部件名称")]),r("th",{staticClass:"param-column"},[e._v("参数名称")]),e._l(e.comparisonModels,(function(t,a){return r("th",{key:a,staticClass:"model-column"},[r("div",{staticClass:"model-header"},[t.name?r("div",{staticClass:"model-name"},[e._v(e._s(t.name)+" V"+e._s(t.parameterVersion))]):e._e(),t.name?r("i",{staticClass:"el-icon-close model-remove",on:{click:function(t){return e.handleRemoveModel(a)}}}):r("div",{staticClass:"add-model-placeholder",on:{click:e.handleAddModel}},[r("i",{staticClass:"el-icon-plus",staticStyle:{"font-size":"16px","font-weight":"bold"}}),r("span",[e._v("添加机型")])])])])})),r("th",{staticClass:"add-column"},[r("div",{staticClass:"add-model-placeholder",on:{click:e.handleAddModel}},[r("i",{staticClass:"el-icon-plus",staticStyle:{"font-size":"16px","font-weight":"bold"}}),r("span",[e._v("添加机型")])])])],2)]),r("tbody",e._l(e.displayParams,(function(t,a){return r("tr",{key:a},[r("td",{staticClass:"subsystem-column"},[e._v(e._s(t.subsystemName))]),r("td",{staticClass:"parts-column"},[e._v(e._s(t.displayPartsName))]),r("td",{staticClass:"param-column"},[r("span",{staticClass:"param-name"},[e._v(e._s(e.getParamDisplayName(t)))]),r("i",{staticClass:"el-icon-remove-outline param-config-icon",on:{click:function(r){return r.stopPropagation(),e.handleHideParam(t)}}})]),e._l(e.comparisonModels,(function(a,n){return r("td",{key:n,staticClass:"model-column"},[e._v(" "+e._s(e.getParamValue(a,t))+" ")])})),r("td",{staticClass:"add-column"})],2)})),0)])])])]),r("el-dialog",{attrs:{title:"选择机型",visible:e.addModelDialogVisible,width:"800px","append-to-body":""},on:{"update:visible":function(t){e.addModelDialogVisible=t},close:e.handleAddModelDialogClose}},[r("div",{staticClass:"model-select-dialog"},[r("el-input",{staticClass:"model-search-input",attrs:{placeholder:"请输入产品型号,状态代号/产品编号,平台,系列搜索","prefix-icon":"el-icon-search",clearable:""},model:{value:e.modelSearchText,callback:function(t){e.modelSearchText=t},expression:"modelSearchText"}}),r("div",{staticClass:"model-list-wrapper"},[r("el-table",{ref:"modelTable",attrs:{data:e.filteredModelList,height:"400"},on:{"selection-change":e.handleModelSelectionChange}},[r("el-table-column",{attrs:{type:"selection",width:"55"}}),r("el-table-column",{attrs:{prop:"modelName",label:"产品型号","min-width":"150"}}),r("el-table-column",{attrs:{prop:"parameterVersion",label:"版本","min-width":"70"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v("V"+e._s(t.row.parameterVersion))])]}}])}),r("el-table-column",{attrs:{prop:"productNumber",label:"状态代号/产品编号","min-width":"100"}}),r("el-table-column",{attrs:{prop:"platform",label:"平台","min-width":"70"}}),r("el-table-column",{attrs:{prop:"series",label:"系列","min-width":"70"}})],1)],1)],1),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleAddModelDialogClose}},[e._v("取消")]),r("el-button",{attrs:{type:"primary",loading:e.loadingModelDetail},on:{click:e.handleConfirmAddModel}},[e._v(" 确定 ")])],1)]),r("el-dialog",{attrs:{title:"已隐藏参数",visible:e.hiddenParamsDialogVisible,width:"800px","append-to-body":""},on:{"update:visible":function(t){e.hiddenParamsDialogVisible=t},close:e.handleHiddenParamsDialogClose}},[r("div",{staticClass:"hidden-params-dialog-content"},[0===e.hiddenParamsList.length?r("div",{staticClass:"empty-hint"},[e._v(" 暂无隐藏的参数 ")]):[r("div",{staticClass:"hidden-params-header"},[r("el-button",{attrs:{size:"small"},on:{click:e.handleRestoreAll}},[e._v(" 全部恢复 ")]),r("el-button",{attrs:{size:"small",disabled:0===e.selectedParamsToRestore.length},on:{click:e.handleRestoreSelected}},[e._v(" 恢复已选择 ")])],1),r("el-table",{ref:"hiddenParamsTable",staticStyle:{width:"100%"},attrs:{data:e.hiddenParamsList,border:"",height:"400"},on:{"selection-change":e.handleHiddenParamsSelectionChange}},[r("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),r("el-table-column",{attrs:{prop:"subsystemName",label:"子系统","min-width":"150"}}),r("el-table-column",{attrs:{prop:"parameterName",label:"参数名称","min-width":"200","show-overflow-tooltip":""}})],1)]],2),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleHiddenParamsDialogClose}},[e._v("取消")]),r("el-button",{attrs:{type:"primary",disabled:0===e.selectedParamsToRestore.length},on:{click:e.handleConfirmRestoreParams}},[e._v(" 确定恢复("+e._s(e.selectedParamsToRestore.length)+") ")])],1)]),r("el-dialog",{attrs:{title:"新增常用",visible:e.addFavoriteDialogVisible,width:"500px","append-to-body":""},on:{"update:visible":function(t){e.addFavoriteDialogVisible=t},close:e.handleAddFavoriteDialogClose}},[r("el-form",{ref:"addFavoriteForm",attrs:{model:e.addFavoriteFormData,rules:e.addFavoriteFormRules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"常用名称",prop:"commonName"}},[r("el-input",{attrs:{placeholder:"请输入常用名称",maxlength:"50","show-word-limit":""},model:{value:e.addFavoriteFormData.commonName,callback:function(t){e.$set(e.addFavoriteFormData,"commonName",t)},expression:"addFavoriteFormData.commonName"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleAddFavoriteDialogClose}},[e._v("取消")]),r("el-button",{attrs:{type:"primary",loading:e.savingFavorite},on:{click:e.handleConfirmAddFavorite}},[e._v(" 确定 ")])],1)],1)],1)},K3=[];function J3(e){return t4(e)||e4(e)||s4(e)||Q3()}function Q3(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function e4(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function t4(e){if(Array.isArray(e))return l4(e)}function r4(e,t){return i4(e)||n4(e,t)||s4(e,t)||a4()}function a4(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n4(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(a=i.call(r)).done)&&(s.push(a.value),s.length!==t);l=!0);}catch(u){c=!0,n=u}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw n}}return s}}function i4(e){if(Array.isArray(e))return e}function o4(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s4(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function s4(e,t){if(e){if("string"===typeof e)return l4(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l4(e,t):void 0}}function l4(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function c4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function u4(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c4(Object(r),!0).forEach((function(t){p4(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c4(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p4(e,t,r){return t=d4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d4(e){var t=h4(e,"string");return"symbol"===f4(t)?t:String(t)}function h4(e,t){if("object"!==f4(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==f4(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f4(e){return f4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f4(e)}var m4={name:"ModelQuery",data:function(){return{favoritesValue:"",favoritesOptions:[],currentCommonConfig:null,allTreeData:[],allNodeMap:{},treeFilterText:"",treeSearchMode:"subsystem",checkedKeys:[],defaultExpandedKeys:[],treeData:[],nodeMap:{},comparisonModels:[],loadingModels:!1,addModelDialogVisible:!1,modelList:[],selectedModels:[],modelSearchText:"",loadingModelDetail:!1,allModelDetailData:{},allModelRawData:{},hiddenParams:[],hiddenParamsDialogVisible:!1,selectedParamsToRestore:[],addFavoriteDialogVisible:!1,addFavoriteFormData:{commonName:""},addFavoriteFormRules:{commonName:[{required:!0,message:"请输入常用名称",trigger:"blur"},{max:50,message:"常用名称不能超过50个字符",trigger:"blur"}]},savingFavorite:!1,allParametersData:{},savedAllParametersData:{},useCommonFilter:!1}},computed:{displayParams:function(){var e=this,t=new Map,r=this.getSelectedSubsystemsAndTypes(),a=r.subsystemNames,n=r.parameterTypes,i=r.subsystemTypes;if(0===a.length)return[];Object.keys(this.allParametersData).forEach((function(r){var o=a.includes(r);if(o){var s=e.allParametersData[r];Array.isArray(s)&&s.forEach((function(a){var o=a.parameterName||"",s=a.parameterId||"",l=a.partsName||"",c=l;if(o){var u=!1,p=e.checkedKeys.some((function(t){var a=e.nodeMap[t];return a&&a.isParent&&a.label===r&&!e.checkedKeys.some((function(t){var a=e.nodeMap[t];return a&&!a.isParent&&a.parentLabel===r}))}));if(p){var d=e.treeData.some((function(e){return!(e.label!==r||!e.children)&&e.children.some((function(e){return e.label===l}))}));if(d){var h=e.checkedKeys.some((function(t){var a=e.nodeMap[t];return a&&!a.isParent&&a.parentLabel===r&&a.label===l}));u=h}else u=!0}else u=!1,n.includes(l)&&(u=!0),u||(u=i.includes("".concat(r,"-").concat(l)));if(u){var f="".concat(r,"-").concat(o);t.has(f)||t.set(f,{parameterName:o,subsystemName:r,parameterId:s,partsName:l,displayPartsName:c})}}}))}}));var o=new Map;this.treeData&&Array.isArray(this.treeData)&&this.treeData.forEach((function(e,t){e.label&&o.set(e.label,t)}));var s=Array.from(t.values()).sort((function(e,t){if(e.subsystemName!==t.subsystemName){var r=o.has(e.subsystemName)?o.get(e.subsystemName):9999,a=o.has(t.subsystemName)?o.get(t.subsystemName):9999;return r!==a?r-a:e.subsystemName.localeCompare(t.subsystemName)}return e.parameterName.localeCompare(t.parameterName)}));return s.filter((function(t){var r="".concat(t.subsystemName,"-").concat(t.parameterName);return!e.hiddenParams.includes(r)}))},hiddenParamsList:function(){var e=this,t=[],r=new Set(this.hiddenParams);return Object.keys(this.allParametersData).forEach((function(a){var n=e.allParametersData[a];Array.isArray(n)&&n.forEach((function(e){var n=e.parameterName||"",i="".concat(a,"-").concat(n);if(r.has(i)){var o=t.some((function(e){return e.key===i}));o||t.push({subsystemName:a,parameterName:n,key:i})}}))})),t.sort((function(e,t){return e.subsystemName!==t.subsystemName?e.subsystemName.localeCompare(t.subsystemName):e.parameterName.localeCompare(t.parameterName)}))},filteredModelList:function(){var e=new Set(this.comparisonModels.map((function(e){var t=e.parameterVersion||1;return"".concat(e.id,"_").concat(t)}))),t=this.modelList.filter((function(t){var r=t.id||t.rowId||t.engineModelID,a=t.parameterVersion||1,n="".concat(r,"_").concat(a);return!e.has(n)}));if(this.modelSearchText){var r=this.modelSearchText.toLowerCase();t=t.filter((function(e){var t=(e.modelName||e.productFullName||"").toLowerCase(),a=(e.productNumber||"").toLowerCase(),n=(e.platform||"").toLowerCase(),i=(e.series||"").toLowerCase();return t.includes(r)||a.includes(r)||n.includes(r)||i.includes(r)}))}return t}},watch:{treeFilterText:function(e){this.$refs.paramTree&&this.$refs.paramTree.filter(e)},treeSearchMode:function(){this.$refs.paramTree&&this.treeFilterText&&this.$refs.paramTree.filter(this.treeFilterText)}},mounted:function(){this.loadTreeData()},methods:{filterTreeNode:function(e,t){if(!e)return!0;var r=e.toLowerCase(),a=this.nodeMap[t.id];if(!a)return(t.label||"").toLowerCase().includes(r);var n=(t.label||"").toLowerCase(),i=null===a.parentLabel,o=null!==a.parentLabel;if("subsystem"===this.treeSearchMode){if(i)return n.includes(r);if(o){var s=(a.parentLabel||"").toLowerCase();return s.includes(r)}return!1}return o?n.includes(r):!!(i&&t.children&&Array.isArray(t.children))&&t.children.some((function(e){var t=(e.label||"").toLowerCase();return t.includes(r)}))},handleTreeCheck:function(e,t){this.checkedKeys=t.checkedKeys,this.reloadModelDetailsForCheckedNodes()},getParamValue:function(e,t){if(!e||!e.id||!t)return"-";var r=e.parameterVersion||1,a="".concat(e.id,"_").concat(r);if("整车参数"===t.subsystemName){var n={"产品型号":"modelName","状态代号":"productNumber","板块":"plate","平台":"platform","系列":"series","细节市场":"marketSegment","项目名称":"projectName","项目编号":"projectNumber","标准参数":"parameterNum"},i=n[t.parameterName];if(i){var o=this.allModelRawData[a];return o&&void 0!==o[i]&&null!==o[i]&&""!==o[i]?o[i]:"-"}}var s=this.allModelDetailData[a];if(!s||"object"!==f4(s))return"-";var l=s[t.subsystemName];if(!Array.isArray(l))return"-";var c=null;return t.parameterId&&(c=l.find((function(e){return e.subsystemName===t.subsystemName&&e.parameterId===t.parameterId}))),c||(c=l.find((function(e){return e.subsystemName===t.subsystemName&&e.parameterName===t.parameterName}))),c&&void 0!==c.parameterValue&&null!==c.parameterValue&&""!==c.parameterValue?c.parameterValue:"-"},getParamDisplayName:function(e){return e&&e.parameterName||""},handleAddModel:function(){this.addModelDialogVisible=!0,0===this.modelList.length&&this.loadModelListForDialog()},loadModelListForDialog:function(){var e=this,t=u4(u4({},nt.GET_MODEL_QUERT_TABLE_BY_VERSION),{},{params:{page:1,size:999},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){t&&t.data&&t.data.list?e.modelList=t.data.list:e.modelList=[]})).asyncErrorCatch((function(t){console.error("获取机型列表失败:",t),e.$message.error("获取机型列表失败"),e.modelList=[]}))},handleModelSelectionChange:function(e){this.selectedModels=e},handleAddModelDialogClose:function(){this.addModelDialogVisible=!1,this.selectedModels=[],this.modelSearchText="",this.$refs.modelTable&&this.$refs.modelTable.clearSelection()},handleConfirmAddModel:function(){var e=this;if(0!==this.selectedModels.length){this.loadingModelDetail=!0;var t=this.getSelectedSubsystemsAndTypes(),r=t.subsystemTypes,a=this.selectedModels.map((function(t){var a=t.id||t.rowId||t.engineModelID,n=t.parameterVersion||1,i="".concat(a,"_").concat(n);return e.$set(e.allModelRawData,i,{modelName:t.modelName||t.productFullName||"",productNumber:t.productNumber||"",plate:t.plate||"",platform:t.platform||"",series:t.series||"",marketSegment:t.marketSegment||"",projectName:t.projectName||"",projectNumber:t.projectNumber||"",parameterNum:t.parameterNum||""}),e.loadModelDetail(a,t,n,r)}));Promise.all(a).then((function(){e.handleAddModelDialogClose()})).catch((function(t){console.error("加载机型详情失败:",t),e.$message.error("加载机型详情失败")})).finally((function(){e.loadingModelDetail=!1}))}else this.$message({type:"warning",message:"请至少选择一个机型"})},loadModelDetail:function(e,t,r,a){var n=this;return new Promise((function(i,o){var s=u4(u4({},nt.GET_MODEL_QUERT_DETAIL),{},{params:{engineModelID:e,parameterVersion:r,userID:pe(),subsystemParts:a},disableSuccessMsg:!0});n.$request(s).asyncThen((function(a){if(a&&a.data){var o={};Object.keys(a.data).forEach((function(e){var t=a.data[e];Array.isArray(t)&&(o[e]=t.map((function(t){return u4(u4({},t),{},{subsystemName:t.subsystemName||e})})))}));var s="".concat(e,"_").concat(r),l=n.allModelDetailData[s]||{},c=u4(u4({},l),o);n.$set(n.allModelDetailData,s,c),n.currentCommonConfig;var u=n.comparisonModels.find((function(t){var a=t.parameterVersion||1;return t.id===e&&a===r}));if(!u){var p={id:e,name:t.modelName||t.productFullName||"未知机型",image:t.image||t.imageUrl||"",parameterVersion:r};n.comparisonModels.push(p)}i()}else{var d="".concat(e,"_").concat(r),h=n.allModelDetailData[d]||{};n.$set(n.allModelDetailData,d,h);var f=n.comparisonModels.find((function(t){var a=t.parameterVersion||1;return t.id===e&&a===r}));if(!f){var m={id:e,name:t.modelName||t.productFullName||"未知机型",image:t.image||t.imageUrl||"",parameterVersion:r||t.parameterVersion||1};n.comparisonModels.push(m)}i()}})).asyncErrorCatch((function(a){console.error("获取机型详情失败:",a);var i="".concat(e,"_").concat(r),s=n.allModelDetailData[i]||{};n.$set(n.allModelDetailData,i,s);var l=n.comparisonModels.find((function(t){var a=t.parameterVersion||1;return t.id===e&&a===r}));if(!l){var c={id:e,name:t.modelName||t.productFullName||"未知机型",image:t.image||t.imageUrl||"",parameterVersion:r||t.parameterVersion||1};n.comparisonModels.push(c)}o(a)}))}))},reloadModelDetailsForCheckedNodes:function(){var e=this;if(this.comparisonModels&&0!==this.comparisonModels.length){var t=this.getSelectedSubsystemsAndTypes(),r=t.subsystemNames,a=t.parameterTypes,n=t.subsystemTypes;if(0!==r.length||0!==a.length){var i=this.comparisonModels.map((function(t){var r=t.id,a=t.parameterVersion||1;if(!r)return Promise.resolve();var i=e.modelList.find((function(e){return(e.id||e.rowId||e.engineModelID)===r}));i||(i={id:r,modelName:t.name,parameterVersion:a,productFullName:t.name,image:t.image,imageUrl:t.image});var o="".concat(r,"_").concat(a);return e.allModelRawData[o]||e.$set(e.allModelRawData,o,{modelName:i.modelName||i.productFullName||t.name||"",productNumber:i.productNumber||"",plate:i.plate||"",platform:i.platform||"",series:i.series||"",marketSegment:i.marketSegment||"",projectName:i.projectName||"",projectNumber:i.projectNumber||"",parameterNum:i.parameterNum||""}),e.loadModelDetail(r,i,a,n)}));Promise.all(i).then((function(){})).catch((function(e){console.error("重新加载机型详情失败:",e)}))}}},extractParamsFromDetail:function(e){var t=this,r={};return e&&"object"===f4(e)?(Object.keys(e).forEach((function(a){var n=e[a];Array.isArray(n)&&n.forEach((function(e){var a=e.parameterName||"",n=Object.keys(t.paramMap).find((function(e){return t.paramMap[e].label===a}));n&&void 0!==e.parameterValue&&null!==e.parameterValue&&(r[n]=e.parameterValue)}))})),r):r},extractParamsFromList:function(e){var t=this,r={};return Array.isArray(e)&&0!==e.length?(e.forEach((function(e){var a=e.parameterName||"",n=Object.keys(t.paramMap).find((function(e){return t.paramMap[e].label===a}));n&&void 0!==e.minorVersion&&null!==e.minorVersion&&(r[n]=e.minorVersion)})),r):r},getSelectedSubsystemsAndTypes:function(){var e=this,t=[],r=[],a=[],n=new Set,i=new Set,o=new Set;return this.checkedKeys.forEach((function(s){var l=e.nodeMap[s];if(l)if(l.isParent)n.has(l.label)||(t.push(l.label),n.add(l.label));else if(l.parentLabel&&!n.has(l.parentLabel)&&(t.push(l.parentLabel),n.add(l.parentLabel)),l.parentLabel&&o.add(l.parentLabel),l.label&&r.push(l.label),l.parentLabel&&l.label){var c="/"===l.label?"/":l.label,u="".concat(l.parentLabel,"-").concat(c);i.has(u)||(a.push(u),i.add(u))}})),t.forEach((function(e){if(!o.has(e)){var t="".concat(e,"-/");i.has(t)||(a.push(t),i.add(t))}})),{subsystemNames:t,parameterTypes:r,subsystemTypes:a}},handleRemoveModel:function(e){var t=this.comparisonModels[e];if(t&&t.id){var r=t.parameterVersion||1,a="".concat(t.id,"_").concat(r);this.$delete(this.allModelDetailData,a),this.$delete(this.allModelRawData,a)}this.comparisonModels.splice(e,1)},loadFavoritesList:function(){var e=this,t=u4(u4({},nt.GET_USER_COMMONLY_USED),{},{params:{userId:pe()},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){if(t&&t.data){var r=[];Array.isArray(t.data)?r=t.data:t.data.list&&Array.isArray(t.data.list)?r=t.data.list:t.data.data&&Array.isArray(t.data.data)&&(r=t.data.data),e.favoritesOptions=r.map((function(e){return{label:e.commonName||e.name||"",value:e.commonId||e.commonName||e.name||"",data:e}}))}})).asyncErrorCatch((function(t){console.error("获取常用列表失败:",t),e.$message.error("获取常用列表失败")}))},handleFavoriteChange:function(e){var t=this;if(!e){this.currentCommonConfig=null,this.treeData=JSON.parse(JSON.stringify(this.allTreeData)),this.nodeMap=JSON.parse(JSON.stringify(this.allNodeMap)),this.hiddenParams=[];var r=this.getAllNodeKeys(this.treeData);return this.defaultExpandedKeys=r,this.checkedKeys=r,void this.$nextTick((function(){t.$refs.paramTree&&r.length>0&&t.$refs.paramTree.setCheckedKeys(r)}))}var a=this.favoritesOptions.find((function(t){return t.value===e||t.data&&(t.data.commonId===e||t.data.commonName===e)}));a&&a.data?(this.currentCommonConfig=a.data,this.allTreeData&&this.allTreeData.length>0&&Object.keys(this.allNodeMap).length>0?this.updateCheckedKeysByDisplayParams():console.log("树数据还未加载完成,等待加载完成后再更新选中状态"),this.$nextTick((function(){t.hideParamsNotInCommonByDisplayParams()}))):this.$message({type:"warning",message:"未找到选中的常用配置"})},handleDownloadComparisonData:function(){var e=this.comparisonModels.filter((function(e){return e.id})).map((function(e){return{modelId:e.id,parameterVersion:e.parameterVersion||""}}));if(0!==e.length){var t=this.getSelectedSubsystemsAndTypes(),r=t.subsystemTypes,a=r.filter((function(e){return!e.startsWith("整车参数-")})),n=this.collectCurrentDisplayParams(),i=[];n&&n.subsystems&&n.subsystems.length>0&&n.subsystems.forEach((function(e){var t="整车参数"===e.subsystem?1:0;e.parameters.forEach((function(e){i.push({parameterId:e.parameterId,isGlobal:t})}))}));var o=i.filter((function(e){return 1!==e.isGlobal&&e.parameterId})).map((function(e){return e.parameterId})),s=nt.DOWNLOAD_MODEL_QUERY_DATA||{},l=s.url,c=s.method,u=void 0===c?"post":c,p=s.headers,d=void 0===p?{}:p,h={url:l,method:u,data:{userID:pe(),modelIds:e,parameterIds:o,subsystemParts:a},responseType:"blob",headers:d,disableSuccessMsg:!0};this.$axios(h).then((function(e){var t=e.data;if(t){var r=e.headers&&(e.headers["content-type"]||e.headers["Content-Type"]);if(r&&r.includes("application/json"))try{var a=new FileReader;a.onload=function(){console.log("下载失败: ".concat(a.result))},a.readAsText(t)}catch(u){console.error("解析下载失败响应异常:",u)}else{var n=e.headers&&(e.headers["content-disposition"]||e.headers["Content-Disposition"]),i="对比数据.xlsx";if(n){var o=/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i.exec(n),s=o?o[1]||o[2]:"";if(s)try{i=decodeURIComponent(s)}catch(u){i=s}}var l=window.URL.createObjectURL(t),c=document.createElement("a");c.href=l,c.download=i,document.body.appendChild(c),c.click(),document.body.removeChild(c),window.URL.revokeObjectURL(l),console.log("下载开始,请查看浏览器下载列表")}}else console.log("下载失败,文件内容为空")})).catch((function(e){console.error("下载失败:",e),console.log("下载失败,请稍后重试")}))}else this.$message({type:"warning",message:"请先添加机型"})},updateCheckedKeysByDisplayParams:function(){var e=this;if(this.treeData=JSON.parse(JSON.stringify(this.allTreeData)),this.nodeMap=JSON.parse(JSON.stringify(this.allNodeMap)),!this.currentCommonConfig||!this.currentCommonConfig.subsystems){var t=this.getAllNodeKeys(this.treeData);return this.checkedKeys=t,this.defaultExpandedKeys=t,void this.$nextTick((function(){e.$refs.paramTree&&t.length>0&&e.$refs.paramTree.setCheckedKeys(t)}))}var r=new Map;this.currentCommonConfig.subsystems.forEach((function(t){var a=t.subsystem;r.has(a)||r.set(a,new Set),t.parameters.forEach((function(t){var n=1===t.isGlobal||"1"===t.isGlobal,i=a;if(n&&(i="整车参数",r.has(i)||r.set(i,new Set)),t.partsName){var o=t.partsName,s=o;r.get(i).add(s)}else{var l=e.allParametersData[i];if(Array.isArray(l)){var c=l.find((function(e){return t.parameterId?e.parameterId===t.parameterId:!!t.parameterName&&e.parameterName===t.parameterName}));if(c&&c.partsName){var u=c.partsName,p=u;r.get(i).add(p)}else r.get(i).add("/")}else r.get(i).add("/")}}))}));var a=[];this.allTreeData.forEach((function(e){var t,n=null,i=o4(r);try{for(i.s();!(t=i.n()).done;){var o=r4(t.value,1),s=o[0];if(e.label===s||e.label.includes(s)||s.includes(e.label)){n=s;break}}}catch(c){i.e(c)}finally{i.f()}if(n){var l=r.get(n);l.has("/")&&(a.push(e.id),l.delete("/")),e.children&&Array.isArray(e.children)&&l.size>0&&e.children.forEach((function(e){var t,r=o4(l);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(e.label===n||e.label.includes(n)||n.includes(e.label)){a.push(e.id);break}}}catch(c){r.e(c)}finally{r.f()}}))}})),this.checkedKeys=a;var n=[];this.allTreeData.forEach((function(e){var t,a=o4(r);try{for(a.s();!(t=a.n()).done;){var i=r4(t.value,1),o=i[0];if(e.label===o||e.label.includes(o)||o.includes(e.label)){n.push(e.id);break}}}catch(s){a.e(s)}finally{a.f()}})),n.push.apply(n,a),this.defaultExpandedKeys=n,this.$nextTick((function(){e.$refs.paramTree&&(a.length>0?(e.$refs.paramTree.setCheckedKeys(a),e.$refs.paramTree.setExpandedKeys(n)):e.$refs.paramTree.setCheckedKeys([]))})),this.reloadModelDetailsForCheckedNodes()},rebuildNodeMap:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e.forEach((function(e,a){var n=!r,i=e.label;t.nodeMap[e.id]={label:i,parentLabel:r,isParent:n},e.children&&e.children.length>0&&t.rebuildNodeMap(e.children,i)}))},hideParamsNotInCommonByDisplayParams:function(){var e=this;if(this.currentCommonConfig&&this.currentCommonConfig.subsystems){var t=this.getSelectedSubsystemsAndTypes(),r=t.subsystemNames,a=t.parameterTypes,n=t.subsystemTypes;if(0!==r.length||0!==a.length){var i=new Map;this.currentCommonConfig.subsystems.forEach((function(e){var t=e.subsystem;e.parameters.forEach((function(e){var r=1===e.isGlobal||"1"===e.isGlobal,a=r?"整车参数":t,n=e.parameterId||e.parameterName;n&&(i.has(a)||i.set(a,new Set),i.get(a).add(n))}))}));var o=[];r.forEach((function(t){var r=e.allParametersData[t];Array.isArray(r)&&0!==r.length&&r.forEach((function(r){var i=r.parameterName||"",s=r.parameterId||"",l=r.partsName||"",c=!1,u=e.checkedKeys.some((function(r){var a=e.nodeMap[r];return a&&a.isParent&&a.label===t&&!e.checkedKeys.some((function(r){var a=e.nodeMap[r];return a&&!a.isParent&&a.parentLabel===t}))}));if(u){var p=e.treeData.some((function(e){return!(e.label!==t||!e.children)&&e.children.some((function(e){return e.label===l}))}));if(p){var d=e.checkedKeys.some((function(r){var a=e.nodeMap[r];return a&&!a.isParent&&a.parentLabel===t&&a.label===l}));c=d}else c=!0}else 0===a.length?c=!1:(a.includes(l)&&(c=!0),c||(c=n.includes("".concat(t,"-").concat(l))));c&&o.push({subsystemName:t,parameterName:i,parameterId:s,partsName:l})}))}));var s=[];o.forEach((function(e){var t=e.subsystemName,r=e.parameterName,a=e.parameterId,n=i.has(t),o=i.get(t)||new Set,l=a||r,c=n&&o.has(l);if(!c){var u="".concat(t,"-").concat(r);s.includes(u)||s.push(u)}})),this.hiddenParams=s}}},hideParamsNotInCommon:function(){var e=this;if(this.currentCommonConfig&&this.currentCommonConfig.subsystems){var t=new Map;this.currentCommonConfig.subsystems.forEach((function(e){var r=e.subsystem,a=new Set(e.parameters.map((function(e){return e.parameterId}))),n=new Set(e.parameters.map((function(e){return e.parameterName})));t.set(r,{parameterIds:a,parameterNames:n})}));var r=[];Object.keys(this.allParametersData).forEach((function(a){if(t.has(a)){var n=t.get(a),i=e.allParametersData[a];Array.isArray(i)&&i.forEach((function(e){var t=e.parameterName||"",i=e.parameterId||"",o=i?n.parameterIds.has(i):n.parameterNames.has(t);if(!o){var s="".concat(a,"-").concat(t);r.includes(s)||r.push(s)}}))}else{var o=e.allParametersData[a];Array.isArray(o)&&o.forEach((function(e){var t=e.parameterName||"",n="".concat(a,"-").concat(t);r.includes(n)||r.push(n)}))}})),r.forEach((function(t){e.hiddenParams.includes(t)||e.hiddenParams.push(t)}))}},handleUpdateFavorite:function(){var e=this;if(this.currentCommonConfig)if(0!==this.displayParams.length){var t=this.collectCurrentDisplayParams();if(t&&t.subsystems&&0!==t.subsystems.length){var r=[];t.subsystems.forEach((function(e){var t="整车参数"===e.subsystem?1:0;e.parameters.forEach((function(e){r.push({parameterId:e.parameterId,isGlobal:t})}))}));var a={userId:pe(),commonName:this.currentCommonConfig.commonName||this.currentCommonConfig.name,parameters:r};this.currentCommonConfig.commonId?a.commonId=this.currentCommonConfig.commonId:this.currentCommonConfig.id&&(a.id=this.currentCommonConfig.id),this.savingFavorite=!0;var n=u4(u4({},nt.UPDATE_USER_COMMONLY_USED),{},{params:a});this.$request(n).asyncThen((function(t){e.loadFavoritesList()})).asyncErrorCatch((function(t){console.error("更新常用失败:",t),e.$message.error(t.message||"更新常用失败")})).finally((function(){e.savingFavorite=!1}))}else this.$message({type:"warning",message:"当前没有可保存的参数"})}else this.$message({type:"warning",message:"当前没有可保存的参数,请先选择参数"});else this.$message({type:"warning",message:"请先选择一个常用配置"})},handleAddFavorite:function(){0!==this.displayParams.length?this.addFavoriteDialogVisible=!0:this.$message({type:"warning",message:"当前没有可保存的参数,请先选择参数"})},handleAddFavoriteDialogClose:function(){this.addFavoriteDialogVisible=!1,this.addFavoriteFormData.commonName="",this.$refs.addFavoriteForm&&this.$refs.addFavoriteForm.clearValidate()},handleConfirmAddFavorite:function(){var e=this;this.$refs.addFavoriteForm.validate((function(t){if(!t)return!1;if(0!==e.displayParams.length){var r=e.collectCurrentDisplayParams();if(r&&r.subsystems&&0!==r.subsystems.length){var a=[];r.subsystems.forEach((function(e){var t="整车参数"===e.subsystem?1:0;e.parameters.forEach((function(e){a.push({parameterId:e.parameterId,isGlobal:t})}))}));var n={userId:pe(),commonName:e.addFavoriteFormData.commonName,parameters:a};e.savingFavorite=!0;var i=u4(u4({},nt.ADD_USER_COMMONLY_USED),{},{params:n});e.$request(i).asyncThen((function(t){e.handleAddFavoriteDialogClose(),e.loadFavoritesList()})).asyncErrorCatch((function(t){console.error("新增常用失败:",t),e.$message.error(t.message||"新增常用失败")})).finally((function(){e.savingFavorite=!1}))}else e.$message({type:"warning",message:"当前没有可保存的参数"})}else e.$message({type:"warning",message:"当前没有可保存的参数"})}))},collectCurrentDisplayParams:function(){var e=this,t=new Map;this.displayParams.forEach((function(r){var a=r.subsystemName;t.has(a)||t.set(a,{subsystem:a,parameters:[]});var n=r.parameterId||null;if(!n&&e.allParametersData[a]){var i=e.allParametersData[a];if(Array.isArray(i)){var o=i.find((function(e){return e.parameterName===r.parameterName}));o&&o.parameterId&&(n=o.parameterId)}}if(n){var s=t.get(a),l=s.parameters.some((function(e){return e.parameterId===n}));l||s.parameters.push({parameterId:n,parameterName:r.parameterName})}else{var c=t.get(a),u=c.parameters.some((function(e){return e.parameterName===r.parameterName}));u||c.parameters.push({parameterId:"",parameterName:r.parameterName})}}));var r=Array.from(t.values());return{subsystems:r}},handleHideParam:function(e){var t="".concat(e.subsystemName,"-").concat(e.parameterName);this.hiddenParams.includes(t)||this.hiddenParams.push(t)},handleShowHiddenParams:function(){var e=this;this.selectedParamsToRestore=[],this.hiddenParamsDialogVisible=!0,this.$nextTick((function(){e.$refs.hiddenParamsTable&&e.$refs.hiddenParamsTable.clearSelection()}))},handleHiddenParamsDialogClose:function(){this.hiddenParamsDialogVisible=!1,this.selectedParamsToRestore=[],this.$refs.hiddenParamsTable&&this.$refs.hiddenParamsTable.clearSelection()},handleHiddenParamsSelectionChange:function(e){this.selectedParamsToRestore=e.map((function(e){return e.key||"".concat(e.subsystemName,"-").concat(e.parameterName)}))},handleRestoreAll:function(){var e=this;0!==this.hiddenParamsList.length?this.$nextTick((function(){e.$refs.hiddenParamsTable&&e.$refs.hiddenParamsTable.toggleAllSelection()})):this.$message({type:"warning",message:"没有可恢复的参数"})},handleRestoreSelected:function(){0!==this.selectedParamsToRestore.length?this.executeRestoreParams(this.selectedParamsToRestore):this.$message({type:"warning",message:"请至少选择一个要恢复的参数"})},handleConfirmRestoreParams:function(){0!==this.selectedParamsToRestore.length?this.executeRestoreParams(this.selectedParamsToRestore):this.$message({type:"warning",message:"请至少选择一个要恢复的参数"})},executeRestoreParams:function(e){var t=this;e&&0!==e.length&&(e.forEach((function(e){var r=t.hiddenParams.indexOf(e);r>-1&&t.hiddenParams.splice(r,1)})),this.selectedParamsToRestore=[],this.$refs.hiddenParamsTable&&this.$refs.hiddenParamsTable.clearSelection(),this.hiddenParamsDialogVisible=!1)},loadTreeData:function(){var e=this;this.loadAllParametersData().then((function(){var t=u4(u4({},nt.GET_ENGINE_DETAIL_QUERY),{},{params:{tcData:"tc"},disableSuccessMsg:!0});e.$request(t).asyncThen((function(t){var r=[];if(t&&t.data){var a=t.data;"object"!==f4(a)||Array.isArray(a)?Array.isArray(a)&&(r=e.formatTreeData(a)):r=e.convertObjectToTree(a)}var n=e.buildWholeEngineParamsNode();if(r=[n].concat(J3(r)),e.allTreeData=JSON.parse(JSON.stringify(r)),e.allNodeMap=JSON.parse(JSON.stringify(e.nodeMap)),e.treeData=JSON.parse(JSON.stringify(e.allTreeData)),e.currentCommonConfig)e.$nextTick((function(){e.updateCheckedKeysByDisplayParams(),e.$nextTick((function(){e.hideParamsNotInCommonByDisplayParams()}))}));else{var i=e.getAllNodeKeys(e.treeData);e.defaultExpandedKeys=i,e.checkedKeys=i,e.$nextTick((function(){e.$refs.paramTree&&i.length>0&&e.$refs.paramTree.setCheckedKeys(i)}))}})).asyncErrorCatch((function(t){console.error("获取参数列表失败:",t),e.$message.error("获取参数列表失败")}))}))},loadAllParametersData:function(){var e=this,t=u4(u4({},nt.GET_ALL_DATA_SYSTEAM_LIST),{},{disableSuccessMsg:!0});return this.$request(t).asyncThen((function(t){var r={};t&&t.data&&Array.isArray(t.data)&&t.data.forEach((function(e){e.subsystem&&Array.isArray(e.parameters)&&(r[e.subsystem]=e.parameters.map((function(t){return{parameterId:t.parameterId||"",parameterName:t.parameterName||"",partsName:t.partsName||"",subsystem:e.subsystem}})))})),e.allParametersData=r,e.savedAllParametersData=JSON.parse(JSON.stringify(r)),e.loadFavoritesList()})).asyncErrorCatch((function(t){console.error("获取所有参数数据失败:",t),e.allParametersData={},e.savedAllParametersData=JSON.parse(JSON.stringify(e.allParametersData)),e.loadFavoritesList()}))},convertObjectToTree:function(e){var t=this,r=[];return this.nodeMap={},Object.keys(e).forEach((function(a,n){var i="parent-".concat(n),o=[],s=new Set;t.nodeMap[i]={label:a,parentLabel:null,isParent:!0},Array.isArray(e[a])&&e[a].forEach((function(e,r){if(!s.has(e)){s.add(e);var n="".concat(i,"-").concat(r);o.push({id:n,label:e,tip:""}),t.nodeMap[n]={label:e,parentLabel:a,isParent:!1}}})),r.push({id:i,label:a,tip:"",children:o})})),r},formatTreeData:function(e){var t=this;return e.map((function(e,r){var a={id:e.id||e.key||"node-".concat(r),label:e.label||e.name||e.title||"",tip:e.tip||""};if(e.children&&e.children.length>0){var n=new Set,i=[];e.children.forEach((function(e){var t=e.label||e.name||e.title||"";n.has(t)||(n.add(t),i.push(e))})),a.children=t.formatTreeData(i)}return a}))},getAllNodeKeys:function(e){var t=this,r=[];return e.forEach((function(e){r.push(e.id),e.children&&e.children.length>0&&(r=r.concat(t.getAllNodeKeys(e.children)))})),r},buildWholeEngineParamsNode:function(){var e=this,t="整车参数",r="parent-whole-engine-params",a=this.allParametersData[t]||[],n=new Set;a.forEach((function(e){var t=e.partsName||"";t&&"/"!==t&&n.add(t)}));var i=[],o=new Set;Array.from(n).forEach((function(a,n){if(!o.has(a)){o.add(a);var s="".concat(r,"-").concat(n);i.push({id:s,label:a,tip:""}),e.nodeMap[s]={label:a,parentLabel:t,isParent:!1}}}));var s={id:r,label:t,tip:"",children:i};return this.nodeMap[r]={label:t,parentLabel:null,isParent:!0},s},loadComparisonModels:function(){this.loadModelListForDialog()}}},g4=m4,v4=(r("f877"),p(g4,Z3,K3,!1,null,"6abb4a03",null)),y4=v4.exports,b4=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"apaas-custom-page-mydemo custom-page"},[e.showReportDetail?r("report-detail",{attrs:{detail:e.currentReportDetail},on:{close:e.closeReportDetail,refresh:e.handleReportDetailRefresh}}):[r("div",{staticClass:"page-header"},[r("div",{staticClass:"title"},[e._v(" 报告管理 ")]),r("div",{staticClass:"operation"},[r("x-svg-icon",{staticClass:"pointer",staticStyle:{cursor:"pointer"},attrs:{name:"refresh-icon"},nativeOn:{click:function(t){return e.handleRefresh()}}})],1)]),r("div",{staticClass:"page-search-panel"},[r("div",{staticClass:"searched-fields"},[r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("厂家")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.manufacturerName,callback:function(t){e.$set(e.searchPanelValue,"manufacturerName",t)},expression:"searchPanelValue.manufacturerName"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("型号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.modelName,callback:function(t){e.$set(e.searchPanelValue,"modelName",t)},expression:"searchPanelValue.modelName"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("产品编号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.productNumber,callback:function(t){e.$set(e.searchPanelValue,"productNumber",t)},expression:"searchPanelValue.productNumber"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("板块")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.plate,callback:function(t){e.$set(e.searchPanelValue,"plate",t)},expression:"searchPanelValue.plate"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("平台")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.platform,callback:function(t){e.$set(e.searchPanelValue,"platform",t)},expression:"searchPanelValue.platform"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("系列")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.series,callback:function(t){e.$set(e.searchPanelValue,"series",t)},expression:"searchPanelValue.series"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("细分市场")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.marketSegment,callback:function(t){e.$set(e.searchPanelValue,"marketSegment",t)},expression:"searchPanelValue.marketSegment"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("项目名称")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.projectName,callback:function(t){e.$set(e.searchPanelValue,"projectName",t)},expression:"searchPanelValue.projectName"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("项目编号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.projectNumber,callback:function(t){e.$set(e.searchPanelValue,"projectNumber",t)},expression:"searchPanelValue.projectNumber"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("领域/模块")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.module,callback:function(t){e.$set(e.searchPanelValue,"module",t)},expression:"searchPanelValue.module"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("状态")]),r("el-select",{attrs:{clearable:"",filterable:"",placeholder:"请选择"},model:{value:e.searchPanelValue.status,callback:function(t){e.$set(e.searchPanelValue,"status",t)},expression:"searchPanelValue.status"}},e._l(e.statusOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.label,value:e.id}})})),1)],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("标题")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.title,callback:function(t){e.$set(e.searchPanelValue,"title",t)},expression:"searchPanelValue.title"}})],1),r("div",{staticClass:"search-actions"},[r("el-button",{attrs:{type:"primary"},on:{click:e.handleSearch}},[e._v(" 查询 ")]),r("el-button",{on:{click:e.resetSearch}},[e._v(" 重置 ")])],1)])]),r("div",{staticClass:"page-data-list"},[r("x-vxe-table",{ref:"vxeTable",staticClass:"block-table",attrs:{border:!0,seqWidth:40,colConfigs:e.tableConfig.colConfigs,tableData:e.tableData,rowDraggable:e.tableConfig.rowDraggable,seqType:e.tableConfig.seqType,pagination:e.pagination,layout:e.tableConfig.layout,seqConfig:e.tableConfig.seqConfig,autoSize:e.tableConfig.autoSize,pageConfig:e.tableConfig.pageConfig},on:{"table-row-click":e.rowClickEvent,"size-change":e.pageSizeChange,"current-page-change":e.currentChange,"select-data-change":e.selectDataChange},scopedSlots:e._u([e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customHeadSlot,fn:function(n){var i=n.column;return[t.customHeadSlot?r("div",{key:a},[e._v(" "+e._s(i)+" "+e._s(t)+" ")]):e._e()]}}})),e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customSlot,fn:function(n){var i=n.row,o=n.rowIndex;return["status"===t.customSlot?r("div",{key:a+""+o},["APPROVING"===i[t.prop]?r("span",{staticStyle:{background:"#E6A23C",padding:"4px 8px",color:"white","border-radius":"20px"}},[e._v("审核中")]):"DRAFT"===i[t.prop]?r("span",{staticStyle:{background:"#909399",padding:"4px 8px",color:"white","border-radius":"20px"}},[e._v("草稿")]):"COMPLETE"===i[t.prop]?r("span",{staticStyle:{background:"#67C23A",padding:"4px 8px",color:"white","border-radius":"20px"}},[e._v("已完成")]):"REJECTED"===i[t.prop]?r("span",{staticStyle:{background:"#F56C6C",padding:"4px 8px",color:"white","border-radius":"20px"}},[e._v("已拒绝")]):r("span",{staticStyle:{background:"#909399",padding:"4px 8px",color:"white","border-radius":"20px"}},[e._v("-")])]):e._e(),"options"===t.customSlot?r("div",{key:"op"+a+o},[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowView(i)}}},[e._v("查看")]),r("span",{staticStyle:{width:"6px",display:"inline-block"}}),i.filePath?r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleDownload(i)}}},[e._v("下载")]):e._e()]):e._e()]}}}))],null,!0)},[r("template",{slot:"empty"},[r("div",{staticClass:"table-empty"},[r("x-empty-page")],1)])],2)],1)],r("el-dialog",{attrs:{title:"restart"===e.dialogMode?"重新发起":"新增报告",visible:e.createDialogVisible,width:"900px","close-on-click-modal":!1,modal:!1,"custom-class":"create-report-dialog"},on:{"update:visible":function(t){e.createDialogVisible=t},close:e.handleDialogClose}},[r("div",{staticClass:"dialog-body-wrapper"},[r("el-form",{ref:"createForm",attrs:{model:e.createFormData,rules:e.createFormRules,"label-width":"150px"}},[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"标题名称",prop:"title"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.title,callback:function(t){e.$set(e.createFormData,"title",t)},expression:"createFormData.title"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"厂家名称(全称)",prop:"manufacturerName"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.manufacturerName,callback:function(t){e.$set(e.createFormData,"manufacturerName",t)},expression:"createFormData.manufacturerName"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"产品型号(全称)",prop:"modelName"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.modelName,callback:function(t){e.$set(e.createFormData,"modelName",t)},expression:"createFormData.modelName"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"厂家简称",prop:"manufacturerAbbreviation"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.manufacturerAbbreviation,callback:function(t){e.$set(e.createFormData,"manufacturerAbbreviation",t)},expression:"createFormData.manufacturerAbbreviation"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"产品型号简称",prop:"modelAbbreviation"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.modelAbbreviation,callback:function(t){e.$set(e.createFormData,"modelAbbreviation",t)},expression:"createFormData.modelAbbreviation"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"产品编号",prop:"productNumber"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.productNumber,callback:function(t){e.$set(e.createFormData,"productNumber",t)},expression:"createFormData.productNumber"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"领域/模块",prop:"module"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.module,callback:function(t){e.$set(e.createFormData,"module",t)},expression:"createFormData.module"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"板块",prop:"plate"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.plate,callback:function(t){e.$set(e.createFormData,"plate",t)},expression:"createFormData.plate"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"平台",prop:"platform"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.platform,callback:function(t){e.$set(e.createFormData,"platform",t)},expression:"createFormData.platform"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"系列",prop:"series"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.series,callback:function(t){e.$set(e.createFormData,"series",t)},expression:"createFormData.series"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"细分市场",prop:"marketSegment"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.marketSegment,callback:function(t){e.$set(e.createFormData,"marketSegment",t)},expression:"createFormData.marketSegment"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"项目名称",prop:"projectName"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.projectName,callback:function(t){e.$set(e.createFormData,"projectName",t)},expression:"createFormData.projectName"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"项目编号",prop:"projectNumber"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.projectNumber,callback:function(t){e.$set(e.createFormData,"projectNumber",t)},expression:"createFormData.projectNumber"}})],1)],1)],1),r("el-form-item",{attrs:{label:"附件上传",prop:"attachments"}},[r("el-upload",{ref:"upload",attrs:{"auto-upload":!1,"on-change":e.handleFileChange,"on-remove":e.handleFileRemove,"file-list":e.fileList,limit:1,accept:".doc,.pdf,.xls,.xlsx,.ppt,.pptx"}},[r("el-button",{attrs:{type:"primary",icon:"el-icon-upload"}},[e._v(" 选择文件 ")]),r("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v("支持扩展名: .doc .pdf .xls .xlsx .ppt .pptx,仅支持上传一个文件")])],1)],1),r("el-form-item",{attrs:{label:"说明",prop:"explanation"}},[r("el-input",{attrs:{type:"textarea",rows:4,placeholder:"请输入"},model:{value:e.createFormData.explanation,callback:function(t){e.$set(e.createFormData,"explanation",t)},expression:"createFormData.explanation"}})],1),r("div",{staticClass:"approval-workflow"},[r("div",{staticClass:"workflow-title"},[e._v(" 审批环节 ")]),r("div",{staticClass:"workflow-table"},[r("table",{staticClass:"workflow-table-content"},[r("thead",[r("tr",[r("th",{staticClass:"step-name-col"},[e._v(" 环节名称 ")]),r("th",{staticClass:"handler-col"},[e._v(" 处理人 ")])])]),r("tbody",e._l(e.approvalWorkflowSteps,(function(t,a){return r("tr",{key:a,staticClass:"workflow-row"},[r("td",{staticClass:"step-name-cell"},[r("span",{staticClass:"step-name"},[e._v(" "+e._s(t.name)+" "),t.required?r("span",{staticClass:"required-mark"},[e._v("*")]):e._e()])]),r("td",{staticClass:"handler-cell"},[r("el-select",{staticClass:"handler-select",attrs:{multiple:"",filterable:"",remote:"","reserve-keyword":"",placeholder:"请选择","remote-method":function(t){return e.handleRemoteSearch(t,a)},loading:t.loading},on:{change:function(t){return e.handleHandlerChange(a,t)}},model:{value:t.handlers,callback:function(r){e.$set(t,"handlers",r)},expression:"step.handlers"}},e._l(t.options,(function(t){return r("el-option",{key:t.userNumber,attrs:{value:t.userId,label:t.username}},[r("span",{staticClass:"username-text"},[e._v(e._s(t.username))]),r("span",{staticClass:"user-id-text"},[e._v(e._s(t.userNumber))])])})),1)],1)])})),0)])])])],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleDialogClose}},[e._v("取消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.handleSubmit}},[e._v("确定")])],1)]),r("el-dialog",{attrs:{title:"审核",visible:e.approvalDialogVisible,width:"500px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(t){e.approvalDialogVisible=t},close:e.handleApprovalDialogClose}},[r("el-form",{ref:"approvalForm",attrs:{model:e.approvalFormData,"label-width":"80px"}},[r("el-form-item",{attrs:{label:"审核"}},[r("el-radio-group",{model:{value:e.approvalFormData.result,callback:function(t){e.$set(e.approvalFormData,"result",t)},expression:"approvalFormData.result"}},[r("el-radio",{attrs:{label:"PASS"}},[e._v(" 通过 ")]),r("el-radio",{attrs:{label:"REJECT"}},[e._v(" 退回 ")])],1)],1),r("el-form-item",{attrs:{label:"备注"}},[r("el-input",{attrs:{type:"textarea",rows:4,placeholder:"请输入备注"},model:{value:e.approvalFormData.opinion,callback:function(t){e.$set(e.approvalFormData,"opinion",t)},expression:"approvalFormData.opinion"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleApprovalDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.approvalSubmitting},on:{click:e.handleApprovalSubmit}},[e._v(" 确定 ")])],1)],1)],2)},_4=[],x4=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("transition",{attrs:{name:"report-detail-fade"}},[e.visible?r("div",{staticClass:"report-detail"},[r("div",{staticClass:"detail-panel"},[r("div",{staticClass:"detail-header"},[r("div",{staticClass:"header-left"},[r("el-button",{staticClass:"back-button",attrs:{type:"text",icon:"el-icon-arrow-left"},on:{click:e.handleBack}}),r("div",{staticClass:"header-info"},[r("div",{staticClass:"title"},[e._v(" 报告详情 ")])])],1),r("div",{staticClass:"header-right"},["DRAFT"!==e.reportDetail.status||e.isEditMode?e._e():[e.canResend?r("el-button",{on:{click:e.handleResend}},[e._v(" 直送 ")]):r("el-button",{on:{click:e.handleLaunch}},[e._v(" 发起 ")]),r("el-button",{attrs:{type:"primary"},on:{click:e.handleEdit}},[e._v(" 修改 ")])],"REJECTED"!==e.reportDetail.status||e.isEditMode?e._e():[r("el-button",{attrs:{loading:e.resending},on:{click:e.handleResend}},[e._v(" 直送 ")]),r("el-button",{on:{click:e.handleResendApproval}},[e._v(" 重新发起 ")]),r("el-button",{attrs:{type:"primary"},on:{click:e.handleEdit}},[e._v(" 修改 ")])],e.isEditMode?[r("el-button",{on:{click:e.handleCancelEdit}},[e._v(" 返回 ")]),e.canResend?r("el-button",{attrs:{type:"primary"},on:{click:e.handleResendApproval}},[e._v(" 重新发起 ")]):r("el-button",{attrs:{type:"primary",loading:e.saving},on:{click:e.handleSave}},[e._v(" 保存 ")])]:e._e(),"APPROVING"===e.reportDetail.status&&!e.isEditMode&&e.fromTodo?[r("el-button",{on:{click:e.handleReturn}},[e._v(" 退回 ")]),e.canResend?r("el-button",{attrs:{loading:e.resending},on:{click:e.handleResend}},[e._v(" 直送 ")]):e._e(),r("el-button",{attrs:{type:"primary"},on:{click:e.handleSubmit}},[e._v(" 提交 ")])]:e._e()],2)]),r("div",{staticClass:"detail-content"},[r("section",{staticClass:"block-section"},[r("div",{staticClass:"section-title"},[e._v(" 基础信息 ")]),r("div",{staticClass:"info-grid"},[r("div",{staticClass:"info-item-full"},[r("span",{staticClass:"label"},[e._v("流程主题")]),e.isEditMode||e.isEditingProcessTitle?!e.isEditMode&&e.isEditingProcessTitle?r("div",{staticClass:"process-title-input-wrapper"},[r("el-input",{staticClass:"process-title-input",attrs:{placeholder:"请输入流程主题",maxlength:"100","show-word-limit":""},model:{value:e.editingProcessTitle,callback:function(t){e.editingProcessTitle=t},expression:"editingProcessTitle"}},[r("template",{slot:"suffix"},[r("i",{staticClass:"el-icon-check process-title-icon",on:{click:e.handleSaveProcessTitle}}),r("i",{staticClass:"el-icon-close process-title-icon",on:{click:e.handleCancelProcessTitle}})])],2)],1):r("el-input",{attrs:{maxlength:"100","show-word-limit":"",placeholder:"请输入流程主题"},model:{value:e.editFormData.processTitle,callback:function(t){e.$set(e.editFormData,"processTitle",t)},expression:"editFormData.processTitle"}}):r("div",{staticClass:"value process-title-value-wrapper"},[e._v(" "+e._s(e.showTopDetail.processTitle||e.detail.processTitle||e.reportDetail.processTitle||"--")+" "),r("i",{staticClass:"el-icon-edit process-title-edit-icon",on:{click:e.handleEditProcessTitle}})])],1),r("div",{staticClass:"info-row"},[r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("创建人")]),r("span",{staticClass:"value"},[e._v(e._s(e.showTopDetail.createBy||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("创建时间")]),r("span",{staticClass:"value"},[e._v(e._s(e.showTopDetail.createTime||"--"))])])]),r("div",{staticClass:"info-row"},[r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("当前环节")]),r("span",{staticClass:"value"},[e._v(e._s(e.showTopDetail.currentNode||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("当前处理人")]),r("span",{staticClass:"value"},[e._v(e._s(e.showTopDetail.currentProcessor||"--"))])])])])]),r("section",{staticClass:"block-section"},[r("div",{staticClass:"section-title"},[e._v(" 报告信息 ")]),e.isEditMode?[r("el-form",{ref:"editForm",attrs:{model:e.editFormData,"label-width":"150px"}},[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"标题名称",prop:"title"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.editFormData.title,callback:function(t){e.$set(e.editFormData,"title",t)},expression:"editFormData.title"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"厂家名称(全称)",prop:"manufacturerName"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.editFormData.manufacturerName,callback:function(t){e.$set(e.editFormData,"manufacturerName",t)},expression:"editFormData.manufacturerName"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"产品型号(全称)",prop:"modelName"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.editFormData.modelName,callback:function(t){e.$set(e.editFormData,"modelName",t)},expression:"editFormData.modelName"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"厂家简称",prop:"manufacturerAbbreviation"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.editFormData.manufacturerAbbreviation,callback:function(t){e.$set(e.editFormData,"manufacturerAbbreviation",t)},expression:"editFormData.manufacturerAbbreviation"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"产品型号简称",prop:"modelAbbreviation"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.editFormData.modelAbbreviation,callback:function(t){e.$set(e.editFormData,"modelAbbreviation",t)},expression:"editFormData.modelAbbreviation"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"产品编号",prop:"productNumber"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.editFormData.productNumber,callback:function(t){e.$set(e.editFormData,"productNumber",t)},expression:"editFormData.productNumber"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"领域/模块",prop:"module"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.editFormData.module,callback:function(t){e.$set(e.editFormData,"module",t)},expression:"editFormData.module"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"板块",prop:"plate"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.editFormData.plate,callback:function(t){e.$set(e.editFormData,"plate",t)},expression:"editFormData.plate"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"平台",prop:"platform"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.editFormData.platform,callback:function(t){e.$set(e.editFormData,"platform",t)},expression:"editFormData.platform"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"系列",prop:"series"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.editFormData.series,callback:function(t){e.$set(e.editFormData,"series",t)},expression:"editFormData.series"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"细分市场",prop:"marketSegment"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.editFormData.marketSegment,callback:function(t){e.$set(e.editFormData,"marketSegment",t)},expression:"editFormData.marketSegment"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"项目名称",prop:"projectName"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.editFormData.projectName,callback:function(t){e.$set(e.editFormData,"projectName",t)},expression:"editFormData.projectName"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"项目编号",prop:"projectNumber"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.editFormData.projectNumber,callback:function(t){e.$set(e.editFormData,"projectNumber",t)},expression:"editFormData.projectNumber"}})],1)],1)],1),r("el-form-item",{attrs:{label:"附件上传",prop:"attachments"}},[r("el-upload",{ref:"upload",attrs:{"auto-upload":!1,"on-change":e.handleFileChange,"on-remove":e.handleFileRemove,"file-list":e.fileList,limit:1,accept:".doc,.pdf,.xls,.xlsx,.ppt,.pptx"}},[r("el-button",{attrs:{type:"primary",icon:"el-icon-upload"}},[e._v(" 选择文件 ")]),r("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v(" 支持扩展名: .doc .pdf .xls .xlsx .ppt .pptx,仅支持上传一个文件 ")])],1)],1),r("el-form-item",{attrs:{label:"说明",prop:"explanation"}},[r("el-input",{attrs:{type:"textarea",rows:4,placeholder:"请输入"},model:{value:e.editFormData.explanation,callback:function(t){e.$set(e.editFormData,"explanation",t)},expression:"editFormData.explanation"}})],1)],1)]:[r("div",{staticClass:"info-grid"},[r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("标题名称")]),r("span",{staticClass:"value"},[e._v(e._s(e.reportDetail.title||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("厂家名称(全称)")]),r("span",{staticClass:"value"},[e._v(e._s(e.reportDetail.manufacturerName||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("产品型号(全称)")]),r("span",{staticClass:"value"},[e._v(e._s(e.reportDetail.modelName||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("厂家简称")]),r("span",{staticClass:"value"},[e._v(e._s(e.reportDetail.manufacturerAbbreviation||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("产品型号简称")]),r("span",{staticClass:"value"},[e._v(e._s(e.reportDetail.modelAbbreviation||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("产品编号")]),r("span",{staticClass:"value"},[e._v(e._s(e.reportDetail.productNumber||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("领域/模块")]),r("span",{staticClass:"value"},[e._v(e._s(e.reportDetail.module||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("板块")]),r("span",{staticClass:"value"},[e._v(e._s(e.reportDetail.plate||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("平台")]),r("span",{staticClass:"value"},[e._v(e._s(e.reportDetail.platform||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("系列")]),r("span",{staticClass:"value"},[e._v(e._s(e.reportDetail.series||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("细分市场")]),r("span",{staticClass:"value"},[e._v(e._s(e.reportDetail.marketSegment||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("项目名称")]),r("span",{staticClass:"value"},[e._v(e._s(e.reportDetail.projectName||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("项目编号")]),r("span",{staticClass:"value"},[e._v(e._s(e.reportDetail.projectNumber||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("文件")]),r("span",{staticClass:"value"},[e.reportDetail.filePath?r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleDownload(e.reportDetail)}}},[e._v(e._s(e.reportDetail.fileName))]):e._e()])])]),e.reportDetail.explanation?r("div",{staticClass:"description-block"},[r("span",{staticClass:"label"},[e._v("说明:")]),r("span",{staticClass:"value"},[e._v(e._s(e.reportDetail.explanation))])]):e._e()]],2),e.reportDetail.status&&"DRAFT"!==e.reportDetail.status&&e.detail.flowId?r("section",{staticClass:"block-section"},[r("div",{staticClass:"section-title"},[e._v(" 审批流程 ")]),e.timelineNodes&&e.timelineNodes.length>0?r("div",{staticClass:"approval-timeline"},[r("el-timeline",e._l(e.timelineNodes,(function(t,a){return r("el-timeline-item",{key:a,attrs:{color:e.getTimelineColor(t.result||t.status,a,e.timelineNodes.length)}},[r("div",{staticClass:"timeline-item-content"},[r("div",{staticClass:"node-title"},[e._v(" "+e._s(t.title)+" ")]),r("div",{staticClass:"node-content"},[r("div",{staticClass:"node-info"},[r("div",{staticClass:"node-user"},[e._v(" "+e._s(t.userName||"--")+" "),r("span",{staticClass:"node-time"},[e._v(" "+e._s(e.formatTime(t.operateTime))+" ")])])]),r("div",{staticClass:"node-status",class:e.getStatusClass(t.result||t.status)},[e._v(" "+e._s(e.setStatusText(t.result||t.status))+" ")]),t.opinion?r("div",{staticClass:"node-opinion"},[e._v(" 审批意见:"+e._s(t.opinion)+" ")]):e._e()])])])})),1)],1):r("div",{staticClass:"empty-progress"},[r("span",{staticClass:"empty-text"},[e._v("暂无审批流程数据")])])]):e._e(),"DRAFT"===e.reportDetail.status?r("section",{staticClass:"block-section"},[r("div",{staticClass:"section-title"},[e._v(" 审批环节 ")]),r("div",{staticClass:"approval-workflow"},[r("div",{staticClass:"approval-process-title"},[r("div",{staticClass:"description-label"},[e._v(" 流程主题 "),r("span",{staticClass:"required-mark"},[e._v("*")])]),e.isEditMode?r("el-input",{attrs:{maxlength:"100","show-word-limit":"",placeholder:"请输入流程主题"},model:{value:e.editFormData.processTitle,callback:function(t){e.$set(e.editFormData,"processTitle",t)},expression:"editFormData.processTitle"}}):[r("div",{staticClass:"process-title-display"},[e._v(" "+e._s(e.reportDetail.processTitle||e.showTopDetail.processTitle||e.editFormData.processTitle||"--")+" ")])]],2),r("div",{staticClass:"workflow-table"},[r("table",{staticClass:"workflow-table-content"},[r("thead",[r("tr",[r("th",{staticClass:"step-name-col"},[e._v(" 环节名称 ")]),r("th",{staticClass:"handler-col"},[e._v(" 处理人 ")])])]),r("tbody",e._l(e.approvalWorkflowSteps,(function(t,a){return r("tr",{key:a,staticClass:"workflow-row"},[r("td",{staticClass:"step-name-cell"},[r("span",{staticClass:"step-name"},[e._v(" "+e._s(t.name)+" "),t.required?r("span",{staticClass:"required-mark"},[e._v("*")]):e._e()])]),r("td",{staticClass:"handler-cell"},[e.isEditMode?r("el-select",{staticClass:"handler-select",attrs:{multiple:"",filterable:"",remote:"",placeholder:"请选择","remote-method":function(t){return e.handleRemoteSearch(t,a)},loading:t.loading},on:{change:function(t){return e.handleHandlerChange(a,t)}},model:{value:t.handlers,callback:function(r){e.$set(t,"handlers",r)},expression:"step.handlers"}},e._l(t.options,(function(t){return r("el-option",{key:t.userNumber,attrs:{value:t.userId,label:t.username}},[r("span",{staticClass:"username-text"},[e._v(e._s(t.username))]),r("span",{staticClass:"user-id-text"},[e._v(e._s(t.userNumber))])])})),1):[t.handlers&&t.handlers.length>0?r("div",{staticClass:"handler-display"},e._l(t.handlers,(function(a,n){return r("span",{key:n,staticClass:"handler-tag"},[e._v(" "+e._s(e.getHandlerName(a,t.options))+" ")])})),0):r("span",{staticClass:"handler-empty"},[e._v("--")])]],2)])})),0)])])])]):e._e()])]),r("el-dialog",{attrs:{title:"提交",visible:e.approvalDialogVisible,width:"500px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(t){e.approvalDialogVisible=t},close:e.handleApprovalDialogClose}},[r("el-form",{ref:"approvalForm",attrs:{model:e.approvalFormData,rules:e.approvalFormRules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"提交意见:"}},[r("el-input",{attrs:{type:"textarea",rows:4,placeholder:"请输入提交意见(可选)"},model:{value:e.approvalFormData.opinion,callback:function(t){e.$set(e.approvalFormData,"opinion",t)},expression:"approvalFormData.opinion"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleApprovalDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.approvalSubmitting},on:{click:e.handleApprovalSubmit}},[e._v(" 确定 ")])],1)],1),r("el-dialog",{attrs:{title:"选择退回节点",visible:e.returnNodeDialogVisible,width:"500px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(t){e.returnNodeDialogVisible=t},close:e.handleReturnNodeDialogClose}},[r("div",{staticClass:"return-node-dialog-content"},[r("el-radio-group",{on:{change:e.handleReturnNodeChange},model:{value:e.selectedReturnNode,callback:function(t){e.selectedReturnNode=t},expression:"selectedReturnNode"}},e._l(e.returnableNodes,(function(e){return r("el-radio",{key:e,attrs:{label:e}})})),1),"发起审批"===e.selectedReturnNode?r("div",{staticClass:"return-opinion-section"},[r("div",{staticClass:"opinion-label"},[e._v(" 退回意见: ")]),r("el-input",{attrs:{type:"textarea",rows:3,placeholder:"请输入退回意见"},model:{value:e.returnOpinion,callback:function(t){e.returnOpinion=t},expression:"returnOpinion"}})],1):e._e()],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleReturnNodeDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.returnSubmitting,disabled:!e.selectedReturnNode},on:{click:e.handleReturnSubmit}},[e._v(" 确定 ")])],1)])],1):e._e()])},w4=[];function S4(e){return S4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S4(e)}function D4(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */D4=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(O){l=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var i=t&&t.prototype instanceof d?t:d,o=Object.create(i.prototype),s=new C(n||[]);return a(o,"_invoke",{value:x(e,r,s)}),o}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(O){return{type:"throw",arg:O}}}e.wrap=c;var p={};function d(){}function h(){}function f(){}var m={};l(m,i,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(T([])));v&&v!==t&&r.call(v,i)&&(m=v);var y=f.prototype=d.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(a,i,o,s){var l=u(e[a],e,i);if("throw"!==l.type){var c=l.arg,p=c.value;return p&&"object"==S4(p)&&r.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,o,s)}),(function(e){n("throw",e,o,s)})):t.resolve(p).then((function(e){c.value=e,o(c)}),(function(e){return n("throw",e,o,s)}))}s(l.arg)}var i;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return i=i?i.then(a,a):a()}})}function x(e,t,r){var a="suspendedStart";return function(n,i){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===n)throw i;return I()}for(r.method=n,r.arg=i;;){var o=r.delegate;if(o){var s=w(o,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===a)throw a="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a="executing";var l=u(e,t,r);if("normal"===l.type){if(a=r.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(a="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,a=e.iterator[r];if(void 0===a)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var n=u(a,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function T(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,n=function t(){for(;++a<e.length;)if(r.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:I}}function I(){return{value:void 0,done:!0}}return h.prototype=f,a(y,"constructor",{value:f,configurable:!0}),a(f,"constructor",{value:h,configurable:!0}),h.displayName=l(f,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,s,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(_.prototype),l(_.prototype,o,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,a,n,i){void 0===i&&(i=Promise);var o=new _(c(t,r,a,n),i);return e.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},b(y),l(y,s,"Generator"),l(y,i,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var a in t)r.push(a);return r.reverse(),function e(){for(;r.length;){var a=r.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},e.values=T,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(D),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(r,a){return o.type="throw",o.arg=e,t.next=r,a&&(t.method="next",t.arg=void 0),!!a}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var n=this.tryEntries[a];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var n=a.arg;D(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function C4(e,t,r,a,n,i,o){try{var s=e[i](o),l=s.value}catch(c){return void r(c)}s.done?t(l):Promise.resolve(l).then(a,n)}function T4(e){return function(){var t=this,r=arguments;return new Promise((function(a,n){var i=e.apply(t,r);function o(e){C4(i,a,n,o,s,"next",e)}function s(e){C4(i,a,n,o,s,"throw",e)}o(void 0)}))}}function I4(e){return k4(e)||A4(e)||M4(e)||O4()}function O4(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function M4(e,t){if(e){if("string"===typeof e)return P4(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?P4(e,t):void 0}}function A4(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function k4(e){if(Array.isArray(e))return P4(e)}function P4(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function N4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function E4(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N4(Object(r),!0).forEach((function(t){R4(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N4(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function R4(e,t,r){return t=L4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L4(e){var t=j4(e,"string");return"symbol"===S4(t)?t:String(t)}function j4(e,t){if("object"!==S4(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==S4(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var F4={name:"ReportDetail",props:{detail:{type:Object,default:function(){return{}}},visible:{type:Boolean,default:!0},fromTodo:{type:Boolean,default:!1},canResend:{type:Boolean,default:!1}},data:function(){return{reportDetail:{},showTopDetail:{processTitle:"",createBy:"",createTime:"",currentNode:"",currentProcessor:""},progress:[],flowNodes:[],progressDetail:{},approvalDialogVisible:!1,approvalFormData:{result:"",opinion:""},approvalSubmitting:!1,resending:!1,approvalFormRules:{},returnNodeDialogVisible:!1,returnableNodes:[],selectedReturnNode:"",returnSubmitting:!1,returnOpinion:"",isEditMode:!1,editFormData:{title:"",manufacturerName:"",modelName:"",manufacturerAbbreviation:"",modelAbbreviation:"",productNumber:"",module:"",plate:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",explanation:"",fileUrl:"",fileName:"",processTitle:""},originalReportDetail:{},selectedFile:null,fileList:[],uploading:!1,saving:!1,isEditingProcessTitle:!1,editingProcessTitle:"",approvalWorkflowSteps:[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}],launching:!1}},computed:{initiateNode:function(){return this.reportDetail&&this.reportDetail.createBy?{userName:this.reportDetail.createBy,createTime:this.reportDetail.createTime,status:"INITIATE",result:"INITIATE"}:null},timelineNodes:function(){var e=[];if(this.initiateNode,this.flowNodes&&this.flowNodes.length>0){var t=this.flowNodes.findIndex((function(e){return"REJECT"===e.result})),r=this.flowNodes;if(-1!==t)r=this.flowNodes.slice(0,t+1);else{var a=r.findIndex((function(e){return"待审批"===e.result}));-1!==a&&(r=r.map((function(e,t){return t===a?E4(E4({},e),{},{result:"APPROVING"}):e})))}r.forEach((function(t){var r="APPROVING",a="APPROVING";t.result&&("REJECT"===t.result?(r="REJECT",a="REJECT"):"MSG"===t.result?(r="MSG",a="MSG"):"RETURN"===t.result?(r="PASS",a="PASS"):"APPROVING"===t.result?(r="APPROVING",a="APPROVING"):"PASS"===t.result?(r="PASS",a="PASS"):"待审批"===t.result&&(r="待审批",a="STAY"));var n=t.opinions&&Array.isArray(t.opinions)&&t.opinions.length>0?t.opinions[0]:null,i=t.todoUserName||t.undoUserName||"--";e.push({title:t.node||"审批节点",userName:i,operateTime:t.approvalTime||"",result:r,status:a,opinion:n})}))}else this.progress&&this.progress.length>0&&this.progress.forEach((function(t){t.steps&&t.steps.length>0&&t.steps.forEach((function(r){e.push({title:t.title||"审批节点",userName:r.userName,operateTime:r.approvalTime||r.handleTime||r.createTime,result:r.result||r.status,status:r.result||r.status,opinion:r.opinion||r.remark||r.comment||null})}))}));return e},currentNode:function(){if("DRAFT"===this.reportDetail.status)return"草稿";if(this.flowNodes&&this.flowNodes.length>0){var e=this.flowNodes.find((function(e){return"待审批"===e.result||"APPROVING"===e.result}));if(e)return e.node||"--";var t=this.flowNodes[this.flowNodes.length-1];return t&&t.node||"--"}return"--"},currentProcessor:function(){if(this.flowNodes&&this.flowNodes.length>0){var e=this.flowNodes.find((function(e){return"待审批"===e.result||"APPROVING"===e.result}));if(e)return e.undoUserName||e.todoUserName||"--"}return"--"}},watch:{detail:{handler:function(e){e&&e.reportId&&(this.loadReportDetailFromApi(e.reportId,e.flowId),e.flowId&&this.getApprovalSpet(e.flowId))},immediate:!0,deep:!0}},mounted:function(){},methods:{setStatusText:function(e){var t={PASS:"通过",REJECT:"驳回",REFUSE:"驳回",APPROVE:"批准",APPROVING:"审批中",PENDING:"待处理",WAITING:"待处理",INITIATE:"发起审批",MSG:"通过"};return t[e]||e||"待处理"},formatTime:function(e){if(!e)return"--";if("number"===typeof e){var t=new Date(e);return t.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return e},getTimelineColor:function(e,t,r){return"PASS"===e||"APPROVE"===e?"#67C23A":"REJECT"===e||"REFUSE"===e?"#F56C6C":"APPROVING"===e||"PENDING"===e||"WAITING"===e?"#E6A23C":"#409EFF"},getStatusClass:function(e){var t={PASS:"status-pass",APPROVE:"status-approve",REJECT:"status-reject",REFUSE:"status-reject",APPROVING:"status-approving",PENDING:"status-pending",WAITING:"status-pending",INITIATE:"status-initiate",MSG:"status-msg"};return t[e]||"status-default"},loadReportDetail:function(){this.detail&&Object.keys(this.detail).length>0&&(this.detail.reportId?this.loadReportDetailFromApi(this.detail.reportId):(this.reportDetail=this.detail,this.detail.flowId&&this.reportDetail.status&&"DRAFT"!==this.reportDetail.status&&this.getApprovalSpet(this.detail.flowId)))},loadReportDetailFromApi:function(e,t){var r=this;if(console.log(e,t,"reportId, flowId"),e){var a=E4(E4({},nt.GET_REPORT_DETAIL),{},{params:{reportId:e},disableSuccessMsg:!0});this.$request(a).asyncThen((function(e){if(r.reportDetail=e.data||e,r.originalReportDetail=JSON.parse(JSON.stringify(r.reportDetail)),"DRAFT"===r.reportDetail.status){var a=t||r.detail.flowId||r.reportDetail.flowId;a&&(r.approvalWorkflowSteps=[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}],r.loadApprovalUsers(a))}else t&&r.reportDetail.status&&"DRAFT"!==r.reportDetail.status&&r.getApprovalSpet(t)})).asyncErrorCatch((function(e){console.error("获取报告详情失败:",e),r.$message.error("获取报告详情失败,请重试")}))}},getApprovalSpet:function(e){var t=this;if(e){var r=this.reportDetail.reportId||this.reportDetail.id||this.detail.reportId||this.detail.id;if(r){var a=E4(E4({},nt.GET_REPORT_DETAIL_PROCESS),{},{params:{flowId:e},disableSuccessMsg:!0});this.$request(a).asyncThen((function(e){console.log("审批流程数据:",e);var r=e.data||e;t.progressDetail={explanation:r.explanation||"",flowStatus:r.flowStatus||"",progressTitle:r.progressTitle||"",templateVersion:r.templateVersion||"",contentName:r.contentName||""};var a=r.flowStatus||"",n=r.createBy||"";t.showTopDetail={processTitle:r.progressTitle||"",createBy:n,createTime:r.createTime||"",currentNode:"REJECTED"===a?"编制":r.currentNode||"",currentProcessor:"REJECTED"===a?n:r.processor||""},t.flowNodes=r.flowNodes||[]})).asyncErrorCatch((function(e){console.error("获取审批流程数据失败:",e),t.flowNodes=[],t.progressDetail={}}))}}},handleBack:function(){this.$emit("close")},handleDownload:function(e){var t=document.createElement("a");t.href=e.filePath,t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t)},handleReturn:function(){var e=this;if(this.detail&&this.detail.flowId){var t=E4(E4({},nt.GET_CAN_RETURN_NODE),{},{params:{flowId:this.detail.flowId},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){console.log(t);var r=Array.isArray(t.data)?t.data:[];e.returnableNodes=["发起审批"].concat(I4(r))})).asyncErrorCatch((function(t){console.error("获取退回节点失败:",t),e.returnableNodes=["发起审批"]})),this.selectedReturnNode="",this.returnOpinion="",this.returnNodeDialogVisible=!0}else this.$message.error("缺少审批信息")},handleReturnNodeDialogClose:function(){this.returnNodeDialogVisible=!1,this.selectedReturnNode="",this.returnOpinion=""},handleReturnNodeChange:function(){"发起审批"!==this.selectedReturnNode&&(this.returnOpinion="")},handleReturnSubmit:function(){var e=this;if(this.selectedReturnNode)if(this.detail&&this.detail.flowId)if(this.returnSubmitting=!0,"发起审批"===this.selectedReturnNode){var t={flowId:this.detail.flowId,userId:pe(),result:"REJECT",opinion:this.returnOpinion||""},r=E4(E4({},nt.START_REPORT_APPROVAL),{},{params:t,disableSuccessMsg:!0});this.$request(r).asyncThen((function(t){e.handleReturnNodeDialogClose(),e.detail.flowId&&e.getApprovalSpet(e.detail.flowId),e.$message({message:"拒绝成功",type:"success"}),e.$emit("refresh"),e.returnSubmitting=!1,e.handleBack()})).asyncErrorCatch((function(t){console.error("拒绝失败:",t),e.$message({message:t.message||"拒绝失败,请重试",type:"error"}),e.returnSubmitting=!1})).finally((function(){e.returnSubmitting=!1}))}else{var a=this.reportDetail.createdById||this.detail.createdById||"";if(!a)return this.$message.error("无法获取流程发起人信息"),void(this.returnSubmitting=!1);var n=pe(),i={flowId:this.detail.flowId,nodeName:this.selectedReturnNode,createUserId:a,processUserId:n},o=E4(E4({},nt.RETURN_REPORT_TODO),{},{params:i,disableSuccessMsg:!0});this.$request(o).asyncThen((function(t){e.handleReturnNodeDialogClose(),e.detail.flowId&&e.getApprovalSpet(e.detail.flowId),e.$message({message:"退回成功",type:"success"}),e.$emit("refresh"),e.returnSubmitting=!1,e.handleBack()})).asyncErrorCatch((function(t){console.error("退回失败:",t),e.$message({message:t.message||"退回失败,请重试",type:"error"}),e.returnSubmitting=!1})).finally((function(){e.returnSubmitting=!1}))}else this.$message.error("缺少审批信息");else this.$message.warning("请选择要退回的节点")},handleResend:function(){var e=this,t=this.reportDetail.reportId||this.reportDetail.id||this.detail.reportId||this.detail.id;t?this.$confirm("确定要执行直送操作吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.resending=!0;var r=E4(E4({},nt.RESEND_REPORT_APPROVAL),{},{params:{reportId:t,userId:pe()},disableSuccessMsg:!0});e.$request(r).asyncThen((function(t){e.detail.flowId&&e.getApprovalSpet(e.detail.flowId),e.$message({message:"直送成功",type:"success"}),e.$emit("refresh"),e.resending=!1,e.handleBack()})).asyncErrorCatch((function(t){console.error("直送失败:",t),e.$message({message:t.message||"直送失败,请重试",type:"error"}),e.resending=!1})).finally((function(){e.resending=!1}))})).catch((function(){})):this.$message.error("缺少报告ID,无法执行直送操作")},handleSubmit:function(){var e=this;this.approvalFormData={result:"PASS",opinion:"同意"},this.approvalDialogVisible=!0,this.$nextTick((function(){e.$refs.approvalForm&&e.$refs.approvalForm.clearValidate()}))},handleApprovalDialogClose:function(){this.approvalDialogVisible=!1,this.approvalFormData={result:"",opinion:""},this.$refs.approvalForm&&this.$refs.approvalForm.clearValidate()},handleApprovalSubmit:function(){var e=this;this.$refs.approvalForm.validate((function(t){if(!t)return!1;if(e.detail&&e.detail.flowId){var r={flowId:e.detail.flowId,userId:pe(),result:e.approvalFormData.result,opinion:e.approvalFormData.opinion||""};e.approvalSubmitting=!0;var a=E4(E4({},nt.START_REPORT_APPROVAL),{},{params:r,disableSuccessMsg:!0});e.$request(a).asyncThen((function(t){e.handleApprovalDialogClose(),e.detail.flowId&&e.getApprovalSpet(e.detail.flowId),e.$message({message:"审批提交成功",type:"success"}),e.$emit("refresh"),e.approvalSubmitting=!1,e.handleBack()})).asyncErrorCatch((function(t){console.error("审批提交失败:",t),e.$message({message:"审批提交失败,请重试",type:"error"}),e.approvalSubmitting=!1})).finally((function(){e.approvalSubmitting=!1}))}else e.$message.error("缺少审批信息")}))},deduplicateSteps:function(e){var t=this;if(!Array.isArray(e)||0===e.length)return[];var r=new Map,a=[];return e.forEach((function(e){var t=null;if(e.id)t="id_".concat(e.id);else{var n=e.userName||e.operator||e.username||e.handlerName||e.handler||"",i=e.approvalTime||e.handleTime||e.createTime||"",o=e.result||e.status||"";t="combo_".concat(n,"_").concat(i,"_").concat(o)}if(t)if(r.has(t)){var s=r.get(t),l=a[s],c=!!(e.approvalTime||e.handleTime||e.createTime),u=!!(l.approvalTime||l.handleTime||l.createTime);c&&!u&&(a[s]=e)}else r.set(t,a.length),a.push(e)})),a.map((function(e){var r=E4({},e);return r.approvalTime&&(r.approvalTime=t.formatTime(r.approvalTime)),r.handleTime&&(r.handleTime=t.formatTime(r.handleTime)),r.createTime&&(r.createTime=t.formatTime(r.createTime)),r}))},handleLaunch:function(){var e=this,t=this.reportDetail.reportId||this.reportDetail.id||this.detail.reportId||this.detail.id,r=this.detail.flowId||this.reportDetail.flowId;t?r?this.$confirm("确定发起审批吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={reportId:t,flowId:r,userId:pe()},n=E4(E4({},nt.ADD_REPORT),{},{params:a,disableSuccessMsg:!0});e.launching=!0,e.$request(n).asyncThen((function(a){e.launching=!1,e.loadReportDetailFromApi(t,r),e.$message({type:"success",message:"发起成功"}),e.$emit("refresh")})).asyncErrorCatch((function(t){console.error("发起失败:",t),e.launching=!1,e.$message({type:"error",message:"发起失败,请重试"})}))})).catch((function(){e.$message({type:"info",message:"取消发起审批"})})):this.$message.error("缺少流程ID,无法发起审批"):this.$message.error("缺少报告ID,无法发起审批")},handleResatrtLaunch:function(){var e=this,t=this.reportDetail.reportId||this.reportDetail.id||this.detail.reportId||this.detail.id;t?this.$confirm("确定重新发起吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var r=e.approvalWorkflowSteps.map((function(e,t){return{nodeName:e.name,assignees:e.handlers,nodeOrder:t+1}})),a=E4(E4({reportId:t},e.editFormData),{},{flowId:"",processTitle:e.editFormData.processTitle||"",explanation:"",nodeList:r,userId:pe()}),n=E4(E4({},nt.RESTART_REPORT_APPROVAL),{},{params:a,disableSuccessMsg:!0});e.launching=!0,e.$request(n).asyncThen((function(r){e.launching=!1;var a=e.detail.flowId||e.reportDetail.flowId;e.loadReportDetailFromApi(t,a),e.$message({type:"success",message:"发起成功"}),e.$emit("refresh")})).asyncErrorCatch((function(t){console.error("发起失败:",t),e.launching=!1,e.$message({type:"error",message:"发起失败,请重试"})}))})).catch((function(){e.$message({type:"info",message:"取消发起审批"})})):this.$message.error("缺少报告ID,无法发起审批")},loadApprovalUsers:function(e){var t=this;if(e){var r=E4(E4({},nt.GET_REPORT_APPROVAL_USERS),{},{params:{flowId:e},disableSuccessMsg:!0});this.$request(r).asyncThen((function(e){console.log("获取审批流程信息:",e),t.fillApprovalUsersData(e,t.approvalWorkflowSteps)})).asyncErrorCatch((function(e){console.error("获取审批流程信息失败:",e)}))}},fillApprovalUsersData:function(e,t){var r,a,n=[],i=null;Array.isArray(e.data)?i=e.data:Array.isArray(null===(r=e.data)||void 0===r?void 0:r.data)?i=e.data.data:Array.isArray(null===(a=e.data)||void 0===a?void 0:a.result)?i=e.data.result:Array.isArray(e)?i=e:e.data&&!Array.isArray(e.data)&&(i=e.data),Array.isArray(i)?n=i:i&&Array.isArray(i.data)?n=i.data:i&&Array.isArray(i.result)?n=i.result:i&&Array.isArray(i.nodeList)?n=i.nodeList:i&&Array.isArray(i.flowNodes)&&(n=i.flowNodes),n&&n.length>0&&n.forEach((function(e){var r=e.nodeName||e.node||"";if(r){var a=t.find((function(e){return e.name===r}));if(a){var n=e.assignees||[];if(Array.isArray(n)&&0!==n.length){var i=n.map((function(e){var t=e.userId||e.id||"";return{userId:t,username:e.username||"",userNumber:e.userNumber||e.account||""}})).filter((function(e){return e.userId}));i.length>0&&(a.handlers=i.map((function(e){return e.userId})).filter(Boolean),a.options=i.map((function(e){return{userId:e.userId,username:e.username||"",userNumber:e.userNumber||""}})).filter((function(e){return e.userId})))}}}}))},getHandlerName:function(e,t){var r=t.find((function(t){return t.userId===e}));return r?r.username:e},handleRemoteSearch:function(e,t){var r=this.approvalWorkflowSteps[t];if(e&&""!==e.trim()){r.loading=!0;var a=e.trim(),n=E4(E4({},nt.GET_ALLUSERS),{},{params:{name:a},disableSuccessMsg:!0});this.$request(n).asyncThen((function(e){var t=e&&e.data,a=[];Array.isArray(t)?a=t:t&&Array.isArray(t.result)?a=t.result:t&&t.data&&Array.isArray(t.data)&&(a=t.data);var n=a.map((function(e){return{userId:e.userId||e.id,username:e.username||e.name,userNumber:e.userNumber||e.userId||e.id}})).filter((function(e){return e.userId&&e.userNumber})),i=new Set(r.handlers||[]),o=n.filter((function(e){return!i.has(e.userId)})),s=(r.options||[]).filter((function(e){return e.userId&&r.handlers&&r.handlers.includes(e.userId)})),l=new Map;s.forEach((function(e){e.userNumber&&l.set(e.userNumber,e)})),o.forEach((function(e){e.userNumber&&!l.has(e.userNumber)&&l.set(e.userNumber,e)})),r.options=Array.from(l.values()),r.loading=!1})).asyncErrorCatch((function(e){if(console.error("搜索人员失败:",e),r.handlers&&r.handlers.length>0){var t=r.options.filter((function(e){return r.handlers.includes(e.userId)}));r.options=t}else r.options=[];r.loading=!1}))}else if(r.handlers&&r.handlers.length>0){var i=r.options.filter((function(e){return r.handlers.includes(e.userId)}));r.options=i}else r.options=[]},handleHandlerChange:function(e,t){},handleResendApproval:function(){this.handleResatrtLaunch()},loadLaunchApprovalUsers:function(e){var t=this;if(e){var r=E4(E4({},nt.GET_REPORT_APPROVAL_USERS),{},{params:{flowId:e},disableSuccessMsg:!0});this.$request(r).asyncThen((function(e){console.log("获取审批流程信息:",e),t.fillResendApprovalData(e)})).asyncErrorCatch((function(e){console.error("获取审批流程信息失败:",e)}))}else console.error("缺少流程ID,无法获取审批人员信息")},handleEdit:function(){if(this.originalReportDetail=JSON.parse(JSON.stringify(this.reportDetail)),this.editFormData={title:this.reportDetail.title||"",manufacturerName:this.reportDetail.manufacturerName||"",modelName:this.reportDetail.modelName||"",manufacturerAbbreviation:this.reportDetail.manufacturerAbbreviation||"",modelAbbreviation:this.reportDetail.modelAbbreviation||"",productNumber:this.reportDetail.productNumber||"",module:this.reportDetail.module||"",plate:this.reportDetail.plate||"",platform:this.reportDetail.platform||"",series:this.reportDetail.series||"",marketSegment:this.reportDetail.marketSegment||"",projectName:this.reportDetail.projectName||"",projectNumber:this.reportDetail.projectNumber||"",explanation:this.reportDetail.explanation||"",fileUrl:this.reportDetail.fileUrl||this.reportDetail.filePath||"",fileName:this.reportDetail.fileName||"",processTitle:this.reportDetail.processTitle||this.showTopDetail.processTitle||""},this.reportDetail.fileUrl||this.reportDetail.filePath?this.fileList=[{name:this.reportDetail.fileName||"文件",url:this.reportDetail.fileUrl||this.reportDetail.filePath}]:this.fileList=[],this.selectedFile=null,"DRAFT"===this.reportDetail.status){var e=this.detail.flowId||this.reportDetail.flowId;!e||this.approvalWorkflowSteps[0].handlers&&0!==this.approvalWorkflowSteps[0].handlers.length||this.loadApprovalUsers(e)}this.isEditMode=!0},handleCancelEdit:function(){this.reportDetail=JSON.parse(JSON.stringify(this.originalReportDetail)),this.editFormData={title:"",manufacturerName:"",modelName:"",manufacturerAbbreviation:"",modelAbbreviation:"",productNumber:"",module:"",plate:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",explanation:"",fileUrl:"",fileName:"",processTitle:""},this.fileList=[],this.selectedFile=null,this.isEditMode=!1,this.$refs.editForm&&this.$refs.editForm.clearValidate()},handleFileChange:function(e,t){var r=[".doc",".pdf",".xls",".xlsx",".ppt",".pptx"],a=e.name.toLowerCase(),n=r.some((function(e){return a.endsWith(e)}));if(!n)return this.$message.error("不支持的文件类型,仅支持 .doc .pdf .xls .xlsx .ppt .pptx"),this.$refs.upload.handleRemove(e),!1;this.selectedFile=e&&e.raw?e.raw:null,this.fileList=t.slice(-1)},handleFileRemove:function(e,t){this.selectedFile=null,this.fileList=[]},handleFileUpload:function(){var e=this;if(this.uploading||!this.selectedFile)return this.selectedFile,Promise.resolve(null);var t=this.selectedFile,r=new FormData;r.append("file",t),r.append("createBy",pe());var a=E4(E4({},nt.TEST_FILE_UPLOAD),{},{params:r,disableSuccessMsg:!0});this.uploading=!0;var n=this.$loading({lock:!0,text:"正在上传文件,请稍候...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});return this.$upload(a,null,!1).then((function(t){console.log("文件上传成功:",t),n.close();var r="";if(t.data&&t){var a=t.data;r=a,e.editFormData.fileUrl=r}return r})).catch((function(t){throw console.error("文件上传失败:",t),n.close(),e.$message.error("文件上传失败,请重试"),t})).finally((function(){n&&n.close(),e.uploading=!1}))},handleSave:function(){var e=this;this.$refs.editForm?this.$refs.editForm.validate((function(t){if(!t)return!1;e.submitEdit()})):this.submitEdit()},submitEdit:function(){var e=this,t=function(){var t=T4(D4().mark((function t(){var r,a,n,i,o;return D4().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.selectedFile){t.next=14;break}return t.prev=1,t.next=4,e.handleFileUpload();case 4:r=t.sent,e.editFormData.fileUrl=r||"",e.editFormData.fileName=e.selectedFile.name,t.next=14;break;case 9:return t.prev=9,t.t0=t["catch"](1),console.error("文件上传失败:",t.t0),e.$message.error("文件上传失败,请重试"),t.abrupt("return");case 14:if(a=e.reportDetail.reportId||e.reportDetail.id,a){t.next=18;break}return e.$message.error("缺少报告ID"),t.abrupt("return");case 18:n=E4(E4({reportId:a,flowId:e.detail.flowId},e.editFormData),{},{createBy:pe(),userId:pe()}),"DRAFT"===e.reportDetail.status&&(i=e.approvalWorkflowSteps.map((function(e,t){return{nodeName:e.name,assignees:e.handlers,nodeOrder:t+1}})),n.nodeList=i),o=E4(E4({},nt.EDIT_REPORT),{},{params:n,disableSuccessMsg:!0}),e.saving=!0,e.$request(o).asyncThen((function(t){e.saving=!1,e.isEditMode=!1,e.loadReportDetailFromApi(a,e.detail.flowId),e.$message({type:"success",message:"保存成功"}),e.$emit("refresh")})).asyncErrorCatch((function(t){console.error("保存失败:",t),e.saving=!1,e.$message.error("保存失败,请重试")}));case 23:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(){return t.apply(this,arguments)}}();t()},handleEditProcessTitle:function(){this.isEditingProcessTitle=!0,this.editingProcessTitle=this.showTopDetail.processTitle||this.detail.processTitle||this.reportDetail.processTitle||""},handleCancelProcessTitle:function(){this.isEditingProcessTitle=!1,this.editingProcessTitle=""},handleSaveProcessTitle:function(){var e=this;if(this.detail&&this.detail.flowId){var t=(this.editingProcessTitle||"").trim();t?this.$confirm("确认修改主题为".concat(t,"吗?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var r=E4(E4({},nt.EDIT_APPROVAL_PROCESS_TITLE),{},{params:{flowId:e.detail.flowId,title:t},disableSuccessMsg:!0});e.$request(r).asyncThen((function(r){e.showTopDetail.processTitle=t,e.isEditingProcessTitle=!1,e.editingProcessTitle="",e.$message({message:"修改成功",type:"success"}),e.detail.flowId&&e.getApprovalSpet(e.detail.flowId)})).asyncErrorCatch((function(t){console.error("修改流程主题失败:",t),e.$message({message:t.message||"修改失败,请重试",type:"error"})}))})).catch((function(){})):this.$message.warning("流程主题不能为空")}else this.$message.error("缺少流程ID,无法保存")}}},V4=F4,z4=(r("277b"),p(V4,x4,w4,!1,null,"21ed1dea",null)),B4=z4.exports;function $4(e){return $4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$4(e)}function G4(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */G4=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(O){l=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var i=t&&t.prototype instanceof d?t:d,o=Object.create(i.prototype),s=new C(n||[]);return a(o,"_invoke",{value:x(e,r,s)}),o}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(O){return{type:"throw",arg:O}}}e.wrap=c;var p={};function d(){}function h(){}function f(){}var m={};l(m,i,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(T([])));v&&v!==t&&r.call(v,i)&&(m=v);var y=f.prototype=d.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(a,i,o,s){var l=u(e[a],e,i);if("throw"!==l.type){var c=l.arg,p=c.value;return p&&"object"==$4(p)&&r.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,o,s)}),(function(e){n("throw",e,o,s)})):t.resolve(p).then((function(e){c.value=e,o(c)}),(function(e){return n("throw",e,o,s)}))}s(l.arg)}var i;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return i=i?i.then(a,a):a()}})}function x(e,t,r){var a="suspendedStart";return function(n,i){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===n)throw i;return I()}for(r.method=n,r.arg=i;;){var o=r.delegate;if(o){var s=w(o,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===a)throw a="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a="executing";var l=u(e,t,r);if("normal"===l.type){if(a=r.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(a="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,a=e.iterator[r];if(void 0===a)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var n=u(a,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function T(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,n=function t(){for(;++a<e.length;)if(r.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:I}}function I(){return{value:void 0,done:!0}}return h.prototype=f,a(y,"constructor",{value:f,configurable:!0}),a(f,"constructor",{value:h,configurable:!0}),h.displayName=l(f,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,s,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(_.prototype),l(_.prototype,o,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,a,n,i){void 0===i&&(i=Promise);var o=new _(c(t,r,a,n),i);return e.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},b(y),l(y,s,"Generator"),l(y,i,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var a in t)r.push(a);return r.reverse(),function e(){for(;r.length;){var a=r.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},e.values=T,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(D),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(r,a){return o.type="throw",o.arg=e,t.next=r,a&&(t.method="next",t.arg=void 0),!!a}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var n=this.tryEntries[a];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var n=a.arg;D(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function U4(e,t,r,a,n,i,o){try{var s=e[i](o),l=s.value}catch(c){return void r(c)}s.done?t(l):Promise.resolve(l).then(a,n)}function W4(e){return function(){var t=this,r=arguments;return new Promise((function(a,n){var i=e.apply(t,r);function o(e){U4(i,a,n,o,s,"next",e)}function s(e){U4(i,a,n,o,s,"throw",e)}o(void 0)}))}}function H4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function q4(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H4(Object(r),!0).forEach((function(t){Y4(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H4(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Y4(e,t,r){return t=X4(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X4(e){var t=Z4(e,"string");return"symbol"===$4(t)?t:String(t)}function Z4(e,t){if("object"!==$4(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==$4(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var K4={name:"ReportPage",components:{ReportDetail:B4},data:function(){return{searchPanelValue:{title:"",manufacturerName:"",modelName:"",productNumber:"",module:"",plate:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",status:""},statusOptions:[{id:"APPROVING",label:"审批中"},{id:"COMPLETE",label:"已完成"},{id:"REJECTED",label:"已拒绝"}],tableData:[],pagination:{currentPage:1,pageSize:10,total:0},createDialogVisible:!1,selectedFile:null,fileList:[],uploading:!1,dialogMode:"create",currentRestartRow:null,createFormData:{title:"",manufacturerName:"",modelName:"",manufacturerAbbreviation:"",modelAbbreviation:"",productNumber:"",module:"",plate:"",fileUrl:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",explanation:""},createFormRules:{title:[{required:!0,message:"请输入标题名称",trigger:"blur"}],manufacturerName:[{required:!0,message:"请输入厂家名称(全称)",trigger:"blur"}],modelName:[{required:!0,message:"请输入产品型号(全称)",trigger:"blur"}],manufacturerAbbreviation:[{required:!0,message:"请输入厂家简称",trigger:"blur"}],modelAbbreviation:[{required:!0,message:"请输入产品型号简称",trigger:"blur"}],productNumber:[{required:!0,message:"请输入产品编号",trigger:"blur"}],module:[{required:!0,message:"请输入领域/模块",trigger:"blur"}],plate:[{required:!0,message:"请输入板块",trigger:"blur"}],platform:[{required:!0,message:"请输入平台",trigger:"blur"}],series:[{required:!0,message:"请输入系列",trigger:"blur"}],marketSegment:[{required:!0,message:"请输入细分市场",trigger:"blur"}],projectName:[{required:!0,message:"请输入项目名称",trigger:"blur"}],projectNumber:[{required:!0,message:"请输入项目编号",trigger:"blur"}]},approvalWorkflowSteps:[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}],approvalDialogVisible:!1,approvalFormData:{result:"",opinion:""},approvalSubmitting:!1,currentApprovalRow:null,showReportDetail:!1,currentReportDetail:null,downloadingRowId:""}},computed:{tableConfig:function(){return{rowDraggable:!1,colConfigs:[{prop:"title",label:"标题",showOverflowTooltip:!0,minWidth:"140"},{prop:"manufacturerName",label:"厂家名称",showOverflowTooltip:!0,minWidth:"160"},{prop:"productNumber",label:"产品型号",showOverflowTooltip:!0,minWidth:"160"},{prop:"module",label:"领域/模块",showOverflowTooltip:!0,minWidth:"120"},{prop:"plate",label:"板块",showOverflowTooltip:!0,minWidth:"100"},{prop:"platform",label:"平台",showOverflowTooltip:!0,minWidth:"100"},{prop:"series",label:"系列",showOverflowTooltip:!0,minWidth:"100"},{prop:"marketSegment",label:"细分市场",showOverflowTooltip:!0,minWidth:"120"},{prop:"projectName",label:"项目名称",showOverflowTooltip:!0,minWidth:"140"},{prop:"projectNumber",label:"项目编号",showOverflowTooltip:!0,minWidth:"120"},{prop:"status",label:"状态",customSlot:"status",align:"center",minWidth:"100",fixed:"right"},{prop:"options",label:"操作",customSlot:"options",align:"center",width:"160",fixed:"right"}],seqType:"seq",seqConfig:{fixed:!0},layout:"total, prev, pager, next, sizes"}}},created:function(){this.loadData()},methods:{handleCreate:function(){var e=this;this.dialogMode="create",this.currentRestartRow=null,this.createDialogVisible=!0,this.$nextTick((function(){e.$refs.createForm&&e.$refs.createForm.clearValidate()}))},handleRestart:function(e){var t=this;this.dialogMode="restart",this.currentRestartRow=e,this.createFormData={title:e.title||"",manufacturerName:e.manufacturerName||"",modelName:e.modelName||"",manufacturerAbbreviation:e.manufacturerAbbreviation||"",modelAbbreviation:e.modelAbbreviation||"",productNumber:e.productNumber||"",module:e.module||"",plate:e.plate||"",fileUrl:e.fileUrl||"",platform:e.platform||"",series:e.series||"",marketSegment:e.marketSegment||"",projectName:e.projectName||"",projectNumber:e.projectNumber||"",explanation:e.explanation||""},this.fileList=[],this.selectedFile=null,this.approvalWorkflowSteps=[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}],this.createDialogVisible=!0,this.$nextTick((function(){t.$refs.createForm&&t.$refs.createForm.clearValidate()}))},handleDialogClose:function(){this.createDialogVisible=!1,this.dialogMode="create",this.currentRestartRow=null,this.createFormData={title:"",manufacturerName:"",modelName:"",manufacturerAbbreviation:"",modelAbbreviation:"",productNumber:"",module:"",plate:"",fileUrl:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",explanation:""},this.fileList=[],this.selectedFile=null,this.approvalWorkflowSteps=[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}],this.$refs.createForm&&this.$refs.createForm.clearValidate()},handleFileChange:function(e,t){var r=[".doc",".pdf",".xls",".xlsx",".ppt",".pptx"],a=e.name.toLowerCase(),n=r.some((function(e){return a.endsWith(e)}));if(!n)return this.$message.error("不支持的文件类型,仅支持 .doc .pdf .xls .xlsx .ppt .pptx"),this.$refs.upload.handleRemove(e),!1;this.selectedFile=e&&e.raw?e.raw:null,this.fileList=t.slice(-1)},handleFileRemove:function(e,t){this.selectedFile=null,this.fileList=[]},handleFileUpload:function(){var e=this;if(this.uploading||!this.selectedFile)return this.selectedFile,Promise.resolve(null);var t=this.selectedFile,r=new FormData;r.append("file",t),r.append("createBy",pe());var a=q4(q4({},nt.TEST_FILE_UPLOAD),{},{params:r,disableSuccessMsg:!0});this.uploading=!0;var n=this.$loading({lock:!0,text:"正在上传文件,请稍候...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});return this.$upload(a,null,!1).then((function(t){console.log("文件上传成功:",t),n.close();var r="";if(t.data&&t){var a=t.data;r=a,e.createFormData.fileUrl=r}return r})).catch((function(t){throw console.error("文件上传失败:",t),n.close(),e.$message.error("文件上传失败,请重试"),t})).finally((function(){n&&n.close(),e.uploading=!1}))},handleSubmit:function(){var e=this;this.$refs.createForm.validate((function(t){if(!t)return!1;var r=function(){var t=W4(G4().mark((function t(){var r,a;return G4().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.selectedFile){t.next=13;break}return t.prev=1,t.next=4,e.handleFileUpload();case 4:r=t.sent,e.createFormData.fileUrl=r||"",t.next=13;break;case 8:return t.prev=8,t.t0=t["catch"](1),console.error("文件上传失败:",t.t0),e.$message.error("文件上传失败,请重试"),t.abrupt("return");case 13:a="restart"===e.dialogMode&&e.currentRestartRow?q4(q4({},nt.RESTART_REPORT_APPROVAL),{},{params:q4(q4({reportId:e.currentRestartRow.id||e.currentRestartRow.reportId},e.createFormData),{},{proofreadUsers:e.approvalWorkflowSteps[0].handlers,reviewUsers:e.approvalWorkflowSteps[1].handlers,countersignUsers:[],approveUsers:e.approvalWorkflowSteps[2].handlers,createBy:pe(),userId:pe()})}):q4(q4({},nt.ADD_REPORT),{},{params:q4(q4({},e.createFormData),{},{proofreadUsers:e.approvalWorkflowSteps[0].handlers,reviewUsers:e.approvalWorkflowSteps[1].handlers,countersignUsers:[],approveUsers:e.approvalWorkflowSteps[2].handlers,createBy:pe(),userId:pe()})}),e.$request(a).asyncThen((function(t){e.handleDialogClose(),e.loadData()})).asyncErrorCatch((function(t){console.error("提交失败:",t),e.$message.error(t.message||"提交失败")}));case 15:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(){return t.apply(this,arguments)}}();r()}))},handleRemoteSearch:function(e,t){var r=this.approvalWorkflowSteps[t];if(e&&""!==e.trim()){r.loading=!0;var a=e.trim(),n=q4(q4({},nt.GET_ALLUSERS),{},{params:{name:a},disableSuccessMsg:!0});this.$request(n).asyncThen((function(e){var t=e&&e.data,a=[];Array.isArray(t)?a=t:t&&Array.isArray(t.result)?a=t.result:t&&t.data&&Array.isArray(t.data)&&(a=t.data);var n=a.map((function(e){return{userId:e.userId||e.id,username:e.username||e.name,userNumber:e.userNumber||e.userId||e.id}})).filter((function(e){return e.userId&&e.userNumber})),i=new Set(r.handlers||[]),o=n.filter((function(e){return!i.has(e.userId)})),s=(r.options||[]).filter((function(e){return e.userId&&r.handlers&&r.handlers.includes(e.userId)})),l=new Map;s.forEach((function(e){e.userNumber&&l.set(e.userNumber,e)})),o.forEach((function(e){e.userNumber&&!l.has(e.userNumber)&&l.set(e.userNumber,e)})),r.options=Array.from(l.values()),r.loading=!1})).asyncErrorCatch((function(e){if(console.error("搜索人员失败:",e),r.handlers&&r.handlers.length>0){var t=r.options.filter((function(e){return r.handlers.includes(e.userId)}));r.options=t}else r.options=[];r.loading=!1}))}else if(r.handlers&&r.handlers.length>0){var i=r.options.filter((function(e){return r.handlers.includes(e.userId)})),o=r.handlers.filter((function(e){return!i.some((function(t){return t.userId===e}))}));o.length,r.options=i}else r.options=[]},handleHandlerChange:function(e,t){},handleDownloadTemplate:function(){},handleDownload:function(e){var t=document.createElement("a");t.href=e.filePath,t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t)},handlePreview:function(e){this.$message&&this.$message.info&&this.$message.info("预览:"+(e.title||""))},handleApprove:function(e){var t=this;this.currentApprovalRow=e,this.approvalFormData={result:"",opinion:""},this.approvalDialogVisible=!0,this.$nextTick((function(){t.$refs.approvalForm&&t.$refs.approvalForm.clearValidate()}))},handleApprovalDialogClose:function(){this.approvalDialogVisible=!1,this.approvalFormData={result:"",opinion:""},this.currentApprovalRow=null,this.$refs.approvalForm&&this.$refs.approvalForm.clearValidate()},handleApprovalSubmit:function(){var e=this;if(this.approvalFormData.result)if(this.currentApprovalRow){var t={flowId:this.currentApprovalRow.flowId,userId:pe(),result:this.approvalFormData.result,opinion:this.approvalFormData.opinion||""};this.approvalSubmitting=!0;var r=q4(q4({},nt.START_REPORT_APPROVAL),{},{params:t,disableSuccessMsg:!0});this.$request(r).asyncThen((function(t){e.approvalSubmitting=!1,e.handleApprovalDialogClose(),e.loadData(),e.approvalSubmitting=!1})).asyncErrorCatch((function(t){console.error("审批提交失败:",t),e.approvalSubmitting=!1,e.$message.error("审批提交失败,请重试")}))}else this.$message.error("缺少审批信息");else this.$message.warning("请选择审核结果(通过或退回)")},pageSizeChange:function(e){this.pagination.pageSize=e},rowClickEvent:function(e){console.warn(e)},handleRowView:function(e){var t=e.reportId||e.id;t?(this.currentReportDetail={reportId:t,flowId:e.flowId},this.showReportDetail=!0):this.$message.error("缺少报告ID,无法查看详情")},closeReportDetail:function(){this.showReportDetail=!1,this.currentReportDetail=null},handleReportDetailRefresh:function(){this.loadData(),this.closeReportDetail()},currentChange:function(e){this.pagination.currentPage=e,this.loadData()},selectDataChange:function(e){this.$emit("select-data-change",e)},resetSearch:function(){this.searchPanelValue={title:"",manufacturerName:"",modelName:"",productNumber:"",module:"",plate:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",status:""},this.handleSearch()},handleSearch:function(){this.loadData()},handleRefresh:function(){this.pagination.currentPage=1,this.handleSearch()},loadData:function(){var e=this,t={title:"",manufacturerName:"",modelName:"",productNumber:"",module:"",plate:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",status:""};Object.keys(t).forEach((function(r){void 0!==e.searchPanelValue[r]&&null!==e.searchPanelValue[r]&&(t[r]=e.searchPanelValue[r])}));var r=q4(q4({},nt.GET_REPORT_LIST),{},{params:q4({pageNumber:this.pagination.currentPage,pageSize:this.pagination.pageSize,createBy:pe()},t),disableSuccessMsg:!0});this.$request(r).asyncThen((function(t){e.tableData=t.data.result,e.pagination.total=t.data.count})).asyncErrorCatch((function(e){console.error("查询失败:",e)}))}}},J4=K4,Q4=(r("d906"),p(J4,b4,_4,!1,null,null,null)),e6=Q4.exports,t6=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"benchmark-report-tab tab-content"},[r("div",{staticClass:"page-search-panel"},[r("div",{staticClass:"search-fields"},[r("div",{staticClass:"search-row"},[r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("厂家")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchData.manufacturer,callback:function(t){e.$set(e.searchData,"manufacturer",t)},expression:"searchData.manufacturer"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("型号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchData.model,callback:function(t){e.$set(e.searchData,"model",t)},expression:"searchData.model"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("产品编号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchData.productNo,callback:function(t){e.$set(e.searchData,"productNo",t)},expression:"searchData.productNo"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("版块")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchData.module,callback:function(t){e.$set(e.searchData,"module",t)},expression:"searchData.module"}})],1)]),r("div",{staticClass:"search-row"},[r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("平台")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchData.platform,callback:function(t){e.$set(e.searchData,"platform",t)},expression:"searchData.platform"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("系列")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchData.series,callback:function(t){e.$set(e.searchData,"series",t)},expression:"searchData.series"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("细分市场")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchData.subMarket,callback:function(t){e.$set(e.searchData,"subMarket",t)},expression:"searchData.subMarket"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("项目名称")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchData.projectName,callback:function(t){e.$set(e.searchData,"projectName",t)},expression:"searchData.projectName"}})],1)]),r("div",{staticClass:"search-row"},[r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("项目编号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchData.projectNo,callback:function(t){e.$set(e.searchData,"projectNo",t)},expression:"searchData.projectNo"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("领域/模块")]),r("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.searchData.domain,callback:function(t){e.$set(e.searchData,"domain",t)},expression:"searchData.domain"}},[r("el-option",{attrs:{label:"选项1",value:"1"}}),r("el-option",{attrs:{label:"选项2",value:"2"}})],1)],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("标题")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchData.title,callback:function(t){e.$set(e.searchData,"title",t)},expression:"searchData.title"}})],1),r("div",{staticClass:"search-actions"},[r("el-button",{attrs:{type:"primary"},on:{click:e.handleSearch}},[e._v(" 查询 ")]),r("el-button",{on:{click:e.resetSearch}},[e._v(" 重置 ")])],1)])])]),r("div",{staticClass:"page-data-list"},[r("x-vxe-table",{ref:"reportTable",staticClass:"block-table",attrs:{border:!0,seqWidth:40,colConfigs:e.tableConfig.colConfigs,tableData:e.tableData,rowDraggable:e.tableConfig.rowDraggable,seqType:e.tableConfig.seqType,pagination:e.pagination,layout:e.tableConfig.layout,seqConfig:e.tableConfig.seqConfig,autoSize:e.tableConfig.autoSize,pageConfig:e.tableConfig.pageConfig},on:{"table-row-click":e.handleRowClick,"size-change":e.handlePageSizeChange,"current-page-change":e.handleCurrentChange,"select-data-change":e.handleSelectChange},scopedSlots:e._u([e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customSlot,fn:function(n){var i=n.row;return["options"===t.customSlot?r("div",{key:a,staticClass:"operation-links"},[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleQueryReport(i)}}},[e._v("查询")]),r("span",{staticStyle:{margin:"0 8px"}},[e._v("|")]),r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleDownloadReport(i)}}},[e._v("下载")])]):e._e()]}}}))],null,!0)},[r("template",{slot:"empty"},[r("div",{staticClass:"table-empty"},[r("x-empty-page")],1)])],2)],1)])},r6=[],a6={name:"BenchmarkReport",data:function(){return{searchData:{manufacturer:"",model:"",productNo:"",module:"",platform:"",series:"",subMarket:"",projectName:"",projectNo:"",domain:"",title:""},tableData:[],pagination:{currentPage:1,pageSize:10,total:0},selectedRows:[]}},computed:{tableConfig:function(){return{rowDraggable:!1,colConfigs:[{prop:"title",label:"标题",showOverflowTooltip:!0,minWidth:"100"},{prop:"manufacturerFullName",label:"厂家名称(全称)",showOverflowTooltip:!0,minWidth:"150"},{prop:"productFullName",label:"产品型号(全称)",showOverflowTooltip:!0,minWidth:"150"},{prop:"domain",label:"领域/模块",showOverflowTooltip:!0,minWidth:"120"},{prop:"productNo",label:"产品编号",showOverflowTooltip:!0,minWidth:"120"},{prop:"module",label:"板块",showOverflowTooltip:!0,minWidth:"100"},{prop:"platform",label:"平台",showOverflowTooltip:!0,minWidth:"100"},{prop:"series",label:"系列",showOverflowTooltip:!0,minWidth:"100"},{prop:"subMarket",label:"细分市场",showOverflowTooltip:!0,minWidth:"120"},{prop:"projectName",label:"项目名称",showOverflowTooltip:!0,minWidth:"120"},{prop:"projectNo",label:"项目编号",showOverflowTooltip:!0,minWidth:"120"},{prop:"uploadTime",label:"上传时间",showOverflowTooltip:!0,minWidth:"150"},{prop:"fileName",label:"文件名",showOverflowTooltip:!0,minWidth:"150"},{prop:"options",label:"操作",customSlot:"options",align:"center",width:"120",fixed:"right"}],seqType:"checkbox",seqConfig:{fixed:!0},layout:"total, prev, pager, next, jumper, sizes",autoSize:!1,pageConfig:{}}}},mounted:function(){this.loadData()},methods:{resetSearch:function(){this.searchData={manufacturer:"",model:"",productNo:"",module:"",platform:"",series:"",subMarket:"",projectName:"",projectNo:"",domain:"",title:""},this.handleSearch()},handleSearch:function(){this.loadData()},handleBatchDownload:function(){0!==this.selectedRows.length?this.$message({type:"info",message:"批量下载 ".concat(this.selectedRows.length," 个报告")}):this.$message({type:"warning",message:"请先选择要下载的报告"})},handleRowClick:function(e){this.$message({type:"info",message:"点击行: ".concat(e.title)})},handlePageSizeChange:function(e){this.pagination.pageSize=e,this.loadData()},handleCurrentChange:function(e){this.pagination.currentPage=e,this.loadData()},handleSelectChange:function(e){this.selectedRows=e},loadData:function(){for(var e=[],t=["Y1001","Y1002","Y1003","Y1004","Y1005","Y1006","Y1007","Y1008","Y1009","Y1010"],r=["XXXXXX","XXXX"],a=0;a<10;a++)e.push({id:a+1,title:t[a]||"Y".concat(1e3+a+1),manufacturerFullName:r[a%2]||"XXXXXX",productFullName:"-",domain:"-",productNo:"-",module:"-",platform:"-",series:"-",subMarket:"-",projectName:"-",projectNo:"-",uploadTime:"-",fileName:"XXXXX文件名".concat(a+1)});this.tableData=e}}},n6=a6,i6=(r("5c7a"),p(n6,t6,r6,!1,null,"1e4bdbcb",null)),o6=i6.exports;function s6(e){return s6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s6(e)}function l6(e){return d6(e)||p6(e)||u6(e)||c6()}function c6(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u6(e,t){if(e){if("string"===typeof e)return h6(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h6(e,t):void 0}}function p6(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function d6(e){if(Array.isArray(e))return h6(e)}function h6(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function f6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function m6(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f6(Object(r),!0).forEach((function(t){g6(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f6(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g6(e,t,r){return t=v6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v6(e){var t=y6(e,"string");return"symbol"===s6(t)?t:String(t)}function y6(e,t){if("object"!==s6(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==s6(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var b6={name:"CheckData",components:{ModelQuery:y4,BenchmarkReport:e6,AnalysisReport:o6},data:function(){return{activeTab:"model-query",favoritesValue:"",favoritesOptions:[{label:"常用1",value:"1"},{label:"常用2",value:"2"}],searchPanelValue:{projectName:"",modelName:"",productNumber:"",plate:"",platform:"",series:"",emission:"",burnType:"",engineCapacityMin:"",engineCapacityMax:""},xAxisOptions:[{label:"产品型号",value:"modelName"},{label:"状态代号",value:"productNumber"},{label:"项目名称",value:"projectName"},{label:"板块",value:"plate"},{label:"平台",value:"platform"},{label:"系列",value:"series"},{label:"排放",value:"emission"},{label:"燃烧类型",value:"burnType"},{label:"排量",value:"engineCapacity"}],yAxisParamOptions:[],yAxisParamsLoaded:!1,modelList:[],chartDataList:[],chartList:[],chartIdCounter:0,floatingPanelExpanded:!1,formulaDialogVisible:!1,currentFormulaChartIndex:-1,currentFormulaId:null,formulaFormData:{name:"",param1:"",operator:"+",param2:""},isResizing:!1,resizingChartIndex:-1,resizeStartY:0,resizeStartHeight:0,savedFormulas:[],formulaIdCounter:0,operatorOptions:[{label:"+",value:"+"},{label:"-",value:"-"},{label:"*",value:"*"},{label:"/",value:"/"}]}},computed:{isFormulaValid:function(){return!!(this.formulaFormData.name&&this.formulaFormData.name.trim()&&this.formulaFormData.param1&&this.formulaFormData.param2&&this.formulaFormData.operator&&this.formulaFormData.param1!==this.formulaFormData.param2)},availableModels:function(){var e=new Map;return this.modelList&&this.modelList.length>0&&this.modelList.forEach((function(t){e.set(t.id,{label:t.name||t.modelName||t.id,value:t.id})})),this.chartList.forEach((function(t){t.selectedModel&&Array.isArray(t.selectedModel)&&t.selectedModel.forEach((function(t){e.has(t)||e.set(t,{label:t,value:t})}))})),Array.from(e.values())}},watch:{activeTab:{immediate:!0,handler:function(e,t){var r=this;"statistics"===e?(window.addEventListener("resize",this.handleResize),this.loadYAxisParams(),this.$nextTick((function(){r.chartList.forEach((function(e,t){e.chartInstance?e.chartInstance.resize():r.initChart(t)}))}))):"statistics"===t&&(window.removeEventListener("resize",this.handleResize),this.cleanupResizeListeners(),this.disposeAllCharts())}}},beforeDestroy:function(){window.removeEventListener("resize",this.handleResize),this.cleanupResizeListeners(),this.disposeAllCharts()},mounted:function(){},methods:{loadYAxisParams:function(){var e=this,t=m6(m6({},$e.GET_CHECK_DATA_Y_DATA),{},{params:{},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){console.log("Y轴参数数据:",t),t&&t.data?(Array.isArray(t.data)?e.yAxisParamOptions=t.data.map((function(e){return{label:e.name||e.label||e.parameterName||e,value:e.value||e.id||e.parameterName||e}})):t.data&&Array.isArray(t.data)?e.yAxisParamOptions=t.data.map((function(e){return{label:e,value:e}})):e.yAxisParamOptions=[],e.yAxisParamsLoaded=!0):e.yAxisParamOptions=[]})).asyncErrorCatch((function(t){console.error("获取Y轴参数失败:",t),e.yAxisParamOptions=[]}))},handleTabClick:function(e){console.log("切换到tab:",e.name),"statistics"===e.name&&(this.loadYAxisParams(),this.handleSearch())},handleAddChart:function(){var e=this,t={id:this.chartIdCounter++,title:"自定义标题",isEditingTitle:!1,chartType:"line",xAxis:this.xAxisOptions.length>0?this.xAxisOptions[0].value:"",yAxisParam:this.yAxisParamOptions.length>0?[this.yAxisParamOptions[0].value]:[],yAxisFormula:"",yAxisMin:0,yAxisMax:100,chartHeight:400,customPointX:null,customPointY:null,scatterTrendline:!1,chartInstance:null,formulaItems:[],selectedModel:[],chartDataList:[]};this.chartList.unshift(t),this.$nextTick((function(){e.initChart(0)}))},toggleFloatingPanel:function(){this.floatingPanelExpanded=!this.floatingPanelExpanded},scrollToTop:function(){var e=document.querySelector(".statistics-tab");e?e.scrollTo({top:0,behavior:"smooth"}):window.scrollTo({top:0,behavior:"smooth"})},handleDeleteChart:function(e){var t=this.chartList[e];null!==t&&void 0!==t&&t.chartInstance&&(t.chartInstance.dispose(),t.chartInstance=null),this.chartList.splice(e,1)},handleClearAllCharts:function(){this.disposeAllCharts(),this.chartList=[],this.floatingPanelExpanded=!1},handleSearch:function(){var e=this,t=m6(m6({},$e.GET_CHECK_LIST),{},{params:m6(m6({},this.searchPanelValue),{},{engineCapacityMin:this.searchPanelValue.engineCapacityMin?this.searchPanelValue.engineCapacityMin:void 0,engineCapacityMax:this.searchPanelValue.engineCapacityMax?this.searchPanelValue.engineCapacityMax:void 0}),disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){if(console.log(t),t&&t.data){var r=new Set;e.chartList.forEach((function(e){e.selectedModel&&Array.isArray(e.selectedModel)&&e.selectedModel.forEach((function(e){return r.add(e)}))}));var a=Array.isArray(t.data)?t.data:[],n=new Map;e.modelList&&e.modelList.length>0&&e.modelList.forEach((function(e){r.has(e.id)&&n.set(e.id,e)}));var i=l6(a);r.forEach((function(e){!a.find((function(t){return t.id===e}))&&n.has(e)&&i.push(n.get(e))})),e.modelList=i,e.chartDataList=[],e.yAxisParamsLoaded=!1,e.loadYAxisParams()}})).asyncErrorCatch((function(e){console.error("查询失败:",e)}))},resetSearch:function(){this.searchPanelValue={projectName:"",modelName:"",plate:"",platform:"",series:"",emission:"",burnType:"",engineCapacityMin:"",engineCapacityMax:""},this.modelList=[],this.chartDataList=[],this.yAxisParamOptions=[],this.chartList.forEach((function(e){e.selectedModel=[],e.chartDataList=[]}))},initChart:function(e){var t=this.chartList[e];if(t){t.chartHeight||(t.chartHeight=400);var r="chartContainer-".concat(e),a=this.$refs[r];if(a&&(!Array.isArray(a)||a[0])){var n=Array.isArray(a)?a[0]:a;t.chartInstance=ND(n),this.updateChart(e)}}},handleResize:function(){this.chartList.forEach((function(e){e.chartInstance&&e.chartInstance.resize()}))},handleChartModelQuery:function(e){var t=this,r=this.chartList[e];if(r)if(r.selectedModel&&0!==r.selectedModel.length){var a=m6(m6({},$e.GET_CHECK_DATA_CHARTS),{},{params:r.selectedModel,disableSuccessMsg:!0});this.$request(a).asyncThen((function(a){if(console.log(a),a&&a.data){var n=[];if(a.data.paramList&&Array.isArray(a.data.paramList)?n=a.data.paramList.map((function(e){return{label:e,value:e}})):Array.isArray(a.data)&&(n=a.data.map((function(e){return{label:e.name||e.label||e.parameterName||e,value:e.value||e.id||e.parameterName||e}}))),n.length>0){var i=new Map;t.yAxisParamOptions.forEach((function(e){i.set(e.value,e)})),n.forEach((function(e){i.has(e.value)||i.set(e.value,e)})),t.yAxisParamOptions=Array.from(i.values())}r.chartDataList=a.data.pojos||[],t.updateChart(e)}})).asyncErrorCatch((function(e){console.error("查询失败:",e),t.$message.error("查询失败,请重试")}))}else this.$message.warning("请先选择机型")},handleChartModelReset:function(e){var t=this.chartList[e];t&&(t.selectedModel=[],this.updateChart(e))},updateChart:function(e){var t=this,r=this.chartList[e];if(r&&r.chartInstance){"undefined"===typeof r.scatterTrendline&&this.$set(r,"scatterTrendline",!1);var a=r.xAxis||"",n=this.xAxisOptions.find((function(e){return e.value===a})),i=n?n.label:"",o=[],s=new Map,l=r.chartDataList||[];if(l&&l.length>0&&(l.forEach((function(e){var t="";if("projectName"===a?t=e.projectName||"":"modelName"===a?t=e.modelName||"":"plate"===a?t=e.plate||"":"platform"===a?t=e.platform||"":"series"===a?t=e.series||"":"emission"===a?t=e.emission||"":"burnType"===a?t=e.burnType||"":"engineCapacity"===a&&(t=e.engineCapacity||""),t)if(s.has(t)){var r=s.get(t);r.parameters=r.parameters.concat(e.pojos||[])}else s.set(t,{xValue:t,parameters:e.pojos||[]})})),o=Array.from(s.keys())),0===o.length&&"engineCapacity"===a){var c=this.searchPanelValue.engineCapacityMin||0,u=this.searchPanelValue.engineCapacityMax||100,p=(u-c)/10;o=[];for(var d=0;d<=10;d++){var h=c+p*d;o.push(h.toFixed(1))}}var f=Array.isArray(r.yAxisParam)?r.yAxisParam:[],m={},g=o.length<this.chartDataList.length;f.forEach((function(e){var t=[];o.forEach((function(r){var a=null;if(s.has(r)){var n=s.get(r),i=n.parameters.filter((function(t){return t.parameterName===e}));if(i&&i.length>0)if(g){var o=0,l=!1;i.forEach((function(e){if(void 0!==e.parameterValue&&null!==e.parameterValue){var t=parseFloat(e.parameterValue);isNaN(t)||(o+=t,l=!0)}})),a=l?o:null}else{var c=i[0];if(void 0!==c.parameterValue&&null!==c.parameterValue){var u=parseFloat(c.parameterValue);a=isNaN(u)?c.parameterValue:u}}}t.push(null===a||void 0===a?0:a)})),m[e]=t}));var v=[],y=[],b=r.chartType,_="scatter"===b,x="bar"===b,w="pie"===b,S=_&&!!r.scatterTrendline,D=null;if(r.yAxisFormula){var C=this.savedFormulas.find((function(e){return e.id===r.yAxisFormula}));C&&C.param1&&C.param2&&C.operator&&(D=this.calculateFormula(C,o,s,g),D&&D.length>0&&(D=D.map((function(e){return null===e||void 0===e?0:e}))))}if(o.length>0&&f.length>0){var T=o.map((function(e,t){return t})),I=m[f[0]]||[];T.sort((function(e,t){var r=I[e]||0,a=I[t]||0;return a-r})),o=T.map((function(e){return o[e]})),f.forEach((function(e){var t=m[e]||[];m[e]=T.map((function(e){return t[e]||0}))})),D&&D.length>0&&(D=T.map((function(e){return D[e]||0})))}var O=function(e){var r=t.yAxisParamOptions.find((function(t){return t.value===e}));return r?r.label:e};if(w){var M=[],A=["#67C23A","#E6A23C","#F56C6C","#409EFF","#909399"];f.forEach((function(e,t){var r=m[e]||[],a=r.length>0?r.reduce((function(e,t){return e+(t||0)}),0)/r.length:0,n=O(e);M.push({value:a,name:n}),y.push(n)}));var k={title:{show:!1},tooltip:{trigger:"item",formatter:function(e){var t=parseFloat(e.value).toFixed(2);return"".concat(e.seriesName,"<br/>").concat(e.name,": ").concat(t," ")}},legend:{data:y,top:0,left:"center"},series:[{name:"数据分布",type:"pie",radius:["40%","70%"],avoidLabelOverlap:!1,itemStyle:{borderRadius:10,borderColor:"#fff",borderWidth:2},label:{show:!0,formatter:function(e){return"".concat(e.name,": ").concat(parseFloat(e.value).toFixed(2),"%")}},emphasis:{label:{show:!0,fontSize:"16",fontWeight:"bold"}},labelLine:{show:!0},data:M.map((function(e,t){return m6(m6({},e),{},{itemStyle:{color:A[t%A.length]}})}))}]};r.chartInstance.setOption(k,!0)}else{var P=["#67C23A","#E6A23C","#F56C6C","#409EFF","#909399","#E4E7ED","#C0C4CC"],N=["circle","rect","triangle","diamond","pin","arrow"];if(f.forEach((function(e,t){var r=m[e]||[],a=O(e),n=P[t%P.length],i=N[t%N.length],o={name:a,type:x?"bar":_?"scatter":"line",data:r,symbol:_?i:"circle",symbolSize:_?8:6,itemStyle:{color:n},lineStyle:{color:n,width:2}};v.push(o),y.push(a),S&&(v.push({name:"趋势线 (".concat(a,")"),type:"line",data:r,lineStyle:{color:n,type:"solid",width:2},symbol:"none",smooth:!0}),y.push("趋势线 (".concat(a,")")))})),D&&D.length>0){for(var E=[],R=0;R<o.length;R++)if(R<D.length){var L=D[R];E.push(null===L||void 0===L||isNaN(L)?0:L)}else E.push(0);var j=this.savedFormulas.find((function(e){return e.id===r.yAxisFormula})),F=j?j.name:"公式",V={name:F,type:"bar"===b?"bar":"scatter"===b?"scatter":"line",data:E,itemStyle:{color:"#F56C6C"}};"bar"===b||("line"===b?(V.lineStyle={color:"#F56C6C",type:"dashed",width:2},V.symbol="circle",V.symbolSize=6):"scatter"===b&&(V.symbol="diamond",V.symbolSize=8)),v.push(V),y.push(F)}if(null!==r.customPointX&&""!==r.customPointX&&null!==r.customPointY&&""!==r.customPointY){var z=r.customPointX,B=r.customPointY,$=o.findIndex((function(e){return"engineCapacity"===a?Math.abs(parseFloat(e)-parseFloat(z))<.1:e===z||e.toString()===z.toString()})),G=null!==r.yAxisMin&&""!==r.yAxisMin?r.yAxisMin:0,U=null!==r.yAxisMax&&""!==r.yAxisMax?r.yAxisMax:100;if(-1!==$&&B>=G&&B<=U){for(var W=[],H=0;H<o.length;H++)H===$?W.push(B):W.push(null);v.push({name:"自定义点",type:"scatter",data:W,symbol:"circle",symbolSize:12,itemStyle:{color:"#409EFF"},zlevel:10}),y.push("自定义点")}}var q={title:{show:!1},tooltip:{trigger:"axis",axisPointer:{type:"cross"},formatter:function(e){if(Array.isArray(e)){var t="".concat(e[0].axisValue,"<br/>");return e.forEach((function(e){void 0!==e.value&&null!==e.value&&""!==e.value&&(t+="".concat(e.marker).concat(e.seriesName,": ").concat(e.value,"<br/>"))})),t}return void 0!==e.value&&null!==e.value&&""!==e.value?"".concat(e.seriesName,"<br/>").concat(e.marker).concat(e.name,": ").concat(e.value):""}},legend:{data:y,top:0,left:"center"},grid:{left:"3%",right:"60px",bottom:"15%",top:y.length>0?"15%":"3%",containLabel:!0},dataZoom:[{type:"slider",xAxisIndex:0,start:0,end:100,bottom:10,height:20,handleIcon:"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.2,10.8,24.1,24.1,24.1C44.2,51.7,55,40.8,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.6-0.4,1-1,1H26c-0.6,0-1-0.4-1-1s0.4-1,1-1h9.9C36.5,34.8,36.9,35.2,36.9,35.8z",handleSize:"80%",handleStyle:{color:"#fff",shadowBlur:3,shadowColor:"rgba(0, 0, 0, 0.6)",shadowOffsetX:2,shadowOffsetY:2},textStyle:{color:"#333"},borderColor:"#ccc",fillerColor:"rgba(64, 158, 255, 0.2)",dataBackground:{lineStyle:{color:"#409EFF",width:1},areaStyle:{color:"rgba(64, 158, 255, 0.1)"}},selectedDataBackground:{lineStyle:{color:"#409EFF",width:2},areaStyle:{color:"rgba(64, 158, 255, 0.3)"}}},{type:"inside",xAxisIndex:0,start:0,end:100}],xAxis:{type:"category",data:o,name:i,nameTextStyle:{color:"#000"},boundaryGap:!!x||[.05,.05],axisLabel:{color:"#000"},axisLine:{lineStyle:{color:"#DCDFE6"}},axisTick:{show:!1},splitLine:{show:!0,lineStyle:{type:"dashed",color:"#E4E7ED"}}},yAxis:function(){var e=null!==r.yAxisMin&&""!==r.yAxisMin?r.yAxisMin:0,t=null!==r.yAxisMax&&""!==r.yAxisMax?r.yAxisMax:100,a=t-e,n=a>0?Math.ceil(a/9):void 0;return{type:"value",min:e,max:t,splitNumber:9,maxInterval:n,axisLabel:{formatter:"{value}",color:"#000"},axisLine:{lineStyle:{color:"#DCDFE6"}},splitLine:{show:!0,lineStyle:{type:"dashed",color:"#E4E7ED"}}}}(),series:v};r.chartInstance.setOption(q,!0)}}},getDefaultXAxisData:function(e){switch(e){case"projectName":return["项目1","项目2","项目3","项目4","项目5"];case"modelName":return["型号1","型号2","型号3","型号4","型号5"];case"plate":return["板块1","板块2","板块3","板块4","板块5"];case"platform":return["平台1","平台2","平台3","平台4","平台5"];case"series":return["系列1","系列2","系列3","系列4","系列5"];case"emission":return["排放1","排放2","排放3","排放4","排放5"];case"burnType":return["类型1","类型2","类型3","类型4","类型5"];case"engineCapacity":return["1.0","1.5","2.0","2.5","3.0","3.5","4.0","4.5","5.0"];default:return["数据1","数据2","数据3","数据4","数据5"]}},generateParamData:function(e,t){for(var r=t.charCodeAt?t.charCodeAt(0)%100:50,a=[],n=0;n<e;n++){var i=r+20*Math.sin(.5*n)+10*Math.random();a.push(Math.round(100*i)/100)}return a},hexToRgba:function(e,t){var r=parseInt(e.slice(1,3),16),a=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16);return"rgba(".concat(r,", ").concat(a,", ").concat(n,", ").concat(t,")")},getCustomPointXPlaceholder:function(e){if(!e||!e.xAxis)return"X坐标";var t=this.xAxisOptions.find((function(t){return t.value===e.xAxis})),r=t?t.label:"";return"X坐标(".concat(r,")")},handleFormulaSelectChange:function(e){var t=this.chartList[e];t&&this.updateChart(e)},startEditTitle:function(e){var t=this,r=this.chartList[e];r&&(r.isEditingTitle=!0,this.$nextTick((function(){var r="titleInput-".concat(e),a=t.$refs[r];if(a){var n=Array.isArray(a)?a[0]:a;n&&n.$el&&n.$el.querySelector("input")&&n.$el.querySelector("input").focus()}})))},getFormulaPreview:function(){var e,t,r,a=this;if(!this.formulaFormData.param1||!this.formulaFormData.param2||!this.formulaFormData.operator)return"请选择参数和运算符";var n=(null===(e=this.yAxisParamOptions.find((function(e){return e.value===a.formulaFormData.param1})))||void 0===e?void 0:e.label)||this.formulaFormData.param1,i=(null===(t=this.yAxisParamOptions.find((function(e){return e.value===a.formulaFormData.param2})))||void 0===t?void 0:t.label)||this.formulaFormData.param2,o=(null===(r=this.operatorOptions.find((function(e){return e.value===a.formulaFormData.operator})))||void 0===r?void 0:r.label)||this.formulaFormData.operator;return"".concat(n," ").concat(o," ").concat(i)},handleEditFormula:function(e){this.currentFormulaChartIndex=e;var t=this.chartList[e];if(t){if(t.yAxisFormula){var r=this.savedFormulas.find((function(e){return e.id===t.yAxisFormula}));r?(this.currentFormulaId=r.id,this.formulaFormData={name:r.name||"",param1:r.param1||"",operator:r.operator||"+",param2:r.param2||""}):(this.currentFormulaId=null,this.formulaFormData={name:"",param1:"",operator:"+",param2:""})}else this.currentFormulaId=null,this.formulaFormData={name:"",param1:"",operator:"+",param2:""};this.formulaDialogVisible=!0}},handleSaveFormula:function(){if(this.isFormulaValid){var e=this.currentFormulaId;if(e){var t=this.savedFormulas.findIndex((function(t){return t.id===e}));t>=0&&(this.savedFormulas[t]=m6(m6({},this.savedFormulas[t]),{},{name:this.formulaFormData.name.trim(),param1:this.formulaFormData.param1,operator:this.formulaFormData.operator,param2:this.formulaFormData.param2}))}else e="formula_".concat(this.formulaIdCounter++),this.savedFormulas.push({id:e,name:this.formulaFormData.name.trim(),param1:this.formulaFormData.param1,operator:this.formulaFormData.operator,param2:this.formulaFormData.param2});if(this.currentFormulaChartIndex>=0){var r=this.chartList[this.currentFormulaChartIndex];r&&(r.yAxisFormula=e,this.updateChart(this.currentFormulaChartIndex))}this.handleFormulaDialogClose()}else this.$message.warning("请完整填写公式信息,且两个参数不能相同")},handleFormulaDialogClose:function(){this.formulaDialogVisible=!1,this.currentFormulaChartIndex=-1,this.currentFormulaId=null,this.formulaFormData={name:"",param1:"",operator:"+",param2:""}},calculateFormula:function(e,t,r){var a=this,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e||!e.param1||!e.param2||!e.operator)return[];var i=[];return t.forEach((function(t){var o=null;try{var s=a.getParamValueFromData(e.param1,t,r,n),l=a.getParamValueFromData(e.param2,t,r,n);if(null!==s&&void 0!==s&&null!==l&&void 0!==l){var c=parseFloat(s),u=parseFloat(l);if(!isNaN(c)&&!isNaN(u))switch(e.operator){case"+":o=c+u;break;case"-":o=c-u;break;case"*":o=c*u;break;case"/":o=0!==u?c/u:null;break;default:o=null}}}catch(p){console.error("计算公式失败:",p),o=null}i.push(o)})),i},getParamValueFromData:function(e,t,r){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!r||!r.has(t))return null;var n=r.get(t);if(!n||!n.parameters)return null;var i=n.parameters.filter((function(t){return t.parameterName===e}));if(!i||0===i.length)return null;if(a&&i.length>1){var o=0,s=!1;return i.forEach((function(e){if(void 0!==e.parameterValue&&null!==e.parameterValue){var t=parseFloat(e.parameterValue);isNaN(t)||(o+=t,s=!0)}})),s?o:null}var l=i[0];return l&&void 0!==l.parameterValue&&null!==l.parameterValue?l.parameterValue:null},startResize:function(e,t){t.preventDefault(),t.stopPropagation(),this.isResizing=!0,this.resizingChartIndex=e,this.resizeStartY=t.clientY;var r=this.chartList[e];this.resizeStartHeight=(null===r||void 0===r?void 0:r.chartHeight)||400,document.addEventListener("mousemove",this.doResize),document.addEventListener("mouseup",this.stopResize),document.body.style.cursor="row-resize",document.body.style.userSelect="none"},doResize:function(e){if(this.isResizing){var t=e.clientY-this.resizeStartY,r=this.resizeStartHeight+t,a=200,n=this.chartList[this.resizingChartIndex];n&&(n.chartHeight=Math.max(r,a),this.$nextTick((function(){n.chartInstance&&n.chartInstance.resize()})))}},stopResize:function(){this.cleanupResizeListeners()},cleanupResizeListeners:function(){document.removeEventListener("mousemove",this.doResize),document.removeEventListener("mouseup",this.stopResize),document.body.style.cursor="",document.body.style.userSelect="",this.isResizing=!1,this.resizingChartIndex=-1},disposeAllCharts:function(){this.chartList.forEach((function(e){e.chartInstance&&(e.chartInstance.dispose(),e.chartInstance=null)}))}}},_6=b6,x6=(r("3de8"),r("4e96"),p(_6,ya,ba,!1,null,"7bf7f84c",null)),w6=x6.exports,S6=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"apaas-custom-report-check custom-page"},[r("div",{staticClass:"page-search-panel"},[r("el-form",{staticClass:"search-list"},[r("el-form-item",{staticClass:"search-component",attrs:{label:"厂家:"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.manufacturer,callback:function(t){e.$set(e.searchPanelValue,"manufacturer",t)},expression:"searchPanelValue.manufacturer"}})],1),r("el-form-item",{staticClass:"search-component",attrs:{label:"型号:"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.model,callback:function(t){e.$set(e.searchPanelValue,"model",t)},expression:"searchPanelValue.model"}})],1),r("el-form-item",{staticClass:"search-component",attrs:{label:"产品编号:"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.productNo,callback:function(t){e.$set(e.searchPanelValue,"productNo",t)},expression:"searchPanelValue.productNo"}})],1),r("el-form-item",{staticClass:"search-component",attrs:{label:"板块:"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.module,callback:function(t){e.$set(e.searchPanelValue,"module",t)},expression:"searchPanelValue.module"}})],1),r("el-form-item",{staticClass:"search-component",attrs:{label:"平台:"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.platform,callback:function(t){e.$set(e.searchPanelValue,"platform",t)},expression:"searchPanelValue.platform"}})],1),r("el-form-item",{staticClass:"search-component",attrs:{label:"系列:"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.series,callback:function(t){e.$set(e.searchPanelValue,"series",t)},expression:"searchPanelValue.series"}})],1),r("el-form-item",{staticClass:"search-component",attrs:{label:"细分市场:"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.segmentMarket,callback:function(t){e.$set(e.searchPanelValue,"segmentMarket",t)},expression:"searchPanelValue.segmentMarket"}})],1),r("el-form-item",{staticClass:"search-component",attrs:{label:"项目名称:"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.projectName,callback:function(t){e.$set(e.searchPanelValue,"projectName",t)},expression:"searchPanelValue.projectName"}})],1),r("el-form-item",{staticClass:"search-component",attrs:{label:"项目编号:"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.projectNo,callback:function(t){e.$set(e.searchPanelValue,"projectNo",t)},expression:"searchPanelValue.projectNo"}})],1),r("el-form-item",{staticClass:"search-component",attrs:{label:"领域/模块:"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.fieldModule,callback:function(t){e.$set(e.searchPanelValue,"fieldModule",t)},expression:"searchPanelValue.fieldModule"}})],1),r("el-form-item",{staticClass:"search-component",attrs:{label:"标题:"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.title,callback:function(t){e.$set(e.searchPanelValue,"title",t)},expression:"searchPanelValue.title"}})],1)],1),r("div",{staticClass:"search-button-group"},[r("el-button",{on:{click:e.resetSearch}},[e._v(" 重置 ")]),r("el-button",{attrs:{type:"primary"},on:{click:e.handleSearch}},[e._v(" 查询 ")]),r("span",{staticClass:"search-tip"},[e._v("//只展示审批完成的数据")])],1)],1),r("div",{staticClass:"page-data-list"},[r("x-vxe-table",{ref:"vxeTable",staticClass:"block-table",attrs:{border:!0,seqWidth:40,colConfigs:e.tableConfig.colConfigs,tableData:e.tableData,rowDraggable:e.tableConfig.rowDraggable,seqType:e.tableConfig.seqType,pagination:e.pagination,layout:e.tableConfig.layout,seqConfig:e.tableConfig.seqConfig,autoSize:e.tableConfig.autoSize,pageConfig:e.tableConfig.pageConfig},on:{"table-row-click":e.rowClickEvent,"size-change":e.pageSizeChange,"current-page-change":e.currentChange,"select-data-change":e.selectDataChange},scopedSlots:e._u([e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customSlot,fn:function(n){var i=n.row,o=n.rowIndex;return["fileName"===t.customSlot?r("div",{key:a+""+o},[i.fileName?r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleFileClick(i)}}},[e._v(e._s(i.fileName))]):e._e()]):e._e(),"operation"===t.customSlot?r("div",{key:a+""+o},[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleDownload(i)}}},[e._v("下载")])]):e._e()]}}}))],null,!0)},[r("template",{slot:"empty"},[r("div",{staticClass:"table-empty"},[r("x-empty-page")],1)])],2)],1)])},D6=[],C6={name:"ReportCheck",data:function(){return{searchPanelValue:{manufacturer:"",model:"",productNo:"",module:"",platform:"",series:"",segmentMarket:"",projectName:"",projectNo:"",fieldModule:"",title:""},tableData:[],pagination:{currentPage:1,pageSize:10,total:0}}},computed:{tableConfig:function(){return{rowDraggable:!1,colConfigs:[{prop:"title",label:"标题",showOverflowTooltip:!0,minWidth:"120"},{prop:"manufacturerName",label:"厂家名称(全称)",showOverflowTooltip:!0,minWidth:"150"},{prop:"productModel",label:"产品型号(全称)",showOverflowTooltip:!0,minWidth:"150"},{prop:"fieldModule",label:"领域/模块",showOverflowTooltip:!0,minWidth:"120"},{prop:"productNo",label:"产品编号",showOverflowTooltip:!0,minWidth:"120"},{prop:"module",label:"板块",showOverflowTooltip:!0,minWidth:"100"},{prop:"platform",label:"平台",showOverflowTooltip:!0,minWidth:"100"},{prop:"series",label:"系列",showOverflowTooltip:!0,minWidth:"100"},{prop:"segmentMarket",label:"细分市场",showOverflowTooltip:!0,minWidth:"120"},{prop:"projectName",label:"项目名称",showOverflowTooltip:!0,minWidth:"140"},{prop:"projectNo",label:"项目编号",showOverflowTooltip:!0,minWidth:"120"},{prop:"uploadTime",label:"上传时间",showOverflowTooltip:!0,minWidth:"150"},{prop:"fileName",label:"文件名",customSlot:"fileName",showOverflowTooltip:!0,minWidth:"150"},{prop:"operation",label:"操作",customSlot:"operation",align:"center",width:"80",fixed:"right"}],seqType:"",seqConfig:{},layout:"total, prev, pager, next, sizes, jumper",pageConfig:{}}}},created:function(){this.loadData()},methods:{pageSizeChange:function(e){this.pagination.pageSize=e,this.pagination.currentPage=1,this.loadData()},rowClickEvent:function(e){console.warn(e)},handleFileClick:function(e){this.$message&&this.$message.info&&this.$message.info("点击文件名:"+(e.fileName||""))},handleDownload:function(e){this.$message&&this.$message.info&&this.$message.info("下载:"+(e.fileName||""))},currentChange:function(e){this.pagination.currentPage=e,this.loadData()},selectDataChange:function(e){this.$emit("select-data-change",e)},resetSearch:function(){this.searchPanelValue={manufacturer:"",model:"",productNo:"",module:"",platform:"",series:"",segmentMarket:"",projectName:"",projectNo:"",fieldModule:"",title:""},this.handleSearch()},handleSearch:function(){this.pagination.currentPage=1,this.loadData()},loadData:function(){var e=this.tableConfig.colConfigs,t=e.filter((function(e){return e.prop&&"operation"!==e.prop})).map((function(e){return e.prop}));this.tableData=Array.from({length:50},(function(e,r){var a={};return t.forEach((function(e){switch(e){case"title":a[e]="XXXX";break;case"manufacturerName":a[e]=r%2===0?"XXXXXXXX":"XXXXX";break;case"productModel":a[e]="";break;case"fieldModule":a[e]="";break;case"productNo":a[e]="";break;case"module":a[e]="";break;case"platform":a[e]="";break;case"series":a[e]="";break;case"segmentMarket":a[e]="";break;case"projectName":a[e]="";break;case"projectNo":a[e]="";break;case"uploadTime":var t=new Date;t.setDate(t.getDate()-r),a[e]=t.toLocaleDateString("zh-CN").replace(/\//g,"-")+" "+t.toLocaleTimeString("zh-CN",{hour12:!1}).slice(0,8);break;case"fileName":a[e]=r%3===2?"":"XXXXXX文件名";break;default:a[e]=""}})),a}));var r=(this.pagination.currentPage-1)*this.pagination.pageSize,a=r+this.pagination.pageSize;this.tableData=this.tableData.slice(r,a),this.pagination.total=50}}},T6=C6,I6=(r("cb20"),p(T6,S6,D6,!1,null,"9b434c4a",null)),O6=I6.exports,M6=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"apaas-custom-page-mydemo custom-page"},[e.showReportDetail?r("report-detail",{attrs:{detail:e.currentReportDetail,"from-todo":e.fromTodo,"can-resend":e.canResend},on:{close:e.closeReportDetail,refresh:e.handleReportDetailRefresh}}):[r("div",{staticClass:"page-header"},[r("div",{staticClass:"title"},[e._v(" 对标报告 ")]),r("div",{staticClass:"operation"},[e.hasReportEditPermission()?r("el-button",{attrs:{type:"primary"},on:{click:e.handleCreate}},[e._v(" 新增 ")]):e._e()],1)]),r("div",{staticClass:"page-search-panel"},[r("div",{staticClass:"searched-fields"},[r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("厂家")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.manufacturerName,callback:function(t){e.$set(e.searchPanelValue,"manufacturerName",t)},expression:"searchPanelValue.manufacturerName"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("型号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.modelName,callback:function(t){e.$set(e.searchPanelValue,"modelName",t)},expression:"searchPanelValue.modelName"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("产品编号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.productNumber,callback:function(t){e.$set(e.searchPanelValue,"productNumber",t)},expression:"searchPanelValue.productNumber"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("板块")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.plate,callback:function(t){e.$set(e.searchPanelValue,"plate",t)},expression:"searchPanelValue.plate"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("平台")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.platform,callback:function(t){e.$set(e.searchPanelValue,"platform",t)},expression:"searchPanelValue.platform"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("系列")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.series,callback:function(t){e.$set(e.searchPanelValue,"series",t)},expression:"searchPanelValue.series"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("细分市场")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.marketSegment,callback:function(t){e.$set(e.searchPanelValue,"marketSegment",t)},expression:"searchPanelValue.marketSegment"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("项目名称")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.projectName,callback:function(t){e.$set(e.searchPanelValue,"projectName",t)},expression:"searchPanelValue.projectName"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("项目编号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.projectNumber,callback:function(t){e.$set(e.searchPanelValue,"projectNumber",t)},expression:"searchPanelValue.projectNumber"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("领域/模块")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.module,callback:function(t){e.$set(e.searchPanelValue,"module",t)},expression:"searchPanelValue.module"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("状态")]),r("el-select",{attrs:{clearable:"",filterable:"",placeholder:"请选择"},model:{value:e.searchPanelValue.status,callback:function(t){e.$set(e.searchPanelValue,"status",t)},expression:"searchPanelValue.status"}},e._l(e.statusOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.label,value:e.id}})})),1)],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("标题")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.title,callback:function(t){e.$set(e.searchPanelValue,"title",t)},expression:"searchPanelValue.title"}})],1),r("div",{staticClass:"search-actions"},[r("el-button",{attrs:{type:"primary"},on:{click:e.handleSearch}},[e._v(" 查询 ")]),r("el-button",{on:{click:e.resetSearch}},[e._v(" 重置 ")])],1)])]),r("div",{staticClass:"page-data-list"},[r("x-vxe-table",{ref:"vxeTable",staticClass:"block-table",attrs:{border:!0,seqWidth:40,colConfigs:e.tableConfig.colConfigs,tableData:e.tableData,rowDraggable:e.tableConfig.rowDraggable,seqType:e.tableConfig.seqType,pagination:e.pagination,layout:e.tableConfig.layout,seqConfig:e.tableConfig.seqConfig,autoSize:e.tableConfig.autoSize,pageConfig:e.tableConfig.pageConfig},on:{"table-row-click":e.rowClickEvent,"size-change":e.pageSizeChange,"current-page-change":e.currentChange,"select-data-change":e.selectDataChange},scopedSlots:e._u([e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customHeadSlot,fn:function(n){var i=n.column;return[t.customHeadSlot?r("div",{key:a},[e._v(" "+e._s(i)+" "+e._s(t)+" ")]):e._e()]}}})),e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customSlot,fn:function(n){var i=n.row,o=n.rowIndex;return["status"===t.customSlot?r("div",{key:a+""+o},["APPROVING"===i[t.prop]?r("span",{staticStyle:{background:"#E6A23C",padding:"4px 8px",color:"white","border-radius":"20px"}},[e._v(" 审核中 ")]):"COMPLETE"===i[t.prop]?r("span",{staticStyle:{background:"#67C23A",padding:"4px 8px",color:"white","border-radius":"20px"}},[e._v(" 已完成 ")]):"DRAFT"===i[t.prop]&&0===i.returnNum?r("span",{staticStyle:{background:"#909399",padding:"4px 8px",color:"white","border-radius":"20px"}},[e._v(" 草稿 ")]):"DRAFT"===i[t.prop]&&i.returnNum>0?r("span",{staticStyle:{background:"#F56C6C",padding:"4px 8px",color:"white","border-radius":"20px"}},[e._v(" 已拒绝 ")]):r("span",{staticStyle:{background:"#909399",padding:"4px 8px",color:"white","border-radius":"20px"}},[e._v(" - ")])]):e._e(),"options"===t.customSlot?r("div",{key:"op"+a+o},[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowView(i)}}},[e._v(" 查看 ")]),r("span",{staticStyle:{width:"6px",display:"inline-block"}}),"DRAFT"===i.status&&e.hasReportEditPermission()&&0===i.returnNum?r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleEdit(i)}}},[e._v(" 修改 ")]):e._e(),r("span",{staticStyle:{width:"6px",display:"inline-block"}}),"DRAFT"===i.status&&e.hasReportEditPermission()&&i.returnNum>0?r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleEdit(i)}}},[e._v(" 重新发起 ")]):e._e(),r("span",{staticStyle:{width:"6px",display:"inline-block"}}),"DRAFT"===i.status&&0===i.returnNum?r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleLaunch(i)}}},[e._v(" 发起 ")]):e._e(),i.status&&""!==i.status&&"DRAFT"!==i.status?e._e():r("span",{staticStyle:{width:"6px",display:"inline-block"}}),"REJECTED"===i.status&&e.hasReportEditPermission()?r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleEdit(i)}}},[e._v(" 修改 ")]):e._e(),"REJECTED"===i.status?r("span",{staticStyle:{width:"6px",display:"inline-block"}}):e._e(),i.filePath?r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleDownload(i)}}},[e._v(" 下载 ")]):e._e(),"DRAFT"===i.status||"REJECTED"===i.status?r("span",{staticStyle:{width:"6px",display:"inline-block"}}):e._e(),"DRAFT"===i.status||"REJECTED"===i.status&&e.hasReportEditPermission()?r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleDelete(i)}}},[e._v(" 删除 ")]):e._e()]):e._e()]}}}))],null,!0)},[r("template",{slot:"empty"},[r("div",{staticClass:"table-empty"},[r("x-empty-page")],1)])],2)],1)],r("el-dialog",{attrs:{title:"edit"===e.dialogMode?"修改报告":"新增报告",visible:e.createDialogVisible,width:"900px","close-on-click-modal":!1,modal:!1,"custom-class":"create-report-dialog"},on:{"update:visible":function(t){e.createDialogVisible=t},close:e.handleDialogClose}},[r("div",{staticClass:"dialog-body-wrapper"},[r("el-form",{ref:"createForm",attrs:{model:e.createFormData,rules:e.createFormRules,"label-width":"150px"}},[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"标题名称",prop:"title"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.title,callback:function(t){e.$set(e.createFormData,"title",t)},expression:"createFormData.title"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"厂家名称(全称)",prop:"manufacturerName"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.manufacturerName,callback:function(t){e.$set(e.createFormData,"manufacturerName",t)},expression:"createFormData.manufacturerName"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"产品型号(全称)",prop:"modelName"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.modelName,callback:function(t){e.$set(e.createFormData,"modelName",t)},expression:"createFormData.modelName"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"厂家简称",prop:"manufacturerAbbreviation"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.manufacturerAbbreviation,callback:function(t){e.$set(e.createFormData,"manufacturerAbbreviation",t)},expression:"createFormData.manufacturerAbbreviation"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"产品型号简称",prop:"modelAbbreviation"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.modelAbbreviation,callback:function(t){e.$set(e.createFormData,"modelAbbreviation",t)},expression:"createFormData.modelAbbreviation"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"产品编号",prop:"productNumber"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.productNumber,callback:function(t){e.$set(e.createFormData,"productNumber",t)},expression:"createFormData.productNumber"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"领域/模块",prop:"module"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.module,callback:function(t){e.$set(e.createFormData,"module",t)},expression:"createFormData.module"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"板块",prop:"plate"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.plate,callback:function(t){e.$set(e.createFormData,"plate",t)},expression:"createFormData.plate"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"平台",prop:"platform"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.platform,callback:function(t){e.$set(e.createFormData,"platform",t)},expression:"createFormData.platform"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"系列",prop:"series"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.series,callback:function(t){e.$set(e.createFormData,"series",t)},expression:"createFormData.series"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"细分市场",prop:"marketSegment"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.marketSegment,callback:function(t){e.$set(e.createFormData,"marketSegment",t)},expression:"createFormData.marketSegment"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"项目名称",prop:"projectName"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.projectName,callback:function(t){e.$set(e.createFormData,"projectName",t)},expression:"createFormData.projectName"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"项目编号",prop:"projectNumber"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.projectNumber,callback:function(t){e.$set(e.createFormData,"projectNumber",t)},expression:"createFormData.projectNumber"}})],1)],1)],1),r("el-form-item",{attrs:{label:"附件上传",prop:"attachments"}},[r("el-upload",{ref:"upload",attrs:{"auto-upload":!1,"on-change":e.handleFileChange,"on-remove":e.handleFileRemove,"file-list":e.fileList,limit:1,accept:".doc,.docx,.pdf,.xls,.xlsx,.ppt,.pptx"}},[r("el-button",{attrs:{type:"primary",icon:"el-icon-upload"}},[e._v(" 选择文件 ")]),r("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v(" 支持扩展名: .doc .pdf .xls .xlsx .ppt .pptx,仅支持上传一个文件 ")])],1)],1),r("el-form-item",{attrs:{label:"说明",prop:"explanation"}},[r("el-input",{attrs:{type:"textarea",rows:4,placeholder:"请输入"},model:{value:e.createFormData.explanation,callback:function(t){e.$set(e.createFormData,"explanation",t)},expression:"createFormData.explanation"}})],1),r("el-form-item",{attrs:{label:"流程主题",prop:"processTitle"}},[r("el-input",{attrs:{maxlength:"100","show-word-limit":"",placeholder:"请输入流程主题"},model:{value:e.createFormData.processTitle,callback:function(t){e.$set(e.createFormData,"processTitle",t)},expression:"createFormData.processTitle"}})],1),r("el-form-item",{attrs:{label:"审批环节",prop:"approvalWorkflowSteps"}},[r("div",{staticClass:"approval-workflow"},[r("div",{staticClass:"workflow-table"},[r("table",{staticClass:"workflow-table-content"},[r("thead",[r("tr",[r("th",{staticClass:"step-name-col"},[e._v(" 环节名称 ")]),r("th",{staticClass:"handler-col"},[e._v(" 处理人 ")])])]),r("tbody",e._l(e.approvalWorkflowSteps,(function(t,a){return r("tr",{key:a,staticClass:"workflow-row"},[r("td",{staticClass:"step-name-cell"},[r("span",{staticClass:"step-name"},[e._v(" "+e._s(t.name)+" "),t.required?r("span",{staticClass:"required-mark"},[e._v("*")]):e._e()])]),r("td",{staticClass:"handler-cell"},[r("el-select",{staticClass:"handler-select",attrs:{multiple:"",filterable:"",remote:"",placeholder:"请选择","remote-method":function(t){return e.handleRemoteSearch(t,a)},loading:t.loading},on:{change:function(t){return e.handleHandlerChange(a,t)}},model:{value:t.handlers,callback:function(r){e.$set(t,"handlers",r)},expression:"step.handlers"}},e._l(t.options,(function(t){return r("el-option",{key:t.userNumber,attrs:{value:t.userId,label:t.username}},[r("span",{staticClass:"username-text"},[e._v(e._s(t.username))]),r("span",{staticClass:"user-id-text"},[e._v(e._s(t.userNumber))])])})),1)],1)])})),0)])])])])],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary"},on:{click:e.handleSubmit}},[e._v(" 确定 ")])],1)]),r("el-dialog",{attrs:{title:"发起",visible:e.launchDialogVisible,width:"600px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(t){e.launchDialogVisible=t},close:e.handleLaunchDialogClose}},[r("div",{staticClass:"dialog-body-wrapper"},[r("div",{staticClass:"approval-process-title"},[r("div",{staticClass:"description-label"},[e._v(" 流程主题 "),r("span",{staticClass:"required-mark"},[e._v("*")])]),r("el-input",{attrs:{maxlength:"100","show-word-limit":"",placeholder:"请输入流程主题"},model:{value:e.launchProcessTitle,callback:function(t){e.launchProcessTitle=t},expression:"launchProcessTitle"}})],1),r("div",{staticClass:"approval-workflow"},[r("div",{staticClass:"workflow-title"},[e._v(" 审批环节 ")]),r("div",{staticClass:"workflow-table"},[r("table",{staticClass:"workflow-table-content"},[r("thead",[r("tr",[r("th",{staticClass:"step-name-col"},[e._v(" 环节名称 ")]),r("th",{staticClass:"handler-col"},[e._v(" 处理人 ")])])]),r("tbody",e._l(e.launchWorkflowSteps,(function(t,a){return r("tr",{key:a,staticClass:"workflow-row"},[r("td",{staticClass:"step-name-cell"},[r("span",{staticClass:"step-name"},[e._v(" "+e._s(t.name)+" "),t.required?r("span",{staticClass:"required-mark"},[e._v("*")]):e._e()])]),r("td",{staticClass:"handler-cell"},[r("el-select",{staticClass:"handler-select",attrs:{multiple:"",filterable:"",remote:"",placeholder:"请选择","remote-method":function(t){return e.handleLaunchRemoteSearch(t,a)},loading:t.loading},on:{change:function(t){return e.handleLaunchHandlerChange(a,t)}},model:{value:t.handlers,callback:function(r){e.$set(t,"handlers",r)},expression:"step.handlers"}},e._l(t.options,(function(t){return r("el-option",{key:t.userNumber,attrs:{value:t.userId,label:t.username}},[r("span",{staticClass:"username-text"},[e._v(e._s(t.username))]),r("span",{staticClass:"user-id-text"},[e._v(e._s(t.userNumber))])])})),1)],1)])})),0)])])])]),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleLaunchDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.launching},on:{click:e.handleLaunchSubmit}},[e._v(" 确定 ")])],1)]),r("el-dialog",{attrs:{title:"审核",visible:e.approvalDialogVisible,width:"500px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(t){e.approvalDialogVisible=t},close:e.handleApprovalDialogClose}},[r("el-form",{ref:"approvalForm",attrs:{model:e.approvalFormData,"label-width":"80px"}},[r("el-form-item",{attrs:{label:"审核"}},[r("el-radio-group",{model:{value:e.approvalFormData.result,callback:function(t){e.$set(e.approvalFormData,"result",t)},expression:"approvalFormData.result"}},[r("el-radio",{attrs:{label:"PASS"}},[e._v(" 通过 ")]),r("el-radio",{attrs:{label:"REJECT"}},[e._v(" 退回 ")])],1)],1),r("el-form-item",{attrs:{label:"备注"}},[r("el-input",{attrs:{type:"textarea",rows:4,placeholder:"请输入备注"},model:{value:e.approvalFormData.opinion,callback:function(t){e.$set(e.approvalFormData,"opinion",t)},expression:"approvalFormData.opinion"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleApprovalDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.approvalSubmitting},on:{click:e.handleApprovalSubmit}},[e._v(" 确定 ")])],1)],1)],2)},A6=[];function k6(e){return k6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k6(e)}function P6(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */P6=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(O){l=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var i=t&&t.prototype instanceof d?t:d,o=Object.create(i.prototype),s=new C(n||[]);return a(o,"_invoke",{value:x(e,r,s)}),o}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(O){return{type:"throw",arg:O}}}e.wrap=c;var p={};function d(){}function h(){}function f(){}var m={};l(m,i,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(T([])));v&&v!==t&&r.call(v,i)&&(m=v);var y=f.prototype=d.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(a,i,o,s){var l=u(e[a],e,i);if("throw"!==l.type){var c=l.arg,p=c.value;return p&&"object"==k6(p)&&r.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,o,s)}),(function(e){n("throw",e,o,s)})):t.resolve(p).then((function(e){c.value=e,o(c)}),(function(e){return n("throw",e,o,s)}))}s(l.arg)}var i;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return i=i?i.then(a,a):a()}})}function x(e,t,r){var a="suspendedStart";return function(n,i){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===n)throw i;return I()}for(r.method=n,r.arg=i;;){var o=r.delegate;if(o){var s=w(o,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===a)throw a="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a="executing";var l=u(e,t,r);if("normal"===l.type){if(a=r.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(a="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,a=e.iterator[r];if(void 0===a)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var n=u(a,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function T(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,n=function t(){for(;++a<e.length;)if(r.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:I}}function I(){return{value:void 0,done:!0}}return h.prototype=f,a(y,"constructor",{value:f,configurable:!0}),a(f,"constructor",{value:h,configurable:!0}),h.displayName=l(f,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,s,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(_.prototype),l(_.prototype,o,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,a,n,i){void 0===i&&(i=Promise);var o=new _(c(t,r,a,n),i);return e.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},b(y),l(y,s,"Generator"),l(y,i,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var a in t)r.push(a);return r.reverse(),function e(){for(;r.length;){var a=r.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},e.values=T,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(D),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(r,a){return o.type="throw",o.arg=e,t.next=r,a&&(t.method="next",t.arg=void 0),!!a}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var n=this.tryEntries[a];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var n=a.arg;D(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function N6(e,t,r,a,n,i,o){try{var s=e[i](o),l=s.value}catch(c){return void r(c)}s.done?t(l):Promise.resolve(l).then(a,n)}function E6(e){return function(){var t=this,r=arguments;return new Promise((function(a,n){var i=e.apply(t,r);function o(e){N6(i,a,n,o,s,"next",e)}function s(e){N6(i,a,n,o,s,"throw",e)}o(void 0)}))}}function R6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function L6(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R6(Object(r),!0).forEach((function(t){j6(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R6(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function j6(e,t,r){return t=F6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F6(e){var t=V6(e,"string");return"symbol"===k6(t)?t:String(t)}function V6(e,t){if("object"!==k6(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==k6(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var z6={name:"ReportPage",components:{ReportDetail:B4},data:function(){var e=this;return{searchPanelValue:{title:"",manufacturerName:"",modelName:"",productNumber:"",module:"",plate:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",status:""},fromTodo:!1,statusOptions:[{id:"DRAFT",label:"草稿"},{id:"APPROVING",label:"审批中"},{id:"COMPLETE",label:"已完成"},{id:"REJECTED",label:"已拒绝"}],tableData:[],pagination:{currentPage:1,pageSize:10,total:0},createDialogVisible:!1,selectedFile:null,fileList:[],uploading:!1,canResend:!1,dialogMode:"create",currentRestartRow:null,currentEditRow:null,launchDialogVisible:!1,currentLaunchRow:null,launchProcessTitle:"",launchWorkflowSteps:[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}],launching:!1,createFormData:{title:"",manufacturerName:"",modelName:"",manufacturerAbbreviation:"",modelAbbreviation:"",productNumber:"",module:"",plate:"",fileUrl:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",explanation:""},createFormRules:{title:[{required:!0,message:"请输入标题名称",trigger:"blur"}],manufacturerName:[{required:!0,message:"请输入厂家名称(全称)",trigger:"blur"}],modelName:[{required:!0,message:"请输入产品型号(全称)",trigger:"blur"}],manufacturerAbbreviation:[{required:!0,message:"请输入厂家简称",trigger:"blur"}],modelAbbreviation:[{required:!0,message:"请输入产品型号简称",trigger:"blur"}],productNumber:[{required:!0,message:"请输入产品编号",trigger:"blur"}],module:[{required:!0,message:"请输入领域/模块",trigger:"blur"}],plate:[{required:!0,message:"请输入板块",trigger:"blur"}],platform:[{required:!0,message:"请输入平台",trigger:"blur"}],series:[{required:!0,message:"请输入系列",trigger:"blur"}],marketSegment:[{required:!0,message:"请输入细分市场",trigger:"blur"}],projectName:[{required:!0,message:"请输入项目名称",trigger:"blur"}],projectNumber:[{required:!0,message:"请输入项目编号",trigger:"blur"}],processTitle:[{required:!0,message:"请输入流程主题",trigger:"blur"}],approvalWorkflowSteps:[{validator:function(t,r,a){var n=e.approvalWorkflowSteps.filter((function(e){return e.required&&(!e.handlers||0===e.handlers.length)}));if(n.length>0){var i=n.map((function(e){return e.name})).join("、");a(new Error('请为必填环节"'.concat(i,'"选择处理人')))}else a()},trigger:"change"}]},approvalWorkflowSteps:[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}],approvalDialogVisible:!1,approvalFormData:{result:"",opinion:""},approvalSubmitting:!1,currentApprovalRow:null,showReportDetail:!1,currentReportDetail:null,downloadingRowId:""}},computed:{tableConfig:function(){return{rowDraggable:!1,colConfigs:[{prop:"title",label:"标题",showOverflowTooltip:!0,minWidth:"140"},{prop:"manufacturerName",label:"厂家名称",showOverflowTooltip:!0,minWidth:"160"},{prop:"productNumber",label:"产品型号",showOverflowTooltip:!0,minWidth:"160"},{prop:"module",label:"领域/模块",showOverflowTooltip:!0,minWidth:"120"},{prop:"plate",label:"板块",showOverflowTooltip:!0,minWidth:"100"},{prop:"platform",label:"平台",showOverflowTooltip:!0,minWidth:"100"},{prop:"series",label:"系列",showOverflowTooltip:!0,minWidth:"100"},{prop:"marketSegment",label:"细分市场",showOverflowTooltip:!0,minWidth:"120"},{prop:"projectName",label:"项目名称",showOverflowTooltip:!0,minWidth:"140"},{prop:"projectNumber",label:"项目编号",showOverflowTooltip:!0,minWidth:"120"},{prop:"status",label:"状态",customSlot:"status",align:"center",minWidth:"100",fixed:"right"},{prop:"options",label:"操作",customSlot:"options",align:"center",width:"160",fixed:"right"}],seqType:"seq",seqConfig:{fixed:!0},layout:"total, prev, pager, next, sizes"}}},created:function(){this.loadUserSelfRole(),this.loadData()},mounted:function(){this.loadUserSelfRole(),this.loadData()},methods:{isAdmin:function(){try{var e=localStorage.getItem("user_self_role");if(!e)return!1;var t=JSON.parse(e);return!!Array.isArray(t)&&t.some((function(e){return 1===e.isAdmin||"1"===e.isAdmin}))}catch(r){return console.error("检查管理员权限失败:",r),!1}},hasReportEditPermission:function(){if(this.isAdmin())return!0;try{var e=localStorage.getItem("user_self_role");if(!e)return!1;var t=JSON.parse(e);return!!Array.isArray(t)&&t.some((function(e){var t=e.permissionPath||"",r=e.parameterPer;return"对标报告"===t&&(2===r||"2"===r||"编辑"===r)}))}catch(r){return console.error("检查报告编辑权限失败:",r),!1}},loadUserSelfRole:function(){var e=L6(L6({},nt.GET_USER_SELF_ROLE),{},{params:{userOrDepID:pe()},disableSuccessMsg:!0});this.$request(e).asyncThen((function(e){if(e&&e.data)try{localStorage.setItem("user_self_role",JSON.stringify(e.data))}catch(t){console.error("存储权限数据到 localStorage 失败:",t)}})).asyncErrorCatch((function(e){console.error("获取用户自身角色失败:",e)}))},handleCreate:function(){var e=this;this.dialogMode="create",this.currentRestartRow=null,this.currentEditRow=null,this.createFormData={title:"",manufacturerName:"",modelName:"",manufacturerAbbreviation:"",modelAbbreviation:"",productNumber:"",module:"",plate:"",fileUrl:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",explanation:"",processTitle:""},this.approvalWorkflowSteps=[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}],this.fileList=[],this.selectedFile=null,this.createDialogVisible=!0,this.$nextTick((function(){e.$refs.createForm&&e.$refs.createForm.clearValidate()}))},handleEdit:function(e){var t=this;this.dialogMode="edit",this.currentEditRow=e,this.currentRestartRow=null,this.createFormData={title:e.title||"",manufacturerName:e.manufacturerName||"",modelName:e.modelName||"",manufacturerAbbreviation:e.manufacturerAbbreviation||"",modelAbbreviation:e.modelAbbreviation||"",productNumber:e.productNumber||"",module:e.module||"",plate:e.plate||"",fileUrl:e.fileUrl||e.filePath||"",platform:e.platform||"",series:e.series||"",marketSegment:e.marketSegment||"",projectName:e.projectName||"",projectNumber:e.projectNumber||"",explanation:e.explanation||"",processTitle:e.processTitle||""},e.fileUrl||e.filePath?this.fileList=[{name:e.title||"文件",url:e.fileUrl||e.filePath}]:this.fileList=[],this.selectedFile=null,this.approvalWorkflowSteps=[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}],e.flowId&&this.loadApprovalUsers(e.flowId),this.createDialogVisible=!0,this.$nextTick((function(){t.$refs.createForm&&t.$refs.createForm.clearValidate()}))},handleLaunch:function(e){var t=this;this.currentLaunchRow=e,this.$confirm("确定发起审批吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var r={reportId:e.reportId,flowId:e.flowId,userId:pe()},a=L6(L6({},nt.ADD_REPORT),{},{params:r,disableSuccessMsg:!0});t.$request(a).asyncThen((function(e){t.loadData()})).asyncErrorCatch((function(e){console.error("发起失败:",e),t.$message({type:"error",message:"发起失败,请重试"})}))})).catch((function(){t.$message({type:"info",message:"取消发起审批"})}))},handleLaunchDialogClose:function(){this.launchDialogVisible=!1,this.currentLaunchRow=null,this.launchProcessTitle="",this.launchWorkflowSteps=[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}]},handleLaunchSubmit:function(){var e=this,t=this.launchWorkflowSteps.filter((function(e){return e.required&&(!e.handlers||0===e.handlers.length)}));if(t.length>0){var r=t.map((function(e){return e.name})).join("、");this.$message({type:"warning",message:'请为必填环节"'.concat(r,'"选择处理人')})}else if(this.currentLaunchRow){var a=(this.launchProcessTitle||"").trim();if(a){var n=this.currentLaunchRow.reportId||this.currentLaunchRow.id;if(n){var i=this.currentLaunchRow.flowId,o={reportId:n,flowId:i,userId:pe()};this.launching=!0;var s=L6(L6({},nt.ADD_REPORT),{},{params:o,disableSuccessMsg:!0});this.$request(s).asyncThen((function(t){e.launching=!1,e.handleLaunchDialogClose(),e.loadData(),e.$message({type:"success",message:"发起成功"})})).asyncErrorCatch((function(t){console.error("发起失败:",t),e.launching=!1,e.$message({type:"error",message:"发起失败,请重试"})}))}else this.$message({type:"error",message:"缺少报告ID"})}else this.$message({type:"warning",message:"请填写流程主题"})}else this.$message({type:"error",message:"缺少报告信息"})},handleLaunchRemoteSearch:function(e,t){var r=this.launchWorkflowSteps[t];if(e&&""!==e.trim()){r.loading=!0;var a=e.trim(),n=L6(L6({},nt.GET_ALLUSERS),{},{params:{name:a},disableSuccessMsg:!0});this.$request(n).asyncThen((function(e){var t=e&&e.data,a=[];Array.isArray(t)?a=t:t&&Array.isArray(t.result)?a=t.result:t&&t.data&&Array.isArray(t.data)&&(a=t.data);var n=a.map((function(e){return{userId:e.userId||e.id,username:e.username||e.name,userNumber:e.userNumber||e.userId||e.id}})).filter((function(e){return e.userId&&e.userNumber})),i=new Set(r.handlers||[]),o=n.filter((function(e){return!i.has(e.userId)})),s=(r.options||[]).filter((function(e){return e.userId&&r.handlers&&r.handlers.includes(e.userId)})),l=new Map;s.forEach((function(e){e.userNumber&&l.set(e.userNumber,e)})),o.forEach((function(e){e.userNumber&&!l.has(e.userNumber)&&l.set(e.userNumber,e)})),r.options=Array.from(l.values()),r.loading=!1})).asyncErrorCatch((function(e){if(console.error("搜索人员失败:",e),r.handlers&&r.handlers.length>0){var t=r.options.filter((function(e){return r.handlers.includes(e.userId)}));r.options=t}else r.options=[];r.loading=!1}))}else if(r.handlers&&r.handlers.length>0){var i=r.options.filter((function(e){return r.handlers.includes(e.userId)}));r.options=i}else r.options=[]},handleLaunchHandlerChange:function(e,t){},handleDelete:function(e){var t=this;this.$confirm("确定删除该报告吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var r=L6(L6({},nt.DELETE_REPORT),{},{params:{reportId:e.reportId},disableSuccessMsg:!0});t.$request(r).asyncThen((function(e){t.$message({type:"success",message:"删除成功"}),t.loadData()})).asyncErrorCatch((function(e){console.error("删除失败:",e),t.$message({type:"error",message:"删除失败"})}))}))},handleRestart:function(e){var t=this;this.dialogMode="restart",this.currentRestartRow=e,this.currentEditRow=null,this.createFormData={title:e.title||"",manufacturerName:e.manufacturerName||"",modelName:e.modelName||"",manufacturerAbbreviation:e.manufacturerAbbreviation||"",modelAbbreviation:e.modelAbbreviation||"",productNumber:e.productNumber||"",module:e.module||"",plate:e.plate||"",fileUrl:e.fileUrl||e.filePath||"",platform:e.platform||"",series:e.series||"",marketSegment:e.marketSegment||"",projectName:e.projectName||"",projectNumber:e.projectNumber||"",explanation:e.explanation||""},this.fileList=[],this.selectedFile=null,this.createDialogVisible=!0,this.$nextTick((function(){t.$refs.createForm&&t.$refs.createForm.clearValidate()}))},handleDialogClose:function(){this.createDialogVisible=!1,this.dialogMode="create",this.currentRestartRow=null,this.currentEditRow=null,this.createFormData={title:"",manufacturerName:"",modelName:"",manufacturerAbbreviation:"",modelAbbreviation:"",productNumber:"",module:"",plate:"",fileUrl:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",explanation:"",processTitle:""},this.approvalWorkflowSteps=[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}],this.fileList=[],this.selectedFile=null,this.$refs.createForm&&this.$refs.createForm.clearValidate()},handleFileChange:function(e,t){var r=[".doc",".docx",".pdf",".xls",".xlsx",".ppt",".pptx"],a=e.name.toLowerCase(),n=r.some((function(e){return a.endsWith(e)}));if(!n)return this.$message.error("不支持的文件类型,仅支持 .doc .docx .pdf .xls .xlsx .ppt .pptx"),this.$refs.upload.handleRemove(e),!1;this.selectedFile=e&&e.raw?e.raw:null,this.fileList=t.slice(-1)},handleFileRemove:function(e,t){this.selectedFile=null,this.fileList=[]},handleFileUpload:function(){var e=this;if(this.uploading||!this.selectedFile)return this.selectedFile,Promise.resolve(null);var t=this.selectedFile;console.log(t,2222);var r=new FormData;r.append("file",t),r.append("createBy",pe());var a=L6(L6({},nt.TEST_FILE_UPLOAD),{},{params:r,disableSuccessMsg:!0});this.uploading=!0;var n=this.$loading({lock:!0,text:"正在上传文件,请稍候...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});return this.$upload(a,null,!1).then((function(t){console.log("文件上传成功:",t),n.close();var r="";if(t.data&&t){var a=t.data;r=a,e.createFormData.fileUrl=r}return r})).catch((function(t){throw console.error("文件上传失败:",t),n.close(),e.$message.error("文件上传失败,请重试"),t})).finally((function(){n&&n.close(),e.uploading=!1}))},handleSubmit:function(){var e=this;this.$refs.createForm.validate((function(t){if(!t)return!1;var r=function(){var t=E6(P6().mark((function t(){var r,a,n,i,o;return P6().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.selectedFile){t.next=14;break}return t.prev=1,t.next=4,e.handleFileUpload();case 4:r=t.sent,e.createFormData.fileUrl=r||"",e.createFormData.fileName=e.selectedFile.name,t.next=14;break;case 9:return t.prev=9,t.t0=t["catch"](1),console.error("文件上传失败:",t.t0),e.$message.error("文件上传失败,请重试"),t.abrupt("return");case 14:n=e.approvalWorkflowSteps.map((function(e,t){return{nodeName:e.name,assignees:e.handlers,nodeOrder:t+1}})),"edit"===e.dialogMode&&e.currentEditRow&&0===e.currentEditRow.returnNum?(i=e.currentEditRow.reportId||e.currentEditRow.id,a=L6(L6({},nt.EDIT_REPORT),{},{params:L6(L6({reportId:i,flowId:e.currentEditRow.flowId||""},e.createFormData),{},{processTitle:e.createFormData.processTitle,nodeList:n,createBy:pe(),userId:pe()}),disableSuccessMsg:!0})):"edit"===e.dialogMode&&e.currentEditRow&&e.currentEditRow.returnNum>0?a=L6(L6({},nt.RESTART_REPORT_APPROVAL),{},{params:L6(L6({reportId:e.currentEditRow.id||e.currentEditRow.reportId},e.createFormData),{},{nodeList:n,createBy:pe(),userId:pe()}),disableSuccessMsg:!0}):(o=e.approvalWorkflowSteps.map((function(e,t){return{nodeName:e.name,assignees:e.handlers,nodeOrder:t+1}})),a=L6(L6({},nt.SAVE_REPORT),{},{params:L6(L6({},e.createFormData),{},{processTitle:e.createFormData.processTitle,nodeList:o,createBy:pe(),userId:pe()}),disableSuccessMsg:!0})),e.$request(a).asyncThen((function(t){e.handleDialogClose(),e.loadData(),e.$message({type:"success",message:"提交成功"})})).asyncErrorCatch((function(t){console.error("提交失败:",t),e.$message({type:"error",message:"提交失败"})}));case 17:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(){return t.apply(this,arguments)}}();r()}))},handleRemoteSearch:function(e,t){var r=this.approvalWorkflowSteps[t];if(e&&""!==e.trim()){r.loading=!0;var a=e.trim(),n=L6(L6({},nt.GET_ALLUSERS),{},{params:{name:a},disableSuccessMsg:!0});this.$request(n).asyncThen((function(e){var t=e&&e.data,a=[];Array.isArray(t)?a=t:t&&Array.isArray(t.result)?a=t.result:t&&t.data&&Array.isArray(t.data)&&(a=t.data);var n=a.map((function(e){return{userId:e.userId||e.id,username:e.username||e.name,userNumber:e.userNumber||e.userId||e.id}})).filter((function(e){return e.userId&&e.userNumber})),i=new Set(r.handlers||[]),o=n.filter((function(e){return!i.has(e.userId)})),s=(r.options||[]).filter((function(e){return e.userId&&r.handlers&&r.handlers.includes(e.userId)})),l=new Map;s.forEach((function(e){e.userNumber&&l.set(e.userNumber,e)})),o.forEach((function(e){e.userNumber&&!l.has(e.userNumber)&&l.set(e.userNumber,e)})),r.options=Array.from(l.values()),r.loading=!1})).asyncErrorCatch((function(e){if(console.error("搜索人员失败:",e),r.handlers&&r.handlers.length>0){var t=r.options.filter((function(e){return r.handlers.includes(e.userId)}));r.options=t}else r.options=[];r.loading=!1}))}else if(r.handlers&&r.handlers.length>0){var i=r.options.filter((function(e){return r.handlers.includes(e.userId)})),o=r.handlers.filter((function(e){return!i.some((function(t){return t.userId===e}))}));o.length,r.options=i}else r.options=[]},handleHandlerChange:function(e,t){},loadApprovalUsers:function(e){var t=this;if(e){var r=L6(L6({},nt.GET_REPORT_APPROVAL_USERS),{},{params:{flowId:e},disableSuccessMsg:!0});this.$request(r).asyncThen((function(e){console.log("获取审批流程信息:",e),t.fillApprovalUsersData(e,t.approvalWorkflowSteps)})).asyncErrorCatch((function(e){console.error("获取审批流程信息失败:",e)}))}},loadLaunchApprovalUsers:function(e){var t=this;if(e){var r=L6(L6({},nt.GET_REPORT_APPROVAL_USERS),{},{params:{flowId:e},disableSuccessMsg:!0});this.$request(r).asyncThen((function(e){console.log("获取审批流程信息:",e),t.fillApprovalUsersData(e,t.launchWorkflowSteps);var r=null;(Array.isArray(e.data)||e.data&&!Array.isArray(e.data))&&(r=e.data),r&&!Array.isArray(r)&&(r.progressTitle||r.processTitle)&&(t.launchProcessTitle=r.progressTitle||r.processTitle||"")})).asyncErrorCatch((function(e){console.error("获取审批流程信息失败:",e)}))}},fillApprovalUsersData:function(e,t){var r,a,n=[],i=null;Array.isArray(e.data)?i=e.data:Array.isArray(null===(r=e.data)||void 0===r?void 0:r.data)?i=e.data.data:Array.isArray(null===(a=e.data)||void 0===a?void 0:a.result)?i=e.data.result:Array.isArray(e)?i=e:e.data&&!Array.isArray(e.data)&&(i=e.data),Array.isArray(i)?n=i:i&&Array.isArray(i.data)?n=i.data:i&&Array.isArray(i.result)?n=i.result:i&&Array.isArray(i.nodeList)?n=i.nodeList:i&&Array.isArray(i.flowNodes)&&(n=i.flowNodes),i&&!Array.isArray(i)&&(i.progressTitle||i.processTitle)&&t===this.approvalWorkflowSteps&&(this.createFormData.processTitle=i.progressTitle||i.processTitle||""),n&&n.length>0&&n.forEach((function(e){var r=e.nodeName||e.node||"";if(r){var a=t.find((function(e){return e.name===r}));if(a){var n=e.assignees||[];if(Array.isArray(n)&&0!==n.length){var i=n.map((function(e){var t=e.userId||e.id||"";return{userId:t,username:e.username||"",userNumber:e.userNumber||e.account||""}})).filter((function(e){return e.userId}));i.length>0&&(a.handlers=i.map((function(e){return e.userId})).filter(Boolean),a.options=i.map((function(e){return{userId:e.userId,username:e.username||"",userNumber:e.userNumber||""}})).filter((function(e){return e.userId})))}}}}))},handleDownloadTemplate:function(){},handleDownload:function(e){var t=document.createElement("a");t.href=e.filePath,t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t)},handlePreview:function(e){this.$message&&this.$message.info&&this.$message.info("预览:"+(e.title||""))},handleApprove:function(e){var t=this;this.currentApprovalRow=e,this.approvalFormData={result:"",opinion:""},this.approvalDialogVisible=!0,this.$nextTick((function(){t.$refs.approvalForm&&t.$refs.approvalForm.clearValidate()}))},handleApprovalDialogClose:function(){this.approvalDialogVisible=!1,this.approvalFormData={result:"",opinion:""},this.currentApprovalRow=null,this.$refs.approvalForm&&this.$refs.approvalForm.clearValidate()},handleApprovalSubmit:function(){var e=this;if(this.approvalFormData.result)if(this.currentApprovalRow){var t={flowId:this.currentApprovalRow.flowId,userId:pe(),result:this.approvalFormData.result,opinion:this.approvalFormData.opinion||""};this.approvalSubmitting=!0;var r=L6(L6({},nt.START_REPORT_APPROVAL),{},{params:t,disableSuccessMsg:!0});this.$request(r).asyncThen((function(t){e.approvalSubmitting=!1,e.handleApprovalDialogClose(),e.loadData(),e.approvalSubmitting=!1})).asyncErrorCatch((function(t){console.error("审批提交失败:",t),e.approvalSubmitting=!1,e.$message({type:"error",message:"审批提交失败,请重试"})}))}else this.$message({type:"error",message:"缺少审批信息"});else this.$message({type:"warning",message:"请选择审核结果(通过或退回)"})},pageSizeChange:function(e){this.pagination.pageSize=e},rowClickEvent:function(e){console.warn(e)},handleRowView:function(e){var t=e.reportId||e.id;t?(this.currentReportDetail={reportId:t,flowId:e.flowId},this.fromTodo=!1,this.showReportDetail=!0,e.returnNum>0?this.canResend=!0:this.canResend=!1):this.$message.error("缺少报告ID,无法查看详情")},closeReportDetail:function(){this.showReportDetail=!1,this.currentReportDetail=null},handleReportDetailRefresh:function(){this.loadData(),this.closeReportDetail()},currentChange:function(e){this.pagination.currentPage=e,this.loadData()},selectDataChange:function(e){this.$emit("select-data-change",e)},resetSearch:function(){this.searchPanelValue={title:"",manufacturerName:"",modelName:"",productNumber:"",module:"",plate:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",status:""},this.handleSearch()},handleSearch:function(){this.loadData()},handleRefresh:function(){this.pagination.currentPage=1,this.handleSearch()},loadData:function(){var e=this,t={title:"",manufacturerName:"",modelName:"",productNumber:"",module:"",plate:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",status:""};Object.keys(t).forEach((function(r){void 0!==e.searchPanelValue[r]&&null!==e.searchPanelValue[r]&&(t[r]=e.searchPanelValue[r])}));var r=L6(L6({},nt.GET_REPORT_LIST),{},{params:L6({pageNumber:this.pagination.currentPage,pageSize:this.pagination.pageSize,createBy:pe()},t),disableSuccessMsg:!0});this.$request(r).asyncThen((function(t){e.tableData=t.data.result,e.pagination.total=t.data.count})).asyncErrorCatch((function(e){console.error("查询失败:",e)}))}}},B6=z6,$6=(r("a786"),p(B6,M6,A6,!1,null,null,null)),G6=$6.exports,U6=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"apaas-custom-page-mydemo custom-page"},[e.showReportDetail?r("report-detail",{attrs:{detail:e.currentReportDetail},on:{close:e.closeReportDetail,refresh:e.handleReportDetailRefresh}}):[e._m(0),r("div",{staticClass:"page-search-panel"},[r("div",{staticClass:"searched-fields"},[r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("标题")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.template,callback:function(t){e.$set(e.searchPanelValue,"template",t)},expression:"searchPanelValue.template"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("状态")]),r("el-select",{attrs:{clearable:"",filterable:"",placeholder:"请选择"},model:{value:e.searchPanelValue.status,callback:function(t){e.$set(e.searchPanelValue,"status",t)},expression:"searchPanelValue.status"}},e._l(e.statusOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.label,value:e.value}})})),1)],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("申请人")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.username,callback:function(t){e.$set(e.searchPanelValue,"username",t)},expression:"searchPanelValue.username"}})],1),r("div",{staticClass:"searched-field"},[r("span",{staticClass:"fielded-label"},[e._v("申请时间")]),r("el-date-picker",{attrs:{type:"date",placeholder:"请选择","value-format":"yyyy-MM-dd",format:"yyyy-MM-dd"},model:{value:e.searchPanelValue.createDate,callback:function(t){e.$set(e.searchPanelValue,"createDate",t)},expression:"searchPanelValue.createDate"}})],1),r("div",{staticClass:"search-actions"},[r("el-button",{attrs:{type:"primary"},on:{click:e.handleSearch}},[e._v(" 查询 ")]),r("el-button",{on:{click:e.resetSearch}},[e._v(" 重置 ")])],1)])]),r("div",{staticClass:"page-data-list"},[r("x-vxe-table",{ref:"vxeTable",staticClass:"block-table",attrs:{border:!0,seqWidth:40,colConfigs:e.tableConfig.colConfigs,tableData:e.tableData,rowDraggable:e.tableConfig.rowDraggable,seqType:e.tableConfig.seqType,pagination:e.pagination,layout:e.tableConfig.layout,seqConfig:e.tableConfig.seqConfig,autoSize:e.tableConfig.autoSize,pageConfig:e.tableConfig.pageConfig},on:{"table-row-click":e.rowClickEvent,"size-change":e.pageSizeChange,"current-page-change":e.currentChange,"select-data-change":e.selectDataChange},scopedSlots:e._u([e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customHeadSlot,fn:function(n){var i=n.column;return[t.customHeadSlot?r("div",{key:a},[e._v(" "+e._s(i)+" "+e._s(t)+" ")]):e._e()]}}})),e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customSlot,fn:function(n){var i=n.row,o=n.rowIndex;return["status"===t.customSlot?r("div",{key:a+""+o},["APPROVING"===i[t.prop]?r("span",{staticStyle:{background:"#E6A23C",padding:"4px 8px",color:"white","border-radius":"20px"}},[e._v("审核中")]):"COMPLETE"===i[t.prop]?r("span",{staticStyle:{background:"#67C23A",padding:"4px 8px",color:"white","border-radius":"20px"}},[e._v("已完成")]):"DRAFT"===i[t.prop]?r("span",{staticStyle:{background:"#909399",padding:"4px 8px",color:"white","border-radius":"20px"}},[e._v("草稿")]):"REJECTED"===i[t.prop]?r("span",{staticStyle:{background:"#F56C6C",padding:"4px 8px",color:"white","border-radius":"20px"}},[e._v("已拒绝")]):r("span",{staticStyle:{background:"#909399",padding:"4px 8px",color:"white","border-radius":"20px"}},[e._v("-")])]):e._e(),"options"===t.customSlot?r("div",{key:"op"+a+o},[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowView(i)}}},[e._v("查看")]),r("span",{staticStyle:{width:"6px",display:"inline-block"}}),i.filePath?r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleDownload(i)}}},[e._v("下载")]):e._e()]):e._e()]}}}))],null,!0)},[r("template",{slot:"empty"},[r("div",{staticClass:"table-empty"},[r("x-empty-page")],1)])],2)],1)],r("el-dialog",{attrs:{title:"edit"===e.dialogMode?"修改报告":"新增报告",visible:e.createDialogVisible,width:"900px","close-on-click-modal":!1,modal:!1,"custom-class":"create-report-dialog"},on:{"update:visible":function(t){e.createDialogVisible=t},close:e.handleDialogClose}},[r("div",{staticClass:"dialog-body-wrapper"},[r("el-form",{ref:"createForm",attrs:{model:e.createFormData,rules:e.createFormRules,"label-width":"150px"}},[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"标题名称",prop:"title"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.title,callback:function(t){e.$set(e.createFormData,"title",t)},expression:"createFormData.title"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"厂家名称(全称)",prop:"manufacturerName"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.manufacturerName,callback:function(t){e.$set(e.createFormData,"manufacturerName",t)},expression:"createFormData.manufacturerName"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"产品型号(全称)",prop:"modelName"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.modelName,callback:function(t){e.$set(e.createFormData,"modelName",t)},expression:"createFormData.modelName"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"厂家简称",prop:"manufacturerAbbreviation"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.manufacturerAbbreviation,callback:function(t){e.$set(e.createFormData,"manufacturerAbbreviation",t)},expression:"createFormData.manufacturerAbbreviation"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"产品型号简称",prop:"modelAbbreviation"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.modelAbbreviation,callback:function(t){e.$set(e.createFormData,"modelAbbreviation",t)},expression:"createFormData.modelAbbreviation"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"产品编号",prop:"productNumber"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.productNumber,callback:function(t){e.$set(e.createFormData,"productNumber",t)},expression:"createFormData.productNumber"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"领域/模块",prop:"module"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.module,callback:function(t){e.$set(e.createFormData,"module",t)},expression:"createFormData.module"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"板块",prop:"plate"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.plate,callback:function(t){e.$set(e.createFormData,"plate",t)},expression:"createFormData.plate"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"平台",prop:"platform"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.platform,callback:function(t){e.$set(e.createFormData,"platform",t)},expression:"createFormData.platform"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"系列",prop:"series"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.series,callback:function(t){e.$set(e.createFormData,"series",t)},expression:"createFormData.series"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"细分市场",prop:"marketSegment"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.marketSegment,callback:function(t){e.$set(e.createFormData,"marketSegment",t)},expression:"createFormData.marketSegment"}})],1)],1),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"项目名称",prop:"projectName"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.projectName,callback:function(t){e.$set(e.createFormData,"projectName",t)},expression:"createFormData.projectName"}})],1)],1)],1),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"项目编号",prop:"projectNumber"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.createFormData.projectNumber,callback:function(t){e.$set(e.createFormData,"projectNumber",t)},expression:"createFormData.projectNumber"}})],1)],1)],1),r("el-form-item",{attrs:{label:"附件上传",prop:"attachments"}},[r("el-upload",{ref:"upload",attrs:{"auto-upload":!1,"on-change":e.handleFileChange,"on-remove":e.handleFileRemove,"file-list":e.fileList,limit:1,accept:".doc,.pdf,.xls,.xlsx,.ppt,.pptx"}},[r("el-button",{attrs:{type:"primary",icon:"el-icon-upload"}},[e._v(" 选择文件 ")]),r("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v("支持扩展名: .doc .pdf .xls .xlsx .ppt .pptx,仅支持上传一个文件")])],1)],1),r("el-form-item",{attrs:{label:"说明",prop:"explanation"}},[r("el-input",{attrs:{type:"textarea",rows:4,placeholder:"请输入"},model:{value:e.createFormData.explanation,callback:function(t){e.$set(e.createFormData,"explanation",t)},expression:"createFormData.explanation"}})],1)],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleDialogClose}},[e._v("取消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.handleSubmit}},[e._v("确定")])],1)]),r("el-dialog",{attrs:{title:"发起",visible:e.launchDialogVisible,width:"600px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(t){e.launchDialogVisible=t},close:e.handleLaunchDialogClose}},[r("div",{staticClass:"dialog-body-wrapper"},[r("div",{staticClass:"approval-workflow"},[r("div",{staticClass:"workflow-title"},[e._v(" 审批环节 ")]),r("div",{staticClass:"workflow-table"},[r("table",{staticClass:"workflow-table-content"},[r("thead",[r("tr",[r("th",{staticClass:"step-name-col"},[e._v(" 环节名称 ")]),r("th",{staticClass:"handler-col"},[e._v(" 处理人 ")])])]),r("tbody",e._l(e.launchWorkflowSteps,(function(t,a){return r("tr",{key:a,staticClass:"workflow-row"},[r("td",{staticClass:"step-name-cell"},[r("span",{staticClass:"step-name"},[e._v(" "+e._s(t.name)+" "),t.required?r("span",{staticClass:"required-mark"},[e._v("*")]):e._e()])]),r("td",{staticClass:"handler-cell"},[r("el-select",{staticClass:"handler-select",attrs:{multiple:"",filterable:"",remote:"","reserve-keyword":"",placeholder:"请选择","remote-method":function(t){return e.handleLaunchRemoteSearch(t,a)},loading:t.loading},on:{change:function(t){return e.handleLaunchHandlerChange(a,t)}},model:{value:t.handlers,callback:function(r){e.$set(t,"handlers",r)},expression:"step.handlers"}},e._l(t.options,(function(t){return r("el-option",{key:t.userNumber,attrs:{value:t.userId,label:t.username}},[r("span",{staticClass:"username-text"},[e._v(e._s(t.username))]),r("span",{staticClass:"user-id-text"},[e._v(e._s(t.userNumber))])])})),1)],1)])})),0)])])])]),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleLaunchDialogClose}},[e._v("取消")]),r("el-button",{attrs:{type:"primary",loading:e.launching},on:{click:e.handleLaunchSubmit}},[e._v("确定")])],1)]),r("el-dialog",{attrs:{title:"审核",visible:e.approvalDialogVisible,width:"500px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(t){e.approvalDialogVisible=t},close:e.handleApprovalDialogClose}},[r("el-form",{ref:"approvalForm",attrs:{model:e.approvalFormData,"label-width":"80px"}},[r("el-form-item",{attrs:{label:"审核"}},[r("el-radio-group",{model:{value:e.approvalFormData.result,callback:function(t){e.$set(e.approvalFormData,"result",t)},expression:"approvalFormData.result"}},[r("el-radio",{attrs:{label:"PASS"}},[e._v(" 通过 ")]),r("el-radio",{attrs:{label:"REJECT"}},[e._v(" 退回 ")])],1)],1),r("el-form-item",{attrs:{label:"备注"}},[r("el-input",{attrs:{type:"textarea",rows:4,placeholder:"请输入备注"},model:{value:e.approvalFormData.opinion,callback:function(t){e.$set(e.approvalFormData,"opinion",t)},expression:"approvalFormData.opinion"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleApprovalDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.approvalSubmitting},on:{click:e.handleApprovalSubmit}},[e._v(" 确定 ")])],1)],1)],2)},W6=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"page-header"},[r("div",{staticClass:"title"},[e._v(" 竞品报告审批流程 ")])])}];function H6(e){return H6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H6(e)}function q6(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */q6=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(O){l=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var i=t&&t.prototype instanceof d?t:d,o=Object.create(i.prototype),s=new C(n||[]);return a(o,"_invoke",{value:x(e,r,s)}),o}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(O){return{type:"throw",arg:O}}}e.wrap=c;var p={};function d(){}function h(){}function f(){}var m={};l(m,i,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(T([])));v&&v!==t&&r.call(v,i)&&(m=v);var y=f.prototype=d.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(a,i,o,s){var l=u(e[a],e,i);if("throw"!==l.type){var c=l.arg,p=c.value;return p&&"object"==H6(p)&&r.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,o,s)}),(function(e){n("throw",e,o,s)})):t.resolve(p).then((function(e){c.value=e,o(c)}),(function(e){return n("throw",e,o,s)}))}s(l.arg)}var i;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return i=i?i.then(a,a):a()}})}function x(e,t,r){var a="suspendedStart";return function(n,i){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===n)throw i;return I()}for(r.method=n,r.arg=i;;){var o=r.delegate;if(o){var s=w(o,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===a)throw a="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a="executing";var l=u(e,t,r);if("normal"===l.type){if(a=r.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(a="completed",r.method="throw",r.arg=l.arg)}}}function w(e,t){var r=t.method,a=e.iterator[r];if(void 0===a)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var n=u(a,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function T(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,n=function t(){for(;++a<e.length;)if(r.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:I}}function I(){return{value:void 0,done:!0}}return h.prototype=f,a(y,"constructor",{value:f,configurable:!0}),a(f,"constructor",{value:h,configurable:!0}),h.displayName=l(f,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,s,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(_.prototype),l(_.prototype,o,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,a,n,i){void 0===i&&(i=Promise);var o=new _(c(t,r,a,n),i);return e.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},b(y),l(y,s,"Generator"),l(y,i,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var a in t)r.push(a);return r.reverse(),function e(){for(;r.length;){var a=r.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},e.values=T,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(D),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(r,a){return o.type="throw",o.arg=e,t.next=r,a&&(t.method="next",t.arg=void 0),!!a}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var n=this.tryEntries[a];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var n=a.arg;D(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function Y6(e,t,r,a,n,i,o){try{var s=e[i](o),l=s.value}catch(c){return void r(c)}s.done?t(l):Promise.resolve(l).then(a,n)}function X6(e){return function(){var t=this,r=arguments;return new Promise((function(a,n){var i=e.apply(t,r);function o(e){Y6(i,a,n,o,s,"next",e)}function s(e){Y6(i,a,n,o,s,"throw",e)}o(void 0)}))}}function Z6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function K6(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z6(Object(r),!0).forEach((function(t){J6(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z6(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function J6(e,t,r){return t=Q6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q6(e){var t=e8(e,"string");return"symbol"===H6(t)?t:String(t)}function e8(e,t){if("object"!==H6(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==H6(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var t8={name:"ReportPage",components:{ReportDetail:B4},data:function(){return{searchPanelValue:{title:"",manufacturerName:"",modelName:"",productNumber:"",module:"",plate:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",status:""},statusOptions:[{id:"DRAFT",label:"草稿"},{id:"APPROVING",label:"审批中"},{id:"COMPLETE",label:"已完成"},{id:"REJECTED",label:"已拒绝"}],tableData:[],pagination:{currentPage:1,pageSize:10,total:0},createDialogVisible:!1,selectedFile:null,fileList:[],uploading:!1,dialogMode:"create",currentRestartRow:null,currentEditRow:null,launchDialogVisible:!1,currentLaunchRow:null,launchWorkflowSteps:[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}],launching:!1,createFormData:{title:"",manufacturerName:"",modelName:"",manufacturerAbbreviation:"",modelAbbreviation:"",productNumber:"",module:"",plate:"",fileUrl:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",explanation:""},createFormRules:{title:[{required:!0,message:"请输入标题名称",trigger:"blur"}],manufacturerName:[{required:!0,message:"请输入厂家名称(全称)",trigger:"blur"}],modelName:[{required:!0,message:"请输入产品型号(全称)",trigger:"blur"}],manufacturerAbbreviation:[{required:!0,message:"请输入厂家简称",trigger:"blur"}],modelAbbreviation:[{required:!0,message:"请输入产品型号简称",trigger:"blur"}],productNumber:[{required:!0,message:"请输入产品编号",trigger:"blur"}],module:[{required:!0,message:"请输入领域/模块",trigger:"blur"}],plate:[{required:!0,message:"请输入板块",trigger:"blur"}],platform:[{required:!0,message:"请输入平台",trigger:"blur"}],series:[{required:!0,message:"请输入系列",trigger:"blur"}],marketSegment:[{required:!0,message:"请输入细分市场",trigger:"blur"}],projectName:[{required:!0,message:"请输入项目名称",trigger:"blur"}],projectNumber:[{required:!0,message:"请输入项目编号",trigger:"blur"}]},approvalWorkflowSteps:[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}],approvalDialogVisible:!1,approvalFormData:{result:"",opinion:""},approvalSubmitting:!1,currentApprovalRow:null,showReportDetail:!1,currentReportDetail:null,downloadingRowId:""}},computed:{tableConfig:function(){return{rowDraggable:!1,colConfigs:[{prop:"title",label:"标题",showOverflowTooltip:!0,minWidth:"140"},{prop:"username",label:"申请人",showOverflowTooltip:!0,minWidth:"160"},{prop:"createdTime",label:"申请时间",showOverflowTooltip:!0,minWidth:"160"},{prop:"status",label:"状态",customSlot:"status",align:"center",minWidth:"100",fixed:"right"},{prop:"options",label:"操作",customSlot:"options",align:"center",width:"160",fixed:"right"}],seqType:"seq",seqConfig:{fixed:!0},layout:"total, prev, pager, next, sizes"}}},created:function(){this.loadData()},methods:{handleCreate:function(){var e=this;this.dialogMode="create",this.currentRestartRow=null,this.currentEditRow=null,this.createFormData={title:"",manufacturerName:"",modelName:"",manufacturerAbbreviation:"",modelAbbreviation:"",productNumber:"",module:"",plate:"",fileUrl:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",explanation:""},this.fileList=[],this.selectedFile=null,this.createDialogVisible=!0,this.$nextTick((function(){e.$refs.createForm&&e.$refs.createForm.clearValidate()}))},handleEdit:function(e){var t=this;this.dialogMode="edit",this.currentEditRow=e,this.currentRestartRow=null,this.createFormData={title:e.title||"",manufacturerName:e.manufacturerName||"",modelName:e.modelName||"",manufacturerAbbreviation:e.manufacturerAbbreviation||"",modelAbbreviation:e.modelAbbreviation||"",productNumber:e.productNumber||"",module:e.module||"",plate:e.plate||"",fileUrl:e.fileUrl||e.filePath||"",platform:e.platform||"",series:e.series||"",marketSegment:e.marketSegment||"",projectName:e.projectName||"",projectNumber:e.projectNumber||"",explanation:e.explanation||""},e.fileUrl||e.filePath?this.fileList=[{name:e.title||"文件",url:e.fileUrl||e.filePath}]:this.fileList=[],this.selectedFile=null,this.createDialogVisible=!0,this.$nextTick((function(){t.$refs.createForm&&t.$refs.createForm.clearValidate()}))},handleLaunch:function(e){this.currentLaunchRow=e,this.launchWorkflowSteps=[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}],this.launchDialogVisible=!0},handleLaunchDialogClose:function(){this.launchDialogVisible=!1,this.currentLaunchRow=null,this.launchWorkflowSteps=[{name:"校对",required:!0,handlers:[],options:[],loading:!1},{name:"审核",required:!0,handlers:[],options:[],loading:!1},{name:"批准",required:!0,handlers:[],options:[],loading:!1}]},handleLaunchSubmit:function(){var e=this,t=this.launchWorkflowSteps.filter((function(e){return e.required&&(!e.handlers||0===e.handlers.length)}));if(t.length>0){var r=t.map((function(e){return e.name})).join("、");this.$message.warning('请为必填环节"'.concat(r,'"选择处理人'))}else if(this.currentLaunchRow){var a=this.currentLaunchRow.reportId||this.currentLaunchRow.id;if(a){var n={reportId:a,proofreadUsers:this.launchWorkflowSteps[0].handlers,reviewUsers:this.launchWorkflowSteps[1].handlers,countersignUsers:[],approveUsers:this.launchWorkflowSteps[2].handlers};this.launching=!0;var i=K6(K6({},nt.ADD_REPORT),{},{params:n,disableSuccessMsg:!0});this.$request(i).asyncThen((function(t){e.launching=!1,e.handleLaunchDialogClose(),e.loadData(),e.$message({type:"success",message:"发起成功"})})).asyncErrorCatch((function(t){console.error("发起失败:",t),e.launching=!1,e.$message.error("发起失败,请重试")}))}else this.$message.error("缺少报告ID")}else this.$message.error("缺少报告信息")},handleLaunchRemoteSearch:function(e,t){var r=this.launchWorkflowSteps[t];if(e&&""!==e.trim()){r.loading=!0;var a=e.trim(),n=K6(K6({},nt.GET_ALLUSERS),{},{params:{name:a},disableSuccessMsg:!0});this.$request(n).asyncThen((function(e){var t=e&&e.data,a=[];Array.isArray(t)?a=t:t&&Array.isArray(t.result)?a=t.result:t&&t.data&&Array.isArray(t.data)&&(a=t.data);var n=a.map((function(e){return{userId:e.userId||e.id,username:e.username||e.name,userNumber:e.userNumber||e.userId||e.id}})).filter((function(e){return e.userId&&e.userNumber})),i=new Set(r.handlers||[]),o=n.filter((function(e){return!i.has(e.userId)})),s=(r.options||[]).filter((function(e){return e.userId&&r.handlers&&r.handlers.includes(e.userId)})),l=new Map;s.forEach((function(e){e.userNumber&&l.set(e.userNumber,e)})),o.forEach((function(e){e.userNumber&&!l.has(e.userNumber)&&l.set(e.userNumber,e)})),r.options=Array.from(l.values()),r.loading=!1})).asyncErrorCatch((function(e){if(console.error("搜索人员失败:",e),r.handlers&&r.handlers.length>0){var t=r.options.filter((function(e){return r.handlers.includes(e.userId)}));r.options=t}else r.options=[];r.loading=!1}))}else if(r.handlers&&r.handlers.length>0){var i=r.options.filter((function(e){return r.handlers.includes(e.userId)}));r.options=i}else r.options=[]},handleLaunchHandlerChange:function(e,t){},handleRestart:function(e){var t=this;this.dialogMode="restart",this.currentRestartRow=e,this.currentEditRow=null,this.createFormData={title:e.title||"",manufacturerName:e.manufacturerName||"",modelName:e.modelName||"",manufacturerAbbreviation:e.manufacturerAbbreviation||"",modelAbbreviation:e.modelAbbreviation||"",productNumber:e.productNumber||"",module:e.module||"",plate:e.plate||"",fileUrl:e.fileUrl||e.filePath||"",platform:e.platform||"",series:e.series||"",marketSegment:e.marketSegment||"",projectName:e.projectName||"",projectNumber:e.projectNumber||"",explanation:e.explanation||""},this.fileList=[],this.selectedFile=null,this.createDialogVisible=!0,this.$nextTick((function(){t.$refs.createForm&&t.$refs.createForm.clearValidate()}))},handleDialogClose:function(){this.createDialogVisible=!1,this.dialogMode="create",this.currentRestartRow=null,this.currentEditRow=null,this.createFormData={title:"",manufacturerName:"",modelName:"",manufacturerAbbreviation:"",modelAbbreviation:"",productNumber:"",module:"",plate:"",fileUrl:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",explanation:""},this.fileList=[],this.selectedFile=null,this.$refs.createForm&&this.$refs.createForm.clearValidate()},handleFileChange:function(e,t){var r=[".doc",".pdf",".xls",".xlsx",".ppt",".pptx"],a=e.name.toLowerCase(),n=r.some((function(e){return a.endsWith(e)}));if(!n)return this.$message.error("不支持的文件类型,仅支持 .doc .pdf .xls .xlsx .ppt .pptx"),this.$refs.upload.handleRemove(e),!1;this.selectedFile=e&&e.raw?e.raw:null,this.fileList=t.slice(-1)},handleFileRemove:function(e,t){this.selectedFile=null,this.fileList=[]},handleFileUpload:function(){var e=this;if(this.uploading||!this.selectedFile)return this.selectedFile,Promise.resolve(null);var t=this.selectedFile,r=new FormData;r.append("file",t),r.append("createBy",pe());var a=K6(K6({},nt.TEST_FILE_UPLOAD),{},{params:r,disableSuccessMsg:!0});this.uploading=!0;var n=this.$loading({lock:!0,text:"正在上传文件,请稍候...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});return this.$upload(a,null,!1).then((function(t){console.log("文件上传成功:",t),n.close();var r="";if(t.data&&t){var a=t.data;r=a,e.createFormData.fileUrl=r}return r})).catch((function(t){throw console.error("文件上传失败:",t),n.close(),e.$message.error("文件上传失败,请重试"),t})).finally((function(){n&&n.close(),e.uploading=!1}))},handleSubmit:function(){var e=this;this.$refs.createForm.validate((function(t){if(!t)return!1;var r=function(){var t=X6(q6().mark((function t(){var r,a,n;return q6().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.selectedFile){t.next=13;break}return t.prev=1,t.next=4,e.handleFileUpload();case 4:r=t.sent,e.createFormData.fileUrl=r||"",t.next=13;break;case 8:return t.prev=8,t.t0=t["catch"](1),console.error("文件上传失败:",t.t0),e.$message.error("文件上传失败,请重试"),t.abrupt("return");case 13:"edit"===e.dialogMode&&e.currentEditRow?(n=e.currentEditRow.reportId||e.currentEditRow.id,a=K6(K6({},nt.EDIT_REPORT),{},{params:K6(K6({reportId:n},e.createFormData),{},{createBy:pe(),userId:pe()})})):a="restart"===e.dialogMode&&e.currentRestartRow?K6(K6({},nt.RESTART_REPORT_APPROVAL),{},{params:K6(K6({reportId:e.currentRestartRow.id||e.currentRestartRow.reportId},e.createFormData),{},{proofreadUsers:e.approvalWorkflowSteps[0].handlers,reviewUsers:e.approvalWorkflowSteps[1].handlers,countersignUsers:[],approveUsers:e.approvalWorkflowSteps[2].handlers,createBy:pe(),userId:pe()})}):K6(K6({},nt.SAVE_REPORT),{},{params:K6(K6({},e.createFormData),{},{createBy:pe(),userId:pe()})}),e.$request(a).asyncThen((function(t){e.handleDialogClose(),e.loadData(),e.$message({type:"success",message:"提交成功"})})).asyncErrorCatch((function(t){console.error("提交失败:",t),e.$message({type:"error",message:"提交失败"})}));case 15:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(){return t.apply(this,arguments)}}();r()}))},handleRemoteSearch:function(e,t){var r=this.approvalWorkflowSteps[t];if(e&&""!==e.trim()){r.loading=!0;var a=e.trim(),n=K6(K6({},nt.GET_ALLUSERS),{},{params:{name:a},disableSuccessMsg:!0});this.$request(n).asyncThen((function(e){var t=e&&e.data,a=[];Array.isArray(t)?a=t:t&&Array.isArray(t.result)?a=t.result:t&&t.data&&Array.isArray(t.data)&&(a=t.data);var n=a.map((function(e){return{userId:e.userId||e.id,username:e.username||e.name,userNumber:e.userNumber||e.userId||e.id}})).filter((function(e){return e.userId&&e.userNumber})),i=new Set(r.handlers||[]),o=n.filter((function(e){return!i.has(e.userId)})),s=(r.options||[]).filter((function(e){return e.userId&&r.handlers&&r.handlers.includes(e.userId)})),l=new Map;s.forEach((function(e){e.userNumber&&l.set(e.userNumber,e)})),o.forEach((function(e){e.userNumber&&!l.has(e.userNumber)&&l.set(e.userNumber,e)})),r.options=Array.from(l.values()),r.loading=!1})).asyncErrorCatch((function(e){if(console.error("搜索人员失败:",e),r.handlers&&r.handlers.length>0){var t=r.options.filter((function(e){return r.handlers.includes(e.userId)}));r.options=t}else r.options=[];r.loading=!1}))}else if(r.handlers&&r.handlers.length>0){var i=r.options.filter((function(e){return r.handlers.includes(e.userId)})),o=r.handlers.filter((function(e){return!i.some((function(t){return t.userId===e}))}));o.length,r.options=i}else r.options=[]},handleHandlerChange:function(e,t){},handleDownloadTemplate:function(){},handleDownload:function(e){var t=document.createElement("a");t.href=e.filePath,t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t)},handlePreview:function(e){this.$message&&this.$message.info&&this.$message.info("预览:"+(e.title||""))},handleApprove:function(e){var t=this;this.currentApprovalRow=e,this.approvalFormData={result:"",opinion:""},this.approvalDialogVisible=!0,this.$nextTick((function(){t.$refs.approvalForm&&t.$refs.approvalForm.clearValidate()}))},handleApprovalDialogClose:function(){this.approvalDialogVisible=!1,this.approvalFormData={result:"",opinion:""},this.currentApprovalRow=null,this.$refs.approvalForm&&this.$refs.approvalForm.clearValidate()},handleApprovalSubmit:function(){var e=this;if(this.approvalFormData.result)if(this.currentApprovalRow){var t={flowId:this.currentApprovalRow.flowId,userId:pe(),result:this.approvalFormData.result,opinion:this.approvalFormData.opinion||""};this.approvalSubmitting=!0;var r=K6(K6({},nt.START_REPORT_APPROVAL),{},{params:t,disableSuccessMsg:!0});this.$request(r).asyncThen((function(t){e.approvalSubmitting=!1,e.handleApprovalDialogClose(),e.loadData(),e.approvalSubmitting=!1})).asyncErrorCatch((function(t){console.error("审批提交失败:",t),e.approvalSubmitting=!1,e.$message.error("审批提交失败,请重试")}))}else this.$message.error("缺少审批信息");else this.$message.warning("请选择审核结果(通过或退回)")},pageSizeChange:function(e){this.pagination.pageSize=e},rowClickEvent:function(e){console.warn(e)},handleRowView:function(e){var t=e.reportId||e.id;t?(this.currentReportDetail={reportId:t,flowId:e.flowId},this.showReportDetail=!0):this.$message.error("缺少报告ID,无法查看详情")},closeReportDetail:function(){this.showReportDetail=!1,this.currentReportDetail=null},handleReportDetailRefresh:function(){this.loadData(),this.closeReportDetail()},currentChange:function(e){this.pagination.currentPage=e,this.loadData()},selectDataChange:function(e){this.$emit("select-data-change",e)},resetSearch:function(){this.searchPanelValue={title:"",manufacturerName:"",modelName:"",productNumber:"",module:"",plate:"",platform:"",series:"",marketSegment:"",projectName:"",projectNumber:"",status:""},this.handleSearch()},handleSearch:function(){this.loadData()},handleRefresh:function(){this.pagination.currentPage=1,this.handleSearch()},loadData:function(){var e=this,t={templateName:"",username:"",createDate:"",status:""};Object.keys(t).forEach((function(r){void 0!==e.searchPanelValue[r]&&null!==e.searchPanelValue[r]&&(t[r]=e.searchPanelValue[r])}));var r=K6(K6({},nt.GET_REPORT_LIST_BY_CONDITION),{},{params:K6({pageNumber:this.pagination.currentPage,pageSize:this.pagination.pageSize,userId:pe()},t),disableSuccessMsg:!0});this.$request(r).asyncThen((function(t){e.tableData=t.data.result,e.pagination.total=t.data.count})).asyncErrorCatch((function(e){console.error("查询失败:",e)}))}}},r8=t8,a8=(r("4453"),p(r8,U6,W6,!1,null,null,null)),n8=a8.exports,i8=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"apaas-custom-page-mydemo custom-page"},[e.showEngineCheck?r("engine-check",{attrs:{detail:e.currentCheckDetail,"engine-type":"玉柴"},on:{close:e.closeEngineCheck}}):[e._m(0),r("div",{staticClass:"page-search-panel"},[r("div",{staticClass:"search-fields"},[r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("流程主题")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.processTopic,callback:function(t){e.$set(e.searchPanelValue,"processTopic",t)},expression:"searchPanelValue.processTopic"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("产品型号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.modelName,callback:function(t){e.$set(e.searchPanelValue,"modelName",t)},expression:"searchPanelValue.modelName"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("子系统")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.subsystemName,callback:function(t){e.$set(e.searchPanelValue,"subsystemName",t)},expression:"searchPanelValue.subsystemName"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("申请人")]),r("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",remote:"","reserve-keyword":"",placeholder:"请输入申请人姓名搜索","remote-method":e.handleApplicantSearch,loading:e.applicantLoading,clearable:""},model:{value:e.searchPanelValue.applicant,callback:function(t){e.$set(e.searchPanelValue,"applicant",t)},expression:"searchPanelValue.applicant"}},e._l(e.applicantOptions,(function(t){return r("el-option",{key:t.userId,attrs:{value:t.userId,label:t.username}},[r("span",{staticClass:"username-text"},[e._v(e._s(t.username))]),r("span",{staticClass:"user-id-text"},[e._v(e._s(t.userNumber))])])})),1)],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("当前状态")]),r("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.searchPanelValue.statusDescription,callback:function(t){e.$set(e.searchPanelValue,"statusDescription",t)},expression:"searchPanelValue.statusDescription"}},[r("el-option",{attrs:{label:"审批中",value:"审批中"}}),r("el-option",{attrs:{label:"已通过",value:"已通过"}}),r("el-option",{attrs:{label:"已退回",value:"已退回"}})],1)],1),r("div",{staticClass:"search-actions"},[r("el-button",{attrs:{type:"primary"},on:{click:e.handleSearch}},[e._v(" 查询 ")]),r("el-button",{on:{click:e.resetSearch}},[e._v(" 重置 ")])],1)])]),r("div",{staticClass:"page-data-list"},[r("x-vxe-table",{ref:"vxeTable",staticClass:"block-table",attrs:{border:!0,seqWidth:40,colConfigs:e.tableConfig.colConfigs,tableData:e.tableData,rowDraggable:e.tableConfig.rowDraggable,seqType:e.tableConfig.seqType,pagination:e.pagination,layout:e.tableConfig.layout,seqConfig:e.tableConfig.seqConfig,autoSize:e.tableConfig.autoSize,pageConfig:e.tableConfig.pageConfig},on:{"table-row-click":e.rowClickEvent,"size-change":e.pageSizeChange,"current-page-change":e.currentChange},scopedSlots:e._u([e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customSlot,fn:function(n){var i=n.row,o=n.rowIndex;return["options"===t.customSlot?r("div",{key:a+""+o},[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleViewProgress(i)}}},[e._v(" 查看进度 ")])]):e._e(),"statusDescription"===t.customSlot?r("div",{key:a+""+o},["审核中"===i[t.prop]?r("span",{staticClass:"status-tag status-approving"},[e._v("审核中")]):"已通过"===i[t.prop]?r("span",{staticClass:"status-tag status-approved"},[e._v("已通过")]):"已拒绝"===i[t.prop]?r("span",{staticClass:"status-tag status-withdrawn"},[e._v("已拒绝")]):r("span",{staticClass:"status-tag status-default"},[e._v(e._s(i[t.prop]))])]):e._e()]}}}))],null,!0)},[r("template",{slot:"empty"},[r("div",{staticClass:"table-empty"},[r("x-empty-page")],1)])],2)],1)],r("el-dialog",{attrs:{title:"审批",visible:e.approvalDialogVisible,width:"500px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(t){e.approvalDialogVisible=t},close:e.handleApprovalDialogClose}},[r("el-form",{ref:"approvalForm",attrs:{model:e.approvalFormData,rules:e.approvalFormRules,"label-width":"80px"}},[r("el-form-item",{attrs:{label:"审批结果",prop:"operator"}},[r("el-radio-group",{model:{value:e.approvalFormData.operator,callback:function(t){e.$set(e.approvalFormData,"operator",t)},expression:"approvalFormData.operator"}},[r("el-radio",{attrs:{label:"PASS"}},[e._v(" 同意 ")]),r("el-radio",{attrs:{label:"REJECT"}},[e._v(" 拒绝 ")])],1)],1),r("el-form-item",{attrs:{label:"说明",prop:"comment"}},[r("el-input",{attrs:{type:"textarea",rows:4,placeholder:"请输入审批说明"},model:{value:e.approvalFormData.comment,callback:function(t){e.$set(e.approvalFormData,"comment",t)},expression:"approvalFormData.comment"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleApprovalDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.approvalSubmitting},on:{click:e.handleApprovalSubmit}},[e._v(" 确定 ")])],1)],1)],2)},o8=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"page-header"},[r("div",{staticClass:"title"},[e._v(" 玉柴发动机审核 ")])])}],s8=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("transition",{attrs:{name:"approval-progress-fade"}},[e.visible?r("div",{staticClass:"approval-progress-detail"},[r("div",{staticClass:"detail-panel"},[r("div",{staticClass:"detail-header"},[r("div",{staticClass:"header-left"},[r("el-button",{staticClass:"back-button",attrs:{type:"text",icon:"el-icon-arrow-left"},on:{click:e.handleBack}}),r("div",{staticClass:"header-info"},[r("div",{staticClass:"title"},[e._v(" "+e._s(e.titleText)+" ")])])],1),e.fromTodo?r("div",{staticClass:"header-right"},[r("el-button",{attrs:{size:"small"},on:{click:e.handleReturn}},[e._v(" 退回 ")]),e.canResend?r("el-button",{attrs:{size:"small",loading:e.resending},on:{click:e.handleResend}},[e._v(" 直送 ")]):e._e(),r("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.handleSubmit}},[e._v(" 提交 ")])],1):e._e()]),r("div",{staticClass:"detail-content"},[r("section",{staticClass:"block-section"},[r("div",{staticClass:"section-title"},[e._v(" 基础信息 ")]),r("div",{staticClass:"info-grid"},[r("div",{staticClass:"info-item-full"},[r("span",{staticClass:"label"},[e._v("流程主题")]),e.isEditingProcessTitle?r("div",{staticClass:"process-title-input-wrapper"},[r("el-input",{staticClass:"process-title-input",attrs:{placeholder:"请输入流程主题",maxlength:"100","show-word-limit":""},model:{value:e.editingProcessTitle,callback:function(t){e.editingProcessTitle=t},expression:"editingProcessTitle"}},[r("template",{slot:"suffix"},[r("i",{staticClass:"el-icon-check process-title-icon",on:{click:e.handleSaveProcessTitle}}),r("i",{staticClass:"el-icon-close process-title-icon",on:{click:e.handleCancelProcessTitle}})])],2)],1):r("div",{staticClass:"value process-title-value-wrapper"},[e._v(" "+e._s(e.showTopDetail.processTitle||"--")+" "),r("i",{staticClass:"el-icon-edit process-title-edit-icon",on:{click:e.handleEditProcessTitle}})])]),r("div",{staticClass:"info-row"},[r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("创建人")]),r("span",{staticClass:"value"},[e._v(e._s(e.showTopDetail.createBy||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("创建时间")]),r("span",{staticClass:"value"},[e._v(e._s(e.showTopDetail.creationDate||e.showTopDetail.createTime||"--"))])])]),r("div",{staticClass:"info-row"},[r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("当前环节")]),r("span",{staticClass:"value"},[e._v(e._s(e.showTopDetail.currentNode||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("当前处理人")]),r("span",{staticClass:"value"},[e._v(e._s(e.showTopDetail.processor||"--"))])])])])]),r("section",{staticClass:"block-section"},[r("div",{staticClass:"section-title"},[e._v(" 审批内容 ")]),r("el-table",{staticClass:"change-table",attrs:{data:e.changeTable||[],border:"","max-height":500}},[r("el-table-column",{attrs:{label:"序号",type:"index",width:"60"}}),r("el-table-column",{attrs:{prop:"subsystemName",label:"子系统","min-width":"120","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"parameterType",label:"类型","min-width":"120","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"partsName",label:"零部件名称","min-width":"140","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"parameterName",label:"参数名称","min-width":"140","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"parameterValue",label:"参数值","min-width":"160"}}),r("el-table-column",{attrs:{prop:"unit",label:"单位","min-width":"80","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"changeComment",label:"修改描述","min-width":"160"}})],1),e.changeTableTotal>0?r("el-pagination",{staticClass:"pagination-wrapper",attrs:{"current-page":e.changeTablePageNumber,"page-size":e.changeTablePageSize,total:e.changeTableTotal,layout:"total, prev, pager, next, jumper"},on:{"current-change":e.handlePageChange}}):e._e(),e.progressDetail.description?r("div",{staticClass:"description-block"},[r("span",{staticClass:"label"},[e._v("说明:")]),r("span",{staticClass:"value"},[e._v(e._s(e.detailOption))])]):e._e()],1),r("section",{staticClass:"block-section"},[r("div",{staticClass:"section-title"},[e._v(" 审批流程 ")]),e.timelineNodes&&e.timelineNodes.length>0?r("div",{staticClass:"approval-timeline"},[r("el-timeline",e._l(e.timelineNodes,(function(t,a){return r("el-timeline-item",{key:a,attrs:{color:e.getTimelineColor(t.result||t.status,a,e.timelineNodes.length)}},[r("div",{staticClass:"timeline-item-content"},[r("div",{staticClass:"node-title"},[e._v(" "+e._s(t.title)+" ")]),r("div",{staticClass:"node-content"},[r("div",{staticClass:"node-info"},[r("div",{staticClass:"node-user"},[e._v(" "+e._s(t.userName||"--")+" "),r("span",{staticClass:"node-time"},[e._v(" "+e._s(t.operateTime)+" ")])])]),r("div",{staticClass:"node-status",class:e.getStatusClass(t.result||t.status)},[e._v(" "+e._s(e.setStatusText(t.result||t.status))+" ")]),t.opinion?r("div",{staticClass:"node-opinion"},[e._v(" 审批意见:"+e._s(t.opinion)+" ")]):e._e()])])])})),1)],1):r("div",{staticClass:"empty-progress"},[r("span",{staticClass:"empty-text"},[e._v("暂无审批流程数据")])])])])])]):e._e()]),r("el-dialog",{attrs:{title:e.approvalDialogTitle,visible:e.approvalDialogVisible,width:"600px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(t){e.approvalDialogVisible=t},close:e.handleApprovalDialogClose}},[r("el-form",{ref:"approvalForm",attrs:{model:e.approvalFormData,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"reject"===e.approvalActionType?"退回意见:":"提交意见:",prop:"comment"}},[r("el-input",{attrs:{type:"textarea",rows:4,placeholder:"reject"===e.approvalActionType?"请输入退回意见":"请输入提交意见"},model:{value:e.approvalFormData.comment,callback:function(t){e.$set(e.approvalFormData,"comment",t)},expression:"approvalFormData.comment"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleApprovalDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.approvalSubmitting},on:{click:e.handleApprovalSubmit}},[e._v(" 确定 ")])],1)],1),r("el-dialog",{attrs:{title:"选择退回节点",visible:e.returnNodeDialogVisible,width:"500px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(t){e.returnNodeDialogVisible=t},close:e.handleReturnNodeDialogClose}},[r("div",{staticClass:"return-node-dialog-content"},[r("el-radio-group",{on:{change:e.handleReturnNodeChange},model:{value:e.selectedReturnNode,callback:function(t){e.selectedReturnNode=t},expression:"selectedReturnNode"}},e._l(e.returnableNodes,(function(e){return r("el-radio",{key:e,attrs:{label:e}})})),1),"发起审批"===e.selectedReturnNode?r("div",{staticClass:"return-opinion-section"},[r("div",{staticClass:"opinion-label"},[e._v(" 退回意见: ")]),r("el-input",{attrs:{type:"textarea",rows:3,placeholder:"请输入退回意见"},model:{value:e.returnOpinion,callback:function(t){e.returnOpinion=t},expression:"returnOpinion"}})],1):e._e()],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleReturnNodeDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.returnSubmitting,disabled:!e.selectedReturnNode},on:{click:e.handleReturnSubmit}},[e._v(" 确定 ")])],1)])],1)},l8=[];function c8(e){return c8="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c8(e)}function u8(e){return f8(e)||h8(e)||d8(e)||p8()}function p8(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d8(e,t){if(e){if("string"===typeof e)return m8(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m8(e,t):void 0}}function h8(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function f8(e){if(Array.isArray(e))return m8(e)}function m8(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function g8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function v8(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g8(Object(r),!0).forEach((function(t){y8(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g8(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function y8(e,t,r){return t=b8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b8(e){var t=_8(e,"string");return"symbol"===c8(t)?t:String(t)}function _8(e,t){if("object"!==c8(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==c8(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var x8={name:"EngineCheck",props:{detail:{type:Object,default:function(){return{}}},visible:{type:Boolean,default:!0},flowId:{type:String,default:""},fromTodo:{type:Boolean,default:!1},engineType:{type:String,default:"玉柴",validator:function(e){return-1!==["玉柴","竞品"].indexOf(e)}}},data:function(){return{changeTable:[],showTopDetail:{processTitle:"",createBy:"",creationDate:"",currentNode:"",currentProcessor:""},changeTableAll:[],progress:[],detailOption:"",changeTableTotal:0,changeTablePageNumber:1,changeTablePageSize:10,activitiRecordDTOS:[],flowNodes:[],progressDetailData:{},approvalDialogVisible:!1,approvalActionType:"",approvalDialogTitle:"审批",approvalFormData:{operator:"同意",comment:""},approvalSubmitting:!1,canResend:!1,resending:!1,returnNodeDialogVisible:!1,returnableNodes:[],selectedReturnNode:"",returnSubmitting:!1,returnOpinion:"",isEditingProcessTitle:!1,editingProcessTitle:""}},computed:{titleText:function(){return console.log(this.engineType,"this.engineType",this.detail,111111),"玉柴"===this.engineType?"玉柴发动机审批详情":"竞品发动机审批详情"},progressDetail:function(){if(this.progressDetailData&&Object.keys(this.progressDetailData).length>0)return{progressTitle:this.progressDetailData.progressTitle||"",contentName:this.progressDetailData.contentName||"",templateVersion:this.progressDetailData.templateVersion||"",explanation:this.progressDetailData.explanation||"",description:this.progressDetailData.explanation||this.progressDetailData.description||""};var e={approvalNumber:"",approvalId:"",currentNode:"",currentProcessor:"",processTitle:"",modelName:"",id:"",createBy:"",creationDate:"",applicant:"",department:"",submitTime:"",description:"",changeTable:[],progress:[]};return Object.assign(e,this.detail||{})},currentNode:function(){if(this.flowNodes&&this.flowNodes.length>0){var e=this.flowNodes.find((function(e){return"待审批"===e.result||"APPROVING"===e.result}));if(e)return e.node||"--";var t=this.flowNodes[this.flowNodes.length-1];return t&&t.node||"--"}return"--"},currentProcessor:function(){if(this.flowNodes&&this.flowNodes.length>0){var e=this.flowNodes.find((function(e){return"待审批"===e.result||"APPROVING"===e.result}));if(e)return e.undoUserName||e.todoUserName||"--"}return"--"},initiateNode:function(){return this.detail&&this.detail.createBy?{userName:this.detail.createBy,createTime:this.detail.createdTime||this.detail.createTime,status:"INITIATE",result:"INITIATE"}:null},timelineNodes:function(){var e=[];if(this.flowNodes&&this.flowNodes.length>0?this.flowNodes.forEach((function(t){e.push({title:t.node||"审批节点",userName:t.todoUserName||t.undoUserName||t.userName||"--",operateTime:t.approvalTime||t.operateTime||t.handleTime||t.createTime||"",result:t.result||"",status:t.status||t.result||"",opinion:t.opinion||(t.opinions&&Array.isArray(t.opinions)&&t.opinions.length>0?t.opinions[0]:null)||null})})):this.progress&&this.progress.length>0&&this.progress.forEach((function(t){t.steps&&t.steps.length>0&&t.steps.forEach((function(r){e.push({title:t.title||"审批节点",userName:r.userName,operateTime:r.approvalTime||r.handleTime||r.createTime,result:r.result||r.status,status:r.result||r.status,opinion:r.opinion||r.remark||r.comment||null})}))})),e.length>0){var t=e[0],r=t.result||t.status||"";"STAY"!==r&&"待审批"!==r||(t.result="APPROVING",t.status="APPROVING")}return e},approvalFormRules:function(){return{comment:[{required:!0,message:"请输入意见",trigger:"blur"}]}}},mounted:function(){this.getApprovalDetail(),this.canResendApproval()},methods:{canResendApproval:function(){var e=this,t=v8(v8({},nt.CHECK_DATA_CAN_RETURN),{},{params:{flowId:this.flowId},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){console.log(t),e.canResend=t.data||!1})).asyncErrorCatch((function(t){console.error("获取是否可以直送失败:",t),e.canResend=!1}))},getApprovalChange:function(){var e=this,t=v8(v8({},nt.CHANGE_ENGINE_DATA),{},{params:{modelID:this.detail.modelId,userID:pe()},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){console.log(t),e.changeTable=t.data,e.changeTableTotal=t.data.length})).asyncErrorCatch((function(e){console.error("获取审批变更失败:",e)}))},getApprovalDetail:function(){var e=this,t=v8(v8({},nt.GET_ENGINE_CHECK_DETAIL),{},{params:{approvalId:this.detail.id,userId:pe()},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){var r;console.log(t);var a=[];t.data?(e.showTopDetail={processTitle:t.data.processTitle,createBy:t.data.createBy,creationDate:t.data.createTime,currentNode:"已拒绝"===t.data.approvalStatus?"编制":t.data.currentNode||"",processor:"已拒绝"===t.data.approvalStatus?t.data.createBy:t.data.processor||""},t.data.list&&Array.isArray(t.data.list)?(a=t.data.list,e.changeTableTotal=t.data.total||t.data.totalCount||t.data.count||a.length):t.data.activitiDataDTOS?(a=Array.isArray(t.data.activitiDataDTOS)?t.data.activitiDataDTOS:[],e.changeTableTotal=t.data.total||t.data.totalCount||t.data.count||a.length):Array.isArray(t.data)?(a=t.data,e.changeTableTotal=a.length):(a=[],e.changeTableTotal=0)):(a=[],e.changeTableTotal=0),e.changeTableAll=a,e.updatePagedData();var n=(null===(r=t.data)||void 0===r?void 0:r.flowNodes)||[],i=n,o=t.data||t;e.progressDetailData={explanation:o.explanation||"",flowStatus:o.flowStatus||"",progressTitle:o.progressTitle||o.processTitle||"",templateVersion:o.templateVersion||"",contentName:o.contentName||""},e.detailOption=o.explanation||o.description||"",o.flowNodes&&Array.isArray(o.flowNodes)?e.flowNodes=o.flowNodes:i&&i.length>0?e.flowNodes=i.map((function(e){return{node:e.node||"",result:e.operate||e.result||"",status:e.operate||e.result||"",todoUserName:e.approvedPerson||e.unapprovedPerson||"",undoUserName:e.unapprovedPerson||"",approvalTime:e.operateTime||e.handleTime||e.createTime||"",opinions:e.common||e.comment||e.opinion?[e.common||e.comment||e.opinion]:[],opinion:e.common||e.comment||e.opinion||null}})):e.flowNodes=[],e.activitiRecordDTOS=i}))},updatePagedData:function(){if(this.changeTableAll&&0!==this.changeTableAll.length){var e=(this.changeTablePageNumber-1)*this.changeTablePageSize,t=e+this.changeTablePageSize;this.changeTable=this.changeTableAll.slice(e,t)}else this.changeTable=[]},setStatusText:function(e){var t={PASS:"通过",REJECT:"拒绝",REFUSE:"驳回",APPROVE:"批准",APPROVING:"审批中",PENDING:"待处理",WAITING:"待处理",STAY:"待审批",INITIATE:"发起审批",RETURN:"退回",MSG:"通过","待审批":"待审批","审批中":"审批中","发起审批":"发起审批"};return void 0!==t[e]?t[e]:e||"待处理"},formatTime:function(e){if(!e)return"--";if("number"===typeof e){var t=new Date(e);return t.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return e},getTimelineColor:function(e,t,r){return"PASS"===e||"APPROVE"===e||"MSG"===e?"#67C23A":"REJECT"===e||"REFUSE"===e?"#F56C6C":"APPROVING"===e||"PENDING"===e||"WAITING"===e||"审批中"===e?"#E6A23C":"STAY"===e||"待审批"===e?"#909399":"#409EFF"},getStatusClass:function(e){var t={PASS:"status-pass",APPROVE:"status-approve",MSG:"status-pass",REJECT:"status-reject",REFUSE:"status-reject",APPROVING:"status-approving","审批中":"status-approving",PENDING:"status-pending",WAITING:"status-pending",STAY:"status-default","待审批":"status-default",INITIATE:"status-initiate","发起审批":"status-initiate",RETURN:"status-return"};return t[e]||"status-default"},getApprovalSpet:function(){var e=this,t=v8(v8({},nt.GET_PPROVAL_ALL),{},{params:{flowId:this.detail.flowId,templateId:this.detail.templateId},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){var r,a;console.log("审批流程数据:",t),e.detailOption=(null===(r=t.data)||void 0===r?void 0:r.explanation)||(null===(a=t.data)||void 0===a?void 0:a.description)||"";var n=[],i=t.data||t;if(i.proofreadNodes&&Array.isArray(i.proofreadNodes)&&i.proofreadNodes.length>0){var o=i.proofreadNodes;n.push({title:"校对",steps:e.deduplicateSteps(Array.isArray(o)?o:[o])})}if(i.reviewNodes&&Array.isArray(i.reviewNodes)&&i.reviewNodes.length>0){var s=i.reviewNodes;n.push({title:"审核",steps:e.deduplicateSteps(Array.isArray(s)?s:[s])})}if(i.countersignNodes&&Array.isArray(i.countersignNodes)&&i.countersignNodes.length>0){var l=i.countersignNodes;n.push({title:"会签",steps:e.deduplicateSteps(Array.isArray(l)?l:[l])})}if(i.approveNodes&&Array.isArray(i.approveNodes)&&i.approveNodes.length>0){var c=i.approveNodes;n.push({title:"批准",steps:e.deduplicateSteps(Array.isArray(c)?c:[c])})}0===n.length&&i&&(Array.isArray(i)?n=i.map((function(t){return{title:t.title||t.nodeType||t.name||"审批节点",steps:e.deduplicateSteps(Array.isArray(t.steps)?t.steps:Array.isArray(t.nodes)?t.nodes:[])}})):i.nodes&&Array.isArray(i.nodes)?n=i.nodes.map((function(t){return{title:t.title||t.nodeType||t.name||"审批节点",steps:e.deduplicateSteps(Array.isArray(t.steps)?t.steps:Array.isArray(t.nodes)?t.nodes:[])}})):i.processNodes&&Array.isArray(i.processNodes)&&(n=i.processNodes.map((function(t){return{title:t.title||t.nodeType||t.name||"审批节点",steps:e.deduplicateSteps(Array.isArray(t.steps)?t.steps:Array.isArray(t.nodes)?t.nodes:[])}})))),e.progress=n,console.log("处理后的流程数据:",e.progress)}))},handleBack:function(){this.$emit("close")},handleReturn:function(){var e=this;if(this.detail&&this.detail.flowId){var t=v8(v8({},nt.GET_CAN_RETURN_DATA_NODE),{},{params:{flowId:this.detail.flowId},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){console.log(t);var r=Array.isArray(t.data)?t.data:[];e.returnableNodes=["发起审批"].concat(u8(r))})).asyncErrorCatch((function(t){console.error("获取退回节点失败:",t),e.returnableNodes=["发起审批"]})),this.selectedReturnNode="",this.returnOpinion="",this.returnNodeDialogVisible=!0}else this.$message.error("缺少审批信息")},handleReturnNodeDialogClose:function(){this.returnNodeDialogVisible=!1,this.selectedReturnNode="",this.returnOpinion=""},handleReturnNodeChange:function(){"发起审批"!==this.selectedReturnNode&&(this.returnOpinion="")},handleReturnSubmit:function(){var e=this;if(this.selectedReturnNode)if(this.detail&&this.detail.flowId)if(this.returnSubmitting=!0,"发起审批"===this.selectedReturnNode){var t={approvalId:this.detail.id,operator:"REJECT",comment:this.returnOpinion||"",userId:pe()},r=v8(v8({},nt.HANDLE_ENGINE_CHECK),{},{params:t,disableSuccessMsg:!0});this.$request(r).asyncThen((function(t){e.handleReturnNodeDialogClose(),e.getApprovalDetail(),e.$message({message:"拒绝成功",type:"success"}),e.$emit("refresh"),e.returnSubmitting=!1})).asyncErrorCatch((function(t){console.error("拒绝失败:",t),e.$message({message:t.message||"拒绝失败,请重试",type:"error"}),e.returnSubmitting=!1})).finally((function(){e.returnSubmitting=!1}))}else{var a=this.detail.createdById||"";if(!a)return this.$message.error("无法获取流程发起人信息"),void(this.returnSubmitting=!1);var n=pe(),i={flowId:this.detail.flowId,nodeName:this.selectedReturnNode,createUserId:a,processUserId:n},o=v8(v8({},nt.CAN_RETURN_DATA_NODE),{},{params:i,disableSuccessMsg:!0});this.$request(o).asyncThen((function(t){e.handleReturnNodeDialogClose(),e.getApprovalDetail(),e.$message({message:"退回成功",type:"success"}),e.$emit("refresh"),e.returnSubmitting=!1})).asyncErrorCatch((function(t){console.error("退回失败:",t),e.$message({message:t.message||"退回失败,请重试",type:"error"}),e.returnSubmitting=!1})).finally((function(){e.returnSubmitting=!1}))}else this.$message.error("缺少审批信息");else this.$message.warning("请选择要退回的节点")},handleResend:function(){var e=this;this.detail&&this.detail.id?this.$confirm("确定要执行直送操作吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.resending=!0;var t=v8(v8({},nt.RESEND_DATA_APPROVAL),{},{params:{approvalId:e.detail.id,userId:pe()},disableSuccessMsg:!0});e.$request(t).asyncThen((function(t){e.getApprovalDetail(),e.$message({message:"直送成功",type:"success"}),e.$emit("refresh"),e.resending=!1})).asyncErrorCatch((function(t){console.error("直送失败:",t),e.$message({message:t.message||"直送失败,请重试",type:"error"}),e.resending=!1})).finally((function(){e.resending=!1}))})).catch((function(){})):this.$message.error("缺少审批ID,无法执行直送操作")},handleSubmit:function(){var e=this;this.approvalActionType="submit",this.approvalDialogTitle="提交",this.approvalFormData={operator:"同意",comment:""},this.approvalFormData.comment="同意",this.approvalDialogVisible=!0,this.$nextTick((function(){e.$refs.approvalForm&&e.$refs.approvalForm.clearValidate()}))},handleApprovalSubmit:function(){var e=this;this.$refs.approvalForm.validate((function(t){if(e.detail&&e.detail.id){var r=e.detail.id;if(r){var a="reject"===e.approvalActionType?"REJECT":"PASS",n={approvalId:r,operator:a,comment:e.approvalFormData.comment,userId:pe()},i=v8(v8({},nt.HANDLE_ENGINE_CHECK),{},{params:n,disableSuccessMsg:!0});e.approvalSubmitting=!0,e.$request(i).asyncThen((function(t){console.log("审批提交成功"),e.handleApprovalDialogClose(),e.getApprovalDetail(),e.$emit("refresh"),e.approvalSubmitting=!1})).asyncErrorCatch((function(t){console.error("审批提交失败:",t),e.$message.error(t.message||"审批提交失败,请重试"),e.approvalSubmitting=!1})).finally((function(){e.approvalSubmitting=!1}))}else e.$message.error("缺少审批ID,无法提交审批")}else e.$message.error("缺少审批数据")}))},handleApprovalDialogClose:function(){this.approvalDialogVisible=!1,this.approvalActionType="",this.approvalDialogTitle="审批",this.approvalFormData={operator:"同意",comment:""},this.$refs.approvalForm&&this.$refs.approvalForm.clearValidate()},handlePageChange:function(e){this.changeTablePageNumber=e,this.updatePagedData()},changeTypeClass:function(e){return"create"===e?"change-create":"delete"===e?"change-delete":"update"===e?"change-update":"change-default"},deduplicateSteps:function(e){var t=this;if(!Array.isArray(e)||0===e.length)return[];var r=new Map,a=[];return e.forEach((function(e){var t=null;if(e.id)t="id_".concat(e.id);else{var n=e.userName||e.operator||e.username||e.handlerName||e.handler||"",i=e.approvalTime||e.handleTime||e.createTime||"",o=e.result||e.status||"";t="combo_".concat(n,"_").concat(i,"_").concat(o)}if(t)if(r.has(t)){var s=r.get(t),l=a[s],c=!!(e.approvalTime||e.handleTime||e.createTime),u=!!(l.approvalTime||l.handleTime||l.createTime);c&&!u&&(a[s]=e)}else r.set(t,a.length),a.push(e)})),a.map((function(e){var r=v8({},e);return r.approvalTime&&(r.approvalTime=t.formatTime(r.approvalTime)),r.handleTime&&(r.handleTime=t.formatTime(r.handleTime)),r.createTime&&(r.createTime=t.formatTime(r.createTime)),r}))},handleEditProcessTitle:function(){this.isEditingProcessTitle=!0,this.editingProcessTitle=this.showTopDetail.processTitle||""},handleCancelProcessTitle:function(){this.isEditingProcessTitle=!1,this.editingProcessTitle=""},handleSaveProcessTitle:function(){var e,t=this,r=this.flowId||(null===(e=this.detail)||void 0===e?void 0:e.flowId);if(r){var a=(this.editingProcessTitle||"").trim();a?this.$confirm("确认修改主题为".concat(a,"吗?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var e=v8(v8({},nt.EDIT_DATA_PROCESS_TITLE),{},{params:{flowId:r,title:a},disableSuccessMsg:!0});t.$request(e).asyncThen((function(e){t.showTopDetail.processTitle=a,t.isEditingProcessTitle=!1,t.editingProcessTitle="",t.$message({message:"修改成功",type:"success"})})).asyncErrorCatch((function(e){console.error("修改流程主题失败:",e),t.$message({message:e.message||"修改失败,请重试",type:"error"})}))})).catch((function(){})):this.$message.warning("流程主题不能为空")}else this.$message.error("缺少流程ID,无法保存")}}},w8=x8,S8=(r("eed8"),p(w8,s8,l8,!1,null,"0442f9cc",null)),D8=S8.exports;function C8(e){return C8="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C8(e)}function T8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function I8(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T8(Object(r),!0).forEach((function(t){O8(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T8(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O8(e,t,r){return t=M8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M8(e){var t=A8(e,"string");return"symbol"===C8(t)?t:String(t)}function A8(e,t){if("object"!==C8(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==C8(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var k8=function(){return{loginUserId:pe(),processTopic:"",modelName:"",subsystemName:"",applicant:"",statusDescription:"",ycOrOth:"玉柴"}},P8={name:"SelfEngineCheck",components:{EngineCheck:D8},data:function(){return{searchPanelValue:k8(),tableData:[],pagination:{currentPage:1,pageSize:10,total:0},showEngineCheck:!1,currentCheckDetail:null,approvalDialogVisible:!1,currentApprovalRow:null,approvalFormData:{operator:"PASS",comment:""},approvalSubmitting:!1,applicantOptions:[],applicantLoading:!1,applicantSearchTimer:null}},computed:{tableConfig:function(){return{rowDraggable:!1,colConfigs:[{prop:"processTopic",label:"流程主题",showOverflowTooltip:!0,minWidth:"120"},{prop:"modelName",label:"产品型号",showOverflowTooltip:!0,minWidth:"120"},{prop:"applicant",label:"申请人",showOverflowTooltip:!0,minWidth:"100"},{prop:"creationDate",label:"申请时间",showOverflowTooltip:!0,minWidth:"160"},{prop:"statusDescription",label:"当前状态",customSlot:"statusDescription",showOverflowTooltip:!0,minWidth:"100",align:"center"},{prop:"approverPersons",label:"当前审批人",showOverflowTooltip:!0,minWidth:"100"},{prop:"options",label:"操作",customSlot:"options",align:"center",width:"180",fixed:"right"}],seqType:"seq",layout:"total, prev, pager, next, sizes"}},approvalFormRules:function(){return{result:[{required:!0,message:"请选择审批结果",trigger:"change"}],opinion:[{required:!0,message:"请输入审批说明",trigger:"blur"}]}}},created:function(){this.loadUserSelfRole(),this.loadData()},beforeDestroy:function(){this.applicantSearchTimer&&(clearTimeout(this.applicantSearchTimer),this.applicantSearchTimer=null)},methods:{isApplicant:function(e){if(!e)return!1;var t=pe();return e.createdBy===t||e.createdById===t||e.createBy===t||e.createById===t},isApprover:function(e){if(!e)return!1;var t=pe();return e.currentApprovers&&Array.isArray(e.currentApprovers)?e.currentApprovers.some((function(e){return e.userId===t||e.userNumber===t||e.id===t})):e.approverPersons&&Array.isArray(e.approverPersons)?e.approverPersons.some((function(e){var r=e.userId||e.userNumber||e.id||e;return r===t})):!(!e.approverPersonIds||!Array.isArray(e.approverPersonIds))&&e.approverPersonIds.includes(t)},canShowApproveButton:function(e){return!(!e||"审核中"!==e.statusDescription)&&this.isApprover(e)},canShowWithdrawButton:function(e){return!(!e||"审核中"!==e.statusDescription)&&this.isApplicant(e)},loadUserSelfRole:function(){var e=I8(I8({},nt.GET_USER_SELF_ROLE),{},{params:{userOrDepID:pe()},disableSuccessMsg:!0});this.$request(e).asyncThen((function(e){if(e&&e.data)try{localStorage.setItem("user_self_role",JSON.stringify(e.data))}catch(t){console.error("存储权限数据到 localStorage 失败:",t)}})).asyncErrorCatch((function(e){console.error("获取用户自身角色失败:",e)}))},pageSizeChange:function(e){this.pagination.pageSize=e,this.loadData()},rowClickEvent:function(e){console.warn(e)},currentChange:function(e){this.pagination.currentPage=e,this.loadData()},selectDataChange:function(e){this.$emit("select-data-change",e)},resetSearch:function(){var e=this,t=k8();Object.keys(t).forEach((function(r){e.$set(e.searchPanelValue,r,t[r])})),this.applicantOptions=[],this.handleSearch()},handleSearch:function(){this.pagination.currentPage=1,this.loadData()},handleApplicantSearch:function(e){var t=this;if(e&&""!==e.trim())this.applicantSearchTimer&&clearTimeout(this.applicantSearchTimer),this.applicantSearchTimer=setTimeout((function(){var r=e.trim();if(r){t.applicantLoading=!0;var a=I8(I8({},nt.GET_ALLUSERS),{},{params:{name:r},disableSuccessMsg:!0});t.$request(a).asyncThen((function(e){var r=e&&e.data,a=[];Array.isArray(r)?a=r:r&&Array.isArray(r.result)?a=r.result:r&&r.data&&Array.isArray(r.data)&&(a=r.data);var n=a.map((function(e){return{userId:e.userId||e.id,username:e.username||e.name,userNumber:e.userNumber||e.userId||e.id}})).filter((function(e){return e.userId&&e.userNumber})),i=t.searchPanelValue.applicant?t.applicantOptions.find((function(e){return e.userId===t.searchPanelValue.applicant})):null,o=new Map;i&&o.set(i.userId,i),n.forEach((function(e){e.userId&&!o.has(e.userId)&&o.set(e.userId,e)})),t.applicantOptions=Array.from(o.values()),t.applicantLoading=!1})).asyncErrorCatch((function(e){if(console.error("搜索申请人失败:",e),t.searchPanelValue.applicant){var r=t.applicantOptions.find((function(e){return e.userId===t.searchPanelValue.applicant}));t.applicantOptions=r?[r]:[]}else t.applicantOptions=[];t.applicantLoading=!1}))}else t.applicantOptions=[]}),300);else if(this.searchPanelValue.applicant){var r=this.applicantOptions.find((function(e){return e.userId===t.searchPanelValue.applicant}));this.applicantOptions=r?[r]:[]}else this.applicantOptions=[]},handleViewProgress:function(e){var t=e.flowId||e.id;t?(this.showEngineCheck=!0,this.currentCheckDetail=I8(I8({},e),{},{flowId:e.id})):this.$message({type:"error",message:"缺少审批ID,无法查看详情"})},closeEngineCheck:function(){this.showEngineCheck=!1,this.currentCheckDetail=null},handleApprove:function(e){var t=this;this.currentApprovalRow=e,this.approvalFormData={operator:"PASS",comment:""},this.approvalDialogVisible=!0,this.$nextTick((function(){t.$refs.approvalForm&&t.$refs.approvalForm.clearValidate()}))},handleApprovalSubmit:function(){var e=this;this.$refs.approvalForm.validate((function(t){if(t){if(!e.currentApprovalRow)return void e.$message.error("缺少审批数据");var r=e.currentApprovalRow.flowId||e.currentApprovalRow.id;if(!r)return void e.$message.error("缺少流程ID,无法提交审批");var a={approvalId:r,operator:e.approvalFormData.operator,comment:e.approvalFormData.comment,userId:pe()},n=I8(I8({},nt.HANDLE_ENGINE_CHECK),{},{params:a,disableSuccessMsg:!0});e.approvalSubmitting=!0,e.$request(n).asyncThen((function(t){console.log("审批提交成功"),e.loadData(),e.approvalDialogVisible=!1,e.currentApprovalRow=null,e.approvalSubmitting=!1})).asyncErrorCatch((function(t){console.error("审批提交失败:",t),e.approvalSubmitting=!1}))}}))},handleApprovalDialogClose:function(){this.approvalDialogVisible=!1,this.currentApprovalRow=null,this.approvalFormData={result:"PASS",opinion:""},this.$refs.approvalForm&&this.$refs.approvalForm.clearValidate()},handleWithdraw:function(e){var t=this,r=I8(I8({},nt.RETURN_ENGINE_CHECK),{},{params:{approvalId:e.id},disableSuccessMsg:!0});this.$request(r).asyncThen((function(e){console.log("撤回成功"),t.loadData()})).asyncErrorCatch((function(e){console.error("撤回失败:",e)}))},loadData:function(){var e=this,t=I8(I8({},nt.ENGINE_CHECK_LIST),{},{params:I8({page:this.pagination.currentPage,size:this.pagination.pageSize,ycOrOth:"玉柴"},this.searchPanelValue),disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){e.tableData=t.data.list||[],e.pagination.total=t.data.totalCount||0})).asyncErrorCatch((function(t){console.error("查询失败:",t),e.tableData=[],e.pagination.total=0}))}}},N8=P8,E8=(r("c77b"),p(N8,i8,o8,!1,null,null,null)),R8=E8.exports,L8=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"apaas-custom-page-mydemo custom-page"},[e.showEngineCheck?r("engine-check",{attrs:{detail:e.currentCheckDetail,"engine-type":"竞品"},on:{close:e.closeEngineCheck}}):[e._m(0),r("div",{staticClass:"page-search-panel"},[r("div",{staticClass:"search-fields"},[r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("流程主题")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.processTopic,callback:function(t){e.$set(e.searchPanelValue,"processTopic",t)},expression:"searchPanelValue.processTopic"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("产品型号")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.modelName,callback:function(t){e.$set(e.searchPanelValue,"modelName",t)},expression:"searchPanelValue.modelName"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("子系统")]),r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.subsystemName,callback:function(t){e.$set(e.searchPanelValue,"subsystemName",t)},expression:"searchPanelValue.subsystemName"}})],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("申请人")]),r("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",remote:"","reserve-keyword":"",placeholder:"请输入申请人姓名搜索","remote-method":e.handleApplicantSearch,loading:e.applicantLoading,clearable:""},model:{value:e.searchPanelValue.applicant,callback:function(t){e.$set(e.searchPanelValue,"applicant",t)},expression:"searchPanelValue.applicant"}},e._l(e.applicantOptions,(function(t){return r("el-option",{key:t.userId,attrs:{value:t.userId,label:t.username}},[r("span",{staticClass:"username-text"},[e._v(e._s(t.username))]),r("span",{staticClass:"user-id-text"},[e._v(e._s(t.userNumber))])])})),1)],1),r("div",{staticClass:"search-field"},[r("span",{staticClass:"field-label"},[e._v("当前状态")]),r("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.searchPanelValue.statusDescription,callback:function(t){e.$set(e.searchPanelValue,"statusDescription",t)},expression:"searchPanelValue.statusDescription"}},[r("el-option",{attrs:{label:"审批中",value:"审批中"}}),r("el-option",{attrs:{label:"已通过",value:"已通过"}}),r("el-option",{attrs:{label:"已退回",value:"已退回"}})],1)],1),r("div",{staticClass:"search-actions"},[r("el-button",{attrs:{type:"primary"},on:{click:e.handleSearch}},[e._v(" 查询 ")]),r("el-button",{on:{click:e.resetSearch}},[e._v(" 重置 ")])],1)])]),r("div",{staticClass:"page-data-list"},[r("x-vxe-table",{ref:"vxeTable",staticClass:"block-table",attrs:{border:!0,seqWidth:40,colConfigs:e.tableConfig.colConfigs,tableData:e.tableData,rowDraggable:e.tableConfig.rowDraggable,seqType:e.tableConfig.seqType,pagination:e.pagination,layout:e.tableConfig.layout,seqConfig:e.tableConfig.seqConfig,autoSize:e.tableConfig.autoSize,pageConfig:e.tableConfig.pageConfig},on:{"table-row-click":e.rowClickEvent,"size-change":e.pageSizeChange,"current-page-change":e.currentChange},scopedSlots:e._u([e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customSlot,fn:function(n){var i=n.row,o=n.rowIndex;return["options"===t.customSlot?r("div",{key:a+""+o},[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleViewProgress(i)}}},[e._v(" 查看进度 ")])]):e._e(),"statusDescription"===t.customSlot?r("div",{key:a+""+o},["审核中"===i[t.prop]?r("span",{staticClass:"status-tag status-approving"},[e._v("审核中")]):"已通过"===i[t.prop]?r("span",{staticClass:"status-tag status-approved"},[e._v("已通过")]):"已拒绝"===i[t.prop]?r("span",{staticClass:"status-tag status-withdrawn"},[e._v("已拒绝")]):r("span",{staticClass:"status-tag status-default"},[e._v(e._s(i[t.prop]))])]):e._e()]}}}))],null,!0)},[r("template",{slot:"empty"},[r("div",{staticClass:"table-empty"},[r("x-empty-page")],1)])],2)],1)],r("el-dialog",{attrs:{title:"审批",visible:e.approvalDialogVisible,width:"500px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(t){e.approvalDialogVisible=t},close:e.handleApprovalDialogClose}},[r("el-form",{ref:"approvalForm",attrs:{model:e.approvalFormData,rules:e.approvalFormRules,"label-width":"80px"}},[r("el-form-item",{attrs:{label:"审批结果",prop:"operator"}},[r("el-radio-group",{model:{value:e.approvalFormData.operator,callback:function(t){e.$set(e.approvalFormData,"operator",t)},expression:"approvalFormData.operator"}},[r("el-radio",{attrs:{label:"PASS"}},[e._v(" 同意 ")]),r("el-radio",{attrs:{label:"REJECT"}},[e._v(" 拒绝 ")])],1)],1),r("el-form-item",{attrs:{label:"说明",prop:"comment"}},[r("el-input",{attrs:{type:"textarea",rows:4,placeholder:"请输入审批说明"},model:{value:e.approvalFormData.comment,callback:function(t){e.$set(e.approvalFormData,"comment",t)},expression:"approvalFormData.comment"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleApprovalDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.approvalSubmitting},on:{click:e.handleApprovalSubmit}},[e._v(" 确定 ")])],1)],1)],2)},j8=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"page-header"},[r("div",{staticClass:"title"},[e._v(" 竞品发动机审核 ")])])}];function F8(e){return F8="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F8(e)}function V8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function z8(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?V8(Object(r),!0).forEach((function(t){B8(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V8(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function B8(e,t,r){return t=$8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $8(e){var t=G8(e,"string");return"symbol"===F8(t)?t:String(t)}function G8(e,t){if("object"!==F8(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==F8(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var U8=function(){return{loginUserId:pe(),processTopic:"",modelName:"",subsystemName:"",applicant:"",statusDescription:"",ycOrOth:"竞品"}},W8={name:"SelfEngineCheck",components:{EngineCheck:D8},data:function(){return{searchPanelValue:U8(),tableData:[],pagination:{currentPage:1,pageSize:10,total:0},showEngineCheck:!1,currentCheckDetail:null,approvalDialogVisible:!1,currentApprovalRow:null,approvalFormData:{operator:"PASS",comment:""},approvalSubmitting:!1,applicantOptions:[],applicantLoading:!1,applicantSearchTimer:null}},computed:{tableConfig:function(){return{rowDraggable:!1,colConfigs:[{prop:"processTopic",label:"流程主题",showOverflowTooltip:!0,minWidth:"120"},{prop:"modelName",label:"产品型号",showOverflowTooltip:!0,minWidth:"120"},{prop:"applicant",label:"申请人",showOverflowTooltip:!0,minWidth:"100"},{prop:"creationDate",label:"申请时间",showOverflowTooltip:!0,minWidth:"160"},{prop:"statusDescription",label:"当前状态",customSlot:"statusDescription",showOverflowTooltip:!0,minWidth:"100",align:"center"},{prop:"approverPersons",label:"当前审批人",showOverflowTooltip:!0,minWidth:"100"},{prop:"options",label:"操作",customSlot:"options",align:"center",width:"180",fixed:"right"}],seqType:"seq",layout:"total, prev, pager, next, sizes"}},approvalFormRules:function(){return{result:[{required:!0,message:"请选择审批结果",trigger:"change"}],opinion:[{required:!0,message:"请输入审批说明",trigger:"blur"}]}}},created:function(){this.loadUserSelfRole(),this.loadData()},beforeDestroy:function(){this.applicantSearchTimer&&(clearTimeout(this.applicantSearchTimer),this.applicantSearchTimer=null)},methods:{isApplicant:function(e){if(!e)return!1;var t=pe();return e.createdBy===t||e.createdById===t||e.createBy===t||e.createById===t},isApprover:function(e){if(!e)return!1;var t=pe();return e.currentApprovers&&Array.isArray(e.currentApprovers)?e.currentApprovers.some((function(e){return e.userId===t||e.userNumber===t||e.id===t})):e.approverPersons&&Array.isArray(e.approverPersons)?e.approverPersons.some((function(e){var r=e.userId||e.userNumber||e.id||e;return r===t})):!(!e.approverPersonIds||!Array.isArray(e.approverPersonIds))&&e.approverPersonIds.includes(t)},canShowApproveButton:function(e){return!(!e||"审核中"!==e.statusDescription)&&this.isApprover(e)},canShowWithdrawButton:function(e){return!(!e||"审核中"!==e.statusDescription)&&this.isApplicant(e)},loadUserSelfRole:function(){var e=z8(z8({},nt.GET_USER_SELF_ROLE),{},{params:{userOrDepID:pe()},disableSuccessMsg:!0});this.$request(e).asyncThen((function(e){if(e&&e.data)try{localStorage.setItem("user_self_role",JSON.stringify(e.data))}catch(t){console.error("存储权限数据到 localStorage 失败:",t)}})).asyncErrorCatch((function(e){console.error("获取用户自身角色失败:",e)}))},pageSizeChange:function(e){this.pagination.pageSize=e,this.loadData()},rowClickEvent:function(e){console.warn(e)},currentChange:function(e){this.pagination.currentPage=e,this.loadData()},selectDataChange:function(e){this.$emit("select-data-change",e)},resetSearch:function(){var e=this,t=U8();Object.keys(t).forEach((function(r){e.$set(e.searchPanelValue,r,t[r])})),this.applicantOptions=[],this.handleSearch()},handleSearch:function(){this.pagination.currentPage=1,this.loadData()},handleApplicantSearch:function(e){var t=this;if(e&&""!==e.trim())this.applicantSearchTimer&&clearTimeout(this.applicantSearchTimer),this.applicantSearchTimer=setTimeout((function(){var r=e.trim();if(r){t.applicantLoading=!0;var a=z8(z8({},nt.GET_ALLUSERS),{},{params:{name:r},disableSuccessMsg:!0});t.$request(a).asyncThen((function(e){var r=e&&e.data,a=[];Array.isArray(r)?a=r:r&&Array.isArray(r.result)?a=r.result:r&&r.data&&Array.isArray(r.data)&&(a=r.data);var n=a.map((function(e){return{userId:e.userId||e.id,username:e.username||e.name,userNumber:e.userNumber||e.userId||e.id}})).filter((function(e){return e.userId&&e.userNumber})),i=t.searchPanelValue.applicant?t.applicantOptions.find((function(e){return e.userId===t.searchPanelValue.applicant})):null,o=new Map;i&&o.set(i.userId,i),n.forEach((function(e){e.userId&&!o.has(e.userId)&&o.set(e.userId,e)})),t.applicantOptions=Array.from(o.values()),t.applicantLoading=!1})).asyncErrorCatch((function(e){if(console.error("搜索申请人失败:",e),t.searchPanelValue.applicant){var r=t.applicantOptions.find((function(e){return e.userId===t.searchPanelValue.applicant}));t.applicantOptions=r?[r]:[]}else t.applicantOptions=[];t.applicantLoading=!1}))}else t.applicantOptions=[]}),300);else if(this.searchPanelValue.applicant){var r=this.applicantOptions.find((function(e){return e.userId===t.searchPanelValue.applicant}));this.applicantOptions=r?[r]:[]}else this.applicantOptions=[]},handleViewProgress:function(e){var t=e.flowId||e.id;t?(this.showEngineCheck=!0,this.currentCheckDetail=e):this.$message({type:"error",message:"缺少审批ID,无法查看详情"})},closeEngineCheck:function(){this.showEngineCheck=!1,this.currentCheckDetail=null},handleApprove:function(e){var t=this;this.currentApprovalRow=e,this.approvalFormData={operator:"PASS",comment:""},this.approvalDialogVisible=!0,this.$nextTick((function(){t.$refs.approvalForm&&t.$refs.approvalForm.clearValidate()}))},handleApprovalSubmit:function(){var e=this;this.$refs.approvalForm.validate((function(t){if(t){if(!e.currentApprovalRow)return void e.$message.error("缺少审批数据");var r=e.currentApprovalRow.flowId||e.currentApprovalRow.id;if(!r)return void e.$message.error("缺少流程ID,无法提交审批");var a={approvalId:r,operator:e.approvalFormData.operator,comment:e.approvalFormData.comment,userId:pe()},n=z8(z8({},nt.HANDLE_ENGINE_CHECK),{},{params:a,disableSuccessMsg:!0});e.approvalSubmitting=!0,e.$request(n).asyncThen((function(t){console.log("审批提交成功"),e.loadData(),e.approvalDialogVisible=!1,e.currentApprovalRow=null,e.approvalSubmitting=!1})).asyncErrorCatch((function(t){console.error("审批提交失败:",t),e.approvalSubmitting=!1}))}}))},handleApprovalDialogClose:function(){this.approvalDialogVisible=!1,this.currentApprovalRow=null,this.approvalFormData={result:"PASS",opinion:""},this.$refs.approvalForm&&this.$refs.approvalForm.clearValidate()},handleWithdraw:function(e){var t=this,r=z8(z8({},nt.RETURN_ENGINE_CHECK),{},{params:{approvalId:e.id},disableSuccessMsg:!0});this.$request(r).asyncThen((function(e){console.log("撤回成功"),t.loadData()})).asyncErrorCatch((function(e){console.error("撤回失败:",e)}))},loadData:function(){var e=this,t=z8(z8({},nt.ENGINE_CHECK_LIST),{},{params:z8({page:this.pagination.currentPage,size:this.pagination.pageSize,ycOrOth:"竞品"},this.searchPanelValue),disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){e.tableData=t.data.list||[],e.pagination.total=t.data.totalCount||0})).asyncErrorCatch((function(t){console.error("查询失败:",t),e.tableData=[],e.pagination.total=0}))}}},H8=W8,q8=(r("0c69"),p(H8,L8,j8,!1,null,null,null)),Y8=q8.exports,X8=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"manager-data-page custom-page"},[r("div",{staticClass:"page-content"},[r("div",{staticClass:"header-section"},[r("div",{staticClass:"title"},[e._v(" 责任人管理 ")]),r("div",[r("el-button",{attrs:{type:"primary"},on:{click:e.handleAdd}},[e._v(" 新增 ")]),r("el-button",{on:{click:e.handleImport}},[e._v(" 导入 ")]),r("el-button",{on:{click:e.handleDownloadTemplate}},[e._v(" 下载导入模板 ")]),r("el-button",{on:{click:e.handleExport}},[e._v(" 导出 ")])],1)]),r("div",{staticClass:"table-section"},[r("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData,border:""}},[r("el-table-column",{attrs:{type:"index",label:"序号",width:"90",align:"center"}}),r("el-table-column",{attrs:{prop:"department",label:"责任部门",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.formatDepartmentDisplay(t.row.department))+" ")]}}])}),r("el-table-column",{attrs:{prop:"subsystem",label:"子系统",align:"center"}}),r("el-table-column",{attrs:{prop:"username",label:"责任人",width:"250",align:"center"}}),r("el-table-column",{attrs:{label:"操作",width:"200",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(r){return r.stopPropagation(),e.handleEdit(t.row)}}},[e._v(" 修改 ")]),r("span",{staticClass:"link-separator"}),r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(r){return r.stopPropagation(),e.handleDelete(t.row,t.$index)}}},[e._v(" 删除 ")])]}}])})],1),r("div",{staticClass:"pagination-section"},[r("el-pagination",{attrs:{"current-page":e.pagination.currentPage,"page-sizes":[10,20,50,100],"page-size":e.pagination.pageSize,total:e.pagination.total,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)]),r("el-dialog",{attrs:{title:e.dialogTitle,visible:e.dialogVisible,width:"500px","close-on-click-modal":!1,modal:!1},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleDialogClose}},[r("el-form",{ref:"form",attrs:{model:e.formData,rules:e.formRules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"子系统:",prop:"subsystem"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择子系统",clearable:""},model:{value:e.formData.subsystem,callback:function(t){e.$set(e.formData,"subsystem",t)},expression:"formData.subsystem"}},e._l(e.subsystemList,(function(e){return r("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),r("el-form-item",{attrs:{label:"责任部门:",prop:"department"}},[r("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择责任部门",readonly:""},nativeOn:{click:function(t){return e.handleOpenDepartmentDialog.apply(null,arguments)}},model:{value:e.formData.selectDeptName,callback:function(t){e.$set(e.formData,"selectDeptName",t)},expression:"formData.selectDeptName"}},[r("i",{staticClass:"el-input__icon el-icon-search",staticStyle:{cursor:"pointer"},attrs:{slot:"suffix"},on:{click:function(t){return t.stopPropagation(),e.handleOpenDepartmentDialog.apply(null,arguments)}},slot:"suffix"})])],1),r("el-form-item",{attrs:{label:"责任人:",prop:"responsible"}},[r("el-select",{staticClass:"handler-select",staticStyle:{width:"100%"},attrs:{placeholder:"请输入责任人姓名进行搜索",clearable:"",disabled:!e.formData.selectDeptId,filterable:"",remote:"","remote-method":e.handleRemoteSearch,loading:e.userLoading},on:{change:e.handleResponsibleChange},model:{value:e.formData.responsible,callback:function(t){e.$set(e.formData,"responsible",t)},expression:"formData.responsible"}},e._l(e.userOptions,(function(t){return r("el-option",{key:t.userNumber,attrs:{value:t.userId,label:t.username}},[r("span",{staticClass:"username-text"},[e._v(e._s(t.username))]),r("span",{staticClass:"user-id-text"},[e._v(e._s(t.userNumber))])])})),1)],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary"},on:{click:e.handleSubmit}},[e._v(" 确定 ")])],1)],1),r("el-dialog",{attrs:{title:"选择责任部门",visible:e.departmentDialogVisible,width:"500px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(t){e.departmentDialogVisible=t},close:e.handleDepartmentDialogClose}},[r("el-input",{staticClass:"department-tree-search",attrs:{size:"small",placeholder:"请输入部门名称进行搜索",clearable:""},model:{value:e.departmentTreeFilterText,callback:function(t){e.departmentTreeFilterText=t},expression:"departmentTreeFilterText"}},[r("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})]),r("el-tree",{ref:"departmentTree",staticClass:"department-tree",attrs:{data:e.departmentList,props:{children:"children",label:"name"},"node-key":"id","filter-node-method":e.filterDepartmentNode,"highlight-current":"","expand-on-click-node":!1},on:{"node-click":e.handleDepartmentNodeClick}}),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleDepartmentDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",disabled:!e.selectedDepartmentId},on:{click:e.handleDepartmentDialogConfirm}},[e._v(" 确定 ")])],1)],1),r("el-dialog",{attrs:{title:"导入",visible:e.importDialogVisible,width:"400px","append-to-body":""},on:{"update:visible":function(t){e.importDialogVisible=t},close:e.handleImportDialogClose}},[r("el-upload",{ref:"importUpload",staticClass:"import-uploader",attrs:{drag:"","auto-upload":!1,limit:1,accept:".xls,.xlsx","file-list":e.importFileList,"on-change":e.handleImportFileChange,"on-remove":e.handleImportFileRemove,disabled:e.importing}},[r("i",{staticClass:"el-icon-upload"}),r("div",{staticClass:"el-upload__text"},[e._v(" 将文件拖到此处,或"),r("em",[e._v("点击上传")])]),r("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v(" 仅支持Excel模板文件 ")])]),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{disabled:e.importing},on:{click:e.handleImportDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.importing},on:{click:e.handleImportSubmit}},[e._v(" 开始导入 ")])],1)],1)],1)},Z8=[];function K8(e){return K8="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},K8(e)}function J8(e){return t9(e)||e9(e)||a9(e)||Q8()}function Q8(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function e9(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function t9(e){if(Array.isArray(e))return n9(e)}function r9(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a9(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function a9(e,t){if(e){if("string"===typeof e)return n9(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n9(e,t):void 0}}function n9(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function i9(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function o9(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i9(Object(r),!0).forEach((function(t){s9(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i9(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s9(e,t,r){return t=l9(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l9(e){var t=c9(e,"string");return"symbol"===K8(t)?t:String(t)}function c9(e,t){if("object"!==K8(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==K8(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var u9={name:"ManagerData",data:function(){return{tableData:[],pagination:{currentPage:1,pageSize:10,total:0},dialogVisible:!1,dialogMode:"add",currentEditIndex:-1,formData:{department:"",subsystem:"",responsible:"",responsibleName:"",selectDeptId:"",selectDeptName:"",userId:"",rowId:"",departmentId:""},formRules:{department:[{required:!0,message:"请选择责任部门",trigger:"change"}],subsystem:[{required:!0,message:"请输入子系统",trigger:"blur"}],responsible:[{required:!0,message:"请选择责任人",trigger:"change"}]},subsystemList:[],userOptions:[],userLoading:!1,departmentList:[],searchTimer:null,currentRequest:null,departmentDialogVisible:!1,departmentTreeFilterText:"",selectedDepartmentId:"",selectedDepartmentName:"",selectedDepartmentNode:null,importDialogVisible:!1,importFileList:[],selectedImportFile:null,importing:!1}},computed:{dialogTitle:function(){return"add"===this.dialogMode?"新增":"修改"}},watch:{departmentTreeFilterText:function(e){this.$refs.departmentTree.filter(e)}},mounted:function(){this.loadDepartmentList(),this.loadManagerData(),this.isResponsible(),this.loadSubsystemList()},beforeDestroy:function(){this.searchTimer&&(clearTimeout(this.searchTimer),this.searchTimer=null),this.currentRequest=null},methods:{loadSubsystemList:function(){var e=this,t=o9(o9({},nt.GET_SUBSYSTEM_LIST),{},{disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){console.log(t),t&&t.data?e.subsystemList=t.data:e.subsystemList=[]})).asyncErrorCatch((function(e){console.error("加载子系统列表失败:",e)}))},isResponsible:function(){var e=this,t=pe();if(t){var r=o9(o9({},nt.IS_RESPONSIBLE),{},{params:{userId:t},disableSuccessMsg:!0});this.$request(r).asyncThen((function(t){console.log(t),t&&t.data?(t.data?e.isResponsible=!0:e.isResponsible=!1,localStorage.setItem("isResponsible",e.isResponsible)):e.isResponsible=!1})).asyncErrorCatch((function(e){console.error("判断是否是责任人失败:",e)}))}else console.error("无法获取用户ID")},loadManagerData:function(){var e=this,t=o9(o9({},nt.GET_MANAGER_DATA),{},{params:{pageNumber:this.pagination.currentPage,pageSize:this.pagination.pageSize},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){t&&t.data?(e.tableData=t.data.result,e.pagination.total=t.data.count):(e.tableData=[],e.pagination.total=0)})).asyncErrorCatch((function(t){console.error("加载管理数据失败:",t),e.tableData=[],e.pagination.total=0}))},loadDepartmentList:function(){var e=this,t=o9(o9({},nt.QUERY_ORG_TREE),{},{disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){var r=[];t&&t.data&&(r=t.data.result||t.data.data||t.data||[]),e.departmentList=e.formatDepartmentTreeData(r)})).asyncErrorCatch((function(t){console.error("加载部门列表失败:",t),e.departmentList=[]}))},formatDepartmentTreeData:function(e){if(!Array.isArray(e))return[];var t=function e(t){var r={id:t.id,name:t.name||t.label||"",children:void 0};return t.children&&Array.isArray(t.children)&&t.children.length>0&&(r.children=t.children.map((function(t){return e(t)}))),r};return e.map((function(e){return t(e)}))},handleAdd:function(){var e=this;this.dialogMode="add",this.currentEditIndex=-1,this.formData={department:"",subsystem:"",responsible:"",responsibleName:"",selectDeptId:"",selectDeptName:"",userId:"",rowId:"",departmentId:""},this.userOptions=[],this.userLoading=!1,this.dialogVisible=!0,this.$nextTick((function(){e.$refs.form&&e.$refs.form.clearValidate()}))},handleEdit:function(e){var t=this;this.dialogMode="edit",e.userId?this.userOptions=[{userId:e.userId,username:e.username||e.userId,userNumber:e.userNumber||e.userId}]:this.userOptions=[],this.formData={department:e.departmentId||"",subsystem:e.subsystem||"",responsible:e.userNumber||e.userId||"",responsibleName:e.username||"",selectDeptId:e.departmentId||"",selectDeptName:e.department||"",userId:e.userId||"",rowId:e.rowId||"",departmentId:e.departmentId||""},this.userLoading=!1,this.dialogVisible=!0,this.$nextTick((function(){t.$refs.form&&t.$refs.form.clearValidate()}))},handleDialogClose:function(){this.dialogVisible=!1,this.formData={department:"",subsystem:"",responsible:"",responsibleName:"",selectDeptId:"",selectDeptName:"",userId:"",rowId:"",departmentId:""},this.userOptions=[],this.userLoading=!1,this.currentEditIndex=-1,this.searchTimer&&(clearTimeout(this.searchTimer),this.searchTimer=null),this.currentRequest=null,this.$refs.form&&this.$refs.form.clearValidate()},handleSubmit:function(){var e=this;this.$refs.form.validate((function(t){if(t){if("add"===e.dialogMode){var r=o9(o9({},nt.SAVE_MANAGER_DATA),{},{params:{departmentId:e.formData.selectDeptId,department:e.formData.selectDeptName,subsystem:Array.isArray(e.formData.subsystem)?e.formData.subsystem.join(","):e.formData.subsystem,userId:e.formData.userId||e.formData.responsible},disableSuccessMsg:!0});e.$request(r).asyncThen((function(t){e.$message({type:"success",message:"新增成功"}),e.handleDialogClose(),e.loadManagerData()})).asyncErrorCatch((function(t){console.error("新增失败:",t),e.$message({type:"error",message:"新增失败"})}))}else{var a=o9(o9({},nt.EDIT_MANAGER_DATA),{},{params:{departmentId:e.formData.selectDeptId,department:e.formData.selectDeptName,subsystem:Array.isArray(e.formData.subsystem)?e.formData.subsystem.join(","):e.formData.subsystem,userId:e.formData.responsible,rowId:e.formData.rowId},disableSuccessMsg:!0});e.$request(a).asyncThen((function(t){e.$message({type:"success",message:"修改成功"}),e.handleDialogClose(),e.loadManagerData()})).asyncErrorCatch((function(t){console.error("修改失败:",t),e.$message({type:"error",message:"修改失败"})}))}e.handleDialogClose(),e.loadManagerData()}}))},handleOpenDepartmentDialog:function(){var e=this;this.formData.selectDeptId?(this.selectedDepartmentId=this.formData.selectDeptId,this.selectedDepartmentName=this.formData.selectDeptName,this.$nextTick((function(){e.$refs.departmentTree&&e.$refs.departmentTree.setCurrentKey(e.formData.selectDeptId)}))):(this.selectedDepartmentId="",this.selectedDepartmentName=""),this.departmentTreeFilterText="",this.departmentDialogVisible=!0},handleDepartmentDialogClose:function(){this.departmentDialogVisible=!1,this.departmentTreeFilterText="",this.formData.selectDeptId?(this.selectedDepartmentId=this.formData.selectDeptId,this.selectedDepartmentName=this.formData.selectDeptName):(this.selectedDepartmentId="",this.selectedDepartmentName="",this.selectedDepartmentNode=null)},handleDepartmentDialogConfirm:function(){var e=this;this.selectedDepartmentId&&this.selectedDepartmentNode&&(this.formData.selectDeptId=this.selectedDepartmentId,this.formData.selectDeptName=this.selectedDepartmentName,this.formData.department=this.selectedDepartmentId,this.formData.responsible="",this.formData.responsibleName="",this.formData.userId="",this.userOptions=[],this.departmentDialogVisible=!1,this.$nextTick((function(){e.$refs.form&&e.$refs.form.clearValidate("department")})))},handleDepartmentNodeClick:function(e){this.selectedDepartmentId=e.id,this.selectedDepartmentName=this.getDepartmentPathName(e.id),this.selectedDepartmentNode=e},filterDepartmentNode:function(e,t){return!e||(t.name||"").toLowerCase().includes(e.toLowerCase())},handleRemoteSearch:function(e){var t=this;if(this.formData.selectDeptId)if(e&&""!==e.trim()){this.userLoading=!0;var r=e.trim(),a=o9(o9({},nt.GET_ALLUSERS),{},{params:{name:r},disableSuccessMsg:!0});this.$request(a).asyncThen((function(e){var r=e&&e.data,a=[];Array.isArray(r)?a=r:r&&Array.isArray(r.result)?a=r.result:r&&r.data&&Array.isArray(r.data)&&(a=r.data);var n=a.map((function(e){return{userId:e.userId||e.id,username:e.username||e.name,userNumber:e.userNumber||e.userId||e.id}})).filter((function(e){return e.userId&&e.userNumber})),i=t.formData.responsible,o=t.userOptions.filter((function(e){return e.userNumber&&e.userNumber===i})),s=new Map;o.forEach((function(e){e.userNumber&&s.set(e.userNumber,e)})),n.forEach((function(e){e.userNumber&&!s.has(e.userNumber)&&s.set(e.userNumber,e)})),t.userOptions=Array.from(s.values()),t.userLoading=!1})).asyncErrorCatch((function(e){if(console.error("搜索责任人失败:",e),t.formData.responsible){var r=t.userOptions.filter((function(e){return e.userNumber===t.formData.responsible}));t.userOptions=r}else t.userOptions=[];t.userLoading=!1}))}else if(this.formData.responsible){var n=this.userOptions.filter((function(e){return e.userNumber===t.formData.responsible}));this.userOptions=n}else this.userOptions=[];else this.userOptions=[]},handleResponsibleChange:function(e){if(e){var t=this.userOptions.find((function(t){return t.userNumber===e}));t&&(this.formData.responsibleName=t.username,this.formData.userId=t.userId)}else this.formData.responsibleName="",this.formData.userId=""},getDepartmentPathName:function(e){if(!e||!this.departmentList||0===this.departmentList.length)return"";var t=function e(t,r){var a,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=r9(t);try{for(i.s();!(a=i.n()).done;){var o=a.value,s=[].concat(J8(n),[o.name]);if(o.id===r)return s;if(o.children&&o.children.length>0){var l=e(o.children,r,s);if(l)return l}}}catch(c){i.e(c)}finally{i.f()}return null},r=t(this.departmentList,e);return r?r.join("-"):""},handleDelete:function(e,t){var r=this;this.$confirm("确定要删除该记录吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t=o9(o9({},nt.DELETE_MANAGER_DATA),{},{params:{rowId:e.rowId},disableSuccessMsg:!0});r.$request(t).asyncThen((function(e){r.loadManagerData()})).asyncErrorCatch((function(e){console.error("删除失败:",e),r.$message({type:"error",message:"删除失败"})}))})).catch((function(){}))},handleSizeChange:function(e){this.pagination.pageSize=e,this.pagination.currentPage=1,this.loadManagerData()},handleCurrentChange:function(e){this.pagination.currentPage=e,this.loadManagerData()},handleRefresh:function(){this.pagination.currentPage=1,this.loadManagerData()},formatDepartmentDisplay:function(e){if(!e)return"平台部";var t=e.replace(/·/g,"-"),r=t.split("-").filter((function(e){return""!==e.trim()}));return r.length>0?r[r.length-1]:t},handleDownloadTemplate:function(){var e=this,t=nt.DOWNLOAD_DEMO_MANAGER_DATA||{},r=t.url,a=t.method,n=void 0===a?"get":a,i=t.headers,o=void 0===i?{}:i,s={url:r,method:n,responseType:"blob",headers:o,disableSuccessMsg:!0};s.url?this.$axios(s).then((function(t){var r=t.data;if(r){var a=t.headers&&(t.headers["content-type"]||t.headers["Content-Type"]);if(a&&a.includes("application/json"))try{var n=new FileReader;n.onload=function(){try{var t=JSON.parse(n.result);e.$message({type:"error",message:t.message||"下载失败"})}catch(r){e.$message({type:"error",message:"下载失败"})}},n.readAsText(r)}catch(p){console.error("解析下载失败响应异常:",p),e.$message({type:"error",message:"下载失败"})}else{var i=t.headers&&(t.headers["content-disposition"]||t.headers["Content-Disposition"]),o="导入模板.xlsx";if(i){var s=/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i.exec(i),l=s?s[1]||s[2]:"";if(l)try{o=decodeURIComponent(l)}catch(p){o=l}}var c=window.URL.createObjectURL(r),u=document.createElement("a");u.href=c,u.download=o,document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(c),e.$message({type:"success",message:"下载成功"})}}else e.$message({type:"error",message:"下载失败,文件内容为空"})})).catch((function(t){console.error("下载模板失败:",t),e.$message({type:"error",message:"下载模板失败,请稍后重试"})})):this.$message({type:"error",message:"未配置下载地址"})},handleExport:function(){var e=this,t=nt.DOWNLOAD_MANAGER_DATA||{},r=t.url,a=t.method,n=void 0===a?"get":a,i=t.headers,o=void 0===i?{}:i,s={url:r,method:n,responseType:"blob",headers:o,disableSuccessMsg:!0};s.url?this.$axios(s).then((function(t){var r=t.data;if(r){var a=t.headers&&(t.headers["content-type"]||t.headers["Content-Type"]);if(a&&a.includes("application/json"))try{var n=new FileReader;n.onload=function(){try{var t=JSON.parse(n.result);e.$message({type:"error",message:t.message||"导出失败"})}catch(r){e.$message({type:"error",message:"导出失败"})}},n.readAsText(r)}catch(p){console.error("解析导出失败响应异常:",p),e.$message({type:"error",message:"导出失败"})}else{var i=t.headers&&(t.headers["content-disposition"]||t.headers["Content-Disposition"]),o="责任人管理数据.xlsx";if(i){var s=/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i.exec(i),l=s?s[1]||s[2]:"";if(l)try{o=decodeURIComponent(l)}catch(p){o=l}}var c=window.URL.createObjectURL(r),u=document.createElement("a");u.href=c,u.download=o,document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(c),e.$message({type:"success",message:"导出成功"})}}else e.$message({type:"error",message:"导出失败,文件内容为空"})})).catch((function(t){console.error("导出失败:",t),e.$message({type:"error",message:"导出失败,请稍后重试"})})):this.$message({type:"error",message:"未配置下载地址"})},handleImport:function(){this.importDialogVisible=!0,this.importFileList=[],this.selectedImportFile=null},handleImportDialogClose:function(){this.importDialogVisible=!1,this.importFileList=[],this.selectedImportFile=null,this.importing=!1,this.$refs.importUpload&&this.$refs.importUpload.clearFiles()},handleImportFileChange:function(e,t){var r=[".xls",".xlsx"],a=e.name||"",n=a.substring(a.lastIndexOf(".")).toLowerCase();if(!r.includes(n))return this.$message({type:"error",message:"文件类型不支持,仅支持 ".concat(r.join("、")," 格式的文件")}),this.selectedImportFile=null,this.importFileList=[],void(this.$refs.importUpload&&this.$refs.importUpload.clearFiles());this.selectedImportFile=e.raw||e,this.importFileList=t.slice(-1)},handleImportFileRemove:function(e,t){this.selectedImportFile=null,this.importFileList=[]},handleImportSubmit:function(){var e=this;if(this.selectedImportFile){var t=new FormData;t.append("file",this.selectedImportFile),t.append("userId",pe());var r=o9(o9({},nt.UPLOAD_MANAGER_DATA),{},{params:t,disableSuccessMsg:!0});this.importing=!0;var a=this.$loading({lock:!0,text:"正在导入数据,请稍候...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});this.$upload(r,null,!1).then((function(t){console.log("导入成功:",t),a.close(),e.$message({type:"success",message:"导入成功"}),e.handleImportDialogClose(),e.loadManagerData()})).catch((function(t){console.error("导入失败:",t),a.close(),e.$message({type:"error",message:t.message||"导入失败,请稍后重试"})})).finally((function(){a&&a.close(),e.importing=!1}))}else this.$message({type:"warning",message:"请先选择要导入的文件"})}}},p9=u9,d9=(r("2e76"),p(p9,X8,Z8,!1,null,"d498900c",null)),h9=d9.exports,f9=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"filler-data-page custom-page"},[r("div",{staticClass:"page-content"},[r("div",{staticClass:"header-section"},[r("el-button",{attrs:{type:"primary"},on:{click:e.handleAdd}},[e._v(" 新增 ")])],1),r("div",{staticClass:"table-section"},[r("div",{staticClass:"table-toolbar"},[r("el-button",{attrs:{icon:"el-icon-refresh",size:"small"},on:{click:e.handleRefresh}},[e._v(" 刷新 ")])],1),r("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData,border:""}},[r("el-table-column",{attrs:{type:"index",label:"序号",width:"90",align:"center"}}),r("el-table-column",{attrs:{prop:"department",label:"责任部门",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.formatDepartmentDisplay(t.row.department))+" ")]}}])}),r("el-table-column",{attrs:{prop:"subsystem",label:"子系统",align:"center"}}),r("el-table-column",{attrs:{prop:"partsName",label:"零部件名称",align:"center"}}),r("el-table-column",{attrs:{prop:"username",label:"填写人",width:"250",align:"center"}}),r("el-table-column",{attrs:{label:"操作",width:"200",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(r){return r.stopPropagation(),e.handleEdit(t.row)}}},[e._v(" 修改 ")]),r("span",{staticClass:"link-separator"}),r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(r){return r.stopPropagation(),e.handleDelete(t.row,t.$index)}}},[e._v(" 删除 ")])]}}])})],1),r("div",{staticClass:"pagination-section"},[r("el-pagination",{attrs:{"current-page":e.pagination.currentPage,"page-sizes":[10,20,50,100],"page-size":e.pagination.pageSize,total:e.pagination.total,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)]),r("el-dialog",{attrs:{title:e.dialogTitle,visible:e.dialogVisible,width:"500px","close-on-click-modal":!1,modal:!1},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleDialogClose}},[r("el-form",{ref:"form",attrs:{model:e.formData,rules:e.formRules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"责任部门:",prop:"department"}},[r("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择责任部门",readonly:""},nativeOn:{click:function(t){return e.handleOpenDepartmentDialog.apply(null,arguments)}},model:{value:e.formData.selectDeptName,callback:function(t){e.$set(e.formData,"selectDeptName",t)},expression:"formData.selectDeptName"}},[r("i",{staticClass:"el-input__icon el-icon-search",staticStyle:{cursor:"pointer"},attrs:{slot:"suffix"},on:{click:function(t){return t.stopPropagation(),e.handleOpenDepartmentDialog.apply(null,arguments)}},slot:"suffix"})])],1),r("el-form-item",{attrs:{label:"子系统:",prop:"subsystem"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择子系统",clearable:""},on:{change:e.handleSubsystemChange},model:{value:e.formData.subsystem,callback:function(t){e.$set(e.formData,"subsystem",t)},expression:"formData.subsystem"}},e._l(e.subsystemList,(function(e){return r("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),r("el-form-item",{attrs:{label:"零部件名称:",prop:"partsName"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择零部件名称",clearable:"",disabled:!e.formData.subsystem},model:{value:e.formData.partsName,callback:function(t){e.$set(e.formData,"partsName",t)},expression:"formData.partsName"}},e._l(e.partsNameList,(function(e){return r("el-option",{key:e,attrs:{label:"/"===e?"/":e,value:e}})})),1)],1),r("el-form-item",{attrs:{label:"填写人:",prop:"filler"}},[r("el-select",{staticClass:"handler-select",staticStyle:{width:"100%"},attrs:{placeholder:"请输入填写人姓名进行搜索",clearable:"",multiple:"",filterable:"",remote:"","reserve-keyword":"","remote-method":e.handleRemoteSearch,loading:e.userLoading},on:{change:e.handleFillerChange},model:{value:e.formData.filler,callback:function(t){e.$set(e.formData,"filler",t)},expression:"formData.filler"}},e._l(e.userOptions,(function(t){return r("el-option",{key:t.userNumber,attrs:{value:t.userId,label:t.username}},[r("span",{staticClass:"username-text"},[e._v(e._s(t.username))]),r("span",{staticClass:"user-id-text"},[e._v(e._s(t.userNumber))])])})),1)],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary"},on:{click:e.handleSubmit}},[e._v(" 确定 ")])],1)],1),r("el-dialog",{attrs:{title:"选择责任部门",visible:e.departmentDialogVisible,width:"500px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(t){e.departmentDialogVisible=t},close:e.handleDepartmentDialogClose}},[r("el-input",{staticClass:"department-tree-search",attrs:{size:"small",placeholder:"请输入部门名称进行搜索",clearable:""},model:{value:e.departmentTreeFilterText,callback:function(t){e.departmentTreeFilterText=t},expression:"departmentTreeFilterText"}},[r("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})]),r("el-tree",{ref:"departmentTree",staticClass:"department-tree",attrs:{data:e.departmentList,props:{children:"children",label:"name"},"node-key":"id","filter-node-method":e.filterDepartmentNode,"highlight-current":"","expand-on-click-node":!1},on:{"node-click":e.handleDepartmentNodeClick}}),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleDepartmentDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",disabled:!e.selectedDepartmentId},on:{click:e.handleDepartmentDialogConfirm}},[e._v(" 确定 ")])],1)],1)],1)},m9=[];function g9(e){return g9="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g9(e)}function v9(e){return _9(e)||b9(e)||w9(e)||y9()}function y9(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b9(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _9(e){if(Array.isArray(e))return S9(e)}function x9(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=w9(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function w9(e,t){if(e){if("string"===typeof e)return S9(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S9(e,t):void 0}}function S9(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function D9(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function C9(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?D9(Object(r),!0).forEach((function(t){T9(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D9(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function T9(e,t,r){return t=I9(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I9(e){var t=O9(e,"string");return"symbol"===g9(t)?t:String(t)}function O9(e,t){if("object"!==g9(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==g9(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var M9={name:"FillerData",data:function(){return{tableData:[],pagination:{currentPage:1,pageSize:10,total:0},dialogVisible:!1,dialogMode:"add",currentEditIndex:-1,formData:{department:"",subsystem:"",partsName:"",filler:[],fillerName:"",selectDeptId:"",selectDeptName:"",userId:"",rowId:"",departmentId:""},formRules:{department:[{required:!0,message:"请选择责任部门",trigger:"change"}],subsystem:[{required:!0,message:"请选择子系统",trigger:"change"}],partsName:[{required:!0,message:"请选择零部件名称",trigger:"change"}],filler:[{required:!0,message:"请选择填写人",trigger:"change"}]},subsystemList:[],partsNameList:[],allParametersData:{},fillerPersons:[],userOptions:[],userLoading:!1,departmentList:[],searchTimer:null,currentRequest:null,departmentDialogVisible:!1,departmentTreeFilterText:"",selectedDepartmentId:"",selectedDepartmentName:"",selectedDepartmentNode:null}},computed:{dialogTitle:function(){return"add"===this.dialogMode?"新增":"修改"}},watch:{departmentTreeFilterText:function(e){this.$refs.departmentTree&&this.$refs.departmentTree.filter(e)}},mounted:function(){this.loadDepartmentList(),this.loadFillerData(),this.loadSubsystemList(),this.loadAllParametersData()},beforeDestroy:function(){this.searchTimer&&(clearTimeout(this.searchTimer),this.searchTimer=null),this.currentRequest=null},methods:{loadSubsystemList:function(){var e=this,t=C9(C9({},nt.GET_SUBSYSTEM_LIST),{},{disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){console.log(t),t&&t.data?e.subsystemList=t.data:e.subsystemList=[]})).asyncErrorCatch((function(e){console.error("加载子系统列表失败:",e)}))},loadAllParametersData:function(){var e=this,t=C9(C9({},nt.GET_ALL_DATA_SYSTEAM_LIST),{},{disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){if(t&&t.data){var r={};Array.isArray(t.data)&&t.data.forEach((function(e){e.subsystem&&Array.isArray(e.parameters)&&(r[e.subsystem]=e.parameters.map((function(t){return{parameterId:t.parameterId||"",parameterName:t.parameterName||"",partsName:t.partsName||"",subsystem:e.subsystem}})))})),e.allParametersData=r}else e.allParametersData={}})).asyncErrorCatch((function(t){console.error("获取所有参数数据失败:",t),e.allParametersData={}}))},handleSubsystemChange:function(e){if(this.formData.partsName="",e&&this.allParametersData[e]){var t=this.allParametersData[e],r=new Set;t.forEach((function(e){var t=e.partsName||"";t&&r.add(t)})),this.partsNameList=Array.from(r).sort()}else this.partsNameList=[]},loadFillerData:function(){var e=this,t=C9(C9({},nt.GET_FILLER_DATA),{},{params:{pageNumber:this.pagination.currentPage,pageSize:this.pagination.pageSize},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){t&&t.data?(e.tableData=t.data.result,e.pagination.total=t.data.count):(e.tableData=[],e.pagination.total=0)})).asyncErrorCatch((function(t){console.error("加载填写人数据失败:",t),e.tableData=[],e.pagination.total=0}))},loadDepartmentList:function(){var e=this,t=C9(C9({},nt.QUERY_ORG_TREE),{},{disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){var r=[];t&&t.data&&(r=t.data.result||t.data.data||t.data||[]),e.departmentList=e.formatDepartmentTreeData(r)})).asyncErrorCatch((function(t){console.error("加载部门列表失败:",t),e.departmentList=[]}))},formatDepartmentTreeData:function(e){if(!Array.isArray(e))return[];var t=function e(t){var r={id:t.id,name:t.name||t.label||"",children:void 0};return t.children&&Array.isArray(t.children)&&t.children.length>0&&(r.children=t.children.map((function(t){return e(t)}))),r};return e.map((function(e){return t(e)}))},handleAdd:function(){var e=this;this.dialogMode="add",this.currentEditIndex=-1,this.formData={department:"",subsystem:"",partsName:"",filler:[],fillerName:"",selectDeptId:"",selectDeptName:"",userId:"",rowId:"",departmentId:""},this.partsNameList=[],this.fillerPersons=[],this.userOptions=[],this.userLoading=!1,this.dialogVisible=!0,this.$nextTick((function(){e.$refs.form&&e.$refs.form.clearValidate()}))},handleEdit:function(e){var t=this;this.dialogMode="edit";var r=[];e.userId&&(r=Array.isArray(e.userId)?e.userId:"string"===typeof e.userId&&e.userId.includes(",")?e.userId.split(",").map((function(e){return e.trim()})).filter((function(e){return e})):[e.userId]),r.length>0?this.userOptions=r.map((function(t){return{userId:t,username:e.username||t,userNumber:e.userNumber||t}})):this.userOptions=[];var a="";if(e.subsystem)if(Array.isArray(e.subsystem))a=e.subsystem[0]||"";else if("string"===typeof e.subsystem){var n=e.subsystem.split(",").map((function(e){return e.trim()})).filter((function(e){return e}));a=n[0]||""}if(a&&this.allParametersData[a]){var i=this.allParametersData[a],o=new Set;i.forEach((function(e){var t=e.partsName||"";t&&o.add(t)})),this.partsNameList=Array.from(o).sort()}else this.partsNameList=[];this.formData={department:e.departmentId||"",subsystem:a,partsName:e.partsName||"",filler:r,fillerName:e.username||"",selectDeptId:e.departmentId||"",selectDeptName:e.department||"",userId:e.userId||"",rowId:e.rowId||"",departmentId:e.departmentId||""},this.userLoading=!1,this.dialogVisible=!0,this.$nextTick((function(){t.$refs.form&&t.$refs.form.clearValidate()}))},handleDialogClose:function(){this.dialogVisible=!1,this.formData={department:"",subsystem:"",partsName:"",filler:[],fillerName:"",selectDeptId:"",selectDeptName:"",userId:"",rowId:"",departmentId:""},this.partsNameList=[],this.fillerPersons=[],this.userOptions=[],this.userLoading=!1,this.currentEditIndex=-1,this.searchTimer&&(clearTimeout(this.searchTimer),this.searchTimer=null),this.currentRequest=null,this.$refs.form&&this.$refs.form.clearValidate()},handleSubmit:function(){var e=this;this.$refs.form.validate((function(t){if(t){if(!e.formData.filler||!Array.isArray(e.formData.filler)||0===e.formData.filler.length)return void e.$message.warning("请至少选择一个填写人");var r=e.formData.subsystem||"",a=e.formData.partsName||"";if("add"===e.dialogMode){var n=Array.isArray(e.formData.filler)?e.formData.filler:[e.formData.filler],i=n.map((function(t){return e.$request(C9(C9({},nt.SAVE_FILLER_DATA),{},{params:{departmentId:e.formData.selectDeptId,department:e.formData.selectDeptName,subsystem:r,partsName:a,userId:t},disableSuccessMsg:!0}))}));Promise.all(i).then((function(){e.handleDialogClose(),e.loadFillerData()})).catch((function(t){console.error("新增失败:",t),e.$message.error("新增失败,请重试")}))}else{var o=Array.isArray(e.formData.filler)&&e.formData.filler.length>0?e.formData.filler[0]:e.formData.filler,s=C9(C9({},nt.EDIT_MANAGER_DATA),{},{params:{departmentId:e.formData.selectDeptId,department:e.formData.selectDeptName,subsystem:r,partsName:a,userId:o,rowId:e.formData.rowId},disableSuccessMsg:!0});e.$request(s).asyncThen((function(t){e.handleDialogClose(),e.loadFillerData()})).asyncErrorCatch((function(t){console.error("修改失败:",t),e.$message.error("修改失败")}))}}}))},handleOpenDepartmentDialog:function(){var e=this;this.formData.selectDeptId?(this.selectedDepartmentId=this.formData.selectDeptId,this.selectedDepartmentName=this.formData.selectDeptName,this.$nextTick((function(){e.$refs.departmentTree&&e.$refs.departmentTree.setCurrentKey(e.formData.selectDeptId)}))):(this.selectedDepartmentId="",this.selectedDepartmentName=""),this.departmentTreeFilterText="",this.departmentDialogVisible=!0},handleDepartmentDialogClose:function(){this.departmentDialogVisible=!1,this.departmentTreeFilterText="",this.formData.selectDeptId?(this.selectedDepartmentId=this.formData.selectDeptId,this.selectedDepartmentName=this.formData.selectDeptName):(this.selectedDepartmentId="",this.selectedDepartmentName="",this.selectedDepartmentNode=null)},handleDepartmentDialogConfirm:function(){var e=this;this.selectedDepartmentId&&this.selectedDepartmentNode&&(this.formData.selectDeptId=this.selectedDepartmentId,this.formData.selectDeptName=this.selectedDepartmentName,this.formData.department=this.selectedDepartmentId,this.formData.filler=[],this.formData.fillerName="",this.userOptions=[],this.departmentDialogVisible=!1,this.$nextTick((function(){e.$refs.form&&e.$refs.form.clearValidate("department")})))},handleDepartmentNodeClick:function(e){this.selectedDepartmentId=e.id,this.selectedDepartmentName=this.getDepartmentPathName(e.id),this.selectedDepartmentNode=e},filterDepartmentNode:function(e,t){return!e||(t.name||"").toLowerCase().includes(e.toLowerCase())},handleRemoteSearch:function(e){var t=this;if(e&&""!==e.trim())this.searchTimer&&clearTimeout(this.searchTimer),this.searchTimer=setTimeout((function(){var r=e.trim();if(r){t.userLoading=!0;var a=C9(C9({},nt.GET_ALLUSERS),{},{params:{name:r},disableSuccessMsg:!0});t.currentRequest=t.$request(a),t.currentRequest.asyncThen((function(e){var r=e&&e.data,a=[];Array.isArray(r)?a=r:r&&Array.isArray(r.result)?a=r.result:r&&r.data&&Array.isArray(r.data)&&(a=r.data);var n=a.map((function(e){return{userId:e.userId||e.id,username:e.username||e.name,userNumber:e.userNumber||e.userId||e.id}})).filter((function(e){return e.userId&&e.userNumber})),i=Array.isArray(t.formData.filler)?t.formData.filler:[],o=new Set(i),s=t.userOptions.filter((function(e){return e.userId&&o.has(e.userId)})),l=new Map;s.forEach((function(e){e.userNumber&&l.set(e.userNumber,e)})),n.forEach((function(e){e.userNumber&&!l.has(e.userNumber)&&l.set(e.userNumber,e)})),t.userOptions=Array.from(l.values()),t.userLoading=!1,t.currentRequest=null})).asyncErrorCatch((function(e){if(console.error("搜索填写人失败:",e),t.formData.filler&&Array.isArray(t.formData.filler)&&t.formData.filler.length>0){var r=new Set(t.formData.filler),a=t.userOptions.filter((function(e){return e.userId&&r.has(e.userId)}));t.userOptions=a}else t.userOptions=[];t.userLoading=!1,t.currentRequest=null}))}else t.userOptions=[]}),300);else if(this.formData.filler&&Array.isArray(this.formData.filler)&&this.formData.filler.length>0){var r=new Set(this.formData.filler),a=this.userOptions.filter((function(e){return e.userId&&r.has(e.userId)}));this.userOptions=a}else this.userOptions=[]},handleFillerChange:function(e){var t=this;if(e&&Array.isArray(e)&&e.length>0){var r=e.map((function(e){var r=t.userOptions.find((function(t){return t.userId===e}));return r?r.username:e})).filter((function(e){return e}));this.formData.fillerName=r.join(", "),this.formData.userId=e}else this.formData.fillerName="",this.formData.userId=[]},getDepartmentPathName:function(e){if(!e||!this.departmentList||0===this.departmentList.length)return"";var t=function e(t,r){var a,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=x9(t);try{for(i.s();!(a=i.n()).done;){var o=a.value,s=[].concat(v9(n),[o.name]);if(o.id===r)return s;if(o.children&&o.children.length>0){var l=e(o.children,r,s);if(l)return l}}}catch(c){i.e(c)}finally{i.f()}return null},r=t(this.departmentList,e);return r?r.join("-"):""},handleDelete:function(e,t){var r=this;this.$confirm("确定要删除该记录吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t=C9(C9({},nt.DELETE_MANAGER_DATA),{},{params:{rowId:e.rowId},disableSuccessMsg:!0});r.$request(t).asyncThen((function(e){r.$message({type:"success",message:"删除成功"}),r.loadFillerData()})).asyncErrorCatch((function(e){console.error("删除失败:",e),r.$message({type:"error",message:"删除失败"})}))})).catch((function(){}))},handleSizeChange:function(e){this.pagination.pageSize=e,this.pagination.currentPage=1,this.loadFillerData()},handleCurrentChange:function(e){this.pagination.currentPage=e,this.loadFillerData()},handleRefresh:function(){this.pagination.currentPage=1,this.loadFillerData()},formatDepartmentDisplay:function(e){if(!e)return"平台部";var t=e.replace(/·/g,"-"),r=t.split("-").filter((function(e){return""!==e.trim()}));return r.length>0?r[r.length-1]:t}}},A9=M9,k9=(r("dcd1"),p(A9,f9,m9,!1,null,"05e52e5d",null)),P9=k9.exports,N9=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"apaas-custom-page-mydemo custom-page"},[e.showProgressDetail?r("approval-progress-detail",{attrs:{detail:e.currentApprovalDetail},on:{close:e.closeProgressDetail,refresh:e.handleRefresh}}):[e._m(0),r("div",{staticClass:"page-search-panel"},[r("el-form",{staticClass:"search-list"},[r("div",{staticClass:"search-component"},[r("el-form-item",{attrs:{label:"模板名称"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.templateName,callback:function(t){e.$set(e.searchPanelValue,"templateName",t)},expression:"searchPanelValue.templateName"}})],1)],1),r("div",{staticClass:"search-component"},[r("el-form-item",{attrs:{label:"状态"}},[r("el-select",{attrs:{clearable:"",filterable:"",placeholder:"请选择"},model:{value:e.searchPanelValue.status,callback:function(t){e.$set(e.searchPanelValue,"status",t)},expression:"searchPanelValue.status"}},e._l(e.statusOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.label,value:e.id}})})),1)],1)],1),r("div",{staticClass:"search-component"},[r("el-form-item",{attrs:{label:"申请时间"}},[r("el-date-picker",{attrs:{format:"yyyy-MM-dd","value-format":"yyyy-MM-dd",placeholder:"请选择"},model:{value:e.searchPanelValue.createDate,callback:function(t){e.$set(e.searchPanelValue,"createDate",t)},expression:"searchPanelValue.createDate"}})],1)],1),r("div",{staticClass:"search-component"},[r("el-form-item",{attrs:{label:"申请人"}},[r("el-input",{attrs:{placeholder:"请输入"},model:{value:e.searchPanelValue.username,callback:function(t){e.$set(e.searchPanelValue,"username",t)},expression:"searchPanelValue.username"}})],1)],1)]),r("div",{staticClass:"search-button-group"},[r("el-button",{attrs:{"native-type":"reset"},on:{click:function(t){return e.resetSearch()}}},[e._v(" 重置 ")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleSearch()}}},[e._v(" 查询 ")])],1)],1),r("div",{staticClass:"page-data-list"},[r("x-vxe-table",{ref:"vxeTable",staticClass:"block-table",attrs:{border:!0,seqWidth:40,colConfigs:e.tableConfig.colConfigs,tableData:e.tableData,rowDraggable:e.tableConfig.rowDraggable,seqType:e.tableConfig.seqType,pagination:e.pagination,layout:e.tableConfig.layout,seqConfig:e.tableConfig.seqConfig,autoSize:e.tableConfig.autoSize,pageConfig:e.tableConfig.pageConfig},on:{"table-row-click":e.rowClickEvent,"size-change":e.pageSizeChange,"current-page-change":e.currentChange},scopedSlots:e._u([e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customSlot,fn:function(n){var i=n.row,o=n.rowIndex;return["status"===t.customSlot?r("div",{key:a+""+o},["审批中"===i[t.prop]||"APPROVING"===i[t.prop]?r("span",{staticClass:"status-tag status-approving"},[e._v(" 审批中 ")]):"已通过"===i[t.prop]||"COMPLETE"===i[t.prop]?r("span",{staticClass:"status-tag status-approved"},[e._v(" 已通过 ")]):"已退回"===i[t.prop]||"REJECTED"===i[t.prop]?r("span",{staticClass:"status-tag status-rejected"},[e._v(" 已退回 ")]):"已撤回"===i[t.prop]||"RETURNED"===i[t.prop]?r("span",{staticClass:"status-tag status-rejected"},[e._v(" 已撤回 ")]):r("span",{staticClass:"status-tag status-default"},[e._v(" "+e._s(i[t.prop])+" ")])]):e._e(),"version"===t.customSlot?r("div",{key:a+""+o},[i[t.prop]?r("span",[e._v(" V"+e._s(i[t.prop])+" ")]):r("span",[e._v("-")])]):e._e(),"currentApprover"===t.customSlot?r("div",{key:a+""+o},[i.currentApprovers&&i.currentApprovers.length>0?r("span",[e._v(" "+e._s(i.currentApprovers.map((function(e){return e.username})).join(",")||"-")+" ")]):r("span",[e._v("-")])]):e._e(),"options"===t.customSlot?r("div",{key:a+""+o},[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleViewProgress(i)}}},[e._v(" 查看进度 ")])]):e._e()]}}}))],null,!0)},[r("template",{slot:"empty"},[r("div",{staticClass:"table-empty"},[r("x-empty-page")],1)])],2)],1)],r("el-dialog",{attrs:{title:"审核",visible:e.approvalDialogVisible,width:"500px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(t){e.approvalDialogVisible=t},close:e.handleApprovalDialogClose}},[r("el-form",{ref:"approvalForm",attrs:{model:e.approvalFormData,"label-width":"80px"}},[r("el-form-item",{attrs:{label:"审核"}},[r("el-radio-group",{model:{value:e.approvalFormData.result,callback:function(t){e.$set(e.approvalFormData,"result",t)},expression:"approvalFormData.result"}},[r("el-radio",{attrs:{label:"PASS"}},[e._v(" 通过 ")]),r("el-radio",{attrs:{label:"REJECT"}},[e._v(" 退回 ")])],1)],1),r("el-form-item",{attrs:{label:"备注"}},[r("el-input",{attrs:{type:"textarea",rows:4,placeholder:"请输入备注"},model:{value:e.approvalFormData.opinion,callback:function(t){e.$set(e.approvalFormData,"opinion",t)},expression:"approvalFormData.opinion"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleApprovalDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.approvalSubmitting},on:{click:e.handleApprovalSubmit}},[e._v(" 确定 ")])],1)],1)],2)},E9=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"page-header"},[r("div",{staticClass:"title"},[e._v(" 参数模板审批流程 ")])])}],R9=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("transition",{attrs:{name:"approval-progress-fade"}},[e.visible?r("div",{staticClass:"approval-progress-detail"},[r("div",{staticClass:"detail-panel"},[r("div",{staticClass:"detail-header"},[r("div",{staticClass:"header-left"},[r("el-button",{staticClass:"back-button",attrs:{type:"text",icon:"el-icon-arrow-left"},on:{click:e.handleBack}}),r("div",{staticClass:"header-info"},[r("div",{staticClass:"title"},[e._v(" 审批详情 ")])])],1),r("div",{staticClass:"header-right"},[e.fromTodo?r("el-button",{on:{click:e.handleReturn}},[e._v(" 退回 ")]):e._e(),e.fromTodo&&e.canResend?r("el-button",{attrs:{loading:e.resending},on:{click:e.handleResend}},[e._v(" 直送 ")]):e._e(),e.fromTodo?r("el-button",{attrs:{type:"primary"},on:{click:e.handleSubmit}},[e._v(" 提交 ")]):e._e()],1)]),r("div",{staticClass:"detail-content"},[r("section",{staticClass:"block-section"},[r("div",{staticClass:"section-title"},[e._v(" 基础信息 ")]),r("div",{staticClass:"info-grid"},[r("div",{staticClass:"info-item-full"},[r("span",{staticClass:"label"},[e._v("流程主题")]),e.isEditingProcessTitle?r("div",{staticClass:"process-title-input-wrapper"},[r("el-input",{staticClass:"process-title-input",attrs:{placeholder:"请输入流程主题",maxlength:"100","show-word-limit":""},model:{value:e.editingProcessTitle,callback:function(t){e.editingProcessTitle=t},expression:"editingProcessTitle"}},[r("template",{slot:"suffix"},[r("i",{staticClass:"el-icon-check process-title-icon",on:{click:e.handleSaveProcessTitle}}),r("i",{staticClass:"el-icon-close process-title-icon",on:{click:e.handleCancelProcessTitle}})])],2)],1):r("div",{staticClass:"value process-title-value-wrapper"},[e._v(" "+e._s(e.showTopDetail.processTitle||"--")+" "),r("i",{staticClass:"el-icon-edit process-title-edit-icon",on:{click:e.handleEditProcessTitle}})])]),r("div",{staticClass:"info-row"},[r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("创建人")]),r("span",{staticClass:"value"},[e._v(e._s(e.showTopDetail.createBy||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("创建时间")]),r("span",{staticClass:"value"},[e._v(e._s(e.formatTime(e.showTopDetail.createTime)||"--"))])])]),r("div",{staticClass:"info-row"},[r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("当前环节")]),r("span",{staticClass:"value"},[e._v(e._s(e.showTopDetail.currentNode||"--"))])]),r("div",{staticClass:"info-item"},[r("span",{staticClass:"label"},[e._v("当前处理人")]),r("span",{staticClass:"value"},[e._v(e._s(e.showTopDetail.currentProcessor||"--"))])])])])]),r("section",{staticClass:"block-section"},[r("div",{staticClass:"section-title"},[e._v(" 审批内容 ")]),r("el-table",{staticClass:"change-table",attrs:{data:e.changeTable||[],border:""}},[r("el-table-column",{attrs:{label:"序号",type:"index",width:"60"}}),r("el-table-column",{attrs:{prop:"subsystemName",label:"子系统","min-width":"120","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"parameterType",label:"类型","min-width":"120","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"partsName",label:"零部件名称","min-width":"140","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"parameterName",label:"参数名称","min-width":"140","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"unit",label:"单位","min-width":"80","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"remarks",label:"备注","min-width":"120","show-overflow-tooltip":""}}),r("el-table-column",{attrs:{prop:"modifyDetails",label:"变动说明","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",{staticClass:"modify-details-text"},[e._v(" "+e._s(t.row.modifyDetails||"--")+" ")])]}}],null,!1,654223453)})],1),e.changeTableTotal>0?r("el-pagination",{staticClass:"pagination-wrapper",attrs:{"current-page":e.changeTablePageNumber,"page-size":e.changeTablePageSize,total:e.changeTableTotal,layout:"total, prev, pager, next, jumper"},on:{"current-change":e.handlePageChange}}):e._e(),e.progressDetail.description?r("div",{staticClass:"description-block"},[r("span",{staticClass:"label"},[e._v("说明:")]),r("span",{staticClass:"value"},[e._v(e._s(e.detailOption))])]):e._e()],1),r("section",{staticClass:"block-section"},[r("div",{staticClass:"section-title"},[e._v(" 审批流程 ")]),e.timelineNodes&&e.timelineNodes.length>0?r("div",{staticClass:"approval-timeline"},[r("el-timeline",e._l(e.timelineNodes,(function(t,a){return r("el-timeline-item",{key:a,attrs:{color:e.getTimelineColor(t.result||t.status,a,e.timelineNodes.length)}},[r("div",{staticClass:"timeline-item-content"},[r("div",{staticClass:"node-title"},[e._v(" "+e._s(t.title)+" ")]),r("div",{staticClass:"node-content"},[r("div",{staticClass:"node-info"},[r("div",{staticClass:"node-user"},[e._v(" "+e._s(t.userName||"--")+" "),r("span",{staticClass:"node-time"},[e._v(" "+e._s(e.formatTime(t.operateTime))+" ")])])]),r("div",{staticClass:"node-status",class:e.getStatusClass(t.result||t.status)},[e._v(" "+e._s(e.setStatusText(t.result||t.status))+" ")]),t.opinion?r("div",{staticClass:"node-opinion"},[e._v(" 审批意见:"+e._s(t.opinion)+" ")]):e._e()])])])})),1)],1):r("div",{staticClass:"empty-progress"},[r("span",{staticClass:"empty-text"},[e._v("暂无审批流程数据")])])])])]),r("el-dialog",{attrs:{title:e.approvalDialogTitle,visible:e.approvalDialogVisible,width:"600px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(t){e.approvalDialogVisible=t},close:e.handleApprovalDialogClose}},[r("el-form",{ref:"approvalForm",staticStyle:{"margin-top":"10px"},attrs:{model:e.approvalFormData,rules:e.approvalFormRules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"reject"===e.approvalActionType?"拒绝意见:":"提交意见:",prop:"opinion"}},[r("el-input",{attrs:{type:"textarea",rows:2,placeholder:"reject"===e.approvalActionType?"请输入拒绝意见":"请输入提交意见"},model:{value:e.approvalFormData.opinion,callback:function(t){e.$set(e.approvalFormData,"opinion",t)},expression:"approvalFormData.opinion"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleApprovalDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.approvalSubmitting},on:{click:e.handleApprovalSubmit}},[e._v(" 确定 ")])],1)],1),r("el-dialog",{attrs:{title:"选择退回节点",visible:e.returnNodeDialogVisible,width:"500px","close-on-click-modal":!1,"append-to-body":""},on:{"update:visible":function(t){e.returnNodeDialogVisible=t},close:e.handleReturnNodeDialogClose}},[r("div",{staticClass:"return-node-dialog-content"},[0===e.returnableNodes.length?r("div",{staticClass:"empty-hint"},[e._v(" 暂无可退回的节点 ")]):r("el-radio-group",{staticClass:"return-node-list",on:{change:e.handleReturnNodeChange},model:{value:e.selectedReturnNode,callback:function(t){e.selectedReturnNode=t},expression:"selectedReturnNode"}},e._l(e.returnableNodes,(function(e){return r("el-radio",{key:e,staticClass:"return-node-item",attrs:{label:e}})})),1),"发起审批"===e.selectedReturnNode?r("div",{staticClass:"return-opinion-section"},[r("div",{staticClass:"opinion-label"},[e._v(" 退回意见: ")]),r("el-input",{attrs:{type:"textarea",rows:3,placeholder:"请输入退回意见"},model:{value:e.returnOpinion,callback:function(t){e.returnOpinion=t},expression:"returnOpinion"}})],1):e._e()],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleReturnNodeDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.returnSubmitting,disabled:!e.selectedReturnNode},on:{click:e.handleReturnSubmit}},[e._v(" 确定 ")])],1)])],1):e._e()])},L9=[];function j9(e){return j9="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j9(e)}function F9(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function V9(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F9(Object(r),!0).forEach((function(t){z9(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F9(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function z9(e,t,r){return t=B9(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B9(e){var t=$9(e,"string");return"symbol"===j9(t)?t:String(t)}function $9(e,t){if("object"!==j9(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==j9(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function G9(e){return q9(e)||H9(e)||W9(e)||U9()}function U9(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function W9(e,t){if(e){if("string"===typeof e)return Y9(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Y9(e,t):void 0}}function H9(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function q9(e){if(Array.isArray(e))return Y9(e)}function Y9(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}var X9={name:"ApprovalProgressDetail",props:{detail:{type:Object,default:function(){return{}}},visible:{type:Boolean,default:!0},fromTodo:{type:Boolean,default:!1},createBy:{type:String,default:""}},data:function(){return{changeTable:[],showTopDetail:{processTitle:"",createBy:"",createTime:"",currentNode:"",currentProcessor:""},returnableNodes:[],progress:[],flowNodes:[],progressDetailData:{},detailOption:"",canResend:!1,flowStatus:"",changeTableTotal:0,changeTablePageNumber:1,changeTablePageSize:10,approvalDialogVisible:!1,approvalActionType:"",approvalDialogTitle:"审核",approvalFormData:{result:"",opinion:""},approvalSubmitting:!1,approvalFormRules:{},returnNodeDialogVisible:!1,selectedReturnNode:"",returnSubmitting:!1,returnOpinion:"",resending:!1,isEditingProcessTitle:!1,editingProcessTitle:""}},computed:{progressDetail:function(){if(this.progressDetailData&&Object.keys(this.progressDetailData).length>0)return{progressTitle:this.progressDetailData.progressTitle||"",contentName:this.progressDetailData.contentName||"",templateVersion:this.progressDetailData.templateVersion||"",explanation:this.progressDetailData.explanation||"",description:this.progressDetailData.explanation||this.progressDetailData.description||""};var e={approvalNumber:"",modelName:"",applicant:"",department:"",submitTime:"",description:"",changeTable:[],createBy:"",creationDate:"",progress:[]};return Object.assign(e,this.detail||{})},initiateNode:function(){return this.detail&&this.detail.createBy?{userName:this.detail.createBy,createTime:this.detail.createdTime||this.detail.createTime,status:"INITIATE",result:"INITIATE"}:null},timelineNodes:function(){var e=[];if(this.flowNodes&&this.flowNodes.length>0){var t=G9(this.flowNodes),r=t.findIndex((function(e){return"待审批"===e.result}));-1!==r&&(t[r]=V9(V9({},t[r]),{},{result:"APPROVING"})),t.forEach((function(t){var r="APPROVING",a="APPROVING";t.result&&("MSG"===t.result?(r="PASS",a="PASS"):"REJECT"===t.result?(r="REJECT",a="REJECT"):"RETURN"===t.result?(r="RETURN",a="RETURN"):"APPROVING"===t.result?(r="APPROVING",a="APPROVING"):"PASS"===t.result?(r="PASS",a="PASS"):"待审批"===t.result&&(r="待审批",a="待审批"));var n=t.opinions&&Array.isArray(t.opinions)&&t.opinions.length>0?t.opinions[0]:null,i=t.todoUserName||t.undoUserName||"--";e.push({title:t.node||"审批节点",userName:i,operateTime:t.approvalTime||"",result:r,status:a,opinion:n})}))}else this.progress&&this.progress.length>0&&this.progress.forEach((function(t){t.steps&&t.steps.length>0&&t.steps.forEach((function(r){e.push({title:t.title||"审批节点",userName:r.userName,operateTime:r.approvalTime||r.handleTime||r.createTime,result:r.result||r.status,status:r.result||r.status,opinion:r.opinion||r.remark||r.comment||null})}))}));return e},canApprove:function(){return this.fromTodo},currentNode:function(){if(this.flowNodes&&this.flowNodes.length>0){var e=this.flowNodes.find((function(e){return"待审批"===e.result||"APPROVING"===e.result}));if(e)return e.node||"--";var t=this.flowNodes[this.flowNodes.length-1];return t&&t.node||"--"}return"--"},currentProcessor:function(){if(this.flowNodes&&this.flowNodes.length>0){var e=this.flowNodes.find((function(e){return"待审批"===e.result||"APPROVING"===e.result}));if(e)return e.undoUserName||e.todoUserName||"--"}return"--"}},mounted:function(){this.getCanResend(),this.getApprovalChange(),this.getApprovalSpet()},methods:{getCanResend:function(){var e=this;if(this.detail&&this.detail.flowId){var t=V9(V9({},nt.GET_CAN_RESEND_APPROVAL),{},{params:{flowId:this.detail.flowId},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){e.canResend=t.data||!1})).asyncErrorCatch((function(t){console.error("获取可重新发起审批权限失败:",t),e.canResend=!1}))}else this.canResend=!1},setStatusText:function(e){var t={PASS:"通过",REJECT:"驳回",REFUSE:"驳回",APPROVE:"批准",APPROVING:"审批中",PENDING:"待处理",WAITING:"待处理",INITIATE:"发起审批",RETURN:"退回"};return t[e]||e||"待处理"},formatTime:function(e){if(!e)return"--";if("number"===typeof e){var t=new Date(e);return t.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return e},getTimelineColor:function(e,t,r){return"PASS"===e||"APPROVE"===e?"#67C23A":"REJECT"===e||"REFUSE"===e?"#F56C6C":"APPROVING"===e||"PENDING"===e||"WAITING"===e?"#E6A23C":"#409EFF"},getStatusClass:function(e){var t={PASS:"status-pass",APPROVE:"status-approve",REJECT:"status-reject",REFUSE:"status-reject",APPROVING:"status-approving",PENDING:"status-pending",WAITING:"status-pending",INITIATE:"status-initiate",RETURN:"status-return"};return t[e]||"status-default"},getApprovalSpet:function(){var e=this;if(this.detail&&this.detail.flowId){var t=V9(V9({},nt.GET_PPROVAL_ALL),{},{params:{flowId:this.detail.flowId,templateId:this.detail.templateId},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){console.log("审批流程数据:",t);var r=t.data||t,a=r.flowStatus||"",n=r.createBy||"";e.showTopDetail={processTitle:r.progressTitle||"",createBy:n,createTime:r.createTime||"",currentNode:"REJECTED"===a?"编制":r.currentNode||"",currentProcessor:"REJECTED"===a?n:r.processor||""},e.flowStatus=a,e.progressDetailData={explanation:r.explanation||"",flowStatus:r.flowStatus||"",progressTitle:r.progressTitle||"",templateVersion:r.templateVersion||"",contentName:r.contentName||""},e.detailOption=r.explanation||r.description||"",e.flowNodes=r.flowNodes||[]})).asyncErrorCatch((function(t){console.error("获取审批流程数据失败:",t),e.flowNodes=[],e.progressDetailData={}}))}},getApprovalChange:function(){var e=this,t=V9(V9({},nt.GET_APPROVAL_CHANGE),{},{params:{flowId:this.detail.flowId,templateId:this.detail.templateId,pageNumber:this.changeTablePageNumber,pageSize:this.changeTablePageSize},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){console.log(t),e.changeTable=t.data.result,e.changeTableTotal=t.data.count}))},handleBack:function(){this.$emit("close")},handlePageChange:function(e){this.changeTablePageNumber=e,this.getApprovalChange()},changeTypeClass:function(e){return"create"===e?"change-create":"delete"===e?"change-delete":"update"===e?"change-update":"change-default"},deduplicateSteps:function(e){var t=this;if(!Array.isArray(e)||0===e.length)return[];var r=new Map,a=[];return e.forEach((function(e){var t=null;if(e.id)t="id_".concat(e.id);else{var n=e.userName||e.operator||e.username||e.handlerName||e.handler||"",i=e.approvalTime||e.handleTime||e.createTime||"",o=e.result||e.status||"";t="combo_".concat(n,"_").concat(i,"_").concat(o)}if(t)if(r.has(t)){var s=r.get(t),l=a[s],c=!!(e.approvalTime||e.handleTime||e.createTime),u=!!(l.approvalTime||l.handleTime||l.createTime);c&&!u&&(a[s]=e)}else r.set(t,a.length),a.push(e)})),a.map((function(e){var r=V9({},e);return r.approvalTime&&(r.approvalTime=t.formatTime(r.approvalTime)),r.handleTime&&(r.handleTime=t.formatTime(r.handleTime)),r.createTime&&(r.createTime=t.formatTime(r.createTime)),r}))},handleReject:function(){var e=this;this.approvalActionType="reject",this.approvalDialogTitle="拒绝",this.approvalFormData={result:"REJECT",opinion:"拒绝"},this.approvalDialogVisible=!0,this.$nextTick((function(){e.$refs.approvalForm&&e.$refs.approvalForm.clearValidate()}))},handleReturn:function(){var e=this,t=V9(V9({},nt.GET_CAN_RETURN_NODE),{},{params:{flowId:this.detail.flowId},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){console.log(t);var r=Array.isArray(t.data)?t.data:[];e.returnableNodes=["发起审批"].concat(G9(r))})).asyncErrorCatch((function(t){console.error("获取退回节点失败:",t),e.returnableNodes=["发起审批"]})),this.selectedReturnNode="",this.returnOpinion="",this.returnNodeDialogVisible=!0},handleReturnNodeDialogClose:function(){this.returnNodeDialogVisible=!1,this.selectedReturnNode="",this.returnOpinion=""},handleReturnNodeChange:function(){"发起审批"!==this.selectedReturnNode&&(this.returnOpinion="")},handleReturnSubmit:function(){var e=this;if(this.selectedReturnNode)if(this.detail&&this.detail.flowId)if(this.returnSubmitting=!0,"发起审批"===this.selectedReturnNode){var t={flowId:this.detail.flowId,userId:pe(),result:"REJECT",opinion:this.returnOpinion||""},r=V9(V9({},nt.HANDLE_APPROVAL),{},{params:t,disableSuccessMsg:!0});this.$request(r).asyncThen((function(t){e.handleReturnNodeDialogClose(),e.getApprovalSpet(),e.getApprovalChange(),e.$message({message:"拒绝成功",type:"success"}),e.$emit("refresh"),e.returnSubmitting=!1})).asyncErrorCatch((function(t){console.error("拒绝失败:",t),e.$message({message:t.message||"拒绝失败,请重试",type:"error"}),e.returnSubmitting=!1})).finally((function(){e.returnSubmitting=!1}))}else{var a=this.detail.createdById||"";if(!a)return this.$message.error("无法获取流程发起人信息"),void(this.returnSubmitting=!1);var n=pe(),i={flowId:this.detail.flowId,nodeName:this.selectedReturnNode,createUserId:a,processUserId:n},o=V9(V9({},nt.RETURN_MODEL_APPROVAL),{},{params:i,disableSuccessMsg:!0});this.$request(o).asyncThen((function(t){e.handleReturnNodeDialogClose(),e.getApprovalSpet(),e.getApprovalChange(),e.$message({message:"退回成功",type:"success"}),e.$emit("refresh"),e.returnSubmitting=!1})).asyncErrorCatch((function(t){console.error("退回失败:",t),e.$message({message:t.message||"退回失败,请重试",type:"error"}),e.returnSubmitting=!1})).finally((function(){e.returnSubmitting=!1}))}else this.$message.error("缺少审批信息");else this.$message.warning("请选择要退回的节点")},handleSubmit:function(){var e=this;this.approvalActionType="submit",this.approvalDialogTitle="提交",this.approvalFormData={result:"PASS",opinion:"同意"},this.approvalDialogVisible=!0,this.$nextTick((function(){e.$refs.approvalForm&&e.$refs.approvalForm.clearValidate()}))},handleApprovalDialogClose:function(){this.approvalDialogVisible=!1,this.approvalActionType="",this.approvalDialogTitle="审核",this.approvalFormData={result:"",opinion:""},this.$refs.approvalForm&&this.$refs.approvalForm.clearValidate()},handleApprovalSubmit:function(){var e=this;this.$refs.approvalForm.validate((function(t){if(!t)return!1;if(e.detail&&e.detail.flowId){var r={flowId:e.detail.flowId,userId:pe(),result:e.approvalFormData.result,opinion:e.approvalFormData.opinion||""};e.approvalSubmitting=!0;var a=V9(V9({},nt.HANDLE_APPROVAL),{},{params:r,disableSuccessMsg:!0});e.$request(a).asyncThen((function(t){e.handleApprovalDialogClose(),e.getApprovalSpet(),e.getApprovalChange(),e.$message({message:"审批提交成功",type:"success"}),e.$emit("refresh"),e.approvalSubmitting=!1})).asyncErrorCatch((function(t){console.error("审批提交失败:",t),e.$message({message:"审批提交失败,请重试",type:"error"}),e.approvalSubmitting=!1})).finally((function(){e.approvalSubmitting=!1}))}else e.$message.error("缺少审批信息")}))},handleResend:function(){var e=this;this.detail&&this.detail.templateId?this.$confirm("确定要执行直送操作吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.resending=!0;var t=V9(V9({},nt.RESTART_MODEL_APPROVAL),{},{params:{templateId:e.detail.templateId,userId:pe()},disableSuccessMsg:!0});e.$request(t).asyncThen((function(t){e.getApprovalSpet(),e.getApprovalChange(),e.$message({message:"直送成功",type:"success"}),e.$emit("refresh"),e.resending=!1})).asyncErrorCatch((function(t){console.error("直送失败:",t),e.$message({message:t.message||"直送失败,请重试",type:"error"}),e.resending=!1})).finally((function(){e.resending=!1}))})).catch((function(){})):this.$message.error("缺少模板ID,无法执行直送操作")},handleEditProcessTitle:function(){this.isEditingProcessTitle=!0,this.editingProcessTitle=this.showTopDetail.processTitle||""},handleCancelProcessTitle:function(){this.isEditingProcessTitle=!1,this.editingProcessTitle=""},handleSaveProcessTitle:function(){var e=this;if(this.detail&&this.detail.flowId){var t=(this.editingProcessTitle||"").trim();t?this.$confirm("确认修改主题为".concat(t,"吗?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var r=V9(V9({},nt.EDIT_APPROVAL_PROCESS_TITLE),{},{params:{flowId:e.detail.flowId,title:t},disableSuccessMsg:!0});e.$request(r).asyncThen((function(r){e.showTopDetail.processTitle=t,e.isEditingProcessTitle=!1,e.editingProcessTitle="",e.$message({message:"修改成功",type:"success"})})).asyncErrorCatch((function(t){console.error("修改流程主题失败:",t),e.$message({message:t.message||"修改失败,请重试",type:"error"})}))})).catch((function(){})):this.$message.warning("流程主题不能为空")}else this.$message.error("缺少流程ID,无法保存")}}},Z9=X9,K9=(r("584b"),p(Z9,R9,L9,!1,null,"bb407b62",null)),J9=K9.exports;function Q9(e){return Q9="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q9(e)}function e7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function t7(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?e7(Object(r),!0).forEach((function(t){r7(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e7(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function r7(e,t,r){return t=a7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a7(e){var t=n7(e,"string");return"symbol"===Q9(t)?t:String(t)}function n7(e,t){if("object"!==Q9(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==Q9(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var i7={name:"ApprovalManagement",components:{ApprovalProgressDetail:J9},data:function(){return{searchPanelValue:{templateName:"",status:"",createDate:"",username:""},statusOptions:[{id:"APPROVING",label:"审批中"},{id:"COMPLETE",label:"已通过"},{id:"REJECTED",label:"已退回"},{id:"RETURNED",label:"已撤回"}],tableData:[],pagination:{currentPage:1,pageSize:10,total:0},showProgressDetail:!1,currentApprovalDetail:null,approvalDialogVisible:!1,approvalFormData:{result:"",opinion:""},approvalSubmitting:!1,currentApprovalRow:null}},computed:{tableConfig:function(){return{rowDraggable:!1,colConfigs:[{prop:"templateName",label:"模板名称",showOverflowTooltip:!0,minWidth:"120"},{prop:"version",label:"版本",customSlot:"version",showOverflowTooltip:!0,minWidth:"140"},{prop:"username",label:"申请人",showOverflowTooltip:!0,minWidth:"100"},{prop:"createdTime",label:"申请时间",showOverflowTooltip:!0,minWidth:"160"},{prop:"status",label:"当前状态",customSlot:"status",showOverflowTooltip:!0,minWidth:"100",align:"center"},{prop:"currentApprovers",label:"当前审批人",customSlot:"currentApprover",showOverflowTooltip:!0,minWidth:"120"},{prop:"options",label:"操作",customSlot:"options",align:"center",width:"200",fixed:"right"}],seqType:"seq",layout:"total, prev, pager, next, sizes"}}},created:function(){this.loadUserSelfRole(),this.loadData()},methods:{loadUserSelfRole:function(){var e=t7(t7({},nt.GET_USER_SELF_ROLE),{},{params:{userOrDepID:pe()},disableSuccessMsg:!0});this.$request(e).asyncThen((function(e){if(e&&e.data)try{localStorage.setItem("user_self_role",JSON.stringify(e.data))}catch(t){console.error("存储权限数据到 localStorage 失败:",t)}})).asyncErrorCatch((function(e){console.error("获取用户自身角色失败:",e)}))},pageSizeChange:function(e){this.pagination.pageSize=e,this.loadData()},rowClickEvent:function(e){console.warn(e)},handleViewProgress:function(e){var t=e.flowId;t?(this.showProgressDetail=!0,console.log(e),this.currentApprovalDetail=e):this.$message.error("缺少审批ID,无法查看详情")},handleApprove:function(e){var t=this;this.currentApprovalRow=e,this.approvalFormData={result:"",remarks:""},this.approvalSubmitting=!1,this.approvalDialogVisible=!0,this.$nextTick((function(){t.$refs.approvalForm&&t.$refs.approvalForm.clearValidate()}))},handleApprovalDialogClose:function(){this.approvalDialogVisible=!1,this.approvalFormData={result:"",opinion:""},this.currentApprovalRow=null,this.$refs.approvalForm&&this.$refs.approvalForm.clearValidate()},handleApprovalSubmit:function(){var e=this;if(this.approvalFormData.result)if(this.currentApprovalRow){var t={flowId:this.currentApprovalRow.flowId,userId:pe(),result:this.approvalFormData.result,opinion:this.approvalFormData.opinion||""};this.approvalSubmitting=!0;var r=t7(t7({},nt.HANDLE_APPROVAL),{},{params:t,disableSuccessMsg:!0});this.$request(r).asyncThen((function(t){e.approvalSubmitting=!1,e.handleApprovalDialogClose(),e.loadData(),e.$message({type:"success",message:"审批提交成功"})})).asyncErrorCatch((function(t){e.approvalSubmitting=!1,console.error("审批提交失败:",t),e.handleApprovalDialogClose(),e.$message({type:"error",message:"审批提交失败"})}))}else this.$message.error("缺少审批信息");else this.$message.warning("请选择审核结果(通过或退回)")},canRecall:function(e){return"APPROVING"===e.status&&e.createdBy===pe()},handleRecall:function(e){var t=this,r={flowId:e.flowId,userId:pe(),result:"RETURN",opinion:""};this.approvalSubmitting=!0;var a=t7(t7({},nt.RETURN_APPROVAL),{},{params:r,disableSuccessMsg:!0});this.$request(a).asyncThen((function(e){t.approvalSubmitting=!1,t.loadData(),t.$message({type:"success",message:"审批提交成功"})})).asyncErrorCatch((function(e){t.approvalSubmitting=!1,console.error("审批提交失败:",e),t.$message({type:"error",message:"审批提交失败"})}))},currentChange:function(e){this.pagination.currentPage=e,this.loadData()},selectDataChange:function(e){this.$emit("select-data-change",e)},resetSearch:function(){this.searchPanelValue={templateName:"",status:"",createDate:"",username:""},this.handleSearch()},isApprover:function(e){return!(!e.currentApprovers||!Array.isArray(e.currentApprovers))&&e.currentApprovers.some((function(e){return e.userId===pe()}))},handleSearch:function(){this.pagination.currentPage=1,this.loadData()},loadData:function(){var e=this,t=t7(t7({},nt.GET_APPROVAL_LIST),{},{params:{userId:pe(),templateName:this.searchPanelValue.templateName,status:this.searchPanelValue.status,createDate:this.searchPanelValue.createDate,username:this.searchPanelValue.username,pageNumber:this.pagination.currentPage,pageSize:this.pagination.pageSize},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){e.tableData=t.data.result,e.pagination.total=t.data.count})).asyncErrorCatch((function(e){console.error("加载数据失败:",e)}))},closeProgressDetail:function(){this.showProgressDetail=!1,this.currentApprovalDetail=null},handleRefresh:function(){this.loadData()}}},o7=i7,s7=(r("8f19"),p(o7,N9,E9,!1,null,null,null)),l7=s7.exports,c7=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"apaas-custom-page-todo custom-page"},[e.showEngineDetail||e.showEngineCheck||e.showApprovalProgressDetail||e.showReportDetail||e.showModelDetail?e._e():[r("div",{staticClass:"page-header"},[r("div",{staticClass:"title"},[e._v(" 我的待办 ")]),r("div",{staticClass:"operation"},[r("x-svg-icon",{staticClass:"pointer",staticStyle:{cursor:"pointer"},attrs:{name:"refresh-icon"},nativeOn:{click:function(t){return e.handleRefresh()}}})],1)]),r("div",{staticClass:"page-data-list"},[r("x-vxe-table",{ref:"vxeTable",staticClass:"block-table",attrs:{border:!0,seqWidth:40,colConfigs:e.tableConfig.colConfigs,tableData:e.tableData,rowDraggable:e.tableConfig.rowDraggable,seqType:e.tableConfig.seqType,pagination:e.pagination,layout:e.tableConfig.layout,seqConfig:e.tableConfig.seqConfig,autoSize:e.tableConfig.autoSize,pageConfig:e.tableConfig.pageConfig},on:{"table-row-click":e.rowClickEvent,"size-change":e.pageSizeChange,"current-page-change":e.currentChange,"select-data-change":e.selectDataChange},scopedSlots:e._u([e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customSlot,fn:function(n){var i=n.row,o=n.rowIndex;return["options"===t.customSlot?r("div",{key:"op"+a+o},[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowView(i)}}},[e._v("查看")])]):e._e(),"processTitle"===t.customSlot?r("div",{key:"pt"+a+o},[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowView(i)}}},[e._v(" "+e._s(i.processTitle||"--")+" ")])]):e._e()]}}}))],null,!0)},[r("template",{slot:"empty"},[r("div",{staticClass:"table-empty"},[r("x-empty-page")],1)])],2)],1)],e.showEngineDetail&&!e.showEngineCheck?r("engine-detail",{staticClass:"engine-detail-wrapper",attrs:{model:e.currentModel,detail:e.currentEngineDetail,"engine-model-i-d":e.currentEngineModelID,"is-dispatch-mode":e.isDispatchMode,"dispatch-type":e.dispatchType,"responsible-person-id":e.responsiblePersonId,"filled-by":e.filledBy,"flow-id":e.flowId,"can-resend":e.canResend,"from-todo":e.fromTodo},on:{back:e.handleBackFromDetail}}):e._e(),e.showEngineCheck?r("engine-check",{staticClass:"engine-check-wrapper",attrs:{detail:e.currentEngineDetail,visible:e.showEngineCheck,"engine-type":e.engineType,"from-todo":e.fromTodo},on:{refresh:e.handleBackFromCheck,close:e.handleBackFromCheck}}):e._e(),e.showApprovalProgressDetail?r("approval-progress-detail",{staticClass:"approval-progress-detail-wrapper",attrs:{detail:e.currentApprovalDetail,visible:e.showApprovalProgressDetail,"from-todo":!0,"create-by":e.createdById},on:{refresh:e.handleBackFromApprovalProgress,close:e.handleBackFromApprovalProgress}}):e._e(),e.showReportDetail?r("report-detail",{staticClass:"report-detail-wrapper",attrs:{detail:e.currentReportDetail,visible:e.showReportDetail,"from-todo":e.fromTodo,"can-resend":e.canResend},on:{close:e.handleBackFromReport}}):e._e(),e.showModelDetail?r("model-detail",{staticClass:"model-detail-wrapper",attrs:{"template-id":e.currentTemplateId,"change-id":e.currentTemplateRowId,"template-name":e.currentTemplateName,"template-version":e.currentVersion,"version-list":e.versionList,"flow-id":e.flowId,detail:e.currentDetail,"template-management-permissions":e.templateManagementPermissions,"from-todo":!0},on:{back:e.handleBackFromTodoDetail}}):e._e()],2)},u7=[];function p7(e){return p7="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p7(e)}function d7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function h7(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d7(Object(r),!0).forEach((function(t){f7(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d7(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f7(e,t,r){return t=m7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m7(e){var t=g7(e,"string");return"symbol"===p7(t)?t:String(t)}function g7(e,t){if("object"!==p7(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==p7(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var v7={name:"TodoPage",components:{EngineDetail:Rr,EngineCheck:D8,ApprovalProgressDetail:J9,ReportDetail:B4,ModelDetail:Rt},data:function(){return{tableData:[],pagination:{currentPage:1,pageSize:10,total:0},showEngineDetail:!1,canResend:!1,showEngineCheck:!1,showModelDetail:!1,currentTemplateId:"",currentTemplateRowId:"",currentTemplateName:"",currentVersion:"",versionList:[],currentDetail:null,flowId:"",createdById:"",templateManagementPermissions:[],currentModel:"",currentEngineModelID:"",currentEngineDetail:null,isDispatchMode:!1,dispatchType:"todo",responsiblePersonId:"",filledBy:"",engineType:"玉柴",showApprovalProgressDetail:!1,currentApprovalDetail:null,showReportDetail:!1,currentReportDetail:null,fromTodo:!0}},computed:{tableConfig:function(){return{rowDraggable:!1,colConfigs:[{prop:"processTitle",label:"流程主题",showOverflowTooltip:!0,minWidth:"200",customSlot:"processTitle"},{prop:"currentNode",label:"当前环节",showOverflowTooltip:!0,minWidth:"120"},{prop:"currentProcessor",label:"当前处理人",showOverflowTooltip:!0,minWidth:"120"},{prop:"createdBy",label:"创建人",showOverflowTooltip:!0,minWidth:"120"},{prop:"creationDate",label:"创建时间",showOverflowTooltip:!0,minWidth:"150",align:"center",formatter:this.formatDateTime},{prop:"options",label:"操作",customSlot:"options",align:"center",width:"100",fixed:"right"}],seqType:"",seqConfig:{},layout:"total, prev, pager, next, jumper, sizes"}}},mounted:function(){this.loadData(),this.filterTemplateManagementPermissions()},methods:{pageSizeChange:function(e){this.pagination.pageSize=e,this.pagination.currentPage=1,this.loadData()},rowClickEvent:function(e){console.warn(e)},handleRowBack:function(e){var t=this;this.$confirm("确定退回吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var r=h7(h7({},$e.HANDLE_FILLER_BACK),{},{params:{userId:pe(),steps:"填写人退回",todoTaskId:e.id,modelID:e.modelId},disableSuccessMsg:!0});t.$request(r).asyncThen((function(e){t.$message.success("退回成功"),t.loadData()})).asyncErrorCatch((function(e){console.error("退回失败:",e),t.$message.error("退回失败")}))})).catch((function(){t.$message.info("已取消")}))},filterTemplateManagementPermissions:function(){try{var e=localStorage.getItem("user_self_role");if(!e)return void(this.templateManagementPermissions=[]);var t=JSON.parse(e);if(!Array.isArray(t))return void(this.templateManagementPermissions=[]);this.templateManagementPermissions=t.filter((function(e){return"数据录入/模板管理"===e.menuPath})),console.log("模板管理权限数据:",this.templateManagementPermissions)}catch(r){console.error("过滤模板管理权限失败:",r),this.templateManagementPermissions=[]}},loadVersionList:function(e){var t=this,r=e&&(e.rowId||e.templateRowId||e.id);if(r){var a=h7(h7({},$e.CHECK_MODEL_VERISON),{},{params:{templateRowId:r},disableSuccessMsg:!0});this.$request(a,!1).asyncThen((function(e){var r=e&&e.data&&(e.data.result||e.data.list||e.data)||[];t.versionList=Array.isArray(r)?r:[]})).asyncErrorCatch((function(e){console.error("获取版本列表失败:",e),t.versionList=[]}))}else this.versionList=[]},handleRowView:function(e){var t=this,r=e.dataType||"",a="数据维护"===r,n="任务分解"===r,i="数据审批"===r,o="模板审核"===r,s="对标报告审核"===r,l="对标报告拒绝"===r,c="模板拒绝"===r,u="数据拒绝"===r;if(this.currentModel=e.modelName||e.productFullName||"",this.currentEngineModelID=e.modelId,c){var p=h7(h7({},$e.GET_MODEL_BY_ID),{},{params:{templateId:e.modelId},disableSuccessMsg:!0});this.$request(p).asyncThen((function(r){console.log(r);var a=r.data;t.currentTemplateId=e.modelId,t.currentTemplateRowId=a.id,t.currentTemplateName=a.templateName||"",t.currentVersion=a.version||"",t.currentDetail={status:a.status||"",flowId:e.documentNo||"",changeId:t.currentTemplateRowId},t.flowId=e.documentNo||"",t.loadVersionList({rowId:t.currentTemplateId,id:t.currentTemplateRowId,templateRowId:t.currentTemplateId}),0===t.templateManagementPermissions.length&&t.filterTemplateManagementPermissions(),t.showModelDetail=!0,t.showEngineDetail=!1,t.showEngineCheck=!1,t.showApprovalProgressDetail=!1,t.showReportDetail=!1})).asyncErrorCatch((function(e){console.error("获取模板详情失败:",e),t.$message.error("获取模板详情失败")}))}else{if(u)return this.currentEngineDetail=h7(h7({},e),{},{flowId:e.documentNo,id:e.modelId}),this.flowId=e.documentNo||"",this.showEngineDetail=!0,this.canResend=!0,this.showEngineCheck=!1,this.showApprovalProgressDetail=!1,this.showReportDetail=!1,this.showModelDetail=!1,this.fromTodo=!0,void(this.engineType="竞品"===e.dataType?"竞品":"玉柴");if(i)return this.currentEngineDetail=h7(h7({},e),{},{flowId:e.documentNo,id:e.documentNo}),this.showEngineCheck=!0,this.showEngineDetail=!1,this.canResend=!1,this.fromTodo=!0,this.showApprovalProgressDetail=!1,this.showReportDetail=!1,void(this.engineType="竞品"===e.dataType?"竞品":"玉柴");if(o)return this.createdById=e.createdById||"",this.showApprovalProgressDetail=!0,this.showEngineDetail=!1,this.showEngineCheck=!1,this.showReportDetail=!1,void(this.currentApprovalDetail=h7({flowId:e.documentNo||"",templateId:e.modelId||""},e));if(s)return this.fromTodo=!0,this.showReportDetail=!0,this.canResend=!1,this.showEngineDetail=!1,this.showEngineCheck=!1,this.showApprovalProgressDetail=!1,void(this.currentReportDetail=h7({flowId:e.documentNo||"",reportId:e.modelId||""},e));if(l){this.fromTodo=!1,this.showReportDetail=!0,this.canResend=!0,this.showEngineDetail=!1,this.showEngineCheck=!1,this.showApprovalProgressDetail=!1;var d=e.modelId||e.reportId||e.id;this.currentReportDetail={reportId:d,flowId:e.documentNo||e.flowId}}else a?(this.currentEngineDetail=h7(h7({},e),{},{id:e.modelId}),this.isDispatchMode=!1,this.canResend=!1,this.dispatchType="todo",this.filledBy=e.ownerId||"",this.flowId=e.documentNo||"",this.responsiblePersonId=""):n?(this.currentEngineDetail=h7(h7({},e),{},{id:e.modelId}),this.isDispatchMode=!0,this.dispatchType="update_param",this.responsiblePersonId=e.ownerId||"",this.filledBy=""):(this.isDispatchMode=!0,this.dispatchType="todo",this.responsiblePersonId="",this.filledBy=""),this.showEngineDetail=!0,this.showEngineCheck=!1,this.showApprovalProgressDetail=!1,this.showReportDetail=!1}},handleBackFromTodoDetail:function(){this.showModelDetail=!1,this.loadData()},handleBackFromDetail:function(){this.showEngineDetail=!1,this.currentModel="",this.currentEngineModelID="",this.currentEngineDetail=null,this.isDispatchMode=!1,this.dispatchType="todo",this.responsiblePersonId="",this.filledBy="",this.engineType="玉柴",this.loadData()},handleBackFromCheck:function(){this.showEngineCheck=!1,this.currentEngineDetail=null,this.engineType="玉柴",this.loadData()},handleBackFromApprovalProgress:function(){this.showApprovalProgressDetail=!1,this.currentApprovalDetail=null,this.loadData()},handleBackFromReport:function(){this.showReportDetail=!1,this.currentReportDetail=null,this.loadData()},currentChange:function(e){this.pagination.currentPage=e,this.loadData()},selectDataChange:function(e){this.$emit("select-data-change",e)},handleRefresh:function(){this.pagination.currentPage=1,this.loadData()},loadData:function(){var e=this,t=h7(h7({},$e.GET_TODO_LIST),{},{params:{page:this.pagination.currentPage,size:this.pagination.pageSize,personId:pe()},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){e.tableData=t.data.list,e.pagination.total=t.data.totalCount})).asyncErrorCatch((function(t){console.error("获取待办列表失败:",t),e.$message.error("获取待办列表失败")}))},formatDate:function(e){var t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0"),n=String(e.getHours()).padStart(2,"0"),i=String(e.getMinutes()).padStart(2,"0");return"".concat(t,"-").concat(r,"-").concat(a," ").concat(n,":").concat(i)},formatDateTime:function(e){var t=e.cellValue;if(!t)return"";try{var r=new Date(t);if(isNaN(r.getTime()))return t;var a=r.getFullYear(),n=String(r.getMonth()+1).padStart(2,"0"),i=String(r.getDate()).padStart(2,"0"),o=String(r.getHours()).padStart(2,"0"),s=String(r.getMinutes()).padStart(2,"0"),l=String(r.getSeconds()).padStart(2,"0");return"".concat(a,"-").concat(n,"-").concat(i," ").concat(o,":").concat(s,":").concat(l)}catch(c){return console.error("日期格式化错误:",c),t}}}},y7=v7,b7=(r("de90"),p(y7,c7,u7,!1,null,null,null)),_7=b7.exports,x7=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"apaas-custom-page-todo custom-page"},[e.showEngineDetail||e.showEngineCheck||e.showApprovalProgressDetail||e.showReportDetail?e._e():[r("div",{staticClass:"page-header"},[r("div",{staticClass:"title"},[e._v(" 我的经办 ")]),r("div",{staticClass:"operation"},[r("x-svg-icon",{staticClass:"pointer",staticStyle:{cursor:"pointer"},attrs:{name:"refresh-icon"},nativeOn:{click:function(t){return e.handleRefresh()}}})],1)]),r("div",{staticClass:"page-data-list"},[r("x-vxe-table",{ref:"vxeTable",staticClass:"block-table",attrs:{border:!0,seqWidth:40,colConfigs:e.tableConfig.colConfigs,tableData:e.tableData,rowDraggable:e.tableConfig.rowDraggable,seqType:e.tableConfig.seqType,pagination:e.pagination,layout:e.tableConfig.layout,seqConfig:e.tableConfig.seqConfig,autoSize:e.tableConfig.autoSize,pageConfig:e.tableConfig.pageConfig},on:{"table-row-click":e.rowClickEvent,"size-change":e.pageSizeChange,"current-page-change":e.currentChange,"select-data-change":e.selectDataChange},scopedSlots:e._u([e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customSlot,fn:function(n){var i=n.row,o=n.rowIndex;return["options"===t.customSlot?r("div",{key:"op"+a+o},[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowView(i)}}},[e._v("查看")])]):e._e()]}}}))],null,!0)},[r("template",{slot:"empty"},[r("div",{staticClass:"table-empty"},[r("x-empty-page")],1)])],2)],1)],e.showEngineDetail&&!e.showEngineCheck?r("engine-detail",{staticClass:"engine-detail-wrapper",attrs:{model:e.currentModel,detail:e.currentEngineDetail,"engine-model-i-d":e.currentEngineModelID,"is-dispatch-mode":e.isDispatchMode,"dispatch-type":e.dispatchType,"responsible-person-id":e.responsiblePersonId,"filled-by":e.filledBy},on:{back:e.handleBackFromDetail}}):e._e(),e.showEngineCheck?r("engine-check",{staticClass:"engine-check-wrapper",attrs:{detail:e.currentEngineDetail,visible:e.showEngineCheck,"engine-type":e.engineType},on:{close:e.handleBackFromCheck}}):e._e(),e.showApprovalProgressDetail?r("approval-progress-detail",{staticClass:"approval-progress-detail-wrapper",attrs:{detail:e.currentApprovalDetail,visible:e.showApprovalProgressDetail},on:{refresh:e.handleBackFromApprovalProgress,close:e.handleBackFromApprovalProgress}}):e._e(),e.showReportDetail?r("report-detail",{staticClass:"report-detail-wrapper",attrs:{detail:e.currentReportDetail,visible:e.showReportDetail},on:{close:e.handleBackFromReport}}):e._e()],2)},w7=[];function S7(e){return S7="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S7(e)}function D7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function C7(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?D7(Object(r),!0).forEach((function(t){T7(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D7(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function T7(e,t,r){return t=I7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I7(e){var t=O7(e,"string");return"symbol"===S7(t)?t:String(t)}function O7(e,t){if("object"!==S7(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==S7(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var M7={name:"TodoPage",components:{EngineDetail:Rr,EngineCheck:D8,ApprovalProgressDetail:J9,ReportDetail:B4},data:function(){return{tableData:[],pagination:{currentPage:1,pageSize:10,total:0},showEngineDetail:!1,showEngineCheck:!1,currentModel:"",currentEngineModelID:"",currentEngineDetail:null,isDispatchMode:!1,dispatchType:"todo",responsiblePersonId:"",filledBy:"",engineType:"玉柴",showApprovalProgressDetail:!1,currentApprovalDetail:null,showReportDetail:!1,currentReportDetail:null}},computed:{tableConfig:function(){return{rowDraggable:!1,colConfigs:[{prop:"processTitle",label:"流程主题",showOverflowTooltip:!0,minWidth:"160"},{prop:"currentNode",label:"当前环节",showOverflowTooltip:!0,minWidth:"140"},{prop:"currentProcessor",label:"当前处理人",showOverflowTooltip:!0,minWidth:"120"},{prop:"createdBy",label:"创建人",showOverflowTooltip:!0,minWidth:"120"},{prop:"creationDate",label:"创建时间",showOverflowTooltip:!0,minWidth:"160",align:"center",formatter:this.formatDateTime},{prop:"options",label:"操作",customSlot:"options",align:"center",width:"100",fixed:"right"}],seqType:"",seqConfig:{},layout:"total, prev, pager, next, jumper, sizes"}}},mounted:function(){this.loadData()},methods:{pageSizeChange:function(e){this.pagination.pageSize=e,this.pagination.currentPage=1,this.loadData()},rowClickEvent:function(e){console.warn(e)},handleRowView:function(e){var t=e.dataType,r="数据维护"===t,a="任务分解"===t,n="数据审批"===t,i="模板审核"===t,o="对标报告审核"===t;return this.currentModel=e.modelName||e.productFullName||"",this.currentEngineModelID=e.modelId,n?(this.currentEngineDetail=C7(C7({},e),{},{id:e.documentNo}),this.showEngineCheck=!0,this.showEngineDetail=!1,this.showApprovalProgressDetail=!1,this.showReportDetail=!1,void(this.engineType="竞品"===e.dataType?"竞品":"玉柴")):i?(this.showApprovalProgressDetail=!0,this.showEngineDetail=!1,this.showEngineCheck=!1,this.showReportDetail=!1,void(this.currentApprovalDetail=C7({flowId:e.documentNo||"",templateId:e.modelId||"",id:e.documentNo||""},e))):o?(this.showReportDetail=!0,this.showEngineDetail=!1,this.showEngineCheck=!1,this.showApprovalProgressDetail=!1,void(this.currentReportDetail=C7({flowId:e.documentNo||"",reportId:e.modelId||""},e))):(r?(this.currentEngineDetail=C7(C7({},e),{},{id:e.modelId}),this.isDispatchMode=!1,this.dispatchType="todo",this.filledBy=e.ownerId||"",this.responsiblePersonId=""):a?(this.currentEngineDetail=C7(C7({},e),{},{id:e.modelId}),this.isDispatchMode=!0,this.dispatchType="update_param",this.responsiblePersonId=e.ownerId||"",this.filledBy=""):(this.isDispatchMode=!0,this.dispatchType="todo",this.responsiblePersonId="",this.filledBy=""),this.showEngineDetail=!0,this.showEngineCheck=!1,this.showApprovalProgressDetail=!1,void(this.showReportDetail=!1))},handleBackFromDetail:function(){this.showEngineDetail=!1,this.currentModel="",this.currentEngineModelID="",this.currentEngineDetail=null,this.isDispatchMode=!1,this.dispatchType="todo",this.responsiblePersonId="",this.filledBy="",this.engineType="玉柴"},handleBackFromCheck:function(){this.showEngineCheck=!1,this.currentEngineDetail=null,this.engineType="玉柴",this.loadData()},handleBackFromApprovalProgress:function(){this.showApprovalProgressDetail=!1,this.currentApprovalDetail=null,this.loadData()},handleBackFromReport:function(){this.showReportDetail=!1,this.currentReportDetail=null,this.loadData()},currentChange:function(e){this.pagination.currentPage=e,this.loadData()},selectDataChange:function(e){this.$emit("select-data-change",e)},handleRefresh:function(){this.pagination.currentPage=1,this.loadData()},loadData:function(){var e=this,t=C7(C7({},$e.GET_MY_DONE_LIST),{},{params:{page:this.pagination.currentPage,size:this.pagination.pageSize,personId:pe()},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){e.tableData=t.data.list,e.pagination.total=t.data.totalCount})).asyncErrorCatch((function(t){console.error("获取待办列表失败:",t),e.$message.error("获取待办列表失败")}))},formatDate:function(e){var t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0"),n=String(e.getHours()).padStart(2,"0"),i=String(e.getMinutes()).padStart(2,"0");return"".concat(t,"-").concat(r,"-").concat(a," ").concat(n,":").concat(i)},formatDateTime:function(e){var t=e.cellValue;if(!t)return"";try{var r=new Date(t);if(isNaN(r.getTime()))return t;var a=r.getFullYear(),n=String(r.getMonth()+1).padStart(2,"0"),i=String(r.getDate()).padStart(2,"0"),o=String(r.getHours()).padStart(2,"0"),s=String(r.getMinutes()).padStart(2,"0"),l=String(r.getSeconds()).padStart(2,"0");return"".concat(a,"-").concat(n,"-").concat(i," ").concat(o,":").concat(s,":").concat(l)}catch(c){return console.error("日期格式化错误:",c),t}}}},A7=M7,k7=(r("f60e"),p(A7,x7,w7,!1,null,null,null)),P7=k7.exports,N7=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"apaas-custom-page-todo custom-page"},[e.showEngineDetail||e.showEngineCheck||e.showApprovalProgressDetail||e.showReportDetail?e._e():[r("div",{staticClass:"page-header"},[r("div",{staticClass:"title"},[e._v(" 我的发起 ")]),r("div",{staticClass:"operation"},[r("x-svg-icon",{staticClass:"pointer",staticStyle:{cursor:"pointer"},attrs:{name:"refresh-icon"},nativeOn:{click:function(t){return e.handleRefresh()}}})],1)]),r("div",{staticClass:"page-data-list"},[r("x-vxe-table",{ref:"vxeTable",staticClass:"block-table",attrs:{border:!0,seqWidth:40,colConfigs:e.tableConfig.colConfigs,tableData:e.tableData,rowDraggable:e.tableConfig.rowDraggable,seqType:e.tableConfig.seqType,pagination:e.pagination,layout:e.tableConfig.layout,seqConfig:e.tableConfig.seqConfig,autoSize:e.tableConfig.autoSize,pageConfig:e.tableConfig.pageConfig},on:{"table-row-click":e.rowClickEvent,"size-change":e.pageSizeChange,"current-page-change":e.currentChange,"select-data-change":e.selectDataChange},scopedSlots:e._u([e._l(e.tableConfig.colConfigs,(function(t,a){return{key:t.customSlot,fn:function(n){var i=n.row,o=n.rowIndex;return["options"===t.customSlot?r("div",{key:"op"+a+o},[r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowView(i)}}},[e._v(" 查看 ")]),1==i.enableReturn?r("span",{staticStyle:{width:"6px",display:"inline-block"}}):e._e(),1==i.enableReturn?r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(t){return t.stopPropagation(),e.handleRowWithdraw(i)}}},[e._v("撤回")]):e._e()]):e._e()]}}}))],null,!0)},[r("template",{slot:"empty"},[r("div",{staticClass:"table-empty"},[r("x-empty-page")],1)])],2)],1)],e.showEngineDetail&&!e.showEngineCheck?r("engine-detail",{staticClass:"engine-detail-wrapper",attrs:{model:e.currentModel,detail:e.currentEngineDetail,"engine-model-i-d":e.currentEngineModelID,"is-dispatch-mode":e.isDispatchMode,"dispatch-type":e.dispatchType,"responsible-person-id":e.responsiblePersonId,"filled-by":e.filledBy,"last-updated-by":e.lastUpdatedBy},on:{back:e.handleBackFromDetail}}):e._e(),e.showEngineCheck?r("engine-check",{staticClass:"engine-check-wrapper",attrs:{detail:e.currentEngineDetail,visible:e.showEngineCheck,"engine-type":e.engineType},on:{close:e.handleBackFromCheck}}):e._e(),e.showApprovalProgressDetail?r("approval-progress-detail",{staticClass:"approval-progress-detail-wrapper",attrs:{detail:e.currentApprovalDetail,visible:e.showApprovalProgressDetail},on:{refresh:e.handleBackFromApprovalProgress,close:e.handleBackFromApprovalProgress}}):e._e(),e.showReportDetail?r("report-detail",{staticClass:"report-detail-wrapper",attrs:{detail:e.currentReportDetail,visible:e.showReportDetail},on:{close:e.handleBackFromReport}}):e._e()],2)},E7=[];function R7(e){return R7="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R7(e)}function L7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function j7(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L7(Object(r),!0).forEach((function(t){F7(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L7(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function F7(e,t,r){return t=V7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V7(e){var t=z7(e,"string");return"symbol"===R7(t)?t:String(t)}function z7(e,t){if("object"!==R7(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==R7(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var B7={name:"TodoPage",components:{EngineDetail:Rr,EngineCheck:D8,ApprovalProgressDetail:J9,ReportDetail:B4},data:function(){return{tableData:[],pagination:{currentPage:1,pageSize:10,total:0},showEngineDetail:!1,showEngineCheck:!1,currentModel:"",currentEngineModelID:"",currentEngineDetail:null,isDispatchMode:!1,dispatchType:"todo",responsiblePersonId:"",filledBy:"",engineType:"玉柴",showApprovalProgressDetail:!1,currentApprovalDetail:null,showReportDetail:!1,currentReportDetail:null}},computed:{tableConfig:function(){return{rowDraggable:!1,colConfigs:[{prop:"processTitle",label:"流程主题",showOverflowTooltip:!0,minWidth:"160"},{prop:"currentNode",label:"当前环节",showOverflowTooltip:!0,minWidth:"100"},{prop:"currentProcessor",label:"当前处理人",showOverflowTooltip:!0,minWidth:"100"},{prop:"createdBy",label:"创建人",showOverflowTooltip:!0,minWidth:"100"},{prop:"creationDate",label:"创建时间",showOverflowTooltip:!0,minWidth:"160",align:"center",formatter:this.formatDateTime},{prop:"options",label:"操作",customSlot:"options",align:"center",width:"140",fixed:"right"}],seqType:"",seqConfig:{},layout:"total, prev, pager, next, jumper, sizes"}}},mounted:function(){this.loadData()},methods:{pageSizeChange:function(e){this.pagination.pageSize=e,this.pagination.currentPage=1,this.loadData()},rowClickEvent:function(e){console.warn(e)},handleRowView:function(e){var t=e.dataType||"",r="数据维护"===t,a="任务分解"===t,n="数据审批"===t,i="模板审核"===t,o="对标报告审核"===t;return this.currentModel=e.modelName||e.productFullName||"",this.currentEngineModelID=e.modelId,n?(this.currentEngineDetail=j7(j7({},e),{},{id:e.documentNo}),this.showEngineCheck=!0,this.showEngineDetail=!1,this.showApprovalProgressDetail=!1,this.showReportDetail=!1,void(this.engineType="竞品"===e.dataType?"竞品":"玉柴")):i?(this.showApprovalProgressDetail=!0,this.showEngineDetail=!1,this.showEngineCheck=!1,this.showReportDetail=!1,void(this.currentApprovalDetail=j7({flowId:e.documentNo||"",templateId:e.modelId||""},e))):o?(this.showReportDetail=!0,this.showEngineDetail=!1,this.showEngineCheck=!1,this.showApprovalProgressDetail=!1,void(this.currentReportDetail=j7({flowId:e.documentNo||"",reportId:e.modelId||""},e))):(r?(this.currentEngineDetail=j7(j7({},e),{},{id:e.modelId}),this.isDispatchMode=!1,this.dispatchType="todo",this.filledBy=e.ownerId||"",this.lastUpdatedBy=e.lastUpdatedBy||"",this.responsiblePersonId=""):a?(this.currentEngineDetail=j7(j7({},e),{},{id:e.modelId}),this.isDispatchMode=!0,this.dispatchType="update_param",this.responsiblePersonId=e.ownerId||"",this.filledBy="",this.lastUpdatedBy=e.lastUpdatedBy||""):(this.isDispatchMode=!0,this.dispatchType="todo",this.responsiblePersonId="",this.filledBy=""),this.showEngineDetail=!0,this.showEngineCheck=!1,this.showApprovalProgressDetail=!1,void(this.showReportDetail=!1))},handleBackFromDetail:function(){this.showEngineDetail=!1,this.currentModel="",this.currentEngineModelID="",this.currentEngineDetail=null,this.isDispatchMode=!1,this.dispatchType="todo",this.responsiblePersonId="",this.filledBy="",this.engineType="玉柴"},handleBackFromCheck:function(){this.showEngineCheck=!1,this.currentEngineDetail=null,this.engineType="玉柴",this.loadData()},handleBackFromApprovalProgress:function(){this.showApprovalProgressDetail=!1,this.currentApprovalDetail=null,this.loadData()},handleBackFromReport:function(){this.showReportDetail=!1,this.currentReportDetail=null,this.loadData()},currentChange:function(e){this.pagination.currentPage=e,this.loadData()},selectDataChange:function(e){this.$emit("select-data-change",e)},handleRefresh:function(){this.pagination.currentPage=1,this.loadData()},loadData:function(){var e=this,t=j7(j7({},$e.GET_MY_SEND_LIST),{},{params:{page:this.pagination.currentPage,size:this.pagination.pageSize,createdById:pe()},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){e.tableData=t.data.list,e.pagination.total=t.data.totalCount})).asyncErrorCatch((function(t){console.error("获取待办列表失败:",t),e.$message.error("获取待办列表失败")}))},formatDate:function(e){var t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0"),n=String(e.getHours()).padStart(2,"0"),i=String(e.getMinutes()).padStart(2,"0");return"".concat(t,"-").concat(r,"-").concat(a," ").concat(n,":").concat(i)},formatDateTime:function(e){var t=e.cellValue;if(!t)return"";try{var r=new Date(t);if(isNaN(r.getTime()))return t;var a=r.getFullYear(),n=String(r.getMonth()+1).padStart(2,"0"),i=String(r.getDate()).padStart(2,"0"),o=String(r.getHours()).padStart(2,"0"),s=String(r.getMinutes()).padStart(2,"0"),l=String(r.getSeconds()).padStart(2,"0");return"".concat(a,"-").concat(n,"-").concat(i," ").concat(o,":").concat(s,":").concat(l)}catch(c){return console.error("日期格式化错误:",c),t}},handleRowWithdraw:function(e){var t=this,r="模板审核"===e.dataType,a=e.enableReturn=1,n="对标报告审核"===e.dataType,i="数据审批"===e.dataType;r&&a&&this.$confirm("确定撤回吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var r=j7(j7({},$e.RETURN_APPROVAL),{},{params:{flowId:e.documentNo,userId:pe(),opinion:"同意",result:"RETURN"},disableSuccessMsg:!0});t.$request(r).asyncThen((function(e){console.log("确定撤回"),t.loadData()})).asyncErrorCatch((function(e){console.error("撤回失败:",e),t.$message.error("撤回失败")}))})).catch((function(){console.log("取消撤回")})),n&&a&&this.$confirm("确定撤回吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var r=j7(j7({},$e.RETURN_REPORT),{},{params:{flowId:e.documentNo,userId:pe(),opinion:"同意",result:"RETURN"},disableSuccessMsg:!0});t.$request(r).asyncThen((function(e){console.log("确定撤回"),t.loadData()})).asyncErrorCatch((function(e){console.error("撤回失败:",e),t.$message.error("撤回失败")}))})).catch((function(){console.log("取消撤回")})),i&&a&&this.$confirm("确定撤回吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){console.log("确定撤回");var r=j7(j7({},$e.RESTART_DATA_APPROVAL),{},{params:{flowId:e.documentNo,userId:pe(),opinion:"同意",result:"RETURN"},disableSuccessMsg:!0});t.$request(r).asyncThen((function(){console.log("确定撤回"),t.$message({type:"success",message:"撤回成功"}),t.loadData()})).asyncErrorCatch((function(){t.$message({type:"error",message:"撤回失败"}),t.loadData()}))})).catch((function(){console.log("取消撤回")})),console.warn(e)}}},$7=B7,G7=(r("a795"),p($7,N7,E7,!1,null,null,null)),U7=G7.exports,W7=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"permission-management-page custom-page"},[e._m(0),r("div",{staticClass:"page-content"},[r("div",{staticClass:"header-section"},[r("el-button",{attrs:{type:"primary"},on:{click:e.handleAddRole}},[e._v(" 新增角色 ")]),r("el-button",{attrs:{icon:"el-icon-refresh",size:"small"},on:{click:e.handleRefresh}},[e._v(" 刷新 ")])],1),r("div",{staticClass:"table-section"},[r("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData,border:""}},[r("el-table-column",{attrs:{type:"index",label:"序号",width:"90",align:"center"}}),r("el-table-column",{attrs:{prop:"roleName",label:"角色名称",align:"center","min-width":"150"}}),r("el-table-column",{attrs:{prop:"roleCode",label:"角色代码",align:"center","min-width":"150"}}),r("el-table-column",{attrs:{prop:"roleDescription",label:"角色描述",align:"center","min-width":"150"}}),r("el-table-column",{attrs:{prop:"creationDate",label:"创建时间",align:"center",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[e._v(" "+e._s(e.formatDate(r.creationDate))+" ")]}}])}),r("el-table-column",{attrs:{label:"操作",width:"280",align:"center",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return["超级管理员"!==t.row.roleName?r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(r){return r.stopPropagation(),e.handlePermissionConfig(t.row)}}},[e._v(" 权限配置 ")]):e._e(),r("span",{staticClass:"link-separator"}),r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(r){return r.stopPropagation(),e.handlePersonConfig(t.row)}}},[e._v(" 人员配置 ")]),r("span",{staticClass:"link-separator"}),"超级管理员"!==t.row.roleName?r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(r){return r.stopPropagation(),e.handleEdit(t.row)}}},[e._v(" 编辑 ")]):e._e(),r("span",{staticClass:"link-separator"}),"超级管理员"!==t.row.roleName?r("a",{staticClass:"el-link el-link--primary",attrs:{href:"javascript:void(0)"},on:{click:function(r){return r.stopPropagation(),e.handleDelete(t.row,t.$index)}}},[e._v(" 删除 ")]):e._e()]}}])})],1),r("div",{staticClass:"pagination-section"},[r("el-pagination",{attrs:{"current-page":e.pagination.currentPage,"page-sizes":[10,20,50,100],"page-size":e.pagination.pageSize,total:e.pagination.total,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)]),r("el-dialog",{staticClass:"permission-config-dialog",attrs:{title:"权限配置",visible:e.dialogVisible,width:"800px","close-on-click-modal":!1,modal:!1},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleDialogClose}},[r("div",{staticClass:"permission-config-content"},[r("div",{staticClass:"permission-tree-wrapper"},[r("el-tree",{key:"permission-tree-"+e.dialogVisible,ref:"permissionTree",staticClass:"permission-tree",attrs:{data:[],"node-key":"id",props:{children:"children",label:"label",isLeaf:"isLeaf"},"filter-node-method":e.filterTreeNode,"default-expand-all":!1,lazy:!0,load:e.loadNode},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.node,n=t.data;return r("span",{staticClass:"custom-tree-node"},[r("span",{staticClass:"node-label"},[e._v(" "+e._s(a.label)+" ")]),"menu"===n.type||"subsystem"===n.type||"parameter"===n.type||"template"===n.type?r("span",{staticClass:"permission-checkboxes"},[r("el-checkbox",{attrs:{size:"small"},on:{change:function(t){return e.handleNodePermissionChange(n,"view")}},model:{value:n.permissions.view,callback:function(t){e.$set(n.permissions,"view",t)},expression:"data.permissions.view"}},[e._v(" 查看 ")]),r("el-checkbox",{attrs:{size:"small"},on:{change:function(t){return e.handleNodePermissionChange(n,"edit")}},model:{value:n.permissions.edit,callback:function(t){e.$set(n.permissions,"edit",t)},expression:"data.permissions.edit"}},[e._v(" 编辑 ")])],1):e._e()])}}])})],1)]),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.submitting},on:{click:e.handleSubmit}},[e._v(" 确定 ")])],1)]),r("el-dialog",{staticClass:"person-config-dialog",attrs:{title:"人员配置",visible:e.personConfigDialogVisible,width:"500px","close-on-click-modal":!1,modal:!1},on:{"update:visible":function(t){e.personConfigDialogVisible=t},close:e.handlePersonConfigDialogClose}},[r("el-form",{ref:"personConfigForm",attrs:{model:e.personConfigFormData,rules:e.personConfigFormRules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"配置类型:",prop:"configType"}},[r("el-radio-group",{on:{change:e.handleConfigTypeChange},model:{value:e.personConfigFormData.configType,callback:function(t){e.$set(e.personConfigFormData,"configType",t)},expression:"personConfigFormData.configType"}},[r("el-radio",{attrs:{label:"person"}},[e._v(" 配置人员 ")]),r("el-radio",{attrs:{label:"department"}},[e._v(" 配置部门 ")])],1)],1),"department"===e.personConfigFormData.configType?[r("el-form-item",{attrs:{label:"责任部门:",prop:"department"}},[r("el-cascader",{ref:"departmentCascader",staticStyle:{width:"100%"},attrs:{options:e.departmentList,props:{multiple:!0,checkStrictly:!0,value:"id",label:"name",children:"children",emitPath:!0},filterable:"",placeholder:"请选择责任部门(可多选)",clearable:""},on:{change:e.handlePersonDepartmentChange},model:{value:e.personConfigFormData.department,callback:function(t){e.$set(e.personConfigFormData,"department",t)},expression:"personConfigFormData.department"}})],1)]:[r("el-form-item",{attrs:{label:"人员:",prop:"person"}},[r("el-select",{staticClass:"person-select",staticStyle:{width:"100%"},attrs:{multiple:"",filterable:"",remote:"",placeholder:"请输入人员姓名进行搜索",clearable:"","remote-method":e.queryPersonByDepartment,loading:e.personSearchLoading},model:{value:e.personConfigFormData.person,callback:function(t){e.$set(e.personConfigFormData,"person",t)},expression:"personConfigFormData.person"}},e._l(e.personOptions,(function(t){return r("el-option",{key:t.userNumber,attrs:{value:t.userId,label:t.username}},[r("span",{staticClass:"username-text"},[e._v(e._s(t.username))]),r("span",{staticClass:"user-id-text"},[e._v(e._s(t.userNumber))])])})),1)],1)]],2),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handlePersonConfigDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.personConfigSubmitting},on:{click:e.handlePersonConfigSubmit}},[e._v(" 确定 ")])],1)],1),r("el-dialog",{staticClass:"add-role-dialog",attrs:{title:"add"===e.addRoleMode?"新增角色":"编辑角色",visible:e.addRoleDialogVisible,width:"500px","close-on-click-modal":!1,modal:!1},on:{"update:visible":function(t){e.addRoleDialogVisible=t},close:e.handleAddRoleDialogClose}},[r("el-form",{ref:"addRoleForm",attrs:{model:e.addRoleFormData,rules:e.addRoleFormRules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"角色名称",prop:"roleName"}},[r("el-input",{attrs:{placeholder:"请输入角色名称",maxlength:"50","show-word-limit":""},model:{value:e.addRoleFormData.roleName,callback:function(t){e.$set(e.addRoleFormData,"roleName",t)},expression:"addRoleFormData.roleName"}})],1),r("el-form-item",{attrs:{label:"角色代码",prop:"roleCode"}},[r("el-input",{attrs:{placeholder:"请输入角色代码",maxlength:"50","show-word-limit":""},model:{value:e.addRoleFormData.roleCode,callback:function(t){e.$set(e.addRoleFormData,"roleCode",t)},expression:"addRoleFormData.roleCode"}})],1),r("el-form-item",{attrs:{label:"角色描述",prop:"roleDescription"}},[r("el-input",{attrs:{type:"textarea",rows:4,placeholder:"请输入角色描述",maxlength:"200","show-word-limit":""},model:{value:e.addRoleFormData.roleDescription,callback:function(t){e.$set(e.addRoleFormData,"roleDescription",t)},expression:"addRoleFormData.roleDescription"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handleAddRoleDialogClose}},[e._v(" 取消 ")]),r("el-button",{attrs:{type:"primary",loading:e.addRoleSubmitting},on:{click:e.handleAddRoleSubmit}},[e._v(" 确定 ")])],1)],1)],1)},H7=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"page-header"},[r("div",{staticClass:"title"},[e._v(" 权限管理 ")])])}],q7=r("5a0c"),Y7=r.n(q7);function X7(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=J7(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function Z7(e){return eee(e)||Q7(e)||J7(e)||K7()}function K7(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function J7(e,t){if(e){if("string"===typeof e)return tee(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tee(e,t):void 0}}function Q7(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function eee(e){if(Array.isArray(e))return tee(e)}function tee(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function ree(e){return ree="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ree(e)}function aee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function nee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?aee(Object(r),!0).forEach((function(t){iee(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function iee(e,t,r){return t=oee(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oee(e){var t=see(e,"string");return"symbol"===ree(t)?t:String(t)}function see(e,t){if("object"!==ree(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==ree(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var lee={name:"PermissionManagement",data:function(){var e=this;return{tableData:[],pagination:{currentPage:1,pageSize:10,total:0},dialogVisible:!1,dialogMode:"add",submitting:!1,formData:{roleName:"",rowId:"",permissions:[]},formRules:{roleName:[{required:!0,message:"请输入角色名称",trigger:"blur"}],permissions:[{required:!0,message:"请至少分配一个权限",trigger:"change",validator:this.validatePermissions}]},addRoleDialogVisible:!1,addRoleSubmitting:!1,addRoleMode:"add",addRoleFormData:{roleName:"",roleDescription:"",roleId:""},addRoleFormRules:{roleName:[{required:!0,message:"请输入角色名称",trigger:"blur"}],roleDescription:[{required:!0,message:"请输入角色描述",trigger:"blur"}]},menuTreeData:[],subsystemList:[],subsystemPartsMap:{},treeFilterText:"",nodeMap:{},pendingPermissions:[],menuList:["参数模板管理","玉柴发动机数据","竞品发动机数据","对标报告"],templateList:[],personConfigDialogVisible:!1,personConfigSubmitting:!1,personConfigFormData:{configType:"person",department:"",person:[],selectDeptId:"",selectDeptName:"",selectDeptIds:[],roleId:"",roleName:""},personOptions:[],personSearchLoading:!1,personConfigFormRules:{department:[{validator:function(t,r,a){"department"===e.personConfigFormData.configType&&(!r||Array.isArray(r)&&0===r.length)?a(new Error("请选择责任部门")):a()},trigger:"change"}],person:[{validator:function(t,r,a){"person"===e.personConfigFormData.configType&&(!r||Array.isArray(r)&&0===r.length)?a(new Error("请选择人员")):a()},trigger:"change"}]},departmentList:[],departmentCascaderProps:{value:"id",label:"name",children:"children",checkStrictly:!0,emitPath:!1,multiple:!1},personSearchTimer:null,currentPersonRequest:null}},computed:{dialogTitle:function(){return"add"===this.dialogMode?"新增":"修改"},allParameterNodes:function(){var e=this,t=[];return Object.keys(this.nodeMap).forEach((function(r){var a=e.nodeMap[r];a&&"parameter"===a.type&&(a.permissions||e.$set(a,"permissions",{view:!1,edit:!1}),t.push({id:a.id,menuName:a.menuName||"",subsystem:a.subsystem||"",parameter:a.parameter||a.label||"",partsName:a.partsName||a.label||"",parameterId:a.parameterId||"",permissions:a.permissions}))})),t}},watch:{treeFilterText:function(e){this.$refs.permissionTree&&this.$refs.permissionTree.filter(e)}},mounted:function(){this.loadPermissionData(),this.loadParamList(),this.loadTemplateList(),this.loadDepartmentList(),this.getUserSelfRole()},beforeDestroy:function(){this.personSearchTimer&&(clearTimeout(this.personSearchTimer),this.personSearchTimer=null),this.currentPersonRequest=null},methods:{getUserSelfRole:function(){var e=nee(nee({},nt.GET_USER_SELF_ROLE),{},{params:{userOrDepID:pe()},disableSuccessMsg:!0});this.$request(e).asyncThen((function(e){console.log("获取用户自身角色:",e)})).asyncErrorCatch((function(e){console.error("获取用户自身角色失败:",e)}))},validatePermissions:function(e,t,r){var a=this.allParameterNodes.some((function(e){return e.permissions.view||e.permissions.edit}));a?r():r(new Error("请至少分配一个权限"))},loadParamList:function(){var e=this,t=nee(nee({},nt.GET_PARAM_LIST),{},{disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){if(t&&t.data){var r={};"object"===ree(t.data)&&null!==t.data&&(r=t.data.result&&"object"===ree(t.data.result)?t.data.result:t.data.data&&"object"===ree(t.data.data)?t.data.data:t.data);var a={};Object.keys(r).forEach((function(e){var t=r[e];if(Array.isArray(t)){var n=Z7(new Set(t)).filter((function(e){return null!==e&&void 0!==e&&""!==e}));a[e]=n}else a[e]=[]})),e.subsystemPartsMap=a,e.subsystemList=Object.keys(a),console.log("加载参数列表成功,子系统数量:",e.subsystemList.length),console.log("子系统到partsName映射:",e.subsystemPartsMap)}else e.subsystemPartsMap={},e.subsystemList=[];e.buildMenuTree()})).asyncErrorCatch((function(t){console.error("加载参数列表失败:",t),e.subsystemPartsMap={},e.subsystemList=[],e.buildMenuTree()}))},buildMenuTree:function(){var e=this;this.nodeMap={};var t=[];this.menuList.forEach((function(r,a){var n="menu-".concat(a),i={id:n,label:r,type:"menu",children:null,isLeaf:"对标报告"===r,permissions:{view:!1,edit:!1}};e.nodeMap[n]=i,t.push(i)})),this.menuTreeData=t},filterTreeNode:function(e,t){return!e||t.label&&-1!==t.label.indexOf(e)},loadNode:function(e,t){return 0===e.level?(this.menuTreeData&&0!==this.menuTreeData.length||this.buildMenuTree(),void t(this.menuTreeData||[])):"menu"===e.data.type?"对标报告"===e.data.label?void t([]):"参数模板管理"===e.data.label?void this.loadTemplateListForLazy(e.data,t):void this.loadMenuSubsystemsForLazy(e.data,t):void("subsystem"!==e.data.type?t([]):this.loadSubsystemParametersForLazy(e.data,t))},loadTemplateList:function(){var e=this,t=nee(nee({},nt.GET_MODEL_LIST),{},{params:{pageNumber:1,pageSize:999},disableSuccessMsg:!0});this.$request(t,!1).asyncThen((function(t){var r=t.data.result||[];e.templateList=r.map((function(e){return{templateId:e.rowId||e.id||"",templateName:e.templateName||""}})),console.log("加载模板列表成功,模板数量:",e.templateList.length)})).asyncErrorCatch((function(t){console.error("加载模板列表失败:",t),e.templateList=[]}))},loadTemplateListForLazy:function(e,t){var r=this;if(!this.templateList||0===this.templateList.length)return this.loadTemplateList(),void setTimeout((function(){r.buildTemplateNodes(e,t)}),500);this.buildTemplateNodes(e,t)},buildTemplateNodes:function(e,t){var r=this,a=[];this.templateList.forEach((function(t,n){if(t.templateName){var i="".concat(e.id,"-template-").concat(n),o={id:i,label:t.templateName,type:"template",menuName:e.label,templateId:t.templateId,templateName:t.templateName,permissions:{view:!1,edit:!1},isLeaf:!0,children:null};a.push(o),r.nodeMap[i]=o,r.applyPendingPermissionsToNode(o)}})),this.$nextTick((function(){a.forEach((function(e){r.applyPendingPermissionsToNode(e)}))})),t(a)},loadMenuSubsystemsForLazy:function(e,t){var r=this,a=Object.keys(this.subsystemPartsMap||{});if(0!==a.length){var n=[];a.forEach((function(t,a){if(t){var i="".concat(e.id,"-subsystem-").concat(a),o=r.subsystemPartsMap[t]||[],s=[],l=new Set;o.forEach((function(a,n){if(a&&!l.has(a)){l.add(a);var o="".concat(i,"-param-").concat(n),c={id:o,label:a,type:"parameter",menuName:e.label,subsystem:t,parameter:a,parameterName:a,partsName:a,parameterId:"",permissions:{view:!1,edit:!1},isLeaf:!0,children:null};s.push(c),r.nodeMap[o]=c,r.applyPendingPermissionsToNode(c)}}));var c={id:i,label:t,type:"subsystem",menuName:e.label,subsystem:t,children:s,isLeaf:0===s.length,permissions:{view:!1,edit:!1}};n.push(c),r.nodeMap[i]=c}})),this.$nextTick((function(){n.forEach((function(e){e.children&&Array.isArray(e.children)&&e.children.forEach((function(e){r.applyPendingPermissionsToNode(e)}))}))})),t(n)}else t([])},loadSubsystemParametersForLazy:function(e,t){var r=this;if(!e.subsystem)return console.warn("子系统节点缺少子系统名称"),void t([]);var a=this.subsystemPartsMap[e.subsystem]||[],n=[],i=new Set;a.forEach((function(t,a){if(t&&!i.has(t)){i.add(t);var o="".concat(e.id,"-param-").concat(a),s={id:o,label:t,type:"parameter",menuName:e.menuName,subsystem:e.subsystem,parameter:t,parameterName:t,partsName:t,parameterId:"",permissions:{view:!1,edit:!1},isLeaf:!0,children:null};n.push(s),r.nodeMap[o]=s,r.applyPendingPermissionsToNode(s)}})),t(n),this.$nextTick((function(){n.forEach((function(e){r.applyPendingPermissionsToNode(e)}))}))},handleNodePermissionChange:function(e,t){var r=this;"edit"===t&&e.permissions&&!0===e.permissions.edit&&(e.permissions.view||this.$set(e.permissions,"view",!0),e.id&&this.nodeMap[e.id]&&this.$set(this.nodeMap[e.id].permissions,"view",!0)),e.id&&this.nodeMap[e.id]&&this.$set(this.nodeMap[e.id].permissions,t,e.permissions[t]),"menu"===e.type?this.handleMenuPermissionChange(e,t):"subsystem"===e.type?(this.handleSubsystemPermissionChange(e,t),this.updateMenuPermissionFromChildren(e)):"template"===e.type?this.updateMenuPermissionFromChildren(e):"parameter"===e.type&&this.updateSubsystemPermissionFromChildren(e),this.$nextTick((function(){r.$refs.form&&r.$refs.form.validateField("permissions")}))},handleMenuPermissionChange:function(e,t){var r=this,a=e.permissions[t],n=e.label||"";"edit"===t&&a&&(this.$set(e.permissions,"view",!0),e.id&&this.nodeMap[e.id]&&this.$set(this.nodeMap[e.id].permissions,"view",!0));var i=function e(n){n.children&&Array.isArray(n.children)&&n.children.forEach((function(n){if(n.id&&r.nodeMap[n.id]){var i=r.nodeMap[n.id];if(i.permissions||r.$set(i,"permissions",{view:!1,edit:!1}),r.$set(i.permissions,t,a),"edit"===t&&a&&r.$set(i.permissions,"view",!0),n.permissions){var o=nee(nee({},n.permissions),{},iee({},t,a));"edit"===t&&a&&(o.view=!0),r.$set(n,"permissions",o)}e(n)}}))};if(i(e),a){this.pendingPermissions||(this.pendingPermissions=[]);var o=pe(),s="view"===t?1:2;if("参数模板管理"===n)this.templateList.forEach((function(e){if(e.templateName){var t="".concat(n,"/").concat(e.templateName),a=r.pendingPermissions.find((function(e){return e.permissionPath===t&&e.parameterPer===s}));a||r.pendingPermissions.push({permissionPath:t,parameterPer:s,userId:o})}}));else if("玉柴发动机数据"===n||"竞品发动机数据"===n)Object.keys(this.subsystemPartsMap||{}).forEach((function(e){var t=r.subsystemPartsMap[e]||[];t.forEach((function(t){if(t){var a="".concat(n,"/").concat(e,"/").concat(t),i=r.pendingPermissions.find((function(e){return e.permissionPath===a&&e.parameterPer===s}));i||r.pendingPermissions.push({permissionPath:a,parameterPer:s,userId:o})}}))}));else if("对标报告"===n){var l=this.buildPermissionPath(e);if(l){var c=this.pendingPermissions.find((function(e){return e.permissionPath===l&&e.parameterPer===s}));c||this.pendingPermissions.push({permissionPath:l,parameterPer:s,userId:o})}}if("edit"===t){var u=1;if("参数模板管理"===n)this.templateList.forEach((function(e){if(e.templateName){var t="".concat(n,"/").concat(e.templateName),a=r.pendingPermissions.find((function(e){return e.permissionPath===t&&e.parameterPer===u}));a||r.pendingPermissions.push({permissionPath:t,parameterPer:u,userId:o})}}));else if("玉柴发动机数据"===n||"竞品发动机数据"===n)Object.keys(this.subsystemPartsMap||{}).forEach((function(e){var t=r.subsystemPartsMap[e]||[];t.forEach((function(t){if(t){var a="".concat(n,"/").concat(e,"/").concat(t),i=r.pendingPermissions.find((function(e){return e.permissionPath===a&&e.parameterPer===u}));i||r.pendingPermissions.push({permissionPath:a,parameterPer:u,userId:o})}}))}));else if("对标报告"===n){var p=this.buildPermissionPath(e);if(p){var d=this.pendingPermissions.find((function(e){return e.permissionPath===p&&e.parameterPer===u}));d||this.pendingPermissions.push({permissionPath:p,parameterPer:u,userId:o})}}}}else if(this.pendingPermissions){var h="view"===t?1:2;if(this.pendingPermissions=this.pendingPermissions.filter((function(e){return e.permissionPath&&e.permissionPath.startsWith(n+"/")?e.parameterPer!==h:"对标报告"!==n||e.permissionPath!==n||e.parameterPer!==h})),"edit"===t){var f=1;this.pendingPermissions=this.pendingPermissions.filter((function(e){return e.permissionPath&&e.permissionPath.startsWith(n+"/")?e.parameterPer!==f:"对标报告"!==n||e.permissionPath!==n||e.parameterPer!==f}))}}},updateMenuPermissionFromChildren:function(e){var t=this,r=null;if(e&&"menu"===e.type?r=e:e&&e.menuName&&(r=Object.values(this.nodeMap).find((function(t){return"menu"===t.type&&t.label===e.menuName}))),r){var a=[],n=function e(t){t.children&&Array.isArray(t.children)&&t.children.forEach((function(t){a.push(t),e(t)}))};if(n(r),0!==a.length){var i=a.every((function(e){var r=t.nodeMap[e.id];return r&&r.permissions&&!0===r.permissions.view})),o=a.every((function(e){var r=t.nodeMap[e.id];return r&&r.permissions&&!0===r.permissions.edit}));r.permissions||this.$set(r,"permissions",{view:!1,edit:!1}),this.$set(r.permissions,"view",i),this.$set(r.permissions,"edit",o)}}},handlePermissionChange:function(e,t){this.handleNodePermissionChange(e,t)},handleSubsystemPermissionChange:function(e,t){var r=this;e.id&&this.nodeMap[e.id]&&this.$set(this.nodeMap[e.id].permissions,t,e.permissions[t]),"edit"===t&&e.permissions&&!0===e.permissions.edit&&(this.$set(e.permissions,"view",!0),e.id&&this.nodeMap[e.id]&&this.$set(this.nodeMap[e.id].permissions,"view",!0));var a=e.children||[],n=e.permissions[t];a.forEach((function(e){if(e.id&&r.nodeMap[e.id]&&(r.nodeMap[e.id].permissions||r.$set(r.nodeMap[e.id],"permissions",{view:!1,edit:!1}),r.$set(r.nodeMap[e.id].permissions,t,n),"edit"===t&&n&&r.$set(r.nodeMap[e.id].permissions,"view",!0),e.permissions)){var a=nee(nee({},e.permissions),{},iee({},t,n));"edit"===t&&n&&(a.view=!0),r.$set(e,"permissions",a)}})),this.$nextTick((function(){r.$refs.form&&r.$refs.form.validateField("permissions")}))},updateSubsystemPermissionFromChildren:function(e){var t=this;if(e&&e.subsystem){var r=Object.values(this.nodeMap).find((function(t){return"subsystem"===t.type&&t.subsystem===e.subsystem&&t.menuName===e.menuName}));if(r&&r.children&&0!==r.children.length){var a=r.children,n=a.every((function(e){var r=t.nodeMap[e.id];return r&&r.permissions&&!0===r.permissions.view})),i=a.every((function(e){var r=t.nodeMap[e.id];return r&&r.permissions&&!0===r.permissions.edit}));r.permissions&&(this.$set(r.permissions,"view",n),this.$set(r.permissions,"edit",i))}}},loadPermissionData:function(){var e=this,t=nee(nee({},nt.GET_ROLE_PERMISSION),{},{disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){t&&t.data?(e.tableData=t.data,e.pagination.total=t.data.length||0):(e.tableData=[],e.pagination.total=0)})).asyncErrorCatch((function(t){console.error("加载权限数据失败:",t),e.tableData=[],e.pagination.total=0}))},handleAddRole:function(){var e=this;this.addRoleMode="add",this.addRoleDialogVisible=!0,this.addRoleFormData={roleName:"",roleDescription:"",roleId:""},this.$nextTick((function(){e.$refs.addRoleForm&&e.$refs.addRoleForm.clearValidate()}))},handleAddRoleSubmit:function(){var e=this;this.$refs.addRoleForm.validate((function(t){if(t){e.addRoleSubmitting=!0;var r="edit"===e.addRoleMode,a=r?nt.EDIT_PERMISSION_DATA_ROLE:nt.ADD_ROLE_PERMISSION,n=nee(nee({},a),{},{url:r?a.url+pe():a.url,params:r?{id:e.addRoleFormData.roleId,roleName:e.addRoleFormData.roleName,roleCode:e.addRoleFormData.roleCode,roleDescription:e.addRoleFormData.roleDescription}:{roleName:e.addRoleFormData.roleName,roleCode:e.addRoleFormData.roleCode,roleDescription:e.addRoleFormData.roleDescription},disableSuccessMsg:!0});e.$request(n).asyncThen((function(t){e.handleAddRoleDialogClose(),e.$message({type:"success",message:r?"编辑角色成功":"新增角色成功"}),e.loadPermissionData()})).asyncErrorCatch((function(t){console.error(r?"编辑角色失败":"新增角色失败",t),e.$message.error(t.message||(r?"编辑角色失败":"新增角色失败"))})).finally((function(){e.addRoleSubmitting=!1}))}}))},handleAddRoleDialogClose:function(){this.addRoleDialogVisible=!1,this.addRoleMode="add",this.addRoleFormData={roleName:"",roleDescription:"",roleId:""},this.$refs.addRoleForm&&this.$refs.addRoleForm.clearValidate()},handlePermissionConfig:function(e){var t=this;this.dialogMode="edit";var r=e.rowId||e.id||"";this.formData={roleName:e.roleName||"",rowId:r,permissions:[]},this.resetAllPermissions(),this.menuTreeData&&0!==this.menuTreeData.length||this.buildMenuTree(),this.dialogVisible=!0,this.loadRolePermissionDetail(r),this.$nextTick((function(){t.$refs.form&&t.$refs.form.clearValidate()}))},loadRolePermissionDetail:function(e){var t=this;if(e){var r=nee(nee({},nt.GET_ROLE_CONTROL_LIST),{},{params:{roleID:e},disableSuccessMsg:!0});this.$request(r).asyncThen((function(e){var r=[];e&&e.data&&(Array.isArray(e.data)?r=e.data:e.data.result&&Array.isArray(e.data.result)?r=e.data.result:e.data.data&&Array.isArray(e.data.data)&&(r=e.data.data)),console.log("加载到的权限数据:",r),r.length>0?t.setPermissionsFromData(r):t.pendingPermissions=[]})).asyncErrorCatch((function(e){console.error("加载权限详情失败:",e)}))}},handlePersonConfig:function(e){var t=this;this.personConfigFormData={configType:"person",department:"",person:[],selectDeptId:"",selectDeptName:"",selectDeptIds:[],roleId:e.rowId||e.id||"",roleName:e.roleName||""};var r=nee(nee({},nt.CHECK_ROLE_USER_DEPT),{},{params:{roleId:e.rowId||e.id||""},disableSuccessMsg:!0});this.$request(r).asyncThen((function(e){if(e&&e.data){var r=e.data,a=r["人员"]||r.person||[],n=[],i=new Map;a.forEach((function(e){if("string"===typeof e&&e.includes("-")){var t=e.split("-");if(t.length>=2){var r=t[0],a=t.slice(1).join("-");n.push(a),i.set(a,{userId:a,username:r,userNumber:a})}}})),t.personConfigFormData.person=n,t.personOptions=Array.from(i.values())}})).asyncErrorCatch((function(e){console.error("加载人员列表失败:",e)})),this.personConfigDialogVisible=!0,this.$nextTick((function(){t.$refs.personConfigForm&&t.$refs.personConfigForm.clearValidate()}))},handleConfigTypeChange:function(e){var t=this;"department"===e?(this.personConfigFormData.department=[],this.personConfigFormData.selectDeptIds=[],this.personConfigFormData.person=[],this.personOptions=[]):(this.personConfigFormData.department="",this.personConfigFormData.selectDeptId="",this.personConfigFormData.selectDeptName="",this.personConfigFormData.selectDeptIds=[]),this.$nextTick((function(){t.$refs.personConfigForm&&t.$refs.personConfigForm.clearValidate()}))},loadDepartmentList:function(){var e=this,t=nee(nee({},nt.QUERY_ORG_TREE),{},{disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){var r=[];t&&t.data&&(r=t.data.result||t.data.data||t.data||[]),e.departmentList=e.formatDepartmentTreeData(r)})).asyncErrorCatch((function(t){console.error("加载部门列表失败:",t),e.departmentList=[]}))},formatDepartmentTreeData:function(e){if(!Array.isArray(e))return[];var t=function e(t){var r={id:t.id,name:t.name||t.label||t.deptName||""};return t.children&&Array.isArray(t.children)&&t.children.length>0&&(r.children=t.children.map((function(t){return e(t)}))),r};return e.map((function(e){return t(e)}))},handlePersonDepartmentChange:function(e){var t=this;"department"===this.personConfigFormData.configType?(e&&Array.isArray(e)&&e.length>0?this.personConfigFormData.selectDeptIds=e.map((function(e){return Array.isArray(e)&&e.length>0?e[e.length-1]:e})).filter((function(e){return e})):this.personConfigFormData.selectDeptIds=[],console.log("配置部门模式 - 选中的部门值:",e),console.log("配置部门模式 - 选中的部门ID数组:",this.personConfigFormData.selectDeptIds),this.$nextTick((function(){t.$refs.personConfigForm&&t.$refs.personConfigForm.validateField("department")}))):e&&Array.isArray(e)&&e.length>0?(this.personConfigFormData.selectDeptId=e[e.length-1],this.personConfigFormData.selectDeptName=this.getDepartmentPathName(this.personConfigFormData.selectDeptId),this.personConfigFormData.person=[],this.personOptions=[]):(this.personConfigFormData.selectDeptId="",this.personConfigFormData.selectDeptName="",this.personConfigFormData.person=[],this.personOptions=[])},queryPersonByDepartment:function(e){var t=this;if(e&&""!==e.trim())this.personSearchTimer&&clearTimeout(this.personSearchTimer),this.personSearchTimer=setTimeout((function(){var r=e.trim();if(r){t.personSearchLoading=!0;var a=nee(nee({},nt.GET_ALLUSERS),{},{params:{name:r},disableSuccessMsg:!0});t.currentPersonRequest=t.$request(a),t.currentPersonRequest.asyncThen((function(e){var r=e&&e.data,a=[];Array.isArray(r)?a=r:r&&Array.isArray(r.result)?a=r.result:r&&r.data&&Array.isArray(r.data)&&(a=r.data);var n=a.map((function(e){return{userId:e.userId||e.id,username:e.username||e.name,userNumber:e.userNumber||e.userId||e.id}})).filter((function(e){return e.userId&&e.userNumber})),i=new Set(t.personConfigFormData.person||[]),o=n.filter((function(e){return!i.has(e.userId)})),s=(t.personOptions||[]).filter((function(e){return e.userId&&t.personConfigFormData.person&&t.personConfigFormData.person.includes(e.userId)})),l=new Map;s.forEach((function(e){e.userId&&l.set(e.userId,e)})),o.forEach((function(e){e.userId&&!l.has(e.userId)&&l.set(e.userId,e)})),t.personOptions=Array.from(l.values()),t.personSearchLoading=!1,t.currentPersonRequest=null})).asyncErrorCatch((function(e){if(console.error("搜索人员失败:",e),t.personConfigFormData.person&&t.personConfigFormData.person.length>0){var r=t.personOptions.filter((function(e){return e.userId&&t.personConfigFormData.person.includes(e.userId)}));t.personOptions=r}else t.personOptions=[];t.personSearchLoading=!1,t.currentPersonRequest=null}))}else t.personOptions=[]}),300);else if(this.personConfigFormData.person&&this.personConfigFormData.person.length>0){var r=this.personOptions.filter((function(e){return e.userId&&t.personConfigFormData.person.includes(e.userId)})),a=this.personConfigFormData.person.filter((function(e){return!r.some((function(t){return t.userId===e}))}));a.length,this.personOptions=r}else this.personOptions=[]},getDepartmentPathName:function(e){if(!e||!this.departmentList||0===this.departmentList.length)return"";var t=function e(t,r){var a,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=X7(t);try{for(i.s();!(a=i.n()).done;){var o=a.value,s=[].concat(Z7(n),[o.name]);if(o.id===r)return s;if(o.children&&o.children.length>0){var l=e(o.children,r,s);if(l)return l}}}catch(c){i.e(c)}finally{i.f()}return null},r=t(this.departmentList,e);return r?r.join("-"):""},handlePersonConfigSubmit:function(){var e=this;this.$refs.personConfigForm.validate((function(t){if(t){e.personConfigSubmitting=!0;var r=[],a=0;if("department"===e.personConfigFormData.configType){if(a=1,r=e.personConfigFormData.selectDeptIds&&e.personConfigFormData.selectDeptIds.length>0?e.personConfigFormData.selectDeptIds:e.personConfigFormData.department&&Array.isArray(e.personConfigFormData.department)&&e.personConfigFormData.department.length>0?e.personConfigFormData.department.map((function(e){return Array.isArray(e)&&e.length>0?e[e.length-1]:e})).filter((function(e){return e})):[],0===r.length)return e.$message.warning("请至少选择一个部门"),void(e.personConfigSubmitting=!1)}else if(a=0,r=(e.personConfigFormData.person||[]).filter((function(e){return e})),0===r.length)return e.$message.warning("请至少选择一个人员"),void(e.personConfigSubmitting=!1);var n=r.map((function(e){return"string"===typeof e&&e.startsWith("ID:")?e.substring(3):e}));console.log("人员配置数据:",{roleId:e.personConfigFormData.roleId,roleName:e.personConfigFormData.roleName,configType:e.personConfigFormData.configType,isDept:a,userOrDeptIds:n});var i=nee(nee({},nt.GET_ROLE_PERMISSION_BING),{},{params:{roleId:e.personConfigFormData.roleId,userOrDeptIds:n,isDept:a},disableSuccessMsg:!0});e.$request(i).asyncThen((function(t){e.handlePersonConfigDialogClose(),e.loadPermissionData(),e.$message({type:"success",message:"配置成功"})})).asyncErrorCatch((function(t){console.error("配置失败:",t),e.$message({type:"error",message:"配置失败"})})).finally((function(){e.personConfigSubmitting=!1}))}}))},handlePersonConfigDialogClose:function(){this.personConfigDialogVisible=!1,this.personConfigFormData={configType:"person",department:"",person:[],selectDeptId:"",selectDeptName:"",selectDeptIds:[],roleId:"",roleName:""},this.personOptions=[],this.personSearchTimer&&(clearTimeout(this.personSearchTimer),this.personSearchTimer=null),this.currentPersonRequest=null,this.$refs.personConfigForm&&this.$refs.personConfigForm.clearValidate()},handleEdit:function(e){var t=this;this.addRoleMode="edit",this.addRoleDialogVisible=!0,this.addRoleFormData={roleName:e.roleName||"",roleDescription:e.roleDescription||"",roleId:e.rowId||e.id||""},this.$nextTick((function(){t.$refs.addRoleForm&&t.$refs.addRoleForm.clearValidate()}))},resetAllPermissions:function(){var e=this;Object.keys(this.nodeMap).forEach((function(t){var r=e.nodeMap[t];r&&r.permissions?(e.$set(r.permissions,"view",!1),e.$set(r.permissions,"edit",!1)):!r||"menu"!==r.type&&"template"!==r.type&&"parameter"!==r.type||e.$set(r,"permissions",{view:!1,edit:!1})}))},extractMenuNameFromPath:function(e){if(!e)return"";var t=e.split("/");return t.length>0?t[t.length-1].trim():e.trim()},setPermissionsFromData:function(e){var t=this,r=Array.isArray(e)?e:[];this.resetAllPermissions(),this.pendingPermissions=r;var a=new Map;r.forEach((function(e){var t=e.permissionPath||"";if(t){a.has(t)||a.set(t,{permissionPath:t,view:!1,edit:!1});var r=a.get(t);1===e.parameterPer||"1"===e.parameterPer||"查看"===e.parameterPer?r.view=!0:2!==e.parameterPer&&"2"!==e.parameterPer&&"编辑"!==e.parameterPer||(r.edit=!0)}})),a.forEach((function(e,r){e.edit&&!e.view&&(e.view=!0),Object.keys(t.nodeMap).forEach((function(a){var n=t.nodeMap[a];if(n){var i=t.buildPermissionPath(n);if(i===r){var o={view:e.view||!1,edit:e.edit||!1};o.edit&&!o.view&&(o.view=!0),t.$set(n,"permissions",o),console.log("设置已加载节点权限:",n.id,n.label,n.type,r,o)}}}))})),this.$nextTick((function(){Object.keys(t.nodeMap).forEach((function(e){var r=t.nodeMap[e];if(r&&"subsystem"===r.type&&r.children&&r.children.length>0){var a=r.children,n=a.every((function(e){var r=t.nodeMap[e.id];return r&&r.permissions&&!0===r.permissions.view})),i=a.every((function(e){var r=t.nodeMap[e.id];return r&&r.permissions&&!0===r.permissions.edit}));r.permissions&&(t.$set(r.permissions,"view",n),t.$set(r.permissions,"edit",i))}})),Object.keys(t.nodeMap).forEach((function(e){var r=t.nodeMap[e];r&&"menu"===r.type&&t.updateMenuPermissionFromChildren(r)}))})),console.log("权限数据已保存,待应用权限数量:",this.pendingPermissions.length,"处理后的权限映射:",Array.from(a.entries()))},applyPendingPermissionsToNode:function(e){var t=this;if(e&&this.pendingPermissions&&0!==this.pendingPermissions.length){var r=this.buildPermissionPath(e);if(r){var a=this.pendingPermissions.filter((function(e){var t=e.permissionPath||"";return t===r}));if(0!==a.length){e.permissions||this.$set(e,"permissions",{view:!1,edit:!1});var n=!1,i=!1;a.forEach((function(e){1===e.parameterPer||"1"===e.parameterPer||"查看"===e.parameterPer?n=!0:2!==e.parameterPer&&"2"!==e.parameterPer&&"编辑"!==e.parameterPer||(i=!0)})),i&&!n&&(n=!0);var o={view:n,edit:i};this.nodeMap[e.id]&&this.$set(this.nodeMap[e.id],"permissions",o),this.$set(e,"permissions",o),console.log("应用权限到节点:",e.id,e.label,e.type,r,o,"匹配的权限:",a),this.$nextTick((function(){"parameter"===e.type?t.updateSubsystemPermissionFromChildren(e):"subsystem"===e.type&&t.updateMenuPermissionFromChildren(e)}))}}}},buildPermissionPath:function(e){if(!e)return"";if("menu"===e.type)return e.label||"";if("subsystem"===e.type){var t=e.menuName||"",r=e.subsystem||e.label||"";return"".concat(t,"/").concat(r)}if("parameter"===e.type){var a=e.menuName||"",n=e.subsystem||"",i=e.partsName||e.parameterName||e.label||"";return"".concat(a,"/").concat(n,"/").concat(i)}if("template"===e.type){var o=e.menuName||"",s=e.templateName||e.label||"";return"".concat(o,"/").concat(s)}return""},collectPermissions:function(){var e=this,t=[],r=this.formData.rowId||"",a=pe();return Object.keys(this.nodeMap).forEach((function(n){var i=e.nodeMap[n];if(i){var o=i.permissions||{view:!1,edit:!1};if(o.view||o.edit){var s=e.buildPermissionPath(i);if(s){if(o.view){var l={permissionPath:s,parameterPer:1,userId:a};r&&(l.roleId=r),t.push(l)}if(o.edit){var c={permissionPath:s,parameterPer:2,userId:a};r&&(c.roleId=r),t.push(c)}}}}})),console.log("收集到的权限:",t),t},handleDialogClose:function(){this.dialogVisible=!1,this.formData={roleName:"",rowId:"",permissions:[]},this.treeFilterText="",this.resetAllPermissions(),this.pendingPermissions=[],this.$refs.form&&this.$refs.form.clearValidate()},handleSubmit:function(){var e=this,t=this.collectPermissions();if(0!==t.length){this.submitting=!0,console.log(t,"permissions");var r=nee(nee({},nt.EDIT_ROLE_CONTROL_LIST),{},{params:t,disableSuccessMsg:!0});this.$request(r).asyncThen((function(t){e.handleDialogClose(),e.loadPermissionData()})).asyncErrorCatch((function(t){console.error("权限配置失败:",t),e.$message.error(t.message||"权限配置失败")})).finally((function(){e.submitting=!1}))}else this.$message.warning("请至少分配一个权限")},handleDelete:function(e,t){var r=this;this.$confirm("确定要删除该记录吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t=nee(nee({},nt.DELETE_ROLE_PERMISSION),{},{params:{roleID:e.roleId||e.id||e.rowId,userID:pe()},disableSuccessMsg:!0});r.$request(t).asyncThen((function(e){r.loadPermissionData()})).asyncErrorCatch((function(e){console.error("删除失败:",e),r.$message.error(e.message||"删除失败")}))})).catch((function(){}))},handleSizeChange:function(e){this.pagination.pageSize=e,this.pagination.currentPage=1,this.loadPermissionData()},handleCurrentChange:function(e){this.pagination.currentPage=e,this.loadPermissionData()},handleRefresh:function(){this.pagination.currentPage=1,this.loadPermissionData()},formatDate:function(e){return Y7()(e).format("YYYY-MM-DD HH:mm:ss")}}},cee=lee,uee=(r("a495"),p(cee,W7,H7,!1,null,"4d2fdadc",null)),pee=uee.exports,dee=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("x-app-layout",{attrs:{layoutEngine:e.layoutEngine,isCollapse:e.isCollapse},scopedSlots:e._u([{key:"header",fn:function(){return[e.appInfo?r("x-app-header",{attrs:{layoutEngine:e.layoutEngine,appInfo:e.appInfo}}):e._e()]},proxy:!0},{key:"menu",fn:function(){return[r("x-app-menu",{attrs:{menuConfig:e.menuConfig,showMenu:e.showMenu&&!!e.appInfo,isCollapse:e.isCollapse,layoutEngine:e.layoutEngine},on:{"menu-add-click":e.menuAddClick}})]},proxy:!0}])},[r("template",{slot:"appPage"},[r("div",{staticClass:"menu-switch",on:{click:e.changeCollapse}},[e.isCollapse?r("x-svg-icon",{attrs:{name:"arrow-right-icon"}}):r("x-svg-icon",{attrs:{name:"arrow-left-icon"}})],1),e._t("appPage")],2)],2)},hee=[];function fee(e){return fee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fee(e)}function mee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function gee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mee(Object(r),!0).forEach((function(t){vee(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function vee(e,t,r){return t=yee(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yee(e){var t=bee(e,"string");return"symbol"===fee(t)?t:String(t)}function bee(e,t){if("object"!==fee(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==fee(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var _ee={name:"CustomLayout",props:{layoutEngine:{type:Object,default:function(){return{}}}},data:function(){return{isCollapse:!1,showMenu:!0,badgeNum:0}},computed:{appInfo:function(){return this.layoutEngine&&this.layoutEngine.layoutDataControl&&this.layoutEngine.layoutDataControl.appInfo||{}},menuConfig:function(){this.$route.fullPath;var e=this.layoutEngine&&this.layoutEngine.layoutDataControl&&this.layoutEngine.layoutDataControl.menuConfig||{menu:[],defaultActive:null,menuTreeData:[]};return console.log(e,2222323232,"data"),e.menuTreeData[0].badgeNum=this.badgeNum,e}},watch:{$route:{handler:function(){console.log(2222323232,"2222323232"),this.setBadgeNum()},immediate:!1}},mounted:function(){console.log(this.layoutEngine.layoutConfig.keepAliveComps,54545454545454544e7)},methods:{setBadgeNum:function(){var e=this,t=gee(gee({},nt.GET_TODO_LIST),{},{params:{page:1,size:10,personId:pe()},disableSuccessMsg:!0});this.$request(t).asyncThen((function(t){e.badgeNum=t.data.totalCount})).asyncErrorCatch((function(e){console.error("获取待办列表失败:",e)}))},changeCollapse:function(){var e=this;this.showMenu=!1,this.$nextTick((function(){e.isCollapse=!e.isCollapse,e.showMenu=!0}))},menuAddClick:function(e){this.$emit("menu-add-click",e)},closed:function(e){var t=this.layoutEngine.layoutConfig.currentMenu.id;this.layoutEngine.removeKeepAliveComps(e),e.id===t&&this.layoutEngine.actionControl.executeActionWithSync("TO_ROUTER",{menu:this.layoutEngine.layoutConfig.currentMenu})},handlerclick:function(e){this.layoutEngine.addKeepAliveComps(e),this.layoutEngine.actionControl.executeActionWithSync("TO_ROUTER",{menu:this.layoutEngine.layoutConfig.currentMenu})}}},xee=_ee,wee=(r("dcc9"),p(xee,dee,hee,!1,null,null,null)),See=wee.exports,Dee=[],Cee=Dee,Tee=[],Iee=Tee,Oee=[],Mee=Oee;function Aee(e){return Eee(e)||Nee(e)||Pee(e)||kee()}function kee(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Pee(e,t){if(e){if("string"===typeof e)return Ree(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ree(e,t):void 0}}function Nee(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Eee(e){if(Array.isArray(e))return Ree(e)}function Ree(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}var Lee=[].concat(Aee(Cee),Aee(Iee),Aee(Mee)),jee=Lee,Fee=[],Vee=Fee,zee=function(e,t){if(e.component("apaas-custom-mydemo",Ne),e.component("apaas-custom-mydemo-demo",h),e.component("apaas-custom-modalContorl",Xt),e.component("apaas-custom-modelDetail",Rt),e.component("apaas-custom-selfEnginedata",na),e.component("apaas-custom-otherEnginedata",va),e.component("apaas-custom-checkData",w6),e.component("apaas-custom-reportCheck",O6),e.component("apaas-custom-engineDetail",Rr),e.component("apaas-custom-report",G6),e.component("apaas-custom-reportList",n8),e.component("apaas-custom-reportDetail",B4),e.component("apaas-custom-approvalManagement",l7),e.component("apaas-custom-toDoList",_7),e.component("apaas-custom-managerData",h9),e.component("apaas-custom-fillerData",P9),e.component("apaas-custom-selfEngineCheck",R8),e.component("apaas-custom-otherEngineCheck",Y8),e.component("apaas-custom-myDone",P7),e.component("apaas-custom-mySend",U7),e.component("apaas-custom-permissionManagement",pee),e.component("apaas-custom-layout",See),jee&&Array.isArray(jee)&&jee.forEach((function(t){e.component(t.name,t)})),e.LayoutEngine){var r=e.LayoutEngine.getInstance(e.LayoutEngine.currentLayoutId);r.registerLayoutComponent(See)}Vee&&Array.isArray(Vee)&&Vee.forEach((function(t){var r={widgetConfig:t};e.FormEngine&&e.FormEngine.registerCustomComponentConfig(r)}))},Bee={install:zee},$ee=Bee;t["default"]=$ee}})})); |